diff --git a/judo-ui-react/src/main/resources/actor/src/containers/widget-fragments/binarytypeinput.hbs b/judo-ui-react/src/main/resources/actor/src/containers/widget-fragments/binarytypeinput.hbs index 4478ff50..98fe0e73 100644 --- a/judo-ui-react/src/main/resources/actor/src/containers/widget-fragments/binarytypeinput.hbs +++ b/judo-ui-react/src/main/resources/actor/src/containers/widget-fragments/binarytypeinput.hbs @@ -1,4 +1,4 @@ -{{# if child.hiddenBy }} { (actions?.is{{ safeName child }}Hidden ? actions?.is{{ safeName child }}Hidden(data, editMode) : !data.{{ child.hiddenBy.name }}) && {{/ if }} +{{# if child.hiddenBy }} { (actions?.is{{ safeName child }}Hidden ? !actions?.is{{ safeName child }}Hidden(data, editMode) : !data.{{ child.hiddenBy.name }}) && {{/ if }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} diff --git a/judo-ui-react/src/main/resources/actor/src/containers/widget-fragments/checkbox.hbs b/judo-ui-react/src/main/resources/actor/src/containers/widget-fragments/checkbox.hbs index b783bec5..3caf799b 100644 --- a/judo-ui-react/src/main/resources/actor/src/containers/widget-fragments/checkbox.hbs +++ b/judo-ui-react/src/main/resources/actor/src/containers/widget-fragments/checkbox.hbs @@ -1,4 +1,4 @@ -{{# if child.hiddenBy }} { (actions?.is{{ safeName child }}Hidden ? actions?.is{{ safeName child }}Hidden(data, editMode) : !data.{{ child.hiddenBy.name }}) && {{/ if }} +{{# if child.hiddenBy }} { (actions?.is{{ safeName child }}Hidden ? !actions?.is{{ safeName child }}Hidden(data, editMode) : !data.{{ child.hiddenBy.name }}) && {{/ if }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if this.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} {{# if child.customImplementation }} fragment.header.hbs }} import type { Dispatch, SetStateAction } from 'react'; -import { format } from 'date-fns'; +import { format, parse } from 'date-fns'; import type { TFunction } from 'i18next'; export const uiDateToServiceDate = (date?: any | null): string | null => { @@ -25,17 +25,14 @@ export const uiTimeToServiceTime = (time?: any | null): string | null => { if(time === undefined || time === null) { return null; } - const resolved: Date = typeof time === 'string' ? new Date(time) : time; - return resolved.getUTCHours().toString().padStart(2, '0') + ':' + resolved.getUTCMinutes().toString().padStart(2, '0'); + // const resolved: Date = typeof time === 'string' ? new Date(time) : time; + // return resolved.getUTCHours().toString().padStart(2, '0') + ':' + resolved.getUTCMinutes().toString().padStart(2, '0'); + return format(time, 'HH:mm:ss'); } - export const serviceTimeToUiTime = (timeStr?: any) => { if (typeof timeStr === 'string') { - let splittedTime = timeStr.split(':'); - let date: Date = new Date(); - date.setHours(Number(splittedTime[0]) - date.getTimezoneOffset() / 60, Number(splittedTime[1])); - return date; + return parse(timeStr, 'HH:mm:ss', new Date()); } return timeStr; };