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AAYsC,EACZpzC,EAAoBC,EAAEmzC,EAAatC,KACrC9wC,EAAoBkxC,EAAEJ,GAAYsC,EAAYtC,IAGhD,GAAGuC,EAAS,IAAItwC,EAASswC,EAAQrzC,GAGlC,IADGmzC,GAA4BA,EAA2BpqC,GACrDuI,EAAI+/B,EAASl0B,OAAQ7L,IACzB2hC,EAAU5B,EAAS//B,GAChBtR,EAAoBC,EAAE+yC,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgB3B,EAAS//B,IAAM,EAEhC,OAAOtR,EAAoBoxC,EAAEruC,IAG1BuwC,EAAqBC,KAAoC,8BAAIA,KAAoC,+BAAK,GAC1GD,EAAmB9O,QAAQ0O,EAAqB/M,KAAK,KAAM,IAC3DmN,EAAmB7zC,KAAOyzC,EAAqB/M,KAAK,KAAMmN,EAAmB7zC,KAAK0mC,KAAKmN,K,GC7CvF,IAAIE,EAAsBxzC,EAAoBoxC,OAAEn6B,EAAW,CAAC,MAAM,IAAOjX,EAAoB,SAC7FwzC,EAAsBxzC,EAAoBoxC,EAAEoC,I","sources":["webpack://tsg-portal-client/webpack/runtime/chunk loaded","webpack://tsg-portal-client/webpack/runtime/create fake namespace object","webpack://tsg-portal-client/./assets/styles.css","webpack://tsg-portal-client//build/node_modules/moment/locale|sync|/^\\.\\/.*$/","webpack://tsg-portal-client/./src/components/common/Head/index.tsx","webpack://tsg-portal-client/./src/components/common/Loader/styles.ts","webpack://tsg-portal-client/./src/components/common/Loader/index.tsx","webpack://tsg-portal-client/./src/appConfig.ts","webpack://tsg-portal-client/./src/keycloak.ts","webpack://tsg-portal-client/./src/store/modules/auth/actions.ts","webpack://tsg-portal-client/./src/store/modules/auth/reducers.ts","webpack://tsg-portal-client/./src/store/modules/stations/actions.ts","webpack://tsg-portal-client/./src/store/modules/stations/reducers.ts","webpack://tsg-portal-client/./src/store/modules/terminals/actions.ts","webpack://tsg-portal-client/./src/store/modules/terminals/reducers.ts","webpack://tsg-portal-client/./src/store/modules/paymentMethods/actions.ts","webpack://tsg-portal-client/./src/store/modules/paymentMethods/reducers.ts","webpack://tsg-portal-client/./src/store/modules/transactions/actions.ts","webpack://tsg-portal-client/./src/store/modules/transactions/reducers.ts","webpack://tsg-portal-client/./src/store/modules/plans/actions.ts","webpack://tsg-portal-client/./src/store/modules/plans/reducers.ts","webpack://tsg-portal-client/./src/store/modules/programs/actions.ts","webpack://tsg-portal-client/./src/store/modules/programs/reducers.ts","webpack://tsg-portal-client/./src/store/modules/notifications/actions.ts","webpack://tsg-portal-client/./src/store/modules/notifications/reducers.ts","webpack://tsg-portal-client/./src/store/modules/calendar/actions.ts","webpack://tsg-portal-client/./src/store/modules/calendar/reducers.ts","webpack://tsg-portal-client/./src/store/reducers.ts","webpack://tsg-portal-client/./src/store/modules/auth/sagas.ts","webpack://tsg-portal-client/./src/axios.ts","webpack://tsg-portal-client/./src/store/modules/stations/sagas.ts","webpack://tsg-portal-client/./src/store/modules/terminals/sagas.ts","webpack://tsg-portal-client/./src/store/modules/paymentMethods/sagas.ts","webpack://tsg-portal-client/./src/store/modules/transactions/sagas.ts","webpack://tsg-portal-client/./src/store/modules/plans/sagas.ts","webpack://tsg-portal-client/./src/store/modules/programs/sagas.ts","webpack://tsg-portal-client/./src/store/modules/calendar/sagas.ts","webpack://tsg-portal-client/./src/store/store.ts","webpack://tsg-portal-client/./src/store/sagas.ts","webpack://tsg-portal-client/./src/themes/palette.ts","webpack://tsg-portal-client/./src/constants.ts","webpack://tsg-portal-client/./src/components/common/RequireAuth/index.tsx","webpack://tsg-portal-client/./src/components/common/ToggleTheme/index.tsx","webpack://tsg-portal-client/./src/hooks/usePrevious.ts","webpack://tsg-portal-client/./src/components/common/Menu/styles.ts","webpack://tsg-portal-client/./src/components/common/Menu/index.tsx","webpack://tsg-portal-client/./src/store/modules/auth/selectors.ts","webpack://tsg-portal-client/./src/components/Container/styles.ts","webpack://tsg-portal-client/./src/components/Content/styles.ts","webpack://tsg-portal-client/./src/hooks/useMount.ts","webpack://tsg-portal-client/./src/components/Content/index.tsx","webpack://tsg-portal-client/./src/components/Container/index.tsx","webpack://tsg-portal-client/./src/components/common/FormFields/BasicDatePicker/index.tsx","webpack://tsg-portal-client/./src/components/common/FormFields/CurrencyAmount/styles.ts","webpack://tsg-portal-client/./src/components/common/FormFields/CurrencyAmount/index.tsx","webpack://tsg-portal-client/./src/components/common/FormFields/SimpleSelect/index.tsx","webpack://tsg-portal-client/./src/components/common/FormFields/MultiSelect/index.tsx","webpack://tsg-portal-client/./src/components/common/FormFields/PhoneNumber/index.tsx","webpack://tsg-portal-client/./src/typeGuards/isNull.ts","webpack://tsg-portal-client/./src/typeGuards/isString.ts","webpack://tsg-portal-client/./src/typeGuards/isSelectOption.ts","webpack://tsg-portal-client/./src/typeGuards/isObject.ts","webpack://tsg-portal-client/./src/typeGuards/isUndefined.ts","webpack://tsg-portal-client/./src/components/common/Dialog/styles.ts","webpack://tsg-portal-client/./src/components/common/Dialog/FormDialog/types.ts","webpack://tsg-portal-client/./src/components/common/FormFields/FileUpload/index.tsx","webpack://tsg-portal-client/./src/components/common/FormFields/BasicDateTimePicker/index.tsx","webpack://tsg-portal-client/./src/components/common/Dialog/FormDialog/index.tsx","webpack://tsg-portal-client/./src/typeGuards/isNumber.ts","webpack://tsg-portal-client/./src/components/common/Table/styles.ts","webpack://tsg-portal-client/./src/components/common/Table/types.ts","webpack://tsg-portal-client/./src/components/common/Table/index.tsx","webpack://tsg-portal-client/./src/hooks/useUnmount.ts","webpack://tsg-portal-client/./src/store/modules/paymentMethods/selectors.ts","webpack://tsg-portal-client/./src/components/Pages/PaymentMethods/types.ts","webpack://tsg-portal-client/./src/store/modules/plans/selectors.ts","webpack://tsg-portal-client/./src/components/common/TableFilterForm/index.tsx","webpack://tsg-portal-client/./src/components/Pages/PaymentMethods/index.tsx","webpack://tsg-portal-client/./src/components/Pages/Plans/types.ts","webpack://tsg-portal-client/./src/store/modules/programs/selectors.ts","webpack://tsg-portal-client/./src/components/Pages/Plans/index.tsx","webpack://tsg-portal-client/./src/components/Pages/Programs/types.ts","webpack://tsg-portal-client/./src/components/Pages/Programs/index.tsx","webpack://tsg-portal-client/./src/components/Pages/RestoreConfigTool/tools.tsx","webpack://tsg-portal-client/./src/components/Pages/RestoreConfigTool/GeneralSelection.tsx","webpack://tsg-portal-client/./src/components/common/Dropdown/index.tsx","webpack://tsg-portal-client/./src/components/Pages/RestoreConfigTool/DeviceSelection/SelfwashSelection.tsx","webpack://tsg-portal-client/./src/components/Pages/RestoreConfigTool/DeviceSelection/DeviceSelection.tsx","webpack://tsg-portal-client/./src/components/Pages/RestoreConfigTool/PaymentSelection.tsx","webpack://tsg-portal-client/./src/components/Pages/RestoreConfigTool/index.tsx","webpack://tsg-portal-client/./src/store/modules/stations/selectors.ts","webpack://tsg-portal-client/./src/store/modules/transactions/selectors.ts","webpack://tsg-portal-client/./src/components/Pages/Transactions/types.ts","webpack://tsg-portal-client/./src/components/common/DateTime/options.ts","webpack://tsg-portal-client/./src/components/common/DateTime/index.tsx","webpack://tsg-portal-client/./src/components/Pages/Transactions/tableComponents.tsx","webpack://tsg-portal-client/./src/components/common/Dialog/types.ts","webpack://tsg-portal-client/./src/components/common/Dialog/index.tsx","webpack://tsg-portal-client/./src/components/Pages/Transactions/index.tsx","webpack://tsg-portal-client/./src/components/common/Calendar/styles.tsx","webpack://tsg-portal-client/./src/components/common/Calendar/toolbar.tsx","webpack://tsg-portal-client/./src/components/common/Calendar/types.ts","webpack://tsg-portal-client/./src/components/common/Calendar/constants.ts","webpack://tsg-portal-client/./src/components/common/Calendar/event.tsx","webpack://tsg-portal-client/./src/components/common/Calendar/index.tsx","webpack://tsg-portal-client/./src/components/Pages/Calendar/types.ts","webpack://tsg-portal-client/./src/components/Pages/Calendar/ics.ts","webpack://tsg-portal-client/./src/store/modules/calendar/selectors.ts","webpack://tsg-portal-client/./src/components/Pages/Calendar/index.tsx","webpack://tsg-portal-client/./src/components/Router/index.tsx","webpack://tsg-portal-client/./src/store/modules/notifications/selectors.ts","webpack://tsg-portal-client/./src/components/common/Notification/useNotifier.tsx","webpack://tsg-portal-client/./src/components/MainView/index.tsx","webpack://tsg-portal-client/./assets/styles.css?f764","webpack://tsg-portal-client/./src/components/App/styles.tsx","webpack://tsg-portal-client/./src/components/common/Notification/CloseSnackbar.tsx","webpack://tsg-portal-client/./src/components/App/index.tsx","webpack://tsg-portal-client/./src/i18n.ts","webpack://tsg-portal-client/./src/index.tsx","webpack://tsg-portal-client/./assets/logo-label.svg","webpack://tsg-portal-client/webpack/bootstrap","webpack://tsg-portal-client/webpack/runtime/amd options","webpack://tsg-portal-client/webpack/runtime/compat get default export","webpack://tsg-portal-client/webpack/runtime/define property getters","webpack://tsg-portal-client/webpack/runtime/global","webpack://tsg-portal-client/webpack/runtime/hasOwnProperty shorthand","webpack://tsg-portal-client/webpack/runtime/make namespace object","webpack://tsg-portal-client/webpack/runtime/node module decorator","webpack://tsg-portal-client/webpack/runtime/publicPath","webpack://tsg-portal-client/webpack/runtime/jsonp chunk loading","webpack://tsg-portal-client/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../node_modules/css-loader/dist/runtime/getUrl.js\";\nimport ___CSS_LOADER_URL_IMPORT_0___ from \"./fonts/KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_1___ from \"./fonts/KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_2___ from \"./fonts/KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_3___ from \"./fonts/KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_4___ from \"./fonts/KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_5___ from \"./fonts/KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_6___ from \"./fonts/KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_7___ from \"./fonts/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_8___ from \"./fonts/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_9___ from \"./fonts/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_10___ from \"./fonts/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_11___ from \"./fonts/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_12___ from \"./fonts/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_13___ from \"./fonts/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_14___ from \"./fonts/KFOlCnqEu92Fr1MmEU9fCRc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_15___ from \"./fonts/KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_16___ from \"./fonts/KFOlCnqEu92Fr1MmEU9fCBc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_17___ from \"./fonts/KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_18___ from \"./fonts/KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_19___ from \"./fonts/KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_20___ from \"./fonts/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_21___ from \"./fonts/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_22___ from \"./fonts/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_23___ from \"./fonts/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_24___ from \"./fonts/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_25___ from \"./fonts/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_26___ from \"./fonts/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2\";\nimport ___CSS_LOADER_URL_IMPORT_27___ from \"./fonts/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\nvar ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);\nvar ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___);\nvar ___CSS_LOADER_URL_REPLACEMENT_4___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_4___);\nvar ___CSS_LOADER_URL_REPLACEMENT_5___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_5___);\nvar ___CSS_LOADER_URL_REPLACEMENT_6___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_6___);\nvar ___CSS_LOADER_URL_REPLACEMENT_7___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_7___);\nvar ___CSS_LOADER_URL_REPLACEMENT_8___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_8___);\nvar ___CSS_LOADER_URL_REPLACEMENT_9___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_9___);\nvar ___CSS_LOADER_URL_REPLACEMENT_10___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_10___);\nvar ___CSS_LOADER_URL_REPLACEMENT_11___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___);\nvar ___CSS_LOADER_URL_REPLACEMENT_12___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_12___);\nvar ___CSS_LOADER_URL_REPLACEMENT_13___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_13___);\nvar ___CSS_LOADER_URL_REPLACEMENT_14___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_14___);\nvar ___CSS_LOADER_URL_REPLACEMENT_15___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_15___);\nvar ___CSS_LOADER_URL_REPLACEMENT_16___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_16___);\nvar ___CSS_LOADER_URL_REPLACEMENT_17___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_17___);\nvar ___CSS_LOADER_URL_REPLACEMENT_18___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_18___);\nvar ___CSS_LOADER_URL_REPLACEMENT_19___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_19___);\nvar ___CSS_LOADER_URL_REPLACEMENT_20___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_20___);\nvar ___CSS_LOADER_URL_REPLACEMENT_21___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_21___);\nvar ___CSS_LOADER_URL_REPLACEMENT_22___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_22___);\nvar ___CSS_LOADER_URL_REPLACEMENT_23___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_23___);\nvar ___CSS_LOADER_URL_REPLACEMENT_24___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_24___);\nvar ___CSS_LOADER_URL_REPLACEMENT_25___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_25___);\nvar ___CSS_LOADER_URL_REPLACEMENT_26___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_26___);\nvar ___CSS_LOADER_URL_REPLACEMENT_27___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_27___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/* cyrillic-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\\n U+FE2E-FE2F;\\n}\\n/* cyrillic */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\\n}\\n/* greek-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \") format(\\\"woff2\\\");\\n unicode-range: U+1F00-1FFF;\\n}\\n/* greek */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_3___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0370-03FF;\\n}\\n/* vietnamese */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\\n}\\n/* latin-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_5___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\\n}\\n/* latin */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_6___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\\n U+FEFF, U+FFFD;\\n}\\n/* cyrillic-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_7___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\\n U+FE2E-FE2F;\\n}\\n/* cyrillic */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_8___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\\n}\\n/* greek-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \") format(\\\"woff2\\\");\\n unicode-range: U+1F00-1FFF;\\n}\\n/* greek */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0370-03FF;\\n}\\n/* vietnamese */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_11___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\\n}\\n/* latin-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_12___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\\n}\\n/* latin */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\\n U+FEFF, U+FFFD;\\n}\\n/* cyrillic-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\\n U+FE2E-FE2F;\\n}\\n/* cyrillic */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\\n}\\n/* greek-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_16___ + \") format(\\\"woff2\\\");\\n unicode-range: U+1F00-1FFF;\\n}\\n/* greek */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_17___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0370-03FF;\\n}\\n/* vietnamese */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_18___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\\n}\\n/* latin-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_19___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\\n}\\n/* latin */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_20___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\\n U+FEFF, U+FFFD;\\n}\\n/* cyrillic-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_21___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\\n U+FE2E-FE2F;\\n}\\n/* cyrillic */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_22___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\\n}\\n/* greek-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_23___ + \") format(\\\"woff2\\\");\\n unicode-range: U+1F00-1FFF;\\n}\\n/* greek */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0370-03FF;\\n}\\n/* vietnamese */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\\n}\\n/* latin-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_26___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\\n}\\n/* latin */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_27___ + \") format(\\\"woff2\\\");\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\\n U+FEFF, U+FFFD;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./assets/styles.css\"],\"names\":[],\"mappings\":\"AAAA,iBAAiB;AACjB;EACE,qBAAqB;EACrB,kBAAkB;EAClB,gBAAgB;EAChB,4DAA0E;EAC1E;eACa;AACf;AACA,aAAa;AACb;EACE,qBAAqB;EACrB,kBAAkB;EAClB,gBAAgB;EAChB,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AClB\",\"sourcesContent\":[\"/* cyrillic-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\\n U+FE2E-FE2F;\\n}\\n/* cyrillic */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\\n}\\n/* greek-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+1F00-1FFF;\\n}\\n/* greek */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0370-03FF;\\n}\\n/* vietnamese */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\\n}\\n/* latin-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\\n}\\n/* latin */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 300;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\\n U+FEFF, U+FFFD;\\n}\\n/* cyrillic-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\\\"./fonts/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\\n U+FE2E-FE2F;\\n}\\n/* cyrillic */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\\\"./fonts/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\\n}\\n/* greek-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\\\"./fonts/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+1F00-1FFF;\\n}\\n/* greek */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\\\"./fonts/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0370-03FF;\\n}\\n/* vietnamese */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\\\"./fonts/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\\n}\\n/* latin-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\\\"./fonts/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\\n}\\n/* latin */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 400;\\n src: url(\\\"./fonts/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\\n U+FEFF, U+FFFD;\\n}\\n/* cyrillic-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmEU9fCRc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\\n U+FE2E-FE2F;\\n}\\n/* cyrillic */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\\n}\\n/* greek-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmEU9fCBc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+1F00-1FFF;\\n}\\n/* greek */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0370-03FF;\\n}\\n/* vietnamese */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\\n}\\n/* latin-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\\n}\\n/* latin */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\\n U+FEFF, U+FFFD;\\n}\\n/* cyrillic-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\\n U+FE2E-FE2F;\\n}\\n/* cyrillic */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\\n}\\n/* greek-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+1F00-1FFF;\\n}\\n/* greek */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0370-03FF;\\n}\\n/* vietnamese */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\\n}\\n/* latin-ext */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\\n}\\n/* latin */\\n@font-face {\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 700;\\n src: url(\\\"./fonts/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2\\\") format(\\\"woff2\\\");\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\\n U+FEFF, U+FFFD;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var map = {\n\t\"./af\": 42786,\n\t\"./af.js\": 42786,\n\t\"./ar\": 30867,\n\t\"./ar-dz\": 14130,\n\t\"./ar-dz.js\": 14130,\n\t\"./ar-kw\": 96135,\n\t\"./ar-kw.js\": 96135,\n\t\"./ar-ly\": 56440,\n\t\"./ar-ly.js\": 56440,\n\t\"./ar-ma\": 47702,\n\t\"./ar-ma.js\": 47702,\n\t\"./ar-sa\": 16040,\n\t\"./ar-sa.js\": 16040,\n\t\"./ar-tn\": 37100,\n\t\"./ar-tn.js\": 37100,\n\t\"./ar.js\": 30867,\n\t\"./az\": 31083,\n\t\"./az.js\": 31083,\n\t\"./be\": 9808,\n\t\"./be.js\": 9808,\n\t\"./bg\": 68338,\n\t\"./bg.js\": 68338,\n\t\"./bm\": 67438,\n\t\"./bm.js\": 67438,\n\t\"./bn\": 8905,\n\t\"./bn-bd\": 76225,\n\t\"./bn-bd.js\": 76225,\n\t\"./bn.js\": 8905,\n\t\"./bo\": 11560,\n\t\"./bo.js\": 11560,\n\t\"./br\": 1278,\n\t\"./br.js\": 1278,\n\t\"./bs\": 80622,\n\t\"./bs.js\": 80622,\n\t\"./ca\": 2468,\n\t\"./ca.js\": 2468,\n\t\"./cs\": 5822,\n\t\"./cs.js\": 5822,\n\t\"./cv\": 50877,\n\t\"./cv.js\": 50877,\n\t\"./cy\": 47373,\n\t\"./cy.js\": 47373,\n\t\"./da\": 24780,\n\t\"./da.js\": 24780,\n\t\"./de\": 59740,\n\t\"./de-at\": 60217,\n\t\"./de-at.js\": 60217,\n\t\"./de-ch\": 60894,\n\t\"./de-ch.js\": 60894,\n\t\"./de.js\": 59740,\n\t\"./dv\": 5300,\n\t\"./dv.js\": 5300,\n\t\"./el\": 50837,\n\t\"./el.js\": 50837,\n\t\"./en-au\": 78348,\n\t\"./en-au.js\": 78348,\n\t\"./en-ca\": 77925,\n\t\"./en-ca.js\": 77925,\n\t\"./en-gb\": 22243,\n\t\"./en-gb.js\": 22243,\n\t\"./en-ie\": 46436,\n\t\"./en-ie.js\": 46436,\n\t\"./en-il\": 47207,\n\t\"./en-il.js\": 47207,\n\t\"./en-in\": 44175,\n\t\"./en-in.js\": 44175,\n\t\"./en-nz\": 76319,\n\t\"./en-nz.js\": 76319,\n\t\"./en-sg\": 31662,\n\t\"./en-sg.js\": 31662,\n\t\"./eo\": 92915,\n\t\"./eo.js\": 92915,\n\t\"./es\": 55655,\n\t\"./es-do\": 55251,\n\t\"./es-do.js\": 55251,\n\t\"./es-mx\": 96112,\n\t\"./es-mx.js\": 96112,\n\t\"./es-us\": 71146,\n\t\"./es-us.js\": 71146,\n\t\"./es.js\": 55655,\n\t\"./et\": 5603,\n\t\"./et.js\": 5603,\n\t\"./eu\": 77763,\n\t\"./eu.js\": 77763,\n\t\"./fa\": 76959,\n\t\"./fa.js\": 76959,\n\t\"./fi\": 11897,\n\t\"./fi.js\": 11897,\n\t\"./fil\": 42549,\n\t\"./fil.js\": 42549,\n\t\"./fo\": 94694,\n\t\"./fo.js\": 94694,\n\t\"./fr\": 94470,\n\t\"./fr-ca\": 63049,\n\t\"./fr-ca.js\": 63049,\n\t\"./fr-ch\": 52330,\n\t\"./fr-ch.js\": 52330,\n\t\"./fr.js\": 94470,\n\t\"./fy\": 5044,\n\t\"./fy.js\": 5044,\n\t\"./ga\": 29295,\n\t\"./ga.js\": 29295,\n\t\"./gd\": 2101,\n\t\"./gd.js\": 2101,\n\t\"./gl\": 38794,\n\t\"./gl.js\": 38794,\n\t\"./gom-deva\": 27884,\n\t\"./gom-deva.js\": 27884,\n\t\"./gom-latn\": 23168,\n\t\"./gom-latn.js\": 23168,\n\t\"./gu\": 95349,\n\t\"./gu.js\": 95349,\n\t\"./he\": 24206,\n\t\"./he.js\": 24206,\n\t\"./hi\": 30094,\n\t\"./hi.js\": 30094,\n\t\"./hr\": 30316,\n\t\"./hr.js\": 30316,\n\t\"./hu\": 22138,\n\t\"./hu.js\": 22138,\n\t\"./hy-am\": 11423,\n\t\"./hy-am.js\": 11423,\n\t\"./id\": 29218,\n\t\"./id.js\": 29218,\n\t\"./is\": 90135,\n\t\"./is.js\": 90135,\n\t\"./it\": 90626,\n\t\"./it-ch\": 10150,\n\t\"./it-ch.js\": 10150,\n\t\"./it.js\": 90626,\n\t\"./ja\": 39183,\n\t\"./ja.js\": 39183,\n\t\"./jv\": 24286,\n\t\"./jv.js\": 24286,\n\t\"./ka\": 12105,\n\t\"./ka.js\": 12105,\n\t\"./kk\": 47772,\n\t\"./kk.js\": 47772,\n\t\"./km\": 18758,\n\t\"./km.js\": 18758,\n\t\"./kn\": 79282,\n\t\"./kn.js\": 79282,\n\t\"./ko\": 33730,\n\t\"./ko.js\": 33730,\n\t\"./ku\": 1408,\n\t\"./ku.js\": 1408,\n\t\"./ky\": 33291,\n\t\"./ky.js\": 33291,\n\t\"./lb\": 36841,\n\t\"./lb.js\": 36841,\n\t\"./lo\": 55466,\n\t\"./lo.js\": 55466,\n\t\"./lt\": 57010,\n\t\"./lt.js\": 57010,\n\t\"./lv\": 37595,\n\t\"./lv.js\": 37595,\n\t\"./me\": 39861,\n\t\"./me.js\": 39861,\n\t\"./mi\": 35493,\n\t\"./mi.js\": 35493,\n\t\"./mk\": 95966,\n\t\"./mk.js\": 95966,\n\t\"./ml\": 87341,\n\t\"./ml.js\": 87341,\n\t\"./mn\": 5115,\n\t\"./mn.js\": 5115,\n\t\"./mr\": 10370,\n\t\"./mr.js\": 10370,\n\t\"./ms\": 9847,\n\t\"./ms-my\": 41237,\n\t\"./ms-my.js\": 41237,\n\t\"./ms.js\": 9847,\n\t\"./mt\": 72126,\n\t\"./mt.js\": 72126,\n\t\"./my\": 56165,\n\t\"./my.js\": 56165,\n\t\"./nb\": 64924,\n\t\"./nb.js\": 64924,\n\t\"./ne\": 16744,\n\t\"./ne.js\": 16744,\n\t\"./nl\": 93901,\n\t\"./nl-be\": 59814,\n\t\"./nl-be.js\": 59814,\n\t\"./nl.js\": 93901,\n\t\"./nn\": 83877,\n\t\"./nn.js\": 83877,\n\t\"./oc-lnc\": 92135,\n\t\"./oc-lnc.js\": 92135,\n\t\"./pa-in\": 15858,\n\t\"./pa-in.js\": 15858,\n\t\"./pl\": 64495,\n\t\"./pl.js\": 64495,\n\t\"./pt\": 89520,\n\t\"./pt-br\": 57971,\n\t\"./pt-br.js\": 57971,\n\t\"./pt.js\": 89520,\n\t\"./ro\": 96459,\n\t\"./ro.js\": 96459,\n\t\"./ru\": 21793,\n\t\"./ru.js\": 21793,\n\t\"./sd\": 40950,\n\t\"./sd.js\": 40950,\n\t\"./se\": 10490,\n\t\"./se.js\": 10490,\n\t\"./si\": 90124,\n\t\"./si.js\": 90124,\n\t\"./sk\": 64249,\n\t\"./sk.js\": 64249,\n\t\"./sl\": 14985,\n\t\"./sl.js\": 14985,\n\t\"./sq\": 51104,\n\t\"./sq.js\": 51104,\n\t\"./sr\": 49131,\n\t\"./sr-cyrl\": 79915,\n\t\"./sr-cyrl.js\": 79915,\n\t\"./sr.js\": 49131,\n\t\"./ss\": 95606,\n\t\"./ss.js\": 95606,\n\t\"./sv\": 98760,\n\t\"./sv.js\": 98760,\n\t\"./sw\": 91172,\n\t\"./sw.js\": 91172,\n\t\"./ta\": 27333,\n\t\"./ta.js\": 27333,\n\t\"./te\": 23110,\n\t\"./te.js\": 23110,\n\t\"./tet\": 52095,\n\t\"./tet.js\": 52095,\n\t\"./tg\": 27321,\n\t\"./tg.js\": 27321,\n\t\"./th\": 9041,\n\t\"./th.js\": 9041,\n\t\"./tk\": 19005,\n\t\"./tk.js\": 19005,\n\t\"./tl-ph\": 75768,\n\t\"./tl-ph.js\": 75768,\n\t\"./tlh\": 89444,\n\t\"./tlh.js\": 89444,\n\t\"./tr\": 72397,\n\t\"./tr.js\": 72397,\n\t\"./tzl\": 28254,\n\t\"./tzl.js\": 28254,\n\t\"./tzm\": 51106,\n\t\"./tzm-latn\": 30699,\n\t\"./tzm-latn.js\": 30699,\n\t\"./tzm.js\": 51106,\n\t\"./ug-cn\": 9288,\n\t\"./ug-cn.js\": 9288,\n\t\"./uk\": 67691,\n\t\"./uk.js\": 67691,\n\t\"./ur\": 13795,\n\t\"./ur.js\": 13795,\n\t\"./uz\": 6791,\n\t\"./uz-latn\": 60588,\n\t\"./uz-latn.js\": 60588,\n\t\"./uz.js\": 6791,\n\t\"./vi\": 65666,\n\t\"./vi.js\": 65666,\n\t\"./x-pseudo\": 14378,\n\t\"./x-pseudo.js\": 14378,\n\t\"./yo\": 75805,\n\t\"./yo.js\": 75805,\n\t\"./zh-cn\": 83839,\n\t\"./zh-cn.js\": 83839,\n\t\"./zh-hk\": 55726,\n\t\"./zh-hk.js\": 55726,\n\t\"./zh-mo\": 99807,\n\t\"./zh-mo.js\": 99807,\n\t\"./zh-tw\": 74152,\n\t\"./zh-tw.js\": 74152\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 46700;","import { FC } from \"react\";\nimport { Helmet } from \"react-helmet\";\nimport { HeadProps } from \"./types\";\n\nexport const Head: FC = ({ title }: HeadProps) => {\n const titleText = `${title ? `${title} - ` : \"\"}TSG Portal`;\n\n return (\n \n {titleText}\n \n \n );\n};\n","import CircularProgress from \"@mui/material/CircularProgress\";\nimport styled from \"styled-components\";\n\nexport const Container = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n`;\n\nexport const Spinner = styled(CircularProgress)`\n margin: ${({ theme }) => theme.spacing(0, 2)};\n`;\n","import Typography from \"@mui/material/Typography\";\nimport { FC } from \"react\";\nimport * as s from \"./styles\";\nimport { LoaderProps } from \"./types\";\n\nexport const Loader: FC = ({ text, ...rest }: LoaderProps) => (\n \n \n {text}\n \n);\n","export const appConfig = (window as any).config as AppConfig;","import Keycloak from \"keycloak-js\";\nimport {appConfig} from \"./appConfig\";\n\nexport const initOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false\n}\n\nexport const keycloak = Keycloak({\n url: `https://auth.${appConfig.domain}/auth`,\n realm: appConfig.keycloak.realm,\n clientId: appConfig.keycloak.clientId\n})","import actionCreatorFactory from \"typescript-fsa\";\nimport { GetUserDetailsParams, GetUserDetailsResponse } from \"./types\";\n\nconst actionCreator = actionCreatorFactory(\"AUTH\");\n\nexport const logout = actionCreator.async(\"LOGOUT\");\n\nexport const getUserDetails = actionCreator.async<\n GetUserDetailsParams,\n GetUserDetailsResponse,\n unknown\n>(\"GET_USER_DETAILS\");\n","import { reducerWithInitialState } from \"typescript-fsa-reducers\";\nimport * as actions from \"./actions\";\nimport { KeycloakUser } from \"./types\";\n\nexport type Reducer = {\n isLoggingOut: boolean;\n isUserLoading: boolean;\n user: KeycloakUser | null;\n};\n\nconst initialState: Reducer = {\n isLoggingOut: false,\n isUserLoading: false,\n user: null\n};\n\nexport const reducer = reducerWithInitialState(initialState)\n .case(\n actions.getUserDetails.started,\n (state): Reducer => ({\n ...state,\n isUserLoading: true\n })\n )\n .case(\n actions.getUserDetails.done,\n (state, payload): Reducer => ({\n ...state,\n isUserLoading: false,\n user: payload.result\n })\n )\n .case(\n actions.getUserDetails.failed,\n (state): Reducer => ({\n ...state,\n isUserLoading: false\n })\n )\n .case(\n actions.logout.started,\n (state): Reducer => ({\n ...state,\n isLoggingOut: true\n })\n )\n .case(\n actions.logout.done,\n (state): Reducer => ({\n ...state,\n isLoggingOut: false\n })\n )\n .case(\n actions.logout.failed,\n (state): Reducer => ({\n ...state,\n isLoggingOut: false\n })\n );\n","import actionCreatorFactory from \"typescript-fsa\";\nimport { GetNestedStationsParams, GetNestedStationsResponse, GetStationsParams, GetStationsResponse } from \"./types\";\n\nconst actionCreator = actionCreatorFactory(\"STATIONS\");\n\n\nexport const getStations = actionCreator.async<\n GetStationsParams,\n GetStationsResponse,\n unknown\n>(\"GET_STATIONS\");\n\nexport const getNestedStations = actionCreator.async<\n GetNestedStationsParams,\n GetNestedStationsResponse,\n unknown\n>(\"GET_NESTED_STATIONS\");\n\n\nexport const clear = actionCreator(\"CLEAR\");","import { reducerWithInitialState } from \"typescript-fsa-reducers\";\nimport { GetNestedStationsResponse, GetStationsResponse } from \"./types\";\nimport * as actions from \"./actions\";\n\n\nexport type Reducer = {\n stationsResponse: GetStationsResponse | null;\n nestedStationsResponse: GetNestedStationsResponse | null;\n areStationsLoading: boolean;\n areNestedStationsLoading: boolean;\n};\n\n\nconst initialState: Reducer = {\n stationsResponse: null,\n nestedStationsResponse: null,\n areStationsLoading: false,\n areNestedStationsLoading: false\n};\n\nexport const reducer = reducerWithInitialState(initialState)\n .case(\n actions.getStations.started,\n (state): Reducer => ({\n ...state,\n areStationsLoading: true\n })\n )\n .case(\n actions.getStations.done,\n (state, payload): Reducer => ({\n ...state,\n stationsResponse: payload.result,\n areStationsLoading: false\n })\n )\n .case(\n actions.getStations.failed,\n (state): Reducer => ({\n ...state,\n areStationsLoading: false\n })\n )\n .case(\n actions.getNestedStations.started,\n (state): Reducer => ({\n ...state,\n areNestedStationsLoading: true\n })\n )\n .case(\n actions.getNestedStations.done,\n (state, payload): Reducer => ({\n ...state,\n nestedStationsResponse: payload.result,\n areNestedStationsLoading: false\n })\n )\n .case(\n actions.getNestedStations.failed,\n (state): Reducer => ({\n ...state,\n areNestedStationsLoading: false\n })\n )\n .case(actions.clear, (): Reducer => initialState);\n","import actionCreatorFactory from \"typescript-fsa\";\nimport { GetAllTerminalsParams, GetAllTerminalsResponse } from \"./types\";\n\nconst actionCreator = actionCreatorFactory(\"TRANSACTIONS\");\n\n\nexport const getAllTerminals = actionCreator.async<\n GetAllTerminalsParams,\n GetAllTerminalsResponse,\n unknown\n>(\"GET_TERMINALS\");\n\n\nexport const clear = actionCreator(\"CLEAR\");","import { reducerWithInitialState } from \"typescript-fsa-reducers\";\nimport { GetAllTerminalsResponse } from \"./types\";\nimport * as actions from \"./actions\";\n\n\nexport type Reducer = {\n terminalsResponse: GetAllTerminalsResponse | null;\n areTerminalsLoading: boolean;\n};\n\n\nconst initialState: Reducer = {\n terminalsResponse: null,\n areTerminalsLoading: false\n};\n\nexport const reducer = reducerWithInitialState(initialState)\n .case(\n actions.getAllTerminals.started,\n (state): Reducer => ({\n ...state,\n areTerminalsLoading: true\n })\n )\n .case(\n actions.getAllTerminals.done,\n (state, payload): Reducer => ({\n ...state,\n terminalsResponse: payload.result,\n areTerminalsLoading: false\n })\n )\n .case(\n actions.getAllTerminals.failed,\n (state): Reducer => ({\n ...state,\n areTerminalsLoading: false\n })\n )\n .case(actions.clear, (): Reducer => initialState);\n","import actionCreatorFactory from \"typescript-fsa\";\nimport {\n AddCreditParams,\n AddCreditResponse,\n CreatePaymentMethodParams,\n CreatePaymentMethodResponse,\n CreateVoucherParams,\n CreateVoucherResponse,\n DeletePaymentMethodParams,\n DeletePaymentMethodResponse,\n GetPaymentMethodParams,\n GetPaymentMethodResponse,\n GetPaymentMethodsParams,\n GetPaymentMethodsResponse,\n UpdatePaymentMethodParams,\n UpdatePaymentMethodResponse\n} from \"./types\";\n\nconst actionCreator = actionCreatorFactory(\"PAY_METHODS\");\n\nexport const getPaymentMethod = actionCreator.async<\n GetPaymentMethodParams,\n GetPaymentMethodResponse,\n unknown\n>(\"GET_PAYMENT_METHOD\");\n\nexport const getPaymentMethods = actionCreator.async<\n GetPaymentMethodsParams,\n GetPaymentMethodsResponse,\n unknown\n>(\"GET_PAYMENT_METHODS\");\n\nexport const createPaymentMethod = actionCreator.async<\n CreatePaymentMethodParams,\n CreatePaymentMethodResponse,\n unknown\n>(\"CREATE_PAYMENT_METHOD\");\n\nexport const createVoucher = actionCreator.async<\n CreateVoucherParams,\n CreateVoucherResponse,\n unknown\n>(\"CREATE_VOUCHER\");\n\nexport const updatePaymentMethod = actionCreator.async<\n UpdatePaymentMethodParams,\n UpdatePaymentMethodResponse,\n unknown\n>(\"UPDATE_PAYMENT_METHOD\");\n\nexport const deletePaymentMethod = actionCreator.async<\n DeletePaymentMethodParams,\n DeletePaymentMethodResponse,\n unknown\n>(\"DELETE_PAYMENT_METHOD\");\n\nexport const addCredit = actionCreator.async<\n AddCreditParams,\n AddCreditResponse,\n unknown\n>(\"ADD_CREDIT\");\n\nexport const clear = actionCreator(\"CLEAR\");\n","import { reducerWithInitialState } from \"typescript-fsa-reducers\";\nimport * as actions from \"./actions\";\nimport { GetPaymentMethodsResponse, PaymentMethod } from \"./types\";\n\nexport type Reducer = {\n paymentMethodsResponse: GetPaymentMethodsResponse | null;\n paymentMethod: PaymentMethod | null;\n isPaymentMethodLoading: boolean;\n arePaymentMethodsLoading: boolean;\n isPaymentMethodCreating: boolean;\n isPaymentMethodUpdating: boolean;\n isPaymentMethodDeleting: boolean;\n isAddingCredit: boolean;\n};\n\nconst initialState: Reducer = {\n paymentMethodsResponse: null,\n paymentMethod: null,\n isPaymentMethodLoading: false,\n arePaymentMethodsLoading: false,\n isPaymentMethodCreating: false,\n isPaymentMethodUpdating: false,\n isPaymentMethodDeleting: false,\n isAddingCredit: false\n};\n\nexport const reducer = reducerWithInitialState(initialState)\n .case(\n actions.getPaymentMethod.started,\n (state): Reducer => ({\n ...state,\n isPaymentMethodLoading: true\n })\n )\n .case(\n actions.getPaymentMethod.done,\n (state, payload): Reducer => ({\n ...state,\n paymentMethod: payload.result,\n isPaymentMethodLoading: false\n })\n )\n .case(\n actions.getPaymentMethod.failed,\n (state): Reducer => ({\n ...state,\n isPaymentMethodLoading: false\n })\n )\n .case(\n actions.getPaymentMethods.started,\n (state): Reducer => ({\n ...state,\n arePaymentMethodsLoading: true\n })\n )\n .case(\n actions.getPaymentMethods.done,\n (state, payload): Reducer => ({\n ...state,\n paymentMethodsResponse: payload.result,\n arePaymentMethodsLoading: false\n })\n )\n .case(\n actions.getPaymentMethods.failed,\n (state): Reducer => ({\n ...state,\n arePaymentMethodsLoading: false\n })\n )\n .case(\n actions.createPaymentMethod.started,\n (state): Reducer => ({\n ...state,\n isPaymentMethodCreating: true\n })\n )\n .case(\n actions.createPaymentMethod.done,\n (state): Reducer => ({\n ...state,\n isPaymentMethodCreating: false\n })\n )\n .case(\n actions.createPaymentMethod.failed,\n (state): Reducer => ({\n ...state,\n isPaymentMethodCreating: false\n })\n )\n .case(\n actions.createVoucher.started,\n (state): Reducer => ({\n ...state,\n isPaymentMethodCreating: true\n })\n )\n .case(\n actions.createVoucher.done,\n (state): Reducer => ({\n ...state,\n isPaymentMethodCreating: false\n })\n )\n .case(\n actions.createVoucher.failed,\n (state): Reducer => ({\n ...state,\n isPaymentMethodCreating: false\n })\n )\n .case(\n actions.updatePaymentMethod.started,\n (state): Reducer => ({\n ...state,\n isPaymentMethodUpdating: true\n })\n )\n .case(\n actions.updatePaymentMethod.done,\n (state): Reducer => ({\n ...state,\n isPaymentMethodUpdating: false\n })\n )\n .case(\n actions.updatePaymentMethod.failed,\n (state): Reducer => ({\n ...state,\n isPaymentMethodUpdating: false\n })\n )\n .case(\n actions.deletePaymentMethod.started,\n (state): Reducer => ({\n ...state,\n isPaymentMethodDeleting: true\n })\n )\n .case(\n actions.deletePaymentMethod.done,\n (state): Reducer => ({\n ...state,\n isPaymentMethodDeleting: false,\n paymentMethod: null\n })\n )\n .case(\n actions.deletePaymentMethod.failed,\n (state): Reducer => ({\n ...state,\n isPaymentMethodDeleting: false\n })\n )\n .case(\n actions.addCredit.started,\n (state): Reducer => ({\n ...state,\n isAddingCredit: true\n })\n )\n .case(\n actions.addCredit.done,\n (state): Reducer => ({\n ...state,\n isAddingCredit: false\n })\n )\n .case(\n actions.addCredit.failed,\n (state): Reducer => ({\n ...state,\n isAddingCredit: false\n })\n )\n .case(actions.clear, (): Reducer => initialState);\n","import actionCreatorFactory from \"typescript-fsa\";\nimport { GetTransactionsParams, GetTransactionsResponse } from \"./types\";\n\nconst actionCreator = actionCreatorFactory(\"TRANSACTIONS\");\n\n\nexport const getTransactions = actionCreator.async<\n GetTransactionsParams,\n GetTransactionsResponse,\n unknown\n>(\"GET_TRANSACTIONS\");\n\n\nexport const clear = actionCreator(\"CLEAR\");","import { reducerWithInitialState } from \"typescript-fsa-reducers\";\nimport * as actions from \"./actions\";\nimport { GetTransactionsResponse, Transaction } from \"./types\";\n\nexport type Reducer = {\n transactionsResponse: GetTransactionsResponse | null;\n areTransactionsLoading: boolean;\n};\n\nconst initialState: Reducer = {\n transactionsResponse: null,\n areTransactionsLoading: false\n};\n\nexport const reducer = reducerWithInitialState(initialState)\n .case(\n actions.getTransactions.started,\n (state): Reducer => ({\n ...state,\n areTransactionsLoading: true\n })\n )\n .case(\n actions.getTransactions.done,\n (state, payload): Reducer => ({\n ...state,\n transactionsResponse: payload.result,\n areTransactionsLoading: false\n })\n )\n .case(\n actions.getTransactions.failed,\n (state): Reducer => ({\n ...state,\n areTransactionsLoading: false\n })\n )\n .case(actions.clear, (): Reducer => initialState);\n","import actionCreatorFactory from \"typescript-fsa\";\nimport {\n CreatePlanParams,\n CreatePlanResponse,\n DeletePlanParams,\n DeletePlanResponse,\n GetPlanParams,\n GetPlanResponse,\n GetPlansParams,\n GetPlansResponse,\n UpdatePlanParams,\n UpdatePlanResponse\n} from \"./types\";\n\nconst actionCreator = actionCreatorFactory(\"PLANS\");\n\nexport const getPlan = actionCreator.async<\n GetPlanParams,\n GetPlanResponse,\n unknown\n>(\"GET_PLAN\");\n\nexport const getPlans = actionCreator.async<\n GetPlansParams,\n GetPlansResponse,\n unknown\n>(\"GET_PLANS\");\n\nexport const createPlan = actionCreator.async<\n CreatePlanParams,\n CreatePlanResponse,\n unknown\n>(\"CREATE_PLAN\");\n\nexport const updatePlan = actionCreator.async<\n UpdatePlanParams,\n UpdatePlanResponse,\n unknown\n>(\"UPDATE_PLAN\");\n\nexport const deletePlan = actionCreator.async<\n DeletePlanParams,\n DeletePlanResponse,\n unknown\n>(\"DELETE_PLAN\");\n\nexport const clear = actionCreator(\"CLEAR\");\n","import { reducerWithInitialState } from \"typescript-fsa-reducers\";\nimport * as actions from \"./actions\";\nimport { Plan } from \"./types\";\n\nexport type Reducer = {\n plans: Plan[] | null;\n plan: Plan | null;\n isPlanLoading: boolean;\n arePlansLoading: boolean;\n isPlanCreating: boolean;\n isPlanUpdating: boolean;\n isPlanDeleting: boolean;\n};\n\nconst initialState: Reducer = {\n plans: null,\n plan: null,\n isPlanLoading: false,\n arePlansLoading: false,\n isPlanCreating: false,\n isPlanUpdating: false,\n isPlanDeleting: false\n};\n\nexport const reducer = reducerWithInitialState(initialState)\n .case(\n actions.getPlan.started,\n (state): Reducer => ({\n ...state,\n isPlanLoading: true\n })\n )\n .case(\n actions.getPlan.done,\n (state, payload): Reducer => ({\n ...state,\n plan: payload.result,\n isPlanLoading: false\n })\n )\n .case(\n actions.getPlan.failed,\n (state): Reducer => ({\n ...state,\n isPlanLoading: false\n })\n )\n .case(\n actions.getPlans.started,\n (state): Reducer => ({\n ...state,\n arePlansLoading: true\n })\n )\n .case(\n actions.getPlans.done,\n (state, payload): Reducer => ({\n ...state,\n plans: payload.result,\n arePlansLoading: false\n })\n )\n .case(\n actions.getPlans.failed,\n (state): Reducer => ({\n ...state,\n arePlansLoading: false\n })\n )\n .case(\n actions.createPlan.started,\n (state): Reducer => ({\n ...state,\n isPlanCreating: true\n })\n )\n .case(\n actions.createPlan.done,\n (state): Reducer => ({\n ...state,\n isPlanCreating: false\n })\n )\n .case(\n actions.createPlan.failed,\n (state): Reducer => ({\n ...state,\n isPlanCreating: false\n })\n )\n .case(\n actions.updatePlan.started,\n (state): Reducer => ({\n ...state,\n isPlanUpdating: true\n })\n )\n .case(\n actions.updatePlan.done,\n (state): Reducer => ({\n ...state,\n isPlanUpdating: false\n })\n )\n .case(\n actions.updatePlan.failed,\n (state): Reducer => ({\n ...state,\n isPlanUpdating: false\n })\n )\n .case(\n actions.deletePlan.started,\n (state): Reducer => ({\n ...state,\n isPlanDeleting: true\n })\n )\n .case(\n actions.deletePlan.done,\n (state): Reducer => ({\n ...state,\n isPlanDeleting: false,\n plan: null\n })\n )\n .case(\n actions.deletePlan.failed,\n (state): Reducer => ({\n ...state,\n isPlanDeleting: false\n })\n )\n .case(actions.clear, (): Reducer => initialState);\n","import actionCreatorFactory from \"typescript-fsa\";\nimport {\n CreateProgramParams,\n CreateProgramResponse,\n DeleteProgramParams,\n DeleteProgramResponse,\n GetProgramParams,\n GetProgramResponse,\n GetProgramsParams,\n GetProgramsResponse,\n UpdateProgramParams,\n UpdateProgramResponse\n} from \"./types\";\n\nconst actionCreator = actionCreatorFactory(\"PROGRAMS\");\n\nexport const getProgram = actionCreator.async<\n GetProgramParams,\n GetProgramResponse,\n unknown\n>(\"GET_PROGRAM\");\n\nexport const getPrograms = actionCreator.async<\n GetProgramsParams,\n GetProgramsResponse,\n unknown\n>(\"GET_PROGRAMS\");\n\nexport const createProgram = actionCreator.async<\n CreateProgramParams,\n CreateProgramResponse,\n unknown\n>(\"CREATE_PROGRAM\");\n\nexport const updateProgram = actionCreator.async<\n UpdateProgramParams,\n UpdateProgramResponse,\n unknown\n>(\"UPDATE_PROGRAM\");\n\nexport const deleteProgram = actionCreator.async<\n DeleteProgramParams,\n DeleteProgramResponse,\n unknown\n>(\"DELETE_PROGRAM\");\n\nexport const clear = actionCreator(\"CLEAR\");\n","import { reducerWithInitialState } from \"typescript-fsa-reducers\";\nimport * as actions from \"./actions\";\nimport { Program } from \"./types\";\n\nexport type Reducer = {\n programs: Program[] | null;\n program: Program | null;\n isProgramLoading: boolean;\n areProgramsLoading: boolean;\n isProgramCreating: boolean;\n isProgramUpdating: boolean;\n isProgramDeleting: boolean;\n};\n\nconst initialState: Reducer = {\n programs: null,\n program: null,\n isProgramLoading: false,\n areProgramsLoading: false,\n isProgramCreating: false,\n isProgramUpdating: false,\n isProgramDeleting: false\n};\n\nexport const reducer = reducerWithInitialState(initialState)\n .case(\n actions.getProgram.started,\n (state): Reducer => ({\n ...state,\n isProgramLoading: true\n })\n )\n .case(\n actions.getProgram.done,\n (state, payload): Reducer => ({\n ...state,\n program: payload.result,\n isProgramLoading: false\n })\n )\n .case(\n actions.getProgram.failed,\n (state): Reducer => ({\n ...state,\n isProgramLoading: false\n })\n )\n .case(\n actions.getPrograms.started,\n (state): Reducer => ({\n ...state,\n areProgramsLoading: true\n })\n )\n .case(\n actions.getPrograms.done,\n (state, payload): Reducer => ({\n ...state,\n programs: payload.result,\n areProgramsLoading: false\n })\n )\n .case(\n actions.getPrograms.failed,\n (state): Reducer => ({\n ...state,\n areProgramsLoading: false\n })\n )\n .case(\n actions.createProgram.started,\n (state): Reducer => ({\n ...state,\n isProgramCreating: true\n })\n )\n .case(\n actions.createProgram.done,\n (state): Reducer => ({\n ...state,\n isProgramCreating: false\n })\n )\n .case(\n actions.createProgram.failed,\n (state): Reducer => ({\n ...state,\n isProgramCreating: false\n })\n )\n .case(\n actions.updateProgram.started,\n (state): Reducer => ({\n ...state,\n isProgramUpdating: true\n })\n )\n .case(\n actions.updateProgram.done,\n (state): Reducer => ({\n ...state,\n isProgramUpdating: false\n })\n )\n .case(\n actions.updateProgram.failed,\n (state): Reducer => ({\n ...state,\n isProgramUpdating: false\n })\n )\n .case(\n actions.deleteProgram.started,\n (state): Reducer => ({\n ...state,\n isProgramDeleting: true\n })\n )\n .case(\n actions.deleteProgram.done,\n (state): Reducer => ({\n ...state,\n isProgramDeleting: false,\n program: null\n })\n )\n .case(\n actions.deleteProgram.failed,\n (state): Reducer => ({\n ...state,\n isProgramDeleting: false\n })\n )\n .case(actions.clear, (): Reducer => initialState);\n","import actionCreatorFactory from \"typescript-fsa\";\n\nconst actionCreator = actionCreatorFactory(\"NOTIFICATIONS\");\n\nexport const enqueueSnackbar = actionCreator('ENQUEUE_SNACKBAR');\n\nexport const closeSnackbar = actionCreator('CLOSE_SNACKBAR');\n\nexport const removeSnackbar = actionCreator('REMOVE_SNACKBAR');\n\nexport const clear = actionCreator(\"CLEAR\");\n","import { reducerWithInitialState } from \"typescript-fsa-reducers\";\nimport { enqueueSnackbar, closeSnackbar, removeSnackbar, clear } from \"./actions\";\nimport { Notification, NotificationPayload } from './types';\n\nexport type Reducer = {\n notifications: Notification[];\n};\n\nconst initialState: Reducer = {\n notifications: [],\n}\n\n\nexport const reducer = reducerWithInitialState(initialState)\n .case(\n enqueueSnackbar,\n (state, payload: NotificationPayload): Reducer => {\n const { message, variant } = payload;\n const key = new Date().getTime() + Math.random();\n const res = {\n key,\n message,\n options: { variant }\n }\n return {\n ...state,\n notifications: [...state.notifications, res],\n }\n }\n )\n .case(\n closeSnackbar,\n (state, payload): Reducer => {\n return {\n ...state,\n notifications: state.notifications.map(notification => (\n (notification.key === payload)\n ? { ...notification, dismissed: true }\n : { ...notification }\n )),\n }\n }\n )\n .case(\n removeSnackbar,\n (state, payload): Reducer => {\n return {\n ...state,\n notifications: state.notifications.filter(\n notification => notification.key !== payload,\n ),\n }\n }\n )\n .case(clear, (): Reducer => initialState);\n","import actionCreatorFactory from \"typescript-fsa\";\n\nconst actionCreator = actionCreatorFactory(\"CALENDAR\");\n\nexport const getStationCalendar = actionCreator.async<\n GetStationCalendarParams,\n GetStationCalendarResponse,\n unknown\n>(\"GET_STATION_CALENDAR\");\n\nexport const putCalendar = actionCreator.async<\n PutCalendarParams,\n PutCalendarResponse,\n unknown\n>(\"PUT_CALENDAR\");\n\nexport const putStationCalendar = actionCreator.async<\n PutStationCalendarParams,\n PutStationCalendarResponse,\n unknown\n>(\"PUT_STATION_CALENDAR\");\n\n\nexport const clear = actionCreator(\"CLEAR\");","import { reducerWithInitialState } from \"typescript-fsa-reducers\";\nimport * as actions from \"./actions\";\n\n\nexport type Reducer = {\n stationCalendarResponse: GetStationCalendarResponse | null;\n isCalendarLoading: boolean;\n};\n\n\nconst initialState: Reducer = {\n stationCalendarResponse: null,\n isCalendarLoading: false,\n};\n\nexport const reducer = reducerWithInitialState(initialState)\n .case(\n actions.getStationCalendar.started,\n (state): Reducer => ({\n ...state,\n isCalendarLoading: true\n })\n )\n .case(\n actions.getStationCalendar.done,\n (state, payload): Reducer => ({\n ...state,\n stationCalendarResponse: payload.result,\n isCalendarLoading: false\n })\n )\n .case(\n actions.getStationCalendar.failed,\n (state): Reducer => ({\n ...state,\n isCalendarLoading: false\n })\n )\n .case(\n actions.putCalendar.started,\n (state): Reducer => ({\n ...state,\n isCalendarLoading: true\n })\n )\n .case(\n actions.putCalendar.done,\n (state, payload): Reducer => ({\n ...state,\n isCalendarLoading: false\n })\n )\n .case(\n actions.putCalendar.failed,\n (state): Reducer => ({\n ...state,\n isCalendarLoading: false\n })\n )\n .case(\n actions.putStationCalendar.started,\n (state): Reducer => ({\n ...state,\n isCalendarLoading: true\n })\n )\n .case(\n actions.putStationCalendar.done,\n (state, payload): Reducer => ({\n ...state,\n isCalendarLoading: false\n })\n )\n .case(\n actions.putStationCalendar.failed,\n (state): Reducer => ({\n ...state,\n isCalendarLoading: false\n })\n )\n .case(actions.clear, (): Reducer => initialState);\n","import * as auth from \"./modules/auth/reducers\";\nimport * as stations from \"./modules/stations/reducers\";\nimport * as terminals from \"./modules/terminals/reducers\";\nimport * as paymentMethods from \"./modules/paymentMethods/reducers\";\nimport * as transactions from \"./modules/transactions/reducers\";\nimport * as plans from \"./modules/plans/reducers\";\nimport * as programs from \"./modules/programs/reducers\";\nimport * as notifications from \"./modules/notifications/reducers\";\nimport * as calendar from \"./modules/calendar/reducers\";\nimport { combineReducers } from \"redux\";\n\nexport type RootReducer = {\n auth: auth.Reducer;\n stations: stations.Reducer;\n terminals: terminals.Reducer;\n paymentMethods: paymentMethods.Reducer;\n transactions: transactions.Reducer;\n plans: plans.Reducer;\n programs: programs.Reducer;\n notifications: notifications.Reducer;\n calendar: calendar.Reducer;\n};\n\nexport const rootReducer = combineReducers({\n auth: auth.reducer,\n stations: stations.reducer,\n terminals: terminals.reducer,\n paymentMethods: paymentMethods.reducer,\n transactions: transactions.reducer,\n plans: plans.reducer,\n programs: programs.reducer,\n notifications: notifications.reducer,\n calendar: calendar.reducer,\n});\n","import { SagaIterator } from \"redux-saga\";\nimport {\n all,\n AllEffect,\n call,\n CallEffect,\n ForkEffect,\n put,\n RaceEffect,\n TakeEffect,\n takeLatest,\n takeLeading\n} from \"redux-saga/effects\";\nimport { Action } from \"typescript-fsa\";\nimport { keycloak } from \"../../../keycloak\";\nimport * as actions from \"./actions\";\nimport { GetUserDetailsParams, KeycloakUser } from \"./types\";\n\nexport function* logoutSaga(): SagaIterator {\n try {\n yield call(keycloak.logout);\n yield put(actions.logout.done({}));\n } catch (e) {\n yield put(actions.logout.failed({ error: e }));\n }\n}\n\nexport function* getUserDetailsSaga(\n action: Action\n): SagaIterator {\n try {\n const user: KeycloakUser = yield call(keycloak.loadUserProfile);\n user.id = keycloak.subject;\n\n yield put(\n actions.getUserDetails.done({\n params: action.payload,\n result: user\n })\n );\n } catch (e) {\n yield put(\n actions.getUserDetails.failed({ params: action.payload, error: e })\n );\n }\n}\n\nexport function* watcherSaga(): Generator<\n AllEffect<\n | Generator<\n TakeEffect | RaceEffect>,\n void,\n unknown\n >\n | ForkEffect\n >,\n void,\n unknown\n> {\n yield all([\n takeLeading(actions.getUserDetails.started, getUserDetailsSaga),\n takeLatest(actions.logout.started, logoutSaga)\n ]);\n}\n","import axios from \"axios\";\nimport {appConfig} from \"./appConfig\";\n\nexport const axiosInstance = axios.create({\n baseURL: `https://api.${appConfig.domain}`,\n withCredentials: true\n});\n","import { Action } from \"typescript-fsa\";\nimport { GetNestedStationsParams, GetNestedStationsResponse, GetStationsParams, GetStationsResponse } from \"./types\";\nimport { SagaIterator } from \"redux-saga\";\nimport { keycloak } from \"../../../keycloak\";\nimport { axiosInstance } from \"../../../axios\";\nimport { AxiosResponse } from \"axios\";\nimport { all, call, put, takeLeading } from \"redux-saga/effects\";\nimport * as actions from \"./actions\";\nimport { GetAllTerminalsParams, GetTerminalsResponse } from \"../terminals/types\";\n\nexport function* getStationsSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const response: AxiosResponse = yield call(\n axiosInstance.get,\n `stations`,\n {\n params: action.payload\n }\n );\n yield put(\n actions.getStations.done({\n params: action.payload,\n result: response.data\n })\n );\n } catch (e) {\n yield put(\n actions.getStations.failed({ params: action.payload, error: e })\n );\n }\n}\n\nexport function* getNestedStationsSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const response: GetNestedStationsResponse = {};\n const stationsResponse: AxiosResponse = yield call(\n axiosInstance.get,\n `stations`\n );\n for (const station of stationsResponse.data) {\n response[station.id] = {\n ...station,\n terminals: {}\n };\n\n const terminalResponse: AxiosResponse = yield call(\n axiosInstance.get,\n `stations/${station.id}/terminals`\n );\n for (const terminal of terminalResponse.data) {\n response[station.id].terminals[terminal.id] = terminal;\n }\n }\n\n\n yield put(\n actions.getNestedStations.done({\n params: action.payload,\n result: response\n })\n );\n } catch (e) {\n yield put(\n actions.getNestedStations.failed({ params: action.payload, error: e })\n );\n }\n}\n\nexport function* watcherSaga(): SagaIterator {\n yield all([\n takeLeading(actions.getStations.started, getStationsSaga),\n takeLeading(actions.getNestedStations.started, getNestedStationsSaga)\n ]);\n}\n","import { Action } from \"typescript-fsa\";\nimport { GetAllTerminalsParams, GetAllTerminalsResponse } from \"./types\";\nimport { SagaIterator } from \"redux-saga\";\nimport { keycloak } from \"../../../keycloak\";\nimport { axiosInstance } from \"../../../axios\";\nimport { AxiosResponse } from \"axios\";\nimport { all, call, put, takeLeading } from \"redux-saga/effects\";\nimport * as actions from \"./actions\";\n\nexport function* getAllTerminalsSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const response = {};\n for (const stationId of action.payload.station_ids) {\n const partialResonse: AxiosResponse = yield call(\n axiosInstance.get,\n `stations/${stationId}/terminals`\n );\n\n response[stationId] = partialResonse;\n }\n yield put(\n actions.getAllTerminals.done({\n params: action.payload,\n result: response\n })\n );\n } catch (e) {\n yield put(\n actions.getAllTerminals.failed({ params: action.payload, error: e })\n );\n }\n}\n\nexport function* watcherSaga(): SagaIterator {\n yield all([\n takeLeading(actions.getAllTerminals.started, getAllTerminalsSaga)\n ]);\n}\n","import { AxiosResponse } from \"axios\";\nimport { SagaIterator } from \"redux-saga\";\nimport { all, call, put, takeEvery, takeLeading } from \"redux-saga/effects\";\nimport { Action } from \"typescript-fsa\";\nimport { axiosInstance } from \"../../../axios\";\nimport { keycloak } from \"../../../keycloak\";\nimport * as actions from \"./actions\";\nimport { enqueueSnackbar } from '../notifications/actions';\nimport {\n AddCreditParams,\n AddCreditResponse,\n CreatePaymentMethodParams,\n CreatePaymentMethodResponse,\n CreateVoucherParams,\n CreateVoucherResponse,\n DeletePaymentMethodParams,\n DeletePaymentMethodResponse,\n GetPaymentMethodParams,\n GetPaymentMethodResponse,\n GetPaymentMethodsParams,\n GetPaymentMethodsResponse,\n PaymentMethod,\n UpdatePaymentMethodParams as UpdatePaymentMethodParams,\n UpdatePaymentMethodResponse\n} from \"./types\";\n\nexport function* getPaymentMethodSaga(\n action: Action\n): SagaIterator {\n try {\n const { id } = action.payload;\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const response: AxiosResponse = yield call(\n axiosInstance.get,\n `pay-methods/${id}`\n );\n yield put(\n actions.getPaymentMethod.done({\n params: action.payload,\n result: response.data\n })\n );\n } catch (e) {\n yield put(\n actions.getPaymentMethod.failed({ params: action.payload, error: e })\n );\n }\n}\n\nexport function* getPaymentMethodsSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const response: AxiosResponse = yield call(\n axiosInstance.get,\n `pay-methods`,\n {\n params: action.payload\n }\n );\n yield put(\n actions.getPaymentMethods.done({\n params: action.payload,\n result: {\n data: response.data,\n totalPages: parseInt(response.headers[\"x-total-pages\"])\n }\n })\n );\n } catch (e) {\n yield put(\n actions.getPaymentMethods.failed({ params: action.payload, error: e })\n );\n }\n}\n\nexport function* createPaymentMethodSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const { data } = action.payload;\n const response: AxiosResponse = yield call(\n axiosInstance.post,\n `pay-methods`,\n data\n );\n yield put(\n actions.createPaymentMethod.done({\n params: action.payload,\n result: response.data\n })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.paymentMethod.create', variant: 'success' }));\n } catch (e: any) {\n yield put(\n actions.createPaymentMethod.failed({ params: action.payload, error: e })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.error.default', variant: 'error' }));\n }\n}\n\nexport function* createVoucherSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const { data } = action.payload;\n const response: AxiosResponse = yield call(\n axiosInstance.post,\n `vouchers`,\n data\n );\n yield put(\n actions.createVoucher.done({\n params: action.payload,\n result: response.data\n })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.paymentMethod.create', variant: 'success' }));\n } catch (e: any) {\n yield put(\n actions.createVoucher.failed({ params: action.payload, error: e })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.error.default', variant: 'error' }));\n }\n}\n\nexport function* updatePaymentMethodSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const { id, data } = action.payload;\n const response: AxiosResponse = yield call(\n axiosInstance.put,\n `pay-methods/${id}`,\n data\n );\n yield put(\n actions.updatePaymentMethod.done({\n params: action.payload,\n result: response.data\n })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.paymentMethod.update', variant: 'success' }));\n } catch (e: any) {\n yield put(\n actions.updatePaymentMethod.failed({ params: action.payload, error: e })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.error.default', variant: 'error' }));\n }\n}\n\nexport function* deletePaymentMethodSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const { id } = action.payload;\n const response: AxiosResponse = yield call(\n axiosInstance.delete,\n `pay-methods/${id}`\n );\n yield put(\n actions.deletePaymentMethod.done({\n params: action.payload,\n result: response.data\n })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.paymentMethod.delete', variant: 'success' }));\n } catch (e: any) {\n yield put(\n actions.deletePaymentMethod.failed({ params: action.payload, error: e })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.error.default', variant: 'error' }));\n }\n}\n\nexport function* addCreditSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const { id, data } = action.payload;\n const response: AxiosResponse = yield call(\n axiosInstance.put,\n `pay-methods/${id}/balance`,\n data\n );\n yield put(\n actions.addCredit.done({\n params: action.payload,\n result: response.data\n })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.paymentMethod.add_credit', variant: 'success' }));\n } catch (e: any) {\n yield put(\n actions.addCredit.failed({ params: action.payload, error: e })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.error.default', variant: 'error' }));\n }\n}\n\nexport function* watcherSaga(): SagaIterator {\n yield all([\n takeLeading(actions.getPaymentMethod.started, getPaymentMethodSaga),\n takeLeading(actions.getPaymentMethods.started, getPaymentMethodsSaga),\n takeEvery(actions.createPaymentMethod.started, createPaymentMethodSaga),\n takeEvery(actions.createVoucher.started, createVoucherSaga),\n takeEvery(actions.updatePaymentMethod.started, updatePaymentMethodSaga),\n takeEvery(actions.deletePaymentMethod.started, deletePaymentMethodSaga),\n takeEvery(actions.addCredit.started, addCreditSaga)\n ]);\n}\n","import { AxiosResponse } from \"axios\";\nimport { SagaIterator } from \"redux-saga\";\nimport { all, call, put, takeEvery, takeLeading } from \"redux-saga/effects\";\nimport { Action } from \"typescript-fsa\";\nimport { axiosInstance } from \"../../../axios\";\nimport { keycloak } from \"../../../keycloak\";\nimport * as actions from \"./actions\";\nimport {\n GetTransactionsParams,\n Transaction\n} from \"./types\";\nimport { GetPaymentMethodResponse } from \"../paymentMethods/types\";\n\nexport function* getTransactionsSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const response: AxiosResponse<{\n total: number;\n transactions: Transaction[];\n }> = yield call(\n axiosInstance.get,\n `transactions`,\n {\n params: action.payload\n }\n );\n\n for (const transaction of response.data.transactions) {\n if (transaction.external) {\n continue;\n }\n\n const paymentMethodResponse: AxiosResponse = yield call(\n axiosInstance.get,\n `pay-methods/${transaction.pay_method_id}`\n )\n \n transaction.pay_method = paymentMethodResponse.data;\n }\n\n yield put(\n actions.getTransactions.done({\n params: action.payload,\n result: {\n data: response.data,\n totalPages: Math.ceil(response.data.total / 50)\n }\n })\n );\n } catch (e) {\n yield put(\n actions.getTransactions.failed({ params: action.payload, error: e })\n );\n }\n}\n\nexport function* watcherSaga(): SagaIterator {\n yield all([\n takeLeading(actions.getTransactions.started, getTransactionsSaga)\n ]);\n}\n","import { AxiosResponse } from \"axios\";\nimport { SagaIterator } from \"redux-saga\";\nimport { all, call, put, takeEvery, takeLeading } from \"redux-saga/effects\";\nimport { Action } from \"typescript-fsa\";\nimport { axiosInstance } from \"../../../axios\";\nimport { keycloak } from \"../../../keycloak\";\nimport * as actions from \"./actions\";\nimport { enqueueSnackbar } from '../notifications/actions';\nimport {\n CreatePlanParams,\n CreatePlanResponse,\n DeletePlanParams,\n DeletePlanResponse,\n GetPlanParams,\n GetPlanResponse,\n GetPlansParams,\n GetPlansResponse,\n UpdatePlanParams,\n UpdatePlanResponse\n} from \"./types\";\n\nexport function* getPlanSaga(\n action: Action\n): SagaIterator {\n try {\n const { id } = action.payload;\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const response: AxiosResponse = yield call(\n axiosInstance.get,\n `plans/${id}`\n );\n yield put(\n actions.getPlan.done({\n params: action.payload,\n result: response.data\n })\n );\n } catch (e) {\n yield put(actions.getPlan.failed({ params: action.payload, error: e }));\n }\n}\n\nexport function* getPlansSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const response: AxiosResponse = yield call(\n axiosInstance.get,\n `plans`\n );\n yield put(\n actions.getPlans.done({\n params: action.payload,\n result: response.data\n })\n );\n } catch (e) {\n yield put(actions.getPlans.failed({ params: action.payload, error: e }));\n }\n}\n\nexport function* createPlanSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const { data } = action.payload;\n const response: AxiosResponse = yield call(\n axiosInstance.post,\n `plans`,\n data\n );\n yield put(\n actions.createPlan.done({\n params: action.payload,\n result: response.data\n })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.plan.create', variant: 'success' }));\n } catch (e: any) {\n yield put(actions.createPlan.failed({ params: action.payload, error: e }));\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.error.default', variant: 'error' }));\n }\n}\n\nexport function* updatePlanSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const { id, data } = action.payload;\n const response: AxiosResponse = yield call(\n axiosInstance.put,\n `plans/${id}`,\n data\n );\n yield put(\n actions.updatePlan.done({\n params: action.payload,\n result: response.data\n })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.plan.update', variant: 'success' }));\n } catch (e: any) {\n yield put(actions.updatePlan.failed({ params: action.payload, error: e }));\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.error.default', variant: 'error' }));\n }\n}\n\nexport function* deletePlanSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const { id } = action.payload;\n const response: AxiosResponse = yield call(\n axiosInstance.delete,\n `plans/${id}`\n );\n yield put(\n actions.deletePlan.done({\n params: action.payload,\n result: response.data\n })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.plan.delete', variant: 'success' }));\n } catch (e: any) {\n yield put(actions.deletePlan.failed({ params: action.payload, error: e }));\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.error.default', variant: 'error' }));\n }\n}\n\nexport function* watcherSaga(): SagaIterator {\n yield all([\n takeLeading(actions.getPlan.started, getPlanSaga),\n takeLeading(actions.getPlans.started, getPlansSaga),\n takeEvery(actions.createPlan.started, createPlanSaga),\n takeEvery(actions.updatePlan.started, updatePlanSaga),\n takeEvery(actions.deletePlan.started, deletePlanSaga)\n ]);\n}\n","import { AxiosResponse } from \"axios\";\nimport { SagaIterator } from \"redux-saga\";\nimport { all, call, put, takeEvery, takeLeading } from \"redux-saga/effects\";\nimport { Action } from \"typescript-fsa\";\nimport { axiosInstance } from \"../../../axios\";\nimport { keycloak } from \"../../../keycloak\";\nimport * as actions from \"./actions\";\nimport { enqueueSnackbar } from '../notifications/actions';\nimport {\n CreateProgramParams,\n CreateProgramResponse,\n DeleteProgramParams,\n DeleteProgramResponse,\n GetProgramParams,\n GetProgramResponse,\n GetProgramsParams,\n GetProgramsResponse,\n UpdateProgramParams,\n UpdateProgramResponse\n} from \"./types\";\n\nexport function* getProgramSaga(\n action: Action\n): SagaIterator {\n try {\n const { id } = action.payload;\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const response: AxiosResponse = yield call(\n axiosInstance.get,\n `programs/${id}`\n );\n yield put(\n actions.getProgram.done({\n params: action.payload,\n result: response.data\n })\n );\n } catch (e) {\n yield put(actions.getProgram.failed({ params: action.payload, error: e }));\n }\n}\n\nexport function* getProgramsSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const response: AxiosResponse = yield call(\n axiosInstance.get,\n `programs`\n );\n yield put(\n actions.getPrograms.done({\n params: action.payload,\n result: response.data\n })\n );\n } catch (e) {\n yield put(actions.getPrograms.failed({ params: action.payload, error: e }));\n }\n}\n\nexport function* createProgramSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const { data } = action.payload;\n const response: AxiosResponse = yield call(\n axiosInstance.post,\n `programs`,\n data\n );\n yield put(\n actions.createProgram.done({\n params: action.payload,\n result: response.data\n })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.program.create', variant: 'success' }));\n } catch (e: any) {\n yield put(\n actions.createProgram.failed({ params: action.payload, error: e })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.error.default', variant: 'error' }));\n }\n}\n\nexport function* updateProgramSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const { id, data } = action.payload;\n const response: AxiosResponse = yield call(\n axiosInstance.put,\n `programs/${id}`,\n data\n );\n yield put(\n actions.updateProgram.done({\n params: action.payload,\n result: response.data\n })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.program.update', variant: 'success' }));\n } catch (e: any) {\n yield put(\n actions.updateProgram.failed({ params: action.payload, error: e })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.error.default', variant: 'error' }));\n }\n}\n\nexport function* deleteProgramSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const { id } = action.payload;\n const response: AxiosResponse = yield call(\n axiosInstance.delete,\n `programs/${id}`\n );\n yield put(\n actions.deleteProgram.done({\n params: action.payload,\n result: response.data\n })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.program.delete', variant: 'success' }));\n } catch (e: any) {\n yield put(\n actions.deleteProgram.failed({ params: action.payload, error: e })\n );\n yield put(enqueueSnackbar({ message: 'uiComponents.notifications.error.default', variant: 'error' }));\n }\n}\n\nexport function* watcherSaga(): SagaIterator {\n yield all([\n takeLeading(actions.getProgram.started, getProgramSaga),\n takeLeading(actions.getPrograms.started, getProgramsSaga),\n takeEvery(actions.createProgram.started, createProgramSaga),\n takeEvery(actions.updateProgram.started, updateProgramSaga),\n takeEvery(actions.deleteProgram.started, deleteProgramSaga)\n ]);\n}\n","import { Action } from \"typescript-fsa\";\nimport { SagaIterator } from \"redux-saga\";\nimport { keycloak } from \"../../../keycloak\";\nimport { axiosInstance } from \"../../../axios\";\nimport { AxiosResponse } from \"axios\";\nimport { all, call, put, takeEvery, takeLeading } from \"redux-saga/effects\";\nimport * as actions from \"./actions\";\n\nexport function* getStationCalendarSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n const response: GetStationCalendarResponse = {};\n\n const calendarResponse: AxiosResponse = yield call(\n axiosInstance.get,\n `clients/@me/calendar`\n );\n\n response.default = calendarResponse.data.Calendar;\n\n if (response.default === \"\") {\n response.default = \"BEGIN:VCALENDAR\\nEND:VCALENDAR\";\n }\n\n\n for (const stationId of action.payload.stationIds) {\n const calendarResponse: AxiosResponse = yield call(\n axiosInstance.get,\n `clients/@me/calendar/${stationId}`\n );\n\n response[stationId] = calendarResponse.data.Calendar;\n\n\n if (response[stationId] === \"\") {\n response[stationId] = \"BEGIN:VCALENDAR\\nEND:VCALENDAR\";\n }\n }\n\n yield put(\n actions.getStationCalendar.done({\n params: action.payload,\n result: response\n })\n );\n } catch (e) {\n yield put(\n actions.getStationCalendar.failed({ params: action.payload, error: e })\n );\n }\n}\n\nexport function* putCalendarSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n\n const response: AxiosResponse = yield call(\n axiosInstance.put,\n `clients/@me/calendar`,\n action.payload\n );\n\n yield put(\n actions.putCalendar.done({\n params: action.payload,\n result: response.data\n })\n );\n } catch (e) {\n yield put(\n actions.putCalendar.failed({ params: action.payload, error: e })\n );\n }\n}\n\nexport function* putStationCalendarSaga(\n action: Action\n): SagaIterator {\n try {\n const token = keycloak.idToken?.toString() || \"\";\n axiosInstance.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n\n const putPayload = {\n Calendar: action.payload.Calendar\n }\n\n const response: AxiosResponse = yield call(\n axiosInstance.put,\n `clients/@me/calendar/${action.payload.stationId}`,\n putPayload\n );\n\n yield put(\n actions.putStationCalendar.done({\n params: action.payload,\n result: response.data\n })\n );\n } catch (e) {\n yield put(\n actions.putStationCalendar.failed({ params: action.payload, error: e })\n );\n }\n}\n\nexport function* watcherSaga(): SagaIterator {\n yield all([\n takeLeading(actions.getStationCalendar.started, getStationCalendarSaga),\n takeEvery(actions.putCalendar.started, putCalendarSaga),\n takeEvery(actions.putStationCalendar.started, putStationCalendarSaga)\n ]);\n}\n","import { applyMiddleware, createStore } from \"redux\";\nimport { composeWithDevTools } from \"redux-devtools-extension\";\nimport createSagaMiddleware from \"redux-saga\";\nimport { rootReducer } from \"./reducers\";\nimport { rootSaga } from \"./sagas\";\n\nconst sagaMiddleware = createSagaMiddleware();\n\nexport const store = createStore(\n rootReducer,\n composeWithDevTools(applyMiddleware(sagaMiddleware))\n);\n\nsagaMiddleware.run(rootSaga);\n","import { watcherSaga as authSaga } from \"./modules/auth/sagas\";\nimport { watcherSaga as stationsSaga } from \"./modules/stations/sagas\";\nimport { watcherSaga as terminalsSaga } from \"./modules/terminals/sagas\";\nimport { watcherSaga as payMethodsSaga } from \"./modules/paymentMethods/sagas\";\nimport { watcherSaga as transactionsSaga } from \"./modules/transactions/sagas\";\nimport { watcherSaga as plansSaga } from \"./modules/plans/sagas\";\nimport { watcherSaga as programsSaga } from \"./modules/programs/sagas\";\nimport { watcherSaga as calendarSaga } from \"./modules/calendar/sagas\";\nimport { all, AllEffect } from \"redux-saga/effects\";\n\nexport function* rootSaga(): Generator, void, unknown> {\n yield all([\n authSaga(),\n stationsSaga(),\n terminalsSaga(),\n payMethodsSaga(),\n plansSaga(),\n programsSaga(),\n transactionsSaga(),\n calendarSaga(),\n ]);\n}\n","export const palette = {\n light: {\n primary: {\n main: \"#ffffff\",\n lighter: \"#f5f5f5\",\n contrastText: \"#222\"\n },\n highlight: {\n main: \"rgba(0, 0, 0, 0.1)\",\n lighter: \"rgba(0, 0, 0, 0.15)\",\n },\n accent: {\n main: \"#EF414B\",\n contrastText: \"#ffffff\"\n },\n secondary: {\n main: \"#f2f2f2\",\n lighter: \"#ededed\",\n darker: \"#e1e1e1\"\n },\n drawer: {\n main: \"#1a1a1a\",\n contrastText: \"#fff\"\n },\n calendar: {\n primary: \"#ffffff\",\n secondary: \"#f2f2f2\",\n primarySelected: \"#dddddd\",\n secondarySelected: \"#e1e1e1\",\n today: \"#f57a47\",\n todaySelected: \"#f79b6a\",\n border: \"#f2f2f2\",\n events: {\n focus: \"#0003\",\n focusOutline: \"#000\"\n }\n }\n },\n dark: {\n primary: {\n main: \"#171717\",\n lighter: \"#252424\",\n contrastText: \"#fff\"\n },\n highlight: {\n main: \"rgba(255, 255, 255, 0.1)\",\n lighter: \"rgba(255, 255, 255, 0.05)\",\n },\n accent: {\n main: \"#eb121e\",\n lighter: \"\"\n },\n secondary: {\n main: \"#313131\",\n lighter: \"#363636\",\n darker: \"#262626\",\n },\n drawer: {\n main: \"#1a1a1a\",\n lighter: \"\"\n },\n calendar: {\n primary: \"#171717\",\n secondary: \"#252525\",\n primarySelected: \"#282828\",\n secondarySelected: \"#363636\",\n today: \"#f35f2d\",\n todaySelected: \"#d05020\",\n border: \"#313131\",\n events: {\n focus: \"#fff3\",\n focusOutline: \"#fff\"\n }\n }\n }\n};\n","export const ELEMENT_IDS = {\n REACT_ROOT: \"root\",\n CONTENT_CONTAINER: \"content-container\"\n};\n\nexport const ROUTES = {\n ROOT: \"/\",\n PAY_METHODS: \"/pay-methods\",\n PLANS: \"/plans\",\n PROGRAMS: \"/programs\",\n TRANSACTIONS: \"/transactions\",\n CALENDAR: \"/calendar\",\n RESTORE_CONFIG_TOOL: \"/restore-config-tool\",\n};\n\nexport const ERROR_MESSAGES = {\n NAME_DOES_NOT_START_WITH_WHITESPACE: \"Name must not start with whitespace.\",\n NAME_DOES_NOT_END_WITH_WHITESPACE: \"Name must not end with whitespace.\",\n NAME_DOES_NOT_CONTAIN_SEQUENTIAL_WHITESPACES:\n \"Name must not contain sequential whitespaces.\",\n NAME_DOES_NOT_CONTAIN_COLON: \"Name must not contain colon.\",\n NAME_DOES_NOT_CONTAIN_NUMBER_SIGN: \"Name must not contain number sign.\",\n NAME_STARTS_WITH_LETTER: \"Name must start with Latin letter (a-z, A-Z).\",\n REQUIRED: \"Field is required.\",\n PASSWORD:\n \"Password must contain at least one Latin letter in upper case (A-Z), one Latin letter in lower case (a-z), digit (0-9) and special character ( !\\\"#$%&'()*+,-./:;<=>?@[]^_`{|}~) and must be at least 8 characters long.\",\n DATABASE_NAME:\n \"Name must contain only Latin letters (a-z, A-Z), digits (0-9), hyphen (-) and must be at most 16 characters long.\",\n CLUSTER_NAME:\n \"Name must contain only Latin letters (a-z, A-Z), digits (0-9), hyphen (-), underscore (_) and dot(.) and must be at most 255 characters long.\",\n KEYPAIR_NAME:\n \"Name must contain only Latin letters (a-z, A-Z), digits (0-9), hyphen (-), underscore (_) and whitespace.\",\n EMAIL_ADDRESS: \"E-mail address has not valid format.\",\n PASSWORDS_MUST_MATCH: \"Passwords must match.\",\n SERVER_TAG:\n \"Server tag must not contain comma (,) or slash (/) and must be at most 60 characters long.\",\n MAX_SERVER_TAG_COUNT: \"Server can have up to 50 tags.\",\n ORGANIZATION_NAME: \"Name must not contain number sign (#).\",\n GROUP_NAME: \"Name must not contain number sign (#).\",\n PROJECT_NAME: \"Name must not contain number sign (#) or colon (:).\",\n HTTP_HTTPS_ADDRESS: \"Endpoint must be http or https address.\"\n};\n","import { useKeycloak } from \"@react-keycloak/web\";\nimport { FC } from \"react\";\nimport { Redirect } from \"react-router-dom\";\nimport { ROUTES } from \"../../../constants\";\n\nexport const RequireAuth: FC = ({ children }) => {\n const { keycloak } = useKeycloak();\n\n if (!keycloak.authenticated) {\n return (\n \n );\n }\n\n return <>{children};\n};\n","import * as React from \"react\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Brightness4Icon from \"@mui/icons-material/Brightness4\";\nimport Brightness7Icon from \"@mui/icons-material/Brightness7\";\nimport { useTheme } from \"@mui/material/styles\";\nimport { ColorModeContext } from \"components/App\";\n\nexport const ToggleTheme: React.FC = () => {\n const theme = useTheme();\n\n return (\n \n {({ toggleColorMode }) => {\n return (\n \n {theme.palette.mode === 'dark' ? : }\n \n )\n }}\n \n )\n}\n","import { useEffect, useRef } from \"react\";\n\nexport const usePrevious = (value: T): T | undefined => {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n};\n","import MuiPopper from \"@mui/material/Popper\";\nimport styled from \"styled-components\";\n\nexport const Popper = styled(MuiPopper)`\n z-index: 100;\n`;\n","import ClickAwayListener from \"@mui/base/ClickAwayListener\";\nimport Grow from \"@mui/material/Grow\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport MenuList from \"@mui/material/MenuList\";\nimport Paper from \"@mui/material/Paper\";\nimport { usePrevious } from \"hooks/usePrevious\";\nimport { FC, KeyboardEvent, useEffect } from \"react\";\nimport { ELEMENT_IDS } from \"../../../constants\";\nimport * as s from \"./styles\";\nimport { MenuProps } from \"./types\";\n\nexport const Menu: FC = ({\n items,\n onClose,\n anchorEl,\n isOpened,\n boundariesElement,\n placement\n}: MenuProps) => {\n const previousIsOpened = usePrevious(isOpened);\n\n const handleClose = (e: MouseEvent | TouchEvent) => {\n if (anchorEl && anchorEl?.contains(e.target as HTMLElement)) {\n return;\n }\n\n if (onClose) {\n onClose();\n }\n };\n\n const handlePaperKeyDown = (e: KeyboardEvent) => {\n if ([\"Escape\", \"Tab\"].includes(e.key) && onClose) {\n e.preventDefault();\n onClose();\n }\n };\n\n useEffect(() => {\n if (previousIsOpened && !isOpened && anchorEl) {\n anchorEl?.focus();\n }\n }, [anchorEl, previousIsOpened, isOpened]);\n\n return (\n \n {({ TransitionProps }) => (\n \n \n \n \n {items?.map((item, i) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )}\n \n );\n};\n","import { RootReducer } from \"../../reducers\";\nimport { KeycloakUser } from \"./types\";\n\nexport const userSelector = (state: RootReducer): KeycloakUser | null =>\n state.auth.user;\n","import MuiDrawer from \"@mui/material/Drawer\";\nimport List from \"@mui/material/List\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport styled from \"styled-components\";\n\nconst withProps = () => (fn) => fn;\n\nexport const DRAWER_WIDTH = 256; // in pixels\n\nexport const Container = styled.div`\n display: flex;\n min-height: 100%;\n`;\n\nexport const DrawerHeader = styled.div`\n background-color: ${({ theme }) => theme.palette.drawer.main};\n`;\n\nexport const LogoImgContainer = styled.span`\n display: flex;\n align-items: center;\n justify-content: center;\n height: ${({ theme }) => theme.spacing(16)};\n padding: ${({ theme }) => theme.spacing(1, 2)};\n`;\n\nexport const LogoLinkContainer = styled.span`\n display: flex;\n align-items: center;\n height: ${({ theme }) => theme.spacing(8)};\n padding: ${({ theme }) => theme.spacing(1, 2)};\n`;\n\nexport const Drawer = styled(MuiDrawer)`\n display: flex;\n & .MuiDrawer-paper {\n width: ${DRAWER_WIDTH}px;\n overflow: hidden;\n background-color: ${({ theme }) => theme.palette.drawer.main}\n }\n`;\n\nexport const DrawerMenuList = styled(List)`\n overflow-y: auto;\n padding: ${({ theme }) => theme.spacing(0)};\n background-color: ${({ theme }) => theme.palette.drawer.main};\n`;\n\nexport const IconContainer = withProps()(styled.span)`\n display: flex;\n margin-right: ${({ theme }) => theme.spacing(1)};\n color: ${(props) => props.active ? props.theme.palette.accent.main : \"#fff\"};\n`;\n\nexport const ListItem = styled.li`\n padding: 0;\n`;\n\nexport const Link = styled(RouterLink)`\n padding: ${({ theme }) => theme.spacing(1, 2)};\n text-decoration: none;\n cursor: pointer;\n display: inline-flex;\n color: #fff;\n width: 100%;\n`;\n","import { DRAWER_WIDTH } from \"components/Container/styles\";\nimport styled from \"styled-components\";\n\n\n\nexport const Header = styled.header`\n grid-area: header;\n display: flex;\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing(1)};\n background: ${({ theme }) => theme.palette?.accent?.main};\n`;\n\nexport const BreadcrumbsContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const Toolbar = styled.div`\n align-self: flex-start;\n display: flex;\n`;\n\nexport const UsernameContainer = styled.div`\n display: flex;\n align-items: center;\n padding-right: ${({ theme }) => theme.spacing(1)};\n`;\n\nexport const Container = styled.div`\n display: grid;\n grid-template-rows: ${({ theme }) => theme.spacing(12.5)} 1fr;\n grid-template-columns: 1fr;\n grid-template-areas: \"header\" \"content\";\n width: calc(100% - ${DRAWER_WIDTH}px);\n height: 100vh;\n margin-left: ${DRAWER_WIDTH}px;\n`;\n\nexport const ContentContainer = styled.main`\n grid-area: content;\n display: flex;\n flex-direction: column;\n align-items: center;\n height: 100%;\n overflow: auto;\n padding: ${({ theme }) => theme.spacing(1)};\n background-color: ${({ theme }) => theme.palette.primary.main};\n`;\n","import { useEffect } from \"react\";\n\nexport const useMount = (callback: () => void): void =>\n useEffect(() => {\n callback();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n","import AccountCircle from \"@mui/icons-material/AccountCircle\";\nimport Language from \"@mui/icons-material/Language\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Box from \"@mui/material/Box\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { ToggleTheme } from \"components/common/ToggleTheme\";\nimport Typography from \"@mui/material/Typography\";\nimport { useTranslation } from \"react-i18next\";\nimport { useKeycloak } from \"@react-keycloak/web\";\nimport { Menu } from \"components/common/Menu\";\nimport * as authActions from \"../../store/modules/auth/actions\";\nimport { userSelector } from \"../../store/modules/auth/selectors\";\nimport { FC, useCallback, useRef, useState } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { ELEMENT_IDS, ROUTES } from \"../../constants\";\nimport * as s from \"./styles\";\nimport { useMount } from \"hooks/useMount\";\nimport { useLocation } from \"react-router-dom\";\n\nexport const Content: FC = ({ children }) => {\n const dispatch = useDispatch();\n const { i18n, t } = useTranslation();\n const { keycloak } = useKeycloak();\n const [isUserMenuOpened, setIsUserMenuOpened] = useState(false);\n const [isLocalisationMenuOpened, setIsLocalisationMenuOpened] =\n useState(false);\n const user = useSelector(userSelector);\n const location = useLocation();\n\n const pagesTitles = {\n [ROUTES.PAY_METHODS]: t(\"uiComponents.navigation.list.pay_methods\"),\n [ROUTES.PLANS]: t(\"uiComponents.navigation.list.plans\"),\n [ROUTES.PROGRAMS]: t(\"uiComponents.navigation.list.programs\"),\n [ROUTES.RESTORE_CONFIG_TOOL]: t(\n \"uiComponents.navigation.list.restore_config_tool\"\n ),\n [ROUTES.TRANSACTIONS]: t(\"uiComponents.navigation.list.transactions\"),\n [ROUTES.CALENDAR]: t(\"uiComponents.navigation.list.calendar\")\n };\n\n const handleUserMenuButtonClick = useCallback(() => {\n setIsUserMenuOpened(!isUserMenuOpened);\n }, [isUserMenuOpened]);\n\n const handleLocalisationMenuButtonClick = useCallback(() => {\n setIsLocalisationMenuOpened(!isLocalisationMenuOpened);\n }, [isLocalisationMenuOpened]);\n\n const handleUserMenuClose = useCallback(() => {\n setIsUserMenuOpened(false);\n }, []);\n\n const handleLocalisationMenuClose = useCallback(() => {\n setIsLocalisationMenuOpened(false);\n }, []);\n\n const userMenuButtonRef = useRef(null);\n\n const localisationMenuButtonRef = useRef(null);\n\n const handleSettingsMenuItemClick = useCallback(() => {\n void keycloak.accountManagement();\n }, [keycloak]);\n\n const handleLogoutMenuItemClick = useCallback(() => {\n dispatch(authActions.logout.started());\n handleUserMenuClose();\n }, [handleUserMenuClose, dispatch]);\n\n const handleTranslation = (lang: string) => i18n.changeLanguage(lang);\n\n useMount(() => {\n const savedLang = localStorage.getItem(\"lang\");\n if (savedLang) void handleTranslation(savedLang).then((r) => r);\n });\n\n return (\n \n \n \n \n {pagesTitles[location.pathname]}\n \n \n \n \n {user && (\n \n \n {[user.firstName, user.lastName].filter(Boolean).join(\" \") ||\n String(user.username)}\n \n \n )}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {\n setIsLocalisationMenuOpened(false);\n localStorage.setItem(\"lang\", \"en\");\n void handleTranslation(\"en\").then((r) => r);\n }\n },\n {\n label: \"DE\",\n onClick: () => {\n setIsLocalisationMenuOpened(false);\n localStorage.setItem(\"lang\", \"de\");\n void handleTranslation(\"de\").then((r) => r);\n }\n }\n ]}\n />\n \n \n \n \n \n \n \n {children}\n \n \n );\n};\n","import Typography from \"@mui/material/Typography\";\r\nimport { Content } from \"components/Content\";\r\nimport { FC, useEffect, useState } from \"react\";\r\nimport { generatePath, Link, matchPath, useLocation } from \"react-router-dom\";\r\nimport { ROUTES } from \"../../constants\";\r\nimport * as s from \"./styles\";\r\nimport { MatchParams, NavigationMenuItem } from \"./types\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport ListIcon from \"@mui/icons-material/List\";\r\nimport TimeToLeaveIcon from \"@mui/icons-material/TimeToLeave\";\r\nimport AssignmentIcon from \"@mui/icons-material/Assignment\";\r\nimport CodeIcon from \"@mui/icons-material/Code\";\r\nimport EventIcon from '@mui/icons-material/Event';\r\nimport { userSelector } from \"../../store/modules/auth/selectors\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { ListItemButton } from \"@mui/material\";\r\n\r\nexport const Container: FC = ({ children }) => {\r\n const { t, i18n } = useTranslation();\r\n const { pathname } = useLocation();\r\n const [menuItems, setMenuItems] = useState([]);\r\n\r\n const currentRoute = Object.values(ROUTES).find((route) =>\r\n matchPath(pathname, { path: route, exact: true })\r\n );\r\n\r\n const match = matchPath(pathname, {\r\n path: currentRoute,\r\n exact: true\r\n });\r\n\r\n const user = useSelector(userSelector);\r\n\r\n useEffect(() => {\r\n setMenuItems([\r\n {\r\n route: ROUTES.PAY_METHODS,\r\n label: t(\"uiComponents.navigation.list.pay_methods\"),\r\n icon: \r\n },\r\n {\r\n route: ROUTES.PLANS,\r\n label: t(\"uiComponents.navigation.list.plans\"),\r\n icon: \r\n },\r\n {\r\n route: ROUTES.PROGRAMS,\r\n label: t(\"uiComponents.navigation.list.programs\"),\r\n icon: \r\n },\r\n {\r\n route: ROUTES.TRANSACTIONS,\r\n label: t(\"uiComponents.navigation.list.transactions\"),\r\n icon: \r\n },\r\n {\r\n route: ROUTES.CALENDAR,\r\n label: t(\"uiComponents.navigation.list.calendar\"),\r\n icon: \r\n },\r\n {\r\n route: ROUTES.RESTORE_CONFIG_TOOL,\r\n label: t(\"uiComponents.navigation.list.restore_config_tool\"),\r\n icon: ,\r\n attributeDependency: \"config_tool\"\r\n },\r\n ]);\r\n }, [i18n.language, setMenuItems, t]);\r\n\r\n const ROUTES_WITHOUT_MENU: string[] = [];\r\n\r\n const isMenuHidden = currentRoute\r\n ? ROUTES_WITHOUT_MENU.includes(currentRoute)\r\n : false;\r\n\r\n const renderMenuItems = (menuItems: NavigationMenuItem[]) =>\r\n menuItems.map((menuItem, inx) => {\r\n if (menuItem[\"attributeDependency\"]) {\r\n const dependency = menuItem[\"attributeDependency\"];\r\n if (\r\n !(\r\n user &&\r\n user.attributes &&\r\n dependency in user.attributes &&\r\n user.attributes[dependency][0] === \"true\"\r\n )\r\n ) {\r\n return <>;\r\n }\r\n }\r\n\r\n return (\r\n \r\n \r\n {menuItem.icon && (\r\n \r\n {menuItem.icon}\r\n \r\n )}\r\n \r\n {menuItem.label}\r\n \r\n \r\n \r\n );\r\n });\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \"TSG\"\r\n \r\n \r\n \r\n \r\n {!isMenuHidden && <>{renderMenuItems(menuItems)}}\r\n \r\n \r\n {children}\r\n \r\n );\r\n};\r\n","import { useState, FC, useEffect } from \"react\";\nimport DatePicker from \"@mui/lab/DatePicker\";\nimport TextField from \"@mui/material/TextField\";\nimport { DatePickerInterface } from \"./types\";\nimport { useMount } from \"hooks/useMount\";\nimport { useTranslation } from \"react-i18next\";\n\n\nexport const BasicDatePicker: FC = ({\n label,\n handleValue,\n initValue,\n isStartOfTheDay = false,\n isEndOfTheDay = false,\n minValue,\n maxValue,\n validationMessage,\n error,\n}: DatePickerInterface) => {\n const [value, setValue] = useState(null);\n const [minDate, setMinDate] = useState(undefined);\n const [maxDate, setMaxDate] = useState(undefined);\n const { i18n } = useTranslation();\n\n const maskMap = {\n en: '__/__/____',\n de: '__.__.____',\n };\n\n const defineTime = (d: Date) => {\n if (isStartOfTheDay) d.setHours(0, 0, 0, 0);\n if (isEndOfTheDay) d.setHours(23, 59, 59, 999);\n\n return d;\n }\n\n useMount(() => {\n if (initValue) {\n setValue(new Date(initValue));\n }\n });\n useEffect(() => {\n if (minValue) setMinDate(minValue);\n }, [minValue])\n useEffect(() => {\n if (maxValue) setMaxDate(maxValue);\n }, [maxValue])\n\n return (\n {\n setValue(newValue);\n if (newValue instanceof Date) {\n handleValue(defineTime(newValue));\n } else {\n handleValue(null);\n }\n }}\n renderInput={(params) => (\n \n )}\n />\n );\n};\n","import styled from \"styled-components\";\nimport FormHelperText from \"@mui/material/FormControl\";\n\nexport const HelperText = styled(FormHelperText)`\n font-size: 0.75rem;\n line-height: 1.66;\n color: ${({ theme }) => theme.palette.error.main};\n`;\n","import { useState, FC, ChangeEvent, useEffect } from \"react\";\nimport InputLabel from \"@mui/material/InputLabel\";\nimport Input from \"@mui/material/Input\";\nimport InputAdornment from \"@mui/material/InputAdornment\";\nimport FormControl from \"@mui/material/FormControl\";\nimport FormHelperText from \"@mui/material/FormControl\";\nimport { useMount } from \"hooks/useMount\";\nimport { CurrencyAmountInterface } from \"components/common/FormFields/CurrencyAmount/types\";\nimport * as s from \"./styles\";\n\nexport const CurrencyAmount: FC = ({\n label,\n initValue,\n handleValue,\n invisible,\n payloadValue,\n validationMessage,\n error\n}) => {\n const [value, setValue] = useState(\"\");\n\n useMount(() => {\n const euro = initValue > 0 ? initValue / 100 : initValue;\n setValue(euro);\n });\n\n useEffect(() => {\n if (payloadValue) {\n setValue(payloadValue as any);\n handleValue(payloadValue);\n }\n }, [handleValue, payloadValue]);\n\n return (\n \n {label}\n ) => {\n const val: string = e.target.value;\n setValue(val);\n const cents: number | string = val ? Math.round(+val * 100) : val;\n handleValue(cents);\n }}\n inputProps={{ step: 0.1 }}\n color={\"accent\"}\n endAdornment={€}\n />\n {validationMessage && (\n \n {validationMessage}\n \n )}\n \n );\n};\n","import { useState, FC, ChangeEvent, useEffect } from \"react\";\nimport { SimpleSelectInterface } from \"components/common/FormFields/SimpleSelect/types\";\nimport { SelectOption } from \"components/common/Dialog/FormDialog/types\";\nimport TextField from \"@mui/material/TextField\";\nimport Autocomplete from \"@mui/material/Autocomplete\";\nimport { useMount } from \"hooks/useMount\";\n\nexport const SimpleSelect: FC = ({\n label,\n options = [],\n handleValue,\n autocomplete,\n initValue = null,\n payloadValue,\n error,\n invisible = false,\n validationMessage,\n}) => {\n const [option, setOption] = useState(options.find((option) => option.value === initValue) ?? null);\n\n useEffect(() => {\n if (payloadValue) {\n setOption((payloadValue as SelectOption));\n handleValue((payloadValue as SelectOption).value)\n }\n }, [payloadValue])\n\n return (\n {\n setOption(option);\n handleValue((option as SelectOption)?.value);\n }}\n getOptionLabel={(option: SelectOption) =>\n option.label\n }\n renderOption={(\n props,\n option: SelectOption\n ) => {\n return (\n
  • \n {option.label}\n
  • \n );\n }}\n fullWidth={true}\n isOptionEqualToValue={(option, value) => {\n return option.value === value.value;\n }}\n style={invisible ? { height: \"0\", opacity: 0 } : { marginTop: \"16px\" }}\n renderInput={(params) => (\n \n )}\n />\n );\n}\n","import { useState, FC, ChangeEvent, useEffect } from \"react\";\nimport { MultiSelectInterface } from \"components/common/FormFields/MultiSelect/types\";\nimport { SelectOption } from \"components/common/Dialog/FormDialog/types\";\nimport TextField from \"@mui/material/TextField\";\nimport Autocomplete from \"@mui/material/Autocomplete\";\nimport { useMount } from \"hooks/useMount\";\n\nexport const MultiSelect: FC = ({\n label,\n invisible,\n options,\n handleValue,\n autocomplete,\n initValue = [],\n payloadValue = null,\n error,\n validationMessage,\n}) => {\n const [value, setValue] = useState([]);\n\n useMount(() => {\n setValue(initValue)\n handleValue(initValue.map((option) => option.value))\n })\n\n return (\n {\n const programsIdsList: string[] = value.map(\n (program) => program.value\n );\n setValue(value);\n handleValue(programsIdsList);\n }}\n getOptionLabel={(option: SelectOption) =>\n option.label\n }\n isOptionEqualToValue={(option, value) => {\n return option.value === value.value;\n }}\n renderOption={(props, option: SelectOption) => {\n return (\n
  • \n {option.label}\n
  • \n );\n }}\n renderInput={(params) => (\n \n )}\n />\n )\n}\n","import { FC, useState } from \"react\";\nimport MuiPhoneNumber from 'material-ui-phone-number-2';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport IconButton from '@mui/material/IconButton';\nimport ClearIcon from '@mui/icons-material/Clear';\nimport { useMount } from \"hooks/useMount\";\n\nexport const PhoneNumber: FC = ({\n initValue,\n label,\n handleValue,\n validationMessage\n}) => {\n const [value, setValue] = useState(\"\");\n\n const handleClear = () => {\n setValue(\"\");\n handleValue(\"\");\n }\n\n useMount(() => {\n if (initValue) setValue(initValue);\n });\n\n const countriesList = [\n \"de\", \"at\", \"be\", \"hr\", \"dk\", \"fi\", \"it\", \"lt\", \"no\",\n \"pt\", \"sk\", \"se\", \"ch\", \"bg\", \"cz\", \"ee\", \"fr\", \"ie\",\n \"lv\", \"nl\", \"pl\", \"ro\", \"es\", \"uk\",\n ];\n\n return (\n {\n setValue(newValue);\n const valueToSave = newValue.replace(/\\s/g, \"\");\n handleValue(valueToSave);\n }}\n fullWidth={true}\n style={{ marginTop: \"16px\" }}\n color={\"accent\"}\n helperText={validationMessage}\n autoComplete={\"off\"}\n InputProps={{\n endAdornment: (\n \n \n \n \n \n ),\n }}\n />\n );\n}\n","export const isNull = (x: unknown): x is null => x === null;\n","export const isString = (x: unknown): x is string => typeof x === \"string\";\n","import { SelectOption } from \"components/common/Dialog/FormDialog/types\";\nimport { isObject } from \"./isObject\";\nimport { isString } from \"./isString\";\n\nexport const isSelectOption = (x: unknown): x is SelectOption =>\n isObject(x) && isString(x[\"label\"]) && isString(x[\"value\"]);\n","import { isNull } from \"./isNull\";\n\nexport const isObject = (x: unknown): x is Record =>\n typeof x === \"object\" && !isNull(x);\n","export const isUndefined = (x: unknown): x is undefined =>\n typeof x === \"undefined\";\n","import ArrowDownward from \"@mui/icons-material/ArrowDownward\";\nimport ArrowUpward from \"@mui/icons-material/ArrowUpward\";\nimport { DialogTitle as DialogTitleOrg } from \"@mui/material\";\nimport MuiDialog from \"@mui/material/Dialog\";\nimport DialogContentOrg from \"@mui/material/DialogContent\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Typography from \"@mui/material/Typography\";\nimport styled from \"styled-components\";\n\nexport const Dialog = styled(MuiDialog)`\n & .MuiDialog-paper {\n width: 600px;\n }\n`;\n\nexport const DialogTitle = styled(DialogTitleOrg)`\n display: flex;\n justify-content: space-between;\n`\n\nexport const DialogContent = styled(DialogContentOrg)`\n display: flex;\n flex-direction: column;\n`;\n\nexport const FormDialogContent = styled(DialogContentOrg)`\n display: flex;\n flex-direction: column;\n`;\n\nexport const StepArrowsContainer = styled.div`\n display: flex;\n flex-direction: column;\n padding: ${({ theme }) => theme.spacing(0, 1)};\n`;\n\nexport const StepButton = styled(IconButton)`\n padding: 0;\n`;\n\nexport const ArrowUpIcon = styled(ArrowUpward)`\n font-size: small;\n`;\n\nexport const ArrowDownIcon = styled(ArrowDownward)`\n font-size: small;\n`;\n\nexport const LabelFieldText = styled(Typography)`\n margin-top: ${({ theme }) => theme.spacing(1)};\n`;\n\nexport const HiddenInput = styled.input`\n display: none;\n`;\n\nexport const LoaderContainer = styled.div`\n height: ${({ theme }) => theme.spacing(9)};\n`;\n","import { MouseEventHandler } from \"react\";\nimport { AnySchema } from \"yup\";\n\nexport enum FIELD_TYPES {\n TEXT = \"text\",\n MULTILINE_TEXT = \"multiline_text\",\n PASSWORD = \"password\",\n SELECT = \"select\",\n MULTISELECT = \"multiselect\",\n SWITCH = \"switch\",\n CHECKBOX = \"checkbox\",\n NUMBER = \"number\",\n LABEL = \"label\",\n DATE_PICKER = \"date_picker\",\n DATE_TIME_PICKER = \"date_time_picker\",\n FILE = \"file\",\n CURRENCY_AMOUNT = \"currency_amount\",\n PHONE_NUMBER = \"phone_number\",\n}\n\nexport type SelectOption = {\n label: string;\n value: string;\n};\n\nexport type ExtendedConditions = {\n fn: (target: { [key: string]: string }) => boolean;\n defaultValue: string | number | SelectOption | null;\n};\n\nexport type FieldTypesMethod = (target: any) => string;\n\nexport type PayloadValueOfCondition = {\n fn: any;\n payload: any;\n}\n\nexport type FormDialogField = {\n label: ((fieldValues: Record) => string) | string;\n name: string;\n type: FIELD_TYPES | FieldTypesMethod;\n defaultValue?: ((fieldValues: Record) => unknown) | unknown;\n options?:\n | SelectOption[]\n | ((fieldValues: Record) => SelectOption[] | undefined)\n | ({ label: string; value: number; }[] | undefined);\n suffix?: string;\n rules?: AnySchema;\n onCreate?: () => void;\n createText?: string;\n step?:\n | ((fieldValues: Record) => number | undefined)\n | number;\n min?: ((fieldValues: Record) => number | undefined) | number;\n max?: ((fieldValues: Record) => number | undefined) | number;\n isHidden?: (fieldValues: Record) => boolean;\n autocomplete?: string;\n freeSolo?: boolean;\n helperText?: string;\n explanation?: string;\n extendedConditions?: ExtendedConditions;\n payloadValueOfCondition?: PayloadValueOfCondition;\n invisible?: boolean | ((target: any) => boolean);\n isStartOfTheDay?: boolean;\n isEndOfTheDay?: boolean;\n minDate?: any;\n maxDate?: any;\n acceptFileTypes?: string;\n};\n\nexport type FormDialogExtraButton = {\n color: {\n background: string;\n text: string;\n };\n handler: MouseEventHandler | undefined;\n locked?: () => boolean | undefined;\n label: string;\n}\n\nexport type FormDialogProps = {\n title: string;\n extraButtons?: FormDialogExtraButton[];\n fields?: FormDialogField[];\n yupNoSortEdges?: [string, string][];\n onConfirm: (data?) => void;\n onCancel: () => void;\n isOpened: boolean;\n cancelButtonLabel?: string;\n confirmButtonLabel?: string;\n isLocked?: boolean;\n isLoading?: boolean;\n};\n","import { ChangeEvent, FC, useState } from \"react\";\r\nimport { Button, Box } from \"@mui/material\";\r\nimport UploadFileIcon from \"@mui/icons-material/UploadFile\";\r\n\r\nexport const FileUpload: FC<{\r\n label: string;\r\n name: string;\r\n handleValue: (event: any) => void;\r\n acceptFileTypes?: string;\r\n}> = ({\r\n label,\r\n acceptFileTypes,\r\n name,\r\n handleValue\r\n}) => {\r\n const [filename, setFilename] = useState(\"\");\r\n\r\n const handleFileUpload = (e: ChangeEvent) => {\r\n const files = e.target.files;\r\n const fileArray = Array.from(files ?? []);\r\n handleValue(fileArray);\r\n if (files) {\r\n let names = \"\";\r\n for (let i = 0; i < files.length; i++) {\r\n names += files[0].name + \", \";\r\n }\r\n setFilename(names.substring(0, names.length - 2));\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n }\r\n sx={{ marginRight: \"1rem\" }}\r\n >\r\n {label}\r\n \r\n \r\n {filename}\r\n \r\n );\r\n }\r\n","import { useState, FC, useEffect } from \"react\";\nimport TextField from \"@mui/material/TextField\";\nimport { DateTimePickerInterface } from \"./types\";\nimport { useMount } from \"hooks/useMount\";\nimport { useTranslation } from \"react-i18next\";\nimport DateTimePicker from \"@mui/lab/DateTimePicker\";\n\nexport const BasicDateTimePicker: FC = ({\n label,\n handleValue,\n initValue,\n minValue,\n maxValue,\n validationMessage,\n error,\n}: DateTimePickerInterface) => {\n const [value, setValue] = useState(null);\n const [minDate, setMinDate] = useState(undefined);\n const [maxDate, setMaxDate] = useState(undefined);\n const { i18n } = useTranslation();\n\n const maskMap = {\n en: '__/__/____ __:__',\n de: '__.__.____ __:__',\n };\n\n const isValidDate = (date) => date && Object.prototype.toString.call(date) === \"[object Date]\" && !isNaN(date);\n\n useMount(() => {\n if (initValue) {\n setValue(new Date(initValue));\n }\n });\n useEffect(() => {\n if (minValue) setMinDate(minValue);\n }, [minValue])\n useEffect(() => {\n if (maxValue) setMaxDate(maxValue);\n }, [maxValue])\n\n return (\n {\n setValue(newValue);\n if (isValidDate(newValue)) {\n handleValue(newValue);\n } else {\n handleValue(null);\n }\n }}\n renderInput={(params) => (\n \n )}\n />\n );\n};\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { createFilterOptions } from \"@mui/material/Autocomplete\";\nimport Button from \"@mui/material/Button\";\nimport Checkbox from \"@mui/material/Checkbox\";\nimport DialogActions from \"@mui/material/DialogActions\";\nimport DialogTitle from \"@mui/material/DialogTitle\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport TextField from \"@mui/material/TextField\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Info from \"@mui/icons-material/Info\";\nimport { BasicDatePicker } from \"components/common/FormFields/BasicDatePicker\";\nimport { CurrencyAmount } from \"components/common/FormFields/CurrencyAmount\";\nimport { SimpleSelect } from \"components/common/FormFields/SimpleSelect\";\nimport { MultiSelect } from \"components/common/FormFields/MultiSelect\";\nimport { PhoneNumber } from \"components/common/FormFields/PhoneNumber\";\nimport { FC, useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Controller, FieldError, useForm } from \"react-hook-form\";\nimport { isSelectOption } from \"typeGuards/isSelectOption\";\nimport { isUndefined } from \"typeGuards/isUndefined\";\nimport { object, SchemaOf, string } from \"yup\";\nimport { Loader } from \"../../Loader\";\nimport * as s from \"../styles\";\nimport {\n FIELD_TYPES,\n FormDialogExtraButton,\n FormDialogField,\n FormDialogProps,\n SelectOption\n} from \"./types\";\nimport { useTranslation } from \"react-i18next\";\nimport { FileUpload } from \"../../FormFields/FileUpload\";\nimport { BasicDateTimePicker } from \"components/common/FormFields/BasicDateTimePicker\";\nimport { Switch } from \"@mui/material\";\n\nexport const selectOptionSchema: SchemaOf = object({\n label: string().required(),\n value: string().required()\n});\n\nconst filter = createFilterOptions();\n\nexport const FormDialog: FC = ({\n title,\n extraButtons,\n fields,\n yupNoSortEdges,\n onConfirm,\n onCancel,\n isOpened,\n isLoading,\n cancelButtonLabel = \"Cancel\",\n confirmButtonLabel = \"OK\",\n isLocked\n}: FormDialogProps) => {\n const [areDividersVisible, setAreDividersVisible] = useState(false);\n const [formDialogContentNode, setFormDialogContentNode] =\n useState(null);\n const validationSchema = useMemo(() => {\n return object().shape(\n fields?.reduce(\n (schemaObj, field) => ({\n ...schemaObj,\n [field.name]: (\n typeof field.invisible == \"function\"\n ? field.invisible(fields)\n : field.invisible\n )\n ? field.rules\n : undefined\n }),\n {}\n ) || {},\n yupNoSortEdges\n );\n }, [fields, yupNoSortEdges]);\n const { t } = useTranslation();\n\n const { handleSubmit, control, errors, watch } = useForm({\n mode: \"onChange\",\n resolver: yupResolver(validationSchema)\n });\n\n const fieldValues = watch();\n\n const handleCancelButtonClick = useCallback(() => {\n onCancel();\n }, [onCancel]);\n\n const onSubmit = useCallback(\n (data) => {\n onConfirm(data);\n },\n [onConfirm]\n );\n\n const handleClose = useCallback(\n (e, reason) => {\n if (reason === \"escapeKeyDown\" && (!fields || fields.length === 0)) {\n onCancel();\n }\n },\n [fields, onCancel]\n );\n\n const getErrorMessage = useCallback(\n (field: FormDialogField) => {\n let fieldError = errors[field.name] as FieldError | FieldError[];\n if (Array.isArray(fieldError)) {\n // Filter non-empty elements\n fieldError = fieldError.filter((x) => x)[0];\n }\n if (!fieldError) {\n return undefined;\n }\n\n switch (fieldError.type) {\n case \"required\":\n case \"typeError\":\n return t(\"uiComponents.form.errorMessages.required\");\n default:\n return fieldError.message;\n }\n },\n [errors]\n );\n\n const isUsernameFieldExists = useMemo(\n () => Boolean(fields?.some((field) => field.autocomplete === \"username\")),\n [fields]\n );\n\n const passwordFields = useMemo(\n () =>\n fields?.reduce(\n (acc, cur, i) =>\n cur.type === FIELD_TYPES.PASSWORD ? [...acc, i] : acc,\n [] as number[]\n ) || [],\n [fields]\n );\n\n useEffect(() => {\n const handleResize = () => {\n if (formDialogContentNode) {\n formDialogContentNode.scrollHeight > formDialogContentNode.clientHeight;\n setAreDividersVisible(\n formDialogContentNode.scrollHeight >\n formDialogContentNode.clientHeight\n );\n } else {\n setAreDividersVisible(false);\n }\n };\n\n window.addEventListener(\"resize\", handleResize);\n handleResize();\n return () => window.removeEventListener(\"resize\", handleResize);\n }, [formDialogContentNode]);\n\n const handleFormDialogContentRef = useCallback((node: HTMLDivElement) => {\n setFormDialogContentNode(node);\n }, []);\n\n const FORM_ID = `dialog-${title.replace(/\\s/g, \"-\")}`;\n\n const renderExplanation = (field: FormDialogField) => {\n return (\n \n \n \n );\n };\n\n return (\n \n {title}\n \n
    \n {isLoading ? (\n \n \n \n ) : (\n <>\n {fields?.map((field, i) => {\n const visible =\n isUndefined(field.isHidden) ||\n (typeof field.isHidden === \"function\" &&\n Object.keys(fieldValues).length > 0 &&\n !field.isHidden(fieldValues));\n\n if (!visible) {\n return;\n }\n\n const currentType =\n typeof field.type === \"function\"\n ? field.type(fieldValues)\n : field.type;\n\n const defaultValue =\n field.defaultValue != null && typeof field.defaultValue === \"function\"\n ? field.defaultValue(fieldValues)\n : field.defaultValue;\n\n const invisible =\n typeof field.invisible === \"function\"\n ? field.invisible(fieldValues)\n : false;\n\n const payloadValue = field.payloadValueOfCondition?.fn(\n fieldValues\n )\n ? field?.payloadValueOfCondition?.payload\n : null;\n\n switch (currentType) {\n case FIELD_TYPES.SWITCH:\n return (\n (\n \n onChange(e.target.checked)}\n />\n {field.explanation &&\n renderExplanation(field)}\n \n )}\n />\n }\n />);\n case FIELD_TYPES.CHECKBOX:\n return (\n (\n \n onChange(e.target.checked)}\n />\n {field.explanation &&\n renderExplanation(field)}\n \n )}\n />\n }\n />\n );\n case FIELD_TYPES.MULTISELECT:\n return (\n {\n return (\n \n \n \n );\n }}\n />\n );\n case FIELD_TYPES.SELECT:\n return (\n \n isSelectOption(option) && isSelectOption(value)\n ? option.value === value.value\n : option === value\n }\n render={({ onChange, value }) => {\n return (\n \n \n {field.explanation &&\n !invisible &&\n renderExplanation(field)}\n \n );\n }}\n />\n );\n case FIELD_TYPES.NUMBER:\n return (\n {\n return (\n \n {\n onChange(+e.target.value);\n }}\n InputProps={{ inputProps: { min: 0 } }}\n fullWidth={true}\n color={\"accent\"}\n autoComplete={field.autocomplete || \"off\"}\n style={\n invisible\n ? { height: \"0\", opacity: 0 }\n : { marginTop: \"16px\" }\n }\n helperText={getErrorMessage(field)}\n error={Boolean(errors[field.name])}\n />\n {field.explanation &&\n !invisible &&\n renderExplanation(field)}\n \n );\n }}\n />\n );\n case FIELD_TYPES.CURRENCY_AMOUNT:\n return (\n {\n return (\n \n \n {field.explanation &&\n !invisible &&\n renderExplanation(field)}\n \n );\n }}\n />\n );\n case FIELD_TYPES.PASSWORD:\n case FIELD_TYPES.TEXT:\n return (\n {\n return (\n \n {\n onChange(e.target.value);\n }}\n fullWidth={true}\n autoComplete={field.autocomplete || \"off\"}\n color={\"accent\"}\n style={\n invisible\n ? { height: \"0\", opacity: 0 }\n : { marginTop: \"16px\" }\n }\n helperText={getErrorMessage(field)}\n error={Boolean(errors[field.name])}\n />\n {field.explanation &&\n !invisible &&\n renderExplanation(field)}\n \n );\n }}\n />\n );\n case FIELD_TYPES.MULTILINE_TEXT:\n case FIELD_TYPES.LABEL:\n return (\n \n {typeof field.label === \"function\"\n ? field.label(fieldValues)\n : field.label}\n \n );\n case FIELD_TYPES.DATE_PICKER:\n return (\n (\n \n \n {field.explanation && renderExplanation(field)}\n \n )}\n />\n );\n case FIELD_TYPES.DATE_TIME_PICKER:\n return (\n (\n \n \n {field.explanation && renderExplanation(field)}\n \n )}\n />\n );\n\n case FIELD_TYPES.PHONE_NUMBER:\n return (\n {\n return (\n \n \n {field.explanation &&\n !invisible &&\n renderExplanation(field)}\n \n );\n }}\n />\n );\n case FIELD_TYPES.FILE:\n return (\n {\n return (\n \n { onChange(x) }}\n acceptFileTypes={field.acceptFileTypes}\n />\n \n );\n }}\n />\n );\n }\n })}\n \n )}\n \n \n \n {extraButtons &&\n extraButtons.map((buttonProps: FormDialogExtraButton) => {\n return \n {buttonProps.label}\n \n })\n }\n \n \n \n {cancelButtonLabel}\n \n \n {confirmButtonLabel}\n \n \n \n );\n};\n","export const isNumber = (x: unknown): x is number => typeof x === \"number\";\n","import Link, { LinkProps } from \"@mui/material/Link\";\nimport MuiTable from \"@mui/material/Table\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TextField from \"@mui/material/TextField\";\nimport Typography from \"@mui/material/Typography\";\nimport { LinkProps as RouterLinkProps } from \"react-router-dom\";\nimport styled from \"styled-components\";\n\nexport const Container = styled.div`\n margin: ${({ theme }) => theme.spacing(1, 0)};\n box-shadow: 0 0 10px rgba(0,0,0,0.5);\n border-radius: 5px;\n width: 80%;\n`;\n\nexport const Toolbar = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: ${({ theme }) => theme.spacing(1, 2, 1, 2)};\n background-color: ${({ theme }) => theme.palette.secondary.darker};\n border-radius: 5px 5px 0 0;\n`;\n\nexport const SearchTextField = styled(TextField as any)` // TODO: fix types\n margin-left: auto;\n`;\n\nexport const NoDataText = styled(Typography)`\n text-align: center;\n`;\n\nexport const Table = styled(MuiTable)`\n table-layout: fixed;\n background: ${({ theme }) => theme.palette.secondary.main};\n border-radius: 0 0 5px 5px;\n\n & :last-child .MuiTableRow-root:last-child .MuiTableCell-root {\n border-bottom: none;\n }\n`;\n\nexport const TableCellText = styled(Typography)`\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nexport const TableTotalCellText = styled(TableCellText)`\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const ActionsTableCell = styled(TableCell)`\n width: ${({ theme }) => theme.spacing(6)};\n`;\n\nexport const LoaderContainer = styled.div`\n height: ${({ theme }) => theme.spacing(20)};\n`;\n\nexport const TableLink = styled(Link)`\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n display: block;\n`;\n\nexport const TablePagination = styled.div`\n display: flex;\n justify-content: flex-end;\n`;\n","import { ChangeEvent, MouseEvent, ReactElement, ReactNode } from \"react\";\n\nexport enum TABLE_SORTING_TYPES {\n STRING,\n NUMBER,\n DATE\n}\n\nexport type TableColumn = {\n key: string;\n label: string;\n sortingType?: TABLE_SORTING_TYPES;\n};\n\nexport type TypeName = {\n key: string;\n label: string;\n}\n\nexport type TableRowActionsMenuItem = {\n label: string;\n handler: (id: string) => void;\n isDisabled?: (row: any) => boolean;\n};\n\nexport type BacklightTableProperties = {\n [key: string]: {\n conditionFn: (value: any) => string;\n }\n}\n\nexport type TableRowActions = {\n [key: string]: {\n component: string;\n actionFn: any;\n }\n}\n\nexport type TableRowComponents = { [key: string]: ReactElement }[]\n\n\nexport type TableProps = {\n rows: T[];\n columns: TableColumn[];\n totalRow?: { [key in keyof T]: string };\n actions?: TableRowActionsMenuItem[];\n toolbarItems?: ReactNode;\n isLoading?: boolean;\n itemLink?: {\n column: keyof T;\n getURL?: (id: string) => string | undefined;\n isEnabled?: (item: T) => boolean;\n };\n isSearchEnabled?: boolean;\n isSortingEnabled?: boolean;\n isPaginationEnabled?: boolean;\n page?: number;\n rowsPerPage?: number;\n count?: number;\n onChangePage?: (\n event: MouseEvent | null,\n newPage: number\n ) => void;\n onChangeRowsPerPage?: (\n event: ChangeEvent\n ) => void;\n searchString?: string;\n onChangeSearch?: (e: ChangeEvent) => void;\n backlightTableProperties?: BacklightTableProperties;\n tableRowActions?: TableRowActions;\n tableRowComponents?: TableRowComponents;\n rowsData?: any[] | null;\n defaultSortingColumn?: null | { column: string, order: string };\n};\n\nexport enum ORDERS {\n ASC = \"asc\",\n DESC = \"desc\"\n}\n","import MoreVertIcon from \"@mui/icons-material/MoreVert\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Paper from \"@mui/material/Paper\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableFooter from \"@mui/material/TableFooter\";\nimport TableHead from \"@mui/material/TableHead\";\nimport MuiTablePagination from \"@mui/material/TablePagination\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableSortLabel from \"@mui/material/TableSortLabel\";\nimport Box from \"@mui/material/Box\";\nimport Checkbox from \"@mui/material/Checkbox\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { Menu } from \"components/common/Menu\";\nimport {\n ChangeEvent,\n Component,\n FunctionComponent,\n MouseEvent,\n useCallback,\n useRef,\n useState\n} from \"react\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport { isNull } from \"typeGuards/isNull\";\nimport { isNumber } from \"typeGuards/isNumber\";\nimport { isString } from \"typeGuards/isString\";\nimport { isUndefined } from \"typeGuards/isUndefined\";\nimport { ELEMENT_IDS } from \"../../../constants\";\nimport { Loader } from \"../Loader\";\nimport * as s from \"./styles\";\nimport { ORDERS, TableColumn, TableProps, TABLE_SORTING_TYPES } from \"./types\";\nimport { useTranslation } from \"react-i18next\";\nimport { useMount } from \"hooks/useMount\";\n\nconst DEFAULT_ROWS_PER_PAGE_OPTIONS = [5, 10, 25, 100];\n\nexport const Table = ({\n rows,\n rowsData,\n columns,\n actions,\n toolbarItems,\n isLoading,\n itemLink,\n totalRow,\n isSearchEnabled,\n isPaginationEnabled,\n page,\n rowsPerPage,\n onChangePage,\n onChangeRowsPerPage,\n count,\n isSortingEnabled,\n onChangeSearch,\n searchString,\n backlightTableProperties,\n tableRowActions,\n tableRowComponents,\n defaultSortingColumn\n}: TableProps): JSX.Element => {\n const { t } = useTranslation();\n const [isActionsMenuOpened, setIsActionsMenuOpened] =\n useState(false);\n const [sorting, setSorting] = useState<{\n column: string | null;\n order?: ORDERS;\n }>({ column: null });\n const [selectedItemId, setSelectedItemId] = useState(null);\n const [search, setSearch] = useState(\"\");\n\n const selectedItem = !isNull(selectedItemId)\n ? rows.find((row) => row.id === selectedItemId)\n : undefined;\n\n const sortBy = useCallback(\n (column) => () => {\n setSorting({\n column,\n order:\n column !== sorting.column || sorting.order === ORDERS.DESC\n ? ORDERS.ASC\n : ORDERS.DESC\n });\n },\n [sorting]\n );\n\n let sortedRows = rows;\n const sortingColumn = sorting.column;\n\n useMount(() => {\n if (defaultSortingColumn) {\n setSorting({\n column: defaultSortingColumn.column,\n order: ORDERS[defaultSortingColumn.order]\n });\n }\n });\n\n if (sortingColumn) {\n sortedRows = [...rows].sort((a, b) => {\n let aValue = a[sortingColumn];\n let bValue = b[sortingColumn];\n\n const column = columns.find((column) => column.key === sortingColumn);\n if (\n column?.sortingType === TABLE_SORTING_TYPES.DATE &&\n isString(aValue) &&\n isString(bValue)\n ) {\n aValue = new Date(aValue).valueOf();\n bValue = new Date(bValue).valueOf();\n }\n\n if (\n column?.sortingType === TABLE_SORTING_TYPES.NUMBER &&\n isString(aValue) &&\n isString(bValue)\n ) {\n aValue = parseFloat(aValue);\n bValue = parseFloat(bValue);\n }\n\n if (sorting.order === ORDERS.ASC) {\n if (aValue < bValue) {\n return -1;\n }\n if (aValue > bValue) {\n return 1;\n }\n }\n\n if (sorting.order === ORDERS.DESC) {\n if (aValue > bValue) {\n return -1;\n }\n if (aValue < bValue) {\n return 1;\n }\n }\n\n return 0;\n });\n }\n\n const filteredRows = search\n ? sortedRows.filter((row) =>\n columns.some(\n (column) =>\n String(row[column.key])\n .toLowerCase()\n .indexOf(search.toLowerCase()) > -1\n )\n )\n : sortedRows;\n\n const handleSearchChange = useCallback(\n (e: ChangeEvent) => {\n if (onChangeSearch) {\n onChangeSearch(e);\n } else {\n setSearch(e.target.value);\n }\n },\n [onChangeSearch]\n );\n\n const handleActionsMenuButtonClick = useCallback(\n (id: string) => (e: MouseEvent) => {\n actionsMenuButtonRef.current = e.currentTarget;\n setSelectedItemId(id);\n setIsActionsMenuOpened(!isActionsMenuOpened);\n },\n [isActionsMenuOpened]\n );\n\n const handleActionsMenuClose = useCallback(() => {\n setIsActionsMenuOpened(false);\n }, []);\n\n const handleActionsMenuItemClick = useCallback(\n (callback: (id: string) => void) => () => {\n if (selectedItemId) {\n setIsActionsMenuOpened(false);\n callback(selectedItemId);\n }\n },\n [selectedItemId]\n );\n\n const actionsMenuButtonRef = useRef(null);\n\n const rowsPerPageOptions =\n isNumber(rowsPerPage) &&\n Number.isInteger(rowsPerPage) &&\n rowsPerPage > 0 &&\n !DEFAULT_ROWS_PER_PAGE_OPTIONS.includes(rowsPerPage)\n ? [...DEFAULT_ROWS_PER_PAGE_OPTIONS, rowsPerPage].sort((a, b) => a - b)\n : DEFAULT_ROWS_PER_PAGE_OPTIONS;\n\n const menuBoundariesElement = document.getElementById(\n ELEMENT_IDS.CONTENT_CONTAINER\n );\n\n const defineBacklightColor = (key, value) => {\n const obj = backlightTableProperties?.[key];\n if (!obj) return;\n return obj.conditionFn(value);\n };\n\n const getRowData = (id) => {\n if (!rowsData) return null;\n return rowsData.find((row) => row.id === id);\n };\n\n return (\n \n \n {toolbarItems}\n {isSearchEnabled && (\n \n )}\n \n \n \n \n \n {columns.map((column: TableColumn) => (\n \n \n {isSortingEnabled ? (\n \n \n {column.label}\n \n \n ) : (\n \n {column.label}\n \n )}\n \n \n ))}\n {actions && actions.length > 0 && }\n \n \n {!isLoading && (\n <>\n \n {filteredRows.length > 0 ? (\n filteredRows.map((row: any, index: number) => (\n \n {columns.map((column) => {\n return (\n \n {itemLink &&\n (isUndefined(itemLink.isEnabled) ||\n itemLink.isEnabled(row)) &&\n itemLink.getURL &&\n itemLink.column === column.key ? (\n \n {String(row[column.key])}\n \n ) : (\n \n {tableRowActions?.[column.key] && (\n \n tableRowActions?.[column.key]?.actionFn(\n row.id\n )\n }\n color={\"success\"}\n />\n )}\n {tableRowComponents?.[index][column.key] ? (\n tableRowComponents?.[index][column.key]\n ) : (\n <>\n )}\n {row[column.key] != undefined && (\n \n {String(row[column.key])}\n \n )}\n \n )}\n \n );\n })}\n {actions && actions.length && (\n \n {actions.some(\n (action) =>\n !action.isDisabled || !action.isDisabled(row)\n ) && (\n \n \n \n \n \n \n \n )}\n \n )}\n \n ))\n ) : (\n \n \n No data\n \n \n )}\n \n {totalRow && (\n \n \n {columns.map((column) => (\n \n \n {String(totalRow[column.key])}\n \n \n ))}\n \n \n )}\n \n )}\n \n \n {isLoading && (\n \n \n \n )}\n {onChangePage &&\n onChangeRowsPerPage &&\n isPaginationEnabled &&\n rowsPerPage &&\n isNumber(page) &&\n isNumber(count) && (\n \n )}\n \n (selectedItem &&\n action.isDisabled &&\n !action.isDisabled(selectedItem)) ||\n !action.isDisabled\n )\n .map((action) => ({\n label: action.label,\n onClick: handleActionsMenuItemClick(action.handler)\n }))}\n />\n \n );\n};\n","import { useEffect } from \"react\";\n\nexport const useUnmount = (callback: () => void): void => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => callback(), []);\n};\n","import { RootReducer } from \"../../reducers\";\nimport { PaymentMethod, TablePaymentMethod } from \"./types\";\n\nexport const tablePaymentMethodsSelector = (\n state: RootReducer\n): TablePaymentMethod[] | null =>\n state.paymentMethods?.paymentMethodsResponse?.data?.map(\n (paymentMethod: PaymentMethod) => ({\n active: paymentMethod.active,\n balance: paymentMethod.balance,\n created_at: paymentMethod.created_at,\n email: paymentMethod.email,\n external_id: paymentMethod.external_id,\n id: paymentMethod.id,\n name: paymentMethod.name,\n plan_id: paymentMethod.plan_id,\n type: paymentMethod.type,\n start_at: paymentMethod.start_at,\n end_at: paymentMethod.end_at,\n mobile: paymentMethod.mobile\n })\n ) || null;\n\nexport const paymentMethodsTotalPagesSelector = (\n state: RootReducer\n): number | null =>\n state.paymentMethods?.paymentMethodsResponse?.totalPages || null;\n\nexport const paymentMethodSelector = (state: RootReducer): PaymentMethod | null =>\n state.paymentMethods.paymentMethod;\n\nexport const isPaymentMethodCreatingSelector = (state: RootReducer): boolean =>\n state.paymentMethods.isPaymentMethodCreating;\n\nexport const isPaymentMethodUpdatingSelector = (state: RootReducer): boolean =>\n state.paymentMethods.isPaymentMethodUpdating;\n\nexport const isPaymentMethodDeletingSelector = (state: RootReducer): boolean =>\n state.paymentMethods.isPaymentMethodDeleting;\n\nexport const isAddingCreditSelector = (state: RootReducer): boolean =>\n state.paymentMethods.isAddingCredit;\n\nexport const isPaymentMethodLoadingSelector = (state: RootReducer): boolean =>\n state.paymentMethods.isPaymentMethodLoading;\n\nexport const arePaymentMethodsLoadingSelector = (state: RootReducer): boolean =>\n state.paymentMethods.arePaymentMethodsLoading;\n","export enum DIALOG_TYPES {\n CREATE,\n EDIT,\n DELETE,\n IS_ACTIVE,\n ADD_CREDIT\n}\n","import { RootReducer } from \"../../reducers\";\nimport { Plan, TablePlan } from \"./types\";\n\nexport const tablePlansSelector = (state: RootReducer): TablePlan[] | null =>\n state.plans.plans?.map((plan) => ({\n created_at: plan.created_at,\n default_amount: plan.default_amount,\n id: plan.id,\n name: plan.name,\n programs: plan.programs,\n type: plan.type,\n value: plan.value,\n value_type: plan.value_type,\n default: plan.default,\n })) || null;\n\nexport const planSelector = (state: RootReducer): Plan | null =>\n state.plans.plan;\n\nexport const isPlanCreatingSelector = (state: RootReducer): boolean =>\n state.plans.isPlanCreating;\n\nexport const isPlanUpdatingSelector = (state: RootReducer): boolean =>\n state.plans.isPlanUpdating;\n\nexport const isPlanDeletingSelector = (state: RootReducer): boolean =>\n state.plans.isPlanDeleting;\n\nexport const isPlanLoadingSelector = (state: RootReducer): boolean =>\n state.plans.isPlanLoading;\n\nexport const arePlansLoadingSelector = (state: RootReducer): boolean =>\n state.plans.arePlansLoading;\n","import {\n Box,\n MenuItem,\n Stack,\n TextField,\n ToggleButton,\n ToggleButtonGroup\n} from \"@mui/material\";\nimport { FC, useCallback, useEffect, useState } from \"react\";\nimport {\n PayMethodTableFilterFormInterface,\n PayMethodTableFilterParams,\n TransactionsTableFilterFormInterface,\n TransactionsTableFilterParams\n} from \"./types\";\nimport { debounce } from \"lodash\";\nimport { t } from \"i18next\";\nimport { ArrowUpward } from \"@mui/icons-material\";\nimport ArrowDownward from \"@mui/icons-material/ArrowDownward\";\nimport { useTranslation } from \"react-i18next\";\n\nexport const PayMethodTableFilterForm: FC<\n PayMethodTableFilterFormInterface\n> = ({\n tableFilterParams = {\n type: \"\",\n page: 1,\n order_by: \"external_id\",\n sorting_order: \"asc\",\n search: \"\"\n },\n tableColumns,\n typeNames,\n onTableShouldUpdate\n}) => {\n const [filterParamsState, setfilterParamsState] =\n useState(tableFilterParams);\n\n const updateTable = useCallback(\n // debounce table update callback by 500ms because this can potentially\n // be called very often (on user type in search field).\n debounce(() => {\n onTableShouldUpdate(filterParamsState);\n }, 500),\n [filterParamsState]\n );\n\n useEffect(() => {\n updateTable();\n }, [filterParamsState, updateTable]);\n\n return (\n \n {\n // overwrite current filterParamsState with state containing new type name\n return setfilterParamsState({\n ...filterParamsState,\n type: e.target.value\n });\n }}\n >\n \n {t(\"no-filter\")}\n \n {typeNames.map((tn) => (\n \n {tn.label}\n \n ))}\n \n \n \n // overwrite current filterParamsState with state containing new sort_by item\n setfilterParamsState({\n ...filterParamsState,\n order_by: e.target.value\n })\n }\n >\n {tableColumns.map((tc) => (\n \n {tc.label}\n \n ))}\n \n {\n setfilterParamsState({\n ...filterParamsState,\n sorting_order\n });\n }}\n aria-label=\"sorting order\"\n >\n \n \n \n \n \n \n \n \n \n \n // overwrite current filterParamsState with state containing new search string\n setfilterParamsState({\n ...filterParamsState,\n search: e.target.value\n })\n }\n />\n \n \n );\n};\n\nexport const TransactionsTableFilterForm: FC<\n TransactionsTableFilterFormInterface\n> = ({\n tableFilterParams = {\n page: 1,\n station_id: \"\",\n terminal_id: \"\"\n },\n nestedStations,\n onTableShouldUpdate\n}) => {\n const { t, i18n } = useTranslation();\n\n const [filterParamsState, setfilterParamsState] =\n useState(tableFilterParams);\n\n const updateTable = useCallback(\n // debounce table update callback by 500ms because this can potentially\n // be called very often (on user type in search field).\n debounce(() => {\n onTableShouldUpdate(filterParamsState);\n }, 500),\n [filterParamsState]\n );\n\n const getTerminals = () => {\n let terminals = nestedStations[filterParamsState.station_id]?.terminals;\n if (terminals !== undefined) {\n return Object.values(terminals);\n }\n\n terminals = {};\n for (const station of Object.values(nestedStations)) {\n terminals = {\n ...terminals,\n ...station.terminals\n };\n }\n\n return Object.values(terminals);\n };\n\n useEffect(() => {\n updateTable();\n }, [filterParamsState, updateTable]);\n\n return (\n \n \n \n // overwrite current filterParamsState with state containing new sort_by item\n setfilterParamsState({\n ...filterParamsState,\n station_id: e.target.value,\n terminal_id: \"\"\n })\n }\n >\n \n {t(\"no-filter\")}\n \n {Object.entries(nestedStations).map(([stationId, station]) => (\n \n {station.name}\n \n ))}\n \n \n // overwrite current filterParamsState with state containing new sort_by item\n setfilterParamsState({\n ...filterParamsState,\n terminal_id: e.target.value\n })\n }\n >\n \n {t(\"no-filter\")}\n \n {getTerminals().map((terminal) => (\n \n {terminal.name}\n \n ))}\n \n \n \n );\n};\n","import Button from \"@mui/material/Button\";\nimport { FormDialog } from \"components/common/Dialog/FormDialog\";\nimport {\n FIELD_TYPES,\n FormDialogProps\n} from \"components/common/Dialog/FormDialog/types\";\nimport { Table } from \"components/common/Table\";\nimport {\n TableColumn,\n TableRowActionsMenuItem,\n TypeName\n} from \"components/common/Table/types\";\nimport { useMount } from \"hooks/useMount\";\nimport { usePrevious } from \"hooks/usePrevious\";\nimport { useUnmount } from \"hooks/useUnmount\";\nimport * as paymentMethodsActions from \"../../../store/modules/paymentMethods/actions\";\nimport * as plansActions from \"../../../store/modules/plans/actions\";\nimport {\n isAddingCreditSelector,\n isPaymentMethodCreatingSelector,\n isPaymentMethodDeletingSelector,\n isPaymentMethodUpdatingSelector,\n paymentMethodsTotalPagesSelector,\n tablePaymentMethodsSelector\n} from \"../../../store/modules/paymentMethods/selectors\";\nimport { FC, useCallback, useEffect, useState } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { boolean, date, number, string } from \"yup\";\nimport { DIALOG_TYPES } from \"./types\";\nimport { tablePlansSelector } from \"../../../store/modules/plans/selectors\";\nimport { useTranslation } from \"react-i18next\";\nimport { PayMethodTableFilterForm } from \"components/common/TableFilterForm\";\nimport { Pagination } from \"@mui/material\";\nimport { PayMethodTableFilterParams } from \"components/common/TableFilterForm/types\";\nimport {\n GetPaymentMethodsParams,\n TablePaymentMethod\n} from \"src/store/modules/paymentMethods/types\";\nimport moment from \"moment\";\n\nexport const PaymentMethod: FC = () => {\n const { t, i18n } = useTranslation();\n const dispatch = useDispatch();\n const paymentMethods = useSelector(tablePaymentMethodsSelector);\n const totalPages = useSelector(paymentMethodsTotalPagesSelector);\n const plans = useSelector(tablePlansSelector);\n const [dialog, setDialog] = useState<{\n isOpened: boolean;\n type: DIALOG_TYPES;\n }>({ type: DIALOG_TYPES.CREATE, isOpened: false });\n const [searchConfiguration, setSearchConfiguration] =\n useState({\n type: \"\",\n page: 1,\n order_by: \"external_id\",\n sorting_order: \"asc\",\n search: \"\"\n });\n const [selectedItemId, setSelectedItemId] = useState(null);\n const isPaymentMethodCreating = useSelector(isPaymentMethodCreatingSelector);\n const isPaymentMethodUpdating = useSelector(isPaymentMethodUpdatingSelector);\n const isPaymentMethodDeleting = useSelector(isPaymentMethodDeletingSelector);\n const isPaymentMethodAddingCredit = useSelector(isAddingCreditSelector);\n const isOperationInProgress =\n isPaymentMethodCreating ||\n isPaymentMethodUpdating ||\n isPaymentMethodDeleting ||\n isPaymentMethodAddingCredit;\n const previousIsOperationInProgress = usePrevious(isOperationInProgress);\n\n const handleCloseDialog = useCallback(() => {\n setDialog({\n ...dialog,\n isOpened: false\n });\n setSelectedItemId(null);\n }, [dialog]);\n\n const handleCreatePayMethodButtonClick = useCallback(() => {\n setDialog({\n type: DIALOG_TYPES.CREATE,\n isOpened: true\n });\n }, []);\n const handleAddCreditMenuItemClick = useCallback((id: string) => {\n setSelectedItemId(id);\n setDialog({\n type: DIALOG_TYPES.ADD_CREDIT,\n isOpened: true\n });\n }, []);\n const handleEditPayMethodMenuItemClick = useCallback((id: string) => {\n setSelectedItemId(id);\n setDialog({\n type: DIALOG_TYPES.EDIT,\n isOpened: true\n });\n }, []);\n const handleDeletePayMethodMenuItemClick = useCallback((id: string) => {\n setSelectedItemId(id);\n setDialog({\n type: DIALOG_TYPES.DELETE,\n isOpened: true\n });\n }, []);\n const handleConfirmPayMethodActiveMenuItemClick = useCallback(\n (id: string) => {\n setSelectedItemId(id);\n setDialog({\n type: DIALOG_TYPES.IS_ACTIVE,\n isOpened: true\n });\n },\n []\n );\n\n const tableActions: TableRowActionsMenuItem[] = [\n {\n label: t(\"uiComponents.table.actions.add_credit\"),\n handler: handleAddCreditMenuItemClick\n },\n {\n label: t(\"uiComponents.table.actions.edit\"),\n handler: handleEditPayMethodMenuItemClick\n },\n {\n label: t(\"uiComponents.table.actions.delete\"),\n handler: handleDeletePayMethodMenuItemClick\n }\n ];\n\n const localeMap = {\n en: \"en-GB\",\n de: \"de-DE\"\n };\n const parseDate = (utcDate) => {\n if (!utcDate) return \"\";\n else {\n return moment.utc(utcDate).toDate().toLocaleDateString(localeMap[i18n.language], {\n day: \"2-digit\",\n month: \"2-digit\",\n year: \"numeric\"\n });\n }\n };\n const definePlanBalance = ({ type, value_type, balance }) => {\n const isUnlimited = type === \"unlimited\";\n const isCurrency = value_type === \"currency\";\n if (isUnlimited) return \"-\";\n else {\n return isCurrency\n ? `${balance % 100 == 0 ? balance / 100 : (balance / 100).toFixed(2)} €` // add 2 decimal places if the balance is not a flat number\n : balance;\n }\n };\n const tablePaymentMethods = () => {\n if (paymentMethods && plans) {\n const copy = JSON.parse(JSON.stringify(paymentMethods));\n return copy.map((paymentMethod) => {\n const plan = plans?.find((plan) => plan.id === paymentMethod.plan_id);\n return {\n ...paymentMethod,\n ...{\n plan_id: plan?.name,\n start_at: parseDate(paymentMethod.start_at),\n end_at: parseDate(paymentMethod.end_at),\n balance: definePlanBalance({\n type: plan?.type,\n value_type: plan?.value_type,\n balance: paymentMethod?.balance\n }),\n active: paymentMethod?.active\n ? t(\"uiComponents.table.body.active\")\n : t(\"uiComponents.table.body.inactive\")\n },\n // replace the database type key with the translation of the type\n type: filterableTypeNames.find(\n ({ key }) => key === paymentMethod.type\n )?.label\n };\n });\n } else return [];\n };\n const backlightTableProperties = {\n active: {\n conditionFn: (value) => (value ? \"success.main\" : \"error\")\n }\n };\n const tableRowActions = {\n active: {\n component: \"checkbox\", // TODO: use jsx element\n actionFn: handleConfirmPayMethodActiveMenuItemClick\n }\n };\n const tableColumns: TableColumn[] = [\n {\n key: \"type\",\n label: t(\"uiComponents.table.headers.type\")\n },\n {\n key: \"external_id\",\n label: t(\"uiComponents.table.headers.external_id\")\n },\n { key: \"plan_id\", label: t(\"uiComponents.table.headers.plan_id\") },\n { key: \"start_at\", label: t(\"uiComponents.table.headers.start_date\") },\n { key: \"end_at\", label: t(\"uiComponents.table.headers.end_date\") },\n { key: \"balance\", label: t(\"uiComponents.table.headers.balance\") },\n { key: \"name\", label: t(\"uiComponents.table.headers.name\") },\n { key: \"active\", label: t(\"uiComponents.table.headers.is_active\") }\n ];\n\n // adds the sorting order postfix \".asc\" or \".desc\" to the current order_by\n // element. Maps from a TableFilterParams (has sorting_order prop) to a\n // GetPaymentMethodsParams (has no sorting_order prop).\n const addSortingOrder = (\n tableFilterParams: PayMethodTableFilterParams\n ): GetPaymentMethodsParams => ({\n type: tableFilterParams.type,\n order_by: `${tableFilterParams.order_by}.${tableFilterParams.sorting_order}`,\n page: tableFilterParams.page,\n search: tableFilterParams.search\n });\n\n // table column keys/names to be displayed within the \"Sort by\" dropdown\n const sortableTableColumns: TableColumn[] = [\n {\n key: \"external_id\",\n label: t(\"uiComponents.table.headers.external_id\")\n },\n // note that this column has an appended \"_at\"\n { key: \"start_at\", label: t(\"uiComponents.table.headers.start_date\") },\n // note that this column has an appended \"_at\"\n { key: \"end_at\", label: t(\"uiComponents.table.headers.end_date\") },\n { key: \"balance\", label: t(\"uiComponents.table.headers.balance\") },\n { key: \"name\", label: t(\"uiComponents.table.headers.name\") },\n { key: \"active\", label: t(\"uiComponents.table.headers.is_active\") }\n ];\n\n const filterableTypeNames: TypeName[] = [\n {\n key: \"fleetcard\",\n label: t(\"uiComponents.table.headers.type_name.fleetcard\")\n },\n {\n key: \"voucher\",\n label: t(\"uiComponents.table.headers.type_name.voucher\")\n },\n {\n key: \"license_plate\",\n label: t(\"uiComponents.table.headers.type_name.license_plate\")\n },\n {\n key: \"cash\",\n label: t(\"uiComponents.table.headers.type_name.cash\")\n },\n {\n key: \"fingerprint\",\n label: t(\"uiComponents.table.headers.type_name.fingerprint\")\n },\n {\n key: \"mobile\",\n label: t(\"uiComponents.table.headers.type_name.mobile\")\n },\n {\n key: \"card\",\n label: t(\"uiComponents.table.headers.type_name.card\")\n }\n ];\n\n const phoneRegExp = /[0-9]/;\n\n useMount(() => {\n dispatch(\n paymentMethodsActions.getPaymentMethods.started(\n addSortingOrder(searchConfiguration)\n )\n );\n dispatch(plansActions.getPlans.started({}));\n });\n\n useUnmount(() => {\n dispatch(paymentMethodsActions.clear());\n });\n\n useEffect(() => {\n if (previousIsOperationInProgress && !isOperationInProgress) {\n dispatch(\n paymentMethodsActions.getPaymentMethods.started(\n addSortingOrder(searchConfiguration)\n )\n );\n }\n }, [\n previousIsOperationInProgress,\n isOperationInProgress,\n dispatch,\n searchConfiguration\n ]);\n\n useEffect(() => {\n dispatch(\n paymentMethodsActions.getPaymentMethods.started(\n addSortingOrder(searchConfiguration)\n )\n );\n }, [searchConfiguration, dispatch]);\n\n const handleConfirmCreatePayMethod = useCallback(\n (data: {\n active: boolean;\n balance: number;\n created_at: string;\n email: string;\n external_id: string;\n id: string;\n name: string;\n plan_id: number;\n type: string;\n start_at: string;\n end_at: string;\n mobile: string;\n }) => {\n if (data.type === \"voucher\") {\n dispatch(\n paymentMethodsActions.createVoucher.started({\n data: {\n plan_id: data.plan_id,\n start_at: moment(data.start_at).utc().toISOString(),\n end_at: moment(data.end_at).utc().toISOString(),\n email: data.email,\n mobile: data.mobile,\n name: data.name\n }\n })\n );\n } else {\n dispatch(\n paymentMethodsActions.createPaymentMethod.started({\n data: {\n ...data,\n start_at: moment(data.start_at).utc().toISOString(),\n end_at: moment(data.end_at).utc().toISOString()\n }\n })\n );\n }\n\n handleCloseDialog();\n },\n [dispatch, handleCloseDialog]\n );\n const handleConfirmEditPayMethod = useCallback(\n (data: {\n active: boolean;\n balance: number;\n created_at: string;\n email: string;\n external_id: string;\n id: string;\n name: string;\n plan_id: number;\n type: string;\n start_at: string;\n end_at: string;\n mobile: string;\n }) => {\n if (!selectedItemId) {\n return;\n }\n\n dispatch(\n paymentMethodsActions.updatePaymentMethod.started({\n id: selectedItemId,\n data: {\n ...data,\n start_at: moment(data.start_at).utc().toISOString(),\n end_at: moment(data.end_at).utc().toISOString()\n }\n })\n );\n handleCloseDialog();\n },\n [dispatch, selectedItemId, handleCloseDialog]\n );\n const handleConfirmDeletePayMethod = useCallback(() => {\n if (!selectedItemId) {\n return;\n }\n\n dispatch(\n paymentMethodsActions.deletePaymentMethod.started({\n id: selectedItemId\n })\n );\n handleCloseDialog();\n }, [dispatch, selectedItemId, handleCloseDialog]);\n const handleConfirmActivePayMethod = useCallback(() => {\n if (!selectedItemId) {\n return;\n }\n\n const paymentMethod = paymentMethods?.find(\n (paymentMethod) => paymentMethod.id === selectedItemId\n );\n const paymentMethodCopy = JSON.parse(JSON.stringify(paymentMethod));\n paymentMethodCopy.active = !paymentMethod?.active;\n dispatch(\n paymentMethodsActions.updatePaymentMethod.started({\n id: selectedItemId,\n data: paymentMethodCopy\n })\n );\n handleCloseDialog();\n }, [dispatch, selectedItemId, handleCloseDialog]);\n const handleConfirmAddCredit = useCallback(\n (data: { add_balance: number }) => {\n if (!selectedItemId) {\n return;\n }\n\n const paymentMethod = paymentMethods?.find(\n (paymentMethod) => paymentMethod.id === selectedItemId\n );\n if (!paymentMethod) {\n return;\n }\n\n dispatch(\n paymentMethodsActions.addCredit.started({\n id: selectedItemId,\n data: {\n balance: paymentMethod.balance + data.add_balance\n }\n })\n );\n\n handleCloseDialog();\n },\n [dispatch, selectedItemId, handleCloseDialog]\n );\n\n const typeNamesAsValueLabel = () => {\n return filterableTypeNames.map((type) => ({\n label: type.label,\n value: type.key\n }));\n };\n\n const getTypeNameOption = (id) => {\n const plansList = typeNamesAsValueLabel() || [];\n return plansList.find((option) => id === option.value);\n };\n\n const plansListAsValueLabel = () => {\n return plans?.map((plan) => ({ label: plan.name, value: plan.id }));\n };\n const getPlanOption = (id) => {\n const plansList = plansListAsValueLabel() || [];\n return plansList.find((option) => id === option.value);\n };\n\n const dialogProps: {\n [key in DIALOG_TYPES]: Omit;\n } = {\n [DIALOG_TYPES.CREATE]: {\n onConfirm: handleConfirmCreatePayMethod,\n title: t(\"uiComponents.form.titles.create_payment_method\"),\n confirmButtonLabel: t(\"uiComponents.form.actions.create\"),\n fields: [\n {\n name: \"type\",\n type: FIELD_TYPES.SELECT,\n label: \"Type\",\n rules: string().required(),\n options: typeNamesAsValueLabel(),\n invisible: (_) => false\n },\n {\n name: \"external_id\",\n type: FIELD_TYPES.TEXT,\n label: t(\"uiComponents.form.fields.external_id\"),\n rules: string().required(),\n explanation: t(\"uiComponents.form.info.external_id\"),\n invisible: (fieldValues: any) => fieldValues.type == \"voucher\"\n },\n {\n name: \"active\",\n type: FIELD_TYPES.CHECKBOX,\n label: t(\"uiComponents.form.fields.is_active\"),\n defaultValue: true,\n rules: boolean().required(),\n invisible: (_) => true\n },\n {\n name: \"plan_id\",\n type: FIELD_TYPES.SELECT,\n label: t(\"uiComponents.form.fields.plan_id\"),\n rules: string().required(),\n options: plansListAsValueLabel()\n },\n {\n name: \"start_at\",\n type: FIELD_TYPES.DATE_PICKER,\n label: t(\"uiComponents.form.fields.start_date\"),\n rules: string().required(),\n isStartOfTheDay: true,\n maxDate: (target) => target.end_at\n },\n {\n name: \"end_at\",\n type: FIELD_TYPES.DATE_PICKER,\n label: t(\"uiComponents.form.fields.end_date\"),\n rules: string().required(),\n isEndOfTheDay: true,\n minDate: (target) => target.start_at\n },\n {\n name: \"name\",\n type: FIELD_TYPES.TEXT,\n label: t(\"uiComponents.form.fields.name\"),\n rules: string()\n },\n {\n name: \"email\",\n type: FIELD_TYPES.TEXT,\n label: t(\"uiComponents.form.fields.email\"),\n rules: string().email(t(\"uiComponents.form.errorMessages.email\"))\n },\n {\n name: \"mobile\",\n type: FIELD_TYPES.PHONE_NUMBER,\n label: t(\"uiComponents.form.fields.phone_number\"),\n rules: string().matches(phoneRegExp, {\n excludeEmptyString: true,\n message: t(\"uiComponents.form.errorMessages.phone\")\n })\n }\n ]\n },\n [DIALOG_TYPES.EDIT]: {\n onConfirm: handleConfirmEditPayMethod,\n title: t(\"uiComponents.form.titles.edit_payment_method\"),\n confirmButtonLabel: t(\"uiComponents.form.actions.save\"),\n fields: [\n {\n name: \"type\",\n type: FIELD_TYPES.SELECT,\n label: \"Type\",\n defaultValue: paymentMethods?.find(\n (paymentMethod) => paymentMethod.id === selectedItemId\n )?.type,\n rules: string().required(),\n options: typeNamesAsValueLabel()\n },\n {\n name: \"external_id\",\n type: FIELD_TYPES.TEXT,\n label: t(\"uiComponents.form.fields.external_id\"),\n defaultValue:\n paymentMethods?.find(\n (paymentMethod) => paymentMethod.id === selectedItemId\n )?.external_id || \"\",\n rules: string().required(),\n explanation: t(\"uiComponents.form.info.external_id\"),\n invisible: (formFields: any) => formFields.type == \"voucher\"\n },\n {\n name: \"active\",\n type: FIELD_TYPES.CHECKBOX,\n label: t(\"uiComponents.form.fields.is_active\"),\n defaultValue:\n paymentMethods?.find(\n (paymentMethod) => paymentMethod.id === selectedItemId\n )?.active || \"\",\n rules: boolean().required()\n },\n {\n name: \"plan_id\",\n type: FIELD_TYPES.SELECT,\n label: t(\"uiComponents.form.fields.plan_id\"),\n defaultValue:\n paymentMethods?.find(\n (paymentMethod) => paymentMethod.id === selectedItemId\n )?.plan_id,\n rules: string().required(),\n options: plansListAsValueLabel()\n },\n {\n name: \"start_at\",\n type: FIELD_TYPES.DATE_PICKER,\n label: t(\"uiComponents.form.fields.start_date\"),\n defaultValue:\n paymentMethods?.find(\n (paymentMethod) => paymentMethod.id === selectedItemId\n )?.start_at || null,\n rules: date().required(),\n isStartOfTheDay: true,\n maxDate: (target) => target.end_at\n },\n {\n name: \"end_at\",\n type: FIELD_TYPES.DATE_PICKER,\n label: t(\"uiComponents.form.fields.end_date\"),\n defaultValue:\n paymentMethods?.find(\n (paymentMethod) => paymentMethod.id === selectedItemId\n )?.end_at || null,\n rules: date().required(),\n isEndOfTheDay: true,\n minDate: (target) => target.start_at\n },\n {\n name: \"name\",\n type: FIELD_TYPES.TEXT,\n label: t(\"uiComponents.form.fields.name\"),\n defaultValue:\n paymentMethods?.find(\n (paymentMethod) => paymentMethod.id === selectedItemId\n )?.name || \"\",\n rules: string()\n },\n {\n name: \"email\",\n type: FIELD_TYPES.TEXT,\n label: t(\"uiComponents.form.fields.email\"),\n defaultValue:\n paymentMethods?.find(\n (paymentMethod) => paymentMethod.id === selectedItemId\n )?.email || \"\",\n rules: string().email(t(\"uiComponents.form.errorMessages.email\"))\n },\n {\n name: \"mobile\",\n type: FIELD_TYPES.PHONE_NUMBER,\n label: t(\"uiComponents.form.fields.phone_number\"),\n defaultValue:\n paymentMethods?.find(\n (paymentMethod) => paymentMethod.id === selectedItemId\n )?.mobile || \"\",\n rules: string().matches(phoneRegExp, {\n excludeEmptyString: true,\n message: t(\"uiComponents.form.errorMessages.phone\")\n })\n }\n ]\n },\n [DIALOG_TYPES.DELETE]: {\n onConfirm: handleConfirmDeletePayMethod,\n title: t(\"uiComponents.deleteForm.titles.paymentMethod\"),\n confirmButtonLabel: t(\"uiComponents.deleteForm.actions.delete\")\n },\n [DIALOG_TYPES.IS_ACTIVE]: {\n onConfirm: handleConfirmActivePayMethod,\n title: t(\"uiComponents.isActiveDialog.title\"),\n confirmButtonLabel: t(\"uiComponents.isActiveDialog.actions.confirm\")\n },\n [DIALOG_TYPES.ADD_CREDIT]: {\n onConfirm: handleConfirmAddCredit,\n title: t(\"uiComponents.addCreditForm.title\"),\n confirmButtonLabel: t(\"uiComponents.addCreditForm.actions.confirm\"),\n fields: [\n {\n name: \"add_balance\",\n type: FIELD_TYPES.CURRENCY_AMOUNT,\n label: t(\"uiComponents.form.fields.add_credit\"),\n rules: number().required()\n }\n ]\n }\n };\n\n return (\n <>\n \n {t(\"paymentMethodPage.buttons.create_pay_method\")}\n ,\n \n ]}\n />\n , page: number) => {\n setSearchConfiguration({\n ...searchConfiguration,\n page\n });\n }}\n />\n \n \n );\n};\n","export enum DIALOG_TYPES {\n CREATE,\n EDIT,\n DELETE\n}\n","import { RootReducer } from \"../../reducers\";\nimport { Program, TableProgram } from \"./types\";\n\nexport const tableProgramsSelector = (\n state: RootReducer\n): TableProgram[] | null =>\n state.programs.programs?.map((program) => ({\n id: program.id,\n name: program.name,\n created_at: program.created_at,\n external_id: program.external_id,\n code: program.code\n })) || null;\n\nexport const programSelector = (state: RootReducer): Program | null =>\n state.programs.program;\n\nexport const isProgramCreatingSelector = (state: RootReducer): boolean =>\n state.programs.isProgramCreating;\n\nexport const isProgramUpdatingSelector = (state: RootReducer): boolean =>\n state.programs.isProgramUpdating;\n\nexport const isProgramDeletingSelector = (state: RootReducer): boolean =>\n state.programs.isProgramDeleting;\n\nexport const isProgramLoadingSelector = (state: RootReducer): boolean =>\n state.programs.isProgramLoading;\n\nexport const areProgramsLoadingSelector = (state: RootReducer): boolean =>\n state.programs.areProgramsLoading;\n","import Button from \"@mui/material/Button\";\nimport { FormDialog } from \"components/common/Dialog/FormDialog\";\nimport {\n FIELD_TYPES,\n FormDialogProps,\n SelectOption\n} from \"components/common/Dialog/FormDialog/types\";\nimport { Program } from \"../../../store/modules/programs/types\";\nimport { Table } from \"components/common/Table\";\nimport {\n TableColumn,\n TableRowActionsMenuItem\n} from \"components/common/Table/types\";\nimport { useMount } from \"hooks/useMount\";\nimport { usePrevious } from \"hooks/usePrevious\";\nimport { useUnmount } from \"hooks/useUnmount\";\nimport * as plansActions from \"../../../store/modules/plans/actions\";\nimport {\n isPlanCreatingSelector,\n isPlanDeletingSelector,\n isPlanUpdatingSelector,\n tablePlansSelector\n} from \"../../../store/modules/plans/selectors\";\nimport { FC, useCallback, useEffect, useState } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { number, string, array } from \"yup\";\nimport { DIALOG_TYPES } from \"./types\";\nimport { useTranslation } from \"react-i18next\";\nimport { tableProgramsSelector } from \"../../../store/modules/programs/selectors\";\nimport * as programsActions from \"../../../store/modules/programs/actions\";\n\nexport const Plans: FC = () => {\n const { t } = useTranslation();\n const dispatch = useDispatch();\n const plans = useSelector(tablePlansSelector);\n const programs = useSelector(tableProgramsSelector);\n const [dialog, setDialog] = useState<{\n isOpened: boolean;\n type: DIALOG_TYPES;\n }>({ type: DIALOG_TYPES.CREATE, isOpened: false });\n const [selectedItemId, setSelectedItemId] = useState(null);\n const isPlanCreating = useSelector(isPlanCreatingSelector);\n const isPlanUpdating = useSelector(isPlanUpdatingSelector);\n const isPlanDeleting = useSelector(isPlanDeletingSelector);\n const isOperationInProgress =\n isPlanCreating || isPlanUpdating || isPlanDeleting;\n const previousIsOperationInProgress = usePrevious(isOperationInProgress);\n\n const handleCloseDialog = useCallback(() => {\n setDialog({\n ...dialog,\n isOpened: false\n });\n setSelectedItemId(null);\n }, [dialog]);\n\n const handleCreatePlanButtonClick = useCallback(() => {\n setDialog({\n type: DIALOG_TYPES.CREATE,\n isOpened: true\n });\n }, []);\n\n const handleEditPlanMenuItemClick = useCallback((id: string) => {\n setSelectedItemId(id);\n setDialog({\n type: DIALOG_TYPES.EDIT,\n isOpened: true\n });\n }, []);\n\n const handleDeletePlanMenuItemClick = useCallback((id: string) => {\n setSelectedItemId(id);\n setDialog({\n type: DIALOG_TYPES.DELETE,\n isOpened: true\n });\n }, []);\n\n const tableActions: TableRowActionsMenuItem[] = [\n {\n label: t(\"uiComponents.table.actions.edit\"),\n handler: handleEditPlanMenuItemClick\n },\n {\n label: t(\"uiComponents.table.actions.delete\"),\n handler: handleDeletePlanMenuItemClick,\n isDisabled: (plan) => plan?.default\n }\n ];\n\n const tableColumns: TableColumn[] = [\n { key: \"name\", label: t(\"uiComponents.table.headers.name\") },\n { key: \"type\", label: t(\"uiComponents.table.headers.type\") },\n { key: \"value_type\", label: t(\"uiComponents.table.headers.value_type\") },\n { key: \"value\", label: t(\"uiComponents.table.headers.amount\") }\n ];\n\n const typeOptions: SelectOption[] = [\n {\n label: t(\"uiComponents.form.options.planTypeOptions.unlimited\"),\n value: \"unlimited\"\n },\n {\n label: t(\"uiComponents.form.options.planTypeOptions.flat_rate\"),\n value: \"flat-rate\"\n }\n ];\n\n const definePlanValueLabel = ({ type, value_type, value }) => {\n const isUnlimited = type === \"unlimited\";\n const isCurrency = value_type === \"currency\";\n if (isUnlimited) return \"-\";\n else {\n return isCurrency ? `${value / 100} €` : value;\n }\n };\n\n const tableRowsPlansList = () => {\n if (plans) {\n const copy = JSON.parse(JSON.stringify(plans));\n return copy.map((plan) => {\n return {\n ...plan,\n ...{\n type:\n {\n unlimited: t(\n \"uiComponents.form.options.planTypeOptions.unlimited\"\n ),\n \"flat-rate\": t(\n \"uiComponents.form.options.planTypeOptions.flat_rate\"\n )\n }[plan.type] || \"\",\n value: definePlanValueLabel(plan),\n value_type:\n {\n currency: t(\n \"uiComponents.form.options.planValueTypes.currency\"\n ),\n count: t(\"uiComponents.form.options.planValueTypes.count\")\n }[plan.value_type] || \"\",\n highlighted: plan.default\n }\n };\n });\n }\n };\n\n const valueTypes: SelectOption[] = [\n {\n label: t(\"uiComponents.form.options.planValueTypes.currency\"),\n value: \"currency\"\n },\n {\n label: t(\"uiComponents.form.options.planValueTypes.count\"),\n value: \"count\"\n }\n ];\n const getValueType = (id) => {\n return valueTypes.find((option) => id === option.value);\n };\n\n const disabledIfUnlimited = (target: { [key: string]: string }) => {\n return target.type === \"unlimited\";\n };\n\n const disabledIfCurrency = (target: { [key: string]: string }) => {\n return target.value_type === \"currency\";\n };\n\n const typeNumberIfAmountOfWashes = (target: {\n [key: string]: string | any;\n }) => {\n if (\n (target && target?.value_type === \"count\") ||\n (target && target?.value_type?.value === \"count\")\n )\n return FIELD_TYPES.NUMBER;\n else return FIELD_TYPES.CURRENCY_AMOUNT;\n };\n\n useMount(() => {\n dispatch(plansActions.getPlans.started({}));\n dispatch(programsActions.getPrograms.started({}));\n });\n\n useUnmount(() => {\n dispatch(plansActions.clear());\n });\n\n useEffect(() => {\n if (previousIsOperationInProgress && !isOperationInProgress) {\n dispatch(plansActions.getPlans.started({}));\n }\n }, [previousIsOperationInProgress, isOperationInProgress, dispatch]);\n\n const handleConfirmCreatePlan = useCallback(\n (data: {\n created_at: string;\n default_amount: number;\n id: string;\n name: string;\n programs: Program[];\n type: string;\n value: number;\n value_type: string;\n }) => {\n dispatch(\n plansActions.createPlan.started({\n data: { ...data }\n })\n );\n handleCloseDialog();\n },\n [dispatch, handleCloseDialog]\n );\n\n const handleConfirmEditPlan = useCallback(\n (data: {\n created_at: string;\n default_amount: number;\n id: string;\n name: string;\n programs: Program[];\n type: string;\n value: number;\n value_type: string;\n }) => {\n if (selectedItemId) {\n dispatch(\n plansActions.updatePlan.started({\n id: selectedItemId,\n data: { ...data }\n })\n );\n }\n handleCloseDialog();\n },\n [dispatch, selectedItemId, handleCloseDialog]\n );\n\n const handleConfirmDeletePlan = useCallback(() => {\n if (selectedItemId) {\n dispatch(\n plansActions.deletePlan.started({\n id: selectedItemId\n })\n );\n handleCloseDialog();\n }\n }, [dispatch, selectedItemId, handleCloseDialog]);\n\n const programsListAsValueLabel = (programs) => {\n return programs?.map((program) => ({\n label: program.name,\n value: program.id\n }));\n };\n\n const dialogProps: {\n [key in DIALOG_TYPES]: Omit;\n } = {\n [DIALOG_TYPES.CREATE]: {\n onConfirm: handleConfirmCreatePlan,\n title: t(\"uiComponents.form.titles.create_plan\"),\n confirmButtonLabel: t(\"uiComponents.form.actions.create\"),\n fields: [\n {\n name: \"name\",\n type: FIELD_TYPES.TEXT,\n label: t(\"uiComponents.form.fields.name\"),\n rules: string()\n },\n {\n name: \"type\",\n type: FIELD_TYPES.SELECT,\n label: t(\"uiComponents.form.fields.type_id\"),\n options: typeOptions,\n rules: string().required()\n },\n {\n name: \"value_type\",\n type: FIELD_TYPES.SELECT,\n label: t(\"uiComponents.form.fields.value_type\"),\n options: valueTypes,\n rules: string().required(),\n invisible: disabledIfUnlimited,\n payloadValueOfCondition: {\n fn: disabledIfUnlimited,\n payload: { label: \"Currency\", value: \"currency\" }\n }\n },\n {\n name: \"value\",\n type: typeNumberIfAmountOfWashes,\n label: t(\"uiComponents.form.fields.amount\"),\n rules: number().required(),\n invisible: disabledIfUnlimited,\n payloadValueOfCondition: {\n fn: disabledIfUnlimited,\n payload: -1\n }\n },\n {\n name: \"default_amount\",\n type: FIELD_TYPES.CURRENCY_AMOUNT,\n label: t(\"uiComponents.form.fields.default_wash_amount\"),\n rules: number().required(),\n explanation: t(\"uiComponents.form.info.plan_default_amount\"),\n invisible: disabledIfCurrency,\n payloadValueOfCondition: {\n fn: disabledIfCurrency,\n payload: -1\n }\n },\n {\n name: \"programs\",\n type: FIELD_TYPES.MULTISELECT,\n label: t(\"uiComponents.form.fields.programs\"),\n options: programsListAsValueLabel(programs),\n rules: array()\n }\n ]\n },\n [DIALOG_TYPES.EDIT]: {\n onConfirm: handleConfirmEditPlan,\n title: t(\"uiComponents.form.titles.edit_plan\"),\n confirmButtonLabel: t(\"uiComponents.form.actions.save\"),\n fields: [\n {\n name: \"name\",\n type: FIELD_TYPES.TEXT,\n label: t(\"uiComponents.form.fields.name\"),\n rules: string(),\n defaultValue:\n plans?.find((plan) => plan.id === selectedItemId)?.name || \"\"\n },\n {\n name: \"type\",\n type: FIELD_TYPES.SELECT,\n label: t(\"uiComponents.form.fields.type_id\"),\n rules: string().required(),\n options: typeOptions,\n invisible: (_) => true,\n defaultValue: plans?.find((plan) => plan.id === selectedItemId)?.type\n },\n {\n name: \"value_type\",\n type: FIELD_TYPES.SELECT,\n label: t(\"uiComponents.form.fields.value_type\"),\n options: valueTypes,\n rules: string().required(),\n invisible: (_) => true,\n defaultValue: plans?.find((plan) => plan.id === selectedItemId)?.value_type,\n payloadValueOfCondition: {\n fn: disabledIfUnlimited,\n payload: { label: \"Currency\", value: \"currency\" }\n }\n },\n {\n name: \"value\",\n type: typeNumberIfAmountOfWashes,\n label: t(\"uiComponents.form.fields.amount\"),\n rules: number().required(),\n defaultValue:\n plans?.find((plan) => plan.id === selectedItemId)?.value || \"\",\n invisible: disabledIfUnlimited,\n payloadValueOfCondition: {\n fn: disabledIfUnlimited,\n payload: -1\n }\n },\n {\n name: \"default_amount\",\n type: FIELD_TYPES.CURRENCY_AMOUNT,\n label: t(\"uiComponents.form.fields.default_amount\"),\n rules: number().required(),\n explanation: t(\"uiComponents.form.info.plan_default_amount\"),\n defaultValue:\n plans?.find((plan) => plan.id === selectedItemId)?.default_amount ||\n \"\",\n invisible: disabledIfCurrency,\n payloadValueOfCondition: {\n fn: disabledIfCurrency,\n payload: 0.0\n }\n },\n {\n name: \"programs\",\n type: FIELD_TYPES.MULTISELECT,\n label: t(\"uiComponents.form.fields.programs\"),\n options: programsListAsValueLabel(programs),\n rules: array(),\n defaultValue:\n programsListAsValueLabel(\n plans?.find((plan) => plan.id === selectedItemId)?.programs\n ) || \"\"\n }\n ]\n },\n [DIALOG_TYPES.DELETE]: {\n onConfirm: handleConfirmDeletePlan,\n title: t(\"uiComponents.deleteForm.titles.plan\"),\n confirmButtonLabel: t(\"uiComponents.deleteForm.actions.delete\")\n }\n };\n\n return (\n <>\n \n {t(\"plansPage.buttons.create_plan\")}\n \n }\n />\n \n \n );\n};\n","export enum DIALOG_TYPES {\n CREATE,\n EDIT,\n DELETE\n}\n","import Button from \"@mui/material/Button\";\nimport { FormDialog } from \"components/common/Dialog/FormDialog\";\nimport {\n FIELD_TYPES,\n FormDialogProps\n} from \"components/common/Dialog/FormDialog/types\";\nimport { Table } from \"components/common/Table\";\nimport {\n TableColumn,\n TableRowActionsMenuItem\n} from \"components/common/Table/types\";\nimport { useMount } from \"hooks/useMount\";\nimport { usePrevious } from \"hooks/usePrevious\";\nimport { useUnmount } from \"hooks/useUnmount\";\nimport * as programsActions from \"../../../store/modules/programs/actions\";\nimport {\n isProgramCreatingSelector,\n isProgramDeletingSelector,\n isProgramUpdatingSelector,\n tableProgramsSelector\n} from \"../../../store/modules/programs/selectors\";\nimport { TableProgram } from \"../../../store/modules/programs/types\";\nimport { FC, useCallback, useEffect, useState } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { number, string } from \"yup\";\nimport { DIALOG_TYPES } from \"./types\";\nimport { useTranslation } from \"react-i18next\";\n\nexport const Programs: FC = () => {\n const { t } = useTranslation();\n const dispatch = useDispatch();\n const programs = useSelector(tableProgramsSelector);\n const [dialog, setDialog] = useState<{\n isOpened: boolean;\n type: DIALOG_TYPES;\n }>({ type: DIALOG_TYPES.CREATE, isOpened: false });\n const [selectedItemId, setSelectedItemId] = useState(null);\n const isProgramCreating = useSelector(isProgramCreatingSelector);\n const isProgramUpdating = useSelector(isProgramUpdatingSelector);\n const isProgramDeleting = useSelector(isProgramDeletingSelector);\n const isOperationInProgress =\n isProgramCreating || isProgramUpdating || isProgramDeleting;\n const previousIsOperationInProgress = usePrevious(isOperationInProgress);\n\n const handleCloseDialog = useCallback(() => {\n setDialog({\n ...dialog,\n isOpened: false\n });\n setSelectedItemId(null);\n }, [dialog]);\n\n const handleCreateProgramButtonClick = useCallback(() => {\n setDialog({\n type: DIALOG_TYPES.CREATE,\n isOpened: true\n });\n }, []);\n\n const handleEditProgramMenuItemClick = useCallback((id: string) => {\n setSelectedItemId(id);\n setDialog({\n type: DIALOG_TYPES.EDIT,\n isOpened: true\n });\n }, []);\n\n const handleDeleteProgramMenuItemClick = useCallback((id: string) => {\n setSelectedItemId(id);\n setDialog({\n type: DIALOG_TYPES.DELETE,\n isOpened: true\n });\n }, []);\n\n const tableActions: TableRowActionsMenuItem[] = [\n {\n label: t(\"uiComponents.table.actions.edit\"),\n handler: handleEditProgramMenuItemClick,\n isDisabled: () => true\n },\n {\n label: t(\"uiComponents.table.actions.delete\"),\n handler: handleDeleteProgramMenuItemClick\n }\n ];\n\n const tableColumns: TableColumn[] = [\n { key: \"name\", label: t(\"uiComponents.table.headers.name\") },\n { key: \"code\", label: t(\"uiComponents.table.headers.code\") },\n { key: \"external_id\", label: t(\"uiComponents.table.headers.external_id\") }\n ];\n\n useMount(() => {\n dispatch(programsActions.getPrograms.started({}));\n });\n\n useUnmount(() => {\n dispatch(programsActions.clear());\n });\n\n useEffect(() => {\n if (previousIsOperationInProgress && !isOperationInProgress) {\n dispatch(programsActions.getPrograms.started({}));\n }\n }, [previousIsOperationInProgress, isOperationInProgress, dispatch]);\n\n const handleConfirmCreateProgram = useCallback(\n (data: {\n id: string;\n created_at: string;\n code: string;\n external_id: string;\n name: string;\n }) => {\n dispatch(\n programsActions.createProgram.started({\n data: { ...data }\n })\n );\n handleCloseDialog();\n },\n [dispatch, handleCloseDialog]\n );\n\n const handleConfirmEditProgram = useCallback(\n (data: {\n id: string;\n created_at: string;\n code: string;\n external_id: string;\n name: string;\n }) => {\n if (selectedItemId) {\n dispatch(\n programsActions.updateProgram.started({\n id: selectedItemId,\n data: { ...data }\n })\n );\n }\n handleCloseDialog();\n },\n [dispatch, selectedItemId, handleCloseDialog]\n );\n\n const handleConfirmDeleteProgram = useCallback(() => {\n if (selectedItemId) {\n dispatch(\n programsActions.deleteProgram.started({\n id: selectedItemId\n })\n );\n handleCloseDialog();\n }\n }, [dispatch, selectedItemId, handleCloseDialog]);\n\n const dialogProps: {\n [key in DIALOG_TYPES]: Omit;\n } = {\n [DIALOG_TYPES.CREATE]: {\n onConfirm: handleConfirmCreateProgram,\n title: \"Create program\",\n confirmButtonLabel: \"Create\",\n fields: [\n {\n name: \"name\",\n type: FIELD_TYPES.TEXT,\n label: \"Name\",\n rules: string().required()\n },\n {\n name: \"external_id\",\n type: FIELD_TYPES.TEXT,\n label: \"external ID\",\n rules: string().required()\n },\n {\n name: \"code\",\n type: FIELD_TYPES.TEXT,\n label: \"code\",\n rules: string().required()\n },\n {\n name: \"client_id\",\n type: FIELD_TYPES.NUMBER,\n label: \"Client ID\",\n rules: number().required()\n }\n ]\n },\n [DIALOG_TYPES.EDIT]: {\n onConfirm: handleConfirmEditProgram,\n title: \"Edit program\",\n confirmButtonLabel: \"Save\",\n fields: [\n {\n name: \"name\",\n type: FIELD_TYPES.TEXT,\n label: \"Name\",\n defaultValue:\n programs?.find((program) => program.id === selectedItemId)?.name ||\n \"\",\n rules: string().required()\n },\n {\n name: \"code\",\n type: FIELD_TYPES.TEXT,\n label: \"Code\",\n defaultValue:\n programs?.find((program) => program.id === selectedItemId)?.code ||\n \"\",\n rules: string().required()\n },\n {\n name: \"external_id\",\n type: FIELD_TYPES.TEXT,\n label: \"External ID\",\n defaultValue:\n programs?.find((program) => program.id === selectedItemId)\n ?.external_id || \"\",\n rules: string().required()\n }\n ]\n },\n [DIALOG_TYPES.DELETE]: {\n onConfirm: handleConfirmDeleteProgram,\n title: t(\"uiComponents.deleteForm.titles.program\"),\n confirmButtonLabel: t(\"uiComponents.deleteForm.actions.delete\")\n }\n };\n\n return (\n <>\n \n Create Program\n \n }\n />\n \n \n );\n};\n","import {\n FormControl,\n SxProps,\n TextField\n} from \"@mui/material\";\nimport React, { FC } from \"react\";\n\nexport const isIpv4 = /^((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)\\.?\\b){4}$/;\n\nexport const RestoreConfigContext: React.Context<{\n config?: [\n Record,\n React.Dispatch>>\n ];\n carwashConfig?: [\n Record,\n React.Dispatch>>\n ];\n languages?: [\n Record,\n React.Dispatch>>\n ];\n}> = React.createContext({});\n\n\n\nexport const InputField: FC<{\n onBlur: (event: React.FocusEvent) => void;\n name: string;\n label: string;\n sx?: SxProps;\n value?: string;\n fullWidth?: boolean;\n type?: string;\n inputProps?: Record;\n test?: RegExp;\n}> = (props) => {\n const [value, setValue] = React.useState(props.value || \"\");\n\n return (\n \n ) => {\n setValue(event.target.value);\n }}\n onBlur={props.onBlur}\n />\n \n );\n};\n","import {\n Box,\n Button,\n FormControlLabel,\n FormGroup,\n Switch\n} from \"@mui/material\";\nimport React, { FC } from \"react\";\nimport { Buffer } from \"buffer\";\n\nimport { InputField, RestoreConfigContext } from \"./tools\";\n\ninterface Network {\n name: string;\n metric: number;\n dhcp: boolean;\n netmask: string;\n dns: [string, string];\n ip_address: string;\n gateway: string;\n}\n\nexport const GeneralSelection: FC = () => {\n return (\n \n

    General Selection

    \n \n \n \n \n
    \n );\n};\n\nconst NetworkInterfaces: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n\n const [config, setConfig] = restoreConfig.config;\n\n const networkSwitch = config[\"device.network_interfaces\"] ? true : false;\n\n const newInterface: () => Network = () => ({\n name: \"\",\n metric: 0,\n dhcp: true,\n netmask: \"\",\n dns: [\"\", \"\"],\n ip_address: \"\",\n gateway: \"\"\n });\n\n const mainInterface: Network = Array.isArray(\n config[\"device.network_interfaces\"]\n )\n ? config[\"device.network_interfaces\"][0]\n : newInterface();\n\n const secondaryInterfaces: Network[] = Array.isArray(\n config[\"device.network_interfaces\"]\n )\n ? config[\"device.network_interfaces\"].slice(1) // get subarray from second element to end\n : [];\n\n const NetworkInterfaceInput: FC<{\n name: string;\n network: Network;\n onChange: () => void;\n }> = (props) => {\n const [dhcp, setDhcp] = React.useState(props.network.dhcp);\n\n return (\n <>\n
    {props.name}
    \n ) => {\n props.network.name = event.target.value;\n props.onChange();\n }}\n />\n ) => {\n if (event.target.value == \"\") {\n props.network.metric = 0;\n } else {\n props.network.metric = parseInt(event.target.value);\n }\n props.onChange();\n }}\n />\n \n {\n props.network.dhcp = !dhcp;\n setDhcp(!dhcp);\n props.onChange();\n }}\n />\n }\n />\n \n {!dhcp && (\n <>\n ) => {\n props.network.ip_address = event.target.value;\n props.onChange();\n }}\n />\n ) => {\n props.network.netmask = event.target.value;\n props.onChange();\n }}\n />\n ) => {\n props.network.gateway = event.target.value;\n props.onChange();\n }}\n />\n ) => {\n props.network.dns[0] = event.target.value;\n props.onChange();\n }}\n />\n ) => {\n props.network.dns[1] = event.target.value;\n props.onChange();\n }}\n />\n \n )}\n \n );\n };\n\n return (\n <>\n \n Network}\n control={\n {\n if (networkSwitch) {\n delete config[\"device.network_interfaces\"];\n\n setConfig({ ...config });\n } else {\n onChange();\n }\n }}\n />\n }\n />\n \n {networkSwitch && (\n \n \n\n {secondaryInterfaces.map((item, index) => (\n \n \n {\n removeSecondaryInterface(index);\n }}\n >\n Remove Interface\n \n \n ))}\n
    \n \n Create Secondary Interface\n \n
    \n )}\n \n );\n\n // function used in this component\n\n function onChange() {\n config[\"device.network_interfaces\"] = [\n mainInterface,\n ...secondaryInterfaces\n ];\n\n setConfig({ ...config });\n }\n\n function addSecondaryInterface() {\n secondaryInterfaces.push(newInterface());\n onChange();\n }\n\n function removeSecondaryInterface(index: number) {\n secondaryInterfaces.splice(index, 1);\n onChange();\n }\n};\n\nconst CCPServerSettings: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n\n const [config, setConfig] = restoreConfig.config;\n\n const serverSwitch =\n typeof config[\"server.api_key\"] === \"string\" ? true : false;\n\n const api_key =\n typeof config[\"server.api_key\"] === \"string\"\n ? config[\"server.api_key\"]\n : \"\";\n\n const charlieAPI =\n typeof config[\"server.charlie_api_url\"] === \"string\"\n ? config[\"server.charlie_api_url\"]\n : \"\";\n\n const charlieApiDepending = {\n license_plate_fueling: \"api/v1/licenseplate\",\n voucher: \"api/v1/voucher\",\n safedrop: \"api/v1/safedrop/withdraw\",\n voucher_verify: \"api/v1/voucher/verify\",\n fingerprint_check: \"api/v1/fingerprint/check\",\n charliepay_voucher: \"api/v1/charliepay/voucher\",\n cancel_transaction: \"api/v1/transaction/cancel\",\n sensor_alert: \"api/v1/sensorhub/alert\",\n voucher_release: \"api/v1/voucher/release\",\n finish_transaction: \"api/v1/transaction/finish\",\n device_notification: \"api/v2/notification\",\n mail: \"api/v1/email/send\",\n get_voucher: \"api/v2/getvoucher\",\n voucher_discounts: \"api/v1/voucher/discounts\",\n link_license_plate: \"api/v1/voucher/link/licenseplate\",\n fingerprint_register: \"api/v1/fingerprint/register\",\n notification: \"api/v1/notification\",\n heartbeat: \"api/v2/heartbeat\",\n get_voucher_definitions: \"api/v1/voucher/definitions\",\n create_voucher_from_definition: \"api/v1/voucher/create\",\n deactivate_voucher: \"api/v1/voucher/deactivate\"\n };\n\n function deleteServerConfig() {\n Object.keys(config)\n .filter((key) => key.split(\".\")[0] === \"server\")\n .map((key) => delete config[key]);\n\n setConfig({ ...config });\n }\n\n function changeServerConfig(serverConfig: Record) {\n for (const [key, value] of Object.entries(serverConfig)) {\n config[\"server.\" + key] = value;\n }\n\n setConfig({ ...config });\n }\n\n return (\n <>\n \n CCPServer}\n control={\n {\n if (serverSwitch) {\n deleteServerConfig();\n } else {\n changeServerConfig({\n api_key: \"\",\n charlie_api_url: \"\"\n });\n }\n }}\n />\n }\n />\n \n {serverSwitch && (\n \n ) => {\n const serverConfig = {};\n\n serverConfig[\"api_key\"] = event.target.value;\n\n changeServerConfig(serverConfig);\n }}\n />\n ) => {\n const serverConfig = {};\n\n let charlie_api_url: string = event.target.value;\n\n serverConfig[\"charlie_api_url\"] = charlie_api_url;\n\n if (charlie_api_url[charlie_api_url.length - 1] != \"/\") {\n charlie_api_url += \"/\";\n }\n\n // change all setting that need this url...\n for (const [key, value] of Object.entries(charlieApiDepending)) {\n serverConfig[key] = charlie_api_url + value;\n }\n\n changeServerConfig(serverConfig);\n }}\n />\n \n )}\n \n );\n};\n\ninterface LCCConfig {\n base_url: string;\n headers: {\n Authorization: string;\n [x: string]: string;\n };\n external_comit_types: string[];\n ignore_fleetcards: string[];\n article_ids: Record;\n}\n\nconst lccCredentials = { username: \"\", password: \"\" };\n\nconst LCCServerSettings: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n\n const [config, setConfig] = restoreConfig.config;\n\n const serverSwitch: boolean = \"external_server\" in config;\n\n const lccServerConfig = config[\"external_server\"] as LCCConfig;\n\n function createAuthorizationHeader() {\n const encodedCredentials = Buffer.from(\n `${lccCredentials[\"username\"]}:${lccCredentials[\"password\"]}`\n ).toString(\"base64\");\n lccServerConfig[\"headers\"][\"Authorization\"] = `Basic ${encodedCredentials}`;\n\n setConfig({ ...config });\n }\n\n return (\n <>\n \n LCCServer}\n control={\n {\n if (serverSwitch) {\n delete config[\"external_server\"];\n lccCredentials[\"username\"] = \"\";\n lccCredentials[\"password\"] = \"\";\n } else {\n config[\"external_server\"] = {\n base_url: \"https://terminal-api.mytsg.digital/\",\n headers: {\n Authorization: \"Basic xxxxxxxxxx\"\n },\n external_commit_types: [\"card\", \"voucher\"],\n ignore_fleetcards: [\"0801\", \"0102\"],\n article_ids: {\n \"1\": \"125\",\n \"2\": \"251\"\n }\n };\n }\n setConfig({ ...config });\n }}\n />\n }\n />\n \n {serverSwitch && (\n \n ) => {\n lccCredentials[\"username\"] = event.target.value;\n createAuthorizationHeader();\n }}\n />\n ) => {\n lccCredentials[\"password\"] = event.target.value;\n\n createAuthorizationHeader();\n }}\n />\n ) => {\n lccServerConfig[\"base_url\"] = event.target.value;\n\n setConfig({ ...config });\n }}\n />\n \n )}\n \n );\n};\n\nconst LanguageFlagSettings: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.carwashConfig) {\n throw TypeError(\"CarwashConfig not defined in context\");\n }\n\n const [carwashConfig, setCarwashConfig] = restoreConfig.carwashConfig;\n\n const languageFlagSwitch = \"location\" in carwashConfig;\n\n return (\n <>\n \n Language Flag selection}\n control={\n {\n if (languageFlagSwitch) {\n delete carwashConfig[\"location\"];\n } else {\n carwashConfig[\"location\"] = {};\n }\n setCarwashConfig({ ...carwashConfig });\n }}\n />\n }\n />\n \n {languageFlagSwitch && (\n \n There is still the need to select this setting manually. If you want\n to add it, look{\" \"}\n \n here\n \n .\n \n )}\n \n );\n};\n","import {\r\n FormControl,\r\n InputLabel,\r\n MenuItem,\r\n Select,\r\n SelectChangeEvent,\r\n} from \"@mui/material\";\r\nimport React, { FC } from \"react\";\r\n\r\nexport const Dropdown: FC<{\r\n name: string;\r\n label: React.ReactNode;\r\n value: string;\r\n onChange: (event: SelectChangeEvent) => void;\r\n items: Record;\r\n}> = (props) => {\r\n return (\r\n \r\n {props.label}\r\n \r\n {Object.entries(props.items).map(([key, value], index) => (\r\n \r\n {value.name}\r\n \r\n ))}\r\n \r\n \r\n );\r\n};","import {\n Box,\n SelectChangeEvent,\n FormGroup,\n FormControlLabel,\n Switch\n} from \"@mui/material\";\nimport { t } from \"i18next\";\nimport React from \"react\";\nimport { FC } from \"react\";\nimport { InputField, RestoreConfigContext } from \"../tools\";\nimport { Dropdown } from \"components/common/Dropdown\";\n\nexport function SelfwashUnmount(\n config: Record,\n carwashConfig: Record\n) {\n const configKeyDelete = [\n \"selfwash\",\n \"i2c.fake_inputs\",\n \"i2c.external_program_credit\", // bock or christ device\n \"siemens\", // aircontrol\n // credit\n \"i2c.credit_on_duration\",\n \"i2c.credit_off_duration\",\n \"i2c.credit_multiplier\",\n \"i2c.credit_pulse_value\",\n \"i2c.pause_between_programs\",\n \"i2c.max_led_to_accept_coin\" // bock exclusive\n ];\n const carwashConfigKeyDelete = [\n \"base_config.blackscreen_screensaver\", // blackscreen when out of service\n \"base_config.ticket_enabled\", // ticket and delivery note settings\n \"base_config.delivery_note_url\" // ticket and delivery note settings\n ];\n\n for (const key of configKeyDelete) {\n if (key in config) {\n delete config[key];\n }\n }\n\n for (const key of carwashConfigKeyDelete) {\n if (key in carwashConfig) {\n delete carwashConfig[key];\n }\n }\n}\n\nexport const SelfwashDeviceOptions: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n if (!restoreConfig.carwashConfig) {\n throw TypeError(\"CarwashConfig not defined in context\");\n }\n const [carwashConfig, setCarwashConfig] = restoreConfig.carwashConfig;\n\n const manufacturerLabel = t(\n \"restoreConfigToolPage.dropdowns.selectManufacturer\"\n );\n\n const modeLabel = t(\"restoreConfigToolPage.selfwash.mode.selectMode\");\n\n const selfwashConfig = config[\"selfwash\"] as Record;\n\n const mode = selfwashConfig[\"mode\"] || \"\";\n const manufacturer = selfwashConfig[\"manufacturer\"] || \"\";\n const inductionLine = selfwashConfig[\"induction_line\"] || \"\";\n const afterPayPage = selfwashConfig[\"after_pay_page\"] || \"\";\n\n const blackscreenScreensaver =\n (carwashConfig[\"base_config.blackscreen_screensaver\"] as boolean) || false;\n\n const ticketNote = carwashConfig[\"base_config.ticket_enabled\"] ? true : false;\n\n React.useEffect(() => {\n let changedConfig = false;\n\n // manufaturer is either bock or christ\n if ([\"bock\", \"christ\"].filter((el) => manufacturer == el).length === 0) {\n if (\"i2c.external_program_credit\" in config) {\n delete config[\"i2c.external_program_credit\"];\n changedConfig = true;\n }\n } else {\n if (!(\"i2c.external_program_credit\" in config)) {\n config[\"i2c.external_program_credit\"] = true;\n changedConfig = true;\n }\n }\n\n if (manufacturer === \"siemens\") {\n if (selfwashConfig[\"mode\"] !== \"vacuum\") {\n selfwashConfig[\"mode\"] = \"vacuum\";\n changedConfig = true;\n }\n\n if (!config[\"siemens\"]) {\n config[\"siemens\"] = {};\n changedConfig = true;\n }\n } else {\n if (selfwashConfig[\"mode\"] === \"vacuum\") {\n delete selfwashConfig[\"mode\"];\n changedConfig = true;\n }\n\n if (config[\"siemens\"]) {\n delete config[\"siemens\"];\n changedConfig = true;\n }\n }\n\n if (changedConfig) {\n setConfig({ ...config });\n }\n }, [manufacturer]);\n\n // on unmount\n React.useEffect(\n () => () => {\n SelfwashUnmount(config, carwashConfig);\n },\n []\n );\n\n return (\n \n {\n (config[\"selfwash\"] as Record)[\"manufacturer\"] =\n event.target.value;\n\n setConfig({ ...config });\n }}\n items={{\n kärcher: {\n name: \"Kärcher\"\n },\n bock: {\n name: \"Bock\"\n },\n christ: {\n name: \"Christ\"\n },\n siemens: {\n name: \"Aircontrol\"\n }\n }}\n />\n {manufacturer === \"kärcher\" && }\n {manufacturer === \"bock\" && }\n {manufacturer === \"christ\" && }\n {manufacturer === \"siemens\" && config[\"siemens\"] && }\n {manufacturer !== \"siemens\" && (\n {\n (config[\"selfwash\"] as Record)[\"mode\"] =\n event.target.value;\n\n setConfig({ ...config });\n }}\n items={{\n default: {\n name: t(\"restoreConfigToolPage.selfwash.mode.default\")\n },\n preauth: {\n name: t(\"restoreConfigToolPage.selfwash.mode.preauth.name\")\n },\n vacuum: {\n name: \"Vacuum (only available with AirControl)\"\n }\n }}\n />\n )}\n {mode == \"preauth\" && }\n\n \n {\n if (blackscreenScreensaver == false) {\n carwashConfig[\"base_config.blackscreen_screensaver\"] = true;\n } else {\n delete carwashConfig[\"base_config.blackscreen_screensaver\"];\n }\n\n setCarwashConfig({ ...carwashConfig });\n }}\n />\n }\n />\n \n ) => {\n const intValue = parseInt(event.target.value);\n\n if (isNaN(intValue) === false && intValue > 0) {\n carwashConfig[\"base_config.interface_check_timeout\"] = intValue;\n } else {\n delete carwashConfig[\"base_config.interface_check_timeout\"];\n }\n setCarwashConfig({ ...carwashConfig });\n }}\n />\n \n {\n if (ticketNote == false) {\n carwashConfig[\"base_config.ticket_enabled\"] = {\n nfc: \"ticket\",\n voucher: \"ticket\",\n fleetcard: \"note\",\n coin: \"ticket\" //Attention, here is coin, not cash!\n };\n carwashConfig[\"base_config.delivery_note_url\"] =\n \"https://mycharlie.com/transaction/{ticket}/note/\";\n } else {\n delete carwashConfig[\"base_config.ticket_enabled\"];\n delete carwashConfig[\"base_config.delivery_note_url\"];\n }\n\n setCarwashConfig({ ...carwashConfig });\n }}\n />\n }\n />\n \n {ticketNote && (\n \n The Ticket and Delivery Note setting was set to a default value, if\n you want to change it, you have to change it manually for reference\n look{\" \"}\n \n here\n \n .\n \n )}\n {\n if (event.target.value === \"\") {\n delete selfwashConfig[\"induction_line\"];\n } else {\n selfwashConfig[\"induction_line\"] = event.target.value;\n }\n\n setConfig({ ...config });\n }}\n items={{\n \"\": {\n name: \"None\"\n },\n simple: {\n name: \"Simple\"\n },\n presence: {\n name: \"Presence\"\n }\n }}\n />\n \n {\n if (event.target.value === \"\") {\n delete selfwashConfig[\"after_pay_page\"];\n } else {\n selfwashConfig[\"after_pay_page\"] = event.target.value;\n }\n\n setConfig({ ...config });\n }}\n items={{\n \"\": {\n name: \"None\"\n },\n \"enter-email\": {\n name: \"Enter Email\"\n },\n \"vehicle-selection\": {\n name: \"Vehicle Selection\"\n },\n ticket: {\n name: \"Ticket\"\n }\n }}\n />\n \n );\n};\n\nfunction PreAuthAmounts() {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n const keyPrefix = \"auth_amount_\";\n\n const preAuthOptions = [\"voucher\", \"nfc\", \"license_plate\"];\n\n const labels = {\n voucher: t(\"restoreConfigToolPage.selfwash.mode.preauth.amounts.voucher\"),\n nfc: t(\"restoreConfigToolPage.selfwash.mode.preauth.amounts.nfc\"),\n license_plate: t(\n \"restoreConfigToolPage.selfwash.mode.preauth.amounts.license_plate\"\n )\n };\n\n return (\n \n {preAuthOptions.map((item, index) => {\n return (\n )[keyPrefix + item]\n ? (config[\"selfwash\"] as Record)[\n keyPrefix + item\n ].toString()\n : \"\"\n }\n type=\"number\"\n onBlur={(event: React.FocusEvent) => {\n const key = keyPrefix + item;\n const intValue = parseInt(event.target.value);\n\n const c = { ...config };\n\n if (isNaN(intValue) === false) {\n (c[\"selfwash\"] as Record)[key] = intValue;\n } else {\n delete (c[\"selfwash\"] as Record)[key];\n }\n setConfig(c);\n }}\n />\n );\n })}\n \n );\n}\n\nconst KaercherOptions: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n return <>;\n};\n\nconst BockOptions: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n const fakeInputs = (config[\"i2c.fake_inputs\"] as boolean) || false;\n\n return (\n \n \n {\n if (fakeInputs == false) {\n config[\"i2c.fake_inputs\"] = true;\n } else {\n delete config[\"i2c.fake_inputs\"];\n }\n\n setConfig({ ...config });\n }}\n />\n }\n />\n \n ) => {\n const intValue = parseInt(event.target.value);\n\n if (isNaN(intValue) === false && intValue > 0) {\n config[\"i2c.max_led_to_accept_coin\"] = intValue;\n } else {\n delete config[\"i2c.max_led_to_accept_coin\"];\n }\n setConfig({ ...config });\n }}\n />\n \n );\n};\n\nconst ChristOptions: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n return <>;\n};\n\ninterface SiemensConfig {\n mock_sps?: boolean;\n sps_version?: number;\n address: {\n ip: string;\n };\n database: number;\n program_types: {\n [name: string]: number;\n };\n wash_times: {\n [type: string]: {\n [amount: string]: number;\n };\n };\n pulse_amount?: boolean;\n input_bytes: {\n [x: string]: unknown;\n };\n output_bytes: {\n [x: string]: unknown;\n };\n}\n\nconst siemensVersion2DefaultConfig: SiemensConfig = {\n address: {\n ip: \"10.198.2.237\"\n },\n database: 2,\n program_types: {\n default: 1,\n program_4: 2\n },\n wash_times: {\n type_1: {\n amount_50: 130,\n amount_100: 190,\n amount_150: 250,\n amount_200: 330\n },\n type_2: {\n amount_50: 120,\n amount_100: 240,\n amount_150: 480,\n amount_200: 560\n }\n },\n input_bytes: {\n last_byte: 14,\n program_1: {\n amount_50: {\n byte_index: 0,\n bit_index: 0\n },\n amount_100: {\n byte_index: 4,\n bit_index: 0\n },\n amount_150: {\n byte_index: 8,\n bit_index: 0\n },\n amount_200: {\n byte_index: 12,\n bit_index: 0\n }\n },\n program_2: {\n amount_50: {\n byte_index: 0,\n bit_index: 1\n },\n amount_100: {\n byte_index: 4,\n bit_index: 1\n },\n amount_150: {\n byte_index: 8,\n bit_index: 1\n },\n amount_200: {\n byte_index: 12,\n bit_index: 1\n }\n },\n program_3: {\n amount_50: {\n byte_index: 0,\n bit_index: 2\n },\n amount_100: {\n byte_index: 4,\n bit_index: 2\n },\n amount_150: {\n byte_index: 8,\n bit_index: 2\n },\n amount_200: {\n byte_index: 12,\n bit_index: 2\n }\n },\n program_4: {\n amount_50: {\n byte_index: 0,\n bit_index: 3\n },\n amount_100: {\n byte_index: 4,\n bit_index: 3\n },\n amount_150: {\n byte_index: 8,\n bit_index: 3\n },\n amount_200: {\n byte_index: 12,\n bit_index: 3\n }\n }\n },\n output_bytes: {\n last_byte: 26,\n places: {\n program_1: {\n byte_index: 16,\n bit_index: 0\n },\n program_2: {\n byte_index: 16,\n bit_index: 1\n },\n program_3: {\n byte_index: 16,\n bit_index: 2\n },\n program_4: {\n byte_index: 16,\n bit_index: 3\n }\n },\n accept: {\n program_1: {\n byte_index: 24,\n bit_index: 0\n },\n program_2: {\n byte_index: 24,\n bit_index: 1\n },\n program_3: {\n byte_index: 24,\n bit_index: 2\n },\n program_4: {\n byte_index: 24,\n bit_index: 3\n }\n },\n error: {\n program_1: {\n byte_index: 20,\n bit_index: 0\n },\n program_2: {\n byte_index: 20,\n bit_index: 1\n },\n program_3: {\n byte_index: 20,\n bit_index: 2\n },\n program_4: {\n byte_index: 20,\n bit_index: 3\n }\n }\n }\n};\n\nconst siemensSWP5DefaultConfig: SiemensConfig = {\n sps_version: 1,\n address: {\n ip: \"10.198.2.237\"\n },\n database: 2,\n program_types: {\n default: 1,\n program_7: 2,\n program_8: 2\n },\n wash_times: {\n type_1: {\n amount_50: 120,\n amount_100: 240,\n amount_150: 360,\n amount_200: 480\n },\n type_2: {\n amount_50: 120,\n amount_100: 240,\n amount_150: 360,\n amount_200: 480\n }\n },\n pulse_amount: false,\n input_bytes: {\n last_byte: 1,\n program_4: {\n amount_50: {\n byte_index: 2,\n bit_index: 0\n },\n amount_100: {\n byte_index: 2,\n bit_index: 4\n },\n amount_150: {\n byte_index: 3,\n bit_index: 0\n },\n amount_200: {\n byte_index: 3,\n bit_index: 4\n }\n },\n program_5: {\n amount_50: {\n byte_index: 2,\n bit_index: 1\n },\n amount_100: {\n byte_index: 2,\n bit_index: 5\n },\n amount_150: {\n byte_index: 3,\n bit_index: 1\n },\n amount_200: {\n byte_index: 3,\n bit_index: 5\n }\n },\n program_6: {\n amount_50: {\n byte_index: 2,\n bit_index: 2\n },\n amount_100: {\n byte_index: 2,\n bit_index: 6\n },\n amount_150: {\n byte_index: 3,\n bit_index: 2\n },\n amount_200: {\n byte_index: 3,\n bit_index: 6\n }\n },\n program_8: {\n amount_50: {\n byte_index: 2,\n bit_index: 3\n },\n amount_100: {\n byte_index: 2,\n bit_index: 7\n },\n amount_150: {\n byte_index: 3,\n bit_index: 3\n },\n amount_200: {\n byte_index: 3,\n bit_index: 7\n }\n }\n },\n output_bytes: {\n last_byte: 5,\n all_ok: {\n byte_index: 5,\n bit_index: 0\n },\n hour_ok: {\n byte_index: 5,\n bit_index: 1\n },\n program_4: {\n byte_index: 4,\n bit_index: 4\n },\n program_5: {\n byte_index: 4,\n bit_index: 5\n },\n program_6: {\n byte_index: 4,\n bit_index: 6\n },\n program_8: {\n byte_index: 4,\n bit_index: 7\n }\n }\n};\n\nconst siemensSWP6DefaultConfig: SiemensConfig = {\n sps_version: 1,\n address: {\n ip: \"10.198.2.237\"\n },\n database: 2,\n program_types: {\n default: 1,\n program_7: 2,\n program_8: 2\n },\n wash_times: {\n type_1: {\n amount_50: 120,\n amount_100: 240,\n amount_150: 360,\n amount_200: 480\n },\n type_2: {\n amount_50: 120,\n amount_100: 240,\n amount_150: 360,\n amount_200: 480\n }\n },\n pulse_amount: false,\n input_bytes: {\n last_byte: 1,\n program_4: {\n amount_50: {\n byte_index: 2,\n bit_index: 0\n },\n amount_100: {\n byte_index: 2,\n bit_index: 4\n },\n amount_150: {\n byte_index: 3,\n bit_index: 0\n },\n amount_200: {\n byte_index: 3,\n bit_index: 4\n }\n },\n program_5: {\n amount_50: {\n byte_index: 2,\n bit_index: 1\n },\n amount_100: {\n byte_index: 2,\n bit_index: 5\n },\n amount_150: {\n byte_index: 3,\n bit_index: 1\n },\n amount_200: {\n byte_index: 3,\n bit_index: 5\n }\n },\n program_6: {\n amount_50: {\n byte_index: 2,\n bit_index: 2\n },\n amount_100: {\n byte_index: 2,\n bit_index: 6\n },\n amount_150: {\n byte_index: 3,\n bit_index: 2\n },\n amount_200: {\n byte_index: 3,\n bit_index: 6\n }\n },\n program_8: {\n amount_50: {\n byte_index: 2,\n bit_index: 3\n },\n amount_100: {\n byte_index: 2,\n bit_index: 7\n },\n amount_150: {\n byte_index: 3,\n bit_index: 3\n },\n amount_200: {\n byte_index: 3,\n bit_index: 7\n }\n }\n },\n output_bytes: {\n last_byte: 5,\n all_ok: {\n byte_index: 5,\n bit_index: 0\n },\n hour_ok: {\n byte_index: 5,\n bit_index: 1\n },\n program_4: {\n byte_index: 4,\n bit_index: 4\n },\n program_5: {\n byte_index: 4,\n bit_index: 5\n },\n program_6: {\n byte_index: 4,\n bit_index: 6\n },\n program_8: {\n byte_index: 4,\n bit_index: 7\n }\n }\n};\n\nconst SiemensOptions: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n const siemensConfig = config[\"siemens\"] as SiemensConfig;\n\n const version: string = siemensConfig[\"sps_version\"]\n ? siemensConfig[\"sps_version\"].toString()\n : \"\";\n\n const device =\n siemensConfig === siemensVersion2DefaultConfig\n ? \"\"\n : siemensConfig === siemensSWP6DefaultConfig\n ? \"swp6\"\n : siemensConfig === siemensSWP5DefaultConfig\n ? \"swp5\"\n : \"\";\n\n React.useEffect(() => {\n let configChanged;\n if (!siemensConfig[\"sps_version\"]) {\n if (config[\"siemens\"] !== siemensVersion2DefaultConfig) {\n config[\"siemens\"] = siemensVersion2DefaultConfig;\n configChanged = true;\n }\n } else {\n if (config[\"siemens\"] === siemensVersion2DefaultConfig) {\n config[\"siemens\"] = {\n version: siemensConfig[\"sps_version\"]\n };\n configChanged = true;\n }\n }\n if (configChanged) {\n setConfig({ ...config });\n }\n }, []);\n\n return (\n \n {\n const intValue = parseInt(event.target.value);\n if (isNaN(intValue)) {\n config[\"siemens\"] = siemensVersion2DefaultConfig;\n } else {\n config[\"siemens\"] = {};\n (config[\"siemens\"] as SiemensConfig)[\"sps_version\"] = intValue;\n }\n setConfig({ ...config });\n }}\n items={{\n 1: {\n name: \"Version 1\"\n },\n \"\": {\n name: \"Version 2 (default)\"\n }\n }}\n />\n {siemensConfig[\"sps_version\"] === 1 && (\n \n {\n if (event.target.value === \"swp5\") {\n config[\"siemens\"] = siemensSWP5DefaultConfig;\n } else if (event.target.value === \"swp6\") {\n config[\"siemens\"] = siemensSWP6DefaultConfig;\n }\n setConfig({ ...config });\n }}\n items={{\n swp5: {\n name: \"SWP 5\"\n },\n swp6: {\n name: \"SWP 6\"\n }\n }}\n />\n \n )}\n \n {\n // on change the value of state is the same as before so I have to check if the new state, that is set afterwards will have the correct value\n if (siemensConfig[\"mock_sps\"]) {\n delete siemensConfig[\"mock_sps\"];\n } else {\n siemensConfig[\"mock_sps\"] = true;\n }\n\n setConfig({ ...config });\n }}\n />\n }\n />\n \n \n );\n};\n\nconst CreditOptions: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n return (\n <>\n

    \n Credit(\n \n Documentation\n \n )\n

    \n \n ) => {\n const intValue = parseInt(event.target.value);\n\n if (isNaN(intValue) === false && intValue > 0) {\n config[\"i2c.credit_on_duration\"] = intValue;\n } else {\n delete config[\"i2c.credit_on_duration\"];\n }\n setConfig({ ...config });\n }}\n />\n ) => {\n const intValue = parseInt(event.target.value);\n\n if (isNaN(intValue) === false && intValue > 0) {\n config[\"i2c.credit_off_duration\"] = intValue;\n } else {\n delete config[\"i2c.credit_off_duration\"];\n }\n setConfig({ ...config });\n }}\n />\n
    \n ) => {\n const intValue = parseInt(event.target.value);\n\n if (isNaN(intValue) === false && intValue > 0) {\n config[\"i2c.credit_multiplier\"] = intValue;\n } else {\n delete config[\"i2c.credit_multiplier\"];\n }\n setConfig({ ...config });\n }}\n />\n ) => {\n const intValue = parseInt(event.target.value);\n\n if (isNaN(intValue) === false && intValue > 0) {\n config[\"i2c.credit_pulse_value\"] = intValue;\n } else {\n delete config[\"i2c.credit_pulse_value\"];\n }\n setConfig({ ...config });\n }}\n />\n \n {\n if (!config[\"i2c.pause_between_programs\"]) {\n config[\"i2c.pause_between_programs\"] = true;\n } else {\n delete config[\"i2c.pause_between_programs\"];\n }\n\n setConfig({ ...config });\n }}\n />\n }\n />\n \n This are not all credit configurations, the rest is needed to be\n included manually, at the moment. Look{\" \"}\n \n here\n {\" \"}\n for reference.\n
    \n \n );\n};\n","import {\n Box,\n FormControlLabel,\n FormGroup,\n SelectChangeEvent,\n Switch\n} from \"@mui/material\";\nimport { t } from \"i18next\";\nimport React, { FC } from \"react\";\nimport { InputField, RestoreConfigContext } from \"../tools\";\nimport { SelfwashDeviceOptions, SelfwashUnmount } from \"./SelfwashSelection\";\nimport { Dropdown } from \"components/common/Dropdown\";\n\nconst deviceUnmounts: {\n [x: string]: (\n config: Record,\n carwashConfig: Record\n ) => void;\n} = {\n selfwash: SelfwashUnmount,\n carwash: CarwashUnmount,\n voucherpay: VoucherPayUnmount,\n cr214_api: PrinterLCPUnmount\n};\n\nexport const DeviceSelection: FC<{\n device: [string, React.Dispatch>];\n}> = (props) => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n\n if (!restoreConfig.carwashConfig) {\n throw TypeError(\"Carwash Config not defined in context\");\n }\n\n const [device, setDevice] = props.device;\n const [config, setConfig] = restoreConfig.config;\n const [carwashConfig] = restoreConfig.config;\n\n return (\n <>\n \n

    Device Selection

    \n {\n if (device !== \"\") {\n deviceUnmounts[device](config, carwashConfig);\n }\n\n if (event.target.value != \"\") {\n config[event.target.value] = { active: true };\n }\n\n setDevice(event.target.value);\n setConfig({ ...config });\n }}\n items={{\n \"\": { name: t(\"restoreConfigToolPage.dropdowns.selectDevice\") },\n selfwash: { name: \"Selfwash\" },\n carwash: { name: \"Carwash (web-api)\" },\n voucherpay: { name: \"Voucherpay\" },\n cr214_api: { name: \"PrinterLCP\" }\n }}\n />\n \n
    \n \n );\n\n function ShowDeviceOptions() {\n switch (device) {\n case \"selfwash\":\n return ;\n case \"carwash\":\n return ;\n case \"voucherpay\":\n return ;\n case \"cr214_api\":\n return ;\n default:\n return <>;\n }\n }\n};\n\nfunction CarwashUnmount(\n config: Record,\n carwashConfig: Record\n) {\n delete config[\"carwash\"];\n}\n\nconst CarwashDeviceOptions: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n if (!restoreConfig.carwashConfig) {\n throw TypeError(\"CarwashConfig not defined in context\");\n }\n\n const [config, setConfig] = restoreConfig.config;\n const [carwashConfig, setCarwashConfig] = restoreConfig.carwashConfig;\n\n const configCarwash: Record = config[\"carwash\"] as Record<\n string,\n unknown\n >;\n\n const mode = (configCarwash[\"mode\"] as string) || \"\";\n const version = (configCarwash[\"webapi_version\"] as string) || \"\";\n\n const queue_size = configCarwash[\"queue_size\"]\n ? (configCarwash[\"queue_size\"] as number).toString()\n : \"\";\n\n const simulator = (configCarwash[\"simulator\"] as boolean) || false;\n const url = (configCarwash[\"url\"] as string) || \"\";\n const auth = (configCarwash[\"auth\"] as string) || \"\";\n\n const vehicleRestrictions = carwashConfig[\"vehicle_restrictions\"]\n ? true\n : false;\n\n return (\n \n {\n if (event.target.value === \"\") {\n delete configCarwash[\"webapi_version\"];\n } else {\n configCarwash[\"webapi_version\"] = event.target.value;\n }\n\n setConfig({ ...config });\n }}\n items={{\n \"\": {\n name: \"Default\"\n },\n v1: {\n name: \"Version 1.x.x\"\n },\n v2: {\n name: \"Version 2.x.x\"\n }\n }}\n />\n {\n configCarwash[\"mode\"] = event.target.value;\n\n setConfig({ ...config });\n }}\n items={{\n drive_in: {\n name: \"Drive In (you can decide if you stay of you go out)\"\n },\n drive_in_out: {\n name: \"Drive In (you have to go out of the car)\"\n },\n drive_in_stay: {\n name: \"Drive In (you have to stay in the car)\"\n },\n get_out: {\n name: \"Get Out (you have to go out of the car)\"\n }\n }}\n />\n ) => {\n const intValue = parseInt(event.target.value);\n\n if (isNaN(intValue) === false) {\n if (intValue > 0) {\n configCarwash[\"queue_size\"] = intValue;\n setConfig({ ...config });\n } else {\n alert(\"Queue Size has to be greater or equal to 1\");\n }\n } else {\n delete configCarwash[\"queue_size\"];\n setConfig({ ...config });\n }\n }}\n />\n \n {\n // on change the value of state is the same as before so I have to check if the new state, that is set afterwards will have the correct value\n if (simulator == false) {\n configCarwash[\"simulator\"] = true;\n configCarwash[\"url\"] = \"http://localhost/carwash-simulator\";\n configCarwash[\"auth\"] = \"\";\n } else {\n delete configCarwash[\"simulator\"];\n delete configCarwash[\"url\"];\n delete configCarwash[\"auth\"];\n }\n\n setConfig({ ...config });\n }}\n />\n }\n />\n \n {simulator === false && (\n <>\n ) => {\n if (event.target.value != \"\") {\n configCarwash[\"url\"] = event.target.value;\n } else {\n delete configCarwash[\"url\"];\n }\n setConfig({ ...config });\n }}\n />\n ) => {\n if (event.target.value != \"\") {\n configCarwash[\"auth\"] = event.target.value;\n } else {\n delete configCarwash[\"auth\"];\n }\n setConfig({ ...config });\n }}\n />\n \n )}\n\n \n {\n // on change the value of state is the same as before so I have to check if the new state, that is set afterwards will have the correct value\n if (vehicleRestrictions == false) {\n carwashConfig[\"vehicle_restrictions\"] = [];\n } else {\n delete carwashConfig[\"vehicle_restrictions\"];\n }\n\n setConfig({ ...config });\n }}\n />\n }\n />\n \n {vehicleRestrictions === true && (\n \n This config is not available right now, please add it yourself\n manually.\n
    \n \n Documentation\n \n
    \n )}\n
    \n );\n};\n\nfunction VoucherPayUnmount(\n config: Record,\n carwashConfig: Record\n) {\n delete config[\"voucherpay\"];\n}\n\nconst VoucherPayDeviceOptions: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n // on mount\n React.useEffect(() => {\n if (!config[\"voucherpay\"]) {\n return;\n }\n if (!(config[\"voucherpay\"] as Record)[\"service\"]) {\n (config[\"voucherpay\"] as Record)[\"service\"] = \"ccp\";\n setConfig({ ...config });\n }\n }, []);\n\n return <>;\n};\n\nfunction PrinterLCPUnmount(\n config: Record,\n carwashConfig: Record\n) {\n delete config[\"cr214_api\"];\n\n Object.keys(config)\n .filter((key) => key.split(\".\")[0] === \"restaurant_printer\")\n .map((key) => delete config[key]);\n}\n\nconst PrinterLCPDeviceOptions: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n React.useEffect(() => {\n let configChanged = false;\n if (!(\"server.get_voucher_definitions\" in config)) {\n config[\"server.get_voucher_definitions\"] =\n \"https://charlie.tokheimsolutions.com/api/v1/voucher/definitions\";\n configChanged = true;\n }\n\n if (!(\"server.create_voucher_from_definition\" in config)) {\n config[\"server.create_voucher_from_definition\"] =\n \"https://charlie.tokheimsolutions.com/api/v1/voucher/create\";\n configChanged = true;\n }\n\n if (!(\"server.deactivate_voucher\" in config)) {\n config[\"server.deactivate_voucher\"] =\n \"https://charlie.tokheimsolutions.com/api/v1/voucher/deactivate\";\n configChanged = true;\n }\n\n if (configChanged) {\n setConfig({ ...config });\n }\n }, []);\n\n return (\n \n ) => {\n config[\"restaurant_printer.logo\"] = event.target.value;\n\n if (event.target.value == \"\") {\n delete config[\"restaurant_printer.logo\"];\n }\n\n setConfig({ ...config });\n }}\n />\n ) => {\n config[\"restaurant_printer.suffix_text\"] = event.target.value;\n\n if (event.target.value == \"\") {\n delete config[\"restaurant_printer.suffix_text\"];\n }\n\n setConfig({ ...config });\n }}\n />\n \n );\n};\n","import {\n Box,\n Button,\n FormControlLabel,\n FormGroup,\n SelectChangeEvent,\n Switch,\n useTheme\n} from \"@mui/material\";\nimport { DragDropContext, Droppable, Draggable } from \"react-beautiful-dnd\";\nimport { t } from \"i18next\";\nimport React, { FC } from \"react\";\nimport { InputField, isIpv4, RestoreConfigContext } from \"./tools\";\nimport { Dropdown } from \"components/common/Dropdown\";\n\ninterface FeigTerminalConfig {\n device: string;\n protocol: string;\n communication: {\n type: string;\n settings: {\n address: string;\n port: number;\n use_ssl: boolean;\n };\n };\n}\n\ninterface BigBrotherLicensePlateConfig {\n active: boolean;\n api_url_prefix: string;\n license_plate_verify?: string;\n license_plate_discounts?: string;\n camera_check?: string;\n inform_status?: string;\n heartbeat?: string;\n simulator?: {\n active: boolean;\n license_plate: string;\n license_plate_country: string;\n license_plate_confidence: number;\n license_plate_country_confidence: number;\n };\n}\n\ninterface DropdownItems {\n [key: string]: { name: string; value: unknown };\n}\n\ninterface ExtendedCoinAcceptor {\n tokens: Record;\n remove_coins: string[];\n}\n\nexport const PaymentSelection: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n\n const [config, setConfig] = restoreConfig.config;\n\n const paymentItems: Record = {\n coin_acceptor: {\n \"\": {\n name: \"None\",\n value: undefined\n },\n simple: {\n name: \"Simple\",\n value: true\n },\n extended: {\n name: \"Extended\",\n value: {\n tokens: {},\n remove_coins: []\n }\n }\n },\n nfc: {\n \"\": {\n name: \"None\",\n value: undefined\n },\n payter: {\n name: \"Payter\",\n value: true\n },\n feigcvend: {\n name: \"Feig Reader\",\n value: {\n device: \"feigcvend\",\n protocol: \"ZVT\",\n communication: {\n type: \"TCP\",\n settings: {\n address: \"\",\n port: 22001,\n use_ssl: true\n }\n }\n }\n }\n },\n voucher: {\n \"\": {\n name: \"None\",\n value: undefined\n },\n voucher: {\n name: \"Voucher\",\n value: true\n }\n },\n license_plate: {\n \"\": {\n name: \"None\",\n value: undefined\n },\n license_plate: {\n name: t(\"restoreConfigToolPage.payment.license_plate\"),\n value: {\n active: true,\n license_plate_verify: \"\",\n license_plate_discounts: \"\",\n api_url_prefix: \"\"\n }\n }\n },\n fleetcards: {\n \"\": {\n name: \"None\",\n value: undefined\n },\n fleetcards: {\n name: \"Fleetcards\",\n value: {}\n }\n }\n };\n\n function handleOnChange(event: SelectChangeEvent, deviceTyp: string) {\n delete config[\"payment.\" + deviceTyp];\n if (event.target.value != \"\") {\n config[\"payment.\" + deviceTyp] =\n paymentItems[deviceTyp][event.target.value].value;\n }\n\n setConfig({ ...config });\n }\n\n return (\n <>\n \n

    Payment Selection

    \n \n handleOnChange(event, \"coin_acceptor\")\n }\n />\n handleOnChange(event, \"nfc\")}\n />\n {\n delete config[\"fleetcards\"];\n if (event.target.value != \"\") {\n config[\"fleetcards\"] =\n paymentItems[\"fleetcards\"][event.target.value].value;\n }\n\n setConfig({ ...config });\n }}\n />\n \n handleOnChange(event, \"voucher\")\n }\n />\n \n handleOnChange(event, \"license_plate\")\n }\n />\n
    \n \n \n );\n};\n\nconst CoinAcceptorOption: FC<{\n onChange: (event: SelectChangeEvent) => void;\n dropdownItems: DropdownItems;\n}> = (props) => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n let initCoinAcceptor = \"\";\n if (config[\"payment.coin_acceptor\"]) {\n if (config[\"payment.coin_acceptor\"] === true) {\n initCoinAcceptor = \"simple\";\n } else {\n initCoinAcceptor = \"extended\";\n }\n }\n\n const [coinAcceptor, setCoinAcceptor] = React.useState(initCoinAcceptor);\n\n const coinAcceptorConfig: ExtendedCoinAcceptor = config[\n \"payment.coin_acceptor\"\n ] as ExtendedCoinAcceptor;\n\n return (\n <>\n {\n setCoinAcceptor(event.target.value);\n\n props.onChange(event);\n }}\n items={props.dropdownItems}\n />\n {/* Extended CoinAcceptor config */}\n {coinAcceptor === \"extended\" && (\n \n \n Confluence Page\n \n\n {/* TOKENS */}\n <>\n
    Tokens
    \n {Object.entries(coinAcceptorConfig[\"tokens\"]).map(\n ([key, value], index) => {\n return (\n
    \n ) => {\n if (event.target.value === key) {\n // key didn't get changed so there is nothing todo\n return;\n }\n if (\n event.target.value in coinAcceptorConfig[\"tokens\"]\n ) {\n alert(\n \"This token is already configured choose an other name or change the other one.\"\n );\n return;\n }\n\n coinAcceptorConfig[\"tokens\"][event.target.value] =\n coinAcceptorConfig[\"tokens\"][key];\n delete coinAcceptorConfig[\"tokens\"][key];\n\n setConfig({ ...config });\n }}\n />\n ) => {\n const intValue = parseInt(event.target.value);\n if (isNaN(intValue) || intValue < 0) {\n alert(\n \"This item has to be a positive integer number\"\n );\n return;\n }\n\n if (intValue === coinAcceptorConfig[\"tokens\"][key]) {\n // value didn't get changed so there is nothing todo\n return;\n }\n\n coinAcceptorConfig[\"tokens\"][key] = intValue;\n\n setConfig({ ...config });\n }}\n />\n {\n delete coinAcceptorConfig[\"tokens\"][key];\n setConfig({ ...config });\n }}\n >\n Remove Token\n \n
    \n
    \n );\n }\n )}\n ) => {\n if (event.target.value in coinAcceptorConfig[\"tokens\"]) {\n alert(\n \"This token is already configured choose an other name or change the other one.\"\n );\n return;\n }\n\n if (event.target.value !== \"\") {\n coinAcceptorConfig[\"tokens\"][event.target.value] = 0;\n }\n\n setConfig({ ...config });\n }}\n />\n \n\n {/* REMOVE COINS */}\n <>\n
    Remove Coins
    \n {coinAcceptorConfig[\"remove_coins\"].map((value, index) => {\n return (\n
    \n ) => {\n if (\n event.target.value ===\n coinAcceptorConfig[\"remove_coins\"][index]\n ) {\n // value didn't get changed so there is nothing todo\n return;\n }\n\n coinAcceptorConfig[\"remove_coins\"][index] =\n event.target.value;\n\n setConfig({ ...config });\n }}\n />\n {\n coinAcceptorConfig[\"remove_coins\"].splice(index, 1);\n setConfig({ ...config });\n }}\n >\n Remove from Removed Coins\n \n
    \n
    \n );\n })}\n ) => {\n if (\n coinAcceptorConfig[\"remove_coins\"].filter(\n (item) => item === event.target.value\n ).length > 0\n ) {\n alert(\"This coin is already removed\");\n return;\n }\n\n if (event.target.value !== \"\") {\n coinAcceptorConfig[\"remove_coins\"].push(event.target.value);\n }\n\n setConfig({ ...config });\n }}\n />\n \n
    \n )}\n \n );\n};\n\nconst ContactlessPaymentOption: FC<{\n onChange: (event: SelectChangeEvent) => void;\n dropdownItems: DropdownItems;\n}> = (props) => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n let initNfc = \"\";\n if (config[\"payment.nfc\"]) {\n if (config[\"payment.nfc\"] === true) {\n initNfc = \"payter\";\n } else {\n initNfc = \"feigcvend\";\n }\n }\n\n const [nfc, setNfc] = React.useState(initNfc);\n\n return (\n <>\n {\n setNfc(event.target.value);\n\n props.onChange(event);\n }}\n items={props.dropdownItems}\n />\n {/* Feig IP input */}\n {nfc === \"feigcvend\" && (\n \n ) => {\n // validating a ipv4 adress with regex\n // https://stackoverflow.com/questions/5284147/validating-ipv4-addresses-with-regexp\n if (isIpv4.test(event.target.value)) {\n (config[\"payment.nfc\"] as FeigTerminalConfig)[\"communication\"][\n \"settings\"\n ][\"address\"] = event.target.value;\n\n setConfig({ ...config });\n }\n }}\n />\n ) => {\n let intValue: number;\n if (event.target.value == \"\") {\n intValue = 22001; // default feig terminal port\n } else {\n intValue = parseInt(event.target.value);\n }\n\n if (isNaN(intValue) === false) {\n (config[\"payment.nfc\"] as FeigTerminalConfig)[\"communication\"][\n \"settings\"\n ][\"port\"] = intValue;\n\n setConfig({ ...config });\n }\n }}\n />\n \n )}\n \n );\n};\n\nconst VoucherPaymentOption: FC<{\n onChange: (event: SelectChangeEvent) => void;\n dropdownItems: DropdownItems;\n}> = (props) => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const config = restoreConfig.config[0];\n\n let initVoucher = \"\";\n if (config[\"payment.voucher\"]) {\n if (config[\"payment.voucher\"] === true) {\n initVoucher = \"voucher\";\n }\n }\n const [voucher, setVoucher] = React.useState(initVoucher);\n return (\n <>\n {\n setVoucher(event.target.value);\n\n props.onChange(event);\n }}\n items={props.dropdownItems}\n />\n \n );\n};\n\nconst LicensePlateOption: FC<{\n onChange: (event: SelectChangeEvent) => void;\n dropdownItems: DropdownItems;\n}> = (props) => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n const [config, setConfig] = restoreConfig.config;\n\n let initLicensePlate = \"\";\n if (config[\"payment.license_plate\"]) {\n if (\n typeof config[\"payment.license_plate\"] === \"object\" &&\n !Array.isArray(config[\"payment.license_plate\"])\n ) {\n initLicensePlate = \"license_plate\";\n }\n }\n const [licensePlate, setLicensePlate] = React.useState(initLicensePlate);\n\n const licensePlateConfig: BigBrotherLicensePlateConfig = config[\n \"payment.license_plate\"\n ] as BigBrotherLicensePlateConfig;\n\n return (\n <>\n {\n setLicensePlate(event.target.value);\n\n props.onChange(event);\n }}\n items={props.dropdownItems}\n />\n {licensePlate != \"\" && (\n \n )[\n \"simulator\"\n ]\n ? true\n : false\n }\n />\n ) => {\n let api_url_prefix = event.target.value;\n\n (config[\"payment.license_plate\"] as Record)[\n \"api_url_prefix\"\n ] = api_url_prefix;\n\n if (event.target.value[event.target.value.length - 1] != \"/\") {\n api_url_prefix += \"/\";\n }\n\n (config[\"payment.license_plate\"] as Record)[\n \"camera_check\"\n ] = api_url_prefix + \"version/1/carwash/1/check\";\n\n (config[\"payment.license_plate\"] as Record)[\n \"inform_status\"\n ] = api_url_prefix + \"version/1/carwash/1/status\";\n\n (config[\"payment.license_plate\"] as Record)[\n \"heartbeat\"\n ] = api_url_prefix + \"version/1/recorder/status\";\n\n setConfig({ ...config });\n }}\n />\n \n )}\n \n );\n};\n\nconst SimulatorSwitch: FC<{\n licensePlateConfig: BigBrotherLicensePlateConfig;\n setConfig: React.Dispatch>>;\n value: boolean;\n}> = (props) => {\n const licensePlateSimulator: {\n active: boolean;\n license_plate: string;\n [x: string]: unknown;\n } = props.licensePlateConfig[\"simulator\"] || {\n active: true,\n license_plate: \"\",\n license_plate_country: \"\",\n license_plate_confidence: 999,\n license_plate_country_confidence: 1\n };\n\n const simulatedLicensePlate: string =\n licensePlateSimulator[\"license_plate\"] || \"\";\n\n const [state, setState] = React.useState(props.value);\n\n function deleteSimulatorConfig() {\n props.setConfig((prevConfig) => {\n delete (\n prevConfig[\"payment.license_plate\"] as BigBrotherLicensePlateConfig\n )[\"simulator\"];\n\n return { ...prevConfig };\n });\n }\n\n function updateSimulatorConfig() {\n props.setConfig((prevConfig) => {\n (prevConfig[\"payment.license_plate\"] as Record)[\n \"simulator\"\n ] = licensePlateSimulator;\n\n return { ...prevConfig };\n });\n }\n\n return (\n <>\n \n {\n // on change the value of state is the same as before so I have to check if the new state, that is set afterwards will have the correct value\n if (state == false) {\n updateSimulatorConfig();\n } else {\n deleteSimulatorConfig();\n }\n\n setState(!state);\n }}\n />\n }\n />\n \n {state == true && (\n \n ) => {\n licensePlateSimulator[\"license_plate\"] = event.target.value;\n\n updateSimulatorConfig();\n }}\n />\n \n )}\n \n );\n};\n\nconst FleetcardsPaymentOption: FC<{\n onChange: (event: SelectChangeEvent) => void;\n dropdownItems: DropdownItems;\n}> = (props) => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n\n const config = restoreConfig.config[0];\n\n let initFleetcards = \"\";\n if (config[\"payment.fleetcards\"]) {\n initFleetcards = \"fleetcards\";\n }\n\n const [fleetcards, setFleetcards] = React.useState(initFleetcards);\n\n return (\n <>\n {\n setFleetcards(event.target.value);\n\n props.onChange(event);\n }}\n items={props.dropdownItems}\n />\n {fleetcards !== \"\" && (\n \n Currently there is no way to select fleetcard settings. This means you\n have to add them yourself, you can find the settings{\" \"}\n \n here\n \n \n )}\n \n );\n};\n\nconst PaymentOrder: FC = () => {\n const restoreConfig = React.useContext(RestoreConfigContext);\n\n if (!restoreConfig.config) {\n throw TypeError(\"Config not defined in context\");\n }\n\n if (!restoreConfig.carwashConfig) {\n throw TypeError(\"CarwashConfig not defined in context\");\n }\n\n const config = restoreConfig.config[0];\n const [carwashConfig, setCarwashConfig] = restoreConfig.carwashConfig;\n\n const theme = useTheme();\n\n const defaultList: string[] = [\n \"cash\",\n \"nfc\",\n \"fleetcard\",\n \"voucher\",\n \"license_plate\",\n \"mobile\"\n ];\n\n const [paymentOrder, setPaymentOrder] = React.useState(defaultList);\n\n const [paymentOrderSwitch, setPaymentOrderSwitch] = React.useState(false);\n\n React.useEffect(() => {\n if (paymentOrderSwitch === false) {\n deletePaymentOrder();\n return;\n }\n\n const c: {\n payment_order?: string[];\n [x: string]: unknown;\n } = { ...carwashConfig };\n\n if (c[\"payment_order\"]) {\n if (paymentOrder.length == 0) {\n // delete payment_order config\n delete c[\"payment_order\"];\n setCarwashConfig(c);\n } else if (\n c[\"payment_order\"].length !== paymentOrder.length || // new element in paymentOrder\n !c[\"payment_order\"].every((val, index) => val === paymentOrder[index]) // paymentOrder changed order\n ) {\n // update the payment_order config\n c[\"payment_order\"] = paymentOrder;\n setCarwashConfig(c);\n }\n } else {\n if (paymentOrder.length != 0) {\n // create payment order config\n c[\"payment_order\"] = paymentOrder;\n setCarwashConfig(c);\n }\n }\n }, [paymentOrder, paymentOrderSwitch]);\n\n React.useEffect(() => {\n if (Object.prototype.hasOwnProperty.call(config, \"selfwash\") === false) {\n deletePaymentOrder();\n return;\n }\n }, [config]);\n\n // Function to update list on drop\n const handleDrop = (droppedItem: {\n destination?: {\n index: number;\n };\n source: {\n index: number;\n };\n }) => {\n // Ignore drop outside droppable container\n if (!droppedItem.destination) return;\n\n if (!Array.isArray(carwashConfig[\"payment_order\"])) return;\n\n const updatedList = [...carwashConfig[\"payment_order\"]];\n // Remove dragged item\n const [reorderedItem] = updatedList.splice(droppedItem.source.index, 1);\n // Add dropped item\n updatedList.splice(droppedItem.destination.index, 0, reorderedItem);\n // Update State\n setPaymentOrder(updatedList);\n };\n\n return (\n <>\n {Object.prototype.hasOwnProperty.call(config, \"selfwash\") && (\n \n \n Payment Order (only selfwash)}\n control={\n {\n setPaymentOrderSwitch(!paymentOrderSwitch);\n }}\n />\n }\n />\n \n {defaultList.length > 0 && paymentOrderSwitch && (\n <>\n \n \n {(provided: {\n innerRef: () => void;\n placeholder: React.Component;\n droppableProps: Record;\n }) => (\n \n {paymentOrder.map((item, index) => (\n \n {(provided: {\n innerRef: () => void;\n draggableProps: Record;\n dragHandleProps: Record;\n }) => (\n \n \n {item}\n \n \n )}\n \n ))}\n {provided.placeholder}\n \n )}\n \n \n \n )}\n \n )}\n \n );\n\n function deletePaymentOrder() {\n delete carwashConfig[\"payment_order\"];\n\n setCarwashConfig({ ...carwashConfig });\n }\n};\n","import { Box, Button } from \"@mui/material\";\nimport React from \"react\";\nimport { FC } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { GeneralSelection } from \"./GeneralSelection\";\nimport { DeviceSelection } from \"./DeviceSelection/DeviceSelection\";\nimport { PaymentSelection } from \"./PaymentSelection\";\nimport { RestoreConfigContext } from \"./tools\";\n\nfunction download(filename: string, text: string) {\n const element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text)\n );\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n}\n\nexport const RestoreConfigTool: FC = () => {\n const { t } = useTranslation();\n\n const [config, setConfig] = React.useState({});\n const [carwashConfig, setCarwashConfig] = React.useState({});\n const [languages, setLanguages] = React.useState({});\n\n const [device, setDevice] = React.useState(\"\");\n\n return (\n <>\n \n \n \n \n\n \n \n \n \n );\n\n function ShowConfig() {\n const [renderConfig, setRenderConfig] = React.useState({\n relative_path: \"../\",\n languages: languages,\n carwash_config: carwashConfig,\n config: config\n });\n\n return (\n \n

    Restore Config

    \n
    {JSON.stringify(renderConfig, null, 2)}
    \n
    \n );\n }\n\n function DownloadConfigButton() {\n return (\n {\n download(\n \"restore-config.json\",\n JSON.stringify(\n {\n relative_path: \"../\",\n languages: languages,\n carwash_config: carwashConfig,\n config: config\n },\n null,\n 2\n )\n );\n }}\n >\n {t(\"restoreConfigToolPage.downloadButton\")}\n \n );\n }\n};\n","import { RootReducer } from \"../../reducers\";\nimport { NestedStations, StationMap } from \"./types\";\n\nexport const stationsSelector = (\n state: RootReducer\n): StationMap => {\n const map: StationMap = {};\n\n for (const station of state.stations.stationsResponse ?? []) {\n map[station.id] = station;\n }\n\n return map;\n}\n\nexport const nestedStationsSelector = (\n state: RootReducer\n): NestedStations | null => state.stations.nestedStationsResponse;\n","import { RootReducer } from \"../../reducers\";\nimport { Transaction, TableTransaction } from \"./types\";\n\n\nexport const tableTransactionsSelector = (\n state: RootReducer\n): TableTransaction[] | null =>\n state.transactions.transactionsResponse?.data.transactions.map(\n (transaction: Transaction) => {\n\n const tableRow: TableTransaction = {\n id: transaction.id,\n external: transaction.external,\n status: transaction.status,\n amount: transaction.amount,\n pay_method_id: transaction.pay_method_external_id,\n pay_method_type: transaction.pay_method_type,\n station_id: transaction.station_id,\n terminal_id: transaction.terminal_id,\n tax_rate: transaction.tax_rate,\n create_date: new Date(Date.parse(transaction.created_at)),\n }\n\n if (transaction.external) {\n return tableRow;\n }\n\n tableRow.pay_method_type = transaction.pay_method?.type ?? \"\";\n tableRow.pay_method_id = transaction.pay_method?.external_id ?? \"\";\n\n return tableRow;\n }\n ) || null;\n\nexport const transactionsTotalPagesSelector = (\n state: RootReducer\n): number | null =>\n state.transactions.transactionsResponse?.totalPages || null;\n\nexport const areTransactionsLoadingSelector = (state: RootReducer): boolean =>\n state.transactions.areTransactionsLoading;\n","export type PayMethodTypeKeyNameMap = {\n fleetcard: string;\n voucher: string;\n license_plate: string;\n cash: string;\n fingerprint: string;\n mobile: string;\n card: string;\n}\n\n\nexport enum Status {\n DONE = \"DONE\",\n PENDING = \"PENDING\",\n CANCELLED = \"CANCELLED\",\n FAILED = \"FAILED\"\n}\n\n\nexport enum DIALOG_TYPES {\n SHOW_DETAILS\n}","// date time\nexport const localeMap = {\n en: \"en-GB\",\n de: \"de-DE\"\n};\nexport const dateOptions: Intl.DateTimeFormatOptions = {\n weekday: \"short\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\"\n};\nexport const timeOptions: Intl.DateTimeFormatOptions = {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\"\n};","import { FC } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { dateOptions, localeMap, timeOptions } from \"./options\";\n\nexport const Date: FC<{ datetime: Date }> = ({ datetime }) => {\n const [t, i18n] = useTranslation();\n\n const dateString = datetime.toLocaleDateString(\n localeMap[i18n.language],\n dateOptions\n );\n\n return <>{dateString}\n}\n\nexport const Time: FC<{ datetime: Date }> = ({ datetime }) => {\n const [t, i18n] = useTranslation();\n\n const timeString = datetime.toLocaleTimeString(\n localeMap[i18n.language],\n timeOptions\n );\n\n return <>{timeString}\n}","import CheckCircleOutlineOutlinedIcon from \"@mui/icons-material/CheckCircleOutlineOutlined\";\nimport PendingOutlinedIcon from \"@mui/icons-material/PendingOutlined\";\nimport CancelOutlinedIcon from \"@mui/icons-material/CancelOutlined\";\nimport ErrorIcon from \"@mui/icons-material/Error\";\nimport { Box, Typography } from \"@mui/material\";\nimport { FC } from \"react\";\nimport * as s from \"../../common/Table/styles\";\nimport { useTranslation } from \"react-i18next\";\nimport { Terminal } from \"../../../store/modules/terminals/types\";\nimport { StationTerminals } from \"../../../store/modules/stations/types\";\nimport { PayMethodTypeKeyNameMap, Status } from \"./types\";\nimport { Date, Time } from \"components/common/DateTime\";\n\nconst localeMap = {\n en: \"en-GB\",\n de: \"de-DE\"\n};\nconst dateOptions: Intl.DateTimeFormatOptions = {\n weekday: \"short\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\"\n};\nconst timeOptions: Intl.DateTimeFormatOptions = {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\"\n};\nexport const DateComponent: FC<{ date: Date }> = ({ date }) => {\n const [t, i18n] = useTranslation();\n\n const dateString = date.toLocaleDateString(\n localeMap[i18n.language],\n dateOptions\n );\n return (\n \n \n \n \n \n );\n};\n\nexport const TimeComponent: FC<{ date: Date }> = ({ date: time }) => {\n const [t, i18n] = useTranslation();\n\n const timeString = time.toLocaleTimeString(\n localeMap[i18n.language],\n timeOptions\n );\n return (\n \n \n \n \n );\n};\n\nexport const StationComponent: FC<{\n station: StationTerminals | undefined;\n}> = ({ station }) => {\n return (\n \n \n {station?.name ?? \"\"}\n \n \n );\n};\n\nexport const TerminalComponent: FC<{ terminal: Terminal | undefined }> = ({\n terminal\n}) => {\n return (\n \n \n {terminal?.name ?? \"\"}\n \n \n );\n};\n\nexport const PaymentTypeComponent: FC<{ type: string }> = ({ type }) => {\n const [t, i18n] = useTranslation();\n\n const typeNames: PayMethodTypeKeyNameMap = {\n fleetcard: t(\"uiComponents.table.headers.type_name.fleetcard\"),\n voucher: t(\"uiComponents.table.headers.type_name.voucher\"),\n license_plate: t(\"uiComponents.table.headers.type_name.license_plate\"),\n cash: t(\"uiComponents.table.headers.type_name.cash\"),\n fingerprint: t(\"uiComponents.table.headers.type_name.fingerprint\"),\n mobile: t(\"uiComponents.table.headers.type_name.mobile\"),\n card: t(\"uiComponents.table.headers.type_name.card\")\n };\n return (\n \n \n {typeNames[type]}\n \n \n );\n};\n\nexport const PaymentIdComponent: FC<{ id: string }> = ({ id }) => {\n return (\n \n \n {id}\n \n \n );\n};\n\nexport const AmountComponent: FC<{ amount: number }> = ({ amount }) => {\n const amountString = `${\n amount % 100 == 0 ? amount / 100 : (amount / 100).toFixed(2)\n } €`;\n\n return (\n \n \n {amountString}\n \n \n );\n};\n\nexport const StatusComponent: FC<{ status: string }> = ({ status }) => {\n const getIcon = () => {\n switch (status) {\n case Status.DONE:\n return ;\n case Status.PENDING:\n return ;\n case Status.CANCELLED:\n return ;\n case Status.FAILED:\n return ;\n }\n return <>{status};\n };\n\n return (\n \n {getIcon()}\n \n );\n};\n","export enum FIELD_TYPES {\n BOOLEAN = \"boolean\",\n TEXT = \"text\",\n DATE_TIME = \"date_time\",\n MULTILINE_TEXT = \"multiline_text\",\n PASSWORD = \"password\",\n SELECT = \"select\",\n MULTISELECT = \"multiselect\",\n CHECKBOX = \"checkbox\",\n NUMBER = \"number\",\n LABEL = \"label\",\n DATE_PICKER = \"date_picker\",\n CURRENCY_AMOUNT = \"currency_amount\",\n PHONE_NUMBER = \"phone_number\",\n}\n\nexport type DialogField = {\n label: ((fieldValues: Record) => string) | string;\n name: string;\n type: FIELD_TYPES;\n value?: ((fieldValues: Record) => unknown) | unknown;\n step?:\n | ((fieldValues: Record) => number | undefined)\n | number;\n min?: ((fieldValues: Record) => number | undefined) | number;\n max?: ((fieldValues: Record) => number | undefined) | number;\n explanation?: string;\n invisible?: boolean | ((target: any) => boolean);\n};\n\nexport type DialogProps = {\n title: string;\n fields?: DialogField[];\n onClose: () => void;\n isOpened: boolean;\n isLocked?: boolean;\n isLoading?: boolean;\n};\n\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { createFilterOptions } from \"@mui/material/Autocomplete\";\nimport Button from \"@mui/material/Button\";\nimport Checkbox from \"@mui/material/Checkbox\";\nimport DialogActions from \"@mui/material/DialogActions\";\nimport DialogTitle from \"@mui/material/DialogTitle\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport TextField from \"@mui/material/TextField\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Info from \"@mui/icons-material/Info\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { BasicDatePicker } from \"components/common/FormFields/BasicDatePicker\";\nimport { CurrencyAmount } from \"components/common/FormFields/CurrencyAmount\";\nimport { SimpleSelect } from \"components/common/FormFields/SimpleSelect\";\nimport { MultiSelect } from \"components/common/FormFields/MultiSelect\";\nimport { PhoneNumber } from \"components/common/FormFields/PhoneNumber\";\nimport { FC, useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Controller, FieldError, useForm } from \"react-hook-form\";\nimport { isSelectOption } from \"typeGuards/isSelectOption\";\nimport { isUndefined } from \"typeGuards/isUndefined\";\nimport { object, SchemaOf, string } from \"yup\";\nimport { Loader } from \"../Loader\";\nimport * as s from \"./styles\";\nimport { FIELD_TYPES, DialogField, DialogProps } from \"./types\";\nimport { useTranslation } from \"react-i18next\";\nimport { IconButton, Table, TableCell, TableRow } from \"@mui/material\";\nimport { Date, Time } from \"../DateTime\";\n\nexport const Dialog: FC = ({\n title,\n fields,\n onClose,\n isOpened,\n isLoading,\n isLocked\n}: DialogProps) => {\n const { t } = useTranslation();\n const [areDividersVisible, setAreDividersVisible] = useState(false);\n const [dialogContentNode, setDialogContentNode] =\n useState(null);\n\n const fieldValues: Record = {};\n fields?.forEach((field) => (fieldValues[field.name] = field.value));\n\n useEffect(() => {\n const handleResize = () => {\n if (dialogContentNode) {\n dialogContentNode.scrollHeight > dialogContentNode.clientHeight;\n setAreDividersVisible(\n dialogContentNode.scrollHeight > dialogContentNode.clientHeight\n );\n } else {\n setAreDividersVisible(false);\n }\n };\n\n window.addEventListener(\"resize\", handleResize);\n handleResize();\n return () => window.removeEventListener(\"resize\", handleResize);\n }, [dialogContentNode]);\n\n const handleFormDialogContentRef = useCallback((node: HTMLDivElement) => {\n setDialogContentNode(node);\n }, []);\n\n const FORM_ID = `dialog-${title.replace(/\\s/g, \"-\")}`;\n\n const renderExplanation = (field: DialogField) => {\n return (\n \n \n \n );\n };\n\n return (\n \n \n {title}\n \n \n \n \n \n {isLoading ? (\n \n \n \n ) : (\n \n {fields?.map((field, i) => {\n const currentType = field.type;\n\n const invisible =\n typeof field?.invisible === \"function\"\n ? field?.invisible(fieldValues)\n : false;\n\n const value =\n typeof field.value === \"function\"\n ? field.value()\n : field.value || undefined;\n\n if (value === undefined) {\n return <>;\n }\n\n switch (currentType) {\n case FIELD_TYPES.TEXT:\n return (\n \n \n

    {field.label}:

    \n
    \n {value}\n
    \n );\n case FIELD_TYPES.DATE_TIME:\n return (\n \n \n

    {field.label}:

    \n
    \n \n \n
    \n );\n case FIELD_TYPES.BOOLEAN:\n return (\n \n \n

    {field.label}:

    \n
    \n {value ? \"Yes\" : \"No\"}\n
    \n );\n }\n })}\n
    \n )}\n \n \n );\n};\n","import { Pagination } from \"@mui/material\";\nimport { Table } from \"components/common/Table\";\nimport {\n TableColumn,\n TableRowActionsMenuItem,\n TableRowComponents\n} from \"components/common/Table/types\";\nimport { TransactionsTableFilterForm } from \"components/common/TableFilterForm\";\nimport { TransactionsTableFilterParams } from \"components/common/TableFilterForm/types\";\nimport { useMount } from \"hooks/useMount\";\nimport { FC, useCallback, useEffect, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { nestedStationsSelector } from \"../../../store/modules/stations/selectors\";\nimport * as stationsActions from \"../../../store/modules/stations/actions\";\nimport {\n tableTransactionsSelector,\n transactionsTotalPagesSelector\n} from \"../../../store/modules/transactions/selectors\";\nimport { TableTransaction } from \"../../../store/modules/transactions/types\";\nimport { GetTransactionsParams } from \"../../../store/modules/transactions/types\";\nimport * as transactionsActions from \"../../../store/modules/transactions/actions\";\nimport { useUnmount } from \"hooks/useUnmount\";\nimport {\n AmountComponent,\n DateComponent,\n PaymentIdComponent,\n PaymentTypeComponent,\n StationComponent,\n StatusComponent,\n TerminalComponent,\n TimeComponent\n} from \"./tableComponents\";\nimport { DIALOG_TYPES } from \"./types\";\nimport { DialogProps, FIELD_TYPES } from \"components/common/Dialog/types\";\nimport { Dialog } from \"components/common/Dialog\";\nimport { StationTerminals } from \"src/store/modules/stations/types\";\nimport { Terminal } from \"src/store/modules/terminals/types\";\n\nexport const Transactions: FC = () => {\n const { t, i18n } = useTranslation();\n const dispatch = useDispatch();\n const transactions = useSelector(tableTransactionsSelector);\n const totalPages = useSelector(transactionsTotalPagesSelector);\n const nestedStations = useSelector(nestedStationsSelector);\n\n const tableTransactions = () => {\n if (!transactions) {\n return null;\n }\n\n const transactionTable: { id: string;[key: string]: string }[] = [];\n\n transactions.forEach((tableRow) => {\n transactionTable.push({\n id: tableRow.id\n });\n });\n\n return transactionTable;\n };\n\n const getStationFromId = (stationId: string): StationTerminals | undefined =>\n nestedStations?.[stationId];\n const getTerminalFromStationAndId = (\n station: StationTerminals | undefined,\n terminalId: string\n ): Terminal | undefined => station?.terminals[terminalId];\n\n const tableComponentTransactions = () => {\n if (!transactions) {\n return null;\n }\n\n const transactionComponentsTable: TableRowComponents = [];\n\n transactions.forEach((tableRow) => {\n const station = getStationFromId(tableRow.station_id);\n const terminal = getTerminalFromStationAndId(\n station,\n tableRow.terminal_id\n );\n\n transactionComponentsTable.push({\n date: ,\n time: ,\n station: ,\n terminal: ,\n pay_method_type: (\n \n ),\n pay_method_id: ,\n amount: ,\n status: \n });\n });\n\n return transactionComponentsTable;\n };\n\n const [searchConfiguration, setSearchConfiguration] =\n useState({\n page: 1,\n station_id: \"\",\n terminal_id: \"\"\n });\n\n const tableColumns: TableColumn[] = [\n {\n key: \"date\",\n label: t(\"transaction.uiComponents.table.headers.date\")\n },\n {\n key: \"time\",\n label: t(\"transaction.uiComponents.table.headers.time\")\n },\n {\n key: \"station\",\n label: t(\"transaction.uiComponents.table.headers.station\")\n },\n {\n key: \"terminal\",\n label: t(\"transaction.uiComponents.table.headers.terminal\")\n },\n {\n key: \"pay_method_type\",\n label: t(\"transaction.uiComponents.table.headers.pay_method_type\")\n },\n {\n key: \"pay_method_id\",\n label: t(\"transaction.uiComponents.table.headers.pay_method_id\")\n },\n {\n key: \"amount\",\n label: t(\"transaction.uiComponents.table.headers.amount\")\n },\n {\n key: \"status\",\n label: t(\"transaction.uiComponents.table.headers.status\")\n }\n ];\n\n const backlightTableProperties = {\n active: {\n conditionFn: (value) => (value ? \"success.main\" : \"error\")\n }\n };\n\n const addFilter = (\n searchConfiguration: TransactionsTableFilterParams\n ): GetTransactionsParams => ({\n page: searchConfiguration.page,\n station_id: searchConfiguration.station_id,\n terminal_id: searchConfiguration.terminal_id\n });\n\n const getTransactions = () => {\n dispatch(\n transactionsActions.getTransactions.started(\n addFilter(searchConfiguration)\n )\n );\n };\n\n const getStations = () => {\n dispatch(stationsActions.getNestedStations.started({}));\n };\n\n useMount(() => {\n getTransactions();\n getStations();\n });\n\n useUnmount(() => {\n dispatch(transactionsActions.clear());\n dispatch(stationsActions.clear());\n });\n\n useEffect(() => {\n getTransactions();\n }, [searchConfiguration, dispatch]);\n\n const [selectedItemId, setSelectedItemId] = useState(null);\n let selectedItem: TableTransaction | undefined;\n\n const getSelectedTransaction = () => {\n if (selectedItem === undefined || selectedItemId !== selectedItem.id) {\n selectedItem = transactions?.find(\n (transaction) => transaction.id === selectedItemId\n );\n }\n return selectedItem;\n };\n\n const [dialog, setDialog] = useState({\n type: DIALOG_TYPES.SHOW_DETAILS,\n isOpened: false\n });\n\n const closeDialogHandler = useCallback(() => {\n setDialog({\n ...dialog,\n isOpened: false\n });\n setSelectedItemId(null);\n }, [dialog]);\n\n const showDetailsHandler = useCallback((id: string) => {\n setSelectedItemId(id);\n setDialog({\n type: DIALOG_TYPES.SHOW_DETAILS,\n isOpened: true\n });\n }, []);\n\n const tableActions: TableRowActionsMenuItem[] = [\n {\n label: t(\"transaction.uiComponents.table.actions.show_details\"),\n handler: showDetailsHandler\n }\n ];\n\n const dialogProps: {\n [key in DIALOG_TYPES]: Omit;\n } = {\n [DIALOG_TYPES.SHOW_DETAILS]: {\n title: t(\"transaction.form.show-details.title\"),\n onClose: closeDialogHandler,\n fields: [\n {\n name: \"date\",\n label: t(\"transaction.uiComponents.table.headers.date\"),\n type: FIELD_TYPES.DATE_TIME,\n value: getSelectedTransaction()?.create_date || \"\"\n },\n {\n name: \"external\",\n label: t(\"transaction.uiComponents.table.headers.external\"),\n type: FIELD_TYPES.BOOLEAN,\n value: getSelectedTransaction()?.external || \"\"\n },\n {\n name: \"station\",\n label: t(\"transaction.uiComponents.table.headers.station\"),\n type: FIELD_TYPES.TEXT,\n value:\n getStationFromId(getSelectedTransaction()?.station_id ?? \"\")\n ?.name ?? \"\"\n },\n {\n name: \"terminal\",\n label: t(\"transaction.uiComponents.table.headers.terminal\"),\n type: FIELD_TYPES.TEXT,\n value:\n getTerminalFromStationAndId(\n getStationFromId(getSelectedTransaction()?.station_id ?? \"\"),\n getSelectedTransaction()?.terminal_id ?? \"\"\n )?.name ?? \"\"\n },\n {\n name: \"status\",\n label: t(\"transaction.uiComponents.table.headers.status\"),\n type: FIELD_TYPES.TEXT,\n value: getSelectedTransaction()?.status || \"\"\n },\n {\n name: \"amount\",\n label: t(\"transaction.uiComponents.table.headers.amount\"),\n type: FIELD_TYPES.TEXT,\n value: getSelectedTransaction()?.amount || \"\"\n },\n {\n name: \"currency\",\n label: t(\"transaction.uiComponents.table.headers.currency\"),\n type: FIELD_TYPES.TEXT,\n value: \"EUR cents\"\n },\n {\n name: \"tax_rate\",\n label: t(\"transaction.uiComponents.table.headers.tax_rate\"),\n type: FIELD_TYPES.TEXT,\n value: getSelectedTransaction()?.tax_rate.toString() + \"%\" || \"\"\n },\n {\n name: \"pay_method_type\",\n label: t(\"transaction.uiComponents.table.headers.pay_method_type\"),\n type: FIELD_TYPES.TEXT,\n value: getSelectedTransaction()?.pay_method_type || \"\"\n },\n {\n name: \"pay_method_id\",\n label: t(\"transaction.uiComponents.table.headers.pay_method_id\"),\n type: FIELD_TYPES.TEXT,\n value: getSelectedTransaction()?.pay_method_id || \"\"\n }\n ]\n }\n };\n\n return (\n <>\n Filter:,\n \n ]}\n />\n , page: number) => {\n setSearchConfiguration({\n ...searchConfiguration,\n page\n });\n }}\n />\n \n \n );\n};\n","import { ButtonGroup } from '@mui/material';\r\nimport { Calendar as CalendarComp } from 'react-big-calendar';\r\nimport styled from 'styled-components';\r\n\r\nimport \"react-big-calendar/lib/css/react-big-calendar.css\";\r\n\r\nexport const Calendar = styled(CalendarComp)`\r\n .rbc-month-view, .rbc-time-view {\r\n border-radius: 6px;\r\n border-color: ${({ theme }) => theme.palette.calendar.border};\r\n * {\r\n border-color: ${({ theme }) => theme.palette.calendar.border} !important;\r\n }\r\n }\r\n\r\n .rbc-off-range-bg {\r\n background-color: ${({ theme }) => theme.palette.calendar.secondary};\r\n }\r\n\r\n .rbc-off-range-bg.rbc-selected-cell {\r\n background-color: ${({ theme }) => theme.palette.calendar.secondarySelected};\r\n }\r\n\r\n .rbc-selected-cell {\r\n background-color: ${({ theme }) => theme.palette.calendar.primarySelected};\r\n }\r\n\r\n .rbc-event {\r\n background-color: rgba(0,0,0,0);\r\n padding: 0px;\r\n }\r\n\r\n .rbc-event-content {\r\n white-space: pre-wrap;\r\n }\r\n\r\n .rbc-today {\r\n background-color: ${({ theme }) => theme.palette.calendar.today};\r\n }\r\n\r\n .rbc-today.rbc-selected-cell {\r\n background-color: ${({ theme }) => theme.palette.calendar.todaySelected};\r\n }\r\n\r\n .rbc-time-content > .rbc-today {\r\n background-color: inherit;\r\n }\r\n\r\n .rbc-event.rbc-selected {\r\n background-color: inherit;\r\n }\r\n\r\n .rbc-event:focus {\r\n background-color: ${({ theme }) => theme.palette.calendar.events.focus};\r\n outline: 2px dashed ${({ theme }) => theme.palette.calendar.events.focusOutline};\r\n }\r\n`\r\n\r\n\r\nexport const ToolbarWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n margin-bottom: 10px;\r\n`\r\n\r\nexport const EventWrapper = styled.div`\r\n overflow: wrap;\r\n padding: 7px;\r\n border-radius: 5px;\r\n height: 100%\r\n`\r\n\r\nexport const NavButtonGroup = styled(ButtonGroup)`\r\n background-color: ${({ theme }) => theme.palette.primary.main};\r\n\r\n button {\r\n color: ${({ theme }) => theme.palette.primary.contrastText};\r\n border-color: ${({ theme }) => theme.palette.secondary.main};\r\n\r\n &:hover {\r\n border-color: ${({ theme }) => theme.palette.secondary.lighter};\r\n }\r\n }\r\n \r\n .today-btn {\r\n svg {\r\n fill: #f46835;\r\n }\r\n }\r\n`\r\n\r\n","import { ArrowLeft, ArrowRight, Today } from '@mui/icons-material';\r\nimport { FC } from 'react';\r\nimport { NavButtonGroup, ToolbarWrapper } from './styles';\r\nimport { Button } from '@mui/material';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nexport const navigateContants = {\r\n PREVIOUS: 'PREV',\r\n NEXT: 'NEXT',\r\n TODAY: 'TODAY',\r\n DATE: 'DATE'\r\n};\r\n\r\nexport const views = {\r\n YEAR: 'year',\r\n MONTH: 'month',\r\n WEEK: 'week',\r\n WORK_WEEK: 'work_week',\r\n DAY: 'day',\r\n AGENDA: 'agenda'\r\n};\r\n\r\ntype Props = {\r\n onNavigate: Function\r\n onView: Function\r\n label: string\r\n onSetSelectedCalendarsClicked: Function\r\n onOpenConfigClicked: Function\r\n createEvent: () => void\r\n importEvents: () => void\r\n}\r\n\r\nexport const CalendarToolbar: FC = (props: Props) => {\r\n const [t, i18n] = useTranslation();\r\n\r\n const { label, onNavigate, onView, createEvent, importEvents } = props\r\n function navigate(action: any) {\r\n onNavigate(action);\r\n }\r\n\r\n function view(view: any) {\r\n onView(view);\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {label}\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","export type SlotInfo = {\r\n start: Date;\r\n end: Date;\r\n slots: Date[];\r\n action: \"select\" | \"click\" | \"doubleClick\";\r\n bounds?: {\r\n bottom: number;\r\n left: number;\r\n right: number;\r\n top: number;\r\n x: number;\r\n y: number;\r\n };\r\n box?: {\r\n clientX: number;\r\n clientY: number;\r\n x: number;\r\n y: number;\r\n };\r\n}\r\n\r\nexport type DisplayEvent = {\r\n title: string\r\n start: Date\r\n end: Date\r\n allDay: boolean\r\n resource: EventResource\r\n}\r\n\r\nexport type CalendarEvent = {\r\n title: string\r\n start: Date\r\n end: Date\r\n allDay: boolean,\r\n recurrency?: Recurrency\r\n resource: EventResource\r\n}\r\n\r\nexport type Recurrency = {\r\n frequency: moment.unitOfTime.DurationConstructor;\r\n interval: number;\r\n until?: Date;\r\n count?: number;\r\n exceptions?: Date[];\r\n}\r\n\r\nexport type EventResource = {\r\n id: string;\r\n type: EventType;\r\n percentage?: number;\r\n}\r\n\r\nexport type EventCategory = {\r\n label: string\r\n color: EventColor\r\n}\r\n\r\nexport type EventColor = {\r\n background: string,\r\n chip: string,\r\n text: string\r\n}\r\n\r\nexport enum EventType {\r\n UNKNOWN,\r\n HAPPY_HOUR,\r\n HOLIDAY\r\n}","import { EventType, EventCategory } from \"./types\";\r\n\r\nexport const EVENT_STYLES: Record = {\r\n [EventType.UNKNOWN]: {\r\n label: \"UNKNOWN\",\r\n color: {\r\n background: \"#aaaaaa88\",\r\n chip: \"#aaaaaa\",\r\n text: \"#000\"\r\n }\r\n },\r\n [EventType.HAPPY_HOUR]: {\r\n label: \"HAPPY HOUR\",\r\n color: {\r\n background: \"#f2b60088\",\r\n chip: \"#f2b600\",\r\n text: \"#000\"\r\n }\r\n },\r\n [EventType.HOLIDAY]: {\r\n label: \"HOLIDAY\",\r\n color: {\r\n background: \"#22dd2288\",\r\n chip: \"#22dd22\",\r\n text: \"#000\"\r\n }\r\n },\r\n}","import { FC, useState } from \"react\"\r\nimport { EventWrapper } from \"./styles\"\r\nimport { Box, Chip } from \"@mui/material\"\r\nimport { EVENT_STYLES } from \"./constants\"\r\nimport { CalendarEvent, EventCategory, EventType } from \"./types\"\r\n\r\ntype Props = {\r\n event: CalendarEvent\r\n}\r\n\r\nexport const EventComp: FC = ({ event }: Props) => {\r\n const [category, setCategory] = useState(EVENT_STYLES[event.resource.type] || EVENT_STYLES[EventType.UNKNOWN]);\r\n\r\n return (\r\n \r\n \r\n {category && (\r\n \r\n )}\r\n {event.title}\r\n \r\n \r\n )\r\n};","import { FC, useState } from 'react'\r\nimport { momentLocalizer } from 'react-big-calendar';\r\nimport moment from \"moment\";\r\n\r\nimport { CalendarToolbar } from './toolbar';\r\nimport { Calendar } from './styles';\r\nimport { EventComp } from './event';\r\nimport { CalendarEvent, DisplayEvent, Recurrency, SlotInfo } from './types';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\n\r\ntype Props = {\r\n events: CalendarEvent[];\r\n createEvent: () => void;\r\n importEvents: () => void;\r\n onSelectEvent: (event: CalendarEvent) => void;\r\n onSelectSlot: (slotInfo: SlotInfo) => void;\r\n}\r\n\r\nfunction getFirstDateAfter(start: moment.Moment, after: moment.Moment, rec: Recurrency): moment.Moment {\r\n if (start.isSameOrAfter(after)) {\r\n return start;\r\n }\r\n\r\n const diff = after.diff(start);\r\n\r\n const diffRec = start.clone().add(rec.interval, rec.frequency).diff(start);\r\n\r\n const recSteps = Math.ceil(diff / diffRec);\r\n\r\n const firstDateAfter = start.clone().add(recSteps * rec.interval, rec.frequency);\r\n\r\n return firstDateAfter;\r\n}\r\n\r\nfunction calendarEventToDisplayEvents(event: CalendarEvent, firstDisplayableDate: Date | moment.Moment, lastDisplayableDate: Date | moment.Moment): DisplayEvent[] {\r\n if (event.recurrency === undefined) {\r\n return [event]\r\n }\r\n firstDisplayableDate = moment(firstDisplayableDate);\r\n lastDisplayableDate = moment(lastDisplayableDate);\r\n\r\n const displayEvents: DisplayEvent[] = [];\r\n const start = getFirstDateAfter(moment(event.start), firstDisplayableDate, event.recurrency);\r\n\r\n // length of a single event in milliseconds\r\n const diff = -moment(event.start).diff(event.end);\r\n\r\n let until: moment.Moment;\r\n\r\n if (event.recurrency.until !== undefined) {\r\n until = moment(event.recurrency.until);\r\n }\r\n else if (event.recurrency.count !== undefined) {\r\n until = moment(event.start).add((event.recurrency.count - 1) * event.recurrency.interval, event.recurrency.frequency);\r\n }\r\n else {\r\n until = lastDisplayableDate;\r\n }\r\n\r\n until = until.isBefore(lastDisplayableDate) ? until : lastDisplayableDate;\r\n\r\n for (;\r\n start.isSameOrBefore(until);\r\n start.add(event.recurrency.interval, event.recurrency.frequency)) {\r\n const isException = event.recurrency.exceptions?.find((date) => moment(date).isSame(start, event.recurrency?.frequency));\r\n\r\n if (isException !== undefined) {\r\n continue;\r\n }\r\n\r\n const displayEvent: DisplayEvent = {\r\n ...event,\r\n start: start.toDate(),\r\n end: start.clone().add(diff, \"milliseconds\").toDate(),\r\n }\r\n\r\n displayEvents.push(displayEvent);\r\n }\r\n\r\n return displayEvents;\r\n}\r\n\r\nfunction calendarEventsToDisplayEvents(events: CalendarEvent[], firstDisplayableMoment: Date | moment.Moment, lastDisplayableDate: Date | moment.Moment,): DisplayEvent[] {\r\n const displayEvents: DisplayEvent[] = [];\r\n\r\n events.forEach(event => displayEvents.push(...calendarEventToDisplayEvents(event, firstDisplayableMoment, lastDisplayableDate)));\r\n\r\n return displayEvents;\r\n}\r\n\r\nexport const EventCalendar: FC = ({ events, createEvent, importEvents, onSelectEvent, onSelectSlot }: Props) => {\r\n const [t, i18n] = useTranslation();\r\n moment.updateLocale(i18n.language, {\r\n week: {\r\n dow: 1,\r\n },\r\n longDateFormat: {\r\n L: \"DD.MM.YYYY\",\r\n LL: \"D MMMM YYYY\",\r\n LLL: \"D MMMM YYYY HH:mm\",\r\n LLLL: \"dddd, D MMMM YYYY HH:mm\",\r\n LT: \"HH:mm\",\r\n LTS: \"HH:mm:ss\",\r\n }\r\n })\r\n const localizer = momentLocalizer(moment);\r\n\r\n const [firstVisibleDay, setFirstVisibleDay] = useState(moment(localizer.firstVisibleDay(moment())));\r\n const [lastVisibleDay, setLastVisibleDay] = useState(moment(localizer.lastVisibleDay(moment())));\r\n\r\n const onNavigate = (newDate: Date | moment.Moment) => {\r\n const fvDay = localizer.firstVisibleDay(newDate);\r\n const lvDay = localizer.lastVisibleDay(newDate);\r\n\r\n if (firstVisibleDay?.diff(fvDay) == 0 && lastVisibleDay?.diff(lvDay) == 0) {\r\n return;\r\n }\r\n\r\n setFirstVisibleDay(moment(fvDay));\r\n setLastVisibleDay(moment(lvDay));\r\n }\r\n\r\n return (\r\n ,\r\n toolbar: (props) => \r\n }}\r\n />\r\n )\r\n}\r\n\r\n","import { CalendarEvent, EventType } from \"components/common/Calendar/types\";\r\n\r\nexport enum DIALOG_TYPES {\r\n CREATE,\r\n IMPORT,\r\n EDIT\r\n}\r\n\r\nexport type SelectedEvent = {\r\n title: string;\r\n start: Date;\r\n end: Date;\r\n allDay: boolean;\r\n calendarEvent: CalendarEvent;\r\n}\r\n\r\nexport type DialogEvent = {\r\n title?: string;\r\n start?: Date;\r\n end?: Date;\r\n allDay: boolean;\r\n type?: EventType;\r\n percentage: number;\r\n recurrency: boolean;\r\n endCondition?: \"count\" | \"date\" | \"never\";\r\n count?: number;\r\n until?: Date;\r\n interval?: number;\r\n frequency?: \"day\" | \"week\" | \"month\" | \"year\";\r\n}\r\n\r\nexport type CheckedDialogEvent = {\r\n title: string;\r\n start: Date;\r\n end: Date;\r\n allDay: boolean;\r\n type: EventType;\r\n percentage?: number;\r\n recurrency: boolean;\r\n endCondition: \"count\" | \"date\" | \"never\";\r\n count: number;\r\n until: Date;\r\n interval: number;\r\n frequency: \"day\" | \"week\" | \"month\" | \"year\";\r\n}\r\n\r\nexport type ImportEvent = {\r\n file: File[];\r\n type: EventType;\r\n percentage?: number;\r\n}\r\n\r\nexport type ICSFileEvent = {\r\n type: string;\r\n start: Date;\r\n end: Date;\r\n summary: string;\r\n \"event-type\": string;\r\n allDay?: boolean;\r\n rrule?: string;\r\n exdate?: { [day: string]: Date };\r\n}\r\n\r\nexport type ICSFile = {\r\n [uid: string]: ICSFileEvent;\r\n}\r\n\r\nexport type RRule = {\r\n interval?: string;\r\n freq?: string;\r\n until?: string;\r\n count?: string;\r\n}","import { CalendarEvent, EventType } from \"components/common/Calendar/types\";\r\nimport { ICSFile, ICSFileEvent, RRule } from \"./types\";\r\n\r\nimport moment from \"moment\";\r\nimport ical from \"ical/ical.js\";\r\n\r\nfunction stringifyIcs(ics: ICSFile): string {\r\n return \"BEGIN:VCALENDAR\\n\" +\r\n Object.entries(ics).filter(([_, event]) => event.type == \"VEVENT\").map(([uid, event]: [string, ICSFileEvent]) => {\r\n let ics = `BEGIN:VEVENT`;\r\n ics += `\\nUID:${uid}`;\r\n ics += `\\nDTSTAMP:${moment().utc().format(\"YYYYMMDDTHHmmss\")}`;\r\n ics += `\\nDTSTART${event.allDay ? \";VALUE=DATE\" : \"\"}:${moment(event.start).format(event.allDay ? \"YYYYMMDD\" : \"YYYYMMDDTHHmmss\")}`;\r\n ics += `\\nDTEND${event.allDay ? \";VALUE=DATE\" : \"\"}:${moment(event.end).format(event.allDay ? \"YYYYMMDD\" : \"YYYYMMDDTHHmmss\")}`;\r\n ics += `\\nSUMMARY:${event.summary}`;\r\n ics += `${event.rrule !== undefined ? `\\nRRULE:${event.rrule}` : \"\"}`;\r\n ics += event['event-type'] !== undefined ? `\\nEVENT-TYPE:${event['event-type']}` : \"\";\r\n ics += event['percentage'] !== undefined ? `\\nPERCENTAGE:${event['percentage']}` : \"\";\r\n ics += event.exdate !== undefined ? `\\nEXDATE:${Object.values(event.exdate).map((date) => moment(date).utc().format(\"YYYYMMDDTHHmmss\")).join(\",\")}` : \"\";\r\n ics += `\\nEND:VEVENT`;\r\n return ics;\r\n }).join(\"\\n\") +\r\n \"\\nEND:VCALENDAR\";\r\n}\r\n\r\nfunction getFreqencyFromRRule(freq: string | undefined): moment.unitOfTime.DurationConstructor {\r\n if (freq === undefined) {\r\n return \"week\";\r\n }\r\n\r\n freq = freq.toLowerCase();\r\n\r\n switch (freq) {\r\n case \"secondly\":\r\n return \"second\";\r\n case \"minutely\":\r\n return \"minute\";\r\n case \"hourly\":\r\n return \"hour\";\r\n case \"daily\":\r\n return \"day\";\r\n case \"weekly\":\r\n return \"week\";\r\n case \"monthly\":\r\n return \"month\";\r\n case \"yearly\":\r\n return \"year\";\r\n }\r\n\r\n throw new Error(`Frequency not implemented ${freq}`);\r\n}\r\n\r\nfunction frequencyToRRule(freq: moment.unitOfTime.DurationConstructor): string {\r\n switch (freq) {\r\n case \"second\":\r\n return \"SECONDLY\";\r\n case \"minute\":\r\n return \"MINUTELY\";\r\n case \"hour\":\r\n return \"HOURLY\";\r\n case \"day\":\r\n return \"DAILY\";\r\n case \"week\":\r\n return \"WEEKLY\";\r\n case \"month\":\r\n return \"MONTHLY\";\r\n case \"year\":\r\n return \"YEARLY\";\r\n }\r\n\r\n throw new Error(`Frequency not implemented ${freq}`);\r\n}\r\n\r\nfunction stringToEventType(type: string, alt: EventType = EventType.UNKNOWN): EventType {\r\n switch (type) {\r\n case \"HOLIDAY\":\r\n return EventType.HOLIDAY;\r\n case \"HAPPY_HOUR\":\r\n return EventType.HAPPY_HOUR;\r\n default:\r\n return alt;\r\n }\r\n}\r\n\r\nfunction eventTypeToString(type: EventType): string {\r\n switch (type) {\r\n case EventType.HOLIDAY:\r\n return \"HOLIDAY\";\r\n case EventType.HAPPY_HOUR:\r\n return \"HAPPY_HOUR\";\r\n default:\r\n return \"UNKNOWN\";\r\n }\r\n}\r\n\r\nfunction updateIcsEventRecurrency(icsEvent: ICSFileEvent, event: CalendarEvent): ICSFileEvent | null {\r\n if (event.recurrency === undefined) {\r\n return icsEvent;\r\n }\r\n\r\n icsEvent.rrule = `FREQ=${frequencyToRRule(event.recurrency.frequency)};`;\r\n icsEvent.rrule += `INTERVAL=${event.recurrency.interval};`;\r\n if (event.recurrency.until !== undefined) {\r\n if (event.recurrency.until < event.start) {\r\n // Event is over before it starts so it is useless in the ics\r\n return null;\r\n }\r\n\r\n icsEvent.rrule += `UNTIL=${moment(event.recurrency.until).toISOString()};`;\r\n }\r\n\r\n if (event.recurrency.count !== undefined && !isNaN(event.recurrency.count)) {\r\n if (event.recurrency.count <= 0) {\r\n // Event is over before it starts so it is useless in the ics\r\n return null;\r\n }\r\n\r\n icsEvent.rrule += `COUNT=${event.recurrency.count};`;\r\n }\r\n\r\n if (event.recurrency.exceptions !== undefined) {\r\n event.recurrency.exceptions.forEach((date) => {\r\n if (icsEvent.exdate === undefined) {\r\n icsEvent.exdate = {};\r\n }\r\n\r\n icsEvent.exdate[moment(date).format(\"YYYYMMDD\")] = date;\r\n });\r\n }\r\n\r\n return icsEvent;\r\n}\r\n\r\nfunction updateIcs(ics: ICSFile, event: CalendarEvent): ICSFile {\r\n if (ics[event.resource.id] === undefined) {\r\n return addEventIcs(ics, event);\r\n }\r\n\r\n let ev = ics[event.resource.id];\r\n\r\n ev.summary = event.title;\r\n ev.start = event.start;\r\n ev.end = event.end;\r\n\r\n const updatedEv = updateIcsEventRecurrency(ev, event);\r\n\r\n if (updatedEv === null) {\r\n delete ics[event.resource.id];\r\n return ics;\r\n }\r\n\r\n ev = updatedEv;\r\n\r\n ev['event-type'] = eventTypeToString(event.resource.type);\r\n\r\n if (event.resource.type === EventType.HAPPY_HOUR) {\r\n ev['percentage'] = event.resource.percentage;\r\n }\r\n\r\n ev.allDay = event.allDay;\r\n\r\n ics[event.resource.id] = ev;\r\n\r\n return ics;\r\n}\r\n\r\nfunction addEventIcs(ics: ICSFile, event: CalendarEvent): ICSFile {\r\n let ev: ICSFileEvent = {\r\n type: \"VEVENT\",\r\n summary: event.title,\r\n start: event.start,\r\n end: event.end,\r\n 'event-type': eventTypeToString(event.resource.type),\r\n };\r\n\r\n if (event.resource.type === EventType.HAPPY_HOUR) {\r\n ev[\"percentage\"] = event.resource.percentage;\r\n }\r\n\r\n const updatedEv = updateIcsEventRecurrency(ev, event);\r\n if (updatedEv === null) {\r\n return ics;\r\n }\r\n\r\n ev = updatedEv;\r\n\r\n ics[event.resource.id] = ev;\r\n\r\n return ics;\r\n}\r\n\r\nexport function updateIcsEvents(ics: string, events: CalendarEvent[]): string {\r\n let data: ICSFile = ical.parseICS(ics);\r\n\r\n for (const event of events) {\r\n data = updateIcs(data, event);\r\n }\r\n\r\n const str = stringifyIcs(data);\r\n\r\n return str;\r\n}\r\n\r\nexport function deleteIcsEvent(ics: string, event: CalendarEvent): string {\r\n let data: ICSFile = ical.parseICS(ics);\r\n\r\n delete data[event.resource.id];\r\n\r\n const str = stringifyIcs(data);\r\n\r\n return str;\r\n}\r\n\r\n\r\nexport function eventsFromIcs(ics: string, type: EventType = EventType.UNKNOWN): CalendarEvent[] {\r\n\r\n const data: ICSFile = ical.parseICS(ics);\r\n\r\n return Object.entries(data).filter(([_, ev]) => ev.type === \"VEVENT\").map(([uid, ev]) => {\r\n const event: CalendarEvent = {\r\n title: typeof ev.summary === 'string' ? ev.summary : 'TITLE NOT FOUND',\r\n allDay: ev.start[\"dateOnly\"] ?? false,\r\n start: moment(ev.start).utc().toDate(),\r\n end: moment(ev.end).utc().toDate(),\r\n resource: {\r\n id: uid,\r\n type: stringToEventType(ev['event-type'], type),\r\n percentage: ev['percentage']\r\n },\r\n };\r\n\r\n if (ev.rrule === undefined) {\r\n return event;\r\n }\r\n\r\n\r\n const rrule: RRule = {}\r\n\r\n ev.rrule.split(\";\").forEach((parameter: string) => {\r\n const [key, value] = parameter.split(\"=\");\r\n\r\n rrule[key.toLowerCase()] = value;\r\n });\r\n\r\n let interval = parseInt(rrule.interval ?? \"1\");\r\n\r\n if (isNaN(interval)) {\r\n console.log(\"Invalid interval setting it to 1\");\r\n interval = 1;\r\n }\r\n\r\n event.recurrency = {\r\n interval: interval,\r\n frequency: getFreqencyFromRRule(rrule.freq),\r\n until: rrule.until !== undefined ? moment.utc(rrule.until).local().toDate() : undefined,\r\n count: rrule.count !== undefined ? parseInt(rrule.count) ?? 1 : undefined\r\n }\r\n\r\n if (ev.exdate !== undefined) {\r\n event.recurrency.exceptions = Object.entries(ev.exdate).map(([_, date]: [string, Date]) => moment.utc(date).local().toDate());\r\n }\r\n\r\n return event;\r\n });\r\n}","import { RootReducer } from \"../../reducers\";\n\nexport const stationCalendarSelector = (\n state: RootReducer\n): StationCalendarMap => {\n return state.calendar.stationCalendarResponse ?? {};\n}","import { FC, useEffect, useState } from 'react'\r\nimport { EventCalendar } from 'components/common/Calendar';\r\nimport { CalendarEvent, DisplayEvent, EventType, SlotInfo } from 'components/common/Calendar/types';\r\nimport { FormDialog } from 'components/common/Dialog/FormDialog';\r\nimport { DialogEvent, DIALOG_TYPES, ImportEvent, SelectedEvent, CheckedDialogEvent } from './types';\r\nimport { FIELD_TYPES, FormDialogProps } from 'components/common/Dialog/FormDialog/types';\r\n\r\nimport moment from 'moment';\r\nimport { bool, boolean, date, number, string } from 'yup';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useMount } from 'hooks/useMount';\r\nimport { deleteIcsEvent, eventsFromIcs, updateIcsEvents } from './ics';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { stationsSelector } from '../../../store/modules/stations/selectors';\r\nimport { Station } from '../../../store/modules/stations/types';\r\nimport { stationCalendarSelector } from '../../../store/modules/calendar/selectors';\r\n\r\nimport * as calendarActions from \"../../../store/modules/calendar/actions\";\r\nimport * as stationActions from \"../../../store/modules/stations/actions\";\r\nimport { useUnmount } from 'hooks/useUnmount';\r\nimport { Dropdown } from 'components/common/Dropdown';\r\nimport { SelectChangeEvent } from '@mui/material';\r\nimport { enqueueSnackbar } from '../../../store/modules/notifications/actions';\r\nimport { put } from 'redux-saga/effects';\r\nimport { EnvironmentPlugin } from 'webpack';\r\n\r\n\r\n\r\nexport const CalendarPage: FC = () => {\r\n const [t, i18n] = useTranslation();\r\n\r\n const dispatch = useDispatch();\r\n\r\n const stations: Station[] = Object.values(useSelector(stationsSelector));\r\n const [selectedCalendar, setSelectedCalendar] = useState('default');\r\n const calendars: StationCalendarMap = useSelector(stationCalendarSelector);\r\n\r\n const [selectedEvent, setSelectedEvent] = useState(null);\r\n const [events, setEvents] = useState([]);\r\n\r\n useMount(() => {\r\n dispatch(stationActions.getStations.started({}));\r\n });\r\n\r\n useEffect(() => {\r\n if (stations.length > 0 && stations.length !== Object.keys(calendars).length - 1) {\r\n dispatch(calendarActions.getStationCalendar.started({ stationIds: stations.map(station => station.id) }));\r\n }\r\n }, [stations]);\r\n\r\n useEffect(() => {\r\n if (calendars[selectedCalendar] === undefined) {\r\n return;\r\n }\r\n\r\n const ics = calendars[selectedCalendar];\r\n const events = eventsFromIcs(ics);\r\n setEvents(events);\r\n }, [calendars, selectedCalendar]);\r\n\r\n\r\n useUnmount(() => {\r\n dispatch(calendarActions.clear());\r\n });\r\n\r\n const getCalendarSelectOptions: () => Record = () => {\r\n const items = {};\r\n\r\n items[\"default\"] = {\r\n name: t('calendar.dropdown.default')\r\n };\r\n\r\n stations.forEach(station => {\r\n items[station.id] = {\r\n name: station.name\r\n };\r\n });\r\n\r\n return items;\r\n };\r\n\r\n const storeIcs = (action: (string, any) => string, argument) => {\r\n if (selectedCalendar === 'default') {\r\n stations.forEach(station => {\r\n const ics = calendars[station.id];\r\n const newIcs = action(ics, argument);\r\n dispatch(calendarActions.putStationCalendar.started({ stationId: station.id, Calendar: newIcs }));\r\n calendars[station.id] = newIcs;\r\n });\r\n\r\n const ics = calendars[selectedCalendar];\r\n const newIcs = action(ics, argument);\r\n dispatch(calendarActions.putCalendar.started({ Calendar: newIcs }));\r\n calendars[selectedCalendar] = newIcs;\r\n return;\r\n }\r\n\r\n const ics = calendars[selectedCalendar];\r\n const newIcs = action(ics, argument);\r\n dispatch(calendarActions.putStationCalendar.started({ stationId: selectedCalendar, Calendar: newIcs }));\r\n calendars[selectedCalendar] = newIcs;\r\n }\r\n\r\n\r\n const [dialog, setDialog] = useState<{\r\n type: DIALOG_TYPES;\r\n isOpened: boolean;\r\n }>({ type: DIALOG_TYPES.CREATE, isOpened: false });\r\n\r\n const closeDialog = () => {\r\n setDialog({ ...dialog, isOpened: false });\r\n setSelectedEvent(null);\r\n }\r\n\r\n const checkEvent = (event: DialogEvent): boolean => {\r\n if (event.title == null || event.title.length === 0) {\r\n dispatch(enqueueSnackbar({ message: 'calendar.dialogs.error.title', variant: 'error' }));\r\n return false;\r\n }\r\n\r\n if (event.start == null) {\r\n dispatch(enqueueSnackbar({ message: 'calendar.dialogs.error.start', variant: 'error' }));\r\n return false;\r\n }\r\n\r\n if (event.end == null) {\r\n dispatch(enqueueSnackbar({ message: 'calendar.dialogs.error.end', variant: 'error' }));\r\n return false;\r\n }\r\n\r\n if (event.start > event.end) {\r\n dispatch(enqueueSnackbar({ message: 'calendar.dialogs.error.start-before-end', variant: 'error' }));\r\n return false;\r\n }\r\n\r\n if (event.type == null || isNaN(parseInt(event.type.toString())) || event.type === EventType.UNKNOWN) {\r\n dispatch(enqueueSnackbar({ message: 'calendar.dialogs.error.type', variant: 'error' }));\r\n return false;\r\n }\r\n\r\n if (event.type === EventType.HAPPY_HOUR &&\r\n (event.percentage == null || isNaN(parseInt(event.percentage.toString())) || event.percentage > 100 || event.percentage < 0)) {\r\n dispatch(enqueueSnackbar({ message: 'calendar.dialogs.error.percentage', variant: 'error' }));\r\n return false;\r\n }\r\n\r\n if (event.recurrency !== false) {\r\n if (event.count != null && event.count <= 0) {\r\n dispatch(enqueueSnackbar({ message: 'calendar.dialogs.error.count.positive-value', variant: 'error' }));\r\n return false;\r\n }\r\n\r\n\r\n if (event.interval == null || isNaN(parseInt(event.interval.toString())) || event.interval < 1) {\r\n dispatch(enqueueSnackbar({ message: 'calendar.dialogs.error.interval', variant: 'error' }));\r\n return false;\r\n }\r\n\r\n if (event.frequency == null || event.frequency.length === 0) {\r\n dispatch(enqueueSnackbar({ message: 'calendar.dialogs.error.frequency', variant: 'error' }));\r\n return false;\r\n }\r\n }\r\n\r\n\r\n return true;\r\n }\r\n\r\n const createEvent = (newEvent: DialogEvent) => {\r\n if (!checkEvent(newEvent)) {\r\n return;\r\n }\r\n\r\n const checkedEvent = newEvent as CheckedDialogEvent;\r\n\r\n const start = moment(checkedEvent.start).toDate();\r\n const end = moment(checkedEvent.end).toDate();\r\n\r\n if (checkedEvent.allDay) {\r\n start.setHours(12, 0, 0, 0);\r\n end.setHours(12, 0, 0, 0);\r\n }\r\n\r\n const event: CalendarEvent = {\r\n title: checkedEvent.title,\r\n allDay: checkedEvent.allDay,\r\n start: start,\r\n end: end,\r\n resource: {\r\n id: crypto[\"randomUUID\"](),\r\n type: checkedEvent.type,\r\n percentage: checkedEvent.percentage\r\n }\r\n };\r\n\r\n if (checkedEvent.recurrency !== false) {\r\n\r\n event.recurrency = {\r\n interval: checkedEvent.interval,\r\n frequency: checkedEvent.frequency\r\n }\r\n\r\n if (checkedEvent.until !== undefined) {\r\n event.recurrency.until = checkedEvent.until;\r\n }\r\n\r\n if (checkedEvent.count !== undefined) {\r\n event.recurrency.count = checkedEvent.count;\r\n }\r\n }\r\n\r\n\r\n storeIcs(updateIcsEvents, [event]);\r\n setEvents([...events, event]);\r\n closeDialog();\r\n }\r\n\r\n const editEvent = (event: DialogEvent) => {\r\n if (!selectedEvent) {\r\n return;\r\n }\r\n\r\n if (!checkEvent(event)) {\r\n return;\r\n }\r\n const checkedEvent = event as CheckedDialogEvent;\r\n\r\n const start = moment(checkedEvent.start).toDate();\r\n const end = moment(checkedEvent.end).toDate();\r\n\r\n if (checkedEvent.allDay) {\r\n start.setHours(0, 0, 0, 0);\r\n end.setHours(23, 59, 59, 999);\r\n }\r\n\r\n const oldEvent: CalendarEvent = selectedEvent.calendarEvent;\r\n\r\n let uid = oldEvent.resource.id;\r\n\r\n if (oldEvent.recurrency !== undefined) {\r\n oldEvent.recurrency.until = moment(selectedEvent.start).add(-1, oldEvent.recurrency.frequency).toDate();\r\n uid = crypto[\"randomUUID\"]();\r\n }\r\n\r\n const newEvent: CalendarEvent = {\r\n title: checkedEvent.title,\r\n allDay: checkedEvent.allDay,\r\n start: start,\r\n end: end,\r\n resource: {\r\n id: uid,\r\n type: checkedEvent.type,\r\n percentage: checkedEvent.percentage\r\n }\r\n };\r\n\r\n if (checkedEvent.recurrency !== false) {\r\n newEvent.recurrency = {\r\n interval: checkedEvent.interval,\r\n frequency: checkedEvent.frequency\r\n };\r\n\r\n if (checkedEvent.count !== undefined) {\r\n newEvent.recurrency.count = checkedEvent.count;\r\n }\r\n\r\n if (checkedEvent.until !== undefined) {\r\n newEvent.recurrency.until = checkedEvent.until;\r\n }\r\n }\r\n\r\n\r\n const idx = events.findIndex(e => e.resource.id === oldEvent.resource.id)\r\n\r\n if (uid === oldEvent.resource.id) {\r\n events[idx] = newEvent;\r\n } else if (idx !== -1) {\r\n events[idx] = oldEvent;\r\n events.push(newEvent);\r\n }\r\n\r\n storeIcs(updateIcsEvents, [oldEvent, newEvent]);\r\n\r\n setEvents([...events]);\r\n closeDialog();\r\n }\r\n\r\n const deleteAllSelectedEvent = () => {\r\n if (!selectedEvent) {\r\n return;\r\n }\r\n\r\n const calendarEventId = selectedEvent.calendarEvent.resource.id;\r\n\r\n storeIcs(deleteIcsEvent, selectedEvent.calendarEvent);\r\n setEvents(events.filter(e => e.resource.id !== calendarEventId));\r\n closeDialog();\r\n }\r\n\r\n const deleteFollowingSelectedEvent = () => {\r\n if (!selectedEvent) {\r\n return;\r\n }\r\n\r\n const calendarEvent = selectedEvent.calendarEvent;\r\n\r\n if (calendarEvent.recurrency === undefined) {\r\n return;\r\n }\r\n\r\n calendarEvent.recurrency.until = moment(selectedEvent.start).add(-1, calendarEvent.recurrency.frequency).toDate();\r\n\r\n const idx = events.findIndex(e => e.resource.id === calendarEvent.resource.id);\r\n\r\n if (idx !== -1) {\r\n events[idx] = calendarEvent;\r\n storeIcs(updateIcsEvents, [calendarEvent]);\r\n } else {\r\n console.error(\"Error: event not found\");\r\n }\r\n\r\n setEvents([...events]);\r\n closeDialog();\r\n }\r\n\r\n const deleteSelectedEvent = () => {\r\n if (!selectedEvent) {\r\n return;\r\n }\r\n\r\n const calendarEvent = selectedEvent.calendarEvent;\r\n\r\n if (calendarEvent.recurrency === undefined) {\r\n storeIcs(deleteIcsEvent, calendarEvent);\r\n setEvents(events.filter(e => e.resource.id !== calendarEvent.resource.id));\r\n closeDialog();\r\n return;\r\n }\r\n\r\n if (calendarEvent.start === selectedEvent.start) {\r\n calendarEvent.start = moment(selectedEvent.start)\r\n .add(calendarEvent.recurrency.interval, calendarEvent.recurrency.frequency)\r\n .toDate();\r\n\r\n storeIcs(updateIcsEvents, [calendarEvent]);\r\n setEvents([...events]);\r\n closeDialog();\r\n return;\r\n }\r\n\r\n if (calendarEvent.recurrency.exceptions === undefined) {\r\n calendarEvent.recurrency.exceptions = [];\r\n }\r\n\r\n calendarEvent.recurrency.exceptions.push(selectedEvent.start);\r\n\r\n const idx = events.findIndex(e => e.resource.id === calendarEvent.resource.id);\r\n\r\n if (idx !== -1) {\r\n events[idx] = calendarEvent;\r\n } else {\r\n console.error(\"Error: event not found\");\r\n }\r\n\r\n storeIcs(updateIcsEvents, [calendarEvent]);\r\n setEvents([...events]);\r\n closeDialog();\r\n }\r\n\r\n const importEvents = (importEvent: ImportEvent) => {\r\n if (importEvent.file.length === 0) {\r\n return;\r\n }\r\n\r\n const reader = new FileReader();\r\n reader.onload = (e) => {\r\n const text = e.target?.result;\r\n if (!text) {\r\n return;\r\n }\r\n\r\n const newEvents = eventsFromIcs(text.toString(), importEvent.type);\r\n if (importEvent.type === EventType.HAPPY_HOUR) {\r\n for (const event of newEvents) {\r\n event.resource.percentage = importEvent.percentage;\r\n }\r\n }\r\n\r\n storeIcs(updateIcsEvents, newEvents);\r\n setEvents([...events, ...newEvents]);\r\n };\r\n\r\n for (let i = 0; i < importEvent.file.length; i++) {\r\n const file = importEvent.file[i];\r\n reader.readAsText(file);\r\n }\r\n\r\n closeDialog();\r\n }\r\n\r\n const eventTypeSelectOptions = [\r\n { value: EventType.HAPPY_HOUR, label: \"Happy Hour\" },\r\n { value: EventType.HOLIDAY, label: \"Holiday\" },\r\n ];\r\n\r\n const endConditionDefaultValue = () => {\r\n const recurrency = selectedEvent?.calendarEvent.recurrency;\r\n\r\n if (recurrency?.until) {\r\n return 'date';\r\n }\r\n\r\n if (recurrency?.count) {\r\n return 'count';\r\n }\r\n\r\n return 'never';\r\n }\r\n\r\n const dialogProps: {\r\n [key in DIALOG_TYPES]: Omit;\r\n } = {\r\n [DIALOG_TYPES.CREATE]: {\r\n title: t(\"calendar.dialogs.create-menu.title\"),\r\n confirmButtonLabel: t(\"calendar.dialogs.create-menu.actions.confirm\"),\r\n cancelButtonLabel: t(\"calendar.dialogs.create-menu.actions.cancel\"),\r\n onConfirm: createEvent,\r\n fields: [\r\n {\r\n name: \"title\",\r\n label: t(\"calendar.dialogs.create-edit-menu.name\"),\r\n rules: date().required(),\r\n type: FIELD_TYPES.TEXT,\r\n defaultValue: selectedEvent?.title,\r\n },\r\n {\r\n name: \"allDay\",\r\n label: t(\"calendar.dialogs.create-edit-menu.all-day\"),\r\n rules: boolean().required(),\r\n type: FIELD_TYPES.SWITCH,\r\n defaultValue: selectedEvent?.allDay,\r\n },\r\n {\r\n name: \"start\",\r\n label: t(\"calendar.dialogs.create-edit-menu.start\"),\r\n rules: date().required(),\r\n type: FIELD_TYPES.DATE_TIME_PICKER,\r\n defaultValue: selectedEvent?.start,\r\n isHidden: (fieldValues) => fieldValues.allDay as boolean\r\n },\r\n {\r\n name: \"end\",\r\n label: t(\"calendar.dialogs.create-edit-menu.end\"),\r\n rules: date().required(),\r\n type: FIELD_TYPES.DATE_TIME_PICKER,\r\n defaultValue: selectedEvent?.end,\r\n minDate: (fieldValues) => fieldValues.start,\r\n isHidden: (fieldValues) => fieldValues.allDay as boolean\r\n },\r\n {\r\n name: \"start\",\r\n label: t(\"calendar.dialogs.create-edit-menu.start\"),\r\n rules: date().required(),\r\n type: FIELD_TYPES.DATE_PICKER,\r\n isStartOfTheDay: true,\r\n defaultValue: selectedEvent?.start,\r\n isHidden: (fieldValues) => !fieldValues.allDay\r\n },\r\n {\r\n name: \"end\",\r\n label: t(\"calendar.dialogs.create-edit-menu.end\"),\r\n rules: date().required(),\r\n type: FIELD_TYPES.DATE_PICKER,\r\n isEndOfTheDay: true,\r\n defaultValue: selectedEvent?.end,\r\n minDate: (fieldValues) => fieldValues.start,\r\n isHidden: (fieldValues) => !fieldValues.allDay\r\n },\r\n {\r\n name: \"type\",\r\n label: t(\"calendar.dialogs.create-edit-menu.type\"),\r\n rules: string().required(),\r\n type: FIELD_TYPES.SELECT,\r\n options: eventTypeSelectOptions,\r\n defaultValue: selectedEvent?.calendarEvent.resource.type,\r\n },\r\n {\r\n name: \"percentage\",\r\n label: t(\"calendar.dialogs.create-edit-menu.percentage\"),\r\n rules: number().required(),\r\n type: FIELD_TYPES.NUMBER,\r\n isHidden: (fieldValues) => fieldValues.type !== EventType.HAPPY_HOUR\r\n },\r\n {\r\n name: \"recurrency\",\r\n label: t(\"calendar.dialogs.create-edit-menu.recurring\"),\r\n rules: bool().required(),\r\n type: FIELD_TYPES.SWITCH,\r\n defaultValue: selectedEvent?.calendarEvent.recurrency != null ?? false,\r\n },\r\n {\r\n name: \"endCondition\",\r\n label: t(\"calendar.dialogs.create-edit-menu.end-condition\"),\r\n rules: string().required(),\r\n type: FIELD_TYPES.SELECT,\r\n isHidden: (fieldValues) => !fieldValues.recurrency,\r\n options: [\r\n { value: \"count\", label: t(\"calendar.dialogs.create-edit-menu.end-condition-options.count\") },\r\n { value: \"date\", label: t(\"calendar.dialogs.create-edit-menu.end-condition-options.date\") },\r\n { value: \"never\", label: t(\"calendar.dialogs.create-edit-menu.end-condition-options.never\") }\r\n ],\r\n },\r\n {\r\n name: \"count\",\r\n label: t(\"calendar.dialogs.create-edit-menu.end-condition-options.count\"),\r\n rules: number().required(),\r\n type: FIELD_TYPES.NUMBER,\r\n isHidden: (fieldValues) => !fieldValues.recurrency || fieldValues.endCondition !== \"count\",\r\n defaultValue: selectedEvent?.calendarEvent.recurrency?.count,\r\n },\r\n {\r\n name: \"until\",\r\n label: t(\"calendar.dialogs.create-edit-menu.end-condition-options.date\"),\r\n rules: date().required(),\r\n type: FIELD_TYPES.DATE_PICKER,\r\n isHidden: (fieldValues) => !fieldValues.recurrency || fieldValues.endCondition !== \"date\",\r\n defaultValue: selectedEvent?.calendarEvent.recurrency?.until,\r\n },\r\n {\r\n name: \"interval\",\r\n label: t(\"calendar.dialogs.create-edit-menu.interval\"),\r\n rules: number().required(),\r\n type: FIELD_TYPES.NUMBER,\r\n isHidden: (fieldValues) => !fieldValues.recurrency,\r\n defaultValue: selectedEvent?.calendarEvent.recurrency?.interval,\r\n },\r\n {\r\n name: \"frequency\",\r\n label: t(\"calendar.dialogs.create-edit-menu.frequency\"),\r\n rules: string().required(),\r\n type: FIELD_TYPES.SELECT,\r\n isHidden: (fieldValues) => !fieldValues.recurrency,\r\n options: [\r\n { value: \"day\", label: t(\"calendar.dialogs.create-edit-menu.frequency-options.day\") },\r\n { value: \"week\", label: t(\"calendar.dialogs.create-edit-menu.frequency-options.week\") },\r\n { value: \"month\", label: t(\"calendar.dialogs.create-edit-menu.frequency-options.month\") },\r\n { value: \"year\", label: t(\"calendar.dialogs.create-edit-menu.frequency-options.year\") }\r\n ],\r\n }\r\n ],\r\n },\r\n [DIALOG_TYPES.IMPORT]: {\r\n title: t(\"calendar.dialogs.import-menu.title\"),\r\n confirmButtonLabel: t(\"calendar.dialogs.import-menu.actions.confirm\"),\r\n cancelButtonLabel: t(\"calendar.dialogs.import-menu.actions.cancel\"),\r\n onConfirm: importEvents,\r\n fields: [\r\n {\r\n name: \"file\",\r\n label: t(\"calendar.dialogs.import-menu.file\"),\r\n type: FIELD_TYPES.FILE,\r\n acceptFileTypes: \".ics\"\r\n },\r\n {\r\n name: \"type\",\r\n label: t(\"calendar.dialogs.import-menu.type\"),\r\n rules: string().required(),\r\n type: FIELD_TYPES.SELECT,\r\n options: eventTypeSelectOptions,\r\n },\r\n {\r\n name: \"percentage\",\r\n label: t(\"calendar.dialogs.create-edit-menu.percentage\"),\r\n rules: number().required(),\r\n type: FIELD_TYPES.NUMBER,\r\n isHidden: (fieldValues) => fieldValues.type !== EventType.HAPPY_HOUR,\r\n }\r\n ]\r\n },\r\n [DIALOG_TYPES.EDIT]: {\r\n title: t(\"calendar.dialogs.edit-menu.title\"),\r\n confirmButtonLabel: t(\"calendar.dialogs.edit-menu.actions.confirm\"),\r\n cancelButtonLabel: t(\"calendar.dialogs.edit-menu.actions.cancel\"),\r\n onConfirm: editEvent,\r\n extraButtons: [\r\n {\r\n label: t(\"calendar.dialogs.edit-menu.actions.delete-all\"),\r\n handler: deleteAllSelectedEvent,\r\n color: {\r\n background: \"red\",\r\n text: \"white\"\r\n },\r\n locked: () => selectedEvent?.calendarEvent.recurrency == null\r\n },\r\n {\r\n label: t(\"calendar.dialogs.edit-menu.actions.delete-future\"),\r\n handler: deleteFollowingSelectedEvent,\r\n color: {\r\n background: \"red\",\r\n text: \"white\"\r\n },\r\n locked: () => selectedEvent?.calendarEvent.recurrency == null\r\n },\r\n {\r\n label: t(\"calendar.dialogs.edit-menu.actions.delete-this\"),\r\n handler: deleteSelectedEvent,\r\n color: {\r\n background: \"red\",\r\n text: \"white\"\r\n }\r\n }\r\n ],\r\n fields: [\r\n {\r\n name: \"title\",\r\n label: t(\"calendar.dialogs.create-edit-menu.name\"),\r\n rules: string().required(),\r\n type: FIELD_TYPES.TEXT,\r\n defaultValue: selectedEvent?.title,\r\n },\r\n {\r\n name: \"allDay\",\r\n label: t(\"calendar.dialogs.create-edit-menu.all-day\"),\r\n rules: boolean().required(),\r\n type: FIELD_TYPES.SWITCH,\r\n defaultValue: selectedEvent?.allDay,\r\n },\r\n {\r\n name: \"start\",\r\n label: t(\"calendar.dialogs.create-edit-menu.start\"),\r\n rules: string().required(),\r\n type: FIELD_TYPES.DATE_TIME_PICKER,\r\n defaultValue: selectedEvent?.start,\r\n isHidden: (fieldValues) => fieldValues.allDay as boolean\r\n },\r\n {\r\n name: \"end\",\r\n label: t(\"calendar.dialogs.create-edit-menu.end\"),\r\n rules: string().required(),\r\n type: FIELD_TYPES.DATE_TIME_PICKER,\r\n defaultValue: selectedEvent?.end,\r\n minDate: (fieldValues) => fieldValues.start,\r\n isHidden: (fieldValues) => fieldValues.allDay as boolean\r\n },\r\n {\r\n name: \"start\",\r\n label: t(\"calendar.dialogs.create-edit-menu.start\"),\r\n rules: string().required(),\r\n type: FIELD_TYPES.DATE_PICKER,\r\n defaultValue: selectedEvent?.start,\r\n isStartOfTheDay: true,\r\n isHidden: (fieldValues) => !fieldValues.allDay\r\n },\r\n {\r\n name: \"end\",\r\n label: t(\"calendar.dialogs.create-edit-menu.end\"),\r\n rules: date().required(),\r\n type: FIELD_TYPES.DATE_PICKER,\r\n defaultValue: selectedEvent?.end,\r\n isEndOfTheDay: true,\r\n minDate: (fieldValues) => fieldValues.start,\r\n isHidden: (fieldValues) => !fieldValues.allDay\r\n },\r\n {\r\n name: \"type\",\r\n label: t(\"calendar.dialogs.create-edit-menu.type\"),\r\n rules: string().required(),\r\n type: FIELD_TYPES.SELECT,\r\n options: eventTypeSelectOptions,\r\n defaultValue: selectedEvent?.calendarEvent.resource.type,\r\n },\r\n {\r\n name: \"percentage\",\r\n label: t(\"calendar.dialogs.create-edit-menu.percentage\"),\r\n rules: number().required(),\r\n type: FIELD_TYPES.NUMBER,\r\n isHidden: (fieldValues) => fieldValues.type !== EventType.HAPPY_HOUR,\r\n defaultValue: selectedEvent?.calendarEvent.resource.percentage\r\n },\r\n {\r\n name: \"recurrency\",\r\n label: t(\"calendar.dialogs.create-edit-menu.recurring\"),\r\n rules: bool().required(),\r\n type: FIELD_TYPES.SWITCH,\r\n defaultValue: selectedEvent?.calendarEvent.recurrency != null ?? false,\r\n },\r\n {\r\n name: \"endCondition\",\r\n label: t(\"calendar.dialogs.create-edit-menu.end-condition\"),\r\n rules: string().required(),\r\n type: FIELD_TYPES.SELECT,\r\n isHidden: (fieldValues) => !fieldValues.recurrency,\r\n options: [\r\n { value: \"count\", label: t(\"calendar.dialogs.create-edit-menu.end-condition-options.count\") },\r\n { value: \"date\", label: t(\"calendar.dialogs.create-edit-menu.end-condition-options.date\") },\r\n { value: \"never\", label: t(\"calendar.dialogs.create-edit-menu.end-condition-options.never\") }\r\n ],\r\n defaultValue: endConditionDefaultValue,\r\n },\r\n {\r\n name: \"count\",\r\n label: t(\"calendar.dialogs.create-edit-menu.end-condition-options.count\"),\r\n rules: number().required(),\r\n type: FIELD_TYPES.NUMBER,\r\n isHidden: (fieldValues) => !fieldValues.recurrency || fieldValues.endCondition !== \"count\",\r\n defaultValue: selectedEvent?.calendarEvent.recurrency?.count,\r\n },\r\n {\r\n name: \"until\",\r\n label: t(\"calendar.dialogs.create-edit-menu.end-condition-options.date\"),\r\n rules: date().required(),\r\n type: FIELD_TYPES.DATE_PICKER,\r\n isHidden: (fieldValues) => !fieldValues.recurrency || fieldValues.endCondition !== \"date\",\r\n defaultValue: selectedEvent?.calendarEvent.recurrency?.until,\r\n },\r\n {\r\n name: \"interval\",\r\n label: t(\"calendar.dialogs.create-edit-menu.interval\"),\r\n rules: number().required(),\r\n type: FIELD_TYPES.NUMBER,\r\n isHidden: (fieldValues) => !fieldValues.recurrency,\r\n defaultValue: selectedEvent?.calendarEvent.recurrency?.interval,\r\n },\r\n {\r\n name: \"frequency\",\r\n label: t(\"calendar.dialogs.create-edit-menu.frequency\"),\r\n rules: string().required(),\r\n type: FIELD_TYPES.SELECT,\r\n isHidden: (fieldValues) => !fieldValues.recurrency,\r\n options: [\r\n { value: \"day\", label: t(\"calendar.dialogs.create-edit-menu.frequency-options.day\") },\r\n { value: \"week\", label: t(\"calendar.dialogs.create-edit-menu.frequency-options.week\") },\r\n { value: \"month\", label: t(\"calendar.dialogs.create-edit-menu.frequency-options.month\") },\r\n { value: \"year\", label: t(\"calendar.dialogs.create-edit-menu.frequency-options.year\") }\r\n ],\r\n defaultValue: selectedEvent?.calendarEvent.recurrency?.frequency,\r\n }\r\n ],\r\n },\r\n }\r\n\r\n const onSelectEvent = (event: DisplayEvent) => {\r\n const id = event.resource.id;\r\n const selectedCalendarEvent: CalendarEvent | undefined = events.find((event) => event.resource.id === id);\r\n\r\n if (selectedCalendarEvent == null) {\r\n console.error(\"Event not found\", event);\r\n return;\r\n }\r\n\r\n const selectEvent: SelectedEvent = {\r\n title: event.title,\r\n start: event.start,\r\n end: event.end,\r\n allDay: event.allDay,\r\n calendarEvent: selectedCalendarEvent,\r\n }\r\n\r\n setSelectedEvent(selectEvent);\r\n setDialog({ type: DIALOG_TYPES.EDIT, isOpened: true })\r\n };\r\n\r\n const onSelectSlot = (slot: SlotInfo) => {\r\n if (slot.action === \"click\") {\r\n return;\r\n }\r\n\r\n console.log(slot);\r\n\r\n const start = moment(slot.start);\r\n const end = moment(slot.end);\r\n\r\n\r\n const startMillisDay = (parseInt(start.format(\"x\"))) % (24 * 60 * 60 * 1000);\r\n const endMillisDay = (parseInt(end.format(\"x\"))) % (24 * 60 * 60 * 1000);\r\n\r\n const allDay = startMillisDay === 0 && endMillisDay === 0;\r\n\r\n if (allDay) {\r\n end.subtract(1, \"millisecond\");\r\n }\r\n\r\n const newEvent: CalendarEvent = {\r\n title: \"\",\r\n allDay: allDay,\r\n start: start.toDate(),\r\n end: end.toDate(),\r\n resource: {\r\n id: crypto[\"randomUUID\"](),\r\n type: EventType.UNKNOWN\r\n }\r\n };\r\n\r\n const selectedEvent: SelectedEvent = {\r\n title: newEvent.title,\r\n allDay: newEvent.allDay,\r\n start: newEvent.start,\r\n end: newEvent.end,\r\n calendarEvent: newEvent,\r\n }\r\n\r\n console.log(selectedEvent);\r\n\r\n setSelectedEvent(selectedEvent);\r\n setDialog({ type: DIALOG_TYPES.CREATE, isOpened: true })\r\n };\r\n\r\n return (<>\r\n\r\n setSelectedCalendar(event.target.value)}\r\n items={getCalendarSelectOptions()}\r\n />\r\n\r\n setDialog({ type: DIALOG_TYPES.CREATE, isOpened: true })}\r\n importEvents={() => setDialog({ type: DIALOG_TYPES.IMPORT, isOpened: true })}\r\n onSelectEvent={onSelectEvent}\r\n onSelectSlot={onSelectSlot}\r\n />\r\n\r\n \r\n \r\n )\r\n}","import { useKeycloak } from \"@react-keycloak/web\";\nimport { Loader } from \"components/common/Loader\";\nimport { RequireAuth } from \"components/common/RequireAuth\";\nimport { Container } from \"components/Container\";\nimport * as authActions from \"../../store/modules/auth/actions\";\nimport { FC, useEffect } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { BrowserRouter, Redirect, Route, Switch } from \"react-router-dom\";\nimport { ROUTES } from \"../../constants\";\nimport { PaymentMethod } from \"../Pages/PaymentMethods\";\nimport { Plans } from \"../Pages/Plans\";\nimport { Programs } from \"../Pages/Programs\";\nimport { RestoreConfigTool } from \"../Pages/RestoreConfigTool\";\nimport { userSelector } from \"../../store/modules/auth/selectors\";\nimport { Transactions } from \"components/Pages/Transactions\";\nimport { CalendarPage } from \"components/Pages/Calendar\";\n\nexport const Router: FC = () => {\n const dispatch = useDispatch();\n const { keycloak } = useKeycloak();\n const user = useSelector(userSelector);\n\n useEffect(() => {\n if (!keycloak.authenticated) {\n void keycloak.login();\n } else {\n dispatch(authActions.getUserDetails.started({}));\n }\n }, [keycloak, keycloak.authenticated, dispatch]);\n\n return keycloak.authenticated ? (\n \n \n \n }\n />\n (\n \n \n \n )}\n />\n (\n \n \n \n )}\n />\n (\n \n \n \n )}\n />\n (\n \n \n \n )}\n />\n (\n \n \n \n )}\n />\n {user?.attributes?.config_tool &&\n user.attributes.config_tool[0] === \"true\" && (\n (\n \n \n \n )}\n />\n )}\n } />\n \n \n \n ) : (\n \n );\n};\n","import { RootReducer } from \"../../reducers\";\n\nexport const notificationsSelector = (state: RootReducer) => state.notifications.notifications;\n","import { useEffect } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useSnackbar } from 'notistack';\nimport { removeSnackbar } from '../../../store/modules/notifications/actions';\nimport { notificationsSelector } from '../../../store/modules/notifications/selectors';\nimport { useTranslation } from \"react-i18next\";\n\nlet displayed: any = [];\n\nconst useNotifier = () => {\n const { t } = useTranslation();\n const dispatch = useDispatch();\n const notifications = useSelector(notificationsSelector);\n const { enqueueSnackbar, closeSnackbar } = useSnackbar();\n\n const storeDisplayed = (id: any) => {\n displayed = [...displayed, id];\n };\n\n const removeDisplayed = (id) => {\n displayed = [...displayed.filter(key => id !== key)];\n };\n\n useEffect(() => {\n notifications.forEach(({ key, message, options = {}, dismissed = false }: any) => {\n if (dismissed) {\n closeSnackbar(key);\n return;\n }\n\n // do nothing if snackbar is already displayed\n if (displayed.includes(key)) return;\n\n enqueueSnackbar(t(message), {\n key,\n ...options,\n onClose: (event, reason, myKey) => {\n if ((options as any).onClose) {\n (options as any).onClose(event, reason, myKey);\n }\n },\n onExited: (event, myKey) => {\n // remove this snackbar from redux store\n dispatch(removeSnackbar(myKey));\n removeDisplayed(myKey);\n },\n });\n\n // keep track of snackbars that we've displayed\n storeDisplayed(key);\n });\n }, [notifications, closeSnackbar, enqueueSnackbar, dispatch]);\n};\n\nexport default useNotifier;\n","import { FC } from \"react\";\nimport { Router } from \"../Router\";\nimport useNotifier from \"components/common/Notification/useNotifier\";\n\nexport const MainView: FC = () => {\n useNotifier();\n\n return ()\n}\n","import api from \"!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../node_modules/css-loader/dist/cjs.js!./styles.css\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","import MuiGlobalStyles from \"@mui/material/GlobalStyles\";\nimport { FC } from \"react\";\nimport \"../../../assets/styles.css\";\n\nexport const GlobalStyles: FC = () => (\n \n);\n","import { useCallback, FC } from 'react'\nimport { useDispatch } from 'react-redux'\nimport Button from '@mui/material/Button';\nimport { closeSnackbar } from '../../../store/modules/notifications/actions';\nimport { useTranslation } from \"react-i18next\";\n\ntype CloseSnackbarParams = {\n id: string;\n}\n\nexport const CloseSnackbar: FC = ({ id }): any => {\n const dispatch = useDispatch();\n const { t } = useTranslation();\n\n const handleClose = useCallback((id) => {\n dispatch(closeSnackbar(id))\n }, [dispatch])\n\n return (\n handleClose(id)}\n sx={{ color: '#fff' }}\n >\n {t('uiComponents.closeSnackbar.title')}\n \n )\n}\n","import DateAdapter from \"@mui/lab/AdapterDateFns\";\nimport deLocale from 'date-fns/locale/de';\nimport enLocale from 'date-fns/locale/en-GB';\nimport LocalizationProvider from \"@mui/lab/LocalizationProvider\";\nimport CssBaseline from \"@mui/material/CssBaseline\";\nimport { StyledEngineProvider, ThemeProvider } from \"@mui/material/styles\";\nimport { ReactKeycloakProvider } from \"@react-keycloak/web\";\nimport { Head } from \"components/common/Head\";\nimport { Loader } from \"components/common/Loader\";\nimport { FC, useMemo, useState, createContext, useEffect } from \"react\";\nimport { Provider } from \"react-redux\";\nimport { initOptions, keycloak } from \"../../keycloak\";\nimport { store } from \"../../store/store\";\nimport { palette } from \"../../themes/palette\";\nimport { MainView } from \"components/MainView\";\nimport { GlobalStyles } from \"./styles\";\nimport { createTheme } from \"@mui/material/styles\";\nimport { useMount } from \"hooks/useMount\";\nimport { useTranslation } from \"react-i18next\";\nimport { SnackbarProvider } from 'notistack';\nimport { CloseSnackbar } from \"components/common/Notification/CloseSnackbar\";\n\nexport const ColorModeContext = createContext({ toggleColorMode: () => {} });\n\nexport const App: FC = () => {\n const [localeObj, setLocaleObj] = useState(undefined);\n const [mode, setMode] = useState<'light' | 'dark'>('light');\n const { i18n } = useTranslation();\n const colorMode = useMemo(\n () => ({\n toggleColorMode: () => {\n setMode((prevMode) => (prevMode === 'light' ? 'dark' : 'light'));\n },\n }),\n [],\n );\n\n const localeMap = {\n en: enLocale,\n de: deLocale,\n };\n useEffect(() => {\n const locale = localeMap[i18n.language];\n setLocaleObj(locale)\n }, [i18n.language])\n\n useMount(() => {\n const savedTheme: any = localStorage.getItem(\"theme\");\n if (savedTheme) setMode(savedTheme);\n })\n useEffect(() => {\n localStorage.setItem(\"theme\", mode);\n }, [mode])\n\n const theme = useMemo(\n () =>\n createTheme({\n palette: {\n mode,\n ...palette[mode],\n },\n }),\n [mode],\n );\n\n return (\n \n \n \n \n \n \n }\n >\n \n ()}\n >\n \n \n \n \n \n \n \n \n \n );\n};\n","import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport en from \"../src/translations/en/translation.json\";\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport de from \"../src/translations/de/translation.json\";\n\nexport const defaultNS = \"en\";\nexport const resources = {\n en: { translation: en },\n de: { translation: de }\n} as const;\n\nvoid i18n.use(initReactI18next).init({\n resources,\n lng: \"en\"\n});\n\nexport default i18n;\n","import { App } from \"components/App\";\nimport ReactDOM from \"react-dom\";\nimport { ELEMENT_IDS } from \"./constants\";\nimport \"./i18n\";\n\nReactDOM.render(, document.getElementById(ELEMENT_IDS.REACT_ROOT));\n","module.exports = __webpack_public_path__ + \"2839dfbe735ed7917463e389362c8bfe.svg\";","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunktsg_portal_client\"] = self[\"webpackChunktsg_portal_client\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [313], () => (__webpack_require__(13615)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","___CSS_LOADER_EXPORT___","___CSS_LOADER_URL_REPLACEMENT_0___","___CSS_LOADER_URL_REPLACEMENT_1___","___CSS_LOADER_URL_REPLACEMENT_2___","___CSS_LOADER_URL_REPLACEMENT_3___","___CSS_LOADER_URL_REPLACEMENT_4___","___CSS_LOADER_URL_REPLACEMENT_5___","___CSS_LOADER_URL_REPLACEMENT_6___","___CSS_LOADER_URL_REPLACEMENT_7___","___CSS_LOADER_URL_REPLACEMENT_8___","___CSS_LOADER_URL_REPLACEMENT_9___","___CSS_LOADER_URL_REPLACEMENT_10___","___CSS_LOADER_URL_REPLACEMENT_11___","___CSS_LOADER_URL_REPLACEMENT_12___","___CSS_LOADER_URL_REPLACEMENT_13___","___CSS_LOADER_URL_REPLACEMENT_14___","___CSS_LOADER_URL_REPLACEMENT_15___","___CSS_LOADER_URL_REPLACEMENT_16___","___CSS_LOADER_URL_REPLACEMENT_17___","___CSS_LOADER_URL_REPLACEMENT_18___","___CSS_LOADER_URL_REPLACEMENT_19___","___CSS_LOADER_URL_REPLACEMENT_20___","___CSS_LOADER_URL_REPLACEMENT_21___","___CSS_LOADER_URL_REPLACEMENT_22___","___CSS_LOADER_URL_REPLACEMENT_23___","___CSS_LOADER_URL_REPLACEMENT_24___","___CSS_LOADER_URL_REPLACEMENT_25___","___CSS_LOADER_URL_REPLACEMENT_26___","___CSS_LOADER_URL_REPLACEMENT_27___","push","module","id","map","webpackContext","req","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","exports","Head","title","titleText","Helmet","rel","href","Container","Spinner","CircularProgress","theme","spacing","Loader","text","rest","Typography","appConfig","window","config","initOptions","onLoad","checkLoginIframe","url","domain","realm","keycloak","clientId","actionCreator","logout","async","getUserDetails","reducer","reducerWithInitialState","isLoggingOut","isUserLoading","user","case","state","payload","result","getStations","getNestedStations","clear","stationsResponse","nestedStationsResponse","areStationsLoading","areNestedStationsLoading","getAllTerminals","terminalsResponse","areTerminalsLoading","getPaymentMethod","getPaymentMethods","createPaymentMethod","createVoucher","updatePaymentMethod","deletePaymentMethod","addCredit","paymentMethodsResponse","paymentMethod","isPaymentMethodLoading","arePaymentMethodsLoading","isPaymentMethodCreating","isPaymentMethodUpdating","isPaymentMethodDeleting","isAddingCredit","transactionsResponse","areTransactionsLoading","getPlan","getPlans","createPlan","updatePlan","deletePlan","plans","plan","isPlanLoading","arePlansLoading","isPlanCreating","isPlanUpdating","isPlanDeleting","getProgram","getPrograms","createProgram","updateProgram","deleteProgram","programs","program","isProgramLoading","areProgramsLoading","isProgramCreating","isProgramUpdating","isProgramDeleting","enqueueSnackbar","closeSnackbar","removeSnackbar","notifications","message","variant","res","key","Date","getTime","Math","random","options","notification","dismissed","filter","getStationCalendar","putCalendar","putStationCalendar","stationCalendarResponse","isCalendarLoading","rootReducer","auth","stations","terminals","paymentMethods","transactions","calendar","logoutSaga","error","getUserDetailsSaga","action","params","watcherSaga","axiosInstance","baseURL","withCredentials","getStationsSaga","token","defaults","headers","common","response","get","data","getNestedStationsSaga","station","terminalResponse","terminal","getAllTerminalsSaga","stationId","station_ids","partialResonse","getPaymentMethodSaga","getPaymentMethodsSaga","totalPages","parseInt","createPaymentMethodSaga","post","createVoucherSaga","updatePaymentMethodSaga","put","deletePaymentMethodSaga","addCreditSaga","getTransactionsSaga","transaction","external","paymentMethodResponse","pay_method_id","pay_method","ceil","total","getPlanSaga","getPlansSaga","createPlanSaga","updatePlanSaga","deletePlanSaga","getProgramSaga","getProgramsSaga","createProgramSaga","updateProgramSaga","deleteProgramSaga","getStationCalendarSaga","calendarResponse","default","Calendar","stationIds","putCalendarSaga","putStationCalendarSaga","putPayload","sagaMiddleware","store","run","palette","light","primary","main","lighter","contrastText","highlight","accent","secondary","darker","drawer","primarySelected","secondarySelected","today","todaySelected","border","events","focus","focusOutline","dark","ELEMENT_IDS","ROUTES","ROOT","PAY_METHODS","PLANS","PROGRAMS","TRANSACTIONS","CALENDAR","RESTORE_CONFIG_TOOL","RequireAuth","children","authenticated","to","pathname","from","location","ToggleTheme","useTheme","ColorModeContext","Consumer","toggleColorMode","IconButton","onClick","style","color","mode","Brightness4","Brightness7","usePrevious","value","ref","useRef","useEffect","current","Menu","items","onClose","anchorEl","isOpened","boundariesElement","placement","previousIsOpened","handleClose","contains","target","handlePaperKeyDown","includes","preventDefault","open","transition","modifiers","name","enabled","rootBoundary","document","getElementById","TransitionProps","Grow","Paper","onKeyDown","elevation","ClickAwayListener","onClickAway","MenuList","autoFocusItem","item","i","MenuItem","disabled","isDisabled","label","userSelector","DrawerHeader","LogoImgContainer","DrawerMenuList","List","IconContainer","props","active","ListItem","Link","Header","Toolbar","UsernameContainer","ContentContainer","useMount","callback","Content","dispatch","i18n","t","useTranslation","isUserMenuOpened","setIsUserMenuOpened","useState","isLocalisationMenuOpened","setIsLocalisationMenuOpened","pagesTitles","handleUserMenuButtonClick","useCallback","handleLocalisationMenuButtonClick","handleUserMenuClose","handleLocalisationMenuClose","userMenuButtonRef","localisationMenuButtonRef","handleSettingsMenuItemClick","accountManagement","handleLogoutMenuItemClick","handleTranslation","lang","changeLanguage","savedLang","localStorage","getItem","then","r","Box","sx","display","component","alignSelf","firstName","lastName","Boolean","join","String","username","Tooltip","AccountCircle","Language","setItem","menuItems","setMenuItems","currentRoute","values","find","route","path","exact","match","icon","TimeToLeave","Assignment","Event","Code","attributeDependency","language","isMenuHidden","textDecoration","src","alt","menuItem","inx","dependency","attributes","ListItemButton","role","undefined","renderMenuItems","BasicDatePicker","handleValue","initValue","isStartOfTheDay","isEndOfTheDay","minValue","maxValue","validationMessage","setValue","minDate","setMinDate","maxDate","setMaxDate","DatePicker","mask","en","de","disableHighlightToday","onChange","newValue","d","setHours","renderInput","TextField","fullWidth","marginTop","helperText","autoComplete","HelperText","CurrencyAmount","invisible","payloadValue","FormControl","height","opacity","InputLabel","htmlFor","Input","type","val","cents","round","inputProps","step","endAdornment","InputAdornment","position","SimpleSelect","autocomplete","option","setOption","Autocomplete","getOptionLabel","renderOption","isOptionEqualToValue","MultiSelect","multiple","limitTags","programsIdsList","PhoneNumber","defaultCountry","onlyCountries","countryCodeEditable","valueToSave","replace","InputProps","size","Clear","isNull","x","isString","isSelectOption","isObject","isUndefined","DialogTitle","DialogContent","FormDialogContent","LabelFieldText","ArrowUpward","ArrowDownward","LoaderContainer","FIELD_TYPES","FileUpload","acceptFileTypes","filename","setFilename","Button","startIcon","UploadFile","marginRight","accept","hidden","files","fileArray","Array","names","length","substring","BasicDateTimePicker","DateTimePicker","date","prototype","toString","call","isNaN","required","FormDialog","extraButtons","fields","yupNoSortEdges","onConfirm","onCancel","isLoading","cancelButtonLabel","confirmButtonLabel","isLocked","areDividersVisible","setAreDividersVisible","formDialogContentNode","setFormDialogContentNode","validationSchema","useMemo","shape","reduce","schemaObj","field","rules","handleSubmit","control","errors","watch","resolver","fieldValues","handleCancelButtonClick","onSubmit","reason","getErrorMessage","fieldError","isArray","some","acc","cur","PASSWORD","handleResize","scrollHeight","clientHeight","addEventListener","removeEventListener","handleFormDialogContentRef","node","FORM_ID","renderExplanation","explanation","Info","scroll","dividers","isHidden","currentType","defaultValue","payloadValueOfCondition","fn","SWITCH","FormControlLabel","render","Switch","checked","CHECKBOX","Checkbox","MULTISELECT","SELECT","NUMBER","min","CURRENCY_AMOUNT","TEXT","MULTILINE_TEXT","LABEL","DATE_PICKER","DATE_TIME_PICKER","PHONE_NUMBER","FILE","DialogActions","buttonProps","locked","handler","backgroundColor","background","autoFocus","form","isNumber","SearchTextField","NoDataText","TableCellText","TableTotalCellText","ActionsTableCell","TableCell","TableLink","TABLE_SORTING_TYPES","ORDERS","DEFAULT_ROWS_PER_PAGE_OPTIONS","rows","rowsData","columns","actions","toolbarItems","itemLink","totalRow","isSearchEnabled","isPaginationEnabled","page","rowsPerPage","onChangePage","onChangeRowsPerPage","count","isSortingEnabled","onChangeSearch","searchString","backlightTableProperties","tableRowActions","tableRowComponents","defaultSortingColumn","isActionsMenuOpened","setIsActionsMenuOpened","sorting","setSorting","column","selectedItemId","setSelectedItemId","search","setSearch","selectedItem","row","sortBy","order","DESC","ASC","sortedRows","sortingColumn","sort","a","b","aValue","bValue","sortingType","DATE","valueOf","parseFloat","filteredRows","toLowerCase","indexOf","handleSearchChange","handleActionsMenuButtonClick","actionsMenuButtonRef","currentTarget","handleActionsMenuClose","handleActionsMenuItemClick","rowsPerPageOptions","Number","isInteger","menuBoundariesElement","defineBacklightColor","obj","conditionFn","getRowData","TableContainer","TableHead","TableRow","justifyContent","TableSortLabel","direction","TableBody","index","highlighted","bgcolor","isEnabled","getURL","alignItems","actionFn","padding","MoreVert","colSpan","TableFooter","onPageChange","onRowsPerPageChange","useUnmount","tablePaymentMethodsSelector","balance","created_at","email","external_id","plan_id","start_at","end_at","mobile","paymentMethodsTotalPagesSelector","isPaymentMethodCreatingSelector","isPaymentMethodUpdatingSelector","isPaymentMethodDeletingSelector","isAddingCreditSelector","DIALOG_TYPES","tablePlansSelector","default_amount","value_type","isPlanCreatingSelector","isPlanUpdatingSelector","isPlanDeletingSelector","PayMethodTableFilterForm","tableFilterParams","order_by","sorting_order","tableColumns","typeNames","onTableShouldUpdate","filterParamsState","setfilterParamsState","updateTable","debounce","Stack","select","minWidth","tn","tc","ToggleButtonGroup","exclusive","_","ToggleButton","maxWidth","TransactionsTableFilterForm","station_id","terminal_id","nestedStations","entries","getTerminals","PaymentMethod","dialog","setDialog","CREATE","searchConfiguration","setSearchConfiguration","isPaymentMethodAddingCredit","isOperationInProgress","previousIsOperationInProgress","handleCloseDialog","handleCreatePayMethodButtonClick","handleAddCreditMenuItemClick","ADD_CREDIT","handleEditPayMethodMenuItemClick","EDIT","handleDeletePayMethodMenuItemClick","DELETE","handleConfirmPayMethodActiveMenuItemClick","IS_ACTIVE","tableActions","localeMap","parseDate","utcDate","toDate","toLocaleDateString","day","month","year","definePlanBalance","toFixed","addSortingOrder","sortableTableColumns","filterableTypeNames","phoneRegExp","handleConfirmCreatePayMethod","utc","toISOString","handleConfirmEditPayMethod","handleConfirmDeletePayMethod","handleConfirmActivePayMethod","paymentMethodCopy","JSON","parse","stringify","handleConfirmAddCredit","add_balance","typeNamesAsValueLabel","plansListAsValueLabel","dialogProps","matches","excludeEmptyString","formFields","Pagination","event","tableProgramsSelector","isProgramCreatingSelector","isProgramUpdatingSelector","isProgramDeletingSelector","Plans","handleCreatePlanButtonClick","handleEditPlanMenuItemClick","handleDeletePlanMenuItemClick","typeOptions","definePlanValueLabel","valueTypes","disabledIfUnlimited","disabledIfCurrency","typeNumberIfAmountOfWashes","handleConfirmCreatePlan","handleConfirmEditPlan","handleConfirmDeletePlan","programsListAsValueLabel","unlimited","currency","tableRowsPlansList","Programs","handleCreateProgramButtonClick","handleEditProgramMenuItemClick","handleDeleteProgramMenuItemClick","handleConfirmCreateProgram","handleConfirmEditProgram","handleConfirmDeleteProgram","isIpv4","RestoreConfigContext","InputField","test","onBlur","GeneralSelection","width","NetworkInterfaces","CCPServerSettings","LCCServerSettings","LanguageFlagSettings","restoreConfig","TypeError","setConfig","networkSwitch","mainInterface","metric","dhcp","netmask","dns","ip_address","gateway","secondaryInterfaces","slice","NetworkInterfaceInput","setDhcp","network","marginBottom","FormGroup","marginLeft","splice","removeSecondaryInterface","serverSwitch","api_key","charlieAPI","charlieApiDepending","license_plate_fueling","voucher","safedrop","voucher_verify","fingerprint_check","charliepay_voucher","cancel_transaction","sensor_alert","voucher_release","finish_transaction","device_notification","mail","get_voucher","voucher_discounts","link_license_plate","fingerprint_register","heartbeat","get_voucher_definitions","create_voucher_from_definition","deactivate_voucher","changeServerConfig","serverConfig","split","charlie_api_url","lccCredentials","password","lccServerConfig","createAuthorizationHeader","encodedCredentials","base_url","Authorization","external_commit_types","ignore_fleetcards","article_ids","carwashConfig","setCarwashConfig","languageFlagSwitch","Dropdown","Select","labelId","SelfwashUnmount","configKeyDelete","carwashConfigKeyDelete","SelfwashDeviceOptions","manufacturerLabel","modeLabel","selfwashConfig","manufacturer","inductionLine","afterPayPage","blackscreenScreensaver","ticketNote","changedConfig","el","bock","christ","siemens","KaercherOptions","BockOptions","ChristOptions","SiemensOptions","preauth","vacuum","PreAuthAmounts","intValue","nfc","fleetcard","coin","simple","presence","CreditOptions","ticket","keyPrefix","labels","license_plate","c","fakeInputs","siemensVersion2DefaultConfig","address","ip","database","program_types","program_4","wash_times","type_1","amount_50","amount_100","amount_150","amount_200","type_2","input_bytes","last_byte","program_1","byte_index","bit_index","program_2","program_3","output_bytes","places","siemensSWP5DefaultConfig","sps_version","program_7","program_8","pulse_amount","program_5","program_6","all_ok","hour_ok","siemensSWP6DefaultConfig","siemensConfig","version","device","configChanged","swp5","swp6","deviceUnmounts","selfwash","carwash","voucherpay","cr214_api","DeviceSelection","setDevice","CarwashDeviceOptions","VoucherPayDeviceOptions","PrinterLCPDeviceOptions","configCarwash","queue_size","simulator","vehicleRestrictions","v1","v2","drive_in","drive_in_out","drive_in_stay","get_out","alert","PaymentSelection","paymentItems","coin_acceptor","extended","tokens","remove_coins","payter","feigcvend","protocol","communication","settings","port","use_ssl","license_plate_verify","license_plate_discounts","api_url_prefix","fleetcards","handleOnChange","deviceTyp","CoinAcceptorOption","dropdownItems","ContactlessPaymentOption","FleetcardsPaymentOption","VoucherPaymentOption","LicensePlateOption","PaymentOrder","initCoinAcceptor","coinAcceptor","setCoinAcceptor","coinAcceptorConfig","initNfc","setNfc","initVoucher","setVoucher","initLicensePlate","licensePlate","setLicensePlate","licensePlateConfig","SimulatorSwitch","licensePlateSimulator","license_plate_country","license_plate_confidence","license_plate_country_confidence","simulatedLicensePlate","setState","updateSimulatorConfig","prevConfig","initFleetcards","setFleetcards","defaultList","paymentOrder","setPaymentOrder","paymentOrderSwitch","setPaymentOrderSwitch","deletePaymentOrder","every","hasOwnProperty","onDragEnd","droppedItem","destination","updatedList","reorderedItem","source","droppableId","provided","className","droppableProps","innerRef","draggableId","dragHandleProps","draggableProps","margin","borderRadius","borderColor","placeholder","RestoreConfigTool","languages","setLanguages","Provider","renderConfig","setRenderConfig","relative_path","carwash_config","element","createElement","setAttribute","encodeURIComponent","body","appendChild","click","removeChild","download","stationsSelector","nestedStationsSelector","tableTransactionsSelector","tableRow","status","amount","pay_method_external_id","pay_method_type","tax_rate","create_date","transactionsTotalPagesSelector","Status","dateOptions","weekday","timeOptions","hour","minute","second","datetime","dateString","Time","timeString","toLocaleTimeString","DateComponent","textAlign","TimeComponent","time","StationComponent","TerminalComponent","PaymentTypeComponent","cash","fingerprint","card","PaymentIdComponent","AmountComponent","amountString","StatusComponent","DONE","CheckCircleOutlineOutlined","PENDING","PendingOutlined","CANCELLED","CancelOutlined","FAILED","getIcon","dialogContentNode","setDialogContentNode","forEach","Close","Table","Transactions","getStationFromId","getTerminalFromStationAndId","terminalId","getTransactions","addFilter","getSelectedTransaction","closeDialogHandler","showDetailsHandler","transactionTable","tableTransactions","transactionComponentsTable","tableComponentTransactions","ToolbarWrapper","EventWrapper","NavButtonGroup","ButtonGroup","CalendarToolbar","onNavigate","onView","createEvent","importEvents","navigate","view","bind","ArrowLeft","Today","ArrowRight","EventType","EVENT_STYLES","UNKNOWN","chip","HAPPY_HOUR","HOLIDAY","EventComp","category","setCategory","resource","overflow","textOverflow","Chip","calendarEventsToDisplayEvents","firstDisplayableMoment","lastDisplayableDate","displayEvents","firstDisplayableDate","recurrency","start","after","rec","isSameOrAfter","diff","diffRec","clone","add","interval","frequency","recSteps","getFirstDateAfter","end","until","isBefore","isSameOrBefore","isException","exceptions","isSame","displayEvent","calendarEventToDisplayEvents","EventCalendar","onSelectEvent","onSelectSlot","week","dow","longDateFormat","L","LL","LLL","LLLL","LT","LTS","localizer","firstVisibleDay","setFirstVisibleDay","lastVisibleDay","setLastVisibleDay","selectable","popup","newDate","fvDay","lvDay","defaultDate","defaultView","showAllEvents","components","toolbar","stringifyIcs","ics","uid","format","allDay","summary","rrule","exdate","getFreqencyFromRRule","freq","stringToEventType","eventTypeToString","updateIcsEventRecurrency","icsEvent","frequencyToRRule","updateIcs","ev","percentage","updatedEv","addEventIcs","updateIcsEvents","deleteIcsEvent","eventsFromIcs","parameter","console","log","local","stationCalendarSelector","CalendarPage","selectedCalendar","setSelectedCalendar","calendars","selectedEvent","setSelectedEvent","setEvents","storeIcs","argument","newIcs","closeDialog","checkEvent","eventTypeSelectOptions","newEvent","checkedEvent","crypto","calendarEvent","endCondition","importEvent","file","reader","FileReader","onload","newEvents","readAsText","oldEvent","idx","findIndex","calendarEventId","getCalendarSelectOptions","selectedCalendarEvent","selectEvent","slot","startMillisDay","endMillisDay","subtract","Router","login","config_tool","notificationsSelector","displayed","MainView","myKey","onExited","styles","CloseSnackbar","createContext","resources","translation","init","lng","localeObj","setLocaleObj","setMode","colorMode","prevMode","locale","savedTheme","createTheme","StyledEngineProvider","injectFirst","ThemeProvider","CssBaseline","authClient","LoadingComponent","anchorOrigin","vertical","horizontal","autoHideDuration","LocalizationProvider","dateAdapter","__webpack_module_cache__","moduleId","cachedModule","loaded","__webpack_modules__","m","amdO","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","n","getter","__esModule","getPrototypeOf","this","ns","create","def","getOwnPropertyNames","definition","defineProperty","enumerable","g","globalThis","Function","prop","Symbol","toStringTag","nmd","paths","p","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""}