{"version":3,"sources":["azure/authConfig.ts","service/httpService.ts","service/userService.ts","Components/DashboardComponent/headerdashboard/SearchPanel.js","Components/DashboardComponent/headerdashboard/HeaderDashboard.js","library/common/SystemValidator.tsx","library/helpers/utils.tsx","library/common/ShowAdminInfo.tsx","library/common/SystemBase.tsx","library/inputs/SystemDatePicker.tsx","library/inputs/SystemTextEditor.tsx","library/inputs/SystemDropDown.tsx","library/tools/SystemButton.tsx","library/tools/SystemDialog.tsx","library/common/SystemLoadingPanel.tsx","library/form/audit/AuditGrid.tsx","library/form/audit/AuditForm.tsx","library/inputs/SystemFormHelper.tsx","library/inputs/SystemForm.tsx","library/inputs/SystemSwitch.tsx","library/inputs/SystemUpload.tsx","library/inputs/SystemMultiColumnComboBox.tsx","library/inputs/SystemTreeList.tsx","library/inputs/SystemTabStrip.tsx","library/inputs/SystemUserDropDown.tsx","library/common/Country.ts","library/inputs/SystemPhoneInput.tsx","library/dashboard/SystemDashboard.tsx","library/dashboard/SystemDashboardLayout.tsx","library/dashboard/SystemDashboardPanel.tsx","library/tools/SystemLink.tsx","library/dashboard/SystemHeader.tsx","library/dashboard/SystemPanel.tsx","library/dashboard/SystemTile.tsx","library/tools/SystemPopup.tsx","library/form/archive/ArchiveAuditGrid.tsx","library/form/archive/ArchiveAuditForm.tsx","library/form/SystemGridForm.tsx","library/types/IEditModes.ts","library/grid/SystemGrid.tsx","library/grid/SystemGridCustomColumn.tsx","library/grid/SystemGridColumnMenu.tsx","library/helpers/CrudHelper.ts","library/common/SystemLogger.tsx","Page/DashboardAdvantage.js","Page/DeductionMedical.js","Page/DeductionReport.js","Page/PayStubReport.js","Page/Settings.js","Page/ContactIt.js","Page/PaystubConfiguration.js","Page/Forms.js","Routes.tsx","service/inactivityService.ts","Components/Authentication/UnauthorizedAccess.tsx","library/common/ShowDialog.tsx","Components/DashboardComponent/footer/Footer.js","Components/Layout.tsx","App.tsx","index.tsx"],"names":["msalConfig","auth","msalConfigAuthOptions","cache","cacheLocation","temporaryCacheLocation","storeAuthStateInCookie","secureCookies","system","allowRedirectInIframe","loggerOptions","logLevel","LogLevel","Error","loggerCallback","level","message","containsPii","console","error","Info","info","Verbose","debug","Warning","warn","piiLoggingEnabled","telemetry","application","appName","appVersion","loginRequest","scopes","clientId","extraQueryParameters","ui_locales","state","authority","instance","axios","create","timeout","setting","apiTimeout","headers","baseURL","baseAPIUrl","maxRedirects","axiosRetry","retries","retryDelay","retryCount","shouldResetTimeout","retryCondition","isNetworkOrIdempotentRequestError","code","request","status","onRetry","requestConfig","interceptors","use","config","Authorization","getToken","Domain","ClientId","getOid","log","Promise","reject","response","CryptoJS","require","jwt","AESkey","getUserInfo","User","getCacheItem","UserPermission","UserSetting","SystemSetting","key","data","bytes","AES","decrypt","JSON","parse","toString","enc","Utf8","sessionStorage","getItem","getPermission","securityObject","permission","length","find","item","SecurityObject","decode","oid","getUserId","userInfo","UserId","isUserActive","IsActive","getSettingValue","name","value","x","Name","Value","hasReadPermission","ReadPermission","SearchPanel","useMsal","dropDown","setDropDown","useState","darkTheme","setDarkTheme","getUserDetails","className","size","type","placeholder","onClick","slice","logoutRedirect","postLogoutRedirectUri","HeaderDashboard","props","progress","setProgress","useEffect","callbackId","addEventCallback","eventType","EventType","LOGIN_SUCCESS","result","payload","idToken","localStorage","setItem","removeEventCallback","useHistory","document","getElementsByTagName","classList","add","color","onLoaderFinished","title","tagLine","requiredValidator","validator","comparisonValue","undefined","trim","exactLengthValidator","minLengthValidator","maxLengthValidator","minValueValidator","parsedValue","SystemValidator","parseAsOther","maxValueValidator","val1","val2","test","parseFloat","parseInt","Date","validators","validateNew","validationType","validate","String","toLowerCase","localToUTC","InputDateTime","TimeOnly","DateOnly","Day","functionpad2","getDate","Month","getMonth","Hours","getHours","Minutes","getMinutes","getFullYear","e","n","TwoDigitFormat","toTitleCase","str","includes","substr","indexOf","replace","OtherString","charAt","toUpperCase","txt","IFormatText","SuperAdminInfo","showDialog","setShowDialog","React","isLookup","dataSource","startsWith","tip","id","table","schema","onDoubleClick","onRedirect","label","SystemBase","constructor","super","timeoutref","setupValidators","this","isRequired","push","minLength","maxLength","minValue","isDate","moment","format","maxValue","isEmail","forEach","setState","GetTranslatedLanguage","async","lang","GlobalizationsList","language","stringify","addValidator","removeValidator","componentWillUnmount","handleValueChange","isMaskInputBox","mask","rawValue","defaultValue","generateKey","Math","random","getTime","handleOpen","visible","handleClose","requiredHtml","TranslatedText","arr","i","EnglishText","Language","LabelComponent","lbl1","labelFormat","toSenteceCase","formatLabel","lbl2","hideAdminInfo","htmlFor","labelClass","inFocus","ErrorMessage","msg","WrapperDiv","p","hideLabel","componentClass","isValid","join","children","showCharacterCount","errorMessage","filter","map","isNullOrUndefined","updateBaseState","event","text","isDirty","onChange","handleChange","customValue","target","handleChangeSwtich","handleChangeCheckBox","onKeyPress","handleFocus","clearTimeout","setTimeout","onFocus","handleBlur","valid","onValidate","onBlur","fname","a","b","c","d","f","g","h","isError","isLoading","lookupSelecteddata","ListItemsMulti","bind","componentDidMount","handleDidMount","handleDidUpdate","prevProps","exactLength","componentDidUpdate","messages","every","defaultProps","disabled","isControlledMode","SystemDatePicker","clearDate","render","min","max","dateFormat","Bold","Italic","Underline","Strikethrough","Subscript","Superscript","AlignLeft","AlignCenter","AlignRight","AlignJustify","Indent","Outdent","OrderedList","UnorderedList","Undo","Redo","FontSize","FontName","FormatBlock","Link","Unlink","InsertImage","ViewHtml","InsertTable","AddRowBefore","AddRowAfter","AddColumnBefore","AddColumnAfter","DeleteRow","DeleteColumn","DeleteTable","MergeCells","SplitCell","EditorTools","SystemBaseList","ref","idField","dataItemKey","textField","displayField","getValue","getText","separator","listItems","setValue","callback","filteredItems","valueObject","onTextChanged","fetchData","searchText","filterData","filterBy","setFocus","current","focus","onFilterChange","smartSearch","minFilterLength","datasource","lookupName","lookupValaue","LookupName","getLookupValue","httpRequest","get","Data","index","array","isNonEmpty","isActive","isDistinct","findIndex","nextDataSource","getCurrentItemText","multiSelect","selectedItems","items","currItem","getItemsFromCSV","allowCustom","onAfterListUpdated","split","itemFound","t","getCSVFromItems","onMultiSelectChange","handleDropDownChange","nextSearchText","autoDisable","isMultiColumn","fetchOnFilter","columns","filterable","cachePrefix","cacheDataSet","lookupname","cacheDataGet","SystemDropDown","multiColumn","simpleDropDown","isDisabled","loading","SystemButton","buttonType","btnType","btnTitle","handleClick","iconName","SystemDialog","onYes","onAbort","onNo","onCancel","onClose","isHtml","style","margin","maxHeight","Parser","textAlign","showYes","showNo","showCancel","showAbort","showClose","LoadingPanel","loadingPanel","gridContent","node","querySelector","ReactDOM","AuditGrid","DetailComponent","dataItem","AuditType","Schema","Table","secondarySchema","secondaryTable","ContextId","field","downloadTemplate","showArchive","showAdd","showRefresh","toolbar","primaryKey","secondaryKey","detail","expandField","cell","DateTimeCell","AuditForm","onRowClick","primaryKeyEncrypted","secondaryKeyEncrypted","SystemFormHelper","defaultPermission","AddPermission","EditPermission","DeletePermission","onReadAsync","options","resolve","url","CrudHelper","mode","EditModes","Read","onSuccess","onError","showMessage","showCrudMessages","onAddAsync","AddUrl","Create","onPrepare","CreatedBy","CreatedDateTime","onEditAsync","Update","ModifiedBy","ModifiedDateTime","onDeleteAsync","Delete","onRead","onProcessBegin","then","onLoad","catch","finally","onProcessEnd","onAdd","closeForm","onRecordUpdated","onEdit","onDelete","IPlacement","SystemForm","fieldContainer","submitButton","formObject","clearOnSave","clearOnDelete","handleClearButton","onAfterDelete","onAfterCreate","onAfterRead","onAfterUpdate","crudOptions","ensureDataLoaded","onInitialize","onClear","ReadUrl","EditUrl","DeleteUrl","handleSearchButton","onSearch","handleCollapseButton","isFormOpen","handleReviewButton","isAuditFormVisible","handleReviewClose","handleDelete","showDeleteConfirmation","onDeleteNo","onDeleteYes","handleEdit","editMode","handleSaveAndClose","handleSave","onSaveAndClose","onValidateAsync","onSave","createNestedObject","obj","path","parent","names","createObjectFromForm","formData","createDataFromForm","form","FormData","handleSubmit","preventDefault","handleReload","canRead","canCreate","canUpdate","canDelete","canReview","isReadOnly","isNew","defaultDisable","disableAdd","disableUpdate","disableDelete","disableRead","disableSave","TitleText","showTitle","Title","AddButton","DeleteButton","SaveButton","SaveAndCloseButton","ValidateButton","ReloadButton","ReviewButton","SearchButton","ClearButton","auditPrimaryKeyEncrypted","auditSecondaryKeyEncrypted","tiles","showValidate","showSaveAndClose","showSave","canSave","showSearch","canClear","showReview","showTopOrBottomToolTip","pointerEvents","opacity","classAdd","float","ToolTipPosition","showPanel","showClear","SystemSwitch","onLabel","offLabel","checked","required","getfile2Base64","file","reader","FileReader","readAsDataURL","onload","onerror","files","fileData","fileSize","fileType","filename","fileExtension","pop","validateFile","fileBase64","imagePath","onFileChanged","fileBase64Url","setImagePath","ImageUrl","ImageUrlRoot","ImageServerUrl","FileBase64","handelButtonChange","inputContrlId","getElementById","click","MaxAttachmentSize","SettingValue","FileSize","OriginalFileSize","fileExtsetting","splitvalue","j","toast","fileExt","extension","element","fileInfo","fileinput","display","accept","showImage","src","alt","height","width","showDimensionMessage","valueSetter","HttpRequest","Id","Description","isEmpty","MultiColumnText","SystemTreeList","ensureDataFetched","isPageChange","filters","dataState","onExpandChange","expanded","handleDataStateChange","addExpandField","dataTree","mapTree","subItemsField","extendDataItem","handleFilterChange","onSortChange","sort","processData","output","HttpService","overflow","columnMenuFilter","onColumnMenuFilterChange","SystemtabStrip","handleSelect","selected","PrimaryKeyEncrypted","TabStrip","onSelect","TabStripTab","handleOnChange","countryCodeAlpha2","dialingCode","alphaCode","onCountryChange","dcode","alpha","getCodeFromAlpha","country","MaxNumber","DialingCode","MaxLength","PhoneNo","DialCode","keyDownHandleChange","input","formatPhoneNumber","regex","RegExp","keyCode","onHandleBlur","DefaultCountry","international","defaultCountry","onKeyDown","SystemDashboard","body","SystemBreadCrumbBar","SystemDashboardLayout","URLParams","getDetails","param","queryString","location","search","hasKey","keyEncrypted","preload","resp","httpService","SystemDashboardPanel","defaultState","isArchived","isMinimized","isHidden","historyIcon","handleHistoryClick","hideButton","handleHideClick","collapseIcon","handleCollapseClick","archiveIcon","handleArchiveClick","refreshIcon","handleRefreshClick","addIcon","handleAddClick","onHistoryClick","isCollapsed","onArchiveClick","onRefreshclick","onHandleClick","background","y","w","isDraggable","canBeDragged","static","isSimple","component","canBeArchived","canBeResizable","canBeMinimized","canBeHidden","SystemLink","to","downloadLink","href","SystemHeader","GetUserInfo","SystemNavToggle","SystemPanel","onCollapse","isCollapse","onRefresh","CollapseButtonText","collapse","CollapsButtonOrIcone","widthClass","panelWidth","canAdd","hasAddPermission","stopPropagation","onArchive","showAddbuttonOnForm","AddButtonDisable","showCollapse","CollapseButtonOrIcon","panelHeight","panelColumn","panelRow","SystemTile","isValidUrl","urlString","createElement","link","icon","description","SystemPopup","popupTitle","popupWidth","popupHeight","minHeight","showBanner","banner","minWidth","ArchiveAuditGrid","pageSize","Key","ArchiveForm","SystemGridAndForm","showForm","isFormVisible","refresh","refreshCounter","triggerAction","onRowDoubleClick","initialData","onShowAddComplete","isArchiveFormVisible","Form","Grid","grid","showGrid","showFormAbove","alwaysInAdd","onAddCaller","SystemGridForm","setPrimaryKeyEncrypted","onListRowClick","onUpdate","SystemGrid","withState","MultiColumnComboBox","TreeList","EnumEditor","WrappedGrid","updatedFilters","logic","updatedState","skip","group","pageChange","page","take","changeEvent","dataStateChange","dataRecieved","gridData","sortChange","getColumns","Array","isArray","getColumn","menuFilter","TextNumericColumnMenuFilter","minResizableWidth","sortable","columnMenu","expandChange","rowRender","trElement","trProps","rowSelector","highlightSelectedRow","syntheticEvent","nativeEvent","stopImmediatePropagation","cellRender","defaultRendering","whiteSpace","colSpan","role","ariaColumnIndex","isSelected","columnIndex","currentTarget","activeElement","closest","getElementsByClassName","total","SelectedRow","AllowRowClick","hasGroups","queryStr","toDataSourceRequestString","translateDataSourceResultGroups","Total","onPageChanged","GridComponenet","allowUnsort","resizable","pageable","pageSizes","pageSizeValue","groupable","onDataStateChange","onPageChange","DateCell","isValidDate","dateObject","formatDate","PasswordCell","date","hour","minute","seconds","getSeconds","ampm","UTCToLocalDateTime","DateCellOnly","UTCToLocalDate","SwitchCell","PrimaryKey","FieldName","FieldValue","post","onValueChanged","ButtonCell","getCaption","trueCaption","falseCaption","captions","caption","CheckCell","CheckCrossCell","UserStatusCell","StatusCell","StatusCellCheck","RejectedCell","CheckboxCell","EncounterStatusCell","CheckBoxMenu","gcms","searchBox","SystemGridColumnFilterMenu","value1","value2","operator","column","onReset","splice","onCloseMenu","onSubmit","SetupControls","dataSourceType","hideSecondFilter","filterOperators","NumberColumnMenuFilter","RangeFilterCell","minTextBox","maxTextBox","inRange","onClearButtonClick","crudHelper","settings","Messages","success","put","delete","DashboardAdvantage","menus","setMenus","getMenus","menu","actionlink","Application","Type","Action","File","FileUrl","IsFormMenu","MenuId","IconClass","initialFilter","DeductionMedical","setFilter","serRefreshCounter","reportData","setReportData","_export","useRef","formattedData","formatCurrencyData","getReportData","numberFormatter","Intl","NumberFormat","minimumFractionDigits","maximumFractionDigits","CONTRIBUTIONS_TOTAL","toFixed","DEDUCTIONS_TOTAL","save","class","ExcelExport","fileName","headerClassName","DeductionReport","dataLoader","setDataLoader","startDate","setStartDate","endDate","setEndDate","setTitle","filterOne","setFilterOne","filterTwo","setFilterTwo","filterThree","setFilterThree","deductionCodes","setDeductionCodes","contributionCodes","setContributionCodes","locationCodes","setLocationCodes","selectedDeductionCode","setSelectedDeductionCode","selectedContributionCode","setSelectedContributionCode","selectedLocationCodes","setSelectedLocationCodes","allDeductionCode","setAllDeductionCode","allContributionCode","setAllContributionCode","allLocationCode","setAllLocationCode","dataResults","setDataResults","errors","setErrors","deduction","contribution","searchHandler","Entity","append","allDeduction","getDeductionCodeList","allContribution","getContributionCodeList","allLocation","getLocationCodeList","deductionlist","querySelectorAll","contributionlist","locationlist","formatter","currency","wb","XLSX","utils","table_to_book","sheet","raw","writeFile","onkeydown","marginTop","xmlns","viewBox","stroke","fill","transform","cx","cy","r","attributeName","from","dur","repeatCount","Object","keys","val","entries","abs","dateGroup","toWords","ToWords","payPeriodEndDate","setPayPeriodEndDate","payType","parts","day","month","year","PayPeriodEndDateList","PayPeriodEndDate","setProperty","input1","input2","input3","input4","td","padding","el","html2pdf","set","image","quality","html2canvas","scale","useCORS","logging","letterRendering","jsPDF","unit","orientation","compressPDF","pagebreak","EndDate","PayType","EmployeeDetail","cdnUrl","valign","convert","TotalSummary","TotalEarning","trunc","number","Number","isInteger","convertDecimal","AddressLine1","AddressLine2","AddressLine3","textclass","ChequeNo","EmployeeId","ChequeDate","EarningSummary","Amount","YearToDate","DeductionSummary","EarningDetail","WeekDate","Classification","Rate","ContributionSummary","ChequeDeposit","DirectDeposit","Contribution","Deduction","GrossEarning","DirectDepositSummary","RoutingNumber","BankName","AccountNumber","LeaveSummary","BeginningBalance","YTDAccrued","YTDUsed","EndingBalance","Settings","descEdit","setDescEdit","metaKeyword","setMetaKeyword","publicUrl","setPublicUrl","ContactIt","setRequest","contactNumber","setContactNumber","supervisor","setSupervisor","register","watch","reset","formState","getValues","clearErrors","useForm","user","email","userData","UserName","EmailId","PaystubConfiguration","userName","setUserName","configValue","setConfigValue","Forms","forms","setForms","fileTree","setFileTree","getMenuForm","queries","window","menuId","tree","paths","OriginalFileName","part","sortTreeByFileCount","buildTree","innerHTML","displayTreeTable","sortedTree","currentNode","folders","sortedFolders","aFileCount","countFiles","folder","newNode","count","parentElement","row","appendChild","textContent","filteredForms","fileParts","fontWeight","endsWith","paddingLeft","Routes","exact","PayStubReport","inactivityTimerId","logout","msalInstance","resetTimer","clearTimer","timeoutId","UnauthorizedAccess","maxWidth","SystemShowDialogPlaceHolder","ShowDialogContainer","zIndex","TrailbossFooter","backgroundColor","Layout","Component","handleSidebarCMSToggle","elem","openCMS","itemOptions","EventTarget","open","history","pathname","logoSidebarMenu","convertUrlToBlob","fetch","blob","content","securityWebUrl","filterdMenu","menuItems","persist","onToggle","header","onItemClick","Fragment","withRouter","App","initilized","authorized","authorizedToHome","acquireTokenSilent","token","tokenInfo","accessToken","emails","res","encrypt","LookupValue","reason","initilizeUserInfo","initRender","addEventListener","logOutUnauthorizedUser","removeEventListener","PublicClientApplication","initialize","accounts","getAllAccounts","setActiveAccount","HANDLE_REDIRECT_START","account","baseUrl","getAttribute","createBrowserHistory","basename","interactionType","InteractionType","Redirect","authenticationRequest"],"mappings":"4eAYO,MAAMA,EAAa,CACtBC,KAAMC,sBACNC,MAAO,CACHC,cAAe,iBACfC,uBAAwB,iBACxBC,wBAAwB,EACxBC,eAAe,GAEnBC,OAAQ,CACJC,uBAAuB,EACvBC,cAAe,CACXC,SAAUC,IAASC,MACnBC,eAAgB,CAACC,EAAYC,EAAcC,KACvC,IAAIA,EAGJ,OAAQF,GACJ,KAAKH,IAASC,MAEV,YADAK,QAAQC,MAAMH,GAElB,KAAKJ,IAASQ,KAEV,YADAF,QAAQG,KAAKL,GAEjB,KAAKJ,IAASU,QAEV,YADAJ,QAAQK,MAAMP,GAElB,KAAKJ,IAASY,QAEV,YADAN,QAAQO,KAAKT,GAEjB,QACI,OAdR,EAiBJU,mBAAmB,EACnBC,UAAW,CACPC,YAAa,CACTC,QAAS,YACTC,WAAY,aAUnBC,EAAe,CACxBC,OAAQ,CAAC,UAAW,SAAU,iBAAkB9B,sBAAsB+B,UACtEC,qBAAsB,CAClBC,WAAY,QACZ,OAAU,aAEdC,MAAO,aAIIlC,sBAAsBmC,U,+BCvDrC,MAAMC,EAAWC,IAAMC,OAAO,CAC1BC,QAASC,QAAQC,WACjBC,QAAS,CACL,eAAgB,mCAEpBC,QAASH,QAAQI,WACjBC,aAAc,KAOlBC,YAAWV,EAAU,CACjBW,QAAS,EACTC,WAAaC,GACW,IAAbA,EAEXC,oBAAoB,EACpBC,eAAiBlC,GAETmC,YAAkCnC,IAAyB,iBAAfA,EAAMoC,MAA2BpC,EAAMqC,QAAQC,OAGnGC,QAAS,CAACP,EAAYhC,EAAOwC,IACL,IAAbR,IASfb,EAASsB,aAAaJ,QAAQK,KAAI,SAAUC,GAcxC,OAZoC,MAAhCA,EAAOlB,QAA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,UAAW,SAAU,cACxEV,SAAQsD,GAASi6B,OAAOqF,oBAAoBt/B,EAAOm8B,MAC1DC,IKTC,CAqBDx5B,SACI,OAAO,gCAEE7G,KAAKjM,MAAMwuC,WACR,gBAAC,GAAD,KAAQ,gBAACzC,GAAD,OACR9/B,KAAKjM,MAAMyuC,WAAa,uBAAKjpC,UAAU,4DACnC,wBAAMA,UAAU,WAAhB,cAEA,gBAAC,GAAD,MAGnB,EAGU+oC,U,kBC/DR,MAAMnC,GAAe,IAAIqD,KAAwB7xC,G3DyE1BwuC,W2DxEhBA,I3DyEGsD,aAAa5wB,MAAK,KAE3B,MAAM6wB,EAAWvD,GAAawD,iBAC1BD,EAAS9rC,OAAS,GAClBuoC,GAAayD,iBAAiBF,EAAS,IAG3CvD,GAAa9lC,kBAAkB4J,IAE3B,GAAIA,EAAM3J,YAAcC,IAAUspC,4BAG7B,GAAI5/B,EAAM3J,YAAcC,IAAUC,eAAiByJ,EAAMvJ,QAAS,CACnE,MACMopC,EADU7/B,EAAMvJ,QACEopC,QACxB3D,GAAayD,iBAAiBE,EAEjC,IAVL,I2D/ER,MAAMC,GAAU/oC,SAASC,qBAAqB,QAAQ,GAAG+oC,aAAa,QAChE1C,GAAU2C,YAAqB,CAAEC,SAAUH,KAEjD30B,SACI,gBAAC,IAAD,CAAcnb,SAAUksC,IACpB,gBAAC,IAAD,CAAQmB,QAASA,IACb,gBAAC,IAAD,CACI6C,gBAAiBC,KAAgBC,SACjCC,sBAAuB5wC,GACvB,gBAAC,GAAD,SAKZsH,SAASmgB,eAAe,Q","file":"static/js/main.4181bd61.chunk.js","sourcesContent":["/**\r\n * Sandeep: Azure configuration.\r\n * [09/08/2023]\r\n */\r\nimport { AuthenticationResult, EventMessage, EventType, LogLevel, PublicClientApplication } from \"@azure/msal-browser\";\r\nimport axios from \"axios\";\r\nimport { initilizeUserInfo } from '../service/userService';\r\n\r\n/**\r\n * Sandeep: Configuration object for instentiating msal library.\r\n * Loggin can be adjusted using on log level.\r\n */\r\nexport const msalConfig = {\r\n auth: msalConfigAuthOptions,\r\n cache: {\r\n cacheLocation: \"sessionStorage\",\r\n temporaryCacheLocation: \"sessionStorage\",\r\n storeAuthStateInCookie: true,\r\n secureCookies: true,\r\n },\r\n system: {\r\n allowRedirectInIframe: true, //Sandeep: Enable single logout\r\n loggerOptions: {\r\n logLevel: LogLevel.Error,\r\n loggerCallback: (level: any, message: any, containsPii: any) => {\r\n if (containsPii) {\r\n return;\r\n }\r\n switch (level) {\r\n case LogLevel.Error:\r\n console.error(message);\r\n return;\r\n case LogLevel.Info:\r\n console.info(message);\r\n return;\r\n case LogLevel.Verbose:\r\n console.debug(message);\r\n return;\r\n case LogLevel.Warning:\r\n console.warn(message);\r\n return;\r\n default:\r\n return;\r\n }\r\n },\r\n piiLoggingEnabled: true,\r\n telemetry: {\r\n application: {\r\n appName: \"Trailboss\",\r\n appVersion: \"1.0.0\",\r\n },\r\n },\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Sandeep: Login request used for login and providing scopes while getting access token.\r\n */\r\nexport const loginRequest = {\r\n scopes: ['profile', 'openid', 'offline_access', msalConfigAuthOptions.clientId],\r\n extraQueryParameters: {\r\n ui_locales: 'en-us',\r\n \"domain\": \"Advantage\"//Sandeep: Additional parameter for custom policies.\r\n },\r\n state: \"Advantage\" //Sandeep: State passed is returned as is after login.\r\n};\r\n\r\nexport const logoutRequest = {\r\n authority: msalConfigAuthOptions.authority,\r\n onRedirectNavigate:\"dashboard\"\r\n};\r\n\r\n/**\r\n * Sandeep: For calling Microsoft graph API.\r\n */\r\nexport const graphConfig = {\r\n graphMeEndpoint: \"https://graph.microsoft.com/me\" //e.g. https://graph.microsoft.com/v1.0/me\r\n};\r\n\r\n/**\r\n * Sandeep: MSAL library initilization including event handling \r\n * and setting active account for authetication and getting token.\r\n * @param msalInstance\r\n */\r\nexport const initilizeMsal = (msalInstance: PublicClientApplication) => {\r\n msalInstance.initialize().then(() => {\r\n // Account selection logic is app dependent. Adjust as needed for different use cases.\r\n const accounts = msalInstance.getAllAccounts();\r\n if (accounts.length > 0) {\r\n msalInstance.setActiveAccount(accounts[0]);\r\n }\r\n\r\n msalInstance.addEventCallback((event: EventMessage) => {\r\n\r\n if (event.eventType === EventType.HANDLE_REDIRECT_START) {\r\n //Sandeep: Track the application from where we are trying to log in.\r\n }\r\n else if (event.eventType === EventType.LOGIN_SUCCESS && event.payload) {\r\n const payload = event.payload as AuthenticationResult;\r\n const account = payload.account;\r\n msalInstance.setActiveAccount(account);\r\n // initilizeUserInfo(null);\r\n }\r\n });\r\n });\r\n}","/**\r\n * Sandeep: Http service with interceptor for adding token to the header.\r\n * In case of any issue with token, acquireAccessToken() can be called in the interceptor direct\r\n * to obtain the token and call the API.\r\n * [09/08/2023]\r\n */\r\n\r\nimport axios, { AxiosError } from 'axios';\r\nimport { getOid, getToken } from './userService';\r\nimport axiosRetry, { isNetworkOrIdempotentRequestError } from 'axios-retry';\r\nvar totalCalls = 0;\r\n/***\r\n * Sandeep: Instance cofiguration.\r\n */\r\nconst instance = axios.create({\r\n timeout: setting.apiTimeout,\r\n headers: {\r\n 'Content-Type': 'application/json; charset=utf-8',\r\n },\r\n baseURL: setting.baseAPIUrl,\r\n maxRedirects: 21,\r\n});\r\n\r\n/***\r\n * Sandeep: Configuring retry for http requests.\r\n * Timeout requests are also retried.\r\n */\r\naxiosRetry(instance, {\r\n retries: 0,\r\n retryDelay: (retryCount: number) => {\r\n return retryCount * 500;\r\n },\r\n shouldResetTimeout: true,\r\n retryCondition: (error: AxiosError) => {\r\n return (\r\n isNetworkOrIdempotentRequestError(error) || error.code === \"ECONNABORTED\" || error.request.status\r\n );\r\n },\r\n onRetry: (retryCount, error, requestConfig) => {\r\n return retryCount * 1000;\r\n },\r\n});\r\n\r\n\r\n/**\r\n * Sandeep: Create a request interceptor.\r\n * Inject token in the request. \r\n */\r\ninstance.interceptors.request.use(function (config: any) {\r\n\r\n if (config.headers.Authorization == null) {\r\n config.headers.Authorization = 'Bearer ' + getToken();\r\n }\r\n //To check if domain is added multiple times in the header.\r\n if (config.headers.Domain == null || config.headers.Domain == '') {\r\n config.headers.Domain = setting.Domain;\r\n }\r\n\r\n //Sandeep: Add ClientId for ocelot rate limiting.\r\n if (config.headers.ClientId == null || config.headers.ClientId == '') {\r\n config.headers.ClientId = getOid();\r\n }\r\n return config;\r\n}, function (error) {\r\n // handle the error\r\n console.log(\"%c\" + error, 'color: red')\r\n return Promise.reject(error);\r\n});\r\n\r\ninstance.interceptors.response.use(function (response: any) {\r\n totalCalls--;\r\n // Sandeep: Do something with response data i.e. logging etc.\r\n return response;\r\n}, function (error) {\r\n /**\r\n * Sandeep: Do whatever you want with the response error here:\r\n * But, be SURE to return the rejected promise, so the caller still has \r\n * the option of additional specialized handling at the call-site.\r\n */\r\n\r\n return Promise.reject(error);\r\n});\r\n\r\nexport default instance;\r\n","/**\r\n * Sandeep Sirohi\r\n * [09/08/2023]\r\n * User service for caching and getting user related information accross the application.\r\n * More functions can be added as per the requirement.\r\n */\r\n\r\nimport { msalInstance } from \"..\";\r\nimport { loginRequest } from \"../azure/authConfig\";\r\nimport httpService from \"./httpService\";\r\nconst CryptoJS = require(\"crypto-js\");\r\nvar jwt = require(\"jsonwebtoken\");\r\n\r\n/**\r\n * Sandeep: encrypts the data.\r\n * @param data\r\n * @returns\r\n */\r\nconst AESkey = \"x1e2t3e4c5h\";\r\nexport const encrypt = (data: any) => {\r\n return data ? CryptoJS.AES.encrypt(JSON.stringify(data), AESkey).toString() : null;\r\n}\r\n\r\n/**\r\n * Sandeep: decrypts the data.\r\n * @param data\r\n * @returns\r\n */\r\nexport const decrypt = (data: any) => {\r\n var bytes = data ? CryptoJS.AES.decrypt(data, AESkey) : null;\r\n return (bytes ? JSON.parse(bytes.toString(CryptoJS.enc.Utf8)) : null);\r\n}\r\n\r\n/**\r\n * Sandeep: Get complete user info including setting,permission and other cached items.\r\n * @param key\r\n * @returns\r\n */\r\nexport const getUserInfo = () => {\r\n let userInfo = {\r\n User: getCacheItem('User'),\r\n UserPermission: getCacheItem('UserPermission'),\r\n UserSetting: getCacheItem('UserSetting'),\r\n SystemSetting: getCacheItem('SystemSetting'),\r\n }\r\n return userInfo;\r\n}\r\n\r\n/**\r\n * Sandeep: Get cahce value by key\r\n * @param key\r\n * @returns\r\n */\r\nexport const getCacheItem = (key: string) => {\r\n let item = sessionStorage.getItem(key);\r\n return decrypt(item);\r\n}\r\n\r\n/**\r\n * Sandeep: Helper methods for getting user info and cache them.\r\n * Extract email from the token to get user info.\r\n * @param callback\r\n */\r\nexport const initilizeUserInfo = async (callback: any) => {\r\n await msalInstance.acquireTokenSilent(loginRequest).then(token => {\r\n if (token) {\r\n let tokenInfo = jwt.decode(token.accessToken);\r\n httpService.get(setting.baseAPIUrl + `Auth/UserInfo/${tokenInfo.emails[0]}`,\r\n {\r\n //Sandeep: Adding token and ClientId. ClientId is for Ocelot rate limiting.\r\n headers: { 'Authorization': 'Bearer ' + token.accessToken, 'ClientId': tokenInfo.oid }\r\n }).then(res => {\r\n if (res.data) {\r\n sessionStorage.setItem(\"Token\", CryptoJS.AES.encrypt(JSON.stringify(token.accessToken), AESkey).toString());\r\n sessionStorage.setItem(\"User\", CryptoJS.AES.encrypt(JSON.stringify(res.data.User), AESkey).toString());\r\n sessionStorage.setItem(\"UserPermission\", CryptoJS.AES.encrypt(JSON.stringify(res.data.UserPermission), AESkey).toString());\r\n sessionStorage.setItem(\"UserSetting\", CryptoJS.AES.encrypt(JSON.stringify(res.data.UserSetting), AESkey).toString());\r\n sessionStorage.setItem(\"SystemSetting\", CryptoJS.AES.encrypt(JSON.stringify(res.data.SystemSetting), AESkey).toString());\r\n sessionStorage.setItem(\"LookupValue\", CryptoJS.AES.encrypt(JSON.stringify(res.data.LookupValue), AESkey).toString());\r\n\r\n //Sandeep: Execute the callback for further processing once cache is set.\r\n if (isUserActive()) {\r\n if (callback) callback(res.status);\r\n }\r\n else {\r\n if (callback) callback(\"401\");\r\n }\r\n }\r\n }).catch((reason) => {\r\n if (callback) callback(reason && reason.response && reason.response.status);\r\n });\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Sandeep: Get a list of system setting, in case we want setttings to be cached without user logged in in to the system.\r\n * User login will override existing settings values in the cache.\r\n */\r\nexport const initilizeSystemSetting = async () => {\r\n await httpService.get(setting.baseAPIUrl + `Application/SystemSetting`).then(res => {\r\n if (res.data) {\r\n sessionStorage.setItem(\"SystemSetting\", CryptoJS.AES.encrypt(JSON.stringify(res.data.SystemSetting), AESkey).toString());\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Sandeep: Get lookup value from the cache. \r\n * @param securityObject\r\n * @returns\r\n */\r\nexport const getLookupValue = (lookupName?: string) => {\r\n let lookupValaue = getCacheItem(\"LookupValue\");\r\n return lookupValaue && lookupValaue.filter((item: any) => item.LookupName === lookupName) || null;\r\n}\r\n\r\n/**\r\n * Sandeep: Get user permission based on security object from the cache. \r\n * @param securityObject\r\n * @returns\r\n */\r\nexport const getPermission = (securityObject?: string): any | null => {\r\n let permission = getCacheItem(\"UserPermission\");\r\n return permission && permission.length > 0 && permission.find((item: any) => item.SecurityObject === securityObject) || null;\r\n}\r\n\r\n/**\r\n * Sandep: return cached token after decrypting it.\r\n * @returns\r\n */\r\nexport const getToken = (): string | null => {\r\n return getCacheItem(\"Token\");\r\n}\r\n\r\n/**\r\n * Sandep: return oid from access token.\r\n * @returns\r\n */\r\nexport const getOid = (): string | null => {\r\n return jwt.decode(getCacheItem(\"Token\")).oid;\r\n}\r\n\r\n/**\r\n * Sandeep: Get logged in user id from cache.\r\n * @returns\r\n */\r\nexport const getUserId = (): number | null => {\r\n let userInfo = getCacheItem(\"User\");\r\n return userInfo && userInfo.UserId || null;\r\n}\r\n\r\n/**\r\n * Sandeep: Get logged in user id from cache.\r\n * @returns\r\n */\r\nexport const isUserVerified = (): boolean => {\r\n let userInfo = getCacheItem(\"User\");\r\n return userInfo && userInfo.IsVerified || null;\r\n}\r\n\r\nexport const isUserActive = (): boolean => {\r\n let userInfo = getCacheItem(\"User\");\r\n return userInfo && userInfo.IsActive || null;\r\n}\r\n\r\n/**\r\n * Sandeep: Get logged in user domain.\r\n * @returns\r\n */\r\nexport const getUserDomain = (): string | null => {\r\n let userInfo = getCacheItem(\"User\");\r\n return userInfo && userInfo.Domain || null;\r\n}\r\n\r\n/**\r\n * Sandeep: Get cached setting.\r\n * @returns\r\n */\r\nexport const getSettingValue = (name: string): string | null => {\r\n let setting = getCacheItem(\"SystemSetting\");\r\n let value = setting && setting.length > 0 && setting.find((x: any) => x.Name == name);\r\n return value && value.Value || null;\r\n}\r\n\r\n/**\r\n * Sandeep: Get required permission for the logged in user from cache.\r\n * Read,Add,Edit,Delete and Grant permission getter.\r\n * @param securityObject\r\n * @returns\r\n */\r\nexport const hasReadPermission = (securityObject?: string) => {\r\n if (!securityObject) return true;\r\n var permission = getPermission(securityObject);\r\n return permission ? permission.ReadPermission : false;\r\n}\r\n\r\nexport const hasPaystubPermission = () => {\r\n let userInfo = getCacheItem(\"User\");\r\n return userInfo && userInfo.HasPaystubPermission || null;\r\n}\r\n\r\nexport const hasAddPermission = (securityObject?: string) => {\r\n if (!securityObject) return true;\r\n var permission = getPermission(securityObject);\r\n return permission ? permission.AddPermission : false;\r\n}\r\n\r\nexport const hasDeletePermission = (securityObject?: string) => {\r\n if (!securityObject) return true;\r\n var permission = getPermission(securityObject);\r\n return permission ? permission.DeletePermission : false;\r\n}\r\n\r\nexport const hasEditPermission = (securityObject?: string) => {\r\n if (!securityObject) return true;\r\n var permission = getPermission(securityObject);\r\n return permission ? permission.EditPermission : false;\r\n}\r\n\r\nexport const hasGrantPermission = (securityObject?: string) => {\r\n if (!securityObject) return true;\r\n var permission = getPermission(securityObject);\r\n return permission ? permission.GrantPermission : false;\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { AiOutlineSearch, AiOutlineLogout } from \"react-icons/ai\";\r\nimport { MdOutlineNotificationsNone } from \"react-icons/md\";\r\nimport { CgEditContrast } from \"react-icons/cg\";\r\nimport { getUserInfo } from \"../../../service/userService\";\r\nimport {\r\n AuthenticatedTemplate,\r\n UnauthenticatedTemplate, useMsal\r\n} from \"@azure/msal-react\";\r\n\r\n\r\nconst SearchPanel = () => {\r\n\r\n const { instance } = useMsal();\r\n\r\n const [dropDown, setDropDown] = useState(true);\r\n const [darkTheme, setDarkTheme] = useState(false);\r\n\r\n const DropdownToggle = () => {\r\n setDropDown(!dropDown)\r\n }\r\n const handleLogout = () => {\r\n instance.logoutRedirect({\r\n postLogoutRedirectUri: msalConfigAuthOptions.postLogoutRedirectUri,\r\n });\r\n };\r\n const getUserDetails = (item) => {\r\n var data = getUserInfo();\r\n if (data.User) {\r\n return (data.User[item]); \r\n } \r\n }\r\n return (<>\r\n
\r\n
\r\n
\r\n
\r\n {getUserDetails('FirstName') && getUserDetails('FirstName').slice(0, 1)}{getUserDetails('LastName') && getUserDetails('LastName').slice(0, 1)}\r\n
\r\n
\r\n 👋 {getUserDetails('FirstName')} {getUserDetails('LastName')}\r\n
\r\n {/*
*/}\r\n {/* Profile Settings*/}\r\n {/*
*/}\r\n {/*
*/}\r\n {/* Notification Settings*/}\r\n {/*
*/}\r\n
\r\n
\r\n
\r\n
\r\n >)\r\n}\r\n\r\nexport default SearchPanel;","import React, { useEffect, useRef, useState } from 'react';\r\nimport SearchPanel from './SearchPanel';\r\nimport LoadingBar from 'react-top-loading-bar'\r\nimport { ToastContainer } from 'react-toastify';\r\nimport {\r\n AuthenticatedTemplate,\r\n UnauthenticatedTemplate, useMsal\r\n} from \"@azure/msal-react\";\r\nimport { useHistory } from 'react-router-dom';\r\nimport { EventType } from \"@azure/msal-browser\";\r\n\r\n\r\nconst HeaderDashboard = (props) => {\r\n const [progress, setProgress] = useState(props.progress)\r\n const { instance } = useMsal();\r\n useEffect(() => {\r\n //initilizeUserInfo(6);\r\n const callbackId = instance.addEventCallback((message) => {\r\n if (message.eventType === EventType.LOGIN_SUCCESS) {\r\n const result = message.payload;\r\n if (result.idToken) {\r\n localStorage.setItem('accessToken', result.idToken);\r\n console.log('tokenFull', result.idToken);\r\n // initilizeUserInfo(6);\r\n //fetchUserData(jwt_decode(instance.tokenCache.storage.browserStorage.windowStorage.accessToken).sub);\r\n }\r\n }\r\n });\r\n return () => {\r\n if (callbackId) {\r\n instance.removeEventCallback(callbackId);\r\n }\r\n }\r\n\r\n }, []);\r\n const history = useHistory();\r\n\r\n useEffect(() => {\r\n var addBodyDashboardClass = document.getElementsByTagName('body');\r\n addBodyDashboardClass[0].classList.add('dashboardWrapperCustom');\r\n });\r\n\r\n return (<>\r\n\r\n setProgress(0)} />\r\n \r\n \r\n
\r\n {props.title}\r\n
\r\n
\r\n
\r\n \r\n {props.tagLine}\r\n
\r\n\r\n\r\n\r\n >)\r\n}\r\n\r\nexport default HeaderDashboard;","import { IValidationTypes } from \"../types/IValidationTypes\"\r\n\r\nexport const requiredValidator: IValidationTypes = {\r\n type: \"REQUIRED\",\r\n validator: (value, comparisonValue) => !(value == undefined || value == null || (typeof value == \"string\" && value.trim() == '')),\r\n message: `%fieldname% is a required field`\r\n}\r\n\r\nexport const exactLengthValidator: IValidationTypes = {\r\n type: \"EXACT_LENGTH\",\r\n validator: (value, comparisonValue) => !(typeof value == \"string\" && comparisonValue.value && value.length == comparisonValue.value),\r\n message: `%fieldname% should be exactly %value% char(s) long`\r\n}\r\n\r\nexport const minLengthValidator: IValidationTypes = {\r\n type: \"MIN_LENGTH\",\r\n validator: (value, comparisonValue) => !(typeof value == \"string\" && comparisonValue.value && value.length < comparisonValue.value),\r\n message: `%fieldname% should be atleast %value% char(s) long`\r\n}\r\n\r\nexport const maxLengthValidator: IValidationTypes = {\r\n type: \"MAX_LENGTH\",\r\n validator: (value, comparisonValue) => !(typeof value == \"string\" && comparisonValue.value && value.length > comparisonValue.value),\r\n message: `%fieldname% should be atleast %value% char(s) long`\r\n}\r\n\r\nexport const minValueValidator: IValidationTypes = {\r\n type: \"MIN_VALUE\",\r\n validator: (value, comparisonValue) => {\r\n let parsedValue = SystemValidator.parseAsOther(value, comparisonValue.value)\r\n if (parsedValue != null && parsedValue != undefined && comparisonValue.value && parsedValue < comparisonValue.value)\r\n return false;\r\n return true;\r\n } ,\r\n message: `%fieldname% should be greater than %value%`\r\n}\r\n\r\nexport const maxValueValidator: IValidationTypes = {\r\n type: \"MAX_VALUE\",\r\n validator: (value, comparisonValue) => {\r\n let parsedValue = SystemValidator.parseAsOther(value, comparisonValue.value)\r\n if (parsedValue != null && parsedValue != undefined && comparisonValue.value && parsedValue > comparisonValue.value)\r\n return false;\r\n return true;\r\n },\r\n message: `%fieldname% should be less than %value%`\r\n}\r\n\r\nexport const Validators = { requiredValidator, exactLengthValidator, minLengthValidator, maxLengthValidator, minValueValidator, maxValueValidator}\r\n\r\nexport abstract class SystemValidator {\r\n static validators: IValidationTypes[] = [\r\n requiredValidator, exactLengthValidator, minLengthValidator, maxLengthValidator, minValueValidator, maxValueValidator\r\n ];\r\n\r\n static validateNew = (validationType: IValidationTypes, value: any, comparisonValue: any): boolean => validationType.validator ? validationType.validator(value, comparisonValue) : false;\r\n\r\n static validate = (validationType: IValidationTypes, value: string | number | Date | boolean | null | undefined) => {\r\n let parsedValue: any;\r\n\r\n switch (validationType.type) {\r\n\r\n case \"REQUIRED\":\r\n if ((value === undefined || value === null) || (typeof value === \"string\" && value.trim() === ''))\r\n return false;\r\n break;\r\n\r\n case \"MIN_LENGTH\":\r\n if (typeof value == \"string\" && validationType.value && (value.length < validationType.value && value.trim() != ''))\r\n return false;\r\n break;\r\n\r\n case \"MAX_LENGTH\":\r\n if (typeof value == \"string\" && validationType.value && (value.trim() != '' && value.length > validationType.value ))\r\n return false;\r\n break;\r\n\r\n case \"EXACT_LENGTH\":\r\n if (typeof value == \"string\" && validationType.value && (value.trim() != '' && value.length == validationType.value))\r\n return false;\r\n break;\r\n\r\n case \"MIN_VALUE\":\r\n parsedValue = SystemValidator.parseAsOther(value, validationType.value)\r\n if (parsedValue != null && parsedValue != undefined && validationType.value && parsedValue < validationType.value)\r\n return false;\r\n break;\r\n\r\n case \"MAX_VALUE\":\r\n parsedValue = SystemValidator.parseAsOther(value, validationType.value)\r\n if (parsedValue != null && parsedValue != undefined && validationType.value && parsedValue > validationType.value)\r\n return false;\r\n break;\r\n\r\n case \"NUMBERS_ONLY\":\r\n if (typeof value == \"string\") {\r\n //let re = /^+-?[0-9]*$/;\r\n //if (!re.test(String(value).toLowerCase())) return false;\r\n\r\n }\r\n break;\r\n case \"EMAIL\":\r\n if (typeof value == \"string\") {\r\n let re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if (!re.test(String(value).toLowerCase())) return false;\r\n\r\n }\r\n break;\r\n\r\n case \"CUSTOM\":\r\n default:\r\n if (validationType.validator)\r\n if (!validationType.validator(value, validationType.value))\r\n return false;\r\n break;\r\n }\r\n\r\n return true\r\n }\r\n\r\n static parseAsOther(val1: any, val2: any): any {\r\n\r\n if (typeof val2 == \"number\") {\r\n if (typeof val1 == \"string\") {\r\n var objRegex = /(^-?\\d\\d*\\.\\d\\d*$)|(^-?\\.\\d\\d*$)/;\r\n if (objRegex.test(val1)) return parseFloat(val1);\r\n return parseInt(val1)\r\n }\r\n }\r\n\r\n if (typeof val2 == \"object\" && val2 != undefined && val2 != null && val2 instanceof Date) {\r\n if (typeof val1 == \"string\" && val1 != null && val2 != undefined) {\r\n return Date.parse(val1);\r\n }\r\n }\r\n\r\n return val1\r\n }\r\n\r\n}\r\n\r\n","import { toast } from \"react-toastify\"\r\nimport { formatDate } from '@telerik/kendo-intl';\r\nimport HttpService from \"../../service/httpService\";\r\n\r\nexport const CheckEmptyDate = (value?: Date) => (value === undefined || value === null)\r\nexport const CheckBoolean = (value?: boolean) => (value === undefined || value === null)\r\nexport const CheckEmptyNumber = (value?: number) => (value === undefined || value === null)\r\n\r\nexport const localToUTC = (InputDateTime: any, TimeOnly = false, DateOnly = false) => {\r\n try {\r\n if (InputDateTime == undefined) {\r\n return undefined;\r\n }\r\n let Day: any = functionpad2(InputDateTime.getDate());\r\n let Month: any = functionpad2(InputDateTime.getMonth() + 1);\r\n let Hours: any = functionpad2(InputDateTime.getHours());\r\n let Minutes: any = functionpad2(InputDateTime.getMinutes());\r\n if (TimeOnly === true) {\r\n return `${Hours}:${Minutes}:00`;\r\n }\r\n else if (DateOnly === true) {\r\n return `${InputDateTime.getFullYear()}-${Month}-${Day}`;\r\n }\r\n\r\n else {\r\n return `${InputDateTime.getFullYear()}-${Month}-${Day}T${Hours}:${Minutes}:00.000`;\r\n }\r\n }\r\n catch (e) {\r\n\r\n return null;\r\n\r\n }\r\n\r\n}\r\nconst functionpad2 = (n: any) => {\r\n return (n < 10 ? '0' : '') + n;\r\n}\r\n\r\n\r\n// set local date to utc\r\nexport const UTCToLocal = (d: string | undefined | Date): Date | undefined => {\r\n if (d == undefined) return undefined;\r\n\r\n if (typeof d == \"string\" && d.indexOf(\"Z\") != -1)\r\n return new Date(d.replace(\"Z\", \"\"));\r\n\r\n return new Date(d);\r\n}\r\n\r\n//export const UTCToLocal = (ReceiveDateTime: any, DateOnly = false, TimeOnly = false) => {\r\n// if (ReceiveDateTime == null || ReceiveDateTime == undefined) {\r\n// return '';\r\n// }\r\n// //let culture = AppConfig.Get('DateTimeCulture');\r\n// //if (!!culture)\r\n// // culture = 'en-UK';\r\n// let StartDateObj: any = ReceiveDateTime.split('T')[0];\r\n// let StartTimeObj: any = ReceiveDateTime.split('T')[1];\r\n// StartTimeObj = StartTimeObj.split(':00Z')[0];\r\n// let finalDate: any;\r\n// let finalTime: any;\r\n// //StartDateObj = formatDate(\r\n// // StartDateObj,\r\n// // \"dd/MM/yyyy\",\r\n// // // culture,\r\n// // \"\"\r\n// //);\r\n// if (DateOnly == true) {\r\n// return StartDateObj;\r\n// }\r\n// else if (TimeOnly == true) {\r\n// return StartTimeObj;\r\n// }\r\n// else {\r\n// StartDateObj = StartDateObj.concat(\" \");\r\n// finalDate = StartDateObj.concat(StartTimeObj);\r\n// return finalDate;\r\n\r\n// }\r\n//}\r\n\r\nexport const CheckEmpty = (value?: string | Date | boolean | number | undefined | null) => {\r\n\r\n if (value == null || value == undefined || value == \"\") {\r\n return true\r\n }\r\n\r\n if (typeof value === 'string') {\r\n return value.trim() === \"\"\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport const IsValidEmail = (value: string) => {\r\n\r\n var filter = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\r\n\r\n if (value.match(filter)) {\r\n return true;\r\n }\r\n else {\r\n toast.warning(\"Invalid Email Id!\")\r\n return false\r\n }\r\n}\r\n\r\nexport const IsValidPhoneNo = (value: string, maxLength: any) => {\r\n\r\n var filter = new RegExp(`^([1-9][0-9]{${maxLength - 1}})+$`);\r\n if (value && value.trim().match(filter) && value.length == maxLength) {\r\n return true\r\n }\r\n else {\r\n toast.warning(\"Invalid Phone Number \" + value + '. It should be equal to ' + maxLength + ' digits and should not start with 0.')\r\n return false\r\n }\r\n}\r\n\r\nexport const IsValidZipCode = (value: string) => {\r\n var filter = /^[0-9]+$/;\r\n if (value.match(filter)) {\r\n return true\r\n }\r\n else {\r\n toast.warning(\"Invalid Post Box Number!\")\r\n return false\r\n }\r\n}\r\n\r\nexport const IsValidIdnumber = (value: string) => {\r\n\r\n if (value.replace(/[^0-9\\.]+/g, '').length == 15) {\r\n return true\r\n }\r\n else {\r\n toast.warning(\"Enter valid Id Number! It should be 15 digit number.\")\r\n return false\r\n }\r\n}\r\n\r\nexport const IsNotValidDOB = (value: Date) => {\r\n if (value > new Date()) {\r\n toast.warning(\"Invalid Date Of Birth! It can't be future date. \")\r\n return true\r\n }\r\n else\r\n return false\r\n}\r\n\r\nexport const GetGUID = () => {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);\r\n return v.toString(16);\r\n });\r\n}\r\n\r\nexport const UTCToLocalDateTime = (d: string | undefined | Date): string | undefined => {\r\n if (d == undefined) return undefined;\r\n let date;\r\n if (typeof d == \"string\" && d.indexOf(\"Z\") != -1) {\r\n date = new Date(d.replace(\"Z\", \"\"));\r\n } else { date = new Date(d); }\r\n\r\n let hour = date.getHours();\r\n let minute = date.getMinutes();\r\n let seconds = date.getSeconds();\r\n let ampm = hour >= 12 ? 'PM' : 'AM';\r\n hour = hour % 12;\r\n hour = hour ? hour : 12;\r\n // hour = hour;\r\n minute = TwoDigitFormat(minute);\r\n seconds = TwoDigitFormat(seconds);\r\n let currentDate = TwoDigitFormat(date.getDate()) + '/' + TwoDigitFormat((date.getMonth() + 1)) + '/' + date.getFullYear() + ' '\r\n return currentDate + TwoDigitFormat(hour % 12) + \":\" + minute + ' ' + ampm\r\n}\r\n\r\nexport const UTCToLocalDate = (d: string | undefined | Date): string | undefined => {\r\n if (d == undefined) return undefined;\r\n let date;\r\n if (typeof d == \"string\" && d.indexOf(\"Z\") != -1) {\r\n date = new Date(d.replace(\"Z\", \"\"));\r\n } else { date = new Date(d); }\r\n\r\n let hour = date.getHours();\r\n let minute = date.getMinutes();\r\n let seconds = date.getSeconds();\r\n let ampm = hour >= 12 ? 'PM' : 'AM';\r\n hour = hour % 12;\r\n hour = hour ? hour : 12;\r\n // hour = hour;\r\n minute = TwoDigitFormat(minute);\r\n seconds = TwoDigitFormat(seconds);\r\n\r\n let currentDate = TwoDigitFormat(date.getDate()) + '/' + TwoDigitFormat((date.getMonth() + 1)) + '/' + date.getFullYear() + ' '\r\n return currentDate;\r\n\r\n}\r\n\r\nconst TwoDigitFormat = (n: any) => { return n < 10 ? \"0\" + n : n }\r\n\r\n/**\r\n * Returns PrimaryKeyEncrypted if found in Url Query String, Router State and Props , wherever founds first\r\n * Author: Vivek Gupta, Dated: 8-June-2021\r\n * @param props\r\n */\r\nexport const getPrimaryKeyEncrypted = (props: any): string => {\r\n var keys = getKeys(props, [\"PrimaryKeyEncrypted\"]) as any\r\n return keys && keys.PrimaryKeyEncrypted || '';\r\n\r\n}\r\n\r\n/**\r\n * Search and return Keys in Url Query String, Router State and Props, wherever founds first\r\n * Author: Vivek Gupta, Dated: 8-June-2021\r\n * @param props\r\n * @param keys\r\n */\r\nexport const getKeys = (props: any, keys: string[]): {} => {\r\n var params = new URLSearchParams(props.location.search);\r\n var response = {};\r\n keys.forEach((item): void => {\r\n var key1 = params.get(item) || undefined; // query string\r\n var key2 = props.location && props.location.state && props.location.state[item] || undefined // router state\r\n var key3 = props[item] || undefined // props\r\n response[item] = key1 || key2 || key3;\r\n });\r\n return response;\r\n}\r\n\r\nexport const localToUTCDateTime = (d: Date | undefined): Date | undefined => {\r\n if (d == undefined) return d;\r\n // new Date(d - date.getTimezoneOffset() * 60 * 1000) \r\n return new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes()));\r\n}\r\n\r\nexport const GetTimeFromDate = (InputDateTime: any, TimeOnly = false, DateOnly = false) => {\r\n try {\r\n\r\n let Day: any = functionpad2(InputDateTime.getDate());\r\n let Month: any = functionpad2(InputDateTime.getMonth() + 1);\r\n let Hours: any = functionpad2(InputDateTime.getHours());\r\n let Minutes: any = functionpad2(InputDateTime.getMinutes());\r\n if (TimeOnly === true) {\r\n return `${Hours}:${Minutes}:00`;\r\n }\r\n else if (DateOnly === true) {\r\n return `${InputDateTime.getFullYear()}-${Month}-${Day}`;\r\n }\r\n else {\r\n return `${InputDateTime.getFullYear()}-${Month}-${Day}T${Hours}:${Minutes}:00.000`;\r\n }\r\n }\r\n catch (e) {\r\n if (InputDateTime == undefined || InputDateTime == null) {\r\n\r\n return null;\r\n }\r\n else {\r\n const TimePart = InputDateTime.substring(InputDateTime.indexOf('T') + 1);\r\n\r\n const DateAndTime = TimePart.split(':');\r\n return `${DateAndTime[0]}:${DateAndTime[1]}:00`;\r\n }\r\n\r\n\r\n }\r\n\r\n}\r\nexport const SetTimeFromDate = (InputDateTime: string, TimeOnly = false) => {\r\n try {\r\n var splitsessionstart = InputDateTime.split(\":\");\r\n var date = new Date();\r\n let Day: any = functionpad2(date.getDate());\r\n let Month: any = functionpad2(date.getMonth() + 1);\r\n //let Hours: any = functionpad2(InputDateTime.getHours());\r\n //let Minutes: any = functionpad2(InputDateTime.getMinutes());\r\n if (TimeOnly === true) {\r\n return `${date.getFullYear()}-${Month}-${Day}T${splitsessionstart[0]}:${splitsessionstart[1]}:00.000`;\r\n //return `${date.getFullYear()}-${splitsessionstart[0]}-${splitsessionstart[1]}`;\r\n //return `${Hours}:${Minutes}:00`;\r\n }\r\n\r\n else {\r\n return `${date.getFullYear()}-${Month}-${Day}`;\r\n }\r\n }\r\n catch (e) {\r\n return null;\r\n }\r\n\r\n}\r\n\r\nexport const SetTimeFromDateDefault = () => {\r\n try {\r\n //var splitsessionstart = InputDateTime.split(\":\");\r\n var date = new Date();\r\n let Day: any = functionpad2(date.getDate());\r\n let Month: any = functionpad2(date.getMonth() + 1);\r\n let Hours: any = (date.getHours());\r\n let Minutes: any = (date.getMinutes());\r\n return `${date.getFullYear()}-${Month}-${Day}T${Hours}:${Minutes}:00.000`;\r\n //return `${date.getFullYear()}-${splitsessionstart[0]}-${splitsessionstart[1]}`;\r\n //return `${Hours}:${Minutes}:00`;\r\n }\r\n catch (e) {\r\n return null;\r\n }\r\n\r\n}\r\n\r\n\r\nconst toTitleCase = (str) => {\r\n\r\n if (str == 'MRN') {\r\n return 'MRN';\r\n }\r\n else if (str.includes('Tpa') || str.includes('TPA')) {\r\n var OtherString = str.substr(str.indexOf(' ') + 1);\r\n return OtherString.replace(\r\n /\\w\\S*/g,\r\n (OtherString) => {\r\n return OtherString.charAt(0).toUpperCase() + OtherString.substr(1).toLowerCase();\r\n }\r\n );\r\n }\r\n else {\r\n return str.replace(\r\n /\\w\\S*/g,\r\n (txt) => {\r\n return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();\r\n }\r\n );\r\n }\r\n\r\n}\r\nconst toSenteceCase = (str) => {\r\n const result = str.replace(/([A-Z])/g, \" $1\");\r\n const finalResult = result.charAt(0).toUpperCase() + result.slice(1);\r\n return finalResult;\r\n\r\n}\r\nconst toNormalCase = (str) => {\r\n return str;\r\n}\r\n\r\nexport enum IFormatText {\r\n TitleCase, ToSenteceCase, ToNormalCase\r\n}\r\n\r\nexport const formatLabel = (label: string, labelFormat: string) => {\r\n \r\n if (!label) return '';\r\n\r\n switch (labelFormat) {\r\n case 'nocase':\r\n return label;\r\n\r\n case 'TitleCase':\r\n return toTitleCase(label);;\r\n\r\n case 'ToSenteceCase':\r\n return toSenteceCase(label);\r\n\r\n case 'ToNormalCase':\r\n return toNormalCase(label);\r\n\r\n default:\r\n if (label.includes('Tpa') || label.includes('TPA')) {\r\n var stringvalu = toTitleCase(label);\r\n return 'TPA' + ' ' + stringvalu;\r\n }\r\n else {\r\n var stringvalu = toTitleCase(label);\r\n return stringvalu;\r\n }\r\n\r\n }\r\n}\r\n\r\nexport function base64ToArrayBuffer(base64: string) {\r\n const binaryString = window.atob(base64); // Comment this if not using base64\r\n const bytes = new Uint8Array(binaryString.length);\r\n return bytes.map((byte, i) => binaryString.charCodeAt(i));\r\n}\r\nexport const DownloadFile = async (Url: string) => {\r\n var getBytsdata = await HttpService.get(Url);\r\n var arrayBuffer = base64ToArrayBuffer(getBytsdata.data.content);\r\n var blob = new Blob([arrayBuffer], { type: getBytsdata.data.Type });\r\n var link = document.createElement('a');\r\n link.href = window.URL.createObjectURL(blob);\r\n link.id = 'DownloadFile' + new Date().toISOString();\r\n var fileName = getBytsdata.data.fileName;\r\n link.download = fileName;\r\n link.click();\r\n link.remove();\r\n}","import * as React from 'react'\r\n\r\nexport const SuperAdminInfo = (props: any) => {\r\n var superAdmin = true;\r\n var [showDialog,setShowDialog] = React.useState(false);\r\n var isLookup = props.dataSource && props.dataSource.startsWith(\"/lookup/lookupname/\") || false;\r\n var tip = '';\r\n\r\n tip += '---------- Super Admin Info ----------' + '\\n';\r\n if (props.id) tip += 'Id : ' + (props.id || '') + '\\n';\r\n if (props.name) tip += 'Name : ' + (props.name || '') + '\\n';\r\n if (props.securityObject) tip += 'Security Object : ' + (props.securityObject || '') + '\\n';\r\n if (props.table) tip += 'Table : ' + (props.table || '') + '\\n';\r\n if (props.schema) tip += 'Schema : ' + (props.schema || '') + '\\n';\r\n if (props.dataSource) {\r\n tip += isLookup\r\n ? (\"Lookup Name: \" + props.dataSource.replace(\"/lookup/lookupname/\", \"\"))\r\n : (\"Dropdown Source: \" + props.dataSource)\r\n }\r\n\r\n return <>\r\n {superAdmin\r\n ? onRedirect(props)} className={(isLookup ? \"label-infocus-admin\" : \"\")} title={tip} onClick={() => setShowDialog(true)}>{props.label} \r\n : {props.label} }\r\n >\r\n}","import * as React from 'react';\r\nimport { SystemValidator } from '../common/SystemValidator';\r\nimport { IValidationTypes } from '../types/IValidationTypes';\r\nimport { ISystemBase } from '../types/ISystemBase';\r\nimport { IValueMultiObject, IValueObject } from '../types/IDynamicList';\r\nimport { formatLabel } from '../helpers/utils'\r\nimport { SuperAdminInfo } from '../common/ShowAdminInfo';\r\nimport { isDate } from 'moment';\r\nimport moment from 'moment';\r\nimport SystemLanguage from '../form/AddSystemLanguage/SystemLanguage';\r\n\r\n/*\r\n * The base class for base components with necessary styling and functions\r\n * */\r\ninterface ISystemBaseState {\r\n isError?: boolean,\r\n inFocus?: boolean,\r\n errorMessage?: string[],\r\n isDirty?: boolean,\r\n isValid?: boolean,\r\n validators?: IValidationTypes[],\r\n value?: any,\r\n defaultValue?: any,\r\n rawValue?: any,\r\n isLoading?: false\r\n lookupSelecteddata?: IValueObject[],\r\n ListItemsMulti: []\r\n language: [],\r\n visible: false\r\n\r\n}\r\n\r\nconst showConsoleInfo = false;\r\n\r\n\r\n\r\nexport abstract class SystemBase extends React.PureComponent {\r\n timeoutref: any = null;\r\n\r\n static defaultProps: any = {\r\n\r\n disabled: false,\r\n id: '',\r\n name: '',\r\n labelClass: 'col-sm-3',\r\n componentClass: 'col-sm-9',\r\n isControlledMode: true,\r\n };\r\n\r\n constructor(props: ISystemBase & T) {\r\n super(props);\r\n this.state = {\r\n isError: false,\r\n inFocus: false,\r\n isLoading: false,\r\n isDirty: false,\r\n isValid: true,\r\n errorMessage: [] as string[],\r\n validators: [] as IValidationTypes[],\r\n value: props.value,\r\n defaultValue: props.value,\r\n lookupSelecteddata: [] as IValueObject[],\r\n ListItemsMulti: [] as IValueMultiObject[],\r\n language: [] as IValueMultiObject[],\r\n visible: false\r\n\r\n } as ISystemBaseState & S;\r\n this.validate = this.validate.bind(this);\r\n if (props.validator) props.validator(props.name, this.validate)\r\n\r\n }\r\n setupValidators = () => {\r\n let validators: IValidationTypes[] = [];\r\n\r\n if (this.props.isRequired)\r\n validators.push({\r\n type: \"REQUIRED\",\r\n message: `${this.props.label} is a required field`,\r\n value: \"\"\r\n });\r\n\r\n if (this.props.minLength)\r\n validators.push({\r\n type: \"MIN_LENGTH\",\r\n message: `${this.props.label} should be atleast ${this.props.minLength} char(s) long`,\r\n value: this.props.minLength\r\n });\r\n\r\n if (this.props.maxLength)\r\n validators.push({\r\n type: \"MAX_LENGTH\",\r\n message: `${this.props.label} should be less than ${this.props.maxLength} char(s) long`,\r\n value: this.props.maxLength\r\n });\r\n\r\n if (this.props.minValue)\r\n validators.push({\r\n type: \"MIN_VALUE\",\r\n message: `${this.props.label} should be greater than ${isDate(this.props.minValue) === true ? `${moment(this.props.minValue).format(\"DD/MM/YYYY\")}` : `${this.props.minValue - 1}`}`,\r\n value: this.props.minValue\r\n });\r\n\r\n if (this.props.maxValue)\r\n validators.push({\r\n type: \"MAX_VALUE\",\r\n message: `${this.props.label} should be less than ${this.props.maxValue}`,\r\n value: this.props.maxValue\r\n });\r\n\r\n if (this.props.isEmail)\r\n validators.push({\r\n type: \"EMAIL\",\r\n message: `${this.props.label} is not a valid Email`,\r\n value: \"\"\r\n });\r\n\r\n if (this.props.validators && this.props.validators.length > 0)\r\n this.props.validators.forEach((item) => validators.push(item));\r\n\r\n this.setState({ validators: validators });\r\n\r\n };\r\n\r\n GetTranslatedLanguage = async () => {\r\n //var lang = getSettingValue(\"Language\").toUpperCase(); \r\n var lang = sessionStorage.getItem('UserSystemLanguage');\r\n var globlizationData = sessionStorage.getItem('Globalizations');\r\n if (globlizationData != 'Data not exist!') {\r\n var GlobalizationsList = JSON.parse(sessionStorage.getItem('Globalizations') || \"[{}]\");\r\n if (lang && lang !== \"En\") {\r\n if (GlobalizationsList && GlobalizationsList.length > 0) {\r\n this.setState({\r\n language: GlobalizationsList,\r\n })\r\n sessionStorage.setItem(\"Globalizations\", JSON.stringify(GlobalizationsList))\r\n }\r\n }\r\n }\r\n // if (lang !== \"En\") {\r\n // await HttpService.get('/Common/ListByLanguage/' + lang).then(response => {\r\n // if (response.status == 200) {\r\n // this.setState({\r\n // language: response.data,\r\n // })\r\n // localStorage.setItem(\"list\", JSON.stringify(response.data))\r\n // }\r\n // }).catch(err => console.log(err))\r\n // }\r\n }\r\n\r\n\r\n componentDidMount() {\r\n this.handleDidMount();\r\n }\r\n\r\n addValidator = () => this.props.validator && this.props.validator(this.props.id + \".\" + this.props.name, this.validate, false);\r\n removeValidator = () => this.props.validator && this.props.validator(this.props.id + \".\" + this.props.name, this.validate, true);\r\n\r\n componentWillUnmount = () => this.removeValidator();\r\n\r\n handleDidMount() {\r\n this.setupValidators();\r\n this.addValidator();\r\n this.handleValueChange(false);\r\n this.GetTranslatedLanguage();\r\n\r\n //const SystemLanguage = localStorage.getItem('SystemLanguage');\r\n //this.setState({\r\n // systemLanguage: SystemLanguage\r\n //})\r\n }\r\n\r\n handleDidUpdate(prevProps: ISystemBase & T) {\r\n if (prevProps.validators != this.props.validators ||\r\n prevProps.isRequired != this.props.isRequired ||\r\n prevProps.minLength != this.props.minLength ||\r\n prevProps.maxLength != this.props.maxLength ||\r\n prevProps.exactLength != this.props.exactLength ||\r\n prevProps.minValue != this.props.minValue ||\r\n prevProps.maxValue != this.props.maxValue ||\r\n prevProps.isEmail != this.props.isEmail)\r\n this.setupValidators();\r\n\r\n if (prevProps.value != this.props.value) {\r\n this.handleValueChange(true);\r\n }\r\n\r\n if (prevProps.validator != this.props.validator)\r\n this.addValidator();\r\n }\r\n\r\n componentDidUpdate(prevProps: ISystemBase & T) {\r\n this.handleDidUpdate(prevProps);\r\n\r\n }\r\n\r\n handleValueChange = (validate: boolean = true) => {\r\n let isMaskInputBox = this.props.mask ? true : false;\r\n this.setState({\r\n value: this.props.value,\r\n rawValue: isMaskInputBox && this.props.value && typeof this.props.value == \"string\" ? this.props.value.replace(/[- \\(\\)\\+]/g, '') : this.props.value,\r\n defaultValue: this.props.defaultValue\r\n }, () => {\r\n if (validate) this.validate();\r\n });\r\n };\r\n\r\n\r\n\r\n\r\n // returns a unique key with a prefix applied\r\n public generateKey = () => `${Math.random()}_${new Date().getTime()}`;\r\n\r\n handleOpen = () => {\r\n this.setState({ visible: true })\r\n /*localStorage.setItem(\"LableName\", this.props.label || \"\")*/\r\n }\r\n handleClose = () => {\r\n this.setState({ visible: false })\r\n }\r\n // html to be shwon in case of required components\r\n public requiredHtml = () => this.props.isRequired ? <>* > : '';\r\n TranslatedText = () => {\r\n var lang = sessionStorage.getItem('UserSystemLanguage');\r\n if (lang !== \"En\") {\r\n var arr = [];\r\n const jsonToObj = JSON.parse(sessionStorage.getItem(\"Globalizations\") || \"[{}]\");\r\n arr = [...jsonToObj]\r\n if (this.props.label && arr.length > 0) { \r\n let data = arr.find((i: any) => i.EnglishText === this.props.label && i.Language === lang);\r\n if (data) {\r\n return data.TranslatedText;// (data. ? data : this.props.label);\r\n }\r\n else {\r\n return this.props.label;\r\n }\r\n }\r\n return this.props.label;\r\n } else {\r\n return this.props.label;\r\n }\r\n\r\n //if (this.props.label) {\r\n // var x:any = this.props.label \r\n // var lang = localStorage.getItem('SystemLanguage') || \"En\";\r\n // if (lang === \"Ar\") {\r\n // HttpService.get('/Common/GetTranslation/' + this.props.label).then(response => {\r\n // if (response.status == 200) {\r\n // alert(1)\r\n // x = response.data.TranslatedText\r\n // console.log(x)\r\n // return x\r\n // }\r\n // })\r\n // }\r\n // return x;\r\n //}\r\n }\r\n\r\n\r\n // the complete label part of the component\r\n public LabelComponent = () => {\r\n var lbl1 = typeof this.props.label == 'string' ? formatLabel(this.TranslatedText(), this.props.labelFormat as string) : this.TranslatedText();\r\n var lbl2 = this.props.hideAdminInfo != true ? : lbl1;\r\n\r\n\r\n // var lbl1 = typeof this.props.label == 'string' ? formatLabel( this.props.label, this.props.labelFormat as string) : this.props.label;\r\n //var lbl2 = this.props.hideAdminInfo != true ? : lbl1;\r\n\r\n return \r\n {lbl2} : {this.requiredHtml()} ;\r\n }\r\n\r\n public ErrorMessage = (msg: string) => {msg} ;\r\n // Wrapps the Component with default styling \r\n public WrapperDiv = (p: any) => {\r\n\r\n return <>\r\n\r\n \r\n {/*{!this.props.hideLabel && this.LabelComponent()}
{p.tooltipComponent} */}\r\n {!this.props.hideLabel && this.LabelComponent()}\r\n
\r\n {p.children}\r\n {this.props.showCharacterCount && this.props.value && this.props.maxLength &&\r\n
\r\n {this.props.value.toString().length + '/' + this.props.maxLength} \r\n
\r\n }\r\n {!this.state.isValid && this.state.errorMessage ?\r\n this.state.errorMessage\r\n .filter((msg: string) => msg.trim() != '')\r\n .map((msg: string) => this.ErrorMessage(msg)) : null}\r\n
\r\n
\r\n >;\r\n\r\n };\r\n\r\n\r\n public isNullOrUndefined = (value: any) => value == null || value == undefined;\r\n\r\n\r\n updateBaseState = (event?: any, value: any = undefined, text: string = '') => {\r\n this.setState({ ...this.state, value: value, isDirty: true },\r\n () => {\r\n if (this.props.onChange)\r\n this.props.onChange(event, this.props.name, value, text);\r\n\r\n this.validate();\r\n }\r\n );\r\n }\r\n\r\n // pass on the onChange event to parent\r\n public handleChange = (event?: any, customValue: any = undefined, text: string = '') => {\r\n let value = customValue || (event && event.target && event.target.value) || undefined\r\n // to fix 0 value error\r\n if (event && event.target && this.isNullOrUndefined(value) && !this.isNullOrUndefined(event.target.value)) value = event.target.value\r\n\r\n this.updateBaseState(event, value, text)\r\n };\r\n\r\n // pass on the onChange event to parent\r\n public handleChangeSwtich = (event?: any, value: any = undefined, text: string = '') => {\r\n this.updateBaseState(event, event.value, text)\r\n };\r\n\r\n public handleChangeCheckBox = (event?: any, value: any = undefined, text: string = '') => {\r\n //let value = event.value == true ? event.value : false\r\n //this.updateBaseState(event, value && value == true ? true : false, text)\r\n this.updateBaseState(event, event.value == true, text)\r\n };\r\n\r\n // pass on the onChange event to parent\r\n onKeyPress = (event: any, customValue: any = undefined, text: string = '') => {\r\n if (this.props.onKeyPress)\r\n this.props.onKeyPress(event);\r\n }\r\n // validate the input \r\n public validate(): boolean {\r\n let valid = true;\r\n var messages: string[] = [];\r\n this.state.validators.every((item: any) => {\r\n if (SystemValidator.validate(item, this.state.value)) return true;\r\n valid = false;\r\n messages.push(item.message);\r\n return false;\r\n });\r\n\r\n this.setState({ errorMessage: [...messages], isValid: valid });\r\n if (this.props.onValidate) this.props.onValidate(valid);\r\n return valid;\r\n }\r\n\r\n\r\n // handle the input focus\r\n public handleFocus = (event: any) => {\r\n if (this.timeoutref) clearTimeout(this.timeoutref);\r\n this.timeoutref = setTimeout(() => this.setState({ ...this.state, inFocus: true }), 10);\r\n this.props.onFocus && this.props.onFocus();\r\n };\r\n\r\n // handle the input exit\r\n public handleBlur = (event: any) => {\r\n if (this.timeoutref) clearTimeout(this.timeoutref);\r\n this.timeoutref = setTimeout(() => {\r\n let valid = this.validate();\r\n this.setState({ inFocus: false, isValid: valid }, () => {\r\n if (this.props.onValidate) this.props.onValidate(valid);\r\n });\r\n }, 10);\r\n this.props.onBlur && this.props.onBlur(event);\r\n };\r\n\r\n // log(message?: any, ...optionalParams: any[]): void;\r\n log = (fname: string, a?, b?, c?, d?, e?, f?, g?, h?) => {\r\n showConsoleInfo && console.log(\r\n `System Base - ${fname} => Name : ${this.props.name} | Prop Value : ${this.props.value} | State Value : ${this.state.value} | IsValid : ${this.state.isValid}`, this.state.validators, a, b, c, d, e, f, g, h)\r\n }\r\n}\r\n\r\n\r\n","import * as React from 'react'\r\nimport { SystemBase } from '../../library/common/SystemBase';\r\nimport { DatePicker } from '@progress/kendo-react-dateinputs';\r\ninterface ISystemDatePicker {\r\n min?: Date, // minimum length of the input\r\n max?: Date, // maximum length of the input\r\n}\r\n\r\n/**\r\n * Creates an Input with Label \r\n * */\r\nexport default class SystemDatePicker extends SystemBase\r\n{\r\n constructor(props: any) {\r\n super(props)\r\n }\r\n\r\n handleValueChange = (validate?: boolean) => {\r\n let value = null;\r\n try {\r\n if (this.props.value) {\r\n if (typeof this.props.value == \"string\")\r\n value = new Date(this.props.value as string);\r\n else value = this.props.value\r\n }\r\n } catch (e) {\r\n }\r\n this.setState({ value: value }, () => {\r\n if (validate) this.validate()\r\n })\r\n }\r\n\r\n\r\n clearDate = () => {\r\n this.setState({ value: null, isDirty: true }, () => {\r\n if (this.props.onChange) this.props.onChange(null, this.props.name, null);\r\n })\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n {/**/}\r\n {/* {this.props.disabled == true ? '' : }*/}\r\n {/* */}\r\n
\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react'\r\nimport * as ReactDOM from 'react-dom';\r\nimport { Editor, EditorChangeEvent, EditorTools } from '@progress/kendo-react-editor';\r\nimport * as BaseControls from './../common/BaseControls';\r\nimport * as Base from 'library'\r\nimport { ISystemBase } from 'library/types/ISystemBase';\r\nimport { SystemBase } from 'library/common/SystemBase';\r\nimport { EditorUtils } from \"@progress/kendo-react-editor\";\r\n\r\ninterface ISystemtextEditor {\r\n insertText?: string,\r\n afterInsertText?():void\r\n}\r\n\r\ninterface ISystemTextEditorState {\r\n}\r\n\r\nconst {\r\n Bold, Italic, Underline, Strikethrough, Subscript, Superscript,\r\n AlignLeft, AlignCenter, AlignRight, AlignJustify,\r\n Indent, Outdent, OrderedList, UnorderedList,\r\n Undo, Redo, FontSize, FontName, FormatBlock,\r\n Link, Unlink, InsertImage, ViewHtml,\r\n InsertTable,\r\n AddRowBefore, AddRowAfter, AddColumnBefore, AddColumnAfter,\r\n DeleteRow, DeleteColumn, DeleteTable,\r\n MergeCells, SplitCell\r\n} = EditorTools;\r\n\r\nexport default class SystemTextEditor extends SystemBase{\r\n editor: React.Ref;\r\n\r\n constructor(props: any) {\r\n super(props);\r\n this.editor = React.createRef();\r\n }\r\n\r\n // Author : Vivek Gupta\r\n // Description : for handling change event of editor, \r\n // also removes and
from the start and the end\r\n onChange = (event: EditorChangeEvent) => {\r\n var html = event.html;\r\n if (html) {\r\n var content = html.substring(3, html.length - 4);\r\n this.handleChange(event, content, content);\r\n } else this.handleChange(event, \"\", \"\");\r\n }\r\n\r\n // Author : Vivek Gupta\r\n // Description : checks any changes to insertText\r\n // Task Id : 15945 - Insert functinality\r\n componentDidUpdate = (prevProps:any) => {\r\n super.componentDidUpdate(prevProps);\r\n if (prevProps.insertText != this.props.insertText && this.props.insertText != '') {\r\n this.insertText(this.props.insertText)\r\n }\r\n }\r\n\r\n // Author : Vivek Gupta\r\n // Description : function to insert text at the current position in the Editor\r\n // Task Id : 15945 - Insert functinality\r\n insertText = (text?: string) => {\r\n if (!text) return;\r\n\r\n // get the current editor\r\n if (this.editor && this.editor.current) {\r\n let view = this.editor.current.view;\r\n // select the node\r\n const nodeType = view && view.state.schema.nodes['text'];\r\n // check whether we can insert text\r\n const canInsert = view && EditorUtils.canInsert(view.state, nodeType);\r\n // insert the text in the editor and raise event afterInsertText\r\n if (canInsert) {\r\n EditorUtils.insertNode(view, view.state.schema.text(text))\r\n this.props.afterInsertText && this.props.afterInsertText();\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n\r\n // tools to be shown on the editor\r\n const tools = [\r\n [Bold, Italic, Underline, Strikethrough],\r\n [Subscript, Superscript],\r\n [AlignLeft, AlignCenter, AlignRight, AlignJustify],\r\n [Indent, Outdent],\r\n [OrderedList, UnorderedList],\r\n FontSize, FontName, FormatBlock,\r\n [Undo, Redo],\r\n [Link, Unlink, InsertImage, ViewHtml],\r\n [InsertTable],\r\n [AddRowBefore, AddRowAfter, AddColumnBefore, AddColumnAfter],\r\n [DeleteRow, DeleteColumn, DeleteTable],\r\n [MergeCells, SplitCell]\r\n ];\r\n\r\n return (\r\n \r\n {this.props.isControlledMode\r\n ? \r\n : \r\n }\r\n \r\n );\r\n }\r\n}","import * as React from 'react'\r\nimport { SystemBase } from '../../library/common/SystemBase';\r\nimport httpRequest from './../../service/httpService';\r\nimport { IDynamicList } from '../../library/types/IDynamicList'\r\nimport { ComboBox, ComboBoxFilterChangeEvent, ComboBoxProps, MultiColumnComboBox, MultiColumnComboBoxProps, MultiSelect as KendoMultiSelect, MultiSelectChangeEvent, MultiSelectFilterChangeEvent } from '@progress/kendo-react-dropdowns';\r\nimport { filterBy, FilterDescriptor } from '@progress/kendo-data-query';\r\nimport { getLookupValue } from '../../service/userService';\r\n\r\ninterface ISystemDropDownState {\r\n listItems?: any[],\r\n filteredItems?: any[],\r\n selectedItems?: any[],\r\n isLoading?: boolean,\r\n nextDataSource?: string,\r\n nextSearchText?: string,\r\n ref?: any,\r\n}\r\nexport abstract class SystemBaseList extends SystemBase {\r\n\r\n ref: any = null;\r\n constructor(props: any) {\r\n super(props)\r\n this.state = {\r\n ...this.state,\r\n listItems: [],\r\n filteredItems: [],\r\n selectedItems: [],\r\n isLoading: false,\r\n text: ''\r\n }\r\n this.ref = React.createRef();\r\n }\r\n static defaultProps = {\r\n ...SystemBase.defaultProps,\r\n autoDisable: true,\r\n isMultiColumn: false,\r\n fetchOnFilter: false,\r\n textField: \"Text\",\r\n dataItemKey: \"Value\",\r\n placeholder: \"- Please Select -\",\r\n className: \"input_feild\",\r\n minFilterLength: 3,\r\n columns: [],\r\n smartSearch: false,\r\n filterable: true,\r\n LookupName: ''\r\n } as IDynamicList;\r\n\r\n static cachePrefix = 'lib-lookup-';\r\n static cacheDataSet = (lookupname?: string, data?: any[]) => sessionStorage.setItem(`${SystemBaseList.cachePrefix}${lookupname}`, JSON.stringify(data))\r\n static cacheDataGet = (lookupname?: string) => JSON.parse(sessionStorage.getItem(`${SystemBaseList.cachePrefix}${lookupname}`) || '[]');\r\n\r\n idField: any = this.props.idField || this.props.dataItemKey || 'id';\r\n textField: any = this.props.displayField || this.props.textField || 'text';\r\n getValue = (item: any) => item && item[this.idField] || '';\r\n getText = (item: any) => item && item[this.textField] || '';\r\n separator: string = ',';\r\n\r\n getItem = (listItems: any, value: any): any => {\r\n var item: any | undefined = undefined;\r\n\r\n if (listItems && listItems.length > 0 && value != undefined && value != null)\r\n item = listItems.find((item: any) => item[this.idField] == value)\r\n\r\n return item;\r\n }\r\n\r\n setValue = (value: any, callback?: () => void) => {\r\n let item = this.getItem(this.state.filteredItems, value);\r\n this.setState({ valueObject: item, value: value }, callback);\r\n this.props.onTextChanged && this.props.onTextChanged(this.getText(item));\r\n }\r\n\r\n componentDidMount = () => {\r\n this.setupValidators();\r\n this.fetchData(this.props.dataSource, this.props.searchText)\r\n }\r\n\r\n async componentDidUpdate(prevProps: any) {\r\n if (prevProps.dataSource != this.props.dataSource || prevProps.searchText != this.props.searchText) {\r\n if (this.state.isLoading) {\r\n this.setState({ nextDataSource: this.props.dataSource, nextSearchText: this.props.searchText })\r\n }\r\n else await this.fetchData(this.props.dataSource, this.props.searchText)\r\n }\r\n this.handleDidUpdate(prevProps);\r\n }\r\n\r\n\r\n filterData = (filter: FilterDescriptor) => {\r\n return filterBy(this.state.listItems, filter);\r\n };\r\n\r\n setFocus = () => {\r\n console.log(\"ref\", this.ref);\r\n\r\n this.ref.current.focus();\r\n }\r\n\r\n onFilterChange = async (event: ComboBoxFilterChangeEvent | MultiSelectFilterChangeEvent) => {\r\n let filter = { ...event.filter };\r\n if (this.props.smartSearch) {\r\n console.log('dropdown multi column event', event);\r\n if (this.props.minFilterLength && filter.value.length >= this.props.minFilterLength) {\r\n await this.fetchData(this.props.dataSource, filter.value)\r\n this.setFocus();\r\n }\r\n\r\n else {\r\n //this.fetchData(this.props.dataSource, '')\r\n this.setState({ listItems: [], filteredItems: [] });\r\n if (filter.value == \"\" || filter.value == undefined) {\r\n this.handleChange(event, filter.value, event.target.name)\r\n }\r\n }\r\n\r\n } else {\r\n if (!this.props.minFilterLength || filter.value.length >= this.props.minFilterLength)\r\n this.setState({ filteredItems: this.filterData(filter) });\r\n else\r\n this.setState({ filteredItems: this.state.listItems });\r\n }\r\n }\r\n\r\n fetchData = async (datasource: any, filter?: string) => {\r\n var listItems: any[] = [];\r\n var response: any;\r\n this.setState({ isLoading: true })\r\n /** \r\n * Sandeep: If lookupName is provided, get values from cache. \r\n * Else call the api and get the values.\r\n * \r\n */\r\n if (this.props.lookupName) {\r\n listItems = getLookupValue(this.props.lookupName);\r\n }\r\n else if (datasource) {\r\n try {\r\n if (filter && datasource.substr(datasource.length - 1, 1) == '?')\r\n response = await httpRequest.get(datasource + \"searchText=\" + filter);\r\n else\r\n response = await httpRequest.get(datasource + (filter ? ('/' + filter) : ''));\r\n /**\r\n * Sandeep: set data or empty array, try to load kendo datasource first, then array, then empty array, \r\n * also filters null and undefined text values\r\n */\r\n \r\n listItems = (response.data.Data || response.data || []).filter((item: any, index: any, array: any) => {\r\n let isNonEmpty = item[this.textField] != undefined && item[this.textField] != null\r\n let isActive = (item[\"IsActive\"] == undefined || item[\"IsActive\"] == true)\r\n && (item[\"Active\"] == undefined || item[\"Active\"] == true);\r\n\r\n let isDistinct = (index === array.findIndex((f: any) => JSON.stringify(f) === JSON.stringify(item)));\r\n return isNonEmpty && isActive && isDistinct\r\n });\r\n } catch (e) {\r\n listItems = [];\r\n }\r\n }\r\n // if there is any other data source in pipeline to be fetched \r\n if (this.state.nextDataSource) {\r\n // to stop infinite loop we have to set nextdataSource to empty\r\n var nextDataSource = this.state.nextDataSource;\r\n this.setState({ nextDataSource: '' }, () => this.fetchData(nextDataSource));\r\n } else this.setState({ listItems: listItems || [], filteredItems: listItems || [] }, () => this.handleValueChange());\r\n this.setState({ isLoading: false })\r\n }\r\n\r\n getCurrentItemText = () => this.props.multiSelect\r\n ? (this.state.selectedItems ? this.state.selectedItems.map((items: any) => items[this.textField]).join(\",\") : '')\r\n : this.getText(this.getItem(this.state.listItems, this.props.value))\r\n\r\n\r\n handleValueChange = (validate?: boolean) => {\r\n let currItem = this.getItem(this.state.listItems, this.props.value)\r\n let selectedItems = this.props.multiSelect ? this.getItemsFromCSV(this.state.listItems, typeof this.props.value === 'string' && this.props.value || '') : [];\r\n let text = this.props.multiSelect\r\n ? selectedItems.map((items) => items[this.textField]).join(\",\")\r\n : this.getText(currItem)\r\n let value: any = this.props.allowCustom ? text : this.props.value\r\n\r\n //this.props.onChange && this.props.onChange(event, this.props.name, this.props.value, text);\r\n this.props.onAfterListUpdated && this.props.onAfterListUpdated(this.state.listItems, value, text)\r\n this.props.onTextChanged && this.props.onTextChanged(text);\r\n\r\n this.setState({ value: value, selectedItems }, () => validate && this.validate())\r\n }\r\n\r\n\r\n // for multi select\r\n getItemsFromCSV = (items: any[], value: string) => {\r\n let selectedItems: any[] = [];\r\n\r\n // create list of selected values\r\n if (typeof value === 'string' && value && value.split(this.separator).length > 0 && items && items.length > 0) {\r\n value.split(this.separator).map((id: any) => {\r\n let itemFound = items.find((t: any) => t[this.idField] == id);\r\n if (itemFound) selectedItems.push({ [this.idField]: itemFound[this.idField], [this.textField]: itemFound[this.textField] });\r\n })\r\n\r\n }\r\n return selectedItems;\r\n }\r\n\r\n // for multiselect\r\n getCSVFromItems = (items: any[]): string => {\r\n let result: string = \"\";\r\n items.map((item: any, index: any) => result += item[this.idField] + (index != items.length - 1 ? this.separator : ''));\r\n return result;\r\n }\r\n\r\n onMultiSelectChange = (event: MultiSelectChangeEvent) => {\r\n this.handleChange(event, this.getCSVFromItems(event.target.value), '');\r\n }\r\n\r\n handleDropDownChange = (event: any) => {\r\n this.handleChange(event, this.getValue(event.target.value), this.getText(event.target.value))\r\n\r\n }\r\n}\r\n\r\nexport default class SystemDropDown extends SystemBaseList {\r\n constructor(props: any) {\r\n super(props)\r\n }\r\n\r\n render() {\r\n\r\n let multiSelect = this.props.multiSelect\r\n let multiColumn = !multiSelect && this.props.isMultiColumn && this.props.columns && this.props.columns.length > 0;\r\n let simpleDropDown = !multiSelect && !multiColumn;\r\n\r\n let isEmpty = !(this.state.filteredItems && this.state.filteredItems.length > 0)\r\n let isDisabled = this.props.disabled || this.state.isLoading;// || (!this.props.smartSearch && !this.props.multiSelect && this.props.autoDisable && isEmpty);\r\n let value = this.state.value == null || this.state.value == undefined || this.state.value == ''\r\n ? null\r\n : (this.props.multiSelect\r\n ? this.state.selectedItems\r\n : this.getItem(this.state.filteredItems, this.state.value));\r\n\r\n let text = \"\"\r\n try {\r\n text = this.props.smartSearch ? this.props.searchText : this.getCurrentItemText();\r\n } catch (e) {\r\n\r\n }\r\n\r\n\r\n return (\r\n \r\n \r\n {\r\n /* A MULTI SELECT SINGLE COLUMN DROP DOWN COMPONENT */\r\n multiSelect &&\r\n \r\n }\r\n {\r\n /* A SINGLE SELECT MULTI COLUMN DROP DOWN COMPONENT */\r\n multiColumn &&\r\n \r\n }\r\n {\r\n /* A SINGLE SELECT SIMPLE DROP DOWN COMPONENT */\r\n simpleDropDown &&\r\n \r\n }\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport const SmartSearch = (props: any) => \r\nexport const MultiColumn = (props: any) => \r\nexport const MultiSelect = (props: any) => \r\n","\r\nimport * as React from 'react'\r\n\r\ninterface ISystemButton {\r\n btnType?: any,\r\n className: string,\r\n iconName?: string,\r\n title: string,\r\n btnTitle: string,\r\n handleClick?: any\r\n disabled?: boolean\r\n}\r\n\r\nexport const SystemButton = (props: ISystemButton) => {\r\n const buttonType = props.btnType || 'button';\r\n\r\n return (\r\n \r\n { props.btnTitle}\r\n \r\n )\r\n}\r\n\r\n","import * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\nimport { Dialog, DialogActionsBar } from '@progress/kendo-react-dialogs';\r\n//import { Parser } from 'html-to-react';\r\n\r\n\r\ninterface ISystemPopup {\r\n popupWidth?: any,\r\n className: string,\r\n popupHeight?: any,\r\n popupTitle?: string,\r\n btnTitle?: string,\r\n children?: any\r\n showButton?: boolean\r\n}\r\n\r\ninterface ISystemDialogProps {\r\n title?: any;\r\n onYes?(): void;\r\n onNo?(): void;\r\n onAbort?(): void;\r\n onCancel?(): void;\r\n onClose?(): void;\r\n message?: string\r\n visible: boolean\r\n isHtml?: boolean\r\n showActionButton?: boolean\r\n showYes?: boolean\r\n showNo?: boolean\r\n showCancel?: boolean\r\n showAbort?: boolean\r\n showClose?: boolean\r\n}\r\n\r\nexport default class SystemDialog extends React.Component {\r\n static defaultProps = {\r\n showYes: true,\r\n showNo: true,\r\n showCancel: false,\r\n showAbort: false,\r\n showClose: false\r\n }\r\n\r\n onYes = () => this.props.onYes && this.props.onYes();\r\n onAbort = () => this.props.onAbort && this.props.onAbort();\r\n onNo = () => this.props.onNo && this.props.onNo();\r\n onCancel = () => this.props.onCancel && this.props.onCancel();\r\n onClose = () => this.props.onClose && this.props.onClose();\r\n \r\n\r\n\r\n render() {\r\n return (\r\n \r\n {\r\n this.props.visible &&\r\n
\r\n {this.props.isHtml ? { Parser().parse(this.props.message) }
\r\n : { this.props.message}
\r\n }\r\n\r\n {!this.props.isHtml && \r\n \r\n {this.props.showYes && Yes }\r\n {this.props.showNo && No }\r\n {this.props.showCancel && Cancel }\r\n {this.props.showAbort && Abort }\r\n {this.props.showClose && Close }\r\n
\r\n }\r\n }\r\n
\r\n );\r\n }\r\n}","import * as React from 'react'\r\nimport * as ReactDOM from 'react-dom';\r\n\r\nexport default class LoadingPanel extends React.Component {\r\n render() {\r\n const loadingPanel = (\r\n \r\n
Loading... \r\n
\r\n
\r\n
\r\n );\r\n\r\n\r\n const gridContent = this.props.node && this.props.node.querySelector('.k-grid-content');\r\n return gridContent ? ReactDOM.createPortal(loadingPanel, gridContent) : loadingPanel;\r\n }\r\n}","\r\nimport * as React from 'react'\r\nimport { SystemGrid, DateCell, DateTimeCell, SystemPanel } from './../../../library'\r\nimport { GridColumn as Column, GridCellProps, GridRowClickEvent } from '@progress/kendo-react-grid'\r\nimport { DownloadFile } from '../../helpers/utils';\r\n\r\nexport default class AuditGrid extends React.Component{\r\n\r\n DetailComponent = (props: any) => {\r\n\r\n const dataItem = props.dataItem;\r\n if (dataItem.AuditType != \"Update\") return null;\r\n return (\r\n \r\n \r\n \r\n \r\n )\r\n }\r\n downloadTemplate = async () => {\r\n // DownloadFile(config.apiEndpoint + `/Audit/DownloadAuditDump/` + this.props.Schema + '/' + this.props.Table + '/' + this.props.primaryKey + '/' + this.props.secondarySchema + '/' + this.props.secondaryTable + '/' + this.props.secondaryKey)\r\n }\r\n render() {\r\n return (\r\n Export to Excel]} >\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\n//export default AuditGrid","import * as React from 'react';\r\nimport {SystemPopup } from '../../../library';\r\nimport AuditGrid from './AuditGrid'\r\ninterface IAuditFormProps {\r\n visible: boolean, table: string, schema: string,\r\n secondaryTable: string, secondarySchema: string,\r\n onClose(): void, primaryKeyEncrypted: string, secondaryKeyEncrypted: string\r\n}\r\n\r\ninterface IAuditFormState {\r\n ContextId: string,\r\n\r\n}\r\nexport default class AuditForm extends React.Component {\r\n constructor(props: any) {\r\n super(props);\r\n this.state = { ContextId: '' }\r\n\r\n\r\n }\r\n\r\n onRowClick = (data: any) => {\r\n if (data && data.ContextId) {\r\n this.setState({ ContextId: data.ContextId })\r\n }\r\n }\r\n render() { \r\n return \r\n\r\n \r\n\r\n \r\n }\r\n}\r\n\r\n","import { IPermission, IUserDetail } from '../../library/types/ISecurity'\r\nimport { CrudHelper, EditModes, SystemPanel } from '..';\r\nimport { getPermission, getUserId } from '../../service/userService';\r\nimport { localToUTC } from '../helpers/utils';\r\n\r\n\r\nexport interface ISystemFormHelper {\r\n securityObject?: string\r\n //readUrl?: string,\r\n url?: string,\r\n primaryKeyEncrypted?: string\r\n onProcessBegin?(): void,\r\n onProcessEnd?(): void,\r\n showCrudMessages?: boolean,\r\n onPrepare?(): any,\r\n onRead?(): void,\r\n onLoad?(data?: any, mode?: EditModes): void;\r\n onAdd?(): void,\r\n onRecordUpdated?(mode: EditModes, response: any, closeForm?: boolean): void,\r\n onError?(error?: any, mode?: EditModes, key?: string): void,\r\n onEdit?(): void,\r\n onDelete?(): void,\r\n clearOnSave?: boolean,\r\n clearOnDelete?: boolean,\r\n onClear?(): void,\r\n onInitialize?(): any,\r\n AddUrl?: string\r\n\r\n}\r\n\r\nconst showConsoleInfo = false;\r\n\r\nexport default class SystemFormHelper {\r\n\r\n public static defaultPermission: IPermission = { AddPermission: true, ReadPermission: true, EditPermission: true, DeletePermission: true }\r\n\r\n public static onReadAsync = (options: ISystemFormHelper): Promise => {\r\n let permission = getPermission(options.securityObject) || SystemFormHelper.defaultPermission;\r\n\r\n return new Promise((resolve, reject) => {\r\n if (!permission || permission.ReadPermission == undefined) {\r\n reject(new Error(\"Permissions not found\"));\r\n return;\r\n }\r\n\r\n if (!(permission.ReadPermission || permission.EditPermission)) {\r\n // toast.warning(\"You dont have read permissions for this form\")\r\n reject(new Error(\"You dont have permission to perform READ this object\"));\r\n return;\r\n }\r\n\r\n if (!options.url) {\r\n reject(new Error(\"URL Not found / provided\"));\r\n return;\r\n }\r\n\r\n if (!options.primaryKeyEncrypted) {\r\n reject(new Error(\"Primary key not provided\"));\r\n return;\r\n }\r\n\r\n CrudHelper(\r\n {\r\n url: (options.url) + \"/\" + options.primaryKeyEncrypted,\r\n mode: EditModes.Read,\r\n key: options.primaryKeyEncrypted,\r\n onSuccess: (response) => resolve(response),\r\n onError: (error) => reject(error),\r\n showMessage: (options.showCrudMessages ? options.showCrudMessages : true)\r\n })\r\n });\r\n }\r\n\r\n /** */\r\n public static onAddAsync = (options: ISystemFormHelper): Promise => {\r\n let permission = getPermission(options.securityObject) || SystemFormHelper.defaultPermission;\r\n\r\n return new Promise((resolve, reject) => {\r\n if (!permission || permission.AddPermission == undefined) {\r\n reject(new Error(\"Permissions not found\"));\r\n return;\r\n }\r\n\r\n if (!permission.AddPermission) {\r\n // toast.warning(\"You dont have add permissions for this form\")\r\n reject(new Error(\"You dont have permission to perform ADD on this object\"));\r\n return;\r\n }\r\n\r\n if (!options.url) {\r\n reject(new Error(\"URL Not found / provided\"));\r\n return;\r\n }\r\n\r\n\r\n\r\n CrudHelper({\r\n url: (options.AddUrl || options.url),\r\n mode: EditModes.Create,\r\n data: options.onPrepare ? { ...options.onPrepare(), CreatedBy: getUserId(), CreatedDateTime: localToUTC(new Date()) } : null,\r\n onSuccess: (response) => resolve(response),\r\n onError: (error) => reject(error),\r\n showMessage: (options.showCrudMessages ? options.showCrudMessages : true)\r\n })\r\n });\r\n }\r\n\r\n /** */\r\n public static onEditAsync = (options: ISystemFormHelper): Promise => {\r\n let permission = getPermission(options.securityObject) || SystemFormHelper.defaultPermission;\r\n return new Promise((resolve, reject) => {\r\n if (!permission || permission.EditPermission == undefined) {\r\n reject(new Error(\"Permissions not found\"));\r\n return;\r\n }\r\n\r\n if (!permission.EditPermission) {\r\n // toast.warning(\"You dont have edit permissions for this form\")\r\n reject(new Error(\"You dont have permission to perform EDIT on this object\"));\r\n return;\r\n }\r\n\r\n if (!options.url) {\r\n reject(new Error(\"URL Not found / provided\"));\r\n return;\r\n }\r\n\r\n if (!options.primaryKeyEncrypted) {\r\n reject(new Error(\"Primary key not provided\"));\r\n return;\r\n }\r\n CrudHelper({\r\n url: (options.url),\r\n mode: EditModes.Update,\r\n data: options.onPrepare ? { ...options.onPrepare(), ModifiedBy: getUserId(), ModifiedDateTime: localToUTC(new Date()) } : null,\r\n key: options.primaryKeyEncrypted,\r\n onSuccess: (response) => resolve(response),\r\n onError: (error) => reject(error),\r\n showMessage: (options.showCrudMessages ? options.showCrudMessages : true)\r\n })\r\n });\r\n }\r\n\r\n /** */\r\n public static onDeleteAsync = (options: ISystemFormHelper): Promise => {\r\n let permission = getPermission(options.securityObject) || SystemFormHelper.defaultPermission;\r\n return new Promise((resolve, reject) => {\r\n if (!permission || permission.DeletePermission == undefined) {\r\n reject(new Error(\"Permissions not found\"));\r\n return;\r\n }\r\n\r\n if (!permission.DeletePermission) {\r\n // toast.warning(\"You dont have delete permissions for this form\")\r\n reject(new Error(\"You dont have permission to perform DELETE on this object\"));\r\n return;\r\n }\r\n\r\n if (!options.url) {\r\n reject(new Error(\"URL Not found / provided\"));\r\n return;\r\n }\r\n\r\n if (!options.primaryKeyEncrypted) {\r\n reject(new Error(\"Primary key not provided\"));\r\n return;\r\n }\r\n\r\n CrudHelper({\r\n url: ((options.url) + \"/\" + options.primaryKeyEncrypted),\r\n mode: EditModes.Delete,\r\n key: options.primaryKeyEncrypted,\r\n onSuccess: (response) => resolve(response),\r\n onError: (error) => reject(error),\r\n showMessage: (options.showCrudMessages ? options.showCrudMessages : true)\r\n })\r\n });\r\n }\r\n\r\n /** */\r\n public static onRead = (options: ISystemFormHelper) => {\r\n if (options.onRead) options.onRead();\r\n else if (options.url && options.primaryKeyEncrypted) {\r\n options.onProcessBegin && options.onProcessBegin();\r\n SystemFormHelper.onReadAsync(options)\r\n .then((response) => options.onLoad && options.onLoad(response.data))\r\n .catch((error) => options.onError && options.onError(error, EditModes.Read, \"\"))\r\n .finally(() => options.onProcessEnd && options.onProcessEnd());\r\n }\r\n }\r\n\r\n /** */\r\n public static onAdd = (options: ISystemFormHelper, closeForm?: boolean) => {\r\n if (options.onAdd) options.onAdd();\r\n else if (options.url) {\r\n options.onProcessBegin && options.onProcessBegin();\r\n SystemFormHelper.onAddAsync(options)\r\n .then((response) => options.onRecordUpdated && options.onRecordUpdated(EditModes.Create, response, closeForm))\r\n .catch((error) => options.onError && options.onError(error, EditModes.Create, \"\"))\r\n .finally(() => options.onProcessEnd && options.onProcessEnd());\r\n }\r\n }\r\n\r\n /** */\r\n public static onEdit = (options: ISystemFormHelper, closeForm?: boolean) => {\r\n if (options.onEdit) options.onEdit();\r\n else if (options.url && options.primaryKeyEncrypted) {\r\n options.onProcessBegin && options.onProcessBegin();\r\n SystemFormHelper.onEditAsync(options)\r\n .then((response) => options.onRecordUpdated && options.onRecordUpdated(EditModes.Update, response, closeForm))\r\n .catch((error) => options.onError && options.onError(error, EditModes.Update, options.primaryKeyEncrypted))\r\n .finally(() => options.onProcessEnd && options.onProcessEnd());\r\n }\r\n }\r\n\r\n /** */\r\n public static onDelete = (options: ISystemFormHelper, closeForm?: boolean) => {\r\n if (options.onDelete) options.onDelete();\r\n else if (options.url && options.primaryKeyEncrypted) {\r\n options.onProcessBegin && options.onProcessBegin();\r\n SystemFormHelper.onDeleteAsync(options)\r\n .then((response) => options.onRecordUpdated && options.onRecordUpdated(EditModes.Delete, response, closeForm))\r\n .catch((error) => options.onError && options.onError(error, EditModes.Delete, options.primaryKeyEncrypted))\r\n .finally(() => options.onProcessEnd && options.onProcessEnd());\r\n }\r\n }\r\n}","import * as React from 'react';\r\nimport * as ReactDOM from 'react-dom'\r\nimport 'react-toastify/dist/ReactToastify.css';\r\nimport { SystemButton } from '../tools/SystemButton';\r\nimport SystemDialog from '../tools/SystemDialog';\r\nimport { CrudHelper, EditModes, SystemPanel } from '..';\r\nimport LoadingPanel from '../common/SystemLoadingPanel';\r\nimport { IPermission, IUserDetail } from '../../library/types/ISecurity'\r\nimport { getPermission } from '../../service/userService'\r\nimport AuditForm from '../form/audit/AuditForm'\r\nimport SystemFormHelper, { ISystemFormHelper } from '../inputs/SystemFormHelper'\r\nimport { SuperAdminInfo } from '../common/ShowAdminInfo';\r\n\r\nconst showConsoleInfo = false;\r\n\r\nexport enum IPlacement {\r\n TopLeft, TopCenter, TopRight,\r\n BottomLeft, BottomCenter, BottomRight,\r\n MiddleRight, MiddleCenter, MiddleLeft\r\n}\r\n\r\nexport interface ISystemFormProps {\r\n id?: string;\r\n name?: string;\r\n label?: string; // title of the form\r\n\r\n primaryKeyEncrypted?: string;\r\n secondaryKeyEncrypted?: string;\r\n\r\n children?: any; // child components of the form\r\n\r\n securityObject?: string; // contains authentication information of the user and the actions the user can perform \r\n\r\n // crud permissions\r\n canSave?: boolean;\r\n canCreate?: boolean; // allows the form to create\r\n canRead?: boolean; // allows the form to read \r\n canUpdate?: boolean; // allows the form to update\r\n canDelete?: boolean; // allows to form to delete\r\n disableSave?: boolean;\r\n // buttons to show\r\n canClear?: boolean; // allows to form to delete\r\n canReview?: boolean; // allows to form to delete\r\n showValidate?: boolean; // allows a form to validate\r\n showSearch?: boolean;\r\n showClear?: boolean;\r\n showAdd?: boolean;\r\n showSaveAndClose?: boolean;\r\n showSave?: boolean;\r\n showReview?: boolean;\r\n showTitle?: boolean;\r\n showTopOrBottomToolTip?: boolean\r\n ToolTipPosition?: string\r\n /** event raised on Add Button click (use this event to clear up the form and setup initial values) */\r\n onAdd?(): void;\r\n onSave?(): void; // event raised on save\r\n onSaveAndClose?(): void; // event raised on save\r\n onEdit?(): void;\r\n onCancel?(): void; // event raised on save\r\n onDelete?(): boolean;\r\n\r\n onAfterDelete?(response?: any): void;\r\n onAfterUpdate?(response?: any): void;\r\n onAfterCreate?(response?: any): void;\r\n onAfterRead?(response?: any): void;\r\n /** event raised on search */\r\n onSearch?(): void;\r\n\r\n /** event raised on clear click */\r\n onClear?(): void;\r\n onHideTile?(): void;\r\n onReview?(): void; // \r\n onRead?(): void;\r\n onSaveAndClose?(): void;\r\n\r\n /** Validates a form - return true if validation is successfull */\r\n onValidate?(): boolean; // event raised on validate\r\n onValidateAsync?(): Promise; // event raised on validate\r\n\r\n /** fires after save success */\r\n onAfterUpdate?(response: any): void;\r\n\r\n defaultOpenState?: boolean; // default open state of the form\r\n\r\n collapsable?: boolean; // whether this form can be collapsable\r\n\r\n url?: string; // endpoint url performs all operations\r\n onInitialize?(): any;\r\n onPrepare?(): any;\r\n onLoad?(data?: any, mode?: EditModes): void;\r\n /** Event raised after a successfull operation\r\n * response: the data returned from the operation\r\n * mode: the CRUD mode of the operation\r\n * closeForm: close the form automatically after success\r\n * -------------------------------------------------------------\r\n * return TRUE to fire the onLoad (load the data from the server) function\r\n */\r\n onRecordUpdated?(response?: any, mode?: EditModes, key?: string, closeForm?: boolean): boolean;\r\n /** event raised on error */\r\n onError?(error?: any, mode?: EditModes, key?: string): void,\r\n showCrudMessages?: boolean\r\n\r\n /** table to be reviewed */\r\n table?: string\r\n /** schema to be reviewed */\r\n schema?: string\r\n secondaryTable?: string,\r\n secondarySchema?: string,\r\n clearOnSave?: boolean\r\n clearOnDelete?: boolean,\r\n\r\n AddUrl?: string,\r\n EditUrl?: string,\r\n ReadUrl?: string,\r\n DeleteUrl?: string,\r\n showPanel?: boolean,\r\n isDirty?: boolean,\r\n toolbar?: any[],\r\n classAdd?: boolean\r\n}\r\n\r\nexport interface ISystemFormState {\r\n /** specifies if form is in create mode */\r\n isNew: boolean;\r\n /** specifies if the any form field has been edited */\r\n isDirty: boolean;\r\n /** specifies if the form is valid or not */\r\n isValid: boolean;\r\n /** specifies if the form is in a collapse state or not */\r\n isFormOpen: boolean;\r\n\r\n editMode?: EditModes; // current edit state\r\n\r\n /** specifies if the form is doing any background task */\r\n isLoading: boolean;\r\n /** allows the form to create */\r\n canCreate?: boolean;\r\n /** allows the form to read */\r\n canRead?: boolean;\r\n /** allows the form to update */\r\n canUpdate?: boolean;\r\n /** allows to form to delete */\r\n canDelete: boolean;\r\n /** allows to view review */\r\n canReview: boolean;\r\n\r\n /** shows a delete confirmation before a delete operation */\r\n showDeleteConfirmation: boolean;\r\n\r\n isReadOnly?: boolean;\r\n\r\n node?: any\r\n\r\n permission: IPermission\r\n\r\n isAuditFormVisible: boolean\r\n}\r\n\r\nexport default class SystemForm extends React.Component {\r\n\r\n static defaultProps = {\r\n id: '',\r\n name: '',\r\n url: '',\r\n primaryKeyEncrypted: '',\r\n showCrudMessages: true,\r\n canRead: true,\r\n canCreate: true,\r\n canUpdate: true,\r\n canDelete: true,\r\n canReview: true,\r\n canClear: true,\r\n showSave: true,\r\n showReview: true,\r\n showTitle: true,\r\n showClear: true,\r\n showTopOrBottomToolTip: true,\r\n ToolTipPosition: 'right'\r\n }\r\n\r\n fieldContainer: React.RefObject = React.createRef();\r\n submitButton: any = React.createRef();\r\n formObject: any = React.createRef();\r\n children: any;\r\n // default state of the form\r\n defaultPermission: IPermission = { AddPermission: true, ReadPermission: true, EditPermission: true, DeletePermission: true }\r\n\r\n constructor(props: ISystemFormProps) {\r\n super(props);\r\n const permission = getPermission(props.securityObject) || this.defaultPermission;\r\n\r\n this.state = {\r\n isFormOpen: true,\r\n editMode: EditModes.Read,\r\n isLoading: false,\r\n canRead: true,\r\n canCreate: true,\r\n canUpdate: true,\r\n canDelete: true,\r\n canReview: true,\r\n showDeleteConfirmation: false,\r\n isReadOnly: false,\r\n isNew: true,\r\n node: null,\r\n isValid: true,\r\n isDirty: false,\r\n isAuditFormVisible: false,\r\n permission: { ...permission }\r\n } as ISystemFormState\r\n }\r\n\r\n onProcessBegin = () => this.setState({ ...this.state, isLoading: true });\r\n onProcessEnd = () => this.setState({ ...this.state, isLoading: false });\r\n\r\n\r\n /**\r\n * Calls after a record has been added or edited\r\n * reloads the form data, return false if you want to skip loading\r\n * clears the form if clearonsave = true\r\n * @param mode : mode add or edit\r\n * @param response :response from the operation\r\n * @param closeForm\r\n */\r\n onRecordUpdated = (mode: EditModes, response: any, closeForm: boolean = false) => {\r\n //if (mode == EditModes.Update && closeForm == false && this.props.loadData) this.props.loadData(response.data); // need correction\r\n if (this.props.onRecordUpdated) {\r\n if (!this.props.onRecordUpdated(response, mode, this.props.primaryKeyEncrypted, closeForm))\r\n if (this.props.onLoad) this.props.onLoad(response.data, mode);\r\n }\r\n else if (this.props.onLoad) this.props.onLoad(response.data, mode);\r\n\r\n if (this.props.clearOnSave || (mode == EditModes.Delete && this.props.clearOnDelete)) this.handleClearButton();\r\n\r\n if (mode == EditModes.Delete && this.props.onAfterDelete) this.props.onAfterDelete(response);\r\n if (mode == EditModes.Create && this.props.onAfterCreate) this.props.onAfterCreate(response);\r\n if (mode == EditModes.Read && this.props.onAfterRead) this.props.onAfterRead(response);\r\n if (mode == EditModes.Update && this.props.onAfterUpdate) this.props.onAfterUpdate(response);\r\n // this.props.onSave && this.props.onSave()\r\n }\r\n\r\n crudOptions = (): ISystemFormHelper => {\r\n return {\r\n primaryKeyEncrypted: this.props.primaryKeyEncrypted,\r\n showCrudMessages: this.props.showCrudMessages,\r\n securityObject: this.props.securityObject,\r\n onProcessBegin: this.onProcessBegin,\r\n onProcessEnd: this.onProcessEnd,\r\n onLoad: this.props.onLoad,\r\n onPrepare: this.props.onPrepare,\r\n onRecordUpdated: this.onRecordUpdated,\r\n onError: this.props.onError,\r\n //permission: this.state.permission\r\n } as ISystemFormHelper;\r\n }\r\n\r\n componentDidMount = () => {\r\n if (this.props.onLoad) this.props.onLoad();\r\n\r\n this.setState({\r\n node: ReactDOM.findDOMNode(this)\r\n }, () => this.ensureDataLoaded())\r\n }\r\n\r\n componentDidUpdate = (prevProps: ISystemFormProps) => {\r\n if (prevProps.primaryKeyEncrypted != this.props.primaryKeyEncrypted) {\r\n this.ensureDataLoaded();\r\n }\r\n }\r\n\r\n ensureDataLoaded = () => {\r\n if (this.props.primaryKeyEncrypted) {\r\n this.onRead();\r\n } else {\r\n this.props.onInitialize && this.props.onInitialize();\r\n }\r\n }\r\n\r\n /** */\r\n onClear = () => this.props.onInitialize && this.props.onInitialize();\r\n onRead = () => SystemFormHelper.onRead({ url: this.props.ReadUrl || this.props.url, ...this.crudOptions() });\r\n onEdit = () => SystemFormHelper.onEdit({ url: this.props.EditUrl || this.props.url, ...this.crudOptions() });\r\n onDelete = async () => {\r\n if (this.props.onDelete) {\r\n if (!await this.props.onDelete()) return;\r\n }\r\n SystemFormHelper.onDelete({ url: this.props.DeleteUrl || this.props.url, ...this.crudOptions() });\r\n }\r\n onAdd = () => SystemFormHelper.onAdd({ url: this.props.AddUrl || this.props.url, ...this.crudOptions() });\r\n onError = (error: any, mode: EditModes, primaryKey: string) => this.props.onError && this.props.onError(error, mode, primaryKey);\r\n\r\n handleSearchButton = () => this.props.onSearch && this.props.onSearch();\r\n\r\n handleClearButton = () => {\r\n if (this.props.onClear) this.props.onClear();\r\n else if (this.props.onInitialize) this.props.onInitialize();\r\n }\r\n\r\n // Event handlers\r\n handleCollapseButton = () => this.setState({ ...this.state, isFormOpen: !this.state.isFormOpen });\r\n handleReviewButton = () => this.setState({ isAuditFormVisible: true })\r\n handleReviewClose = () => this.setState({ isAuditFormVisible: false })\r\n handleDelete = () => this.setState({ ...this.state, showDeleteConfirmation: true })\r\n onDeleteNo = () => this.setState({ ...this.state, showDeleteConfirmation: false })\r\n onDeleteYes = () => this.setState({ ...this.state, showDeleteConfirmation: false }, () => this.onDelete());\r\n handleEdit = () => this.setState({ ...this.state, editMode: EditModes.Update });\r\n\r\n\r\n // handles save button click\r\n handleSaveAndClose = async () => {\r\n await this.handleSave()\r\n if (this.props.onSaveAndClose) this.props.onSaveAndClose()\r\n }\r\n\r\n ///** Validate the form */\r\n onValidate = async (): Promise => {\r\n let validate: boolean = true;\r\n\r\n if (this.props.onValidate) validate = this.props.onValidate();\r\n if (validate && this.props.onValidateAsync) validate = await this.props.onValidateAsync();\r\n\r\n return validate;\r\n }\r\n\r\n handleSave = async (): Promise => {\r\n let validate: boolean = await this.onValidate();\r\n\r\n if (validate) {\r\n if (this.props.onSave) this.props.onSave();\r\n else this.props.primaryKeyEncrypted ? this.onEdit() : this.onAdd();\r\n }\r\n\r\n return validate;\r\n }\r\n\r\n createNestedObject = (obj: any, path: any, value: any) => {\r\n var parent = obj;\r\n var names = path.split(\".\");\r\n for (var i = 0; i < names.length; i++) {\r\n if (i == names.length - 1) obj = obj[names[i]] = value\r\n else obj = obj[names[i]] = obj[names[i]] || {};\r\n }\r\n return parent;\r\n }\r\n\r\n createObjectFromForm = (formData: any) => {\r\n var obj = {};\r\n formData.forEach((value: any, key: any) => obj = this.createNestedObject(obj, key, value));\r\n return obj;\r\n }\r\n\r\n createDataFromForm = (form: HTMLFormElement) => {\r\n const formData = new FormData(form);\r\n return this.createObjectFromForm(formData);\r\n }\r\n // calls when submit button clicked\r\n handleSubmit = (event: React.FormEvent) => {\r\n event.preventDefault();\r\n // code to do the submit\r\n }\r\n\r\n handleReload = () => this.onRead()\r\n\r\n\r\n // creates toolbar of the form\r\n\r\n render() {\r\n\r\n // conditions\r\n const isNew = !this.props.primaryKeyEncrypted;\r\n const defaultDisable = this.state.isReadOnly || this.state.isLoading || !this.state.permission\r\n const disableAdd = defaultDisable || !this.state.permission.AddPermission;\r\n const disableUpdate = defaultDisable || !this.state.permission.EditPermission;\r\n const disableDelete = defaultDisable || !this.state.permission.DeletePermission;\r\n const disableRead = disableAdd || disableUpdate;\r\n const disableSave = disableAdd || disableUpdate || this.props.disableSave || false;\r\n\r\n // buttons\r\n const TitleText = this.props.showTitle && this.props.url && this.props.label && ((isNew ? \"Add \" : \"Edit \") + this.props.label);\r\n const Title =
\r\n const AddButton = \r\n const UpdateButton = \r\n const DeleteButton = \r\n const SaveButton = \r\n const SaveAndCloseButton = \r\n const ValidateButton = \r\n const ReloadButton = \r\n const ReviewButton = Review \r\n const CollapseButton = Collapse \r\n const SearchButton = Search \r\n const ClearButton = Clear \r\n // \r\n\r\n let auditPrimaryKeyEncrypted = this.props.primaryKeyEncrypted ? this.props.primaryKeyEncrypted : this.props.primaryKeyEncrypted;\r\n if (this.props.primaryKeyEncrypted && this.props.primaryKeyEncrypted != undefined && this.props.primaryKeyEncrypted != null) {\r\n // auditPrimaryKeyEncrypted = auditPrimaryKeyEncrypted + \";\" + this.props.secondaryKeyEncrypted;\r\n auditPrimaryKeyEncrypted = auditPrimaryKeyEncrypted\r\n }\r\n let auditSecondaryKeyEncrypted = this.props.secondaryKeyEncrypted ? this.props.secondaryKeyEncrypted : undefined;\r\n if (this.props.secondaryKeyEncrypted && this.props.secondaryKeyEncrypted != undefined && this.props.secondaryKeyEncrypted != null) {\r\n auditSecondaryKeyEncrypted = auditSecondaryKeyEncrypted\r\n }\r\n\r\n var tiles = (\r\n {this.props.toolbar && this.props.toolbar.length > 0 && this.props.toolbar}\r\n {this.props.showValidate && ValidateButton}\r\n {this.props.showSaveAndClose && SaveAndCloseButton}\r\n {this.props.showSave && (this.props.canSave || this.props.canCreate || this.props.canUpdate) && SaveButton}\r\n {this.props.showAdd && AddButton}\r\n {!isNew && this.props.canDelete && DeleteButton}\r\n {this.props.showSearch && SearchButton}\r\n {isNew && this.props.canClear && ClearButton}\r\n {!isNew && this.props.showReview && this.props.canReview && ReviewButton}\r\n {!isNew && ReloadButton}\r\n\r\n
)\r\n\r\n let form = (\r\n \r\n
\r\n
\r\n
\r\n
\r\n {Title}\r\n {this.props.showTopOrBottomToolTip ?\r\n
\r\n {tiles}\r\n
\r\n : ''}\r\n
\r\n\r\n
\r\n
\r\n {this.props.children}\r\n
\r\n {this.props.showTopOrBottomToolTip == false ?\r\n
\r\n {tiles}\r\n
\r\n : ''}\r\n
\r\n {this.state.isLoading && this.state.node &&
}\r\n
\r\n
\r\n );\r\n let content = this.props.showPanel ?\r\n \r\n {form}\r\n \r\n : form;\r\n return content;\r\n }\r\n}\r\n\r\n","import * as React from 'react'\r\nimport { Switch } from '@progress/kendo-react-inputs';\r\nimport * as BaseControls from './../common/BaseControls';\r\nimport { ISystemBase } from 'library/types/ISystemBase';\r\nimport { SystemBase } from '../../library/common/SystemBase';\r\n\r\ninterface ISystemSwitch {\r\n onLabel?: string,\r\n offLabel?: string,\r\n\r\n}\r\nexport default class SystemSwitch extends SystemBase{\r\n static defaultProps = {\r\n ...SystemBase.defaultProps,\r\n onLabel: \"YES\",\r\n offLabel: \"NO\"\r\n }\r\n constructor(props: any) {\r\n super(props)\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n )\r\n }\r\n}","import * as React from 'react'\r\nimport { IFileInfo } from 'library/types/IFileInfo';\r\nimport { SystemBase } from 'library/common/SystemBase';\r\nimport { toast } from 'react-toastify';\r\ninterface ISystemUpload {\r\n onFileChanged?(fileInfo: IFileInfo): void\r\n /*Specifies the allowed extension of the component.*/\r\n extension: string,\r\n /*Specifies height of the component.*/\r\n height: string,\r\n /*Specifies width of the component.*/\r\n width: string,\r\n /*Specifies text of the component when image url not set.*/\r\n alt: string\r\n /**/\r\n showImage?: boolean\r\n fileInfo?: IFileInfo, className?: string,\r\n FileBase64?: boolean\r\n}\r\n/**\r\n * Creates an Input with Label \r\n * */\r\nexport default class SystemUpload extends SystemBase\r\n{\r\n constructor(props: any) {\r\n super(props)\r\n }\r\n\r\n static defaultProps = {\r\n ...SystemBase.defaultProps,\r\n showImage: true,\r\n FileBase64: false,\r\n showDimensionMessage: false\r\n } as ISystemUpload;\r\n\r\n getfile2Base64 = (file: File): Promise => {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => resolve(reader.result ? reader.result.toString() : \"\");\r\n reader.onerror = error => reject(error);\r\n })\r\n }\r\n\r\n validateFile(fileExtension: string, fileSize: number): boolean {\r\n let resp = null;// getGlobalSettings();\r\n var filterMaxAttachmentSize = resp.filter(x => x.Name == \"DefaultFileSizeLimit\")\r\n var MaxAttachmentSize = 0;\r\n MaxAttachmentSize = filterMaxAttachmentSize[0].SettingValue;\r\n var filter = resp.filter(x => x.Name == \"SupportedFileFormat\")\r\n var FileSize = 0, OriginalFileSize = 0;\r\n var fileExtsetting = filter[0].SettingValue.split(',');\r\n for (var i = 0; i < fileExtsetting.length; i++) {\r\n var splitvalue = fileExtsetting[i].split(':');\r\n for (var j = 0; j < splitvalue.length; j++) {\r\n if (fileExtension.toLowerCase() == \"pdf\") {\r\n if (splitvalue[0].toLowerCase() == \"pdf\") {\r\n OriginalFileSize = splitvalue[1];\r\n FileSize = splitvalue[1] * 1048576;\r\n }\r\n }\r\n else if (fileExtension.toLowerCase() == \"doc\") {\r\n if (splitvalue[0].toLowerCase() == \"doc\") {\r\n OriginalFileSize = splitvalue[1];\r\n FileSize = splitvalue[1] * 1048576;\r\n }\r\n }\r\n else if (fileExtension.toLowerCase() == \"docx\") {\r\n if (splitvalue[0].toLowerCase() == \"docx\") {\r\n OriginalFileSize = splitvalue[1];\r\n FileSize = splitvalue[1] * 1048576;\r\n }\r\n }\r\n else if (fileExtension.toLowerCase() == \"xls\") {\r\n if (splitvalue[0].toLowerCase() == \"xls\") {\r\n OriginalFileSize = splitvalue[1];\r\n FileSize = splitvalue[1] * 1048576;\r\n }\r\n }\r\n else if (fileExtension.toLowerCase() == \"xlsx\") {\r\n if (splitvalue[0].toLowerCase() == \"xlsx\") {\r\n OriginalFileSize = splitvalue[1];\r\n FileSize = splitvalue[1] * 1048576;\r\n }\r\n }\r\n else if (fileExtension.toLowerCase() == \"jpg\" || fileExtension.toLowerCase() == \"jpeg\" || fileExtension.toLowerCase() == \"png\" || fileExtension.toLowerCase() == \"bmp\") {\r\n if (splitvalue[0].toLowerCase() == \"jpg\" || splitvalue[0].toLowerCase() == \"jpeg\" || splitvalue[0].toLowerCase() == \"png\" || splitvalue[0].toLowerCase() == \"bmp\") {\r\n OriginalFileSize = splitvalue[1];\r\n FileSize = splitvalue[1] * 1048576;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (FileSize == 0) {\r\n OriginalFileSize = MaxAttachmentSize;\r\n MaxAttachmentSize = MaxAttachmentSize * 1048576;\r\n }\r\n\r\n const maxFileSize = FileSize != 0 ? FileSize : MaxAttachmentSize;\r\n if (fileSize > maxFileSize) {\r\n toast.info(\"File is too large. The maximum file size allowed is \" + OriginalFileSize + 'MB');\r\n return false;\r\n }\r\n\r\n var fileExt = this.props.extension.split(',');\r\n if (!(fileExt && fileExt.length > 0 && fileExt.find(element => element.toLowerCase() == '.' + fileExtension.toLowerCase()))) {\r\n toast.info(\"File extension not supported. File extension(s) supported are \" + this.props.extension);\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n handleChange = (event: any) => {\r\n if (event.target.files && event.target.files[0]) {\r\n let fileData = event.target.files[0];\r\n let fileSize = fileData.size;\r\n let fileType = fileData.type;\r\n let filename = fileData.name;\r\n let fileExtension = filename.split('.').pop();\r\n if (this.validateFile(fileExtension, fileSize)) {\r\n this.getfile2Base64(fileData).then((response: any) => {\r\n let fileBase64 = response.replace('data:', '').replace(/^.+,/, '');\r\n this.setState({\r\n imagePath: response\r\n });\r\n\r\n\r\n if (this.props.onFileChanged)\r\n this.props.onFileChanged({\r\n fileSize: fileSize,\r\n fileType: fileType,\r\n filename: filename,\r\n fileExtension: fileExtension,\r\n fileBase64: fileBase64,\r\n fileBase64Url: response,\r\n\r\n });\r\n })\r\n }\r\n\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n super.componentDidMount();\r\n if (this.props.value) this.setImagePath();\r\n\r\n }\r\n\r\n componentDidUpdate(prevProps: any) {\r\n super.componentDidUpdate(prevProps);\r\n\r\n if (prevProps.fileInfo != this.props.fileInfo && !this.props.fileInfo) {\r\n\r\n var fileinput = document.getElementById(\"fileUploadImage-\" + this.props.id) as HTMLInputElement\r\n if (fileinput) fileinput.value = '';\r\n this.setState({ imagePath: '' });\r\n }\r\n\r\n if (prevProps.value != this.props.value) {\r\n this.setImagePath();\r\n }\r\n\r\n }\r\n\r\n setImagePath = () => {\r\n let ImageUrl = '';\r\n const ImageUrlRoot = config.ImageServerUrl;\r\n\r\n if (this.props.FileBase64) {\r\n ImageUrl = 'data:image/png;base64,' + this.props.value;\r\n\r\n if (this.props.value) this.setState({ imagePath: ImageUrl as string });\r\n }\r\n else {\r\n ImageUrl = ImageUrlRoot + this.props.value;\r\n\r\n if (this.props.value) this.setState({ imagePath: ImageUrl as string });\r\n }\r\n\r\n }\r\n\r\n handelButtonChange = (event: any) => {\r\n var inputContrlId = document.getElementById(\"fileUploadImage-\" + this.props.id);\r\n if (inputContrlId)\r\n inputContrlId.click();\r\n }\r\n render() {\r\n var finfo = this.state.value as IFileInfo;\r\n return (\r\n \r\n \r\n\r\n {this.props.showImage ?\r\n \r\n
\r\n
\r\n {this.props.showDimensionMessage ?
Recommended size is 200px by 100px and aspect ratio is 2:1
: null}\r\n
\r\n : \r\n }\r\n \r\n );\r\n }\r\n}\r\n\r\n","import React from 'react'\r\nimport * as BaseControls from './../common/BaseControls';\r\nimport { ISystemBase } from 'library/types/ISystemBase';\r\nimport { SystemBase } from 'library/common/SystemBase';\r\nimport HttpRequest from '../../service/httpService';\r\nimport { ComboBox, ComboBoxFilterChangeEvent, DropDownList, MultiColumnComboBox, MultiSelectFilterChangeEvent, MultiColumnComboBoxChangeEvent } from '@progress/kendo-react-dropdowns';\r\nimport { SetDatainlocalStorage, getDatainlocalStorage } from 'library/storage/Storage';\r\nimport { IDynamicList, IValueMultiObject } from '../../library/types/IDynamicList'\r\nimport { SystemMuliColumnDropDown } from '../grid/SystemGrid';\r\nimport { filterBy, FilterDescriptor } from '@progress/kendo-data-query';\r\n\r\ninterface ISystemDropDown extends IDynamicList {\r\n onAfterListUpdated?(listItems: any): void\r\n}\r\n\r\ninterface ISystemDropDownState {\r\n valueObject?: IValueMultiObject\r\n}\r\n\r\n\r\n/* text field which should show in Dropdown make it as Id field as 'Id' and text field 'Name' in this*/\r\n\r\nexport default class SystemMultiColumnDropDown extends SystemBase\r\n{\r\n constructor(props: any) {\r\n super(props)\r\n\r\n }\r\n static defaultProps = {\r\n ...SystemBase.defaultProps,\r\n autoDisable: true,\r\n isMultiColumn: false,\r\n fetchOnFilter: false,\r\n textField: \"Name\",\r\n dataItemKey: \"Value\",\r\n placeholder: \"- Please Select -\",\r\n className: \"input_feild\",\r\n minFilterLength: 3,\r\n columns: [],\r\n smartSearch: false,\r\n filterable: true,\r\n } as IDynamicList;\r\n\r\n componentDidMount = () => {\r\n super.componentDidMount();\r\n this.fetchData(() => this.setValue(this.props.value))\r\n }\r\n componentDidUpdate(prevProps: any) {\r\n if (prevProps.dataSource != this.props.dataSource) {\r\n this.fetchData(() => this.setValue(this.props.value))\r\n }\r\n else if (prevProps.value != this.props.value)\r\n this.setValue(this.props.value);\r\n \r\n }\r\n fetchData = (valueSetter: any) => {\r\n if (this.props.dataSource) {\r\n HttpRequest\r\n .get(this.props.dataSource)\r\n .then(response => {\r\n if (response.data && response.data.length > 0) {\r\n this.setState({\r\n ListItemsMulti: response.data.map((item: any, index: number) => { return { Id: item.Id, Name: item.Name, Description: item.Description }} ),\r\n\r\n value: this.state.value\r\n \r\n }, () => { this.setValue(this.props.value) });\r\n }\r\n else {\r\n this.setState({\r\n ListItemsMulti: [],\r\n value: this.state.value\r\n });\r\n\r\n };\r\n valueSetter();\r\n })\r\n .catch(error => {\r\n });\r\n } else {\r\n this.setState({ ListItemsMulti: [] }, () => { if (this.props.onAfterListUpdated) this.props.onAfterListUpdated(this.state.ListItemsMulti) });\r\n }\r\n }\r\n setValue = (value: any) => {\r\n if (this.state.ListItemsMulti && this.state.ListItemsMulti.length > 0 && value != undefined && value != null) {\r\n this.setState({ valueObject: this.state.ListItemsMulti.find((item:any) => item.Id == value) })\r\n }\r\n else {\r\n\r\n this.setState({ valueObject: undefined })\r\n }\r\n }\r\n getValue = (value: any) => {\r\n if (value && value != undefined) {\r\n return value.Id;\r\n }\r\n }\r\n onChange = (event: any) => {\r\n if (this.props.onChange && event.target.value != null) {\r\n this.props.onChange(event, event.target.name, this.getValue(event.target.value));\r\n }\r\n }\r\n\r\n onFilterChange = (event: ComboBoxFilterChangeEvent | MultiSelectFilterChangeEvent) => {\r\n let filter = { ...event.filter };\r\n if (this.props.smartSearch) {\r\n if (this.props.minFilterLength && filter.value.length > this.props.minFilterLength)\r\n this.fetchData(filter.value)\r\n else this.setState({ listItems: [], filteredItems: [] });\r\n\r\n } else {\r\n if (!this.props.minFilterLength || filter.value.length >= this.props.minFilterLength)\r\n this.setState({ filteredItems: this.filterData(filter) });\r\n else\r\n this.setState({ filteredItems: this.state.listItems });\r\n }\r\n }\r\n filterData = (filter: FilterDescriptor) => {\r\n return filterBy(this.state.listItems, filter);\r\n };\r\n\r\n render() {\r\n let isEmpty = !(this.state.filteredItems && this.state.filteredItems.length > 0)\r\n let isDisabled = this.props.disabled || (!this.props.smartSearch && this.props.autoDisable && isEmpty);\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react'\r\nimport { IDynamicList } from '../../library/types/IDynamicList'\r\nimport {\r\n TreeList, orderBy, filterBy, mapTree, extendDataItem,\r\n TreeListTextFilter, TreeListNumericFilter, TreeListDateFilter, TreeListBooleanFilter,\r\n TreeListToolbar, TreeListRowClickEvent, TreeListColumnProps, TreeListProps\r\n} from '@progress/kendo-react-treelist';\r\nimport { CompositeFilterDescriptor, FilterDescriptor, toDataSourceRequestString } from '@progress/kendo-data-query';\r\nimport HttpService from '../../service/httpService';\r\n\r\ninterface ISystemTreeList extends IDynamicList {\r\n subItemsField: string;\r\n onRowClick?: (event: TreeListRowClickEvent) => void;\r\n columns?: TreeListColumnProps[];\r\n filters?: Array;\r\n data?:[]\r\n}\r\n\r\nconst expandField = 'expanded';\r\n\r\n/* text field which should show in Dropdown make it as Id field as 'Id' and text field 'Name' in this*/\r\n\r\nexport default class SystemTreeList extends React.Component{\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n data: this.props.data ? this.props.data : [],\r\n filter: [],\r\n sort: [],\r\n expanded: []\r\n }\r\n }\r\n\r\n\r\n ensureDataFetched = (isPageChange: boolean=false) => {\r\n this.setState({\r\n filter: this.props.filters || [],\r\n }, () => this.fetchData(this.state.dataState));\r\n }\r\n\r\n\r\n fetchData(dataState: any) {\r\n if (!this.props.dataSource) {\r\n this.setState({ data: [] });\r\n return\r\n }\r\n\r\n HttpService.get(`${this.props.dataSource}`)\r\n .then((response: any) => {\r\n var data = JSON.parse(JSON.stringify(response.data.Data || response.data))\r\n if (data && data.length > 0) {\r\n this.setState({data: data});\r\n } else {\r\n this.setState({ data: [] });\r\n }\r\n }).catch((error) => {\r\n });\r\n }\r\n\r\n componentDidMount = () => {\r\n this.ensureDataFetched();\r\n }\r\n\r\n componentDidUpdate = (prevProps:any) => {\r\n if (prevProps.dataSource != this.props.dataSource || prevProps.filters != this.props.filters)\r\n this.ensureDataFetched();\r\n }\r\n \r\n onExpandChange = (e) => {\r\n this.setState({\r\n expanded: e.dataItem.expanded ?\r\n this.state.expanded.filter(id => id !== e.dataItem.Id) :\r\n [...this.state.expanded, e.dataItem.Id]\r\n });\r\n }\r\n\r\n handleDataStateChange = (event) => {\r\n this.setState({\r\n dataState: event.dataState\r\n })\r\n }\r\n\r\n addExpandField = (dataTree:any) => {\r\n const expanded = this.state.expanded;\r\n return mapTree(dataTree, this.props.subItemsField, (item) => \r\n extendDataItem(item, this.props.subItemsField, {\r\n [expandField]: expanded.includes(item.Id)\r\n })\r\n );\r\n }\r\n handleFilterChange = (event:any) => {\r\n this.setState({ filter: event.filter});\r\n };\r\n\r\n onSortChange = (event) => {\r\n this.setState({\r\n sort: event.sort,\r\n });\r\n };\r\n\r\n processData = () => {\r\n let { data, sort, filter} = this.state;\r\n let output = [];\r\n\r\n output = data;\r\n if(filter) output = filterBy(output, filter, this.props.subItemsField)\r\n // if(sort) output= orderBy(output, sort, this.props.subItemsField)\r\n return this.addExpandField(output);\r\n }\r\n\r\n render() {\r\n return \r\n }\r\n}\r\n","import * as React from 'react'\r\n\r\nimport { TabStrip, TabStripTab } from '@progress/kendo-react-layout';\r\n\r\n class SystemtabStrip extends React.Component {\r\n constructor(props:any) {\r\n super(props);\r\n\r\n this.state = {\r\n selected: 2,\r\n PrimaryKeyEncrypted: ''\r\n };\r\n }\r\n handleSelect = (e) => {\r\n this.setState({ selected: e.selected });\r\n }\r\n render() {\r\n return (\r\n \r\n \r\n Patient Detail
\r\n \r\n \r\n Encounter
\r\n \r\n \r\n Reading & Reminders
\r\n \r\n \r\n Patient Files
\r\n \r\n \r\n\r\n )\r\n }\r\n}\r\n\r\nexport default SystemtabStrip;\r\n","import * as React from 'react'\r\nimport SystemDropDown, { SystemBaseList } from './SystemDropDown'\r\nimport { SystemBase } from '../../library/common/SystemBase';\r\n\r\n\r\n\r\nexport default class SystemUserDropDown extends SystemBaseList{\r\n static defaultProps = {\r\n ...SystemBase.defaultProps, \r\n }\r\n constructor(props: any) { \r\n super(props)\r\n }\r\n\r\n handleOnChange = (event, name, value) => { \r\n this.handleChange(event, value, name);\r\n }\r\n render() {\r\n return (\r\n \r\n )\r\n }\r\n}\r\n\r\n","\r\nexport interface ICountryCodeAlpha2 {\r\n dialingCode: string\r\n alphaCode: string\r\n}\r\n\r\nexport const countryCodeAlpha2: ICountryCodeAlpha2[] = [\r\n { dialingCode: \"+91\", alphaCode: \"IN\" },\r\n { dialingCode: \"+376\", alphaCode: \"AD\" },\r\n { dialingCode: \"+971\", alphaCode: \"AE\" },\r\n { dialingCode: \"+93\", alphaCode: \"AF\" },\r\n { dialingCode: \"+1268\", alphaCode: \"AG\" },\r\n { dialingCode: \"+1264\", alphaCode: \"AI\" },\r\n { dialingCode: \"+355\", alphaCode: \"AL\" },\r\n { dialingCode: \"+374\", alphaCode: \"AM\" },\r\n { dialingCode: \"+244\", alphaCode: \"AO\" },\r\n { dialingCode: \"+54\", alphaCode: \"AR\" },\r\n { dialingCode: \"+1684\", alphaCode: \"AS\" },\r\n { dialingCode: \"+43\", alphaCode: \"AT\" },\r\n { dialingCode: \"+61\", alphaCode: \"AU\" },\r\n { dialingCode: \"+297\", alphaCode: \"AW\" },\r\n { dialingCode: \"+994\", alphaCode: \"AZ\" },\r\n { dialingCode: \"+387\", alphaCode: \"BA\" },\r\n { dialingCode: \"+1246\", alphaCode: \"BB\" },\r\n { dialingCode: \"+880\", alphaCode: \"BD\" },\r\n { dialingCode: \"+32\", alphaCode: \"BE\" },\r\n { dialingCode: \"+226\", alphaCode: \"BF\" },\r\n { dialingCode: \"+359\", alphaCode: \"BG\" },\r\n { dialingCode: \"+973\", alphaCode: \"BH\" },\r\n { dialingCode: \"+257\", alphaCode: \"BI\" },\r\n { dialingCode: \"+229\", alphaCode: \"BJ\" },\r\n { dialingCode: \"+1441\", alphaCode: \"BM\" },\r\n { dialingCode: \"+673\", alphaCode: \"BN\" },\r\n { dialingCode: \"+591\", alphaCode: \"BO\" },\r\n { dialingCode: \"+55\", alphaCode: \"BR\" },\r\n { dialingCode: \"+1242\", alphaCode: \"BS\" },\r\n { dialingCode: \"+975\", alphaCode: \"BT\" },\r\n { dialingCode: \"+267\", alphaCode: \"BW\" },\r\n { dialingCode: \"+375\", alphaCode: \"BY\" },\r\n { dialingCode: \"+501\", alphaCode: \"BZ\" },\r\n { dialingCode: \"+1\", alphaCode: \"CA\" },\r\n { dialingCode: \"+61\", alphaCode: \"CC\" },\r\n { dialingCode: \"+243\", alphaCode: \"CD\" },\r\n { dialingCode: \"+236\", alphaCode: \"CF\" },\r\n { dialingCode: \"+242\", alphaCode: \"CG\" },\r\n { dialingCode: \"+41\", alphaCode: \"CH\" },\r\n { dialingCode: \"+225\", alphaCode: \"CI\" },\r\n { dialingCode: \"+682\", alphaCode: \"CK\" },\r\n { dialingCode: \"+56\", alphaCode: \"CL\" },\r\n { dialingCode: \"+237\", alphaCode: \"CM\" },\r\n { dialingCode: \"+86\", alphaCode: \"CN\" },\r\n { dialingCode: \"+57\", alphaCode: \"CO\" },\r\n { dialingCode: \"+506\", alphaCode: \"CR\" },\r\n { dialingCode: \"+53\", alphaCode: \"CU\" },\r\n { dialingCode: \"+238\", alphaCode: \"CV\" },\r\n { dialingCode: \"+61\", alphaCode: \"CX\" },\r\n { dialingCode: \"+357\", alphaCode: \"CY\" },\r\n { dialingCode: \"+420\", alphaCode: \"CZ\" },\r\n { dialingCode: \"+49\", alphaCode: \"DE\" },\r\n { dialingCode: \"+253\", alphaCode: \"DJ\" },\r\n { dialingCode: \"+45\", alphaCode: \"DK\" },\r\n { dialingCode: \"+1767\", alphaCode: \"DM\" },\r\n { dialingCode: \"+1849\", alphaCode: \"DO\" },\r\n { dialingCode: \"+213\", alphaCode: \"DZ\" },\r\n { dialingCode: \"+593\", alphaCode: \"EC\" },\r\n { dialingCode: \"+372\", alphaCode: \"EE\" },\r\n { dialingCode: \"+20\", alphaCode: \"EG\" },\r\n { dialingCode: \"+291\", alphaCode: \"ER\" },\r\n { dialingCode: \"+34\", alphaCode: \"ES\" },\r\n { dialingCode: \"+251\", alphaCode: \"ET\" },\r\n { dialingCode: \"+358\", alphaCode: \"FI\" },\r\n { dialingCode: \"+679\", alphaCode: \"FJ\" },\r\n { dialingCode: \"+500\", alphaCode: \"FK\" },\r\n { dialingCode: \"+691\", alphaCode: \"FM\" },\r\n { dialingCode: \"+298\", alphaCode: \"FO\" },\r\n { dialingCode: \"+33\", alphaCode: \"FR\" },\r\n { dialingCode: \"+241\", alphaCode: \"GA\" },\r\n { dialingCode: \"+44\", alphaCode: \"GB\" },\r\n { dialingCode: \"+1473\", alphaCode: \"GD\" },\r\n { dialingCode: \"+995\", alphaCode: \"GE\" },\r\n { dialingCode: \"+594\", alphaCode: \"GF\" },\r\n { dialingCode: \"+233\", alphaCode: \"GH\" },\r\n { dialingCode: \"+350\", alphaCode: \"GI\" },\r\n { dialingCode: \"+299\", alphaCode: \"GL\" },\r\n { dialingCode: \"+220\", alphaCode: \"GM\" },\r\n { dialingCode: \"+224\", alphaCode: \"GN\" },\r\n { dialingCode: \"+590\", alphaCode: \"GP\" },\r\n { dialingCode: \"+240\", alphaCode: \"GQ\" },\r\n { dialingCode: \"+30\", alphaCode: \"GR\" },\r\n { dialingCode: \"+500\", alphaCode: \"GS\" },\r\n { dialingCode: \"+502\", alphaCode: \"GT\" },\r\n { dialingCode: \"+1671\", alphaCode: \"GU\" },\r\n { dialingCode: \"+245\", alphaCode: \"GW\" },\r\n { dialingCode: \"+595\", alphaCode: \"GY\" },\r\n { dialingCode: \"+852\", alphaCode: \"HK\" },\r\n { dialingCode: \"+504\", alphaCode: \"HN\" },\r\n { dialingCode: \"+385\", alphaCode: \"HR\" },\r\n { dialingCode: \"+509\", alphaCode: \"HT\" },\r\n { dialingCode: \"+36\", alphaCode: \"HU\" },\r\n { dialingCode: \"+62\", alphaCode: \"ID\" },\r\n { dialingCode: \"+353\", alphaCode: \"IE\" },\r\n { dialingCode: \"+972\", alphaCode: \"IL\" },\r\n { dialingCode: \"+246\", alphaCode: \"IO\" },\r\n { dialingCode: \"+964\", alphaCode: \"IQ\" },\r\n { dialingCode: \"+98\", alphaCode: \"IR\" },\r\n { dialingCode: \"+354\", alphaCode: \"IS\" },\r\n { dialingCode: \"+39\", alphaCode: \"IT\" },\r\n { dialingCode: \"+1876\", alphaCode: \"JM\" },\r\n { dialingCode: \"+962\", alphaCode: \"JO\" },\r\n { dialingCode: \"+81\", alphaCode: \"JP\" },\r\n { dialingCode: \"+254\", alphaCode: \"KE\" },\r\n { dialingCode: \"+996\", alphaCode: \"KG\" },\r\n { dialingCode: \"+855\", alphaCode: \"KH\" },\r\n { dialingCode: \"+686\", alphaCode: \"KI\" },\r\n { dialingCode: \"+269\", alphaCode: \"KM\" },\r\n { dialingCode: \"+1869\", alphaCode: \"KN\" },\r\n { dialingCode: \"+850\", alphaCode: \"KP\" },\r\n { dialingCode: \"+82\", alphaCode: \"KR\" },\r\n { dialingCode: \"+965\", alphaCode: \"KW\" },\r\n { dialingCode: \"+ 345\", alphaCode: \"KY\" },\r\n { dialingCode: \"+77\", alphaCode: \"KZ\" },\r\n { dialingCode: \"+856\", alphaCode: \"LA\" },\r\n { dialingCode: \"+961\", alphaCode: \"LB\" },\r\n { dialingCode: \"+1758\", alphaCode: \"LC\" },\r\n { dialingCode: \"+423\", alphaCode: \"LI\" },\r\n { dialingCode: \"+94\", alphaCode: \"LK\" },\r\n { dialingCode: \"+231\", alphaCode: \"LR\" },\r\n { dialingCode: \"+266\", alphaCode: \"LS\" },\r\n { dialingCode: \"+370\", alphaCode: \"LT\" },\r\n { dialingCode: \"+352\", alphaCode: \"LU\" },\r\n { dialingCode: \"+371\", alphaCode: \"LV\" },\r\n { dialingCode: \"+218\", alphaCode: \"LY\" },\r\n { dialingCode: \"+212\", alphaCode: \"MA\" },\r\n { dialingCode: \"+377\", alphaCode: \"MC\" },\r\n { dialingCode: \"+373\", alphaCode: \"MD\" },\r\n { dialingCode: \"+261\", alphaCode: \"MG\" },\r\n { dialingCode: \"+692\", alphaCode: \"MH\" },\r\n { dialingCode: \"+389\", alphaCode: \"MK\" },\r\n { dialingCode: \"+223\", alphaCode: \"ML\" },\r\n { dialingCode: \"+95\", alphaCode: \"MM\" },\r\n { dialingCode: \"+976\", alphaCode: \"MN\" },\r\n { dialingCode: \"+853\", alphaCode: \"MO\" },\r\n { dialingCode: \"+1670\", alphaCode: \"MP\" },\r\n { dialingCode: \"+596\", alphaCode: \"MQ\" },\r\n { dialingCode: \"+222\", alphaCode: \"MR\" },\r\n { dialingCode: \"+1664\", alphaCode: \"MS\" },\r\n { dialingCode: \"+356\", alphaCode: \"MT\" },\r\n { dialingCode: \"+230\", alphaCode: \"MU\" },\r\n { dialingCode: \"+960\", alphaCode: \"MV\" },\r\n { dialingCode: \"+265\", alphaCode: \"MW\" },\r\n { dialingCode: \"+52\", alphaCode: \"MX\" },\r\n { dialingCode: \"+60\", alphaCode: \"MY\" },\r\n { dialingCode: \"+258\", alphaCode: \"MZ\" },\r\n { dialingCode: \"+264\", alphaCode: \"NA\" },\r\n { dialingCode: \"+687\", alphaCode: \"NC\" },\r\n { dialingCode: \"+227\", alphaCode: \"NE\" },\r\n { dialingCode: \"+672\", alphaCode: \"NF\" },\r\n { dialingCode: \"+234\", alphaCode: \"NG\" },\r\n { dialingCode: \"+505\", alphaCode: \"NI\" },\r\n { dialingCode: \"+31\", alphaCode: \"NL\" },\r\n { dialingCode: \"+47\", alphaCode: \"NO\" },\r\n { dialingCode: \"+977\", alphaCode: \"NP\" },\r\n { dialingCode: \"+674\", alphaCode: \"NR\" },\r\n { dialingCode: \"+683\", alphaCode: \"NU\" },\r\n { dialingCode: \"+64\", alphaCode: \"NZ\" },\r\n { dialingCode: \"+968\", alphaCode: \"OM\" },\r\n { dialingCode: \"+507\", alphaCode: \"PA\" },\r\n { dialingCode: \"+51\", alphaCode: \"PE\" },\r\n { dialingCode: \"+689\", alphaCode: \"PF\" },\r\n { dialingCode: \"+675\", alphaCode: \"PG\" },\r\n { dialingCode: \"+63\", alphaCode: \"PH\" },\r\n { dialingCode: \"+92\", alphaCode: \"PK\" },\r\n { dialingCode: \"+48\", alphaCode: \"PL\" },\r\n { dialingCode: \"+508\", alphaCode: \"PM\" },\r\n { dialingCode: \"+872\", alphaCode: \"PN\" },\r\n { dialingCode: \"+1939\", alphaCode: \"PR\" },\r\n { dialingCode: \"+351\", alphaCode: \"PT\" },\r\n { dialingCode: \"+680\", alphaCode: \"PW\" },\r\n { dialingCode: \"+595\", alphaCode: \"PY\" },\r\n { dialingCode: \"+974\", alphaCode: \"QA\" },\r\n { dialingCode: \"+262\", alphaCode: \"RE\" },\r\n { dialingCode: \"+40\", alphaCode: \"RO\" },\r\n { dialingCode: \"+7\", alphaCode: \"RU\" },\r\n { dialingCode: \"+250\", alphaCode: \"RW\" },\r\n { dialingCode: \"+966\", alphaCode: \"SA\" },\r\n { dialingCode: \"+677\", alphaCode: \"SB\" },\r\n { dialingCode: \"+248\", alphaCode: \"SC\" },\r\n { dialingCode: \"+249\", alphaCode: \"SD\" },\r\n { dialingCode: \"+46\", alphaCode: \"SE\" },\r\n { dialingCode: \"+65\", alphaCode: \"SG\" },\r\n { dialingCode: \"+290\", alphaCode: \"SH\" },\r\n { dialingCode: \"+386\", alphaCode: \"SI\" },\r\n { dialingCode: \"+421\", alphaCode: \"SK\" },\r\n { dialingCode: \"+232\", alphaCode: \"SL\" },\r\n { dialingCode: \"+378\", alphaCode: \"SM\" },\r\n { dialingCode: \"+221\", alphaCode: \"SN\" },\r\n { dialingCode: \"+252\", alphaCode: \"SO\" },\r\n { dialingCode: \"+597\", alphaCode: \"SR\" },\r\n { dialingCode: \"+239\", alphaCode: \"ST\" },\r\n { dialingCode: \"+503\", alphaCode: \"SV\" },\r\n { dialingCode: \"+963\", alphaCode: \"SY\" },\r\n { dialingCode: \"+268\", alphaCode: \"SZ\" },\r\n { dialingCode: \"+1649\", alphaCode: \"TC\" },\r\n { dialingCode: \"+235\", alphaCode: \"TD\" },\r\n { dialingCode: \"+228\", alphaCode: \"TG\" },\r\n { dialingCode: \"+66\", alphaCode: \"TH\" },\r\n { dialingCode: \"+992\", alphaCode: \"TJ\" },\r\n { dialingCode: \"+690\", alphaCode: \"TK\" },\r\n { dialingCode: \"+670\", alphaCode: \"TL\" },\r\n { dialingCode: \"+993\", alphaCode: \"TM\" },\r\n { dialingCode: \"+216\", alphaCode: \"TN\" },\r\n { dialingCode: \"+676\", alphaCode: \"TO\" },\r\n { dialingCode: \"+90\", alphaCode: \"TR\" },\r\n { dialingCode: \"+1868\", alphaCode: \"TT\" },\r\n { dialingCode: \"+688\", alphaCode: \"TV\" },\r\n { dialingCode: \"+886\", alphaCode: \"TW\" },\r\n { dialingCode: \"+255\", alphaCode: \"TZ\" },\r\n { dialingCode: \"+380\", alphaCode: \"UA\" },\r\n { dialingCode: \"+256\", alphaCode: \"UG\" },\r\n { dialingCode: \"+1\", alphaCode: \"US\" },\r\n { dialingCode: \"+598\", alphaCode: \"UY\" },\r\n { dialingCode: \"+998\", alphaCode: \"UZ\" },\r\n { dialingCode: \"+1784\", alphaCode: \"VC\" },\r\n { dialingCode: \"+58\", alphaCode: \"VE\" },\r\n { dialingCode: \"+1284\", alphaCode: \"VG\" },\r\n { dialingCode: \"+1340\", alphaCode: \"VI\" },\r\n { dialingCode: \"+84\", alphaCode: \"VN\" },\r\n { dialingCode: \"+678\", alphaCode: \"VU\" },\r\n { dialingCode: \"+681\", alphaCode: \"WF\" },\r\n { dialingCode: \"+685\", alphaCode: \"WS\" },\r\n { dialingCode: \"+967\", alphaCode: \"YE\" },\r\n { dialingCode: \"+262\", alphaCode: \"YT\" },\r\n { dialingCode: \"+27\", alphaCode: \"ZA\" },\r\n { dialingCode: \"+260\", alphaCode: \"ZM\" },\r\n { dialingCode: \"+263\", alphaCode: \"ZW\" },\r\n { dialingCode: \"+971-3\", alphaCode: \"+971-3\" },\r\n { dialingCode: \"+971-6\", alphaCode: \"+971-6\" },\r\n { dialingCode: \"+971\", alphaCode: \"+971\" },\r\n]\r\n\r\nexport const getCodeFromAlpha = (alpha: string) => {\r\n let code = countryCodeAlpha2.find((item: ICountryCodeAlpha2) => item.alphaCode == alpha);\r\n return code ? code.dialingCode : \"\"\r\n}\r\n\r\nexport const getAlphaFromCode = (code: string) => {\r\n let dialingCode = countryCodeAlpha2.find((item: ICountryCodeAlpha2) => item.dialingCode == code);\r\n return dialingCode ? dialingCode.alphaCode : \"\"\r\n\r\n}\r\n","import * as React from 'react'\r\nimport { SystemBase } from '../../library/common/SystemBase';\r\nimport PhoneInput, { Country, formatPhoneNumber, formatPhoneNumberIntl, isValidPhoneNumber } from 'react-phone-number-input'\r\nimport 'react-phone-number-input/style.css'\r\nimport { getCodeFromAlpha } from '../../library/common/Country';\r\nimport HttpService from '../../service/httpService';\r\n\r\ninterface ISystemPhoneInput {\r\n DialCode: string,\r\n MaxLength: string,\r\n\r\n}\r\nexport interface ISystemPhoneInputState {\r\n DefaultCountry?: string,\r\n DialCode?(data: any): void\r\n}\r\n\r\nexport default class SystemPhoneInput extends SystemBase{\r\n static defaultProps = {\r\n ...SystemBase.defaultProps,\r\n }\r\n constructor(props: any) {\r\n super(props)\r\n }\r\n\r\n onCountryChange = async (country: Country) => {\r\n var dcode = getCodeFromAlpha(country as string);\r\n var max = 0;\r\n var data = await HttpService.get('ReferenceCountry/GetCountryDetailByCountryCode/' + country)\r\n if (dcode && !data.data) {\r\n max = 15;\r\n }\r\n else {\r\n max = data.data.MaxNumber\r\n\r\n }\r\n this.setState({ DialingCode: dcode, MaxLength: max });\r\n\r\n\r\n var PhoneNo = { \"DialCode\": dcode, \"MaxLength\": max };\r\n this.props.DialCode && this.props.DialCode(PhoneNo);\r\n }\r\n\r\n\r\n\r\n keyDownHandleChange = (event: any, name: string, value: any, text: string) => {\r\n \r\n\r\n let input = event.target.value;\r\n var ContactNumber = formatPhoneNumber(input);\r\n \r\n var regex = new RegExp(\"^[0-9]+$\");\r\n\r\n if (event.keyCode == 9 || event.keyCode == 17 || event.keyCode == 86 || event.keyCode == 67) return;\r\n\r\n // var key = String.fromCharCode(!event.charCode ? event.which : event.charCode);\r\n if (event.keyCode != 37 && event.keyCode != 38 && event.keyCode != 39 && event.keyCode != 40) {\r\n if (!regex.test(event.key)) {\r\n event.preventDefault();\r\n return false;\r\n } \r\n\r\n else if (this.props.value && this.props.value.replace(this.state.DialingCode, \"\").length + 1 > this.state.MaxLength) {\r\n event.preventDefault();\r\n return false;\r\n }\r\n }\r\n \r\n }\r\n\r\n componentDidMount() { \r\n\r\n if (this.props.DefaultCountry != undefined && this.props.value) {\r\n this.onCountryChange(this.props.DefaultCountry);\r\n }\r\n }\r\n\r\n\r\n handleOnChange = (value: any) => {\r\n\r\n this.handleChange(null, value, value);\r\n }\r\n onHandleBlur = (value: any) => {\r\n let { DialingCode, MaxLength } = this.state;\r\n var PhoneNo = { \"DialCode\": DialingCode, \"MaxLength\": MaxLength };\r\n this.props.DialCode && this.props.DialCode(PhoneNo);\r\n }\r\n\r\n render() {\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n/*import * as React from 'react'\r\nimport { SystemBase } from '../common/SystemBase';\r\nimport { Input } from '@progress/kendo-react-inputs';\r\nimport PhoneInput, { Country, formatPhoneNumber, formatPhoneNumberIntl, isValidPhoneNumber } from 'react-phone-number-input'\r\nimport 'react-phone-number-input/style.css'\r\n\r\ninterface ISystemPhoneInputProps {\r\n defaultCountry?: Country;\r\n limitMaxLength?: boolean\r\n international?: boolean\r\n onCountryChange?(country?: Country): void;\r\n}\r\n\r\n*//**\r\n * Creates an Input with Label \r\n * *//*\r\nexport default class SystemPhoneInput extends SystemBase\r\n{\r\n constructor(props: any) {\r\n super(props)\r\n }\r\n\r\n handleOnChange = (value) => { \r\n this.handleChange(null, value, value); \r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n}*/\r\n\r\n\r\n\r\n","import * as React from 'react'\r\nimport { SystemBreadCrumbBar } from './SystemBreadCrumbBar';\r\n\r\n\r\nexport class SystemDashboard extends React.Component {\r\n\r\n state = {\r\n items: [\"Admin\"]\r\n }\r\n\r\n constructor(props: any) {\r\n super(props);\r\n document.body.classList.add('sidebar-mini');\r\n document.body.classList.add('sidebar-collapse');\r\n document.body.classList.add('sidebar-expanded-on-hover');\r\n document.body.classList.add('sidebar-top-offset');\r\n }\r\n \r\n render() {\r\n return <>\r\n \r\n >;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport * as queryString from 'query-string'\r\nimport httpService from '../../service/httpService';\r\nexport interface IDashboardLoadData {\r\n hasKey?: boolean;\r\n keyEncrypted?: string\r\n data?: any;\r\n}\r\n\r\nexport interface IDashboardSearchSection {\r\n param: string\r\n url?: string\r\n preload?: boolean\r\n onLoad(data?: IDashboardLoadData): void\r\n}\r\n\r\ninterface IDashboardLayout {\r\n name?: string;\r\n URLParams?: IDashboardSearchSection[],\r\n loadingStart?(): void;\r\n loadingStop?(): void;\r\n}\r\n\r\n\r\n\r\ntype combinedProps = IDashboardLayout;\r\n\r\nexport class SystemDashboardLayout extends React.Component { \r\n\r\n constructor(props: any) {\r\n super(props);\r\n }\r\n state = {\r\n isLoading: false,\r\n node: null,\r\n }\r\n componentDidMount = () => {\r\n\r\n this.props.URLParams && this.props.URLParams.forEach((setting: IDashboardSearchSection) => this.getDetails(setting))\r\n }\r\n\r\n\r\n\r\n getDetails = async (setting: IDashboardSearchSection): Promise => {\r\n \r\n this.setState({ isLoading: true });\r\n var param = queryString.parse(location.search);\r\n var data: IDashboardLoadData = {};\r\n \r\n if (param && param[setting.param]) {\r\n data.hasKey = true;\r\n data.keyEncrypted = param[setting.param] as string;\r\n data.data = null;\r\n\r\n if (setting.preload == true) {\r\n try {\r\n const resp = await httpService.get(setting.url + data.keyEncrypted);\r\n data.data = resp.data\r\n this.setState({ isLoading: false });\r\n } catch (e) {\r\n this.setState({ isLoading: false });\r\n }\r\n }\r\n\r\n setting.onLoad && setting.onLoad(data)\r\n this.setState({ isLoading: false });\r\n return setting;\r\n }\r\n this.setState({ isLoading: false });\r\n return null;\r\n }\r\n\r\n\r\n render() {\r\n return (<>\r\n \r\n
\r\n \r\n {this.props.children}\r\n
\r\n \r\n
\r\n >\r\n )\r\n }\r\n}\r\n\r\n","import * as React from 'react';\r\nimport { ISystemDashboardPanel } from 'library/types/IDashBoardLayout';\r\nimport { ISystemDashBoardPanelState } from \"library/types/ISystemDashBoardPanelState\";\r\n\r\nimport RGL, { WidthProvider } from 'react-grid-layout';\r\n\r\nexport class SystemDashboardPanel extends React.PureComponent {\r\n\r\n static defaultProps = {\r\n canBeArchived: true,\r\n canBeDragged: true,\r\n canBeResizable: true,\r\n canBeMinimized: true,\r\n canBeHidden: true,\r\n static: false,\r\n \r\n //className: \"layout\",\r\n //rowHeight: 35,\r\n //onLayoutChange: function () { },\r\n //cols: 4// { lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 }, vfd v \r\n // initialLayout: generateLayout()\r\n };\r\n\r\n defaultState = {\r\n isArchived: false,\r\n isMinimized: false,\r\n isHidden: false\r\n };\r\n\r\n constructor(props: ISystemDashboardPanel) {\r\n super(props);\r\n }\r\n\r\n // button templates\r\n historyIcon = () => ;\r\n hideButton = () => ;\r\n collapseIcon = () => ;\r\n archiveIcon = () => ;\r\n refreshIcon = () => ;\r\n addIcon = () => Add ;\r\n\r\n // event handlers\r\n handleHideClick = () => {\r\n this.setState({ isHidden: !this.state.isHidden });\r\n };\r\n\r\n handleHistoryClick = () => {\r\n if (this.props.onHistoryClick)\r\n this.props.onHistoryClick();\r\n };\r\n\r\n handleCollapseClick = () => {\r\n this.setState({ isCollapsed: !this.state.isCollapsed });\r\n };\r\n\r\n handleArchiveClick = () => {\r\n if (this.props.onArchiveClick)\r\n this.props.onArchiveClick();\r\n };\r\n\r\n handleRefreshClick = () => {\r\n if (this.props.onRefreshclick)\r\n this.props.onRefreshclick();\r\n };\r\n\r\n handleAddClick = () => {\r\n if (this.props.onHandleClick)\r\n this.props.onHandleClick();\r\n };\r\n\r\n render() {\r\n return (\r\n {this.props.isSimple ? this.props.component :\r\n
\r\n
\r\n
\r\n
{this.props.label} \r\n \r\n
\r\n
\r\n
\r\n
\r\n {this.props.component}\r\n
\r\n
\r\n }\r\n
)\r\n //return \r\n //
\r\n // \r\n //
\r\n //
\r\n //
{this.props.label} \r\n // \r\n //
\r\n //
\r\n // {this.addIcon ? this.addIcon : null}\r\n // {this.refreshIcon ? this.refreshIcon : null}\r\n // {this.props.canBeHidden ? this.hideButton : null}\r\n // {this.props.canBeArchived ? this.archiveIcon : null}\r\n // {this.props.canBeMinimized ? this.collapseIcon : null}\r\n //
\r\n //
\r\n // {this.props.component}\r\n //
\r\n //
\r\n // \r\n //
;\r\n }\r\n}\r\n","import * as React from 'react'\r\nimport { Link } from 'react-router-dom';\r\n\r\ninterface ISystemLink {\r\n className?: string,\r\n to: any,\r\n children?: any,\r\n title?: string,\r\n handleClick?(): void,\r\n downloadLink?: boolean,\r\n}\r\n\r\nexport const SystemLink = (props: ISystemLink) => {\r\n return (\r\n props.to == null || props.to == undefined || props.to == '' || props.downloadLink ?\r\n {props.children} :\r\n {props.children}\r\n )\r\n}\r\n","import * as React from 'react';\r\nimport httpService from '../../service/httpService';\r\nimport { SystemNavToggle } from './SystemNavToggle';\r\n\r\nclass SystemHeader extends React.PureComponent{\r\n \r\n constructor(props: any) {\r\n super(props)\r\n }\r\n\r\n GetUserInfo = async () => {\r\n //var userName = authProvider.account.userName;\r\n //var name = authProvider.account.name;\r\n //var data = await MapAndGetUser(userName, name, 'GuestUser')\r\n\r\n //if (data) {\r\n // let status = getUserStatus();\r\n // this.setState({ userstatus: status })\r\n // this.props.SetSuperAdmin(this.state.SuperAdminMode);\r\n // this.props.setUserInformation(data);\r\n // return data;\r\n httpService.get(\"\");\r\n //}\r\n }\r\n\r\n\r\n render() {\r\n\r\n return (\r\n \r\n\r\n )\r\n }\r\n}\r\nexport default SystemHeader","import * as React from 'react';\r\nimport { hasAddPermission, hasReadPermission } from '../../service/userService';\r\nimport { SuperAdminInfo } from '../common/ShowAdminInfo';\r\nexport interface ISystemPanelProps {\r\n label?: string;\r\n //children?: React.ReactNode;\r\n showAdd?: boolean;\r\n onAdd?(): void;\r\n\r\n showRefresh?: boolean;\r\n onRefresh?(): void;\r\n\r\n showArchive?: boolean;\r\n onArchive?(): void;\r\n\r\n showCollapse?: boolean;\r\n onCollapse?(): void;\r\n\r\n showSearch?: boolean;\r\n onSearch?(): void\r\n\r\n showClear?: boolean;\r\n onClear?(): void;\r\n\r\n panelWidth?: number;\r\n panelHeight?: number;\r\n key?: string;\r\n panelColumn?: number;\r\n panelRow?: number;\r\n tilePanel?: any;\r\n draggable?: boolean;\r\n CollapseButtonText?: string;\r\n CollapseButtonOrIcon?: boolean\r\n toolbar?: any[]\r\n collapse?: boolean\r\n style?: React.CSSProperties;\r\n AddButtonDisable?: boolean\r\n securityObject?: string,\r\n showAddbuttonOnForm?: boolean;\r\n disabled?: boolean,\r\n}\r\n\r\nexport class SystemPanel extends React.PureComponent {\r\n static defaultProps = {\r\n showAdd: true,\r\n showRefresh: true,\r\n showReview: true,\r\n showArchive: true,\r\n showCollapse: true,\r\n panelWidth: 4,\r\n panelHeight: 1,\r\n panelColumn: 1,\r\n panelRow: 1,\r\n collapse: false,\r\n showAddbuttonOnForm: true\r\n }\r\n\r\n\r\n constructor(props: any) {\r\n super(props)\r\n this.state = {\r\n isCollapse: this.props.CollapseButtonText == 'Create Encounter' || this.props.collapse ? true : false,\r\n CollapsButtonOrIcone: false,\r\n }\r\n }\r\n\r\n onCollapse = () => {\r\n this.setState({ isCollapse: !this.state.isCollapse })\r\n }\r\n\r\n onRefresh = () => {\r\n\r\n if (this.props.onRefresh) this.props.onRefresh()\r\n }\r\n\r\n render() {\r\n var widthClass = \"\"\r\n switch (this.props.panelWidth) {\r\n case 1: widthClass = \"mb-3\"; break;\r\n case 2: widthClass = \"tiles-grid col-md-6 mb-3\"; break;\r\n case 4: widthClass = \"tiles-grid col-md-12 mb-3\"; break;\r\n }\r\n\r\n\r\n let canAdd = hasAddPermission(this.props.securityObject);\r\n let canRead = hasReadPermission(this.props.securityObject);\r\n return (\r\n <>\r\n \r\n {this.props.label ?\r\n (<>
\r\n
\r\n
\r\n \r\n
{\r\n event.stopPropagation()\r\n }}>\r\n {this.props.toolbar && this.props.toolbar.length > 0 && this.props.toolbar}\r\n {this.props.showSearch && Search }\r\n {this.props.showClear && Clear }\r\n {this.props.showArchive && Archive Data }\r\n {this.props.showAdd && this.props.showAddbuttonOnForm && Add }\r\n {this.props.showRefresh && Reload }\r\n {this.props.showCollapse && \r\n {this.props.CollapseButtonOrIcon == true ? {this.props.CollapseButtonText} \r\n :\r\n (this.state.isCollapse == false) ? : \r\n }\r\n \r\n }\r\n\r\n
\r\n
\r\n
\r\n {canRead ? this.props.children :
You dont have permission to read this object
}\r\n
\r\n\r\n >) :\r\n this.props.children}\r\n
\r\n >\r\n )\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SystemLink } from '../tools/SystemLink'\r\nimport { hasReadPermission } from '../../service/userService';\r\n\r\nexport interface ISystemTileProps {\r\n width?: number\r\n height?: number\r\n key?: string\r\n x?: number\r\n y?: number\r\n link: string,\r\n icon?: string,\r\n title: string,\r\n description: string,\r\n securityObject: string,\r\n downloadLink: boolean,\r\n}\r\n\r\nexport class SystemTile extends React.Component {\r\n\r\n state = {\r\n downloadLink: false,\r\n }\r\n\r\n componentDidMount() {\r\n if (this.isValidUrl(this.props.link)) {\r\n this.setState({ ...this.state, downloadLink: true })\r\n }\r\n } \r\n\r\n isValidUrl = (urlString: any) => {\r\n var a = document.createElement('a');\r\n a.href = urlString;\r\n //return (a.host && a.host != window.location.host);\r\n return (urlString.indexOf('http://') === 0 || urlString.indexOf('https://') === 0)\r\n }\r\n\r\n render() {\r\n var widthClass = \"col-xl-3 col-sm-6 mb-3\"\r\n switch (this.props.width) {\r\n case 1: widthClass = \"mb-3 col-md-12\"; break;\r\n case 2: widthClass = \"tile-grid col-md-6 mb-3\"; break;\r\n case 3: widthClass = \"tile-grid col-md-4 mb-3\"; break;\r\n case 4: widthClass = \"tile-grid col-md-3 mb-3\"; break;\r\n }\r\n return (<>\r\n {(hasReadPermission(this.props.securityObject) || this.props.securityObject == '') == true ?\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
{this.props.title} \r\n
{this.props.description}
\r\n
\r\n \r\n
\r\n : ''\r\n }\r\n >)\r\n }\r\n}","import * as React from 'react';\r\nimport { Dialog } from '@progress/kendo-react-dialogs';\r\n\r\nexport interface ISystemPopupProps {\r\n popupTitle?: string,\r\n popupWidth?: any,\r\n popupHeight?: any,\r\n minHeight?: string\r\n visible?: boolean\r\n showButton?: boolean\r\n showBanner?: boolean\r\n onClose?(): void\r\n children?: any\r\n banner?:any\r\n}\r\n\r\nexport default class SystemPopup extends React.Component {\r\n static defaultProps = {\r\n showBanner: false,\r\n visible: false,\r\n minHeight: \"300px\",\r\n minWidth: \"800px\",\r\n popupWidth: \"850px\",\r\n popupHeight: \"auto\"\r\n }\r\n\r\n constructor(props: ISystemPopupProps) {\r\n super(props)\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n {this.props.visible &&\r\n \r\n {this.props.showBanner && this.props.banner}\r\n { }\r\n {this.props.children}\r\n }\r\n
\r\n );\r\n }\r\n}","\r\nimport * as React from 'react'\r\nimport { SystemGrid, DateCell ,DateTimeCell, SystemPanel} from './../../../library'\r\nimport { GridColumn as Column } from '@progress/kendo-react-grid'\r\nimport { DownloadFile } from '../../../library/helpers/utils';\r\n\r\nexport default class ArchiveAuditGrid extends React.Component{\r\n\r\n DetailComponent = (props: any) => {\r\n\r\n const dataItem = props.dataItem;\r\n if (dataItem.AuditType != \"Delete\") return null;\r\n\r\n return (\r\n \r\n (\r\n {props.dataItem.Key} )\r\n } />\r\n \r\n )\r\n }\r\n\r\n downloadTemplate = async () => {\r\n }\r\n render() {\r\n return (\r\n\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n//export default AuditGrid","import * as React from 'react';\r\nimport { DropDown, Input, SystemPanel, SystemPopup } from '../../../library';\r\nimport ArchiveAuditGrid from './ArchiveAuditGrid';\r\n\r\ninterface IAuditFormProps {\r\n visible: boolean, table: string, schema: string,\r\n secondaryTable: string, secondarySchema: string,\r\n onClose(): void, primaryKeyEncrypted: string, secondaryKeyEncrypted: string\r\n}\r\ninterface IAuditFormState {\r\n ContextId: string,\r\n Schema: string,\r\n Table: string\r\n}\r\n//const schema = \"Reference\";\r\n//const table = \"CommunicationTemplate\";\r\n//const primaryKeyEncrypted = \"\";\r\nexport default class ArchiveForm extends React.Component {\r\n constructor(props: any) {\r\n super(props);\r\n this.state = { ContextId: '',Schema:'',Table:'' }\r\n \r\n }\r\n //onRowClick = (data: any) => {\r\n // if (data && data.ContextId) {\r\n // this.setState({ ContextId: data.ContextId });\r\n // }\r\n //}\r\n //handleChange = (e: any) => {\r\n // if(e.value)\r\n // this.setState({ Schema: e.value.Key });\r\n // this.setState({ Table: '' });\r\n //}\r\n //handleTableChange = (e: any) => {\r\n // if (e.value)\r\n // this.setState({ Table: e.value.Key });\r\n //}\r\n render() {\r\n return (<>\r\n \r\n < ArchiveAuditGrid Schema={this.props.schema}\r\n Table={this.props.table}\r\n primaryKey={this.props.primaryKeyEncrypted} />\r\n \r\n >)\r\n \r\n }\r\n}\r\n\r\n\r\n\r\n","import * as React from 'react';\r\nimport { SystemGrid, SystemPanel, SystemPopup } from '..';\r\nimport { debug } from 'console';\r\nimport { ISystemPanelProps } from '../dashboard/SystemPanel';\r\nimport { hasReadPermission } from '../../service/userService';\r\nimport ArchiveForm from './archive/ArchiveAuditForm';\r\n\r\nexport type ISystemGridFormState = {\r\n isFormVisible: boolean;\r\n PrimaryKeyEncrypted?: string;\r\n refreshCounter: number;\r\n data?: any\r\n showRefresh?: boolean\r\n isArchiveFormVisible: boolean\r\n};\r\n\r\ntype ITriggerAction = \"OPEN\" | \"CLOSE\" | \"REFRESH\" | \"NONE\"\r\n\r\nexport interface ISystemGridProps {\r\n\r\n label: string;\r\n form?: React.ComponentType;\r\n grid?: React.ComponentType; //typeof SystemGrid | JSX.Element | null; //\r\n data?: any;\r\n onRowClick?(event: any): boolean;\r\n onRowDoubleClick?(event: any): void;\r\n onRecordUpdated?(response: any): void;\r\n onAdd?(): void;\r\n onRefresh?(): void;\r\n onSave?(): void;\r\n onSaveAndClose?(): void;\r\n /** Shows the form with initial data and refreshes the grid on save, \r\n * raises onShowAddComplete after performing the operating. \r\n * if you pass on PrimaryKeyEncryptedEncrypted it will be in edit mode or else add mode */\r\n showAdd?: any;\r\n onShowAddComplete?(): void;\r\n showBanner?: boolean;\r\n triggerAction?: ITriggerAction\r\n onAddCaller?(caller?: any): void\r\n showBoth?: boolean\r\n alwaysInAdd?: boolean\r\n disabled?: boolean\r\n securityObject?: string\r\n refresh?: string;\r\n showRefresh?: boolean\r\n /** table to be reviewed */\r\n table?: string\r\n /** schema to be reviewed */\r\n schema?: string,\r\n primaryKeyEncrypted?: string | number\r\n}\r\n\r\nexport class SystemGridAndForm extends React.Component {\r\n\r\n showForm = () => this.setState({ isFormVisible: true });\r\n closeForm = () => this.setState({ isFormVisible: false });\r\n refresh = () => this.setState({ refreshCounter: this.state.refreshCounter + 1 });\r\n\r\n constructor(props: any) {\r\n super(props)\r\n this.state = {\r\n isFormVisible: false,\r\n refreshCounter: 0,\r\n showRefresh: this.props.showRefresh === false ? false : true,\r\n data: { ...props.data }\r\n }\r\n this.props.onAddCaller && this.props.onAddCaller(this.onAdd);\r\n }\r\n\r\n componentDidMount = () => {\r\n this.setState({ data: { ...this.props.data } });\r\n }\r\n\r\n componentDidUpdate = (prevProps: ISystemGridProps) => {\r\n if (prevProps.data != this.props.data)\r\n this.setState({ data: { ...this.props.data } });\r\n\r\n if (prevProps.showAdd != this.props.showAdd) {\r\n this.onAdd(this.props.showAdd);\r\n }\r\n\r\n if (prevProps.refresh != this.props.refresh)\r\n this.refresh();\r\n\r\n if (prevProps.triggerAction != this.props.triggerAction)\r\n this.triggerAction();\r\n }\r\n\r\n triggerAction = () => {\r\n switch (this.props.triggerAction) {\r\n case \"OPEN\":\r\n this.onAdd(); break;\r\n case \"CLOSE\":\r\n this.closeForm(); break;\r\n case \"REFRESH\":\r\n this.refresh(); break;\r\n }\r\n }\r\n\r\n onRowDoubleClick = (event: any) => {\r\n if (this.props.onRowDoubleClick) this.props.onRowDoubleClick(event)\r\n }\r\n\r\n onRowClick = (event: any) => {\r\n if (this.props.onRowClick) {\r\n if (this.props.onRowClick(event))\r\n this.setState({ data: event.dataItem }, () => this.showForm())\r\n }\r\n else this.setState({ data: event.dataItem }, () => this.showForm())\r\n };\r\n\r\n onAdd = (initialData: any = undefined) => {\r\n if (this.props.onAdd) this.props.onAdd();\r\n else this.setState({ data: this.props.data }, () => this.showForm());\r\n };\r\n\r\n onRecordUpdated = (response: any) => {\r\n if (this.props.onRecordUpdated) this.props.onRecordUpdated(response);\r\n if (this.props.showAdd && this.props.onShowAddComplete) this.props.onShowAddComplete()\r\n this.closeForm();\r\n this.refresh();\r\n };\r\n\r\n onSaveAndClose(response: any) {\r\n if (this.props.onSaveAndClose) this.props.onSaveAndClose()\r\n else {\r\n this.closeForm();\r\n }\r\n }\r\n\r\n handleReviewClose = () => this.setState({ isArchiveFormVisible: false })\r\n handleReviewButton = () => this.setState({ isArchiveFormVisible: true })\r\n\r\n render = (): JSX.Element => {\r\n let Form = this.props.form || null;\r\n let Grid = this.props.grid || null;\r\n let showGrid = hasReadPermission(this.props.securityObject);\r\n let showAdd = this.props.showAdd != undefined ? this.props.showAdd : true\r\n return <>\r\n \r\n {\r\n Form && !this.props.showFormAbove && this.state.isFormVisible &&\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 Form && this.props.showFormAbove &&\r\n <>\r\n \r\n \r\n >\r\n }\r\n\r\n {showGrid ? \r\n : You dont have permission to read this object
}\r\n \r\n \r\n >;\r\n }\r\n}\r\n\r\nexport abstract class SystemGridForm extends React.Component
{\r\n state = {\r\n isFormVisible: false,\r\n refreshCounter: 0,\r\n PrimaryKeyEncrypted: ''\r\n };\r\n\r\n constructor(props: P) {\r\n super(props);\r\n }\r\n\r\n componentDidMount() {\r\n }\r\n\r\n showForm = () => this.setState({ isFormVisible: true });\r\n closeForm = () => this.setState({ isFormVisible: false });\r\n refresh = () => this.setState({ refreshCounter: this.state.refreshCounter + 1 });\r\n setPrimaryKeyEncrypted = (key: string) => this.setState({ PrimaryKeyEncrypted: key });\r\n\r\n\r\n onListRowClick = (data: any) => {\r\n this.setPrimaryKeyEncrypted(data.PrimaryKeyEncrypted);\r\n this.showForm();\r\n };\r\n\r\n onAdd = () => {\r\n this.setPrimaryKeyEncrypted('');\r\n this.showForm();\r\n };\r\n\r\n onUpdate = (response: any) => {\r\n this.closeForm();\r\n this.refresh();\r\n };\r\n\r\n onClose = () => {\r\n this.closeForm();\r\n }\r\n\r\n onSaveAndClose(response: any) {\r\n\r\n }\r\n\r\n abstract render(): JSX.Element;\r\n}\r\n\r\n","export enum EditModes {\r\n Read = 0,\r\n Create = 1,\r\n Update = 2,\r\n Delete = 3,\r\n}\r\n","import * as React from 'react';\r\nimport { Grid, GridColumn as Column, GridColumnProps, GridProps, GridRowProps, GridRowClickEvent, GridCellProps, GridKeyDownEvent, GridFilterChangeEvent } from \"@progress/kendo-react-grid\";\r\nimport { ISystemGrid } from 'library/types/ISystemGrid';\r\nimport { toDataSourceRequestString, translateDataSourceResultGroups, CompositeFilterDescriptor } from '@progress/kendo-data-query';\r\nimport { TextNumericColumnMenuFilter } from '../../library'\r\nimport httpService from './../../service/httpService'\r\nimport * as ReactDOM from 'react-dom';\r\nimport LoadingPanel from '../common/SystemLoadingPanel';\r\nimport { ISystemPanelProps } from '../types/ISystemPanelProps';\r\nimport { SystemPanel } from '../dashboard/SystemPanel';\r\nimport { TreeList } from '@progress/kendo-react-treelist';\r\nimport { MultiColumnComboBox } from '@progress/kendo-react-dropdowns';\r\n\r\nconst SystemGrid = withState(Grid);\r\nexport const SystemMuliColumnDropDown = withState(MultiColumnComboBox);\r\nexport const SystemTreeListGrid = withState(TreeList);\r\nexport default SystemGrid;\r\n\r\nexport interface IGrid {\r\n PatientKeyEncrypted?: string,\r\n onRowClick?(data: any): void\r\n onRowDoubleClick?(data: any): void\r\n refresh?: number\r\n data?: any\r\n}\r\n\r\nexport interface IGridColumn {\r\n label?: string,\r\n field?: string,\r\n width?: number,\r\n format?: string,\r\n filter?: string,\r\n customRenderer?(): void\r\n editor?: string,\r\n visible?: boolean,\r\n ColumnMenu?: string,\r\n}\r\n\r\nexport enum EnumEditor {\r\n \"numeric\", \"boolean\", \"date\", \"text\"\r\n}\r\n\r\ntype ISystemGridProps = ISystemGrid & GridProps & ISystemPanelProps;\r\n\r\nconst DATA_ITEM_KEY: string = \"PrimaryKeyEncrypted\";\r\nconst SELECTED_FIELD: boolean = true;\r\n\r\nexport function withState(WrappedGrid: any) {\r\n return class SystemGrid extends React.PureComponent\r\n {\r\n static defaultProps = {\r\n filterable: false,\r\n pageable: true\r\n }\r\n\r\n constructor(props: any) {\r\n super(props);\r\n this.state = {\r\n gridData: { data: [], total: 0 },\r\n dataState: {\r\n skip: 0,\r\n take: this.props.pageSize || 25,\r\n filter: {\r\n logic: \"and\",\r\n filters: []\r\n } as CompositeFilterDescriptor,\r\n group: this.props.group || [],\r\n sort: this.props.sort || []\r\n },\r\n isLoading: false,\r\n node: null,\r\n SelectedRow: true,\r\n AllowRowClick: true\r\n }\r\n }\r\n componentDidMount() {\r\n this.ensureDataFetched(false)\r\n this.setState({ node: ReactDOM.findDOMNode(this) })\r\n }\r\n\r\n componentDidUpdate(prevProps: any) {\r\n if (\r\n prevProps.dataSource != this.props.dataSource ||\r\n JSON.stringify(prevProps.filters) != JSON.stringify(this.props.filters) ||\r\n prevProps.refresh != this.props.refresh\r\n ) {\r\n this.ensureDataFetched(false)\r\n }\r\n }\r\n\r\n ensureDataFetched = (isPageChange: boolean) => {\r\n const { dataState } = this.state\r\n let updatedFilters = {}\r\n if (isPageChange && dataState.filter && dataState.filter.filters && dataState.filter.filters.length > 0) {\r\n updatedFilters = {\r\n ...dataState.filter\r\n }\r\n } else {\r\n updatedFilters = this.props.filter ? this.props.filter : {\r\n logic: \"and\",\r\n filters: this.props.filters ? [...this.props.filters] : []\r\n }\r\n }\r\n let updatedState = {\r\n dataState: {\r\n ...this.state.dataState,\r\n skip: this.state.dataState.skip,\r\n filter: { ...updatedFilters },\r\n group: this.props.group || [],\r\n sort: this.props.sort || [],\r\n }\r\n }\r\n\r\n this.setState({ ...updatedState }, () => this.fetchData(this.state.dataState));\r\n }\r\n\r\n pageChange = (event: any) => {\r\n this.setState({\r\n dataState: {\r\n ...this.state.dataState,\r\n skip: event.page.skip,\r\n take: event.page.take\r\n }\r\n }, () => this.ensureDataFetched(true));\r\n }\r\n\r\n handleDataStateChange = (changeEvent: any) => {\r\n this.setState({ dataState: changeEvent.dataState });\r\n this.fetchData(changeEvent.dataState);\r\n }\r\n\r\n dataStateChange = (e: any) => {\r\n this.setState({\r\n ...this.state,\r\n dataState: e.dataState\r\n });\r\n }\r\n\r\n dataRecieved = (gridData: any) => {\r\n this.setState({\r\n ...this.state,\r\n gridData: gridData //gridData\r\n });\r\n }\r\n\r\n fetchData(dataState: any) {\r\n if (!this.props.dataSource) {\r\n\r\n this.setState({\r\n gridData: { data: [], total: 0 },\r\n dataState: { skip: 0, take: this.props.pageSize || 10, filter: {} }\r\n });\r\n return\r\n }\r\n\r\n const hasGroups = dataState.group && dataState.group.length;\r\n const queryStr = `${toDataSourceRequestString(dataState)}`; // Serialize the state.\r\n this.setState({ isLoading: true });\r\n\r\n httpService.get(`${this.props.dataSource}?${queryStr}`)\r\n .then((response: any) => {\r\n var data = JSON.parse(JSON.stringify(response.data))\r\n if (data.Data && data.Data.length > 0) {\r\n this.setState({\r\n isLoading: false,\r\n gridData: {\r\n data: hasGroups ? translateDataSourceResultGroups(data.Data) : data.Data,\r\n total: response.data.Total\r\n },\r\n dataState: this.state.dataState\r\n });\r\n } else {\r\n this.setState({\r\n isLoading: false,\r\n gridData: {\r\n data: [],\r\n total: 0\r\n },\r\n dataState: this.state.dataState\r\n });\r\n }\r\n if (this.props.onPageChanged) this.props.onPageChanged(event)\r\n\r\n }).catch((error) => {\r\n this.setState({ isLoading: false });\r\n });\r\n }\r\n\r\n sortChange = (event: any) => {\r\n this.setState({\r\n dataState: { ...this.state.dataState, sort: event.sort }\r\n }, () => this.ensureDataFetched(true));\r\n }\r\n\r\n\r\n getColumns = () => {\r\n var columns: any[] = [];\r\n\r\n if (this.props.children) {\r\n if (Array.isArray(this.props.children))\r\n columns = this.props.children.map((item: any, index: number) => this.getColumn(index, item.props));\r\n else columns = [this.getColumn(1, this.props.children.props)]\r\n }\r\n\r\n if (this.props.columns)\r\n columns = [...columns, this.props.columns.map((item, index: number) => this.getColumn(index, item))]\r\n return columns;\r\n }\r\n\r\n getColumn = (index: number, props: GridColumnProps) => {\r\n var menuFilter = TextNumericColumnMenuFilter;\r\n return \r\n }\r\n\r\n expandChange = (event: any) => {\r\n if (!event.dataItem || !event.target.props.expandField) return;\r\n event.dataItem[event.target.props.expandField] = event.value;\r\n\r\n this.setState({\r\n dataState: { ...this.state.dataState }\r\n });\r\n //, () => this.ensureDataFetched(true));\r\n\r\n }\r\n\r\n\r\n rowRender = (\r\n\r\n trElement: React.ReactElement,\r\n props: GridRowProps\r\n ) => {\r\n\r\n let selected = true;\r\n const green = { backgroundColor: \"rgb(64,192,173,1)\" };\r\n const White = { backgroundColor: \"rgb(255,255,255)\" };\r\n const trProps: any = { className: \"orderset-highlightrow\" };\r\n //const trProps: any = { style: selected ? green : White, className: \"orderset-highlightrow\" };\r\n\r\n if (this.props.rowSelector && this.props.rowSelector(props)) {\r\n return React.cloneElement(trElement, trProps, trElement.props.children);\r\n }\r\n\r\n else if (this.props.highlightSelectedRow && props.dataItem[this.props.dataItemKey || \"PrimaryKeyEncrypted\"] && props.dataItem[this.props.dataItemKey || \"PrimaryKeyEncrypted\"] == this.state.dataItemKey) {\r\n return React.cloneElement(trElement, trProps, trElement.props.children);\r\n }\r\n return trElement;\r\n };\r\n\r\n onRowClick = (event: GridRowClickEvent) => {\r\n event.syntheticEvent.stopPropagation();\r\n event.nativeEvent.stopPropagation();\r\n event.nativeEvent.stopImmediatePropagation();\r\n\r\n if (this.props.dataItemKey) {\r\n this.setState({ ...this.state, dataItemKey: event.dataItem[this.props.dataItemKey] })\r\n } else if (event.dataItem[\"PrimaryKeyEncrypted\"]) {\r\n this.setState({ ...this.state, dataItemKey: event.dataItem[\"PrimaryKeyEncrypted\"] })\r\n }\r\n this.props.onRowClick && this.props.onRowClick(event);\r\n }\r\n\r\n cellRender = (defaultRendering: React.ReactElement | null, props: GridCellProps) =>\r\n defaultRendering &&\r\n \r\n {defaultRendering.props.children} ;\r\n\r\n\r\n onKeyDown = (event: GridKeyDownEvent): void => {\r\n if (event.nativeEvent.keyCode == 13) {\r\n event.syntheticEvent.preventDefault();\r\n event.syntheticEvent.stopPropagation();\r\n event.nativeEvent.preventDefault();\r\n event.nativeEvent.stopPropagation();\r\n event.nativeEvent.stopImmediatePropagation();\r\n var item = event.nativeEvent.currentTarget.activeElement;\r\n var container = item.closest(\".k-filter-menu-container\");\r\n var filterbutton = container.getElementsByClassName('k-button k-primary')[0];\r\n // filterbutton.click();\r\n }\r\n }\r\n\r\n onFilterChange = (event: GridFilterChangeEvent) => {\r\n }\r\n\r\n render() {\r\n let GridComponenet = <>\r\n {/**/}\r\n this.props.onExpandChange ? this.props.onExpandChange(event) : this.expandChange(event)}\r\n onRowClick={(event: any) => !this.state.isLoading && this.onRowClick(event)}\r\n onRowDoubleClick={(event: any) => !this.state.isLoading && this.props.onRowDoubleClick && this.props.onRowDoubleClick(event)}\r\n //pageable={this.props.pageable}\r\n filter={this.state.dataState.filter}\r\n group={this.state.dataState.group}\r\n data={this.state.gridData}\r\n skip={this.state.dataState.skip}\r\n pageSize={this.state.dataState.take}\r\n onDataStateChange={this.handleDataStateChange}\r\n onPageChange={this.pageChange}\r\n children={this.getColumns()}\r\n rowRender={this.rowRender}\r\n cellRender={this.cellRender}\r\n // onKeyDown={this.onKeyDown}\r\n />\r\n {/* */}\r\n {this.state.isLoading && this.state.node && }\r\n >\r\n\r\n return (this.props.showPanel ? {GridComponenet} : GridComponenet);\r\n }\r\n }\r\n}\r\n\r\n//resizable = { true}\r\n//reorderable = { true}\r\n","import * as React from 'react'\r\nimport { GridCellProps } from '@progress/kendo-react-grid'\r\nimport { formatDate } from '@telerik/kendo-intl';\r\nimport SystemSwitch from '../inputs/SystemSwitch';\r\nimport { UTCToLocalDateTime, UTCToLocalDate } from './../helpers/utils'\r\nimport httpService from '../../service/httpService';\r\n\r\nconst KendoGridCustomCell = (props: any) => {\r\n const value = props.dataItem[props.field as string];\r\n return ({formatDate(new Date(value), setting.dateFormat)} );\r\n}\r\n\r\nexport class DateCell extends React.Component {\r\n //isValidDate = (d : any) => {\r\n //return d instanceof Date && !isNaN(d);\r\n //}\r\n\r\n isValidDate = (dateObject: any) => new Date(dateObject).toString() !== 'Invalid Date';\r\n\r\n render() {\r\n let value = this.props.dataItem[this.props.field as string];\r\n let text = '';\r\n if (value != null && value != undefined && this.isValidDate(value)) text = formatDate(new Date(value), setting.dateFormat)\r\n\r\n return ({text} );\r\n }\r\n}\r\n\r\n\r\nexport class PasswordCell extends React.Component {\r\n render() {\r\n let value = this.props.dataItem[this.props.field as string];\r\n let text = '';\r\n var lengthvalue = value.length;\r\n\r\n for (var i = 0; i < value.length; i++) {\r\n text = text + '*';\r\n }\r\n //if (value != null && value != undefined && this.isValidDate(value)) text = formatDate(new Date(value), setting.dateFormat)\r\n\r\n return ({text} );\r\n }\r\n}\r\n\r\nexport class DateTimeCell extends React.Component {\r\n render() {\r\n const value = this.props.dataItem[this.props.field as string];\r\n if (value != \"\" && value != undefined) {\r\n return ({UTCToLocalDateTime(value)} );\r\n }\r\n else {\r\n return ({\"\"} );\r\n\r\n }\r\n }\r\n}\r\nexport class DateCellOnly extends React.Component {\r\n render() {\r\n const value = this.props.dataItem[this.props.field as string];\r\n if (value != \"\" && value != undefined) {\r\n return ({UTCToLocalDate(value)} );\r\n }\r\n else {\r\n return ({\"\"} );\r\n\r\n }\r\n }\r\n}\r\n\r\ninterface ISwitchCellProps {\r\n url?: string\r\n PrimaryKey?: string\r\n FieldName?: string\r\n onValueChanged?(response: any): void\r\n}\r\nlet _this: object;\r\nexport class SwitchCell extends React.Component {\r\n\r\n constructor(props: any) {\r\n super(props);\r\n this.onChange = this.onChange.bind(this);\r\n _this = this;\r\n }\r\n onChange = (event: any) => {\r\n if (this.props.url) {\r\n let value = event.target.value;\r\n let data = {\r\n PrimaryKeyEncrypted: this.props.PrimaryKey,\r\n FieldName: this.props.FieldName,\r\n FieldValue: value\r\n };\r\n var response = httpService.post(this.props.url, data);\r\n this.props.onValueChanged && this.props.onValueChanged(response)\r\n }\r\n }\r\n\r\n render() {\r\n const value = this.props.dataItem[this.props.field as string];\r\n return ( );\r\n }\r\n}\r\n\r\n\r\ninterface IButtonCellProps {\r\n url?: string\r\n trueCaption?: string\r\n falseCaption?: string\r\n captions?: { value: any, text: string }[]\r\n PrimaryKey?: string\r\n FieldName?: string\r\n onValueChanged?(response: any): void\r\n}\r\nexport class ButtonCell extends React.Component {\r\n onClick = async (event: any) => {\r\n if (this.props.url) {\r\n this.setState({ value: !this.state.value }, async () => {\r\n var response = await httpService.post(this.props.url, { PrimaryKey: this.props.PrimaryKey, FieldName: this.props.FieldName, FieldValue: this.state.value });\r\n this.props.onValueChanged && this.props.onValueChanged(response)\r\n })\r\n }\r\n }\r\n\r\n state = {\r\n value: this.props.dataItem[this.props.field as string]\r\n };\r\n\r\n constructor(props: any) {\r\n super(props)\r\n }\r\n\r\n getCaption = () => {\r\n const value = this.props.dataItem[this.props.field as string];\r\n if (this.props.trueCaption && this.state.value) return this.props.trueCaption;\r\n if (this.props.falseCaption && !this.state.value) return this.props.falseCaption;\r\n\r\n if (this.props.captions) {\r\n let caption = this.props.captions.find((item) => item.value == value);\r\n if (caption) return caption.text;\r\n }\r\n\r\n\r\n return '';\r\n }\r\n\r\n render() {\r\n return ({this.getCaption()} );\r\n }\r\n}\r\nexport class CheckCell extends React.Component {\r\n render() {\r\n const value = this.props.dataItem[this.props.field as string];\r\n return ( {value ? : null} )\r\n }\r\n}\r\n\r\nexport class CheckCrossCell extends React.Component {\r\n\r\n render() {\r\n const value = this.props.dataItem[this.props.field as string];\r\n return ( {value == 1 ? : } )\r\n }\r\n}\r\n\r\nexport class UserStatusCell extends React.Component {\r\n\r\n render() {\r\n const value = this.props.dataItem[this.props.field as string];\r\n return ( {value == 'Available' ? : } )\r\n }\r\n}\r\n\r\nexport class StatusCell extends React.Component {\r\n\r\n render() {\r\n const value = this.props.dataItem[this.props.field as string];\r\n switch (value) {\r\n case 'Active': return (Active );\r\n case 'InActive': return (Inactive );\r\n case 1: return (Active );\r\n case 0: return (Inactive );\r\n default: return (Inactive );\r\n }\r\n }\r\n}\r\n\r\nexport class StatusCellCheck extends React.Component {\r\n\r\n render() {\r\n const value = this.props.dataItem[this.props.field as string];\r\n switch (value) {\r\n case true: return (✓ );\r\n case false: return (✓ );\r\n default: return (Inactive );\r\n }\r\n }\r\n}\r\n\r\n\r\nexport class RejectedCell extends React.Component {\r\n render() {\r\n const value = this.props.dataItem[this.props.field as string];\r\n switch (value) {\r\n case 'Active': return ( );\r\n case 'InActive': return (Rejected );\r\n case 1: return ( );\r\n case 0: return (Rejected );\r\n default: return (Rejected );\r\n }\r\n }\r\n}\r\n\r\n\r\nexport class CheckboxCell extends React.Component {\r\n render() {\r\n const value = this.props.dataItem[\"PatientId\"];\r\n return ( );\r\n }\r\n}\r\n\r\nexport class EncounterStatusCell extends React.Component {\r\n\r\n render() {\r\n const value = this.props.dataItem[this.props.field as string];\r\n switch (value) {\r\n case 'Pending': return (Pending );\r\n case 'Closed': return (Closed );\r\n case 'Open': return (Open );\r\n case 'Deleted': return (Deleted );\r\n default: return (Inactive );\r\n }\r\n }\r\n}\r\n\r\n\r\n\r\nexport default { DateCell, SwitchCell, StatusCell, CheckboxCell, RejectedCell, StatusCellCheck, EncounterStatusCell }","import * as React from 'react';\r\nimport {\r\n GridColumnMenuSort,\r\n GridColumnMenuFilter,\r\n GridColumnMenuCheckboxFilter,\r\n GridColumnMenuProps,\r\n GridColumnMenuCheckboxFilterProps,\r\n GridColumnMenuItemGroup,\r\n GridColumnMenuItem,\r\n GridColumnMenuItemContent\r\n} from '@progress/kendo-react-grid';\r\nimport { GridFilterOperators } from '@progress/kendo-react-grid/dist/npm/interfaces/GridFilterOperators';\r\nimport { GridColumnMenuColumnProps } from '@progress/kendo-react-grid/dist/npm/interfaces/GridColumnMenuColumnProps';\r\nimport { CompositeFilterDescriptor } from '@progress/kendo-data-query';\r\nimport { ComponentType } from 'react';\r\nimport { NumericTextBox } from '@progress/kendo-react-inputs';\r\nimport { DropDown, LookUpDropDown } from '..';\r\nimport { FilterDescriptor } from '@progress/kendo-react-dropdowns/dist/npm/common/filterDescriptor';\r\nimport SystemSwitch from '../inputs/SystemSwitch';\r\nimport { IDataSourceType } from '../types/IDynamicList';\r\nimport { GridColumnMenuFilterBaseProps } from '@progress/kendo-react-grid/dist/npm/interfaces/GridColumnMenuFilterBaseProps';\r\nimport { GridColumnMenuSortBaseProps } from '@progress/kendo-react-grid/dist/npm/interfaces/GridColumnMenuSortBaseProps';\r\n\r\nexport class CheckBoxMenu extends React.Component {\r\n gcms: GridColumnMenuColumnProps = { field: \"\", filter: \"text\" };\r\n constructor(props: any) {\r\n super(props)\r\n }\r\n\r\n render() {\r\n\r\n return (\r\n \r\n null} />\r\n
\r\n );\r\n }\r\n}\r\n\r\n\r\nexport interface SystemGridColumnFilterMenuProps extends GridColumnMenuProps {\r\n type: \"DATE\" | \"TEXT\" | \"NUMBER\" | \"BOOLEAN\" | \"LOOKUP\" | \"DROPDOWN\" | \"RANGE\" | \"TABLE\",\r\n lookupName?: string,\r\n dataSource?: string,\r\n dataSourceType?: IDataSourceType,\r\n idField?: string,\r\n displayField?: string\r\n min?: number,\r\n max?: number\r\n}\r\n\r\nexport class SystemGridColumnFilterMenu extends React.Component {\r\n state = {\r\n value1: null,\r\n value2: null,\r\n operator: \"\",\r\n join: \"\" // AND or OR\r\n }\r\n\r\n componentDidMount = () => {\r\n if (this.props.filter && this.props.filter.filters && this.props.filter.filters.length > 0 && this.props.onFilterChange) {\r\n var i = this.props.filter.filters.findIndex((item: any) => item.field == this.props.column.field)\r\n if (i != -1) {\r\n this.setState({ value1: this.props.filter.filters[i].value })\r\n }\r\n }\r\n }\r\n\r\n onReset = (event: any) => {\r\n if (this.props.filter && this.props.onFilterChange) {\r\n var i = this.props.filter.filters.findIndex((item: any) => item.field == this.props.column.field)\r\n if (i != -1) {\r\n this.props.filter.filters.splice(i, 1);\r\n this.props.onFilterChange(this.props.filter, event);\r\n }\r\n }\r\n if (this.props.onCloseMenu) {\r\n this.props.onCloseMenu();\r\n }\r\n }\r\n\r\n onSubmit = (event: any) => {\r\n\r\n if (this.props.filter) {\r\n if ((this.state.value1 === undefined || this.state.value1 === null || this.state.value1 === '') && (this.state.value1 != false)) {\r\n\r\n this.onReset(event);\r\n return;\r\n }\r\n var filter = (this.props.filter.filters || []).find(item => item.field === this.props.column.field)\r\n if (filter) {\r\n filter.value = this.state.value1\r\n } else {\r\n this.props.filter.filters.push({ field: this.props.column.field, operator: \"eq\", value: this.state.value1 })\r\n }\r\n this.props.onFilterChange && this.props.onFilterChange(this.props.filter, event);\r\n }\r\n else {\r\n this.props.onFilterChange && this.props.onFilterChange({ logic: \"and\", filters: [{ field: this.props.column.field, operator: \"eq\", value: this.state.value1 }] }, event);\r\n }\r\n\r\n\r\n if (this.props.onCloseMenu) {\r\n this.props.onCloseMenu();\r\n }\r\n }\r\n\r\n onChange = (event?: any, name?: any, value?: any, text?: any) => {\r\n if (this.props.type == \"BOOLEAN\")\r\n this.setState({ [name]: value ? true : false })\r\n else\r\n this.setState({ [name]: value })\r\n }\r\n\r\n SetupControls = () => {\r\n switch (this.props.type) {\r\n case \"DATE\": break;\r\n\r\n case \"TEXT\": break;\r\n\r\n case \"NUMBER\": break;\r\n\r\n case \"BOOLEAN\":\r\n return \r\n\r\n case \"LOOKUP\":\r\n return \r\n\r\n case \"TABLE\":\r\n return \r\n\r\n case \"DROPDOWN\": break;\r\n\r\n case \"RANGE\":\r\n return (\r\n \r\n Min:\r\n \r\n \r\n \r\n Max:\r\n \r\n \r\n \r\n
\r\n )\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n
\r\n {this.SetupControls()}\r\n
\r\n
\r\n Clear \r\n Filter \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport class TextNumericColumnMenuFilter extends React.Component {\r\n\r\n\r\n render() {\r\n\r\n return (\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport class NumberColumnMenuFilter extends React.Component {\r\n\r\n\r\n render() {\r\n return (\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default class RangeFilterCell extends React.Component {\r\n minTextBox: any;\r\n maxTextBox: any;\r\n\r\n inRange = (current: number, { min, max }) => (min === null || current >= min) && (max === null || current <= max);\r\n\r\n onChange = (event: any) => {\r\n this.props.onChange({\r\n value: { min: this.minTextBox.value, max: this.maxTextBox.value },\r\n operator: this.inRange,\r\n syntheticEvent: event.syntheticEvent\r\n });\r\n }\r\n\r\n onClearButtonClick = (event: any) => {\r\n event.preventDefault();\r\n this.props.onChange({\r\n value: null,\r\n operator: '',\r\n syntheticEvent: event\r\n });\r\n }\r\n\r\n render() {\r\n const value = this.props.value || null;\r\n\r\n return;\r\n }\r\n}\r\n\r\n\r\nexport const LookUpFilterMenu = (props: SystemGridColumnFilterMenuProps) => \r\nexport const BooleanFilterMenu = (props: SystemGridColumnFilterMenuProps) => \r\nexport const TableFilterMenu = (props: SystemGridColumnFilterMenuProps) => \r\n\r\n\r\nexport const ClinicalNoteAreaFilterMenu = (props: any) => \r\nexport const ClinicalNoteCategoryFilterMenu = (props: any) => \r\nexport const ReferenceResourceFilterMenu = (props: any) => \r\nexport const SecurityUserFilterMenu = (props: any) => \r\nexport const ReferenceEncounterTypeFilterMenu = (props: any) => \r\nexport const ReferencePayerServiceTypeFilterMenu = (props: any) => \r\nexport const ReferencePayerTypeFilterMenu = (props: any) => \r\nexport const ReferencePayerTypeNameFilterMenu = (props: any) => \r\nexport const PayerFilterMenu = (props: any) => \r\nexport const ReferenceCountryFilterMenu = (props: any) => \r\nexport const ReferenceStateFilterMenu = (props: any) => \r\nexport const ReferenceCityFilterMenu = (props: any) => \r\nexport const ReferenceCompanyNameFilterMenu = (props: any) => \r\nexport const InsuranceCompanyFilterMenu = (props: any) => \r\nexport const TpaNameFilterMenu = (props: any) => \r\nexport const NetworkNameFilterMenu = (props: any) => \r\nexport const ReferenceOrderNameFilterMenu = (props: any) => \r\nexport const ReferenceResourceTypeNameFilterMenu = (props: any) => \r\nexport const ReferenceBrokerNameFilterMenu = (props: any) => \r\nexport const ServicesNameFilterMenu = (props: any) => \r\nexport const EncounterStatusNameFilterMenu = (props: any) => \r\nexport const PrincipleIDTypeLookUpFilterMenu = (props: any) => \r\nexport const CommunicationChannelFilterMenu = (props: any) => \r\n\r\n\r\n///Encounter/EncounterHistoryList\r\n\r\nexport const PatientNameLookUpFilterMenu = (props) => \r\nexport const YesNoLookUpFilterMenu = (props) => \r\nexport const SQLLookUpFilterMenu = (props) => \r\nexport const GenderLookUpFilterMenu = (props) => \r\nexport const TitleLookUpFilterMenu = (props) => \r\nexport const DrivingLookUpFilterMenu = (props) => \r\nexport const MaritalStatusLookUpFilterMenu = (props) => \r\nexport const NationalityLookUpFilterMenu = (props) => \r\nexport const ResidencyStatusLookUpFilterMenu = (props) => \r\nexport const IDTypeLookUpFilterMenu = (props) => \r\nexport const PlaceOfBirthLookUpFilterMenu = (props) => \r\nexport const EthnicGroupLookUpFilterMenu = (props) => \r\nexport const PreferredLanguageLookUpFilterMenu = (props) => \r\nexport const EmploymentLookUpFilterMenu = (props) => \r\nexport const PrimaryCarePhysicianLookUpFilterMenu = (props) => \r\nexport const StatusLookUpFilterMenu = (props) => \r\nexport const CountryLookUpFilterMenu = (props) => \r\nexport const AddressTypeLookUpFilterMenu = (props) => \r\nexport const RelationShipLookUpFilterMenu = (props) => \r\nexport const ContactMethodLookUpFilterMenu = (props) => \r\nexport const PaymentCategoryLookUpFilterMenu = (props) => \r\nexport const InsurerOrganizationLookUpFilterMenu = (props) => \r\nexport const TPALookUpFilterMenu = (props) => \r\nexport const InsurerProgramLookUpFilterMenu = (props) => \r\nexport const ContactCountryCodeLookUpFilterMenu = (props) => \r\nexport const SideLookUpFilterMenu = (props) => \r\n//export const PrincipleIDTypeLookUpFilterMenu = (props) => \r\nexport const ResourceTypeLookUpFilterMenu = (props) => \r\nexport const CompanyNameLookUpFilterMenu = (props) => \r\nexport const EncounterCategoryLookUpFilterMenu = (props) => \r\nexport const EncounterStatusLookUpFilterMenu = (props) => \r\nexport const DiaryFrequencyLookUpFilterMenu = (props) => \r\nexport const DiaryStatusLookUpFilterMenu = (props) => \r\nexport const DiaryActionsLookUpFilterMenu = (props) => \r\nexport const SurgicalStatusFilterMenu = (props) => \r\nexport const FollowUpStatusFilterMenu = (props) => \r\nexport const EncounterSearchStatusFilterMenu = (props) => \r\nexport const EncounterLabTestCategoryFilterMenu = (props) => \r\nexport const EncounterLabRequestStatusFilterMenu = (props) => \r\nexport const EncounterLabRequestTypeFilterMenu = (props) => \r\n\r\n\r\n//Lookup-DiaryStatus\r\n//Encounter Type\r\n\r\nexport const CallTypeLookUpFilterMenu = (props) => \r\nexport const CommunicationCategoryLookUpFilterMenu = (props) => \r\nexport const OrderTypeLookUpFilterMenu = (props) => \r\nexport const PatientSmokeStatusFilterMenu = (props) => \r\nexport const ClientServiceIconFilterMenu = (props) => \r\nexport const EncounterCommunicationCategoryFilterMenu = (props) => \r\nexport const FamilyRelationLookUpFilterMenu = (props) => \r\nexport const FamilySeverityLookUpFilterMenu = (props) => ","import httpService from '../../service/httpService'\r\nimport { EditModes } from '../types/IEditModes'\r\nimport { toast } from 'react-toastify'\r\n\r\ntype crudHelperSetting = {\r\n url: string\r\n data?: any\r\n mode: EditModes ;\r\n key?: string \r\n onSuccess?(response: any): void\r\n onError?(error: any): void,\r\n label?: string,\r\n showMessage?: boolean\r\n}\r\n\r\nexport const HttpGet = (url:string, success: any, error?: any) => {\r\n crudHelper({\r\n mode: EditModes.Read,\r\n url: url,\r\n onSuccess: (response) => { if (success) success(response) },\r\n onError: (reponse) => { if (error) error(reponse) }\r\n })\r\n}\r\n\r\nexport const HttpPost = (url: string, data: any, success: any, error?: any) => {\r\n crudHelper({\r\n mode: EditModes.Create,\r\n url: url,\r\n data: data,\r\n onSuccess: (response) => { if (success) success(response) },\r\n onError: (reponse) => { if (error) error(reponse) }\r\n })\r\n}\r\n\r\nexport const HttpPut = (url: string, data: any, success: any, error?: any) => {\r\n crudHelper({\r\n mode: EditModes.Update,\r\n url: url,\r\n data: data,\r\n onSuccess: (response) => { if (success) success(response) },\r\n onError: (reponse) => { if (error) error(reponse) }\r\n })\r\n}\r\n\r\nexport const HttpDelete = (url: string, data: any, success: any, error?: any) => {\r\n crudHelper({\r\n mode: EditModes.Delete,\r\n url: url,\r\n onSuccess: (response) => { if (success) success(response) },\r\n onError: (reponse) => { if (error) error(reponse) }\r\n })\r\n}\r\n\r\nexport const crudHelper = (settings: crudHelperSetting) => {\r\n\r\n const Messages = {\r\n CreateSuccess: `Successfully Saved !`,\r\n CreateError: `Please Try again !`,\r\n ReadSuccess: '',\r\n ReadError: '',\r\n UpdateSuccess: 'Successfully Updated !',\r\n UpdateError: 'Update Error',\r\n DeleteSuccess: 'Successfully Deleted !',\r\n DeleteError: 'Delete Error',\r\n }\r\n\r\n var url = settings.url ;\r\n if (settings.mode !== EditModes.Read && settings.mode !== EditModes.Update && settings.key === \"\") {\r\n url += \"/\" + settings.key;\r\n }\r\n\r\n switch (settings.mode) {\r\n case EditModes.Read:\r\n httpService\r\n .get(url )\r\n .then((response) => {\r\n if (settings.onSuccess) settings.onSuccess(response);\r\n if (settings.showMessage && Messages.ReadSuccess) toast.success(Messages.ReadSuccess);\r\n }).catch(error => {\r\n if (settings.onError) settings.onError(error)\r\n if (settings.showMessage && Messages.ReadError) toast.warn(Messages.ReadError);\r\n });\r\n break;\r\n\r\n case EditModes.Create:\r\n httpService\r\n .post(url, settings.data)\r\n .then(response => {\r\n if (settings.onSuccess) settings.onSuccess(response);\r\n if (settings.showMessage && Messages.CreateSuccess) toast.success(Messages.CreateSuccess);\r\n })\r\n .catch(error => {\r\n if (settings.onError) settings.onError(error)\r\n if (settings.showMessage && Messages.CreateError) toast.warn(Messages.CreateError);\r\n });\r\n break;\r\n\r\n case EditModes.Update:\r\n httpService\r\n .put(url, settings.data)\r\n .then(response => {\r\n if (settings.onSuccess) settings.onSuccess(response);\r\n if (settings.showMessage && Messages.UpdateSuccess) toast.success(Messages.UpdateSuccess);\r\n })\r\n .catch(error => {\r\n if (settings.onError) settings.onError(error)\r\n if (settings.showMessage && Messages.UpdateError) toast.warn(Messages.UpdateError);\r\n });\r\n break;\r\n\r\n case EditModes.Delete:\r\n httpService\r\n .delete(url)\r\n .then(response => {\r\n if (settings.onSuccess) settings.onSuccess(response);\r\n if (settings.showMessage && Messages.DeleteSuccess) toast.success(Messages.DeleteSuccess);\r\n })\r\n .catch(error => {\r\n if (settings.onError) settings.onError(error)\r\n if (settings.showMessage && Messages.DeleteError) toast.warn(Messages.DeleteError);\r\n });\r\n break;\r\n }\r\n}\r\n","import * as React from 'react'\r\nconst chalk = require('chalk');\r\n\r\nconst success = (location?: string, message?: any) => console.log(location, chalk.green(message));\r\nconst info = (location?: string, message?: any) => console.log(location, chalk.blue(message));\r\nconst error= (location?: string, message?: any) => console.log(location, chalk.red(message));\r\n\r\nexport default { success, info, error };","import React, { useEffect, useState } from 'react';\r\nimport HeaderDashboard from '../Components/DashboardComponent/headerdashboard/HeaderDashboard';\r\nimport { hasReadPermission } from '../service/userService';\r\nimport { HttpService, SystemTile } from '../library';\r\n\r\nconst DashboardAdvantage = () => {\r\n const [menus, setMenus] = useState([]);\r\n const getMenus = async () => {\r\n await HttpService.get(\"Menu/MenuList\").then((response) => {\r\n setMenus(response.data);\r\n }).catch((error) => {\r\n console.log(error);\r\n })\r\n }\r\n useEffect(() => {\r\n getMenus();\r\n }, [])\r\n\r\n return (<>\r\n \r\n
\r\n
\r\n
\r\n
\r\n {menus.length > 0 ? menus.map((menu) => {\r\n let actionlink = null;\r\n if (menu.Application != null) {\r\n if (menu.Application.Type.includes('Internal') || menu.Application.Type.includes('Local')) {\r\n actionlink = menu.Application.Action;\r\n } else if (menu.Application !== null && menu.Application.Type.includes('External')) {\r\n actionlink = menu.Application.Action;\r\n } else {\r\n if (menu.Application.File != undefined) {\r\n actionlink = menu.Application.File.FileUrl;\r\n } else {\r\n actionlink = \"\";\r\n }\r\n }\r\n }\r\n else if (menu.IsFormMenu) {\r\n actionlink = \"/forms?menuId=\" + menu.MenuId+'&form='+menu.Name;\r\n }\r\n return <>\r\n {\r\n menu.Application != null || menu.IsFormMenu == true ?\r\n \r\n : null\r\n }\r\n >\r\n }) : ''}\r\n
\r\n\r\n
\r\n
\r\n
\r\n >)\r\n}\r\n\r\nexport default DashboardAdvantage;","import { ExcelExport } from '@progress/kendo-react-excel-export';\r\nimport { GridColumn as Column } from \"@progress/kendo-react-grid\";\r\nimport React, { useEffect, useState } from 'react';\r\nimport HeaderDashboard from '../Components/DashboardComponent/headerdashboard/HeaderDashboard';\r\nimport { HttpService, SystemGrid } from '../library';\r\nimport { SystemDashboardLayout, SystemPanel } from 'library';\r\n\r\nconst initialFilter = {\r\n logic: \"and\",\r\n filters: [\r\n {\r\n field: \"TAXBLE_ENTITY_ID\",\r\n operator: \"contains\",\r\n value: \"\",\r\n },\r\n ],\r\n};\r\nconst DeductionMedical = () => {\r\n const [filter, setFilter] = useState(initialFilter);\r\n const [refreshCounter, serRefreshCounter] = useState(0);\r\n\r\n const [reportData, setReportData] = useState({});\r\n const _export = React.useRef(null);\r\n const excelExport = (event) => {\r\n //_export.current.props.data.forEach(cell => {\r\n // cell.format = '@';\r\n //});\r\n\r\n if (_export.current !== null) {\r\n _export.current.save();\r\n }\r\n };\r\n\r\n const getReportData = async () => {\r\n await HttpService.get(\"Report/MedicalDeductionContributionReport\").then((response) => {\r\n let formattedData = formatCurrencyData(response.data.Data);\r\n setReportData(formattedData);\r\n })\r\n }\r\n\r\n useEffect(() => {\r\n getReportData();\r\n }, [])\r\n\r\n const onRefresh = () => {\r\n serRefreshCounter(refreshCounter + 1);\r\n }\r\n\r\n /**\r\n * @author:Sandeep Sirohi\r\n * @description: format number with decimal places for the report.\r\n */\r\n const numberFormatter = new Intl.NumberFormat('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n });\r\n\r\n const formatCurrencyData = (data) => {\r\n return data.map((item) => ({\r\n ...item,\r\n CONTRIBUTIONS_TOTAL: `$${item.CONTRIBUTIONS_TOTAL.toFixed(2)}`, // Format as currency with \"$\"\r\n DEDUCTIONS_TOTAL: `$${item.DEDUCTIONS_TOTAL.toFixed(2)}` // Format as currency with \"$\"\r\n }));\r\n };\r\n\r\n\r\n return (<>\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n Download]} showAdd={false} showRefresh={true} showArchive={false} onRefresh={onRefresh}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n (\r\n ${numberFormatter.format(props.dataItem.CONTRIBUTIONS_TOTAL)} )\r\n } />\r\n (\r\n ${numberFormatter.format(props.dataItem.DEDUCTIONS_TOTAL)} )\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\nexport default DeductionMedical;","import React, { useEffect, useState } from 'react';\r\nimport { FaChevronDown } from 'react-icons/fa';\r\nimport HeaderDashboard from '../Components/DashboardComponent/headerdashboard/HeaderDashboard';\r\nimport { HttpService } from '../library';\r\nimport { toast } from 'react-toastify';\r\nimport exportFromJSON from 'export-from-json'\r\nimport { SystemDashboardLayout, SystemPanel } from 'library';\r\nimport SystemDatePicker from '../library/inputs/SystemDatePicker';\r\nimport moment from 'moment';\r\nconst DeductionReport = () => {\r\n\r\n const [dataLoader, setDataLoader] = useState(false);\r\n var cTotal = 0;\r\n var dTotal = 0;\r\n var total = false;\r\n const [startDate, setStartDate] = useState(new Date(new Date().getFullYear(), 0, 1));\r\n const [endDate, setEndDate] = useState(new Date());\r\n const [title, setTitle] = useState(\"Deduction/Contribution Summary Report\");\r\n\r\n const [filterOne, setFilterOne] = useState(true);\r\n const [filterTwo, setFilterTwo] = useState(true);\r\n const [filterThree, setFilterThree] = useState(true);\r\n const [deductionCodes, setDeductionCodes] = useState({});\r\n const [contributionCodes, setContributionCodes] = useState({});\r\n const [locationCodes, setLocationCodes] = useState({});\r\n\r\n const [selectedDeductionCode, setSelectedDeductionCode] = useState([]);\r\n const [selectedContributionCode, setSelectedContributionCode] = useState([]);\r\n const [selectedLocationCodes, setSelectedLocationCodes] = useState([]);\r\n\r\n const [allDeductionCode, setAllDeductionCode] = useState(false);\r\n const [allContributionCode, setAllContributionCode] = useState(false);\r\n const [allLocationCode, setAllLocationCode] = useState(false);\r\n const [dataResults, setDataResults] = useState([]);\r\n const [errors, setErrors] = useState({});\r\n\r\n const handleChange = (e) => {\r\n\r\n if (e.target.name.includes('deduction')) {\r\n if (e.target.checked) {\r\n const deduction = selectedDeductionCode.slice();\r\n deduction.push('[' + e.target.value + ']');\r\n setSelectedDeductionCode(deduction);\r\n } else {\r\n const deduction = selectedDeductionCode.filter((t) => t !== '[' + e.target.value + ']');\r\n setSelectedDeductionCode(deduction);\r\n }\r\n } else if (e.target.name.includes('contribution')) {\r\n if (e.target.checked) {\r\n const contribution = selectedContributionCode.slice();\r\n contribution.push('[' + e.target.value + ']');\r\n setSelectedContributionCode(contribution);\r\n } else {\r\n const contribution = selectedContributionCode.filter((t) => t !== '[' + e.target.value + ']');\r\n setSelectedContributionCode(contribution);\r\n }\r\n } else {\r\n if (e.target.checked) {\r\n const location = selectedLocationCodes.slice();\r\n location.push(e.target.value);\r\n setSelectedLocationCodes(location);\r\n } else {\r\n const location = selectedLocationCodes.filter((t) => t !== '[' + e.target.value + ']');\r\n setSelectedLocationCodes(location);\r\n }\r\n }\r\n }\r\n\r\n const formValidator = () => {\r\n var errorMsgs = [];\r\n if ((startDate == '' || startDate == null) || (endDate == '' || endDate == null)) {\r\n toast.error(\"Please select start and end date. Start date cannot be greater than end date. Also check Deduction/Contirbution code filter.\");\r\n return false;\r\n }\r\n else if ((startDate > endDate)) {\r\n toast.error(\"Start date cannot be greater than end date.\");\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n const searchHandler = async () => {\r\n if (formValidator()) {\r\n setErrors([]);\r\n const Entity = new FormData();\r\n Entity.append('StartDate', moment(startDate).format(\"YYYY-MM-DD\"));\r\n Entity.append('EndDate', moment(endDate).format(\"YYYY-MM-DD\"));\r\n Entity.append('DeductionCodes', selectedDeductionCode.sort());\r\n Entity.append('ContributionCodes', selectedContributionCode.sort());\r\n Entity.append('LocationCodes', selectedLocationCodes.sort());\r\n setDataLoader(true);\r\n setDataResults([]);\r\n await HttpService.post(\"Report/DeductionContributionReport\", Entity).then((response) => {\r\n setDataResults(response.data);\r\n setDataLoader(false);\r\n setTitle(`Deduction/Contribution Summary Report For: ${moment(startDate).format(\"MM/DD/YYYY\")} - ${moment(endDate).format(\"MM/DD/YYYY\")}`)\r\n }).catch(function (error) {\r\n setDataResults([]);\r\n setDataLoader(false);\r\n });\r\n }\r\n }\r\n\r\n const getDeductionCodeList = async () => {\r\n await HttpService.get(\"Report/DedcutionCodeList\").then((response) => {\r\n setDeductionCodes(response.data.Data);\r\n allDeduction(true);\r\n }).catch((error) => {\r\n\r\n })\r\n }\r\n const getContributionCodeList = async () => {\r\n await HttpService.get(\"Report/ContributionCodeList\").then((response) => {\r\n setContributionCodes(response.data.Data);\r\n allContribution(true);\r\n }).catch((error) => {\r\n\r\n })\r\n }\r\n const getLocationCodeList = async () => {\r\n await HttpService.get(\"Report/LocationCodeList\").then((response) => {\r\n setLocationCodes(response.data.Data);\r\n allLocation(true);\r\n }).catch((error) => {\r\n\r\n })\r\n }\r\n useEffect(() => {\r\n getDeductionCodeList();\r\n getContributionCodeList();\r\n getLocationCodeList();\r\n\r\n }, [])\r\n\r\n /**\r\n * @author: Sandeep Sirohi\r\n * @description: Export report to excel.\r\n */\r\n const excelExport = () => {\r\n const table = document.getElementById('tblReport');\r\n // Use the xlsx library to convert the table to a workbook\r\n const wb = XLSX.utils.table_to_book(table, { sheet: \"Sheet1\", raw: true });\r\n // Write the workbook to a binary string and trigger the download\r\n XLSX.writeFile(wb, 'DeductionContribution Report.csv');\r\n\r\n //exportFromJSON({\r\n // data: dataResults, fileName: 'Deduction/Contribution Report.csv', exportType: exportFromJSON.types.csv\r\n //});\r\n };\r\n\r\n const allDeduction = (value) => {\r\n setAllDeductionCode(value);\r\n var deductionlist = document.querySelectorAll('.deduction_check_boxes input[type=checkbox]')\r\n const deduction = [];\r\n if (value == true) {\r\n deductionlist.forEach(x => x.checked = true);\r\n for (let i = 0; i < deductionlist.length > 0; i++) {\r\n if (deductionlist[i].value != \"on\") {\r\n deduction.push('[' + deductionlist[i].value + ']');\r\n setSelectedDeductionCode(deduction);\r\n }\r\n }\r\n } else {\r\n setSelectedDeductionCode([]);\r\n deductionlist.forEach(x => x.checked = false);\r\n }\r\n }\r\n const allContribution = (value) => {\r\n setAllContributionCode(value);\r\n var contributionlist = document.querySelectorAll('.contribution_check_boxes input[type=checkbox]');\r\n const contribution = [];\r\n if (value == true) {\r\n contributionlist.forEach(x => x.checked = true);\r\n for (let i = 0; i < contributionlist.length > 0; i++) {\r\n if (contributionlist[i].value != \"on\") {\r\n contribution.push('[' + contributionlist[i].value + ']');\r\n setSelectedContributionCode(contribution);\r\n }\r\n }\r\n } else {\r\n setSelectedContributionCode([]);\r\n contributionlist.forEach(x => x.checked = false);\r\n }\r\n }\r\n\r\n const allLocation = (value) => {\r\n setAllLocationCode(value);\r\n var locationlist = document.querySelectorAll('.location_check_boxes input[type=checkbox]');\r\n const location = [];\r\n if (value == true) {\r\n locationlist.forEach(x => x.checked = true);\r\n for (let i = 0; i < locationlist.length > 0; i++) {\r\n if (locationlist[i].value != \"on\") {\r\n location.push(locationlist[i].value);\r\n setSelectedLocationCodes(location);\r\n }\r\n }\r\n } else {\r\n setSelectedLocationCodes([]);\r\n locationlist.forEach(x => x.checked = false);\r\n }\r\n }\r\n\r\n /**\r\n * @author:Sandeep Sirohi\r\n * @description: format currency for the report.\r\n */\r\n const formatter = new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n });\r\n\r\n return (<>\r\n \r\n
\r\n
\r\n
\r\n
Download]}\r\n label=\"Report\" showAdd={false} showRefresh={false} showArchive={false}>\r\n \r\n\r\n
\r\n
\r\n
\r\n {\r\n if (e) {\r\n setStartDate(e.target.value);\r\n }\r\n }} />\r\n
\r\n
\r\n {\r\n if (e) {\r\n setEndDate(e.target.value);\r\n }\r\n }} />\r\n
\r\n
\r\n { searchHandler() }} title=\"Generate report\" className=\"btn btnSave\">Search \r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
{\r\n setFilterOne(!filterOne);\r\n }}>\r\n Deduction Codes \r\n {/* */} \r\n
\r\n
\r\n
\r\n\r\n
\r\n
{\r\n setFilterTwo(!filterTwo);\r\n }}>\r\n Contribution Codes \r\n {/* */} \r\n
\r\n
\r\n
\r\n\r\n
\r\n
{\r\n setFilterThree(!filterThree);\r\n }}>\r\n Location Codes \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {dataLoader ?
\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 Array.isArray(dataResults) && dataResults.length > 0 ?\r\n
\r\n
\r\n \r\n \r\n \r\n {`Report for Check Date Between: ${moment(startDate).format(\"MM/DD/YYYY\")} - ${moment(endDate).format(\"MM/DD/YYYY\")}`}\r\n \r\n \r\n \r\n {Object.keys(dataResults && Array.isArray(dataResults) && dataResults[0]).map((e, i) => {\r\n return (\r\n 0 ? \"total-col\" : \"\"} key={i} style={{ background: (e.indexOf('D_') == 0 ? 'orange' : (e.indexOf('C_') == 0 ? 'gray' : '')), textAlign: i < 3 ? \"left\" : \"right\" }}>\r\n {e.slice(2)}\r\n \r\n )\r\n })}\r\n \r\n \r\n \r\n {dataResults && Array.isArray(dataResults) && dataResults.map((val, index) => {\r\n return (\r\n {Object.entries(val).map((e, i, arr) => {\r\n return (\r\n e[0] != \"on\" ?\r\n 0 ? \"total-col\" : \"\")} style={{ textAlign: i < 3 ? \"left\" : \"right\" }} key={i}>\r\n {\r\n i < 4 ? {e[1]} :\r\n (e[1] > 0 ? formatter.format(e[1]) :\r\n e[1] < 0 ? '(' + formatter.format(Math.abs(e[1])) + ')' : '')\r\n }\r\n : \"\"\r\n )\r\n })}\r\n \r\n );\r\n })}\r\n \r\n
\r\n
\r\n : \"No data found !!\"\r\n }\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n >)\r\n};\r\n\r\nexport default DeductionReport;","import React, { useEffect, useState } from 'react';\r\nimport { FaChevronDown } from 'react-icons/fa';\r\nimport HeaderDashboard from '../Components/DashboardComponent/headerdashboard/HeaderDashboard';\r\nimport { HttpService } from '../library';\r\nimport { toast } from 'react-toastify';\r\nimport exportFromJSON from 'export-from-json'\r\nimport { SystemDashboardLayout, SystemPanel } from 'library';\r\nimport SystemDatePicker from '../library/inputs/SystemDatePicker';\r\nimport { getUserId } from '../service/userService';\r\nimport moment from 'moment';\r\nimport { ToWords } from 'to-words';\r\nimport html2canvas from \"html2canvas\";\r\nimport { jsPDF } from \"jspdf\";\r\n\r\n\r\nconst DeductionReport = () => {\r\n var dateGroup = '';\r\n const [dataLoader, setDataLoader] = useState(false);\r\n const [endDate, setEndDate] = useState();\r\n const toWords = new ToWords();\r\n const [dataResults, setDataResults] = useState([]);\r\n const [errors, setErrors] = useState({});\r\n const [payPeriodEndDate, setPayPeriodEndDate] = useState([]);\r\n\r\n\r\n const formValidator = () => {\r\n var errorMsgs = [];\r\n if (endDate == undefined || endDate == '' || endDate == null) {\r\n toast.error(\"Please select Pay Period End Date.\");\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n const searchHandler = async () => {\r\n\r\n if (formValidator()) {\r\n setErrors([]);\r\n const Entity = new FormData();\r\n //debugger;\r\n let date = endDate.split(\":\")[0];\r\n let payType = endDate.split(\":\")[1]\r\n\r\n let parts = date.split('/');\r\n let day = parts[1];\r\n let month = parts[0];\r\n let year = parts[2];\r\n\r\n Entity.append('EndDate', year + '-' + month + '-' + day);\r\n Entity.append('UserId', getUserId());\r\n Entity.append('PayType', payType);\r\n\r\n setDataLoader(true);\r\n setDataResults([]);\r\n await HttpService.post(\"Report/PayStubReport\", Entity).then((response) => {\r\n setDataResults(response.data);\r\n setDataLoader(false);\r\n })\r\n }\r\n setDataLoader(false);\r\n }\r\n\r\n\r\n const PayPeriodEndDate = async () => {\r\n await HttpService.get(\"Report/PayPeriodEndDate/\" + getUserId()).then((response) => {\r\n setPayPeriodEndDate(response.data.PayPeriodEndDateList);\r\n })\r\n }\r\n\r\n\r\n /**\r\n * @author: Sandeep Sirohi\r\n * @description: Export report to excel.\r\n */\r\n const excelExport = () => {\r\n if (dataResults != null) {\r\n exportFromJSON({\r\n data: dataResults, fileName: 'Pay Stub Report', exportType: exportFromJSON.types.csv\r\n });\r\n }\r\n };\r\n\r\n\r\n /**\r\n * @author:Sandeep Sirohi\r\n * @description: format currency for the report.\r\n */\r\n const formatter = new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n });\r\n\r\n /**\r\n * @author:Sandeep Sirohi\r\n * @description: format number with decimal places for the report.\r\n */\r\n const numberFormatter = new Intl.NumberFormat('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n });\r\n\r\n useEffect(() => {\r\n // searchHandler();\r\n PayPeriodEndDate();\r\n }, [])\r\n\r\n /**\r\n * @author: Sandeep Sirohi\r\n * @description: Export report to pdf.\r\n */\r\n const downloadPdfDocument = () => {\r\n const input = document.getElementById('payStubReport');\r\n\r\n // Set padding and font size for the report before rendering\r\n input.style.setProperty('padding', '0 20px', 'important');\r\n input.style.setProperty('font-size', '12px', 'important');\r\n\r\n // Start script for Paystub report mobile view\r\n const input1 = document.getElementById('paystub-tbl1');\r\n input1.style.setProperty('width', '50%', 'important');\r\n\r\n const input2 = document.getElementById('paystub-tbl2');\r\n input2.style.setProperty('width', '50%', 'important');\r\n\r\n const input3 = document.getElementById('paystub-tbl3');\r\n input3.style.setProperty('width', '50%', 'important');\r\n\r\n const input4 = document.getElementById('paystub-tbl4');\r\n input4.style.setProperty('width', '50%', 'important');\r\n // End script for Paystub report mobile view\r\n\r\n // Adjust padding for td elements\r\n const tdElements = input.querySelectorAll('td');\r\n tdElements.forEach(function (td) {\r\n td.style.padding = '1px'; // Adjust the padding for elements\r\n });\r\n\r\n const elements = input.querySelectorAll('.force-page-break');\r\n elements.forEach((el) => {\r\n el.classList.add('page-break-before');\r\n });\r\n // Define options for html2pdf.js\r\n const options = {\r\n margin: [10, 2, 10, 2],\r\n filename: \"PayStub.pdf\",\r\n image: { type: 'png', quality: 1 }, // Highest image quality\r\n html2canvas: {\r\n scale: 3, // You can try scale: 1.5 or 2 for better quality\r\n useCORS: true,\r\n logging: true, // Enable logging for debugging\r\n letterRendering: true, // Improves text sharpness\r\n },\r\n jsPDF: {\r\n unit: 'mm', // Units for jsPDF\r\n format: 'a4',\r\n orientation: 'portrait',\r\n compressPDF: true // Optional, compress the PDF to save space\r\n },\r\n pagebreak: { mode: 'avoid-all' }\r\n };\r\n\r\n // Generate PDF using html2pdf.js\r\n html2pdf().from(input).set(options).save();\r\n\r\n // Reset padding after PDF generation\r\n setTimeout(() => {\r\n input.style.setProperty('padding', '', 'important');\r\n input1.style.setProperty('width', '', 'important');\r\n input2.style.setProperty('width', '', 'important');\r\n input3.style.setProperty('width', '', 'important');\r\n input4.style.setProperty('width', '', 'important');\r\n }, 0);\r\n };\r\n\r\n\r\n //Sandeep: Convert decimal part of amount to words.\r\n const convertDecimal = (number) => {\r\n if (!Number.isInteger(number)) {\r\n return \" and \" + number.toFixed(2).toString().split(\".\")[1] + \" / 100\";\r\n }\r\n }\r\n\r\n return (<>\r\n \r\n
\r\n
\r\n
\r\n
Download]}\r\n label=\"Report\" showAdd={false} showRefresh={false} showArchive={false}>\r\n \r\n
\r\n
\r\n
\r\n Pay Period End Date: \r\n
\r\n
\r\n {\r\n setEndDate(e.target.value);\r\n }}>\r\n Pay period end date \r\n {\r\n payPeriodEndDate ? payPeriodEndDate.map((val, index) => {\r\n return ({moment(val.EndDate).format(\"MM/DD/YYYY\")} );\r\n }) : \"\"\r\n }\r\n \r\n
\r\n
\r\n { searchHandler() }} title=\"Generate report\" className=\"btn btnSave\">Search \r\n
\r\n
\r\n
\r\n
\r\n\r\n {dataLoader ?
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
:\r\n (dataResults && dataResults.EmployeeDetail) ?\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Trailboss Enterprises, Inc. \r\n \r\n \r\n \r\n {/*
*/}\r\n 201 E. 3rd Avenue \r\n ANCHORAGE, AK 99501 \r\n 907-228-8247 \r\n \r\n \r\n \r\n \r\n \r\n PAID:\r\n \r\n \r\n \r\n \r\n {\r\n toWords.convert\r\n (\r\n dataResults.TotalSummary &&\r\n dataResults.TotalSummary.length > 0\r\n && dataResults.TotalSummary[0].TotalEarning ?\r\n Math.trunc(dataResults.TotalSummary[0].TotalEarning) : 0\r\n )\r\n }\r\n {\r\n convertDecimal(\r\n dataResults.TotalSummary &&\r\n dataResults.TotalSummary.length > 0\r\n && dataResults.TotalSummary[0].TotalEarning ? dataResults.TotalSummary[0].TotalEarning : 0\r\n )\r\n }\r\n \r\n \r\n \r\n \r\n \r\n To the order Of \r\n \r\n \r\n {dataResults.EmployeeDetail.Name} \r\n {dataResults.EmployeeDetail.AddressLine1 ? {dataResults.EmployeeDetail.AddressLine1} : ''}\r\n {dataResults.EmployeeDetail.AddressLine2 ? {dataResults.EmployeeDetail.AddressLine2} : ''}\r\n {dataResults.EmployeeDetail.AddressLine3 ? dataResults.EmployeeDetail.AddressLine3 : ''}\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 {/*Earning summary*/}\r\n
\r\n
\r\n
\r\n \r\n \r\n Earnings Summary \r\n \r\n \r\n Type \r\n Hours \r\n Amount \r\n Year to Date \r\n \r\n \r\n \r\n {\r\n (dataResults.EarningSummary != null && dataResults.EarningSummary.length) > 0 ?\r\n dataResults.EarningSummary.map((val, index) => {\r\n return (\r\n {val.Type} \r\n {numberFormatter.format(val.Hours)} \r\n {formatter.format(val.Amount)} \r\n {formatter.format(val.YearToDate)} \r\n );\r\n }) : \"\"\r\n }\r\n \r\n
\r\n
\r\n\r\n
\r\n {/*Deduction*/}\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n Dedcutions \r\n \r\n \r\n Type \r\n Amount \r\n Year to Date \r\n \r\n \r\n \r\n {\r\n (dataResults.DeductionSummary != null && dataResults.DeductionSummary.length) > 0 ?\r\n dataResults.DeductionSummary.map((val, index) => {\r\n return (\r\n (val.Type == \"Federal Withholding\" ||\r\n val.Type == \"Social Security Withholding\" ||\r\n val.Type == \"Medicare\" ||\r\n val.Type == \"State Withholding\" ||\r\n val.Type == \"Local Withholding\") && val.YearToDate <= 0\r\n ? ''\r\n :\r\n (\r\n {val.Type} \r\n {val.Amount >= 0 ?\r\n {formatter.format(val.Amount)} :\r\n ({formatter.format(Math.abs(val.Amount))}) \r\n }\r\n {val.YearToDate >= 0 ?\r\n {formatter.format(val.YearToDate)} :\r\n ({formatter.format(Math.abs(val.YearToDate))}) \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 {/*Earning detail*/}\r\n
\r\n
\r\n
\r\n \r\n \r\n Earning Details \r\n \r\n \r\n Week \r\n Type \r\n Classification \r\n Hours \r\n Rate \r\n Amount \r\n \r\n \r\n \r\n {\r\n\r\n (dataResults.EarningDetail != null && dataResults.EarningDetail.length > 0) ?\r\n dataResults.EarningDetail.map((val, index) => {\r\n if (dateGroup != val.WeekDate) {\r\n dateGroup = val.WeekDate;\r\n return (\r\n {val.WeekDate} \r\n {val.Type} \r\n {val.Classification} \r\n {numberFormatter.format(val.Hours)} \r\n {formatter.format(val.Rate)} \r\n {formatter.format(val.Amount)} \r\n );\r\n\r\n }\r\n else {\r\n return (\r\n \r\n {val.Type} \r\n {val.Classification} \r\n {formatter.format(val.Hours)} \r\n {formatter.format(val.Rate)} \r\n {formatter.format(val.Amount)} \r\n );\r\n }\r\n }) : \"\"\r\n }\r\n \r\n
\r\n
\r\n\r\n
\r\n {/*Contribution summary*/}\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n Contributions \r\n \r\n \r\n Type \r\n Amount \r\n Year to Date \r\n \r\n \r\n \r\n {\r\n (dataResults.ContributionSummary != null && dataResults.ContributionSummary.length) > 0 ?\r\n dataResults.ContributionSummary.map((val, index) => {\r\n return (\r\n {val.Type} \r\n {val.Amount >= 0 ?\r\n {formatter.format(val.Amount)} :\r\n ({formatter.format(Math.abs(val.Amount))}) \r\n }\r\n {val.YearToDate >= 0 ?\r\n {formatter.format(val.YearToDate)} :\r\n ({formatter.format(Math.abs(val.YearToDate))}) \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 {/*Summary*/}\r\n
\r\n
\r\n
\r\n \r\n \r\n Summary \r\n \r\n \r\n \r\n Check Amount \r\n Direct Deposit \r\n Contributions \r\n Deductions \r\n Net Earnings \r\n Gross Earnings \r\n \r\n \r\n\r\n {\r\n (dataResults.TotalSummary != null && dataResults.TotalSummary.length) > 1 ?\r\n \r\n \r\n Current \r\n {formatter.format(dataResults.TotalSummary[0].ChequeDeposit)} \r\n {formatter.format(dataResults.TotalSummary[0].DirectDeposit)} \r\n {dataResults.TotalSummary[0].Contribution >= 0 ?\r\n {formatter.format(dataResults.TotalSummary[0].Contribution)} :\r\n ({formatter.format(Math.abs(dataResults.TotalSummary[0].Contribution))}) \r\n }\r\n\r\n {dataResults.TotalSummary[0].Deduction >= 0 ?\r\n {formatter.format(dataResults.TotalSummary[0].Deduction)} :\r\n ({formatter.format(Math.abs(dataResults.TotalSummary[0].Deduction))}) \r\n }\r\n {formatter.format(dataResults.TotalSummary[0].TotalEarning)} \r\n {formatter.format(dataResults.TotalSummary[0].GrossEarning)} \r\n \r\n \r\n Year to date \r\n {formatter.format(dataResults.TotalSummary[1].ChequeDeposit)} \r\n {formatter.format(dataResults.TotalSummary[1].DirectDeposit)} \r\n {dataResults.TotalSummary[1].Contribution >= 0 ?\r\n {formatter.format(dataResults.TotalSummary[1].Contribution)} :\r\n ({formatter.format(Math.abs(dataResults.TotalSummary[1].Contribution))}) \r\n }\r\n {dataResults.TotalSummary[1].Deduction >= 0 ?\r\n {formatter.format(dataResults.TotalSummary[1].Deduction)} :\r\n ({formatter.format(Math.abs(dataResults.TotalSummary[1].Deduction))}) \r\n }\r\n {formatter.format(dataResults.TotalSummary[1].TotalEarning)} \r\n {formatter.format(dataResults.TotalSummary[1].GrossEarning)} \r\n \r\n \r\n : \"\"\r\n }\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n {/*Direct deposit*/}\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n Direct Deposits \r\n \r\n \r\n Routing Number \r\n Bank Name \r\n Account Number \r\n Amount \r\n Year to Date \r\n \r\n \r\n \r\n {\r\n (dataResults.DirectDepositSummary != null && dataResults.DirectDepositSummary.length) > 0 ?\r\n dataResults.DirectDepositSummary.map((val, index) => {\r\n return (\r\n {val.RoutingNumber} \r\n {val.BankName} \r\n {val.AccountNumber.replace(/\\d(?=\\d{4})/g, 'X')} \r\n {formatter.format(val.Amount)} \r\n {formatter.format(val.YearToDate)} \r\n );\r\n }) : \"\"\r\n }\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n {/*Leave*/}\r\n
\r\n
\r\n
\r\n \r\n \r\n Leave \r\n \r\n \r\n Type \r\n Beginning Balance \r\n YTD Accrued \r\n YTD Used \r\n Ending Balance \r\n \r\n \r\n \r\n {\r\n (dataResults.LeaveSummary != null && dataResults.LeaveSummary.length > 0) ?\r\n dataResults.LeaveSummary.map((val, index) => {\r\n return (\r\n {val.Type} \r\n {numberFormatter.format(val.BeginningBalance)} \r\n {numberFormatter.format(val.YTDAccrued)} \r\n {numberFormatter.format(val.YTDUsed)} \r\n {numberFormatter.format(val.EndingBalance)} \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
\r\n
\r\n >)\r\n};\r\n\r\nexport default DeductionReport;\r\n","import React, { useState } from 'react';\r\nimport { CiEdit } from 'react-icons/ci';\r\nimport HeaderDashboard from '../Components/DashboardComponent/headerdashboard/HeaderDashboard';\r\nimport { GridColumn as Column } from \"@progress/kendo-react-grid\";\r\nimport { SystemGrid } from \"library\";\r\n\r\nconst Settings = () => {\r\n const [descEdit, setDescEdit] = useState(true);\r\n const [metaKeyword, setMetaKeyword] = useState(true);\r\n const [publicUrl, setPublicUrl] = useState(true);\r\n\r\n return (<>\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
\r\n >)\r\n};\r\n\r\nexport default Settings;","import React, { useEffect, useState } from 'react';\r\nimport { FaChevronDown } from 'react-icons/fa';\r\nimport HeaderDashboard from '../Components/DashboardComponent/headerdashboard/HeaderDashboard';\r\nimport { SystemButton, SystemTextEditor } from '../library';\r\nimport HttpRequest from '../service/httpService'\r\nimport { toast } from 'react-toastify';\r\nimport { SystemDashboardLayout, SystemPanel } from 'library';\r\nimport { getUserId, getUserInfo } from '../service/userService';\r\nimport { Button } from '../library/common/BaseControls';\r\nimport { TextArea } from '@progress/kendo-react-inputs';\r\nimport { useForm } from \"react-hook-form\";\r\nconst ContactIt = () => {\r\n\r\n const [request, setRequest] = useState('');\r\n const [contactNumber, setContactNumber] = useState('');\r\n const [supervisor, setSupervisor] = useState('');\r\n const { register, handleSubmit, watch, reset, formState: { errors }, setValue, getValues, clearErrors } = useForm({});\r\n\r\n const submitForm = async (data, event) => {\r\n if (data.request.length <= 0 || data.contactNumber.length <= 0) {\r\n toast.error(\"Please enter a message along with contact number.\");\r\n return;\r\n }\r\n data.user = \"\";\r\n data.email = \"\";\r\n var userData = getUserInfo();\r\n if (userData.User) {\r\n\r\n data.name = userData.User.UserName;\r\n data.email = userData.User.EmailId;\r\n HttpRequest.post(\"Report/ContactRequest\", data).then((response) => {\r\n if (response && response.data === true) {\r\n event.target.reset();\r\n toast.info(\"Request Submitted Successfully.\")\r\n }\r\n else {\r\n toast.error(response.data);\r\n }\r\n });\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n >\r\n )\r\n};\r\nexport default ContactIt;\r\n","import React, { useEffect, useState } from 'react';\r\nimport { FaChevronDown } from 'react-icons/fa';\r\nimport HeaderDashboard from '../Components/DashboardComponent/headerdashboard/HeaderDashboard';\r\nimport { SystemButton, SystemTextEditor } from '../library';\r\nimport HttpRequest from '../service/httpService'\r\nimport { toast } from 'react-toastify';\r\nimport { SystemDashboardLayout, SystemPanel } from 'library';\r\nimport { getUserId, getUserInfo, getSettingValue } from '../service/userService';\r\nimport { Button } from '../library/common/BaseControls';\r\nimport { TextArea } from '@progress/kendo-react-inputs';\r\nimport { useForm } from \"react-hook-form\";\r\nimport SystemDatePicker from '../library/inputs/SystemDatePicker';\r\nimport SystemInputBox from '../library/inputs/SystemInputBox';\r\n\r\n\r\nconst PaystubConfiguration = () => {\r\n\r\n const [userName, setUserName] = useState('');\r\n const [configValue, setConfigValue] = useState('');\r\n const [startDate, setStartDate] = useState();\r\n const [endDate, setEndDate] = useState();\r\n const { register, handleSubmit, watch, reset, formState: { errors }, setValue, getValues, clearErrors } = useForm({});\r\n\r\n const submitForm = async (data, event) => {\r\n if (!data.userName || !startDate || !endDate) {\r\n toast.error(\"Please provide user and date information.\");\r\n return;\r\n }\r\n data.startDate = startDate;\r\n data.endDate = endDate;\r\n\r\n HttpRequest.post(\"Report/PaystubConfiguration\", data).then((response) => {\r\n if (response && response.data === 1) {\r\n event.target.reset();\r\n setStartDate(null);\r\n setEndDate(null);\r\n toast.info(\"Request Submitted Successfully.\")\r\n }\r\n });\r\n }\r\n useEffect(() => {\r\n let config = getSettingValue(\"FormerEmployeePayStubRetentionPeriod\")\r\n setConfigValue(config);\r\n }, [])\r\n\r\n return (\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 By default, system displays last {configValue} days Paystub Detail. \r\n You can add additional pay period (Which will expire in 7 day(s)) to Paystub Details here for any employee. \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n User Name: \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n {\r\n if (e) {\r\n setStartDate(e.target.value);\r\n }\r\n }} />\r\n
\r\n
\r\n {\r\n if (e) {\r\n setEndDate(e.target.value);\r\n }\r\n }} />\r\n
\r\n
Submit \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n >\r\n )\r\n};\r\nexport default PaystubConfiguration;\r\n","import React, { useEffect, useState } from 'react';\r\nimport { FaChevronDown } from 'react-icons/fa';\r\nimport HeaderDashboard from '../Components/DashboardComponent/headerdashboard/HeaderDashboard';\r\nimport { SystemButton, SystemTextEditor } from '../library';\r\nimport HttpRequest from '../service/httpService'\r\nimport { toast } from 'react-toastify';\r\nimport { SystemDashboardLayout, SystemPanel } from 'library';\r\nimport { getUserId, getUserInfo } from '../service/userService';\r\nimport { Button } from '../library/common/BaseControls';\r\nimport { TextArea } from '@progress/kendo-react-inputs';\r\nimport { useForm } from \"react-hook-form\";\r\nimport queryString from \"query-string\";\r\nimport { HttpService, SystemTile } from '../library';\r\n\r\nvar treeItem = \"\";\r\nconst Forms = () => {\r\n\r\n const [forms, setForms] = useState([]);\r\n const [fileTree, setFileTree] = useState({});\r\n\r\n const getMenuForm = async () => {\r\n const queries = queryString.parse(window.location.search);\r\n\r\n await HttpService.get(`Menu/MenuFormList/${queries.menuId}`).then((response) => {\r\n let tree = buildTree(response.data);\r\n setForms(response.data);\r\n if (response.data && response.data.length > 0) {\r\n const parentElement = document.getElementById('file-tree-table').querySelector('tbody');\r\n parentElement.innerHTML = \"\";\r\n displayTreeTable(tree, response.data);\r\n }\r\n })\r\n }\r\n function sortTreeByFileCount(tree) {\r\n const sortedTree = {};\r\n\r\n for (const key in tree) {\r\n const currentNode = tree[key];\r\n\r\n // Get all files and folders in the current node\r\n const files = Object.keys(currentNode).filter(item => Object.keys(currentNode[item]).length === 0);\r\n const folders = Object.keys(currentNode).filter(item => Object.keys(currentNode[item]).length > 0);\r\n\r\n // Sort files alphabetically\r\n files.sort();\r\n\r\n // Recursively sort folders and count the files in them\r\n const sortedFolders = folders.sort((a, b) => {\r\n const aFileCount = countFiles(currentNode[a]);\r\n const bFileCount = countFiles(currentNode[b]);\r\n return bFileCount - aFileCount; // Sort in descending order based on file count\r\n }).map(folder => {\r\n // Recursively sort each folder (sub-tree)\r\n currentNode[folder] = sortTreeByFileCount(currentNode[folder]);\r\n return folder;\r\n });\r\n\r\n // Rebuild the node: files first, followed by sorted folders\r\n const newNode = {};\r\n\r\n // Add files first\r\n files.forEach(file => newNode[file] = {});\r\n\r\n // Add folders next, after sorting by file count\r\n sortedFolders.forEach(folder => newNode[folder] = currentNode[folder]);\r\n\r\n // Assign the sorted node back to the tree\r\n sortedTree[key] = newNode;\r\n }\r\n\r\n return sortedTree;\r\n }\r\n\r\n // Helper function to count files in a folder (leaf nodes)\r\n function countFiles(folder) {\r\n let count = 0;\r\n\r\n // Count files (leaf nodes) in the folder\r\n Object.keys(folder).forEach(item => {\r\n if (Object.keys(folder[item]).length === 0) {\r\n count++;\r\n } else {\r\n count += countFiles(folder[item]); // Recurse into subfolders\r\n }\r\n });\r\n\r\n return count;\r\n }\r\n\r\n function buildTree(paths) {\r\n const tree = {};\r\n paths.forEach(path => {\r\n const parts = path.OriginalFileName.split('/');\r\n let current = tree;\r\n\r\n parts.forEach(part => {\r\n if (!current[part]) {\r\n current[part] = {};\r\n }\r\n current = current[part];\r\n });\r\n });\r\n \r\n return sortTreeByFileCount(tree); \r\n }\r\n\r\n /**\r\n * @author:Sandeep Sirohi\r\n * @param {any} tree\r\n * @param {any} data\r\n * @param {any} level\r\n */\r\n function displayTreeTable(tree, data, level = 0) {\r\n const parentElement = document.getElementById('file-tree-table').querySelector('tbody');\r\n tree = sortTreeByFileCount(tree);\r\n for (const key in tree) {\r\n const column = document.createElement('span');\r\n const row = document.createElement('tr');\r\n const cell = document.createElement('td');\r\n const link = document.createElement('a');\r\n const icon = document.createElement('img');\r\n icon.style.display = \"inline\"; // Ensuring icon is inline with the text\r\n\r\n column.append(icon);\r\n column.append(link);\r\n cell.appendChild(column);\r\n cell.classList.add(\"text-left\");\r\n\r\n link.textContent = key;\r\n link.target = \"_blank\";\r\n\r\n // Apply correct file/folder filtering logic\r\n const filteredForms = data.filter(x => {\r\n const fileParts = x.OriginalFileName.split('/');\r\n const fileName = fileParts[fileParts.length - 1].toLowerCase();\r\n return fileName === key.toLowerCase(); // Compare file name to key\r\n });\r\n\r\n // Determine if the current node is a folder or file\r\n if (Object.keys(tree[key]).length > 0) {\r\n // It's a folder\r\n cell.style.fontWeight = \"bold\"; // Make folder name bold\r\n icon.src = setting.cdnUrl + \"/assets/images/folder.png\";\r\n cell.classList.add('form-folder');\r\n } else {\r\n // It's a file\r\n if (key.endsWith(\"pdf\")) {\r\n icon.src = setting.cdnUrl + \"/assets/images/pdf.png\";\r\n } else if (key.endsWith(\"xlsx\")) {\r\n icon.src = setting.cdnUrl + \"/assets/images/excel.png\";\r\n } else if (key.endsWith(\"docx\")) {\r\n icon.src = setting.cdnUrl + \"/assets/images/word.png\";\r\n }\r\n\r\n // If a file is found, link it to its URL\r\n if (filteredForms.length > 0) {\r\n link.href = filteredForms[0].FileUrl;\r\n }\r\n\r\n cell.classList.add('form-file');\r\n }\r\n\r\n // Apply padding for tree-level indentation\r\n column.style.paddingLeft = `${level * 30}px`; // Adjust padding for correct indenting\r\n\r\n row.appendChild(cell);\r\n parentElement.appendChild(row);\r\n\r\n // Recurse for child nodes (folders)\r\n if (Object.keys(tree[key]).length > 0) {\r\n displayTreeTable(tree[key], data, level + 1); // Recurse for deeper levels\r\n }\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n getMenuForm();\r\n }, [])\r\n\r\n\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {queryString.parse(window.location.search).form} \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\nexport default Forms;\r\n","import DashboardAdvantage from \"./Page/DashboardAdvantage\";\r\nimport DeductionMedical from \"./Page/DeductionMedical\";\r\nimport DeductionReport from \"./Page/DeductionReport\";\r\nimport PayStubReport from \"./Page/PayStubReport\";\r\nimport * as React from 'react';\r\nimport { Route, Switch } from 'react-router';\r\nimport Settings from \"./Page/Settings\";\r\nimport ContactIt from \"./Page/ContactIt\";\r\nimport PaystubConfiguration from \"./Page/PaystubConfiguration\";\r\nimport Forms from \"./Page/Forms\";\r\n\r\nexport const Routes = () => \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","/**\r\n * Sandeep Sirohi: Inactivity service, logged out the user after specific inactivity time period.\r\n * Date: 04/11/2024\r\n */\r\n\r\nimport React, { useEffect, useState } from 'react';\r\nimport HttpRequest from '../service/httpService'\r\nimport { toast } from 'react-toastify';\r\nimport { getSettingValue } from '../service/userService';\r\nimport { msalInstance } from '..';\r\nvar inactivityTimerId: any = null;\r\n\r\n//Logout logic\r\nconst logout = () => {\r\n toast.info(\"You are being loggout out from the system.\")\r\n msalInstance.logout();\r\n //console.log('logged out' + new Date());\r\n};\r\n\r\n//Sandeep: Create timer based on timeout value from system settings.\r\nconst resetTimer = () => {\r\n let timeout = getSettingValue(\"SystemTimeout\")\r\n //console.log('activity');\r\n if (timeout && Number(timeout) > 0) {\r\n clearTimer();\r\n let timeoutId = setTimeout(logout, Number(timeout) * 60 * 1000);\r\n inactivityTimerId = timeoutId;\r\n }\r\n};\r\n\r\n//Clears timer\r\nconst clearTimer = () => {\r\n if (inactivityTimerId != null) {\r\n clearTimeout(inactivityTimerId);\r\n }\r\n};\r\n//Register handlers\r\nexport const registerInactivityService = () => {\r\n // Add event listeners for user activity\r\n resetTimer();\r\n const events: Array = ['mousemove', 'keydown', 'scroll', 'touchstart'];\r\n events.forEach(event => window.addEventListener(event, resetTimer));\r\n}\r\n\r\n//Unregister handlers\r\nexport const unregisterInactivityService = () => {\r\n // Clean up event listeners and timeout\r\n const events: Array = ['mousemove', 'keydown', 'scroll', 'touchstart'];\r\n events.forEach(event => window.removeEventListener(event, resetTimer));\r\n clearTimer();\r\n}\r\n","import * as React from 'react';\r\nimport { msalInstance } from '../..';\r\nimport { AiOutlineHome } from 'react-icons/ai';\r\n/**\r\n * Sandeep: Unauthorized access page.\r\n */\r\nclass UnauthorizedAccess extends React.PureComponent {\r\n constructor(props: any) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n return (<>\r\n \r\n \r\n
\r\n
\r\n You do not have enough permissions to access the system.
\r\n Please contact administrator.\r\n
{ msalInstance.logout() }} >\r\n Continue\r\n \r\n
\r\n
\r\n
\r\n >)\r\n }\r\n};\r\nexport default UnauthorizedAccess;","import * as React from 'react'\r\nimport * as ReactDOM from 'react-dom'\r\nimport SystemDialog from '../tools/SystemDialog';\r\n\r\nconst SystemShowDialogPlaceHolder = \"SystemShowDialogPlaceHolder\";\r\nexport const ShowDialogContainer = () =>
;\r\n\r\nexport const showConfirm = async (message?: string, title: string = \"Please Confirm\") => await showModal(title, message, 0, true, true, false, false, false);\r\nexport const showSuccess = async (message?: string, title: string = \"Success\") => await showModal(title, message, 0, false, false, false, false, true);\r\nexport const showError = async (message?: string, title: string = \"Error\") => await showModal(title, message, 0, false, false, false, false, true);\r\nexport const showInfo = async (message?: string, title: string = \"Information\") => await showModal(title, message, 0, false, false, false, false, true);\r\n\r\nexport const showModal = (title?: string, message?: string, mode: number = 0,\r\n showYes: boolean = true, showNo: boolean = true, showCancel: boolean = false, showAbort: boolean = false, showClose: boolean=false): Promise => {\r\n var rootElement= document.getElementById(SystemShowDialogPlaceHolder)\r\n var dialogPlace = document.createElement(\"div\");\r\n rootElement.appendChild(dialogPlace);\r\n\r\n return new Promise((resolve) => {\r\n\r\n const onYes = () => {\r\n resolve(true);\r\n ReactDOM.render(undefined, dialogPlace);\r\n dialogPlace.remove();\r\n };\r\n\r\n\r\n\r\n const onNo = () => {\r\n resolve(false);\r\n ReactDOM.render(undefined, dialogPlace);\r\n dialogPlace.remove();\r\n };\r\n\r\n const CustomTitleBar = () => {\r\n return (\r\n \r\n {title}\r\n
\r\n );\r\n };\r\n\r\n \r\n\r\n ReactDOM.render(\r\n } visible={true} message={message} onYes={onYes} onNo={onNo} onCancel={onNo} onClose={onNo} onAbort={onNo} />,\r\n dialogPlace\r\n );\r\n });\r\n}\r\n\r\n","import React, { useEffect, useRef, useState } from 'react';\r\nconst TrailbossFooter = (props) => {\r\n\r\n return (<>\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
\r\n
\r\n
\r\n
Address \r\n
\r\n
\r\n
2470 Saint Rose Pkwy, Suite 314 Henderson, NV 89074\r\n
\r\n
201 E. 3rd Avenue Anchorage, AK 99501\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
Phone: 907-338-8243 \r\n Fax: 907-338-0869 \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n © {new Date().getFullYear()} Trailboss Enterprises, Inc. All rights reserved\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\nexport default TrailbossFooter;","import React, { Component } from 'react';\r\nimport { AiOutlineHome, AiOutlineMenu, AiOutlineSecurityScan, AiOutlineSolution, AiOutlineMedicineBox, AiOutlineDollar } from \"react-icons/ai\";\r\nimport MultilevelSidebar from \"react-multilevel-sidebar\";\r\nimport \"react-multilevel-sidebar/src/Sidebar.css\";\r\nimport { Link, withRouter } from 'react-router-dom';\r\nimport { ToastContainer } from 'react-toastify';\r\nimport { HttpService } from '../library';\r\nimport { ShowDialogContainer } from '../library/common/ShowDialog';\r\nimport { hasReadPermission, hasPaystubPermission } from '../service/userService';\r\nimport TrailbossFooter from \"./DashboardComponent/footer/Footer\";\r\n\r\nclass Layout extends Component {\r\n constructor(props: any) {\r\n super(props)\r\n this.state = {\r\n openCMS: false,\r\n //menuItems : []\r\n menuItems: []\r\n };\r\n }\r\n\r\n handleSidebarCMSToggle = (elem: any) => {\r\n this.setState({\r\n openCMS: elem\r\n })\r\n };\r\n\r\n handleClick = (itemOptions: any) => {\r\n if (itemOptions.href) {\r\n if (itemOptions.EventTarget == '_blank') {\r\n window.open(itemOptions.href, '_blank');\r\n }\r\n\r\n else if (itemOptions.href.includes('http://') || itemOptions.href.includes('https://')) {\r\n window.open(itemOptions.href, '_blank');\r\n }\r\n\r\n else {\r\n this.props.history.push({\r\n pathname: itemOptions.href\r\n });\r\n }\r\n\r\n this.setState({\r\n openCMS: false\r\n })\r\n }\r\n }\r\n\r\n logoSidebarMenu = () => {\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n )\r\n }\r\n componentDidMount = () => {\r\n this.getMenus();\r\n }\r\n convertUrlToBlob = async (url: string) => {\r\n await fetch(url).then(r => r.blob());\r\n }\r\n getMenus = async () => {\r\n await HttpService.get(\"Menu/MenuList\").then((response) => {\r\n var menus: any = [];\r\n menus.push({\r\n content: [\r\n {\r\n id: 100,\r\n name: 'Home',\r\n icon: ,\r\n href: '/dashboard-advantage',\r\n securityObject: hasReadPermission('Advantage.Dashboard'),\r\n }\r\n ]\r\n });\r\n if (response.data) {\r\n var allMenus = response.data;\r\n allMenus.map((menu: any, key: any) => {\r\n let actionlink = null;\r\n if (menu.Application != null) {\r\n if (menu.Application.Type.includes('Internal') || menu.Application.Type.includes('Local')) {\r\n actionlink = (window.location.href + menu.Application.Action).replace(/([^:]\\/)\\/+/g, '$1');\r\n }\r\n else if (menu.Application.Type.includes('External')) {\r\n actionlink = menu.Application.Action;\r\n }\r\n else {\r\n if (menu.Application.File != undefined) {\r\n actionlink = menu.Application.File.FileUrl;\r\n } else {\r\n actionlink = null;\r\n }\r\n }\r\n }\r\n else if (menu.IsFormMenu) {\r\n actionlink = window.location.href + \"forms?menuId=\" + menu.MenuId + '&form=' + menu.Name;\r\n }\r\n menus.push({\r\n content: [\r\n {\r\n id: menu.MenuId,\r\n name: menu.Name,\r\n icon: ,\r\n href: actionlink,\r\n EventTarget: \"_blank\",\r\n securityObject: menu.SecurityObject ? hasReadPermission(menu.SecurityObject.Name) : false,\r\n }\r\n ]\r\n });\r\n\r\n })\r\n }\r\n\r\n menus.push({\r\n content: [\r\n {\r\n id: 100,\r\n name: 'Deduction & Contribution report',\r\n icon: ,\r\n href: '/report-deduction',\r\n securityObject: hasReadPermission('Advantage.DeductionContributionReport'),\r\n }\r\n ]\r\n },\r\n {\r\n content: [\r\n {\r\n id: 101,\r\n name: 'Medical summary report',\r\n icon: ,\r\n href: '/medical-deduction',\r\n securityObject: hasReadPermission('Advantage.MedicalDeduction'),\r\n }\r\n ]\r\n },\r\n //{\r\n // content: [\r\n // {\r\n // id: 101,\r\n // name: 'Pay stub report',\r\n // icon: ,\r\n // href: '/pay-stub',\r\n // securityObject: hasReadPermission('Advantage.PayStub') && hasPaystubPermission(),\r\n // }\r\n // ]\r\n //},\r\n {\r\n content: [\r\n {\r\n id: 103,\r\n name: 'Contact IT Department',\r\n icon: ,\r\n href: '/contact-it',\r\n securityObject: hasReadPermission('Advantage.ContactIT'),\r\n }\r\n ]\r\n },\r\n {\r\n content: [\r\n {\r\n id: 104,\r\n name: 'Paystub Configuration',\r\n icon: ,\r\n href: '/paystub-configuration',\r\n securityObject: hasReadPermission('Advantage.PaystubConfiguration'),\r\n }\r\n ]\r\n },\r\n {\r\n content: [\r\n {\r\n id: 102,\r\n name: 'Security',\r\n icon: ,\r\n href: setting.securityWebUrl,\r\n EventTarget: \"_blank\",\r\n securityObject: hasReadPermission('Security'),\r\n }\r\n ]\r\n },\r\n );\r\n\r\n var filterdMenu = menus.filter(x => x.content[0].securityObject == true);\r\n this.setState({ menuItems: filterdMenu });\r\n }).catch((error) => {\r\n console.log(error);\r\n })\r\n }\r\n\r\n public render() {\r\n return (\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
this.handleSidebarCMSToggle()}\r\n options={this.state.menuItems}\r\n header={this.logoSidebarMenu()}\r\n onItemClick={this.handleClick}\r\n />\r\n this.handleSidebarCMSToggle(true)} className=\"MenuOpenIcon\" title=\"Sidebar Menu\">\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n {this.props.children}\r\n \r\n\r\n
\r\n \r\n \r\n >\r\n );\r\n }\r\n}\r\n\r\nexport default withRouter(Layout);","import * as React from 'react';\r\nimport { Routes } from './Routes';\r\nimport 'jquery/dist/jquery.min.js'\r\nimport 'bootstrap/dist/js/bootstrap.bundle.min.js';\r\nimport 'bootstrap/dist/css/bootstrap.min.css';\r\nimport '@progress/kendo-theme-bootstrap/dist/all.css';\r\nimport { initilizeUserInfo, isUserVerified } from 'service/userService'\r\nimport { registerInactivityService, unregisterInactivityService } from 'service/inactivityService'\r\nimport { msalInstance } from '.';\r\nimport UnauthorizedAccess from './Components/Authentication/UnauthorizedAccess';\r\nimport Layout from './Components/Layout';\r\nimport ProfileValidate from './Components/Authentication/ProfileValidate';\r\nimport { AuthenticationResult, EventMessage, EventType, LogLevel, PublicClientApplication } from \"@azure/msal-browser\";\r\n\r\n/**\r\n * Sandeep: Initilize user info and set the cache for the user by utilizing the received access token.\r\n */\r\nclass App extends React.Component {\r\n\r\n constructor(props: any) {\r\n super(props)\r\n }\r\n\r\n state = {\r\n initilized: false,\r\n authorized: true,\r\n authorizedToHome: true,\r\n }\r\n\r\n /**\r\n * Sandeep: Get and cache user information in local storage for UI use.\r\n * we are ensuring all keys to be encrypted while getting the information.\r\n */\r\n componentDidMount = async () => {\r\n await initilizeUserInfo(this.initRender);\r\n registerInactivityService();\r\n }\r\n\r\n componentWillUnmount() {\r\n unregisterInactivityService();\r\n }\r\n\r\n /**\r\n * Sandeep: Callback method to render the UI after the token is received and set to cache.\r\n */\r\n initRender = (status: string) => {\r\n if (status == '200')\r\n this.setState({ initilized: true });\r\n else if (status == '401')\r\n this.setState({ authorized: false });\r\n }\r\n\r\n //SS: Log out unauthorize user and display prompt.\r\n logOutUnauthorizedUser = () => {\r\n msalInstance.logout();\r\n }\r\n\r\n /**\r\n * Render the UI.\r\n * @returns\r\n */\r\n render() {\r\n return <>\r\n {\r\n (this.state.initilized ?\r\n :\r\n this.state.authorized ? \r\n Trailboss \r\n
:\r\n )\r\n }\r\n >\r\n }\r\n};\r\n\r\nexport default App;\r\n","import * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\nimport { createBrowserHistory } from 'history';\r\nimport App from './App';\r\nimport { Router } from 'react-router';\r\nimport { PublicClientApplication, InteractionType, } from \"@azure/msal-browser\";\r\nimport { loginRequest, msalConfig ,initilizeMsal} from \"./azure/authConfig\";\r\nimport { MsalAuthenticationTemplate, MsalProvider } from \"@azure/msal-react\";\r\n\r\n/**\r\n * Sandeep: Azure B2C configuration.\r\n */\r\nexport const msalInstance = new PublicClientApplication(msalConfig);\r\ninitilizeMsal(msalInstance);\r\nconst baseUrl = document.getElementsByTagName('base')[0].getAttribute('href') as string;\r\nconst history = createBrowserHistory({ basename: baseUrl });\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n\r\n document.getElementById('root'));"],"sourceRoot":""}