{"version":3,"sources":["Constants/Language.ts","API/api.ts","Authentication/Configuration.ts","Pages/PublicHomePage.tsx","Pages/PostLogOutPage.tsx","API/base.ts","Pages/ServiceLinks.tsx","API/sdk.ts","Components/Icons/icons.tsx","Utils/SelfSubmittinForm.tsx","Pages/TvAndSecurityRedirect.tsx","Pages/EmailManagementRedirect.tsx","Constants/Pages.ts","Pages/UserServicesPage.tsx","Pages/CalendarPage/CalenderTranslations.ts","Pages/CalendarPage/DateHelpers.ts","Components/HasUnsavedChangesConfirmation.tsx","Translation/Translation.ts","Pages/CalendarPage/CalendarPage.tsx","Utils/Helpers.ts","Pages/CalendarPage/MokkiCalendar/Legend.tsx","Pages/CalendarPage/MokkiCalendar/MokkiCalendar.tsx","Pages/CalendarProductListPage.tsx","Pages/NotFound.tsx","Components/Inputs/ReactFormInput.tsx","Pages/ChangePassword/ChangePassword.tsx","Layout/Routes.tsx","Theme/themeConfig.ts","App.tsx","Authentication/TokenManagerUtility.ts","serviceWorker.ts","index.tsx"],"names":["Language","LanguageId","OperationEnum","SelectionTypeEnum","toLanguageId","fi","finnish","en","english","swe","swedish","OidcConfiguration","authority","process","client_id","redirect_uri","post_logout_redirect_uri","silent_redirect_uri","response_type","scope","automaticSilentRenew","loadUserInfo","PublicHomePage","PostLogOutPage","props","BASE_PATH","replace","BaseAPI","configuration","basePath","axios","globalAxios","this","RequiredError","field","msg","name","Error","Service","CalendarApiAxiosParamCreator","getCustomerCalendarProduct","year","orderId","orderRowId","languageId","a","options","undefined","localVarPath","encodeURIComponent","String","localVarUrlObj","globalImportUrl","baseOptions","localVarRequestOptions","method","localVarHeaderParameter","localVarQueryParameter","query","search","headersFromBaseOptions","headers","url","getCustomerCalendarProducts","postChangedCalenderProductDays","postChangedCalendarProductDaysCommand","needsSerialization","data","JSON","stringify","CalendarApiFp","localVarAxiosArgs","axiosRequestArgs","request","CalendarApi","then","SelfcareCustomerApiAxiosParamCreator","getSelfcareCustomerServices","saveNewPassword","saveNewPasswordCommand","signInToLegacyApplication","SelfcareCustomerApiFp","config","CustomerApi","Api","Icons","heart","icon","faHeart","heart_full","fullheart","banned","faBan","media","faPhotoVideo","image","faImage","sign_out","faSignOutAlt","computer","faDesktop","moon","faMoon","sun","faSun","power_off","faPowerOff","spinner_static","faSpinner","spinner","spin","share_alt","faShareAlt","paperplane","faPaperPlane","map_marker","faMapMarkerAlt","list","faList","clipboard_list","faClipboardList","home","faHome","star","faStar","star_filled","faStarFull","newspaper","faNewspaper","share","faShare","twitter","comments","faComments","comment","faComment","comments_dots","faCommentDots","info","faInfo","info_circle","faInfoCircle","receipt","faReceipt","lockopen","faLockOpen","lock","faLock","paw","faPaw","address_book","faAddressBook","address_card","faAddressCard","ellipses_H","faEllipsisH","ellipses_V","faEllipsisV","barcode","faBarcode","bars","faBars","igloo","faIgloo","shopping_cart","faShoppingCart","hotel","faHotel","plus","faPlus","minus","faMinus","trashcan","faTrashAlt","download","faDownload","questionmark","faQuestionCircle","question","faQuestion","exlamation","faExclamation","exlamation_triangle","faExclamationTriangle","file","faFile","file_text","file_image","faFileImage","file_pdf","faFilePdf","file_excel","faFileExcel","file_powerpoint","faFilePowerpoint","file_word","faFileWord","file_video","faFileVideo","file_audio","faFileAudio","file_archive","faFileArchive","save","faSave","close","faTimes","arrowLeft","faArrowLeft","arrowRight","faArrowRight","arrowUp","faArrowUp","arrowDown","faArrowDown","angle_up","faAngleUp","angle_down","faAngleDown","angle_right","faAngleRight","angle_right_rotated","rotation","angle_left","faAngleLeft","sortUp","faSortUp","sortDown","faSortDown","caretUp","faCaretUp","caretDown","faCaretDown","users","faUsers","user","faUser","teacher","faChalkboardTeacher","globe","faGlobe","check","faCheck","calendar","faCalendarAlt","dollar","faDollarSign","money","faMoneyBill","print","faPrint","check_circle","faCheckCircle","times_circle","faTimesCircle","faSearch","redo","faRedo","undo","faUndo","pen","faPen","pen_alt","faPenAlt","edit","faEdit","envelope","faEnvelope","envelope_open","faEnvelopeOpen","mobile","faMobileAlt","WIP","faCog","cog","eye","faEye","eye_slash","faEyeSlash","box","faBox","university","faUniversity","clock","faClock","paperclip","faPaperclip","copy","faCopy","paste","faPaste","phone","faPhone","plug","faPlug","dot","faDotCircle","dot_solid","faDotCircleFull","LegacySelfcareRedirectTrigger","useState","xml","isReadyToSubmit","state","setState","useEffect","result","fail","console","error","value","SelfSubmittingForm","formRef","React","useRef","current","submit","action","ref","type","hidden","TvAndSecurityRedirect","EmailManagementRedirect","pages","ServiceLinks","t","useTranslation","tvAndSecurity","customerServices","includes","TVService","Fsecure","as","fontSize","my","EmailAccountManagement","RouteLink","to","linkProps","color","ml","BroadbandManagement","status","borderRadius","d","py","px","mt","bg","_hover","UserServicesPage","customer","setCustomer","pending","setPending","updateCustomer","fontWeight","p","mr","services","WEEKDAYS_SHORT","sv","MONTHS","WEEKDAYS_LONG","FIRST_DAY_OF_WEEK","DateHelpers","month","date","Date","days","getMonth","push","setDate","getDate","getLastDayOfNthMonth","y","m","day","dateToISOString","getTime","getTimezoneOffset","toISOString","split","isoStringToDate","dateString","generateDateList","from","dates","currentDate","getFullYear","HasUnsavedChangesConfirmation","isDirty","AddConfirmation","RemoveConfirmation","window","addEventListener","onUnload","removeEventListener","event","preventDefault","returnValue","resources","common","CommonTranslations","CalendarTranslations","fallbackLng","toString","debug","interpolation","escapeValue","detection","order","lookupCookie","caches","i18n","use","LanguageDetector","initReactI18next","init","SelectionType","Helpers","x","dateTimeReviver","key","test","parse","legendSymbol","legendProps","w","h","alignItems","justifyContent","alignSelf","flex","border","LegendExplanations","align","borderColor","createInitialCalender","cloneWithDates","map","hasChanged","originalSelectedState","isSelected","MokkiCalendar","product","setYear","refreshCalendar","calendarDays","setCalendarDays","showSuccess","setShowSuccess","isSubmitting","setIsSubmitting","getCalendarDaysClone","doMonthSelection","dayString","dayIndex","findIndex","newSelectionState","daysToModify","daysToHold","forEach","item","DateUtils","isSameDay","isLocked","newCalendar","doDaySelection","dayCount","maxSelected","localeLang","language","calenderType","selectionType","continuous","availableYears","selectedDays","filter","disabledDays","todayIsActive","currentDayWasSelected","hasUnsavedChanges","some","reduce","previous","size","pt","description","mb","templateColumns","gap","length","defaultValue","onChange","e","target","onClick","changedDates","id","success","disabled","leftIcon","isLoading","selfcareDescription","borderLeft","pl","className","canChangeMonth","numberOfMonths","renderDay","onDayClick","modifiers","selected","months","parseLocale","weekdaysLong","weekdaysShort","firstDayOfWeek","title","includesDate","currentDay","substring","CalendarPage","mokkiCalendar","setMokkiCalendar","useParams","orderid","orderrowid","updateCalendar","pOrderId","parseInt","pOrderRowId","pYear","Number","isNaN","selfCareDescription","values","Promise","reject","CalenderProductListPage","setList","updateSettings","i","productName","address","NotFound","ReactFormInput","formProp","label","inputProps","isInvalid","errors","htmlFor","register","message","schema","Yup","object","shape","oldPassword","string","required","newPassword","newPasswordRepeact","log","parent","defaultValues","ChangePassword","handleSubmit","form","alert","onSubmit","ChangePasswordForm","useForm","resolver","yupResolver","pr","maxW","variant","Routes","exact","component","path","withOidcSecure","breakpoints","createBreakpoints","sm","md","lg","xl","xxl","xxxl","xxxxl","defaultScheme","overridetheme","extendTheme","shadows","components","Button","defaultProps","colorScheme","Input","baseStyle","height","focusBorderColor","Select","IconButton","FormLabel","marginBottom","Radio","styles","global","body","width","fontFamily","background","textDecoration","SignOutActions","useReactOidc","logout","oidcUser","history","useHistory","justify","profile","AuthEventHandler","token","access_token","localStorage","setItem","Axios","defaults","setAuthorizationHeader","App","document","logger","oidcLog","notAuthenticated","authenticating","callbackComponentOverride","theme","basename","shadow","minH","lang","changeLanguage","aria-label","src","alt","Boolean","location","hostname","match","ReactDOM","render","StrictMode","getElementById","navigator","serviceWorker","ready","registration","unregister","catch"],"mappings":"2IAAYA,EAMAC,E,2EANAD,K,WAAAA,E,WAAAA,E,aAAAA,M,cAMAC,O,qBAAAA,I,qBAAAA,I,sBAAAA,M,KAML,IC4JKC,EA8FAC,ED1PCC,GAAY,mBACvBJ,EAASK,GAAKJ,EAAWK,SADF,cAEvBN,EAASO,GAAKN,E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C,IAACA,GA2ChBhJ,SAAU7B,IAAaxd,EAASK,GAChC8jB,QAAQ,QACRoE,aAAW,8BAEX,kBAAC,KAAD,CAAOjC,MAAO,EAAGV,OAAQ,EAAG4C,IAAI,UAAUC,IAAI,SA0B/C,kBAAC,GAAD,QAGF,kBAAC,KAAD,CAAKpS,EAAG,GACP,kBAAC,KAAD,CAAWA,EAAG,EAAG8R,OAAO,KAAKvS,GAAG,QAAQsO,KAAK,SAC5C,kBAAC,GAAD,a,OE1FYwE,QACW,cAA7BhQ,OAAOiQ,SAASC,UAEe,UAA7BlQ,OAAOiQ,SAASC,UAEhBlQ,OAAOiQ,SAASC,SAASC,MACvB,2DCXNC,IAASC,OACR,kBAAC,IAAMC,WAAP,KACC,kBAAC,GAAD,OAEDrB,SAASsB,eAAe,SDgInB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBzkB,MAAK,SAAA0kB,GACJA,EAAaC,gBAEdC,OAAM,SAAAlW,GACLD,QAAQC,MAAMA,EAAMsP,a","file":"static/js/main.1c5db89d.chunk.js","sourcesContent":["export enum Language {\r\n\tfi = 'fi-FI',\r\n\ten = 'en-US',\r\n\tswe = 'sv-SE'\r\n}\r\n\r\nexport enum LanguageId {\r\n\tfinnish = 0,\r\n\tswedish = 1,\r\n\tenglish = 2\r\n}\r\n\r\nexport const toLanguageId = {\r\n\t[Language.fi]: LanguageId.finnish,\r\n\t[Language.en]: LanguageId.english,\r\n\t[Language.swe]: LanguageId.swedish\r\n};\r\n","// tslint:disable\r\n/**\r\n * Selfcare Client API\r\n * Web API for Visio Selfcare Client\r\n *\r\n * The version of the OpenAPI document: v1\r\n * Contact: harju.oskarinen@dataprisma.fi\r\n *\r\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\r\n * https://openapi-generator.tech\r\n * Do not edit the class manually.\r\n */\r\n\r\n\r\nimport * as globalImportUrl from 'url';\r\nimport { Configuration } from './configuration';\r\nimport globalAxios, { AxiosPromise, AxiosInstance } from 'axios';\r\n// Some imports not used depending on template conditions\r\n// @ts-ignore\r\nimport { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';\r\n\r\n/**\r\n * Contains information about a single calender date\r\n * @export\r\n * @interface CalendarProductDayDto\r\n */\r\nexport interface CalendarProductDayDto {\r\n /**\r\n * Days is selected and service is active.\r\n * @type {boolean}\r\n * @memberof CalendarProductDayDto\r\n */\r\n isSelected: boolean;\r\n /**\r\n * When day is locked user cannot make modifications to it in application. Client displays locked days as disabled.\r\n * @type {boolean}\r\n * @memberof CalendarProductDayDto\r\n */\r\n isLocked: boolean;\r\n /**\r\n * id is used to ensure day is not mixed with another due to scuffed date-to-date comparision\r\n * @type {number}\r\n * @memberof CalendarProductDayDto\r\n */\r\n id: number;\r\n /**\r\n * Actual Date. Is transported as ISO-8601 date string over api (Automatic json-conversion)\r\n * @type {string}\r\n * @memberof CalendarProductDayDto\r\n */\r\n date: string;\r\n /**\r\n * Date in YYYY-MM-DD string format. Used to ensure timezones don\\'t cause issues\r\n * @type {string}\r\n * @memberof CalendarProductDayDto\r\n */\r\n dateString: string;\r\n}\r\n/**\r\n * \r\n * @export\r\n * @interface CalendarProductDto\r\n */\r\nexport interface CalendarProductDto {\r\n /**\r\n * Product displayname, shown to customers\r\n * @type {string}\r\n * @memberof CalendarProductDto\r\n */\r\n name: string;\r\n /**\r\n * Product description for end customers, shown to customers.\r\n * @type {string}\r\n * @memberof CalendarProductDto\r\n */\r\n description: string;\r\n /**\r\n * Calendar selection description text shown to customers.\r\n * @type {string}\r\n * @memberof CalendarProductDto\r\n */\r\n selfCareDescription: string;\r\n /**\r\n * Calender year where product is in effect\r\n * @type {number}\r\n * @memberof CalendarProductDto\r\n */\r\n year: number;\r\n /**\r\n * Indicates how user selects days in browser. Supported types are \\\"day\\\" and \\\"continuous\\\"\r\n * @type {SelectionTypeEnum}\r\n * @memberof CalendarProductDto\r\n */\r\n selectionType: SelectionTypeEnum;\r\n /**\r\n * Max allowed selections made by user, whether this means days or months depends on SelectionType. Used on clientside to limit maximum selections.\r\n * @type {number}\r\n * @memberof CalendarProductDto\r\n */\r\n maxSelected: number;\r\n /**\r\n * Minimum \\\"recommended\\\" selections made by user, whether this means days or months depends on SelectionType. Minimum value is dislayed but not enforced on clientside.\r\n * @type {number}\r\n * @memberof CalendarProductDto\r\n */\r\n minSelected: number;\r\n /**\r\n * Current amount of selections for clarity. This should match the amount of days/months user has selected based on SelectionType\r\n * @type {number}\r\n * @memberof CalendarProductDto\r\n */\r\n currentSelected: number;\r\n /**\r\n * List of Day by day information relating to returned product\r\n * @type {Array}\r\n * @memberof CalendarProductDto\r\n */\r\n days: Array;\r\n /**\r\n * List of Day by day information relating to returned product\r\n * @type {Array}\r\n * @memberof CalendarProductDto\r\n */\r\n availableYears: Array;\r\n}\r\n/**\r\n * \r\n * @export\r\n * @interface ChangedCalendarProductDayDto\r\n */\r\nexport interface ChangedCalendarProductDayDto {\r\n /**\r\n * \r\n * @type {number}\r\n * @memberof ChangedCalendarProductDayDto\r\n */\r\n id?: number;\r\n /**\r\n * \r\n * @type {boolean}\r\n * @memberof ChangedCalendarProductDayDto\r\n */\r\n isSelected?: boolean;\r\n}\r\n/**\r\n * \r\n * @export\r\n * @interface LegacyLoginDto\r\n */\r\nexport interface LegacyLoginDto {\r\n /**\r\n * \r\n * @type {string}\r\n * @memberof LegacyLoginDto\r\n */\r\n xml?: string | null;\r\n /**\r\n * \r\n * @type {string}\r\n * @memberof LegacyLoginDto\r\n */\r\n url?: string | null;\r\n}\r\n/**\r\n * \r\n * @export\r\n * @enum {string}\r\n */\r\nexport enum OperationEnum {\r\n NUMBER_0 = 0,\r\n NUMBER_1 = 1,\r\n NUMBER_2 = 2,\r\n NUMBER_3 = 3,\r\n NUMBER_4 = 4\r\n}\r\n\r\n/**\r\n * \r\n * @export\r\n * @interface Order\r\n */\r\nexport interface Order {\r\n /**\r\n * \r\n * @type {string}\r\n * @memberof Order\r\n */\r\n address?: string | null;\r\n /**\r\n * \r\n * @type {number}\r\n * @memberof Order\r\n */\r\n orderId?: number;\r\n /**\r\n * \r\n * @type {number}\r\n * @memberof Order\r\n */\r\n orderRowId?: number;\r\n /**\r\n * \r\n * @type {string}\r\n * @memberof Order\r\n */\r\n productName?: string | null;\r\n}\r\n/**\r\n * \r\n * @export\r\n * @interface PostChangedCalendarProductDaysCommand\r\n */\r\nexport interface PostChangedCalendarProductDaysCommand {\r\n /**\r\n * \r\n * @type {number}\r\n * @memberof PostChangedCalendarProductDaysCommand\r\n */\r\n orderRowId?: number;\r\n /**\r\n * \r\n * @type {number}\r\n * @memberof PostChangedCalendarProductDaysCommand\r\n */\r\n orderId?: number;\r\n /**\r\n * \r\n * @type {number}\r\n * @memberof PostChangedCalendarProductDaysCommand\r\n */\r\n year?: number;\r\n /**\r\n * \r\n * @type {Array}\r\n * @memberof PostChangedCalendarProductDaysCommand\r\n */\r\n days?: Array | null;\r\n}\r\n/**\r\n * \r\n * @export\r\n * @interface SaveNewPasswordCommand\r\n */\r\nexport interface SaveNewPasswordCommand {\r\n /**\r\n * \r\n * @type {string}\r\n * @memberof SaveNewPasswordCommand\r\n */\r\n oldPassword: string;\r\n /**\r\n * \r\n * @type {string}\r\n * @memberof SaveNewPasswordCommand\r\n */\r\n newPassword: string;\r\n}\r\n/**\r\n * \r\n * @export\r\n * @enum {string}\r\n */\r\nexport enum SelectionTypeEnum {\r\n NUMBER_0 = 0,\r\n NUMBER_1 = 1\r\n}\r\n\r\n/**\r\n * \r\n * @export\r\n * @interface SelfcareCustomerDto\r\n */\r\nexport interface SelfcareCustomerDto {\r\n /**\r\n * \r\n * @type {number}\r\n * @memberof SelfcareCustomerDto\r\n */\r\n id: number;\r\n /**\r\n * \r\n * @type {string}\r\n * @memberof SelfcareCustomerDto\r\n */\r\n userName: string;\r\n /**\r\n * \r\n * @type {Array}\r\n * @memberof SelfcareCustomerDto\r\n */\r\n services: Array;\r\n}\r\n\r\n/**\r\n * CalendarApi - axios parameter creator\r\n * @export\r\n */\r\nexport const CalendarApiAxiosParamCreator = function (configuration?: Configuration) {\r\n return {\r\n /**\r\n * \r\n * @summary Get singular calender product for given year\r\n * @param {number} year Kuluva tai seuraava vuosi, määrää kumman kalenteri haetaan\r\n * @param {number} orderId \r\n * @param {number} orderRowId \r\n * @param {number} languageId \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n getCustomerCalendarProduct: async (year: number, orderId: number, orderRowId: number, languageId: number, options: any = {}): Promise => {\r\n // verify required parameter 'year' is not null or undefined\r\n if (year === null || year === undefined) {\r\n throw new RequiredError('year','Required parameter year was null or undefined when calling getCustomerCalendarProduct.');\r\n }\r\n // verify required parameter 'orderId' is not null or undefined\r\n if (orderId === null || orderId === undefined) {\r\n throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling getCustomerCalendarProduct.');\r\n }\r\n // verify required parameter 'orderRowId' is not null or undefined\r\n if (orderRowId === null || orderRowId === undefined) {\r\n throw new RequiredError('orderRowId','Required parameter orderRowId was null or undefined when calling getCustomerCalendarProduct.');\r\n }\r\n // verify required parameter 'languageId' is not null or undefined\r\n if (languageId === null || languageId === undefined) {\r\n throw new RequiredError('languageId','Required parameter languageId was null or undefined when calling getCustomerCalendarProduct.');\r\n }\r\n const localVarPath = `/selfcare/api/v1/calendarproducts/{Year}`\r\n .replace(`{${\"Year\"}}`, encodeURIComponent(String(year)));\r\n const localVarUrlObj = globalImportUrl.parse(localVarPath, true);\r\n let baseOptions;\r\n if (configuration) {\r\n baseOptions = configuration.baseOptions;\r\n }\r\n const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};\r\n const localVarHeaderParameter = {} as any;\r\n const localVarQueryParameter = {} as any;\r\n\r\n if (orderId !== undefined) {\r\n localVarQueryParameter['OrderId'] = orderId;\r\n }\r\n\r\n if (orderRowId !== undefined) {\r\n localVarQueryParameter['OrderRowId'] = orderRowId;\r\n }\r\n\r\n if (languageId !== undefined) {\r\n localVarQueryParameter['LanguageId'] = languageId;\r\n }\r\n\r\n\r\n \r\n localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};\r\n // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943\r\n delete localVarUrlObj.search;\r\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\r\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\r\n\r\n return {\r\n url: globalImportUrl.format(localVarUrlObj),\r\n options: localVarRequestOptions,\r\n };\r\n },\r\n /**\r\n * \r\n * @summary Get all customer\\'s calender products, includes only minimal data\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n getCustomerCalendarProducts: async (options: any = {}): Promise => {\r\n const localVarPath = `/selfcare/api/v1/calendarproducts`;\r\n const localVarUrlObj = globalImportUrl.parse(localVarPath, true);\r\n let baseOptions;\r\n if (configuration) {\r\n baseOptions = configuration.baseOptions;\r\n }\r\n const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};\r\n const localVarHeaderParameter = {} as any;\r\n const localVarQueryParameter = {} as any;\r\n\r\n\r\n \r\n localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};\r\n // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943\r\n delete localVarUrlObj.search;\r\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\r\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\r\n\r\n return {\r\n url: globalImportUrl.format(localVarUrlObj),\r\n options: localVarRequestOptions,\r\n };\r\n },\r\n /**\r\n * \r\n * @summary Post Calender product days with changed values\r\n * @param {PostChangedCalendarProductDaysCommand} [postChangedCalendarProductDaysCommand] \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n postChangedCalenderProductDays: async (postChangedCalendarProductDaysCommand?: PostChangedCalendarProductDaysCommand, options: any = {}): Promise => {\r\n const localVarPath = `/selfcare/api/v1/calendarproducts`;\r\n const localVarUrlObj = globalImportUrl.parse(localVarPath, true);\r\n let baseOptions;\r\n if (configuration) {\r\n baseOptions = configuration.baseOptions;\r\n }\r\n const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};\r\n const localVarHeaderParameter = {} as any;\r\n const localVarQueryParameter = {} as any;\r\n\r\n\r\n \r\n localVarHeaderParameter['Content-Type'] = 'application/json';\r\n\r\n localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};\r\n // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943\r\n delete localVarUrlObj.search;\r\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\r\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\r\n const needsSerialization = (typeof postChangedCalendarProductDaysCommand !== \"string\") || localVarRequestOptions.headers['Content-Type'] === 'application/json';\r\n localVarRequestOptions.data = needsSerialization ? JSON.stringify(postChangedCalendarProductDaysCommand !== undefined ? postChangedCalendarProductDaysCommand : {}) : (postChangedCalendarProductDaysCommand || \"\");\r\n\r\n return {\r\n url: globalImportUrl.format(localVarUrlObj),\r\n options: localVarRequestOptions,\r\n };\r\n },\r\n }\r\n};\r\n\r\n/**\r\n * CalendarApi - functional programming interface\r\n * @export\r\n */\r\nexport const CalendarApiFp = function(configuration?: Configuration) {\r\n return {\r\n /**\r\n * \r\n * @summary Get singular calender product for given year\r\n * @param {number} year Kuluva tai seuraava vuosi, määrää kumman kalenteri haetaan\r\n * @param {number} orderId \r\n * @param {number} orderRowId \r\n * @param {number} languageId \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n async getCustomerCalendarProduct(year: number, orderId: number, orderRowId: number, languageId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {\r\n const localVarAxiosArgs = await CalendarApiAxiosParamCreator(configuration).getCustomerCalendarProduct(year, orderId, orderRowId, languageId, options);\r\n return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\r\n const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};\r\n return axios.request(axiosRequestArgs);\r\n };\r\n },\r\n /**\r\n * \r\n * @summary Get all customer\\'s calender products, includes only minimal data\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n async getCustomerCalendarProducts(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> {\r\n const localVarAxiosArgs = await CalendarApiAxiosParamCreator(configuration).getCustomerCalendarProducts(options);\r\n return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\r\n const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};\r\n return axios.request(axiosRequestArgs);\r\n };\r\n },\r\n /**\r\n * \r\n * @summary Post Calender product days with changed values\r\n * @param {PostChangedCalendarProductDaysCommand} [postChangedCalendarProductDaysCommand] \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n async postChangedCalenderProductDays(postChangedCalendarProductDaysCommand?: PostChangedCalendarProductDaysCommand, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {\r\n const localVarAxiosArgs = await CalendarApiAxiosParamCreator(configuration).postChangedCalenderProductDays(postChangedCalendarProductDaysCommand, options);\r\n return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\r\n const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};\r\n return axios.request(axiosRequestArgs);\r\n };\r\n },\r\n }\r\n};\r\n\r\n/**\r\n * CalendarApi - factory interface\r\n * @export\r\n */\r\nexport const CalendarApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {\r\n return {\r\n /**\r\n * \r\n * @summary Get singular calender product for given year\r\n * @param {number} year Kuluva tai seuraava vuosi, määrää kumman kalenteri haetaan\r\n * @param {number} orderId \r\n * @param {number} orderRowId \r\n * @param {number} languageId \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n getCustomerCalendarProduct(year: number, orderId: number, orderRowId: number, languageId: number, options?: any): AxiosPromise {\r\n return CalendarApiFp(configuration).getCustomerCalendarProduct(year, orderId, orderRowId, languageId, options).then((request) => request(axios, basePath));\r\n },\r\n /**\r\n * \r\n * @summary Get all customer\\'s calender products, includes only minimal data\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n getCustomerCalendarProducts(options?: any): AxiosPromise> {\r\n return CalendarApiFp(configuration).getCustomerCalendarProducts(options).then((request) => request(axios, basePath));\r\n },\r\n /**\r\n * \r\n * @summary Post Calender product days with changed values\r\n * @param {PostChangedCalendarProductDaysCommand} [postChangedCalendarProductDaysCommand] \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n postChangedCalenderProductDays(postChangedCalendarProductDaysCommand?: PostChangedCalendarProductDaysCommand, options?: any): AxiosPromise {\r\n return CalendarApiFp(configuration).postChangedCalenderProductDays(postChangedCalendarProductDaysCommand, options).then((request) => request(axios, basePath));\r\n },\r\n };\r\n};\r\n\r\n/**\r\n * CalendarApi - object-oriented interface\r\n * @export\r\n * @class CalendarApi\r\n * @extends {BaseAPI}\r\n */\r\nexport class CalendarApi extends BaseAPI {\r\n /**\r\n * \r\n * @summary Get singular calender product for given year\r\n * @param {number} year Kuluva tai seuraava vuosi, määrää kumman kalenteri haetaan\r\n * @param {number} orderId \r\n * @param {number} orderRowId \r\n * @param {number} languageId \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n * @memberof CalendarApi\r\n */\r\n public getCustomerCalendarProduct(year: number, orderId: number, orderRowId: number, languageId: number, options?: any) {\r\n return CalendarApiFp(this.configuration).getCustomerCalendarProduct(year, orderId, orderRowId, languageId, options).then((request) => request(this.axios, this.basePath));\r\n }\r\n\r\n /**\r\n * \r\n * @summary Get all customer\\'s calender products, includes only minimal data\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n * @memberof CalendarApi\r\n */\r\n public getCustomerCalendarProducts(options?: any) {\r\n return CalendarApiFp(this.configuration).getCustomerCalendarProducts(options).then((request) => request(this.axios, this.basePath));\r\n }\r\n\r\n /**\r\n * \r\n * @summary Post Calender product days with changed values\r\n * @param {PostChangedCalendarProductDaysCommand} [postChangedCalendarProductDaysCommand] \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n * @memberof CalendarApi\r\n */\r\n public postChangedCalenderProductDays(postChangedCalendarProductDaysCommand?: PostChangedCalendarProductDaysCommand, options?: any) {\r\n return CalendarApiFp(this.configuration).postChangedCalenderProductDays(postChangedCalendarProductDaysCommand, options).then((request) => request(this.axios, this.basePath));\r\n }\r\n\r\n}\r\n\r\n\r\n/**\r\n * SelfcareCustomerApi - axios parameter creator\r\n * @export\r\n */\r\nexport const SelfcareCustomerApiAxiosParamCreator = function (configuration?: Configuration) {\r\n return {\r\n /**\r\n * \r\n * @summary Get Selfcare Services for resource owner, return user info and enum list of services\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n getSelfcareCustomerServices: async (options: any = {}): Promise => {\r\n const localVarPath = `/selfcare/api/v1/selfcareCustomer/services`;\r\n const localVarUrlObj = globalImportUrl.parse(localVarPath, true);\r\n let baseOptions;\r\n if (configuration) {\r\n baseOptions = configuration.baseOptions;\r\n }\r\n const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};\r\n const localVarHeaderParameter = {} as any;\r\n const localVarQueryParameter = {} as any;\r\n\r\n\r\n \r\n localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};\r\n // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943\r\n delete localVarUrlObj.search;\r\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\r\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\r\n\r\n return {\r\n url: globalImportUrl.format(localVarUrlObj),\r\n options: localVarRequestOptions,\r\n };\r\n },\r\n /**\r\n * \r\n * @summary Change password handling\r\n * @param {SaveNewPasswordCommand} [saveNewPasswordCommand] \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n saveNewPassword: async (saveNewPasswordCommand?: SaveNewPasswordCommand, options: any = {}): Promise => {\r\n const localVarPath = `/selfcare/api/v1/selfcareCustomer/changepassword`;\r\n const localVarUrlObj = globalImportUrl.parse(localVarPath, true);\r\n let baseOptions;\r\n if (configuration) {\r\n baseOptions = configuration.baseOptions;\r\n }\r\n const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};\r\n const localVarHeaderParameter = {} as any;\r\n const localVarQueryParameter = {} as any;\r\n\r\n\r\n \r\n localVarHeaderParameter['Content-Type'] = 'application/json';\r\n\r\n localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};\r\n // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943\r\n delete localVarUrlObj.search;\r\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\r\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\r\n const needsSerialization = (typeof saveNewPasswordCommand !== \"string\") || localVarRequestOptions.headers['Content-Type'] === 'application/json';\r\n localVarRequestOptions.data = needsSerialization ? JSON.stringify(saveNewPasswordCommand !== undefined ? saveNewPasswordCommand : {}) : (saveNewPasswordCommand || \"\");\r\n\r\n return {\r\n url: globalImportUrl.format(localVarUrlObj),\r\n options: localVarRequestOptions,\r\n };\r\n },\r\n /**\r\n * \r\n * @summary Handle sign in to legacy application\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n signInToLegacyApplication: async (options: any = {}): Promise => {\r\n const localVarPath = `/selfcare/api/v1/selfcareCustomer/loginToLegacyApp`;\r\n const localVarUrlObj = globalImportUrl.parse(localVarPath, true);\r\n let baseOptions;\r\n if (configuration) {\r\n baseOptions = configuration.baseOptions;\r\n }\r\n const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};\r\n const localVarHeaderParameter = {} as any;\r\n const localVarQueryParameter = {} as any;\r\n\r\n\r\n \r\n localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query};\r\n // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943\r\n delete localVarUrlObj.search;\r\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\r\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\r\n\r\n return {\r\n url: globalImportUrl.format(localVarUrlObj),\r\n options: localVarRequestOptions,\r\n };\r\n },\r\n }\r\n};\r\n\r\n/**\r\n * SelfcareCustomerApi - functional programming interface\r\n * @export\r\n */\r\nexport const SelfcareCustomerApiFp = function(configuration?: Configuration) {\r\n return {\r\n /**\r\n * \r\n * @summary Get Selfcare Services for resource owner, return user info and enum list of services\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n async getSelfcareCustomerServices(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {\r\n const localVarAxiosArgs = await SelfcareCustomerApiAxiosParamCreator(configuration).getSelfcareCustomerServices(options);\r\n return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\r\n const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};\r\n return axios.request(axiosRequestArgs);\r\n };\r\n },\r\n /**\r\n * \r\n * @summary Change password handling\r\n * @param {SaveNewPasswordCommand} [saveNewPasswordCommand] \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n async saveNewPassword(saveNewPasswordCommand?: SaveNewPasswordCommand, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {\r\n const localVarAxiosArgs = await SelfcareCustomerApiAxiosParamCreator(configuration).saveNewPassword(saveNewPasswordCommand, options);\r\n return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\r\n const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};\r\n return axios.request(axiosRequestArgs);\r\n };\r\n },\r\n /**\r\n * \r\n * @summary Handle sign in to legacy application\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n async signInToLegacyApplication(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {\r\n const localVarAxiosArgs = await SelfcareCustomerApiAxiosParamCreator(configuration).signInToLegacyApplication(options);\r\n return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\r\n const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};\r\n return axios.request(axiosRequestArgs);\r\n };\r\n },\r\n }\r\n};\r\n\r\n/**\r\n * SelfcareCustomerApi - factory interface\r\n * @export\r\n */\r\nexport const SelfcareCustomerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {\r\n return {\r\n /**\r\n * \r\n * @summary Get Selfcare Services for resource owner, return user info and enum list of services\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n getSelfcareCustomerServices(options?: any): AxiosPromise {\r\n return SelfcareCustomerApiFp(configuration).getSelfcareCustomerServices(options).then((request) => request(axios, basePath));\r\n },\r\n /**\r\n * \r\n * @summary Change password handling\r\n * @param {SaveNewPasswordCommand} [saveNewPasswordCommand] \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n saveNewPassword(saveNewPasswordCommand?: SaveNewPasswordCommand, options?: any): AxiosPromise {\r\n return SelfcareCustomerApiFp(configuration).saveNewPassword(saveNewPasswordCommand, options).then((request) => request(axios, basePath));\r\n },\r\n /**\r\n * \r\n * @summary Handle sign in to legacy application\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n */\r\n signInToLegacyApplication(options?: any): AxiosPromise {\r\n return SelfcareCustomerApiFp(configuration).signInToLegacyApplication(options).then((request) => request(axios, basePath));\r\n },\r\n };\r\n};\r\n\r\n/**\r\n * SelfcareCustomerApi - object-oriented interface\r\n * @export\r\n * @class SelfcareCustomerApi\r\n * @extends {BaseAPI}\r\n */\r\nexport class SelfcareCustomerApi extends BaseAPI {\r\n /**\r\n * \r\n * @summary Get Selfcare Services for resource owner, return user info and enum list of services\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n * @memberof SelfcareCustomerApi\r\n */\r\n public getSelfcareCustomerServices(options?: any) {\r\n return SelfcareCustomerApiFp(this.configuration).getSelfcareCustomerServices(options).then((request) => request(this.axios, this.basePath));\r\n }\r\n\r\n /**\r\n * \r\n * @summary Change password handling\r\n * @param {SaveNewPasswordCommand} [saveNewPasswordCommand] \r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n * @memberof SelfcareCustomerApi\r\n */\r\n public saveNewPassword(saveNewPasswordCommand?: SaveNewPasswordCommand, options?: any) {\r\n return SelfcareCustomerApiFp(this.configuration).saveNewPassword(saveNewPasswordCommand, options).then((request) => request(this.axios, this.basePath));\r\n }\r\n\r\n /**\r\n * \r\n * @summary Handle sign in to legacy application\r\n * @param {*} [options] Override http request option.\r\n * @throws {RequiredError}\r\n * @memberof SelfcareCustomerApi\r\n */\r\n public signInToLegacyApplication(options?: any) {\r\n return SelfcareCustomerApiFp(this.configuration).signInToLegacyApplication(options).then((request) => request(this.axios, this.basePath));\r\n }\r\n\r\n}\r\n\r\n\r\n","export const OidcConfiguration: Oidc.UserManagerSettings = {\r\n\tauthority: process.env.REACT_APP_AUTHORITY_URL,\r\n\tclient_id: process.env.REACT_APP_IDENTITY_CLIENT_ID,\r\n\tredirect_uri: process.env.REACT_APP_REDIRECT_URL,\r\n\tpost_logout_redirect_uri: process.env.REACT_APP_POST_LOGOUT_REDIRECT_URI,\r\n\tsilent_redirect_uri: process.env.REACT_APP_SILENT_REDIRECT_URL,\r\n\tresponse_type: 'code',\r\n\tscope: 'openid profile SelfcareAppAPI.write SelfcareAppAPI.read networkId',\r\n\tautomaticSilentRenew: true,\r\n\tloadUserInfo: true\r\n};\r\n","import React, { FC } from 'react';\r\n\r\nexport const PublicHomePage: FC = () => (\r\n\t
\r\n\t\t

Public Homepage

\r\n\t\t
\r\n\t\t\tJulkinen kotisivu. Tälle sivulle pääse ei vaadi kirjautumista/autentikaatiota, eikä sivulla\r\n\t\t\tnäytetä käyttäjäkohtaisia tietoja.
\r\n\t\t\t
Tuotannossa asiakas voidaan ohjata suoraan kirjautumiseen käymättä tällä sivulla.\r\n\t\t
\r\n\t
\r\n);\r\n","import React, { FC } from 'react';\r\n\r\nexport const PostLogOutPage: FC<{ text: string }> = (props) => (\r\n\t
\r\n\t\t

Kirjauduit ulos

\r\n\t\t
\r\n\t\t\tKäyttäjä ohjataan tälle sivulle uloskirjautumisen jälkeen.

\r\n\t\t
\r\n\t
\r\n);\r\n","// tslint:disable\r\n/**\r\n * Selfcare Client API\r\n * Web API for Visio Selfcare Client\r\n *\r\n * The version of the OpenAPI document: v1\r\n * Contact: harju.oskarinen@dataprisma.fi\r\n *\r\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\r\n * https://openapi-generator.tech\r\n * Do not edit the class manually.\r\n */\r\n\r\n\r\nimport { Configuration } from \"./configuration\";\r\n// Some imports not used depending on template conditions\r\n// @ts-ignore\r\nimport globalAxios, { AxiosPromise, AxiosInstance } from 'axios';\r\n\r\nexport const BASE_PATH = \"http://localhost:7150\".replace(/\\/+$/, \"\");\r\n\r\n/**\r\n *\r\n * @export\r\n */\r\nexport const COLLECTION_FORMATS = {\r\n csv: \",\",\r\n ssv: \" \",\r\n tsv: \"\\t\",\r\n pipes: \"|\",\r\n};\r\n\r\n/**\r\n *\r\n * @export\r\n * @interface RequestArgs\r\n */\r\nexport interface RequestArgs {\r\n url: string;\r\n options: any;\r\n}\r\n\r\n/**\r\n *\r\n * @export\r\n * @class BaseAPI\r\n */\r\nexport class BaseAPI {\r\n protected configuration: Configuration | undefined;\r\n\r\n constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {\r\n if (configuration) {\r\n this.configuration = configuration;\r\n this.basePath = configuration.basePath || this.basePath;\r\n }\r\n }\r\n};\r\n\r\n/**\r\n *\r\n * @export\r\n * @class RequiredError\r\n * @extends {Error}\r\n */\r\nexport class RequiredError extends Error {\r\n name: \"RequiredError\" = \"RequiredError\";\r\n constructor(public field: string, msg?: string) {\r\n super(msg);\r\n }\r\n}\r\n","import React, { FC } from 'react';\r\nimport { Link as RouteLink } from 'react-router-dom';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faHome, faEnvelope, faLock, faShieldAlt } from '@fortawesome/free-solid-svg-icons';\r\nimport { pages } from '../Constants/Pages';\r\nimport { Alert, Heading, Link, Text } from '@chakra-ui/react';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nenum Service {\r\n\tUnknown = 0,\r\n\tTVService = 1,\r\n\tFsecure = 2,\r\n\tEmailAccountManagement = 3,\r\n\tBroadbandManagement = 4\r\n}\r\n\r\nexport const ServiceLinks: FC<{ customerServices: number[] }> = (props) => {\r\n\tconst { t } = useTranslation(['common', 'calendar']);\r\n\r\n\tconst tvAndSecurity =\r\n\t\tprops.customerServices.includes(Service.TVService) ||\r\n\t\tprops.customerServices.includes(Service.Fsecure);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{t('SERVICE_LIST_HEADING')}:\r\n\t\t\t\r\n\r\n\t\t\t
\r\n\t\t\t\t{props.customerServices.includes(Service.EmailAccountManagement) && (\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{t('LINK_EMAIL_SERVICE')}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{props.customerServices.includes(Service.BroadbandManagement) && (\r\n\t\t\t\t\t// \r\n\t\t\t\t\t// \t\r\n\t\t\t\t\t// \t\t\r\n\t\t\t\t\t// \t\r\n\t\t\t\t\t// \t\r\n\t\t\t\t\t// \t\t{t('LINK_MOKKI_SCHEDULING')}\r\n\t\t\t\t\t// \t\r\n\t\t\t\t\t// \r\n\t\t\t\t\t\r\n\t\t\t\t\t\tPortaalissa on huoltokatko. Mikäli haluat muutoksen liittymääsi ole yhteydessä\r\n\t\t\t\t\t\tasiakaspalvelu@blc.fi.\r\n\t\t\t\t\t\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{tvAndSecurity && (\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{t('LINK_TV_AND_SECURITY')}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{/* \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{t('calendar:CHANGE_PASSWORD_PAGE_TITLE')}\r\n\t\t\t\t\t\r\n\t\t\t\t */}\r\n\t\t\t
\r\n\t\t\r\n\t);\r\n};\r\n\r\nconst linkProps = {\r\n\tborderRadius: 22,\r\n\td: 'block',\r\n\tpy: 3,\r\n\tpx: 6,\r\n\tmt: 2,\r\n\tbg: 'blue.50',\r\n\t_hover: {\r\n\t\tbg: 'blue.100'\r\n\t}\r\n};\r\n","import * as Api from '../API';\r\n\r\nconst config: Api.Configuration = { basePath: process.env.REACT_APP_API_URL };\r\n\r\n//** Selfcare Customer apis */\r\nexport const CustomerApi = new Api.SelfcareCustomerApi(config);\r\n\r\n//** Calendar product api */\r\nexport const CalendarApi = new Api.CalendarApi(config);\r\n","import * as React from 'react';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport {\r\n\tfaEnvelope,\r\n\tfaEnvelopeOpen,\r\n\tfaFilePdf,\r\n\tfaFileVideo,\r\n\tfaCalendarAlt,\r\n\tfaStar,\r\n\tfaHeart,\r\n\tfaDotCircle\r\n} from '@fortawesome/free-regular-svg-icons';\r\n\r\nimport {\r\n\tfaBan,\r\n\tfaPaw,\r\n\tfaLock,\r\n\tfaLockOpen,\r\n\tfaMinus,\r\n\tfaPlus,\r\n\tfaDownload,\r\n\tfaQuestion,\r\n\tfaQuestionCircle,\r\n\tfaArrowDown,\r\n\tfaArrowUp,\r\n\tfaArrowRight,\r\n\tfaArrowLeft,\r\n\tfaDotCircle as faDotCircleFull,\r\n\tfaExclamation,\r\n\tfaFile,\r\n\tfaAddressBook,\r\n\tfaAddressCard,\r\n\tfaFileImage,\r\n\tfaFileExcel,\r\n\tfaFileWord,\r\n\tfaFilePowerpoint,\r\n\tfaFileAudio,\r\n\tfaSave,\r\n\tfaTimes,\r\n\tfaEllipsisH,\r\n\tfaEllipsisV,\r\n\tfaBars,\r\n\tfaBarcode,\r\n\tfaFileArchive,\r\n\tfaAngleDown,\r\n\tfaAngleUp,\r\n\tfaAngleRight,\r\n\tfaAngleLeft,\r\n\tfaSortDown,\r\n\tfaSortUp,\r\n\tfaCaretDown,\r\n\tfaCaretUp,\r\n\tfaUser,\r\n\tfaUniversity,\r\n\tfaUsers,\r\n\tfaChalkboardTeacher,\r\n\tfaPaperclip,\r\n\tfaCheck,\r\n\tfaDollarSign,\r\n\tfaMoneyBill,\r\n\tfaPrint,\r\n\tfaTimesCircle,\r\n\tfaCheckCircle,\r\n\tfaTrashAlt,\r\n\tfaSearch,\r\n\tfaRedo,\r\n\tfaUndo,\r\n\tfaPen,\r\n\tfaPenAlt,\r\n\tfaShoppingCart,\r\n\tfaEdit,\r\n\tfaCog,\r\n\tfaMobileAlt,\r\n\tfaCopy,\r\n\tfaPaste,\r\n\tfaIgloo,\r\n\tfaEye,\r\n\tfaHotel,\r\n\tfaBox,\r\n\tfaClock,\r\n\tfaEyeSlash,\r\n\tfaGlobe,\r\n\tfaExclamationTriangle,\r\n\tfaHome,\r\n\tfaShare,\r\n\tfaNewspaper,\r\n\tfaComment,\r\n\tfaComments,\r\n\tfaCommentDots,\r\n\tfaInfo,\r\n\tfaInfoCircle,\r\n\tfaShareAlt,\r\n\tfaPaperPlane,\r\n\tfaSpinner,\r\n\tfaMapMarkerAlt,\r\n\tfaList,\r\n\tfaStar as faStarFull,\r\n\tfaSun,\r\n\tfaMoon,\r\n\tfaPowerOff,\r\n\tfaClipboardList,\r\n\tfaReceipt,\r\n\tfaDesktop,\r\n\tfaSignOutAlt,\r\n\tfaImage,\r\n\tfaPhotoVideo,\r\n\tfaHeart as fullheart,\r\n\tfaPhone,\r\n\tfaPlug\r\n} from '@fortawesome/free-solid-svg-icons';\r\n\r\nexport const Icons = {\r\n\theart: ,\r\n\theart_full: ,\r\n\tbanned: ,\r\n\tmedia: ,\r\n\timage: ,\r\n\tsign_out: ,\r\n\tcomputer: ,\r\n\tmoon: ,\r\n\tsun: ,\r\n\tpower_off: ,\r\n\tspinner_static: ,\r\n\tspinner: ,\r\n\tshare_alt: ,\r\n\tpaperplane: ,\r\n\tmap_marker: ,\r\n\tlist: ,\r\n\tclipboard_list: ,\r\n\thome: ,\r\n\tstar: ,\r\n\tstar_filled: ,\r\n\tnewspaper: ,\r\n\tshare: ,\r\n\ttwitter: ,\r\n\tcomments: ,\r\n\tcomment: ,\r\n\tcomments_dots: ,\r\n\tinfo: ,\r\n\tinfo_circle: ,\r\n\treceipt: ,\r\n\tlockopen: ,\r\n\tlock: ,\r\n\tpaw: ,\r\n\taddress_book: ,\r\n\taddress_card: ,\r\n\tellipses_H: ,\r\n\tellipses_V: ,\r\n\tbarcode: ,\r\n\tbars: ,\r\n\tigloo: ,\r\n\tshopping_cart: ,\r\n\thotel: ,\r\n\tplus: ,\r\n\tminus: ,\r\n\ttrashcan: ,\r\n\tdownload: ,\r\n\tquestionmark: ,\r\n\tquestion: ,\r\n\texlamation: ,\r\n\texlamation_triangle: ,\r\n\tfile: ,\r\n\tfile_text: ,\r\n\tfile_image: ,\r\n\tfile_pdf: ,\r\n\tfile_excel: ,\r\n\tfile_powerpoint: ,\r\n\tfile_word: ,\r\n\tfile_video: ,\r\n\tfile_audio: ,\r\n\tfile_archive: ,\r\n\tsave: ,\r\n\tclose: ,\r\n\tarrowLeft: ,\r\n\tarrowRight: ,\r\n\tarrowUp: ,\r\n\tarrowDown: ,\r\n\tangle_up: ,\r\n\tangle_down: ,\r\n\tangle_right: ,\r\n\tangle_right_rotated: ,\r\n\tangle_left: ,\r\n\tsortUp: ,\r\n\tsortDown: ,\r\n\tcaretUp: ,\r\n\tcaretDown: ,\r\n\tusers: ,\r\n\tuser: ,\r\n\tteacher: ,\r\n\tglobe: ,\r\n\tcheck: ,\r\n\tcalendar: ,\r\n\tdollar: ,\r\n\tmoney: ,\r\n\tprint: ,\r\n\tcheck_circle: ,\r\n\ttimes_circle: ,\r\n\tsearch: ,\r\n\tredo: ,\r\n\tundo: ,\r\n\tpen: ,\r\n\tpen_alt: ,\r\n\tedit: ,\r\n\tenvelope: ,\r\n\tenvelope_open: ,\r\n\tmobile: ,\r\n\tWIP: ,\r\n\tcog: ,\r\n\teye: ,\r\n\teye_slash: ,\r\n\tbox: ,\r\n\tuniversity: ,\r\n\tclock: ,\r\n\tpaperclip: ,\r\n\tcopy: ,\r\n\tpaste: ,\r\n\tphone: ,\r\n\tplug: ,\r\n\tdot: ,\r\n\tdot_solid: \r\n};\r\n\r\nexport default Icons;\r\n","import React, { FC, useEffect, useState } from 'react';\r\nimport { CustomerApi } from '../API/sdk';\r\nimport Icons from '../Components/Icons/icons';\r\n\r\nexport const LegacySelfcareRedirectTrigger = () => {\r\n\tconst [state, setState] = useState({\r\n\t\turl: null as any,\r\n\t\txml: null as any,\r\n\t\tisReadyToSubmit: false\r\n\t});\r\n\r\n\tuseEffect(() => {\r\n\t\t// get credentials for legacy login from api\r\n\t\tCustomerApi.signInToLegacyApplication().then(\r\n\t\t\t(result) => {\r\n\t\t\t\tsetState({\r\n\t\t\t\t\turl: result.data.url,\r\n\t\t\t\t\txml: result.data.xml,\r\n\t\t\t\t\tisReadyToSubmit: true\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\t(fail) => console.error(fail)\r\n\t\t);\r\n\t}, []);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\tOdota... {Icons.spinner}\r\n\t\t\t{/* Once credentials have been recieved draw autosubmit form to trigger redirect */}\r\n\t\t\t{state.isReadyToSubmit ? : null}\r\n\t\t
\r\n\t);\r\n};\r\n\r\nconst SelfSubmittingForm: FC<{ url: string; value: string }> = (props) => {\r\n\tconst formRef = React.useRef(null as null | HTMLFormElement);\r\n\r\n\tuseEffect(() => {\r\n\t\tformRef.current?.submit();\r\n\t}, []);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n","import React, { FC } from 'react';\r\nimport { LegacySelfcareRedirectTrigger } from '../Utils/SelfSubmittinForm';\r\n\r\nexport const TvAndSecurityRedirect: FC = (props) => {\r\n\treturn (\r\n\t\t
\r\n\t\t\t{/*

TV ja Turvallisuuspavelun uudelleen ohjaus

\r\n\t\t\t
Tämä on uudelleenohjaus-sivu joka vie käyttäjän TV ja Turvallisuuspalveluun.
*/}\r\n\t\t\t\r\n\t\t
\r\n\t);\r\n};\r\n","import React, { FC } from 'react';\r\nimport { LegacySelfcareRedirectTrigger } from '../Utils/SelfSubmittinForm';\r\n\r\nexport const EmailManagementRedirect: FC = (props) => {\r\n\treturn (\r\n\t\t
\r\n\t\t\t{/*

Sähköpostinhallinnan uudelleen ohjaus

\r\n\t\t\t
Tämä on uudelleenohjaus-sivu joka vie käyttäjän Sähköpostinhallintaan.
*/}\r\n\t\t\t\r\n\t\t
\r\n\t);\r\n};\r\n","export const pages = {\r\n\thome: '/home',\r\n\tnotFound: '/404',\r\n\tpost_signout: '/signed_out',\r\n\tchange_password: '/change_password',\r\n\tservices: '/services',\r\n\tbroadband: '/services/broadband',\r\n\tbroadbandList: '/services/broadband_services',\r\n\tTvAndSecurity: '/services/tv_and_security',\r\n\temailService: '/services/email_management'\r\n};\r\n","import React, { FC, useState, useEffect } from 'react';\r\nimport { SelfcareCustomerDto } from '../API';\r\nimport { Flex, Heading, Spinner } from '@chakra-ui/react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { ServiceLinks } from './ServiceLinks';\r\nimport { CustomerApi } from '../API/sdk';\r\n\r\nexport const UserServicesPage: FC = (props) => {\r\n\tconst { t } = useTranslation('common');\r\n\tconst [customer, setCustomer] = useState(null);\r\n\tconst [pending, setPending] = useState(false);\r\n\r\n\tconst updateCustomer = async () => {\r\n\t\tsetPending(true);\r\n\t\tconst result = await CustomerApi.getSelfcareCustomerServices();\r\n\t\tresult.data && setCustomer(result.data);\r\n\t\tsetPending(false);\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tupdateCustomer();\r\n\t}, []);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t\r\n\t\t\t\t{t('SERVICE_WELCOME')}\r\n\t\t\t\r\n\r\n\t\t\t{pending && (\r\n\t\t\t\t\r\n\t\t\t\t\t {t('FETCHING_SERVICES_NOTIFICATION')}\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{!pending && customer !== null && }\r\n\t\t
\r\n\t);\r\n};\r\n","export const WEEKDAYS_SHORT = {\r\n\tsv: ['Sö', 'Må', 'Ti', 'On', 'To', 'Fr', 'Lö'],\r\n\tfi: ['Su', 'Ma', 'Ti', 'Ke', 'To', 'Pe', 'La']\r\n};\r\n\r\nexport const MONTHS = {\r\n\tfi: [\r\n\t\t'Tammikuu',\r\n\t\t'Helmikuu',\r\n\t\t'Maaliskuu',\r\n\t\t'Huhtikuu',\r\n\t\t'Toukokuu',\r\n\t\t'Kesäkuu',\r\n\t\t'Heinäkuu',\r\n\t\t'Elokuu',\r\n\t\t'Syyskuu',\r\n\t\t'Lokakuu',\r\n\t\t'Marraskuu',\r\n\t\t'Joulukuu'\r\n\t],\r\n\tsv: [\r\n\t\t'Januari',\r\n\t\t'Februari',\r\n\t\t'Mars',\r\n\t\t'April',\r\n\t\t'Maj',\r\n\t\t'Juni',\r\n\t\t'Juli',\r\n\t\t'Augusti',\r\n\t\t'September',\r\n\t\t'Oktober',\r\n\t\t'November',\r\n\t\t'December'\r\n\t]\r\n};\r\n\r\nexport const WEEKDAYS_LONG = {\r\n\tfi: ['Sunnuntai', 'Maanantai', 'Tiistai', 'Keskiviikko', 'Torstai', 'Perjantai', 'Lauantai'],\r\n\tsv: ['Måndag', 'Tisdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lördag', 'Söndag']\r\n};\r\n\r\nexport const FIRST_DAY_OF_WEEK = {\r\n\tfi: 1,\r\n\tsv: 1\r\n};\r\n\r\n// Translate aria-labels\r\nexport const LABELS = {\r\n\tfi: { nextMonth: 'Seuraava kuukausi', previousMonth: 'Edeltävä kuukausi' },\r\n\tsv: { nextMonth: 'Prossimo mese', previousMonth: 'Mese precedente' }\r\n};\r\n","export class DateHelpers {\r\n\t//** unused */\r\n\tstatic getLastDayOfNthMonth = function (y: number, m: number) {\r\n\t\treturn { day: new Date(y, m + 2, 0).getDate(), year: y, month: m };\r\n\t};\r\n\r\n\t/**\r\n\t * @param {int} The month number, 0 based\r\n\t * @param {int} The year, not zero based, required to account for leap years\r\n\t * @return {Date[]} List with date objects for each day of the month\r\n\t */\r\n\tstatic getDaysInMonth(month: number, year: number) {\r\n\t\tlet date = new Date(year, month, 1);\r\n\t\tlet days = [];\r\n\t\twhile (date.getMonth() === month) {\r\n\t\t\tdays.push(new Date(date));\r\n\t\t\tdate.setDate(date.getDate() + 1);\r\n\t\t}\r\n\t\treturn days;\r\n\t}\r\n\r\n\t//** Conver Date to ISO compliant string */\r\n\tstatic dateToISOString = (date: Date) =>\r\n\t\tnew Date(date.getTime() - date.getTimezoneOffset() * 60000).toISOString().split('T')[0];\r\n\r\n\t//** Convert ISO-compliant string to date (yyyy-mm-dd) */\r\n\tstatic isoStringToDate = (dateString: string) => new Date(dateString);\r\n\r\n\t//** Generates Date list of from given start and end date, including those */\r\n\tstatic generateDateList = (from: Date, to: Date) => {\r\n\t\tconst dates = [];\r\n\t\t// Strip hours minutes seconds etc.\r\n\t\tlet currentDate = new Date(from.getFullYear(), from.getMonth(), from.getDate());\r\n\t\twhile (currentDate <= to) {\r\n\t\t\tdates.push(currentDate);\r\n\t\t\tcurrentDate = new Date(\r\n\t\t\t\tcurrentDate.getFullYear(),\r\n\t\t\t\tcurrentDate.getMonth(),\r\n\t\t\t\tcurrentDate.getDate() + 1 // Will increase month if over range\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n}\r\n","import { default as React, FC, useEffect } from 'react';\r\n\r\nexport const HasUnsavedChangesConfirmation: FC<{ isDirty: boolean }> = ({ isDirty }) => {\r\n\tuseEffect(() => {\r\n\t\tisDirty ? AddConfirmation() : RemoveConfirmation();\r\n\t}, [isDirty]);\r\n\r\n\treturn <>;\r\n};\r\n\r\nconst AddConfirmation = () => {\r\n\tRemoveConfirmation();\r\n\twindow.addEventListener('beforeunload', onUnload);\r\n};\r\n\r\nconst RemoveConfirmation = () => {\r\n\twindow.removeEventListener('beforeunload', onUnload);\r\n};\r\n\r\nconst onUnload = (event: any) => {\r\n\t// Cancel the event as stated by the standard.\r\n\tevent.preventDefault();\r\n\t// Chrome requires returnValue to be set.\r\n\tevent.returnValue = '';\r\n};\r\n","import i18n from 'i18next';\r\nimport { initReactI18next } from 'react-i18next';\r\nimport LanguageDetector from 'i18next-browser-languagedetector';\r\nimport CommonTranslations from './CommonTranslations.json';\r\nimport CalendarTranslations from './CalendarTranslations.json';\r\nimport { Language } from '../Constants/Language';\r\n\r\n// translation catalog\r\nconst resources = {\r\n\t[Language.fi]: {\r\n\t\tcommon: CommonTranslations.finnish,\r\n\t\tcalendar: CalendarTranslations.finnish\r\n\t},\r\n\t[Language.en]: {\r\n\t\tcommon: CommonTranslations.english,\r\n\t\tcalendar: CalendarTranslations.english\r\n\t},\r\n\t[Language.swe]: {\r\n\t\tcommon: CommonTranslations.swedish,\r\n\t\tcalendar: CalendarTranslations.swedish\r\n\t}\r\n};\r\n\r\nconst options = {\r\n\tresources,\r\n\tfallbackLng: Language.fi.toString(),\r\n\tdebug: process.env.NODE_ENV === 'development',\r\n\tinterpolation: {\r\n\t\tescapeValue: false // not needed for react as it escapes by default\r\n\t},\r\n\tdetection: {\r\n\t\torder: ['cookie'],\r\n\t\tlookupCookie: 'LanguageCookie',\r\n\t\tcaches: ['localStorage', 'cookie']\r\n\t}\r\n};\r\n\r\n// for passing in lng and translations on init\r\ni18n.use(LanguageDetector).use(initReactI18next).init(options);\r\n\r\nexport default i18n;\r\nexport { i18n };\r\n","import React, { useEffect, useState } from 'react';\r\nimport { Spinner } from '@chakra-ui/react';\r\nimport { MokkiCalendar } from './MokkiCalendar/MokkiCalendar';\r\nimport { useParams } from 'react-router';\r\nimport { CalendarApi } from '../../API/sdk';\r\nimport { CalendarProductDto } from '../../API';\r\nimport { Language, LanguageId, toLanguageId } from '../../Constants/Language';\r\nimport i18n from '../../Translation/Translation';\r\n\r\nexport enum SelectionType {\r\n\tday = 0,\r\n\tcontinuous = 1\r\n}\r\n\r\nexport interface IMokkiPackage {\r\n\tname: string;\r\n\tdescription: string;\r\n\tselfcareDescription?: string;\r\n\tyear: number;\r\n\tminSelected: number;\r\n\tmaxSelected: number;\r\n\tcurrentSelected: number;\r\n\tselectionType: SelectionType;\r\n\tavailableYears?: number[];\r\n\tdays: {\r\n\t\tisSelected: boolean;\r\n\t\tid: number;\r\n\t\tisLocked: boolean;\r\n\t\tdateString: string;\r\n\t\tdate: Date;\r\n\t}[];\r\n}\r\n\r\nexport type CalendarChange = { id: number; isSelected: boolean };\r\n\r\nexport const CalendarPage = () => {\r\n\tconst [year, setYear] = useState(new Date().getFullYear().toString());\r\n\tconst [mokkiCalendar, setMokkiCalendar] = useState();\r\n\tconst { orderid, orderrowid } = useParams<{ orderid: string; orderrowid: string }>();\r\n\tconst localeLang = i18n.language;\r\n\r\n\tuseEffect(() => {\r\n\t\tupdateCalendar(year, orderid, orderrowid);\r\n\t}, [year, orderid, orderrowid, localeLang]);\r\n\r\n\tconst refreshCalendar = () => updateCalendar(year, orderid, orderrowid);\r\n\r\n\tconst updateCalendar = async (year: string, orderId: string, orderRowId: string) => {\r\n\t\t//parse params\r\n\t\tconst pOrderId = parseInt(orderId);\r\n\t\tconst pOrderRowId = parseInt(orderRowId);\r\n\t\tconst pYear = parseInt(year);\r\n\r\n\t\t// gatekeeper, proceed only with number values\r\n\t\tif (Number.isNaN(pOrderId) || Number.isNaN(pOrderRowId) || Number.isNaN(pYear)) return;\r\n\r\n\t\t//get calendar\r\n\t\tconst result = await CalendarApi.getCustomerCalendarProduct(\r\n\t\t\tpYear,\r\n\t\t\tpOrderId,\r\n\t\t\tpOrderRowId,\r\n\t\t\ttoLanguageId[localeLang] ?? LanguageId.finnish\r\n\t\t);\r\n\r\n\t\tif (!result.data) return; // gateguard\r\n\t\tconst data = result.data as CalendarProductDto;\r\n\r\n\t\tsetMokkiCalendar({\r\n\t\t\t...data,\r\n\t\t\tselfcareDescription: data.selfCareDescription,\r\n\t\t\tselectionType: data.selectionType as unknown as SelectionType,\r\n\t\t\tdays: data.days.map((item) => ({ ...item, date: new Date(item.dateString), id: item.id }))\r\n\t\t});\r\n\t};\r\n\r\n\tconst submitCalenderChanges = (values: CalendarChange[]) => {\r\n\t\t// console.table(values);\r\n\t\tconst pOrderId = parseInt(orderid);\r\n\t\tconst pOrderRowId = parseInt(orderrowid);\r\n\t\tconst pYear = parseInt(year);\r\n\r\n\t\t// gatekeeper, proceed only with number values\r\n\t\tif (Number.isNaN(pOrderId) || Number.isNaN(pOrderRowId) || Number.isNaN(pYear))\r\n\t\t\treturn Promise.reject();\r\n\r\n\t\treturn CalendarApi.postChangedCalenderProductDays({\r\n\t\t\torderId: pOrderId,\r\n\t\t\torderRowId: pOrderRowId,\r\n\t\t\tyear: pYear,\r\n\t\t\tdays: values\r\n\t\t});\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{mokkiCalendar ? (\r\n\t\t\t\t\r\n\t\t\t) : (\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\r\n\t);\r\n};\r\n","export class Helpers {\r\n\t// JSON close with date parsing\r\n\t// + attempts to revive parsed datestrings\r\n\t// - less performant\r\n\t// - should be tested case by case\r\n\t/** Cloonaa objektin, funktiot eivät kopioidu, päivämäärät yritetään pitää päivämäärinä */\r\n\tstatic cloneWithDates(x: T | {} = {}): T {\r\n\t\tconst dateTimeReviver = (key: string, value: string) => {\r\n\t\t\tif (typeof value === 'string' && /^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d.\\d\\d\\dZ$/.test(value)) {\r\n\t\t\t\treturn new Date(value);\r\n\t\t\t}\r\n\t\t\treturn value;\r\n\t\t};\r\n\t\treturn JSON.parse(JSON.stringify(x), dateTimeReviver);\r\n\t}\r\n}\r\n","import { Box, Flex, Stack, Text } from '@chakra-ui/react';\r\nimport React from 'react';\r\n\r\nconst legendSymbol = 'x';\r\nconst legendProps = {\r\n\tw: 8,\r\n\th: 8,\r\n\td: 'flex',\r\n\tborderRadius: '100%',\r\n\talignItems: 'center',\r\n\tjustifyContent: 'center',\r\n\talignSelf: 'center',\r\n\tfontSize: 'sm',\r\n\tflex: '0 0 2rem',\r\n\tborder: '1px solid'\r\n};\r\n\r\nexport const LegendExplanations = () => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{legendSymbol}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tPalvelu on aktiivinen\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{legendSymbol}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tPalvelu on passiivinen\r\n\t\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{legendSymbol}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tKuluva päivä, palvelu on passiivinen{' '}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{legendSymbol}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tKuluva päivä, palvelu on aktiivinen (tilaa ei voi muuttaa)\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{legendSymbol}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tPalvelu on aktiivinen, päivän valittua tilaa ei voi muuttaa\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{legendSymbol}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tPalvelu on passiivinen, päivän valittua tilaa ei voi muuttaa\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React, { useState, FC, useEffect } from 'react';\r\nimport { MONTHS, WEEKDAYS_LONG, WEEKDAYS_SHORT, FIRST_DAY_OF_WEEK } from '../CalenderTranslations';\r\nimport DayPicker, { DateUtils } from 'react-day-picker';\r\nimport { CalendarChange, IMokkiPackage, SelectionType } from '../CalendarPage';\r\nimport { DateHelpers } from '../DateHelpers';\r\nimport {\r\n\tHeading,\r\n\tText,\r\n\tDivider,\r\n\tGrid,\r\n\tBox,\r\n\tButton,\r\n\tSelect,\r\n\tAlert,\r\n\tAlertIcon,\r\n\tAlertDescription,\r\n\tBadge\r\n} from '@chakra-ui/react';\r\nimport 'react-day-picker/lib/style.css';\r\nimport Icons from '../../../Components/Icons/icons';\r\nimport { HasUnsavedChangesConfirmation } from '../../../Components/HasUnsavedChangesConfirmation';\r\nimport i18n from '../../../Translation/Translation';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { Helpers } from '../../../Utils/Helpers';\r\nimport { AxiosResponse } from 'axios';\r\nimport { LegendExplanations } from './Legend';\r\n\r\nexport interface MokkiCalendarProps {\r\n\tproduct: IMokkiPackage;\r\n\tyear: number;\r\n\tsetYear: (x: string) => void;\r\n\tsave: (x: CalendarChange[]) => Promise>;\r\n\trefreshCalendar: () => void;\r\n}\r\n\r\ninterface ICalenderDay {\r\n\tisSelected: boolean;\r\n\tisLocked: boolean;\r\n\tid: number;\r\n\tdateString: string;\r\n\tdate: Date;\r\n\toriginalSelectedState: boolean;\r\n\thasChanged: boolean;\r\n}\r\n\r\nconst createInitialCalender = (days: IMokkiPackage['days']): ICalenderDay[] =>\r\n\tHelpers.cloneWithDates(days).map((d) => ({\r\n\t\t...d,\r\n\t\thasChanged: false,\r\n\t\toriginalSelectedState: d.isSelected\r\n\t}));\r\n\r\nexport const MokkiCalendar: FC = (props) => {\r\n\tconst { product, year, setYear, save, refreshCalendar } = props;\r\n\tconst [calendarDays, setCalendarDays] = useState(\r\n\t\tcreateInitialCalender(product.days)\r\n\t);\r\n\tconst [showSuccess, setShowSuccess] = useState(false);\r\n\tconst [isSubmitting, setIsSubmitting] = useState(false);\r\n\tconst { t } = useTranslation('calendar');\r\n\r\n\tuseEffect(() => {\r\n\t\t// re-initialise calender when we get new product from props\r\n\t\tsetCalendarDays(createInitialCalender(product.days));\r\n\t}, [product]);\r\n\r\n\tconst handleSave = () => {\r\n\t\tsetIsSubmitting(true);\r\n\r\n\t\tconst changedDates = calendarDays\r\n\t\t\t.filter((item) => item.hasChanged)\r\n\t\t\t.map((item) => ({ id: item.id, isSelected: item.isSelected }));\r\n\r\n\t\tsave(changedDates).then(\r\n\t\t\t(success) => {\r\n\t\t\t\tsetShowSuccess(true);\r\n\t\t\t\tsetIsSubmitting(false);\r\n\t\t\t\trefreshCalendar();\r\n\t\t\t},\r\n\t\t\t(fail) => {\r\n\t\t\t\tsetIsSubmitting(false);\r\n\t\t\t\tconsole.error(fail);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tconst getCalendarDaysClone = () => Helpers.cloneWithDates(calendarDays);\r\n\r\n\tconst getSelectedDays = () => calendarDays.filter((d) => d.isSelected).map((d) => d.date);\r\n\r\n\tconst getDisabledDays = () => calendarDays.filter((d) => d.isLocked).map((d) => d.date);\r\n\r\n\tconst handleDayClick = (p: Date, modifiers = {} as any) => {\r\n\t\t// do nothing if date was disabled\r\n\t\tif (modifiers.disabled) return;\r\n\r\n\t\t// get selected\r\n\t\tconst selected = modifiers.selected ? true : false;\r\n\r\n\t\tsetShowSuccess(false);\r\n\r\n\t\t// handle selection based on selectiontype\r\n\t\tproduct.selectionType === SelectionType.continuous\r\n\t\t\t? doMonthSelection(p, selected)\r\n\t\t\t: doDaySelection(p, selected);\r\n\t};\r\n\r\n\tconst doMonthSelection = (d: Date, isSelected: boolean) => {\r\n\t\t// console.log('doing sliding selection');\r\n\t\tconst dayString = DateHelpers.dateToISOString(d);\r\n\t\tconst dayIndex = calendarDays.findIndex((day) => day.dateString === dayString);\r\n\t\tconst dayExists = dayIndex > -1;\r\n\t\tconst newSelectionState = !isSelected;\r\n\r\n\t\t// gatekeeper\r\n\t\tif (!dayExists) return;\r\n\r\n\t\t// create immutable new calendar\r\n\t\tlet calendar = getCalendarDaysClone();\r\n\t\tlet daysToModify = [] as ICalenderDay[];\r\n\t\tlet daysToHold = [] as ICalenderDay[];\r\n\r\n\t\t// update calender\r\n\t\tcalendar.forEach((item) => {\r\n\t\t\t// modify only upcoming and selected day\r\n\t\t\tif ((item.date > d || DateUtils.isSameDay(d, item.date)) && !item.isLocked) {\r\n\t\t\t\t// update state and push to altered\r\n\t\t\t\tdaysToModify.push({\r\n\t\t\t\t\t...item,\r\n\t\t\t\t\tisSelected: newSelectionState,\r\n\t\t\t\t\thasChanged: item.originalSelectedState !== newSelectionState\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tdaysToHold.push(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// combine lists\r\n\t\tconst newCalendar = [...daysToModify, ...daysToHold];\r\n\r\n\t\tsetCalendarDays(newCalendar);\r\n\t};\r\n\r\n\tconst doDaySelection = (d: Date, isSelected: boolean) => {\r\n\t\tconst dayString = DateHelpers.dateToISOString(d);\r\n\t\tconst dayIndex = calendarDays.findIndex((day) => day.dateString === dayString);\r\n\t\tconst dayExists = dayIndex > -1;\r\n\t\tconst newSelectionState = !isSelected;\r\n\r\n\t\t// gatekeeper\r\n\t\tif (!dayExists) return;\r\n\r\n\t\t// create immutable daylist selected list\r\n\t\tlet calendar = getCalendarDaysClone();\r\n\r\n\t\t// toggle state for clicked day\r\n\t\tcalendar[dayIndex].isSelected = newSelectionState;\r\n\t\tcalendar[dayIndex].hasChanged = calendar[dayIndex].originalSelectedState !== newSelectionState;\r\n\r\n\t\t// bail if too many selections\r\n\t\tif (newSelectionState === true && product && dayCount + 1 > product.maxSelected) return;\r\n\r\n\t\tsetCalendarDays(calendar);\r\n\t};\r\n\r\n\tconst localeLang = i18n.language;\r\n\tconst calenderType =\r\n\t\tproduct.selectionType === SelectionType.continuous ? 'daypicker-selectype-month' : '';\r\n\tconst availableYears = product.availableYears || [];\r\n\tconst selectedDays = getSelectedDays();\r\n\tconst disabledDays = getDisabledDays();\r\n\tconst todayIsActive = currentDayWasSelected(selectedDays);\r\n\tconst hasUnsavedChanges = calendarDays.some((item) => item.hasChanged);\r\n\tconst dayCount = calendarDays.reduce(\r\n\t\t(previous, current) => previous + (current.isSelected ? 1 : 0),\r\n\t\t0\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{product.name}{' '}\r\n\t\t\t\t\r\n\t\t\t\t\t{year}\r\n\t\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t{product.description}\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t{todayIsActive\r\n\t\t\t\t\t? t('SERVICE_OPEN_TODAY_NOTIFICATION')\r\n\t\t\t\t\t: t('SERVICE_CLOSED_TODAY_NOTIFICATION')}\r\n\t\t\t\r\n\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t{/* Left Content */}\r\n\t\t\t\t
\r\n\t\t\t\t\t{product?.selectionType === SelectionType.day && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t{`${t('SELECTABLE_LEFT')} ${product.maxSelected - dayCount}`}\r\n\t\t\t\t\t\t\t\t{`(maksimi ${product.maxSelected})`}\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t)}\r\n\r\n\t\t\t\t\t{availableYears.length > 0 && (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{'Valittavat vuodet'}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t)}\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{t('SAVE_BTN')}\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{product.selfcareDescription || t('USAGE_GUIDE')}\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t{/* Right Content */}\r\n\t\t\t\t\r\n\t\t\t\t\t{showSuccess && !hasUnsavedChanges && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{t('CHANGES_APPLY_NOTIFICATION')}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t)}\r\n\r\n\t\t\t\t\t{hasUnsavedChanges && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{t('UNSAVED_WARNING')}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t)}\r\n\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t renderDay(day, selectedDays)}\r\n\t\t\t\t\t\tdisabledDays={disabledDays}\r\n\t\t\t\t\t\tonDayClick={handleDayClick}\r\n\t\t\t\t\t\t//translations\r\n\t\t\t\t\t\tmonths={MONTHS[parseLocale(localeLang)]}\r\n\t\t\t\t\t\tweekdaysLong={WEEKDAYS_LONG[parseLocale(localeLang)]}\r\n\t\t\t\t\t\tweekdaysShort={WEEKDAYS_SHORT[parseLocale(localeLang)]}\r\n\t\t\t\t\t\tfirstDayOfWeek={FIRST_DAY_OF_WEEK[parseLocale(localeLang)]}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\r\n\t);\r\n};\r\n\r\nconst renderDay = (day: Date, dates: Date[]) => (\r\n\t
\r\n\t\t{day.getDate()}\r\n\t
\r\n);\r\n\r\nconst includesDate = (days: Date[], date: Date) =>\r\n\tdays.some((day) => DateUtils.isSameDay(day, date));\r\n\r\nconst currentDayWasSelected = (selectedDays: Date[]): boolean => {\r\n\tconst currentDay = DateHelpers.dateToISOString(new Date());\r\n\tconst selected = selectedDays.map((day) => DateHelpers.dateToISOString(day));\r\n\r\n\t// selected.includes(currentDay) ? alert('Current day included') : alert('Not included');\r\n\treturn selected.includes(currentDay);\r\n};\r\n\r\nconst parseLocale = (language: string) => language.substring(0, 2);\r\n\r\n// const initialState = {\r\n// \tselectedDays: [] as Date[],\r\n// \talertType: 'DEFAULT' as 'UNSAVED' | 'DEFAULT' | 'SAVED',\r\n// \tdayCount: 0,\r\n// \tmonthCount: 0,\r\n// \tdisabledDays: [] as Date[]\r\n// };\r\n\r\n// type State = typeof initialState;\r\n// type Action =\r\n// \t| { type: 'ADD_DAY'; payload: Date }\r\n// \t| { type: 'REMOVE_DAY'; payload: number }\r\n// \t| { type: 'ADD_MONTH'; payload: Date }\r\n// \t| { type: 'REMOVE_MONTH'; payload: Date }\r\n// \t| { type: 'SAVED' };\r\n\r\n// const reducer = (state: State, action: Action) => {\r\n// \tswitch (action.type) {\r\n// \t\tcase 'ADD_DAY':\r\n// \t\t\treturn {\r\n// \t\t\t\t...state,\r\n// \t\t\t\tdayCount: state.dayCount + 1,\r\n// \t\t\t\talertType: 'UNSAVED',\r\n// \t\t\t\tselectedDays: [...state.selectedDays, action.payload]\r\n// \t\t\t};\r\n// \t\tcase 'REMOVE_DAY':\r\n// \t\t\treturn { ...state, dayCount: state.dayCount - 1, alertType: 'UNSAVED', selectedDays: [] };\r\n// \t\tcase 'ADD_MONTH':\r\n// \t\t\treturn { ...state, dayCount: state.monthCount + 1, alertType: 'UNSAVED', selectedDays: [] };\r\n// \t\tcase 'REMOVE_MONTH':\r\n// \t\t\treturn { ...state, dayCount: state.monthCount - 1, alertType: 'UNSAVED', selectedDays: [] };\r\n// \t\tcase 'SAVED':\r\n// \t\t\treturn { ...state, alertState: 'SAVED' };\r\n// \t\tdefault:\r\n// \t\t\treturn { ...state };\r\n// \t}\r\n// };\r\n","import { Text, Link, Heading } from '@chakra-ui/react';\r\nimport React, { FC, useEffect, useState } from 'react';\r\nimport { Order } from '../API';\r\nimport { CalendarApi } from '../API/sdk';\r\nimport { Link as RouteLink } from 'react-router-dom';\r\nimport { pages } from '../Constants/Pages';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nexport const CalenderProductListPage: FC = (props) => {\r\n\tconst [list, setList] = useState();\r\n\tconst { t } = useTranslation('calendar');\r\n\r\n\tconst updateSettings = async () => {\r\n\t\tconst result = await CalendarApi.getCustomerCalendarProducts();\r\n\t\tresult.data && setList(result.data);\r\n\r\n\t\t// if (result.data && result.data.length === 1) {\r\n\t\t// \talert('Asiakkaalla vain yksi kalenterituote, ohjataan suoraan kalenteriin');\r\n\t\t// }\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tupdateSettings();\r\n\t}, []);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t\r\n\t\t\t\t{t('Kalenterituotteet')}\r\n\t\t\t\r\n\r\n\t\t\t{list &&\r\n\t\t\t\tlist.map((item, i) => (\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{item.productName}\r\n\t\t\t\t\t\t\t{item.address}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t))}\r\n\t\t
\r\n\t);\r\n};\r\n\r\nconst linkProps = {\r\n\tborderRadius: 4,\r\n\td: 'block',\r\n\tpy: 2,\r\n\tpx: 2,\r\n\tmt: 2,\r\n\tbg: 'blue.50',\r\n\t_hover: {\r\n\t\tbg: 'blue.100'\r\n\t}\r\n};\r\n","import React, { FC } from 'react';\r\n\r\nexport const NotFound: FC = () => (\r\n\t
\r\n\t\t

404 Not Found

\r\n\t\t
Page not found.
\r\n\t
\r\n);\r\n","import React, { FC } from 'react';\r\nimport { UseFormMethods } from 'react-hook-form';\r\nimport { InputProps, FormControl, FormLabel, Input, FormErrorMessage } from '@chakra-ui/react';\r\n\r\ninterface IReactFormInputProps extends InputProps {\r\n\tformProp: UseFormMethods;\r\n\tlabel: string;\r\n}\r\n\r\nexport const ReactFormInput: FC = (props) => {\r\n\tconst { formProp, label, ...inputProps } = props;\r\n\tconst id = inputProps.id || inputProps.name;\r\n\tconst name = inputProps.name || '';\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{label}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t{formProp.errors[name]?.message}\r\n\t\t\r\n\t);\r\n};\r\n","import React, { FC } from 'react';\r\nimport {\r\n\tBox,\r\n\tButton,\r\n\tHeading\r\n\t// Link, Text\r\n} from '@chakra-ui/react';\r\nimport { useForm } from 'react-hook-form';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport { Yup } from '../../Utils/Yup';\r\nimport { ReactFormInput } from '../../Components/Inputs/ReactFormInput';\r\nimport Icons from '../../Components/Icons/icons';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { i18n } from '../../Translation/Translation';\r\n// import { Link as RouteLink } from 'react-router-dom';\r\n// import { pages } from '../../Constants/Pages';\r\n// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\n// import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';\r\nimport { CustomerApi } from '../../API/sdk';\r\n\r\ninterface IForm {\r\n\toldPassword: string;\r\n\tnewPassword: string;\r\n\tnewPasswordRepeact: string;\r\n}\r\n\r\nconst schema = Yup.object().shape({\r\n\toldPassword: Yup.string().required(i18n.t('common:VALIDATION_REQUIRED')),\r\n\tnewPassword: Yup.string().required(i18n.t('common:VALIDATION_REQUIRED')),\r\n\tnewPasswordRepeact: Yup.string()\r\n\t\t.required(i18n.t('common:VALIDATION_REQUIRED'))\r\n\t\t.test('newPassword', i18n.t('common:VALIDATION_MUST_MATCH_PASSWORD'), function (value) {\r\n\t\t\tconsole.log({ parent: this.parent, value });\r\n\r\n\t\t\treturn this.parent.newPassword === value;\r\n\t\t})\r\n});\r\n\r\ninterface MokkiProductFormProps {\r\n\tonSubmit: (x: IForm) => void;\r\n}\r\n\r\nconst defaultValues: IForm = {\r\n\toldPassword: '',\r\n\tnewPassword: '',\r\n\tnewPasswordRepeact: ''\r\n};\r\n\r\nexport const ChangePassword = () => {\r\n\tconst handleSubmit = async (form: IForm) => {\r\n\t\tconst result = await CustomerApi.saveNewPassword({\r\n\t\t\toldPassword: form.oldPassword,\r\n\t\t\tnewPassword: form.newPassword\r\n\t\t});\r\n\t\tif (result.data) {\r\n\t\t\talert('OK');\r\n\t\t} else {\r\n\t\t\talert('FAIL');\r\n\t\t}\r\n\t};\r\n\r\n\treturn ;\r\n};\r\n\r\nexport const ChangePasswordForm: FC = (props) => {\r\n\tconst form = useForm({\r\n\t\tresolver: yupResolver(schema),\r\n\t\tdefaultValues\r\n\t});\r\n\tconst [t] = useTranslation(['calendar', 'common']);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t{t('CHANGE_PASSWORD_PAGE_TITLE')}:\r\n\t\t\t\t\r\n\t\t\t\t{/* \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t{t('common:RETURN_BTN_LABEL')}\r\n\t\t\t\t\t\r\n\t\t\t\t */}\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t
\r\n\t);\r\n};\r\n","import React, { FC } from 'react';\r\nimport { Route, Redirect, Switch } from 'react-router';\r\nimport { PublicHomePage } from '../Pages/PublicHomePage';\r\nimport { PostLogOutPage } from '../Pages/PostLogOutPage';\r\nimport { TvAndSecurityRedirect } from '../Pages/TvAndSecurityRedirect';\r\nimport { EmailManagementRedirect } from '../Pages/EmailManagementRedirect';\r\nimport { UserServicesPage } from '../Pages/UserServicesPage';\r\nimport { withOidcSecure } from '@axa-fr/react-oidc-context';\r\nimport { pages } from '../Constants/Pages';\r\nimport { CalendarPage } from '../Pages/CalendarPage/CalendarPage';\r\nimport { CalenderProductListPage } from '../Pages/CalendarProductListPage';\r\nimport { NotFound } from '../Pages/NotFound';\r\nimport { ChangePassword } from '../Pages/ChangePassword/ChangePassword';\r\n\r\nexport const Routes: FC = () => (\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t\r\n);\r\n","import { extendTheme } from '@chakra-ui/react';\r\nimport { createBreakpoints } from '@chakra-ui/theme-tools';\r\n\r\n// 2. Update the breakpoints as key-value pairs\r\nconst breakpoints = createBreakpoints({\r\n\tsm: '30em',\r\n\tmd: '48em',\r\n\tlg: '62em',\r\n\txl: '80em',\r\n\txxl: '100em',\r\n\txxxl: '120em',\r\n\txxxxl: '140em'\r\n});\r\n\r\nconst defaultScheme = 'blue';\r\n\r\n// Extending/Customising default theme\r\nexport const overridetheme = extendTheme({\r\n\tbreakpoints,\r\n\tshadows: {},\r\n\tcomponents: {\r\n\t\tButton: {\r\n\t\t\tdefaultProps: {\r\n\t\t\t\tcolorScheme: defaultScheme,\r\n\t\t\t\tsize: 'sm',\r\n\t\t\t\tvariant: 'outline'\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tInput: {\r\n\t\t\tbaseStyle: { height: '1.75rem' },\r\n\t\t\tdefaultProps: {\r\n\t\t\t\tfocusBorderColor: `${defaultScheme}.500`,\r\n\t\t\t\tcolorScheme: defaultScheme,\r\n\t\t\t\tsize: 'sm',\r\n\t\t\t\tvariant: 'filled'\r\n\t\t\t}\r\n\t\t},\r\n\t\tSelect: {\r\n\t\t\tdefaultProps: {\r\n\t\t\t\tfocusBorderColor: `${defaultScheme}.500`,\r\n\t\t\t\tcolorScheme: defaultScheme,\r\n\t\t\t\tsize: 'sm',\r\n\t\t\t\tvariant: 'filled'\r\n\t\t\t}\r\n\t\t},\r\n\t\tIconButton: {\r\n\t\t\tdefaultProps: {\r\n\t\t\t\tcolorScheme: defaultScheme,\r\n\t\t\t\tsize: 'sm'\r\n\t\t\t}\r\n\t\t},\r\n\t\tFormLabel: {\r\n\t\t\tbaseStyle: { marginBottom: '.2rem', fontSize: 'sm' }\r\n\t\t},\r\n\t\tRadio: {\r\n\t\t\tdefaultProps: {\r\n\t\t\t\tcolorScheme: defaultScheme,\r\n\t\t\t\tsize: 'sm'\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tstyles: {\r\n\t\tglobal: {\r\n\t\t\tbody: {\r\n\t\t\t\twidth: '100%',\r\n\t\t\t\tfontFamily: '\"Montserrat\", Calibri, Helvetica, Sans'\r\n\t\t\t\t// color: '#333'\r\n\t\t\t},\r\n\t\t\t'a.active': {\r\n\t\t\t\tcolor: 'teal.500',\r\n\t\t\t\tbackground: 'teal.100',\r\n\t\t\t\t_hover: {\r\n\t\t\t\t\ttextDecoration: 'none'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n","import React, { useEffect } from 'react';\r\nimport { BrowserRouter, useHistory } from 'react-router-dom';\r\nimport { Language } from './Constants/Language';\r\nimport { OidcConfiguration } from './Authentication/Configuration';\r\nimport { AuthenticationProvider, oidcLog, useReactOidc } from '@axa-fr/react-oidc-context';\r\nimport { Routes } from './Layout/Routes';\r\nimport { setAuthorizationHeader } from './Authentication/TokenManagerUtility';\r\nimport { overridetheme } from './Theme/themeConfig';\r\nimport {\r\n\tBox,\r\n\tButton,\r\n\tChakraProvider,\r\n\tContainer,\r\n\tFlex,\r\n\tHeading,\r\n\tImage,\r\n\tSkeleton,\r\n\tText\r\n} from '@chakra-ui/react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { pages } from './Constants/Pages';\r\n\r\nconst App = () => {\r\n\tconst { t, i18n } = useTranslation('calendar');\r\n\tconst changeLanguage = (lang: Language) => i18n.changeLanguage(lang);\r\n\tconst language = i18n.language;\r\n\r\n\t// set page title before loading app\r\n\tdocument.title = t('Omahallinta');\r\n\r\n\treturn (\r\n\t\t
}\r\n\t\t\tauthenticating={() =>
}\r\n\t\t\tcallbackComponentOverride={(props) => {\r\n\t\t\t\tconsole.log(props);\r\n\t\t\t\t// alert('callback called');\r\n\t\t\t\treturn ;\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{/* Sivutus */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{t('Omahallinta')}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t changeLanguage(Language.fi)}\r\n\t\t\t\t\t\t\t\t\tdisabled={language === Language.fi}\r\n\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\r\n\t\t\t\t\t\t\t\t\taria-label=\"Change language to finnish\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\"FIN\"\r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t{/* changeLanguage(Language.en)}\r\n\t\t\t\t\t\t\t\t\tdisabled={language === Language.en}\r\n\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\r\n\t\t\t\t\t\t\t\t\taria-label=\"Change language to english\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\"ENG\"\r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t changeLanguage(Language.swe)}\r\n\t\t\t\t\t\t\t\t\tdisabled={language === Language.swe}\r\n\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\r\n\t\t\t\t\t\t\t\t\taria-label=\"Change language to swedish\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\"SWE\"\r\n\t\t\t\t\t\t\t\t */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t{/* */}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\n// TODO: move to separate file\r\n// TODO: refactor lang buttons to separate file\r\nconst SignOutActions = () => {\r\n\tconst { logout, oidcUser } = useReactOidc();\r\n\tconst history = useHistory();\r\n\tconst { t } = useTranslation('common');\r\n\r\n\tconst handleLogOut = () => logout();\r\n\r\n\t// services is protected page, trying to move there moves us to login.\r\n\tconst handleLogin = () => history.push(pages.services);\r\n\r\n\treturn oidcUser ? (\r\n\t\t\r\n\t\t\t{oidcUser.profile.name}\r\n\t\t\t\r\n\t\t\r\n\t) : (\r\n\t\t\r\n\t);\r\n};\r\n\r\n// TODO: move to authentication folder\r\nconst AuthEventHandler = () => {\r\n\tconst { oidcUser } = useReactOidc();\r\n\tconst token: string | undefined = oidcUser?.access_token;\r\n\r\n\tuseEffect(() => {\r\n\t\ttoken && setAuthorizationHeader(token);\r\n\r\n\t\t// console.log({\r\n\t\t// \ttoken: token,\r\n\t\t// \toriginalUserManager: getUserManager(),\r\n\t\t// \toriginalSettings: getUserManager().settings\r\n\t\t// });\r\n\r\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\r\n\t}, [token]);\r\n\r\n\treturn null;\r\n};\r\n\r\nexport default App;\r\n","import Axios from 'axios';\r\n\r\nexport const setAuthorizationHeader = (token: string) => {\r\n\tconsole.info('Access token has been set');\r\n\t// TODO: Toistettu sama toiminto kahdella tapaa\r\n\t// teoriassa default headerin asetus riittää mutta käytännössä\r\n\t// oli pakko asettaa localstoragen ja axios-interceptorin kautta\r\n\tlocalStorage.setItem('API_CLIENT_TOKEN', token);\r\n\tAxios.defaults.headers.common['Authorization'] = `Bearer ${token}`;\r\n};\r\n\r\nexport const clearAuthorizationHeader = () => {\r\n\tconsole.info('Access token has been cleared');\r\n\tAxios.defaults.headers.common['Authorization'] = '';\r\n\tlocalStorage.removeItem('API_CLIENT_TOKEN');\r\n};\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\ntype Config = {\r\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\r\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\r\n};\r\n\r\nexport function register(config?: Config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(\r\n process.env.PUBLIC_URL,\r\n window.location.href\r\n );\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl: string, config?: Config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' }\r\n })\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then(registration => {\r\n registration.unregister();\r\n })\r\n .catch(error => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport App from './App';\r\nimport './Translation/Translation'; // setup translations\r\nimport './index.css';\r\nimport * as serviceWorker from './serviceWorker';\r\n\r\nReactDOM.render(\r\n\t\r\n\t\t\r\n\t,\r\n\tdocument.getElementById('root')\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""}