Skip to content
Snippets Groups Projects
Commit aa87cec8 authored by Audrey Hamelers's avatar Audrey Hamelers
Browse files

detailed descriptions for notification settings

parent 905fb7f5
No related branches found
No related tags found
3 merge requests!380Pipeline changes,!379Build step added for the master branch,!378k8s release
...@@ -114,10 +114,7 @@ class Login extends React.Component { ...@@ -114,10 +114,7 @@ class Login extends React.Component {
if (loading || !data) return null if (loading || !data) return null
const { display, startDate, stopDate } = data.findProp.value const { display, startDate, stopDate } = data.findProp.value
if (!display) return null if (!display) return null
if ( if (moment().isAfter(`${stopDate.date}T${startDate.time}`))
moment().isBefore(`${startDate.date}T${startDate.time}`) ||
moment().isAfter(`${stopDate.date}T${startDate.time}`)
)
return null return null
return ( return (
<Holiday <Holiday
......
...@@ -5,7 +5,8 @@ exports.seed = async (knex, Promise) => { ...@@ -5,7 +5,8 @@ exports.seed = async (knex, Promise) => {
const seeds = [ const seeds = [
{ {
name: 'homeNotification', name: 'homeNotification',
description: 'Login page notification settings', description:
'Login page notification settings. Checkbox must be checked for notification to appear, even when prescheduled. If dates are included, the notification will appear only after the start date and before the end date.',
schema: JSON.stringify({ schema: JSON.stringify({
type: 'object', type: 'object',
properties: { properties: {
...@@ -76,7 +77,8 @@ exports.seed = async (knex, Promise) => { ...@@ -76,7 +77,8 @@ exports.seed = async (knex, Promise) => {
}, },
{ {
name: 'holidayNotification', name: 'holidayNotification',
description: 'Login page holiday notice settings', description:
'Login page holiday notice settings. Start and end dates of the holiday period are required for the message text. Only the checkbox and end date are used for display calculations; if the checkbox is checked the notification will appear until the end date.',
schema: JSON.stringify({ schema: JSON.stringify({
type: 'object', type: 'object',
properties: { properties: {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment