@asaleh37/ui-base 1.2.17 → 1.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.development +1 -1
- package/dist/index.d.ts +27 -5
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/public/no_image.png +0 -0
- package/src/components/administration/admin/OrganizationApplicationModuleGrid.tsx +10 -34
- package/src/components/administration/admin/OrganizationGrid.tsx +4 -87
- package/src/components/administration/admin/OrganizationRankGrid.tsx +34 -16
- package/src/components/administration/admin/OrganizationUnitGrid.tsx +34 -30
- package/src/components/administration/admin/OrganizationUnitTypeGrid.tsx +3 -16
- package/src/components/administration/admin/PersonGrid.tsx +38 -1
- package/src/components/administration/admin/RoleAuthoritiesForm.tsx +2 -4
- package/src/components/administration/admin/SystemApplicationAuthorityGrid.tsx +2 -18
- package/src/components/administration/admin/SystemApplicationGrid.tsx +5 -83
- package/src/components/administration/admin/SystemApplicationModuleGrid.tsx +2 -15
- package/src/components/administration/admin/SystemApplicationRoleGrid.tsx +1 -15
- package/src/components/administration/dev/AttachmentConfigGrid.tsx +213 -0
- package/src/components/administration/dev/AttachmentGrid.tsx +172 -0
- package/src/components/administration/dev/LookupGrid.tsx +1 -12
- package/src/components/common/Home.tsx +24 -22
- package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +13 -1
- package/src/components/templates/DataEntryTemplates/DataEntryUtil.ts +6 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +1 -3
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/SystemLookupCombobox.tsx +1 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +100 -8
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid.tsx +113 -4
- package/src/components/templates/attachment/AttachmentCard.tsx +126 -0
- package/src/components/templates/attachment/AttachmentImageViewer.tsx +44 -0
- package/src/components/templates/attachment/AttachmentPanel.tsx +269 -0
- package/src/components/templates/workflow/WorkflowDocumentPanel.tsx +4 -4
- package/src/hooks/UseSession.tsx +20 -2
- package/src/hooks/useAxios.tsx +71 -11
- package/src/hooks/useLookupGridColumn.tsx +2 -2
- package/src/layout/MainContent.tsx +49 -46
- package/src/layout/TopBar.tsx +6 -1
- package/src/locales/arabic/devLocalsAr.json +13 -1
- package/src/locales/english/devLocalsEn.json +13 -1
- package/src/main.tsx +3 -3
- package/src/navigationItems/Administration/adminNavigationItems.tsx +77 -3
- package/src/redux/features/administration/AdministrationStoresMetaData.ts +14 -6
- package/src/routes/administration/adminRoutes.tsx +21 -0
- package/src/routes/administration/devRoutes.tsx +24 -0
- package/public/icons/LICENSE.md +0 -5
- package/public/icons/arrow-clockwise.svg +0 -4
- package/public/icons/arrow-counterclockwise.svg +0 -4
- package/public/icons/journal-text.svg +0 -5
- package/public/icons/justify.svg +0 -3
- package/public/icons/text-center.svg +0 -3
- package/public/icons/text-left.svg +0 -3
- package/public/icons/text-paragraph.svg +0 -3
- package/public/icons/text-right.svg +0 -3
- package/public/icons/type-bold.svg +0 -3
- package/public/icons/type-italic.svg +0 -3
- package/public/icons/type-strikethrough.svg +0 -3
- package/public/icons/type-underline.svg +0 -3
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{useDispatch as o,useSelector as a,Provider as r}from"react-redux";import{library as d}from"@fortawesome/fontawesome-svg-core";import{fab as l}from"@fortawesome/free-brands-svg-icons";import{far as n}from"@fortawesome/free-regular-svg-icons";import{fas as s}from"@fortawesome/free-solid-svg-icons";import"react-toastify/dist/ReactToastify.css";import{Dialog as p,DialogTitle as c,DialogContent as m,DialogContentText as _,DialogActions as A,Button as T,Modal as u,Box as E,AppBar as f,Toolbar as I,Typography as O,IconButton as N,Paper as y,TextField as R,Grid2 as L,ListItemButton as h,FormControlLabel as P,Checkbox as M,Autocomplete as D,Popper as C,styled as b,Tooltip as S,Badge as g,Divider as U,MenuItem as v,InputAdornment as w,Accordion as B,AccordionSummary as x,AccordionDetails as F,Avatar as W,useTheme as k,Backdrop as G,CircularProgress as Y,createTheme as V}from"@mui/material";export*from"@mui/material";import{ThemeContext as q,CacheProvider as K,ThemeProvider as z}from"@emotion/react";import*as H from"react";import Q,{useState as Z,useEffect as j,createElement as $}from"react";import{styled as X,alpha as J,useTheme as ee}from"@mui/material/styles";import ie from"@mui/material/CssBaseline";import te from"@mui/material/AppBar";import oe from"@mui/material/Toolbar";import{FontAwesomeIcon as ae}from"@fortawesome/react-fontawesome";export{FontAwesomeIcon}from"@fortawesome/react-fontawesome";import{createSlice as re,configureStore as de}from"@reduxjs/toolkit";import{toast as le,ToastContainer as ne}from"react-toastify";export{toast}from"react-toastify";import se from"axios";import pe from"i18next";import{initReactI18next as ce,useTranslation as me}from"react-i18next";import _e from"@mui/material/List";import Ae from"@mui/material/Card";import Te from"@mui/material/CardHeader";import ue from"@mui/material/ListItemText";import Ee from"@mui/material/ListItemIcon";import fe from"@mui/material/Checkbox";import Ie from"@mui/material/Button";import Oe from"@mui/material/Divider";import{BarChart as Ne,Gauge as ye,LineChart as Re}from"@mui/x-charts";import Le from"@mui/material/LinearProgress";import he from"@mui/material/Typography";import Pe from"@mui/material/Box";import{PieChart as Me}from"@mui/x-charts/PieChart";import{LocalizationProvider as De,DatePicker as Ce,DateTimePicker as be}from"@mui/x-date-pickers";import{AdapterMoment as Se}from"@mui/x-date-pickers/AdapterMoment";import ge from"moment";import*as Ue from"zod";import{z as ve}from"zod";export*from"zod";import{useForm as we}from"react-hook-form";import{zodResolver as Be}from"@hookform/resolvers/zod";import{useParams as xe,useNavigate as Fe,Routes as We,Route as ke,BrowserRouter as Ge}from"react-router-dom";import{QuickFilter as Ye,ToolbarButton as Ve,Toolbar as qe,ColumnsPanelTrigger as Ke,GridViewColumnIcon as ze,FilterPanelTrigger as He,GridFilterListIcon as Qe,ExportExcel as Ze,QuickFilterTrigger as je,QuickFilterControl as $e,QuickFilterClear as Xe,GridActionsCellItem as Je,GridExpandMoreIcon as ei,DataGridPremium as ii,GridRowModes as ti}from"@mui/x-data-grid-premium";import oi from"@mui/material/IconButton";import ai from"@mui/material/Drawer";import{animated as ri,useSpring as di}from"@react-spring/web";import li from"@mui/material/Collapse";import{RichTreeView as ni}from"@mui/x-tree-view/RichTreeView";import{treeItemClasses as si}from"@mui/x-tree-view/TreeItem";import{useTreeItem2 as pi}from"@mui/x-tree-view/useTreeItem2";import{TreeItem2Root as ci,TreeItem2Content as mi,TreeItem2IconContainer as _i,TreeItem2Checkbox as Ai,TreeItem2Label as Ti}from"@mui/x-tree-view/TreeItem2";import{TreeItem2Icon as ui}from"@mui/x-tree-view/TreeItem2Icon";import{TreeItem2Provider as Ei}from"@mui/x-tree-view/TreeItem2Provider";import{TreeItem2DragAndDropOverlay as fi}from"@mui/x-tree-view/TreeItem2DragAndDropOverlay";import Ii from"stylis-plugin-rtl";import{prefixer as Oi}from"stylis";import Ni from"@emotion/cache";import yi from"@emotion/styled";import{grey as Ri}from"@mui/material/colors";import Li from"@mui/material/SwipeableDrawer";import{LicenseInfo as hi}from"@mui/x-license";export*from"@mui/lab";export*from"@mui/x-tree-view/models";!function(e,i){void 0===i&&(i={});var t=i.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("html,\r\nbody {\r\n height: 100vh;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n#root {\r\n height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n overflow: hidden;\r\n}\r\n\r\n.red-row {\r\n background-color: #f0d8d8;\r\n}\r\n");const Pi=(e=768)=>{const[i,t]=Z(window.innerWidth<e);return j((()=>{const i=()=>t(window.innerWidth<e);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)}),[e]),i},Mi=350,Di=re({name:"AppLayout",initialState:{themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},reducers:{setThemeMode:(e,i)=>{e.themeMode=i.payload},setAppDirection:(e,i)=>{e.appDirection=i.payload}}}),Ci=Di.actions;var bi=Di.reducer;const Si=re({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,i)=>{e.value.isOpened=!0,e.value.message=i.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:gi,hideLoadingMask:Ui}=Si.actions;var vi=Si.reducer;const wi=()=>{const e=o();return{show:i=>{e(gi(i))},hide:()=>{e(Ui())}}},Bi=()=>{const e=wi(),i=a((e=>e.AppInfo.value.apiBaseUrl)),t=se.create({baseURL:i,timeout:6e5,withCredentials:!0});t.defaults.withCredentials=!0,t.interceptors.response.use((e=>e),(e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))le.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&403===e.response.status)))le.error("you aren't authorized to process this request");else if(e&&(e.response&&(e.response.status&&500===e.response.status)))if(e.response.data instanceof Blob){e.response.data.text().then((e=>{le.error(e)}))}else le.error(e.response.data);else le.error("failed to communicate with the server ... try again later");return"ERROR"}));return{handleGetRequest:async(i={endPointURI:"",parameters:{}})=>{void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.show(i.loadingMessage);const o=await t.get(i.endPointURI,{params:{...i.parameters},withCredentials:!0});return void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.hide(),"ERROR"!==o?(void 0!==i.successCallBkFn&&null!=i.successCallBkFn&&i.successCallBkFn(o),o):(void 0!==i.failureCallBkFn&&null!=i.failureCallBkFn&&i.failureCallBkFn(o),"ERROR")},handlePostRequest:async(i={endPointURI:"",parameters:{},data:{}})=>{void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.show(i.loadingMessage);let o=await t.post(i.endPointURI,i.data,{params:i.parameters});return void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.hide(),"ERROR"!==o?(void 0!==i.successCallBkFn&&null!=i.successCallBkFn&&i.successCallBkFn(o),o):(void 0!==i.failureCallBkFn&&null!=i.failureCallBkFn&&i.failureCallBkFn(o),"ERROR")},handleDeleteRequest:async(i={endPointURI:"",parameters:{}})=>{void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.show(i.loadingMessage);let o=await t.delete(i.endPointURI,{params:{...i.parameters}});return void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.hide(),"ERROR"!==o?(void 0!==i.successCallBkFn&&null!=i.successCallBkFn&&i.successCallBkFn(o),o):(void 0!==i.failureCallBkFn&&null!=i.failureCallBkFn&&i.failureCallBkFn(o),"ERROR")},HandleDownloadHTTPPostPDF:async(i={endPointURI:"",parameters:{},data:{}})=>{void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.show(i.loadingMessage);const o=await t.post(i.endPointURI,i.data,{responseType:"blob"});return void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.hide(),"ERROR"!==o?(void 0!==i.successCallBkFn&&null!=i.successCallBkFn&&i.successCallBkFn(o),o):(void 0!==i.failureCallBkFn&&null!=i.failureCallBkFn&&i.failureCallBkFn(o),"ERROR")}}},xi=re({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,i)=>{e.value=i.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Fi=xi.actions;var Wi=xi.reducer,ki={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>©</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},Gi={admin:"admin",ORGANIZATION_SINGULAR:"organization",ORGANIZATION_PLURAL:"organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"organizationmember",ORGANIZATION_MEMBER_PLURAL:"organizationmembers",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"organizationrank",ORGANIZATION_RANK_PLURAL:"organizationranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"organizationunit",ORGANIZATION_UNIT_PLURAL:"organizationunits",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"organizationunittype",ORGANIZATION_UNIT_TYPE_PLURAL:"organizationunittypes",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"systemapplication",SYSTEM_APPLICATION_PLURAL:"systemapplications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"systemapplicationauthority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"systemapplicationauthorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"systemapplicationmodule",SYSTEM_APPLICATION_MODULE_PLURAL:"systemapplicationmodules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"systemapplicationrole",SYSTEM_APPLICATION_ROLE_PLURAL:"systemapplicationroles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id"};var Yi={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>©</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},Vi={admin:"admin",ORGANIZATION_SINGULAR:"Organization",ORGANIZATION_PLURAL:"Organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"Member",ORGANIZATION_MEMBER_PLURAL:"Members",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"Rank",ORGANIZATION_RANK_PLURAL:"Ranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"Organization Unit",ORGANIZATION_UNIT_PLURAL:"Organization Units",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"Organization uUnit Type",ORGANIZATION_UNIT_TYPE_PLURAL:"Organization Unit Types",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"Application",SYSTEM_APPLICATION_PLURAL:"Applications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"Authority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"Authorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME:"Authority Name",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"Application Module",SYSTEM_APPLICATION_MODULE_PLURAL:"Application Modules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_CODE:"Module Code",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"Role",SYSTEM_APPLICATION_ROLE_PLURAL:"Roles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id",PERSON_IS_ACTIVE:"Active"};const qi={en:{translation:{...Yi,...Vi,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"Blueprint",BLUE_PRINT_PLURAL:"Blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"dashboard",DASHBOARD_PLURAL:"dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"Data Query",DATA_QUERY_PLURAL:"Data Queries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_NAME:"Body Name",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"Mail Template",MAIL_TEMPLATE_PLURAL:"Mail Templates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"Report",REPORT_PLURAL:"Reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id"}}},ar:{translation:{...ki,...Gi,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"blueprint",BLUE_PRINT_PLURAL:"blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"dashboard",DASHBOARD_PLURAL:"dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"dataquery",DATA_QUERY_PLURAL:"dataqueries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"mailtemplate",MAIL_TEMPLATE_PLURAL:"mailtemplates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"report",REPORT_PLURAL:"reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id"}}}};pe.use(ce).init({resources:qi,lng:localStorage.getItem("language")||"en",fallbackLng:"en"});const Ki=t=>{const[o,a]=Z(!1),{t:r}=me();return{ConfirmationWindow:()=>e(p,{open:o,children:[i(c,{children:t.title}),i(m,{children:i(_,{children:t.body})}),e(A,{children:[i(T,{variant:"contained",color:"primary",onClick:()=>{a(!1)},children:r("NO_LABEL")}),i(T,{variant:"contained",color:"error",onClick:()=>{t.onConfirmationCallBk(),a(!1)},autoFocus:!0,children:r("YES_LABEL")})]})]}),open:o,setOpen:a}},zi=()=>{const e=a((e=>e.UserSession)),i=e.value;return{UserSession:e,isUserAuthorized:i=>{if(e?.value?.authorities)for(let t of e.value.authorities)if("DEVELOPMENT_ADMIN"===t?.authority||t?.authority===i)return!0;return!1},UserInfo:i}},Hi=t=>{const[o,a]=Z(!1);return{windowState:o,setWindowState:a,Window:r=>i(u,{open:o,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!o&&t?.onCloseCallBack&&t.onCloseCallBack()},children:e(E,{sx:{position:"absolute",top:"50%",left:"50%",maxHeight:"90%",transform:"translate(-50%, -50%)",height:t?.height||"80%",width:t?.width||"90%",minWidth:t.minWidth||400,minHeight:t.minHeight||200,overflow:"hidden",bgcolor:"modalBackground.main",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:[i(f,{position:"static",children:e(I,{variant:"dense",children:[i(ae,{icon:t?.windowIcon||"window-maximize",style:{marginRight:5}}),i(O,{variant:"h6",color:"inherit",component:"div",children:t?.windowTitle||"window"}),i("div",{style:{flexGrow:1}}),i(N,{onClick:()=>{a(!1),null!=t.onCloseCallBack&&null!=t.onCloseCallBack&&t.onCloseCallBack()},color:"secondary",children:i(ae,{icon:"xmark-square"})})]})}),i(y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:r?.children})]})})}},Qi=re({name:"loadingMask",initialState:{stores:{},storeKeys:[]},reducers:{setStoresMetaData:(e,i)=>{e.stores=i.payload,e.storeKeys=Object.keys(i.payload)},setStoreData:(e,i)=>{e.stores[i.payload.storeKey].data=i.payload.data}}}),{setStoreData:Zi,setStoresMetaData:ji}=Qi.actions;var $i=Qi.reducer;const Xi=e=>{const i=a((e=>e.commonStores.stores)),t=o(),r=zi(),{handleGetRequest:d,handlePostRequest:l,handleDeleteRequest:n}=Bi();return{reloadData:async o=>{if(e?.commonStoreKey){const o=Object.keys(i);for(const a of o)if(a===e.commonStoreKey&&(void 0===i[a]?.authority||null===i[a]?.authority||r.isUserAuthorized(i[a]?.authority))&&""!=i[a]?.url){await d({endPointURI:i[a].url,showMask:!1,successCallBkFn:i=>{t(Zi({storeKey:a,data:i.data})),e.setData(i.data)},failureCallBkFn:()=>{t(Zi({storeKey:a,data:[]})),e.setData([])}});break}}else e?.findAll&&await d({endPointURI:e.findAll,showMask:!0,parameters:o||{},successCallBkFn:i=>{e.setData(i.data)}})},loadRecordById:async i=>{let t=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=i,await d({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{t=e.data}})}return t},saveRecord:async i=>{let t=null;return e?.save&&await l({endPointURI:e.save,data:i,showMask:!0,successCallBkFn:e=>{t=e.data}}),t},deleteRecordById:async i=>{let t=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=i,await n({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{t=!0},failureCallBkFn:()=>{t=!1}})}return t}}},Ji=e=>{const{t:o}=me();return i(R,{...e,slotProps:{inputLabel:{shrink:!0}},label:i(t,{children:e?.label?o(e.label):""})})};function et(e,i){return e.filter((e=>-1===i.indexOf(e)))}function it(e,i){return e.filter((e=>-1!==i.indexOf(e)))}const tt=({valueField:t="id",displayField:o="name",options:a=[],selectedOptions:r=[],setSelection:d})=>{const[l,n]=H.useState([]),[s,p]=H.useState([]),[c,m]=H.useState([]),[_,A]=H.useState(""),[T,u]=H.useState(""),f=it(l,s),I=it(l,c);H.useEffect((()=>{a&&p([...a])}),[a]),H.useEffect((()=>{r&&m([...r])}),[r]);const O=e=>()=>{const i=l.indexOf(e),t=[...l];-1===i?t.push(e):t.splice(i,1),n(t)},N=e=>it(l,e).length,y=e=>()=>{var i,t;N(e)===e.length?n(et(l,e)):n((i=l,t=e,[...i,...et(t,i)]))},R=(a,r,d)=>{const n=r.filter((e=>{if(e[o]){const i=e[o];if("left"===d&&i.toLocaleLowerCase().includes(_.toLocaleLowerCase()))return!0;if("right"===d&&i.toLocaleLowerCase().includes(T.toLocaleLowerCase()))return!0}return!1}));return e(Ae,{sx:{height:"100%"},children:[i(Te,{sx:{px:2,py:1},avatar:i(fe,{onClick:y(n),checked:N(n)===n.length&&0!==n.length,indeterminate:N(n)!==n.length&&0!==N(n),disabled:0===n.length,inputProps:{"aria-label":"all items selected"}}),title:a,subheader:`${N(r)} / ${r.length} Selected`}),i(E,{sx:{width:"100%",padding:1},children:i(Ji,{fullWidth:!0,label:"search",value:"left"===d?_:T,onChange:e=>{"left"===d?A(e.target.value):u(e.target.value)}})}),i(Oe,{}),i(_e,{sx:{width:"100%",height:"100%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:n.map((a=>(a[t],e(h,{role:"listitem",onClick:O(a),sx:{cursor:"pointer"},children:[i(Ee,{children:i(fe,{checked:-1!==l.indexOf(a),tabIndex:-1,disableRipple:!0})}),i(ue,{id:a[t],primary:a[o]})]},a[t]))))})]})};return e(L,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[i(L,{sx:{height:"100%",flex:1},children:R("Available Items",s,"left")}),i(L,{children:e(L,{container:!0,direction:"column",alignItems:"center",children:[i(Ie,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{m((e=>{let i=c.concat(f);return d(i),i})),p(et(s,f)),n(et(l,f))},disabled:0===f.length,"aria-label":"move selected right",children:">"}),i(Ie,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(s.concat(I)),m((e=>{let i=et(c,I);return d(i),i})),n(et(l,I))},disabled:0===I.length,"aria-label":"move selected left",children:"<"})]})}),i(L,{sx:{height:"100%",flex:1},children:R("Currently Selected",c,"right")})]})},ot=e=>i(Ne,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map((e=>({dataKey:e,label:e})))}),at=t=>e(y,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[i(E,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:i("div",{children:t.record[t.valueField]})}),i(O,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]})]}),rt=o=>e(t,{children:[i(O,{sx:{fontSize:16,fontWeight:"bold"},children:o.record[o.labelField]}),i(ye,{width:200,height:200,value:o.record[o.valueField],valueMax:o.total})]}),dt=e=>i(Re,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map((e=>({dataKey:e,label:e})))});function lt(t){return e(Pe,{sx:{display:"flex",alignItems:"center"},children:[i(Pe,{sx:{width:"100%",mr:1},children:i(Le,{variant:"determinate",...t})}),i(Pe,{sx:{minWidth:35},children:i(he,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(t.value)}%`})})]})}const nt=t=>e(Pe,{sx:{width:"100%"},children:[i(he,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]}),i(lt,{value:t.record[t.valueField]/t.total*100})]}),st=e=>{const t=e.data.map(((i,t)=>({id:t,value:i[e.valueField],label:i[e.labelField]+""})));return i(Me,{series:[{data:t}]})},pt=e=>{const{t:t}=me();return i(P,{sx:e.sx,disabled:e.disabled||!1,required:e.required||!1,control:i(M,{checked:e?.checkedValue==e.value||"true"===e.value||"1"==e.value,onChange:i=>{void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&(i.target.checked?void 0!==e.checkedValue&&null!=e.checkedValue?e.onChangeCallBack(e.checkedValue):e.onChangeCallBack(!0):void 0!==e.unCheckedValue&&null!=e.unCheckedValue?e.onChangeCallBack(e.unCheckedValue):e.onChangeCallBack(!1))}}),label:t(e.label)})},ct=e=>{const t=a((e=>e.AppLayout)),{t:o}=me();return i(D,{sx:e.sx,value:(i=>{for(let t of e.options)if(t[e.valueField]==i)return t;return null})(e.value),options:e.options,disabled:e.disabled,onChange:(i,t)=>{if(void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack)if(null!=t){let i=t[e.valueField];e.onChangeCallBack(i,t)}else e.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:i=>null!=i?o(i[e.displayField]):"",renderOption:(t,a)=>i("li",{...t,children:null!=a?o(a[e.displayField]):""}),slots:{popper:e=>i(C,{...e,style:{...e.style,direction:t.appDirection}})},renderInput:t=>i(R,{...t,required:e.required||!1,variant:"outlined",InputLabelProps:{shrink:!0},label:o(e.label),error:null!=e.errorMessage&&void 0!==e.errorMessage,helperText:null!=e.errorMessage&&void 0!==e.errorMessage?o(e.errorMessage):""})})},mt="YYYY-MM-DD",_t="YYYY-MM-DD HH:mm:ss",At="#37505C",Tt="#ff6d00",ut="#ea690e",Et="#74776B",ft=e=>{const{t:o}=me();return i(De,{dateAdapter:Se,children:i(Ce,{value:null!=e.value&&void 0!==e.value&&""!==e.value?ge(e.value,e?.format||mt):null,sx:e.sx,label:o(e.label),format:e?.format||mt,disabled:e.disabled,onChange:i=>{let t=null;null!=i&&i.isValid()&&(t=i.format(e?.format||mt)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(t)},slotProps:{textField:{InputLabelProps:{shrink:!0},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?i(t,{children:o(e.errorMessage)}):i(t,{})}}})})},It=e=>{const{t:o}=me();return i(De,{dateAdapter:Se,children:i(be,{value:null!=e.value&&void 0!==e.value&&""!==e.value?ge(e.value,e?.format||_t):null,label:o(e.label),sx:e.sx,format:e?.format||_t,disabled:e.disabled,onChange:i=>{let t=null;null!=i&&i.isValid()&&(t=i.format(e?.format||_t)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(t)},slotProps:{textField:{variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?i(t,{children:o(e.errorMessage)}):i(t,{})}}})})};function Ot(e,...i){const t=new URL(`https://mui.com/production-error/?code=${e}`);return i.forEach((e=>t.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${t} for the full message.`}function Nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yt,Rt={exports:{}},Lt={exports:{}},ht={};var Pt,Mt,Dt,Ct,bt,St,gt,Ut,vt,wt,Bt,xt,Ft,Wt,kt,Gt={};
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useDispatch as o,useSelector as a,Provider as r}from"react-redux";import{library as d}from"@fortawesome/fontawesome-svg-core";import{fab as n}from"@fortawesome/free-brands-svg-icons";import{far as l}from"@fortawesome/free-regular-svg-icons";import{fas as s}from"@fortawesome/free-solid-svg-icons";import"react-toastify/dist/ReactToastify.css";import{Dialog as p,DialogTitle as c,DialogContent as m,DialogContentText as u,DialogActions as A,Button as T,Modal as _,Box as E,AppBar as f,Toolbar as I,Typography as O,IconButton as N,Paper as y,TextField as h,Grid2 as R,ListItemButton as L,FormControlLabel as C,Checkbox as D,Autocomplete as M,Popper as P,Avatar as b,Tooltip as g,styled as S,Badge as U,Divider as v,MenuItem as w,InputAdornment as x,Accordion as B,AccordionSummary as F,AccordionDetails as k,useTheme as W,Backdrop as G,CircularProgress as Y,createTheme as V}from"@mui/material";export*from"@mui/material";import{ThemeContext as q,CacheProvider as K,ThemeProvider as H}from"@emotion/react";import*as z from"react";import Z,{useState as Q,useEffect as j,createElement as $}from"react";import{styled as X,alpha as J,useTheme as ee}from"@mui/material/styles";import te from"@mui/material/CssBaseline";import ie from"@mui/material/AppBar";import oe from"@mui/material/Toolbar";import{FontAwesomeIcon as ae}from"@fortawesome/react-fontawesome";export{FontAwesomeIcon}from"@fortawesome/react-fontawesome";import{createSlice as re,configureStore as de}from"@reduxjs/toolkit";import{toast as ne,ToastContainer as le}from"react-toastify";export{toast}from"react-toastify";import se from"axios";import pe from"i18next";import{initReactI18next as ce,useTranslation as me}from"react-i18next";import ue from"@mui/material/List";import Ae from"@mui/material/Card";import Te from"@mui/material/CardHeader";import _e from"@mui/material/ListItemText";import Ee from"@mui/material/ListItemIcon";import fe from"@mui/material/Checkbox";import Ie from"@mui/material/Button";import Oe from"@mui/material/Divider";import{BarChart as Ne,Gauge as ye,LineChart as he}from"@mui/x-charts";import Re from"@mui/material/LinearProgress";import Le from"@mui/material/Typography";import Ce from"@mui/material/Box";import{PieChart as De}from"@mui/x-charts/PieChart";import{LocalizationProvider as Me,DatePicker as Pe,DateTimePicker as be}from"@mui/x-date-pickers";import{AdapterMoment as ge}from"@mui/x-date-pickers/AdapterMoment";import Se from"moment";import*as Ue from"zod";import{z as ve}from"zod";export*from"zod";import{useForm as we}from"react-hook-form";import{zodResolver as xe}from"@hookform/resolvers/zod";import{useNavigate as Be,useParams as Fe,Routes as ke,Route as We,BrowserRouter as Ge}from"react-router-dom";import Ye from"@mui/material/CardActions";import Ve from"@mui/material/CardContent";import qe from"@mui/material/CardMedia";import{QuickFilter as Ke,ToolbarButton as He,Toolbar as ze,ColumnsPanelTrigger as Ze,GridViewColumnIcon as Qe,FilterPanelTrigger as je,GridFilterListIcon as $e,ExportExcel as Xe,QuickFilterTrigger as Je,QuickFilterControl as et,QuickFilterClear as tt,GridActionsCellItem as it,GridExpandMoreIcon as ot,DataGridPremium as at,GridRowModes as rt}from"@mui/x-data-grid-premium";import dt from"@mui/material/IconButton";import nt from"@mui/material/Drawer";import{animated as lt,useSpring as st}from"@react-spring/web";import pt from"@mui/material/Collapse";import{RichTreeView as ct}from"@mui/x-tree-view/RichTreeView";import{treeItemClasses as mt}from"@mui/x-tree-view/TreeItem";import{useTreeItem2 as ut}from"@mui/x-tree-view/useTreeItem2";import{TreeItem2Root as At,TreeItem2Content as Tt,TreeItem2IconContainer as _t,TreeItem2Checkbox as Et,TreeItem2Label as ft}from"@mui/x-tree-view/TreeItem2";import{TreeItem2Icon as It}from"@mui/x-tree-view/TreeItem2Icon";import{TreeItem2Provider as Ot}from"@mui/x-tree-view/TreeItem2Provider";import{TreeItem2DragAndDropOverlay as Nt}from"@mui/x-tree-view/TreeItem2DragAndDropOverlay";import yt from"stylis-plugin-rtl";import{prefixer as ht}from"stylis";import Rt from"@emotion/cache";import Lt from"@emotion/styled";import{grey as Ct}from"@mui/material/colors";import Dt from"@mui/material/SwipeableDrawer";import{LicenseInfo as Mt}from"@mui/x-license";export*from"@mui/lab";export*from"@mui/x-tree-view/models";!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===i&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("html,\r\nbody {\r\n height: 100vh;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n#root {\r\n height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n overflow: hidden;\r\n}\r\n\r\n.red-row {\r\n background-color: #f0d8d8;\r\n}\r\n");const Pt=(e=768)=>{const[t,i]=Q(window.innerWidth<e);return j((()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[e]),t},bt=350,gt=re({name:"AppLayout",initialState:{themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),St=gt.actions;var Ut=gt.reducer;const vt=re({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,t)=>{e.value.isOpened=!0,e.value.message=t.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:wt,hideLoadingMask:xt}=vt.actions;var Bt=vt.reducer;const Ft=()=>{const e=o();return{show:t=>{e(wt(t))},hide:()=>{e(xt())}}},kt=()=>{const e=Ft(),t=a((e=>e.AppInfo.value.apiBaseUrl)),i=se.create({baseURL:t,timeout:6e5,withCredentials:!0});i.defaults.withCredentials=!0,i.interceptors.response.use((e=>e),(e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))ne.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&403===e.response.status)))ne.error("you aren't authorized to process this request");else if(e&&(e.response&&(e.response.status&&500===e.response.status)))if(e.response.data instanceof Blob){e.response.data.text().then((e=>{ne.error(e)}))}else ne.error(e.response.data);else ne.error("failed to communicate with the server ... try again later");return"ERROR"}));return{handleGetRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const o=await i.get(t.endPointURI,{params:{...t.parameters},withCredentials:!0,headers:t.headers,responseType:t?.responseType});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==o?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(o),o):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(o),"ERROR")},handlePostRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let o=await i.post(t.endPointURI,t.data,{params:t.parameters,responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==o?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(o),o):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(o),"ERROR")},handleDeleteRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let o=await i.delete(t.endPointURI,{params:{...t.parameters},responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==o?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(o),o):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(o),"ERROR")},HandleDownloadHTTPPostPDF:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const o=await i.post(t.endPointURI,t.data,{responseType:"blob"});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==o?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(o),o):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(o),"ERROR")},handleUploadRequest:async t=>{if(null===t.files||0===t.files.length)return ne.error("You must add files to upload"),"ERROR";const o=new FormData;for(const e of t.files)o.append("files",e);void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let a=await i.post(t.endPointURI,o,{params:t?.parameters,headers:{"Content-Type":"multipart/form-data"}});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==a?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(a),a):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(a),"ERROR")}}},Wt=re({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Gt=Wt.actions;var Yt=Wt.reducer,Vt={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>©</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},qt={admin:"admin",ORGANIZATION_SINGULAR:"organization",ORGANIZATION_PLURAL:"organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"organizationmember",ORGANIZATION_MEMBER_PLURAL:"organizationmembers",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"organizationrank",ORGANIZATION_RANK_PLURAL:"organizationranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"organizationunit",ORGANIZATION_UNIT_PLURAL:"organizationunits",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"organizationunittype",ORGANIZATION_UNIT_TYPE_PLURAL:"organizationunittypes",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"systemapplication",SYSTEM_APPLICATION_PLURAL:"systemapplications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"systemapplicationauthority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"systemapplicationauthorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"systemapplicationmodule",SYSTEM_APPLICATION_MODULE_PLURAL:"systemapplicationmodules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"systemapplicationrole",SYSTEM_APPLICATION_ROLE_PLURAL:"systemapplicationroles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id"};var Kt={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>©</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},Ht={admin:"admin",ORGANIZATION_SINGULAR:"Organization",ORGANIZATION_PLURAL:"Organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"Member",ORGANIZATION_MEMBER_PLURAL:"Members",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"Rank",ORGANIZATION_RANK_PLURAL:"Ranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"Organization Unit",ORGANIZATION_UNIT_PLURAL:"Organization Units",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"Organization uUnit Type",ORGANIZATION_UNIT_TYPE_PLURAL:"Organization Unit Types",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"Application",SYSTEM_APPLICATION_PLURAL:"Applications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"Authority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"Authorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME:"Authority Name",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"Application Module",SYSTEM_APPLICATION_MODULE_PLURAL:"Application Modules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_CODE:"Module Code",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"Role",SYSTEM_APPLICATION_ROLE_PLURAL:"Roles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id",PERSON_IS_ACTIVE:"Active"};const zt={en:{translation:{...Kt,...Ht,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"Blueprint",BLUE_PRINT_PLURAL:"Blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"dashboard",DASHBOARD_PLURAL:"dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"Data Query",DATA_QUERY_PLURAL:"Data Queries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_NAME:"Body Name",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"Mail Template",MAIL_TEMPLATE_PLURAL:"Mail Templates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"Report",REPORT_PLURAL:"Reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory"}}},ar:{translation:{...Vt,...qt,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"blueprint",BLUE_PRINT_PLURAL:"blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"dashboard",DASHBOARD_PLURAL:"dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"dataquery",DATA_QUERY_PLURAL:"dataqueries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"mailtemplate",MAIL_TEMPLATE_PLURAL:"mailtemplates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"report",REPORT_PLURAL:"reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory"}}}};pe.use(ce).init({resources:zt,lng:localStorage.getItem("language")||"en",fallbackLng:"en"});const Zt=i=>{const[o,a]=Q(!1),{t:r}=me();return{ConfirmationWindow:()=>e(p,{open:o,children:[t(c,{children:i.title}),t(m,{children:t(u,{children:i.body})}),e(A,{children:[t(T,{variant:"contained",color:"primary",onClick:()=>{a(!1)},children:r("NO_LABEL")}),t(T,{variant:"contained",color:"error",onClick:()=>{i.onConfirmationCallBk(),a(!1)},autoFocus:!0,children:r("YES_LABEL")})]})]}),open:o,setOpen:a}},Qt=()=>{const e=a((e=>e.UserSession)),t=e.value;return{UserSession:e,isUserAuthorized:t=>{if(e?.value?.authorities)for(let i of e.value.authorities){if("DEVELOPMENT_ADMIN"===t&&("DEVELOPMENT_ADMIN"===i?.authority||"ORGANIZATION_ADMIN"===i?.authority))return!0;if("ORGANIZATION_ADMIN"===t&&"ORGANIZATION_ADMIN"===i?.authority)return!0;if("DEVELOPMENT_ADMIN"!==t&&"ORGANIZATION_ADMIN"!==t&&("ORGANIZATION_ADMIN"===i?.authority||"DEVELOPMENT_ADMIN"===i?.authority||"SYSTEM_ADMIN"===i?.authority||i?.authority===t))return!0}return!1},UserInfo:t}},jt=i=>{const[o,a]=Q(!1);return{windowState:o,setWindowState:a,Window:r=>t(_,{open:o,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!o&&i?.onCloseCallBack&&i.onCloseCallBack()},children:e(E,{sx:{position:"absolute",top:"50%",left:"50%",maxHeight:"90%",transform:"translate(-50%, -50%)",height:i?.height||"80%",width:i?.width||"90%",minWidth:i.minWidth||400,minHeight:i.minHeight||200,overflow:"hidden",bgcolor:"modalBackground.main",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:[t(f,{position:"static",children:e(I,{variant:"dense",children:[t(ae,{icon:i?.windowIcon||"window-maximize",style:{marginRight:5}}),t(O,{variant:"h6",color:"inherit",component:"div",children:i?.windowTitle||"window"}),t("div",{style:{flexGrow:1}}),t(N,{onClick:()=>{a(!1),null!=i.onCloseCallBack&&null!=i.onCloseCallBack&&i.onCloseCallBack()},color:"secondary",children:t(ae,{icon:"xmark-square"})})]})}),t(y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:r?.children})]})})}},$t=re({name:"loadingMask",initialState:{stores:{},storeKeys:[]},reducers:{setStoresMetaData:(e,t)=>{e.stores=t.payload,e.storeKeys=Object.keys(t.payload)},setStoreData:(e,t)=>{e.stores[t.payload.storeKey].data=t.payload.data}}}),{setStoreData:Xt,setStoresMetaData:Jt}=$t.actions;var ei=$t.reducer;const ti=e=>{const t=a((e=>e.commonStores.stores)),i=o(),r=Qt(),{handleGetRequest:d,handlePostRequest:n,handleDeleteRequest:l}=kt();return{reloadData:async o=>{if(e?.commonStoreKey){const o=Object.keys(t);for(const a of o)if(a===e.commonStoreKey&&(void 0===t[a]?.authority||null===t[a]?.authority||r.isUserAuthorized(t[a]?.authority))&&""!=t[a]?.url){await d({endPointURI:t[a].url,showMask:!1,successCallBkFn:t=>{i(Xt({storeKey:a,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{i(Xt({storeKey:a,data:[]})),e.setData([])}});break}}else e?.findAll&&await d({endPointURI:e.findAll,showMask:!0,parameters:o||{},successCallBkFn:t=>{e.setData(t.data)}})},loadRecordById:async t=>{let i=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=t,await d({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async t=>{let i=null;return e?.save&&await n({endPointURI:e.save,data:t,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async t=>{let i=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=t,await l({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},ii=e=>{const{t:o}=me();return t(h,{...e,slotProps:{inputLabel:{shrink:!0}},label:t(i,{children:e?.label?o(e.label):""})})};function oi(e,t){return e.filter((e=>-1===t.indexOf(e)))}function ai(e,t){return e.filter((e=>-1!==t.indexOf(e)))}const ri=({valueField:i="id",displayField:o="name",options:a=[],selectedOptions:r=[],setSelection:d})=>{const[n,l]=z.useState([]),[s,p]=z.useState([]),[c,m]=z.useState([]),[u,A]=z.useState(""),[T,_]=z.useState(""),f=ai(n,s),I=ai(n,c);z.useEffect((()=>{a&&p([...a])}),[a]),z.useEffect((()=>{r&&m([...r])}),[r]);const O=e=>()=>{const t=n.indexOf(e),i=[...n];-1===t?i.push(e):i.splice(t,1),l(i)},N=e=>ai(n,e).length,y=e=>()=>{var t,i;N(e)===e.length?l(oi(n,e)):l((t=n,i=e,[...t,...oi(i,t)]))},h=(a,r,d)=>{const l=r.filter((e=>{if(e[o]){const t=e[o];if("left"===d&&t.toLocaleLowerCase().includes(u.toLocaleLowerCase()))return!0;if("right"===d&&t.toLocaleLowerCase().includes(T.toLocaleLowerCase()))return!0}return!1}));return e(Ae,{sx:{height:"100%"},children:[t(Te,{sx:{px:2,py:1},avatar:t(fe,{onClick:y(l),checked:N(l)===l.length&&0!==l.length,indeterminate:N(l)!==l.length&&0!==N(l),disabled:0===l.length,inputProps:{"aria-label":"all items selected"}}),title:a,subheader:`${N(r)} / ${r.length} Selected`}),t(E,{sx:{width:"100%",padding:1},children:t(ii,{fullWidth:!0,label:"search",value:"left"===d?u:T,onChange:e=>{"left"===d?A(e.target.value):_(e.target.value)}})}),t(Oe,{}),t(ue,{sx:{width:"100%",height:"100%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:l.map((a=>(a[i],e(L,{role:"listitem",onClick:O(a),sx:{cursor:"pointer"},children:[t(Ee,{children:t(fe,{checked:-1!==n.indexOf(a),tabIndex:-1,disableRipple:!0})}),t(_e,{id:a[i],primary:a[o]})]},a[i]))))})]})};return e(R,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[t(R,{sx:{height:"100%",flex:1},children:h("Available Items",s,"left")}),t(R,{children:e(R,{container:!0,direction:"column",alignItems:"center",children:[t(Ie,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{m((e=>{let t=c.concat(f);return d(t),t})),p(oi(s,f)),l(oi(n,f))},disabled:0===f.length,"aria-label":"move selected right",children:">"}),t(Ie,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(s.concat(I)),m((e=>{let t=oi(c,I);return d(t),t})),l(oi(n,I))},disabled:0===I.length,"aria-label":"move selected left",children:"<"})]})}),t(R,{sx:{height:"100%",flex:1},children:h("Currently Selected",c,"right")})]})},di=e=>t(Ne,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map((e=>({dataKey:e,label:e})))}),ni=i=>e(y,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[t(E,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:t("div",{children:i.record[i.valueField]})}),t(O,{sx:{fontSize:16,fontWeight:"bold"},children:i.record[i.labelField]})]}),li=o=>e(i,{children:[t(O,{sx:{fontSize:16,fontWeight:"bold"},children:o.record[o.labelField]}),t(ye,{width:200,height:200,value:o.record[o.valueField],valueMax:o.total})]}),si=e=>t(he,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map((e=>({dataKey:e,label:e})))});function pi(i){return e(Ce,{sx:{display:"flex",alignItems:"center"},children:[t(Ce,{sx:{width:"100%",mr:1},children:t(Re,{variant:"determinate",...i})}),t(Ce,{sx:{minWidth:35},children:t(Le,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(i.value)}%`})})]})}const ci=i=>e(Ce,{sx:{width:"100%"},children:[t(Le,{sx:{fontSize:16,fontWeight:"bold"},children:i.record[i.labelField]}),t(pi,{value:i.record[i.valueField]/i.total*100})]}),mi=e=>{const i=e.data.map(((t,i)=>({id:i,value:t[e.valueField],label:t[e.labelField]+""})));return t(De,{series:[{data:i}]})},ui=e=>{const{t:i}=me();return t(C,{sx:e.sx,disabled:e.disabled||!1,required:e.required||!1,control:t(D,{checked:e?.checkedValue==e.value||"true"===e.value||"1"==e.value,onChange:t=>{void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&(t.target.checked?void 0!==e.checkedValue&&null!=e.checkedValue?e.onChangeCallBack(e.checkedValue):e.onChangeCallBack(!0):void 0!==e.unCheckedValue&&null!=e.unCheckedValue?e.onChangeCallBack(e.unCheckedValue):e.onChangeCallBack(!1))}}),label:i(e.label)})},Ai=e=>{const i=a((e=>e.AppLayout)),{t:o}=me();return t(M,{sx:e.sx,value:(t=>{for(let i of e.options)if(i[e.valueField]==t)return i;return null})(e.value),options:e.options,disabled:e.disabled,onChange:(t,i)=>{if(void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack)if(null!=i){let t=i[e.valueField];e.onChangeCallBack(t,i)}else e.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:t=>null!=t?o(t[e.displayField]):"",renderOption:(i,a)=>t("li",{...i,children:null!=a?o(a[e.displayField]):""}),slots:{popper:e=>t(P,{...e,style:{...e.style,direction:i.appDirection}})},renderInput:i=>t(h,{...i,required:e.required||!1,variant:"outlined",InputLabelProps:{shrink:!0},label:o(e.label),error:null!=e.errorMessage&&void 0!==e.errorMessage,helperText:null!=e.errorMessage&&void 0!==e.errorMessage?o(e.errorMessage):""})})},Ti="YYYY-MM-DD",_i="YYYY-MM-DD HH:mm:ss",Ei="#37505C",fi="#ff6d00",Ii="#ea690e",Oi="#74776B",Ni=e=>{const{t:o}=me();return t(Me,{dateAdapter:ge,children:t(Pe,{value:null!=e.value&&void 0!==e.value&&""!==e.value?Se(e.value,e?.format||Ti):null,sx:e.sx,label:o(e.label),format:e?.format||Ti,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||Ti)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t(i,{children:o(e.errorMessage)}):t(i,{})}}})})},yi=e=>{const{t:o}=me();return t(Me,{dateAdapter:ge,children:t(be,{value:null!=e.value&&void 0!==e.value&&""!==e.value?Se(e.value,e?.format||_i):null,label:o(e.label),sx:e.sx,format:e?.format||_i,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||_i)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t(i,{children:o(e.errorMessage)}):t(i,{})}}})})};function hi(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach((e=>i.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${i} for the full message.`}function Ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Li,Ci={exports:{}},Di={exports:{}},Mi={};var Pi,bi,gi,Si,Ui,vi,wi,xi,Bi,Fi,ki,Wi,Gi,Yi,Vi,qi={};
|
|
2
2
|
/** @license React v16.13.1
|
|
3
3
|
* react-is.development.js
|
|
4
4
|
*
|
|
@@ -6,12 +6,12 @@ import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{useDispat
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/function
|
|
9
|
+
*/function Ki(){return bi||(bi=1,"production"===process.env.NODE_ENV?Di.exports=function(){if(Li)return Mi;Li=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,n=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case l:case s:case o:case r:case a:case c:return e;default:switch(e=e&&e.$$typeof){case n:case p:case A:case u:case d:return e;default:return m}}case i:return m}}}function O(e){return I(e)===s}return Mi.AsyncMode=l,Mi.ConcurrentMode=s,Mi.ContextConsumer=n,Mi.ContextProvider=d,Mi.Element=t,Mi.ForwardRef=p,Mi.Fragment=o,Mi.Lazy=A,Mi.Memo=u,Mi.Portal=i,Mi.Profiler=r,Mi.StrictMode=a,Mi.Suspense=c,Mi.isAsyncMode=function(e){return O(e)||I(e)===l},Mi.isConcurrentMode=O,Mi.isContextConsumer=function(e){return I(e)===n},Mi.isContextProvider=function(e){return I(e)===d},Mi.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Mi.isForwardRef=function(e){return I(e)===p},Mi.isFragment=function(e){return I(e)===o},Mi.isLazy=function(e){return I(e)===A},Mi.isMemo=function(e){return I(e)===u},Mi.isPortal=function(e){return I(e)===i},Mi.isProfiler=function(e){return I(e)===r},Mi.isStrictMode=function(e){return I(e)===a},Mi.isSuspense=function(e){return I(e)===c},Mi.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===r||e===a||e===c||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===A||e.$$typeof===u||e.$$typeof===d||e.$$typeof===n||e.$$typeof===p||e.$$typeof===_||e.$$typeof===E||e.$$typeof===f||e.$$typeof===T)},Mi.typeOf=I,Mi}():Di.exports=(Pi||(Pi=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,n=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:var T=e.type;switch(T){case l:case s:case o:case r:case a:case c:return T;default:var _=T&&T.$$typeof;switch(_){case n:case p:case A:case u:case d:return _;default:return m}}case i:return m}}}var O=l,N=s,y=n,h=d,R=t,L=p,C=o,D=A,M=u,P=i,b=r,g=a,S=c,U=!1;function v(e){return I(e)===s}qi.AsyncMode=O,qi.ConcurrentMode=N,qi.ContextConsumer=y,qi.ContextProvider=h,qi.Element=R,qi.ForwardRef=L,qi.Fragment=C,qi.Lazy=D,qi.Memo=M,qi.Portal=P,qi.Profiler=b,qi.StrictMode=g,qi.Suspense=S,qi.isAsyncMode=function(e){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),v(e)||I(e)===l},qi.isConcurrentMode=v,qi.isContextConsumer=function(e){return I(e)===n},qi.isContextProvider=function(e){return I(e)===d},qi.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},qi.isForwardRef=function(e){return I(e)===p},qi.isFragment=function(e){return I(e)===o},qi.isLazy=function(e){return I(e)===A},qi.isMemo=function(e){return I(e)===u},qi.isPortal=function(e){return I(e)===i},qi.isProfiler=function(e){return I(e)===r},qi.isStrictMode=function(e){return I(e)===a},qi.isSuspense=function(e){return I(e)===c},qi.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===r||e===a||e===c||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===A||e.$$typeof===u||e.$$typeof===d||e.$$typeof===n||e.$$typeof===p||e.$$typeof===_||e.$$typeof===E||e.$$typeof===f||e.$$typeof===T)},qi.typeOf=I}()),qi)),Di.exports}
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
13
13
|
@license MIT
|
|
14
|
-
*/function Vt(){if(Ct)return Dt;Ct=1;var e=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;return Dt=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var i={},t=0;t<10;t++)i["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(i).map((function(e){return i[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,a){for(var r,d,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),n=1;n<arguments.length;n++){for(var s in r=Object(arguments[n]))i.call(r,s)&&(l[s]=r[s]);if(e){d=e(r);for(var p=0;p<d.length;p++)t.call(r,d[p])&&(l[d[p]]=r[d[p]])}}return l},Dt}function qt(){if(St)return bt;St=1;return bt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Kt(){return Ut?gt:(Ut=1,gt=Function.call.bind(Object.prototype.hasOwnProperty))}function zt(){if(wt)return vt;wt=1;var e=function(){};if("production"!==process.env.NODE_ENV){var i=qt(),t={},o=Kt();e=function(e){var i="Warning: "+e;"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}}}function a(a,r,d,l,n){if("production"!==process.env.NODE_ENV)for(var s in a)if(o(a,s)){var p;try{if("function"!=typeof a[s]){var c=Error((l||"React class")+": "+d+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}p=a[s](r,s,l,d,null,i)}catch(e){p=e}if(!p||p instanceof Error||e((l||"React class")+": type specification of "+d+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in t)){t[p.message]=!0;var m=n?n():"";e("Failed "+d+" type: "+p.message+(null!=m?m:""))}}}return a.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(t={})},vt=a}function Ht(){if(xt)return Bt;xt=1;var e=Yt(),i=Vt(),t=qt(),o=Kt(),a=zt(),r=function(){};function d(){return null}return"production"!==process.env.NODE_ENV&&(r=function(e){var i="Warning: "+e;"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}}),Bt=function(l,n){var s="function"==typeof Symbol&&Symbol.iterator;var p="<<anonymous>>",c={array:T("array"),bigint:T("bigint"),bool:T("boolean"),func:T("function"),number:T("number"),object:T("object"),string:T("string"),symbol:T("symbol"),any:A(d),arrayOf:function(e){return A((function(i,o,a,r,d){if("function"!=typeof e)return new _("Property `"+d+"` of component `"+a+"` has invalid PropType notation inside arrayOf.");var l=i[o];if(!Array.isArray(l))return new _("Invalid "+r+" `"+d+"` of type `"+f(l)+"` supplied to `"+a+"`, expected an array.");for(var n=0;n<l.length;n++){var s=e(l,n,a,r,d+"["+n+"]",t);if(s instanceof Error)return s}return null}))},element:A((function(e,i,t,o,a){var r=e[i];return l(r)?null:new _("Invalid "+o+" `"+a+"` of type `"+f(r)+"` supplied to `"+t+"`, expected a single ReactElement.")})),elementType:A((function(i,t,o,a,r){var d=i[t];return e.isValidElementType(d)?null:new _("Invalid "+a+" `"+r+"` of type `"+f(d)+"` supplied to `"+o+"`, expected a single ReactElement type.")})),instanceOf:function(e){return A((function(i,t,o,a,r){if(!(i[t]instanceof e)){var d=e.name||p;return new _("Invalid "+a+" `"+r+"` of type `"+(((l=i[t]).constructor&&l.constructor.name?l.constructor.name:p)+"` supplied to `")+o+"`, expected instance of `"+d+"`.")}var l;return null}))},node:A((function(e,i,t,o,a){return E(e[i])?null:new _("Invalid "+o+" `"+a+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return A((function(i,a,r,d,l){if("function"!=typeof e)return new _("Property `"+l+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var n=i[a],s=f(n);if("object"!==s)return new _("Invalid "+d+" `"+l+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var p in n)if(o(n,p)){var c=e(n,p,r,d,l+"."+p,t);if(c instanceof Error)return c}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),d;return A((function(i,t,o,a,r){for(var d=i[t],l=0;l<e.length;l++)if(m(d,e[l]))return null;var n=JSON.stringify(e,(function(e,i){return"symbol"===I(i)?String(i):i}));return new _("Invalid "+a+" `"+r+"` of value `"+String(d)+"` supplied to `"+o+"`, expected one of "+n+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r("Invalid argument supplied to oneOfType, expected an instance of array."),d;for(var i=0;i<e.length;i++){var a=e[i];if("function"!=typeof a)return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(a)+" at index "+i+"."),d}return A((function(i,a,r,d,l){for(var n=[],s=0;s<e.length;s++){var p=(0,e[s])(i,a,r,d,l,t);if(null==p)return null;p.data&&o(p.data,"expectedType")&&n.push(p.data.expectedType)}return new _("Invalid "+d+" `"+l+"` supplied to `"+r+"`"+(n.length>0?", expected one of type ["+n.join(", ")+"]":"")+".")}))},shape:function(e){return A((function(i,o,a,r,d){var l=i[o],n=f(l);if("object"!==n)return new _("Invalid "+r+" `"+d+"` of type `"+n+"` supplied to `"+a+"`, expected `object`.");for(var s in e){var p=e[s];if("function"!=typeof p)return u(a,r,d,s,I(p));var c=p(l,s,a,r,d+"."+s,t);if(c)return c}return null}))},exact:function(e){return A((function(a,r,d,l,n){var s=a[r],p=f(s);if("object"!==p)return new _("Invalid "+l+" `"+n+"` of type `"+p+"` supplied to `"+d+"`, expected `object`.");var c=i({},a[r],e);for(var m in c){var A=e[m];if(o(e,m)&&"function"!=typeof A)return u(d,l,n,m,I(A));if(!A)return new _("Invalid "+l+" `"+n+"` key `"+m+"` supplied to `"+d+"`.\nBad object: "+JSON.stringify(a[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var T=A(s,m,d,l,n+"."+m,t);if(T)return T}return null}))}};function m(e,i){return e===i?0!==e||1/e==1/i:e!=e&&i!=i}function _(e,i){this.message=e,this.data=i&&"object"==typeof i?i:{},this.stack=""}function A(e){if("production"!==process.env.NODE_ENV)var i={},o=0;function a(a,d,l,s,c,m,A){if(s=s||p,m=m||l,A!==t){if(n){var T=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw T.name="Invariant Violation",T}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var u=s+":"+l;!i[u]&&o<3&&(r("You are manually calling a React.PropTypes validation function for the `"+m+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),i[u]=!0,o++)}}return null==d[l]?a?null===d[l]?new _("The "+c+" `"+m+"` is marked as required in `"+s+"`, but its value is `null`."):new _("The "+c+" `"+m+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(d,l,s,c,m)}var d=a.bind(null,!1);return d.isRequired=a.bind(null,!0),d}function T(e){return A((function(i,t,o,a,r,d){var l=i[t];return f(l)!==e?new _("Invalid "+a+" `"+r+"` of type `"+I(l)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null}))}function u(e,i,t,o,a){return new _((e||"React class")+": "+i+" type `"+t+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function E(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(E);if(null===e||l(e))return!0;var i=function(e){var i=e&&(s&&e[s]||e["@@iterator"]);if("function"==typeof i)return i}(e);if(!i)return!1;var t,o=i.call(e);if(i!==e.entries){for(;!(t=o.next()).done;)if(!E(t.value))return!1}else for(;!(t=o.next()).done;){var a=t.value;if(a&&!E(a[1]))return!1}return!0;default:return!1}}function f(e){var i=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,i){return"symbol"===e||!!i&&("Symbol"===i["@@toStringTag"]||"function"==typeof Symbol&&i instanceof Symbol)}(i,e)?"symbol":i}function I(e){if(null==e)return""+e;var i=f(e);if("object"===i){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return i}function O(e){var i=I(e);switch(i){case"array":case"object":return"an "+i;case"boolean":case"date":case"regexp":return"a "+i;default:return i}}return _.prototype=Error.prototype,c.checkPropTypes=a,c.resetWarningCache=a.resetWarningCache,c.PropTypes=c,c},Bt}function Qt(){if(Wt)return Ft;Wt=1;var e=qt();function i(){}function t(){}return t.resetWarningCache=i,Ft=function(){function o(i,t,o,a,r,d){if(d!==e){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function a(){return o}o.isRequired=o;var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:a,element:o,elementType:o,instanceOf:a,node:o,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:t,resetWarningCache:i};return r.PropTypes=r,r}}function Zt(){if(kt)return Rt.exports;if(kt=1,"production"!==process.env.NODE_ENV){var e=Yt();Rt.exports=Ht()(e.isElement,true)}else Rt.exports=Qt()();return Rt.exports}var jt=Nt(Zt());var $t,Xt={exports:{}},Jt={};function eo(){if($t)return Jt;$t=1;var e=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),r=Symbol.for("react.consumer"),d=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),n=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),_=Symbol.for("react.client.reference");function A(_){if("object"==typeof _&&null!==_){var A=_.$$typeof;switch(A){case e:switch(_=_.type){case t:case a:case o:case n:case s:case m:return _;default:switch(_=_&&_.$$typeof){case d:case l:case c:case p:case r:return _;default:return A}}case i:return A}}}return Jt.ContextConsumer=r,Jt.ContextProvider=d,Jt.Element=e,Jt.ForwardRef=l,Jt.Fragment=t,Jt.Lazy=c,Jt.Memo=p,Jt.Portal=i,Jt.Profiler=a,Jt.StrictMode=o,Jt.Suspense=n,Jt.SuspenseList=s,Jt.isContextConsumer=function(e){return A(e)===r},Jt.isContextProvider=function(e){return A(e)===d},Jt.isElement=function(i){return"object"==typeof i&&null!==i&&i.$$typeof===e},Jt.isForwardRef=function(e){return A(e)===l},Jt.isFragment=function(e){return A(e)===t},Jt.isLazy=function(e){return A(e)===c},Jt.isMemo=function(e){return A(e)===p},Jt.isPortal=function(e){return A(e)===i},Jt.isProfiler=function(e){return A(e)===a},Jt.isStrictMode=function(e){return A(e)===o},Jt.isSuspense=function(e){return A(e)===n},Jt.isSuspenseList=function(e){return A(e)===s},Jt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===t||e===a||e===o||e===n||e===s||"object"==typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===p||e.$$typeof===d||e.$$typeof===r||e.$$typeof===l||e.$$typeof===_||void 0!==e.getModuleId)},Jt.typeOf=A,Jt}var io,to,oo={};
|
|
14
|
+
*/function Hi(){if(Si)return gi;Si=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return gi=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,a){for(var r,d,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var s in r=Object(arguments[l]))t.call(r,s)&&(n[s]=r[s]);if(e){d=e(r);for(var p=0;p<d.length;p++)i.call(r,d[p])&&(n[d[p]]=r[d[p]])}}return n},gi}function zi(){if(vi)return Ui;vi=1;return Ui="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Zi(){return xi?wi:(xi=1,wi=Function.call.bind(Object.prototype.hasOwnProperty))}function Qi(){if(Fi)return Bi;Fi=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=zi(),i={},o=Zi();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function a(a,r,d,n,l){if("production"!==process.env.NODE_ENV)for(var s in a)if(o(a,s)){var p;try{if("function"!=typeof a[s]){var c=Error((n||"React class")+": "+d+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}p=a[s](r,s,n,d,null,t)}catch(e){p=e}if(!p||p instanceof Error||e((n||"React class")+": type specification of "+d+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in i)){i[p.message]=!0;var m=l?l():"";e("Failed "+d+" type: "+p.message+(null!=m?m:""))}}}return a.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},Bi=a}function ji(){if(Wi)return ki;Wi=1;var e=Ki(),t=Hi(),i=zi(),o=Zi(),a=Qi(),r=function(){};function d(){return null}return"production"!==process.env.NODE_ENV&&(r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ki=function(n,l){var s="function"==typeof Symbol&&Symbol.iterator;var p="<<anonymous>>",c={array:T("array"),bigint:T("bigint"),bool:T("boolean"),func:T("function"),number:T("number"),object:T("object"),string:T("string"),symbol:T("symbol"),any:A(d),arrayOf:function(e){return A((function(t,o,a,r,d){if("function"!=typeof e)return new u("Property `"+d+"` of component `"+a+"` has invalid PropType notation inside arrayOf.");var n=t[o];if(!Array.isArray(n))return new u("Invalid "+r+" `"+d+"` of type `"+f(n)+"` supplied to `"+a+"`, expected an array.");for(var l=0;l<n.length;l++){var s=e(n,l,a,r,d+"["+l+"]",i);if(s instanceof Error)return s}return null}))},element:A((function(e,t,i,o,a){var r=e[t];return n(r)?null:new u("Invalid "+o+" `"+a+"` of type `"+f(r)+"` supplied to `"+i+"`, expected a single ReactElement.")})),elementType:A((function(t,i,o,a,r){var d=t[i];return e.isValidElementType(d)?null:new u("Invalid "+a+" `"+r+"` of type `"+f(d)+"` supplied to `"+o+"`, expected a single ReactElement type.")})),instanceOf:function(e){return A((function(t,i,o,a,r){if(!(t[i]instanceof e)){var d=e.name||p;return new u("Invalid "+a+" `"+r+"` of type `"+(((n=t[i]).constructor&&n.constructor.name?n.constructor.name:p)+"` supplied to `")+o+"`, expected instance of `"+d+"`.")}var n;return null}))},node:A((function(e,t,i,o,a){return E(e[t])?null:new u("Invalid "+o+" `"+a+"` supplied to `"+i+"`, expected a ReactNode.")})),objectOf:function(e){return A((function(t,a,r,d,n){if("function"!=typeof e)return new u("Property `"+n+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[a],s=f(l);if("object"!==s)return new u("Invalid "+d+" `"+n+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var p in l)if(o(l,p)){var c=e(l,p,r,d,n+"."+p,i);if(c instanceof Error)return c}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),d;return A((function(t,i,o,a,r){for(var d=t[i],n=0;n<e.length;n++)if(m(d,e[n]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===I(t)?String(t):t}));return new u("Invalid "+a+" `"+r+"` of value `"+String(d)+"` supplied to `"+o+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r("Invalid argument supplied to oneOfType, expected an instance of array."),d;for(var t=0;t<e.length;t++){var a=e[t];if("function"!=typeof a)return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(a)+" at index "+t+"."),d}return A((function(t,a,r,d,n){for(var l=[],s=0;s<e.length;s++){var p=(0,e[s])(t,a,r,d,n,i);if(null==p)return null;p.data&&o(p.data,"expectedType")&&l.push(p.data.expectedType)}return new u("Invalid "+d+" `"+n+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return A((function(t,o,a,r,d){var n=t[o],l=f(n);if("object"!==l)return new u("Invalid "+r+" `"+d+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");for(var s in e){var p=e[s];if("function"!=typeof p)return _(a,r,d,s,I(p));var c=p(n,s,a,r,d+"."+s,i);if(c)return c}return null}))},exact:function(e){return A((function(a,r,d,n,l){var s=a[r],p=f(s);if("object"!==p)return new u("Invalid "+n+" `"+l+"` of type `"+p+"` supplied to `"+d+"`, expected `object`.");var c=t({},a[r],e);for(var m in c){var A=e[m];if(o(e,m)&&"function"!=typeof A)return _(d,n,l,m,I(A));if(!A)return new u("Invalid "+n+" `"+l+"` key `"+m+"` supplied to `"+d+"`.\nBad object: "+JSON.stringify(a[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var T=A(s,m,d,n,l+"."+m,i);if(T)return T}return null}))}};function m(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function u(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function A(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function a(a,d,n,s,c,m,A){if(s=s||p,m=m||n,A!==i){if(l){var T=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw T.name="Invariant Violation",T}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var _=s+":"+n;!t[_]&&o<3&&(r("You are manually calling a React.PropTypes validation function for the `"+m+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[_]=!0,o++)}}return null==d[n]?a?null===d[n]?new u("The "+c+" `"+m+"` is marked as required in `"+s+"`, but its value is `null`."):new u("The "+c+" `"+m+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(d,n,s,c,m)}var d=a.bind(null,!1);return d.isRequired=a.bind(null,!0),d}function T(e){return A((function(t,i,o,a,r,d){var n=t[i];return f(n)!==e?new u("Invalid "+a+" `"+r+"` of type `"+I(n)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null}))}function _(e,t,i,o,a){return new u((e||"React class")+": "+t+" type `"+i+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function E(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(E);if(null===e||n(e))return!0;var t=function(e){var t=e&&(s&&e[s]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var i,o=t.call(e);if(t!==e.entries){for(;!(i=o.next()).done;)if(!E(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!E(a[1]))return!1}return!0;default:return!1}}function f(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function I(e){if(null==e)return""+e;var t=f(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function O(e){var t=I(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return u.prototype=Error.prototype,c.checkPropTypes=a,c.resetWarningCache=a.resetWarningCache,c.PropTypes=c,c},ki}function $i(){if(Yi)return Gi;Yi=1;var e=zi();function t(){}function i(){}return i.resetWarningCache=t,Gi=function(){function o(t,i,o,a,r,d){if(d!==e){var n=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw n.name="Invariant Violation",n}}function a(){return o}o.isRequired=o;var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:a,element:o,elementType:o,instanceOf:a,node:o,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:t};return r.PropTypes=r,r}}function Xi(){if(Vi)return Ci.exports;if(Vi=1,"production"!==process.env.NODE_ENV){var e=Ki();Ci.exports=ji()(e.isElement,true)}else Ci.exports=$i()();return Ci.exports}var Ji=Ri(Xi());var eo,to={exports:{}},io={};function oo(){if(eo)return io;eo=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),r=Symbol.for("react.consumer"),d=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),u=Symbol.for("react.client.reference");function A(u){if("object"==typeof u&&null!==u){var A=u.$$typeof;switch(A){case e:switch(u=u.type){case i:case a:case o:case l:case s:case m:return u;default:switch(u=u&&u.$$typeof){case d:case n:case c:case p:case r:return u;default:return A}}case t:return A}}}return io.ContextConsumer=r,io.ContextProvider=d,io.Element=e,io.ForwardRef=n,io.Fragment=i,io.Lazy=c,io.Memo=p,io.Portal=t,io.Profiler=a,io.StrictMode=o,io.Suspense=l,io.SuspenseList=s,io.isContextConsumer=function(e){return A(e)===r},io.isContextProvider=function(e){return A(e)===d},io.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},io.isForwardRef=function(e){return A(e)===n},io.isFragment=function(e){return A(e)===i},io.isLazy=function(e){return A(e)===c},io.isMemo=function(e){return A(e)===p},io.isPortal=function(e){return A(e)===t},io.isProfiler=function(e){return A(e)===a},io.isStrictMode=function(e){return A(e)===o},io.isSuspense=function(e){return A(e)===l},io.isSuspenseList=function(e){return A(e)===s},io.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===o||e===l||e===s||"object"==typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===p||e.$$typeof===d||e.$$typeof===r||e.$$typeof===n||e.$$typeof===u||void 0!==e.getModuleId)},io.typeOf=A,io}var ao,ro,no={};
|
|
15
15
|
/**
|
|
16
16
|
* @license React
|
|
17
17
|
* react-is.development.js
|
|
@@ -20,7 +20,7 @@ object-assign
|
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the MIT license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/function ao(){return io||(io=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var A=e.$$typeof;switch(A){case i:switch(e=e.type){case o:case r:case a:case s:case p:case _:return e;default:switch(e=e&&e.$$typeof){case l:case n:case m:case c:case d:return e;default:return A}}case t:return A}}}var i=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),l=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),_=Symbol.for("react.view_transition"),A=Symbol.for("react.client.reference");oo.ContextConsumer=d,oo.ContextProvider=l,oo.Element=i,oo.ForwardRef=n,oo.Fragment=o,oo.Lazy=m,oo.Memo=c,oo.Portal=t,oo.Profiler=r,oo.StrictMode=a,oo.Suspense=s,oo.SuspenseList=p,oo.isContextConsumer=function(i){return e(i)===d},oo.isContextProvider=function(i){return e(i)===l},oo.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},oo.isForwardRef=function(i){return e(i)===n},oo.isFragment=function(i){return e(i)===o},oo.isLazy=function(i){return e(i)===m},oo.isMemo=function(i){return e(i)===c},oo.isPortal=function(i){return e(i)===t},oo.isProfiler=function(i){return e(i)===r},oo.isStrictMode=function(i){return e(i)===a},oo.isSuspense=function(i){return e(i)===s},oo.isSuspenseList=function(i){return e(i)===p},oo.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===r||e===a||e===s||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===n||e.$$typeof===A||void 0!==e.getModuleId)},oo.typeOf=e}()),oo}function ro(){return to||(to=1,"production"===process.env.NODE_ENV?Xt.exports=eo():Xt.exports=ao()),Xt.exports}var lo=ro();function no(e){if("object"!=typeof e||null===e)return!1;const i=Object.getPrototypeOf(e);return!(null!==i&&i!==Object.prototype&&null!==Object.getPrototypeOf(i)||Symbol.toStringTag in e||Symbol.iterator in e)}function so(e){if(H.isValidElement(e)||lo.isValidElementType(e)||!no(e))return e;const i={};return Object.keys(e).forEach((t=>{i[t]=so(e[t])})),i}function po(e,i,t={clone:!0}){const o=t.clone?{...e}:e;return no(e)&&no(i)&&Object.keys(i).forEach((a=>{H.isValidElement(i[a])||lo.isValidElementType(i[a])?o[a]=i[a]:no(i[a])&&Object.prototype.hasOwnProperty.call(e,a)&&no(e[a])?o[a]=po(e[a],i[a],t):t.clone?o[a]=no(i[a])?so(i[a]):i[a]:o[a]=i[a]})),o}function co(e){const{values:i={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:t="px",step:o=5,...a}=e,r=(e=>{const i=Object.keys(e).map((i=>({key:i,val:e[i]})))||[];return i.sort(((e,i)=>e.val-i.val)),i.reduce(((e,i)=>({...e,[i.key]:i.val})),{})})(i),d=Object.keys(r);function l(e){return`@media (min-width:${"number"==typeof i[e]?i[e]:e}${t})`}function n(e){return`@media (max-width:${("number"==typeof i[e]?i[e]:e)-o/100}${t})`}function s(e,a){const r=d.indexOf(a);return`@media (min-width:${"number"==typeof i[e]?i[e]:e}${t}) and (max-width:${(-1!==r&&"number"==typeof i[d[r]]?i[d[r]]:a)-o/100}${t})`}return{keys:d,values:r,up:l,down:n,between:s,only:function(e){return d.indexOf(e)+1<d.length?s(e,d[d.indexOf(e)+1]):l(e)},not:function(e){const i=d.indexOf(e);return 0===i?l(d[1]):i===d.length-1?n(d[i]):s(e,d[d.indexOf(e)+1]).replace("@media","@media not all and")},unit:t,...a}}const mo={borderRadius:4},_o="production"!==process.env.NODE_ENV?jt.oneOfType([jt.number,jt.string,jt.object,jt.array]):{};function Ao(e,i){return i?po(e,i,{clone:!1}):e}const To={xs:0,sm:600,md:900,lg:1200,xl:1536},uo={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${To[e]}px)`},Eo={containerQueries:e=>({up:i=>{let t="number"==typeof i?i:To[i]||i;return"number"==typeof t&&(t=`${t}px`),e?`@container ${e} (min-width:${t})`:`@container (min-width:${t})`}})};function fo(e,i,t){const o=e.theme||{};if(Array.isArray(i)){const e=o.breakpoints||uo;return i.reduce(((o,a,r)=>(o[e.up(e.keys[r])]=t(i[r]),o)),{})}if("object"==typeof i){const e=o.breakpoints||uo;return Object.keys(i).reduce(((a,r)=>{if(d=e.keys,"@"===(l=r)||l.startsWith("@")&&(d.some((e=>l.startsWith(`@${e}`)))||l.match(/^@\d/))){const e=function(e,i){const t=i.match(/^@([^/]+)?\/?(.+)?$/);if(!t){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${i}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Ot(18,`(${i})`));return null}const[,o,a]=t,r=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(r)}(o.containerQueries?o:Eo,r);e&&(a[e]=t(i[r],r))}else if(Object.keys(e.values||To).includes(r)){a[e.up(r)]=t(i[r],r)}else{const e=r;a[e]=i[e]}var d,l;return a}),{})}return t(i)}function Io(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Ot(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Oo(e,i,t=!0){if(!i||"string"!=typeof i)return null;if(e&&e.vars&&t){const t=`vars.${i}`.split(".").reduce(((e,i)=>e&&e[i]?e[i]:null),e);if(null!=t)return t}return i.split(".").reduce(((e,i)=>e&&null!=e[i]?e[i]:null),e)}function No(e,i,t,o=t){let a;return a="function"==typeof e?e(t):Array.isArray(e)?e[t]||o:Oo(e,t)||o,i&&(a=i(a,o,e)),a}function yo(e){const{prop:i,cssProperty:t=e.prop,themeKey:o,transform:a}=e,r=e=>{if(null==e[i])return null;const r=e[i],d=Oo(e.theme,o)||{};return fo(e,r,(e=>{let o=No(d,a,e);return e===o&&"string"==typeof e&&(o=No(d,a,`${i}${"default"===e?"":Io(e)}`,e)),!1===t?o:{[t]:o}}))};return r.propTypes="production"!==process.env.NODE_ENV?{[i]:_o}:{},r.filterProps=[i],r}const Ro={m:"margin",p:"padding"},Lo={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ho={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Po=function(e){const i={};return t=>(void 0===i[t]&&(i[t]=e(t)),i[t])}((e=>{if(e.length>2){if(!ho[e])return[e];e=ho[e]}const[i,t]=e.split(""),o=Ro[i],a=Lo[t]||"";return Array.isArray(a)?a.map((e=>o+e)):[o+a]})),Mo=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Do=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Co=[...Mo,...Do];function bo(e,i,t,o){const a=Oo(e,i,!0)??t;return"number"==typeof a||"string"==typeof a?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof a?a.startsWith("var(")&&0===e?0:a.startsWith("var(")&&1===e?a:`calc(${e} * ${a})`:a*e):Array.isArray(a)?e=>{if("string"==typeof e)return e;const t=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(t)?t>a.length-1&&console.error([`MUI: The value provided (${t}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${t} > ${a.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${i}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${i}\` as a number.`].join("\n")));const o=a[t];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof a?a:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${i}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function So(e){return bo(e,"spacing",8,"spacing")}function go(e,i){return"string"==typeof i||null==i?i:e(i)}function Uo(e,i,t,o){if(!i.includes(t))return null;const a=function(e,i){return t=>e.reduce(((e,o)=>(e[o]=go(i,t),e)),{})}(Po(t),o);return fo(e,e[t],a)}function vo(e,i){const t=So(e.theme);return Object.keys(e).map((o=>Uo(e,i,o,t))).reduce(Ao,{})}function wo(e){return vo(e,Mo)}function Bo(e){return vo(e,Do)}function xo(...e){const i=e.reduce(((e,i)=>(i.filterProps.forEach((t=>{e[t]=i})),e)),{}),t=e=>Object.keys(e).reduce(((t,o)=>i[o]?Ao(t,i[o](e)):t),{});return t.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,i)=>Object.assign(e,i.propTypes)),{}):{},t.filterProps=e.reduce(((e,i)=>e.concat(i.filterProps)),[]),t}function Fo(e){return"number"!=typeof e?e:`${e}px solid`}function Wo(e,i){return yo({prop:e,themeKey:"borders",transform:i})}wo.propTypes="production"!==process.env.NODE_ENV?Mo.reduce(((e,i)=>(e[i]=_o,e)),{}):{},wo.filterProps=Mo,Bo.propTypes="production"!==process.env.NODE_ENV?Do.reduce(((e,i)=>(e[i]=_o,e)),{}):{},Bo.filterProps=Do,"production"===process.env.NODE_ENV||Co.reduce(((e,i)=>(e[i]=_o,e)),{});const ko=Wo("border",Fo),Go=Wo("borderTop",Fo),Yo=Wo("borderRight",Fo),Vo=Wo("borderBottom",Fo),qo=Wo("borderLeft",Fo),Ko=Wo("borderColor"),zo=Wo("borderTopColor"),Ho=Wo("borderRightColor"),Qo=Wo("borderBottomColor"),Zo=Wo("borderLeftColor"),jo=Wo("outline",Fo),$o=Wo("outlineColor"),Xo=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const i=bo(e.theme,"shape.borderRadius",4,"borderRadius"),t=e=>({borderRadius:go(i,e)});return fo(e,e.borderRadius,t)}return null};Xo.propTypes="production"!==process.env.NODE_ENV?{borderRadius:_o}:{},Xo.filterProps=["borderRadius"],xo(ko,Go,Yo,Vo,qo,Ko,zo,Ho,Qo,Zo,Xo,jo,$o);const Jo=e=>{if(void 0!==e.gap&&null!==e.gap){const i=bo(e.theme,"spacing",8,"gap"),t=e=>({gap:go(i,e)});return fo(e,e.gap,t)}return null};Jo.propTypes="production"!==process.env.NODE_ENV?{gap:_o}:{},Jo.filterProps=["gap"];const ea=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const i=bo(e.theme,"spacing",8,"columnGap"),t=e=>({columnGap:go(i,e)});return fo(e,e.columnGap,t)}return null};ea.propTypes="production"!==process.env.NODE_ENV?{columnGap:_o}:{},ea.filterProps=["columnGap"];const ia=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const i=bo(e.theme,"spacing",8,"rowGap"),t=e=>({rowGap:go(i,e)});return fo(e,e.rowGap,t)}return null};ia.propTypes="production"!==process.env.NODE_ENV?{rowGap:_o}:{},ia.filterProps=["rowGap"];function ta(e,i){return"grey"===i?i:e}xo(Jo,ea,ia,yo({prop:"gridColumn"}),yo({prop:"gridRow"}),yo({prop:"gridAutoFlow"}),yo({prop:"gridAutoColumns"}),yo({prop:"gridAutoRows"}),yo({prop:"gridTemplateColumns"}),yo({prop:"gridTemplateRows"}),yo({prop:"gridTemplateAreas"}),yo({prop:"gridArea"}));function oa(e){return e<=1&&0!==e?100*e+"%":e}xo(yo({prop:"color",themeKey:"palette",transform:ta}),yo({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ta}),yo({prop:"backgroundColor",themeKey:"palette",transform:ta}));const aa=yo({prop:"width",transform:oa}),ra=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const i=i=>{const t=e.theme?.breakpoints?.values?.[i]||To[i];return t?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${t}${e.theme.breakpoints.unit}`}:{maxWidth:t}:{maxWidth:oa(i)}};return fo(e,e.maxWidth,i)}return null};ra.filterProps=["maxWidth"];const da=yo({prop:"minWidth",transform:oa}),la=yo({prop:"height",transform:oa}),na=yo({prop:"maxHeight",transform:oa}),sa=yo({prop:"minHeight",transform:oa});yo({prop:"size",cssProperty:"width",transform:oa}),yo({prop:"size",cssProperty:"height",transform:oa});xo(aa,ra,da,la,na,sa,yo({prop:"boxSizing"}));const pa={border:{themeKey:"borders",transform:Fo},borderTop:{themeKey:"borders",transform:Fo},borderRight:{themeKey:"borders",transform:Fo},borderBottom:{themeKey:"borders",transform:Fo},borderLeft:{themeKey:"borders",transform:Fo},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Fo},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Xo},color:{themeKey:"palette",transform:ta},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ta},backgroundColor:{themeKey:"palette",transform:ta},p:{style:Bo},pt:{style:Bo},pr:{style:Bo},pb:{style:Bo},pl:{style:Bo},px:{style:Bo},py:{style:Bo},padding:{style:Bo},paddingTop:{style:Bo},paddingRight:{style:Bo},paddingBottom:{style:Bo},paddingLeft:{style:Bo},paddingX:{style:Bo},paddingY:{style:Bo},paddingInline:{style:Bo},paddingInlineStart:{style:Bo},paddingInlineEnd:{style:Bo},paddingBlock:{style:Bo},paddingBlockStart:{style:Bo},paddingBlockEnd:{style:Bo},m:{style:wo},mt:{style:wo},mr:{style:wo},mb:{style:wo},ml:{style:wo},mx:{style:wo},my:{style:wo},margin:{style:wo},marginTop:{style:wo},marginRight:{style:wo},marginBottom:{style:wo},marginLeft:{style:wo},marginX:{style:wo},marginY:{style:wo},marginInline:{style:wo},marginInlineStart:{style:wo},marginInlineEnd:{style:wo},marginBlock:{style:wo},marginBlockStart:{style:wo},marginBlockEnd:{style:wo},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Jo},rowGap:{style:ia},columnGap:{style:ea},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:oa},maxWidth:{style:ra},minWidth:{transform:oa},height:{transform:oa},maxHeight:{transform:oa},minHeight:{transform:oa},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const ca=function(){function e(e,i,t,o){const a={[e]:i,theme:t},r=o[e];if(!r)return{[e]:i};const{cssProperty:d=e,themeKey:l,transform:n,style:s}=r;if(null==i)return null;if("typography"===l&&"inherit"===i)return{[e]:i};const p=Oo(t,l)||{};if(s)return s(a);return fo(a,i,(i=>{let t=No(p,n,i);return i===t&&"string"==typeof i&&(t=No(p,n,`${e}${"default"===i?"":Io(i)}`,i)),!1===d?t:{[d]:t}}))}return function i(t){const{sx:o,theme:a={}}=t||{};if(!o)return null;const r=a.unstable_sxConfig??pa;function d(t){let o=t;if("function"==typeof t)o=t(a);else if("object"!=typeof t)return t;if(!o)return null;const d=function(e={}){const i=e.keys?.reduce(((i,t)=>(i[e.up(t)]={},i)),{});return i||{}}(a.breakpoints),l=Object.keys(d);let n=d;return Object.keys(o).forEach((t=>{const d=(l=o[t],s=a,"function"==typeof l?l(s):l);var l,s;if(null!=d)if("object"==typeof d)if(r[t])n=Ao(n,e(t,d,a,r));else{const e=fo({theme:a},d,(e=>({[t]:e})));!function(...e){const i=e.reduce(((e,i)=>e.concat(Object.keys(i))),[]),t=new Set(i);return e.every((e=>t.size===Object.keys(e).length))}(e,d)?n=Ao(n,e):n[t]=i({sx:d,theme:a})}else n=Ao(n,e(t,d,a,r))})),function(e,i){if(!e.containerQueries)return i;const t=Object.keys(i).filter((e=>e.startsWith("@container"))).sort(((e,i)=>{const t=/min-width:\s*([0-9.]+)/;return+(e.match(t)?.[1]||0)-+(i.match(t)?.[1]||0)}));return t.length?t.reduce(((e,t)=>{const o=i[t];return delete e[t],e[t]=o,e}),{...i}):i}(a,function(e,i){return e.reduce(((e,i)=>{const t=e[i];return(!t||0===Object.keys(t).length)&&delete e[i],e}),i)}(l,n))}return Array.isArray(o)?o.map(d):d(o)}}();function ma(e,i){const t=this;if(t.vars){if(!t.colorSchemes?.[e]||"function"!=typeof t.getColorSchemeSelector)return{};let o=t.getColorSchemeSelector(e);return"&"===o?i:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:i})}return t.palette.mode===e?i:{}}function _a(e=null){const i=H.useContext(q);return i&&(t=i,0!==Object.keys(t).length)?i:e;var t}ca.filterProps=["sx"];const Aa=function(e={},...i){const{breakpoints:t={},palette:o={},spacing:a,shape:r={},...d}=e,l=co(t),n=function(e=8,i=So({spacing:e})){if(e.mui)return e;const t=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const t=i(e);return"number"==typeof t?`${t}px`:t})).join(" "));return t.mui=!0,t}(a);let s=po({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:n,shape:{...mo,...r}},d);return s=function(e){const i=(e,i)=>e.replace("@media",i?`@container ${i}`:"@container");function t(t,o){t.up=(...t)=>i(e.breakpoints.up(...t),o),t.down=(...t)=>i(e.breakpoints.down(...t),o),t.between=(...t)=>i(e.breakpoints.between(...t),o),t.only=(...t)=>i(e.breakpoints.only(...t),o),t.not=(...t)=>{const a=i(e.breakpoints.not(...t),o);return a.includes("not all and")?a.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):a}}const o={},a=e=>(t(o,e),o);return t(a),{...e,containerQueries:a}}(s),s.applyStyles=ma,s=i.reduce(((e,i)=>po(e,i)),s),s.unstable_sxConfig={...pa,...d?.unstable_sxConfig},s.unstable_sx=function(e){return ca({sx:e,theme:this})},s}();function Ta(e){const{sx:i,...t}=e,{systemProps:o,otherProps:a}=(e=>{const i={systemProps:{},otherProps:{}},t=e?.theme?.unstable_sxConfig??pa;return Object.keys(e).forEach((o=>{t[o]?i.systemProps[o]=e[o]:i.otherProps[o]=e[o]})),i})(t);let r;return r=Array.isArray(i)?[o,...i]:"function"==typeof i?(...e)=>{const t=i(...e);return no(t)?{...o,...t}:o}:{...o,...i},{...a,sx:r}}const ua=e=>e,Ea=(()=>{let e=ua;return{configure(i){e=i},generate:i=>e(i),reset(){e=ua}}})();function fa(e){var i,t,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(i=0;i<a;i++)e[i]&&(t=fa(e[i]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Ia(){for(var e,i,t=0,o="",a=arguments.length;t<a;t++)(e=arguments[t])&&(i=fa(e))&&(o&&(o+=" "),o+=i);return o}const Oa={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};const Na=function(e={}){const{themeId:t,defaultTheme:o,defaultClassName:a="MuiBox-root",generateClassName:r}=e,d=
|
|
23
|
+
*/function lo(){return ao||(ao=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var A=e.$$typeof;switch(A){case t:switch(e=e.type){case o:case r:case a:case s:case p:case u:return e;default:switch(e=e&&e.$$typeof){case n:case l:case m:case c:case d:return e;default:return A}}case i:return A}}}var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),n=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),A=Symbol.for("react.client.reference");no.ContextConsumer=d,no.ContextProvider=n,no.Element=t,no.ForwardRef=l,no.Fragment=o,no.Lazy=m,no.Memo=c,no.Portal=i,no.Profiler=r,no.StrictMode=a,no.Suspense=s,no.SuspenseList=p,no.isContextConsumer=function(t){return e(t)===d},no.isContextProvider=function(t){return e(t)===n},no.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},no.isForwardRef=function(t){return e(t)===l},no.isFragment=function(t){return e(t)===o},no.isLazy=function(t){return e(t)===m},no.isMemo=function(t){return e(t)===c},no.isPortal=function(t){return e(t)===i},no.isProfiler=function(t){return e(t)===r},no.isStrictMode=function(t){return e(t)===a},no.isSuspense=function(t){return e(t)===s},no.isSuspenseList=function(t){return e(t)===p},no.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===r||e===a||e===s||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===c||e.$$typeof===n||e.$$typeof===d||e.$$typeof===l||e.$$typeof===A||void 0!==e.getModuleId)},no.typeOf=e}()),no}function so(){return ro||(ro=1,"production"===process.env.NODE_ENV?to.exports=oo():to.exports=lo()),to.exports}var po=so();function co(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function mo(e){if(z.isValidElement(e)||po.isValidElementType(e)||!co(e))return e;const t={};return Object.keys(e).forEach((i=>{t[i]=mo(e[i])})),t}function uo(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return co(e)&&co(t)&&Object.keys(t).forEach((a=>{z.isValidElement(t[a])||po.isValidElementType(t[a])?o[a]=t[a]:co(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&co(e[a])?o[a]=uo(e[a],t[a],i):i.clone?o[a]=co(t[a])?mo(t[a]):t[a]:o[a]=t[a]})),o}function Ao(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...a}=e,r=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>({...e,[t.key]:t.val})),{})})(t),d=Object.keys(r);function n(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${i})`}function s(e,a){const r=d.indexOf(a);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==r&&"number"==typeof t[d[r]]?t[d[r]]:a)-o/100}${i})`}return{keys:d,values:r,up:n,down:l,between:s,only:function(e){return d.indexOf(e)+1<d.length?s(e,d[d.indexOf(e)+1]):n(e)},not:function(e){const t=d.indexOf(e);return 0===t?n(d[1]):t===d.length-1?l(d[t]):s(e,d[d.indexOf(e)+1]).replace("@media","@media not all and")},unit:i,...a}}const To={borderRadius:4},_o="production"!==process.env.NODE_ENV?Ji.oneOfType([Ji.number,Ji.string,Ji.object,Ji.array]):{};function Eo(e,t){return t?uo(e,t,{clone:!1}):e}const fo={xs:0,sm:600,md:900,lg:1200,xl:1536},Io={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${fo[e]}px)`},Oo={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:fo[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function No(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||Io;return t.reduce(((o,a,r)=>(o[e.up(e.keys[r])]=i(t[r]),o)),{})}if("object"==typeof t){const e=o.breakpoints||Io;return Object.keys(t).reduce(((a,r)=>{if(d=e.keys,"@"===(n=r)||n.startsWith("@")&&(d.some((e=>n.startsWith(`@${e}`)))||n.match(/^@\d/))){const e=function(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:hi(18,`(${t})`));return null}const[,o,a]=i,r=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(r)}(o.containerQueries?o:Oo,r);e&&(a[e]=i(t[r],r))}else if(Object.keys(e.values||fo).includes(r)){a[e.up(r)]=i(t[r],r)}else{const e=r;a[e]=t[e]}var d,n;return a}),{})}return i(t)}function yo(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":hi(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ho(e,t,i=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=i)return i}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function Ro(e,t,i,o=i){let a;return a="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:ho(e,i)||o,t&&(a=t(a,o,e)),a}function Lo(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:a}=e,r=e=>{if(null==e[t])return null;const r=e[t],d=ho(e.theme,o)||{};return No(e,r,(e=>{let o=Ro(d,a,e);return e===o&&"string"==typeof e&&(o=Ro(d,a,`${t}${"default"===e?"":yo(e)}`,e)),!1===i?o:{[i]:o}}))};return r.propTypes="production"!==process.env.NODE_ENV?{[t]:_o}:{},r.filterProps=[t],r}const Co={m:"margin",p:"padding"},Do={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Mo={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Po=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}((e=>{if(e.length>2){if(!Mo[e])return[e];e=Mo[e]}const[t,i]=e.split(""),o=Co[t],a=Do[i]||"";return Array.isArray(a)?a.map((e=>o+e)):[o+a]})),bo=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],go=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],So=[...bo,...go];function Uo(e,t,i,o){const a=ho(e,t,!0)??i;return"number"==typeof a||"string"==typeof a?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof a?a.startsWith("var(")&&0===e?0:a.startsWith("var(")&&1===e?a:`calc(${e} * ${a})`:a*e):Array.isArray(a)?e=>{if("string"==typeof e)return e;const i=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(i)?i>a.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${i} > ${a.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const o=a[i];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof a?a:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function vo(e){return Uo(e,"spacing",8,"spacing")}function wo(e,t){return"string"==typeof t||null==t?t:e(t)}function xo(e,t,i,o){if(!t.includes(i))return null;const a=function(e,t){return i=>e.reduce(((e,o)=>(e[o]=wo(t,i),e)),{})}(Po(i),o);return No(e,e[i],a)}function Bo(e,t){const i=vo(e.theme);return Object.keys(e).map((o=>xo(e,t,o,i))).reduce(Eo,{})}function Fo(e){return Bo(e,bo)}function ko(e){return Bo(e,go)}function Wo(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((i=>{e[i]=t})),e)),{}),i=e=>Object.keys(e).reduce(((i,o)=>t[o]?Eo(i,t[o](e)):i),{});return i.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},i.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),i}function Go(e){return"number"!=typeof e?e:`${e}px solid`}function Yo(e,t){return Lo({prop:e,themeKey:"borders",transform:t})}Fo.propTypes="production"!==process.env.NODE_ENV?bo.reduce(((e,t)=>(e[t]=_o,e)),{}):{},Fo.filterProps=bo,ko.propTypes="production"!==process.env.NODE_ENV?go.reduce(((e,t)=>(e[t]=_o,e)),{}):{},ko.filterProps=go,"production"===process.env.NODE_ENV||So.reduce(((e,t)=>(e[t]=_o,e)),{});const Vo=Yo("border",Go),qo=Yo("borderTop",Go),Ko=Yo("borderRight",Go),Ho=Yo("borderBottom",Go),zo=Yo("borderLeft",Go),Zo=Yo("borderColor"),Qo=Yo("borderTopColor"),jo=Yo("borderRightColor"),$o=Yo("borderBottomColor"),Xo=Yo("borderLeftColor"),Jo=Yo("outline",Go),ea=Yo("outlineColor"),ta=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Uo(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:wo(t,e)});return No(e,e.borderRadius,i)}return null};ta.propTypes="production"!==process.env.NODE_ENV?{borderRadius:_o}:{},ta.filterProps=["borderRadius"],Wo(Vo,qo,Ko,Ho,zo,Zo,Qo,jo,$o,Xo,ta,Jo,ea);const ia=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Uo(e.theme,"spacing",8,"gap"),i=e=>({gap:wo(t,e)});return No(e,e.gap,i)}return null};ia.propTypes="production"!==process.env.NODE_ENV?{gap:_o}:{},ia.filterProps=["gap"];const oa=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Uo(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:wo(t,e)});return No(e,e.columnGap,i)}return null};oa.propTypes="production"!==process.env.NODE_ENV?{columnGap:_o}:{},oa.filterProps=["columnGap"];const aa=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Uo(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:wo(t,e)});return No(e,e.rowGap,i)}return null};aa.propTypes="production"!==process.env.NODE_ENV?{rowGap:_o}:{},aa.filterProps=["rowGap"];function ra(e,t){return"grey"===t?t:e}Wo(ia,oa,aa,Lo({prop:"gridColumn"}),Lo({prop:"gridRow"}),Lo({prop:"gridAutoFlow"}),Lo({prop:"gridAutoColumns"}),Lo({prop:"gridAutoRows"}),Lo({prop:"gridTemplateColumns"}),Lo({prop:"gridTemplateRows"}),Lo({prop:"gridTemplateAreas"}),Lo({prop:"gridArea"}));function da(e){return e<=1&&0!==e?100*e+"%":e}Wo(Lo({prop:"color",themeKey:"palette",transform:ra}),Lo({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ra}),Lo({prop:"backgroundColor",themeKey:"palette",transform:ra}));const na=Lo({prop:"width",transform:da}),la=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||fo[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:da(t)}};return No(e,e.maxWidth,t)}return null};la.filterProps=["maxWidth"];const sa=Lo({prop:"minWidth",transform:da}),pa=Lo({prop:"height",transform:da}),ca=Lo({prop:"maxHeight",transform:da}),ma=Lo({prop:"minHeight",transform:da});Lo({prop:"size",cssProperty:"width",transform:da}),Lo({prop:"size",cssProperty:"height",transform:da});Wo(na,la,sa,pa,ca,ma,Lo({prop:"boxSizing"}));const ua={border:{themeKey:"borders",transform:Go},borderTop:{themeKey:"borders",transform:Go},borderRight:{themeKey:"borders",transform:Go},borderBottom:{themeKey:"borders",transform:Go},borderLeft:{themeKey:"borders",transform:Go},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Go},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ta},color:{themeKey:"palette",transform:ra},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ra},backgroundColor:{themeKey:"palette",transform:ra},p:{style:ko},pt:{style:ko},pr:{style:ko},pb:{style:ko},pl:{style:ko},px:{style:ko},py:{style:ko},padding:{style:ko},paddingTop:{style:ko},paddingRight:{style:ko},paddingBottom:{style:ko},paddingLeft:{style:ko},paddingX:{style:ko},paddingY:{style:ko},paddingInline:{style:ko},paddingInlineStart:{style:ko},paddingInlineEnd:{style:ko},paddingBlock:{style:ko},paddingBlockStart:{style:ko},paddingBlockEnd:{style:ko},m:{style:Fo},mt:{style:Fo},mr:{style:Fo},mb:{style:Fo},ml:{style:Fo},mx:{style:Fo},my:{style:Fo},margin:{style:Fo},marginTop:{style:Fo},marginRight:{style:Fo},marginBottom:{style:Fo},marginLeft:{style:Fo},marginX:{style:Fo},marginY:{style:Fo},marginInline:{style:Fo},marginInlineStart:{style:Fo},marginInlineEnd:{style:Fo},marginBlock:{style:Fo},marginBlockStart:{style:Fo},marginBlockEnd:{style:Fo},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ia},rowGap:{style:aa},columnGap:{style:oa},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:da},maxWidth:{style:la},minWidth:{transform:da},height:{transform:da},maxHeight:{transform:da},minHeight:{transform:da},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Aa=function(){function e(e,t,i,o){const a={[e]:t,theme:i},r=o[e];if(!r)return{[e]:t};const{cssProperty:d=e,themeKey:n,transform:l,style:s}=r;if(null==t)return null;if("typography"===n&&"inherit"===t)return{[e]:t};const p=ho(i,n)||{};if(s)return s(a);return No(a,t,(t=>{let i=Ro(p,l,t);return t===i&&"string"==typeof t&&(i=Ro(p,l,`${e}${"default"===t?"":yo(t)}`,t)),!1===d?i:{[d]:i}}))}return function t(i){const{sx:o,theme:a={}}=i||{};if(!o)return null;const r=a.unstable_sxConfig??ua;function d(i){let o=i;if("function"==typeof i)o=i(a);else if("object"!=typeof i)return i;if(!o)return null;const d=function(e={}){const t=e.keys?.reduce(((t,i)=>(t[e.up(i)]={},t)),{});return t||{}}(a.breakpoints),n=Object.keys(d);let l=d;return Object.keys(o).forEach((i=>{const d=(n=o[i],s=a,"function"==typeof n?n(s):n);var n,s;if(null!=d)if("object"==typeof d)if(r[i])l=Eo(l,e(i,d,a,r));else{const e=No({theme:a},d,(e=>({[i]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),i=new Set(t);return e.every((e=>i.size===Object.keys(e).length))}(e,d)?l=Eo(l,e):l[i]=t({sx:d,theme:a})}else l=Eo(l,e(i,d,a,r))})),function(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{const i=/min-width:\s*([0-9.]+)/;return+(e.match(i)?.[1]||0)-+(t.match(i)?.[1]||0)}));return i.length?i.reduce(((e,i)=>{const o=t[i];return delete e[i],e[i]=o,e}),{...t}):t}(a,function(e,t){return e.reduce(((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e}),t)}(n,l))}return Array.isArray(o)?o.map(d):d(o)}}();function Ta(e,t){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||"function"!=typeof i.getColorSchemeSelector)return{};let o=i.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function _a(e=null){const t=z.useContext(q);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}Aa.filterProps=["sx"];const Ea=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:a,shape:r={},...d}=e,n=Ao(i),l=function(e=8,t=vo({spacing:e})){if(e.mui)return e;const i=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const i=t(e);return"number"==typeof i?`${i}px`:i})).join(" "));return i.mui=!0,i}(a);let s=uo({breakpoints:n,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...To,...r}},d);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function i(i,o){i.up=(...i)=>t(e.breakpoints.up(...i),o),i.down=(...i)=>t(e.breakpoints.down(...i),o),i.between=(...i)=>t(e.breakpoints.between(...i),o),i.only=(...i)=>t(e.breakpoints.only(...i),o),i.not=(...i)=>{const a=t(e.breakpoints.not(...i),o);return a.includes("not all and")?a.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):a}}const o={},a=e=>(i(o,e),o);return i(a),{...e,containerQueries:a}}(s),s.applyStyles=Ta,s=t.reduce(((e,t)=>uo(e,t)),s),s.unstable_sxConfig={...ua,...d?.unstable_sxConfig},s.unstable_sx=function(e){return Aa({sx:e,theme:this})},s}();function fa(e){const{sx:t,...i}=e,{systemProps:o,otherProps:a}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??ua;return Object.keys(e).forEach((o=>{i[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]})),t})(i);let r;return r=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const i=t(...e);return co(i)?{...o,...i}:o}:{...o,...t},{...a,sx:r}}const Ia=e=>e,Oa=(()=>{let e=Ia;return{configure(t){e=t},generate:t=>e(t),reset(){e=Ia}}})();function Na(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(i=Na(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function ya(){for(var e,t,i=0,o="",a=arguments.length;i<a;i++)(e=arguments[i])&&(t=Na(e))&&(o&&(o+=" "),o+=t);return o}const ha={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};const Ra=function(e={}){const{themeId:i,defaultTheme:o,defaultClassName:a="MuiBox-root",generateClassName:r}=e,d=
|
|
24
24
|
/**
|
|
25
25
|
* @mui/styled-engine v7.1.1
|
|
26
26
|
*
|
|
@@ -28,5 +28,5 @@ object-assign
|
|
|
28
28
|
* This source code is licensed under the MIT license found in the
|
|
29
29
|
* LICENSE file in the root directory of this source tree.
|
|
30
30
|
*/
|
|
31
|
-
function(e,i){const t=yi(e,i);return"production"!==process.env.NODE_ENV?(...i)=>{const o=`"${e}"`;return 0===i.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):i.some((e=>void 0===e))&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),t(...i)}:t}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(ca),l=H.forwardRef((function(e,l){const n=function(e=Aa){return _a(e)}(o),{className:s,component:p="div",...c}=Ta(e);return i(d,{as:p,ref:l,className:Ia(s,r?r(a):a),theme:t&&n[t]||n,...c})}));return l}({defaultClassName:function(e,i,t="Mui"){const o={};return i.forEach((i=>{o[i]=function(e,i,t="Mui"){const o=Oa[i];return o?`${t}-${o}`:`${Ea.generate(e)}-${i}`}(e,i,t)})),o}("MuiBox",["root"]).root,generateClassName:Ea.generate});function ya(e){return/^\d+$/.test(e)}function Ra(e){return"number"==typeof e&&!isNaN(e)}function La(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function ha(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function Pa(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}"production"!==process.env.NODE_ENV&&(Na.propTypes={children:jt.node,component:jt.elementType,sx:jt.oneOfType([jt.arrayOf(jt.oneOfType([jt.func,jt.object,jt.bool])),jt.func,jt.object])});const Ma=e=>{const t=a((e=>e.AppLayout)),o=zi(),[r,d]=Z([]),{handleGetRequest:l}=Bi();return j((()=>{e.lookupType&&(async()=>{await l({endPointURI:"api/v1/dev/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{d(e.data)},failureCallBkFn:()=>{d([])}})})()}),[e.lookupType,o.UserSession]),i(ct,{...e,options:r,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},Da=e=>{if(e?.fieldInfo){const o=e.fieldInfo,a=e?.formManager||null,r=e?.formActions||null,d=e?.formValues||null,l=e?.fieldInfo?.fieldName||null,n=e?.fieldInfo?.fieldType||null;return o&&a&&d&&l&&n?e.hiddenFields.includes(l)?i(t,{}):i(L,{size:o?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===n||"number"===n?i(Ji,{...o.muiTextFieldProps,fullWidth:!0,type:n,disabled:!(!o?.disabled&&!e.disabledFields.includes(l)),hidden:o?.hidden||!1,label:o?.fieldLabel,value:d[l],onChange:e=>{let i=null;""!=e.target.value&&(i="number"===n&&La(e.target.value)?Number(e.target.value):e.target.value),a.setValue(l,i),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(i,a,r)},sx:{"& .MuiInputBase-root":{height:`${o?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...o?.formProps?.style},error:null!=a.formState.errors[l],helperText:a?.formState?.errors[l]?.message?.toString()}):"date"===o?.fieldType?i(ft,{format:o?.dateFormat||mt,sx:o?.formProps?.style||{width:"100%"},disabled:!(!o?.disabled&&!e.disabledFields.includes(l)),label:o?.fieldLabel,onChangeCallBack:e=>{a.setValue(l,e),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(e,a,r)},value:d[l],error:null!=a.formState.errors[l],errorMessage:a?.formState?.errors[l]?.message?.toString()}):"datetime"===o?.fieldType?i(It,{format:o?.dateFormat||_t,sx:o?.formProps?.style||{width:"100%"},disabled:!(!o?.disabled&&!e.disabledFields.includes(l)),label:o?.fieldLabel,onChangeCallBack:e=>{a.setValue(l,e),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(e,a,r)},value:d[l],error:null!=a.formState.errors[l],errorMessage:a?.formState?.errors[l]?.message?.toString()}):"checkbox"===o?.fieldType?i(pt,{label:o?.fieldLabel,onChangeCallBack:e=>{a.setValue(l,e),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(e,a,r)},value:d[l],checkedValue:o?.checkedValue||!0,unCheckedValue:o?.unCheckedValue||!1,disabled:!(!o?.disabled&&!e.disabledFields.includes(l)),sx:o?.formProps?.style}):"combobox"===o?.fieldType?i(ct,{sx:o?.formProps?.style||{width:"100%"},label:o?.fieldLabel,disabled:!(!o?.disabled&&!e.disabledFields.includes(l)),onChangeCallBack:(e,i)=>{let t=null;e&&(t=e+""),a.setValue(l,t),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(t,a,r,i)},options:o?.options||[],displayField:o?.optionDisplayField||"",valueField:o?.optionValueField||"",value:d[l],errorMessage:a?.formState?.errors[l]?.message?.toString()}):"lookup"===o?.fieldType?i(Ma,{sx:o?.formProps?.style||{width:"100%"},label:o?.fieldLabel,disabled:!(!o?.disabled&&!e.disabledFields.includes(l)),onChangeCallBack:(e,i)=>{let t=null;e&&(t=e+""),a.setValue(l,t),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(t,a,r,i)},lookupType:o.lookupType,value:d[l],errorMessage:a?.formState?.errors[l]?.message?.toString()}):i(t,{children:"Unknown field type"})}):i(t,{})}return i(t,{})},Ca=o=>{const a=zi(),{ConfirmationWindow:r,setOpen:d}=Ki({body:o?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{o?.actionFn(o?.record)}});return null==o?.authority||a.isUserAuthorized(o.authority)?e(t,{children:[i(r,{}),e(T,{variant:o?.formActionProps?.actionButtonVariant,color:o?.formActionProps?.actionButtonColor,onClick:()=>{if(o?.actionFn){if(o?.preActionValidation&&!o.preActionValidation(o.record))return;!0===o?.isConfirmationRequired?d(!0):o?.actionFn(o.record)}},children:[o?.icon?i(ae,{icon:o.icon,style:{marginRight:5,marginLeft:5}}):i(t,{}),i("div",{children:o?.label})]})]}):i(t,{})},ba=o=>{const{t:a}=me();return i(t,{children:e(L,{container:!0,sx:o?.style,alignItems:"flex-start",children:[o?.label?i(L,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:o?.icon?e(t,{children:[i(ae,{icon:o.icon,style:{marginRight:5,marginLeft:5}}),i("div",{children:a(o.label)})]}):i(t,{children:a(o.label)})}):i(t,{}),o?.elements?o.elements.map((e=>"group"===e.type?i(ba,{...e.props,formManager:o.formManager,formValues:o.formValues,formActions:o.formActions,hiddenFields:o.hiddenFields,disabledFields:o.disabledFields}):"field"===e.type&&"props"===e.mode?i(Da,{fieldInfo:e.props,formManager:o.formManager,formValues:o.formValues,formActions:o.formActions,hiddenFields:o.hiddenFields,disabledFields:o.disabledFields}):"field"===e.type&&"node"===e.mode?i(L,{size:e?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:i(e.node,{formManager:o.formManager,formValues:o.formValues,formActions:o.formActions})}):void 0)):null,o?.actions?i(L,{size:{sm:12},sx:{padding:1},children:o.actions.map((e=>i(Ca,{...e,record:o.formValues})))}):i(t,{})]})})},Sa=e=>({...e,type:"string",renderEditCell:e=>i(It,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:i=>{e.api.setEditCellValue({id:e.id,field:e.field,value:i})}}),valueParser:(e,i,t)=>{let o=null;return null!==e&&(o=ge(e).format(_t)),o},valueFormatter:(e,i,t)=>i[t.field]}),ga=e=>({...e,type:"custom",valueGetter:e=>e?e+"":e,renderCell:e=>{let t=null;try{t=e.colDef.options.find((i=>i[e.colDef.valueField]==e.value))}catch(e){}return i("div",{children:null!=t?t[e.colDef.displayField]:e.value})},renderEditCell:e=>i(ct,{...e,sx:{width:"100%"},options:e.colDef.options,valueField:e.colDef.valueField,displayField:e.colDef.displayField,onChangeCallBack:(i,t)=>{null===i&&e.api.setEditCellValue({id:e.id,field:e.field,value:null}),e.api.setEditCellValue({id:e.id,field:e.field,value:i+""})}})}),Ua=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:t=>{const o=t?.value;return o===e.checkedValue||"true"===o||1===o||!0===o?i(ae,{icon:"check",color:"green"}):i(ae,{icon:"xmark",color:"red"})},renderEditCell:t=>i(pt,{...t,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{t.api.setEditCellValue({id:t.id,field:t.field,value:e})}})}),va=e=>{const i=[];if("field"===e.type&&"props"===e.mode&&e?.props)i.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const t of e.props.elements)i.push(...va(t));return i},wa=e=>{const i=[];for(const t of e)i.push(...va(t));return i},Ba=e=>{const i={};for(const t of e)if(t?.fieldName){const e=t.fieldName;"number"===t.fieldType?i[e]=!0===t?.required?Ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ue.number().optional().nullable():"checkbox"===t.fieldType?i[e]=!0===t?.required?Ue.boolean({required_error:"This field is required"}):Ue.boolean().optional().nullable():i[e]=!0===t?.required?Ue.string({message:"This field is required"}).min(1,"This field is required"):Ue.string().optional().nullable()}return i},xa=o=>{const{t:a}=me(),r=wa(o.elements),d=[];for(const e of r)e?.hidden&&d.push(e.fieldName);const[l,n]=Z(d),s={};for(const e of o.elements)"field"===e?.type&&"props"===e?.mode&&e?.props?.defaultValue&&(s[e.props.fieldName]=e.props.defaultValue);const[p,c]=Z([]),m=Ue.object(Ba(r)),_=we({resolver:Be(m),defaultValues:s}),A=_.watch(),u=xe(),E=o?.formRouteRecordIdParamName,f={setFieldValue:(e,i)=>{_.setValue(e,i)},hideField:e=>{n((i=>[...i,e]))},showField:e=>{n((i=>i.filter((i=>i!==e))))},disableField:e=>{c((i=>[...i,e]))},enableField:e=>{c((i=>i.filter((i=>i!==e))))}};return j((()=>{(async()=>{let e=null;if(o?.recordIdToEdit?e=o.recordIdToEdit:E&&u[E]&&(e=u[E]),e){const i=await o.apiActions.loadRecordById(e);if(i){_.reset({...i}),o?.formLoadCallBk&&o?.formLoadCallBk(f,_,i);for(const e of r)"combobox"===e?.fieldType&&i[e.fieldName]&&_.setValue(e.fieldName,i[e.fieldName]+"")}}else _.reset({})})()}),[o?.recordIdToEdit]),e(t,{children:[i(Na,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:i(L,{sx:{width:"100%"},container:!0,children:o.elements.map(((e,t)=>"group"===e.type?i(ba,{...e.props,formManager:_,formValues:A,formActions:f,hiddenFields:l,disabledFields:p},t):"field"===e.type&&"props"===e.mode?i(Da,{fieldInfo:e.props,formManager:_,formValues:A,formActions:f,hiddenFields:l,disabledFields:p},t):"field"===e.type&&"node"===e.mode?i(L,{size:e?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:i(e.node,{formManager:_,formValues:A})},t):void 0))})}),e(Na,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[o?.actions?o.actions.map((e=>!0===e?.formActionProps?.enabled?i(Ca,{...e,record:A}):i(t,{}))):i(t,{}),i("div",{style:{flex:1}}),i(T,{variant:o?.saveButtonSpecs?.actionButtonVariant?o.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:o?.saveButtonSpecs?.icon?i(ae,{icon:o.saveButtonSpecs.icon}):null,color:o?.saveButtonSpecs?.actionButtonColor?o.saveButtonSpecs.actionButtonColor:"primary",onClick:_.handleSubmit((e=>{console.log("form values",e),(async e=>{if((!o?.preSaveValidation||o.preSaveValidation(e))&&e){const i=await o.apiActions.saveRecord(e);i&&(_.reset({...i}),o?.formSavedSuccessfullyCallBk&&o.formSavedSuccessfullyCallBk(i),o?.formCloseCallBk&&o.formCloseCallBk())}})(e)}),(e=>{le.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)})),children:a(o?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),i(T,{variant:o?.cancelButtonSpecs?.actionButtonVariant?o.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:o?.cancelButtonSpecs?.icon?i(ae,{icon:o.cancelButtonSpecs.icon}):null,color:o?.cancelButtonSpecs?.actionButtonColor?o.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{o?.formCloseCallBk&&o.formCloseCallBk(),_.reset(s)},children:a(o?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Fa=o=>{const{t:a}=me(),r=zi(),{ConfirmationWindow:d,setOpen:l}=Ki({body:a(o?.confirmationMessage||"ACTION_CONFIRMATION"),title:a("CONFIRMATION"),onConfirmationCallBk:async()=>{await(o?.actionFn(o.recordsToProcessActionOn,o.recordIdsToProcessActionOn)),o?.reloadData&&o.reloadData()}});let n=!0;if(o.authority&&(n=r.isUserAuthorized(o.authority)),n)return e(t,{children:[i(d,{}),e(T,{onClick:async()=>{if(o?.recordsToProcessActionOn&&o?.recordsToProcessActionOn.length>0){if(o?.preActionValidation)for(const e of o.recordsToProcessActionOn)if(!o.preActionValidation(e))return;!0===o?.isConfirmationRequired?l(!0):(await o.actionFn(o.recordsToProcessActionOn,o.recordIdsToProcessActionOn),o?.reloadData&&o.reloadData())}else le.error(a("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:o?.label?"outlined":o?.formActionProps?.actionButtonVariant?o.formActionProps.actionButtonVariant:"text",size:"small",color:o?.formActionProps?.actionButtonColor||"primary",children:[o?.icon?i(ae,{style:{marginRight:5,marginLeft:5},icon:o.icon}):i(t,{}),o?.label?a(o.label):i(t,{})]})]})},Wa=b(Ye)({display:"grid",alignItems:"center"}),ka=b(Ve)((({theme:e,ownerState:i})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:i.expanded?0:1,pointerEvents:i.expanded?"none":"auto",transition:e.transitions.create(["opacity"])}))),Ga=b(R)((({theme:e,ownerState:i})=>({gridArea:"1 / 1",overflowX:"clip",width:i.expanded?260:"var(--trigger-width)",opacity:i.expanded?1:0,transition:e.transitions.create(["width","opacity"])}))),Ya=o=>{const{t:a}=me(),r=zi(),d=!o?.templateProps?.editAction?.authority||r.isUserAuthorized(o.templateProps.editAction.authority),l=((e,i,t)=>{const o=[],a=[];if("exclude"===e.type&&0===e.ids.size)for(const e of i)o.push(e),a.push(e[t]);else if(e?.ids)for(const r of e.ids){const e=i.find((e=>e[t]===r));o.push(e),a.push(r)}return{selectedRecords:o,selectedRecordIds:a}})(o?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},o?.templateProps?.data||[],o?.templateProps?.keyColumnName||"id");return e(qe,{children:[d&&"none"!=o?.templateProps?.editMode?.editMode?e(T,{onClick:o?.handleCreateNewRecord,children:[i(ae,{icon:"add",style:{marginRight:5,marginLeft:5}}),a("ADD_BTN_LABEL")]}):i(t,{}),o?.templateProps?.rowActions?o.templateProps.rowActions.map(((e,i)=>!0===e?.gridActionProps?.multiRecord?$(Fa,{...e,key:i,reloadData:async()=>{o.templateProps.apiActions.reloadData(o?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:l.selectedRecordIds,recordsToProcessActionOn:l.selectedRecords}):null)):i(t,{}),i(E,{sx:{flex:1,mx:.5},children:o?.templateProps?.tBar}),i(S,{title:"Columns",children:i(Ke,{render:i(Ve,{}),children:i(ze,{fontSize:"small"})})}),i(S,{title:"Filters",children:i(He,{render:(e,t)=>i(Ve,{...e,color:"default",children:i(g,{badgeContent:t.filterCount,color:"primary",variant:"dot",children:i(Qe,{fontSize:"small"})})})})}),o?.templateProps?.gridStateKey?i(S,{title:a("RESET_GRID_STATE"),children:i(N,{onClick:o?.clearGridState,children:i(ae,{icon:"eraser"})})}):i(t,{}),i(U,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),i(S,{title:a("EXPORT_EXECL_LABEL"),children:i(Ze,{render:i(v,{}),children:i(ae,{icon:"file-excel",color:"green"})})}),e(Wa,{children:[i(je,{render:(e,t)=>i(S,{title:a("SEARCH_BTN_LABEL"),enterDelay:0,children:i(ka,{...e,ownerState:{expanded:t.expanded},color:"default","aria-disabled":t.expanded,children:i(ae,{icon:"search"})})})}),i($e,{render:({ref:e,...t},o)=>i(Ga,{...t,ownerState:{expanded:o.expanded},inputRef:e,"aria-label":"Search",placeholder:`${a("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:i(w,{position:"start",children:i(ae,{icon:"search"})}),endAdornment:o.value?i(w,{position:"end",children:i(Xe,{edge:"end",size:"small","aria-label":"Clear search",children:i(ae,{icon:"xmark"})})}):null,...t.slotProps?.input},...t.slotProps}})})]}),i(N,{onClick:()=>{o.templateProps.apiActions.reloadData(o?.templateProps?.gridLoadParametersValues)},children:i(ae,{icon:"refresh"})})]})},Va=o=>{const{t:a}=me(),r=zi(),{ConfirmationWindow:d,setOpen:l}=Ki({body:a(o?.confirmationMessage||"ACTION_CONFIRMATION"),title:a("CONFIRMATION"),onConfirmationCallBk:async()=>{await(o?.actionFn(o.record)),o?.reloadData&&o.reloadData()}});let n=!0;o.authority&&(n=r.isUserAuthorized(o.authority));let s={};o?.getActionIconStyleForRecord&&(s=o.getActionIconStyleForRecord(o.record));let p=!0;o?.isActionVisibleForRecord&&(p=o?.isActionVisibleForRecord(o.record));let c=!1;if(o?.isActionDisabledForRecord&&(c=o.isActionDisabledForRecord(o.record)),n&&p)return e(t,{children:[i(d,{}),i(Je,{disabled:c,icon:i(S,{title:o?.label?a(o.label):"",children:i(ae,{icon:o.icon,style:{...s,color:c?"gray":null!=s?.color?s.color:void 0}})}),showInMenu:o?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!c){if(o?.preActionValidation&&!o.preActionValidation(o.record))return;!0===o?.isConfirmationRequired?l(!0):(await o.actionFn(o.record),!0===o?.gridActionProps?.reloadGridAfterAction&&o?.reloadData&&o.reloadData())}}})]})};let qa=-1;const Ka=e=>{try{const i=localStorage.getItem(e);return i?JSON.parse(i):{}}catch(e){return console.error("Failed to load grid state",e),{}}},za=(e,i)=>{const t=Ka(e);localStorage.setItem(e,JSON.stringify({...t,...i}))},Ha=["__check__","actions"],Qa=o=>{const r=a((e=>e.AppLayout)),{getLookupOptions:d}=(()=>{const{handleGetRequest:e}=Bi(),i=a((e=>e.AppLayout)),t=async i=>{let t=[];return await e({endPointURI:"api/v1/dev/system/lookup",showMask:!0,parameters:{lookupType:i},successCallBkFn:e=>{t=e.data}}),t};return{generateLookupGridColumn:async e=>{let o=await t(e.lookupType);return{...e,options:o,displayField:"ltr"===i.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:t}})(),[l,n]=Z([]),{t:s}=me(),p=wa(o.formElements),c=[],m=Q.useMemo((()=>o?.gridStateKey?Ka(o.gridStateKey):{}),[]);for(const e of p)!0===e?.gridProps?.hidden&&c.push(e.fieldName);let _={};if(m?.columnVisibilityModel){_=m.columnVisibilityModel;const e=Object.keys(_);for(const i of c)e.includes(i)||(_[i]=!1)}else for(const e of c)_[e]=!1;const A=a((e=>e.AppLayout.appDirection)),[T,u]=Q.useState(_),[f,I]=Q.useState(m.columnOrder||[]),[y,R]=Q.useState(m.columnWidths||{}),[L,h]=Z(m.columnGroupingModel||[]);let P=m?.pinnedColumns?.left||[];P=P.filter((e=>!Ha.includes(e)));let M=m?.pinnedColumns?.right||[]||[];M=M.filter((e=>!Ha.includes(e)));const[D,C]=Z({left:[..."ltr"===A?Ha:[],...P],right:[..."rtl"===A?Ha:[],...M]}),b=zi(),g=Fe(),[v,w]=Z(null),[W,k]=Z(null),[G,Y]=Z({}),V=async()=>{let e=((e,t,o)=>{const a=[];for(const d of e)if("text"===d?.fieldType||"number"===d?.fieldType){const e={...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:t,type:"number"==d?.fieldType?"number":"string",field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200};a.push(e)}else if("date"===d?.fieldType){const e=(r={...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:t,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200},{...r,type:"string",renderEditCell:e=>i(ft,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:i=>{e.api.setEditCellValue({id:e.id,field:e.field,value:i})}}),valueParser:(e,i,t)=>{let o=null;return null!==e&&(o=ge(e).format(mt)),o},valueFormatter:(e,i,t)=>i[t.field]});a.push(e)}else if("datetime"===d?.fieldType){const e=Sa({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:t,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200});a.push(e)}else if("checkbox"===d?.fieldType){const e=Ua({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:t,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,checkedValue:d?.checkedValue,unCheckedValue:d?.unCheckedValue,width:150});a.push(e)}else if("combobox"===d?.fieldType){const e=ga({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:t,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,valueField:d?.optionValueField||"value",displayField:d?.optionDisplayField||"display",options:d?.options||[],flex:1,minWidth:200});a.push(e)}else if("lookup"===d?.fieldType){const e=ga({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:t,lookupType:d?.lookupType,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,valueField:d?.optionValueField||"value",displayField:d?.optionDisplayField||"display",options:d?.options||[],flex:1,minWidth:200});a.push(e)}var r;return a})(p,"row"===o?.editMode?.editMode||!1,s);for(let i of e)i?.lookupType&&(i.displayField="ltr"===r.appDirection?"lookupEnDisplay":"lookupArDisplay",i.options=await d(i.lookupType),i.valueField="lookupValue");n(e)},[q,K]=Z({ids:new Set,type:"include"});let z="id";o?.keyColumnName&&(z=o?.keyColumnName);const H=o.setData,$=ve.object(Ba(p));let X=!0;o?.editAction?.authority&&(X=b.isUserAuthorized(o.editAction.authority));let J=!0;o?.deleteAction?.authority&&(J=b.isUserAuthorized(o.deleteAction.authority));const{ConfirmationWindow:ee,setOpen:ie}=Ki({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;v&&!0===v?.isNew||(e=await o.apiActions.deleteRecordById(v[z])),e&&(o?.deleteAction?.postActionCallBack&&await o.deleteAction.postActionCallBack(v),H((e=>e.filter((e=>e[z]!=v[z])))))}});let te,oe,re,de,ne,se;"modal"===o?.editMode?.editMode&&(te=o?.editMode?.specs?.modalHeight||"fit-content",oe=o?.editMode?.specs?.modalWidth||"300",re=o?.editMode?.specs?.modalMinHeight,de=o?.editMode?.specs?.modalMinWidth,ne=o?.editMode?.specs?.modalIcon||"window",se=o?.editMode?.specs?.modalTitle||"Record Form");const{Window:pe,setWindowState:ce}=Hi({height:te,minHeight:re,minWidth:de,onCloseCallBack:()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},width:oe,windowIcon:ne,windowTitle:se}),_e={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(o?.rowActions?30*o.rowActions.length:0)+(o?.editAction&&o?.editAction?.isEnabled?30:0)+(o?.deleteAction&&o?.deleteAction?.isEnabled?30:0),getActions:e=>{const t=e.row,a=[];if("none"!=o?.editMode?.editMode&&(void 0===o?.disableDefaultAction||!o.disableDefaultAction)){const e=G[t[z]]?.mode===ti.Edit;if("row"===o.editMode.editMode&&e)X&&(a.push(i(Je,{icon:i(ae,{icon:"save"}),label:s("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const i=e[z];Y({...G,[i]:{mode:ti.View}})})(t)}})),a.push(i(Je,{icon:i(ae,{icon:"cancel"}),label:s("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const i=e[z];i&&Ra(i)&&i<0?(Y({...G,[i]:{mode:ti.View,ignoreModifications:!0}}),H((e=>{const t=e.filter((e=>e[z]!=i));return t}))):Y({...G,[i]:{mode:ti.View,ignoreModifications:!0}})})(t)},color:"inherit"})));else{if(o?.editAction&&!0===o?.editAction?.isEnabled){let e=!0;o?.editAction?.isActionVisibleForRecord&&(e=o?.editAction?.isActionVisibleForRecord(t));let r=!1;o?.editAction?.isActionDisabledForRecord&&(r=o?.editAction?.isActionDisabledForRecord(t)),X&&e&&a.push(i(Je,{disabled:r,icon:i(S,{title:s("EDIT_BTN_LABEL"),children:i(ae,{icon:"edit",style:{color:r?"gray":void 0}})}),showInMenu:o?.editAction?.gridActionProps?.showInMenu||!1,label:s("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{X&&!r&&(async e=>{if(e)if(k(e),"form"===o.editMode.editMode)g(o.editMode.specs.formRoute+"/"+e[z]);else if("modal"===o.editMode.editMode)ce(!0);else if("row"===o?.editMode?.editMode){const i=e[z];Y({...G,[i]:{mode:ti.Edit}})}})(t)}}))}if(o?.deleteAction&&!0===o?.deleteAction?.isEnabled){let e=!0;o?.deleteAction?.isActionVisibleForRecord&&(e=o?.deleteAction?.isActionVisibleForRecord(t));let r=!1;o?.deleteAction?.isActionDisabledForRecord&&(r=o?.deleteAction?.isActionDisabledForRecord(t)),J&&e&&a.push(i(Je,{disabled:r,icon:i(S,{title:s("DELETE_BTN_LABEL"),children:i(ae,{icon:"trash",style:{color:r?"gray":void 0}})}),showInMenu:o?.deleteAction?.gridActionProps?.showInMenu||!1,label:s("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(J&&!r){if(o?.deleteAction?.preActionValidation&&!o.deleteAction.preActionValidation(t))return;w(t),ie(!0)}}}))}}}if(o?.rowActions)for(const e of o.rowActions)e?.gridActionProps?.multiRecord&&!0===e?.gridActionProps?.multiRecord||a.push(i(Va,{...e,record:t,reloadData:async()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)}}));return a}};let Ae=[];(void 0===o?.disableDefaultAction||!o.disableDefaultAction||o?.rowActions&&o?.rowActions.length>0)&&Ae.push(_e),Ae=[...Ae,...l];j((()=>{void 0!==o?.autoLoad&&!0!==o.autoLoad||o.apiActions.reloadData(o?.gridLoadParametersValues),V()}),[]),j((()=>{V()}),[A,o.formElements]);const Te=Q.useMemo((()=>{const e=Ae.map((e=>({...e,width:y[e.field]||e.width})));if(f.length){const i=new Map(e.map((e=>[e.field,e])));return f.map((e=>i.get(e))).filter(Boolean)}return e}),[f,y,Ae]);return e(t,{children:[i(ee,{}),"modal"===o?.editMode?.editMode?i(pe,{children:o?.editMode?.specs?.formComponent?i(o.editMode.specs.formComponent,{recordIdToEdit:W?W[z]:void 0,formCloseCallBk:()=>{ce(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)}}):i(xa,{formLoadCallBk:o.formLoadCallBk,recordIdToEdit:W?W[z]:void 0,formCloseCallBk:()=>{ce(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)},elements:o.formElements,apiActions:o.apiActions,editAuthorityKey:o?.editAction?.authority,formSavedSuccessfullyCallBk:o?.editAction?.postActionCallBack,preSaveValidation:o?.editAction?.preActionValidation,actions:o?.rowActions})}):i(t,{}),void 0!==o?.hideInfoBar||o?.hideInfoBar?i(t,{}):e(E,{sx:{display:"flex"},children:[void 0!==o?.hideBackButton||o?.hideBackButton?i(t,{}):i(N,{onClick:()=>{g(-1,{replace:!0})},children:i(ae,{icon:"arrow-left"})}),e(E,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[o?.girdIcon?i(ae,{icon:o.girdIcon,style:{marginRight:5,marginLeft:5}}):i(t,{}),i(O,{variant:"h5",children:o?.gridTitle?ha(s(o?.gridTitle)):""})]})]}),o?.gridLoadParameters&&o?.gridLoadParameters.length>0&&o?.gridLoadParametersValues&&o?.setGridLoadParametersValues?e(B,{defaultExpanded:!0,sx:{width:"100%"},children:[i(x,{expandIcon:i(ei,{}),children:e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[i(ae,{style:{marginLeft:5,marginRight:5},icon:"search"}),i(O,{component:"span",children:"Filters"})]})}),i(F,{children:i(E,{children:i(xa,{saveButtonSpecs:{label:s("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:s("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?o.setGridLoadParametersValues(e):o.setGridLoadParametersValues({}),o.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o.gridLoadParameters})})})]}):i(t,{}),i(ii,{...o?.muiProps,slots:{toolbar:Ya},slotProps:{toolbar:{templateProps:{...o,rowSelectionModel:q,data:o?.data},handleCreateNewRecord:()=>{if("form"===o?.editMode?.editMode)g(o.editMode.specs.formRoute);else if("modal"===o?.editMode?.editMode)k(null),ce(!0);else if("row"===o?.editMode?.editMode){qa-=1;const e={};e[z]=qa,e.isNew=!0;for(const i of l)"actions"!=i?.type&&i?.field!=z&&i?.field&&(e[i.field]=null);H((i=>[e,...i])),Y((e=>({...e,[qa]:{mode:ti.Edit}})))}},clearGridState:()=>{o?.gridStateKey&&localStorage.removeItem(o.gridStateKey),u({}),I([]),R({}),h([]),C({left:[..."ltr"===A?Ha:[]],right:[..."rtl"===A?Ha:[]]})}}},getRowId:e=>e[z],showToolbar:!0,rows:o?.data,columns:Te,checkboxSelection:!0,editMode:"row",rowModesModel:"row"==o.editMode.editMode?G:void 0,onRowModesModelChange:"row"==o.editMode.editMode?e=>{Y(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async a=>{if("row"===o.editMode.editMode){let r=null;const d=(e=>{try{$.parse(e)}catch(e){console.log("validateRecord err",e);let i=null;return i=e instanceof ve.ZodError?e.errors.map((e=>"Error in field ("+e.path+") : "+e.message)).join(","):"invalid record data",i}})(a);if(d){const o=d.split(",");throw le.error(i("div",{style:{},children:o.map((o=>e(t,{children:[i("div",{children:o}),i(U,{})]})))})),new Error(d)}if(o?.editAction?.preActionValidation&&!o.editAction.preActionValidation(a))throw new Error("error on the configured presave validation");const l={...a};if(a[z]&&Ra(a[z])&&Number(a[z])<0&&(l[z]=null),r=await o.apiActions.saveRecord(l),null==r)throw new Error("Failed to process your request, contact your administrator");return o?.editAction?.postActionCallBack&&await o.editAction.postActionCallBack(a),!0===a?.isNew&&H((e=>{const i=e.filter((e=>e[z]!==a[z]));return[r,...i]})),!0===o?.editMode?.reloadAfterSave&&o?.apiActions?.reloadData&&o?.apiActions?.reloadData(o?.gridLoadParametersValues),r}},rowSelectionModel:q,onRowSelectionModelChange:e=>{K(e)},columnVisibilityModel:T,onColumnVisibilityModelChange:e=>{u(e),o?.gridStateKey&&za(o.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:i,targetIndex:t}=e;I((e=>{const a=e.length?[...e]:Ae.map((e=>e.field)),r=a.indexOf(i.field);return-1===r||(a.splice(r,1),a.splice(t,0,i.field),o?.gridStateKey&&za(o.gridStateKey,{columnOrder:a})),a}))},onColumnWidthChange:e=>{const i={...y,[e.colDef.field]:e.width};R(i),o?.gridStateKey&&za(o.gridStateKey,{columnWidths:i})},rowGroupingModel:L,onRowGroupingModelChange:e=>{(e=>{h(e),o?.gridStateKey&&za(o.gridStateKey,{columnGroupingModel:e})})(e)},pinnedColumns:D,onPinnedColumnsChange:e=>{let i=e?.left||[];i=i.filter((e=>!Ha.includes(e)));let t=e?.right||[];t=t.filter((e=>!Ha.includes(e)));const a={left:[..."ltr"===A?Ha:[],...i],right:[..."rtl"===A?Ha:[],...t]};C(a),o?.gridStateKey&&za(o.gridStateKey,{pinnedColumns:a})},sx:{width:"100%"}})]})},Za=t=>{const{UserSession:r}=zi(),d=a((e=>e.AppLayout)),l=o(),{handlePostRequest:n}=Bi(),[s,p]=Z(r.value.currentOrganization.id);return e(E,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[i(ct,{sx:{width:"100%"},displayField:"ltr"===d.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:r.value.userOrganizations,value:s,onChangeCallBack:e=>{p(e)}}),i(T,{sx:{m:1},variant:"contained",disabled:null==s||s===r.value.currentOrganization.id,onClick:async()=>{await n({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:r.value.username,orgId:s},data:{},successCallBkFn:e=>{const i={...e.data,isAuthenticated:!0};l(Fi.setAuthenticated(i)),t.successChangeCallBackFn&&t.successChangeCallBackFn()}})},children:"Change Organization"})]})},ja=re({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,i)=>{e.isOpened=i.payload}}}),{toggleSideBarState:$a,setSideBarState:Xa}=ja.actions;var Ja=ja.reducer;const er=b(te,{shouldForwardProp:e=>"open"!==e})((({theme:e})=>{const i=a((e=>e.AppLayout)),t=Pi();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:t?void 0:"calc(100% - 350px)",marginLeft:t||"ltr"!==i.appDirection?void 0:"350px",marginRight:t||"rtl"!==i.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}})),ir=()=>{const{Window:r,setWindowState:d}=Hi({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),l=a((e=>e.AppInfo.value)),n=a((e=>e.AppLayout)),s=a((e=>e.SideBar)),{UserSession:p}=zi(),c=p.value.currentOrganization,{handleGetRequest:m}=Bi(),_=Pi(),A=o();return e(t,{children:[i(r,{children:i(Za,{successChangeCallBackFn:()=>{d(!1)}})}),i(er,{position:"fixed",open:s.isOpened,children:e(oe,{children:[i(N,{color:"inherit","aria-label":"open drawer",onClick:()=>{A($a())},edge:"start",sx:[{mr:"ltr"===n.appDirection?2:void 0,ml:"rtl"===n.appDirection?2:void 0},s.isOpened&&{display:"none"}],children:i(ae,{icon:"bars"})}),i(W,{src:l.appLogo,sx:{marginRight:1,marginLeft:1}}),i(O,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:_?"":`${l.appName} - ${"ltr"===n.appDirection?c?.organizationEnName:c?.organizationArName}`}),i(S,{title:"light"===n.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:i(N,{color:"inherit",onClick:()=>{A(Ci.setThemeMode("light"===n.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===n.themeMode?"dark":"light")},children:"light"===n.themeMode?i(ae,{icon:"moon"}):i(ae,{icon:{prefix:"far",iconName:"sun"}})})}),i(S,{title:"ar"===pe.language?"Change Language To English":"Change Language To Arabic",children:i(N,{color:"inherit",onClick:()=>{let e="ar"===pe.language?"en":"ar";var i;i=e,pe.changeLanguage(i),localStorage.setItem("language",i),A(Ci.setAppDirection("ar"===e?"rtl":"ltr"))},children:i(ae,{icon:"language"})})}),p.value?.userOrganizations&&p.value?.userOrganizations.length>1?i(S,{title:"Change Current Organization",children:i(N,{color:"inherit",onClick:()=>{d(!0)},children:i(ae,{icon:"globe"})})}):i(t,{}),i(W,{}),i("div",{style:{marginLeft:5,marginRight:5},children:_?"":p.value?.username}),i(N,{color:"inherit",onClick:async()=>{try{await m({endPointURI:"api/auth/logout"})}catch(e){console.log("logout error",e)}A(Fi.setUnAuthenticated())},children:i(ae,{rotation:"rtl"===n.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},tr=b("div")((({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"}))),or=(e,i)=>{for(const t of i){if(t.id===e)return t;if(t.children){const i=or(e,t.children);if(i)return i}}},ar=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"development_admin.organization",label:"ORGANIZATION_PLURAL",authority:"DEVELOPMENT_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"DEVELOPMENT_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"system_admin.Person",label:"PERSON_PLURAL",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",icon:"code",children:[{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}]];function rr(){return i(Pe,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const dr=X(ci)((({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${si.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})}))),lr=X(mi)((({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:J(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}}))),nr=ri(li);function sr(e){const t=di({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return i(nr,{style:t,...e})}const pr=X(he)({color:"inherit",fontWeight:500});function cr({icon:t,expandable:o,children:r,...d}){const{t:l}=me(),n=a((e=>e.AppLayout));return e(Ti,{...d,sx:{display:"flex",alignItems:"center",padding:1},children:[i(ae,{style:{marginRight:"ltr"===n.appDirection?7:void 0,marginLeft:"rtl"===n.appDirection?7:void 0,fontSize:"1.2rem"},icon:t}),i(pr,{variant:"body2",sx:{fontSize:16},children:l(r)}),o&&i(rr,{})]})}const mr=e=>Array.isArray(e)?e.length>0&&e.some(mr):Boolean(e),_r=H.forwardRef((function(t,o){const{id:a,itemId:r,label:d,disabled:l,children:n,...s}=t,{getRootProps:p,getContentProps:c,getIconContainerProps:m,getCheckboxProps:_,getLabelProps:A,getGroupTransitionProps:T,getDragAndDropOverlayProps:u,status:E,publicAPI:f}=pi({id:a,itemId:r,children:n,label:d,disabled:l,rootRef:o}),I=f.getItem(r),O=mr(n);return i(Ei,{itemId:r,children:e(dr,{...p(s),children:[e(lr,{...c({className:Ia("content",{"Mui-expanded":E.expanded,"Mui-selected":E.selected,"Mui-focused":E.focused,"Mui-disabled":E.disabled})}),children:[i(_i,{...m(),children:i(ui,{status:E})}),i(Ai,{..._()}),i(cr,{...A({icon:I?.icon||"book",expandable:O&&E.expanded})}),i(fi,{...u()})]}),n&&i(sr,{...T()})]})})}));function Ar(){const e=Fe(),t=a((e=>e.AppLayout)),r=a((e=>e.AppInfo.value));o();const d=Pi(),{isUserAuthorized:l}=zi(),n=e=>e.filter((e=>void 0===e.authority||null==e.authority||l(e.authority))).map((e=>(e.children&&(e.children=n(e.children)),e))),s=[];r.enableAdministrationModule&&s.push(...ar),s.push(...r.businessNavigationItems);const p=n(s);return i(ni,{items:p,onItemClick:(i,t)=>{const o=or(t,s);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||e(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:Mi,direction:t.appDirection,maxHeight:d?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:_r}})}const Tr=()=>{const t=a((e=>e.AppInfo.value)),{UserSession:r}=zi(),d=r.value.currentOrganization,l=k(),n=a((e=>e.AppLayout)),s=a((e=>e.SideBar)),p=o();return e(ai,{sx:{width:Mi,flexShrink:0,"& .MuiDrawer-paper":{width:Mi,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===n.appDirection?"left":"right",open:s.isOpened,children:[e(tr,{children:[e(E,{sx:{width:"100%"},children:[i(O,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[i(O,{sx:{fontSize:12},color:"textDisabled",children:`${t.appName} - ${"ltr"===n.appDirection?d?.organizationEnName:d?.organizationArName}`}),e(O,{sx:{fontSize:12},color:"textDisabled",children:["V.",t.appVersion]})]})]}),i(oi,{onClick:()=>{p($a())},children:"ltr"===l.direction?i(ae,{icon:"angle-left"}):i(ae,{icon:"angle-right"})})]}),i(Oe,{}),i(Ar,{})]})},ur=Ni({key:"muirtl",stylisPlugins:[Oi,Ii]}),Er=Ni({key:"mui"}),fr=e=>{const{t:t}=me(),{handleGetRequest:o}=Bi(),[a,r]=Z([]),d=Xi({findAll:"api/v1/admin/organizationapplicationmodule/all",deleteById:"api/v1/admin/organizationapplicationmodule",save:"api/v1/admin/organizationapplicationmodule",findById:"api/v1/admin/organizationapplicationmodule",setData:r}),[l,n]=Z([]);j((()=>{(async()=>{await o({endPointURI:"api/v1/admin/systemapplicationmodule/all",showMask:!0,successCallBkFn:e=>{n(e.data)}})})()}),[]);const s=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:l,optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return i(Qa,{apiActions:d,data:a,gridLoadParametersValues:{organizationId:e?.selectedOrganization?.id},hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT",preActionValidation:async i=>(i.organizationId=e?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},Ir=e=>{const{t:t}=me(),[o,a]=Z([]),r=Xi({findAll:"api/v1/admin/organizationunittype/all",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:a});return i(Qa,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{organizationId:e?.selectedOrganization?.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT",preActionValidation:async i=>(i.organizationId=e?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},Or=e=>{const{t:t}=me(),[o,a]=Z([]),r=Xi({findAll:"api/v1/admin/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:a}),[d,l]=Z([]),{handleGetRequest:n}=Bi();j((()=>{(async()=>{await n({endPointURI:"api/v1/admin/organizationunittype/all",showMask:!0,parameters:{organizationId:e.selectedOrganization.id},successCallBkFn:e=>{l(e.data)}})})()}),[]);const s=[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return i(Qa,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{organizationId:e?.selectedOrganization?.id},setData:a,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",preActionValidation:async i=>(i.organizationId=e?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},Nr=e=>{const{t:t}=me(),[o,a]=Z([]),r=Xi({findAll:"api/v1/admin/organizationrank/all",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:a});return i(Qa,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{organizationId:e?.selectedOrganization?.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",preActionValidation:async i=>(i.organizationId=e?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},yr=o=>{const[a,r]=Z([]),[d,l]=Z([]),{handlePostRequest:n,handleGetRequest:s}=Bi();j((()=>{o.selectedRecord&&(async()=>{await s({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:o.selectedRecord.id,organizationId:o.selectedRecord.organizationId},successCallBkFn:e=>{r(e.data.currentRoles),l(e.data.availableRoles)}})})()}),[o.selectedRecord]);return e(t,{children:[i(tt,{displayField:"appRoleDisplay",options:d,valueField:"id",selectedOptions:a,setSelection:r}),e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[i(T,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:o.selectedRecord.id},data:a,successCallBkFn:()=>{le.success("Your request has been proccesed successfully"),o.closeModalFn&&o.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),i(T,{variant:"contained",color:"error",onClick:o.closeModalFn,children:"Cancel"})]})]})},Rr=o=>{const[r,d]=Z(null),{Window:l,setWindowState:n}=Hi({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),s=a((e=>e.commonStores.stores.SystemOrganizations.data)),p=a((e=>e.commonStores.stores.SystemOrganizationRanks.data)),c=a((e=>e.commonStores.stores.SystemOrganizationUnits.data)),{t:m}=me(),[_,A]=Z([]),T=Xi({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:A}),u=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:p,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:c,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}];return e(t,{children:[i(l,{children:i(yr,{selectedRecord:r,closeModalFn:()=>{n(!1)}})}),i(Qa,{apiActions:T,hideInfoBar:!0,data:_,setData:A,editMode:{editMode:"row"},formElements:u,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{d(e),n(!0)}}],gridLoadParametersValues:{personId:o.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async e=>(e.personId=o.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Lr=e=>{const{t:t}=me(),[o,a]=Z([]),r=Xi({findAll:"api/v1/admin/systemapplicationmodule/application/all",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:a});return i(Qa,{apiActions:r,data:o,gridLoadParametersValues:{applicationId:e?.selectedApplication?.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT",preActionValidation:async i=>(i.systemApplicationId=e?.selectedApplication?.id,!0)},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},hr=e=>{const{t:t}=me(),[o,a]=Z([]),r=Xi({findAll:"api/v1/admin/systemapplicationauthority/all",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:a}),[d,l]=Z([]),{handleGetRequest:n}=Bi();j((()=>{(async()=>{await n({endPointURI:"api/v1/admin/systemapplicationmodule/application/all",showMask:!0,parameters:{applicationId:e.selectedApplication.id},successCallBkFn:e=>{l(e.data)}})})()}),[]);const s=[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return i(Qa,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{applicationId:e?.selectedApplication?.id},setData:a,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT",preActionValidation:async i=>(i.systemApplicationId=e?.selectedApplication?.id,!0)},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},Pr=o=>{const[a,r]=Z([]),[d,l]=Z([]),{handlePostRequest:n,handleGetRequest:s}=Bi();j((()=>{o.roleId&&o.appId&&(async()=>{await s({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{appId:o.appId,roleId:o.roleId},successCallBkFn:e=>{r(e.data.selectedAuthorities),l(e.data.availableAuthorities)}})})()}),[o.roleId,o.appId]);return e(t,{children:[i(tt,{displayField:"authorityName",options:d,valueField:"id",selectedOptions:a,setSelection:r}),e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[i(T,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:o.roleId},data:a,successCallBkFn:()=>{le.success("Your request has been proccesed successfully"),o.closeModalFn&&o.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),i(T,{variant:"contained",color:"error",onClick:o.closeModalFn,children:"Cancel"})]})]})},Mr=o=>{const{t:a}=me(),[r,d]=Z([]),[l,n]=Z(null),{Window:s,setWindowState:p}=Hi({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),c=Xi({findAll:"api/v1/admin/systemapplicationrole/all",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:d});return e(t,{children:[i(s,{children:i(Pr,{appId:o.selectedApplication.id,roleId:l?.id,closeModalFn:()=>{p(!1)}})}),i(Qa,{apiActions:c,data:r,hideInfoBar:!0,gridLoadParametersValues:{applicationId:o?.selectedApplication?.id},setData:d,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{n(e),p(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT",preActionValidation:async e=>(e.systemApplicationId=o?.selectedApplication?.id,!0)},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},Dr=e=>{const t=a((e=>e.commonStores.stores.SystemOrganizations.data)),{t:o}=me(),[r,d]=Z([]),l=Xi({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:d}),n=[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:t,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return i(Qa,{apiActions:l,data:r,setData:d,hideInfoBar:!0,gridLoadParametersValues:{systemApplicationId:e.selectedApplication.id},editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:o("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT",preActionValidation:i=>(i.systemApplicationId=e.selectedApplication.id,!0)},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},Cr=e=>{const t=a((e=>e.commonStores.stores.SystemEntityParameters.data)),{t:o}=me(),[r,d]=Z([]),l=Xi({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:d});return i(Qa,{apiActions:l,data:r,setData:d,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:t,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:o("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async i=>(i.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},br=e=>{const{t:t}=me(),o=a((e=>e.commonStores.stores.SystemEntityParameters.data)),[r,d]=Z([]),l=Xi({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:d}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return i(Qa,{apiActions:l,data:r,hideInfoBar:!0,setData:d,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:t("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async i=>(i.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Sr=e=>{if(0===e.length)return[];const i=[];for(const t of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:t,fieldName:t,fieldType:"text"}};i.push(e)}return console.log("formElements",i),i},gr=e=>(console.log("reportdata",e.reportData),i(Qa,{data:e.reportData,disableDefaultAction:!0,setData:e.setReportData,formElements:Sr(e.reportData),gridLoadParameters:e.gridLoadParameters,gridLoadParametersValues:e.gridLoadParametersValues,setGridLoadParametersValues:e.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{e.reloadReport()},saveRecord:async()=>{}}})),Ur=o=>{const[a,r]=Z(null),[d,l]=Z(null),[n,s]=Z([]),[p,c]=Z("WAITING_REPORT_CODE"),{handleGetRequest:m,handlePostRequest:_,HandleDownloadHTTPPostPDF:A}=Bi(),[T,u]=Z(null),[f,I]=Z({...o?.reportParametersValues}),[y,R]=Z([]),{t:L}=me(),h=e=>{const i=[];for(const t of e){const e={type:"field",mode:"props",props:{fieldLabel:t?.parameterLabel,fieldName:t?.parameterCode,fieldType:t?.parameterType,hidden:t?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:t?.mandatory,defaultValue:f[t?.parameterCode]||t?.defaultValue}};i.push(e)}return i},P=async(e,i)=>{c("WAITING_RESULT"),"Excel"===e?.reportType?await _({endPointURI:"api/v1/dev/report/run",showMask:!0,data:{reportCode:o.reportCode,parameters:i,resultMode:o.resultMode,jasperOutPutFileType:o.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT"),s(e.data)}}):e?.reportType&&await A({endPointURI:"api/v1/dev/report/run",showMask:!0,data:{reportCode:o.reportCode,parameters:i,resultMode:o.resultMode,jasperOutPutFileType:o.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT");const i=e.headers["content-disposition"];let t="downloaded_file";if(i&&-1!==i.indexOf("filename=")){const e=i.match(/filename="?([^"]+)"?/);e&&e[1]&&(t=e[1])}if(t.includes("pdf")){const i=new Blob([e.data],{type:"application/pdf"}),t=URL.createObjectURL(i);r(t)}else{const i=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(i),a=document.createElement("a");a.href=o,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}console.log(e)},failureCallBkFn:e=>{l("Failed To run report ... contact your administrator"),c("ERROR")}})};return j((()=>{o?.reportCode&&(async()=>{c("LOADING_METADATA"),await m({endPointURI:"api/v1/dev/report/metadata",showMask:!0,parameters:{reportCode:o.reportCode},successCallBkFn:e=>{u(e.data),R(h(e.data.reportParameters)),!0===o?.byPassParameterEntry||0==e.data.reportParameters.length?(P(e.data,f),c("WAITING_RESULT")):c("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{l("Failed loading report metadata ... contact your administrator"),c("ERROR")}})})()}),[o.reportCode,o.byPassParameterEntry,o.reportParametersValues,o.jasperOutPutFileType,o.resultMode]),e(t,{children:[e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[e(E,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[i(ae,{icon:"Excel"===T?.reportType?"file-excel":"file-pdf",color:"Excel"===T?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),T?.reportName]}),"Excel"!=T?.reportType&&"SHOWING_RESULT"===p?e(t,{children:[!0===o?.byPassParameterEntry?i(t,{}):y.length>0?i(N,{onClick:()=>{R(h(T.reportParameters)),c("WAITING_PARAMETER_INPUT")},children:i(ae,{icon:"filter"})}):i(t,{}),i(N,{children:i(ae,{icon:"refresh",onClick:()=>{P(T,f)}})})]}):i(t,{})]}),i(E,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===p&&"Excel"!=T?.reportType?e(B,{defaultExpanded:!0,sx:{width:"100%"},expanded:!0,children:[i(x,{children:e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[i(ae,{style:{marginLeft:5,marginRight:5},icon:"search"}),i(O,{component:"span",children:"Filters"})]})}),i(F,{children:i(E,{children:i(xa,{saveButtonSpecs:{label:L("SHOW_REPORT_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success",hidden:!0},cancelButtonSpecs:{label:L("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{I(null!=e?e:{}),P(T,e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:y})})})]}):"SHOWING_RESULT"===p||("WAITING_PARAMETER_INPUT"===p||"WAITING_RESULT"===p)&&"Excel"===T?.reportType?"Excel"===T?.reportType?i(gr,{reportData:n,setReportData:s,reloadReport:async()=>{P(T,f)},gridLoadParameters:y,gridLoadParametersValues:f,setGridLoadParametersValues:I}):i("iframe",{src:a,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===p?e(E,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[i(ae,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),d]}):i(t,{})})]})},vr={Blueprint:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!0,isVisible:!0},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!1,isVisible:!1},reportJasperPath:{isMandatory:!1,isVisible:!1}},Jasper:{useSysDatasource:{isMandatory:!1,isVisible:!0},datasourceConId:{isMandatory:!1,isVisible:!0},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!0,isVisible:!0},reportJasperPath:{isMandatory:!0,isVisible:!0}},Excel:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!0,isVisible:!0},reportJasperName:{isMandatory:!1,isVisible:!1},reportJasperPath:{isMandatory:!1,isVisible:!1}}},wr=(e,i,t)=>{if(e&&vr[e]){const o=vr[e],a=Object.keys(o);for(const e of a){o[e].isVisible?i.showField(e):(i.hideField(e),t.setValue(e,null))}}else i.hideField("useSysDatasource"),i.hideField("datasourceConId"),i.hideField("reportBluePrintId"),i.hideField("reportExcelDataQueryId"),i.hideField("reportJasperName"),i.hideField("reportJasperPath"),t.setValue("useSysDatasource",null),t.setValue("datasourceConId",null),t.setValue("reportBluePrintId",null),t.setValue("reportExcelDataQueryId",null),t.setValue("reportJasperName",null),t.setValue("reportJasperPath",null)},Br=e=>{const{t:t}=me(),[o,a]=Z([]),r=Xi({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:a});return i(Qa,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:t("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:i=>i?.recipientMail&&!Pa(i.recipientMail)?(le.error("You must enter a valid email address"),!1):(i.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},xr=e=>{const{t:t}=me(),[o,r]=Z([]),d=a((e=>e.commonStores.stores.SystemDataQueries.data)),l=Xi({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:r}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:d,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return i(Qa,{apiActions:l,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:n,keyColumnName:"id",gridTitle:t("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async i=>(i.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},Fr=e=>{const t=a((e=>e.commonStores.stores.SystemReports.data)),{t:o}=me(),[r,d]=Z([]),l=Xi({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:d}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:t,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return i(Qa,{apiActions:l,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:d,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:o("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:i=>(i.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},Wr={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},kr=(e,i,t)=>{if(e&&Wr[e]){const o=Wr[e],a=Object.keys(o);for(const e of a){o[e].isVisible?i.showField(e):(i.hideField(e),t.setValue(e,null))}}else i.hideField("mailHost"),t.setValue("mailHost",null),i.hideField("mailPort"),t.setValue("mailPort",null),i.hideField("mailUsername"),t.setValue("mailUsername",null),i.hideField("mailPassword"),t.setValue("mailPassword",null),i.hideField("mailProtocol"),t.setValue("mailProtocol",null),i.hideField("isMailSmtpAuthEnabled"),t.setValue("isMailSmtpAuthEnabled",null),i.hideField("isMailStarttlsEnabled"),t.setValue("isMailStarttlsEnabled",null),i.hideField("isSmtpSSlEnabled"),t.setValue("isSmtpSSlEnabled",null),i.hideField("azureGraphApiClientId"),t.setValue("azureGraphApiClientId",null),i.hideField("azureGraphApiClientSecret"),t.setValue("azureGraphApiClientSecret",null),i.hideField("azureGraphApiTenantId"),t.setValue("azureGraphApiTenantId",null),i.hideField("azureGraphApiScope"),t.setValue("azureGraphApiScope",null),i.hideField("azureGraphApiEmailId"),t.setValue("azureGraphApiEmailId",null)},Gr=e=>{const{t:t}=me(),[o,r]=Z([]),d=Xi({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:r}),l=a((e=>e.commonStores.stores.SystemDataQueries.data)),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return i(Qa,{apiActions:d,data:o,setData:r,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:n,keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:i=>(i.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Yr=e=>{const{t:t}=me(),[o,r]=Z([]),d=Xi({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:r}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:a((e=>e.commonStores.stores.SystemMailTemplates.data)),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return i(Qa,{apiActions:d,data:o,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:i=>(i.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Vr=o=>{const[a,r]=Z(null),{Window:d,setWindowState:l}=Hi({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=me(),{handleGetRequest:s}=Bi(),[p,c]=Z([]);j((()=>{(async()=>{await s({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:o.selectedRecord.id},successCallBkFn:e=>{c(e.data)}})})()}),[o.selectedRecord]);const[m,_]=Z([]),A=Xi({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:_}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:p,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return e(t,{children:[i(d,{children:i(Yr,{selectedRecord:a})}),i(Qa,{apiActions:A,data:m,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:o.selectedRecord.id},setData:_,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{r(e),l(!0)}}],formElements:T,keyColumnName:"id",gridTitle:n("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:e=>(e.workflowDocumentId=o.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},qr={LineChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},ColumnChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},PieChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},Card:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},CircularProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},LinearProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}}},Kr=(e,i,t)=>{if(e&&qr[e]){const o=qr[e],a=Object.keys(o);for(const e of a){o[e].isVisible?i.showField(e):(i.hideField(e),t.setValue(e,null))}}else i.hideField("height"),t.setValue("height",null),i.hideField("width"),t.setValue("width",null),i.hideField("horizontalAxisField"),t.setValue("horizontalAxisField",null),i.hideField("horizontalAxisLabel"),t.setValue("horizontalAxisLabel",null),i.hideField("seriesKeys"),t.setValue("seriesKeys",null),i.hideField("verticalAxisField"),t.setValue("verticalAxisField",null),i.hideField("verticalAxisLabel"),t.setValue("verticalAxisLabel",null)},zr=e=>{const{t:t}=me(),[o,r]=Z([]),d=a((e=>e.commonStores.stores.SystemWidgets.data)),l=Xi({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:r});return i(Qa,{apiActions:l,data:o,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:t("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async i=>(i.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Hr=o=>{const[a,r]=Z(!0),[d,l]=Z([]),{handleGetRequest:n}=Bi();j((()=>{(async()=>{r(!0),await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:o.dataQueryId,...o.parameterValues},successCallBkFn:e=>{r(!1),l(e.data)},failureCallBkFn:()=>{r(!1),l(null)}})})()}),[o.parameterValues]);let s=0;if(1==d.length&&(s=100),"CircularProgress"===o.widgetType||"LinearProgress"===o.widgetType)for(const e of d)s+=e[o.verticalAxisField];return e(t,{children:["LineChart"===o.widgetType||"PieChart"===o.widgetType||"ColumnChart"===o.widgetType?e(E,{children:[i(ae,{style:{marginRight:10,marginLeft:10},icon:o?.icon||"chart-pie"}),o?.title]}):i(t,{}),i(E,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:a?e(t,{children:[i(ae,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),i("div",{children:"Loading"})]}):"ColumnChart"===o.widgetType?i(ot,{data:d,widgetTitle:o.title,labelField:o.verticalAxisField,valueField:o.horizontalAxisField,valueLabel:o.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===o.widgetType?i(dt,{data:d,widgetTitle:o.title,labelField:o.verticalAxisField,valueField:o.horizontalAxisField,valueLabel:o.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===o.widgetType?i(st,{data:d,widgetTitle:o.title,labelField:o.horizontalAxisField,valueField:o.verticalAxisField,widgetType:"Line"}):e(L,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[i(L,{size:{xs:12},sx:{textAlign:"center"},children:o.title}),d.map(((e,t)=>"Card"===o.widgetType?i(L,{size:{md:3,xs:12},children:i(at,{widgetTitle:"",record:e,labelField:o.verticalAxisField,valueField:o.horizontalAxisField},t)}):"CircularProgress"===o.widgetType?i(L,{size:{md:3,xs:12},children:i(rt,{widgetTitle:"",record:e,labelField:o.horizontalAxisField,valueField:o.verticalAxisField,total:s},t)}):"LinearProgress"===o.widgetType?i(L,{size:{md:3,xs:12},children:i(nt,{widgetTitle:"",record:e,labelField:o.horizontalAxisField,valueField:o.verticalAxisField,total:s},t)}):void 0))]})})]})},Qr=o=>{const[a,r]=Z({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),[d,l]=Z(o?.parameters||{}),n=Fe(),{handleGetRequest:s,handlePostRequest:p}=Bi();return j((()=>{o.dashboardCode&&(async()=>{await s({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:o.dashboardCode},successCallBkFn:e=>{r(e.data)},failureCallBkFn:()=>{r(null)}})})()}),[o.dashboardCode,o.parameters]),i(t,{children:a?e(t,{children:[e(E,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[i(N,{onClick:()=>{n(-1,{replace:!0})},children:i(ae,{icon:"arrow-left"})}),i(E,{sx:{flex:1}}),i(ae,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),i(E,{children:a?.dashboardTitle}),i(E,{sx:{flex:1}})]}),i(L,{container:!0,spacing:1,sx:{flexGrow:1,overflowY:"auto",padding:1},children:a?.widgets.map(((e,t)=>i(L,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=e.widgetType?"column":void 0,height:e?.height||300},size:{md:e?.width,sm:12},children:i(Hr,{...e})},t)))})]}):i(E,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},Zr=[{path:"/",component:()=>e(E,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,fontSize:24,fontWeight:"bold"},children:[i("img",{src:"logo.png",style:{margin:5}}),i("div",{children:"Welcome to Ezzsteel Flat Product Management System"}),e("div",{style:{fontSize:16},children:["Use side menu [",i(ae,{icon:"bars",style:{marginLeft:10,marginRight:10}}),"] to navigate to your authorized system modules"]})]})},...[...[{path:"admin/organizations",component:()=>{const{t:o}=me(),[a,r]=Z([]),d=Xi({findAll:"api/v1/admin/organization/all",deleteById:"api/v1/admin/organization",save:"api/v1/admin/organization",findById:"api/v1/admin/organization",setData:r}),{Window:l,setWindowState:n}=Hi({windowTitle:"Organization Subscriped Application Modules",windowIcon:"layer-group"}),{Window:s,setWindowState:p}=Hi({windowTitle:"Organization Unit Types",windowIcon:"tags"}),{Window:c,setWindowState:m}=Hi({windowTitle:"Organization Units",windowIcon:"folder-tree"}),{Window:_,setWindowState:A}=Hi({windowTitle:"Organization Ranks",windowIcon:"street-view"}),[T,u]=Z(null);return e(t,{children:[i(l,{children:i(fr,{selectedOrganization:T})}),i(s,{children:i(Ir,{selectedOrganization:T})}),i(c,{children:i(Or,{selectedOrganization:T})}),i(_,{children:i(Nr,{selectedOrganization:T})}),i(Qa,{apiActions:d,data:a,setData:r,editMode:{editMode:"row"},rowActions:[{icon:"layer-group",actionFn:async e=>{u(e),n(!0)},label:"modules"},{icon:"tags",actionFn:async e=>{u(e),p(!0)},label:"Organization Unit Types"},{icon:"folder-tree",actionFn:async e=>{u(e),m(!0)},label:"Organization Units"},{icon:"street-view",actionFn:async e=>{u(e),A(!0)},label:"Organization Ranks"}],formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Status",fieldName:"status",fieldType:"lookup",lookupType:"STATUS"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})]})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:Rr,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=me(),[t,o]=Z([]),a=Xi({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return i(Qa,{apiActions:a,data:t,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:Nr,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Or,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:Ir,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:o}=me(),[a,r]=Z(null),[d,l]=Z([]),n=Xi({findAll:"api/v1/admin/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:l}),{Window:s,setWindowState:p}=Hi({windowTitle:"Organizations Membership",windowIcon:"globe"});return e(t,{children:[i(s,{children:i(Rr,{selectedPerson:a})}),i(Qa,{apiActions:n,data:d,setData:l,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"globe",label:"User Organizations",actionFn:async e=>{r(e),p(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(le.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(le.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:o}=me(),[a,r]=Z([]),d=Xi({findAll:"api/v1/admin/systemapplication/all",deleteById:"api/v1/admin/systemapplication",save:"api/v1/admin/systemapplication",findById:"api/v1/admin/systemapplication",setData:r}),{Window:l,setWindowState:n}=Hi({windowTitle:"System Application Modules",windowIcon:"layer-group"}),{Window:s,setWindowState:p}=Hi({windowTitle:"System Application Authorities",windowIcon:"key"}),{Window:c,setWindowState:m}=Hi({windowTitle:"System Application Roles",windowIcon:"tag"}),{Window:_,setWindowState:A}=Hi({windowTitle:"System Application Lookups",windowIcon:"list-check"}),[T,u]=Z(null);return e(t,{children:[i(l,{children:i(Lr,{selectedApplication:T})}),i(s,{children:i(hr,{selectedApplication:T})}),i(c,{children:i(Mr,{selectedApplication:T})}),i(_,{children:i(Dr,{selectedApplication:T})}),i(Qa,{apiActions:d,rowActions:[{icon:"layer-group",actionFn:async e=>{u(e),n(!0)},label:"modules"},{icon:"key",actionFn:async e=>{u(e),p(!0)},label:"Authorities"},{icon:"tag",actionFn:async e=>{u(e),m(!0)},label:"Roles"},{icon:"list-check",actionFn:async e=>{u(e),A(!0)},label:"Lookups"}],data:a,setData:r,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})]})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:hr,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Lr,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:Mr,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=me(),[t,o]=Z([]),a=Xi({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return i(Qa,{apiActions:a,data:t,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=me(),t=a((e=>e.commonStores.stores.SystemDataQueries.data)),[o,r]=Z([]),d=Xi({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:r});return i(Qa,{apiActions:d,data:o,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:t,optionDisplayField:"queryName",optionValueField:"id"}}],keyColumnName:"id",gridTitle:e("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[o,r]=Z(null),{Window:d,setWindowState:l}=Hi({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),n=a((e=>e.commonStores.stores.SystemDataSources.data)),{t:s}=me(),[p,c]=Z([]),m=Xi({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:c}),_=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,i,t,o){e?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:n,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return e(t,{children:[i(d,{children:i(Cr,{selectedRecord:o})}),i(Qa,{apiActions:m,rowActions:[{label:"Query Parameters",actionFn:async e=>{r(e),l(!0)},icon:"p"}],data:p,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:_,keyColumnName:"id",gridTitle:s("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=Bi(),t=a((e=>e.commonStores.stores.SystemDataSourceType.data)),{t:o}=me(),[r,d]=Z([]),l=Xi({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:d,commonStoreKey:"SystemDataSources"});return i(Qa,{apiActions:l,data:r,setData:d,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:t,optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:o("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async i=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:i.id},successCallBkFn:e=>{le.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:e}=me(),t=a((e=>e.commonStores.stores.SystemParameterTypes.data)),[o,r]=Z([]),d=Xi({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:r});return i(Qa,{apiActions:d,data:o,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:t,optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,i,t,o){"combobox"===e?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):"date"===e||"datetime"===e?("date"===e?i.setValue("parameterValueFormat",mt):"datetime"===e&&i.setValue("parameterValueFormat",_t),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat")):(i.setValue("parameterValueFormat",null),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.hideField("parameterValueFormat"))}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,i,t,o){null!=e&&""!=e?(i.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,i,t,o){null!=e&&""!=e?(i.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:Dr,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:o}=me(),[r,d]=Z(null),{Window:l,setWindowState:n}=Hi({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:s,setWindowState:p}=Hi({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[c,m]=Z([]),_=a((e=>e.commonStores.stores.SystemDataSources.data)),A=a((e=>e.commonStores.stores.SystemDataQueries.data)),T=a((e=>e.commonStores.stores.SystemBluePrints.data)),u=Xi({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:m}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",formProps:{onValueChangeCallBack(e,i,t,o){wr(e,t,i)}}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},formProps:{onValueChangeCallBack(e,i,t,o){e?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId")}},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:_,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:T,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:A,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_PATH",fieldName:"reportJasperPath",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return e(t,{children:[i(l,{children:i(Ur,{reportCode:r?.reportCode,resultMode:"App"})}),i(s,{children:i(br,{selectedRecord:r})}),i(Qa,{apiActions:u,data:c,setData:m,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,i)=>{d(e),p(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,i)=>{d(e),n(!0)}}],formLoadCallBk:(e,i,t)=>{wr(t.reportType,e,i),!0===t?.useSysDatasource&&e.hideField("datasourceConId")},formElements:E,keyColumnName:"id",gridTitle:o("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Jasper"!==e?.reportType||e?.reportJasperPath?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(le.error("You must choose the report query"),!1):(le.error("You must choose the report blueprint"),!1):(le.error("You must enter the jasper report path"),!1):(le.error("You must enter the jasper report name"),!1):(le.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const o=a((e=>e.commonStores.stores.SystemDataQueries.data)),[r,d]=Z(null),{Window:l,setWindowState:n}=Hi({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:s,setWindowState:p}=Hi({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:c,setWindowState:m}=Hi({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:_}=me(),[A,T]=Z([]),u=Xi({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:T}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:[{value:"Year"},{value:"Month"},{value:"Day"},{value:"Hour"},{value:"Minute"},{value:"Second"}],optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return e(t,{children:[i(l,{children:i(Br,{selectedRecord:r,callBkFn:()=>{n(!1)}})}),i(s,{children:i(xr,{selectedRecord:r,callBkFn:()=>{n(!1)}})}),i(c,{children:i(Fr,{selectedRecord:r,callBkFn:()=>{m(!1)}})}),i(Qa,{apiActions:u,data:A,setData:T,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:E,keyColumnName:"id",gridTitle:_("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{d(e),n(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{d(e),p(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{d(e),m(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(le.error("You must specifiy the start sending time since this email is periodical"),!1):(le.error("You must specifiy the period value since this email is periodical"),!1):(le.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:e}=me(),[t,o]=Z([]),a=Xi({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o});return i(Qa,{apiActions:a,data:t,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,i,t,o){kr(e,t,i)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,i,t)=>{kr(t.mailEngine,e,i)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[o,r]=Z(null),{Window:d,setWindowState:l}=Hi({windowTitle:"Document Status",windowIcon:"tag"}),{Window:n,setWindowState:s}=Hi({windowTitle:"Document Action",windowIcon:"stamp"}),p=a((e=>e.commonStores.stores.SystemOrganizations.data)),c=a((e=>e.commonStores.stores.SystemReports.data)),m=a((e=>e.commonStores.stores.SystemDataSources.data)),{t:_}=me(),[A,T]=Z([]),u=Xi({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:T}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:p,optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:c,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,i,t,o){e?(t.hideField("documentConId"),i.setValue("documentConId",null)):t.showField("documentConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:m,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return e(t,{children:[i(d,{children:i(Gr,{selectedRecord:o})}),i(n,{children:i(Vr,{selectedRecord:o})}),i(Qa,{apiActions:u,formLoadCallBk:(e,i,t)=>{!0===t.useSystemCon?e.hideField("documentConId"):e.showField("documentConId")},data:A,setData:T,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{r(e),l(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{r(e),s(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:_("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:E,keyColumnName:"id",gridTitle:_("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:e}=me(),t=a((e=>e.commonStores.stores.SystemDataQueries.data)),o=a((e=>e.commonStores.stores.SystemWidgetTypes.data)),[r,d]=Z([]),l=Xi({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:d});return i(Qa,{apiActions:l,data:r,setData:d,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",options:o,optionDisplayField:"name",optionValueField:"name",formProps:{onValueChangeCallBack(e,i,t,o){Kr(e,t,i)}}}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:t,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_SERIES_KEYS",fieldName:"seriesKeys",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_LABEL",fieldName:"verticalAxisLabel",required:!1,fieldType:"text"}}]}}],keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"},formLoadCallBk:(e,i,t)=>{Kr(t.widgetType,e,i)}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:o}=me(),[a,r]=Z(null),{Window:d,setWindowState:l}=Hi({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,s]=Z([]),p=Fe(),c=Xi({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:s});return e(t,{children:[i(d,{children:i(zr,{selectedRecord:a})}),i(Qa,{apiActions:c,data:n,setData:s,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{r(e),l(!0)}},{label:"View",icon:"eye",actionFn:async e=>{p("/dashboard/"+e.dashboardCode)}}],gridTitle:o("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:()=>{const{dashboardCode:e}=xe();return i(Qr,{dashboardCode:e})}},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=me(),[t,o]=Z([]),a=Xi({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return i(Qa,{apiActions:a,data:t,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=me(),[t,o]=Z([]),r=Xi({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:o}),d=a((e=>e.commonStores.stores.SystemMailTemplates.data));return i(Qa,{apiActions:r,disableDefaultAction:!0,data:t,setData:o,editMode:{editMode:"none"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:d,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",gridTitle:e("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}}]]],jr=o=>{const{isUserAuthorized:a}=zi();return o?.authority&&!a(o.authority)?i(E,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:e("h2",{children:[i(ae,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):i(t,{children:o.children})},$r=()=>{const t=a((e=>e.AppLayout)),r=a((e=>e.AppInfo.value)),d=a((e=>e.AppInfo.value.businessRoutes)),l=o(),{show:n,hide:s}=wi(),p=a((e=>e.commonStores)),[c,m]=Z(!1),{isUserAuthorized:_}=zi(),{handleGetRequest:A}=Bi();return j((()=>{p?.storeKeys&&(async()=>{n("Loading ... please wait");const e=p.stores,i=p.storeKeys;for(let t of i)void 0!==e[t]?.authority&&null!==e[t]?.authority&&!_(e[t]?.authority)||""==e[t]?.url||!0!==e[t].autoLoad||await A({endPointURI:e[t].url,showMask:!1,successCallBkFn:e=>{l(Zi({storeKey:t,data:e.data}))},failureCallBkFn:()=>{l(Zi({storeKey:t,data:[]}))}});s()})()}),[p.storeKeys]),i(K,{value:"ltr"===t.appDirection?Er:ur,children:i(E,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:e(We,{children:[r.enableAdministrationModule?Zr.map(((e,t)=>i(ke,{path:e.path,element:i(jr,{authority:e.authority,children:i(e.component,{})})},"adm"+t))):null,d.map(((e,t)=>i(ke,{path:e.path,element:i(jr,{authority:e.authority,children:i(e.component,{})})},"bs"+t)))]})})})},Xr=X("div")((({theme:e})=>({width:30,height:6,margin:10,backgroundColor:Ri[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:Ri[900]})})));function Jr(t){const{window:r}=t,d=a((e=>e.SideBar)),l=a((e=>e.AppInfo.value)),n=o(),s=e=>{n(Xa(e))};return i(Li,{container:void 0!==r?()=>r().document.body:void 0,anchor:"bottom",open:d.isOpened,onClose:()=>{s(!1)},onOpen:()=>{s(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:e(E,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[i(Xr,{}),i(E,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:i(Ar,{})}),e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[i(O,{sx:{fontSize:12},color:"textDisabled",children:l.appName}),e(O,{sx:{fontSize:12},color:"textDisabled",children:["V.",l.appVersion]})]})]})})}const ed=()=>{const{t:t}=me(),o=a((e=>e.loadingMask.value)),r=a((e=>e.AppLayout));return e(G,{dir:r.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[i(Y,{color:"inherit"}),i("div",{style:{marginRight:10,marginLeft:10},children:o?.message||t("DEFAULT_LOADING_MESSAGE")})]})},id=()=>{const r=a((e=>e.AppInfo.value)),[d,l]=Z(""),[n,s]=Z(""),[p,c]=Z(!1),m=a((e=>e.UserSession.value)),_=o(),A=async()=>{if(null==d||""==d)return void le.error("username is required to proceed");if(null==n||""==n)return void le.error("password is required to proceed");c(!0);let e=null;try{if(e=await se.post(`${r.apiBaseUrl}/api/auth/login`,{username:d,password:n},{withCredentials:!0}),null!=e.data&&""!==e.data){c(!1);const i={...e.data,isAuthenticated:!0};_(Fi.setAuthenticated(i))}}catch(e){c(!1),le.error(e?.response?.data||"failed to authenticate, contact your administrator")}},u=a((e=>e.UserSession.value)),f=V({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${r.appTheme?.dark?.primaryColor||ut} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:r.appTheme?.dark?.primaryColor||ut},secondary:{main:r.appTheme?.dark?.secondaryColor||Et}}});return j((()=>{(async()=>{if(r?.apiBaseUrl&&null==u.isAuthenticated)try{let e=await se.get(`${r.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0});if(null!=e&&null!=e.data){const i={...e.data,isAuthenticated:!0};_(Fi.setAuthenticated(i))}else _(Fi.setUnAuthenticated())}catch(e){_(Fi.setUnAuthenticated())}})()}),[r]),i(z,{theme:f,children:i(y,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==m.isAuthenticated?e(E,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[i("img",{src:r?.appLogo,width:150,height:150}),i(O,{sx:{m:1},variant:"h4",color:"textSecondary",children:r?.appName}),e(O,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",r.appVersion]}),i(R,{label:"username",sx:{width:300,m:1},value:d,onChange:e=>{l(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&A()}}),i(R,{label:"password",sx:{width:300,m:1},value:n,type:"password",onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&A()}}),i(T,{loading:p,onClick:A,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):e(t,{children:[i(Y,{sx:{marginRight:1}}),i("div",{children:"You will be redirected shortly ... please wait"})]})})})},td=X("main",{shouldForwardProp:e=>"open"!==e})((({theme:e,open:i})=>{const t=a((e=>e.AppLayout)),o=ee(),r=Pi();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&i?"calc(100% - 350px)":"100%",direction:t.appDirection,justifyContent:"flex-start",transition:!0===i?o.transitions.create(["margin","width"],{easing:o.transitions.easing.easeOut,duration:o.transitions.duration.enteringScreen}):o.transitions.create(["margin","width"],{easing:o.transitions.easing.sharp,duration:o.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==t.appDirection||!0!==i?0:Mi+"px",marginRight:r||"rtl"!==t.appDirection||!0!==i?0:Mi+"px"}}));function od(){const t=a((e=>e.SideBar)),o=Pi(),r=a((e=>e.UserSession));return e(Ge,{children:[i(ne,{draggable:!0,position:"bottom-center"}),i(ed,{}),!0===r.value.isAuthenticated?e(td,{open:t.isOpened,children:[i(ie,{}),i(ir,{}),o?null:i(Tr,{}),o?i(Jr,{}):null,i(tr,{}),i($r,{})]}):i(id,{})]})}const ad=re({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,i)=>{e.value=i.payload}}}),rd=ad.actions;var dd=ad.reducer;const ld={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/admin/organization/all",authority:"DEVELOPMENT_ADMIN",data:[]},SystemOrganizationRanks:{autoLoad:!0,url:"api/v1/admin/organization/ranks/all",authority:"DEVELOPMENT_ADMIN",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/admin/organization/units/all",authority:"DEVELOPMENT_ADMIN",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"}},nd=e=>{const t=o();hi.setLicenseKey(e.muiPremiumKey);const r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||At} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:e.appTheme?.light?.primaryColor||At},secondary:{main:e.appTheme?.light?.secondaryColor||Tt},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},d={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||ut} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:e.appTheme?.dark?.primaryColor||ut},secondary:{main:e.appTheme?.dark?.secondaryColor||Et}}};let l={};e.enableAdministrationModule&&(l={...ld}),e.businessCommonStoresMetaData&&(l={...l,...e.businessCommonStoresMetaData}),t(ji(l));const n=a((e=>e.AppLayout));let s={...r};"dark"===n.themeMode&&(s={...d});const p=V({direction:n.appDirection,...s});return j((()=>{document.title=e.documentTitle,t(rd.setAppInfo(e))}),[]),i(z,{theme:p,children:i(od,{})})};d.add(l),d.add(n),d.add(s);const sd=e=>{const t={AppLayout:bi,UserSession:Wi,loadingMask:vi,commonStores:$i,SideBar:Ja,AppInfo:dd,...e.businessReduxReducers},o=de({reducer:t});return i(r,{store:o,children:i(nd,{...e})})};export{sd as BaseApp,pt as CheckBox,ct as ComboBox,ut as DARK_THEME_INITIAL_MAIN_COLOR,Et as DARK_THEME_INITIAL_SECANDARY_COLOR,mt as DATE_FORMAT,_t as DATE_TIME_FORMAT,ft as Datefield,It as DatetimeField,At as LIGHT_THEME_INITIAL_MAIN_COLOR,Tt as LIGHT_THEME_INITIAL_SECANDARY_COLOR,ot as TemplateBarChart,at as TemplateDataCard,xa as TemplateForm,rt as TemplateGauge,Qa as TemplateGrid,dt as TemplateLineChart,nt as TemplateLineProgress,st as TemplatePieChart,Ji as TemplateTextField,tt as TransferList,ha as capitalizeFirstLetter,ya as hasDigitsOnly,Ra as isNumber,La as isNumeric,Pa as isValidEmail,Xi as useApiActions,Bi as useAxios,Ki as useConfirmationWindow,Pi as useIsMobile,wi as useLoadingMask,zi as useSession,Hi as useWindow};
|
|
31
|
+
function(e,t){const i=Lt(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some((e=>void 0===e))&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Aa),n=z.forwardRef((function(e,n){const l=function(e=Ea){return _a(e)}(o),{className:s,component:p="div",...c}=fa(e);return t(d,{as:p,ref:n,className:ya(s,r?r(a):a),theme:i&&l[i]||l,...c})}));return n}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach((t=>{o[t]=function(e,t,i="Mui"){const o=ha[t];return o?`${i}-${o}`:`${Oa.generate(e)}-${t}`}(e,t,i)})),o}("MuiBox",["root"]).root,generateClassName:Oa.generate});function La(e){return/^\d+$/.test(e)}function Ca(e){return"number"==typeof e&&!isNaN(e)}function Da(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function Ma(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function Pa(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}"production"!==process.env.NODE_ENV&&(Ra.propTypes={children:Ji.node,component:Ji.elementType,sx:Ji.oneOfType([Ji.arrayOf(Ji.oneOfType([Ji.func,Ji.object,Ji.bool])),Ji.func,Ji.object])});const ba=e=>{const i=a((e=>e.AppLayout)),o=Qt(),[r,d]=Q([]),{handleGetRequest:n}=kt();return j((()=>{e.lookupType&&(async()=>{await n({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{d(e.data)},failureCallBkFn:()=>{d([])}})})()}),[e.lookupType,o.UserSession]),t(Ai,{...e,options:r,displayField:"ltr"===i.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},ga=e=>{if(e?.fieldInfo){const o=e.fieldInfo,a=e?.formManager||null,r=e?.formActions||null,d=e?.formValues||null,n=e?.fieldInfo?.fieldName||null,l=e?.fieldInfo?.fieldType||null;return o&&a&&d&&n&&l?e.hiddenFields.includes(n)?t(i,{}):t(R,{size:o?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?t(ii,{...o.muiTextFieldProps,fullWidth:!0,type:l,disabled:!(!o?.disabled&&!e.disabledFields.includes(n)),hidden:o?.hidden||!1,label:o?.fieldLabel,value:d[n],onChange:e=>{let t=null;""!=e.target.value&&(t="number"===l&&Da(e.target.value)?Number(e.target.value):e.target.value),a.setValue(n,t),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(t,a,r)},sx:{"& .MuiInputBase-root":{height:`${o?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...o?.formProps?.style},error:null!=a.formState.errors[n],helperText:a?.formState?.errors[n]?.message?.toString()}):"date"===o?.fieldType?t(Ni,{format:o?.dateFormat||Ti,sx:o?.formProps?.style||{width:"100%"},disabled:!(!o?.disabled&&!e.disabledFields.includes(n)),label:o?.fieldLabel,onChangeCallBack:e=>{a.setValue(n,e),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(e,a,r)},value:d[n],error:null!=a.formState.errors[n],errorMessage:a?.formState?.errors[n]?.message?.toString()}):"datetime"===o?.fieldType?t(yi,{format:o?.dateFormat||_i,sx:o?.formProps?.style||{width:"100%"},disabled:!(!o?.disabled&&!e.disabledFields.includes(n)),label:o?.fieldLabel,onChangeCallBack:e=>{a.setValue(n,e),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(e,a,r)},value:d[n],error:null!=a.formState.errors[n],errorMessage:a?.formState?.errors[n]?.message?.toString()}):"checkbox"===o?.fieldType?t(ui,{label:o?.fieldLabel,onChangeCallBack:e=>{a.setValue(n,e),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(e,a,r)},value:d[n],checkedValue:o?.checkedValue||!0,unCheckedValue:o?.unCheckedValue||!1,disabled:!(!o?.disabled&&!e.disabledFields.includes(n)),sx:o?.formProps?.style}):"combobox"===o?.fieldType?t(Ai,{sx:o?.formProps?.style||{width:"100%"},label:o?.fieldLabel,disabled:!(!o?.disabled&&!e.disabledFields.includes(n)),onChangeCallBack:(e,t)=>{let i=null;e&&(i=e+""),a.setValue(n,i),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(i,a,r,t)},options:o?.options||[],displayField:o?.optionDisplayField||"",valueField:o?.optionValueField||"",value:d[n],errorMessage:a?.formState?.errors[n]?.message?.toString()}):"lookup"===o?.fieldType?t(ba,{sx:o?.formProps?.style||{width:"100%"},label:o?.fieldLabel,disabled:!(!o?.disabled&&!e.disabledFields.includes(n)),onChangeCallBack:(e,t)=>{let i=null;e&&(i=e+""),a.setValue(n,i),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(i,a,r,t)},lookupType:o.lookupType,value:d[n],errorMessage:a?.formState?.errors[n]?.message?.toString()}):null}):t(i,{})}return t(i,{})},Sa=o=>{const a=Qt(),{ConfirmationWindow:r,setOpen:d}=Zt({body:o?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{o?.actionFn(o?.record)}});return null==o?.authority||a.isUserAuthorized(o.authority)?e(i,{children:[t(r,{}),e(T,{variant:o?.formActionProps?.actionButtonVariant,color:o?.formActionProps?.actionButtonColor,onClick:()=>{if(o?.actionFn){if(o?.preActionValidation&&!o.preActionValidation(o.record))return;!0===o?.isConfirmationRequired?d(!0):o?.actionFn(o.record)}},children:[o?.icon?t(ae,{icon:o.icon,style:{marginRight:5,marginLeft:5}}):t(i,{}),t("div",{children:o?.label})]})]}):t(i,{})},Ua=o=>{const{t:a}=me();return t(i,{children:e(R,{container:!0,sx:o?.style,alignItems:"flex-start",children:[o?.label?t(R,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:o?.icon?e(i,{children:[t(ae,{icon:o.icon,style:{marginRight:5,marginLeft:5}}),t("div",{children:a(o.label)})]}):t(i,{children:a(o.label)})}):t(i,{}),o?.elements?o.elements.map((e=>"group"===e.type?t(Ua,{...e.props,formManager:o.formManager,formValues:o.formValues,formActions:o.formActions,hiddenFields:o.hiddenFields,disabledFields:o.disabledFields}):"field"===e.type&&"props"===e.mode?t(ga,{fieldInfo:e.props,formManager:o.formManager,formValues:o.formValues,formActions:o.formActions,hiddenFields:o.hiddenFields,disabledFields:o.disabledFields}):"field"===e.type&&"node"===e.mode?t(R,{size:e?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:t(e.node,{formManager:o.formManager,formValues:o.formValues,formActions:o.formActions})}):void 0)):null,o?.actions?t(R,{size:{sm:12},sx:{padding:1},children:o.actions.map((e=>t(Sa,{...e,record:o.formValues})))}):t(i,{})]})})},va=e=>({...e,type:"string",renderEditCell:e=>t(yi,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=Se(e).format(_i)),o},valueFormatter:(e,t,i)=>t[i.field]}),wa=e=>({...e,type:"custom",valueGetter:e=>e?e+"":e,renderCell:e=>{let i=null;try{i=e.colDef.options.find((t=>t[e.colDef.valueField]==e.value))}catch(e){}return t("div",{children:null!=i?i[e.colDef.displayField]:e.value})},renderEditCell:e=>t(Ai,{...e,sx:{width:"100%"},options:e.colDef.options,valueField:e.colDef.valueField,displayField:e.colDef.displayField,onChangeCallBack:(t,i)=>{null===t&&e.api.setEditCellValue({id:e.id,field:e.field,value:null}),e.api.setEditCellValue({id:e.id,field:e.field,value:t+""})}})}),xa=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:i=>{const o=i?.value;return o===e.checkedValue||"true"===o||1===o||!0===o?t(ae,{icon:"check",color:"green"}):t(ae,{icon:"xmark",color:"red"})},renderEditCell:i=>t(ui,{...i,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{i.api.setEditCellValue({id:i.id,field:i.field,value:e})}})}),Ba=e=>{const t=[];if("field"===e.type&&"props"===e.mode&&e?.props)t.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const i of e.props.elements)t.push(...Ba(i));return t},Fa=e=>{const t=[];for(const i of e)t.push(...Ba(i));return t},ka=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?Ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ue.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?Ue.boolean({required_error:"This field is required"}):Ue.boolean().optional().nullable():t[e]=!0===i?.required?Ue.string({message:"This field is required"}).min(1,"This field is required"):Ue.string().optional().nullable()}return t},Wa=e=>{let i=a((e=>e.AppInfo.value.apiBaseUrl))+"/api/v1/attachment/";e?.attachmentId?i+="download?attachmentId="+e.attachmentId:(i+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(i+=`&category=${e.category}`));const[o,r]=Q(i);return e?.showAsAvatar?t(b,{src:o}):t("img",{src:o,alt:"image",onError:()=>r("/no_image.png"),style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Ga=o=>{const{handleGetRequest:a,handleDeleteRequest:r}=kt(),{ConfirmationWindow:d,setOpen:n}=Zt({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await r({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:o.attachmentCode,refKey:o.refKey,attachmentId:o.id},successCallBkFn:e=>{o.setAttachmentConfig(e.data)},showMask:!0})})()}});return e(i,{children:[t(d,{}),e(Ae,{sx:{width:300,border:"0.5px solid gray"},children:[t(qe,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:o?.docType.toLocaleLowerCase().includes("image")?t(Wa,{attachmentId:o.id}):t(ae,{icon:"file",size:"3x"})}),e(Ve,{children:[t(Le,{gutterBottom:!0,variant:"h6",component:"div",children:o.fileName}),t(Le,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${o?.attachmentSize||"unknown"} kb`}),t(Le,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${o?.category||"NA"}`}),t(Le,{variant:"body2",sx:{color:"text.secondary"},children:o.remark})]}),e(Ye,{children:[t(N,{size:"small",onClick:()=>{n(!0)},children:t(g,{title:"Delete Attachment",children:t(ae,{icon:"trash"})})}),t("div",{style:{flex:1}}),t(N,{size:"small",onClick:async()=>{await a({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:o.id},showMask:!0,responseType:"blob",successCallBkFn:e=>{const t=window.URL.createObjectURL(new Blob([e.data])),i=document.createElement("a");i.href=t,i.setAttribute("download",o.fileName),document.body.appendChild(i),i.click(),i.remove()}})},children:t(g,{title:"Download Attachment",children:t(ae,{icon:"download"})})})]})]})]})},Ya=o=>{const{handleUploadRequest:a,handleGetRequest:r}=kt(),[d,n]=Q(null),[l,s]=Q([]),[p,c]=Q(null),[m,u]=Q(null),[A,_]=Q([]),[E,f]=Q(null),{isUserAuthorized:I}=Qt(),O=e=>e.split(".").pop()?.toLowerCase()||"";j((()=>{(async()=>{await r({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:o.attachmentCode,refKey:o.refKey},successCallBkFn:e=>{f(e.data)}})})()}),[o.refKey,o.attachmentCode]),j((()=>{if(_(E?.allowedFileTypes?E.allowedFileTypes.split(","):[]),E?.attachmentCategories){const e=[];for(const t of E.attachmentCategories.split(","))e.push({value:t});s(e)}else s([])}),[E]);let N=!0;E?.downloadAuthorityKey&&!I(E?.downloadAuthorityKey)&&(N=!1);let h=!0;return!1===o?.enableAttachment&&(h=!1),E?.uploadAuthorityKey&&!I(E.uploadAuthorityKey)&&(h=!1),e(y,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[t(i,h?{children:null==E?.maxAllowedNumberOfFiles||E?.maxAllowedNumberOfFiles<E.refKeyAttachments.length?e(i,{children:[e("h3",{children:[t(ae,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),t("input",{type:"file",style:{margin:20},accept:E?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=O(t.name);if(A.length>0&&!A.includes(e))return void ne.error(e+" is not allowed")}n(e.target.files)}}),l.length>0?t(Ai,{label:"Attachment Type",sx:{width:300,m:1},options:l,displayField:"value",valueField:"value",value:m,onChangeCallBack:e=>{u(e)}}):t(i,{}),t(ii,{label:"Remark",value:p,onChange:e=>c(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),t(T,{sx:{m:1},variant:"contained",onClick:async()=>{let e=E?.refKeyAttachments.length||0;E?.maxAllowedNumberOfFiles&&d.length+e>E.maxAllowedNumberOfFiles?ne.error("Maximum number of attachments is "+E.maxAllowedNumberOfFiles):!0===E?.isCategoryRequired&&l.length>0&&(null==m||void 0===m||""===m)?ne.error("You must selected document type to process your request"):d?await a({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:o.refKey,attachmentCode:o.attachmentCode,remark:p,category:m},files:d,successCallBkFn:e=>{f(e.data),n(null),u(null),c(null),ne.success("Your request has been process successfully")}}):ne.error("You must add files to upload")},children:"Upload"})]}):t(i,{})}:{}),N&&E?.refKeyAttachments?.length>0?e(i,{children:[e("h3",{children:[t(ae,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),t(R,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:E?.refKeyAttachments.map((e=>t(R,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:t(Ga,{...e,attachmentCode:o.attachmentCode,setAttachmentConfig:f})})))})]}):t(i,{})]})},Va=o=>{const r=a((e=>e.AppLayout)),{t:d}=me();return e(y,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[e(E,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t(ae,{icon:"history",style:{marginRight:10,marginLeft:10}}),d("WF_ACTION_HISTORY_LABEL")]}),t(E,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:o.actionHistory.map(((a,d)=>t(i,{children:e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[e(E,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[t(E,{sx:{marginBottom:.2},children:a.actionTime}),e(Le,{children:["via ",a.actionMethod]})]}),e(E,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[t(b,{sx:{m:1,width:70,height:70}}),d!==o.actionHistory.length-1?t(E,{sx:{marginTop:11,position:"absolute"},children:"|"}):t(i,{})]}),e(E,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[e(E,{sx:{width:"100%"},children:["ltr"===r.appDirection?`${a?.documentActionEnName}`:`${a?.documentActionArName}`,a?.actionComment?" - "+a.actionComment:""]}),t(E,{sx:{width:"100%"},children:"ltr"===r.appDirection?`${a?.employeeEnName}`:`${a?.employeeArName}`})]})]})})))})]})},qa=o=>{const{t:a}=me(),r=Qt(),{ConfirmationWindow:d,setOpen:n}=Zt({body:a(o?.confirmationMessage||"ACTION_CONFIRMATION"),title:a("CONFIRMATION"),onConfirmationCallBk:async()=>{await(o?.actionFn(o.recordsToProcessActionOn,o.recordIdsToProcessActionOn)),o?.reloadData&&o.reloadData()}});let l=!0;if(o.authority&&(l=r.isUserAuthorized(o.authority)),l)return e(i,{children:[t(d,{}),e(T,{onClick:async()=>{if(o?.recordsToProcessActionOn&&o?.recordsToProcessActionOn.length>0){if(o?.preActionValidation)for(const e of o.recordsToProcessActionOn)if(!o.preActionValidation(e))return;!0===o?.isConfirmationRequired?n(!0):(await o.actionFn(o.recordsToProcessActionOn,o.recordIdsToProcessActionOn),o?.reloadData&&o.reloadData())}else ne.error(a("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:o?.label?"outlined":o?.formActionProps?.actionButtonVariant?o.formActionProps.actionButtonVariant:"text",size:"small",color:o?.formActionProps?.actionButtonColor||"primary",children:[o?.icon?t(ae,{style:{marginRight:5,marginLeft:5},icon:o.icon}):t(i,{}),o?.label?a(o.label):t(i,{})]})]})},Ka=S(Ke)({display:"grid",alignItems:"center"}),Ha=S(He)((({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])}))),za=S(h)((({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])}))),Za=o=>{const{t:a}=me(),r=Qt(),d=!o?.templateProps?.editAction?.authority||r.isUserAuthorized(o.templateProps.editAction.authority),n=((e,t,i)=>{const o=[],a=[];if("exclude"===e.type&&0===e.ids.size)for(const e of t)o.push(e),a.push(e[i]);else if(e?.ids)for(const r of e.ids){const e=t.find((e=>e[i]===r));o.push(e),a.push(r)}return{selectedRecords:o,selectedRecordIds:a}})(o?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},o?.templateProps?.data||[],o?.templateProps?.keyColumnName||"id");return e(ze,{children:[d&&"none"!=o?.templateProps?.editMode?.editMode?e(T,{onClick:o?.handleCreateNewRecord,children:[t(ae,{icon:"add",style:{marginRight:5,marginLeft:5}}),a("ADD_BTN_LABEL")]}):t(i,{}),o?.templateProps?.rowActions?o.templateProps.rowActions.map(((e,t)=>!0===e?.gridActionProps?.multiRecord?$(qa,{...e,key:t,reloadData:async()=>{o.templateProps.apiActions.reloadData(o?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:n.selectedRecordIds,recordsToProcessActionOn:n.selectedRecords}):null)):t(i,{}),t(E,{sx:{flex:1,mx:.5},children:o?.templateProps?.tBar}),t(g,{title:"Columns",children:t(Ze,{render:t(He,{}),children:t(Qe,{fontSize:"small"})})}),t(g,{title:"Filters",children:t(je,{render:(e,i)=>t(He,{...e,color:"default",children:t(U,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:t($e,{fontSize:"small"})})})})}),o?.templateProps?.gridStateKey?t(g,{title:a("RESET_GRID_STATE"),children:t(N,{onClick:o?.clearGridState,children:t(ae,{icon:"eraser"})})}):t(i,{}),t(v,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),t(g,{title:a("EXPORT_EXECL_LABEL"),children:t(Xe,{render:t(w,{}),children:t(ae,{icon:"file-excel",color:"green"})})}),e(Ka,{children:[t(Je,{render:(e,i)=>t(g,{title:a("SEARCH_BTN_LABEL"),enterDelay:0,children:t(Ha,{...e,ownerState:{expanded:i.expanded},color:"default","aria-disabled":i.expanded,children:t(ae,{icon:"search"})})})}),t(et,{render:({ref:e,...i},o)=>t(za,{...i,ownerState:{expanded:o.expanded},inputRef:e,"aria-label":"Search",placeholder:`${a("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:t(x,{position:"start",children:t(ae,{icon:"search"})}),endAdornment:o.value?t(x,{position:"end",children:t(tt,{edge:"end",size:"small","aria-label":"Clear search",children:t(ae,{icon:"xmark"})})}):null,...i.slotProps?.input},...i.slotProps}})})]}),t(N,{onClick:()=>{o.templateProps.apiActions.reloadData(o?.templateProps?.gridLoadParametersValues)},children:t(ae,{icon:"refresh"})})]})},Qa=o=>{const{t:a}=me(),r=Qt(),{ConfirmationWindow:d,setOpen:n}=Zt({body:a(o?.confirmationMessage||"ACTION_CONFIRMATION"),title:a("CONFIRMATION"),onConfirmationCallBk:async()=>{await(o?.actionFn(o.record)),o?.reloadData&&o.reloadData()}});let l=!0;o.authority&&(l=r.isUserAuthorized(o.authority));let s={};o?.getActionIconStyleForRecord&&(s=o.getActionIconStyleForRecord(o.record));let p=!0;o?.isActionVisibleForRecord&&(p=o?.isActionVisibleForRecord(o.record));let c=!1;if(o?.isActionDisabledForRecord&&(c=o.isActionDisabledForRecord(o.record)),l&&p)return e(i,{children:[t(d,{}),t(it,{disabled:c,icon:t(g,{title:o?.label?a(o.label):"",children:t(ae,{icon:o.icon,style:{...s,color:c?"gray":null!=s?.color?s.color:void 0}})}),showInMenu:o?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!c){if(o?.preActionValidation&&!o.preActionValidation(o.record))return;!0===o?.isConfirmationRequired?n(!0):(await o.actionFn(o.record),!0===o?.gridActionProps?.reloadGridAfterAction&&o?.reloadData&&o.reloadData())}}})]})};let ja=-1;const $a=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Xa=(e,t)=>{const i=$a(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},Ja=["__check__","actions"],er=o=>{const{t:r}=me(),d=a((e=>e.AppLayout)),[n,l]=Q({}),[s,p]=Q(!0),{getLookupOptions:c}=(()=>{const{handleGetRequest:e}=kt(),t=a((e=>e.AppLayout)),i=async t=>{let i=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let o=await i(e.lookupType);return{...e,options:o,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:i}})(),{Window:m,setWindowState:u}=jt({windowTitle:r(o.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:A,setWindowState:T}=jt({windowTitle:r(o.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[_,f]=Q([]),I=Fa(o.formElements),y=[],h=Z.useMemo((()=>o?.gridStateKey?$a(o.gridStateKey):{}),[]);for(const e of I)!0===e?.gridProps?.hidden&&y.push(e.fieldName);let R={};if(h?.columnVisibilityModel){R=h.columnVisibilityModel;const e=Object.keys(R);for(const t of y)e.includes(t)||(R[t]=!1)}else for(const e of y)R[e]=!1;const L=a((e=>e.AppLayout.appDirection)),[C,D]=Z.useState(R),[M,P]=Z.useState(h.columnOrder||[]),[b,S]=Z.useState(h.columnWidths||{}),[U,w]=Q(h.columnGroupingModel||[]);let x=h?.pinnedColumns?.left||[];x=x.filter((e=>!Ja.includes(e)));let W=h?.pinnedColumns?.right||[]||[];W=W.filter((e=>!Ja.includes(e)));const[G,Y]=Q({left:[..."ltr"===L?Ja:[],...x],right:[..."rtl"===L?Ja:[],...W]}),V=Qt(),q=Be(),[K,H]=Q(null),[z,$]=Q(null),[X,J]=Q({}),ee=async()=>{let e=((e,i,o)=>{const a=[];for(const d of e)if("text"===d?.fieldType||"number"===d?.fieldType){const e={...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,type:"number"==d?.fieldType?"number":"string",field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200};a.push(e)}else if("date"===d?.fieldType){const e=(r={...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200},{...r,type:"string",renderEditCell:e=>t(Ni,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=Se(e).format(Ti)),o},valueFormatter:(e,t,i)=>t[i.field]});a.push(e)}else if("datetime"===d?.fieldType){const e=va({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200});a.push(e)}else if("checkbox"===d?.fieldType){const e=xa({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,checkedValue:d?.checkedValue,unCheckedValue:d?.unCheckedValue,width:150});a.push(e)}else if("combobox"===d?.fieldType){const e=wa({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,valueField:d?.optionValueField||"value",displayField:d?.optionDisplayField||"display",options:d?.options||[],flex:1,minWidth:200});a.push(e)}else if("lookup"===d?.fieldType){const e=wa({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,lookupType:d?.lookupType,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,valueField:d?.optionValueField||"value",displayField:d?.optionDisplayField||"display",options:d?.options||[],flex:1,minWidth:200});a.push(e)}else{const e={field:d.fieldName,...d?.gridProps?.muiProps};a.push(e)}var r;return a})(I,"row"===o?.editMode?.editMode||!1,r);for(let t of e)t?.lookupType&&(t.displayField="ltr"===d.appDirection?"lookupEnDisplay":"lookupArDisplay",t.options=await c(t.lookupType),t.valueField="lookupValue");f(e)},[te,ie]=Q({ids:new Set,type:"include"});let oe="id";o?.keyColumnName&&(oe=o?.keyColumnName);const re=o.setData,de=ve.object(ka(I));let le=!0;o?.editAction?.authority&&(le=V.isUserAuthorized(o.editAction.authority));let se=!0;o?.deleteAction?.authority&&(se=V.isUserAuthorized(o.deleteAction.authority));const{ConfirmationWindow:pe,setOpen:ce}=Zt({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;K&&!0===K?.isNew||(e=await o.apiActions.deleteRecordById(K[oe])),e&&(o?.deleteAction?.postActionCallBack&&await o.deleteAction.postActionCallBack(K),re((e=>e.filter((e=>e[oe]!=K[oe])))))}});let ue,Ae,Te,_e,Ee,fe;"modal"===o?.editMode?.editMode&&(ue=o?.editMode?.specs?.modalHeight||"fit-content",Ae=o?.editMode?.specs?.modalWidth||"300",Te=o?.editMode?.specs?.modalMinHeight,_e=o?.editMode?.specs?.modalMinWidth,Ee=o?.editMode?.specs?.modalIcon||"window",fe=o?.editMode?.specs?.modalTitle||"Record Form");const{Window:Ie,setWindowState:Oe}=jt({height:ue,minHeight:Te,minWidth:_e,onCloseCallBack:()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},width:Ae,windowIcon:Ee,windowTitle:fe}),Ne={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(o?.rowActions?30*o.rowActions.length:0)+(o?.editAction&&o?.editAction?.isEnabled?30:0)+(o?.deleteAction&&o?.deleteAction?.isEnabled?30:0)+(o?.attachment?30:0)+(o?.workFlowDocumentCode?30:0),getActions:e=>{const i=e.row,a=[];if("none"!=o?.editMode?.editMode&&(void 0===o?.disableDefaultAction||!o.disableDefaultAction)){const e=X[i[oe]]?.mode===rt.Edit;if("row"===o.editMode.editMode&&e)le&&(a.push(t(it,{icon:t(ae,{icon:"save"}),label:r("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const t=e[oe];J({...X,[t]:{mode:rt.View}})})(i)}})),a.push(t(it,{icon:t(ae,{icon:"cancel"}),label:r("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const t=e[oe];t&&Ca(t)&&t<0?(J({...X,[t]:{mode:rt.View,ignoreModifications:!0}}),re((e=>{const i=e.filter((e=>e[oe]!=t));return i}))):J({...X,[t]:{mode:rt.View,ignoreModifications:!0}})})(i)},color:"inherit"})));else{if(o?.editAction&&!0===o?.editAction?.isEnabled){let e=!0;o?.editAction?.isActionVisibleForRecord&&(e=o?.editAction?.isActionVisibleForRecord(i));let d=!1;o?.editAction?.isActionDisabledForRecord&&(d=o?.editAction?.isActionDisabledForRecord(i)),le&&e&&a.push(t(it,{disabled:d,icon:t(g,{title:r("EDIT_BTN_LABEL"),children:t(ae,{icon:"edit",style:{color:d?"gray":void 0}})}),showInMenu:o?.editAction?.gridActionProps?.showInMenu||!1,label:r("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{le&&!d&&(async e=>{if(e)if($(e),"form"===o.editMode.editMode)q(o.editMode.specs.formRoute+"/"+e[oe]);else if("modal"===o.editMode.editMode)Oe(!0);else if("row"===o?.editMode?.editMode){const t=e[oe];J({...X,[t]:{mode:rt.Edit}})}})(i)}}))}if(o?.deleteAction&&!0===o?.deleteAction?.isEnabled){let e=!0;o?.deleteAction?.isActionVisibleForRecord&&(e=o?.deleteAction?.isActionVisibleForRecord(i));let d=!1;o?.deleteAction?.isActionDisabledForRecord&&(d=o?.deleteAction?.isActionDisabledForRecord(i)),se&&e&&a.push(t(it,{disabled:d,icon:t(g,{title:r("DELETE_BTN_LABEL"),children:t(ae,{icon:"trash",style:{color:d?"gray":void 0}})}),showInMenu:o?.deleteAction?.gridActionProps?.showInMenu||!1,label:r("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(se&&!d){if(o?.deleteAction?.preActionValidation&&!o.deleteAction.preActionValidation(i))return;H(i),ce(!0)}}}))}}}if(i[o?.keyColumnName||"id"]&&i[o?.keyColumnName||"id"]>0&&o?.attachment&&a?.push(t(it,{icon:t(g,{title:"Attachments",children:t(ae,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{l(i),p(!o?.attachment?.enableAttachFn||o.attachment.enableAttachFn(i)),u(!0)}})),i[o?.keyColumnName||"id"]&&i[o?.keyColumnName||"id"]>0&&o?.workFlowDocumentCode&&a?.push(t(it,{icon:t(g,{title:"Approvals",children:t(ae,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{l(i),T(!0)}})),o?.rowActions)for(const e of o.rowActions)e?.gridActionProps?.multiRecord&&!0===e?.gridActionProps?.multiRecord||a.push(t(Qa,{...e,record:i,reloadData:async()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)}}));return a}};let ye=[];(void 0===o?.disableDefaultAction||!o.disableDefaultAction||o?.rowActions&&o?.rowActions.length>0)&&ye.push(Ne),ye=[...ye,..._];j((()=>{void 0!==o?.autoLoad&&!0!==o.autoLoad||o.apiActions.reloadData(o?.gridLoadParametersValues),ee()}),[]),j((()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)}),[V.UserInfo?.currentOrganization]),j((()=>{ee()}),[L,o.formElements]);const he=Z.useMemo((()=>{const e=ye.map((e=>({...e,width:b[e.field]||e.width})));if(M.length){const t=new Map(e.map((e=>[e.field,e])));return M.map((e=>t.get(e))).filter(Boolean)}return e}),[M,b,ye]);return e(i,{children:[t(pe,{}),"modal"===o?.editMode?.editMode?t(Ie,{children:o?.editMode?.specs?.formComponent?t(o.editMode.specs.formComponent,{recordIdToEdit:z?z[oe]:void 0,formCloseCallBk:()=>{Oe(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)}}):t(rr,{keyColumnName:o.keyColumnName,attachment:o.attachment,formLoadCallBk:o.formLoadCallBk,recordIdToEdit:z?z[oe]:void 0,formCloseCallBk:()=>{Oe(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)},elements:o.formElements,apiActions:o.apiActions,editAuthorityKey:o?.editAction?.authority,formSavedSuccessfullyCallBk:o?.editAction?.postActionCallBack,preSaveValidation:o?.editAction?.preActionValidation,actions:o?.rowActions})}):t(i,{}),void 0!==o?.hideInfoBar||o?.hideInfoBar?t(i,{}):e(E,{sx:{display:"flex"},children:[void 0!==o?.hideBackButton||o?.hideBackButton?t(i,{}):t(N,{onClick:()=>{q(-1,{replace:!0})},children:t(ae,{icon:"arrow-left"})}),e(E,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[o?.girdIcon?t(ae,{icon:o.girdIcon,style:{marginRight:5,marginLeft:5}}):t(i,{}),t(O,{variant:"h5",children:o?.gridTitle?Ma(r(o?.gridTitle)):""})]})]}),o?.gridLoadParameters&&o?.gridLoadParameters.length>0&&o?.gridLoadParametersValues&&o?.setGridLoadParametersValues?e(B,{defaultExpanded:!0,sx:{width:"100%"},children:[t(F,{expandIcon:t(ot,{}),children:e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t(ae,{style:{marginLeft:5,marginRight:5},icon:"search"}),t(O,{component:"span",children:"Filters"})]})}),t(k,{children:t(E,{children:t(rr,{saveButtonSpecs:{label:r("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:r("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?o.setGridLoadParametersValues(e):o.setGridLoadParametersValues({}),o.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o.gridLoadParameters})})})]}):t(i,{}),o?.attachment?t(m,{children:t(Ya,{attachmentCode:o.attachment.attachmentCode,refKey:n[o?.keyColumnName||"id"],enableAttachment:s})}):t(i,{}),o?.workFlowDocumentCode?t(A,{children:t(ar,{workFlowDocumentCode:o.workFlowDocumentCode,refDocumentId:n[o?.keyColumnName||"id"],postActionCallBk:()=>{T(!1),o.apiActions.reloadData(o.gridLoadParametersValues)},cancelActionCallBk:()=>{T(!1)}})}):t(i,{}),t(at,{...o?.muiProps,slots:{toolbar:Za},slotProps:{toolbar:{templateProps:{...o,rowSelectionModel:te,data:o?.data},handleCreateNewRecord:()=>{if("form"===o?.editMode?.editMode)q(o.editMode.specs.formRoute);else if("modal"===o?.editMode?.editMode)$(null),Oe(!0);else if("row"===o?.editMode?.editMode){ja-=1;const e={};e[oe]=ja,e.isNew=!0;for(const t of _)"actions"!=t?.type&&t?.field!=oe&&t?.field&&(e[t.field]=null);re((t=>[e,...t])),J((e=>({...e,[ja]:{mode:rt.Edit}})))}},clearGridState:()=>{o?.gridStateKey&&localStorage.removeItem(o.gridStateKey),D({}),P([]),S({}),w([]),Y({left:[..."ltr"===L?Ja:[]],right:[..."rtl"===L?Ja:[]]})}}},getRowId:e=>e[oe],showToolbar:!0,rows:o?.data,columns:he,checkboxSelection:!0,editMode:"row",rowModesModel:"row"==o.editMode.editMode?X:void 0,onRowModesModelChange:"row"==o.editMode.editMode?e=>{J(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async a=>{if("row"===o.editMode.editMode){let r=null;const d=(e=>{try{de.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof ve.ZodError?e.errors.map((e=>"Error in field ("+e.path+") : "+e.message)).join(","):"invalid record data",t}})(a);if(d){const o=d.split(",");throw ne.error(t("div",{style:{},children:o.map((o=>e(i,{children:[t("div",{children:o}),t(v,{})]})))})),new Error(d)}if(o?.editAction?.preActionValidation&&!o.editAction.preActionValidation(a))throw new Error("error on the configured presave validation");const n={...a};if(a[oe]&&Ca(a[oe])&&Number(a[oe])<0&&(n[oe]=null),r=await o.apiActions.saveRecord(n),null==r)throw new Error("Failed to process your request, contact your administrator");return o?.editAction?.postActionCallBack&&await o.editAction.postActionCallBack(a),!0===a?.isNew&&re((e=>{const t=e.filter((e=>e[oe]!==a[oe]));return[r,...t]})),!0===o?.editMode?.reloadAfterSave&&o?.apiActions?.reloadData&&o?.apiActions?.reloadData(o?.gridLoadParametersValues),r}},rowSelectionModel:te,onRowSelectionModelChange:e=>{ie(e)},columnVisibilityModel:C,onColumnVisibilityModelChange:e=>{D(e),o?.gridStateKey&&Xa(o.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:i}=e;P((e=>{const a=e.length?[...e]:ye.map((e=>e.field)),r=a.indexOf(t.field);return-1===r||(a.splice(r,1),a.splice(i,0,t.field),o?.gridStateKey&&Xa(o.gridStateKey,{columnOrder:a})),a}))},onColumnWidthChange:e=>{const t={...b,[e.colDef.field]:e.width};S(t),o?.gridStateKey&&Xa(o.gridStateKey,{columnWidths:t})},rowGroupingModel:U,onRowGroupingModelChange:e=>{(e=>{w(e),o?.gridStateKey&&Xa(o.gridStateKey,{columnGroupingModel:e})})(e)},pinnedColumns:G,onPinnedColumnsChange:e=>{let t=e?.left||[];t=t.filter((e=>!Ja.includes(e)));let i=e?.right||[];i=i.filter((e=>!Ja.includes(e)));const a={left:[..."ltr"===L?Ja:[],...t],right:[..."rtl"===L?Ja:[],...i]};Y(a),o?.gridStateKey&&Xa(o.gridStateKey,{pinnedColumns:a})},sx:{width:"100%"}})]})},tr=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return console.log("formElements",t),t},ir=e=>(console.log("reportdata",e.reportData),t(er,{data:e.reportData,disableDefaultAction:!0,setData:e.setReportData,formElements:tr(e.reportData),gridLoadParameters:e.gridLoadParameters,gridLoadParametersValues:e.gridLoadParametersValues,setGridLoadParametersValues:e.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{e.reloadReport()},saveRecord:async()=>{}}})),or=o=>{const[a,r]=Q(null),[d,n]=Q(null),[l,s]=Q([]),[p,c]=Q("WAITING_REPORT_CODE"),{handleGetRequest:m,handlePostRequest:u,HandleDownloadHTTPPostPDF:A}=kt(),[T,_]=Q(null),[f,I]=Q({...o?.reportParametersValues}),[y,h]=Q([]),{t:R}=me(),L=e=>{const t=[];for(const i of e){const e={type:"field",mode:"props",props:{fieldLabel:i?.parameterLabel,fieldName:i?.parameterCode,fieldType:i?.parameterType,hidden:i?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:i?.mandatory,defaultValue:f[i?.parameterCode]||i?.defaultValue}};t.push(e)}return t},C=async(e,t)=>{c("WAITING_RESULT"),"Excel"===e?.reportType?await u({endPointURI:"api/v1/dev/report/run",showMask:!0,data:{reportCode:o.reportCode,parameters:t,resultMode:o.resultMode,jasperOutPutFileType:o.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT"),s(e.data)}}):e?.reportType&&await A({endPointURI:"api/v1/dev/report/run",showMask:!0,data:{reportCode:o.reportCode,parameters:t,resultMode:o.resultMode,jasperOutPutFileType:o.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT");const t=e.headers["content-disposition"];let i="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(i=e[1])}if(i.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),i=URL.createObjectURL(t);r(i)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(t),a=document.createElement("a");a.href=o,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}console.log(e)},failureCallBkFn:e=>{n("Failed To run report ... contact your administrator"),c("ERROR")}})};return j((()=>{o?.reportCode&&(async()=>{c("LOADING_METADATA"),await m({endPointURI:"api/v1/dev/report/metadata",showMask:!0,parameters:{reportCode:o.reportCode},successCallBkFn:e=>{_(e.data),h(L(e.data.reportParameters)),!0===o?.byPassParameterEntry||0==e.data.reportParameters.length?(C(e.data,f),c("WAITING_RESULT")):c("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{n("Failed loading report metadata ... contact your administrator"),c("ERROR")}})})()}),[o.reportCode,o.byPassParameterEntry,o.reportParametersValues,o.jasperOutPutFileType,o.resultMode]),e(i,{children:[e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[e(E,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[t(ae,{icon:"Excel"===T?.reportType?"file-excel":"file-pdf",color:"Excel"===T?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),T?.reportName]}),"Excel"!=T?.reportType&&"SHOWING_RESULT"===p?e(i,{children:[!0===o?.byPassParameterEntry?t(i,{}):y.length>0?t(N,{onClick:()=>{h(L(T.reportParameters)),c("WAITING_PARAMETER_INPUT")},children:t(ae,{icon:"filter"})}):t(i,{}),t(N,{children:t(ae,{icon:"refresh",onClick:()=>{C(T,f)}})})]}):t(i,{})]}),t(E,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===p&&"Excel"!=T?.reportType?e(B,{defaultExpanded:!0,sx:{width:"100%"},expanded:!0,children:[t(F,{children:e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t(ae,{style:{marginLeft:5,marginRight:5},icon:"search"}),t(O,{component:"span",children:"Filters"})]})}),t(k,{children:t(E,{children:t(rr,{saveButtonSpecs:{label:R("SHOW_REPORT_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success",hidden:!0},cancelButtonSpecs:{label:R("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{I(null!=e?e:{}),C(T,e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:y})})})]}):"SHOWING_RESULT"===p||("WAITING_PARAMETER_INPUT"===p||"WAITING_RESULT"===p)&&"Excel"===T?.reportType?"Excel"===T?.reportType?t(ir,{reportData:l,setReportData:s,reloadReport:async()=>{C(T,f)},gridLoadParameters:y,gridLoadParametersValues:f,setGridLoadParametersValues:I}):t("iframe",{src:a,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===p?e(E,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[t(ae,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),d]}):t(i,{})})]})},ar=o=>{const r=a((e=>e.AppLayout)),{isUserAuthorized:d,UserInfo:n}=Qt(),{handleGetRequest:l,handlePostRequest:s}=kt(),[p,c]=Q(null),[m,u]=Q([]),{t:A}=me(),[_,f]=Q(null),[I,O]=Q({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:N,setWindowState:h}=jt({windowTitle:"ltr"===r.appDirection?I?.workflowDocument&&I?.referencedDocument?`${I?.workflowDocument?.documentEnName} # ${I?.referencedDocument[I?.workflowDocument?.documentNumberField]}`:"Document":I?.workflowDocument&&I?.referencedDocument?`${I?.workflowDocument?.documentArName} # ${I?.referencedDocument[I?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),R=async()=>{await l({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:o.workFlowDocumentCode,refDocumentId:o.refDocumentId},successCallBkFn:e=>{O(e.data)},failureCallBkFn:()=>{O({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},L=async()=>{await s({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:I?.workflowDocument?.id,refDocumentId:o.refDocumentId,actionId:p.id,refDocumentStatus:I?.workflowDocumentStatus?.documentStatusCode,actionComment:_},successCallBkFn:async e=>{p?.post_action_endpoint?await s({endPointURI:p.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:o.refDocumentId,actionId:p.id},successCallBkFn:()=>{R()}}):R()}})};return j((()=>{o.refDocumentId&&o.workFlowDocumentCode&&R()}),[o.refDocumentId,o.workFlowDocumentCode]),j((()=>{u(I?.nextActions&&I?.nextActions?.length>0?I.nextActions.filter((e=>{if(!I?.workflowDocumentStatus?.nextActionTakersAuthority&&!I?.nextActionTakers)return!0;if(I?.workflowDocumentStatus?.nextActionTakersAuthority&&d(I.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(I?.nextActionTakers)for(const e of I.nextActionTakers)if(n?.username===e?.username||n?.username===e?.USERNAME)return!0;return!1})):[])}),[I.nextActions,I.nextActionTakers]),e(i,{children:[I?.workflowDocumentReport?.id?t(N,{children:t(or,{reportCode:I?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:o.refDocumentId+""}})}):t(i,{}),I?.workflowDocument?e(E,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t(E,{sx:{flex:1}}),t(ae,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===r.appDirection?`${I?.workflowDocument?.documentEnName} # ${I?.referencedDocument[I?.workflowDocument?.documentNumberField]}`:`${I?.workflowDocument?.documentArName} # ${I?.referencedDocument[I?.workflowDocument?.documentNumberField]}`,I?.workflowDocumentStatus?"ltr"===r.appDirection?` ( ${I?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${I?.workflowDocumentStatus?.documentStatusArName} )`:"",t(E,{sx:{flex:1}}),I?.workflowDocumentReport?.id?t(T,{onClick:()=>{h(!0)},variant:"outlined",startIcon:t(ae,{icon:"eye"}),children:A("VIEW_LABEL")}):t(i,{})]}):t(i,{}),e(E,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[m?.length>0?e(y,{sx:{padding:2,display:"flex",flex:1,margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[t(Ai,{sx:{marginBottom:2,width:400},label:A("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===r.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:p?.id,options:m,onChangeCallBack:(e,t)=>{c(t)}}),t(ii,{sx:{width:400},rows:3,value:_,onChange:e=>{f(e.target.value)},multiline:!0,label:A("WF_COMMENT_LABEL")}),e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t(T,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=p&&null!=p?.id?!0!==p.require_comment&&1!==p.require_comment&&"true"!==p.require_comment||null!==_&&""!==_?p?.pre_action_endpoint?await s({endPointURI:p.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:o.refDocumentId,actionId:p.id},successCallBkFn:()=>{L()}}):L():ne.error("You must enter comment for the action to be processed"):ne.error("You must select action to process")},children:A("WF_TAKE_ACTION_BTN_LABEL")}),o?.cancelActionCallBk?t(T,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{o?.cancelActionCallBk&&o.cancelActionCallBk()},children:A("WF_CANCEL_BTN_LABEL")}):t(i,{})]}),I?.nextActionTakers&&I.nextActionTakers.length>0?e(i,{children:[t(v,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:e(E,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t(ae,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",A("WF_WAITING_FOR_LABEL")]})}),t(E,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:I.nextActionTakers.map((o=>e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[t(b,{sx:{marginRight:2,marginLeft:2,width:60,height:60}}),e(E,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t("div",{children:"ltr"===r.appDirection?o?.employee_en_name:o?.employee_ar_name}),t("div",{children:o?.email?e(i,{children:[t(ae,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),o?.email]}):t(i,{})}),t("div",{children:o?.mobile_number?e(i,{children:[t(ae,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),o?.mobile_number]}):t(i,{})})]})]})))})]}):t(i,{})]}):t(i,{}),I?.actionsHistory.length>0?t(Va,{actionHistory:I.actionsHistory}):e(y,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[e(E,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t(ae,{icon:"history",style:{marginRight:10,marginLeft:10}}),A("WF_ACTION_HISTORY_LABEL")]}),t(E,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},rr=o=>{const{Window:a,setWindowState:r}=jt({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:d,setWindowState:n}=jt({windowTitle:"Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[l,s]=Q(!0),{t:p}=me(),c=Fa(o.elements),m=[];for(const e of c)e?.hidden&&m.push(e.fieldName);const[u,A]=Q(m),_={};for(const e of o.elements)"field"===e?.type&&"props"===e?.mode&&e?.props?.defaultValue&&(_[e.props.fieldName]=e.props.defaultValue);const[E,f]=Q([]),I=Ue.object(ka(c)),O=we({resolver:xe(I),defaultValues:_}),y=O.watch(),h=Fe(),L=o?.formRouteRecordIdParamName,C=async()=>{let e=null;if(o?.recordIdToEdit?e=o.recordIdToEdit:L&&h[L]&&(e=h[L]),e){const t=await o.apiActions.loadRecordById(e);if(t){O.reset({...t}),o?.formLoadCallBk&&o?.formLoadCallBk(D,O,t);for(const e of c)"combobox"===e?.fieldType&&t[e.fieldName]&&O.setValue(e.fieldName,t[e.fieldName]+"")}}else O.reset({})},D={setFieldValue:(e,t)=>{O.setValue(e,t)},hideField:e=>{A((t=>[...t,e]))},showField:e=>{A((t=>t.filter((t=>t!==e))))},disableField:e=>{f((t=>[...t,e]))},enableField:e=>{f((t=>t.filter((t=>t!==e))))}};return j((()=>{C()}),[o?.recordIdToEdit]),j((()=>{s(!o?.attachment||!o?.attachment?.enableAttachFn||o.attachment.enableAttachFn(y))}),[y]),e(i,{children:[o?.attachment?t(a,{children:t(Ya,{attachmentCode:o.attachment.attachmentCode,refKey:y[o?.keyColumnName||"id"],enableAttachment:l})}):t(i,{}),o?.workFlowDocumentCode?t(d,{children:t(ar,{workFlowDocumentCode:o.workFlowDocumentCode,refDocumentId:y[o?.keyColumnName||"id"],postActionCallBk:()=>{n(!1),C()},cancelActionCallBk:()=>{n(!1)}})}):t(i,{}),t(Ra,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:t(R,{sx:{width:"100%"},container:!0,children:o.elements.map(((e,i)=>"group"===e.type?t(Ua,{...e.props,formManager:O,formValues:y,formActions:D,hiddenFields:u,disabledFields:E},i):"field"===e.type&&"props"===e.mode?t(ga,{fieldInfo:e.props,formManager:O,formValues:y,formActions:D,hiddenFields:u,disabledFields:E},i):"field"===e.type&&"node"===e.mode?t(R,{size:e?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:t(e.node,{formManager:O,formValues:y})},i):void 0))})}),e(Ra,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[y[o?.keyColumnName||"id"]&&o?.attachment?t(g,{title:"Attachments",children:t(N,{onClick:()=>{r(!0)},children:t(ae,{icon:"paperclip"})})}):null,y[o?.keyColumnName||"id"]&&o?.workFlowDocumentCode?t(g,{title:"Approvals",children:t(N,{onClick:()=>{n(!0)},children:t(ae,{icon:"stamp"})})}):null,o?.actions&&y[o?.keyColumnName||"id"]?o.actions.map((e=>!0===e?.formActionProps?.enabled?t(Sa,{...e,record:y}):t(i,{}))):t(i,{}),t("div",{style:{flex:1}}),t(T,{variant:o?.saveButtonSpecs?.actionButtonVariant?o.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:o?.saveButtonSpecs?.icon?t(ae,{icon:o.saveButtonSpecs.icon}):null,color:o?.saveButtonSpecs?.actionButtonColor?o.saveButtonSpecs.actionButtonColor:"primary",onClick:O.handleSubmit((e=>{console.log("form values",e),(async e=>{if((!o?.preSaveValidation||o.preSaveValidation(e))&&e){const t=await o.apiActions.saveRecord(e);t&&(O.reset({...t}),o?.formSavedSuccessfullyCallBk&&o.formSavedSuccessfullyCallBk(t),o?.formCloseCallBk&&o.formCloseCallBk())}})(e)}),(e=>{ne.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)})),children:p(o?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),t(T,{variant:o?.cancelButtonSpecs?.actionButtonVariant?o.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:o?.cancelButtonSpecs?.icon?t(ae,{icon:o.cancelButtonSpecs.icon}):null,color:o?.cancelButtonSpecs?.actionButtonColor?o.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{o?.formCloseCallBk&&o.formCloseCallBk(),O.reset(_)},children:p(o?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},dr=i=>{const{UserSession:r}=Qt(),d=a((e=>e.AppLayout)),n=o(),{handlePostRequest:l}=kt(),[s,p]=Q(r.value.currentOrganization.id);return e(E,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[t(Ai,{sx:{width:"100%"},displayField:"ltr"===d.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:r.value.userOrganizations,value:s,onChangeCallBack:e=>{p(e)}}),t(T,{sx:{m:1},variant:"contained",disabled:null==s||s===r.value.currentOrganization.id,onClick:async()=>{await l({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:r.value.username,orgId:s},data:{},successCallBkFn:e=>{const t={...e.data,isAuthenticated:!0};n(Gt.setAuthenticated(t)),i.successChangeCallBackFn&&i.successChangeCallBackFn()}})},children:"Change Organization"})]})},nr=re({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:lr,setSideBarState:sr}=nr.actions;var pr=nr.reducer;const cr=S(ie,{shouldForwardProp:e=>"open"!==e})((({theme:e})=>{const t=a((e=>e.AppLayout)),i=Pt();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:i?void 0:"calc(100% - 350px)",marginLeft:i||"ltr"!==t.appDirection?void 0:"350px",marginRight:i||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}})),mr=()=>{const{Window:r,setWindowState:d}=jt({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),n=a((e=>e.AppInfo.value)),l=a((e=>e.AppLayout)),s=a((e=>e.SideBar)),{UserSession:p}=Qt(),c=p.value.currentOrganization,{handleGetRequest:m}=kt(),u=Pt(),A=o();return e(i,{children:[t(r,{children:t(dr,{successChangeCallBackFn:()=>{d(!1)}})}),t(cr,{position:"fixed",open:s.isOpened,children:e(oe,{children:[t(N,{color:"inherit","aria-label":"open drawer",onClick:()=>{A(lr())},edge:"start",sx:[{mr:"ltr"===l.appDirection?2:void 0,ml:"rtl"===l.appDirection?2:void 0},s.isOpened&&{display:"none"}],children:t(ae,{icon:"bars"})}),t(b,{src:n.appLogo,sx:{marginRight:1,marginLeft:1}}),t(O,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:u?"":`${n.appName} - ${"ltr"===l.appDirection?c?.organizationEnName:c?.organizationArName}`}),t(g,{title:"light"===l.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:t(N,{color:"inherit",onClick:()=>{A(St.setThemeMode("light"===l.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===l.themeMode?"dark":"light")},children:"light"===l.themeMode?t(ae,{icon:"moon"}):t(ae,{icon:{prefix:"far",iconName:"sun"}})})}),t(g,{title:"ar"===pe.language?"Change Language To English":"Change Language To Arabic",children:t(N,{color:"inherit",onClick:()=>{let e="ar"===pe.language?"en":"ar";var t;t=e,pe.changeLanguage(t),localStorage.setItem("language",t),A(St.setAppDirection("ar"===e?"rtl":"ltr"))},children:t(ae,{icon:"language"})})}),p.value?.userOrganizations&&p.value?.userOrganizations.length>1?t(g,{title:"Change Current Organization",children:t(N,{color:"inherit",onClick:()=>{d(!0)},children:t(ae,{icon:"globe"})})}):t(i,{}),t(Wa,{showAsAvatar:!0,attachmentCode:"PERSON_IMG",refKey:p.value?.id+""}),t("div",{style:{marginLeft:5,marginRight:5},children:u?"":p.value?.username}),t(N,{color:"inherit",onClick:async()=>{try{await m({endPointURI:"api/auth/logout"})}catch(e){console.log("logout error",e)}A(Gt.setUnAuthenticated())},children:t(ae,{rotation:"rtl"===l.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},ur=S("div")((({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"}))),Ar=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=Ar(e,i.children);if(t)return t}}},Tr=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"development_admin.organizations",label:"ORGANIZATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"development_admin.organization",label:"Organization Info",authority:"DEVELOPMENT_ADMIN",icon:"globe",children:[{id:"development_admin.organization.modules",label:"Subscriped Modules",icon:"layer-group",authority:"ORGANIZATION_ADMIN",action:"NAVIGATION",actionPayload:{path:"admin/org/apps"}},{id:"development_admin.organization.unitTypes",label:"Organization Unit Types",icon:"tags",action:"NAVIGATION",actionPayload:{path:"admin/org/unit/types"}},{id:"development_admin.organization.units",label:"Organization Units",icon:"folder-tree",action:"NAVIGATION",actionPayload:{path:"admin/org/units"}},{id:"development_admin.organization.ranks",label:"Organization Ranks",icon:"street-view",action:"NAVIGATION",actionPayload:{path:"admin/org/ranks"}}]},{id:"system_admin.Person",label:"PERSON_PLURAL",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",authority:"DEVELOPMENT_ADMIN",icon:"code",children:[{id:"system_admin.devtools.modules",label:"System Modules",icon:"layer-group",action:"NAVIGATION",actionPayload:{path:"dev/system/modules"}},{id:"system_admin.devtools.authorities",label:"System Authorities",icon:"key",action:"NAVIGATION",actionPayload:{path:"dev/system/authorities"}},{id:"system_admin.devtools.roles",label:"System Roles",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"system_admin.devtools.lookups",label:"System Lookups",icon:"list-check",action:"NAVIGATION",actionPayload:{path:"dev/system/lookups"}},{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.AttachmentConfig",label:"ATTACHMENT_CONFIG_PLURAL",icon:"paperclip",action:"NAVIGATION",actionPayload:{path:"dev/attachmentconfigs"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",authority:"SYSTEM_ADMIN",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}]];function _r(){return t(Ce,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const Er=X(At)((({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${mt.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})}))),fr=X(Tt)((({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:J(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}}))),Ir=lt(pt);function Or(e){const i=st({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return t(Ir,{style:i,...e})}const Nr=X(Le)({color:"inherit",fontWeight:500});function yr({icon:i,expandable:o,children:r,...d}){const{t:n}=me(),l=a((e=>e.AppLayout));return e(ft,{...d,sx:{display:"flex",alignItems:"center",padding:1},children:[t(ae,{style:{marginRight:"ltr"===l.appDirection?7:void 0,marginLeft:"rtl"===l.appDirection?7:void 0,fontSize:"1.2rem"},icon:i}),t(Nr,{variant:"body2",sx:{fontSize:16},children:n(r)}),o&&t(_r,{})]})}const hr=e=>Array.isArray(e)?e.length>0&&e.some(hr):Boolean(e),Rr=z.forwardRef((function(i,o){const{id:a,itemId:r,label:d,disabled:n,children:l,...s}=i,{getRootProps:p,getContentProps:c,getIconContainerProps:m,getCheckboxProps:u,getLabelProps:A,getGroupTransitionProps:T,getDragAndDropOverlayProps:_,status:E,publicAPI:f}=ut({id:a,itemId:r,children:l,label:d,disabled:n,rootRef:o}),I=f.getItem(r),O=hr(l);return t(Ot,{itemId:r,children:e(Er,{...p(s),children:[e(fr,{...c({className:ya("content",{"Mui-expanded":E.expanded,"Mui-selected":E.selected,"Mui-focused":E.focused,"Mui-disabled":E.disabled})}),children:[t(_t,{...m(),children:t(It,{status:E})}),t(Et,{...u()}),t(yr,{...A({icon:I?.icon||"book",expandable:O&&E.expanded})}),t(Nt,{..._()})]}),l&&t(Or,{...T()})]})})}));function Lr(){const e=Be(),i=a((e=>e.AppLayout)),r=a((e=>e.AppInfo.value));o();const d=Pt(),{isUserAuthorized:n}=Qt(),l=e=>e.filter((e=>void 0===e.authority||null==e.authority||n(e.authority))).map((e=>(e.children&&(e.children=l(e.children)),e))),s=[];r.enableAdministrationModule&&s.push(...Tr),s.push(...r.businessNavigationItems);const p=l(s);return t(ct,{items:p,onItemClick:(t,i)=>{const o=Ar(i,s);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||e(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:bt,direction:i.appDirection,maxHeight:d?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Rr}})}const Cr=()=>{const i=a((e=>e.AppInfo.value)),{UserSession:r}=Qt(),d=r.value.currentOrganization,n=W(),l=a((e=>e.AppLayout)),s=a((e=>e.SideBar)),p=o();return e(nt,{sx:{width:bt,flexShrink:0,"& .MuiDrawer-paper":{width:bt,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===l.appDirection?"left":"right",open:s.isOpened,children:[e(ur,{children:[e(E,{sx:{width:"100%"},children:[t(O,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[t(O,{sx:{fontSize:12},color:"textDisabled",children:`${i.appName} - ${"ltr"===l.appDirection?d?.organizationEnName:d?.organizationArName}`}),e(O,{sx:{fontSize:12},color:"textDisabled",children:["V.",i.appVersion]})]})]}),t(dt,{onClick:()=>{p(lr())},children:"ltr"===n.direction?t(ae,{icon:"angle-left"}):t(ae,{icon:"angle-right"})})]}),t(Oe,{}),t(Lr,{})]})},Dr=Rt({key:"muirtl",stylisPlugins:[ht,yt]}),Mr=Rt({key:"mui"}),Pr=o=>{const[a,r]=Q([]),[d,n]=Q([]),{handlePostRequest:l,handleGetRequest:s}=kt();j((()=>{o.selectedRecord&&(async()=>{await s({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:o.selectedRecord.id,organizationId:o.selectedRecord.organizationId},successCallBkFn:e=>{r(e.data.currentRoles),n(e.data.availableRoles)}})})()}),[o.selectedRecord]);return e(i,{children:[t(ri,{displayField:"appRoleDisplay",options:d,valueField:"id",selectedOptions:a,setSelection:r}),e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t(T,{variant:"contained",onClick:async()=>{await l({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:o.selectedRecord.id},data:a,successCallBkFn:()=>{ne.success("Your request has been proccesed successfully"),o.closeModalFn&&o.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t(T,{variant:"contained",color:"error",onClick:o.closeModalFn,children:"Cancel"})]})]})},br=o=>{const[r,d]=Q(null),{Window:n,setWindowState:l}=jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),s=a((e=>e.commonStores.stores.SystemOrganizations.data)),p=a((e=>e.commonStores.stores.SystemOrganizationRanks.data)),c=a((e=>e.commonStores.stores.SystemOrganizationUnits.data)),{t:m}=me(),[u,A]=Q([]),T=ti({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:A}),_=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:p,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:c,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}];return e(i,{children:[t(n,{children:t(Pr,{selectedRecord:r,closeModalFn:()=>{l(!1)}})}),t(er,{apiActions:T,hideInfoBar:!0,data:u,setData:A,editMode:{editMode:"row"},formElements:_,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{d(e),l(!0)}}],gridLoadParametersValues:{personId:o.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async e=>(e.personId=o.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},gr=()=>{const{t:e}=me(),[i,r]=Q([]),d=ti({findAll:"api/v1/public/organizationrank/all",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:r}),{handleGetRequest:n}=kt(),l=a((e=>e.commonStores.stores.SystemOrganizationRanks)),s=o();return t(er,{apiActions:d,data:i,hideInfoBar:!0,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",postActionCallBack:()=>{(async()=>{await n({endPointURI:l.url,showMask:!1,successCallBkFn:e=>{s(Xt({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{s(Xt({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Sr=()=>{const{t:e}=me(),[i,r]=Q([]),{handleGetRequest:d}=kt(),n=a((e=>e.commonStores.stores.SystemOrganizationUnits)),l=o(),s=ti({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:r}),p=a((e=>e.commonStores.stores.SystemOrganizationUnitType.data));return t(er,{apiActions:s,data:i,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:p,optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:i,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await d({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{l(Xt({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{l(Xt({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},Ur=()=>{const{t:e}=me(),[i,o]=Q([]),a=ti({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:o});return t(er,{apiActions:a,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},vr=()=>{const{t:e}=me(),[i,o]=Q([]),a=ti({findAll:"api/v1/admin/systemapplicationauthority/all",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:o}),[r,d]=Q([]),{handleGetRequest:n}=kt();j((()=>{(async()=>{await n({endPointURI:"api/v1/admin/systemapplicationmodule/application/all",showMask:!0,successCallBkFn:e=>{d(e.data)}})})()}),[]);return t(er,{apiActions:a,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},wr=()=>{const{t:e}=me(),[i,o]=Q([]),a=ti({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:o});return t(er,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},xr=o=>{const[a,r]=Q([]),[d,n]=Q([]),{handlePostRequest:l,handleGetRequest:s}=kt();j((()=>{o.roleId&&(async()=>{await s({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:o.roleId},successCallBkFn:e=>{r(e.data.selectedAuthorities),n(e.data.availableAuthorities)}})})()}),[o.roleId]);return e(i,{children:[t(ri,{displayField:"authorityName",options:d,valueField:"id",selectedOptions:a,setSelection:r}),e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t(T,{variant:"contained",onClick:async()=>{await l({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:o.roleId},data:a,successCallBkFn:()=>{ne.success("Your request has been proccesed successfully"),o.closeModalFn&&o.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t(T,{variant:"contained",color:"error",onClick:o.closeModalFn,children:"Cancel"})]})]})},Br=()=>{const{t:o}=me(),[a,r]=Q([]),[d,n]=Q(null),{Window:l,setWindowState:s}=jt({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),p=ti({findAll:"api/v1/admin/systemapplicationrole/all",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:r});return e(i,{children:[t(l,{children:t(xr,{roleId:d?.id,closeModalFn:()=>{s(!1)}})}),t(er,{apiActions:p,data:a,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{n(e),s(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},Fr=e=>{const i=a((e=>e.commonStores.stores.SystemEntityParameters.data)),{t:o}=me(),[r,d]=Q([]),n=ti({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:d});return t(er,{apiActions:n,data:r,setData:d,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:i,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:o("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async t=>(t.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},kr=()=>{const e=a((e=>e.commonStores.stores.SystemOrganizations.data)),{t:i}=me(),[o,r]=Q([]),d=ti({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:r});return t(er,{apiActions:d,data:o,setData:r,hideInfoBar:!0,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:e,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}],keyColumnName:"id",gridTitle:i("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},Wr=e=>{const{t:i}=me(),o=a((e=>e.commonStores.stores.SystemEntityParameters.data)),[r,d]=Q([]),n=ti({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:d}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return t(er,{apiActions:n,data:r,hideInfoBar:!0,setData:d,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:i("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async t=>(t.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Gr={Blueprint:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!0,isVisible:!0},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!1,isVisible:!1},reportJasperPath:{isMandatory:!1,isVisible:!1}},Jasper:{useSysDatasource:{isMandatory:!1,isVisible:!0},datasourceConId:{isMandatory:!1,isVisible:!0},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!0,isVisible:!0},reportJasperPath:{isMandatory:!0,isVisible:!0}},Excel:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!0,isVisible:!0},reportJasperName:{isMandatory:!1,isVisible:!1},reportJasperPath:{isMandatory:!1,isVisible:!1}}},Yr=(e,t,i)=>{if(e&&Gr[e]){const o=Gr[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportBluePrintId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportJasperPath"),i.setValue("useSysDatasource",null),i.setValue("datasourceConId",null),i.setValue("reportBluePrintId",null),i.setValue("reportExcelDataQueryId",null),i.setValue("reportJasperName",null),i.setValue("reportJasperPath",null)},Vr=e=>{const{t:i}=me(),[o,a]=Q([]),r=ti({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:a});return t(er,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!Pa(t.recipientMail)?(ne.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},qr=e=>{const{t:i}=me(),[o,r]=Q([]),d=a((e=>e.commonStores.stores.SystemDataQueries.data)),n=ti({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:r}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:d,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t(er,{apiActions:n,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:l,keyColumnName:"id",gridTitle:i("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},Kr=e=>{const i=a((e=>e.commonStores.stores.SystemReports.data)),{t:o}=me(),[r,d]=Q([]),n=ti({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:d}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:i,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t(er,{apiActions:n,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:d,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:o("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},Hr={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},zr=(e,t,i)=>{if(e&&Hr[e]){const o=Hr[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},Zr=e=>{const{t:i}=me(),[o,r]=Q([]),d=ti({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:r}),n=a((e=>e.commonStores.stores.SystemDataQueries.data)),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t(er,{apiActions:d,data:o,setData:r,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:l,keyColumnName:"id",gridTitle:i("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Qr=e=>{const{t:i}=me(),[o,r]=Q([]),d=ti({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:r}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:a((e=>e.commonStores.stores.SystemMailTemplates.data)),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t(er,{apiActions:d,data:o,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:i("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:t=>(t.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},jr=o=>{const[a,r]=Q(null),{Window:d,setWindowState:n}=jt({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:l}=me(),{handleGetRequest:s}=kt(),[p,c]=Q([]);j((()=>{(async()=>{await s({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:o.selectedRecord.id},successCallBkFn:e=>{c(e.data)}})})()}),[o.selectedRecord]);const[m,u]=Q([]),A=ti({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:u}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:p,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return e(i,{children:[t(d,{children:t(Qr,{selectedRecord:a})}),t(er,{apiActions:A,data:m,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:o.selectedRecord.id},setData:u,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{r(e),n(!0)}}],formElements:T,keyColumnName:"id",gridTitle:l("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:e=>(e.workflowDocumentId=o.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},$r={LineChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},ColumnChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},PieChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},Card:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},CircularProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},LinearProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}}},Xr=(e,t,i)=>{if(e&&$r[e]){const o=$r[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("height"),i.setValue("height",null),t.hideField("width"),i.setValue("width",null),t.hideField("horizontalAxisField"),i.setValue("horizontalAxisField",null),t.hideField("horizontalAxisLabel"),i.setValue("horizontalAxisLabel",null),t.hideField("seriesKeys"),i.setValue("seriesKeys",null),t.hideField("verticalAxisField"),i.setValue("verticalAxisField",null),t.hideField("verticalAxisLabel"),i.setValue("verticalAxisLabel",null)},Jr=e=>{const{t:i}=me(),[o,r]=Q([]),d=a((e=>e.commonStores.stores.SystemWidgets.data)),n=ti({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:r});return t(er,{apiActions:n,data:o,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:i("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async t=>(t.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},ed=o=>{const[a,r]=Q(!0),[d,n]=Q([]),{handleGetRequest:l}=kt();j((()=>{(async()=>{r(!0),await l({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:o.dataQueryId,...o.parameterValues},successCallBkFn:e=>{r(!1),n(e.data)},failureCallBkFn:()=>{r(!1),n(null)}})})()}),[o.parameterValues]);let s=0;if(1==d.length&&(s=100),"CircularProgress"===o.widgetType||"LinearProgress"===o.widgetType)for(const e of d)s+=e[o.verticalAxisField];return e(i,{children:["LineChart"===o.widgetType||"PieChart"===o.widgetType||"ColumnChart"===o.widgetType?e(E,{children:[t(ae,{style:{marginRight:10,marginLeft:10},icon:o?.icon||"chart-pie"}),o?.title]}):t(i,{}),t(E,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:a?e(i,{children:[t(ae,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),t("div",{children:"Loading"})]}):"ColumnChart"===o.widgetType?t(di,{data:d,widgetTitle:o.title,labelField:o.verticalAxisField,valueField:o.horizontalAxisField,valueLabel:o.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===o.widgetType?t(si,{data:d,widgetTitle:o.title,labelField:o.verticalAxisField,valueField:o.horizontalAxisField,valueLabel:o.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===o.widgetType?t(mi,{data:d,widgetTitle:o.title,labelField:o.horizontalAxisField,valueField:o.verticalAxisField,widgetType:"Line"}):e(R,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[t(R,{size:{xs:12},sx:{textAlign:"center"},children:o.title}),d.map(((e,i)=>"Card"===o.widgetType?t(R,{size:{md:3,xs:12},children:t(ni,{widgetTitle:"",record:e,labelField:o.verticalAxisField,valueField:o.horizontalAxisField},i)}):"CircularProgress"===o.widgetType?t(R,{size:{md:3,xs:12},children:t(li,{widgetTitle:"",record:e,labelField:o.horizontalAxisField,valueField:o.verticalAxisField,total:s},i)}):"LinearProgress"===o.widgetType?t(R,{size:{md:3,xs:12},children:t(ci,{widgetTitle:"",record:e,labelField:o.horizontalAxisField,valueField:o.verticalAxisField,total:s},i)}):void 0))]})})]})},td=o=>{const[a,r]=Q({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),[d,n]=Q(o?.parameters||{}),l=Be(),{handleGetRequest:s,handlePostRequest:p}=kt();return j((()=>{o.dashboardCode&&(async()=>{await s({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:o.dashboardCode},successCallBkFn:e=>{r(e.data)},failureCallBkFn:()=>{r(null)}})})()}),[o.dashboardCode,o.parameters]),t(i,{children:a?e(i,{children:[e(E,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t(N,{onClick:()=>{l(-1,{replace:!0})},children:t(ae,{icon:"arrow-left"})}),t(E,{sx:{flex:1}}),t(ae,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),t(E,{children:a?.dashboardTitle}),t(E,{sx:{flex:1}})]}),t(R,{container:!0,spacing:1,sx:{flexGrow:1,overflowY:"auto",padding:1},children:a?.widgets.map(((e,i)=>t(R,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=e.widgetType?"column":void 0,height:e?.height||300},size:{md:e?.width,sm:12},children:t(ed,{...e})},i)))})]}):t(E,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},id=[{value:"FILE_SYSTEM"},{value:"SFTP"}],od=[{path:"/",component:()=>t(Ya,{attachmentCode:"DOC",refKey:"1"})},...[...[{path:"admin/organizations",component:()=>{const{t:e}=me(),[o,a]=Q([]),r=ti({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:a});return t(i,{children:t(er,{apiActions:r,data:o,setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:br,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=me(),[i,o]=Q([]),a=ti({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return t(er,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:gr,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Sr,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:Ur,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:o}=me(),[a,r]=Q(null),[d,n]=Q([]),l=ti({findAll:"api/v1/public/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:n}),{Window:s,setWindowState:p}=jt({windowTitle:"Organizations Membership",windowIcon:"globe"}),c=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t(E,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t(Wa,{showAsAvatar:!0,attachmentCode:"PERSON_IMG",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e(i,{children:[t(s,{children:t(br,{selectedPerson:a})}),t(er,{attachment:{attachmentCode:"PERSON_IMG"},workFlowDocumentCode:"DOC",apiActions:l,data:d,setData:n,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:c,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"globe",label:"User Organizations",actionFn:async e=>{r(e),p(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(ne.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(ne.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:e}=me(),[o,a]=Q([]),r=ti({findAll:"api/v1/org/admin/systemapplication/all",deleteById:"api/v1/org/admin/systemapplication",save:"api/v1/org/admin/systemapplication",findById:"api/v1/org/admin/systemapplication",setData:a});return t(i,{children:t(er,{apiActions:r,data:o,setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:vr,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:wr,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:Br,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=me(),[i,o]=Q([]),a=ti({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return t(er,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:e}=me(),{handleGetRequest:i}=kt(),[o,r]=Q([]),d=ti({findAll:"api/v1/org/admin/organizationapplicationmodule/all",deleteById:"api/org/v1/admin/organizationapplicationmodule",save:"api/v1/org/admin/organizationapplicationmodule",findById:"api/org/v1/admin/organizationapplicationmodule",setData:r}),n=a((e=>e.commonStores.stores.SystemApplicationModules.data));return t(er,{apiActions:d,data:o,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},authority:"ORGANIZATION_ADMIN"},{path:"admin/org/unit/types",component:Ur,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Sr,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:gr,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=me(),i=a((e=>e.commonStores.stores.SystemDataQueries.data)),[o,r]=Q([]),d=ti({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:r});return t(er,{apiActions:d,data:o,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id"}}],keyColumnName:"id",gridTitle:e("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[o,r]=Q(null),{Window:d,setWindowState:n}=jt({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),l=a((e=>e.commonStores.stores.SystemDataSources.data)),{t:s}=me(),[p,c]=Q([]),m=ti({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:c}),u=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("datasourceConId"),t.setValue("datasourceConId",null)):i.showField("datasourceConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:l,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return e(i,{children:[t(d,{children:t(Fr,{selectedRecord:o})}),t(er,{apiActions:m,rowActions:[{label:"Query Parameters",actionFn:async e=>{r(e),n(!0)},icon:"p"}],data:p,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:u,keyColumnName:"id",gridTitle:s("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=kt(),i=a((e=>e.commonStores.stores.SystemDataSourceType.data)),{t:o}=me(),[r,d]=Q([]),n=ti({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:d,commonStoreKey:"SystemDataSources"});return t(er,{apiActions:n,data:r,setData:d,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:i,optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:o("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async t=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:t.id},successCallBkFn:e=>{ne.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:e}=me(),i=a((e=>e.commonStores.stores.SystemParameterTypes.data)),[o,r]=Q([]),d=ti({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:r});return t(er,{apiActions:d,data:o,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:i,optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o){"combobox"===e?(t.setValue("parameterValueFormat",null),i.showField("parameterDataQueryId"),i.showField("parameterDataset"),i.showField("parameterDisplayField"),i.showField("parameterValueField"),i.hideField("parameterValueFormat")):"date"===e||"datetime"===e?("date"===e?t.setValue("parameterValueFormat",Ti):"datetime"===e&&t.setValue("parameterValueFormat",_i),i.hideField("parameterDataQueryId"),i.hideField("parameterDataset"),i.hideField("parameterDisplayField"),i.hideField("parameterValueField"),i.showField("parameterValueFormat")):(t.setValue("parameterValueFormat",null),i.hideField("parameterDataQueryId"),i.hideField("parameterDataset"),i.hideField("parameterDisplayField"),i.hideField("parameterValueField"),i.hideField("parameterValueFormat"))}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,t,i,o){null!=e&&""!=e?(t.setValue("parameterDataset",null),i.hideField("parameterDataset")):i.showField("parameterDataset")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,t,i,o){null!=e&&""!=e?(t.setValue("parameterDataQueryId",null),i.hideField("parameterDataQueryId")):i.showField("parameterDataQueryId")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:kr,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:o}=me(),[r,d]=Q(null),{Window:n,setWindowState:l}=jt({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:s,setWindowState:p}=jt({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[c,m]=Q([]),u=a((e=>e.commonStores.stores.SystemDataSources.data)),A=a((e=>e.commonStores.stores.SystemDataQueries.data)),T=a((e=>e.commonStores.stores.SystemBluePrints.data)),_=ti({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:m}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",formProps:{onValueChangeCallBack(e,t,i,o){Yr(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("datasourceConId"),t.setValue("datasourceConId",null)):i.showField("datasourceConId")}},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:u,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:T,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:A,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_PATH",fieldName:"reportJasperPath",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return e(i,{children:[t(n,{children:t(or,{reportCode:r?.reportCode,resultMode:"App"})}),t(s,{children:t(Wr,{selectedRecord:r})}),t(er,{apiActions:_,data:c,setData:m,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{d(e),p(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{d(e),l(!0)}}],formLoadCallBk:(e,t,i)=>{Yr(i.reportType,e,t),!0===i?.useSysDatasource&&e.hideField("datasourceConId")},formElements:E,keyColumnName:"id",gridTitle:o("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Jasper"!==e?.reportType||e?.reportJasperPath?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(ne.error("You must choose the report query"),!1):(ne.error("You must choose the report blueprint"),!1):(ne.error("You must enter the jasper report path"),!1):(ne.error("You must enter the jasper report name"),!1):(ne.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const o=a((e=>e.commonStores.stores.SystemDataQueries.data)),[r,d]=Q(null),{Window:n,setWindowState:l}=jt({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:s,setWindowState:p}=jt({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:c,setWindowState:m}=jt({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:u}=me(),[A,T]=Q([]),_=ti({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:T}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:[{value:"Year"},{value:"Month"},{value:"Day"},{value:"Hour"},{value:"Minute"},{value:"Second"}],optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return e(i,{children:[t(n,{children:t(Vr,{selectedRecord:r,callBkFn:()=>{l(!1)}})}),t(s,{children:t(qr,{selectedRecord:r,callBkFn:()=>{l(!1)}})}),t(c,{children:t(Kr,{selectedRecord:r,callBkFn:()=>{m(!1)}})}),t(er,{apiActions:_,data:A,setData:T,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:E,keyColumnName:"id",gridTitle:u("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{d(e),l(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{d(e),p(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{d(e),m(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(ne.error("You must specifiy the start sending time since this email is periodical"),!1):(ne.error("You must specifiy the period value since this email is periodical"),!1):(ne.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:e}=me(),[i,o]=Q([]),a=ti({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o});return t(er,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o){zr(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{zr(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[o,r]=Q(null),{Window:d,setWindowState:n}=jt({windowTitle:"Document Status",windowIcon:"tag"}),{Window:l,setWindowState:s}=jt({windowTitle:"Document Action",windowIcon:"stamp"}),p=a((e=>e.commonStores.stores.SystemOrganizations.data)),c=a((e=>e.commonStores.stores.SystemReports.data)),m=a((e=>e.commonStores.stores.SystemDataSources.data)),{t:u}=me(),[A,T]=Q([]),_=ti({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:T}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:p,optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:c,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("documentConId"),t.setValue("documentConId",null)):i.showField("documentConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:m,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return e(i,{children:[t(d,{children:t(Zr,{selectedRecord:o})}),t(l,{children:t(jr,{selectedRecord:o})}),t(er,{apiActions:_,formLoadCallBk:(e,t,i)=>{!0===i.useSystemCon?e.hideField("documentConId"):e.showField("documentConId")},data:A,setData:T,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{r(e),n(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{r(e),s(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:u("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:E,keyColumnName:"id",gridTitle:u("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:e}=me(),i=a((e=>e.commonStores.stores.SystemDataQueries.data)),o=a((e=>e.commonStores.stores.SystemWidgetTypes.data)),[r,d]=Q([]),n=ti({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:d});return t(er,{apiActions:n,data:r,setData:d,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",options:o,optionDisplayField:"name",optionValueField:"name",formProps:{onValueChangeCallBack(e,t,i,o){Xr(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_SERIES_KEYS",fieldName:"seriesKeys",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_LABEL",fieldName:"verticalAxisLabel",required:!1,fieldType:"text"}}]}}],keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"},formLoadCallBk:(e,t,i)=>{Xr(i.widgetType,e,t)}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:o}=me(),[a,r]=Q(null),{Window:d,setWindowState:n}=jt({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[l,s]=Q([]),p=Be(),c=ti({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:s});return e(i,{children:[t(d,{children:t(Jr,{selectedRecord:a})}),t(er,{apiActions:c,data:l,setData:s,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{r(e),n(!0)}},{label:"View",icon:"eye",actionFn:async e=>{p("/dashboard/"+e.dashboardCode)}}],gridTitle:o("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:()=>{const{dashboardCode:e}=Fe();return t(td,{dashboardCode:e})}},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=me(),[i,o]=Q([]),a=ti({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return t(er,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=me(),[i,o]=Q([]),r=ti({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:o}),d=a((e=>e.commonStores.stores.SystemMailTemplates.data));return t(er,{apiActions:r,disableDefaultAction:!0,data:i,setData:o,editMode:{editMode:"none"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:d,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",gridTitle:e("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}},{path:"dev/system/authorities",component:vr},{path:"dev/system/roles",component:Br},{path:"dev/system/lookups",component:kr},{path:"dev/system/modules",component:wr},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=me(),[i,o]=Q([]),a=ti({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:o});return t(er,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CODE",fieldName:"attachmentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",fieldName:"relatedDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",options:id,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",fieldName:"uploadDirectory",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",fieldName:"allowedFileTypes",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",fieldName:"attachmentCategories",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Is Category Mandatory",fieldName:"isCategoryRequired",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",fieldName:"maxAllowedNumberOfFiles",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",fieldName:"downloadAuthorityKey",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",fieldName:"uploadAuthorityKey",required:!1,fieldType:"text"}}],keyColumnName:"id",gridTitle:e("ATTACHMENT_CONFIG_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_DELETE"}})}}]]],ad=o=>{const{isUserAuthorized:a}=Qt();return o?.authority&&!a(o.authority)?t(E,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:e("h2",{children:[t(ae,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):t(i,{children:o.children})},rd=()=>{const r=a((e=>e.AppLayout)),d=a((e=>e.AppInfo.value)),n=a((e=>e.AppInfo.value.businessRoutes)),{UserInfo:l}=Qt(),s=o(),{show:p,hide:c}=Ft(),m=a((e=>e.commonStores)),[u,A]=Q(!1),{isUserAuthorized:T}=Qt(),{handleGetRequest:_}=kt();return j((()=>{m?.storeKeys&&(async()=>{p("Loading ... please wait"),A(!1);const e=m.stores,t=m.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!T(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||await _({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{s(Xt({storeKey:i,data:e.data}))},failureCallBkFn:()=>{s(Xt({storeKey:i,data:[]}))}});A(!0),c()})()}),[m.storeKeys,l?.currentOrganization]),t(K,{value:"ltr"===r.appDirection?Mr:Dr,children:u?t(E,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:e(ke,{children:[d.enableAdministrationModule?od.map(((e,i)=>t(We,{path:e.path,element:t(ad,{authority:e.authority,children:t(e.component,{})})},"adm"+i))):null,n.map(((e,i)=>t(We,{path:e.path,element:t(ad,{authority:e.authority,children:t(e.component,{})})},"bs"+i)))]})}):t(i,{})})},dd=X("div")((({theme:e})=>({width:30,height:6,margin:10,backgroundColor:Ct[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:Ct[900]})})));function nd(i){const{window:r}=i,d=a((e=>e.SideBar)),n=a((e=>e.AppInfo.value)),l=o(),s=e=>{l(sr(e))};return t(Dt,{container:void 0!==r?()=>r().document.body:void 0,anchor:"bottom",open:d.isOpened,onClose:()=>{s(!1)},onOpen:()=>{s(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:e(E,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[t(dd,{}),t(E,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:t(Lr,{})}),e(E,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[t(O,{sx:{fontSize:12},color:"textDisabled",children:n.appName}),e(O,{sx:{fontSize:12},color:"textDisabled",children:["V.",n.appVersion]})]})]})})}const ld=()=>{const{t:i}=me(),o=a((e=>e.loadingMask.value)),r=a((e=>e.AppLayout));return e(G,{dir:r.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[t(Y,{color:"inherit"}),t("div",{style:{marginRight:10,marginLeft:10},children:o?.message||i("DEFAULT_LOADING_MESSAGE")})]})},sd=()=>{const r=a((e=>e.AppInfo.value)),[d,n]=Q(""),[l,s]=Q(""),[p,c]=Q(!1),m=a((e=>e.UserSession.value)),u=o(),A=async()=>{if(null==d||""==d)return void ne.error("username is required to proceed");if(null==l||""==l)return void ne.error("password is required to proceed");c(!0);let e=null;try{if(e=await se.post(`${r.apiBaseUrl}/api/auth/login`,{username:d,password:l},{withCredentials:!0}),null!=e.data&&""!==e.data){c(!1);const t={...e.data,isAuthenticated:!0};u(Gt.setAuthenticated(t))}}catch(e){c(!1),ne.error(e?.response?.data||"failed to authenticate, contact your administrator")}},_=a((e=>e.UserSession.value)),f=V({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${r.appTheme?.dark?.primaryColor||Ii} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:r.appTheme?.dark?.primaryColor||Ii},secondary:{main:r.appTheme?.dark?.secondaryColor||Oi}}});return j((()=>{(async()=>{if(r?.apiBaseUrl&&null==_.isAuthenticated)try{let e=await se.get(`${r.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0});if(null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};u(Gt.setAuthenticated(t))}else u(Gt.setUnAuthenticated())}catch(e){u(Gt.setUnAuthenticated())}})()}),[r]),t(H,{theme:f,children:t(y,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==m.isAuthenticated?e(E,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t("img",{src:r?.appLogo,width:150,height:150}),t(O,{sx:{m:1},variant:"h4",color:"textSecondary",children:r?.appName}),e(O,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",r.appVersion]}),t(h,{label:"username",sx:{width:300,m:1},value:d,onChange:e=>{n(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&A()}}),t(h,{label:"password",sx:{width:300,m:1},value:l,type:"password",onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&A()}}),t(T,{loading:p,onClick:A,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):e(i,{children:[t(Y,{sx:{marginRight:1}}),t("div",{children:"You will be redirected shortly ... please wait"})]})})})},pd=X("main",{shouldForwardProp:e=>"open"!==e})((({theme:e,open:t})=>{const i=a((e=>e.AppLayout)),o=ee(),r=Pt();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&t?"calc(100% - 350px)":"100%",direction:i.appDirection,justifyContent:"flex-start",transition:!0===t?o.transitions.create(["margin","width"],{easing:o.transitions.easing.easeOut,duration:o.transitions.duration.enteringScreen}):o.transitions.create(["margin","width"],{easing:o.transitions.easing.sharp,duration:o.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==i.appDirection||!0!==t?0:bt+"px",marginRight:r||"rtl"!==i.appDirection||!0!==t?0:bt+"px"}}));function cd(){const i=a((e=>e.SideBar)),o=Pt(),r=a((e=>e.UserSession));return e(Ge,{children:[t(le,{draggable:!0,position:"bottom-center"}),t(ld,{}),!0===r.value.isAuthenticated?e(pd,{open:i.isOpened,children:[t(te,{}),t(mr,{}),o?null:t(Cr,{}),o?t(nd,{}):null,t(ur,{}),t(rd,{})]}):t(sd,{})]})}const md=re({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,t)=>{e.value=t.payload}}}),ud=md.actions;var Ad=md.reducer;const Td={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/public/organization/all",data:[]},SystemOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organization/ranks/all",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organization/units/all",data:[]},SystemOrganizationUnitType:{autoLoad:!0,url:"api/v1/public/organizationunittype/all",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"},SystemApplicationModules:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/systemapplicationmodule/application/all"}},_d=e=>{const i=o();Mt.setLicenseKey(e.muiPremiumKey);const r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||Ei} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:e.appTheme?.light?.primaryColor||Ei},secondary:{main:e.appTheme?.light?.secondaryColor||fi},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},d={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ii} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:e.appTheme?.dark?.primaryColor||Ii},secondary:{main:e.appTheme?.dark?.secondaryColor||Oi}}};let n={};e.enableAdministrationModule&&(n={...Td}),e.businessCommonStoresMetaData&&(n={...n,...e.businessCommonStoresMetaData}),i(Jt(n));const l=a((e=>e.AppLayout));let s={...r};"dark"===l.themeMode&&(s={...d});const p=V({direction:l.appDirection,...s});return j((()=>{document.title=e.documentTitle,i(ud.setAppInfo(e))}),[]),t(H,{theme:p,children:t(cd,{})})};d.add(n),d.add(l),d.add(s);const Ed=e=>{const i={AppLayout:Ut,UserSession:Yt,loadingMask:Bt,commonStores:ei,SideBar:pr,AppInfo:Ad,...e.businessReduxReducers},o=de({reducer:i});return t(r,{store:o,children:t(_d,{...e})})};export{Ed as BaseApp,ui as CheckBox,Ai as ComboBox,Ii as DARK_THEME_INITIAL_MAIN_COLOR,Oi as DARK_THEME_INITIAL_SECANDARY_COLOR,Ti as DATE_FORMAT,_i as DATE_TIME_FORMAT,Ni as Datefield,yi as DatetimeField,Ei as LIGHT_THEME_INITIAL_MAIN_COLOR,fi as LIGHT_THEME_INITIAL_SECANDARY_COLOR,di as TemplateBarChart,ni as TemplateDataCard,rr as TemplateForm,li as TemplateGauge,er as TemplateGrid,si as TemplateLineChart,ci as TemplateLineProgress,mi as TemplatePieChart,ii as TemplateTextField,ri as TransferList,Ma as capitalizeFirstLetter,La as hasDigitsOnly,Ca as isNumber,Da as isNumeric,Pa as isValidEmail,ti as useApiActions,kt as useAxios,Zt as useConfirmationWindow,Pt as useIsMobile,Ft as useLoadingMask,Qt as useSession,jt as useWindow};
|
|
32
32
|
//# sourceMappingURL=index.mjs.map
|