@asaleh37/ui-base 25.8.1-6 → 25.8.1-8

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/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{useDispatch as e,useSelector as i,Provider as t}from"react-redux";export{useDispatch,useSelector}from"react-redux";import{useNavigate as o,useParams as a,Routes as r,Route as d,BrowserRouter as n}from"react-router-dom";export{useParams}from"react-router-dom";import{jsxs as l,jsx as s,Fragment as p}from"react/jsx-runtime";import{library as c}from"@fortawesome/fontawesome-svg-core";import{fab as m}from"@fortawesome/free-brands-svg-icons";import{far as u}from"@fortawesome/free-regular-svg-icons";import{fas as T}from"@fortawesome/free-solid-svg-icons";import"react-toastify/dist/ReactToastify.css";import{Dialog as A,DialogTitle as _,DialogContent as f,DialogContentText as I,DialogActions as E,Button as O,Modal as N,Box as y,AppBar as h,Toolbar as R,Typography as L,IconButton as C,Paper as D,TextField as M,Grid2 as P,ListItemButton as b,FormControlLabel as g,Checkbox as S,Autocomplete as U,Popper as v,Avatar as w,Tooltip as x,styled as F,Badge as B,Divider as k,MenuItem as W,InputAdornment as G,Accordion as Y,AccordionSummary as V,AccordionDetails as q,keyframes as K,ClickAwayListener as z,Fade as H,Menu as Q,useTheme as Z,Backdrop as j,CircularProgress as $,createTheme as X}from"@mui/material";export*from"@mui/material";import{ThemeContext as J,CacheProvider as ee,ThemeProvider as ie}from"@emotion/react";import*as te from"react";import oe,{useState as ae,useEffect as re,createElement as de,useRef as ne}from"react";import{styled as le,alpha as se,useTheme as pe}from"@mui/material/styles";import ce from"@mui/material/CssBaseline";import me from"@mui/material/AppBar";import ue from"@mui/material/Toolbar";import{FontAwesomeIcon as Te}from"@fortawesome/react-fontawesome";export{FontAwesomeIcon}from"@fortawesome/react-fontawesome";import{createSlice as Ae,configureStore as _e}from"@reduxjs/toolkit";import{toast as fe,ToastContainer as Ie}from"react-toastify";export{toast}from"react-toastify";import Ee from"axios";import Oe from"i18next";import{useTranslation as Ne,initReactI18next as ye}from"react-i18next";import he from"@mui/material/List";import Re from"@mui/material/Card";import Le from"@mui/material/CardHeader";import Ce from"@mui/material/ListItemText";import De from"@mui/material/ListItemIcon";import Me from"@mui/material/Checkbox";import Pe from"@mui/material/Button";import be from"@mui/material/Divider";import{LocalizationProvider as ge,DatePicker as Se,DateTimePicker as Ue}from"@mui/x-date-pickers";import{AdapterMoment as ve}from"@mui/x-date-pickers/AdapterMoment";import we from"moment";import*as xe from"zod";import{z as Fe}from"zod";export*from"zod";import{useForm as Be}from"react-hook-form";import{zodResolver as ke}from"@hookform/resolvers/zod";import We from"@mui/material/CardActions";import Ge from"@mui/material/CardContent";import Ye from"@mui/material/CardMedia";import Ve from"@mui/material/Typography";import{QuickFilter as qe,ToolbarButton as Ke,Toolbar as ze,ColumnsPanelTrigger as He,GridViewColumnIcon as Qe,FilterPanelTrigger as Ze,GridFilterListIcon as je,ExportExcel as $e,QuickFilterTrigger as Xe,QuickFilterControl as Je,QuickFilterClear as ei,GridActionsCellItem as ii,GridExpandMoreIcon as ti,DataGridPremium as oi,GridRowModes as ai}from"@mui/x-data-grid-premium";import{BarChart as ri,Gauge as di,LineChart as ni}from"@mui/x-charts";import li from"@mui/material/LinearProgress";import si from"@mui/material/Box";import{PieChart as pi}from"@mui/x-charts/PieChart";import ci from"@mui/material/IconButton";import mi from"@mui/material/Drawer";import{animated as ui,useSpring as Ti}from"@react-spring/web";import Ai from"@mui/material/Collapse";import{RichTreeView as _i}from"@mui/x-tree-view/RichTreeView";import{treeItemClasses as fi}from"@mui/x-tree-view/TreeItem";import{useTreeItem2 as Ii}from"@mui/x-tree-view/useTreeItem2";import{TreeItem2Root as Ei,TreeItem2Content as Oi,TreeItem2IconContainer as Ni,TreeItem2Checkbox as yi,TreeItem2Label as hi}from"@mui/x-tree-view/TreeItem2";import{TreeItem2Icon as Ri}from"@mui/x-tree-view/TreeItem2Icon";import{TreeItem2Provider as Li}from"@mui/x-tree-view/TreeItem2Provider";import{TreeItem2DragAndDropOverlay as Ci}from"@mui/x-tree-view/TreeItem2DragAndDropOverlay";import Di from"stylis-plugin-rtl";import{prefixer as Mi}from"stylis";import Pi from"@emotion/cache";import bi from"@emotion/styled";import{grey as gi}from"@mui/material/colors";import Si from"@mui/material/SwipeableDrawer";import{LicenseInfo as Ui}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 vi=(e=768)=>{const[i,t]=ae(window.innerWidth<e);return re((()=>{const i=()=>t(window.innerWidth<e);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)}),[e]),i},wi=350,xi=Ae({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}}}),Fi=xi.actions;var Bi=xi.reducer;const ki=Ae({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:Wi,hideLoadingMask:Gi}=ki.actions;var Yi=ki.reducer;const Vi=()=>{const i=e();return{show:e=>{i(Wi(e))},hide:()=>{i(Gi())}}},qi=Ae({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,i)=>{e.value=i.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Ki=qi.actions;var zi=qi.reducer;const Hi=()=>{const t=Vi(),o=e(),a=i((e=>e.AppInfo.value.apiBaseUrl)),r=Ee.create({baseURL:a,timeout:6e5,withCredentials:!0});r.defaults.withCredentials=!0,r.interceptors.response.use((e=>e),(e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))o(Ki.setUnAuthenticated()),fe.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)))fe.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=>{fe.error(e)}))}else fe.error(e.response.data);else fe.error("failed to communicate with the server ... try again later");return"ERROR"}));return{handleGetRequest:async e=>{void 0!==e.showMask&&null!=e.showMask&&!0===e.showMask&&t.show(e.loadingMessage);const i=await r.get(e.endPointURI,{params:{...e.parameters},withCredentials:!0,headers:e.headers,responseType:e?.responseType});return void 0!==e.showMask&&null!=e.showMask&&!0===e.showMask&&t.hide(),"ERROR"!==i?(void 0!==e.successCallBkFn&&null!=e.successCallBkFn&&e.successCallBkFn(i),i):(void 0!==e.failureCallBkFn&&null!=e.failureCallBkFn&&e.failureCallBkFn(i),"ERROR")},handlePostRequest:async e=>{void 0!==e.showMask&&null!=e.showMask&&!0===e.showMask&&t.show(e.loadingMessage);let i=await r.post(e.endPointURI,e.data,{params:e.parameters,responseType:e?.responseType,headers:e?.headers});return void 0!==e.showMask&&null!=e.showMask&&!0===e.showMask&&t.hide(),"ERROR"!==i?(void 0!==e.successCallBkFn&&null!=e.successCallBkFn&&e.successCallBkFn(i),i):(void 0!==e.failureCallBkFn&&null!=e.failureCallBkFn&&e.failureCallBkFn(i),"ERROR")},handleDeleteRequest:async e=>{void 0!==e.showMask&&null!=e.showMask&&!0===e.showMask&&t.show(e.loadingMessage);let i=await r.delete(e.endPointURI,{params:{...e.parameters},responseType:e?.responseType,headers:e?.headers});return void 0!==e.showMask&&null!=e.showMask&&!0===e.showMask&&t.hide(),"ERROR"!==i?(void 0!==e.successCallBkFn&&null!=e.successCallBkFn&&e.successCallBkFn(i),i):(void 0!==e.failureCallBkFn&&null!=e.failureCallBkFn&&e.failureCallBkFn(i),"ERROR")},HandleDownloadHTTPPostPDF:async(e={endPointURI:"",parameters:{},data:{}})=>{void 0!==e.showMask&&null!=e.showMask&&!0===e.showMask&&t.show(e.loadingMessage);const i=await r.post(e.endPointURI,e.data,{responseType:"blob"});return void 0!==e.showMask&&null!=e.showMask&&!0===e.showMask&&t.hide(),"ERROR"!==i?(void 0!==e.successCallBkFn&&null!=e.successCallBkFn&&e.successCallBkFn(i),i):(void 0!==e.failureCallBkFn&&null!=e.failureCallBkFn&&e.failureCallBkFn(i),"ERROR")},handleUploadRequest:async e=>{if(null===e.files||0===e.files.length)return fe.error("You must add files to upload"),"ERROR";const i=new FormData;for(const t of e.files)i.append("files",t);void 0!==e.showMask&&null!=e.showMask&&!0===e.showMask&&t.show(e.loadingMessage);let o=await r.post(e.endPointURI,i,{params:e?.parameters,headers:{"Content-Type":"multipart/form-data"}});return void 0!==e.showMask&&null!=e.showMask&&!0===e.showMask&&t.hide(),"ERROR"!==o?(void 0!==e.successCallBkFn&&null!=e.successCallBkFn&&e.successCallBkFn(o),o):(void 0!==e.failureCallBkFn&&null!=e.failureCallBkFn&&e.failureCallBkFn(o),"ERROR")}}},Qi=e=>{const[i,t]=ae(!1),{t:o}=Ne();return{ConfirmationWindow:()=>l(A,{open:i,children:[s(_,{children:e.title}),s(f,{children:s(I,{children:e.body})}),l(E,{children:[s(O,{variant:"contained",color:"primary",onClick:()=>{t(!1)},children:o("NO_LABEL")}),s(O,{variant:"contained",color:"error",onClick:()=>{e.onConfirmationCallBk(),t(!1)},autoFocus:!0,children:o("YES_LABEL")})]})]}),open:i,setOpen:t}},Zi=()=>{const e=i((e=>e.UserSession)),t=e.value;return{UserSession:e,isUserAuthorized:i=>{if(e?.value?.authorities)for(let t of e.value.authorities){if("DEVELOPMENT_ADMIN"===i&&("DEVELOPMENT_ADMIN"===t?.authority||"ORGANIZATION_ADMIN"===t?.authority))return!0;if("ORGANIZATION_ADMIN"===i&&"ORGANIZATION_ADMIN"===t?.authority)return!0;if("DEVELOPMENT_ADMIN"!==i&&"ORGANIZATION_ADMIN"!==i&&("ORGANIZATION_ADMIN"===t?.authority||"DEVELOPMENT_ADMIN"===t?.authority||"SYSTEM_ADMIN"===t?.authority||t?.authority===i))return!0}return!1},isCurrentOrganizationAuthorizedToModule:e=>{if(t?.currentOrganization?.systemApplicationModules)for(const i of t.currentOrganization.systemApplicationModules)if(i.toLowerCase()==e.toLowerCase())return!0;return!1},UserInfo:t}},ji=e=>{const[i,t]=ae(!1);return{windowState:i,setWindowState:t,Window:o=>s(N,{open:i,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!i&&e?.onCloseCallBack&&e.onCloseCallBack()},children:l(y,{sx:{position:"absolute",top:"50%",left:"50%",maxHeight:"90%",transform:"translate(-50%, -50%)",height:e?.height||"80%",width:e?.width||"90%",minWidth:e.minWidth||400,minHeight:e.minHeight||200,overflow:"hidden",bgcolor:"modalBackground.main",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:[s(h,{position:"static",children:l(R,{variant:"dense",children:[s(Te,{icon:e?.windowIcon||"window-maximize",style:{marginRight:5}}),s(L,{variant:"h6",color:"inherit",component:"div",children:e?.windowTitle||"window"}),s("div",{style:{flexGrow:1}}),s(C,{onClick:()=>{t(!1),null!=e.onCloseCallBack&&null!=e.onCloseCallBack&&e.onCloseCallBack()},color:"secondary",children:s(Te,{icon:"xmark-square"})})]})}),s(D,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:o?.children})]})})}},$i=Ae({name:"commonStores",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:Xi,setStoresMetaData:Ji}=$i.actions;var et=$i.reducer;const it=t=>{const o=i((e=>e.commonStores.stores)),a=e(),r=Zi(),{handleGetRequest:d,handlePostRequest:n,handleDeleteRequest:l}=Hi();return{reloadData:async e=>{if(t?.commonStoreKey){const e=Object.keys(o);for(const i of e)if(i===t.commonStoreKey&&(void 0===o[i]?.authority||null===o[i]?.authority||r.isUserAuthorized(o[i]?.authority))&&""!=o[i]?.url){await d({endPointURI:o[i].url,showMask:!1,successCallBkFn:e=>{a(Xi({storeKey:i,data:e.data})),t.setData(e.data)},failureCallBkFn:()=>{a(Xi({storeKey:i,data:[]})),t.setData([])}});break}}else t?.findAll&&await d({endPointURI:t.findAll,showMask:!0,parameters:e||{},successCallBkFn:e=>{t.setData(e.data)}})},loadRecordById:async e=>{let i=null;if(t?.findById){const o={};o[t?.findByIdParamName||"id"]=e,await d({endPointURI:t.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async e=>{let i=null;return t?.save&&await n({endPointURI:t.save,data:e,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async e=>{let i=!0;if(t?.deleteById){const o={};o[t?.deleteByIdParamName||"id"]=e,await l({endPointURI:t.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},tt=e=>{const{t:i}=Ne();return s(M,{...e,slotProps:{inputLabel:{shrink:!0}},label:s(p,{children:e?.label?i(e.label):""})})};function ot(e,i){return e.filter((e=>-1===i.indexOf(e)))}function at(e,i){return e.filter((e=>-1!==i.indexOf(e)))}const rt=({valueField:e="id",displayField:i="name",options:t=[],selectedOptions:o=[],setSelection:a})=>{const[r,d]=te.useState([]),[n,p]=te.useState([]),[c,m]=te.useState([]),[u,T]=te.useState(""),[A,_]=te.useState(""),f=at(r,n),I=at(r,c);te.useEffect((()=>{t&&p([...t])}),[t]),te.useEffect((()=>{o&&m([...o])}),[o]);const E=e=>()=>{const i=r.indexOf(e),t=[...r];-1===i?t.push(e):t.splice(i,1),d(t)},O=e=>at(r,e).length,N=e=>()=>{var i,t;O(e)===e.length?d(ot(r,e)):d((i=r,t=e,[...i,...ot(t,i)]))},h=(t,o,a)=>{const d=o.filter((e=>{if(e[i]){const t=e[i];if("left"===a&&t.toLocaleLowerCase().includes(u.toLocaleLowerCase()))return!0;if("right"===a&&t.toLocaleLowerCase().includes(A.toLocaleLowerCase()))return!0}return!1}));return l(Re,{sx:{height:"100%"},children:[s(Le,{sx:{px:2,py:1},avatar:s(Me,{onClick:N(d),checked:O(d)===d.length&&0!==d.length,indeterminate:O(d)!==d.length&&0!==O(d),disabled:0===d.length,inputProps:{"aria-label":"all items selected"}}),title:t,subheader:`${O(o)} / ${o.length} Selected`}),s(y,{sx:{width:"100%",padding:1},children:s(tt,{fullWidth:!0,label:"search",value:"left"===a?u:A,onChange:e=>{"left"===a?T(e.target.value):_(e.target.value)}})}),s(be,{}),s(he,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:d.map((t=>(t[e],l(b,{role:"listitem",onClick:E(t),sx:{cursor:"pointer"},children:[s(De,{children:s(Me,{checked:-1!==r.indexOf(t),tabIndex:-1,disableRipple:!0})}),s(Ce,{id:t[e],primary:t[i]})]},t[e]))))})]})};return l(P,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[s(P,{sx:{height:"100%",flex:1},children:h("Available Items",n,"left")}),s(P,{children:l(P,{container:!0,direction:"column",alignItems:"center",children:[s(Pe,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{m((e=>{let i=c.concat(f);return a(i),i})),p(ot(n,f)),d(ot(r,f))},disabled:0===f.length,"aria-label":"move selected right",children:">"}),s(Pe,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(n.concat(I)),m((e=>{let i=ot(c,I);return a(i),i})),d(ot(r,I))},disabled:0===I.length,"aria-label":"move selected left",children:"<"})]})}),s(P,{sx:{height:"100%",flex:1},children:h("Currently Selected",c,"right")})]})},dt=e=>{const{t:i}=Ne();return s(g,{sx:e.sx,disabled:e.disabled||!1,required:e.required||!1,control:s(S,{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:i(e.label)})},nt=e=>{const t=i((e=>e.AppLayout)),{t:o}=Ne();return s(U,{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:(i,t)=>s("li",{...i,children:null!=t?o(t[e.displayField]):""}),slots:{popper:e=>s(v,{...e,style:{...e.style,direction:t.appDirection}})},renderInput:i=>s(M,{...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):""})})},lt="YYYY-MM-DD",st="YYYY-MM-DD HH:mm:ss",pt="#37505C",ct="#ff6d00",mt="#ea690e",ut="#74776B",Tt=e=>{const{t:i}=Ne();return s(ge,{dateAdapter:ve,children:s(Se,{value:null!=e.value&&void 0!==e.value&&""!==e.value?we(e.value,e?.format||lt):null,sx:e.sx,label:i(e.label),format:e?.format||lt,disabled:e.disabled,onChange:i=>{let t=null;null!=i&&i.isValid()&&(t=i.format(e?.format||lt)),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?s(p,{children:i(e.errorMessage)}):s(p,{})}}})})},At=e=>{const{t:i}=Ne();return s(ge,{dateAdapter:ve,children:s(Ue,{value:null!=e.value&&void 0!==e.value&&""!==e.value?we(e.value,e?.format||st):null,label:i(e.label),sx:e.sx,format:e?.format||st,disabled:e.disabled,onChange:i=>{let t=null;null!=i&&i.isValid()&&(t=i.format(e?.format||st)),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?s(p,{children:i(e.errorMessage)}):s(p,{})}}})})},_t=e=>{const t=i((e=>e.AppLayout)),o=Zi(),[a,r]=ae([]),{handleGetRequest:d}=Hi();return re((()=>{e.lookupType&&(async()=>{await d({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{r(e.data)},failureCallBkFn:()=>{r([])}})})()}),[e.lookupType,o.UserSession]),s(nt,{...e,options:a,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},ft=e=>({...e,type:"string",renderEditCell:e=>s(At,{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=we(e).format(st)),o},valueFormatter:(e,i,t)=>i[t.field]}),It=e=>({...e,type:"custom",valueGetter:e=>e?e+"":e,renderCell:e=>{let i=null;try{i=e.colDef.options.find((i=>i[e.colDef.valueField]==e.value))}catch(e){}return s("div",{children:null!=i?i[e.colDef.displayField]:e.value})},renderEditCell:e=>s(nt,{...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+""})}})}),Et=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:i=>{const t=i?.value;return t===e.checkedValue||"true"===t||1===t||!0===t?s(Te,{icon:"check",color:"green"}):s(Te,{icon:"xmark",color:"red"})},renderEditCell:i=>s(dt,{...i,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{i.api.setEditCellValue({id:i.id,field:i.field,value:e})}})}),Ot=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(...Ot(t));return i},Nt=e=>{const i=[];for(const t of e)i.push(...Ot(t));return i},yt=(e,i,t)=>{const o=[];for(const r of e)if("text"===r?.fieldType||"number"===r?.fieldType){const e={...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:i,type:"number"==r?.fieldType?"number":"string",field:r?.fieldName,headerName:t(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.width?void 0:1,minWidth:200};o.push(e)}else if("date"===r?.fieldType){const e=(a={...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:i,field:r?.fieldName,headerName:t(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.width?void 0:1,minWidth:200},{...a,type:"string",renderEditCell:e=>s(Tt,{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=we(e).format(lt)),o},valueFormatter:(e,i,t)=>i[t.field]});o.push(e)}else if("datetime"===r?.fieldType){const e=ft({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:i,field:r?.fieldName,headerName:t(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.width?void 0:1,minWidth:200});o.push(e)}else if("checkbox"===r?.fieldType){const e=Et({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:i,field:r?.fieldName,headerName:t(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,checkedValue:r?.checkedValue,unCheckedValue:r?.unCheckedValue,width:150});o.push(e)}else if("combobox"===r?.fieldType){const e=It({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:i,field:r?.fieldName,headerName:t(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options||[],flex:r?.gridProps?.muiProps?.width?void 0:1,minWidth:200});o.push(e)}else if("lookup"===r?.fieldType){const e=It({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:i,lookupType:r?.lookupType,field:r?.fieldName,headerName:t(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options||[],flex:r?.gridProps?.muiProps?.width?void 0:1,minWidth:200});o.push(e)}else{const e={field:r.fieldName,...r?.gridProps?.muiProps};o.push(e)}var a;return o},ht=e=>{const i={};for(const t of e)if(t?.fieldName){const e=t.fieldName;"number"===t.fieldType?i[e]=!0===t?.required?xe.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):xe.number().optional().nullable():"checkbox"===t.fieldType?i[e]=!0===t?.required?xe.boolean({required_error:"This field is required"}):xe.boolean().optional().nullable():i[e]=!0===t?.required?xe.string({message:"This field is required"}).min(1,"This field is required"):xe.string().optional().nullable()}return i},Rt=(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}};function Lt(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 Ct(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dt,Mt={exports:{}},Pt={exports:{}},bt={};var gt,St,Ut,vt,wt,xt,Ft,Bt,kt,Wt,Gt,Yt,Vt,qt,Kt,zt={};
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";export{useDispatch,useSelector}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 T,Button as A,Modal as _,Box as f,AppBar as I,Toolbar as E,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 F,AccordionSummary as B,AccordionDetails as k,keyframes as W,ClickAwayListener as G,Fade as Y,Menu as V,useTheme as q,Backdrop as K,CircularProgress as z,createTheme as H}from"@mui/material";export*from"@mui/material";import{ThemeContext as Q,CacheProvider as Z,ThemeProvider as j}from"@emotion/react";import*as $ from"react";import X,{useState as J,useEffect as ee,createElement as ie,useRef as te}from"react";import{styled as oe,alpha as ae,useTheme as re}from"@mui/material/styles";import de from"@mui/material/CssBaseline";import ne from"@mui/material/AppBar";import le from"@mui/material/Toolbar";import{FontAwesomeIcon as se}from"@fortawesome/react-fontawesome";export{FontAwesomeIcon}from"@fortawesome/react-fontawesome";import{createSlice as pe,configureStore as ce}from"@reduxjs/toolkit";import{toast as me,ToastContainer as ue}from"react-toastify";export{toast}from"react-toastify";import Te from"axios";import Ae from"i18next";import{useNavigate as _e,useParams as fe,Routes as Ie,Route as Ee,BrowserRouter as Oe}from"react-router-dom";export{useParams}from"react-router-dom";import{useTranslation as Ne,initReactI18next as ye}from"react-i18next";import he from"@mui/material/List";import Re from"@mui/material/Card";import Le from"@mui/material/CardHeader";import Ce from"@mui/material/ListItemText";import De from"@mui/material/ListItemIcon";import Me from"@mui/material/Checkbox";import Pe from"@mui/material/Button";import be from"@mui/material/Divider";import{LocalizationProvider as ge,DatePicker as Se,DateTimePicker as Ue}from"@mui/x-date-pickers";import{AdapterMoment as ve}from"@mui/x-date-pickers/AdapterMoment";import we from"moment";import*as xe from"zod";import{z as Fe}from"zod";export*from"zod";import{useForm as Be}from"react-hook-form";import{zodResolver as ke}from"@hookform/resolvers/zod";import We from"@mui/material/CardActions";import Ge from"@mui/material/CardContent";import Ye from"@mui/material/CardMedia";import Ve from"@mui/material/Typography";import{QuickFilter as qe,ToolbarButton as Ke,Toolbar as ze,ColumnsPanelTrigger as He,GridViewColumnIcon as Qe,FilterPanelTrigger as Ze,GridFilterListIcon as je,ExportExcel as $e,QuickFilterTrigger as Xe,QuickFilterControl as Je,QuickFilterClear as ei,GridActionsCellItem as ii,GridExpandMoreIcon as ti,DataGridPremium as oi,GridRowModes as ai}from"@mui/x-data-grid-premium";import{BarChart as ri,Gauge as di,LineChart as ni}from"@mui/x-charts";import li from"@mui/material/LinearProgress";import si from"@mui/material/Box";import{PieChart as pi}from"@mui/x-charts/PieChart";import ci from"@mui/material/IconButton";import mi from"@mui/material/Drawer";import{animated as ui,useSpring as Ti}from"@react-spring/web";import Ai from"@mui/material/Collapse";import{RichTreeView as _i}from"@mui/x-tree-view/RichTreeView";import{treeItemClasses as fi}from"@mui/x-tree-view/TreeItem";import{useTreeItem2 as Ii}from"@mui/x-tree-view/useTreeItem2";import{TreeItem2Root as Ei,TreeItem2Content as Oi,TreeItem2IconContainer as Ni,TreeItem2Checkbox as yi,TreeItem2Label as hi}from"@mui/x-tree-view/TreeItem2";import{TreeItem2Icon as Ri}from"@mui/x-tree-view/TreeItem2Icon";import{TreeItem2Provider as Li}from"@mui/x-tree-view/TreeItem2Provider";import{TreeItem2DragAndDropOverlay as Ci}from"@mui/x-tree-view/TreeItem2DragAndDropOverlay";import Di from"stylis-plugin-rtl";import{prefixer as Mi}from"stylis";import Pi from"@emotion/cache";import bi from"@emotion/styled";import{grey as gi}from"@mui/material/colors";import Si from"@mui/material/SwipeableDrawer";import{LicenseInfo as Ui}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 vi=(e=768)=>{const[i,t]=J(window.innerWidth<e);return ee((()=>{const i=()=>t(window.innerWidth<e);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)}),[e]),i},wi=350,xi=pe({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}}}),Fi=xi.actions;var Bi=xi.reducer;const ki=pe({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:Wi,hideLoadingMask:Gi}=ki.actions;var Yi=ki.reducer;const Vi=()=>{const e=o();return{show:i=>{e(Wi(i))},hide:()=>{e(Gi())}}},qi=pe({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,i)=>{e.value=i.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Ki=qi.actions;var zi=qi.reducer;const Hi=()=>{const e=Vi(),i=o(),t=a((e=>e.AppInfo.value.apiBaseUrl)),r=Te.create({baseURL:t,timeout:6e5,withCredentials:!0});r.defaults.withCredentials=!0,r.interceptors.response.use((e=>e),(e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))i(Ki.setUnAuthenticated()),me.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)))me.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=>{me.error(e)}))}else me.error(e.response.data);else me.error("failed to communicate with the server ... try again later");return"ERROR"}));return{handleGetRequest:async i=>{void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.show(i.loadingMessage);const t=await r.get(i.endPointURI,{params:{...i.parameters},withCredentials:!0,headers:i.headers,responseType:i?.responseType});return void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.hide(),"ERROR"!==t?(void 0!==i.successCallBkFn&&null!=i.successCallBkFn&&i.successCallBkFn(t),t):(void 0!==i.failureCallBkFn&&null!=i.failureCallBkFn&&i.failureCallBkFn(t),"ERROR")},handlePostRequest:async i=>{void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.show(i.loadingMessage);let t=await r.post(i.endPointURI,i.data,{params:i.parameters,responseType:i?.responseType,headers:i?.headers});return void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.hide(),"ERROR"!==t?(void 0!==i.successCallBkFn&&null!=i.successCallBkFn&&i.successCallBkFn(t),t):(void 0!==i.failureCallBkFn&&null!=i.failureCallBkFn&&i.failureCallBkFn(t),"ERROR")},handleDeleteRequest:async i=>{void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.show(i.loadingMessage);let t=await r.delete(i.endPointURI,{params:{...i.parameters},responseType:i?.responseType,headers:i?.headers});return void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.hide(),"ERROR"!==t?(void 0!==i.successCallBkFn&&null!=i.successCallBkFn&&i.successCallBkFn(t),t):(void 0!==i.failureCallBkFn&&null!=i.failureCallBkFn&&i.failureCallBkFn(t),"ERROR")},HandleDownloadHTTPPostPDF:async(i={endPointURI:"",parameters:{},data:{}})=>{void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.show(i.loadingMessage);const t=await r.post(i.endPointURI,i.data,{responseType:"blob"});return void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.hide(),"ERROR"!==t?(void 0!==i.successCallBkFn&&null!=i.successCallBkFn&&i.successCallBkFn(t),t):(void 0!==i.failureCallBkFn&&null!=i.failureCallBkFn&&i.failureCallBkFn(t),"ERROR")},handleUploadRequest:async i=>{if(null===i.files||0===i.files.length)return me.error("You must add files to upload"),"ERROR";const t=new FormData;for(const e of i.files)t.append("files",e);void 0!==i.showMask&&null!=i.showMask&&!0===i.showMask&&e.show(i.loadingMessage);let o=await r.post(i.endPointURI,t,{params:i?.parameters,headers:{"Content-Type":"multipart/form-data"}});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")}}},Qi=t=>{const[o,a]=J(!1),{t:r}=Ne();return{ConfirmationWindow:()=>e(p,{open:o,children:[i(c,{children:t.title}),i(m,{children:i(u,{children:t.body})}),e(T,{children:[i(A,{variant:"contained",color:"primary",onClick:()=>{a(!1)},children:r("NO_LABEL")}),i(A,{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"===i&&("DEVELOPMENT_ADMIN"===t?.authority||"ORGANIZATION_ADMIN"===t?.authority))return!0;if("ORGANIZATION_ADMIN"===i&&"ORGANIZATION_ADMIN"===t?.authority)return!0;if("DEVELOPMENT_ADMIN"!==i&&"ORGANIZATION_ADMIN"!==i&&("ORGANIZATION_ADMIN"===t?.authority||"DEVELOPMENT_ADMIN"===t?.authority||"SYSTEM_ADMIN"===t?.authority||t?.authority===i))return!0}return!1},isCurrentOrganizationAuthorizedToModule:e=>{if(i?.currentOrganization?.systemApplicationModules)for(const t of i.currentOrganization.systemApplicationModules)if(t.toLowerCase()==e.toLowerCase())return!0;return!1},UserInfo:i}},ji=t=>{const[o,a]=J(!1);return{windowState:o,setWindowState:a,Window:r=>i(_,{open:o,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!o&&t?.onCloseCallBack&&t.onCloseCallBack()},children:e(f,{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(I,{position:"static",children:e(E,{variant:"dense",children:[i(se,{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(se,{icon:"xmark-square"})})]})}),i(y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:r?.children})]})})}},$i=pe({name:"commonStores",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:Xi,setStoresMetaData:Ji}=$i.actions;var et=$i.reducer;const it=e=>{const i=a((e=>e.commonStores.stores)),t=o(),r=Zi(),{handleGetRequest:d,handlePostRequest:n,handleDeleteRequest:l}=Hi();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(Xi({storeKey:a,data:i.data})),e.setData(i.data)},failureCallBkFn:()=>{t(Xi({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 n({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 l({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{t=!0},failureCallBkFn:()=>{t=!1}})}return t}}},tt=e=>{const{t:o}=Ne();return i(h,{...e,slotProps:{inputLabel:{shrink:!0}},label:i(t,{children:e?.label?o(e.label):""})})};function ot(e,i){return e.filter((e=>-1===i.indexOf(e)))}function at(e,i){return e.filter((e=>-1!==i.indexOf(e)))}const rt=({valueField:t="id",displayField:o="name",options:a=[],selectedOptions:r=[],setSelection:d})=>{const[n,l]=$.useState([]),[s,p]=$.useState([]),[c,m]=$.useState([]),[u,T]=$.useState(""),[A,_]=$.useState(""),I=at(n,s),E=at(n,c);$.useEffect((()=>{a&&p([...a])}),[a]),$.useEffect((()=>{r&&m([...r])}),[r]);const O=e=>()=>{const i=n.indexOf(e),t=[...n];-1===i?t.push(e):t.splice(i,1),l(t)},N=e=>at(n,e).length,y=e=>()=>{var i,t;N(e)===e.length?l(ot(n,e)):l((i=n,t=e,[...i,...ot(t,i)]))},h=(a,r,d)=>{const l=r.filter((e=>{if(e[o]){const i=e[o];if("left"===d&&i.toLocaleLowerCase().includes(u.toLocaleLowerCase()))return!0;if("right"===d&&i.toLocaleLowerCase().includes(A.toLocaleLowerCase()))return!0}return!1}));return e(Re,{sx:{height:"100%"},children:[i(Le,{sx:{px:2,py:1},avatar:i(Me,{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`}),i(f,{sx:{width:"100%",padding:1},children:i(tt,{fullWidth:!0,label:"search",value:"left"===d?u:A,onChange:e=>{"left"===d?T(e.target.value):_(e.target.value)}})}),i(be,{}),i(he,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:l.map((a=>(a[t],e(L,{role:"listitem",onClick:O(a),sx:{cursor:"pointer"},children:[i(De,{children:i(Me,{checked:-1!==n.indexOf(a),tabIndex:-1,disableRipple:!0})}),i(Ce,{id:a[t],primary:a[o]})]},a[t]))))})]})};return e(R,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[i(R,{sx:{height:"100%",flex:1},children:h("Available Items",s,"left")}),i(R,{children:e(R,{container:!0,direction:"column",alignItems:"center",children:[i(Pe,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{m((e=>{let i=c.concat(I);return d(i),i})),p(ot(s,I)),l(ot(n,I))},disabled:0===I.length,"aria-label":"move selected right",children:">"}),i(Pe,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(s.concat(E)),m((e=>{let i=ot(c,E);return d(i),i})),l(ot(n,E))},disabled:0===E.length,"aria-label":"move selected left",children:"<"})]})}),i(R,{sx:{height:"100%",flex:1},children:h("Currently Selected",c,"right")})]})},dt=e=>{const{t:t}=Ne();return i(C,{sx:e.sx,disabled:e.disabled||!1,required:e.required||!1,control:i(D,{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)})},nt=e=>{const t=a((e=>e.AppLayout)),{t:o}=Ne();return i(M,{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(P,{...e,style:{...e.style,direction:t.appDirection}})},renderInput:t=>i(h,{...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):""})})},lt="YYYY-MM-DD",st="YYYY-MM-DD HH:mm:ss",pt="#37505C",ct="#ff6d00",mt="#ea690e",ut="#74776B",Tt=e=>{const{t:o}=Ne();return i(ge,{dateAdapter:ve,children:i(Se,{value:null!=e.value&&void 0!==e.value&&""!==e.value?we(e.value,e?.format||lt):null,sx:e.sx,label:o(e.label),format:e?.format||lt,disabled:e.disabled,onChange:i=>{let t=null;null!=i&&i.isValid()&&(t=i.format(e?.format||lt)),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,{})}}})})},At=e=>{const{t:o}=Ne();return i(ge,{dateAdapter:ve,children:i(Ue,{value:null!=e.value&&void 0!==e.value&&""!==e.value?we(e.value,e?.format||st):null,label:o(e.label),sx:e.sx,format:e?.format||st,disabled:e.disabled,onChange:i=>{let t=null;null!=i&&i.isValid()&&(t=i.format(e?.format||st)),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,{})}}})})},_t=e=>{const t=a((e=>e.AppLayout)),o=Zi(),[r,d]=J([]),{handleGetRequest:n}=Hi();return ee((()=>{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]),i(nt,{...e,options:r,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},ft=e=>({...e,type:"string",renderEditCell:e=>i(At,{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=we(e).format(st)),o},valueFormatter:(e,i,t)=>i[t.field]}),It=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(nt,{...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+""})}})}),Et=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(se,{icon:"check",color:"green"}):i(se,{icon:"xmark",color:"red"})},renderEditCell:t=>i(dt,{...t,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{t.api.setEditCellValue({id:t.id,field:t.field,value:e})}})}),Ot=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(...Ot(t));return i},Nt=e=>{const i=[];for(const t of e)i.push(...Ot(t));return i},yt=(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:d?.gridProps?.muiProps?.width?void 0: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:d?.gridProps?.muiProps?.width?void 0:1,minWidth:200},{...r,type:"string",renderEditCell:e=>i(Tt,{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=we(e).format(lt)),o},valueFormatter:(e,i,t)=>i[t.field]});a.push(e)}else if("datetime"===d?.fieldType){const e=ft({...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:d?.gridProps?.muiProps?.width?void 0:1,minWidth:200});a.push(e)}else if("checkbox"===d?.fieldType){const e=Et({...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=It({...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:d?.gridProps?.muiProps?.width?void 0:1,minWidth:200});a.push(e)}else if("lookup"===d?.fieldType){const e=It({...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:d?.gridProps?.muiProps?.width?void 0:1,minWidth:200});a.push(e)}else{const e={field:d.fieldName,...d?.gridProps?.muiProps};a.push(e)}var r;return a},ht=e=>{const i={};for(const t of e)if(t?.fieldName){const e=t.fieldName;"number"===t.fieldType?i[e]=!0===t?.required?xe.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):xe.number().optional().nullable():"checkbox"===t.fieldType?i[e]=!0===t?.required?xe.boolean({required_error:"This field is required"}):xe.boolean().optional().nullable():i[e]=!0===t?.required?xe.string({message:"This field is required"}).min(1,"This field is required"):xe.string().optional().nullable()}return i},Rt=(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}};function Lt(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 Ct(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dt,Mt={exports:{}},Pt={exports:{}},bt={};var gt,St,Ut,vt,wt,xt,Ft,Bt,kt,Wt,Gt,Yt,Vt,qt,Kt,zt={};
2
2
  /** @license React v16.13.1
3
3
  * react-is.development.js
4
4
  *
@@ -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 po(){return no||(no=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var T=e.$$typeof;switch(T){case i: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 T}}case t:return T}}}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"),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"),T=Symbol.for("react.client.reference");so.ContextConsumer=d,so.ContextProvider=n,so.Element=i,so.ForwardRef=l,so.Fragment=o,so.Lazy=m,so.Memo=c,so.Portal=t,so.Profiler=r,so.StrictMode=a,so.Suspense=s,so.SuspenseList=p,so.isContextConsumer=function(i){return e(i)===d},so.isContextProvider=function(i){return e(i)===n},so.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},so.isForwardRef=function(i){return e(i)===l},so.isFragment=function(i){return e(i)===o},so.isLazy=function(i){return e(i)===m},so.isMemo=function(i){return e(i)===c},so.isPortal=function(i){return e(i)===t},so.isProfiler=function(i){return e(i)===r},so.isStrictMode=function(i){return e(i)===a},so.isSuspense=function(i){return e(i)===s},so.isSuspenseList=function(i){return e(i)===p},so.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===T||void 0!==e.getModuleId)},so.typeOf=e}()),so}function co(){return lo||(lo=1,"production"===process.env.NODE_ENV?oo.exports=ro():oo.exports=po()),oo.exports}var mo=co();function uo(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 To(e){if(te.isValidElement(e)||mo.isValidElementType(e)||!uo(e))return e;const i={};return Object.keys(e).forEach((t=>{i[t]=To(e[t])})),i}function Ao(e,i,t={clone:!0}){const o=t.clone?{...e}:e;return uo(e)&&uo(i)&&Object.keys(i).forEach((a=>{te.isValidElement(i[a])||mo.isValidElementType(i[a])?o[a]=i[a]:uo(i[a])&&Object.prototype.hasOwnProperty.call(e,a)&&uo(e[a])?o[a]=Ao(e[a],i[a],t):t.clone?o[a]=uo(i[a])?To(i[a]):i[a]:o[a]=i[a]})),o}function _o(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 n(e){return`@media (min-width:${"number"==typeof i[e]?i[e]:e}${t})`}function l(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: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 i=d.indexOf(e);return 0===i?n(d[1]):i===d.length-1?l(d[i]):s(e,d[d.indexOf(e)+1]).replace("@media","@media not all and")},unit:t,...a}}const fo={borderRadius:4},Io="production"!==process.env.NODE_ENV?io.oneOfType([io.number,io.string,io.object,io.array]):{};function Eo(e,i){return i?Ao(e,i,{clone:!1}):e}const Oo={xs:0,sm:600,md:900,lg:1200,xl:1536},No={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Oo[e]}px)`},yo={containerQueries:e=>({up:i=>{let t="number"==typeof i?i:Oo[i]||i;return"number"==typeof t&&(t=`${t}px`),e?`@container ${e} (min-width:${t})`:`@container (min-width:${t})`}})};function ho(e,i,t){const o=e.theme||{};if(Array.isArray(i)){const e=o.breakpoints||No;return i.reduce(((o,a,r)=>(o[e.up(e.keys[r])]=t(i[r]),o)),{})}if("object"==typeof i){const e=o.breakpoints||No;return Object.keys(i).reduce(((a,r)=>{if(d=e.keys,"@"===(n=r)||n.startsWith("@")&&(d.some((e=>n.startsWith(`@${e}`)))||n.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\`.`:Lt(18,`(${i})`));return null}const[,o,a]=t,r=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(r)}(o.containerQueries?o:yo,r);e&&(a[e]=t(i[r],r))}else if(Object.keys(e.values||Oo).includes(r)){a[e.up(r)]=t(i[r],r)}else{const e=r;a[e]=i[e]}var d,n;return a}),{})}return t(i)}function Ro(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Lt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Lo(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 Co(e,i,t,o=t){let a;return a="function"==typeof e?e(t):Array.isArray(e)?e[t]||o:Lo(e,t)||o,i&&(a=i(a,o,e)),a}function Do(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=Lo(e.theme,o)||{};return ho(e,r,(e=>{let o=Co(d,a,e);return e===o&&"string"==typeof e&&(o=Co(d,a,`${i}${"default"===e?"":Ro(e)}`,e)),!1===t?o:{[t]:o}}))};return r.propTypes="production"!==process.env.NODE_ENV?{[i]:Io}:{},r.filterProps=[i],r}const Mo={m:"margin",p:"padding"},Po={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},bo={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},go=function(e){const i={};return t=>(void 0===i[t]&&(i[t]=e(t)),i[t])}((e=>{if(e.length>2){if(!bo[e])return[e];e=bo[e]}const[i,t]=e.split(""),o=Mo[i],a=Po[t]||"";return Array.isArray(a)?a.map((e=>o+e)):[o+a]})),So=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Uo=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],vo=[...So,...Uo];function wo(e,i,t,o){const a=Lo(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 xo(e){return wo(e,"spacing",8,"spacing")}function Fo(e,i){return"string"==typeof i||null==i?i:e(i)}function Bo(e,i,t,o){if(!i.includes(t))return null;const a=function(e,i){return t=>e.reduce(((e,o)=>(e[o]=Fo(i,t),e)),{})}(go(t),o);return ho(e,e[t],a)}function ko(e,i){const t=xo(e.theme);return Object.keys(e).map((o=>Bo(e,i,o,t))).reduce(Eo,{})}function Wo(e){return ko(e,So)}function Go(e){return ko(e,Uo)}function Yo(...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]?Eo(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 Vo(e){return"number"!=typeof e?e:`${e}px solid`}function qo(e,i){return Do({prop:e,themeKey:"borders",transform:i})}Wo.propTypes="production"!==process.env.NODE_ENV?So.reduce(((e,i)=>(e[i]=Io,e)),{}):{},Wo.filterProps=So,Go.propTypes="production"!==process.env.NODE_ENV?Uo.reduce(((e,i)=>(e[i]=Io,e)),{}):{},Go.filterProps=Uo,"production"===process.env.NODE_ENV||vo.reduce(((e,i)=>(e[i]=Io,e)),{});const Ko=qo("border",Vo),zo=qo("borderTop",Vo),Ho=qo("borderRight",Vo),Qo=qo("borderBottom",Vo),Zo=qo("borderLeft",Vo),jo=qo("borderColor"),$o=qo("borderTopColor"),Xo=qo("borderRightColor"),Jo=qo("borderBottomColor"),ea=qo("borderLeftColor"),ia=qo("outline",Vo),ta=qo("outlineColor"),oa=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const i=wo(e.theme,"shape.borderRadius",4,"borderRadius"),t=e=>({borderRadius:Fo(i,e)});return ho(e,e.borderRadius,t)}return null};oa.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Io}:{},oa.filterProps=["borderRadius"],Yo(Ko,zo,Ho,Qo,Zo,jo,$o,Xo,Jo,ea,oa,ia,ta);const aa=e=>{if(void 0!==e.gap&&null!==e.gap){const i=wo(e.theme,"spacing",8,"gap"),t=e=>({gap:Fo(i,e)});return ho(e,e.gap,t)}return null};aa.propTypes="production"!==process.env.NODE_ENV?{gap:Io}:{},aa.filterProps=["gap"];const ra=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const i=wo(e.theme,"spacing",8,"columnGap"),t=e=>({columnGap:Fo(i,e)});return ho(e,e.columnGap,t)}return null};ra.propTypes="production"!==process.env.NODE_ENV?{columnGap:Io}:{},ra.filterProps=["columnGap"];const da=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const i=wo(e.theme,"spacing",8,"rowGap"),t=e=>({rowGap:Fo(i,e)});return ho(e,e.rowGap,t)}return null};da.propTypes="production"!==process.env.NODE_ENV?{rowGap:Io}:{},da.filterProps=["rowGap"];function na(e,i){return"grey"===i?i:e}Yo(aa,ra,da,Do({prop:"gridColumn"}),Do({prop:"gridRow"}),Do({prop:"gridAutoFlow"}),Do({prop:"gridAutoColumns"}),Do({prop:"gridAutoRows"}),Do({prop:"gridTemplateColumns"}),Do({prop:"gridTemplateRows"}),Do({prop:"gridTemplateAreas"}),Do({prop:"gridArea"}));function la(e){return e<=1&&0!==e?100*e+"%":e}Yo(Do({prop:"color",themeKey:"palette",transform:na}),Do({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:na}),Do({prop:"backgroundColor",themeKey:"palette",transform:na}));const sa=Do({prop:"width",transform:la}),pa=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const i=i=>{const t=e.theme?.breakpoints?.values?.[i]||Oo[i];return t?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${t}${e.theme.breakpoints.unit}`}:{maxWidth:t}:{maxWidth:la(i)}};return ho(e,e.maxWidth,i)}return null};pa.filterProps=["maxWidth"];const ca=Do({prop:"minWidth",transform:la}),ma=Do({prop:"height",transform:la}),ua=Do({prop:"maxHeight",transform:la}),Ta=Do({prop:"minHeight",transform:la});Do({prop:"size",cssProperty:"width",transform:la}),Do({prop:"size",cssProperty:"height",transform:la});Yo(sa,pa,ca,ma,ua,Ta,Do({prop:"boxSizing"}));const Aa={border:{themeKey:"borders",transform:Vo},borderTop:{themeKey:"borders",transform:Vo},borderRight:{themeKey:"borders",transform:Vo},borderBottom:{themeKey:"borders",transform:Vo},borderLeft:{themeKey:"borders",transform:Vo},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Vo},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:oa},color:{themeKey:"palette",transform:na},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:na},backgroundColor:{themeKey:"palette",transform:na},p:{style:Go},pt:{style:Go},pr:{style:Go},pb:{style:Go},pl:{style:Go},px:{style:Go},py:{style:Go},padding:{style:Go},paddingTop:{style:Go},paddingRight:{style:Go},paddingBottom:{style:Go},paddingLeft:{style:Go},paddingX:{style:Go},paddingY:{style:Go},paddingInline:{style:Go},paddingInlineStart:{style:Go},paddingInlineEnd:{style:Go},paddingBlock:{style:Go},paddingBlockStart:{style:Go},paddingBlockEnd:{style:Go},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:aa},rowGap:{style:da},columnGap:{style:ra},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:la},maxWidth:{style:pa},minWidth:{transform:la},height:{transform:la},maxHeight:{transform:la},minHeight:{transform:la},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 _a=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:n,transform:l,style:s}=r;if(null==i)return null;if("typography"===n&&"inherit"===i)return{[e]:i};const p=Lo(t,n)||{};if(s)return s(a);return ho(a,i,(i=>{let t=Co(p,l,i);return i===t&&"string"==typeof i&&(t=Co(p,l,`${e}${"default"===i?"":Ro(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??Aa;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),n=Object.keys(d);let l=d;return Object.keys(o).forEach((t=>{const d=(n=o[t],s=a,"function"==typeof n?n(s):n);var n,s;if(null!=d)if("object"==typeof d)if(r[t])l=Eo(l,e(t,d,a,r));else{const e=ho({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)?l=Eo(l,e):l[t]=i({sx:d,theme:a})}else l=Eo(l,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)}(n,l))}return Array.isArray(o)?o.map(d):d(o)}}();function fa(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 Ia(e=null){const i=te.useContext(J);return i&&(t=i,0!==Object.keys(t).length)?i:e;var t}_a.filterProps=["sx"];const Ea=function(e={},...i){const{breakpoints:t={},palette:o={},spacing:a,shape:r={},...d}=e,n=_o(t),l=function(e=8,i=xo({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=Ao({breakpoints:n,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...fo,...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=fa,s=i.reduce(((e,i)=>Ao(e,i)),s),s.unstable_sxConfig={...Aa,...d?.unstable_sxConfig},s.unstable_sx=function(e){return _a({sx:e,theme:this})},s}();function Oa(e){const{sx:i,...t}=e,{systemProps:o,otherProps:a}=(e=>{const i={systemProps:{},otherProps:{}},t=e?.theme?.unstable_sxConfig??Aa;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 uo(t)?{...o,...t}:o}:{...o,...i},{...a,sx:r}}const Na=e=>e,ya=(()=>{let e=Na;return{configure(i){e=i},generate:i=>e(i),reset(){e=Na}}})();function ha(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=ha(e[i]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Ra(){for(var e,i,t=0,o="",a=arguments.length;t<a;t++)(e=arguments[t])&&(i=ha(e))&&(o&&(o+=" "),o+=i);return o}const La={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 Ca=function(e={}){const{themeId:i,defaultTheme:t,defaultClassName:o="MuiBox-root",generateClassName:a}=e,r=
23
+ */function po(){return no||(no=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var T=e.$$typeof;switch(T){case i: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 T}}case t:return T}}}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"),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"),T=Symbol.for("react.client.reference");so.ContextConsumer=d,so.ContextProvider=n,so.Element=i,so.ForwardRef=l,so.Fragment=o,so.Lazy=m,so.Memo=c,so.Portal=t,so.Profiler=r,so.StrictMode=a,so.Suspense=s,so.SuspenseList=p,so.isContextConsumer=function(i){return e(i)===d},so.isContextProvider=function(i){return e(i)===n},so.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},so.isForwardRef=function(i){return e(i)===l},so.isFragment=function(i){return e(i)===o},so.isLazy=function(i){return e(i)===m},so.isMemo=function(i){return e(i)===c},so.isPortal=function(i){return e(i)===t},so.isProfiler=function(i){return e(i)===r},so.isStrictMode=function(i){return e(i)===a},so.isSuspense=function(i){return e(i)===s},so.isSuspenseList=function(i){return e(i)===p},so.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===T||void 0!==e.getModuleId)},so.typeOf=e}()),so}function co(){return lo||(lo=1,"production"===process.env.NODE_ENV?oo.exports=ro():oo.exports=po()),oo.exports}var mo=co();function uo(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 To(e){if($.isValidElement(e)||mo.isValidElementType(e)||!uo(e))return e;const i={};return Object.keys(e).forEach((t=>{i[t]=To(e[t])})),i}function Ao(e,i,t={clone:!0}){const o=t.clone?{...e}:e;return uo(e)&&uo(i)&&Object.keys(i).forEach((a=>{$.isValidElement(i[a])||mo.isValidElementType(i[a])?o[a]=i[a]:uo(i[a])&&Object.prototype.hasOwnProperty.call(e,a)&&uo(e[a])?o[a]=Ao(e[a],i[a],t):t.clone?o[a]=uo(i[a])?To(i[a]):i[a]:o[a]=i[a]})),o}function _o(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 n(e){return`@media (min-width:${"number"==typeof i[e]?i[e]:e}${t})`}function l(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: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 i=d.indexOf(e);return 0===i?n(d[1]):i===d.length-1?l(d[i]):s(e,d[d.indexOf(e)+1]).replace("@media","@media not all and")},unit:t,...a}}const fo={borderRadius:4},Io="production"!==process.env.NODE_ENV?io.oneOfType([io.number,io.string,io.object,io.array]):{};function Eo(e,i){return i?Ao(e,i,{clone:!1}):e}const Oo={xs:0,sm:600,md:900,lg:1200,xl:1536},No={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Oo[e]}px)`},yo={containerQueries:e=>({up:i=>{let t="number"==typeof i?i:Oo[i]||i;return"number"==typeof t&&(t=`${t}px`),e?`@container ${e} (min-width:${t})`:`@container (min-width:${t})`}})};function ho(e,i,t){const o=e.theme||{};if(Array.isArray(i)){const e=o.breakpoints||No;return i.reduce(((o,a,r)=>(o[e.up(e.keys[r])]=t(i[r]),o)),{})}if("object"==typeof i){const e=o.breakpoints||No;return Object.keys(i).reduce(((a,r)=>{if(d=e.keys,"@"===(n=r)||n.startsWith("@")&&(d.some((e=>n.startsWith(`@${e}`)))||n.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\`.`:Lt(18,`(${i})`));return null}const[,o,a]=t,r=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(r)}(o.containerQueries?o:yo,r);e&&(a[e]=t(i[r],r))}else if(Object.keys(e.values||Oo).includes(r)){a[e.up(r)]=t(i[r],r)}else{const e=r;a[e]=i[e]}var d,n;return a}),{})}return t(i)}function Ro(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Lt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Lo(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 Co(e,i,t,o=t){let a;return a="function"==typeof e?e(t):Array.isArray(e)?e[t]||o:Lo(e,t)||o,i&&(a=i(a,o,e)),a}function Do(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=Lo(e.theme,o)||{};return ho(e,r,(e=>{let o=Co(d,a,e);return e===o&&"string"==typeof e&&(o=Co(d,a,`${i}${"default"===e?"":Ro(e)}`,e)),!1===t?o:{[t]:o}}))};return r.propTypes="production"!==process.env.NODE_ENV?{[i]:Io}:{},r.filterProps=[i],r}const Mo={m:"margin",p:"padding"},Po={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},bo={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},go=function(e){const i={};return t=>(void 0===i[t]&&(i[t]=e(t)),i[t])}((e=>{if(e.length>2){if(!bo[e])return[e];e=bo[e]}const[i,t]=e.split(""),o=Mo[i],a=Po[t]||"";return Array.isArray(a)?a.map((e=>o+e)):[o+a]})),So=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Uo=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],vo=[...So,...Uo];function wo(e,i,t,o){const a=Lo(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 xo(e){return wo(e,"spacing",8,"spacing")}function Fo(e,i){return"string"==typeof i||null==i?i:e(i)}function Bo(e,i,t,o){if(!i.includes(t))return null;const a=function(e,i){return t=>e.reduce(((e,o)=>(e[o]=Fo(i,t),e)),{})}(go(t),o);return ho(e,e[t],a)}function ko(e,i){const t=xo(e.theme);return Object.keys(e).map((o=>Bo(e,i,o,t))).reduce(Eo,{})}function Wo(e){return ko(e,So)}function Go(e){return ko(e,Uo)}function Yo(...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]?Eo(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 Vo(e){return"number"!=typeof e?e:`${e}px solid`}function qo(e,i){return Do({prop:e,themeKey:"borders",transform:i})}Wo.propTypes="production"!==process.env.NODE_ENV?So.reduce(((e,i)=>(e[i]=Io,e)),{}):{},Wo.filterProps=So,Go.propTypes="production"!==process.env.NODE_ENV?Uo.reduce(((e,i)=>(e[i]=Io,e)),{}):{},Go.filterProps=Uo,"production"===process.env.NODE_ENV||vo.reduce(((e,i)=>(e[i]=Io,e)),{});const Ko=qo("border",Vo),zo=qo("borderTop",Vo),Ho=qo("borderRight",Vo),Qo=qo("borderBottom",Vo),Zo=qo("borderLeft",Vo),jo=qo("borderColor"),$o=qo("borderTopColor"),Xo=qo("borderRightColor"),Jo=qo("borderBottomColor"),ea=qo("borderLeftColor"),ia=qo("outline",Vo),ta=qo("outlineColor"),oa=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const i=wo(e.theme,"shape.borderRadius",4,"borderRadius"),t=e=>({borderRadius:Fo(i,e)});return ho(e,e.borderRadius,t)}return null};oa.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Io}:{},oa.filterProps=["borderRadius"],Yo(Ko,zo,Ho,Qo,Zo,jo,$o,Xo,Jo,ea,oa,ia,ta);const aa=e=>{if(void 0!==e.gap&&null!==e.gap){const i=wo(e.theme,"spacing",8,"gap"),t=e=>({gap:Fo(i,e)});return ho(e,e.gap,t)}return null};aa.propTypes="production"!==process.env.NODE_ENV?{gap:Io}:{},aa.filterProps=["gap"];const ra=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const i=wo(e.theme,"spacing",8,"columnGap"),t=e=>({columnGap:Fo(i,e)});return ho(e,e.columnGap,t)}return null};ra.propTypes="production"!==process.env.NODE_ENV?{columnGap:Io}:{},ra.filterProps=["columnGap"];const da=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const i=wo(e.theme,"spacing",8,"rowGap"),t=e=>({rowGap:Fo(i,e)});return ho(e,e.rowGap,t)}return null};da.propTypes="production"!==process.env.NODE_ENV?{rowGap:Io}:{},da.filterProps=["rowGap"];function na(e,i){return"grey"===i?i:e}Yo(aa,ra,da,Do({prop:"gridColumn"}),Do({prop:"gridRow"}),Do({prop:"gridAutoFlow"}),Do({prop:"gridAutoColumns"}),Do({prop:"gridAutoRows"}),Do({prop:"gridTemplateColumns"}),Do({prop:"gridTemplateRows"}),Do({prop:"gridTemplateAreas"}),Do({prop:"gridArea"}));function la(e){return e<=1&&0!==e?100*e+"%":e}Yo(Do({prop:"color",themeKey:"palette",transform:na}),Do({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:na}),Do({prop:"backgroundColor",themeKey:"palette",transform:na}));const sa=Do({prop:"width",transform:la}),pa=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const i=i=>{const t=e.theme?.breakpoints?.values?.[i]||Oo[i];return t?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${t}${e.theme.breakpoints.unit}`}:{maxWidth:t}:{maxWidth:la(i)}};return ho(e,e.maxWidth,i)}return null};pa.filterProps=["maxWidth"];const ca=Do({prop:"minWidth",transform:la}),ma=Do({prop:"height",transform:la}),ua=Do({prop:"maxHeight",transform:la}),Ta=Do({prop:"minHeight",transform:la});Do({prop:"size",cssProperty:"width",transform:la}),Do({prop:"size",cssProperty:"height",transform:la});Yo(sa,pa,ca,ma,ua,Ta,Do({prop:"boxSizing"}));const Aa={border:{themeKey:"borders",transform:Vo},borderTop:{themeKey:"borders",transform:Vo},borderRight:{themeKey:"borders",transform:Vo},borderBottom:{themeKey:"borders",transform:Vo},borderLeft:{themeKey:"borders",transform:Vo},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Vo},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:oa},color:{themeKey:"palette",transform:na},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:na},backgroundColor:{themeKey:"palette",transform:na},p:{style:Go},pt:{style:Go},pr:{style:Go},pb:{style:Go},pl:{style:Go},px:{style:Go},py:{style:Go},padding:{style:Go},paddingTop:{style:Go},paddingRight:{style:Go},paddingBottom:{style:Go},paddingLeft:{style:Go},paddingX:{style:Go},paddingY:{style:Go},paddingInline:{style:Go},paddingInlineStart:{style:Go},paddingInlineEnd:{style:Go},paddingBlock:{style:Go},paddingBlockStart:{style:Go},paddingBlockEnd:{style:Go},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:aa},rowGap:{style:da},columnGap:{style:ra},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:la},maxWidth:{style:pa},minWidth:{transform:la},height:{transform:la},maxHeight:{transform:la},minHeight:{transform:la},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 _a=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:n,transform:l,style:s}=r;if(null==i)return null;if("typography"===n&&"inherit"===i)return{[e]:i};const p=Lo(t,n)||{};if(s)return s(a);return ho(a,i,(i=>{let t=Co(p,l,i);return i===t&&"string"==typeof i&&(t=Co(p,l,`${e}${"default"===i?"":Ro(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??Aa;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),n=Object.keys(d);let l=d;return Object.keys(o).forEach((t=>{const d=(n=o[t],s=a,"function"==typeof n?n(s):n);var n,s;if(null!=d)if("object"==typeof d)if(r[t])l=Eo(l,e(t,d,a,r));else{const e=ho({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)?l=Eo(l,e):l[t]=i({sx:d,theme:a})}else l=Eo(l,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)}(n,l))}return Array.isArray(o)?o.map(d):d(o)}}();function fa(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 Ia(e=null){const i=$.useContext(Q);return i&&(t=i,0!==Object.keys(t).length)?i:e;var t}_a.filterProps=["sx"];const Ea=function(e={},...i){const{breakpoints:t={},palette:o={},spacing:a,shape:r={},...d}=e,n=_o(t),l=function(e=8,i=xo({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=Ao({breakpoints:n,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...fo,...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=fa,s=i.reduce(((e,i)=>Ao(e,i)),s),s.unstable_sxConfig={...Aa,...d?.unstable_sxConfig},s.unstable_sx=function(e){return _a({sx:e,theme:this})},s}();function Oa(e){const{sx:i,...t}=e,{systemProps:o,otherProps:a}=(e=>{const i={systemProps:{},otherProps:{}},t=e?.theme?.unstable_sxConfig??Aa;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 uo(t)?{...o,...t}:o}:{...o,...i},{...a,sx:r}}const Na=e=>e,ya=(()=>{let e=Na;return{configure(i){e=i},generate:i=>e(i),reset(){e=Na}}})();function ha(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=ha(e[i]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Ra(){for(var e,i,t=0,o="",a=arguments.length;t<a;t++)(e=arguments[t])&&(i=ha(e))&&(o&&(o+=" "),o+=i);return o}const La={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 Ca=function(e={}){const{themeId:t,defaultTheme:o,defaultClassName:a="MuiBox-root",generateClassName:r}=e,d=
24
24
  /**
25
25
  * @mui/styled-engine v7.1.1
26
26
  *
@@ -28,11 +28,11 @@ 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=bi(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})(_a),d=te.forwardRef((function(e,d){const n=function(e=Ea){return Ia(e)}(t),{className:l,component:p="div",...c}=Oa(e);return s(r,{as:p,ref:d,className:Ra(l,a?a(o):o),theme:i&&n[i]||n,...c})}));return d}({defaultClassName:function(e,i,t="Mui"){const o={};return i.forEach((i=>{o[i]=function(e,i,t="Mui"){const o=La[i];return o?`${t}-${o}`:`${ya.generate(e)}-${i}`}(e,i,t)})),o}("MuiBox",["root"]).root,generateClassName:ya.generate});function Da(e){return/^\d+$/.test(e)}function Ma(e){return"number"==typeof e&&!isNaN(e)}function Pa(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function ba(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function ga(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Sa(e,i){const t=new Date(e),o=new Date,a=Math.floor((t-o)/1e3),r="rtl"===i?"ar":"en",d=new Intl.RelativeTimeFormat(r,{numeric:"auto"}),n=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(const{unit:e,seconds:i}of n){const t=Math.floor(a/i);if(Math.abs(t)>1)return d.format(t,e)}return"ar"===r?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(Ca.propTypes={children:io.node,component:io.elementType,sx:io.oneOfType([io.arrayOf(io.oneOfType([io.func,io.object,io.bool])),io.func,io.object])});const Ua=e=>{if(e?.fieldInfo){const i=e.fieldInfo,t=e?.formManager||null,o=e?.formActions||null,a=e?.formValues||null,r=e?.fieldInfo?.fieldName||null,d=e?.fieldInfo?.fieldType||null;return i&&t&&a&&r&&d?e.hiddenFields.includes(r)?s(p,{}):s(P,{size:i?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===d||"number"===d?s(tt,{...i.muiTextFieldProps,fullWidth:!0,type:d,disabled:!(!i?.disabled&&!e.disabledFields.includes(r)),hidden:i?.hidden||!1,label:i?.fieldLabel,value:a[r],onChange:e=>{let a=null;""!=e.target.value&&(a="number"===d&&Pa(e.target.value)?Number(e.target.value):e.target.value),t.setValue(r,a),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(a,t,o)},sx:{"& .MuiInputBase-root":{height:`${i?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...i?.formProps?.style},error:null!=t.formState.errors[r],helperText:t?.formState?.errors[r]?.message?.toString()}):"date"===i?.fieldType?s(Tt,{format:i?.dateFormat||lt,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!e.disabledFields.includes(r)),label:i?.fieldLabel,onChangeCallBack:e=>{t.setValue(r,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,t,o)},value:a[r],error:null!=t.formState.errors[r],errorMessage:t?.formState?.errors[r]?.message?.toString()}):"datetime"===i?.fieldType?s(At,{format:i?.dateFormat||st,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!e.disabledFields.includes(r)),label:i?.fieldLabel,onChangeCallBack:e=>{t.setValue(r,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,t,o)},value:a[r],error:null!=t.formState.errors[r],errorMessage:t?.formState?.errors[r]?.message?.toString()}):"checkbox"===i?.fieldType?s(dt,{label:i?.fieldLabel,onChangeCallBack:e=>{t.setValue(r,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,t,o)},value:a[r],checkedValue:i?.checkedValue||!0,unCheckedValue:i?.unCheckedValue||!1,disabled:!(!i?.disabled&&!e.disabledFields.includes(r)),sx:i?.formProps?.style}):"combobox"===i?.fieldType?s(nt,{sx:i?.formProps?.style||{width:"100%"},label:i?.fieldLabel,disabled:!(!i?.disabled&&!e.disabledFields.includes(r)),onChangeCallBack:(e,a)=>{let d=null;e&&(d=e+""),t.setValue(r,d),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(d,t,o,a)},options:i?.options||[],displayField:i?.optionDisplayField||"",valueField:i?.optionValueField||"",value:a[r],errorMessage:t?.formState?.errors[r]?.message?.toString()}):"lookup"===i?.fieldType?s(_t,{sx:i?.formProps?.style||{width:"100%"},label:i?.fieldLabel,disabled:!(!i?.disabled&&!e.disabledFields.includes(r)),onChangeCallBack:(e,a)=>{let d=null;e&&(d=e+""),t.setValue(r,d),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(d,t,o,a)},lookupType:i.lookupType,value:a[r],errorMessage:t?.formState?.errors[r]?.message?.toString()}):null}):s(p,{})}return s(p,{})},va=e=>{const i=Zi(),{ConfirmationWindow:t,setOpen:o}=Qi({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||i.isUserAuthorized(e.authority)?l(p,{children:[s(t,{}),l(O,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?o(!0):e?.actionFn(e.record)}},children:[e?.icon?s(Te,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):s(p,{}),s("div",{children:e?.label})]})]}):s(p,{})},wa=e=>{const{t:i}=Ne();return s(p,{children:l(P,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?s(P,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:e?.icon?l(p,{children:[s(Te,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),s("div",{children:i(e.label)})]}):s(p,{children:i(e.label)})}):s(p,{}),e?.elements?e.elements.map((i=>"group"===i.type?s(wa,{...i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"props"===i.mode?s(Ua,{fieldInfo:i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"node"===i.mode?s(P,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:s(i.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0)):null,e?.actions?s(P,{size:{sm:12},sx:{padding:1},children:e.actions.map((i=>s(va,{...i,record:e.formValues})))}):s(p,{})]})})},xa=e=>{const t=i((e=>e.AppInfo.value.apiBaseUrl)),[o,a]=ae(null);return re((()=>{(()=>{let i=t+"/api/v1/attachment/";e?.attachmentId?i+="download?attachmentId="+e.attachmentId:(i+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(i+=`&category=${e.category}`)),a(i)})()}),[e]),e?.showAsAvatar?s(w,{sx:e.style,onError:()=>{a(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:o}):s("img",{src:o,loading:"lazy",alt:"image",onError:()=>{a(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Fa=e=>{const{handleGetRequest:i,handleDeleteRequest:t}=Hi(),{isUserAuthorized:o}=Zi();let a=!0;e?.downloadAuthorityKey&&(a=o(e.downloadAuthorityKey));const{ConfirmationWindow:r,setOpen:d}=Qi({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await t({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey,attachmentId:e.id},successCallBkFn:i=>{e.setAttachmentConfig(i.data)},showMask:!0})})()}});return l(p,{children:[s(r,{}),l(Re,{sx:{width:300,border:"0.5px solid gray"},children:[s(Ye,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?s(xa,{attachmentId:e.id}):s(Te,{icon:"file",size:"3x"})}),l(Ge,{children:[s(Ve,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),s(Ve,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),s(Ve,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),s(Ve,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),l(We,{children:[e?.allowDelete?s(C,{size:"small",onClick:()=>{d(!0)},children:s(x,{title:"Delete Attachment",children:s(Te,{icon:"trash"})})}):s(p,{}),s("div",{style:{flex:1}}),a?s(C,{size:"small",onClick:async()=>{await i({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:e.id},showMask:!0,responseType:"blob",successCallBkFn:i=>{const t=window.URL.createObjectURL(new Blob([i.data])),o=document.createElement("a");o.href=t,o.setAttribute("download",e.fileName),document.body.appendChild(o),o.click(),o.remove()}})},children:s(x,{title:"Download Attachment",children:s(Te,{icon:"download"})})}):s(p,{})]})]})]})},Ba=e=>{const{handleUploadRequest:i,handleGetRequest:t}=Hi(),[o,a]=ae(null),[r,d]=ae([]),[n,c]=ae(null),[m,u]=ae(null),[T,A]=ae([]),[_,f]=ae(null),{isUserAuthorized:I}=Zi(),E=e=>e.split(".").pop()?.toLowerCase()||"";re((()=>{(async()=>{await t({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{f(e.data)}})})()}),[e.refKey,e.attachmentCode]),re((()=>{if(A(_?.allowedFileTypes?_.allowedFileTypes.split(","):[]),_?.attachmentCategories){const e=[];for(const i of _.attachmentCategories.split(","))e.push({value:i});d(e)}else d([])}),[_]);let N=!0;_?.downloadAuthorityKey&&!I(_?.downloadAuthorityKey)&&(N=!1);let y=!0;return!1===e?.enableAttachment&&(y=!1),_?.uploadAuthorityKey&&!I(_.uploadAuthorityKey)&&(y=!1),l(D,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[s(p,y?{children:null==_?.maxAllowedNumberOfFiles||_?.maxAllowedNumberOfFiles>_.refKeyAttachments.length?l(p,{children:[l("h3",{children:[s(Te,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),s("input",{type:"file",style:{margin:20},accept:_?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const i of e.target.files){const e=E(i.name);if(T.length>0&&!T.includes(e))return void fe.error(e+" is not allowed")}a(e.target.files)}}),r.length>0?s(nt,{label:"Attachment Type",sx:{width:300,m:1},options:r,displayField:"value",valueField:"value",value:m,onChangeCallBack:e=>{u(e)}}):s(p,{}),s(tt,{label:"Remark",value:n,onChange:e=>c(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),s(O,{sx:{m:1},variant:"contained",onClick:async()=>{let t=_?.refKeyAttachments.length||0;if(_?.maxAllowedNumberOfFiles&&o.length+t>_.maxAllowedNumberOfFiles)fe.error("Maximum number of attachments is "+_.maxAllowedNumberOfFiles);else if(!0===_?.isCategoryRequired&&r.length>0&&(null==m||void 0===m||""===m))fe.error("You must selected document type to process your request");else if(o){for(const e of o)if(e.type.startsWith("image/")){const i=600,t=1024*i;if(e.size>t)return void fe.error(`File ${e.name} is too large. Max allowed is ${i}KB.`)}await i({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:n,category:m},files:o,successCallBkFn:e=>{f(e.data),a(null),u(null),c(null),fe.success("Your request has been process successfully")}})}else fe.error("You must add files to upload")},children:"Upload"})]}):s(p,{})}:{}),N&&_?.refKeyAttachments?.length>0?l(p,{children:[l("h3",{children:[s(Te,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),s(P,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:_?.refKeyAttachments.map((i=>s(P,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:s(Fa,{...i,attachmentCode:e.attachmentCode,setAttachmentConfig:f,downloadAuthorityKey:_.downloadAuthorityKey,allowDelete:y})})))})]}):s(p,{})]})},ka=e=>{const t=i((e=>e.AppLayout)),{t:o}=Ne();return l(D,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[l(y,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[s(Te,{icon:"history",style:{marginRight:10,marginLeft:10}}),o("WF_ACTION_HISTORY_LABEL")]}),s(y,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map(((i,o)=>s(p,{children:l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[l(y,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[s(y,{sx:{marginBottom:.2},children:i.actionTime}),l(Ve,{children:["via ",i.actionMethod]})]}),l(y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[s(xa,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:i?.personId+""||"0",style:{m:1,width:70,height:70}}),o!==e.actionHistory.length-1?s(y,{sx:{marginTop:11,position:"absolute"},children:"|"}):s(p,{})]}),l(y,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[l(y,{sx:{width:"100%"},children:["ltr"===t.appDirection?`${i?.documentActionEnName}`:`${i?.documentActionArName}`,i?.actionComment?" - "+i.actionComment:""]}),s(y,{sx:{width:"100%"},children:"ltr"===t.appDirection?`${i?.employeeEnName}`:`${i?.employeeArName}`})]})]})})))})]})},Wa=e=>{const{t:i}=Ne(),t=Zi(),{ConfirmationWindow:o,setOpen:a}=Qi({body:i(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let r=!0;if(e.authority&&(r=t.isUserAuthorized(e.authority)),r)return l(p,{children:[s(o,{}),l(O,{onClick:async()=>{if(e?.recordsToProcessActionOn&&e?.recordsToProcessActionOn.length>0){if(e?.preActionValidation)for(const i of e.recordsToProcessActionOn)if(!e.preActionValidation(i))return;!0===e?.isConfirmationRequired?a(!0):(await e.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn),e?.reloadData&&e.reloadData())}else fe.error(i("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:e?.label?"outlined":e?.formActionProps?.actionButtonVariant?e.formActionProps.actionButtonVariant:"text",size:"small",color:e?.formActionProps?.actionButtonColor||"primary",children:[e?.icon?s(Te,{style:{marginRight:5,marginLeft:5},icon:e.icon}):s(p,{}),e?.label?i(e.label):s(p,{})]})]})},Ga=F(qe)({display:"grid",alignItems:"center"}),Ya=F(Ke)((({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"])}))),Va=F(M)((({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"])}))),qa=e=>{const{t:i}=Ne(),t=Zi(),o=!e?.templateProps?.editAction?.authority||t.isUserAuthorized(e.templateProps.editAction.authority),a=Rt(e?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},e?.templateProps?.data||[],e?.templateProps?.keyColumnName||"id");return l(ze,{children:[o&&"none"!=e?.templateProps?.editMode?.editMode?l(O,{onClick:e?.handleCreateNewRecord,children:[s(Te,{icon:"add",style:{marginRight:5,marginLeft:5}}),i("ADD_BTN_LABEL")]}):s(p,{}),e?.templateProps?.rowActions?e.templateProps.rowActions.map(((i,t)=>!0===i?.gridActionProps?.multiRecord?de(Wa,{...i,key:t,reloadData:async()=>{e.templateProps.apiActions.reloadData(e?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:a.selectedRecordIds,recordsToProcessActionOn:a.selectedRecords}):null)):s(p,{}),s(y,{sx:{flex:1,mx:.5},children:e?.templateProps?.tBar}),s(x,{title:"Columns",children:s(He,{render:s(Ke,{}),children:s(Qe,{fontSize:"small"})})}),s(x,{title:"Filters",children:s(Ze,{render:(e,i)=>s(Ke,{...e,color:"default",children:s(B,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:s(je,{fontSize:"small"})})})})}),e?.templateProps?.gridStateKey?s(x,{title:i("RESET_GRID_STATE"),children:s(C,{onClick:e?.clearGridState,children:s(Te,{icon:"eraser"})})}):s(p,{}),s(k,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),s(x,{title:i("EXPORT_EXECL_LABEL"),children:s($e,{render:s(W,{}),children:s(Te,{icon:"file-excel",color:"green"})})}),l(Ga,{children:[s(Xe,{render:(e,t)=>s(x,{title:i("SEARCH_BTN_LABEL"),enterDelay:0,children:s(Ya,{...e,ownerState:{expanded:t.expanded},color:"default","aria-disabled":t.expanded,children:s(Te,{icon:"search"})})})}),s(Je,{render:({ref:e,...t},o)=>s(Va,{...t,ownerState:{expanded:o.expanded},inputRef:e,"aria-label":"Search",placeholder:`${i("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:s(G,{position:"start",children:s(Te,{icon:"search"})}),endAdornment:o.value?s(G,{position:"end",children:s(ei,{edge:"end",size:"small","aria-label":"Clear search",children:s(Te,{icon:"xmark"})})}):null,...t.slotProps?.input},...t.slotProps}})})]}),s(C,{onClick:()=>{e.templateProps.apiActions.reloadData(e?.templateProps?.gridLoadParametersValues)},children:s(Te,{icon:"refresh"})})]})},Ka=e=>{const{t:i}=Ne(),t=Zi(),{ConfirmationWindow:o,setOpen:a}=Qi({body:i(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.record)),e?.reloadData&&e.reloadData()}});let r=!0;e.authority&&(r=t.isUserAuthorized(e.authority));let d={};e?.getActionIconStyleForRecord&&(d=e.getActionIconStyleForRecord(e.record));let n=!0;e?.isActionVisibleForRecord&&(n=e?.isActionVisibleForRecord(e.record));let c=!1;if(e?.isActionDisabledForRecord&&(c=e.isActionDisabledForRecord(e.record)),r&&n)return l(p,{children:[s(o,{}),s(ii,{disabled:c,icon:s(x,{title:e?.label?i(e.label):"",children:s(Te,{icon:e.icon,style:{...d,color:c?"gray":null!=d?.color?d.color:void 0}})}),showInMenu:e?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!c){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?a(!0):(await e.actionFn(e.record),!0===e?.gridActionProps?.reloadGridAfterAction&&e?.reloadData&&e.reloadData())}}})]})};let za=-1;const Ha=e=>{try{const i=localStorage.getItem(e);return i?JSON.parse(i):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Qa=(e,i)=>{const t=Ha(e);localStorage.setItem(e,JSON.stringify({...t,...i}))},Za=["__check__","actions"],ja=e=>{const{t:t}=Ne(),a=i((e=>e.AppLayout)),[r,d]=ae({}),[n,c]=ae(!0),{getLookupOptions:m}=(()=>{const{handleGetRequest:e}=Hi(),t=i((e=>e.AppLayout)),o=async i=>{let t=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:i},successCallBkFn:e=>{t=e.data}}),t};return{generateLookupGridColumn:async e=>{let i=await o(e.lookupType);return{...e,options:i,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:o}})(),{Window:u,setWindowState:T}=ji({windowTitle:t(e.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{e?.apiActions?.reloadData(e.gridLoadParametersValues)}}),{Window:A,setWindowState:_}=ji({windowTitle:t(e.gridTitle)+" Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"80%",onCloseCallBack:()=>{e?.apiActions?.reloadData(e.gridLoadParametersValues)}}),[f,I]=ae([]),E=Nt(e.formElements),O=[],N=oe.useMemo((()=>e?.gridStateKey?Ha(e.gridStateKey):{}),[]);for(const e of E)!0===e?.gridProps?.hidden&&O.push(e.fieldName);let h={};if(N?.columnVisibilityModel){h=N.columnVisibilityModel;const e=Object.keys(h);for(const i of O)e.includes(i)||(h[i]=!1)}else for(const e of O)h[e]=!1;const R=i((e=>e.AppLayout.appDirection)),[D,M]=oe.useState(h),[P,b]=oe.useState(N.columnOrder||[]),[g,S]=oe.useState(N.columnWidths||{}),[U,v]=ae(N.columnGroupingModel||[]);let w=N?.pinnedColumns?.left||[];w=w.filter((e=>!Za.includes(e)));let F=N?.pinnedColumns?.right||[]||[];F=F.filter((e=>!Za.includes(e)));const[B,W]=ae({left:[..."ltr"===R?Za:[],...w],right:[..."rtl"===R?Za:[],...F]}),G=Zi(),K=o(),[z,H]=ae(null),[Q,Z]=ae(null),[j,$]=ae({}),X=async()=>{let i=yt(E,"row"===e?.editMode?.editMode||!1,t);for(let e of i)e?.lookupType&&(e.displayField="ltr"===a.appDirection?"lookupEnDisplay":"lookupArDisplay",e.options=await m(e.lookupType),e.valueField="lookupValue");I(i)},[J,ee]=ae({ids:new Set,type:"include"});let ie="id";e?.keyColumnName&&(ie=e?.keyColumnName);const te=e.setData,de=Fe.object(ht(E));let ne=!0;e?.editAction?.authority&&(ne=G.isUserAuthorized(e.editAction.authority));let le=!0;e?.deleteAction?.authority&&(le=G.isUserAuthorized(e.deleteAction.authority));const{ConfirmationWindow:se,setOpen:pe}=Qi({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let i=!0;z&&!0===z?.isNew||(i=await e.apiActions.deleteRecordById(z[ie])),i&&(e?.deleteAction?.postActionCallBack&&await e.deleteAction.postActionCallBack(z),te((e=>e.filter((e=>e[ie]!=z[ie])))))}});let ce,me,ue,Ae,_e,Ie;"modal"===e?.editMode?.editMode&&(ce=e?.editMode?.specs?.modalHeight||"fit-content",me=e?.editMode?.specs?.modalWidth||"300",ue=e?.editMode?.specs?.modalMinHeight,Ae=e?.editMode?.specs?.modalMinWidth,_e=e?.editMode?.specs?.modalIcon||"window",Ie=e?.editMode?.specs?.modalTitle||"Record Form");const{Window:Ee,setWindowState:Oe}=ji({height:ce,minHeight:ue,minWidth:Ae,onCloseCallBack:()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)},width:me,windowIcon:_e,windowTitle:Ie}),ye={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(e?.rowActions?30*e.rowActions.length:0)+(e?.editAction&&e?.editAction?.isEnabled?30:0)+(e?.deleteAction&&e?.deleteAction?.isEnabled?30:0)+(e?.attachment?30:0)+(e?.workFlowDocumentCode?30:0),getActions:i=>{const o=i.row,a=[];if("none"!=e?.editMode?.editMode&&(void 0===e?.disableDefaultAction||!e.disableDefaultAction)){const i=j[o[ie]]?.mode===ai.Edit;if("row"===e.editMode.editMode&&i)ne&&(a.push(s(ii,{icon:s(Te,{icon:"save"}),label:t("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const i=e[ie];$({...j,[i]:{mode:ai.View}})})(o)}})),a.push(s(ii,{icon:s(Te,{icon:"cancel"}),label:t("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const i=e[ie];i&&Ma(i)&&i<0?($({...j,[i]:{mode:ai.View,ignoreModifications:!0}}),te((e=>{const t=e.filter((e=>e[ie]!=i));return t}))):$({...j,[i]:{mode:ai.View,ignoreModifications:!0}})})(o)},color:"inherit"})));else{if(e?.editAction&&!0===e?.editAction?.isEnabled){let i=!0;e?.editAction?.isActionVisibleForRecord&&(i=e?.editAction?.isActionVisibleForRecord(o));let r=!1;e?.editAction?.isActionDisabledForRecord&&(r=e?.editAction?.isActionDisabledForRecord(o)),ne&&i&&a.push(s(ii,{disabled:r,icon:s(x,{title:t("EDIT_BTN_LABEL"),children:s(Te,{icon:"edit",style:{color:r?"gray":void 0}})}),showInMenu:e?.editAction?.gridActionProps?.showInMenu||!1,label:t("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{ne&&!r&&(async i=>{if(i)if(Z(i),"form"===e.editMode.editMode)K(e.editMode.specs.formRoute+"/"+i[ie]);else if("modal"===e.editMode.editMode)Oe(!0);else if("row"===e?.editMode?.editMode){const e=i[ie];$({...j,[e]:{mode:ai.Edit}})}})(o)}}))}if(e?.deleteAction&&!0===e?.deleteAction?.isEnabled){let i=!0;e?.deleteAction?.isActionVisibleForRecord&&(i=e?.deleteAction?.isActionVisibleForRecord(o));let r=!1;e?.deleteAction?.isActionDisabledForRecord&&(r=e?.deleteAction?.isActionDisabledForRecord(o)),le&&i&&a.push(s(ii,{disabled:r,icon:s(x,{title:t("DELETE_BTN_LABEL"),children:s(Te,{icon:"trash",style:{color:r?"gray":void 0}})}),showInMenu:e?.deleteAction?.gridActionProps?.showInMenu||!1,label:t("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(le&&!r){if(e?.deleteAction?.preActionValidation&&!e.deleteAction.preActionValidation(o))return;H(o),pe(!0)}}}))}}}if(o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.attachment&&a?.push(s(ii,{icon:s(x,{title:"Attachments",children:s(Te,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{d(o),c(!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(o)),T(!0)}})),o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.workFlowDocumentCode&&a?.push(s(ii,{icon:s(x,{title:"Approvals",children:s(Te,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{d(o),_(!0)}})),o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.rowActions)for(const i of e.rowActions)i?.gridActionProps?.multiRecord&&!0===i?.gridActionProps?.multiRecord||a.push(s(Ka,{...i,record:o,reloadData:async()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)}}));return a}};let he=[];(void 0===e?.disableDefaultAction||!e.disableDefaultAction||e?.rowActions&&e?.rowActions.length>0)&&he.push(ye),he=[...he,...f];re((()=>{void 0!==e?.autoLoad&&!0!==e.autoLoad||e.apiActions.reloadData(e?.gridLoadParametersValues),X()}),[]),re((()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)}),[G.UserInfo?.currentOrganization]),re((()=>{X()}),[R,e.formElements]);const Re=oe.useMemo((()=>{const e=he.map((e=>({...e,width:g[e.field]||e.width})));if(P.length){const i=new Map(e.map((e=>[e.field,e])));return P.map((e=>i.get(e))).filter(Boolean)}return e}),[P,g,he]);return l(p,{children:[s(se,{}),"modal"===e?.editMode?.editMode?s(Ee,{children:e?.editMode?.specs?.formComponent?s(e.editMode.specs.formComponent,{recordIdToEdit:Q?Q[ie]:void 0,formCloseCallBk:()=>{Oe(!1),e.apiActions.reloadData(e?.gridLoadParametersValues)}}):s(ir,{keyColumnName:e.keyColumnName,attachment:e.attachment,formLoadCallBk:e.formLoadCallBk,recordIdToEdit:Q?Q[ie]:void 0,formCloseCallBk:()=>{Oe(!1),e.apiActions.reloadData(e?.gridLoadParametersValues)},elements:e.formElements,apiActions:e.apiActions,editAuthorityKey:e?.editAction?.authority,formSavedSuccessfullyCallBk:e?.editAction?.postActionCallBack,preSaveValidation:e?.editAction?.preActionValidation,actions:e?.rowActions})}):s(p,{}),void 0!==e?.hideInfoBar||e?.hideInfoBar?s(p,{}):l(y,{sx:{display:"flex"},children:[void 0!==e?.hideBackButton||e?.hideBackButton?s(p,{}):s(C,{onClick:()=>{K(-1,{replace:!0})},children:s(Te,{icon:"arrow-left"})}),l(y,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[e?.girdIcon?s(Te,{icon:e.girdIcon,style:{marginRight:5,marginLeft:5}}):s(p,{}),s(L,{variant:"h5",children:e?.gridTitle?ba(t(e?.gridTitle)):""})]})]}),e?.gridLoadParameters&&e?.gridLoadParameters.length>0&&e?.gridLoadParametersValues&&e?.setGridLoadParametersValues?l(Y,{defaultExpanded:!0,sx:{width:"100%"},children:[s(V,{expandIcon:s(ti,{}),children:l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[s(Te,{style:{marginLeft:5,marginRight:5},icon:"search"}),s(L,{component:"span",children:"Filters"})]})}),s(q,{children:s(y,{children:s(ir,{saveButtonSpecs:{label:t("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:t("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async i=>{null!=i?e.setGridLoadParametersValues(i):e.setGridLoadParametersValues({}),e.apiActions.reloadData(i)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:e.gridLoadParameters})})})]}):s(p,{}),e?.attachment?s(u,{children:s(Ba,{attachmentCode:e.attachment.attachmentCode,refKey:r[e?.keyColumnName||"id"],enableAttachment:n})}):s(p,{}),e?.workFlowDocumentCode?s(A,{children:s(er,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:r[e?.keyColumnName||"id"],postActionCallBk:()=>{_(!1),e.apiActions.reloadData(e.gridLoadParametersValues)},cancelActionCallBk:()=>{_(!1),e.apiActions.reloadData(e.gridLoadParametersValues)}})}):s(p,{}),s(oi,{...e?.muiProps,slots:{toolbar:qa},slotProps:{toolbar:{templateProps:{...e,rowSelectionModel:J,data:e?.data},handleCreateNewRecord:()=>{if("form"===e?.editMode?.editMode)K(e.editMode.specs.formRoute);else if("modal"===e?.editMode?.editMode)Z(null),Oe(!0);else if("row"===e?.editMode?.editMode){za-=1;const e={};e[ie]=za,e.isNew=!0;for(const i of f)"actions"!=i?.type&&i?.field!=ie&&i?.field&&(e[i.field]=null);te((i=>[e,...i])),$((e=>({...e,[za]:{mode:ai.Edit}})))}},clearGridState:()=>{e?.gridStateKey&&localStorage.removeItem(e.gridStateKey),M({}),b([]),S({}),v([]),W({left:[..."ltr"===R?Za:[]],right:[..."rtl"===R?Za:[]]})}}},getRowId:e=>e[ie],showToolbar:!0,rows:e?.data,columns:Re,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,i)=>{"rowFocusOut"===e.reason&&(i.defaultMuiPrevented=!0)},rowModesModel:"row"==e.editMode.editMode?j:void 0,onRowModesModelChange:"row"==e.editMode.editMode?e=>{$(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async i=>{if("row"===e.editMode.editMode){let t=null;const o=(e=>{try{de.parse(e)}catch(e){console.log("validateRecord err",e);let i=null;return i=e instanceof Fe.ZodError?e.errors.map((e=>"Error in field ("+e.path+") : "+e.message)).join(","):"invalid record data",i}})(i);if(o){const e=o.split(",");throw fe.error(s("div",{style:{},children:e.map((e=>l(p,{children:[s("div",{children:e}),s(k,{})]})))})),new Error(o)}if(e?.editAction?.preActionValidation&&!e.editAction.preActionValidation(i))throw new Error("error on the configured presave validation");const a={...i};if(i[ie]&&Ma(i[ie])&&Number(i[ie])<0&&(a[ie]=null),t=await e.apiActions.saveRecord(a),null==t)throw new Error("Failed to process your request, contact your administrator");return e?.editAction?.postActionCallBack&&await e.editAction.postActionCallBack(i),!0===i?.isNew&&te((e=>{const o=e.filter((e=>e[ie]!==i[ie]));return[t,...o]})),!0===e?.editMode?.reloadAfterSave&&e?.apiActions?.reloadData&&e?.apiActions?.reloadData(e?.gridLoadParametersValues),t}},rowSelectionModel:J,onRowSelectionModelChange:e=>{ee(e)},columnVisibilityModel:D,onColumnVisibilityModelChange:i=>{M(i),e?.gridStateKey&&Qa(e.gridStateKey,{columnVisibilityModel:i})},onColumnOrderChange:i=>{const{column:t,targetIndex:o}=i;b((i=>{const a=i.length?[...i]:he.map((e=>e.field)),r=a.indexOf(t.field);return-1===r||(a.splice(r,1),a.splice(o,0,t.field),e?.gridStateKey&&Qa(e.gridStateKey,{columnOrder:a})),a}))},onColumnWidthChange:i=>{const t={...g,[i.colDef.field]:i.width};S(t),e?.gridStateKey&&Qa(e.gridStateKey,{columnWidths:t})},rowGroupingModel:U,onRowGroupingModelChange:i=>{(i=>{v(i),e?.gridStateKey&&Qa(e.gridStateKey,{columnGroupingModel:i})})(i)},sx:{width:"100%"}})]})},$a=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 i},Xa=e=>{const[i,t]=ae([]);return re((()=>{const i=e.reportData.map(((e,i)=>({...e,report_record_data_key:i})));t(i)}),[e.reportData]),s(ja,{data:i,disableDefaultAction:!0,setData:e.setReportData,formElements:$a(e.reportData),gridLoadParameters:e.gridLoadParameters,gridLoadParametersValues:e.gridLoadParametersValues,setGridLoadParametersValues:e.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,keyColumnName:"report_record_data_key",hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{e.reloadReport()},saveRecord:async()=>{}}})},Ja=e=>{const[i,t]=ae(null),[o,a]=ae(null),[r,d]=ae([]),[n,c]=ae("WAITING_REPORT_CODE"),{handleGetRequest:m,handlePostRequest:u,HandleDownloadHTTPPostPDF:T}=Hi(),[A,_]=ae(null),[f,I]=ae({...e?.reportParametersValues}),[E,O]=ae([]),{t:N}=Ne(),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},R=async(i,o)=>{c("WAITING_RESULT"),"Excel"===i?.reportType?await u({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:o,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT"),d(e.data)}}):i?.reportType&&await T({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:o,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT");const i=e.headers["content-disposition"];let o="downloaded_file";if(i&&-1!==i.indexOf("filename=")){const e=i.match(/filename="?([^"]+)"?/);e&&e[1]&&(o=e[1])}if(o.includes("pdf")){const i=new Blob([e.data],{type:"application/pdf"}),o=URL.createObjectURL(i);t(o)}else{const i=new Blob([e.data],{type:e.headers["content-type"]}),t=window.URL.createObjectURL(i),a=document.createElement("a");a.href=t,a.download=o,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(t)}},failureCallBkFn:e=>{a("Failed To run report ... contact your administrator"),c("ERROR")}})};return re((()=>{e?.reportCode&&(async()=>{c("LOADING_METADATA"),await m({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:i=>{_(i.data),O(h(i.data.reportParameters)),!0===e?.byPassParameterEntry||0==i.data.reportParameters.length?(R(i.data,f),c("WAITING_RESULT")):c("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{a("Failed loading report metadata ... contact your administrator"),c("ERROR")}})})()}),[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),l(p,{children:[l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[l(y,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[s(Te,{icon:"Excel"===A?.reportType?"file-excel":"file-pdf",color:"Excel"===A?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),A?.reportName]}),"Excel"!=A?.reportType&&"SHOWING_RESULT"===n?l(p,{children:[!0===e?.byPassParameterEntry?s(p,{}):E.length>0?s(C,{onClick:()=>{O(h(A.reportParameters)),c("WAITING_PARAMETER_INPUT")},children:s(Te,{icon:"filter"})}):s(p,{}),s(C,{children:s(Te,{icon:"refresh",onClick:()=>{R(A,f)}})})]}):s(p,{})]}),s(y,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===n&&"Excel"!=A?.reportType?l(Y,{defaultExpanded:!0,sx:{width:"100%"},expanded:!0,children:[s(V,{children:l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[s(Te,{style:{marginLeft:5,marginRight:5},icon:"search"}),s(L,{component:"span",children:"Filters"})]})}),s(q,{children:s(y,{children:s(ir,{saveButtonSpecs:{label:N("SHOW_REPORT_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success",hidden:!0},cancelButtonSpecs:{label:N("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{I(null!=e?e:{}),R(A,e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:E})})})]}):"SHOWING_RESULT"===n||("WAITING_PARAMETER_INPUT"===n||"WAITING_RESULT"===n)&&"Excel"===A?.reportType?"Excel"===A?.reportType?s(Xa,{reportData:r,setReportData:d,reloadReport:async()=>{R(A,f)},gridLoadParameters:E,gridLoadParametersValues:f,setGridLoadParametersValues:I}):s("iframe",{src:i,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===n?l(y,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[s(Te,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),o]}):s(p,{})})]})},er=e=>{const t=o(),a=i((e=>e.AppLayout)),{isUserAuthorized:r,UserInfo:d}=Zi(),{handleGetRequest:n,handlePostRequest:c}=Hi(),[m,u]=ae(null),[T,A]=ae([]),{t:_}=Ne(),[f,I]=ae(null),[E,N]=ae({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:h,setWindowState:R}=ji({windowTitle:"ltr"===a.appDirection?E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"Document":E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),L=async()=>{await n({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{N(e.data)},failureCallBkFn:()=>{N({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},M=async()=>{await c({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:E?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:m.id,refDocumentStatus:E?.workflowDocumentStatus?.documentStatusCode,actionComment:f},successCallBkFn:async i=>{m?.post_action_endpoint?await c({endPointURI:m.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:m.id},successCallBkFn:()=>{L(),e?.postActionCallBk&&e.postActionCallBk()}}):L()}})};return re((()=>{e.refDocumentId&&e.workFlowDocumentCode&&L()}),[e.refDocumentId,e.workFlowDocumentCode]),re((()=>{A(E?.nextActions&&E?.nextActions?.length>0?E.nextActions.filter((e=>{if(!E?.workflowDocumentStatus?.nextActionTakersAuthority&&!E?.nextActionTakers)return!0;if(E?.workflowDocumentStatus?.nextActionTakersAuthority&&r(E.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(E?.nextActionTakers)for(const e of E.nextActionTakers)if(d?.username===e?.username||d?.username===e?.USERNAME)return!0;return!1})):[])}),[E.nextActions,E.nextActionTakers]),l(p,{children:[E?.workflowDocumentReport?.id?s(h,{children:s(Ja,{reportCode:E?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):s(p,{}),E?.workflowDocument?l(y,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[s(C,{onClick:()=>{t(-1,{replace:!0})},children:s(Te,{icon:"arrow-left"})}),s(y,{sx:{flex:1}}),s(Te,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`,E?.workflowDocumentStatus?"ltr"===a.appDirection?` ( ${E?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${E?.workflowDocumentStatus?.documentStatusArName} )`:"",s(y,{sx:{flex:1}}),E?.workflowDocumentReport?.id?s(O,{onClick:()=>{R(!0)},variant:"outlined",startIcon:s(Te,{icon:"eye"}),children:_("VIEW_LABEL")}):s(p,{})]}):s(p,{}),l(y,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[T?.length>0?l(D,{sx:{padding:2,display:"flex",flex:1,margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[s(nt,{sx:{marginBottom:2,width:400},label:_("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===a.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:m?.id,options:T,onChangeCallBack:(e,i)=>{u(i)}}),s(tt,{sx:{width:400},rows:3,value:f,onChange:e=>{I(e.target.value)},multiline:!0,label:_("WF_COMMENT_LABEL")}),l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[s(O,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=m&&null!=m?.id?!0!==m.require_comment&&1!==m.require_comment&&"true"!==m.require_comment||null!==f&&""!==f?m?.pre_action_endpoint?await c({endPointURI:m.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:m.id},successCallBkFn:()=>{M()}}):M():fe.error("You must enter comment for the action to be processed"):fe.error("You must select action to process")},children:_("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?s(O,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:_("WF_CANCEL_BTN_LABEL")}):s(p,{})]}),E?.nextActionTakers&&E.nextActionTakers.length>0?l(p,{children:[s(k,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:l(y,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[s(Te,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",_("WF_WAITING_FOR_LABEL")]})}),s(y,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:E.nextActionTakers.map((e=>l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[s(xa,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),l(y,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[s("div",{children:"ltr"===a.appDirection?e?.employee_en_name:e?.employee_ar_name}),s("div",{children:e?.email?l(p,{children:[s(Te,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),e?.email]}):s(p,{})}),s("div",{children:e?.mobile_number?l(p,{children:[s(Te,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):s(p,{})})]})]})))})]}):s(p,{})]}):s(p,{}),E?.actionsHistory.length>0?s(ka,{actionHistory:E.actionsHistory}):l(D,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[l(y,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[s(Te,{icon:"history",style:{marginRight:10,marginLeft:10}}),_("WF_ACTION_HISTORY_LABEL")]}),s(y,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},ir=e=>{const{Window:i,setWindowState:t}=ji({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:o,setWindowState:r}=ji({windowTitle:"Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[d,n]=ae(!0),{t:c}=Ne(),m=Nt(e.elements),u=[];for(const e of m)e?.hidden&&u.push(e.fieldName);const[T,A]=ae(u),_={};for(const i of e.elements)"field"===i?.type&&"props"===i?.mode&&i?.props?.defaultValue&&(_[i.props.fieldName]=i.props.defaultValue);const[f,I]=ae([]),E=xe.object(ht(m)),N=Be({resolver:ke(E),defaultValues:_}),y=N.watch(),h=a(),R=e?.formRouteRecordIdParamName,L=async()=>{let i=null;if(e?.recordIdToEdit?i=e.recordIdToEdit:R&&h[R]&&(i=h[R]),i){const t=await e.apiActions.loadRecordById(i);if(t){N.reset({...t}),e?.formLoadCallBk&&e?.formLoadCallBk(D,N,t);for(const e of m)"combobox"===e?.fieldType&&t[e.fieldName]&&N.setValue(e.fieldName,t[e.fieldName]+"")}}else N.reset({})},D={setFieldValue:(e,i)=>{N.setValue(e,i)},hideField:e=>{A((i=>[...i,e]))},showField:e=>{A((i=>i.filter((i=>i!==e))))},disableField:e=>{I((i=>[...i,e]))},enableField:e=>{I((i=>i.filter((i=>i!==e))))}};return re((()=>{L()}),[e?.recordIdToEdit]),re((()=>{n(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(y))}),[y]),l(p,{children:[e?.attachment?s(i,{children:s(Ba,{attachmentCode:e.attachment.attachmentCode,refKey:y[e?.keyColumnName||"id"],enableAttachment:d})}):s(p,{}),e?.workFlowDocumentCode?s(o,{children:s(er,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:y[e?.keyColumnName||"id"],postActionCallBk:()=>{r(!1),L()},cancelActionCallBk:()=>{r(!1)}})}):s(p,{}),s(Ca,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:s(P,{sx:{width:"100%"},container:!0,children:e.elements.map(((e,i)=>"group"===e.type?s(wa,{...e.props,formManager:N,formValues:y,formActions:D,hiddenFields:T,disabledFields:f},i):"field"===e.type&&"props"===e.mode?s(Ua,{fieldInfo:e.props,formManager:N,formValues:y,formActions:D,hiddenFields:T,disabledFields:f},i):"field"===e.type&&"node"===e.mode?s(P,{size:e?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:s(e.node,{formManager:N,formValues:y})},i):void 0))})}),l(Ca,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[y[e?.keyColumnName||"id"]&&e?.attachment?s(x,{title:"Attachments",children:s(C,{onClick:()=>{t(!0)},children:s(Te,{icon:"paperclip"})})}):null,y[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?s(x,{title:"Approvals",children:s(C,{onClick:()=>{r(!0)},children:s(Te,{icon:"stamp"})})}):null,e?.actions&&y[e?.keyColumnName||"id"]?e.actions.map((e=>!0===e?.formActionProps?.enabled?s(va,{...e,record:y}):s(p,{}))):s(p,{}),s("div",{style:{flex:1}}),s(O,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?s(Te,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:N.handleSubmit((i=>{(async i=>{if((!e?.preSaveValidation||e.preSaveValidation(i))&&i){const t=await e.apiActions.saveRecord(i);t&&(N.reset({...t}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(t),e?.formCloseCallBk&&e.formCloseCallBk())}})(i)}),(e=>{fe.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)})),children:c(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),s(O,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?s(Te,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),N.reset(_)},children:c(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},tr=()=>{const{workflowDocumentCode:e,refDocumentId:i}=a();return s(er,{workFlowDocumentCode:e,refDocumentId:i})},or=e=>s(ri,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map((e=>({dataKey:e,label:e})))}),ar=e=>l(D,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[s(y,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:s("div",{children:e.record[e.valueField]})}),s(L,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),rr=e=>l(p,{children:[s(L,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),s(di,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),dr=e=>s(ni,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map((e=>({dataKey:e,label:e})))});function nr(e){return l(si,{sx:{display:"flex",alignItems:"center"},children:[s(si,{sx:{width:"100%",mr:1},children:s(li,{variant:"determinate",...e})}),s(si,{sx:{minWidth:35},children:s(Ve,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const lr=e=>l(si,{sx:{width:"100%"},children:[s(Ve,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),s(nr,{value:e.record[e.valueField]/e.total*100})]}),sr=e=>{const i=e.data.map(((i,t)=>({id:t,value:i[e.valueField],label:i[e.labelField]+""})));return s(pi,{series:[{data:i}]})},pr=e=>{const[i,t]=ae(!0),[o,a]=ae([]),{handleGetRequest:r}=Hi();re((()=>{(async()=>{t(!0),await r({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{t(!1),a(e.data)},failureCallBkFn:()=>{t(!1),a(null)}})})()}),[e.parameterValues]);let d=0;if(1==o.length&&(d=100),"CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const i of o)d+=i[e.verticalAxisField];return l(p,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?l(y,{children:[s(Te,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):s(p,{}),s(y,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:i?l(p,{children:[s(Te,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),s("div",{children:"Loading"})]}):"ColumnChart"===e.widgetType?s(or,{data:o,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?s(dr,{data:o,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?s(sr,{data:o,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Line"}):l(P,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[s(P,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),o.map(((i,t)=>"Card"===e.widgetType?s(P,{size:{md:3,xs:12},children:s(ar,{widgetTitle:"",record:i,labelField:e.verticalAxisField,valueField:e.horizontalAxisField},t)}):"CircularProgress"===e.widgetType?s(P,{size:{md:3,xs:12},children:s(rr,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:d},t)}):"LinearProgress"===e.widgetType?s(P,{size:{md:3,xs:12},children:s(lr,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:d},t)}):void 0))]})})]})},cr=e=>{const[i,t]=ae({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),[a,r]=ae(e?.parameters||{}),d=o(),{handleGetRequest:n,handlePostRequest:c}=Hi();return re((()=>{e.dashboardCode&&(async()=>{await n({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{t(e.data)},failureCallBkFn:()=>{t(null)}})})()}),[e.dashboardCode,e.parameters]),s(p,{children:i?l(p,{children:[l(y,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[s(C,{onClick:()=>{d(-1,{replace:!0})},children:s(Te,{icon:"arrow-left"})}),s(y,{sx:{flex:1}}),s(Te,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),s(y,{children:i?.dashboardTitle}),s(y,{sx:{flex:1}})]}),s(P,{container:!0,spacing:1,sx:{flexGrow:1,overflowY:"auto",padding:1},children:i?.widgets.map(((e,i)=>s(P,{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:s(pr,{...e})},i)))})]}):s(y,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},mr=()=>{const{dashboardCode:e}=a();return s(cr,{dashboardCode:e})},ur=t=>{const{UserSession:o}=Zi(),a=i((e=>e.AppLayout)),r=e(),{handlePostRequest:d}=Hi(),[n,p]=ae(o.value.currentOrganization.id);return l(y,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[s(nt,{sx:{width:"100%"},displayField:"ltr"===a.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:o.value.userOrganizations,value:n,onChangeCallBack:e=>{p(e)}}),s(O,{sx:{m:1},variant:"contained",disabled:null==n||n===o.value.currentOrganization.id,onClick:async()=>{await d({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:o.value.username,orgId:n},data:{},successCallBkFn:e=>{const i={...e.data,isAuthenticated:!0};r(Ki.setAuthenticated(i)),t.successChangeCallBackFn&&t.successChangeCallBackFn()}})},children:"Change Organization"})]})},Tr=Ae({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,i)=>{e.isOpened=i.payload}}}),{toggleSideBarState:Ar,setSideBarState:_r}=Tr.actions;var fr=Tr.reducer;function Ir(e,i){const t=ne(e);re((()=>{t.current=e}),[e]),re((()=>{const e=setInterval((()=>t.current?.()),i);return()=>clearInterval(e)}),[i])}const Er=K`
31
+ function(e,i){const t=bi(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})(_a),n=$.forwardRef((function(e,n){const l=function(e=Ea){return Ia(e)}(o),{className:s,component:p="div",...c}=Oa(e);return i(d,{as:p,ref:n,className:Ra(s,r?r(a):a),theme:t&&l[t]||l,...c})}));return n}({defaultClassName:function(e,i,t="Mui"){const o={};return i.forEach((i=>{o[i]=function(e,i,t="Mui"){const o=La[i];return o?`${t}-${o}`:`${ya.generate(e)}-${i}`}(e,i,t)})),o}("MuiBox",["root"]).root,generateClassName:ya.generate});function Da(e){return/^\d+$/.test(e)}function Ma(e){return"number"==typeof e&&!isNaN(e)}function Pa(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function ba(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function ga(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Sa(e,i){const t=new Date(e),o=new Date,a=Math.floor((t-o)/1e3),r="rtl"===i?"ar":"en",d=new Intl.RelativeTimeFormat(r,{numeric:"auto"}),n=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(const{unit:e,seconds:i}of n){const t=Math.floor(a/i);if(Math.abs(t)>1)return d.format(t,e)}return"ar"===r?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(Ca.propTypes={children:io.node,component:io.elementType,sx:io.oneOfType([io.arrayOf(io.oneOfType([io.func,io.object,io.bool])),io.func,io.object])});const Ua=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)?i(t,{}):i(R,{size:o?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?i(tt,{...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 i=null;""!=e.target.value&&(i="number"===l&&Pa(e.target.value)?Number(e.target.value):e.target.value),a.setValue(n,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[n],helperText:a?.formState?.errors[n]?.message?.toString()}):"date"===o?.fieldType?i(Tt,{format:o?.dateFormat||lt,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?i(At,{format:o?.dateFormat||st,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?i(dt,{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?i(nt,{sx:o?.formProps?.style||{width:"100%"},label:o?.fieldLabel,disabled:!(!o?.disabled&&!e.disabledFields.includes(n)),onChangeCallBack:(e,i)=>{let t=null;e&&(t=e+""),a.setValue(n,t),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(t,a,r,i)},options:o?.options||[],displayField:o?.optionDisplayField||"",valueField:o?.optionValueField||"",value:d[n],errorMessage:a?.formState?.errors[n]?.message?.toString()}):"lookup"===o?.fieldType?i(_t,{sx:o?.formProps?.style||{width:"100%"},label:o?.fieldLabel,disabled:!(!o?.disabled&&!e.disabledFields.includes(n)),onChangeCallBack:(e,i)=>{let t=null;e&&(t=e+""),a.setValue(n,t),o?.formProps?.onValueChangeCallBack&&o?.formProps?.onValueChangeCallBack(t,a,r,i)},lookupType:o.lookupType,value:d[n],errorMessage:a?.formState?.errors[n]?.message?.toString()}):null}):i(t,{})}return i(t,{})},va=o=>{const a=Zi(),{ConfirmationWindow:r,setOpen:d}=Qi({body:o?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{o?.actionFn(o?.record)}});return null==o?.authority||a.isUserAuthorized(o.authority)?e(t,{children:[i(r,{}),e(A,{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(se,{icon:o.icon,style:{marginRight:5,marginLeft:5}}):i(t,{}),i("div",{children:o?.label})]})]}):i(t,{})},wa=o=>{const{t:a}=Ne();return i(t,{children:e(R,{container:!0,sx:o?.style,alignItems:"flex-start",children:[o?.label?i(R,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:o?.icon?e(t,{children:[i(se,{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(wa,{...e.props,formManager:o.formManager,formValues:o.formValues,formActions:o.formActions,hiddenFields:o.hiddenFields,disabledFields:o.disabledFields}):"field"===e.type&&"props"===e.mode?i(Ua,{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(R,{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(R,{size:{sm:12},sx:{padding:1},children:o.actions.map((e=>i(va,{...e,record:o.formValues})))}):i(t,{})]})})},xa=e=>{const t=a((e=>e.AppInfo.value.apiBaseUrl)),[o,r]=J(null);return ee((()=>{(()=>{let i=t+"/api/v1/attachment/";e?.attachmentId?i+="download?attachmentId="+e.attachmentId:(i+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(i+=`&category=${e.category}`)),r(i)})()}),[e]),e?.showAsAvatar?i(b,{sx:e.style,onError:()=>{r(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:o}):i("img",{src:o,loading:"lazy",alt:"image",onError:()=>{r(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Fa=o=>{const{handleGetRequest:a,handleDeleteRequest:r}=Hi(),{isUserAuthorized:d}=Zi();let n=!0;o?.downloadAuthorityKey&&(n=d(o.downloadAuthorityKey));const{ConfirmationWindow:l,setOpen:s}=Qi({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(t,{children:[i(l,{}),e(Re,{sx:{width:300,border:"0.5px solid gray"},children:[i(Ye,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:o?.docType.toLocaleLowerCase().includes("image")?i(xa,{attachmentId:o.id}):i(se,{icon:"file",size:"3x"})}),e(Ge,{children:[i(Ve,{gutterBottom:!0,variant:"h6",component:"div",children:o.fileName}),i(Ve,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${o?.attachmentSize||"unknown"} kb`}),i(Ve,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${o?.category||"NA"}`}),i(Ve,{variant:"body2",sx:{color:"text.secondary"},children:o.remark})]}),e(We,{children:[o?.allowDelete?i(N,{size:"small",onClick:()=>{s(!0)},children:i(g,{title:"Delete Attachment",children:i(se,{icon:"trash"})})}):i(t,{}),i("div",{style:{flex:1}}),n?i(N,{size:"small",onClick:async()=>{await a({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:o.id},showMask:!0,responseType:"blob",successCallBkFn:e=>{const i=window.URL.createObjectURL(new Blob([e.data])),t=document.createElement("a");t.href=i,t.setAttribute("download",o.fileName),document.body.appendChild(t),t.click(),t.remove()}})},children:i(g,{title:"Download Attachment",children:i(se,{icon:"download"})})}):i(t,{})]})]})]})},Ba=o=>{const{handleUploadRequest:a,handleGetRequest:r}=Hi(),[d,n]=J(null),[l,s]=J([]),[p,c]=J(null),[m,u]=J(null),[T,_]=J([]),[f,I]=J(null),{isUserAuthorized:E}=Zi(),O=e=>e.split(".").pop()?.toLowerCase()||"";ee((()=>{(async()=>{await r({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:o.attachmentCode,refKey:o.refKey},successCallBkFn:e=>{I(e.data)}})})()}),[o.refKey,o.attachmentCode]),ee((()=>{if(_(f?.allowedFileTypes?f.allowedFileTypes.split(","):[]),f?.attachmentCategories){const e=[];for(const i of f.attachmentCategories.split(","))e.push({value:i});s(e)}else s([])}),[f]);let N=!0;f?.downloadAuthorityKey&&!E(f?.downloadAuthorityKey)&&(N=!1);let h=!0;return!1===o?.enableAttachment&&(h=!1),f?.uploadAuthorityKey&&!E(f.uploadAuthorityKey)&&(h=!1),e(y,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[i(t,h?{children:null==f?.maxAllowedNumberOfFiles||f?.maxAllowedNumberOfFiles>f.refKeyAttachments.length?e(t,{children:[e("h3",{children:[i(se,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),i("input",{type:"file",style:{margin:20},accept:f?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const i of e.target.files){const e=O(i.name);if(T.length>0&&!T.includes(e))return void me.error(e+" is not allowed")}n(e.target.files)}}),l.length>0?i(nt,{label:"Attachment Type",sx:{width:300,m:1},options:l,displayField:"value",valueField:"value",value:m,onChangeCallBack:e=>{u(e)}}):i(t,{}),i(tt,{label:"Remark",value:p,onChange:e=>c(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),i(A,{sx:{m:1},variant:"contained",onClick:async()=>{let e=f?.refKeyAttachments.length||0;if(f?.maxAllowedNumberOfFiles&&d.length+e>f.maxAllowedNumberOfFiles)me.error("Maximum number of attachments is "+f.maxAllowedNumberOfFiles);else if(!0===f?.isCategoryRequired&&l.length>0&&(null==m||void 0===m||""===m))me.error("You must selected document type to process your request");else if(d){for(const e of d)if(e.type.startsWith("image/")){const i=600,t=1024*i;if(e.size>t)return void me.error(`File ${e.name} is too large. Max allowed is ${i}KB.`)}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=>{I(e.data),n(null),u(null),c(null),me.success("Your request has been process successfully")}})}else me.error("You must add files to upload")},children:"Upload"})]}):i(t,{})}:{}),N&&f?.refKeyAttachments?.length>0?e(t,{children:[e("h3",{children:[i(se,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),i(R,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:f?.refKeyAttachments.map((e=>i(R,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:i(Fa,{...e,attachmentCode:o.attachmentCode,setAttachmentConfig:I,downloadAuthorityKey:f.downloadAuthorityKey,allowDelete:h})})))})]}):i(t,{})]})},ka=o=>{const r=a((e=>e.AppLayout)),{t:d}=Ne();return e(y,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[e(f,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[i(se,{icon:"history",style:{marginRight:10,marginLeft:10}}),d("WF_ACTION_HISTORY_LABEL")]}),i(f,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:o.actionHistory.map(((a,d)=>i(t,{children:e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[e(f,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[i(f,{sx:{marginBottom:.2},children:a.actionTime}),e(Ve,{children:["via ",a.actionMethod]})]}),e(f,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[i(xa,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:a?.personId+""||"0",style:{m:1,width:70,height:70}}),d!==o.actionHistory.length-1?i(f,{sx:{marginTop:11,position:"absolute"},children:"|"}):i(t,{})]}),e(f,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[e(f,{sx:{width:"100%"},children:["ltr"===r.appDirection?`${a?.documentActionEnName}`:`${a?.documentActionArName}`,a?.actionComment?" - "+a.actionComment:""]}),i(f,{sx:{width:"100%"},children:"ltr"===r.appDirection?`${a?.employeeEnName}`:`${a?.employeeArName}`})]})]})})))})]})},Wa=o=>{const{t:a}=Ne(),r=Zi(),{ConfirmationWindow:d,setOpen:n}=Qi({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(t,{children:[i(d,{}),e(A,{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 me.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(se,{style:{marginRight:5,marginLeft:5},icon:o.icon}):i(t,{}),o?.label?a(o.label):i(t,{})]})]})},Ga=S(qe)({display:"grid",alignItems:"center"}),Ya=S(Ke)((({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"])}))),Va=S(h)((({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"])}))),qa=o=>{const{t:a}=Ne(),r=Zi(),d=!o?.templateProps?.editAction?.authority||r.isUserAuthorized(o.templateProps.editAction.authority),n=Rt(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(A,{onClick:o?.handleCreateNewRecord,children:[i(se,{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?ie(Wa,{...e,key:i,reloadData:async()=>{o.templateProps.apiActions.reloadData(o?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:n.selectedRecordIds,recordsToProcessActionOn:n.selectedRecords}):null)):i(t,{}),i(f,{sx:{flex:1,mx:.5},children:o?.templateProps?.tBar}),i(g,{title:"Columns",children:i(He,{render:i(Ke,{}),children:i(Qe,{fontSize:"small"})})}),i(g,{title:"Filters",children:i(Ze,{render:(e,t)=>i(Ke,{...e,color:"default",children:i(U,{badgeContent:t.filterCount,color:"primary",variant:"dot",children:i(je,{fontSize:"small"})})})})}),o?.templateProps?.gridStateKey?i(g,{title:a("RESET_GRID_STATE"),children:i(N,{onClick:o?.clearGridState,children:i(se,{icon:"eraser"})})}):i(t,{}),i(v,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),i(g,{title:a("EXPORT_EXECL_LABEL"),children:i($e,{render:i(w,{}),children:i(se,{icon:"file-excel",color:"green"})})}),e(Ga,{children:[i(Xe,{render:(e,t)=>i(g,{title:a("SEARCH_BTN_LABEL"),enterDelay:0,children:i(Ya,{...e,ownerState:{expanded:t.expanded},color:"default","aria-disabled":t.expanded,children:i(se,{icon:"search"})})})}),i(Je,{render:({ref:e,...t},o)=>i(Va,{...t,ownerState:{expanded:o.expanded},inputRef:e,"aria-label":"Search",placeholder:`${a("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:i(x,{position:"start",children:i(se,{icon:"search"})}),endAdornment:o.value?i(x,{position:"end",children:i(ei,{edge:"end",size:"small","aria-label":"Clear search",children:i(se,{icon:"xmark"})})}):null,...t.slotProps?.input},...t.slotProps}})})]}),i(N,{onClick:()=>{o.templateProps.apiActions.reloadData(o?.templateProps?.gridLoadParametersValues)},children:i(se,{icon:"refresh"})})]})},Ka=o=>{const{t:a}=Ne(),r=Zi(),{ConfirmationWindow:d,setOpen:n}=Qi({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(t,{children:[i(d,{}),i(ii,{disabled:c,icon:i(g,{title:o?.label?a(o.label):"",children:i(se,{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 za=-1;const Ha=e=>{try{const i=localStorage.getItem(e);return i?JSON.parse(i):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Qa=(e,i)=>{const t=Ha(e);localStorage.setItem(e,JSON.stringify({...t,...i}))},Za=["__check__","actions"],ja=o=>{const{t:r}=Ne(),d=a((e=>e.AppLayout)),[n,l]=J({}),[s,p]=J(!0),{getLookupOptions:c}=(()=>{const{handleGetRequest:e}=Hi(),i=a((e=>e.AppLayout)),t=async i=>{let t=[];return await e({endPointURI:"api/v1/public/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}})(),{Window:m,setWindowState:u}=ji({windowTitle:r(o.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),{Window:T,setWindowState:A}=ji({windowTitle:r(o.gridTitle)+" Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"80%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),[_,I]=J([]),E=Nt(o.formElements),y=[],h=X.useMemo((()=>o?.gridStateKey?Ha(o.gridStateKey):{}),[]);for(const e of E)!0===e?.gridProps?.hidden&&y.push(e.fieldName);let R={};if(h?.columnVisibilityModel){R=h.columnVisibilityModel;const e=Object.keys(R);for(const i of y)e.includes(i)||(R[i]=!1)}else for(const e of y)R[e]=!1;const L=a((e=>e.AppLayout.appDirection)),[C,D]=X.useState(R),[M,P]=X.useState(h.columnOrder||[]),[b,S]=X.useState(h.columnWidths||{}),[U,w]=J(h.columnGroupingModel||[]);let x=h?.pinnedColumns?.left||[];x=x.filter((e=>!Za.includes(e)));let W=h?.pinnedColumns?.right||[]||[];W=W.filter((e=>!Za.includes(e)));const[G,Y]=J({left:[..."ltr"===L?Za:[],...x],right:[..."rtl"===L?Za:[],...W]}),V=Zi(),q=_e(),[K,z]=J(null),[H,Q]=J(null),[Z,j]=J({}),$=async()=>{let e=yt(E,"row"===o?.editMode?.editMode||!1,r);for(let i of e)i?.lookupType&&(i.displayField="ltr"===d.appDirection?"lookupEnDisplay":"lookupArDisplay",i.options=await c(i.lookupType),i.valueField="lookupValue");I(e)},[ie,te]=J({ids:new Set,type:"include"});let oe="id";o?.keyColumnName&&(oe=o?.keyColumnName);const ae=o.setData,re=Fe.object(ht(E));let de=!0;o?.editAction?.authority&&(de=V.isUserAuthorized(o.editAction.authority));let ne=!0;o?.deleteAction?.authority&&(ne=V.isUserAuthorized(o.deleteAction.authority));const{ConfirmationWindow:le,setOpen:pe}=Qi({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),ae((e=>e.filter((e=>e[oe]!=K[oe])))))}});let ce,ue,Te,Ae,fe,Ie;"modal"===o?.editMode?.editMode&&(ce=o?.editMode?.specs?.modalHeight||"fit-content",ue=o?.editMode?.specs?.modalWidth||"300",Te=o?.editMode?.specs?.modalMinHeight,Ae=o?.editMode?.specs?.modalMinWidth,fe=o?.editMode?.specs?.modalIcon||"window",Ie=o?.editMode?.specs?.modalTitle||"Record Form");const{Window:Ee,setWindowState:Oe}=ji({height:ce,minHeight:Te,minWidth:Ae,onCloseCallBack:()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},width:ue,windowIcon:fe,windowTitle:Ie}),ye={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 t=e.row,a=[];if("none"!=o?.editMode?.editMode&&(void 0===o?.disableDefaultAction||!o.disableDefaultAction)){const e=Z[t[oe]]?.mode===ai.Edit;if("row"===o.editMode.editMode&&e)de&&(a.push(i(ii,{icon:i(se,{icon:"save"}),label:r("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const i=e[oe];j({...Z,[i]:{mode:ai.View}})})(t)}})),a.push(i(ii,{icon:i(se,{icon:"cancel"}),label:r("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const i=e[oe];i&&Ma(i)&&i<0?(j({...Z,[i]:{mode:ai.View,ignoreModifications:!0}}),ae((e=>{const t=e.filter((e=>e[oe]!=i));return t}))):j({...Z,[i]:{mode:ai.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 d=!1;o?.editAction?.isActionDisabledForRecord&&(d=o?.editAction?.isActionDisabledForRecord(t)),de&&e&&a.push(i(ii,{disabled:d,icon:i(g,{title:r("EDIT_BTN_LABEL"),children:i(se,{icon:"edit",style:{color:d?"gray":void 0}})}),showInMenu:o?.editAction?.gridActionProps?.showInMenu||!1,label:r("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{de&&!d&&(async e=>{if(e)if(Q(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 i=e[oe];j({...Z,[i]:{mode:ai.Edit}})}})(t)}}))}if(o?.deleteAction&&!0===o?.deleteAction?.isEnabled){let e=!0;o?.deleteAction?.isActionVisibleForRecord&&(e=o?.deleteAction?.isActionVisibleForRecord(t));let d=!1;o?.deleteAction?.isActionDisabledForRecord&&(d=o?.deleteAction?.isActionDisabledForRecord(t)),ne&&e&&a.push(i(ii,{disabled:d,icon:i(g,{title:r("DELETE_BTN_LABEL"),children:i(se,{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(ne&&!d){if(o?.deleteAction?.preActionValidation&&!o.deleteAction.preActionValidation(t))return;z(t),pe(!0)}}}))}}}if(t[o?.keyColumnName||"id"]&&t[o?.keyColumnName||"id"]>0&&o?.attachment&&a?.push(i(ii,{icon:i(g,{title:"Attachments",children:i(se,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{l(t),p(!o?.attachment?.enableAttachFn||o.attachment.enableAttachFn(t)),u(!0)}})),t[o?.keyColumnName||"id"]&&t[o?.keyColumnName||"id"]>0&&o?.workFlowDocumentCode&&a?.push(i(ii,{icon:i(g,{title:"Approvals",children:i(se,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{l(t),A(!0)}})),t[o?.keyColumnName||"id"]&&t[o?.keyColumnName||"id"]>0&&o?.rowActions)for(const e of o.rowActions)e?.gridActionProps?.multiRecord&&!0===e?.gridActionProps?.multiRecord||a.push(i(Ka,{...e,record:t,reloadData:async()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)}}));return a}};let he=[];(void 0===o?.disableDefaultAction||!o.disableDefaultAction||o?.rowActions&&o?.rowActions.length>0)&&he.push(ye),he=[...he,..._];ee((()=>{void 0!==o?.autoLoad&&!0!==o.autoLoad||o.apiActions.reloadData(o?.gridLoadParametersValues),$()}),[]),ee((()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)}),[V.UserInfo?.currentOrganization]),ee((()=>{$()}),[L,o.formElements]);const Re=X.useMemo((()=>{const e=he.map((e=>({...e,width:b[e.field]||e.width})));if(M.length){const i=new Map(e.map((e=>[e.field,e])));return M.map((e=>i.get(e))).filter(Boolean)}return e}),[M,b,he]);return e(t,{children:[i(le,{}),"modal"===o?.editMode?.editMode?i(Ee,{children:o?.editMode?.specs?.formComponent?i(o.editMode.specs.formComponent,{recordIdToEdit:H?H[oe]:void 0,formCloseCallBk:()=>{Oe(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)}}):i(ir,{keyColumnName:o.keyColumnName,attachment:o.attachment,formLoadCallBk:o.formLoadCallBk,recordIdToEdit:H?H[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})}):i(t,{}),void 0!==o?.hideInfoBar||o?.hideInfoBar?i(t,{}):e(f,{sx:{display:"flex"},children:[void 0!==o?.hideBackButton||o?.hideBackButton?i(t,{}):i(N,{onClick:()=>{q(-1,{replace:!0})},children:i(se,{icon:"arrow-left"})}),e(f,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[o?.girdIcon?i(se,{icon:o.girdIcon,style:{marginRight:5,marginLeft:5}}):i(t,{}),i(O,{variant:"h5",children:o?.gridTitle?ba(r(o?.gridTitle)):""})]})]}),o?.gridLoadParameters&&o?.gridLoadParameters.length>0&&o?.gridLoadParametersValues&&o?.setGridLoadParametersValues?e(F,{defaultExpanded:!0,sx:{width:"100%"},children:[i(B,{expandIcon:i(ti,{}),children:e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[i(se,{style:{marginLeft:5,marginRight:5},icon:"search"}),i(O,{component:"span",children:"Filters"})]})}),i(k,{children:i(f,{children:i(ir,{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})})})]}):i(t,{}),o?.attachment?i(m,{children:i(Ba,{attachmentCode:o.attachment.attachmentCode,refKey:n[o?.keyColumnName||"id"],enableAttachment:s})}):i(t,{}),o?.workFlowDocumentCode?i(T,{children:i(er,{workFlowDocumentCode:o.workFlowDocumentCode,refDocumentId:n[o?.keyColumnName||"id"],postActionCallBk:()=>{A(!1),o.apiActions.reloadData(o.gridLoadParametersValues)},cancelActionCallBk:()=>{A(!1),o.apiActions.reloadData(o.gridLoadParametersValues)}})}):i(t,{}),i(oi,{...o?.muiProps,slots:{toolbar:qa},slotProps:{toolbar:{templateProps:{...o,rowSelectionModel:ie,data:o?.data},handleCreateNewRecord:()=>{if("form"===o?.editMode?.editMode)q(o.editMode.specs.formRoute);else if("modal"===o?.editMode?.editMode)Q(null),Oe(!0);else if("row"===o?.editMode?.editMode){za-=1;const e={};e[oe]=za,e.isNew=!0;for(const i of _)"actions"!=i?.type&&i?.field!=oe&&i?.field&&(e[i.field]=null);ae((i=>[e,...i])),j((e=>({...e,[za]:{mode:ai.Edit}})))}},clearGridState:()=>{o?.gridStateKey&&localStorage.removeItem(o.gridStateKey),D({}),P([]),S({}),w([]),Y({left:[..."ltr"===L?Za:[]],right:[..."rtl"===L?Za:[]]})}}},getRowId:e=>e[oe],showToolbar:!0,rows:o?.data,columns:Re,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,i)=>{"rowFocusOut"===e.reason&&(i.defaultMuiPrevented=!0)},rowModesModel:"row"==o.editMode.editMode?Z: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{re.parse(e)}catch(e){console.log("validateRecord err",e);let i=null;return i=e instanceof Fe.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 me.error(i("div",{style:{},children:o.map((o=>e(t,{children:[i("div",{children:o}),i(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]&&Ma(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&&ae((e=>{const i=e.filter((e=>e[oe]!==a[oe]));return[r,...i]})),!0===o?.editMode?.reloadAfterSave&&o?.apiActions?.reloadData&&o?.apiActions?.reloadData(o?.gridLoadParametersValues),r}},rowSelectionModel:ie,onRowSelectionModelChange:e=>{te(e)},columnVisibilityModel:C,onColumnVisibilityModelChange:e=>{D(e),o?.gridStateKey&&Qa(o.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:i,targetIndex:t}=e;P((e=>{const a=e.length?[...e]:he.map((e=>e.field)),r=a.indexOf(i.field);return-1===r||(a.splice(r,1),a.splice(t,0,i.field),o?.gridStateKey&&Qa(o.gridStateKey,{columnOrder:a})),a}))},onColumnWidthChange:e=>{const i={...b,[e.colDef.field]:e.width};S(i),o?.gridStateKey&&Qa(o.gridStateKey,{columnWidths:i})},rowGroupingModel:U,onRowGroupingModelChange:e=>{(e=>{w(e),o?.gridStateKey&&Qa(o.gridStateKey,{columnGroupingModel:e})})(e)},sx:{width:"100%"}})]})},$a=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 i},Xa=e=>{const[t,o]=J([]);return ee((()=>{const i=e.reportData.map(((e,i)=>({...e,report_record_data_key:i})));o(i)}),[e.reportData]),i(ja,{data:t,disableDefaultAction:!0,setData:e.setReportData,formElements:$a(e.reportData),gridLoadParameters:e.gridLoadParameters,gridLoadParametersValues:e.gridLoadParametersValues,setGridLoadParametersValues:e.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,keyColumnName:"report_record_data_key",hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{e.reloadReport()},saveRecord:async()=>{}}})},Ja=o=>{const[a,r]=J(null),[d,n]=J(null),[l,s]=J([]),[p,c]=J("WAITING_REPORT_CODE"),{handleGetRequest:m,handlePostRequest:u,HandleDownloadHTTPPostPDF:T}=Hi(),[A,_]=J(null),[I,E]=J({...o?.reportParametersValues}),[y,h]=J([]),{t:R}=Ne(),L=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:I[t?.parameterCode]||t?.defaultValue}};i.push(e)}return i},C=async(e,i)=>{c("WAITING_RESULT"),"Excel"===e?.reportType?await u({endPointURI:"api/v1/public/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 T({endPointURI:"api/v1/public/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)}},failureCallBkFn:e=>{n("Failed To run report ... contact your administrator"),c("ERROR")}})};return ee((()=>{o?.reportCode&&(async()=>{c("LOADING_METADATA"),await m({endPointURI:"api/v1/public/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,I),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(t,{children:[e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[e(f,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[i(se,{icon:"Excel"===A?.reportType?"file-excel":"file-pdf",color:"Excel"===A?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),A?.reportName]}),"Excel"!=A?.reportType&&"SHOWING_RESULT"===p?e(t,{children:[!0===o?.byPassParameterEntry?i(t,{}):y.length>0?i(N,{onClick:()=>{h(L(A.reportParameters)),c("WAITING_PARAMETER_INPUT")},children:i(se,{icon:"filter"})}):i(t,{}),i(N,{children:i(se,{icon:"refresh",onClick:()=>{C(A,I)}})})]}):i(t,{})]}),i(f,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===p&&"Excel"!=A?.reportType?e(F,{defaultExpanded:!0,sx:{width:"100%"},expanded:!0,children:[i(B,{children:e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[i(se,{style:{marginLeft:5,marginRight:5},icon:"search"}),i(O,{component:"span",children:"Filters"})]})}),i(k,{children:i(f,{children:i(ir,{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=>{E(null!=e?e:{}),C(A,e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:y})})})]}):"SHOWING_RESULT"===p||("WAITING_PARAMETER_INPUT"===p||"WAITING_RESULT"===p)&&"Excel"===A?.reportType?"Excel"===A?.reportType?i(Xa,{reportData:l,setReportData:s,reloadReport:async()=>{C(A,I)},gridLoadParameters:y,gridLoadParametersValues:I,setGridLoadParametersValues:E}):i("iframe",{src:a,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===p?e(f,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[i(se,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),d]}):i(t,{})})]})},er=o=>{const r=_e(),d=a((e=>e.AppLayout)),{isUserAuthorized:n,UserInfo:l}=Zi(),{handleGetRequest:s,handlePostRequest:p}=Hi(),[c,m]=J(null),[u,T]=J([]),{t:_}=Ne(),[I,E]=J(null),[O,h]=J({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:R,setWindowState:L}=ji({windowTitle:"ltr"===d.appDirection?O?.workflowDocument&&O?.referencedDocument?`${O?.workflowDocument?.documentEnName} # ${O?.referencedDocument[O?.workflowDocument?.documentNumberField]}`:"Document":O?.workflowDocument&&O?.referencedDocument?`${O?.workflowDocument?.documentArName} # ${O?.referencedDocument[O?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),C=async()=>{await s({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:o.workFlowDocumentCode,refDocumentId:o.refDocumentId},successCallBkFn:e=>{h(e.data)},failureCallBkFn:()=>{h({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},D=async()=>{await p({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:O?.workflowDocument?.id,refDocumentId:o.refDocumentId,actionId:c.id,refDocumentStatus:O?.workflowDocumentStatus?.documentStatusCode,actionComment:I},successCallBkFn:async e=>{c?.post_action_endpoint?await p({endPointURI:c.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:o.refDocumentId,actionId:c.id},successCallBkFn:()=>{C(),o?.postActionCallBk&&o.postActionCallBk()}}):C()}})};return ee((()=>{o.refDocumentId&&o.workFlowDocumentCode&&C()}),[o.refDocumentId,o.workFlowDocumentCode]),ee((()=>{T(O?.nextActions&&O?.nextActions?.length>0?O.nextActions.filter((e=>{if(!O?.workflowDocumentStatus?.nextActionTakersAuthority&&!O?.nextActionTakers)return!0;if(O?.workflowDocumentStatus?.nextActionTakersAuthority&&n(O.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(O?.nextActionTakers)for(const e of O.nextActionTakers)if(l?.username===e?.username||l?.username===e?.USERNAME)return!0;return!1})):[])}),[O.nextActions,O.nextActionTakers]),e(t,{children:[O?.workflowDocumentReport?.id?i(R,{children:i(Ja,{reportCode:O?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:o.refDocumentId+""}})}):i(t,{}),O?.workflowDocument?e(f,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[i(N,{onClick:()=>{r(-1,{replace:!0})},children:i(se,{icon:"arrow-left"})}),i(f,{sx:{flex:1}}),i(se,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===d.appDirection?`${O?.workflowDocument?.documentEnName} # ${O?.referencedDocument[O?.workflowDocument?.documentNumberField]}`:`${O?.workflowDocument?.documentArName} # ${O?.referencedDocument[O?.workflowDocument?.documentNumberField]}`,O?.workflowDocumentStatus?"ltr"===d.appDirection?` ( ${O?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${O?.workflowDocumentStatus?.documentStatusArName} )`:"",i(f,{sx:{flex:1}}),O?.workflowDocumentReport?.id?i(A,{onClick:()=>{L(!0)},variant:"outlined",startIcon:i(se,{icon:"eye"}),children:_("VIEW_LABEL")}):i(t,{})]}):i(t,{}),e(f,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[u?.length>0?e(y,{sx:{padding:2,display:"flex",flex:1,margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[i(nt,{sx:{marginBottom:2,width:400},label:_("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===d.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:c?.id,options:u,onChangeCallBack:(e,i)=>{m(i)}}),i(tt,{sx:{width:400},rows:3,value:I,onChange:e=>{E(e.target.value)},multiline:!0,label:_("WF_COMMENT_LABEL")}),e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[i(A,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=c&&null!=c?.id?!0!==c.require_comment&&1!==c.require_comment&&"true"!==c.require_comment||null!==I&&""!==I?c?.pre_action_endpoint?await p({endPointURI:c.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:o.refDocumentId,actionId:c.id},successCallBkFn:()=>{D()}}):D():me.error("You must enter comment for the action to be processed"):me.error("You must select action to process")},children:_("WF_TAKE_ACTION_BTN_LABEL")}),o?.cancelActionCallBk?i(A,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{o?.cancelActionCallBk&&o.cancelActionCallBk()},children:_("WF_CANCEL_BTN_LABEL")}):i(t,{})]}),O?.nextActionTakers&&O.nextActionTakers.length>0?e(t,{children:[i(v,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:e(f,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[i(se,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",_("WF_WAITING_FOR_LABEL")]})}),i(f,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:O.nextActionTakers.map((o=>e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[i(xa,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:o?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),e(f,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[i("div",{children:"ltr"===d.appDirection?o?.employee_en_name:o?.employee_ar_name}),i("div",{children:o?.email?e(t,{children:[i(se,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),o?.email]}):i(t,{})}),i("div",{children:o?.mobile_number?e(t,{children:[i(se,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),o?.mobile_number]}):i(t,{})})]})]})))})]}):i(t,{})]}):i(t,{}),O?.actionsHistory.length>0?i(ka,{actionHistory:O.actionsHistory}):e(y,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[e(f,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[i(se,{icon:"history",style:{marginRight:10,marginLeft:10}}),_("WF_ACTION_HISTORY_LABEL")]}),i(f,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},ir=o=>{const{Window:a,setWindowState:r}=ji({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:d,setWindowState:n}=ji({windowTitle:"Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[l,s]=J(!0),{t:p}=Ne(),c=Nt(o.elements),m=[];for(const e of c)e?.hidden&&m.push(e.fieldName);const[u,T]=J(m),_={};for(const e of o.elements)"field"===e?.type&&"props"===e?.mode&&e?.props?.defaultValue&&(_[e.props.fieldName]=e.props.defaultValue);const[f,I]=J([]),E=xe.object(ht(c)),O=Be({resolver:ke(E),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 i=await o.apiActions.loadRecordById(e);if(i){O.reset({...i}),o?.formLoadCallBk&&o?.formLoadCallBk(D,O,i);for(const e of c)"combobox"===e?.fieldType&&i[e.fieldName]&&O.setValue(e.fieldName,i[e.fieldName]+"")}}else O.reset({})},D={setFieldValue:(e,i)=>{O.setValue(e,i)},hideField:e=>{T((i=>[...i,e]))},showField:e=>{T((i=>i.filter((i=>i!==e))))},disableField:e=>{I((i=>[...i,e]))},enableField:e=>{I((i=>i.filter((i=>i!==e))))}};return ee((()=>{C()}),[o?.recordIdToEdit]),ee((()=>{s(!o?.attachment||!o?.attachment?.enableAttachFn||o.attachment.enableAttachFn(y))}),[y]),e(t,{children:[o?.attachment?i(a,{children:i(Ba,{attachmentCode:o.attachment.attachmentCode,refKey:y[o?.keyColumnName||"id"],enableAttachment:l})}):i(t,{}),o?.workFlowDocumentCode?i(d,{children:i(er,{workFlowDocumentCode:o.workFlowDocumentCode,refDocumentId:y[o?.keyColumnName||"id"],postActionCallBk:()=>{n(!1),C()},cancelActionCallBk:()=>{n(!1)}})}):i(t,{}),i(Ca,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:i(R,{sx:{width:"100%"},container:!0,children:o.elements.map(((e,t)=>"group"===e.type?i(wa,{...e.props,formManager:O,formValues:y,formActions:D,hiddenFields:u,disabledFields:f},t):"field"===e.type&&"props"===e.mode?i(Ua,{fieldInfo:e.props,formManager:O,formValues:y,formActions:D,hiddenFields:u,disabledFields:f},t):"field"===e.type&&"node"===e.mode?i(R,{size:e?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:i(e.node,{formManager:O,formValues:y})},t):void 0))})}),e(Ca,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[y[o?.keyColumnName||"id"]&&o?.attachment?i(g,{title:"Attachments",children:i(N,{onClick:()=>{r(!0)},children:i(se,{icon:"paperclip"})})}):null,y[o?.keyColumnName||"id"]&&o?.workFlowDocumentCode?i(g,{title:"Approvals",children:i(N,{onClick:()=>{n(!0)},children:i(se,{icon:"stamp"})})}):null,o?.actions&&y[o?.keyColumnName||"id"]?o.actions.map((e=>!0===e?.formActionProps?.enabled?i(va,{...e,record:y}):i(t,{}))):i(t,{}),i("div",{style:{flex:1}}),i(A,{variant:o?.saveButtonSpecs?.actionButtonVariant?o.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:o?.saveButtonSpecs?.icon?i(se,{icon:o.saveButtonSpecs.icon}):null,color:o?.saveButtonSpecs?.actionButtonColor?o.saveButtonSpecs.actionButtonColor:"primary",onClick:O.handleSubmit((e=>{(async e=>{if((!o?.preSaveValidation||o.preSaveValidation(e))&&e){const i=await o.apiActions.saveRecord(e);i&&(O.reset({...i}),o?.formSavedSuccessfullyCallBk&&o.formSavedSuccessfullyCallBk(i),o?.formCloseCallBk&&o.formCloseCallBk())}})(e)}),(e=>{me.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")}),i(A,{variant:o?.cancelButtonSpecs?.actionButtonVariant?o.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:o?.cancelButtonSpecs?.icon?i(se,{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")})]})]})},tr=()=>{const{workflowDocumentCode:e,refDocumentId:t}=fe();return i(er,{workFlowDocumentCode:e,refDocumentId:t})},or=e=>i(ri,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map((e=>({dataKey:e,label:e})))}),ar=t=>e(y,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[i(f,{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]})]}),rr=o=>e(t,{children:[i(O,{sx:{fontSize:16,fontWeight:"bold"},children:o.record[o.labelField]}),i(di,{width:200,height:200,value:o.record[o.valueField],valueMax:o.total})]}),dr=e=>i(ni,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map((e=>({dataKey:e,label:e})))});function nr(t){return e(si,{sx:{display:"flex",alignItems:"center"},children:[i(si,{sx:{width:"100%",mr:1},children:i(li,{variant:"determinate",...t})}),i(si,{sx:{minWidth:35},children:i(Ve,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(t.value)}%`})})]})}const lr=t=>e(si,{sx:{width:"100%"},children:[i(Ve,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]}),i(nr,{value:t.record[t.valueField]/t.total*100})]}),sr=e=>{const t=e.data.map(((i,t)=>({id:t,value:i[e.valueField],label:i[e.labelField]+""})));return i(pi,{series:[{data:t}]})},pr=o=>{const[a,r]=J(!0),[d,n]=J([]),{handleGetRequest:l}=Hi();ee((()=>{(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(t,{children:["LineChart"===o.widgetType||"PieChart"===o.widgetType||"ColumnChart"===o.widgetType?e(f,{children:[i(se,{style:{marginRight:10,marginLeft:10},icon:o?.icon||"chart-pie"}),o?.title]}):i(t,{}),i(f,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:a?e(t,{children:[i(se,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),i("div",{children:"Loading"})]}):"ColumnChart"===o.widgetType?i(or,{data:d,widgetTitle:o.title,labelField:o.verticalAxisField,valueField:o.horizontalAxisField,valueLabel:o.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===o.widgetType?i(dr,{data:d,widgetTitle:o.title,labelField:o.verticalAxisField,valueField:o.horizontalAxisField,valueLabel:o.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===o.widgetType?i(sr,{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:[i(R,{size:{xs:12},sx:{textAlign:"center"},children:o.title}),d.map(((e,t)=>"Card"===o.widgetType?i(R,{size:{md:3,xs:12},children:i(ar,{widgetTitle:"",record:e,labelField:o.verticalAxisField,valueField:o.horizontalAxisField},t)}):"CircularProgress"===o.widgetType?i(R,{size:{md:3,xs:12},children:i(rr,{widgetTitle:"",record:e,labelField:o.horizontalAxisField,valueField:o.verticalAxisField,total:s},t)}):"LinearProgress"===o.widgetType?i(R,{size:{md:3,xs:12},children:i(lr,{widgetTitle:"",record:e,labelField:o.horizontalAxisField,valueField:o.verticalAxisField,total:s},t)}):void 0))]})})]})},cr=o=>{const[a,r]=J({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),[d,n]=J(o?.parameters||{}),l=_e(),{handleGetRequest:s,handlePostRequest:p}=Hi();return ee((()=>{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(f,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[i(N,{onClick:()=>{l(-1,{replace:!0})},children:i(se,{icon:"arrow-left"})}),i(f,{sx:{flex:1}}),i(se,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),i(f,{children:a?.dashboardTitle}),i(f,{sx:{flex:1}})]}),i(R,{container:!0,spacing:1,sx:{flexGrow:1,overflowY:"auto",padding:1},children:a?.widgets.map(((e,t)=>i(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:i(pr,{...e})},t)))})]}):i(f,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},mr=()=>{const{dashboardCode:e}=fe();return i(cr,{dashboardCode:e})},ur=t=>{const{UserSession:r}=Zi(),d=a((e=>e.AppLayout)),n=o(),{handlePostRequest:l}=Hi(),[s,p]=J(r.value.currentOrganization.id);return e(f,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[i(nt,{sx:{width:"100%"},displayField:"ltr"===d.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:r.value.userOrganizations,value:s,onChangeCallBack:e=>{p(e)}}),i(A,{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 i={...e.data,isAuthenticated:!0};n(Ki.setAuthenticated(i)),t.successChangeCallBackFn&&t.successChangeCallBackFn()}})},children:"Change Organization"})]})},Tr=pe({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,i)=>{e.isOpened=i.payload}}}),{toggleSideBarState:Ar,setSideBarState:_r}=Tr.actions;var fr=Tr.reducer;function Ir(e,i){const t=te(e);ee((()=>{t.current=e}),[e]),ee((()=>{const e=setInterval((()=>t.current?.()),i);return()=>clearInterval(e)}),[i])}const Er=W`
32
32
  0% { transform: scale(1); opacity: 1; }
33
33
  25% { transform: scale(1); opacity: 0.6; }
34
34
  50% { transform: scale(1); opacity: 1; }
35
35
  75% { transform: scale(1); opacity: 0.6; }
36
36
  100% { transform: scale(1); opacity: 1; }
37
- `,Or=e=>{const t=o(),a=i((e=>e.AppLayout)),{handlePostRequest:r}=Hi();return l(p,{children:[l(O,{fullWidth:!0,onClick:()=>{var i;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&t(e.notificationActionPayload),e?.isNotified||(i=e.id,r({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:i}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[l(y,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?s(Te,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):s(p,{}),"ltr"===a.appDirection?e.notificationEnText:e.notificationArText,s(y,{sx:{flex:1}}),e?.isNotified?s(p,{}):l(L,{color:"warning",sx:{animation:`${Er} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[s(Te,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===a.appDirection?"New":"جديد"]})]}),l(y,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[s(y,{sx:{marginRight:1,marginLeft:1},children:Sa(e.createTime,a.appDirection)}),s(y,{sx:{flex:1}}),s(y,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?s(k,{flexItem:!0}):s(p,{})]})},Nr=()=>{const{UserInfo:e}=Zi(),[t,a]=ae(null),{handleGetRequest:r,handlePostRequest:d}=Hi(),n=o(),c=i((e=>e.AppLayout)),[m,u]=ae(!1),[T,A]=ae([]);Ir((()=>{!0===e.isAuthenticated&&r({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>T.length&&fe.info("ltr"===c.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===c.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),A(e.data)}})}),1e3);return s(z,{onClickAway:()=>{u(!1)},children:l("div",{style:{cursor:"pointer"},children:[s(C,{color:"inherit",onClick:e=>{a(e.currentTarget),u(!m)},sx:{marginRight:1,marginLeft:1},children:s(B,{anchorOrigin:{vertical:"top",horizontal:"ltr"===c.appDirection?"right":"left"},badgeContent:T.filter((e=>void 0===e.isNotified||null===e.isNotified)).length,color:"error",children:s(Te,{icon:"bell"})})}),s(v,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:m,anchorEl:t,dir:c.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>s(H,{...e,timeout:350,children:l(D,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[s(k,{variant:"fullWidth",flexItem:!0,children:l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[s(Te,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===c.appDirection?"Notifications":"الاشعارات"]})}),0==T.length?s(y,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:s(y,{children:"ltr"===c.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):s(p,{}),s(y,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:T.map(((e,i)=>s(Or,{...e,setOpen:u,showDivider:i<T.length-1})))}),s(k,{variant:"fullWidth",flexItem:!0,children:s(O,{sx:{textTransform:"none"},onClick:()=>{n("myNotifications")},children:"ltr"===c.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},yr=e=>{const[i,t]=ae(""),[o,a]=ae(""),[r,d]=ae(""),{handlePostRequest:n}=Hi();return l(D,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[l(y,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),s(k,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?s(tt,{label:"Current Password",value:i,onChange:e=>{t(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):s(p,{}),s(tt,{label:"New Password",value:o,onChange:e=>{a(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),s(tt,{label:"Confirm New Password",value:r,onChange:e=>{d(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),s(O,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==i&&""!==i.trim()?null!==o&&""!==o&&null!==r&&""!==r&&o==r?await n({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:i,newPassword:o},successCallBkFn:()=>{e.onSuccessCallBk(),fe.success("Your request has been processed successfully")},showMask:!0}):fe.error("You must enter new password in required fields and must be identical"):fe.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},hr=F(me,{shouldForwardProp:e=>"open"!==e})((({theme:e})=>{const t=i((e=>e.AppLayout)),o=vi();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:o?void 0:"calc(100% - 350px)",marginLeft:o||"ltr"!==t.appDirection?void 0:"350px",marginRight:o||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}})),Rr=()=>{const{Window:t,setWindowState:o}=ji({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),a=i((e=>e.AppInfo.value)),[r,d]=ae(null),n=()=>{d(null)},c=e=>{d(e.currentTarget)},m=i((e=>e.AppLayout)),u=i((e=>e.SideBar)),{UserSession:T}=Zi(),A=T.value.currentOrganization,{Window:_,setWindowState:f}=ji({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:I}=Hi(),E=vi(),O=e();return l(p,{children:[s(_,{children:s(yr,{selectedPerson:T.value,isSelfService:!0,onSuccessCallBk:()=>{f(!1)}})}),s(Q,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:r,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(r),onClose:n,children:s(W,{onClick:()=>{f(!0),n()},children:s(L,{sx:{textAlign:"center"},children:"Change Password"})})}),s(t,{children:s(ur,{successChangeCallBackFn:()=>{o(!1)}})}),s(hr,{position:"fixed",open:u.isOpened,children:l(ue,{children:[s(C,{color:"inherit","aria-label":"open drawer",onClick:()=>{O(Ar())},edge:"start",sx:[{mr:"ltr"===m.appDirection?2:void 0,ml:"rtl"===m.appDirection?2:void 0},u.isOpened&&{display:"none"}],children:s(Te,{icon:"bars"})}),s(xa,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:T.value.currentOrganization.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),s(L,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:E?"":`${a.appName} - ${"ltr"===m.appDirection?A?.organizationEnName:A?.organizationArName}`}),s(x,{title:"light"===m.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:s(C,{color:"inherit",onClick:()=>{O(Fi.setThemeMode("light"===m.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===m.themeMode?"dark":"light")},children:"light"===m.themeMode?s(Te,{icon:"moon"}):s(Te,{icon:{prefix:"far",iconName:"sun"}})})}),s(x,{title:"ar"===Oe.language?"Change Language To English":"Change Language To Arabic",children:s(C,{color:"inherit",onClick:()=>{let e="ar"===Oe.language?"en":"ar";var i;i=e,Oe.changeLanguage(i),localStorage.setItem("language",i),O(Fi.setAppDirection("ar"===e?"rtl":"ltr"))},children:s(Te,{icon:"language"})})}),T.value?.userOrganizations&&T.value?.userOrganizations.length>1?s(x,{title:"Change Current Organization",children:s(C,{color:"inherit",onClick:()=>{o(!0)},children:s(Te,{icon:"globe"})})}):s(p,{}),s(!0===a?.enableUINotifications?Nr:p,{}),s("div",{onClick:c,style:{cursor:"pointer"},children:s(xa,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:T.value?.id+""})}),s("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:c,children:E?"":T.value?.username}),s(C,{color:"inherit",onClick:async()=>{try{await I({endPointURI:"api/auth/logout"})}catch(e){}O(Ki.setUnAuthenticated())},children:s(Te,{rotation:"rtl"===m.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},Lr=F("div")((({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"}))),Cr=(e,i)=>{for(const t of i){if(t.id===e)return t;if(t.children){const i=Cr(e,t.children);if(i)return i}}},Dr=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"system_admin.Person",label:"PERSON_PLURAL",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"development_admin.organizations",label:"ORGANIZATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{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.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 Mr(){return s(si,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const Pr=le(Ei)((({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${fi.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})}))),br=le(Oi)((({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:se(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})}}))),gr=ui(Ai);function Sr(e){const i=Ti({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return s(gr,{style:i,...e})}const Ur=le(Ve)({color:"inherit",fontWeight:500});function vr({icon:e,expandable:t,children:o,...a}){const{t:r}=Ne(),d=i((e=>e.AppLayout));return l(hi,{...a,sx:{display:"flex",alignItems:"center",padding:1},children:[s(Te,{style:{marginRight:"ltr"===d.appDirection?7:void 0,marginLeft:"rtl"===d.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),s(Ur,{variant:"body2",sx:{fontSize:16},children:r(o)}),t&&s(Mr,{})]})}const wr=e=>Array.isArray(e)?e.length>0&&e.some(wr):Boolean(e),xr=te.forwardRef((function(e,i){const{id:t,itemId:o,label:a,disabled:r,children:d,...n}=e,{getRootProps:p,getContentProps:c,getIconContainerProps:m,getCheckboxProps:u,getLabelProps:T,getGroupTransitionProps:A,getDragAndDropOverlayProps:_,status:f,publicAPI:I}=Ii({id:t,itemId:o,children:d,label:a,disabled:r,rootRef:i}),E=I.getItem(o),O=wr(d);return s(Li,{itemId:o,children:l(Pr,{...p(n),children:[l(br,{...c({className:Ra("content",{"Mui-expanded":f.expanded,"Mui-selected":f.selected,"Mui-focused":f.focused,"Mui-disabled":f.disabled})}),children:[s(Ni,{...m(),children:s(Ri,{status:f})}),s(yi,{...u()}),s(vr,{...T({icon:E?.icon||"book",expandable:O&&f.expanded})}),s(Ci,{..._()})]}),d&&s(Sr,{...A()})]})})}));function Fr(){const t=o(),a=i((e=>e.AppLayout)),r=i((e=>e.AppInfo.value));e();const d=vi(),{isUserAuthorized:n,isCurrentOrganizationAuthorizedToModule:l}=Zi(),p=e=>{const i=[];for(let t of e)if((void 0===t.authority||null==t.authority||n(t.authority))&&(void 0===t.applicationModule||null===t.applicationModule||l(t.applicationModule))){let e=structuredClone(t);t?.children&&(e.children=p(t.children)),i.push(e)}return i},c=[];r.enableAdministrationModule&&c.push(...structuredClone(Dr)),c.push(...structuredClone(r.businessNavigationItems));const m=p(c);return s(_i,{items:m,onItemClick:(e,i)=>{const o=Cr(i,c);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||t(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:wi,direction:a.appDirection,maxHeight:d?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:xr}})}const Br=()=>{const t=i((e=>e.AppInfo.value)),{UserSession:o}=Zi(),a=o.value.currentOrganization,r=Z(),d=i((e=>e.AppLayout)),n=i((e=>e.SideBar)),p=e();return l(mi,{sx:{width:wi,flexShrink:0,"& .MuiDrawer-paper":{width:wi,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===d.appDirection?"left":"right",open:n.isOpened,children:[l(Lr,{children:[l(y,{sx:{width:"100%"},children:[s(L,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[s(L,{sx:{fontSize:12},color:"textDisabled",children:`${t.appName} - ${"ltr"===d.appDirection?a?.organizationEnName:a?.organizationArName}`}),l(L,{sx:{fontSize:12},color:"textDisabled",children:["V.",t.appVersion]})]})]}),s(ci,{onClick:()=>{p(Ar())},children:"ltr"===r.direction?s(Te,{icon:"angle-left"}):s(Te,{icon:"angle-right"})})]}),s(be,{}),s(Fr,{})]})},kr=Pi({key:"muirtl",stylisPlugins:[Mi,Di]}),Wr=Pi({key:"mui"}),Gr=e=>{const[i,t]=ae([]),[o,a]=ae([]),{handlePostRequest:r,handleGetRequest:d}=Hi();re((()=>{e.selectedRecord&&(async()=>{await d({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{t(e.data.currentRoles),a(e.data.availableRoles)}})})()}),[e.selectedRecord]);return l(p,{children:[s(rt,{displayField:"roleName",options:o,valueField:"id",selectedOptions:i,setSelection:t}),l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[s(O,{variant:"contained",onClick:async()=>{await r({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:i,successCallBkFn:()=>{fe.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),s(O,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Yr=e=>{const[t,o]=ae(null),{Window:a,setWindowState:r}=ji({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),d=i((e=>e.commonStores.stores.SystemOrganizations.data)),n=i((e=>e.commonStores.stores.SystemOrganizationRanks.data)),c=i((e=>e.commonStores.stores.SystemOrganizationUnits.data)),{t:m}=Ne(),[u,T]=ae([]),A=it({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:T}),_=[{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:d,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:n,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 l(p,{children:[s(a,{children:s(Gr,{selectedRecord:t,closeModalFn:()=>{r(!1)}})}),s(ja,{apiActions:A,hideInfoBar:!0,data:u,setData:T,editMode:{editMode:"row"},formElements:_,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{o(e),r(!0)}}],gridLoadParametersValues:{personId:e.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async i=>(i.personId=e.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Vr=()=>{const{t:t}=Ne(),[o,a]=ae([]),r=it({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:a}),{handleGetRequest:d}=Hi(),n=i((e=>e.commonStores.stores.SystemOrganizationRanks)),l=e();return s(ja,{apiActions:r,data:o,hideInfoBar:!0,setData:a,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 d({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{l(Xi({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{l(Xi({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},qr=()=>{const{t:t}=Ne(),[o,a]=ae([]),{handleGetRequest:r}=Hi(),d=i((e=>e.commonStores.stores.SystemOrganizationUnits)),n=e(),l=it({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:a}),p=i((e=>e.commonStores.stores.SystemOrganizationUnitType.data));return s(ja,{apiActions:l,data:o,hideInfoBar:!0,setData:a,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:o,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 r({endPointURI:d.url,showMask:!1,successCallBkFn:e=>{n(Xi({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{n(Xi({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},Kr=()=>{const{t:e}=Ne(),[i,t]=ae([]),o=it({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:t});return s(ja,{apiActions:o,data:i,hideInfoBar:!0,setData:t,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"}})},zr=()=>{const{t:e}=Ne(),[t,o]=ae([]),a=it({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:o}),r=i((e=>e.commonStores.stores.SystemApplicationModules.data)),{handleGetRequest:d}=Hi();return s(ja,{apiActions:a,data:t,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"}})},Hr=()=>{const{t:e}=Ne(),[i,t]=ae([]),o=it({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:t});return s(ja,{apiActions:o,data:i,setData:t,editMode:{editMode:"row",reloadAfterSave:!0},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"}})},Qr=e=>{const[i,t]=ae([]),[o,a]=ae([]),{handlePostRequest:r,handleGetRequest:d}=Hi();re((()=>{e.roleId&&(async()=>{await d({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{t(e.data.selectedAuthorities),a(e.data.availableAuthorities)}})})()}),[e.roleId]);return l(p,{children:[s(rt,{displayField:"authorityName",options:o,valueField:"id",selectedOptions:i,setSelection:t}),l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[s(O,{variant:"contained",onClick:async()=>{await r({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:i,successCallBkFn:()=>{fe.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),s(O,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Zr=()=>{const{t:e}=Ne(),[i,t]=ae([]),[o,a]=ae(null),{Window:r,setWindowState:d}=ji({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),n=it({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:t});return l(p,{children:[s(r,{children:s(Qr,{roleId:o?.id,closeModalFn:()=>{d(!1)}})}),s(ja,{apiActions:n,data:i,hideInfoBar:!0,setData:t,editMode:{editMode:"row",reloadAfterSave:!0},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=>{a(e),d(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},jr=e=>{const t=i((e=>e.commonStores.stores.SystemEntityParameters.data)),{t:o}=Ne(),[a,r]=ae([]),d=it({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:r});return s(ja,{apiActions:d,data:a,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:"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"}})},$r=()=>{const e=i((e=>e.commonStores.stores.SystemOrganizations.data)),{t:t}=Ne(),[o,a]=ae([]),r=it({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:a});return s(ja,{apiActions:r,data:o,setData:a,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:t("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},Xr=e=>{const{t:t}=Ne(),o=i((e=>e.commonStores.stores.SystemEntityParameters.data)),[a,r]=ae([]),d=it({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",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:"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 s(ja,{apiActions:d,data:a,hideInfoBar:!0,setData:r,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"}})},Jr=[{value:"FILE_SYSTEM"},{value:"SFTP"}],ed={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}},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}},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}}},id=(e,i,t)=>{if(e&&ed[e]){const o=ed[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"),t.setValue("useSysDatasource",null),t.setValue("datasourceConId",null),t.setValue("reportBluePrintId",null),t.setValue("reportExcelDataQueryId",null),t.setValue("reportJasperName",null)},td=e=>{const{t:i}=Ne(),[t,o]=ae([]),a=it({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:o});return s(ja,{apiActions:a,data:t,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},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:"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:i=>i?.recipientMail&&!ga(i.recipientMail)?(fe.error("You must enter a valid email address"),!1):(i.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},od=e=>{const{t:t}=Ne(),[o,a]=ae([]),r=i((e=>e.commonStores.stores.SystemDataQueries.data)),d=it({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:a}),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:r,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 s(ja,{apiActions:d,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:a,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"}})},ad=e=>{const t=i((e=>e.commonStores.stores.SystemReports.data)),{t:o}=Ne(),[a,r]=ae([]),d=it({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",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:{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 s(ja,{apiActions:d,data:a,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,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"}})},rd={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}}},dd=(e,i,t)=>{if(e&&rd[e]){const o=rd[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)},nd=e=>{const{t:t}=Ne(),[o,a]=ae([]),r=it({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:a}),d=i((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:d,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:d,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 s(ja,{apiActions:r,data:o,setData:a,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"}})},ld=e=>{const{t:t}=Ne(),[o,a]=ae([]),r=it({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:a}),d=[{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:i((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 s(ja,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:d,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"}})},sd=e=>{const[i,t]=ae(null),{Window:o,setWindowState:a}=ji({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:r}=Ne(),{handleGetRequest:d}=Hi(),[n,c]=ae([]);re((()=>{(async()=>{await d({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{c(e.data)}})})()}),[e.selectedRecord]);const[m,u]=ae([]),T=it({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:u}),A=[{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:n,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 l(p,{children:[s(o,{children:s(ld,{selectedRecord:i})}),s(ja,{apiActions:T,data:m,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.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=>{t(e),a(!0)}}],formElements:A,keyColumnName:"id",gridTitle:r("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:i=>(i.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},pd={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}}},cd=(e,i,t)=>{if(e&&pd[e]){const o=pd[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)},md=e=>{const{t:t}=Ne(),[o,a]=ae([]),r=i((e=>e.commonStores.stores.SystemWidgets.data)),d=it({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:a});return s(ja,{apiActions:d,data:o,setData:a,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:r,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"}})},ud=[{path:"/",component:()=>{const e=i((e=>e.AppInfo.value));return l(y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,fontSize:24,fontWeight:"bold"},children:[s("img",{src:e.appLogo,style:{margin:5,height:200,width:200}}),l("div",{children:["Welcome to ",e.appName," v.",e.appVersion]}),l("div",{style:{fontSize:16},children:["Use side menu [",s(Te,{icon:"bars",style:{marginLeft:10,marginRight:10}}),"] to navigate to your authorized system modules"]})]})}},...[...[{path:"admin/organizations",component:()=>{const{t:e}=Ne(),[i,t]=ae([]),o=it({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:t}),a=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>s(y,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:s(xa,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:e.id+""})})}}}},{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"}}];return s(p,{children:s(ja,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:o,data:i,setData:t,editMode:{editMode:"row"},formElements:a,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:Yr,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=Ne(),[i,t]=ae([]),o=it({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:t});return s(ja,{apiActions:o,data:i,setData:t,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:Vr,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:qr,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:Kr,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=Ne(),[t,o]=ae(null),{UserInfo:a}=Zi(),r=i((e=>e.commonStores.stores.CurrentOrganizationRanks.data)),d=i((e=>e.commonStores.stores.CurrentOrganizationUnits.data)),[n,c]=ae([]),m=it({findAll:"api/v1/public/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:c}),[u,T]=ae(null),{Window:A,setWindowState:_}=ji({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:f,setWindowState:I}=ji({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:E,setWindowState:O}=ji({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),N=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>s(y,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:s(xa,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e.id+""})})}}}},{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:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",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:{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_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return l(p,{children:[s(f,{children:s(Gr,{selectedRecord:u,closeModalFn:()=>{I(!1)}})}),s(A,{children:s(Yr,{selectedPerson:t})}),s(E,{children:s(yr,{selectedPerson:t,isSelfService:!1,onSuccessCallBk:()=>{O(!1)}})}),s(ja,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:m,data:n,setData:c,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:N,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{o(e),O(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{T({organizationId:a?.currentOrganization?.id,id:e?.organizationMemberId}),I(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{o(e),_(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(fe.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||(fe.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}=Ne(),[i,t]=ae([]),o=it({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:t});return s(p,{children:s(ja,{apiActions:o,data:i,setData:t,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:zr,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Hr,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:Zr,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=Ne(),[i,t]=ae([]),o=it({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:t});return s(ja,{apiActions:o,data:i,setData:t,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}=Ne(),{handleGetRequest:t}=Hi(),[o,a]=ae([]),r=it({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:a}),d=i((e=>e.commonStores.stores.SystemApplicationModules.data));return s(ja,{apiActions:r,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:d,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:Kr,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:qr,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Vr,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=Ne(),t=i((e=>e.commonStores.stores.SystemDataQueries.data)),[o,a]=ae([]),r=it({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:a});return s(ja,{apiActions:r,data:o,setData:a,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[e,t]=ae(null),{Window:o,setWindowState:a}=ji({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),r=i((e=>e.commonStores.stores.SystemDataSources.data)),{t:d}=Ne(),[n,c]=ae([]),m=it({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,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:r,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 l(p,{children:[s(o,{children:s(jr,{selectedRecord:e})}),s(ja,{apiActions:m,rowActions:[{label:"Query Parameters",actionFn:async e=>{t(e),a(!0)},icon:"p"}],data:n,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:u,keyColumnName:"id",gridTitle:d("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}=Hi(),t=i((e=>e.commonStores.stores.SystemDataSourceType.data)),{t:o}=Ne(),[a,r]=ae([]),d=it({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:r,commonStoreKey:"SystemDataSources"});return s(ja,{apiActions:d,data:a,setData:r,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=>{fe.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}=Ne(),t=i((e=>e.commonStores.stores.SystemParameterTypes.data)),[o,a]=ae([]),r=it({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:a});return s(ja,{apiActions:r,data:o,setData:a,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",lt):"datetime"===e&&i.setValue("parameterValueFormat",st),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:$r,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=Ne(),[t,o]=ae(null),{Window:a,setWindowState:r}=ji({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:d,setWindowState:n}=ji({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[c,m]=ae([]),u=i((e=>e.commonStores.stores.SystemDataSources.data)),T=i((e=>e.commonStores.stores.SystemDataQueries.data)),A=i((e=>e.commonStores.stores.SystemBluePrints.data)),_=it({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:m}),f=[{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){id(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:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",options:Jr,optionDisplayField:"value",optionValueField:"value"}},{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: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:A,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:T,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:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return l(p,{children:[s(a,{children:s(Ja,{reportCode:t?.reportCode,resultMode:"App"})}),s(d,{children:s(Xr,{selectedRecord:t})}),s(ja,{attachment:{attachmentCode:"JASPER_REPORTS"},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,i)=>{o(e),n(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,i)=>{o(e),r(!0)}}],formLoadCallBk:(e,i,t)=>{id(t.reportType,e,i),!0===t?.useSysDatasource&&e.hideField("datasourceConId")},formElements:f,keyColumnName:"id",gridTitle:e("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?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(fe.error("You must choose the report query"),!1):(fe.error("You must choose the report blueprint"),!1):(fe.error("You must enter the jasper report name"),!1):(fe.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=i((e=>e.commonStores.stores.SystemDataQueries.data)),t=i((e=>e.commonStores.stores.SystemTimeIntervals.data)),[o,a]=ae(null),{Window:r,setWindowState:d}=ji({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:n,setWindowState:c}=ji({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:m,setWindowState:u}=ji({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:T}=Ne(),[A,_]=ae([]),f=it({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:_}),I=[{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:e,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:e,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:e,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:t,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 l(p,{children:[s(r,{children:s(td,{selectedRecord:o,callBkFn:()=>{d(!1)}})}),s(n,{children:s(od,{selectedRecord:o,callBkFn:()=>{d(!1)}})}),s(m,{children:s(ad,{selectedRecord:o,callBkFn:()=>{u(!1)}})}),s(ja,{apiActions:f,data:A,setData:_,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:I,keyColumnName:"id",gridTitle:T("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{a(e),d(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{a(e),c(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{a(e),u(!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)||(fe.error("You must specifiy the start sending time since this email is periodical"),!1):(fe.error("You must specifiy the period value since this email is periodical"),!1):(fe.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}=Ne(),[i,t]=ae([]),o=it({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:t});return s(ja,{apiActions:o,data:i,setData:t,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){dd(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)=>{dd(t.mailEngine,e,i)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,t]=ae(null),{Window:o,setWindowState:a}=ji({windowTitle:"Document Status",windowIcon:"tag"}),{Window:r,setWindowState:d}=ji({windowTitle:"Document Action",windowIcon:"stamp"}),n=i((e=>e.commonStores.stores.SystemOrganizations.data)),c=i((e=>e.commonStores.stores.SystemReports.data)),m=i((e=>e.commonStores.stores.SystemDataSources.data)),{t:u}=Ne(),[T,A]=ae([]),_=it({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:A}),f=[{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:n,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 l(p,{children:[s(o,{children:s(nd,{selectedRecord:e})}),s(r,{children:s(sd,{selectedRecord:e})}),s(ja,{apiActions:_,formLoadCallBk:(e,i,t)=>{!0===t.useSystemCon?e.hideField("documentConId"):e.showField("documentConId")},data:T,setData:A,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{t(e),a(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{t(e),d(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:u("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:f,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}=Ne(),t=i((e=>e.commonStores.stores.SystemDataQueries.data)),o=i((e=>e.commonStores.stores.SystemWidgetTypes.data)),[a,r]=ae([]),d=it({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:r});return s(ja,{apiActions:d,data:a,setData:r,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){cd(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)=>{cd(t.widgetType,e,i)}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:e}=Ne(),[i,t]=ae(null),{Window:a,setWindowState:r}=ji({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[d,n]=ae([]),c=o(),m=it({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:n});return l(p,{children:[s(a,{children:s(md,{selectedRecord:i})}),s(ja,{apiActions:m,data:d,setData:n,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=>{t(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{c("/dashboard/"+e.dashboardCode)}}],gridTitle:e("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:mr},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=Ne(),[i,t]=ae([]),o=it({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:t});return s(ja,{apiActions:o,data:i,setData:t,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}=Ne(),[t,o]=ae([]),{handlePostRequest:a}=Hi(),r=it({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:o}),d=i((e=>e.commonStores.stores.SystemMailTemplates.data));return s(ja,{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"}}],rowActions:[{actionFn:async e=>{(async e=>{await a({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{r.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],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:zr},{path:"dev/system/roles",component:Zr},{path:"dev/system/lookups",component:$r},{path:"dev/system/modules",component:Hr},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=Ne(),[i,t]=ae([]),o=it({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:t});return s(ja,{apiActions:o,data:i,setData:t,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:Jr,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{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"}})}},{path:"dev/notifications",component:()=>{const{t:e}=Ne(),[t,o]=ae([]),a=i((e=>e.commonStores.stores.SystemTimeIntervals.data)),r=i((e=>e.commonStores.stores.SystemDataQueries.data)),d=it({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:o}),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:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:r,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:r,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",options:a,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>s(y,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?s(Te,{icon:e.row.notificationIcon}):s(p,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>s(y,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>s(y,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return s(ja,{apiActions:d,data:t,setData:o,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:n,keyColumnName:"id",gridTitle:e("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:e}=Zi(),t=i((e=>e.AppLayout)),{handleGetRequest:o,handlePostRequest:a}=Hi(),[r,d]=ae([]),n=i((e=>e.AppInfo.value)),c=()=>{!0===e.isAuthenticated&&o({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{d(e.data)}})};return!0===n?.enableUINotifications&&Ir(c,1e3),l(p,{children:[l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[s(y,{sx:{flex:1}}),l("h3",{children:[s(Te,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===t.appDirection?"Notifications":"الاشعارات"]}),s(y,{sx:{flex:1}}),s(O,{sx:{textTransform:"none"},onClick:async()=>{await a({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),s(O,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await a({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),s(y,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:s(y,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:r.map(((e,i)=>s(Or,{...e,showDivider:i<r.length-1})))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:tr}]]],Td=e=>{const{isUserAuthorized:i,isCurrentOrganizationAuthorizedToModule:t}=Zi();return e?.applicationModule&&!t(e?.applicationModule)?s(y,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:l("h2",{children:[s(Te,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!i(e.authority)?s(y,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:l("h2",{children:[s(Te,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):s(p,{children:e.children})},Ad=()=>{const t=i((e=>e.AppLayout)),o=i((e=>e.AppInfo.value)),a=i((e=>e.AppInfo.value.businessRoutes)),{UserInfo:n}=Zi(),c=e(),{show:m,hide:u}=Vi(),T=i((e=>e.commonStores)),[A,_]=ae(!1),{isUserAuthorized:f}=Zi(),{handleGetRequest:I}=Hi();return re((()=>{T?.storeKeys&&(async()=>{m("Loading ... please wait"),_(!1);const e=T.stores,i=T.storeKeys;for(let t of i)void 0!==e[t]?.authority&&null!==e[t]?.authority&&!f(e[t]?.authority)||""==e[t]?.url||!0!==e[t].autoLoad||await I({endPointURI:e[t].url,showMask:!1,successCallBkFn:e=>{c(Xi({storeKey:t,data:e.data}))},failureCallBkFn:()=>{c(Xi({storeKey:t,data:[]}))}});_(!0),u()})()}),[T.storeKeys,n?.currentOrganization]),s(ee,{value:"ltr"===t.appDirection?Wr:kr,children:A?s(y,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:l(r,{children:[o.enableAdministrationModule?ud.map(((e,i)=>s(d,{path:e.path,element:s(Td,{authority:e.authority,applicationModule:e.applicationModule,children:s(e.component,{})})},"adm"+i))):null,a.map(((e,i)=>s(d,{path:e.path,element:s(Td,{authority:e.authority,children:s(e.component,{})})},"bs"+i)))]})}):s(p,{})})},_d=le("div")((({theme:e})=>({width:30,height:6,margin:10,backgroundColor:gi[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:gi[900]})})));function fd(t){const{window:o}=t,a=i((e=>e.SideBar)),r=i((e=>e.AppInfo.value)),d=e(),n=e=>{d(_r(e))};return s(Si,{container:void 0!==o?()=>o().document.body:void 0,anchor:"bottom",open:a.isOpened,onClose:()=>{n(!1)},onOpen:()=>{n(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:l(y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[s(_d,{}),s(y,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:s(Fr,{})}),l(y,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[s(L,{sx:{fontSize:12},color:"textDisabled",children:r.appName}),l(L,{sx:{fontSize:12},color:"textDisabled",children:["V.",r.appVersion]})]})]})})}const Id=()=>{const{t:e}=Ne(),t=i((e=>e.loadingMask.value)),o=i((e=>e.AppLayout));return l(j,{dir:o.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:t.isOpened,children:[s($,{color:"inherit"}),s("div",{style:{marginRight:10,marginLeft:10},children:t?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Ed=()=>{const t=i((e=>e.AppInfo.value)),[o,a]=ae(""),[r,d]=ae(""),[n,c]=ae(!1),m=i((e=>e.UserSession.value)),u=e(),T=async()=>{if(null==o||""==o)return void fe.error("username is required to proceed");if(null==r||""==r)return void fe.error("password is required to proceed");c(!0);let e=null;try{if(e=await Ee.post(`${t.apiBaseUrl}/api/auth/login`,{username:o,password:r},{withCredentials:!0}),null!=e.data&&""!==e.data){c(!1);const i={...e.data,isAuthenticated:!0};u(Ki.setAuthenticated(i))}}catch(e){c(!1),fe.error(e?.response?.data||"failed to authenticate, contact your administrator")}},A=i((e=>e.UserSession.value)),_=X({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${t.appTheme?.dark?.primaryColor||mt} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:t.appTheme?.dark?.primaryColor||mt},secondary:{main:t.appTheme?.dark?.secondaryColor||ut}}});return re((()=>{(async()=>{if(t?.apiBaseUrl&&null==A.isAuthenticated)try{let e=await Ee.get(`${t.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0});if(null!=e&&null!=e.data){const i={...e.data,isAuthenticated:!0};u(Ki.setAuthenticated(i))}else u(Ki.setUnAuthenticated())}catch(e){u(Ki.setUnAuthenticated())}})()}),[t]),s(ie,{theme:_,children:s(D,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==m.isAuthenticated?l(y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[s("img",{src:t?.appLogo,width:150,height:150}),s(L,{sx:{m:1},variant:"h4",color:"textSecondary",children:t?.appName}),l(L,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",t.appVersion]}),s(M,{label:"username",sx:{width:300,m:1},value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),s(M,{label:"password",sx:{width:300,m:1},value:r,type:"password",onChange:e=>{d(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),s(O,{loading:n,onClick:T,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):l(p,{children:[s($,{sx:{marginRight:1}}),s("div",{children:"You will be redirected shortly ... please wait"})]})})})},Od=le("main",{shouldForwardProp:e=>"open"!==e})((({theme:e,open:t})=>{const o=i((e=>e.AppLayout)),a=pe(),r=vi();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&t?"calc(100% - 350px)":"100%",direction:o.appDirection,justifyContent:"flex-start",transition:!0===t?a.transitions.create(["margin","width"],{easing:a.transitions.easing.easeOut,duration:a.transitions.duration.enteringScreen}):a.transitions.create(["margin","width"],{easing:a.transitions.easing.sharp,duration:a.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==o.appDirection||!0!==t?0:wi+"px",marginRight:r||"rtl"!==o.appDirection||!0!==t?0:wi+"px"}}));function Nd(){const e=i((e=>e.SideBar)),t=vi(),o=i((e=>e.UserSession)),a=i((e=>e.AppLayout));return l(n,{children:[s(Ie,{rtl:"rtl"===a.appDirection,draggable:!0,position:"bottom-center"}),s(Id,{}),!0===o.value.isAuthenticated?l(Od,{open:e.isOpened,children:[s(ce,{}),s(Rr,{}),t?null:s(Br,{}),t?s(fd,{}):null,s(Lr,{}),s(Ad,{})]}):s(Ed,{})]})}const yd=Ae({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,enableUINotifications:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,i)=>{e.value=i.payload}}}),hd=yd.actions;var Rd=yd.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"}]},SystemTimeIntervals:{autoLoad:!1,url:"",data:[{value:"second"},{value:"minute"},{value:"hour"},{value:"day"},{value:"week"},{value:"month"},{value:"year"}]},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:[]},CurrentOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organizationrank/all",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organization/units/all",data:[]},CurrentOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organizationunit/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"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/systemapplicationrole/all"}},Cd=t=>{const o=e();Ui.setLicenseKey(t.muiPremiumKey);const a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${t.appTheme?.light?.primaryColor||pt} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:t.appTheme?.light?.primaryColor||pt},secondary:{main:t.appTheme?.light?.secondaryColor||ct},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${t.appTheme?.dark?.primaryColor||mt} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:t.appTheme?.dark?.primaryColor||mt},secondary:{main:t.appTheme?.dark?.secondaryColor||ut}}};let d={};t.enableAdministrationModule&&(d={...Ld}),t.businessCommonStoresMetaData&&(d={...d,...t.businessCommonStoresMetaData}),o(Ji(d));const n=i((e=>e.AppLayout));let l={...a};"dark"===n.themeMode&&(l={...r});const p=X({direction:n.appDirection,...l});return re((()=>{document.title=t.documentTitle,o(hd.setAppInfo(t))}),[]),s(ie,{theme:p,children:s(Nd,{})})};var Dd={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>&copy;</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"},Md={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 Pd={...Dd,...Md,...{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",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};var bd={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>&copy;</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:"عرض"},gd={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"};const Sd={...bd,...gd,...{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",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};c.add(m),c.add(u),c.add(T);const Ud=e=>{const i={AppLayout:Bi,UserSession:zi,loadingMask:Yi,commonStores:et,SideBar:fr,AppInfo:Rd,...e?.businessReduxReducers},o=_e({reducer:i}),a={en:{translation:{...Pd,...e?.businessLocals?.en}},ar:{translation:{...Sd,...e?.businessLocals?.ar}}};return Oe.use(ye).init({resources:a,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),s(t,{store:o,children:s(Cd,{...e})})};export{Fa as AttachmentCard,xa as AttachmentImageViewer,Ba as AttachmentPanel,Ud as BaseApp,dt as CheckBox,nt as ComboBox,mt as DARK_THEME_INITIAL_MAIN_COLOR,ut as DARK_THEME_INITIAL_SECANDARY_COLOR,lt as DATE_FORMAT,st as DATE_TIME_FORMAT,mr as DashboardRouteView,cr as DashboardViewer,Tt as Datefield,At as DatetimeField,Xa as ExcelReportViewer,pt as LIGHT_THEME_INITIAL_MAIN_COLOR,ct as LIGHT_THEME_INITIAL_SECANDARY_COLOR,Ja as ReportViewer,_t as SystemLookupCombobox,or as TemplateBarChart,ar as TemplateDataCard,ir as TemplateForm,rr as TemplateGauge,ja as TemplateGrid,dr as TemplateLineChart,lr as TemplateLineProgress,sr as TemplatePieChart,tt as TemplateTextField,rt as TransferList,er as WorkflowDocumentPanel,ka as WorkflowDocumentTimeLine,tr as WorkflowRouteComponent,ba as capitalizeFirstLetter,yt as constructGridColumnsFromFields,ht as constructValidationSchema,Nt as getAllFields,Ot as getElementFields,Rt as getGridSelection,Da as hasDigitsOnly,Ma as isNumber,Pa as isNumeric,ga as isValidEmail,Sa as timeAgo,it as useApiActions,Hi as useAxios,Qi as useConfirmationWindow,vi as useIsMobile,Vi as useLoadingMask,Zi as useSession,ji as useWindow};
37
+ `,Or=o=>{const r=_e(),d=a((e=>e.AppLayout)),{handlePostRequest:n}=Hi();return e(t,{children:[e(A,{fullWidth:!0,onClick:()=>{var e;"NAVIGATION"===o?.notificationAction&&o?.notificationActionPayload&&r(o.notificationActionPayload),o?.isNotified||(e=o.id,n({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:e}})),o?.setOpen&&o.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:o?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[e(f,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[o?.notificationIcon?i(se,{icon:o.notificationIcon,style:{marginRight:10,marginLeft:10,color:o?.notificationIconColor}}):i(t,{}),"ltr"===d.appDirection?o.notificationEnText:o.notificationArText,i(f,{sx:{flex:1}}),o?.isNotified?i(t,{}):e(O,{color:"warning",sx:{animation:`${Er} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[i(se,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===d.appDirection?"New":"جديد"]})]}),e(f,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[i(f,{sx:{marginRight:1,marginLeft:1},children:Sa(o.createTime,d.appDirection)}),i(f,{sx:{flex:1}}),i(f,{sx:{marginRight:1,marginLeft:1},children:o.createTime})]})]}),o?.showDivider?i(v,{flexItem:!0}):i(t,{})]})},Nr=()=>{const{UserInfo:o}=Zi(),[r,d]=J(null),{handleGetRequest:n,handlePostRequest:l}=Hi(),s=_e(),p=a((e=>e.AppLayout)),[c,m]=J(!1),[u,T]=J([]);Ir((()=>{!0===o.isAuthenticated&&n({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>u.length&&me.info("ltr"===p.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===p.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),T(e.data)}})}),1e3);return i(G,{onClickAway:()=>{m(!1)},children:e("div",{style:{cursor:"pointer"},children:[i(N,{color:"inherit",onClick:e=>{d(e.currentTarget),m(!c)},sx:{marginRight:1,marginLeft:1},children:i(U,{anchorOrigin:{vertical:"top",horizontal:"ltr"===p.appDirection?"right":"left"},badgeContent:u.filter((e=>void 0===e.isNotified||null===e.isNotified)).length,color:"error",children:i(se,{icon:"bell"})})}),i(P,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:c,anchorEl:r,dir:p.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:o})=>i(Y,{...o,timeout:350,children:e(y,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[i(v,{variant:"fullWidth",flexItem:!0,children:e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[i(se,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===p.appDirection?"Notifications":"الاشعارات"]})}),0==u.length?i(f,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:i(f,{children:"ltr"===p.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):i(t,{}),i(f,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:u.map(((e,t)=>i(Or,{...e,setOpen:m,showDivider:t<u.length-1})))}),i(v,{variant:"fullWidth",flexItem:!0,children:i(A,{sx:{textTransform:"none"},onClick:()=>{s("myNotifications")},children:"ltr"===p.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},yr=o=>{const[a,r]=J(""),[d,n]=J(""),[l,s]=J(""),{handlePostRequest:p}=Hi();return e(y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[e(f,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",o?.selectedPerson?.employeeEnName]}),i(v,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),o.isSelfService?i(tt,{label:"Current Password",value:a,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):i(t,{}),i(tt,{label:"New Password",value:d,onChange:e=>{n(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),i(tt,{label:"Confirm New Password",value:l,onChange:e=>{s(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),i(A,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!o.isSelfService||null!==a&&""!==a.trim()?null!==d&&""!==d&&null!==l&&""!==l&&d==l?await p({endPointURI:o.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:o?.selectedPerson?.id,currentPassword:a,newPassword:d},successCallBkFn:()=>{o.onSuccessCallBk(),me.success("Your request has been processed successfully")},showMask:!0}):me.error("You must enter new password in required fields and must be identical"):me.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},hr=S(ne,{shouldForwardProp:e=>"open"!==e})((({theme:e})=>{const i=a((e=>e.AppLayout)),t=vi();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})}}]}})),Rr=()=>{const{Window:r,setWindowState:d}=ji({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),n=a((e=>e.AppInfo.value)),[l,s]=J(null),p=()=>{s(null)},c=e=>{s(e.currentTarget)},m=a((e=>e.AppLayout)),u=a((e=>e.SideBar)),{UserSession:T}=Zi(),A=T.value.currentOrganization,{Window:_,setWindowState:f}=ji({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:I}=Hi(),E=vi(),y=o();return e(t,{children:[i(_,{children:i(yr,{selectedPerson:T.value,isSelfService:!0,onSuccessCallBk:()=>{f(!1)}})}),i(V,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:l,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(l),onClose:p,children:i(w,{onClick:()=>{f(!0),p()},children:i(O,{sx:{textAlign:"center"},children:"Change Password"})})}),i(r,{children:i(ur,{successChangeCallBackFn:()=>{d(!1)}})}),i(hr,{position:"fixed",open:u.isOpened,children:e(le,{children:[i(N,{color:"inherit","aria-label":"open drawer",onClick:()=>{y(Ar())},edge:"start",sx:[{mr:"ltr"===m.appDirection?2:void 0,ml:"rtl"===m.appDirection?2:void 0},u.isOpened&&{display:"none"}],children:i(se,{icon:"bars"})}),i(xa,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:T.value.currentOrganization.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),i(O,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:E?"":`${n.appName} - ${"ltr"===m.appDirection?A?.organizationEnName:A?.organizationArName}`}),i(g,{title:"light"===m.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:i(N,{color:"inherit",onClick:()=>{y(Fi.setThemeMode("light"===m.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===m.themeMode?"dark":"light")},children:"light"===m.themeMode?i(se,{icon:"moon"}):i(se,{icon:{prefix:"far",iconName:"sun"}})})}),i(g,{title:"ar"===Ae.language?"Change Language To English":"Change Language To Arabic",children:i(N,{color:"inherit",onClick:()=>{let e="ar"===Ae.language?"en":"ar";var i;i=e,Ae.changeLanguage(i),localStorage.setItem("language",i),y(Fi.setAppDirection("ar"===e?"rtl":"ltr"))},children:i(se,{icon:"language"})})}),T.value?.userOrganizations&&T.value?.userOrganizations.length>1?i(g,{title:"Change Current Organization",children:i(N,{color:"inherit",onClick:()=>{d(!0)},children:i(se,{icon:"globe"})})}):i(t,{}),i(!0===n?.enableUINotifications?Nr:t,{}),i("div",{onClick:c,style:{cursor:"pointer"},children:i(xa,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:T.value?.id+""})}),i("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:c,children:E?"":T.value?.username}),i(N,{color:"inherit",onClick:async()=>{try{await I({endPointURI:"api/auth/logout"})}catch(e){}y(Ki.setUnAuthenticated())},children:i(se,{rotation:"rtl"===m.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},Lr=S("div")((({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"}))),Cr=(e,i)=>{for(const t of i){if(t.id===e)return t;if(t.children){const i=Cr(e,t.children);if(i)return i}}},Dr=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"system_admin.Person",label:"PERSON_PLURAL",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"development_admin.organizations",label:"ORGANIZATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{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.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 Mr(){return i(si,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const Pr=oe(Ei)((({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${fi.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})}))),br=oe(Oi)((({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:ae(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})}}))),gr=ui(Ai);function Sr(e){const t=Ti({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return i(gr,{style:t,...e})}const Ur=oe(Ve)({color:"inherit",fontWeight:500});function vr({icon:t,expandable:o,children:r,...d}){const{t:n}=Ne(),l=a((e=>e.AppLayout));return e(hi,{...d,sx:{display:"flex",alignItems:"center",padding:1},children:[i(se,{style:{marginRight:"ltr"===l.appDirection?7:void 0,marginLeft:"rtl"===l.appDirection?7:void 0,fontSize:"1.2rem"},icon:t}),i(Ur,{variant:"body2",sx:{fontSize:16},children:n(r)}),o&&i(Mr,{})]})}const wr=e=>Array.isArray(e)?e.length>0&&e.some(wr):Boolean(e),xr=$.forwardRef((function(t,o){const{id:a,itemId:r,label:d,disabled:n,children:l,...s}=t,{getRootProps:p,getContentProps:c,getIconContainerProps:m,getCheckboxProps:u,getLabelProps:T,getGroupTransitionProps:A,getDragAndDropOverlayProps:_,status:f,publicAPI:I}=Ii({id:a,itemId:r,children:l,label:d,disabled:n,rootRef:o}),E=I.getItem(r),O=wr(l);return i(Li,{itemId:r,children:e(Pr,{...p(s),children:[e(br,{...c({className:Ra("content",{"Mui-expanded":f.expanded,"Mui-selected":f.selected,"Mui-focused":f.focused,"Mui-disabled":f.disabled})}),children:[i(Ni,{...m(),children:i(Ri,{status:f})}),i(yi,{...u()}),i(vr,{...T({icon:E?.icon||"book",expandable:O&&f.expanded})}),i(Ci,{..._()})]}),l&&i(Sr,{...A()})]})})}));function Fr(){const e=_e(),t=a((e=>e.AppLayout)),r=a((e=>e.AppInfo.value));o();const d=vi(),{isUserAuthorized:n,isCurrentOrganizationAuthorizedToModule:l}=Zi(),s=e=>{const i=[];for(let t of e)if((void 0===t.authority||null==t.authority||n(t.authority))&&(void 0===t.applicationModule||null===t.applicationModule||l(t.applicationModule))){let e=structuredClone(t);t?.children&&(e.children=s(t.children)),i.push(e)}return i},p=[];r.enableAdministrationModule&&p.push(...structuredClone(Dr)),p.push(...structuredClone(r.businessNavigationItems));const c=s(p);return i(_i,{items:c,onItemClick:(i,t)=>{const o=Cr(t,p);"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:wi,direction:t.appDirection,maxHeight:d?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:xr}})}const Br=()=>{const t=a((e=>e.AppInfo.value)),{UserSession:r}=Zi(),d=r.value.currentOrganization,n=q(),l=a((e=>e.AppLayout)),s=a((e=>e.SideBar)),p=o();return e(mi,{sx:{width:wi,flexShrink:0,"& .MuiDrawer-paper":{width:wi,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===l.appDirection?"left":"right",open:s.isOpened,children:[e(Lr,{children:[e(f,{sx:{width:"100%"},children:[i(O,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[i(O,{sx:{fontSize:12},color:"textDisabled",children:`${t.appName} - ${"ltr"===l.appDirection?d?.organizationEnName:d?.organizationArName}`}),e(O,{sx:{fontSize:12},color:"textDisabled",children:["V.",t.appVersion]})]})]}),i(ci,{onClick:()=>{p(Ar())},children:"ltr"===n.direction?i(se,{icon:"angle-left"}):i(se,{icon:"angle-right"})})]}),i(be,{}),i(Fr,{})]})},kr=Pi({key:"muirtl",stylisPlugins:[Mi,Di]}),Wr=Pi({key:"mui"}),Gr=o=>{const[a,r]=J([]),[d,n]=J([]),{handlePostRequest:l,handleGetRequest:s}=Hi();ee((()=>{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(t,{children:[i(rt,{displayField:"roleName",options:d,valueField:"id",selectedOptions:a,setSelection:r}),e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[i(A,{variant:"contained",onClick:async()=>{await l({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:o.selectedRecord.id},data:a,successCallBkFn:()=>{me.success("Your request has been proccesed successfully"),o.closeModalFn&&o.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),i(A,{variant:"contained",color:"error",onClick:o.closeModalFn,children:"Cancel"})]})]})},Yr=o=>{const[r,d]=J(null),{Window:n,setWindowState:l}=ji({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}=Ne(),[u,T]=J([]),A=it({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:T}),_=[{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(n,{children:i(Gr,{selectedRecord:r,closeModalFn:()=>{l(!1)}})}),i(ja,{apiActions:A,hideInfoBar:!0,data:u,setData:T,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"}})]})},Vr=()=>{const{t:e}=Ne(),[t,r]=J([]),d=it({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:r}),{handleGetRequest:n}=Hi(),l=a((e=>e.commonStores.stores.SystemOrganizationRanks)),s=o();return i(ja,{apiActions:d,data:t,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(Xi({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{s(Xi({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},qr=()=>{const{t:e}=Ne(),[t,r]=J([]),{handleGetRequest:d}=Hi(),n=a((e=>e.commonStores.stores.SystemOrganizationUnits)),l=o(),s=it({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 i(ja,{apiActions:s,data:t,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:t,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(Xi({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{l(Xi({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},Kr=()=>{const{t:e}=Ne(),[t,o]=J([]),a=it({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:o});return i(ja,{apiActions:a,data:t,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"}})},zr=()=>{const{t:e}=Ne(),[t,o]=J([]),r=it({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:o}),d=a((e=>e.commonStores.stores.SystemApplicationModules.data)),{handleGetRequest:n}=Hi();return i(ja,{apiActions:r,data:t,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: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"}}],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"}})},Hr=()=>{const{t:e}=Ne(),[t,o]=J([]),a=it({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:o});return i(ja,{apiActions:a,data:t,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},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"}})},Qr=o=>{const[a,r]=J([]),[d,n]=J([]),{handlePostRequest:l,handleGetRequest:s}=Hi();ee((()=>{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(t,{children:[i(rt,{displayField:"authorityName",options:d,valueField:"id",selectedOptions:a,setSelection:r}),e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[i(A,{variant:"contained",onClick:async()=>{await l({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:o.roleId},data:a,successCallBkFn:()=>{me.success("Your request has been proccesed successfully"),o.closeModalFn&&o.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),i(A,{variant:"contained",color:"error",onClick:o.closeModalFn,children:"Cancel"})]})]})},Zr=()=>{const{t:o}=Ne(),[a,r]=J([]),[d,n]=J(null),{Window:l,setWindowState:s}=ji({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),p=it({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:r});return e(t,{children:[i(l,{children:i(Qr,{roleId:d?.id,closeModalFn:()=>{s(!1)}})}),i(ja,{apiActions:p,data:a,hideInfoBar:!0,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},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"}})]})},jr=e=>{const t=a((e=>e.commonStores.stores.SystemEntityParameters.data)),{t:o}=Ne(),[r,d]=J([]),n=it({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(ja,{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: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"}})},$r=()=>{const e=a((e=>e.commonStores.stores.SystemOrganizations.data)),{t:t}=Ne(),[o,r]=J([]),d=it({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:r});return i(ja,{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:t("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},Xr=e=>{const{t:t}=Ne(),o=a((e=>e.commonStores.stores.SystemEntityParameters.data)),[r,d]=J([]),n=it({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 i(ja,{apiActions:n,data:r,hideInfoBar:!0,setData:d,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:l,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"}})},Jr=[{value:"FILE_SYSTEM"},{value:"SFTP"}],ed={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}},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}},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}}},id=(e,i,t)=>{if(e&&ed[e]){const o=ed[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"),t.setValue("useSysDatasource",null),t.setValue("datasourceConId",null),t.setValue("reportBluePrintId",null),t.setValue("reportExcelDataQueryId",null),t.setValue("reportJasperName",null)},td=e=>{const{t:t}=Ne(),[o,a]=J([]),r=it({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(ja,{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&&!ga(i.recipientMail)?(me.error("You must enter a valid email address"),!1):(i.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},od=e=>{const{t:t}=Ne(),[o,r]=J([]),d=a((e=>e.commonStores.stores.SystemDataQueries.data)),n=it({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 i(ja,{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: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"}})},ad=e=>{const t=a((e=>e.commonStores.stores.SystemReports.data)),{t:o}=Ne(),[r,d]=J([]),n=it({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: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(ja,{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:i=>(i.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},rd={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}}},dd=(e,i,t)=>{if(e&&rd[e]){const o=rd[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)},nd=e=>{const{t:t}=Ne(),[o,r]=J([]),d=it({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 i(ja,{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: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"}})},ld=e=>{const{t:t}=Ne(),[o,r]=J([]),d=it({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 i(ja,{apiActions:d,data:o,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:n,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"}})},sd=o=>{const[a,r]=J(null),{Window:d,setWindowState:n}=ji({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:l}=Ne(),{handleGetRequest:s}=Hi(),[p,c]=J([]);ee((()=>{(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]=J([]),T=it({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:u}),A=[{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(ld,{selectedRecord:a})}),i(ja,{apiActions:T,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:A,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"}})]})},pd={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}}},cd=(e,i,t)=>{if(e&&pd[e]){const o=pd[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)},md=e=>{const{t:t}=Ne(),[o,r]=J([]),d=a((e=>e.commonStores.stores.SystemWidgets.data)),n=it({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(ja,{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: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"}})},ud=[{path:"/",component:()=>{const t=a((e=>e.AppInfo.value));return e(f,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,fontSize:24,fontWeight:"bold"},children:[i("img",{src:t.appLogo,style:{margin:5,height:200,width:200}}),e("div",{children:["Welcome to ",t.appName," v.",t.appVersion]}),e("div",{style:{fontSize:16},children:["Use side menu [",i(se,{icon:"bars",style:{marginLeft:10,marginRight:10}}),"] to navigate to your authorized system modules"]})]})}},...[...[{path:"admin/organizations",component:()=>{const{t:e}=Ne(),[o,a]=J([]),r=it({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:a}),d=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>i(f,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:i(xa,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:e.id+""})})}}}},{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"}}];return i(t,{children:i(ja,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:r,data:o,setData:a,editMode:{editMode:"row"},formElements:d,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:Yr,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=Ne(),[t,o]=J([]),a=it({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(ja,{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:Vr,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:qr,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:Kr,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:o}=Ne(),[r,d]=J(null),{UserInfo:n}=Zi(),l=a((e=>e.commonStores.stores.CurrentOrganizationRanks.data)),s=a((e=>e.commonStores.stores.CurrentOrganizationUnits.data)),[p,c]=J([]),m=it({findAll:"api/v1/public/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:c}),[u,T]=J(null),{Window:A,setWindowState:_}=ji({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:I,setWindowState:E}=ji({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:O,setWindowState:N}=ji({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),y=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>i(f,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:i(xa,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e.id+""})})}}}},{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:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",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:{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_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e(t,{children:[i(I,{children:i(Gr,{selectedRecord:u,closeModalFn:()=>{E(!1)}})}),i(A,{children:i(Yr,{selectedPerson:r})}),i(O,{children:i(yr,{selectedPerson:r,isSelfService:!1,onSuccessCallBk:()=>{N(!1)}})}),i(ja,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:m,data:p,setData:c,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:y,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{d(e),N(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{T({organizationId:n?.currentOrganization?.id,id:e?.organizationMemberId}),E(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{d(e),_(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(me.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||(me.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}=Ne(),[o,a]=J([]),r=it({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 i(t,{children:i(ja,{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:zr,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Hr,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:Zr,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=Ne(),[t,o]=J([]),a=it({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(ja,{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:"admin/org/apps",component:()=>{const{t:e}=Ne(),{handleGetRequest:t}=Hi(),[o,r]=J([]),d=it({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 i(ja,{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:Kr,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:qr,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Vr,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=Ne(),t=a((e=>e.commonStores.stores.SystemDataQueries.data)),[o,r]=J([]),d=it({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:r});return i(ja,{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]=J(null),{Window:d,setWindowState:n}=ji({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),l=a((e=>e.commonStores.stores.SystemDataSources.data)),{t:s}=Ne(),[p,c]=J([]),m=it({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,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: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(t,{children:[i(d,{children:i(jr,{selectedRecord:o})}),i(ja,{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}=Hi(),t=a((e=>e.commonStores.stores.SystemDataSourceType.data)),{t:o}=Ne(),[r,d]=J([]),n=it({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:d,commonStoreKey:"SystemDataSources"});return i(ja,{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: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=>{me.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}=Ne(),t=a((e=>e.commonStores.stores.SystemParameterTypes.data)),[o,r]=J([]),d=it({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:r});return i(ja,{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",lt):"datetime"===e&&i.setValue("parameterValueFormat",st),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:$r,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:o}=Ne(),[r,d]=J(null),{Window:n,setWindowState:l}=ji({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:s,setWindowState:p}=ji({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[c,m]=J([]),u=a((e=>e.commonStores.stores.SystemDataSources.data)),T=a((e=>e.commonStores.stores.SystemDataQueries.data)),A=a((e=>e.commonStores.stores.SystemBluePrints.data)),_=it({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:m}),f=[{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){id(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:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",options:Jr,optionDisplayField:"value",optionValueField:"value"}},{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: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:A,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:T,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:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return e(t,{children:[i(n,{children:i(Ja,{reportCode:r?.reportCode,resultMode:"App"})}),i(s,{children:i(Xr,{selectedRecord:r})}),i(ja,{attachment:{attachmentCode:"JASPER_REPORTS"},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,i)=>{d(e),p(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,i)=>{d(e),l(!0)}}],formLoadCallBk:(e,i,t)=>{id(t.reportType,e,i),!0===t?.useSysDatasource&&e.hideField("datasourceConId")},formElements:f,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?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(me.error("You must choose the report query"),!1):(me.error("You must choose the report blueprint"),!1):(me.error("You must enter the jasper report name"),!1):(me.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=a((e=>e.commonStores.stores.SystemTimeIntervals.data)),[d,n]=J(null),{Window:l,setWindowState:s}=ji({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:p,setWindowState:c}=ji({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:m,setWindowState:u}=ji({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:T}=Ne(),[A,_]=J([]),f=it({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:_}),I=[{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:r,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(td,{selectedRecord:d,callBkFn:()=>{s(!1)}})}),i(p,{children:i(od,{selectedRecord:d,callBkFn:()=>{s(!1)}})}),i(m,{children:i(ad,{selectedRecord:d,callBkFn:()=>{u(!1)}})}),i(ja,{apiActions:f,data:A,setData:_,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:I,keyColumnName:"id",gridTitle:T("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{n(e),s(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{n(e),c(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{n(e),u(!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)||(me.error("You must specifiy the start sending time since this email is periodical"),!1):(me.error("You must specifiy the period value since this email is periodical"),!1):(me.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}=Ne(),[t,o]=J([]),a=it({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(ja,{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){dd(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)=>{dd(t.mailEngine,e,i)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[o,r]=J(null),{Window:d,setWindowState:n}=ji({windowTitle:"Document Status",windowIcon:"tag"}),{Window:l,setWindowState:s}=ji({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}=Ne(),[T,A]=J([]),_=it({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:A}),f=[{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(nd,{selectedRecord:o})}),i(l,{children:i(sd,{selectedRecord:o})}),i(ja,{apiActions:_,formLoadCallBk:(e,i,t)=>{!0===t.useSystemCon?e.hideField("documentConId"):e.showField("documentConId")},data:T,setData:A,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:f,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}=Ne(),t=a((e=>e.commonStores.stores.SystemDataQueries.data)),o=a((e=>e.commonStores.stores.SystemWidgetTypes.data)),[r,d]=J([]),n=it({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:d});return i(ja,{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,i,t,o){cd(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)=>{cd(t.widgetType,e,i)}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:o}=Ne(),[a,r]=J(null),{Window:d,setWindowState:n}=ji({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[l,s]=J([]),p=_e(),c=it({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(md,{selectedRecord:a})}),i(ja,{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:mr},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=Ne(),[t,o]=J([]),a=it({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(ja,{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}=Ne(),[t,o]=J([]),{handlePostRequest:r}=Hi(),d=it({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:o}),n=a((e=>e.commonStores.stores.SystemMailTemplates.data));return i(ja,{apiActions:d,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:n,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"}}],rowActions:[{actionFn:async e=>{(async e=>{await r({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{d.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],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:zr},{path:"dev/system/roles",component:Zr},{path:"dev/system/lookups",component:$r},{path:"dev/system/modules",component:Hr},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=Ne(),[t,o]=J([]),a=it({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:o});return i(ja,{apiActions:a,data:t,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:Jr,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{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"}})}},{path:"dev/notifications",component:()=>{const{t:e}=Ne(),[o,r]=J([]),d=a((e=>e.commonStores.stores.SystemTimeIntervals.data)),n=a((e=>e.commonStores.stores.SystemDataQueries.data)),l=it({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:r}),s=[{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:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:n,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",options:d,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>i(f,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?i(se,{icon:e.row.notificationIcon}):i(t,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>i(f,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>i(f,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return i(ja,{apiActions:l,data:o,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:s,keyColumnName:"id",gridTitle:e("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:o}=Zi(),r=a((e=>e.AppLayout)),{handleGetRequest:d,handlePostRequest:n}=Hi(),[l,s]=J([]),p=a((e=>e.AppInfo.value)),c=()=>{!0===o.isAuthenticated&&d({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{s(e.data)}})};return!0===p?.enableUINotifications&&Ir(c,1e3),e(t,{children:[e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[i(f,{sx:{flex:1}}),e("h3",{children:[i(se,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===r.appDirection?"Notifications":"الاشعارات"]}),i(f,{sx:{flex:1}}),i(A,{sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),i(A,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),i(f,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:i(f,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:l.map(((e,t)=>i(Or,{...e,showDivider:t<l.length-1})))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:tr}]]],Td=o=>{const{isUserAuthorized:a,isCurrentOrganizationAuthorizedToModule:r}=Zi();return o?.applicationModule&&!r(o?.applicationModule)?i(f,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:e("h2",{children:[i(se,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):o?.authority&&!a(o.authority)?i(f,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:e("h2",{children:[i(se,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):i(t,{children:o.children})},Ad=()=>{const r=a((e=>e.AppLayout)),d=a((e=>e.AppInfo.value)),n=a((e=>e.AppInfo.value.businessRoutes)),{UserInfo:l}=Zi(),s=o(),{show:p,hide:c}=Vi(),m=a((e=>e.commonStores)),[u,T]=J(!1),{isUserAuthorized:A}=Zi(),{handleGetRequest:_}=Hi();return ee((()=>{m?.storeKeys&&(async()=>{p("Loading ... please wait"),T(!1);const e=m.stores,i=m.storeKeys;for(let t of i)void 0!==e[t]?.authority&&null!==e[t]?.authority&&!A(e[t]?.authority)||""==e[t]?.url||!0!==e[t].autoLoad||await _({endPointURI:e[t].url,showMask:!1,successCallBkFn:e=>{s(Xi({storeKey:t,data:e.data}))},failureCallBkFn:()=>{s(Xi({storeKey:t,data:[]}))}});T(!0),c()})()}),[m.storeKeys,l?.currentOrganization]),i(Z,{value:"ltr"===r.appDirection?Wr:kr,children:u?i(f,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:e(Ie,{children:[d.enableAdministrationModule?ud.map(((e,t)=>i(Ee,{path:e.path,element:i(Td,{authority:e.authority,applicationModule:e.applicationModule,children:i(e.component,{})})},"adm"+t))):null,n.map(((e,t)=>i(Ee,{path:e.path,element:i(Td,{authority:e.authority,children:i(e.component,{})})},"bs"+t)))]})}):i(t,{})})},_d=oe("div")((({theme:e})=>({width:30,height:6,margin:10,backgroundColor:gi[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:gi[900]})})));function fd(t){const{window:r}=t,d=a((e=>e.SideBar)),n=a((e=>e.AppInfo.value)),l=o(),s=e=>{l(_r(e))};return i(Si,{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(f,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[i(_d,{}),i(f,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:i(Fr,{})}),e(f,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[i(O,{sx:{fontSize:12},color:"textDisabled",children:n.appName}),e(O,{sx:{fontSize:12},color:"textDisabled",children:["V.",n.appVersion]})]})]})})}const Id=()=>{const{t:t}=Ne(),o=a((e=>e.loadingMask.value)),r=a((e=>e.AppLayout));return e(K,{dir:r.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[i(z,{color:"inherit"}),i("div",{style:{marginRight:10,marginLeft:10},children:o?.message||t("DEFAULT_LOADING_MESSAGE")})]})},Ed=()=>{const r=a((e=>e.AppInfo.value)),[d,n]=J(""),[l,s]=J(""),[p,c]=J(!1),m=a((e=>e.UserSession.value)),u=o(),T=async()=>{if(null==d||""==d)return void me.error("username is required to proceed");if(null==l||""==l)return void me.error("password is required to proceed");c(!0);let e=null;try{if(e=await Te.post(`${r.apiBaseUrl}/api/auth/login`,{username:d,password:l},{withCredentials:!0}),null!=e.data&&""!==e.data){c(!1);const i={...e.data,isAuthenticated:!0};u(Ki.setAuthenticated(i))}}catch(e){c(!1),me.error(e?.response?.data||"failed to authenticate, contact your administrator")}},_=a((e=>e.UserSession.value)),I=H({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${r.appTheme?.dark?.primaryColor||mt} #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||mt},secondary:{main:r.appTheme?.dark?.secondaryColor||ut}}});return ee((()=>{(async()=>{if(r?.apiBaseUrl&&null==_.isAuthenticated)try{let e=await Te.get(`${r.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0});if(null!=e&&null!=e.data){const i={...e.data,isAuthenticated:!0};u(Ki.setAuthenticated(i))}else u(Ki.setUnAuthenticated())}catch(e){u(Ki.setUnAuthenticated())}})()}),[r]),i(j,{theme:I,children:i(y,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==m.isAuthenticated?e(f,{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(h,{label:"username",sx:{width:300,m:1},value:d,onChange:e=>{n(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),i(h,{label:"password",sx:{width:300,m:1},value:l,type:"password",onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),i(A,{loading:p,onClick:T,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):e(t,{children:[i(z,{sx:{marginRight:1}}),i("div",{children:"You will be redirected shortly ... please wait"})]})})})},Od=oe("main",{shouldForwardProp:e=>"open"!==e})((({theme:e,open:i})=>{const t=a((e=>e.AppLayout)),o=re(),r=vi();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:wi+"px",marginRight:r||"rtl"!==t.appDirection||!0!==i?0:wi+"px"}}));function Nd(){const t=a((e=>e.SideBar)),o=vi(),r=a((e=>e.UserSession)),d=a((e=>e.AppLayout));return e(Oe,{children:[i(ue,{rtl:"rtl"===d.appDirection,draggable:!0,position:"bottom-center"}),i(Id,{}),!0===r.value.isAuthenticated?e(Od,{open:t.isOpened,children:[i(de,{}),i(Rr,{}),o?null:i(Br,{}),o?i(fd,{}):null,i(Lr,{}),i(Ad,{})]}):i(Ed,{})]})}const yd=pe({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,enableUINotifications:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,i)=>{e.value=i.payload}}}),hd=yd.actions;var Rd=yd.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"}]},SystemTimeIntervals:{autoLoad:!1,url:"",data:[{value:"second"},{value:"minute"},{value:"hour"},{value:"day"},{value:"week"},{value:"month"},{value:"year"}]},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:[]},CurrentOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organizationrank/all",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organization/units/all",data:[]},CurrentOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organizationunit/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"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/systemapplicationrole/all"}},Cd=e=>{const t=o();Ui.setLicenseKey(e.muiPremiumKey);const r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||pt} #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||pt},secondary:{main:e.appTheme?.light?.secondaryColor||ct},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},d={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||mt} #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||mt},secondary:{main:e.appTheme?.dark?.secondaryColor||ut}}};let n={};e.enableAdministrationModule&&(n={...Ld}),e.businessCommonStoresMetaData&&(n={...n,...e.businessCommonStoresMetaData}),t(Ji(n));const l=a((e=>e.AppLayout));let s={...r};"dark"===l.themeMode&&(s={...d});const p=H({direction:l.appDirection,...s});return ee((()=>{document.title=e.documentTitle,t(hd.setAppInfo(e))}),[]),i(j,{theme:p,children:i(Nd,{})})};var Dd={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>&copy;</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"},Md={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 Pd={...Dd,...Md,...{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",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};var bd={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>&copy;</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:"عرض"},gd={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"};const Sd={...bd,...gd,...{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",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};d.add(n),d.add(l),d.add(s);const Ud=e=>{const t={AppLayout:Bi,UserSession:zi,loadingMask:Yi,commonStores:et,SideBar:fr,AppInfo:Rd,...e?.businessReduxReducers},o=ce({reducer:t}),a={en:{translation:{...Pd,...e?.businessLocals?.en}},ar:{translation:{...Sd,...e?.businessLocals?.ar}}};return Ae.use(ye).init({resources:a,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),i(r,{store:o,children:i(Cd,{...e})})};export{Fa as AttachmentCard,xa as AttachmentImageViewer,Ba as AttachmentPanel,Ud as BaseApp,dt as CheckBox,nt as ComboBox,mt as DARK_THEME_INITIAL_MAIN_COLOR,ut as DARK_THEME_INITIAL_SECANDARY_COLOR,lt as DATE_FORMAT,st as DATE_TIME_FORMAT,mr as DashboardRouteView,cr as DashboardViewer,Tt as Datefield,At as DatetimeField,Xa as ExcelReportViewer,pt as LIGHT_THEME_INITIAL_MAIN_COLOR,ct as LIGHT_THEME_INITIAL_SECANDARY_COLOR,Ja as ReportViewer,_t as SystemLookupCombobox,or as TemplateBarChart,ar as TemplateDataCard,ir as TemplateForm,rr as TemplateGauge,ja as TemplateGrid,dr as TemplateLineChart,lr as TemplateLineProgress,sr as TemplatePieChart,tt as TemplateTextField,rt as TransferList,er as WorkflowDocumentPanel,ka as WorkflowDocumentTimeLine,tr as WorkflowRouteComponent,ba as capitalizeFirstLetter,yt as constructGridColumnsFromFields,ht as constructValidationSchema,Nt as getAllFields,Ot as getElementFields,Rt as getGridSelection,Da as hasDigitsOnly,Ma as isNumber,Pa as isNumeric,ga as isValidEmail,Sa as timeAgo,it as useApiActions,Hi as useAxios,Qi as useConfirmationWindow,vi as useIsMobile,Vi as useLoadingMask,Zi as useSession,ji as useWindow};
38
38
  //# sourceMappingURL=index.mjs.map