@asaleh37/ui-base 25.8.30 → 25.8.31-2

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.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("@mui/x-data-grid-premium"),t=require("react/jsx-runtime"),i=require("react-redux"),o=require("@fortawesome/fontawesome-svg-core"),a=require("@fortawesome/free-brands-svg-icons"),r=require("@fortawesome/free-regular-svg-icons"),n=require("@fortawesome/free-solid-svg-icons");require("react-toastify/dist/ReactToastify.css");var d=require("@mui/material"),l=require("@emotion/react"),s=require("react"),p=require("@mui/material/styles"),c=require("@mui/material/CssBaseline"),u=require("@mui/material/AppBar"),m=require("@mui/material/Toolbar"),T=require("@fortawesome/react-fontawesome"),A=require("@reduxjs/toolkit"),_=require("react-toastify"),f=require("axios"),I=require("i18next"),E=require("react-i18next"),O=require("react-hook-form"),N=require("react-router-dom"),y=require("@hookform/resolvers/zod"),h=require("zod"),R=require("@mui/material/List"),L=require("@mui/material/Card"),C=require("@mui/material/CardHeader"),g=require("@mui/material/ListItemText"),D=require("@mui/material/ListItemIcon"),P=require("@mui/material/Checkbox"),x=require("@mui/material/Button"),b=require("@mui/material/Divider"),M=require("@mui/x-date-pickers"),S=require("@mui/x-date-pickers/AdapterMoment"),U=require("moment"),F=require("@mui/material/CardActions"),w=require("@mui/material/CardContent"),v=require("@mui/material/CardMedia"),B=require("@mui/material/Typography"),k=require("@mui/lab"),j=require("@mui/x-tree-view/models"),G=require("@mui/x-charts"),W=require("@mui/material/LinearProgress"),Y=require("@mui/material/Box"),V=require("@mui/x-charts/PieChart"),q=require("@mui/material/IconButton"),K=require("@mui/material/Drawer"),z=require("@react-spring/web"),H=require("@mui/material/Collapse"),Q=require("@mui/x-tree-view/RichTreeView"),Z=require("@mui/x-tree-view/TreeItem"),$=require("@mui/x-tree-view/useTreeItem2"),X=require("@mui/x-tree-view/TreeItem2"),J=require("@mui/x-tree-view/TreeItem2Icon"),ee=require("@mui/x-tree-view/TreeItem2Provider"),te=require("@mui/x-tree-view/TreeItem2DragAndDropOverlay"),ie=require("stylis-plugin-rtl"),oe=require("stylis"),ae=require("@emotion/cache"),re=require("@emotion/styled"),ne=require("@mui/material/colors"),de=require("@mui/material/SwipeableDrawer"),le=require("@mui/x-license");function se(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var pe=se(s),ce=se(h);!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===i&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("html,\nbody {\n height: 100vh;\n margin: 0;\n padding: 0;\n}\n\n#root {\n height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n\n.red-row {\n background-color: #f0d8d8;\n}\n");const ue=(e=768)=>{const[t,i]=s.useState(window.innerWidth<e);return s.useEffect(()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t},me=350,Te={themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},Ae=A.createSlice({name:"AppLayout",initialState:Te,reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),_e=Ae.actions;var fe=Ae.reducer;const Ie=A.createSlice({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,t)=>{e.value.isOpened=!0,e.value.message=t.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:Ee,hideLoadingMask:Oe}=Ie.actions;var Ne=Ie.reducer;const ye=()=>{const e=i.useDispatch();return{show:t=>{e(Ee(t))},hide:()=>{e(Oe())}}},he=A.createSlice({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Re=he.actions;var Le=he.reducer;const Ce=()=>{const e=ye(),t=i.useDispatch(),o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),a=f.create({baseURL:o,timeout:6e5,withCredentials:!0});a.defaults.withCredentials=!0,a.interceptors.request.use(e=>{const t=localStorage.getItem("TOKEN");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),a.interceptors.response.use(e=>e,e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))t(Re.setUnAuthenticated()),_.toast.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&402===e.response.status)))t(Re.setUnAuthenticated()),_.toast.error("Your license is missing or has expired,Please reach out to your vendor for assistance.");else if(e&&(e.response&&(e.response.status&&403===e.response.status)))_.toast.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=>{_.toast.error(e)})}else _.toast.error(e.response.data);else _.toast.error("failed to communicate with the server ... try again later");return"ERROR"});return{handleGetRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await a.get(t.endPointURI,{params:{...t.parameters},withCredentials:!0,headers:t.headers,responseType:t?.responseType});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handlePostRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await a.post(t.endPointURI,t.data,{params:t.parameters,responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleDeleteRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await a.delete(t.endPointURI,{params:{...t.parameters},responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},HandleDownloadHTTPPostPDF:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await a.post(t.endPointURI,t.data,{responseType:"blob"});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleUploadRequest:async t=>{if(null===t.files||0===t.files.length)return _.toast.error("You must add files to upload"),"ERROR";const i=new FormData;for(const e of t.files)i.append("files",e);void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let o=await a.post(t.endPointURI,i,{params:t?.parameters,headers:{"Content-Type":"multipart/form-data"}});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==o?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(o),o):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(o),"ERROR")}}},ge=e=>{const[i,o]=s.useState(!1),{t:a}=E.useTranslation();return{ConfirmationWindow:()=>t.jsxs(d.Dialog,{open:i,children:[t.jsx(d.DialogTitle,{children:e.title}),t.jsx(d.DialogContent,{children:t.jsx(d.DialogContentText,{children:e.body})}),t.jsxs(d.DialogActions,{children:[t.jsx(d.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"primary",onClick:()=>{o(!1)},children:a("NO_LABEL")}),t.jsx(d.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"error",onClick:()=>{e.onConfirmationCallBk(),o(!1)},autoFocus:!0,children:a("YES_LABEL")})]})]}),open:i,setOpen:o}},De=()=>{const e=i.useSelector(e=>e.UserSession),t=e.value;return{UserSession:e,isUserAuthorized:t=>{if(e?.value?.authorities)for(let i of e.value.authorities){if("DEVELOPMENT_ADMIN"===t&&("DEVELOPMENT_ADMIN"===i?.authority||"ORGANIZATION_ADMIN"===i?.authority))return!0;if("ORGANIZATION_ADMIN"===t&&"ORGANIZATION_ADMIN"===i?.authority)return!0;if("DEVELOPMENT_ADMIN"!==t&&"ORGANIZATION_ADMIN"!==t&&("ORGANIZATION_ADMIN"===i?.authority||"DEVELOPMENT_ADMIN"===i?.authority||"SYSTEM_ADMIN"===i?.authority||i?.authority===t))return!0}return!1},isCurrentOrganizationAuthorizedToModule:e=>{if(t?.currentOrganization?.systemApplicationModules)for(const i of t.currentOrganization.systemApplicationModules)if(i.toLowerCase()==e.toLowerCase())return!0;return!1},UserInfo:t}},Pe=e=>{const[o,a]=s.useState(!1),r=i.useSelector(e=>e.AppLayout.appDirection);return{windowState:o,setWindowState:a,Window:i=>t.jsx(d.Modal,{open:o,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!o&&e?.onCloseCallBack&&e.onCloseCallBack()},children:t.jsxs(d.Box,{dir:r,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:[t.jsx(d.AppBar,{position:"static",children:t.jsxs(d.Toolbar,{variant:"dense",children:[t.jsx(T.FontAwesomeIcon,{icon:e?.windowIcon||"window-maximize",style:{marginRight:5}}),t.jsx(d.Typography,{variant:"h6",color:"inherit",component:"div",children:e?.windowTitle||"window"}),t.jsx("div",{style:{flexGrow:1}}),t.jsx(d.IconButton,{onClick:()=>{a(!1),null!=e.onCloseCallBack&&null!=e.onCloseCallBack&&e.onCloseCallBack()},color:"secondary",children:t.jsx(T.FontAwesomeIcon,{icon:"xmark-square"})})]})}),t.jsx(d.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:i?.children})]})})}},xe=A.createSlice({name:"commonStores",initialState:{stores:{},storeKeys:[]},reducers:{setStoresMetaData:(e,t)=>{e.stores=t.payload,e.storeKeys=Object.keys(t.payload)},setStoreData:(e,t)=>{e.stores[t.payload.storeKey].data=t.payload.data}}}),{setStoreData:be,setStoresMetaData:Me}=xe.actions;var Se=xe.reducer;const Ue=e=>{const t=i.useSelector(e=>e.commonStores.stores),o=i.useDispatch(),a=De(),{handleGetRequest:r,handlePostRequest:n,handleDeleteRequest:d}=Ce();return{reloadData:async i=>{if(e?.commonStoreKey){const i=Object.keys(t);for(const n of i)if(n===e.commonStoreKey&&(void 0===t[n]?.authority||null===t[n]?.authority||a.isUserAuthorized(t[n]?.authority))&&""!=t[n]?.url){await r({endPointURI:t[n].url,showMask:!1,successCallBkFn:t=>{o(be({storeKey:n,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{o(be({storeKey:n,data:[]})),e.setData([])}});break}}else e?.findAll&&await r({endPointURI:e.findAll,showMask:!0,parameters:i||{},successCallBkFn:t=>{e.setData(t.data)}})},loadRecordById:async t=>{let i=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=t,await r({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async t=>{let i=null;return e?.save&&await n({endPointURI:e.save,data:t,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async t=>{let i=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=t,await d({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},Fe=e=>{const{t:i}=E.useTranslation();return t.jsx(d.TextField,{...e,slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:t.jsx(t.Fragment,{children:e?.label?i(e.label):""}),helperText:e?.helperText?i(e.helperText):void 0})};function we(e,t){return e.filter(e=>-1===t.indexOf(e))}function ve(e,t){return e.filter(e=>-1!==t.indexOf(e))}const Be=({valueField:e="id",displayField:i="name",options:o=[],selectedOptions:a=[],setSelection:r})=>{const[n,l]=pe.useState([]),[s,p]=pe.useState([]),[c,u]=pe.useState([]),[m,T]=pe.useState(""),[A,_]=pe.useState(""),f=ve(n,s),I=ve(n,c);pe.useEffect(()=>{o&&p([...o])},[o]),pe.useEffect(()=>{a&&u([...a])},[a]);const E=e=>()=>{const t=n.indexOf(e),i=[...n];-1===t?i.push(e):i.splice(t,1),l(i)},O=e=>ve(n,e).length,N=e=>()=>{var t,i;O(e)===e.length?l(we(n,e)):l((t=n,i=e,[...t,...we(i,t)]))},y=(o,a,r)=>{const l=a.filter(e=>{if(e[i]){const t=e[i];if("left"===r&&t.toLocaleLowerCase().includes(m.toLocaleLowerCase()))return!0;if("right"===r&&t.toLocaleLowerCase().includes(A.toLocaleLowerCase()))return!0}return!1});return t.jsxs(L,{sx:{height:"100%"},children:[t.jsx(C,{sx:{px:2,py:1},avatar:t.jsx(P,{onClick:N(l),checked:O(l)===l.length&&0!==l.length,indeterminate:O(l)!==l.length&&0!==O(l),disabled:0===l.length,inputProps:{"aria-label":"all items selected"}}),title:o,subheader:`${O(a)} / ${a.length} Selected`}),t.jsx(d.Box,{sx:{width:"100%",padding:1},children:t.jsx(Fe,{fullWidth:!0,label:"search",value:"left"===r?m:A,onChange:e=>{"left"===r?T(e.target.value):_(e.target.value)}})}),t.jsx(b,{}),t.jsx(R,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:l.map(o=>(o[e],t.jsxs(d.ListItemButton,{role:"listitem",onClick:E(o),sx:{cursor:"pointer"},children:[t.jsx(D,{children:t.jsx(P,{checked:-1!==n.indexOf(o),tabIndex:-1,disableRipple:!0})}),t.jsx(g,{id:o[e],primary:o[i]})]},o[e])))})]})};return t.jsxs(d.Grid2,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[t.jsx(d.Grid2,{sx:{height:"100%",flex:1},children:y("Available Items",s,"left")}),t.jsx(d.Grid2,{children:t.jsxs(d.Grid2,{container:!0,direction:"column",alignItems:"center",children:[t.jsx(x,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{u(e=>{let t=c.concat(f);return r(t),t}),p(we(s,f)),l(we(n,f))},disabled:0===f.length,"aria-label":"move selected right",children:">"}),t.jsx(x,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(s.concat(I)),u(e=>{let t=we(c,I);return r(t),t}),l(we(n,I))},disabled:0===I.length,"aria-label":"move selected left",children:"<"})]})}),t.jsx(d.Grid2,{sx:{height:"100%",flex:1},children:y("Currently Selected",c,"right")})]})},ke=e=>{const{t:i}=E.useTranslation();return t.jsx(d.FormControlLabel,{sx:e.sx,hidden:e?.hidden||!1,disabled:e.disabled||!1,required:e.required||!1,control:t.jsx(d.Checkbox,{checked:e?.checkedValue==e.value||"true"===e.value||"1"==e.value,onChange:t=>{void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&(t.target.checked?void 0!==e.checkedValue&&null!=e.checkedValue?e.onChangeCallBack(e.checkedValue):e.onChangeCallBack(!0):void 0!==e.unCheckedValue&&null!=e.unCheckedValue?e.onChangeCallBack(e.unCheckedValue):e.onChangeCallBack(!1))}}),label:i(e.label)})},je=e=>{const o=i.useSelector(e=>e.AppLayout),{t:a}=E.useTranslation();return t.jsx(d.Autocomplete,{sx:e.sx,value:(t=>{for(let i of e.options)if(i[e.valueField]==t)return i;return null})(e.value),options:e.options,disabled:e.disabled,hidden:e?.hidden||!1,onChange:(t,i)=>{if(void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack)if(null!=i){let t=i[e.valueField];e.onChangeCallBack(t,i)}else e.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:t=>null!=t?a(t[e.displayField]):"",renderOption:(i,o)=>t.jsx("li",{...i,children:null!=o?a(o[e.displayField]):""}),slots:{popper:e=>t.jsx(d.Popper,{...e,style:{...e.style,direction:o.appDirection}})},renderInput:i=>t.jsx(d.TextField,{...i,required:e.required||!1,variant:"outlined",slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:a(e.label),error:null!=e.errorMessage&&void 0!==e.errorMessage,helperText:null!=e.errorMessage&&void 0!==e.errorMessage?a(e.errorMessage):""})})},Ge="YYYY-MM-DD",We="YYYY-MM-DD HH:mm:ss",Ye="#37505C",Ve="#ff6d00",qe="#ea690e",Ke="#74776B",ze=e=>{const{t:i}=E.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(M.LocalizationProvider,{dateAdapter:S.AdapterMoment,children:t.jsx(M.DatePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?U(e.value,e?.format||Ge):null,sx:{...e.sx,display:e?.hidden?"none":void 0},label:i(e.label),format:e?.format||Ge,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||Ge)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},He=e=>{const{t:i}=E.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(M.LocalizationProvider,{dateAdapter:S.AdapterMoment,children:t.jsx(M.DateTimePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?U(e.value,e?.format||We):null,label:i(e.label),sx:{...e.sx,display:e?.hidden?"none":void 0},format:e?.format||We,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||We)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},Qe=e=>{const o=i.useSelector(e=>e.AppLayout),a=De(),[r,n]=s.useState([]),{handleGetRequest:d}=Ce();return s.useEffect(()=>{e.lookupType&&(async()=>{await d({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{n(e.data)},failureCallBkFn:()=>{n([])}})})()},[e.lookupType,a.UserSession]),t.jsx(je,{...e,options:r,displayField:"ltr"===o.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},Ze=e=>({...e,type:"string",renderEditCell:e=>t.jsx(ze,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=U(e).format(Ge)),o},valueFormatter:(e,t,i)=>t[i.field]}),$e=e=>({...e,type:"string",renderEditCell:e=>t.jsx(He,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=U(e).format(We)),o},valueFormatter:(e,t,i)=>t[i.field]}),Xe=e=>({...e,type:"custom",valueGetter:e=>e||e,renderCell:e=>{let i=null;try{i=e.colDef.options.find(t=>t[e.colDef.valueField]==e.value)}catch(e){}return t.jsx("div",{children:null!=i?i[e.colDef.displayField]:e.value})},renderEditCell:e=>t.jsx(je,{...e,sx:{width:"100%"},options:e.colDef.options,valueField:e.colDef.valueField,displayField:e.colDef.displayField,onChangeCallBack:(t,i)=>{null===t&&e.api.setEditCellValue({id:e.id,field:e.field,value:null}),e.api.setEditCellValue({id:e.id,field:e.field,value:t})}})}),Je=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:i=>{const o=i?.value;return o===e.checkedValue||"true"===o||1===o||!0===o?t.jsx(T.FontAwesomeIcon,{icon:"check",color:"green"}):t.jsx(T.FontAwesomeIcon,{icon:"xmark",color:"red"})},renderEditCell:i=>t.jsx(ke,{...i,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{i.api.setEditCellValue({id:i.id,field:i.field,value:e})}})}),et=e=>{const t=[];if("field"===e.type&&"props"===e.mode&&e?.props)t.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const i of e.props.elements)t.push(...et(i));return t},tt=e=>{const t=[];for(const i of e)t.push(...et(i));return t},it=(e,t,i)=>{const o=[];for(const a of e)if("text"===a?.fieldType||"number"===a?.fieldType){const e={...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,type:"number"==a?.fieldType?"number":"string",field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200};o.push(e)}else if("date"===a?.fieldType){const e=Ze({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else if("datetime"===a?.fieldType){const e=$e({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else if("checkbox"===a?.fieldType){const e=Je({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,checkedValue:a?.checkedValue,unCheckedValue:a?.unCheckedValue,width:150});o.push(e)}else if("combobox"===a?.fieldType){const e=Xe({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,valueField:a?.optionValueField||"value",displayField:a?.optionDisplayField||"display",options:a?.options||[],flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else if("lookup"===a?.fieldType){const e=Xe({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,lookupType:a?.lookupType,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,valueField:a?.optionValueField||"value",displayField:a?.optionDisplayField||"display",options:a?.options||[],flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else{const e={field:a.fieldName,...a?.gridProps?.muiProps};o.push(e)}return o},ot=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?ce.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ce.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?ce.boolean({required_error:"This field is required"}):ce.boolean().optional().nullable():"combobox"===i.fieldType?i?.comboboxValueDataType?"number"===i?.comboboxValueDataType?t[e]=!0===i?.required?ce.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ce.number().optional().nullable():"string"===i?.comboboxValueDataType&&(t[e]=!0===i?.required?ce.string({message:"This field is required"}).min(1,"This field is required"):ce.string().optional().nullable()):t[e]=!0===i?.required?ce.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ce.number().optional().nullable():t[e]=!0===i?.required?ce.string({message:"This field is required"}).min(1,"This field is required"):ce.string().optional().nullable()}return t},at=(e,t,i)=>{const o=[],a=[];if("exclude"===e.type&&0===e.ids.size)for(const e of t)o.push(e),a.push(e[i]);else if(e?.ids)for(const r of e.ids){const e=t.find(e=>e[i]===r);o.push(e),a.push(r)}return{selectedRecords:o,selectedRecordIds:a}};function rt(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>i.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${i} for the full message.`}function nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dt,lt={exports:{}},st={exports:{}},pt={};var ct,ut,mt,Tt,At,_t,ft,It,Et,Ot,Nt,yt,ht,Rt,Lt,Ct={};
1
+ "use strict";var e=require("@mui/x-data-grid-premium"),t=require("react/jsx-runtime"),i=require("react-redux"),o=require("@fortawesome/fontawesome-svg-core"),a=require("@fortawesome/free-brands-svg-icons"),r=require("@fortawesome/free-regular-svg-icons"),n=require("@fortawesome/free-solid-svg-icons");require("react-toastify/dist/ReactToastify.css");var d=require("@mui/material"),l=require("@emotion/react"),s=require("react"),p=require("@mui/material/styles"),c=require("@mui/material/CssBaseline"),u=require("@mui/material/AppBar"),m=require("@mui/material/Toolbar"),T=require("@fortawesome/react-fontawesome"),A=require("@reduxjs/toolkit"),_=require("react-toastify"),f=require("axios"),I=require("i18next"),E=require("react-i18next"),O=require("react-hook-form"),N=require("react-router-dom"),y=require("@hookform/resolvers/zod"),h=require("zod"),R=require("@mui/material/List"),L=require("@mui/material/Card"),C=require("@mui/material/CardHeader"),g=require("@mui/material/ListItemText"),D=require("@mui/material/ListItemIcon"),P=require("@mui/material/Checkbox"),x=require("@mui/material/Button"),M=require("@mui/material/Divider"),b=require("@mui/x-date-pickers"),S=require("@mui/x-date-pickers/AdapterMoment"),U=require("moment"),F=require("@mui/material/CardActions"),w=require("@mui/material/CardContent"),v=require("@mui/material/CardMedia"),B=require("@mui/material/Typography"),k=require("@mui/lab"),j=require("@mui/x-tree-view/models"),G=require("@mui/x-charts"),W=require("@mui/material/LinearProgress"),Y=require("@mui/material/Box"),V=require("@mui/x-charts/PieChart"),q=require("@mui/material/IconButton"),K=require("@mui/material/Drawer"),z=require("@react-spring/web"),H=require("@mui/material/Collapse"),Q=require("@mui/x-tree-view/RichTreeView"),Z=require("@mui/x-tree-view/TreeItem"),$=require("@mui/x-tree-view/useTreeItem2"),X=require("@mui/x-tree-view/TreeItem2"),J=require("@mui/x-tree-view/TreeItem2Icon"),ee=require("@mui/x-tree-view/TreeItem2Provider"),te=require("@mui/x-tree-view/TreeItem2DragAndDropOverlay"),ie=require("stylis-plugin-rtl"),oe=require("stylis"),ae=require("@emotion/cache"),re=require("@emotion/styled"),ne=require("@mui/material/colors"),de=require("@mui/material/SwipeableDrawer"),le=require("@mui/x-license");function se(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var pe=se(s),ce=se(h);!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===i&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("html,\nbody {\n height: 100vh;\n margin: 0;\n padding: 0;\n}\n\n#root {\n height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n\n.red-row {\n background-color: #f0d8d8;\n}\n");const ue=(e=768)=>{const[t,i]=s.useState(window.innerWidth<e);return s.useEffect(()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t},me=350,Te={themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},Ae=A.createSlice({name:"AppLayout",initialState:Te,reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),_e=Ae.actions;var fe=Ae.reducer;const Ie=A.createSlice({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,t)=>{e.value.isOpened=!0,e.value.message=t.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:Ee,hideLoadingMask:Oe}=Ie.actions;var Ne=Ie.reducer;const ye=()=>{const e=i.useDispatch();return{show:t=>{e(Ee(t))},hide:()=>{e(Oe())}}},he=A.createSlice({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Re=he.actions;var Le=he.reducer;const Ce=()=>{const e=ye(),t=i.useDispatch(),o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),a=f.create({baseURL:o,timeout:6e5,withCredentials:!0});a.defaults.withCredentials=!0,a.interceptors.request.use(e=>{const t=localStorage.getItem("TOKEN");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),a.interceptors.response.use(e=>e,e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))t(Re.setUnAuthenticated()),_.toast.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&402===e.response.status)))t(Re.setUnAuthenticated()),_.toast.error("Your license is missing or has expired,Please reach out to your vendor for assistance.");else if(e&&(e.response&&(e.response.status&&403===e.response.status)))_.toast.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=>{_.toast.error(e)})}else _.toast.error(e.response.data);else _.toast.error("failed to communicate with the server ... try again later");return"ERROR"});return{handleGetRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await a.get(t.endPointURI,{params:{...t.parameters},withCredentials:!0,headers:t.headers,responseType:t?.responseType});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handlePostRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await a.post(t.endPointURI,t.data,{params:t.parameters,responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleDeleteRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await a.delete(t.endPointURI,{params:{...t.parameters},responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},HandleDownloadHTTPPostPDF:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await a.post(t.endPointURI,t.data,{responseType:"blob"});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleUploadRequest:async t=>{if(null===t.files||0===t.files.length)return _.toast.error("You must add files to upload"),"ERROR";const i=new FormData;for(const e of t.files)i.append("files",e);void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let o=await a.post(t.endPointURI,i,{params:t?.parameters,headers:{"Content-Type":"multipart/form-data"}});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==o?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(o),o):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(o),"ERROR")}}},ge=e=>{const[i,o]=s.useState(!1),{t:a}=E.useTranslation();return{ConfirmationWindow:()=>t.jsxs(d.Dialog,{open:i,children:[t.jsx(d.DialogTitle,{children:e.title}),t.jsx(d.DialogContent,{children:t.jsx(d.DialogContentText,{children:e.body})}),t.jsxs(d.DialogActions,{children:[t.jsx(d.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"primary",onClick:()=>{o(!1)},children:a("NO_LABEL")}),t.jsx(d.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"error",onClick:()=>{e.onConfirmationCallBk(),o(!1)},autoFocus:!0,children:a("YES_LABEL")})]})]}),open:i,setOpen:o}},De=()=>{const e=i.useSelector(e=>e.UserSession),t=e.value;return{UserSession:e,isUserAuthorized:t=>{if(e?.value?.authorities)for(let i of e.value.authorities){if("DEVELOPMENT_ADMIN"===t&&("DEVELOPMENT_ADMIN"===i?.authority||"ORGANIZATION_ADMIN"===i?.authority))return!0;if("ORGANIZATION_ADMIN"===t&&"ORGANIZATION_ADMIN"===i?.authority)return!0;if("DEVELOPMENT_ADMIN"!==t&&"ORGANIZATION_ADMIN"!==t&&("ORGANIZATION_ADMIN"===i?.authority||"DEVELOPMENT_ADMIN"===i?.authority||"SYSTEM_ADMIN"===i?.authority||i?.authority===t))return!0}return!1},isCurrentOrganizationAuthorizedToModule:e=>{if(t?.currentOrganization?.systemApplicationModules)for(const i of t.currentOrganization.systemApplicationModules)if(i.toLowerCase()==e.toLowerCase())return!0;return!1},UserInfo:t}},Pe=e=>{const[o,a]=s.useState(!1),r=i.useSelector(e=>e.AppLayout.appDirection);return{windowState:o,setWindowState:a,Window:i=>t.jsx(d.Modal,{open:o,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!o&&e?.onCloseCallBack&&e.onCloseCallBack()},children:t.jsxs(d.Box,{dir:r,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:[t.jsx(d.AppBar,{position:"static",children:t.jsxs(d.Toolbar,{variant:"dense",children:[t.jsx(T.FontAwesomeIcon,{icon:e?.windowIcon||"window-maximize",style:{marginRight:5}}),t.jsx(d.Typography,{variant:"h6",color:"inherit",component:"div",children:e?.windowTitle||"window"}),t.jsx("div",{style:{flexGrow:1}}),t.jsx(d.IconButton,{onClick:()=>{a(!1),null!=e.onCloseCallBack&&null!=e.onCloseCallBack&&e.onCloseCallBack()},color:"secondary",children:t.jsx(T.FontAwesomeIcon,{icon:"xmark-square"})})]})}),t.jsx(d.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:i?.children})]})})}},xe=A.createSlice({name:"commonStores",initialState:{stores:{},storeKeys:[]},reducers:{setStoresMetaData:(e,t)=>{e.stores=t.payload,e.storeKeys=Object.keys(t.payload)},setStoreData:(e,t)=>{e.stores[t.payload.storeKey].data=t.payload.data}}}),{setStoreData:Me,setStoresMetaData:be}=xe.actions;var Se=xe.reducer;const Ue=e=>{const t=i.useSelector(e=>e.commonStores.stores),o=i.useDispatch(),a=De(),{handleGetRequest:r,handlePostRequest:n,handleDeleteRequest:d}=Ce();return{reloadData:async i=>{if(e?.commonStoreKey){const i=Object.keys(t);for(const n of i)if(n===e.commonStoreKey&&(void 0===t[n]?.authority||null===t[n]?.authority||a.isUserAuthorized(t[n]?.authority))&&""!=t[n]?.url){await r({endPointURI:t[n].url,showMask:!1,successCallBkFn:t=>{o(Me({storeKey:n,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{o(Me({storeKey:n,data:[]})),e.setData([])}});break}}else e?.findAll&&await r({endPointURI:e.findAll,showMask:!0,parameters:i||{},successCallBkFn:t=>{e.setData(t.data)}})},loadRecordById:async t=>{let i=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=t,await r({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async t=>{let i=null;return e?.save&&await n({endPointURI:e.save,data:t,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async t=>{let i=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=t,await d({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},Fe=e=>{const{t:i}=E.useTranslation();return t.jsx(d.TextField,{...e,slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:t.jsx(t.Fragment,{children:e?.label?i(e.label):""}),helperText:e?.helperText?i(e.helperText):void 0})};function we(e,t){return e.filter(e=>-1===t.indexOf(e))}function ve(e,t){return e.filter(e=>-1!==t.indexOf(e))}const Be=({valueField:e="id",displayField:i="name",options:o=[],selectedOptions:a=[],setSelection:r})=>{const[n,l]=pe.useState([]),[s,p]=pe.useState([]),[c,u]=pe.useState([]),[m,T]=pe.useState(""),[A,_]=pe.useState(""),f=ve(n,s),I=ve(n,c);pe.useEffect(()=>{o&&p([...o])},[o]),pe.useEffect(()=>{a&&u([...a])},[a]);const E=e=>()=>{const t=n.indexOf(e),i=[...n];-1===t?i.push(e):i.splice(t,1),l(i)},O=e=>ve(n,e).length,N=e=>()=>{var t,i;O(e)===e.length?l(we(n,e)):l((t=n,i=e,[...t,...we(i,t)]))},y=(o,a,r)=>{const l=a.filter(e=>{if(e[i]){const t=e[i];if("left"===r&&t.toLocaleLowerCase().includes(m.toLocaleLowerCase()))return!0;if("right"===r&&t.toLocaleLowerCase().includes(A.toLocaleLowerCase()))return!0}return!1});return t.jsxs(L,{sx:{height:"100%"},children:[t.jsx(C,{sx:{px:2,py:1},avatar:t.jsx(P,{onClick:N(l),checked:O(l)===l.length&&0!==l.length,indeterminate:O(l)!==l.length&&0!==O(l),disabled:0===l.length,inputProps:{"aria-label":"all items selected"}}),title:o,subheader:`${O(a)} / ${a.length} Selected`}),t.jsx(d.Box,{sx:{width:"100%",padding:1},children:t.jsx(Fe,{fullWidth:!0,label:"search",value:"left"===r?m:A,onChange:e=>{"left"===r?T(e.target.value):_(e.target.value)}})}),t.jsx(M,{}),t.jsx(R,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:l.map(o=>(o[e],t.jsxs(d.ListItemButton,{role:"listitem",onClick:E(o),sx:{cursor:"pointer"},children:[t.jsx(D,{children:t.jsx(P,{checked:-1!==n.indexOf(o),tabIndex:-1,disableRipple:!0})}),t.jsx(g,{id:o[e],primary:o[i]})]},o[e])))})]})};return t.jsxs(d.Grid2,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[t.jsx(d.Grid2,{sx:{height:"100%",flex:1},children:y("Available Items",s,"left")}),t.jsx(d.Grid2,{children:t.jsxs(d.Grid2,{container:!0,direction:"column",alignItems:"center",children:[t.jsx(x,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{u(e=>{let t=c.concat(f);return r(t),t}),p(we(s,f)),l(we(n,f))},disabled:0===f.length,"aria-label":"move selected right",children:">"}),t.jsx(x,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(s.concat(I)),u(e=>{let t=we(c,I);return r(t),t}),l(we(n,I))},disabled:0===I.length,"aria-label":"move selected left",children:"<"})]})}),t.jsx(d.Grid2,{sx:{height:"100%",flex:1},children:y("Currently Selected",c,"right")})]})},ke=e=>{const{t:i}=E.useTranslation();return t.jsx(d.FormControlLabel,{sx:e.sx,hidden:e?.hidden||!1,disabled:e.disabled||!1,required:e.required||!1,control:t.jsx(d.Checkbox,{checked:e?.checkedValue==e.value||"true"===e.value||"1"==e.value,onChange:t=>{void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&(t.target.checked?void 0!==e.checkedValue&&null!=e.checkedValue?e.onChangeCallBack(e.checkedValue):e.onChangeCallBack(!0):void 0!==e.unCheckedValue&&null!=e.unCheckedValue?e.onChangeCallBack(e.unCheckedValue):e.onChangeCallBack(!1))}}),label:i(e.label)})},je=e=>{const o=i.useSelector(e=>e.AppLayout),{t:a}=E.useTranslation();return t.jsx(d.Autocomplete,{sx:e.sx,value:(t=>{for(let i of e.options)if(i[e.valueField]==t)return i;return null})(e.value),options:e.options,disabled:e.disabled,hidden:e?.hidden||!1,onChange:(t,i)=>{if(void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack)if(null!=i){let t=i[e.valueField];e.onChangeCallBack(t,i)}else e.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:t=>null!=t?a(t[e.displayField]):"",renderOption:(i,o)=>t.jsx("li",{...i,children:null!=o?a(o[e.displayField]):""}),slots:{popper:e=>t.jsx(d.Popper,{...e,style:{...e.style,direction:o.appDirection}})},renderInput:i=>t.jsx(d.TextField,{...i,required:e.required||!1,variant:"outlined",slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:a(e.label),error:null!=e.errorMessage&&void 0!==e.errorMessage,helperText:null!=e.errorMessage&&void 0!==e.errorMessage?a(e.errorMessage):""})})},Ge="YYYY-MM-DD",We="YYYY-MM-DD HH:mm:ss",Ye="#37505C",Ve="#ff6d00",qe="#ea690e",Ke="#74776B",ze=e=>{const{t:i}=E.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(b.LocalizationProvider,{dateAdapter:S.AdapterMoment,children:t.jsx(b.DatePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?U(e.value,e?.format||Ge):null,sx:{...e.sx,display:e?.hidden?"none":void 0},label:i(e.label),format:e?.format||Ge,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||Ge)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},He=e=>{const{t:i}=E.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(b.LocalizationProvider,{dateAdapter:S.AdapterMoment,children:t.jsx(b.DateTimePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?U(e.value,e?.format||We):null,label:i(e.label),sx:{...e.sx,display:e?.hidden?"none":void 0},format:e?.format||We,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||We)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},Qe=e=>{const o=i.useSelector(e=>e.AppLayout),a=De(),[r,n]=s.useState([]),{handleGetRequest:d}=Ce();return s.useEffect(()=>{e.lookupType&&(async()=>{await d({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{n(e.data)},failureCallBkFn:()=>{n([])}})})()},[e.lookupType,a.UserSession]),t.jsx(je,{...e,options:r,displayField:"ltr"===o.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},Ze=e=>({...e,type:"string",renderEditCell:e=>t.jsx(ze,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=U(e).format(Ge)),o},valueFormatter:(e,t,i)=>t[i.field]}),$e=e=>({...e,type:"string",renderEditCell:e=>t.jsx(He,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=U(e).format(We)),o},valueFormatter:(e,t,i)=>t[i.field]}),Xe=e=>({...e,type:"custom",valueGetter:e=>e||e,renderCell:e=>{let i=null;try{i=e.colDef.options.find(t=>t[e.colDef.valueField]==e.value)}catch(e){}return t.jsx("div",{children:null!=i?i[e.colDef.displayField]:e.value})},renderEditCell:e=>t.jsx(je,{...e,sx:{width:"100%"},options:e.colDef.options,valueField:e.colDef.valueField,displayField:e.colDef.displayField,onChangeCallBack:(t,i)=>{null===t&&e.api.setEditCellValue({id:e.id,field:e.field,value:null}),e.api.setEditCellValue({id:e.id,field:e.field,value:t})}})}),Je=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:i=>{const o=i?.value;return o===e.checkedValue||"true"===o||1===o||!0===o?t.jsx(T.FontAwesomeIcon,{icon:"check",color:"green"}):t.jsx(T.FontAwesomeIcon,{icon:"xmark",color:"red"})},renderEditCell:i=>t.jsx(ke,{...i,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{i.api.setEditCellValue({id:i.id,field:i.field,value:e})}})}),et=e=>{const t=[];if("field"===e.type&&"props"===e.mode&&e?.props)t.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const i of e.props.elements)t.push(...et(i));return t},tt=e=>{const t=[];for(const i of e)t.push(...et(i));return t},it=(e,t,i)=>{const o=[];for(const a of e)if("text"===a?.fieldType||"number"===a?.fieldType){const e={...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,type:"number"==a?.fieldType?"number":"string",field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200};o.push(e)}else if("date"===a?.fieldType){const e=Ze({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else if("datetime"===a?.fieldType){const e=$e({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else if("checkbox"===a?.fieldType){const e=Je({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,checkedValue:a?.checkedValue,unCheckedValue:a?.unCheckedValue,width:150});o.push(e)}else if("combobox"===a?.fieldType){const e=Xe({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,valueField:a?.optionValueField||"value",displayField:a?.optionDisplayField||"display",options:a?.options||[],flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else if("lookup"===a?.fieldType){const e=Xe({...a?.gridProps?.muiProps,editable:null!=a?.gridProps?.muiProps?.editable?a?.gridProps?.muiProps?.editable:t,lookupType:a?.lookupType,field:a?.fieldName,headerName:i(a?.fieldLabel||a?.fieldName),headerAlign:"center",align:"center",hidden:a?.hidden,searchable:a?.gridProps?.searchable,valueField:a?.optionValueField||"value",displayField:a?.optionDisplayField||"display",options:a?.options||[],flex:a?.gridProps?.muiProps?.flex||1,minWidth:a?.gridProps?.muiProps?.width?a?.gridProps?.muiProps?.width:200});o.push(e)}else{const e={field:a.fieldName,...a?.gridProps?.muiProps};o.push(e)}return o},ot=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?ce.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ce.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?ce.boolean({required_error:"This field is required"}):ce.boolean().optional().nullable():"combobox"===i.fieldType?i?.comboboxValueDataType?"number"===i?.comboboxValueDataType?t[e]=!0===i?.required?ce.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ce.number().optional().nullable():"string"===i?.comboboxValueDataType&&(t[e]=!0===i?.required?ce.string({message:"This field is required"}).min(1,"This field is required"):ce.string().optional().nullable()):t[e]=!0===i?.required?ce.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ce.number().optional().nullable():t[e]=!0===i?.required?ce.string({message:"This field is required"}).min(1,"This field is required"):ce.string().optional().nullable()}return t},at=(e,t,i)=>{const o=[],a=[];if("exclude"===e.type&&0===e.ids.size)for(const e of t)o.push(e),a.push(e[i]);else if(e?.ids)for(const r of e.ids){const e=t.find(e=>e[i]===r);o.push(e),a.push(r)}return{selectedRecords:o,selectedRecordIds:a}};function rt(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>i.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${i} for the full message.`}function nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dt,lt={exports:{}},st={exports:{}},pt={};var ct,ut,mt,Tt,At,_t,ft,It,Et,Ot,Nt,yt,ht,Rt,Lt,Ct={};
2
2
  /** @license React v16.13.1
3
3
  * react-is.development.js
4
4
  *
@@ -6,12 +6,12 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */function gt(){return ut||(ut=1,"production"===process.env.NODE_ENV?st.exports=function(){if(dt)return pt;dt=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,n=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,f=e?Symbol.for("react.responder"):60118,I=e?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:switch(e=e.type){case l:case s:case o:case r:case a:case c:return e;default:switch(e=e&&e.$$typeof){case d:case p:case T:case m:case n:return e;default:return u}}case i:return u}}}function O(e){return E(e)===s}return pt.AsyncMode=l,pt.ConcurrentMode=s,pt.ContextConsumer=d,pt.ContextProvider=n,pt.Element=t,pt.ForwardRef=p,pt.Fragment=o,pt.Lazy=T,pt.Memo=m,pt.Portal=i,pt.Profiler=r,pt.StrictMode=a,pt.Suspense=c,pt.isAsyncMode=function(e){return O(e)||E(e)===l},pt.isConcurrentMode=O,pt.isContextConsumer=function(e){return E(e)===d},pt.isContextProvider=function(e){return E(e)===n},pt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},pt.isForwardRef=function(e){return E(e)===p},pt.isFragment=function(e){return E(e)===o},pt.isLazy=function(e){return E(e)===T},pt.isMemo=function(e){return E(e)===m},pt.isPortal=function(e){return E(e)===i},pt.isProfiler=function(e){return E(e)===r},pt.isStrictMode=function(e){return E(e)===a},pt.isSuspense=function(e){return E(e)===c},pt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===r||e===a||e===c||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===m||e.$$typeof===n||e.$$typeof===d||e.$$typeof===p||e.$$typeof===_||e.$$typeof===f||e.$$typeof===I||e.$$typeof===A)},pt.typeOf=E,pt}():st.exports=(ct||(ct=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,n=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,f=e?Symbol.for("react.responder"):60118,I=e?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:var A=e.type;switch(A){case l:case s:case o:case r:case a:case c:return A;default:var _=A&&A.$$typeof;switch(_){case d:case p:case T:case m:case n:return _;default:return u}}case i:return u}}}var O=l,N=s,y=d,h=n,R=t,L=p,C=o,g=T,D=m,P=i,x=r,b=a,M=c,S=!1;function U(e){return E(e)===s}Ct.AsyncMode=O,Ct.ConcurrentMode=N,Ct.ContextConsumer=y,Ct.ContextProvider=h,Ct.Element=R,Ct.ForwardRef=L,Ct.Fragment=C,Ct.Lazy=g,Ct.Memo=D,Ct.Portal=P,Ct.Profiler=x,Ct.StrictMode=b,Ct.Suspense=M,Ct.isAsyncMode=function(e){return S||(S=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),U(e)||E(e)===l},Ct.isConcurrentMode=U,Ct.isContextConsumer=function(e){return E(e)===d},Ct.isContextProvider=function(e){return E(e)===n},Ct.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ct.isForwardRef=function(e){return E(e)===p},Ct.isFragment=function(e){return E(e)===o},Ct.isLazy=function(e){return E(e)===T},Ct.isMemo=function(e){return E(e)===m},Ct.isPortal=function(e){return E(e)===i},Ct.isProfiler=function(e){return E(e)===r},Ct.isStrictMode=function(e){return E(e)===a},Ct.isSuspense=function(e){return E(e)===c},Ct.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===r||e===a||e===c||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===m||e.$$typeof===n||e.$$typeof===d||e.$$typeof===p||e.$$typeof===_||e.$$typeof===f||e.$$typeof===I||e.$$typeof===A)},Ct.typeOf=E}()),Ct)),st.exports}
9
+ */function gt(){return ut||(ut=1,"production"===process.env.NODE_ENV?st.exports=function(){if(dt)return pt;dt=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,n=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,f=e?Symbol.for("react.responder"):60118,I=e?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:switch(e=e.type){case l:case s:case o:case r:case a:case c:return e;default:switch(e=e&&e.$$typeof){case d:case p:case T:case m:case n:return e;default:return u}}case i:return u}}}function O(e){return E(e)===s}return pt.AsyncMode=l,pt.ConcurrentMode=s,pt.ContextConsumer=d,pt.ContextProvider=n,pt.Element=t,pt.ForwardRef=p,pt.Fragment=o,pt.Lazy=T,pt.Memo=m,pt.Portal=i,pt.Profiler=r,pt.StrictMode=a,pt.Suspense=c,pt.isAsyncMode=function(e){return O(e)||E(e)===l},pt.isConcurrentMode=O,pt.isContextConsumer=function(e){return E(e)===d},pt.isContextProvider=function(e){return E(e)===n},pt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},pt.isForwardRef=function(e){return E(e)===p},pt.isFragment=function(e){return E(e)===o},pt.isLazy=function(e){return E(e)===T},pt.isMemo=function(e){return E(e)===m},pt.isPortal=function(e){return E(e)===i},pt.isProfiler=function(e){return E(e)===r},pt.isStrictMode=function(e){return E(e)===a},pt.isSuspense=function(e){return E(e)===c},pt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===r||e===a||e===c||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===m||e.$$typeof===n||e.$$typeof===d||e.$$typeof===p||e.$$typeof===_||e.$$typeof===f||e.$$typeof===I||e.$$typeof===A)},pt.typeOf=E,pt}():st.exports=(ct||(ct=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,n=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,f=e?Symbol.for("react.responder"):60118,I=e?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:var A=e.type;switch(A){case l:case s:case o:case r:case a:case c:return A;default:var _=A&&A.$$typeof;switch(_){case d:case p:case T:case m:case n:return _;default:return u}}case i:return u}}}var O=l,N=s,y=d,h=n,R=t,L=p,C=o,g=T,D=m,P=i,x=r,M=a,b=c,S=!1;function U(e){return E(e)===s}Ct.AsyncMode=O,Ct.ConcurrentMode=N,Ct.ContextConsumer=y,Ct.ContextProvider=h,Ct.Element=R,Ct.ForwardRef=L,Ct.Fragment=C,Ct.Lazy=g,Ct.Memo=D,Ct.Portal=P,Ct.Profiler=x,Ct.StrictMode=M,Ct.Suspense=b,Ct.isAsyncMode=function(e){return S||(S=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),U(e)||E(e)===l},Ct.isConcurrentMode=U,Ct.isContextConsumer=function(e){return E(e)===d},Ct.isContextProvider=function(e){return E(e)===n},Ct.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ct.isForwardRef=function(e){return E(e)===p},Ct.isFragment=function(e){return E(e)===o},Ct.isLazy=function(e){return E(e)===T},Ct.isMemo=function(e){return E(e)===m},Ct.isPortal=function(e){return E(e)===i},Ct.isProfiler=function(e){return E(e)===r},Ct.isStrictMode=function(e){return E(e)===a},Ct.isSuspense=function(e){return E(e)===c},Ct.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===r||e===a||e===c||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===m||e.$$typeof===n||e.$$typeof===d||e.$$typeof===p||e.$$typeof===_||e.$$typeof===f||e.$$typeof===I||e.$$typeof===A)},Ct.typeOf=E}()),Ct)),st.exports}
10
10
  /*
11
11
  object-assign
12
12
  (c) Sindre Sorhus
13
13
  @license MIT
14
- */function Dt(){if(Tt)return mt;Tt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return mt=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,a){for(var r,n,d=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var s in r=Object(arguments[l]))t.call(r,s)&&(d[s]=r[s]);if(e){n=e(r);for(var p=0;p<n.length;p++)i.call(r,n[p])&&(d[n[p]]=r[n[p]])}}return d},mt}function Pt(){if(_t)return At;_t=1;return At="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function xt(){return It?ft:(It=1,ft=Function.call.bind(Object.prototype.hasOwnProperty))}function bt(){if(Ot)return Et;Ot=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Pt(),i={},o=xt();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function a(a,r,n,d,l){if("production"!==process.env.NODE_ENV)for(var s in a)if(o(a,s)){var p;try{if("function"!=typeof a[s]){var c=Error((d||"React class")+": "+n+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}p=a[s](r,s,d,n,null,t)}catch(e){p=e}if(!p||p instanceof Error||e((d||"React class")+": type specification of "+n+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in i)){i[p.message]=!0;var u=l?l():"";e("Failed "+n+" type: "+p.message+(null!=u?u:""))}}}return a.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},Et=a}function Mt(){if(yt)return Nt;yt=1;var e=gt(),t=Dt(),i=Pt(),o=xt(),a=bt(),r=function(){};function n(){return null}return"production"!==process.env.NODE_ENV&&(r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Nt=function(d,l){var s="function"==typeof Symbol&&Symbol.iterator;var p="<<anonymous>>",c={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:T(n),arrayOf:function(e){return T(function(t,o,a,r,n){if("function"!=typeof e)return new m("Property `"+n+"` of component `"+a+"` has invalid PropType notation inside arrayOf.");var d=t[o];if(!Array.isArray(d))return new m("Invalid "+r+" `"+n+"` of type `"+I(d)+"` supplied to `"+a+"`, expected an array.");for(var l=0;l<d.length;l++){var s=e(d,l,a,r,n+"["+l+"]",i);if(s instanceof Error)return s}return null})},element:T(function(e,t,i,o,a){var r=e[t];return d(r)?null:new m("Invalid "+o+" `"+a+"` of type `"+I(r)+"` supplied to `"+i+"`, expected a single ReactElement.")}),elementType:T(function(t,i,o,a,r){var n=t[i];return e.isValidElementType(n)?null:new m("Invalid "+a+" `"+r+"` of type `"+I(n)+"` supplied to `"+o+"`, expected a single ReactElement type.")}),instanceOf:function(e){return T(function(t,i,o,a,r){if(!(t[i]instanceof e)){var n=e.name||p;return new m("Invalid "+a+" `"+r+"` of type `"+(((d=t[i]).constructor&&d.constructor.name?d.constructor.name:p)+"` supplied to `")+o+"`, expected instance of `"+n+"`.")}var d;return null})},node:T(function(e,t,i,o,a){return f(e[t])?null:new m("Invalid "+o+" `"+a+"` supplied to `"+i+"`, expected a ReactNode.")}),objectOf:function(e){return T(function(t,a,r,n,d){if("function"!=typeof e)return new m("Property `"+d+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[a],s=I(l);if("object"!==s)return new m("Invalid "+n+" `"+d+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var p in l)if(o(l,p)){var c=e(l,p,r,n,d+"."+p,i);if(c instanceof Error)return c}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),n;return T(function(t,i,o,a,r){for(var n=t[i],d=0;d<e.length;d++)if(u(n,e[d]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===E(t)?String(t):t});return new m("Invalid "+a+" `"+r+"` of value `"+String(n)+"` supplied to `"+o+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r("Invalid argument supplied to oneOfType, expected an instance of array."),n;for(var t=0;t<e.length;t++){var a=e[t];if("function"!=typeof a)return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(a)+" at index "+t+"."),n}return T(function(t,a,r,n,d){for(var l=[],s=0;s<e.length;s++){var p=(0,e[s])(t,a,r,n,d,i);if(null==p)return null;p.data&&o(p.data,"expectedType")&&l.push(p.data.expectedType)}return new m("Invalid "+n+" `"+d+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return T(function(t,o,a,r,n){var d=t[o],l=I(d);if("object"!==l)return new m("Invalid "+r+" `"+n+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");for(var s in e){var p=e[s];if("function"!=typeof p)return _(a,r,n,s,E(p));var c=p(d,s,a,r,n+"."+s,i);if(c)return c}return null})},exact:function(e){return T(function(a,r,n,d,l){var s=a[r],p=I(s);if("object"!==p)return new m("Invalid "+d+" `"+l+"` of type `"+p+"` supplied to `"+n+"`, expected `object`.");var c=t({},a[r],e);for(var u in c){var T=e[u];if(o(e,u)&&"function"!=typeof T)return _(n,d,l,u,E(T));if(!T)return new m("Invalid "+d+" `"+l+"` key `"+u+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(a[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var A=T(s,u,n,d,l+"."+u,i);if(A)return A}return null})}};function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function m(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function T(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function a(a,n,d,s,c,u,T){if(s=s||p,u=u||d,T!==i){if(l){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var _=s+":"+d;!t[_]&&o<3&&(r("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[_]=!0,o++)}}return null==n[d]?a?null===n[d]?new m("The "+c+" `"+u+"` is marked as required in `"+s+"`, but its value is `null`."):new m("The "+c+" `"+u+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(n,d,s,c,u)}var n=a.bind(null,!1);return n.isRequired=a.bind(null,!0),n}function A(e){return T(function(t,i,o,a,r,n){var d=t[i];return I(d)!==e?new m("Invalid "+a+" `"+r+"` of type `"+E(d)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null})}function _(e,t,i,o,a){return new m((e||"React class")+": "+t+" type `"+i+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function f(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(f);if(null===e||d(e))return!0;var t=function(e){var t=e&&(s&&e[s]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var i,o=t.call(e);if(t!==e.entries){for(;!(i=o.next()).done;)if(!f(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!f(a[1]))return!1}return!0;default:return!1}}function I(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function E(e){if(null==e)return""+e;var t=I(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function O(e){var t=E(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return m.prototype=Error.prototype,c.checkPropTypes=a,c.resetWarningCache=a.resetWarningCache,c.PropTypes=c,c},Nt}function St(){if(Rt)return ht;Rt=1;var e=Pt();function t(){}function i(){}return i.resetWarningCache=t,ht=function(){function o(t,i,o,a,r,n){if(n!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}function a(){return o}o.isRequired=o;var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:a,element:o,elementType:o,instanceOf:a,node:o,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:t};return r.PropTypes=r,r}}function Ut(){if(Lt)return lt.exports;if(Lt=1,"production"!==process.env.NODE_ENV){var e=gt();lt.exports=Mt()(e.isElement,true)}else lt.exports=St()();return lt.exports}var Ft=nt(Ut());var wt,vt={exports:{}},Bt={};function kt(){if(wt)return Bt;wt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),r=Symbol.for("react.consumer"),n=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function T(m){if("object"==typeof m&&null!==m){var T=m.$$typeof;switch(T){case e:switch(m=m.type){case i:case a:case o:case l:case s:case u:return m;default:switch(m=m&&m.$$typeof){case n:case d:case c:case p:case r:return m;default:return T}}case t:return T}}}return Bt.ContextConsumer=r,Bt.ContextProvider=n,Bt.Element=e,Bt.ForwardRef=d,Bt.Fragment=i,Bt.Lazy=c,Bt.Memo=p,Bt.Portal=t,Bt.Profiler=a,Bt.StrictMode=o,Bt.Suspense=l,Bt.SuspenseList=s,Bt.isContextConsumer=function(e){return T(e)===r},Bt.isContextProvider=function(e){return T(e)===n},Bt.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Bt.isForwardRef=function(e){return T(e)===d},Bt.isFragment=function(e){return T(e)===i},Bt.isLazy=function(e){return T(e)===c},Bt.isMemo=function(e){return T(e)===p},Bt.isPortal=function(e){return T(e)===t},Bt.isProfiler=function(e){return T(e)===a},Bt.isStrictMode=function(e){return T(e)===o},Bt.isSuspense=function(e){return T(e)===l},Bt.isSuspenseList=function(e){return T(e)===s},Bt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===o||e===l||e===s||"object"==typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===p||e.$$typeof===n||e.$$typeof===r||e.$$typeof===d||e.$$typeof===m||void 0!==e.getModuleId)},Bt.typeOf=T,Bt}var jt,Gt,Wt={};
14
+ */function Dt(){if(Tt)return mt;Tt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return mt=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,a){for(var r,n,d=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var s in r=Object(arguments[l]))t.call(r,s)&&(d[s]=r[s]);if(e){n=e(r);for(var p=0;p<n.length;p++)i.call(r,n[p])&&(d[n[p]]=r[n[p]])}}return d},mt}function Pt(){if(_t)return At;_t=1;return At="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function xt(){return It?ft:(It=1,ft=Function.call.bind(Object.prototype.hasOwnProperty))}function Mt(){if(Ot)return Et;Ot=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Pt(),i={},o=xt();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function a(a,r,n,d,l){if("production"!==process.env.NODE_ENV)for(var s in a)if(o(a,s)){var p;try{if("function"!=typeof a[s]){var c=Error((d||"React class")+": "+n+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}p=a[s](r,s,d,n,null,t)}catch(e){p=e}if(!p||p instanceof Error||e((d||"React class")+": type specification of "+n+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in i)){i[p.message]=!0;var u=l?l():"";e("Failed "+n+" type: "+p.message+(null!=u?u:""))}}}return a.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},Et=a}function bt(){if(yt)return Nt;yt=1;var e=gt(),t=Dt(),i=Pt(),o=xt(),a=Mt(),r=function(){};function n(){return null}return"production"!==process.env.NODE_ENV&&(r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Nt=function(d,l){var s="function"==typeof Symbol&&Symbol.iterator;var p="<<anonymous>>",c={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:T(n),arrayOf:function(e){return T(function(t,o,a,r,n){if("function"!=typeof e)return new m("Property `"+n+"` of component `"+a+"` has invalid PropType notation inside arrayOf.");var d=t[o];if(!Array.isArray(d))return new m("Invalid "+r+" `"+n+"` of type `"+I(d)+"` supplied to `"+a+"`, expected an array.");for(var l=0;l<d.length;l++){var s=e(d,l,a,r,n+"["+l+"]",i);if(s instanceof Error)return s}return null})},element:T(function(e,t,i,o,a){var r=e[t];return d(r)?null:new m("Invalid "+o+" `"+a+"` of type `"+I(r)+"` supplied to `"+i+"`, expected a single ReactElement.")}),elementType:T(function(t,i,o,a,r){var n=t[i];return e.isValidElementType(n)?null:new m("Invalid "+a+" `"+r+"` of type `"+I(n)+"` supplied to `"+o+"`, expected a single ReactElement type.")}),instanceOf:function(e){return T(function(t,i,o,a,r){if(!(t[i]instanceof e)){var n=e.name||p;return new m("Invalid "+a+" `"+r+"` of type `"+(((d=t[i]).constructor&&d.constructor.name?d.constructor.name:p)+"` supplied to `")+o+"`, expected instance of `"+n+"`.")}var d;return null})},node:T(function(e,t,i,o,a){return f(e[t])?null:new m("Invalid "+o+" `"+a+"` supplied to `"+i+"`, expected a ReactNode.")}),objectOf:function(e){return T(function(t,a,r,n,d){if("function"!=typeof e)return new m("Property `"+d+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[a],s=I(l);if("object"!==s)return new m("Invalid "+n+" `"+d+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var p in l)if(o(l,p)){var c=e(l,p,r,n,d+"."+p,i);if(c instanceof Error)return c}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),n;return T(function(t,i,o,a,r){for(var n=t[i],d=0;d<e.length;d++)if(u(n,e[d]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===E(t)?String(t):t});return new m("Invalid "+a+" `"+r+"` of value `"+String(n)+"` supplied to `"+o+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r("Invalid argument supplied to oneOfType, expected an instance of array."),n;for(var t=0;t<e.length;t++){var a=e[t];if("function"!=typeof a)return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(a)+" at index "+t+"."),n}return T(function(t,a,r,n,d){for(var l=[],s=0;s<e.length;s++){var p=(0,e[s])(t,a,r,n,d,i);if(null==p)return null;p.data&&o(p.data,"expectedType")&&l.push(p.data.expectedType)}return new m("Invalid "+n+" `"+d+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return T(function(t,o,a,r,n){var d=t[o],l=I(d);if("object"!==l)return new m("Invalid "+r+" `"+n+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");for(var s in e){var p=e[s];if("function"!=typeof p)return _(a,r,n,s,E(p));var c=p(d,s,a,r,n+"."+s,i);if(c)return c}return null})},exact:function(e){return T(function(a,r,n,d,l){var s=a[r],p=I(s);if("object"!==p)return new m("Invalid "+d+" `"+l+"` of type `"+p+"` supplied to `"+n+"`, expected `object`.");var c=t({},a[r],e);for(var u in c){var T=e[u];if(o(e,u)&&"function"!=typeof T)return _(n,d,l,u,E(T));if(!T)return new m("Invalid "+d+" `"+l+"` key `"+u+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(a[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var A=T(s,u,n,d,l+"."+u,i);if(A)return A}return null})}};function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function m(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function T(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function a(a,n,d,s,c,u,T){if(s=s||p,u=u||d,T!==i){if(l){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var _=s+":"+d;!t[_]&&o<3&&(r("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[_]=!0,o++)}}return null==n[d]?a?null===n[d]?new m("The "+c+" `"+u+"` is marked as required in `"+s+"`, but its value is `null`."):new m("The "+c+" `"+u+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(n,d,s,c,u)}var n=a.bind(null,!1);return n.isRequired=a.bind(null,!0),n}function A(e){return T(function(t,i,o,a,r,n){var d=t[i];return I(d)!==e?new m("Invalid "+a+" `"+r+"` of type `"+E(d)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null})}function _(e,t,i,o,a){return new m((e||"React class")+": "+t+" type `"+i+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function f(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(f);if(null===e||d(e))return!0;var t=function(e){var t=e&&(s&&e[s]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var i,o=t.call(e);if(t!==e.entries){for(;!(i=o.next()).done;)if(!f(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!f(a[1]))return!1}return!0;default:return!1}}function I(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function E(e){if(null==e)return""+e;var t=I(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function O(e){var t=E(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return m.prototype=Error.prototype,c.checkPropTypes=a,c.resetWarningCache=a.resetWarningCache,c.PropTypes=c,c},Nt}function St(){if(Rt)return ht;Rt=1;var e=Pt();function t(){}function i(){}return i.resetWarningCache=t,ht=function(){function o(t,i,o,a,r,n){if(n!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}function a(){return o}o.isRequired=o;var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:a,element:o,elementType:o,instanceOf:a,node:o,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:t};return r.PropTypes=r,r}}function Ut(){if(Lt)return lt.exports;if(Lt=1,"production"!==process.env.NODE_ENV){var e=gt();lt.exports=bt()(e.isElement,true)}else lt.exports=St()();return lt.exports}var Ft=nt(Ut());var wt,vt={exports:{}},Bt={};function kt(){if(wt)return Bt;wt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),r=Symbol.for("react.consumer"),n=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function T(m){if("object"==typeof m&&null!==m){var T=m.$$typeof;switch(T){case e:switch(m=m.type){case i:case a:case o:case l:case s:case u:return m;default:switch(m=m&&m.$$typeof){case n:case d:case c:case p:case r:return m;default:return T}}case t:return T}}}return Bt.ContextConsumer=r,Bt.ContextProvider=n,Bt.Element=e,Bt.ForwardRef=d,Bt.Fragment=i,Bt.Lazy=c,Bt.Memo=p,Bt.Portal=t,Bt.Profiler=a,Bt.StrictMode=o,Bt.Suspense=l,Bt.SuspenseList=s,Bt.isContextConsumer=function(e){return T(e)===r},Bt.isContextProvider=function(e){return T(e)===n},Bt.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Bt.isForwardRef=function(e){return T(e)===d},Bt.isFragment=function(e){return T(e)===i},Bt.isLazy=function(e){return T(e)===c},Bt.isMemo=function(e){return T(e)===p},Bt.isPortal=function(e){return T(e)===t},Bt.isProfiler=function(e){return T(e)===a},Bt.isStrictMode=function(e){return T(e)===o},Bt.isSuspense=function(e){return T(e)===l},Bt.isSuspenseList=function(e){return T(e)===s},Bt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===o||e===l||e===s||"object"==typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===p||e.$$typeof===n||e.$$typeof===r||e.$$typeof===d||e.$$typeof===m||void 0!==e.getModuleId)},Bt.typeOf=T,Bt}var jt,Gt,Wt={};
15
15
  /**
16
16
  * @license React
17
17
  * react-is.development.js
@@ -20,7 +20,7 @@ object-assign
20
20
  *
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
23
- */function Yt(){return jt||(jt=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var T=e.$$typeof;switch(T){case t:switch(e=e.type){case o:case r:case a:case s:case p:case m:return e;default:switch(e=e&&e.$$typeof){case d:case l:case u:case c:case n:return e;default:return T}}case i:return T}}}var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),d=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"),u=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),T=Symbol.for("react.client.reference");Wt.ContextConsumer=n,Wt.ContextProvider=d,Wt.Element=t,Wt.ForwardRef=l,Wt.Fragment=o,Wt.Lazy=u,Wt.Memo=c,Wt.Portal=i,Wt.Profiler=r,Wt.StrictMode=a,Wt.Suspense=s,Wt.SuspenseList=p,Wt.isContextConsumer=function(t){return e(t)===n},Wt.isContextProvider=function(t){return e(t)===d},Wt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Wt.isForwardRef=function(t){return e(t)===l},Wt.isFragment=function(t){return e(t)===o},Wt.isLazy=function(t){return e(t)===u},Wt.isMemo=function(t){return e(t)===c},Wt.isPortal=function(t){return e(t)===i},Wt.isProfiler=function(t){return e(t)===r},Wt.isStrictMode=function(t){return e(t)===a},Wt.isSuspense=function(t){return e(t)===s},Wt.isSuspenseList=function(t){return e(t)===p},Wt.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===u||e.$$typeof===c||e.$$typeof===d||e.$$typeof===n||e.$$typeof===l||e.$$typeof===T||void 0!==e.getModuleId)},Wt.typeOf=e}()),Wt}function Vt(){return Gt||(Gt=1,"production"===process.env.NODE_ENV?vt.exports=kt():vt.exports=Yt()),vt.exports}var qt=Vt();function Kt(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function zt(e){if(pe.isValidElement(e)||qt.isValidElementType(e)||!Kt(e))return e;const t={};return Object.keys(e).forEach(i=>{t[i]=zt(e[i])}),t}function Ht(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return Kt(e)&&Kt(t)&&Object.keys(t).forEach(a=>{pe.isValidElement(t[a])||qt.isValidElementType(t[a])?o[a]=t[a]:Kt(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Kt(e[a])?o[a]=Ht(e[a],t[a],i):i.clone?o[a]=Kt(t[a])?zt(t[a]):t[a]:o[a]=t[a]}),o}function Qt(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...a}=e,r=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),n=Object.keys(r);function d(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${i})`}function s(e,a){const r=n.indexOf(a);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==r&&"number"==typeof t[n[r]]?t[n[r]]:a)-o/100}${i})`}return{keys:n,values:r,up:d,down:l,between:s,only:function(e){return n.indexOf(e)+1<n.length?s(e,n[n.indexOf(e)+1]):d(e)},not:function(e){const t=n.indexOf(e);return 0===t?d(n[1]):t===n.length-1?l(n[t]):s(e,n[n.indexOf(e)+1]).replace("@media","@media not all and")},unit:i,...a}}function Zt(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const i=/min-width:\s*([0-9.]+)/;return+(e.match(i)?.[1]||0)-+(t.match(i)?.[1]||0)});return i.length?i.reduce((e,i)=>{const o=t[i];return delete e[i],e[i]=o,e},{...t}):t}const $t={borderRadius:4},Xt="production"!==process.env.NODE_ENV?Ft.oneOfType([Ft.number,Ft.string,Ft.object,Ft.array]):{};function Jt(e,t){return t?Ht(e,t,{clone:!1}):e}const ei={xs:0,sm:600,md:900,lg:1200,xl:1536},ti={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ei[e]}px)`},ii={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:ei[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function oi(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||ti;return t.reduce((o,a,r)=>(o[e.up(e.keys[r])]=i(t[r]),o),{})}if("object"==typeof t){const e=o.breakpoints||ti;return Object.keys(t).reduce((a,r)=>{if(n=e.keys,"@"===(d=r)||d.startsWith("@")&&(n.some(e=>d.startsWith(`@${e}`))||d.match(/^@\d/))){const e=function(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:rt(18,`(${t})`));return null}const[,o,a]=i,r=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(r)}(o.containerQueries?o:ii,r);e&&(a[e]=i(t[r],r))}else if(Object.keys(e.values||ei).includes(r)){a[e.up(r)]=i(t[r],r)}else{const e=r;a[e]=t[e]}var n,d;return a},{})}return i(t)}function ai(e,t){return e.reduce((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e},t)}function ri(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":rt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ni(e,t,i=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=i)return i}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function di(e,t,i,o=i){let a;return a="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:ni(e,i)||o,t&&(a=t(a,o,e)),a}function li(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:a}=e,r=e=>{if(null==e[t])return null;const r=e[t],n=ni(e.theme,o)||{};return oi(e,r,e=>{let o=di(n,a,e);return e===o&&"string"==typeof e&&(o=di(n,a,`${t}${"default"===e?"":ri(e)}`,e)),!1===i?o:{[i]:o}})};return r.propTypes="production"!==process.env.NODE_ENV?{[t]:Xt}:{},r.filterProps=[t],r}const si={m:"margin",p:"padding"},pi={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ci={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ui=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}(e=>{if(e.length>2){if(!ci[e])return[e];e=ci[e]}const[t,i]=e.split(""),o=si[t],a=pi[i]||"";return Array.isArray(a)?a.map(e=>o+e):[o+a]}),mi=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ti=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ai=[...mi,...Ti];function _i(e,t,i,o){const a=ni(e,t,!0)??i;return"number"==typeof a||"string"==typeof a?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof a?a.startsWith("var(")&&0===e?0:a.startsWith("var(")&&1===e?a:`calc(${e} * ${a})`:a*e):Array.isArray(a)?e=>{if("string"==typeof e)return e;const i=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(i)?i>a.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${i} > ${a.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const o=a[i];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof a?a:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function fi(e){return _i(e,"spacing",8,"spacing")}function Ii(e,t){return"string"==typeof t||null==t?t:e(t)}function Ei(e,t,i,o){if(!t.includes(i))return null;const a=function(e,t){return i=>e.reduce((e,o)=>(e[o]=Ii(t,i),e),{})}(ui(i),o);return oi(e,e[i],a)}function Oi(e,t){const i=fi(e.theme);return Object.keys(e).map(o=>Ei(e,t,o,i)).reduce(Jt,{})}function Ni(e){return Oi(e,mi)}function yi(e){return Oi(e,Ti)}function hi(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(i=>{e[i]=t}),e),{}),i=e=>Object.keys(e).reduce((i,o)=>t[o]?Jt(i,t[o](e)):i,{});return i.propTypes="production"!==process.env.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},i.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),i}function Ri(e){return"number"!=typeof e?e:`${e}px solid`}function Li(e,t){return li({prop:e,themeKey:"borders",transform:t})}Ni.propTypes="production"!==process.env.NODE_ENV?mi.reduce((e,t)=>(e[t]=Xt,e),{}):{},Ni.filterProps=mi,yi.propTypes="production"!==process.env.NODE_ENV?Ti.reduce((e,t)=>(e[t]=Xt,e),{}):{},yi.filterProps=Ti,"production"===process.env.NODE_ENV||Ai.reduce((e,t)=>(e[t]=Xt,e),{});const Ci=Li("border",Ri),gi=Li("borderTop",Ri),Di=Li("borderRight",Ri),Pi=Li("borderBottom",Ri),xi=Li("borderLeft",Ri),bi=Li("borderColor"),Mi=Li("borderTopColor"),Si=Li("borderRightColor"),Ui=Li("borderBottomColor"),Fi=Li("borderLeftColor"),wi=Li("outline",Ri),vi=Li("outlineColor"),Bi=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=_i(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:Ii(t,e)});return oi(e,e.borderRadius,i)}return null};Bi.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Xt}:{},Bi.filterProps=["borderRadius"],hi(Ci,gi,Di,Pi,xi,bi,Mi,Si,Ui,Fi,Bi,wi,vi);const ki=e=>{if(void 0!==e.gap&&null!==e.gap){const t=_i(e.theme,"spacing",8,"gap"),i=e=>({gap:Ii(t,e)});return oi(e,e.gap,i)}return null};ki.propTypes="production"!==process.env.NODE_ENV?{gap:Xt}:{},ki.filterProps=["gap"];const ji=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=_i(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:Ii(t,e)});return oi(e,e.columnGap,i)}return null};ji.propTypes="production"!==process.env.NODE_ENV?{columnGap:Xt}:{},ji.filterProps=["columnGap"];const Gi=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=_i(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:Ii(t,e)});return oi(e,e.rowGap,i)}return null};Gi.propTypes="production"!==process.env.NODE_ENV?{rowGap:Xt}:{},Gi.filterProps=["rowGap"];function Wi(e,t){return"grey"===t?t:e}hi(ki,ji,Gi,li({prop:"gridColumn"}),li({prop:"gridRow"}),li({prop:"gridAutoFlow"}),li({prop:"gridAutoColumns"}),li({prop:"gridAutoRows"}),li({prop:"gridTemplateColumns"}),li({prop:"gridTemplateRows"}),li({prop:"gridTemplateAreas"}),li({prop:"gridArea"}));function Yi(e){return e<=1&&0!==e?100*e+"%":e}hi(li({prop:"color",themeKey:"palette",transform:Wi}),li({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Wi}),li({prop:"backgroundColor",themeKey:"palette",transform:Wi}));const Vi=li({prop:"width",transform:Yi}),qi=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||ei[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Yi(t)}};return oi(e,e.maxWidth,t)}return null};qi.filterProps=["maxWidth"];const Ki=li({prop:"minWidth",transform:Yi}),zi=li({prop:"height",transform:Yi}),Hi=li({prop:"maxHeight",transform:Yi}),Qi=li({prop:"minHeight",transform:Yi});li({prop:"size",cssProperty:"width",transform:Yi}),li({prop:"size",cssProperty:"height",transform:Yi});hi(Vi,qi,Ki,zi,Hi,Qi,li({prop:"boxSizing"}));const Zi={border:{themeKey:"borders",transform:Ri},borderTop:{themeKey:"borders",transform:Ri},borderRight:{themeKey:"borders",transform:Ri},borderBottom:{themeKey:"borders",transform:Ri},borderLeft:{themeKey:"borders",transform:Ri},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ri},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Bi},color:{themeKey:"palette",transform:Wi},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Wi},backgroundColor:{themeKey:"palette",transform:Wi},p:{style:yi},pt:{style:yi},pr:{style:yi},pb:{style:yi},pl:{style:yi},px:{style:yi},py:{style:yi},padding:{style:yi},paddingTop:{style:yi},paddingRight:{style:yi},paddingBottom:{style:yi},paddingLeft:{style:yi},paddingX:{style:yi},paddingY:{style:yi},paddingInline:{style:yi},paddingInlineStart:{style:yi},paddingInlineEnd:{style:yi},paddingBlock:{style:yi},paddingBlockStart:{style:yi},paddingBlockEnd:{style:yi},m:{style:Ni},mt:{style:Ni},mr:{style:Ni},mb:{style:Ni},ml:{style:Ni},mx:{style:Ni},my:{style:Ni},margin:{style:Ni},marginTop:{style:Ni},marginRight:{style:Ni},marginBottom:{style:Ni},marginLeft:{style:Ni},marginX:{style:Ni},marginY:{style:Ni},marginInline:{style:Ni},marginInlineStart:{style:Ni},marginInlineEnd:{style:Ni},marginBlock:{style:Ni},marginBlockStart:{style:Ni},marginBlockEnd:{style:Ni},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:ki},rowGap:{style:Gi},columnGap:{style:ji},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Yi},maxWidth:{style:qi},minWidth:{transform:Yi},height:{transform:Yi},maxHeight:{transform:Yi},minHeight:{transform:Yi},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 $i=function(){function e(e,t,i,o){const a={[e]:t,theme:i},r=o[e];if(!r)return{[e]:t};const{cssProperty:n=e,themeKey:d,transform:l,style:s}=r;if(null==t)return null;if("typography"===d&&"inherit"===t)return{[e]:t};const p=ni(i,d)||{};if(s)return s(a);return oi(a,t,t=>{let i=di(p,l,t);return t===i&&"string"==typeof t&&(i=di(p,l,`${e}${"default"===t?"":ri(t)}`,t)),!1===n?i:{[n]:i}})}return function t(i){const{sx:o,theme:a={},nested:r}=i||{};if(!o)return null;const n=a.unstable_sxConfig??Zi;function d(i){let o=i;if("function"==typeof i)o=i(a);else if("object"!=typeof i)return i;if(!o)return null;const d=function(e={}){const t=e.keys?.reduce((t,i)=>(t[e.up(i)]={},t),{});return t||{}}(a.breakpoints),l=Object.keys(d);let s=d;return Object.keys(o).forEach(i=>{const r=(d=o[i],l=a,"function"==typeof d?d(l):d);var d,l;if(null!=r)if("object"==typeof r)if(n[i])s=Jt(s,e(i,r,a,n));else{const e=oi({theme:a},r,e=>({[i]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(t);return e.every(e=>i.size===Object.keys(e).length)}(e,r)?s=Jt(s,e):s[i]=t({sx:r,theme:a,nested:!0})}else s=Jt(s,e(i,r,a,n))}),!r&&a.modularCssLayers?{"@layer sx":Zt(a,ai(l,s))}:Zt(a,ai(l,s))}return Array.isArray(o)?o.map(d):d(o)}}();function Xi(e,t){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||"function"!=typeof i.getColorSchemeSelector)return{};let o=i.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function Ji(e=null){const t=pe.useContext(l.ThemeContext);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}$i.filterProps=["sx"];const eo=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:a,shape:r={},...n}=e,d=Qt(i),l=function(e=8,t=fi({spacing:e})){if(e.mui)return e;const i=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const i=t(e);return"number"==typeof i?`${i}px`:i}).join(" "));return i.mui=!0,i}(a);let s=Ht({breakpoints:d,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...$t,...r}},n);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function i(i,o){i.up=(...i)=>t(e.breakpoints.up(...i),o),i.down=(...i)=>t(e.breakpoints.down(...i),o),i.between=(...i)=>t(e.breakpoints.between(...i),o),i.only=(...i)=>t(e.breakpoints.only(...i),o),i.not=(...i)=>{const a=t(e.breakpoints.not(...i),o);return a.includes("not all and")?a.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):a}}const o={},a=e=>(i(o,e),o);return i(a),{...e,containerQueries:a}}(s),s.applyStyles=Xi,s=t.reduce((e,t)=>Ht(e,t),s),s.unstable_sxConfig={...Zi,...n?.unstable_sxConfig},s.unstable_sx=function(e){return $i({sx:e,theme:this})},s}();function to(e){const{sx:t,...i}=e,{systemProps:o,otherProps:a}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??Zi;return Object.keys(e).forEach(o=>{i[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t})(i);let r;return r=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const i=t(...e);return Kt(i)?{...o,...i}:o}:{...o,...t},{...a,sx:r}}const io=e=>e,oo=(()=>{let e=io;return{configure(t){e=t},generate:t=>e(t),reset(){e=io}}})();function ao(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(i=ao(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function ro(){for(var e,t,i=0,o="",a=arguments.length;i<a;i++)(e=arguments[i])&&(t=ao(e))&&(o&&(o+=" "),o+=t);return o}const no={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 lo=function(e={}){const{themeId:i,defaultTheme:o,defaultClassName:a="MuiBox-root",generateClassName:r}=e,n=
23
+ */function Yt(){return jt||(jt=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var T=e.$$typeof;switch(T){case t:switch(e=e.type){case o:case r:case a:case s:case p:case m:return e;default:switch(e=e&&e.$$typeof){case d:case l:case u:case c:case n:return e;default:return T}}case i:return T}}}var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),d=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"),u=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),T=Symbol.for("react.client.reference");Wt.ContextConsumer=n,Wt.ContextProvider=d,Wt.Element=t,Wt.ForwardRef=l,Wt.Fragment=o,Wt.Lazy=u,Wt.Memo=c,Wt.Portal=i,Wt.Profiler=r,Wt.StrictMode=a,Wt.Suspense=s,Wt.SuspenseList=p,Wt.isContextConsumer=function(t){return e(t)===n},Wt.isContextProvider=function(t){return e(t)===d},Wt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Wt.isForwardRef=function(t){return e(t)===l},Wt.isFragment=function(t){return e(t)===o},Wt.isLazy=function(t){return e(t)===u},Wt.isMemo=function(t){return e(t)===c},Wt.isPortal=function(t){return e(t)===i},Wt.isProfiler=function(t){return e(t)===r},Wt.isStrictMode=function(t){return e(t)===a},Wt.isSuspense=function(t){return e(t)===s},Wt.isSuspenseList=function(t){return e(t)===p},Wt.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===u||e.$$typeof===c||e.$$typeof===d||e.$$typeof===n||e.$$typeof===l||e.$$typeof===T||void 0!==e.getModuleId)},Wt.typeOf=e}()),Wt}function Vt(){return Gt||(Gt=1,"production"===process.env.NODE_ENV?vt.exports=kt():vt.exports=Yt()),vt.exports}var qt=Vt();function Kt(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function zt(e){if(pe.isValidElement(e)||qt.isValidElementType(e)||!Kt(e))return e;const t={};return Object.keys(e).forEach(i=>{t[i]=zt(e[i])}),t}function Ht(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return Kt(e)&&Kt(t)&&Object.keys(t).forEach(a=>{pe.isValidElement(t[a])||qt.isValidElementType(t[a])?o[a]=t[a]:Kt(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Kt(e[a])?o[a]=Ht(e[a],t[a],i):i.clone?o[a]=Kt(t[a])?zt(t[a]):t[a]:o[a]=t[a]}),o}function Qt(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...a}=e,r=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),n=Object.keys(r);function d(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${i})`}function s(e,a){const r=n.indexOf(a);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==r&&"number"==typeof t[n[r]]?t[n[r]]:a)-o/100}${i})`}return{keys:n,values:r,up:d,down:l,between:s,only:function(e){return n.indexOf(e)+1<n.length?s(e,n[n.indexOf(e)+1]):d(e)},not:function(e){const t=n.indexOf(e);return 0===t?d(n[1]):t===n.length-1?l(n[t]):s(e,n[n.indexOf(e)+1]).replace("@media","@media not all and")},unit:i,...a}}function Zt(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const i=/min-width:\s*([0-9.]+)/;return+(e.match(i)?.[1]||0)-+(t.match(i)?.[1]||0)});return i.length?i.reduce((e,i)=>{const o=t[i];return delete e[i],e[i]=o,e},{...t}):t}const $t={borderRadius:4},Xt="production"!==process.env.NODE_ENV?Ft.oneOfType([Ft.number,Ft.string,Ft.object,Ft.array]):{};function Jt(e,t){return t?Ht(e,t,{clone:!1}):e}const ei={xs:0,sm:600,md:900,lg:1200,xl:1536},ti={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ei[e]}px)`},ii={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:ei[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function oi(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||ti;return t.reduce((o,a,r)=>(o[e.up(e.keys[r])]=i(t[r]),o),{})}if("object"==typeof t){const e=o.breakpoints||ti;return Object.keys(t).reduce((a,r)=>{if(n=e.keys,"@"===(d=r)||d.startsWith("@")&&(n.some(e=>d.startsWith(`@${e}`))||d.match(/^@\d/))){const e=function(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:rt(18,`(${t})`));return null}const[,o,a]=i,r=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(r)}(o.containerQueries?o:ii,r);e&&(a[e]=i(t[r],r))}else if(Object.keys(e.values||ei).includes(r)){a[e.up(r)]=i(t[r],r)}else{const e=r;a[e]=t[e]}var n,d;return a},{})}return i(t)}function ai(e,t){return e.reduce((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e},t)}function ri(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":rt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ni(e,t,i=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=i)return i}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function di(e,t,i,o=i){let a;return a="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:ni(e,i)||o,t&&(a=t(a,o,e)),a}function li(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:a}=e,r=e=>{if(null==e[t])return null;const r=e[t],n=ni(e.theme,o)||{};return oi(e,r,e=>{let o=di(n,a,e);return e===o&&"string"==typeof e&&(o=di(n,a,`${t}${"default"===e?"":ri(e)}`,e)),!1===i?o:{[i]:o}})};return r.propTypes="production"!==process.env.NODE_ENV?{[t]:Xt}:{},r.filterProps=[t],r}const si={m:"margin",p:"padding"},pi={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ci={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ui=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}(e=>{if(e.length>2){if(!ci[e])return[e];e=ci[e]}const[t,i]=e.split(""),o=si[t],a=pi[i]||"";return Array.isArray(a)?a.map(e=>o+e):[o+a]}),mi=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ti=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ai=[...mi,...Ti];function _i(e,t,i,o){const a=ni(e,t,!0)??i;return"number"==typeof a||"string"==typeof a?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof a?a.startsWith("var(")&&0===e?0:a.startsWith("var(")&&1===e?a:`calc(${e} * ${a})`:a*e):Array.isArray(a)?e=>{if("string"==typeof e)return e;const i=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(i)?i>a.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${i} > ${a.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const o=a[i];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof a?a:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function fi(e){return _i(e,"spacing",8,"spacing")}function Ii(e,t){return"string"==typeof t||null==t?t:e(t)}function Ei(e,t,i,o){if(!t.includes(i))return null;const a=function(e,t){return i=>e.reduce((e,o)=>(e[o]=Ii(t,i),e),{})}(ui(i),o);return oi(e,e[i],a)}function Oi(e,t){const i=fi(e.theme);return Object.keys(e).map(o=>Ei(e,t,o,i)).reduce(Jt,{})}function Ni(e){return Oi(e,mi)}function yi(e){return Oi(e,Ti)}function hi(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(i=>{e[i]=t}),e),{}),i=e=>Object.keys(e).reduce((i,o)=>t[o]?Jt(i,t[o](e)):i,{});return i.propTypes="production"!==process.env.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},i.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),i}function Ri(e){return"number"!=typeof e?e:`${e}px solid`}function Li(e,t){return li({prop:e,themeKey:"borders",transform:t})}Ni.propTypes="production"!==process.env.NODE_ENV?mi.reduce((e,t)=>(e[t]=Xt,e),{}):{},Ni.filterProps=mi,yi.propTypes="production"!==process.env.NODE_ENV?Ti.reduce((e,t)=>(e[t]=Xt,e),{}):{},yi.filterProps=Ti,"production"===process.env.NODE_ENV||Ai.reduce((e,t)=>(e[t]=Xt,e),{});const Ci=Li("border",Ri),gi=Li("borderTop",Ri),Di=Li("borderRight",Ri),Pi=Li("borderBottom",Ri),xi=Li("borderLeft",Ri),Mi=Li("borderColor"),bi=Li("borderTopColor"),Si=Li("borderRightColor"),Ui=Li("borderBottomColor"),Fi=Li("borderLeftColor"),wi=Li("outline",Ri),vi=Li("outlineColor"),Bi=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=_i(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:Ii(t,e)});return oi(e,e.borderRadius,i)}return null};Bi.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Xt}:{},Bi.filterProps=["borderRadius"],hi(Ci,gi,Di,Pi,xi,Mi,bi,Si,Ui,Fi,Bi,wi,vi);const ki=e=>{if(void 0!==e.gap&&null!==e.gap){const t=_i(e.theme,"spacing",8,"gap"),i=e=>({gap:Ii(t,e)});return oi(e,e.gap,i)}return null};ki.propTypes="production"!==process.env.NODE_ENV?{gap:Xt}:{},ki.filterProps=["gap"];const ji=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=_i(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:Ii(t,e)});return oi(e,e.columnGap,i)}return null};ji.propTypes="production"!==process.env.NODE_ENV?{columnGap:Xt}:{},ji.filterProps=["columnGap"];const Gi=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=_i(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:Ii(t,e)});return oi(e,e.rowGap,i)}return null};Gi.propTypes="production"!==process.env.NODE_ENV?{rowGap:Xt}:{},Gi.filterProps=["rowGap"];function Wi(e,t){return"grey"===t?t:e}hi(ki,ji,Gi,li({prop:"gridColumn"}),li({prop:"gridRow"}),li({prop:"gridAutoFlow"}),li({prop:"gridAutoColumns"}),li({prop:"gridAutoRows"}),li({prop:"gridTemplateColumns"}),li({prop:"gridTemplateRows"}),li({prop:"gridTemplateAreas"}),li({prop:"gridArea"}));function Yi(e){return e<=1&&0!==e?100*e+"%":e}hi(li({prop:"color",themeKey:"palette",transform:Wi}),li({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Wi}),li({prop:"backgroundColor",themeKey:"palette",transform:Wi}));const Vi=li({prop:"width",transform:Yi}),qi=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||ei[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Yi(t)}};return oi(e,e.maxWidth,t)}return null};qi.filterProps=["maxWidth"];const Ki=li({prop:"minWidth",transform:Yi}),zi=li({prop:"height",transform:Yi}),Hi=li({prop:"maxHeight",transform:Yi}),Qi=li({prop:"minHeight",transform:Yi});li({prop:"size",cssProperty:"width",transform:Yi}),li({prop:"size",cssProperty:"height",transform:Yi});hi(Vi,qi,Ki,zi,Hi,Qi,li({prop:"boxSizing"}));const Zi={border:{themeKey:"borders",transform:Ri},borderTop:{themeKey:"borders",transform:Ri},borderRight:{themeKey:"borders",transform:Ri},borderBottom:{themeKey:"borders",transform:Ri},borderLeft:{themeKey:"borders",transform:Ri},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ri},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Bi},color:{themeKey:"palette",transform:Wi},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Wi},backgroundColor:{themeKey:"palette",transform:Wi},p:{style:yi},pt:{style:yi},pr:{style:yi},pb:{style:yi},pl:{style:yi},px:{style:yi},py:{style:yi},padding:{style:yi},paddingTop:{style:yi},paddingRight:{style:yi},paddingBottom:{style:yi},paddingLeft:{style:yi},paddingX:{style:yi},paddingY:{style:yi},paddingInline:{style:yi},paddingInlineStart:{style:yi},paddingInlineEnd:{style:yi},paddingBlock:{style:yi},paddingBlockStart:{style:yi},paddingBlockEnd:{style:yi},m:{style:Ni},mt:{style:Ni},mr:{style:Ni},mb:{style:Ni},ml:{style:Ni},mx:{style:Ni},my:{style:Ni},margin:{style:Ni},marginTop:{style:Ni},marginRight:{style:Ni},marginBottom:{style:Ni},marginLeft:{style:Ni},marginX:{style:Ni},marginY:{style:Ni},marginInline:{style:Ni},marginInlineStart:{style:Ni},marginInlineEnd:{style:Ni},marginBlock:{style:Ni},marginBlockStart:{style:Ni},marginBlockEnd:{style:Ni},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:ki},rowGap:{style:Gi},columnGap:{style:ji},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Yi},maxWidth:{style:qi},minWidth:{transform:Yi},height:{transform:Yi},maxHeight:{transform:Yi},minHeight:{transform:Yi},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 $i=function(){function e(e,t,i,o){const a={[e]:t,theme:i},r=o[e];if(!r)return{[e]:t};const{cssProperty:n=e,themeKey:d,transform:l,style:s}=r;if(null==t)return null;if("typography"===d&&"inherit"===t)return{[e]:t};const p=ni(i,d)||{};if(s)return s(a);return oi(a,t,t=>{let i=di(p,l,t);return t===i&&"string"==typeof t&&(i=di(p,l,`${e}${"default"===t?"":ri(t)}`,t)),!1===n?i:{[n]:i}})}return function t(i){const{sx:o,theme:a={},nested:r}=i||{};if(!o)return null;const n=a.unstable_sxConfig??Zi;function d(i){let o=i;if("function"==typeof i)o=i(a);else if("object"!=typeof i)return i;if(!o)return null;const d=function(e={}){const t=e.keys?.reduce((t,i)=>(t[e.up(i)]={},t),{});return t||{}}(a.breakpoints),l=Object.keys(d);let s=d;return Object.keys(o).forEach(i=>{const r=(d=o[i],l=a,"function"==typeof d?d(l):d);var d,l;if(null!=r)if("object"==typeof r)if(n[i])s=Jt(s,e(i,r,a,n));else{const e=oi({theme:a},r,e=>({[i]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(t);return e.every(e=>i.size===Object.keys(e).length)}(e,r)?s=Jt(s,e):s[i]=t({sx:r,theme:a,nested:!0})}else s=Jt(s,e(i,r,a,n))}),!r&&a.modularCssLayers?{"@layer sx":Zt(a,ai(l,s))}:Zt(a,ai(l,s))}return Array.isArray(o)?o.map(d):d(o)}}();function Xi(e,t){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||"function"!=typeof i.getColorSchemeSelector)return{};let o=i.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function Ji(e=null){const t=pe.useContext(l.ThemeContext);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}$i.filterProps=["sx"];const eo=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:a,shape:r={},...n}=e,d=Qt(i),l=function(e=8,t=fi({spacing:e})){if(e.mui)return e;const i=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const i=t(e);return"number"==typeof i?`${i}px`:i}).join(" "));return i.mui=!0,i}(a);let s=Ht({breakpoints:d,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...$t,...r}},n);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function i(i,o){i.up=(...i)=>t(e.breakpoints.up(...i),o),i.down=(...i)=>t(e.breakpoints.down(...i),o),i.between=(...i)=>t(e.breakpoints.between(...i),o),i.only=(...i)=>t(e.breakpoints.only(...i),o),i.not=(...i)=>{const a=t(e.breakpoints.not(...i),o);return a.includes("not all and")?a.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):a}}const o={},a=e=>(i(o,e),o);return i(a),{...e,containerQueries:a}}(s),s.applyStyles=Xi,s=t.reduce((e,t)=>Ht(e,t),s),s.unstable_sxConfig={...Zi,...n?.unstable_sxConfig},s.unstable_sx=function(e){return $i({sx:e,theme:this})},s}();function to(e){const{sx:t,...i}=e,{systemProps:o,otherProps:a}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??Zi;return Object.keys(e).forEach(o=>{i[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t})(i);let r;return r=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const i=t(...e);return Kt(i)?{...o,...i}:o}:{...o,...t},{...a,sx:r}}const io=e=>e,oo=(()=>{let e=io;return{configure(t){e=t},generate:t=>e(t),reset(){e=io}}})();function ao(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(i=ao(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function ro(){for(var e,t,i=0,o="",a=arguments.length;i<a;i++)(e=arguments[i])&&(t=ao(e))&&(o&&(o+=" "),o+=t);return o}const no={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 lo=function(e={}){const{themeId:i,defaultTheme:o,defaultClassName:a="MuiBox-root",generateClassName:r}=e,n=
24
24
  /**
25
25
  * @mui/styled-engine v7.3.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,t){const i=re(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})($i),d=pe.forwardRef(function(e,d){const l=function(e=eo){return Ji(e)}(o),{className:s,component:p="div",...c}=to(e);return t.jsx(n,{as:p,ref:d,className:ro(s,r?r(a):a),theme:i&&l[i]||l,...c})});return d}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=no[t];return o?`${i}-${o}`:`${oo.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:oo.generate});function so(e){return"number"==typeof e&&!isNaN(e)}function po(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function co(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function uo(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function mo(e,t){const i=new Date(e),o=new Date,a=Math.floor((i-o)/1e3),r="rtl"===t?"ar":"en",n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}),d=[{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:t}of d){const i=Math.floor(a/t);if(Math.abs(i)>1)return n.format(i,e)}return"ar"===r?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(lo.propTypes={children:Ft.node,component:Ft.elementType,sx:Ft.oneOfType([Ft.arrayOf(Ft.oneOfType([Ft.func,Ft.object,Ft.bool])),Ft.func,Ft.object])});const To=e=>{if(e?.fieldInfo){const i=e.fieldInfo,o=e?.formManager||null,a=e?.formActions||null,r=e?.formValues||null,n=e?.fieldInfo?.fieldName||null,l=e?.fieldInfo?.fieldType||null;if(!(i&&o&&r&&n&&l))return t.jsx(t.Fragment,{});const s=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(r):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return e.hiddenFields.includes(n)?t.jsx(t.Fragment,{}):t.jsx(d.Grid2,{size:i?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?t.jsx(Fe,{...i.muiTextFieldProps,fullWidth:!0,type:l,disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),label:s(),value:r[n],onChange:t=>{let i=null;""!=t.target.value&&(i="number"===l&&po(t.target.value)?Number(t.target.value):t.target.value),o.setValue(n,i),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,i)},sx:{"& .MuiInputBase-root":{height:`${i?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...i?.formProps?.style},error:null!=o.formState.errors[n],helperText:o?.formState?.errors[n]?.message?.toString()}):"date"===i?.fieldType?t.jsx(ze,{format:i?.dateFormat||Ge,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),label:s(),onChangeCallBack:t=>{o.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t)},value:r[n],error:null!=o.formState.errors[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"datetime"===i?.fieldType?t.jsx(He,{format:i?.dateFormat||We,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),label:s(),onChangeCallBack:t=>{o.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t)},value:r[n],error:null!=o.formState.errors[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"checkbox"===i?.fieldType?t.jsx(ke,{label:s(),onChangeCallBack:t=>{o.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t)},value:r[n],checkedValue:i?.checkedValue||!0,unCheckedValue:i?.unCheckedValue||!1,disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),sx:i?.formProps?.style}):"combobox"===i?.fieldType?t.jsx(je,{sx:i?.formProps?.style||{width:"100%"},label:s(),disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),onChangeCallBack:(t,i)=>{let d=null;t&&(d=t),o.setValue(n,d),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t,i)},options:i?.options||[],displayField:i?.optionDisplayField||"",valueField:i?.optionValueField||"",value:r[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"lookup"===i?.fieldType?t.jsx(Qe,{sx:i?.formProps?.style||{width:"100%"},label:s(),disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),onChangeCallBack:(t,i)=>{let d=null;t&&(d=t),o.setValue(n,d),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t,i)},lookupType:i.lookupType,value:r[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):null})}return t.jsx(t.Fragment,{})},Ao=e=>{const i=De(),{ConfirmationWindow:o,setOpen:a}=ge({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||i.isUserAuthorized(e.authority)?t.jsxs(t.Fragment,{children:[t.jsx(o,{}),t.jsxs(d.Button,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?a(!0):e?.actionFn(e.record)}},children:[e?.icon?t.jsx(T.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx("div",{children:e?.label})]})]}):t.jsx(t.Fragment,{})},_o=e=>{const{t:i}=E.useTranslation();return t.jsx(t.Fragment,{children:t.jsxs(d.Grid2,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?t.jsx(d.Grid2,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:e?.icon?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),t.jsx("div",{children:i(e.label)})]}):t.jsx(t.Fragment,{children:i(e.label)})}):t.jsx(t.Fragment,{}),e?.elements?e.elements.map(i=>"group"===i.type?t.jsx(_o,{...i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"props"===i.mode?t.jsx(To,{fieldInfo:i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"node"===i.mode?t.jsx(d.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?t.jsx(d.Grid2,{size:{sm:12},sx:{padding:1},children:e.actions.map(i=>t.jsx(Ao,{...i,record:e.formValues}))}):t.jsx(t.Fragment,{})]})})},fo=e=>{const o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),[a,r]=s.useState(null);return s.useEffect(()=>{(()=>{let t=o+"/api/v1/attachment/";e?.attachmentId?t+="download?attachmentId="+e.attachmentId:(t+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(t+=`&category=${e.category}`)),r(t)})()},[e]),e?.showAsAvatar?t.jsx(d.Avatar,{sx:e.style,onError:()=>{r(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:a}):t.jsx("img",{src:a,loading:"lazy",alt:"image",onError:()=>{r(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Io=e=>{const{handleGetRequest:i,handleDeleteRequest:o}=Ce(),{isUserAuthorized:a}=De();let r=!0;e?.downloadAuthorityKey&&(r=a(e.downloadAuthorityKey));const{ConfirmationWindow:n,setOpen:l}=ge({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await o({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey,attachmentId:e.id},successCallBkFn:t=>{e.setAttachmentConfig(t.data)},showMask:!0})})()}});return t.jsxs(t.Fragment,{children:[t.jsx(n,{}),t.jsxs(L,{sx:{width:300,border:"0.5px solid gray"},children:[t.jsx(v,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?t.jsx(fo,{attachmentId:e.id}):t.jsx(T.FontAwesomeIcon,{icon:"file",size:"3x"})}),t.jsxs(w,{children:[t.jsx(B,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),t.jsxs(F,{children:[e?.allowDelete?t.jsx(d.IconButton,{size:"small",onClick:()=>{l(!0)},children:t.jsx(d.Tooltip,{title:"Delete Attachment",children:t.jsx(T.FontAwesomeIcon,{icon:"trash"})})}):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),r?t.jsx(d.IconButton,{size:"small",onClick:async()=>{await i({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:e.id},showMask:!0,responseType:"blob",successCallBkFn:t=>{const i=window.URL.createObjectURL(new Blob([t.data])),o=document.createElement("a");o.href=i,o.setAttribute("download",e.fileName),document.body.appendChild(o),o.click(),o.remove()}})},children:t.jsx(d.Tooltip,{title:"Download Attachment",children:t.jsx(T.FontAwesomeIcon,{icon:"download"})})}):t.jsx(t.Fragment,{})]})]})]})},Eo=e=>{const{handleUploadRequest:i,handleGetRequest:o}=Ce(),[a,r]=s.useState(null),[n,l]=s.useState([]),[p,c]=s.useState(null),[u,m]=s.useState(null),[A,f]=s.useState([]),[I,E]=s.useState(null),{isUserAuthorized:O}=De(),N=e=>e.split(".").pop()?.toLowerCase()||"";s.useEffect(()=>{(async()=>{await o({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{E(e.data)}})})()},[e.refKey,e.attachmentCode]),s.useEffect(()=>{if(f(I?.allowedFileTypes?I.allowedFileTypes.split(","):[]),I?.attachmentCategories){const e=[];for(const t of I.attachmentCategories.split(","))e.push({value:t});l(e)}else l([])},[I]);let y=!0;I?.downloadAuthorityKey&&!O(I?.downloadAuthorityKey)&&(y=!1);let h=!0;return!1===e?.enableAttachment&&(h=!1),I?.uploadAuthorityKey&&!O(I.uploadAuthorityKey)&&(h=!1),t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[h?t.jsx(t.Fragment,{children:null==I?.maxAllowedNumberOfFiles||I?.maxAllowedNumberOfFiles>I.refKeyAttachments.length?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(T.FontAwesomeIcon,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),t.jsx("input",{type:"file",style:{margin:20},accept:I?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=N(t.name);if(A.length>0&&!A.includes(e))return void _.toast.error(e+" is not allowed")}r(e.target.files)}}),n.length>0?t.jsx(je,{label:"Attachment Type",sx:{width:300,m:1},options:n,displayField:"value",valueField:"value",value:u,onChangeCallBack:e=>{m(e)}}):t.jsx(t.Fragment,{}),t.jsx(Fe,{label:"Remark",value:p,onChange:e=>c(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),t.jsx(d.Button,{sx:{m:1},variant:"contained",onClick:async()=>{let t=I?.refKeyAttachments.length||0;if(I?.maxAllowedNumberOfFiles&&a.length+t>I.maxAllowedNumberOfFiles)_.toast.error("Maximum number of attachments is "+I.maxAllowedNumberOfFiles);else if(!0===I?.isCategoryRequired&&n.length>0&&(null==u||void 0===u||""===u))_.toast.error("You must selected document type to process your request");else if(a){for(const e of a)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void _.toast.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await i({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:p,category:u},files:a,successCallBkFn:e=>{E(e.data),r(null),m(null),c(null),_.toast.success("Your request has been process successfully")}})}else _.toast.error("You must add files to upload")},children:"Upload"})]}):t.jsx(t.Fragment,{})}):t.jsx(t.Fragment,{}),y&&I?.refKeyAttachments?.length>0?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),t.jsx(d.Grid2,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:I?.refKeyAttachments.map(i=>t.jsx(d.Grid2,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:t.jsx(Io,{...i,attachmentCode:e.attachmentCode,setAttachmentConfig:E,downloadAuthorityKey:I.downloadAuthorityKey,allowDelete:h})}))})]}):t.jsx(t.Fragment,{})]})},Oo=e=>{const o=i.useSelector(e=>e.AppLayout),{t:a}=E.useTranslation();return t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(d.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(T.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),a("WF_ACTION_HISTORY_LABEL")]}),t.jsx(d.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((i,a)=>t.jsx(t.Fragment,{children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[t.jsxs(d.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[t.jsx(d.Box,{sx:{marginBottom:.2},children:i.actionTime}),t.jsxs(B,{children:["via ",i.actionMethod]})]}),t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[t.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:i?.personId+""||"0",style:{m:1,width:70,height:70}}),a!==e.actionHistory.length-1?t.jsx(d.Box,{sx:{marginTop:11,position:"absolute"},children:"|"}):t.jsx(t.Fragment,{})]}),t.jsxs(d.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsxs(d.Box,{sx:{width:"100%"},children:["ltr"===o.appDirection?`${i?.documentActionEnName}`:`${i?.documentActionArName}`,i?.actionComment?" - "+i.actionComment:""]}),t.jsx(d.Box,{sx:{width:"100%"},children:"ltr"===o.appDirection?`${i?.employeeEnName}`:`${i?.employeeArName}`})]})]})}))})]})},No=e=>{const{t:i}=E.useTranslation(),o=De(),{ConfirmationWindow:a,setOpen:r}=ge({body:i(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let n=!0;if(e.authority&&(n=o.isUserAuthorized(e.authority)),n)return t.jsxs(t.Fragment,{children:[t.jsx(a,{}),t.jsxs(d.Button,{onClick:async()=>{if(e?.recordsToProcessActionOn&&e?.recordsToProcessActionOn.length>0){if(e?.preActionValidation)for(const t of e.recordsToProcessActionOn)if(!e.preActionValidation(t))return;!0===e?.isConfirmationRequired?r(!0):(await e.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn),e?.reloadData&&e.reloadData())}else _.toast.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?t.jsx(T.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:e.icon}):t.jsx(t.Fragment,{}),e?.label?i(e.label):t.jsx(t.Fragment,{})]})]})},yo=d.styled(e.QuickFilter)({display:"grid",alignItems:"center"}),ho=d.styled(e.ToolbarButton)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])})),Ro=d.styled(d.TextField)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])})),Lo=i=>{const{t:o}=E.useTranslation(),a=De(),r=!i?.templateProps?.editAction?.authority||a.isUserAuthorized(i.templateProps.editAction.authority),n=at(i?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},i?.templateProps?.data||[],i?.templateProps?.keyColumnName||"id");return t.jsxs(e.Toolbar,{children:[r&&"none"!=i?.templateProps?.editMode?.editMode?t.jsxs(d.Button,{onClick:i?.handleCreateNewRecord,children:[t.jsx(T.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),o("ADD_BTN_LABEL")]}):t.jsx(t.Fragment,{}),i?.templateProps?.rowActions?i.templateProps.rowActions.map((e,t)=>!0===e?.gridActionProps?.multiRecord?s.createElement(No,{...e,key:t,reloadData:async()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:n.selectedRecordIds,recordsToProcessActionOn:n.selectedRecords}):null):t.jsx(t.Fragment,{}),t.jsx(d.Box,{sx:{flex:1,mx:.5},children:i?.templateProps?.tBar}),t.jsx(d.Tooltip,{title:"Columns",children:t.jsx(e.ColumnsPanelTrigger,{render:t.jsx(e.ToolbarButton,{}),children:t.jsx(e.GridViewColumnIcon,{fontSize:"small"})})}),t.jsx(d.Tooltip,{title:"Filters",children:t.jsx(e.FilterPanelTrigger,{render:(i,o)=>t.jsx(e.ToolbarButton,{...i,color:"default",children:t.jsx(d.Badge,{badgeContent:o.filterCount,color:"primary",variant:"dot",children:t.jsx(e.GridFilterListIcon,{fontSize:"small"})})})})}),i?.templateProps?.gridStateKey?t.jsx(d.Tooltip,{title:o("RESET_GRID_STATE"),children:t.jsx(d.IconButton,{onClick:i?.clearGridState,children:t.jsx(T.FontAwesomeIcon,{icon:"eraser"})})}):t.jsx(t.Fragment,{}),t.jsx(d.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),t.jsx(d.Tooltip,{title:o("EXPORT_EXECL_LABEL"),children:t.jsx(e.ExportExcel,{render:t.jsx(d.MenuItem,{}),children:t.jsx(T.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),t.jsxs(yo,{children:[t.jsx(e.QuickFilterTrigger,{render:(e,i)=>t.jsx(d.Tooltip,{title:o("SEARCH_BTN_LABEL"),enterDelay:0,children:t.jsx(ho,{...e,ownerState:{expanded:i.expanded},color:"default","aria-disabled":i.expanded,children:t.jsx(T.FontAwesomeIcon,{icon:"search"})})})}),t.jsx(e.QuickFilterControl,{render:({ref:i,...a},r)=>t.jsx(Ro,{...a,ownerState:{expanded:r.expanded},inputRef:i,"aria-label":"Search",placeholder:`${o("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:t.jsx(d.InputAdornment,{position:"start",children:t.jsx(T.FontAwesomeIcon,{icon:"search"})}),endAdornment:r.value?t.jsx(d.InputAdornment,{position:"end",children:t.jsx(e.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:t.jsx(T.FontAwesomeIcon,{icon:"xmark"})})}):null,...a.slotProps?.input},...a.slotProps}})})]}),t.jsx(d.IconButton,{onClick:()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},children:t.jsx(T.FontAwesomeIcon,{icon:"refresh"})})]})},Co=i=>{const{t:o}=E.useTranslation(),a=De(),{ConfirmationWindow:r,setOpen:n}=ge({body:o(i?.confirmationMessage||"ACTION_CONFIRMATION"),title:o("CONFIRMATION"),onConfirmationCallBk:async()=>{await(i?.actionFn(i.record)),i?.reloadData&&i.reloadData()}});let l=!0;i.authority&&(l=a.isUserAuthorized(i.authority));let s={};i?.getActionIconStyleForRecord&&(s=i.getActionIconStyleForRecord(i.record));let p=!0;i?.isActionVisibleForRecord&&(p=i?.isActionVisibleForRecord(i.record));let c=!1;if(i?.isActionDisabledForRecord&&(c=i.isActionDisabledForRecord(i.record)),l&&p)return t.jsxs(t.Fragment,{children:[t.jsx(r,{}),t.jsx(e.GridActionsCellItem,{disabled:c,icon:t.jsx(d.Tooltip,{title:i?.label?o(i.label):"",children:t.jsx(T.FontAwesomeIcon,{icon:i.icon,style:{...s,color:c?"gray":null!=s?.color?s.color:void 0}})}),showInMenu:i?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!c){if(i?.preActionValidation&&!i.preActionValidation(i.record))return;!0===i?.isConfirmationRequired?n(!0):(await i.actionFn(i.record),!0===i?.gridActionProps?.reloadGridAfterAction&&i?.reloadData&&i.reloadData())}}})]})};let go=-1;const Do=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Po=(e,t)=>{const i=Do(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},xo=["__check__","actions"],bo=o=>{const{t:a}=E.useTranslation(),r=i.useSelector(e=>e.AppLayout),[n,l]=s.useState({}),[p,c]=s.useState(!0),{getLookupOptions:u}=(()=>{const{handleGetRequest:e}=Ce(),t=i.useSelector(e=>e.AppLayout),o=async t=>{let i=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let i=await o(e.lookupType);return{...e,options:i,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:o}})(),{Window:m,setWindowState:A}=Pe({windowTitle:a(o.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),{Window:f,setWindowState:I}=Pe({windowTitle:a(o.gridTitle)+" Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"80%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),[O,y]=s.useState([]),R=tt(o.formElements),L=[],C=s.useMemo(()=>o?.gridStateKey?Do(o.gridStateKey):{},[]);for(const e of R)!0===e?.gridProps?.hidden&&L.push(e.fieldName);let g={};if(C?.columnVisibilityModel){g=C.columnVisibilityModel;const e=Object.keys(g);for(const t of L)e.includes(t)||(g[t]=!1)}else for(const e of L)g[e]=!1;const D=i.useSelector(e=>e.AppLayout.appDirection),[P,x]=s.useState(g),[b,M]=s.useState(C.columnOrder||[]),[S,U]=s.useState(C.columnWidths||{}),[F,w]=s.useState(C.columnGroupingModel||[]);let v=C?.pinnedColumns?.left||[];v=v.filter(e=>!xo.includes(e));let B=C?.pinnedColumns?.right||[]||[];B=B.filter(e=>!xo.includes(e));const[k,j]=s.useState({left:[..."ltr"===D?xo:[],...v],right:[..."rtl"===D?xo:[],...B]}),G=De(),W=N.useNavigate(),[Y,V]=s.useState(null),[q,K]=s.useState(null),[z,H]=s.useState({}),Q=async()=>{let e=it(R,"row"===o?.editMode?.editMode||!1,a);for(let t of e)t?.lookupType&&(t.displayField="ltr"===r.appDirection?"lookupEnDisplay":"lookupArDisplay",t.options=await u(t.lookupType),t.valueField="lookupValue");y(e)},[Z,$]=s.useState({ids:new Set,type:"include"});let X="id";o?.keyColumnName&&(X=o?.keyColumnName);const J=o.setData;let ee=null;ee=o?.validationSchema?o.validationSchema:h.z.object(ot(R));let te=!0;o?.editAction?.authority&&(te=G.isUserAuthorized(o.editAction.authority));let ie=!0;o?.deleteAction?.authority&&(ie=G.isUserAuthorized(o.deleteAction.authority));const{ConfirmationWindow:oe,setOpen:ae}=ge({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;Y&&!0===Y?.isNew||(e=await o.apiActions.deleteRecordById(Y[X])),e&&(o?.deleteAction?.postActionCallBack&&await o.deleteAction.postActionCallBack(Y),J(e=>e.filter(e=>e[X]!=Y[X])))}});let re,ne,de,le,se,pe;"modal"===o?.editMode?.editMode&&(re=o?.editMode?.specs?.modalHeight||"fit-content",ne=o?.editMode?.specs?.modalWidth||"300",de=o?.editMode?.specs?.modalMinHeight,le=o?.editMode?.specs?.modalMinWidth,se=o?.editMode?.specs?.modalIcon||"window",pe=o?.editMode?.specs?.modalTitle||"Record Form");const{Window:ce,setWindowState:ue}=Pe({height:re,minHeight:de,minWidth:le,onCloseCallBack:()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},width:ne,windowIcon:se,windowTitle:pe}),me={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:i=>{const r=i.row,n=[];if("none"!=o?.editMode?.editMode&&(void 0===o?.disableDefaultAction||!o.disableDefaultAction)){const i=z[r[X]]?.mode===e.GridRowModes.Edit;if("row"===o.editMode.editMode&&i)te&&(n.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(T.FontAwesomeIcon,{icon:"save"}),label:a("SAVE_BTN_LABEL"),onClick:()=>{(t=>{const i=t[X];H({...z,[i]:{mode:e.GridRowModes.View}})})(r)}})),n.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(T.FontAwesomeIcon,{icon:"cancel"}),label:a("CANCEL_BTN_LABEL"),onClick:()=>{(t=>{const i=t[X];i&&so(i)&&i<0?(H({...z,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}}),J(e=>{const t=e.filter(e=>e[X]!=i);return t})):H({...z,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}})})(r)},color:"inherit"})));else{if(o?.editAction&&!0===o?.editAction?.isEnabled){let i=!0;o?.editAction?.isActionVisibleForRecord&&(i=o?.editAction?.isActionVisibleForRecord(r));let l=!1;o?.editAction?.isActionDisabledForRecord&&(l=o?.editAction?.isActionDisabledForRecord(r)),te&&i&&n.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(d.Tooltip,{title:a("EDIT_BTN_LABEL"),children:t.jsx(T.FontAwesomeIcon,{icon:"edit",style:{color:l?"gray":void 0}})}),showInMenu:o?.editAction?.gridActionProps?.showInMenu||!1,label:a("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{te&&!l&&(async t=>{if(t)if(K(t),"form"===o.editMode.editMode)W(o.editMode.specs.formRoute+"/"+t[X]);else if("modal"===o.editMode.editMode)ue(!0);else if("row"===o?.editMode?.editMode){const i=t[X];H({...z,[i]:{mode:e.GridRowModes.Edit}})}})(r)}}))}if(o?.deleteAction&&!0===o?.deleteAction?.isEnabled){let i=!0;o?.deleteAction?.isActionVisibleForRecord&&(i=o?.deleteAction?.isActionVisibleForRecord(r));let l=!1;o?.deleteAction?.isActionDisabledForRecord&&(l=o?.deleteAction?.isActionDisabledForRecord(r)),ie&&i&&n.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(d.Tooltip,{title:a("DELETE_BTN_LABEL"),children:t.jsx(T.FontAwesomeIcon,{icon:"trash",style:{color:l?"gray":void 0}})}),showInMenu:o?.deleteAction?.gridActionProps?.showInMenu||!1,label:a("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(ie&&!l){if(o?.deleteAction?.preActionValidation&&!o.deleteAction.preActionValidation(r))return;V(r),ae(!0)}}}))}}}if(r[o?.keyColumnName||"id"]&&r[o?.keyColumnName||"id"]>0&&o?.attachment&&n?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(d.Tooltip,{title:"Attachments",children:t.jsx(T.FontAwesomeIcon,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{l(r),c(!o?.attachment?.enableAttachFn||o.attachment.enableAttachFn(r)),A(!0)}})),r[o?.keyColumnName||"id"]&&r[o?.keyColumnName||"id"]>0&&o?.workFlowDocumentCode&&n?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(d.Tooltip,{title:"Approvals",children:t.jsx(T.FontAwesomeIcon,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{l(r),I(!0)}})),r[o?.keyColumnName||"id"]&&r[o?.keyColumnName||"id"]>0&&o?.rowActions)for(const e of o.rowActions)e?.gridActionProps?.multiRecord&&!0===e?.gridActionProps?.multiRecord||n.push(t.jsx(Co,{...e,record:r,reloadData:async()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)}}));return n}};let Te=[];(void 0===o?.disableDefaultAction||!o.disableDefaultAction||o?.rowActions&&o?.rowActions.length>0)&&Te.push(me),Te=[...Te,...O];s.useEffect(()=>{void 0!==o?.autoLoad&&!0!==o.autoLoad||o.apiActions.reloadData(o?.gridLoadParametersValues),Q()},[]),s.useEffect(()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},[G.UserInfo?.currentOrganization]),s.useEffect(()=>{Q()},[D,o.formElements]);const Ae=s.useMemo(()=>{const e=Te.map(e=>({...e}));if(b.length){const t=new Map(e.map(e=>[e.field,e]));return b.map(e=>t.get(e)).filter(Boolean)}return e},[b,S,Te]);return t.jsxs(t.Fragment,{children:[t.jsx(oe,{}),"modal"===o?.editMode?.editMode?t.jsx(ce,{children:o?.editMode?.specs?.formComponent?t.jsx(o.editMode.specs.formComponent,{recordIdToEdit:q?q[X]:void 0,formCloseCallBk:()=>{ue(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)}}):t.jsx(vo,{keyColumnName:o.keyColumnName,attachment:o.attachment,formValuesChangeCallBk:o?.formProps?.formValuesChangeCallBk,recordIdToEdit:q?q[X]:void 0,formCloseCallBk:()=>{ue(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)},elements:o.formElements,apiActions:o.apiActions,editAuthorityKey:o?.editAction?.authority,formSavedSuccessfullyCallBk:o?.editAction?.postActionCallBack,preSaveValidation:o?.editAction?.preActionValidation,actions:o?.rowActions})}):t.jsx(t.Fragment,{}),void 0!==o?.hideInfoBar||o?.hideInfoBar?t.jsx(t.Fragment,{}):t.jsxs(d.Box,{sx:{display:"flex"},children:[void 0!==o?.hideBackButton||o?.hideBackButton?t.jsx(t.Fragment,{}):t.jsx(d.IconButton,{onClick:()=>{W(-1,{replace:!0})},children:t.jsx(T.FontAwesomeIcon,{icon:"ltr"===D?"arrow-left":"arrow-right"})}),t.jsxs(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[o?.girdIcon?t.jsx(T.FontAwesomeIcon,{icon:o.girdIcon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx(d.Typography,{variant:"h5",children:o?.gridTitle?co(a(o?.gridTitle)):""})]})]}),o?.gridLoadParameters&&o?.gridLoadParameters.length>0&&o?.gridLoadParametersValues&&o?.setGridLoadParametersValues?t.jsxs(d.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(d.AccordionSummary,{expandIcon:t.jsx(e.GridExpandMoreIcon,{}),children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(T.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(d.Typography,{component:"span",children:"Filters"})]})}),t.jsx(d.AccordionDetails,{children:t.jsx(d.Box,{children:t.jsx(vo,{saveButtonSpecs:{label:a("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:a("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?o.setGridLoadParametersValues(e):o.setGridLoadParametersValues({}),o.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o.gridLoadParameters})})})]}):t.jsx(t.Fragment,{}),o?.attachment?t.jsx(m,{children:t.jsx(Eo,{attachmentCode:o.attachment.attachmentCode,refKey:n[o?.keyColumnName||"id"],enableAttachment:p})}):t.jsx(t.Fragment,{}),o?.workFlowDocumentCode?t.jsx(f,{children:t.jsx(wo,{workFlowDocumentCode:o.workFlowDocumentCode,refDocumentId:n[o?.keyColumnName||"id"],postActionCallBk:()=>{I(!1),o.apiActions.reloadData(o.gridLoadParametersValues)},cancelActionCallBk:()=>{I(!1),o.apiActions.reloadData(o.gridLoadParametersValues)}})}):t.jsx(t.Fragment,{}),t.jsx(e.DataGridPremium,{...o?.muiProps,slots:{toolbar:Lo},slotProps:{toolbar:{templateProps:{...o,rowSelectionModel:Z,data:o?.data},handleCreateNewRecord:()=>{if("form"===o?.editMode?.editMode)W(o.editMode.specs.formRoute);else if("modal"===o?.editMode?.editMode)K(null),ue(!0);else if("row"===o?.editMode?.editMode){go-=1;const t={};t[X]=go,t.isNew=!0;for(const e of O)"actions"!=e?.type&&e?.field!=X&&e?.field&&(t[e.field]=null);J(e=>[t,...e]),H(t=>({...t,[go]:{mode:e.GridRowModes.Edit}}))}},clearGridState:()=>{o?.gridStateKey&&localStorage.removeItem(o.gridStateKey),x({}),M([]),U({}),w([]),j({left:[..."ltr"===D?xo:[]],right:[..."rtl"===D?xo:[]]})}}},getRowId:e=>e[X],showToolbar:!0,rows:o?.data,columns:Ae,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==o.editMode.editMode?z:void 0,onRowModesModelChange:"row"==o.editMode.editMode?e=>{H(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async e=>{if("row"===o.editMode.editMode){let i=null;const a=(e=>{try{ee.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof h.z.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(e);if(a){const e=a.split(",");throw _.toast.error(t.jsx("div",{style:{},children:e.map(e=>t.jsxs(t.Fragment,{children:[t.jsx("div",{children:e}),t.jsx(d.Divider,{})]}))})),new Error(a)}if(o?.editAction?.preActionValidation&&!o.editAction.preActionValidation(e))throw new Error("error on the configured presave validation");const r={...e};if(e[X]&&so(e[X])&&Number(e[X])<0&&(r[X]=null),i=await o.apiActions.saveRecord(r),null==i)throw new Error("Failed to process your request, contact your administrator");return o?.editAction?.postActionCallBack&&await o.editAction.postActionCallBack(e),!0===e?.isNew&&J(t=>{const o=t.filter(t=>t[X]!==e[X]);return[i,...o]}),!0===o?.editMode?.reloadAfterSave&&o?.apiActions?.reloadData&&o?.apiActions?.reloadData(o?.gridLoadParametersValues),i}},rowSelectionModel:Z,onRowSelectionModelChange:e=>{$(e)},columnVisibilityModel:P,onColumnVisibilityModelChange:e=>{x(e),o?.gridStateKey&&Po(o.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:i}=e;M(e=>{const a=e.length?[...e]:Te.map(e=>e.field),r=a.indexOf(t.field);return-1===r||(a.splice(r,1),a.splice(i,0,t.field),o?.gridStateKey&&Po(o.gridStateKey,{columnOrder:a})),a})},rowGroupingModel:F,onRowGroupingModelChange:e=>{(e=>{w(e),o?.gridStateKey&&Po(o.gridStateKey,{columnGroupingModel:e})})(e)},sx:{width:"100%"}})]})},Mo=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return t},So=e=>{const[i,o]=s.useState([]);return s.useEffect(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));o(t)},[e.reportData]),t.jsx(bo,{data:i,disableDefaultAction:!0,setData:e.setReportData,formElements:Mo(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()=>{}}})},Uo=e=>{console.log("useParameterPanel","useParameterPanel called");const[i,o]=s.useState({...e?.initialParameterValues}),a=((e,t)=>{const i=[];for(const o of e){const e={type:"field",mode:"props",props:{fieldLabel:o?.parameterLabel,fieldName:o?.parameterCode,fieldType:o?.parameterType,hidden:o?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:o?.mandatory,defaultValue:t[o?.parameterCode]||o?.defaultValue}};i.push(e)}return i})(e.parameters,i);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:r}=E.useTranslation();return t.jsxs(d.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(d.AccordionSummary,{expandIcon:t.jsx(T.FontAwesomeIcon,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(T.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(d.Typography,{component:"span",children:"Filters"})]})}),t.jsx(d.AccordionDetails,{children:t.jsx(d.Box,{children:t.jsx(vo,{saveButtonSpecs:{label:r("Filter"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:r("RESET_BTN_LABEL"),icon:"eraser",hidden:!0,actionButtonVariant:"outlined",actionButtonColor:"error"},actions:[{label:r("RESET_BTN_LABEL"),icon:"eraser",isIdRequired:!1,formActionProps:{enabled:!0},actionFn:async(e,t)=>{o({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{o(null!=t?t:{}),e&&await e(i)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:a})})})]})},parametersValues:i,setParametersValues:o,panelElements:a}},Fo=e=>{const[i,o]=s.useState(null),[a,r]=s.useState(null),[n,l]=s.useState([]),[p,c]=s.useState("WAITING_REPORT_CODE"),{handleGetRequest:u,handlePostRequest:m,HandleDownloadHTTPPostPDF:A}=Ce(),[_,f]=s.useState(null),{ParameterPanel:I,parametersValues:E,panelElements:O,setParametersValues:N}=Uo({parameters:_?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}}),y=async t=>{c("WAITING_RESULT"),"Excel"===_?.reportType?await m({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT"),l(e.data)}}):_?.reportType&&await A({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT");const t=e.headers["content-disposition"];let i="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(i=e[1])}if(i.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),i=URL.createObjectURL(t);o(i)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(t),a=document.createElement("a");a.href=o,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}},failureCallBkFn:e=>{r("Failed To run report ... contact your administrator"),c("ERROR")}})};return s.useEffect(()=>{e?.reportCode&&(async()=>{c("LOADING_METADATA"),await u({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:t=>{f(t.data),!0===e?.byPassParameterEntry||0==t.data.reportParameters.length?(y(E),c("WAITING_RESULT")):c("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{r("Failed loading report metadata ... contact your administrator"),c("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),t.jsxs(t.Fragment,{children:[t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[t.jsxs(d.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[t.jsx(T.FontAwesomeIcon,{icon:"Excel"===_?.reportType?"file-excel":"file-pdf",color:"Excel"===_?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),_?.reportName]}),"Excel"!=_?.reportType&&"SHOWING_RESULT"===p?t.jsxs(t.Fragment,{children:[!0===e?.byPassParameterEntry?t.jsx(t.Fragment,{}):_?.reportParameters.length>0?t.jsx(d.IconButton,{onClick:()=>{c("WAITING_PARAMETER_INPUT")},children:t.jsx(T.FontAwesomeIcon,{icon:"filter"})}):t.jsx(t.Fragment,{}),t.jsx(d.IconButton,{children:t.jsx(T.FontAwesomeIcon,{icon:"refresh",onClick:()=>{y(E)}})})]}):t.jsx(t.Fragment,{})]}),t.jsx(d.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===p&&"Excel"!=_?.reportType?t.jsx(I,{searchBtnClickCallBk:y}):"SHOWING_RESULT"===p||("WAITING_PARAMETER_INPUT"===p||"WAITING_RESULT"===p)&&"Excel"===_?.reportType?"Excel"===_?.reportType?t.jsx(So,{reportData:n,setReportData:l,reloadReport:async()=>{y(E)},gridLoadParameters:O,gridLoadParametersValues:E,setGridLoadParametersValues:N}):t.jsx("iframe",{src:i,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===p?t.jsxs(d.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[t.jsx(T.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),a]}):t.jsx(t.Fragment,{})})]})},wo=e=>{const o=N.useNavigate(),a=i.useSelector(e=>e.AppLayout),{isUserAuthorized:r,UserInfo:n}=De(),{handleGetRequest:l,handlePostRequest:p}=Ce(),[c,u]=s.useState(null),[m,A]=s.useState([]),{t:f}=E.useTranslation(),[I,O]=s.useState(null),[y,h]=s.useState({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:R,setWindowState:L}=Pe({windowTitle:"ltr"===a.appDirection?y?.workflowDocument&&y?.referencedDocument?`${y?.workflowDocument?.documentEnName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:"Document":y?.workflowDocument&&y?.referencedDocument?`${y?.workflowDocument?.documentArName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),C=async()=>{await l({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{h(e.data)},failureCallBkFn:()=>{h({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},g=async()=>{await p({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:y?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:c.id,refDocumentStatus:y?.workflowDocumentStatus?.documentStatusCode,actionComment:I},successCallBkFn:async t=>{c?.post_action_endpoint?await p({endPointURI:c.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:c.id},successCallBkFn:()=>{C(),e?.postActionCallBk&&e.postActionCallBk()}}):C()}})};return s.useEffect(()=>{e.refDocumentId&&e.workFlowDocumentCode&&C()},[e.refDocumentId,e.workFlowDocumentCode]),s.useEffect(()=>{A(y?.nextActions&&y?.nextActions?.length>0?y.nextActions.filter(e=>{if(!y?.workflowDocumentStatus?.nextActionTakersAuthority&&!y?.nextActionTakers)return!0;if(y?.workflowDocumentStatus?.nextActionTakersAuthority&&r(y.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(y?.nextActionTakers)for(const e of y.nextActionTakers)if(n?.username===e?.username||n?.username===e?.USERNAME)return!0;return!1}):[])},[y.nextActions,y.nextActionTakers]),t.jsxs(t.Fragment,{children:[y?.workflowDocumentReport?.id?t.jsx(R,{children:t.jsx(Fo,{reportCode:y?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):t.jsx(t.Fragment,{}),y?.workflowDocument?t.jsxs(d.Box,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.IconButton,{onClick:()=>{o(-1,{replace:!0})},children:t.jsx(T.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(T.FontAwesomeIcon,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?`${y?.workflowDocument?.documentEnName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:`${y?.workflowDocument?.documentArName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`,y?.workflowDocumentStatus?"ltr"===a.appDirection?` ( ${y?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${y?.workflowDocumentStatus?.documentStatusArName} )`:"",t.jsx(d.Box,{sx:{flex:1}}),y?.workflowDocumentReport?.id?t.jsx(d.Button,{onClick:()=>{L(!0)},variant:"outlined",startIcon:t.jsx(T.FontAwesomeIcon,{icon:"eye"}),children:f("VIEW_LABEL")}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),t.jsxs(d.Box,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[m?.length>0?t.jsxs(d.Paper,{sx:{padding:2,display:"flex",flex:1,margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[t.jsx(je,{sx:{marginBottom:2,width:400},label:f("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===a.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:c?.id,options:m,onChangeCallBack:(e,t)=>{u(t)}}),t.jsx(Fe,{sx:{width:400},rows:3,value:I,onChange:e=>{O(e.target.value)},multiline:!0,label:f("WF_COMMENT_LABEL")}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.Button,{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:e.refDocumentId,actionId:c.id},successCallBkFn:()=>{g()}}):g():_.toast.error("You must enter comment for the action to be processed"):_.toast.error("You must select action to process")},children:f("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?t.jsx(d.Button,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:f("WF_CANCEL_BTN_LABEL")}):t.jsx(t.Fragment,{})]}),y?.nextActionTakers&&y.nextActionTakers.length>0?t.jsxs(t.Fragment,{children:[t.jsx(d.Divider,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:t.jsxs(d.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(T.FontAwesomeIcon,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",f("WF_WAITING_FOR_LABEL")]})}),t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:y.nextActionTakers.map(e=>t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[t.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),t.jsxs(d.Box,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsx("div",{children:"ltr"===a.appDirection?e?.employee_en_name:e?.employee_ar_name}),t.jsx("div",{children:e?.email?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),e?.email]}):t.jsx(t.Fragment,{})}),t.jsx("div",{children:e?.mobile_number?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):t.jsx(t.Fragment,{})})]})]}))})]}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),y?.actionsHistory.length>0?t.jsx(Oo,{actionHistory:y.actionsHistory}):t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(d.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(T.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),f("WF_ACTION_HISTORY_LABEL")]}),t.jsx(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},vo=e=>{const{Window:i,setWindowState:o}=Pe({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:a,setWindowState:r}=Pe({windowTitle:"Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[n,l]=s.useState(!0),{t:p}=E.useTranslation(),c=tt(e.elements),u=[];for(const e of c)e?.hidden&&u.push(e.fieldName);const[m,A]=s.useState(u),f={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(f[t.props.fieldName]=t.props.defaultValue);const[I,h]=s.useState([]);let R=null;R=e?.validationSchema?e.validationSchema:ce.object(ot(c));const L=O.useForm({resolver:y.zodResolver(R),defaultValues:f}),C=L.watch(),g=N.useParams(),D=e?.formRouteRecordIdParamName,P=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:D&&g[D]&&(t=g[D]),t){const i=await e.apiActions.loadRecordById(t);if(i){L.reset({...i}),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk({...i},x,L);for(const e of c)"combobox"===e?.fieldType&&i[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?L.setValue(e.fieldName,i[e.fieldName]+""):L.setValue(e.fieldName,i[e.fieldName]))}}else L.reset({})},x={setFieldValue:(e,t)=>{L.setValue(e,t)},hideField:e=>{A(t=>[...t,e])},showField:e=>{A(t=>t.filter(t=>t!==e))},disableField:e=>{h(t=>[...t,e])},enableField:e=>{h(t=>t.filter(t=>t!==e))}};return s.useEffect(()=>{P()},[e?.recordIdToEdit]),s.useEffect(()=>{l(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(C))},[C]),t.jsxs(t.Fragment,{children:[e?.attachment?t.jsx(i,{children:t.jsx(Eo,{attachmentCode:e.attachment.attachmentCode,refKey:C[e?.keyColumnName||"id"],enableAttachment:n})}):t.jsx(t.Fragment,{}),e?.workFlowDocumentCode?t.jsx(a,{children:t.jsx(wo,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:C[e?.keyColumnName||"id"],postActionCallBk:()=>{r(!1),P()},cancelActionCallBk:()=>{r(!1)}})}):t.jsx(t.Fragment,{}),t.jsx(lo,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:t.jsx(d.Grid2,{sx:{width:"100%"},container:!0,children:e.elements.map((i,o)=>"group"===i.type?t.jsx(_o,{...i.props,formManager:L,formValues:C,formActions:x,hiddenFields:m,disabledFields:I},o):"field"===i.type&&"props"===i.mode?t.jsx(To,{fieldInfo:i.props,formManager:L,formValues:C,formActions:x,hiddenFields:m,disabledFields:I,formValuesChangeCallBk:e.formValuesChangeCallBk},o):"field"===i.type&&"node"===i.mode?t.jsx(d.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:L,formValues:C})},o):void 0)})}),t.jsxs(lo,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[C[e?.keyColumnName||"id"]&&e?.attachment?t.jsx(d.Tooltip,{title:"Attachments",children:t.jsx(d.IconButton,{onClick:()=>{o(!0)},children:t.jsx(T.FontAwesomeIcon,{icon:"paperclip"})})}):null,C[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?t.jsx(d.Tooltip,{title:"Approvals",children:t.jsx(d.IconButton,{onClick:()=>{r(!0)},children:t.jsx(T.FontAwesomeIcon,{icon:"stamp"})})}):null,e?.actions?e.actions.map(i=>!1===i?.isIdRequired?t.jsx(Ao,{...i,record:C}):C[e?.keyColumnName||"id"]?!0===i?.formActionProps?.enabled?t.jsx(Ao,{...i,record:C}):t.jsx(t.Fragment,{}):void 0):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),e?.saveButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(d.Button,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?t.jsx(T.FontAwesomeIcon,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:L.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const i=await e.apiActions.saveRecord(t);i&&(L.reset({...i}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(i),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{_.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:p(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(d.Button,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?t.jsx(T.FontAwesomeIcon,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),L.reset(f)},children:p(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Bo=()=>{const{workflowDocumentCode:e,refDocumentId:i}=N.useParams();return t.jsx(wo,{workFlowDocumentCode:e,refDocumentId:i})},ko=e=>t.jsx(G.BarChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),jo=e=>t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[t.jsx(d.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:t.jsx("div",{children:e.record[e.valueField]})}),t.jsx(d.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),Go=e=>t.jsxs(t.Fragment,{children:[t.jsx(d.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(G.Gauge,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),Wo=e=>t.jsx(G.LineChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Yo(e){return t.jsxs(Y,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(Y,{sx:{width:"100%",mr:1},children:t.jsx(W,{variant:"determinate",...e})}),t.jsx(Y,{sx:{minWidth:35},children:t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const Vo=e=>t.jsxs(Y,{sx:{width:"100%"},children:[t.jsx(B,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(Yo,{value:e.record[e.valueField]/e.total*100})]}),qo=e=>{const i=e.data.map((t,i)=>({id:i,value:t[e.valueField],label:t[e.labelField]+""}));return t.jsx(V.PieChart,{series:[{data:i}]})},Ko=e=>{const[i,o]=s.useState(!0),[a,r]=s.useState([]),{handleGetRequest:n}=Ce();s.useEffect(()=>{e.loadWidget?(async()=>{o(!0),await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{o(!1),r(e.data)},failureCallBkFn:()=>{o(!1),r([])}})})():o(!1)},[e.loadWidget,e.loadCounter]);let l=0;if(1==a.length)l=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of a)l+=t[e.verticalAxisField];return t.jsxs(t.Fragment,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?t.jsxs(d.Box,{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):t.jsx(t.Fragment,{}),t.jsx(d.Box,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:i?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),t.jsx("div",{children:"Loading"})]}):"ColumnChart"===e.widgetType?t.jsx(ko,{data:a,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?t.jsx(Wo,{data:a,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?t.jsx(qo,{data:a,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):t.jsxs(d.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[t.jsx(d.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),a.map((i,o)=>"Card"===e.widgetType?t.jsx(d.Grid2,{size:{md:3,xs:12},children:t.jsx(jo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},o)}):"CircularProgress"===e.widgetType?t.jsx(d.Grid2,{size:{md:3,xs:12},children:t.jsx(Go,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):"LinearProgress"===e.widgetType?t.jsx(d.Grid2,{size:{md:3,xs:12},children:t.jsx(Vo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):void 0)]})})]})},zo=e=>{const[i,o]=s.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:a,parametersValues:r}=Uo({parameters:i?.dashboardParameters||[],initialParameterValues:{}}),[n,l]=s.useState(0),[p,c]=s.useState(!1);s.useEffect(()=>{if(null!=i.dashboardCode&&null!=i.dashboardCode&&""!=i.dashboardCode){c(!1);let e=!0;if(i?.dashboardParameters.length>0)for(const t of i?.dashboardParameters)if(!0===t?.mandatory&&(void 0===r[t.parameterCode]||null===r[t.parameterCode]||""===r[t.parameterCode])){e=!1;break}e&&c(e),l(n+1)}},[i?.dashboardParameters,r]);const u=N.useNavigate(),{handleGetRequest:m,handlePostRequest:A}=Ce();return s.useEffect(()=>{e.dashboardCode&&(async()=>{await m({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o(null)}})})()},[e.dashboardCode,e.parameters]),t.jsx(t.Fragment,{children:i?t.jsxs(t.Fragment,{children:[t.jsxs(d.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.IconButton,{onClick:()=>{u(-1,{replace:!0})},children:t.jsx(T.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(T.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),t.jsx(d.Box,{children:i?.dashboardTitle}),t.jsx(d.Box,{sx:{flex:1}})]}),i?.dashboardParameters.length>0?t.jsx(a,{searchBtnClickCallBk:async e=>{l(n+1)}}):t.jsx(t.Fragment,{}),t.jsx(d.Grid2,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:i?.widgets.map((e,i)=>t.jsx(d.Grid2,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=e.widgetType?"column":void 0,height:e?.height||300},size:{md:e?.width,sm:12},children:t.jsx(Ko,{...e,parameterValues:r,loadWidget:p})},i))})]}):t.jsx(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},Ho=()=>{const{dashboardCode:e}=N.useParams();return t.jsx(zo,{dashboardCode:e})},Qo=e=>{const{UserSession:o}=De(),a=i.useSelector(e=>e.AppLayout),r=i.useDispatch(),{handlePostRequest:n}=Ce(),[l,p]=s.useState(o.value.currentOrganization.id);return t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[t.jsx(je,{sx:{width:"100%"},displayField:"ltr"===a.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:o.value.userOrganizations,value:l,onChangeCallBack:e=>{p(e)}}),t.jsx(d.Button,{sx:{m:1},variant:"contained",disabled:null==l||l===o.value.currentOrganization.id,onClick:async()=>{await n({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:o.value.username,orgId:l},data:{},successCallBkFn:t=>{const i={...t.data,isAuthenticated:!0};r(Re.setAuthenticated(i)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},Zo=A.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:$o,setSideBarState:Xo}=Zo.actions;var Jo=Zo.reducer;function ea(e,t){const i=s.useRef(e);s.useEffect(()=>{i.current=e},[e]),s.useEffect(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const ta=d.keyframes`
31
+ function(e,t){const i=re(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})($i),d=pe.forwardRef(function(e,d){const l=function(e=eo){return Ji(e)}(o),{className:s,component:p="div",...c}=to(e);return t.jsx(n,{as:p,ref:d,className:ro(s,r?r(a):a),theme:i&&l[i]||l,...c})});return d}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=no[t];return o?`${i}-${o}`:`${oo.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:oo.generate});function so(e){return"number"==typeof e&&!isNaN(e)}function po(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function co(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function uo(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function mo(e,t){const i=new Date(e),o=new Date,a=Math.floor((i-o)/1e3),r="rtl"===t?"ar":"en",n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}),d=[{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:t}of d){const i=Math.floor(a/t);if(Math.abs(i)>1)return n.format(i,e)}return"ar"===r?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(lo.propTypes={children:Ft.node,component:Ft.elementType,sx:Ft.oneOfType([Ft.arrayOf(Ft.oneOfType([Ft.func,Ft.object,Ft.bool])),Ft.func,Ft.object])});const To=e=>{if(e?.fieldInfo){const i=e.fieldInfo,o=e?.formManager||null,a=e?.formActions||null,r=e?.formValues||null,n=e?.fieldInfo?.fieldName||null,l=e?.fieldInfo?.fieldType||null;if(!(i&&o&&r&&n&&l))return t.jsx(t.Fragment,{});const s=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(r):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return e.hiddenFields.includes(n)?t.jsx(t.Fragment,{}):t.jsx(d.Grid2,{size:i?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?t.jsx(Fe,{...i.muiTextFieldProps,fullWidth:!0,type:l,disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),label:s(),value:r[n],onChange:t=>{let i=null;""!=t.target.value&&(i="number"===l&&po(t.target.value)?Number(t.target.value):t.target.value),o.setValue(n,i),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,i)},sx:{"& .MuiInputBase-root":{height:`${i?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...i?.formProps?.style},error:null!=o.formState.errors[n],helperText:o?.formState?.errors[n]?.message?.toString()}):"date"===i?.fieldType?t.jsx(ze,{format:i?.dateFormat||Ge,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),label:s(),onChangeCallBack:t=>{o.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t)},value:r[n],error:null!=o.formState.errors[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"datetime"===i?.fieldType?t.jsx(He,{format:i?.dateFormat||We,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),label:s(),onChangeCallBack:t=>{o.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t)},value:r[n],error:null!=o.formState.errors[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"checkbox"===i?.fieldType?t.jsx(ke,{label:s(),onChangeCallBack:t=>{o.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t)},value:r[n],checkedValue:i?.checkedValue||!0,unCheckedValue:i?.unCheckedValue||!1,disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),sx:i?.formProps?.style}):"combobox"===i?.fieldType?t.jsx(je,{sx:i?.formProps?.style||{width:"100%"},label:s(),disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),onChangeCallBack:(t,i)=>{let d=null;t&&(d=t),o.setValue(n,d),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t,i)},options:i?.options||[],displayField:i?.optionDisplayField||"",valueField:i?.optionValueField||"",value:r[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"lookup"===i?.fieldType?t.jsx(Qe,{sx:i?.formProps?.style||{width:"100%"},label:s(),disabled:!(!i?.disabled&&!e.disabledFields.includes(n)),onChangeCallBack:(t,i)=>{let d=null;t&&(d=t),o.setValue(n,d),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,a,o,n,t,i)},lookupType:i.lookupType,value:r[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):null})}return t.jsx(t.Fragment,{})},Ao=e=>{const i=De(),{ConfirmationWindow:o,setOpen:a}=ge({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||i.isUserAuthorized(e.authority)?t.jsxs(t.Fragment,{children:[t.jsx(o,{}),t.jsxs(d.Button,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?a(!0):e?.actionFn(e.record)}},children:[e?.icon?t.jsx(T.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx("div",{children:e?.label})]})]}):t.jsx(t.Fragment,{})},_o=e=>{const{t:i}=E.useTranslation();return t.jsx(t.Fragment,{children:t.jsxs(d.Grid2,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?t.jsx(d.Grid2,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:e?.icon?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),t.jsx("div",{children:i(e.label)})]}):t.jsx(t.Fragment,{children:i(e.label)})}):t.jsx(t.Fragment,{}),e?.elements?e.elements.map(i=>"group"===i.type?t.jsx(_o,{...i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"props"===i.mode?t.jsx(To,{fieldInfo:i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"node"===i.mode?t.jsx(d.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?t.jsx(d.Grid2,{size:{sm:12},sx:{padding:1},children:e.actions.map(i=>t.jsx(Ao,{...i,record:e.formValues}))}):t.jsx(t.Fragment,{})]})})},fo=e=>{const o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),[a,r]=s.useState(null);return s.useEffect(()=>{(()=>{let t=o+"/api/v1/attachment/";e?.attachmentId?t+="download?attachmentId="+e.attachmentId:(t+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(t+=`&category=${e.category}`)),r(t)})()},[e]),e?.showAsAvatar?t.jsx(d.Avatar,{sx:e.style,onError:()=>{r(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:a}):t.jsx("img",{src:a,loading:"lazy",alt:"image",onError:()=>{r(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Io=e=>{const{handleGetRequest:i,handleDeleteRequest:o}=Ce(),{isUserAuthorized:a}=De();let r=!0;e?.downloadAuthorityKey&&(r=a(e.downloadAuthorityKey));const{ConfirmationWindow:n,setOpen:l}=ge({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await o({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey,attachmentId:e.id},successCallBkFn:t=>{e.setAttachmentConfig(t.data)},showMask:!0})})()}});return t.jsxs(t.Fragment,{children:[t.jsx(n,{}),t.jsxs(L,{sx:{width:300,border:"0.5px solid gray"},children:[t.jsx(v,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?t.jsx(fo,{attachmentId:e.id}):t.jsx(T.FontAwesomeIcon,{icon:"file",size:"3x"})}),t.jsxs(w,{children:[t.jsx(B,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),t.jsxs(F,{children:[e?.allowDelete?t.jsx(d.IconButton,{size:"small",onClick:()=>{l(!0)},children:t.jsx(d.Tooltip,{title:"Delete Attachment",children:t.jsx(T.FontAwesomeIcon,{icon:"trash"})})}):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),r?t.jsx(d.IconButton,{size:"small",onClick:async()=>{await i({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:e.id},showMask:!0,responseType:"blob",successCallBkFn:t=>{const i=window.URL.createObjectURL(new Blob([t.data])),o=document.createElement("a");o.href=i,o.setAttribute("download",e.fileName),document.body.appendChild(o),o.click(),o.remove()}})},children:t.jsx(d.Tooltip,{title:"Download Attachment",children:t.jsx(T.FontAwesomeIcon,{icon:"download"})})}):t.jsx(t.Fragment,{})]})]})]})},Eo=e=>{const{handleUploadRequest:i,handleGetRequest:o}=Ce(),[a,r]=s.useState(null),[n,l]=s.useState([]),[p,c]=s.useState(null),[u,m]=s.useState(null),[A,f]=s.useState([]),[I,E]=s.useState(null),{isUserAuthorized:O}=De(),N=e=>e.split(".").pop()?.toLowerCase()||"";s.useEffect(()=>{(async()=>{await o({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{E(e.data)}})})()},[e.refKey,e.attachmentCode]),s.useEffect(()=>{if(f(I?.allowedFileTypes?I.allowedFileTypes.split(","):[]),I?.attachmentCategories){const e=[];for(const t of I.attachmentCategories.split(","))e.push({value:t});l(e)}else l([])},[I]);let y=!0;I?.downloadAuthorityKey&&!O(I?.downloadAuthorityKey)&&(y=!1);let h=!0;return!1===e?.enableAttachment&&(h=!1),I?.uploadAuthorityKey&&!O(I.uploadAuthorityKey)&&(h=!1),t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[h?t.jsx(t.Fragment,{children:null==I?.maxAllowedNumberOfFiles||I?.maxAllowedNumberOfFiles>I.refKeyAttachments.length?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(T.FontAwesomeIcon,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),t.jsx("input",{type:"file",style:{margin:20},accept:I?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=N(t.name);if(A.length>0&&!A.includes(e))return void _.toast.error(e+" is not allowed")}r(e.target.files)}}),n.length>0?t.jsx(je,{label:"Attachment Type",sx:{width:300,m:1},options:n,displayField:"value",valueField:"value",value:u,onChangeCallBack:e=>{m(e)}}):t.jsx(t.Fragment,{}),t.jsx(Fe,{label:"Remark",value:p,onChange:e=>c(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),t.jsx(d.Button,{sx:{m:1},variant:"contained",onClick:async()=>{let t=I?.refKeyAttachments.length||0;if(I?.maxAllowedNumberOfFiles&&a.length+t>I.maxAllowedNumberOfFiles)_.toast.error("Maximum number of attachments is "+I.maxAllowedNumberOfFiles);else if(!0===I?.isCategoryRequired&&n.length>0&&(null==u||void 0===u||""===u))_.toast.error("You must selected document type to process your request");else if(a){for(const e of a)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void _.toast.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await i({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:p,category:u},files:a,successCallBkFn:e=>{E(e.data),r(null),m(null),c(null),_.toast.success("Your request has been process successfully")}})}else _.toast.error("You must add files to upload")},children:"Upload"})]}):t.jsx(t.Fragment,{})}):t.jsx(t.Fragment,{}),y&&I?.refKeyAttachments?.length>0?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),t.jsx(d.Grid2,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:I?.refKeyAttachments.map(i=>t.jsx(d.Grid2,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:t.jsx(Io,{...i,attachmentCode:e.attachmentCode,setAttachmentConfig:E,downloadAuthorityKey:I.downloadAuthorityKey,allowDelete:h})}))})]}):t.jsx(t.Fragment,{})]})},Oo=e=>{const o=i.useSelector(e=>e.AppLayout),{t:a}=E.useTranslation();return t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(d.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(T.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),a("WF_ACTION_HISTORY_LABEL")]}),t.jsx(d.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((i,a)=>t.jsx(t.Fragment,{children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[t.jsxs(d.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[t.jsx(d.Box,{sx:{marginBottom:.2},children:i.actionTime}),t.jsxs(B,{children:["via ",i.actionMethod]})]}),t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[t.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:i?.personId+""||"0",style:{m:1,width:70,height:70}}),a!==e.actionHistory.length-1?t.jsx(d.Box,{sx:{marginTop:11,position:"absolute"},children:"|"}):t.jsx(t.Fragment,{})]}),t.jsxs(d.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsxs(d.Box,{sx:{width:"100%"},children:["ltr"===o.appDirection?`${i?.documentActionEnName}`:`${i?.documentActionArName}`,i?.actionComment?" - "+i.actionComment:""]}),t.jsx(d.Box,{sx:{width:"100%"},children:"ltr"===o.appDirection?`${i?.employeeEnName}`:`${i?.employeeArName}`})]})]})}))})]})},No=e=>{const{t:i}=E.useTranslation(),o=De(),{ConfirmationWindow:a,setOpen:r}=ge({body:i(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let n=!0;if(e.authority&&(n=o.isUserAuthorized(e.authority)),n)return t.jsxs(t.Fragment,{children:[t.jsx(a,{}),t.jsxs(d.Button,{onClick:async()=>{if(e?.recordsToProcessActionOn&&e?.recordsToProcessActionOn.length>0){if(e?.preActionValidation)for(const t of e.recordsToProcessActionOn)if(!e.preActionValidation(t))return;!0===e?.isConfirmationRequired?r(!0):(await e.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn),e?.reloadData&&e.reloadData())}else _.toast.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?t.jsx(T.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:e.icon}):t.jsx(t.Fragment,{}),e?.label?i(e.label):t.jsx(t.Fragment,{})]})]})},yo=d.styled(e.QuickFilter)({display:"grid",alignItems:"center"}),ho=d.styled(e.ToolbarButton)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])})),Ro=d.styled(d.TextField)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])})),Lo=i=>{const{t:o}=E.useTranslation(),a=De(),r=!i?.templateProps?.editAction?.authority||a.isUserAuthorized(i.templateProps.editAction.authority),n=at(i?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},i?.templateProps?.data||[],i?.templateProps?.keyColumnName||"id");return t.jsxs(e.Toolbar,{children:[r&&"none"!=i?.templateProps?.editMode?.editMode?t.jsxs(d.Button,{onClick:i?.handleCreateNewRecord,children:[t.jsx(T.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),o("ADD_BTN_LABEL")]}):t.jsx(t.Fragment,{}),i?.templateProps?.rowActions?i.templateProps.rowActions.map((e,t)=>!0===e?.gridActionProps?.multiRecord?s.createElement(No,{...e,key:t,reloadData:async()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:n.selectedRecordIds,recordsToProcessActionOn:n.selectedRecords}):null):t.jsx(t.Fragment,{}),t.jsx(d.Box,{sx:{flex:1,mx:.5,my:.5,padding:1},children:i?.templateProps?.tBar}),t.jsx(d.Tooltip,{title:"Columns",children:t.jsx(e.ColumnsPanelTrigger,{render:t.jsx(e.ToolbarButton,{}),children:t.jsx(e.GridViewColumnIcon,{fontSize:"small"})})}),t.jsx(d.Tooltip,{title:"Filters",children:t.jsx(e.FilterPanelTrigger,{render:(i,o)=>t.jsx(e.ToolbarButton,{...i,color:"default",children:t.jsx(d.Badge,{badgeContent:o.filterCount,color:"primary",variant:"dot",children:t.jsx(e.GridFilterListIcon,{fontSize:"small"})})})})}),i?.templateProps?.gridStateKey?t.jsx(d.Tooltip,{title:o("RESET_GRID_STATE"),children:t.jsx(d.IconButton,{onClick:i?.clearGridState,children:t.jsx(T.FontAwesomeIcon,{icon:"eraser"})})}):t.jsx(t.Fragment,{}),t.jsx(d.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),t.jsx(d.Tooltip,{title:o("EXPORT_EXECL_LABEL"),children:t.jsx(e.ExportExcel,{render:t.jsx(d.MenuItem,{}),children:t.jsx(T.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),t.jsxs(yo,{children:[t.jsx(e.QuickFilterTrigger,{render:(e,i)=>t.jsx(d.Tooltip,{title:o("SEARCH_BTN_LABEL"),enterDelay:0,children:t.jsx(ho,{...e,ownerState:{expanded:i.expanded},color:"default","aria-disabled":i.expanded,children:t.jsx(T.FontAwesomeIcon,{icon:"search"})})})}),t.jsx(e.QuickFilterControl,{render:({ref:i,...a},r)=>t.jsx(Ro,{...a,ownerState:{expanded:r.expanded},inputRef:i,"aria-label":"Search",placeholder:`${o("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:t.jsx(d.InputAdornment,{position:"start",children:t.jsx(T.FontAwesomeIcon,{icon:"search"})}),endAdornment:r.value?t.jsx(d.InputAdornment,{position:"end",children:t.jsx(e.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:t.jsx(T.FontAwesomeIcon,{icon:"xmark"})})}):null,...a.slotProps?.input},...a.slotProps}})})]}),t.jsx(d.IconButton,{onClick:()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},children:t.jsx(T.FontAwesomeIcon,{icon:"refresh"})})]})},Co=i=>{const{t:o}=E.useTranslation(),a=De(),{ConfirmationWindow:r,setOpen:n}=ge({body:o(i?.confirmationMessage||"ACTION_CONFIRMATION"),title:o("CONFIRMATION"),onConfirmationCallBk:async()=>{await(i?.actionFn(i.record)),i?.reloadData&&i.reloadData()}});let l=!0;i.authority&&(l=a.isUserAuthorized(i.authority));let s={};i?.getActionIconStyleForRecord&&(s=i.getActionIconStyleForRecord(i.record));let p=!0;i?.isActionVisibleForRecord&&(p=i?.isActionVisibleForRecord(i.record));let c=!1;if(i?.isActionDisabledForRecord&&(c=i.isActionDisabledForRecord(i.record)),l&&p)return t.jsxs(t.Fragment,{children:[t.jsx(r,{}),t.jsx(e.GridActionsCellItem,{disabled:c,icon:t.jsx(d.Tooltip,{title:i?.label?o(i.label):"",children:t.jsx(T.FontAwesomeIcon,{icon:i.icon,style:{...s,color:c?"gray":null!=s?.color?s.color:void 0}})}),showInMenu:i?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!c){if(i?.preActionValidation&&!i.preActionValidation(i.record))return;!0===i?.isConfirmationRequired?n(!0):(await i.actionFn(i.record),!0===i?.gridActionProps?.reloadGridAfterAction&&i?.reloadData&&i.reloadData())}}})]})};let go=-1;const Do=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Po=(e,t)=>{const i=Do(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},xo=["__check__","actions"],Mo=o=>{const{t:a}=E.useTranslation(),r=i.useSelector(e=>e.AppLayout),[n,l]=s.useState({}),[p,c]=s.useState(!0),{getLookupOptions:u}=(()=>{const{handleGetRequest:e}=Ce(),t=i.useSelector(e=>e.AppLayout),o=async t=>{let i=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let i=await o(e.lookupType);return{...e,options:i,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:o}})(),{Window:m,setWindowState:A}=Pe({windowTitle:a(o.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),{Window:f,setWindowState:I}=Pe({windowTitle:a(o.gridTitle)+" Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"80%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),[O,y]=s.useState([]),R=tt(o.formElements),L=[],C=s.useMemo(()=>o?.gridStateKey?Do(o.gridStateKey):{},[]);for(const e of R)!0===e?.gridProps?.hidden&&L.push(e.fieldName);let g={};if(C?.columnVisibilityModel){g=C.columnVisibilityModel;const e=Object.keys(g);for(const t of L)e.includes(t)||(g[t]=!1)}else for(const e of L)g[e]=!1;const D=i.useSelector(e=>e.AppLayout.appDirection),[P,x]=s.useState(g),[M,b]=s.useState(C.columnOrder||[]),[S,U]=s.useState(C.columnWidths||{}),[F,w]=s.useState(C.columnGroupingModel||[]);let v=C?.pinnedColumns?.left||[];v=v.filter(e=>!xo.includes(e));let B=C?.pinnedColumns?.right||[]||[];B=B.filter(e=>!xo.includes(e));const[k,j]=s.useState({left:[..."ltr"===D?xo:[],...v],right:[..."rtl"===D?xo:[],...B]}),G=De(),W=N.useNavigate(),[Y,V]=s.useState(null),[q,K]=s.useState(null),[z,H]=s.useState({}),Q=async()=>{let e=it(R,"row"===o?.editMode?.editMode||!1,a);for(let t of e)t?.lookupType&&(t.displayField="ltr"===r.appDirection?"lookupEnDisplay":"lookupArDisplay",t.options=await u(t.lookupType),t.valueField="lookupValue");y(e)},[Z,$]=s.useState({ids:new Set,type:"include"});let X="id";o?.keyColumnName&&(X=o?.keyColumnName);const J=o.setData;let ee=null;ee=o?.validationSchema?o.validationSchema:h.z.object(ot(R));let te=!0;o?.editAction?.authority&&(te=G.isUserAuthorized(o.editAction.authority));let ie=!0;o?.deleteAction?.authority&&(ie=G.isUserAuthorized(o.deleteAction.authority));const{ConfirmationWindow:oe,setOpen:ae}=ge({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;Y&&!0===Y?.isNew||(e=await o.apiActions.deleteRecordById(Y[X])),e&&(o?.deleteAction?.postActionCallBack&&await o.deleteAction.postActionCallBack(Y),J(e=>e.filter(e=>e[X]!=Y[X])))}});let re,ne,de,le,se,pe;"modal"===o?.editMode?.editMode&&(re=o?.editMode?.specs?.modalHeight||"fit-content",ne=o?.editMode?.specs?.modalWidth||"300",de=o?.editMode?.specs?.modalMinHeight,le=o?.editMode?.specs?.modalMinWidth,se=o?.editMode?.specs?.modalIcon||"window",pe=o?.editMode?.specs?.modalTitle||"Record Form");const{Window:ce,setWindowState:ue}=Pe({height:re,minHeight:de,minWidth:le,onCloseCallBack:()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},width:ne,windowIcon:se,windowTitle:pe}),me={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:i=>{const r=i.row,n=[];if("none"!=o?.editMode?.editMode&&(void 0===o?.disableDefaultAction||!o.disableDefaultAction)){const i=z[r[X]]?.mode===e.GridRowModes.Edit;if("row"===o.editMode.editMode&&i)te&&(n.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(T.FontAwesomeIcon,{icon:"save"}),label:a("SAVE_BTN_LABEL"),onClick:()=>{(t=>{const i=t[X];H({...z,[i]:{mode:e.GridRowModes.View}})})(r)}})),n.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(T.FontAwesomeIcon,{icon:"cancel"}),label:a("CANCEL_BTN_LABEL"),onClick:()=>{(t=>{const i=t[X];i&&so(i)&&i<0?(H({...z,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}}),J(e=>{const t=e.filter(e=>e[X]!=i);return t})):H({...z,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}})})(r)},color:"inherit"})));else{if(o?.editAction&&!0===o?.editAction?.isEnabled){let i=!0;o?.editAction?.isActionVisibleForRecord&&(i=o?.editAction?.isActionVisibleForRecord(r));let l=!1;o?.editAction?.isActionDisabledForRecord&&(l=o?.editAction?.isActionDisabledForRecord(r)),te&&i&&n.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(d.Tooltip,{title:a("EDIT_BTN_LABEL"),children:t.jsx(T.FontAwesomeIcon,{icon:"edit",style:{color:l?"gray":void 0}})}),showInMenu:o?.editAction?.gridActionProps?.showInMenu||!1,label:a("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{te&&!l&&(async t=>{if(t)if(K(t),"form"===o.editMode.editMode)W(o.editMode.specs.formRoute+"/"+t[X]);else if("modal"===o.editMode.editMode)ue(!0);else if("row"===o?.editMode?.editMode){const i=t[X];H({...z,[i]:{mode:e.GridRowModes.Edit}})}})(r)}}))}if(o?.deleteAction&&!0===o?.deleteAction?.isEnabled){let i=!0;o?.deleteAction?.isActionVisibleForRecord&&(i=o?.deleteAction?.isActionVisibleForRecord(r));let l=!1;o?.deleteAction?.isActionDisabledForRecord&&(l=o?.deleteAction?.isActionDisabledForRecord(r)),ie&&i&&n.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(d.Tooltip,{title:a("DELETE_BTN_LABEL"),children:t.jsx(T.FontAwesomeIcon,{icon:"trash",style:{color:l?"gray":void 0}})}),showInMenu:o?.deleteAction?.gridActionProps?.showInMenu||!1,label:a("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(ie&&!l){if(o?.deleteAction?.preActionValidation&&!o.deleteAction.preActionValidation(r))return;V(r),ae(!0)}}}))}}}if(r[o?.keyColumnName||"id"]&&r[o?.keyColumnName||"id"]>0&&o?.attachment&&n?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(d.Tooltip,{title:"Attachments",children:t.jsx(T.FontAwesomeIcon,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{l(r),c(!o?.attachment?.enableAttachFn||o.attachment.enableAttachFn(r)),A(!0)}})),r[o?.keyColumnName||"id"]&&r[o?.keyColumnName||"id"]>0&&o?.workFlowDocumentCode&&n?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(d.Tooltip,{title:"Approvals",children:t.jsx(T.FontAwesomeIcon,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{l(r),I(!0)}})),r[o?.keyColumnName||"id"]&&r[o?.keyColumnName||"id"]>0&&o?.rowActions)for(const e of o.rowActions)e?.gridActionProps?.multiRecord&&!0===e?.gridActionProps?.multiRecord||n.push(t.jsx(Co,{...e,record:r,reloadData:async()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)}}));return n}};let Te=[];(void 0===o?.disableDefaultAction||!o.disableDefaultAction||o?.rowActions&&o?.rowActions.length>0)&&Te.push(me),Te=[...Te,...O];s.useEffect(()=>{void 0!==o?.autoLoad&&!0!==o.autoLoad||o.apiActions.reloadData(o?.gridLoadParametersValues),Q()},[]),s.useEffect(()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},[G.UserInfo?.currentOrganization]),s.useEffect(()=>{Q()},[D,o.formElements]);const Ae=s.useMemo(()=>{const e=Te.map(e=>({...e}));if(M.length){const t=new Map(e.map(e=>[e.field,e]));return M.map(e=>t.get(e)).filter(Boolean)}return e},[M,S,Te]);return t.jsxs(t.Fragment,{children:[t.jsx(oe,{}),"modal"===o?.editMode?.editMode?t.jsx(ce,{children:o?.editMode?.specs?.formComponent?t.jsx(o.editMode.specs.formComponent,{recordIdToEdit:q?q[X]:void 0,formCloseCallBk:()=>{ue(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)}}):t.jsx(vo,{keyColumnName:o.keyColumnName,attachment:o.attachment,formValuesChangeCallBk:o?.formProps?.formValuesChangeCallBk,recordIdToEdit:q?q[X]:void 0,formCloseCallBk:()=>{ue(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)},elements:o.formElements,apiActions:o.apiActions,editAuthorityKey:o?.editAction?.authority,formSavedSuccessfullyCallBk:o?.editAction?.postActionCallBack,preSaveValidation:o?.editAction?.preActionValidation,actions:o?.rowActions})}):t.jsx(t.Fragment,{}),void 0!==o?.hideInfoBar||o?.hideInfoBar?t.jsx(t.Fragment,{}):t.jsxs(d.Box,{sx:{display:"flex"},children:[void 0!==o?.hideBackButton||o?.hideBackButton?t.jsx(t.Fragment,{}):t.jsx(d.IconButton,{onClick:()=>{W(-1,{replace:!0})},children:t.jsx(T.FontAwesomeIcon,{icon:"ltr"===D?"arrow-left":"arrow-right"})}),t.jsxs(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[o?.girdIcon?t.jsx(T.FontAwesomeIcon,{icon:o.girdIcon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx(d.Typography,{variant:"h5",children:o?.gridTitle?co(a(o?.gridTitle)):""})]})]}),o?.gridLoadParameters&&o?.gridLoadParameters.length>0&&o?.gridLoadParametersValues&&o?.setGridLoadParametersValues?t.jsxs(d.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(d.AccordionSummary,{expandIcon:t.jsx(e.GridExpandMoreIcon,{}),children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(T.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(d.Typography,{component:"span",children:"Filters"})]})}),t.jsx(d.AccordionDetails,{children:t.jsx(d.Box,{children:t.jsx(vo,{saveButtonSpecs:{label:a("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:a("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?o.setGridLoadParametersValues(e):o.setGridLoadParametersValues({}),o.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o.gridLoadParameters})})})]}):t.jsx(t.Fragment,{}),o?.attachment?t.jsx(m,{children:t.jsx(Eo,{attachmentCode:o.attachment.attachmentCode,refKey:n[o?.keyColumnName||"id"],enableAttachment:p})}):t.jsx(t.Fragment,{}),o?.workFlowDocumentCode?t.jsx(f,{children:t.jsx(wo,{workFlowDocumentCode:o.workFlowDocumentCode,refDocumentId:n[o?.keyColumnName||"id"],postActionCallBk:()=>{I(!1),o.apiActions.reloadData(o.gridLoadParametersValues)},cancelActionCallBk:()=>{I(!1),o.apiActions.reloadData(o.gridLoadParametersValues)}})}):t.jsx(t.Fragment,{}),t.jsx(e.DataGridPremium,{...o?.muiProps,slots:{toolbar:Lo},slotProps:{toolbar:{templateProps:{...o,rowSelectionModel:Z,data:o?.data},handleCreateNewRecord:()=>{if("form"===o?.editMode?.editMode)W(o.editMode.specs.formRoute);else if("modal"===o?.editMode?.editMode)K(null),ue(!0);else if("row"===o?.editMode?.editMode){go-=1;const t={};t[X]=go,t.isNew=!0;for(const e of O)"actions"!=e?.type&&e?.field!=X&&e?.field&&(t[e.field]=null);J(e=>[t,...e]),H(t=>({...t,[go]:{mode:e.GridRowModes.Edit}}))}},clearGridState:()=>{o?.gridStateKey&&localStorage.removeItem(o.gridStateKey),x({}),b([]),U({}),w([]),j({left:[..."ltr"===D?xo:[]],right:[..."rtl"===D?xo:[]]})}}},getRowId:e=>e[X],showToolbar:!0,rows:o?.data,columns:Ae,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==o.editMode.editMode?z:void 0,onRowModesModelChange:"row"==o.editMode.editMode?e=>{H(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async e=>{if("row"===o.editMode.editMode){let i=null;const a=(e=>{try{ee.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof h.z.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(e);if(a){const e=a.split(",");throw _.toast.error(t.jsx("div",{style:{},children:e.map(e=>t.jsxs(t.Fragment,{children:[t.jsx("div",{children:e}),t.jsx(d.Divider,{})]}))})),new Error(a)}if(o?.editAction?.preActionValidation&&!o.editAction.preActionValidation(e))throw new Error("error on the configured presave validation");const r={...e};if(e[X]&&so(e[X])&&Number(e[X])<0&&(r[X]=null),i=await o.apiActions.saveRecord(r),null==i)throw new Error("Failed to process your request, contact your administrator");return o?.editAction?.postActionCallBack&&await o.editAction.postActionCallBack(e),!0===e?.isNew&&J(t=>{const o=t.filter(t=>t[X]!==e[X]);return[i,...o]}),!0===o?.editMode?.reloadAfterSave&&o?.apiActions?.reloadData&&o?.apiActions?.reloadData(o?.gridLoadParametersValues),i}},rowSelectionModel:Z,onRowSelectionModelChange:e=>{$(e)},columnVisibilityModel:P,onColumnVisibilityModelChange:e=>{x(e),o?.gridStateKey&&Po(o.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:i}=e;b(e=>{const a=e.length?[...e]:Te.map(e=>e.field),r=a.indexOf(t.field);return-1===r||(a.splice(r,1),a.splice(i,0,t.field),o?.gridStateKey&&Po(o.gridStateKey,{columnOrder:a})),a})},rowGroupingModel:F,onRowGroupingModelChange:e=>{(e=>{w(e),o?.gridStateKey&&Po(o.gridStateKey,{columnGroupingModel:e})})(e)},sx:{width:"100%"}})]})},bo=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return t},So=e=>{const[i,o]=s.useState([]);return s.useEffect(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));o(t)},[e.reportData]),t.jsx(Mo,{data:i,disableDefaultAction:!0,setData:e.setReportData,formElements:bo(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()=>{}}})},Uo=e=>{console.log("useParameterPanel","useParameterPanel called");const[i,o]=s.useState({...e?.initialParameterValues}),a=((e,t)=>{const i=[];for(const o of e){const e={type:"field",mode:"props",props:{fieldLabel:o?.parameterLabel,fieldName:o?.parameterCode,fieldType:o?.parameterType,hidden:o?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:o?.mandatory,defaultValue:t[o?.parameterCode]||o?.defaultValue}};i.push(e)}return i})(e.parameters,i);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:r}=E.useTranslation();return t.jsxs(d.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(d.AccordionSummary,{expandIcon:t.jsx(T.FontAwesomeIcon,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(T.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(d.Typography,{component:"span",children:"Filters"})]})}),t.jsx(d.AccordionDetails,{children:t.jsx(d.Box,{children:t.jsx(vo,{saveButtonSpecs:{label:r("Filter"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:r("RESET_BTN_LABEL"),icon:"eraser",hidden:!0,actionButtonVariant:"outlined",actionButtonColor:"error"},actions:[{label:r("RESET_BTN_LABEL"),icon:"eraser",isIdRequired:!1,formActionProps:{enabled:!0},actionFn:async(e,t)=>{o({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{o(null!=t?t:{}),e&&await e(i)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:a})})})]})},parametersValues:i,setParametersValues:o,panelElements:a}},Fo=e=>{const[i,o]=s.useState(null),[a,r]=s.useState(null),[n,l]=s.useState([]),[p,c]=s.useState("WAITING_REPORT_CODE"),{handleGetRequest:u,handlePostRequest:m,HandleDownloadHTTPPostPDF:A}=Ce(),[_,f]=s.useState(null),{ParameterPanel:I,parametersValues:E,panelElements:O,setParametersValues:N}=Uo({parameters:_?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}}),y=async t=>{c("WAITING_RESULT"),"Excel"===_?.reportType?await m({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT"),l(e.data)}}):_?.reportType&&await A({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT");const t=e.headers["content-disposition"];let i="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(i=e[1])}if(i.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),i=URL.createObjectURL(t);o(i)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(t),a=document.createElement("a");a.href=o,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}},failureCallBkFn:e=>{r("Failed To run report ... contact your administrator"),c("ERROR")}})};return s.useEffect(()=>{e?.reportCode&&(async()=>{c("LOADING_METADATA"),await u({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:t=>{f(t.data),!0===e?.byPassParameterEntry||0==t.data.reportParameters.length?(y(E),c("WAITING_RESULT")):c("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{r("Failed loading report metadata ... contact your administrator"),c("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),t.jsxs(t.Fragment,{children:[t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[t.jsxs(d.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[t.jsx(T.FontAwesomeIcon,{icon:"Excel"===_?.reportType?"file-excel":"file-pdf",color:"Excel"===_?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),_?.reportName]}),"Excel"!=_?.reportType&&"SHOWING_RESULT"===p?t.jsxs(t.Fragment,{children:[!0===e?.byPassParameterEntry?t.jsx(t.Fragment,{}):_?.reportParameters.length>0?t.jsx(d.IconButton,{onClick:()=>{c("WAITING_PARAMETER_INPUT")},children:t.jsx(T.FontAwesomeIcon,{icon:"filter"})}):t.jsx(t.Fragment,{}),t.jsx(d.IconButton,{children:t.jsx(T.FontAwesomeIcon,{icon:"refresh",onClick:()=>{y(E)}})})]}):t.jsx(t.Fragment,{})]}),t.jsx(d.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===p&&"Excel"!=_?.reportType?t.jsx(I,{searchBtnClickCallBk:y}):"SHOWING_RESULT"===p||("WAITING_PARAMETER_INPUT"===p||"WAITING_RESULT"===p)&&"Excel"===_?.reportType?"Excel"===_?.reportType?t.jsx(So,{reportData:n,setReportData:l,reloadReport:async()=>{y(E)},gridLoadParameters:O,gridLoadParametersValues:E,setGridLoadParametersValues:N}):t.jsx("iframe",{src:i,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===p?t.jsxs(d.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[t.jsx(T.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),a]}):t.jsx(t.Fragment,{})})]})},wo=e=>{const o=N.useNavigate(),a=i.useSelector(e=>e.AppLayout),{isUserAuthorized:r,UserInfo:n}=De(),{handleGetRequest:l,handlePostRequest:p}=Ce(),[c,u]=s.useState(null),[m,A]=s.useState([]),{t:f}=E.useTranslation(),[I,O]=s.useState(null),[y,h]=s.useState({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:R,setWindowState:L}=Pe({windowTitle:"ltr"===a.appDirection?y?.workflowDocument&&y?.referencedDocument?`${y?.workflowDocument?.documentEnName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:"Document":y?.workflowDocument&&y?.referencedDocument?`${y?.workflowDocument?.documentArName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),C=async()=>{await l({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{h(e.data)},failureCallBkFn:()=>{h({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},g=async()=>{await p({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:y?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:c.id,refDocumentStatus:y?.workflowDocumentStatus?.documentStatusCode,actionComment:I},successCallBkFn:async t=>{c?.post_action_endpoint?await p({endPointURI:c.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:c.id},successCallBkFn:()=>{C(),e?.postActionCallBk&&e.postActionCallBk()}}):C()}})};return s.useEffect(()=>{e.refDocumentId&&e.workFlowDocumentCode&&C()},[e.refDocumentId,e.workFlowDocumentCode]),s.useEffect(()=>{A(y?.nextActions&&y?.nextActions?.length>0?y.nextActions.filter(e=>{if(!y?.workflowDocumentStatus?.nextActionTakersAuthority&&!y?.nextActionTakers)return!0;if(y?.workflowDocumentStatus?.nextActionTakersAuthority&&r(y.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(y?.nextActionTakers)for(const e of y.nextActionTakers)if(n?.username===e?.username||n?.username===e?.USERNAME)return!0;return!1}):[])},[y.nextActions,y.nextActionTakers]),t.jsxs(t.Fragment,{children:[y?.workflowDocumentReport?.id?t.jsx(R,{children:t.jsx(Fo,{reportCode:y?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):t.jsx(t.Fragment,{}),y?.workflowDocument?t.jsxs(d.Box,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.IconButton,{onClick:()=>{o(-1,{replace:!0})},children:t.jsx(T.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(T.FontAwesomeIcon,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?`${y?.workflowDocument?.documentEnName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:`${y?.workflowDocument?.documentArName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`,y?.workflowDocumentStatus?"ltr"===a.appDirection?` ( ${y?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${y?.workflowDocumentStatus?.documentStatusArName} )`:"",t.jsx(d.Box,{sx:{flex:1}}),y?.workflowDocumentReport?.id?t.jsx(d.Button,{onClick:()=>{L(!0)},variant:"outlined",startIcon:t.jsx(T.FontAwesomeIcon,{icon:"eye"}),children:f("VIEW_LABEL")}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),t.jsxs(d.Box,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[m?.length>0?t.jsxs(d.Paper,{sx:{padding:2,display:"flex",flex:1,margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[t.jsx(je,{sx:{marginBottom:2,width:400},label:f("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===a.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:c?.id,options:m,onChangeCallBack:(e,t)=>{u(t)}}),t.jsx(Fe,{sx:{width:400},rows:3,value:I,onChange:e=>{O(e.target.value)},multiline:!0,label:f("WF_COMMENT_LABEL")}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.Button,{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:e.refDocumentId,actionId:c.id},successCallBkFn:()=>{g()}}):g():_.toast.error("You must enter comment for the action to be processed"):_.toast.error("You must select action to process")},children:f("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?t.jsx(d.Button,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:f("WF_CANCEL_BTN_LABEL")}):t.jsx(t.Fragment,{})]}),y?.nextActionTakers&&y.nextActionTakers.length>0?t.jsxs(t.Fragment,{children:[t.jsx(d.Divider,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:t.jsxs(d.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(T.FontAwesomeIcon,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",f("WF_WAITING_FOR_LABEL")]})}),t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:y.nextActionTakers.map(e=>t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[t.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),t.jsxs(d.Box,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsx("div",{children:"ltr"===a.appDirection?e?.employee_en_name:e?.employee_ar_name}),t.jsx("div",{children:e?.email?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),e?.email]}):t.jsx(t.Fragment,{})}),t.jsx("div",{children:e?.mobile_number?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):t.jsx(t.Fragment,{})})]})]}))})]}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),y?.actionsHistory.length>0?t.jsx(Oo,{actionHistory:y.actionsHistory}):t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(d.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(T.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),f("WF_ACTION_HISTORY_LABEL")]}),t.jsx(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},vo=e=>{const{Window:i,setWindowState:o}=Pe({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:a,setWindowState:r}=Pe({windowTitle:"Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[n,l]=s.useState(!0),{t:p}=E.useTranslation(),c=tt(e.elements),u=[];for(const e of c)e?.hidden&&u.push(e.fieldName);const[m,A]=s.useState(u),f={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(f[t.props.fieldName]=t.props.defaultValue);const[I,h]=s.useState([]);let R=null;R=e?.validationSchema?e.validationSchema:ce.object(ot(c));const L=O.useForm({resolver:y.zodResolver(R),defaultValues:f}),C=L.watch(),g=N.useParams(),D=e?.formRouteRecordIdParamName,P=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:D&&g[D]&&(t=g[D]),t){const i=await e.apiActions.loadRecordById(t);if(i){L.reset({...i}),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk({...i},x,L);for(const e of c)"combobox"===e?.fieldType&&i[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?L.setValue(e.fieldName,i[e.fieldName]+""):L.setValue(e.fieldName,i[e.fieldName]))}}else L.reset({})},x={setFieldValue:(e,t)=>{L.setValue(e,t)},hideField:e=>{A(t=>[...t,e])},showField:e=>{A(t=>t.filter(t=>t!==e))},disableField:e=>{h(t=>[...t,e])},enableField:e=>{h(t=>t.filter(t=>t!==e))}};return s.useEffect(()=>{P()},[e?.recordIdToEdit]),s.useEffect(()=>{l(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(C))},[C]),t.jsxs(t.Fragment,{children:[e?.attachment?t.jsx(i,{children:t.jsx(Eo,{attachmentCode:e.attachment.attachmentCode,refKey:C[e?.keyColumnName||"id"],enableAttachment:n})}):t.jsx(t.Fragment,{}),e?.workFlowDocumentCode?t.jsx(a,{children:t.jsx(wo,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:C[e?.keyColumnName||"id"],postActionCallBk:()=>{r(!1),P()},cancelActionCallBk:()=>{r(!1)}})}):t.jsx(t.Fragment,{}),t.jsx(lo,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:t.jsx(d.Grid2,{sx:{width:"100%"},container:!0,children:e.elements.map((i,o)=>"group"===i.type?t.jsx(_o,{...i.props,formManager:L,formValues:C,formActions:x,hiddenFields:m,disabledFields:I},o):"field"===i.type&&"props"===i.mode?t.jsx(To,{fieldInfo:i.props,formManager:L,formValues:C,formActions:x,hiddenFields:m,disabledFields:I,formValuesChangeCallBk:e.formValuesChangeCallBk},o):"field"===i.type&&"node"===i.mode?t.jsx(d.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:L,formValues:C})},o):void 0)})}),t.jsxs(lo,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[C[e?.keyColumnName||"id"]&&e?.attachment?t.jsx(d.Tooltip,{title:"Attachments",children:t.jsx(d.IconButton,{onClick:()=>{o(!0)},children:t.jsx(T.FontAwesomeIcon,{icon:"paperclip"})})}):null,C[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?t.jsx(d.Tooltip,{title:"Approvals",children:t.jsx(d.IconButton,{onClick:()=>{r(!0)},children:t.jsx(T.FontAwesomeIcon,{icon:"stamp"})})}):null,e?.actions?e.actions.map(i=>!1===i?.isIdRequired?t.jsx(Ao,{...i,record:C}):C[e?.keyColumnName||"id"]?!0===i?.formActionProps?.enabled?t.jsx(Ao,{...i,record:C}):t.jsx(t.Fragment,{}):void 0):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),e?.saveButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(d.Button,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?t.jsx(T.FontAwesomeIcon,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:L.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const i=await e.apiActions.saveRecord(t);i&&(L.reset({...i}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(i),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{_.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:p(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(d.Button,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?t.jsx(T.FontAwesomeIcon,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),L.reset(f)},children:p(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Bo=()=>{const{workflowDocumentCode:e,refDocumentId:i}=N.useParams();return t.jsx(wo,{workFlowDocumentCode:e,refDocumentId:i})},ko=e=>t.jsx(G.BarChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),jo=e=>t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[t.jsx(d.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:t.jsx("div",{children:e.record[e.valueField]})}),t.jsx(d.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),Go=e=>t.jsxs(t.Fragment,{children:[t.jsx(d.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(G.Gauge,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),Wo=e=>t.jsx(G.LineChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Yo(e){return t.jsxs(Y,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(Y,{sx:{width:"100%",mr:1},children:t.jsx(W,{variant:"determinate",...e})}),t.jsx(Y,{sx:{minWidth:35},children:t.jsx(B,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const Vo=e=>t.jsxs(Y,{sx:{width:"100%"},children:[t.jsx(B,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(Yo,{value:e.record[e.valueField]/e.total*100})]}),qo=e=>{const i=e.data.map((t,i)=>({id:i,value:t[e.valueField],label:t[e.labelField]+""}));return t.jsx(V.PieChart,{series:[{data:i}]})},Ko=e=>{const[i,o]=s.useState(!0),[a,r]=s.useState([]),{handleGetRequest:n}=Ce();s.useEffect(()=>{e.loadWidget?(async()=>{o(!0),await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{o(!1),r(e.data)},failureCallBkFn:()=>{o(!1),r([])}})})():o(!1)},[e.loadWidget,e.loadCounter]);let l=0;if(1==a.length)l=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of a)l+=t[e.verticalAxisField];return t.jsxs(t.Fragment,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?t.jsxs(d.Box,{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):t.jsx(t.Fragment,{}),t.jsx(d.Box,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:i?t.jsxs(t.Fragment,{children:[t.jsx(T.FontAwesomeIcon,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),t.jsx("div",{children:"Loading"})]}):"ColumnChart"===e.widgetType?t.jsx(ko,{data:a,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?t.jsx(Wo,{data:a,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?t.jsx(qo,{data:a,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):t.jsxs(d.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[t.jsx(d.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),a.map((i,o)=>"Card"===e.widgetType?t.jsx(d.Grid2,{size:{md:3,xs:12},children:t.jsx(jo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},o)}):"CircularProgress"===e.widgetType?t.jsx(d.Grid2,{size:{md:3,xs:12},children:t.jsx(Go,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):"LinearProgress"===e.widgetType?t.jsx(d.Grid2,{size:{md:3,xs:12},children:t.jsx(Vo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):void 0)]})})]})},zo=e=>{const[i,o]=s.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:a,parametersValues:r}=Uo({parameters:i?.dashboardParameters||[],initialParameterValues:{}}),[n,l]=s.useState(0),[p,c]=s.useState(!1);s.useEffect(()=>{if(null!=i.dashboardCode&&null!=i.dashboardCode&&""!=i.dashboardCode){c(!1);let e=!0;if(i?.dashboardParameters.length>0)for(const t of i?.dashboardParameters)if(!0===t?.mandatory&&(void 0===r[t.parameterCode]||null===r[t.parameterCode]||""===r[t.parameterCode])){e=!1;break}e&&c(e),l(n+1)}},[i?.dashboardParameters,r]);const u=N.useNavigate(),{handleGetRequest:m,handlePostRequest:A}=Ce();return s.useEffect(()=>{e.dashboardCode&&(async()=>{await m({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o(null)}})})()},[e.dashboardCode,e.parameters]),t.jsx(t.Fragment,{children:i?t.jsxs(t.Fragment,{children:[t.jsxs(d.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.IconButton,{onClick:()=>{u(-1,{replace:!0})},children:t.jsx(T.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(T.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),t.jsx(d.Box,{children:i?.dashboardTitle}),t.jsx(d.Box,{sx:{flex:1}})]}),i?.dashboardParameters.length>0?t.jsx(a,{searchBtnClickCallBk:async e=>{l(n+1)}}):t.jsx(t.Fragment,{}),t.jsx(d.Grid2,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:i?.widgets.map((e,i)=>t.jsx(d.Grid2,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=e.widgetType?"column":void 0,height:e?.height||300},size:{md:e?.width,sm:12},children:t.jsx(Ko,{...e,parameterValues:r,loadWidget:p})},i))})]}):t.jsx(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},Ho=()=>{const{dashboardCode:e}=N.useParams();return t.jsx(zo,{dashboardCode:e})},Qo=e=>{const{UserSession:o}=De(),a=i.useSelector(e=>e.AppLayout),r=i.useDispatch(),{handlePostRequest:n}=Ce(),[l,p]=s.useState(o.value.currentOrganization.id);return t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[t.jsx(je,{sx:{width:"100%"},displayField:"ltr"===a.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:o.value.userOrganizations,value:l,onChangeCallBack:e=>{p(e)}}),t.jsx(d.Button,{sx:{m:1},variant:"contained",disabled:null==l||l===o.value.currentOrganization.id,onClick:async()=>{await n({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:o.value.username,orgId:l},data:{},successCallBkFn:t=>{const i={...t.data,isAuthenticated:!0};r(Re.setAuthenticated(i)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},Zo=A.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:$o,setSideBarState:Xo}=Zo.actions;var Jo=Zo.reducer;function ea(e,t){const i=s.useRef(e);s.useEffect(()=>{i.current=e},[e]),s.useEffect(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const ta=d.keyframes`
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
- `,ia=e=>{const o=N.useNavigate(),a=i.useSelector(e=>e.AppLayout),{handlePostRequest:r}=Ce();return t.jsxs(t.Fragment,{children:[t.jsxs(d.Button,{fullWidth:!0,onClick:()=>{var t;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&o(e.notificationActionPayload),e?.isNotified||(t=e.id,r({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:t}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[t.jsxs(d.Box,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?t.jsx(T.FontAwesomeIcon,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):t.jsx(t.Fragment,{}),"ltr"===a.appDirection?e.notificationEnText:e.notificationArText,t.jsx(d.Box,{sx:{flex:1}}),e?.isNotified?t.jsx(t.Fragment,{}):t.jsxs(d.Typography,{color:"warning",sx:{animation:`${ta} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[t.jsx(T.FontAwesomeIcon,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===a.appDirection?"New":"جديد"]})]}),t.jsxs(d.Box,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[t.jsx(d.Box,{sx:{marginRight:1,marginLeft:1},children:mo(e.createTime,a.appDirection)}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(d.Box,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?t.jsx(d.Divider,{flexItem:!0}):t.jsx(t.Fragment,{})]})},oa=()=>{const{UserInfo:e}=De(),[o,a]=s.useState(null),{handleGetRequest:r,handlePostRequest:n}=Ce(),l=N.useNavigate(),p=i.useSelector(e=>e.AppLayout),[c,u]=s.useState(!1),[m,A]=s.useState([]);ea(()=>{!0===e.isAuthenticated&&r({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>m.length&&_.toast.info("ltr"===p.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===p.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),A(e.data)}})},1e3);return t.jsx(d.ClickAwayListener,{onClickAway:()=>{u(!1)},children:t.jsxs("div",{style:{cursor:"pointer"},children:[t.jsx(d.IconButton,{color:"inherit",onClick:e=>{a(e.currentTarget),u(!c)},sx:{marginRight:1,marginLeft:1},children:t.jsx(d.Badge,{anchorOrigin:{vertical:"top",horizontal:"ltr"===p.appDirection?"right":"left"},badgeContent:m.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:t.jsx(T.FontAwesomeIcon,{icon:"bell"})})}),t.jsx(d.Popper,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:c,anchorEl:o,dir:p.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>t.jsx(d.Fade,{...e,timeout:350,children:t.jsxs(d.Paper,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[t.jsx(d.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[t.jsx(T.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===p.appDirection?"Notifications":"الاشعارات"]})}),0==m.length?t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:t.jsx(d.Box,{children:"ltr"===p.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):t.jsx(t.Fragment,{}),t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:m.map((e,i)=>t.jsx(ia,{...e,setOpen:u,showDivider:i<m.length-1}))}),t.jsx(d.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsx(d.Button,{sx:{textTransform:"none"},onClick:()=>{l("myNotifications")},children:"ltr"===p.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},aa=e=>{const[i,o]=s.useState(""),[a,r]=s.useState(""),[n,l]=s.useState(""),{handlePostRequest:p}=Ce();return t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[t.jsxs(d.Box,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),t.jsx(d.Divider,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?t.jsx(Fe,{label:"Current Password",value:i,onChange:e=>{o(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):t.jsx(t.Fragment,{}),t.jsx(Fe,{label:"New Password",value:a,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(Fe,{label:"Confirm New Password",value:n,onChange:e=>{l(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(d.Button,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==i&&""!==i.trim()?null!==a&&""!==a&&null!==n&&""!==n&&a==n?await p({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:i,newPassword:a},successCallBkFn:()=>{e.onSuccessCallBk(),_.toast.success("Your request has been processed successfully")},showMask:!0}):_.toast.error("You must enter new password in required fields and must be identical"):_.toast.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},ra=d.styled(u,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=i.useSelector(e=>e.AppLayout),o=ue();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})}}]}}),na=()=>{const{Window:e,setWindowState:o}=Pe({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),a=i.useSelector(e=>e.AppInfo.value),[r,n]=s.useState(null),l=()=>{n(null)},p=e=>{n(e.currentTarget)},c=i.useSelector(e=>e.AppLayout),u=i.useSelector(e=>e.SideBar),{UserSession:A}=De(),_=A.value.currentOrganization,{Window:f,setWindowState:E}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:O}=Ce(),N=ue(),y=i.useDispatch();return t.jsxs(t.Fragment,{children:[t.jsx(f,{children:t.jsx(aa,{selectedPerson:A.value,isSelfService:!0,onSuccessCallBk:()=>{E(!1)}})}),t.jsx(d.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:r,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(r),onClose:l,children:t.jsx(d.MenuItem,{onClick:()=>{E(!0),l()},children:t.jsx(d.Typography,{sx:{textAlign:"center"},children:"Change Password"})})}),t.jsx(e,{children:t.jsx(Qo,{successChangeCallBackFn:()=>{o(!1)}})}),t.jsx(ra,{position:"fixed",open:u.isOpened,children:t.jsxs(m,{children:[t.jsx(d.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{y($o())},edge:"start",sx:[{mr:"ltr"===c.appDirection?2:void 0,ml:"rtl"===c.appDirection?2:void 0},u.isOpened&&{display:"none"}],children:t.jsx(T.FontAwesomeIcon,{icon:"bars"})}),t.jsx(fo,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:A.value.currentOrganization.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),t.jsx(d.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:N?"":`${a.appName} - ${"ltr"===c.appDirection?_?.organizationEnName:_?.organizationArName}`}),t.jsx(d.Tooltip,{title:"light"===c.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:t.jsx(d.IconButton,{color:"inherit",onClick:()=>{y(_e.setThemeMode("light"===c.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===c.themeMode?"dark":"light")},children:"light"===c.themeMode?t.jsx(T.FontAwesomeIcon,{icon:"moon"}):t.jsx(T.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),t.jsx(d.Tooltip,{title:"ar"===I.language?"Change Language To English":"Change Language To Arabic",children:t.jsx(d.IconButton,{color:"inherit",onClick:()=>{let e="ar"===I.language?"en":"ar";var t;t=e,I.changeLanguage(t),localStorage.setItem("language",t),y(_e.setAppDirection("ar"===e?"rtl":"ltr"))},children:t.jsx(T.FontAwesomeIcon,{icon:"language"})})}),A.value?.userOrganizations&&A.value?.userOrganizations.length>1?t.jsx(d.Tooltip,{title:"Change Current Organization",children:t.jsx(d.IconButton,{color:"inherit",onClick:()=>{o(!0)},children:t.jsx(T.FontAwesomeIcon,{icon:"globe"})})}):t.jsx(t.Fragment,{}),!0===a?.enableUINotifications?t.jsx(oa,{}):t.jsx(t.Fragment,{}),t.jsx("div",{onClick:p,style:{cursor:"pointer"},children:t.jsx(fo,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:A.value?.id+""})}),t.jsx("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:p,children:N?"":A.value?.username}),t.jsx(d.IconButton,{color:"inherit",onClick:async()=>{try{await O({endPointURI:"api/auth/logout"})}catch(e){}y(Re.setUnAuthenticated())},children:t.jsx(T.FontAwesomeIcon,{rotation:"rtl"===c.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},da=d.styled("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),la=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=la(e,i.children);if(t)return t}}},sa=[...[{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",authority:"SYSTEM_ADMIN",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools.rolesx",label:"ROLES",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{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:"DEVELOPMENT_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"}}]}]}],{icon:"user",label:"Example Grid",id:"example",action:"NAVIGATION",actionPayload:{path:"example"}}];function pa(){return t.jsx(Y,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const ca=p.styled(X.TreeItem2Root)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${Z.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),ua=p.styled(X.TreeItem2Content)(({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:p.alpha(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})}})),ma=z.animated(H);function Ta(e){const i=z.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return t.jsx(ma,{style:i,...e})}const Aa=p.styled(B)({color:"inherit",fontWeight:500});function _a({icon:e,expandable:o,children:a,...r}){const{t:n}=E.useTranslation(),d=i.useSelector(e=>e.AppLayout);return t.jsxs(X.TreeItem2Label,{...r,sx:{display:"flex",alignItems:"center",padding:1},children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:"ltr"===d.appDirection?7:void 0,marginLeft:"rtl"===d.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),t.jsx(Aa,{variant:"body2",sx:{fontSize:16},children:n(a)}),o&&t.jsx(pa,{})]})}const fa=e=>Array.isArray(e)?e.length>0&&e.some(fa):Boolean(e),Ia=pe.forwardRef(function(e,i){const{id:o,itemId:a,label:r,disabled:n,children:d,...l}=e,{getRootProps:s,getContentProps:p,getIconContainerProps:c,getCheckboxProps:u,getLabelProps:m,getGroupTransitionProps:T,getDragAndDropOverlayProps:A,status:_,publicAPI:f}=$.useTreeItem2({id:o,itemId:a,children:d,label:r,disabled:n,rootRef:i}),I=f.getItem(a),E=fa(d);return t.jsx(ee.TreeItem2Provider,{itemId:a,children:t.jsxs(ca,{...s(l),children:[t.jsxs(ua,{...p({className:ro("content",{"Mui-expanded":_.expanded,"Mui-selected":_.selected,"Mui-focused":_.focused,"Mui-disabled":_.disabled})}),children:[t.jsx(X.TreeItem2IconContainer,{...c(),children:t.jsx(J.TreeItem2Icon,{status:_})}),t.jsx(X.TreeItem2Checkbox,{...u()}),t.jsx(_a,{...m({icon:I?.icon||"book",expandable:E&&_.expanded})}),t.jsx(te.TreeItem2DragAndDropOverlay,{...A()})]}),d&&t.jsx(Ta,{...T()})]})})});function Ea(){const e=N.useNavigate(),o=i.useSelector(e=>e.AppLayout),a=i.useSelector(e=>e.AppInfo.value);i.useDispatch();const r=ue(),{isUserAuthorized:n,isCurrentOrganizationAuthorizedToModule:d}=De(),l=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||n(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||d(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=l(i.children)),t.push(e)}return t},s=[];a.enableAdministrationModule&&s.push(...structuredClone(sa)),s.push(...structuredClone(a.businessNavigationItems));const p=l(s);return t.jsx(Q.RichTreeView,{items:p,onItemClick:(t,i)=>{const o=la(i,s);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||e(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:me,direction:o.appDirection,maxHeight:r?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Ia}})}const Oa=()=>{const e=i.useSelector(e=>e.AppInfo.value),{UserSession:o}=De(),a=o.value.currentOrganization,r=d.useTheme(),n=i.useSelector(e=>e.AppLayout),l=i.useSelector(e=>e.SideBar),s=i.useDispatch();return t.jsxs(K,{sx:{width:me,flexShrink:0,"& .MuiDrawer-paper":{width:me,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===n.appDirection?"left":"right",open:l.isOpened,children:[t.jsxs(da,{children:[t.jsxs(d.Box,{sx:{width:"100%"},children:[t.jsx(d.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[t.jsx(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===n.appDirection?a?.organizationEnName:a?.organizationArName}`}),t.jsxs(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),t.jsx(q,{onClick:()=>{s($o())},children:"ltr"===r.direction?t.jsx(T.FontAwesomeIcon,{icon:"angle-left"}):t.jsx(T.FontAwesomeIcon,{icon:"angle-right"})})]}),t.jsx(b,{}),t.jsx(Ea,{})]})},Na=ae({key:"muirtl",stylisPlugins:[oe.prefixer,ie]}),ya=ae({key:"mui"}),ha=e=>{const[i,o]=s.useState([]),[a,r]=s.useState([]),{handlePostRequest:n,handleGetRequest:l}=Ce();s.useEffect(()=>{e.selectedRecord&&(async()=>{await l({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{o(e.data.currentRoles),r(e.data.availableRoles)}})})()},[e.selectedRecord]);return t.jsxs(t.Fragment,{children:[t.jsx(Be,{displayField:"roleName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(d.Button,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:i,successCallBkFn:()=>{_.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(d.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Ra=e=>{const[o,a]=s.useState(null),{Window:r,setWindowState:n}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),d=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks.data),p=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:c}=E.useTranslation(),[u,m]=s.useState([]),T=Ue({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:m}),A=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:p,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 t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(ha,{selectedRecord:o,closeModalFn:()=>{n(!1)}})}),t.jsx(bo,{apiActions:T,hideInfoBar:!0,data:u,setData:m,editMode:{editMode:"row"},formElements:A,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{a(e),n(!0)}}],gridLoadParametersValues:{personId:e.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async t=>(t.personId=e.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},La=()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),r=Ue({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:a}),{handleGetRequest:n}=Ce(),d=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks),l=i.useDispatch();return t.jsx(bo,{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 n({endPointURI:d.url,showMask:!1,successCallBkFn:e=>{l(be({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{l(be({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Ca=()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),{handleGetRequest:r}=Ce(),n=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits),d=i.useDispatch(),l=Ue({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:a}),p=[{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:i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnitType.data),optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:l,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row"},formElements:p,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await r({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{d(be({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{d(be({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},ga=()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:o});return t.jsx(bo,{apiActions:a,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},Da=()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),r=Ue({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:a}),n=i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:d}=Ce(),l=[{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:n,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:r,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row"},formElements:l,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"}})},Pa=()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:o});return t.jsx(bo,{apiActions:a,data:i,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"}})},xa=e=>{const[i,o]=s.useState([]),[a,r]=s.useState([]),{handlePostRequest:n,handleGetRequest:l}=Ce();s.useEffect(()=>{e.roleId&&(async()=>{await l({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{o(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()},[e.roleId]);return t.jsxs(t.Fragment,{children:[t.jsx(Be,{displayField:"authorityName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(d.Button,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:i,successCallBkFn:()=>{_.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(d.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},ba=()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),[a,r]=s.useState(null),{Window:n,setWindowState:d}=Pe({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),l=Ue({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:o});return t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(xa,{roleId:a?.id,closeModalFn:()=>{d(!1)}})}),t.jsx(bo,{apiActions:l,data:i,hideInfoBar:!0,setData:o,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=>{r(e),d(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},Ma=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),{t:a}=E.useTranslation(),[r,n]=s.useState([]),d=Ue({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:n}),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:"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:o,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"}}];return t.jsx(bo,{apiActions:d,data:r,setData:n,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:a("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async t=>(t.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},Sa=()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=Ue({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:r}),d=[{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"}}];return t.jsx(bo,{apiActions:n,data:a,setData:r,hideInfoBar:!0,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:o("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},Ua=e=>{const{t:o}=E.useTranslation(),a=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),[r,n]=s.useState([]),d=Ue({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:n}),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:a,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return t.jsx(bo,{apiActions:d,data:r,hideInfoBar:!0,setData:n,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:o("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async t=>(t.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Fa=[{value:"FILE_SYSTEM"},{value:"SFTP"}],wa=(e,t,i,o,a)=>{o?("useSysDatasource"===o&&1==a?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===o&&("Blueprint"===a?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===a?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===a?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))):(e?.useSysCon&&t.hideField("datasourceConId"),e?.reportType?"Blueprint"===e?.reportType?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===e?.reportType?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===e?.reportType&&(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))},va=e=>{const{t:i}=E.useTranslation(),[o,a]=s.useState([]),r=Ue({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:a});return t.jsx(bo,{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",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!uo(t.recipientMail)?(_.toast.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},Ba=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),d=Ue({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:n,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(bo,{apiActions:d,data:a,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:o("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},ka=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemReports.data),{t:a}=E.useTranslation(),[r,n]=s.useState([]),d=Ue({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:n}),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:o,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(bo,{apiActions:d,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:n,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:a("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},ja={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}}},Ga=(e,t,i)=>{if(e&&ja[e]){const o=ja[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},Wa=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=Ue({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:r}),d=i.useSelector(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: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 t.jsx(bo,{apiActions:n,data:a,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:o("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Ya=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=Ue({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:r}),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.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:n,data:a,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:t=>(t.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Va=e=>{const[i,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=E.useTranslation(),{handleGetRequest:d}=Ce(),[l,p]=s.useState([]);s.useEffect(()=>{(async()=>{await d({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{p(e.data)}})})()},[e.selectedRecord]);const[c,u]=s.useState([]),m=Ue({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:u}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:l,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 t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Ya,{selectedRecord:i})}),t.jsx(bo,{apiActions:m,data:c,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=>{o(e),r(!0)}}],formElements:T,keyColumnName:"id",gridTitle:n("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},qa=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=i.useSelector(e=>e.commonStores.stores.SystemWidgets.data),d=Ue({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",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:"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:n,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"}}];return t.jsx(bo,{apiActions:d,data:a,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:o("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async t=>(t.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Ka=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(fo,{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 t.jsx(t.Fragment,{children:t.jsx(bo,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:r,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:Ra,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:La,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Ca,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:ga,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState(null),{UserInfo:r}=De(),n=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationRanks.data),l=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[p,c]=s.useState([]),u=Ue({findAll:"api/v1/public/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:c}),[m,T]=s.useState(null),{Window:A,setWindowState:f}=Pe({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:I,setWindowState:O}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:N,setWindowState:y}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),h=[{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=>t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(fo,{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:n,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:l,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 t.jsxs(t.Fragment,{children:[t.jsx(I,{children:t.jsx(ha,{selectedRecord:m,closeModalFn:()=>{O(!1)}})}),t.jsx(A,{children:t.jsx(Ra,{selectedPerson:o})}),t.jsx(N,{children:t.jsx(aa,{selectedPerson:o,isSelfService:!1,onSuccessCallBk:()=>{y(!1)}})}),t.jsx(bo,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:u,data:p,setData:c,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:h,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{a(e),y(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{T({organizationId:r?.currentOrganization?.id,id:e?.organizationMemberId}),O(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{a(e),f(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(_.toast.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||(_.toast.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}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({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:o});return t.jsx(t.Fragment,{children:t.jsx(bo,{apiActions:a,data:i,setData:o,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:Da,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Pa,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:ba,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:e}=E.useTranslation(),{handleGetRequest:o}=Ce(),[a,r]=s.useState([]),n=Ue({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}),d=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(bo,{apiActions:n,data:a,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:d,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:ga,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Ca,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:La,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=E.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),[a,r]=s.useState([]),n=Ue({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:r}),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:"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:o,optionDisplayField:"queryName",optionValueField:"id"}}];return t.jsx(bo,{apiActions:n,data:a,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:d,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,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),n=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:d}=E.useTranslation(),[l,p]=s.useState([]),c=Ue({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:p}),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"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:n,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Ma,{selectedRecord:e})}),t.jsx(bo,{apiActions:c,rowActions:[{label:"Query Parameters",actionFn:async e=>{o(e),r(!0)},icon:"p"}],data:l,setData:p,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"},formProps:{formValuesChangeCallBk:(e,t,i,o,a)=>{o?"useSysCon"===o&&1==a?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=Ce(),o=i.useSelector(e=>e.commonStores.stores.SystemDataSourceType.data),{t:a}=E.useTranslation(),[r,n]=s.useState([]),d=Ue({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:n,commonStoreKey:"SystemDataSources"}),l=[{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:o,comboboxValueDataType:"string",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"}}];return t.jsx(bo,{apiActions:d,data:r,setData:n,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:l,keyColumnName:"id",gridTitle:a("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async t=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:t.id},successCallBkFn:e=>{_.toast.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}=E.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemParameterTypes.data),[a,r]=s.useState([]),n=Ue({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:r}),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:"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:o,comboboxValueDataType:"string",optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text"}},{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"}}];return t.jsx(bo,{apiActions:n,data:a,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:d,keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,i,o,a,r)=>{o?"parameterType"===o?("combobox"===a?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField")),"date"===a||"datetime"===a?(t.showField("parameterValueFormat"),"date"===a?i.setValue("parameterValueFormat",Ge):i.setValue("parameterValueFormat",We)):(t.hideField("parameterValueFormat"),i.setValue("parameterValueFormat",null))):"parameterDataQueryId"==o?null!=a&&""!=a?(i.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==o&&(null!=a&&""!=a?(i.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):"date"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",Ge)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",We)):(i.setValue("parameterValueFormat",null),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.hideField("parameterValueFormat"))}},editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:Sa,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState(null),{Window:r,setWindowState:n}=Pe({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:d,setWindowState:l}=Pe({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[p,c]=s.useState([]),u=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),m=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),T=i.useSelector(e=>e.commonStores.stores.SystemBluePrints.data),A=Ue({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:c}),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",comboboxValueDataType:"string"}},{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:!1,hidden:!0,gridProps:{hidden:!0},comboboxValueDataType:"string",fieldType:"combobox",options:Fa,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},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:u,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:T,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:m,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 t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Fo,{reportCode:o?.reportCode,resultMode:"App"})}),t.jsx(d,{children:t.jsx(Ua,{selectedRecord:o})}),t.jsx(bo,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:A,data:p,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{a(e),l(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{a(e),n(!0)}}],formProps:{formValuesChangeCallBk:wa},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)||(_.toast.error("You must choose the report query"),!1):(_.toast.error("You must choose the report blueprint"),!1):(_.toast.error("You must enter the jasper report name"),!1):(_.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),o=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),[a,r]=s.useState(null),{Window:n,setWindowState:d}=Pe({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:l,setWindowState:p}=Pe({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:c,setWindowState:u}=Pe({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:m}=E.useTranslation(),[T,A]=s.useState([]),f=Ue({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:A}),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:o,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox",comboboxValueDataType:"string"}},{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 t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(va,{selectedRecord:a,callBkFn:()=>{d(!1)}})}),t.jsx(l,{children:t.jsx(Ba,{selectedRecord:a,callBkFn:()=>{d(!1)}})}),t.jsx(c,{children:t.jsx(ka,{selectedRecord:a,callBkFn:()=>{u(!1)}})}),t.jsx(bo,{apiActions:f,data:T,setData:A,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:I,keyColumnName:"id",gridTitle:m("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{r(e),d(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{r(e),p(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{r(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)||(_.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(_.toast.error("You must specifiy the period value since this email is periodical"),!1):(_.toast.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}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o}),r=[{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",comboboxValueDataType:"string",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o,a){Ga(t,o,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"}}];return t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:r,keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{Ga(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Document Status",windowIcon:"tag"}),{Window:n,setWindowState:d}=Pe({windowTitle:"Document Action",windowIcon:"stamp"}),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),p=i.useSelector(e=>e.commonStores.stores.SystemReports.data),c=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:u}=E.useTranslation(),[m,T]=s.useState([]),A=Ue({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:T}),_=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:l,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:p,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"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:c,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 t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Wa,{selectedRecord:e})}),t.jsx(n,{children:t.jsx(Va,{selectedRecord:e})}),t.jsx(bo,{apiActions:A,data:m,setData:T,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{o(e),r(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{o(e),d(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:u("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:_,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}=E.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),a=i.useSelector(e=>e.commonStores.stores.SystemWidgetTypes.data),[r,n]=s.useState([]),d=Ue({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:n}),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:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:a,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:o,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:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!0,fieldType:"text"}}]}}];return t.jsx(bo,{apiActions:d,data:r,setData:n,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:l,keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,d]=s.useState([]),l=N.useNavigate(),p=Ue({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:d});return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(qa,{selectedRecord:i})}),t.jsx(bo,{apiActions:p,data:n,setData:d,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=>{o(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{l("/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:Ho},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),{handlePostRequest:r}=Ce(),n=Ue({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:a}),d=i.useSelector(e=>e.commonStores.stores.SystemMailTemplates.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:"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"}}];return t.jsx(bo,{apiActions:n,disableDefaultAction:!0,data:o,setData:a,editMode:{editMode:"none"},formElements:l,rowActions:[{actionFn:async e=>{(async e=>{await r({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{n.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:Da},{path:"dev/system/roles",component:ba},{path:"dev/system/lookups",component:Sa},{path:"dev/system/modules",component:Pa},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:o}),r=[{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",comboboxValueDataType:"string",options:Fa,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"}}];return t.jsx(bo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:r,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}=E.useTranslation(),[o,a]=s.useState([]),r=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),n=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=Ue({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:a}),p=[{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",comboboxValueDataType:"string",options:r,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=>t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?t.jsx(T.FontAwesomeIcon,{icon:e.row.notificationIcon}):t.jsx(t.Fragment,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(d.Box,{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=>t.jsx(d.Box,{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",comboboxValueDataType:"string",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 t.jsx(bo,{apiActions:l,data:o,setData:a,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:p,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}=De(),o=i.useSelector(e=>e.AppLayout),{handleGetRequest:a,handlePostRequest:r}=Ce(),[n,l]=s.useState([]),p=i.useSelector(e=>e.AppInfo.value),c=()=>{!0===e.isAuthenticated&&a({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{l(e.data)}})};return!0===p?.enableUINotifications&&ea(c,1e3),t.jsxs(t.Fragment,{children:[t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.Box,{sx:{flex:1}}),t.jsxs("h3",{children:[t.jsx(T.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===o.appDirection?"Notifications":"الاشعارات"]}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(d.Button,{sx:{textTransform:"none"},onClick:async()=>{await r({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),t.jsx(d.Button,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await r({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),t.jsx(d.Box,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:t.jsx(d.Box,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:n.map((e,i)=>t.jsx(ia,{...e,showDivider:i<n.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:Bo}]],{path:"example",component:()=>{const[e,i]=s.useState([]),o=[{value:1,display:"Male"},{value:2,display:"Female"}],a=Ue({findAll:void 0,commonStoreKey:void 0,deleteById:void 0,deleteByIdParamName:void 0,findById:void 0,findByIdParamName:void 0,save:void 0,setData:i}),r=[{mode:"props",props:{fieldLabel:"ID",fieldName:"id",fieldType:"number"},type:"field"},{mode:"props",props:{fieldLabel:"Gender",fieldName:"gender",fieldType:"combobox",options:o,optionValueField:"value",optionDisplayField:"display",formProps:{onValueChangeCallBack(e,t,i,o,a){1==t?(o.disableField("bithdate"),i.setValue("bithdate",new Date),i.setValue("active",!0),i.setValue("type",t)):(o.enableField("bithdate"),i.setValue("bithdate",null),i.setValue("active",!1)),i.setValue("type",t)}}},type:"field"},{mode:"props",props:{fieldLabel:"Gender",fieldName:"type",fieldType:"combobox",options:o,optionValueField:"value",optionDisplayField:"display"},type:"field"},{mode:"props",props:{fieldLabel:"Name",fieldName:"name",required:!0,fieldType:"text",gridProps:{hidden:!1},formProps:{onValueChangeCallBack(e,t,i,o,a){}}},type:"field"},{mode:"props",props:{fieldLabel:"Birthdate",fieldName:"bithdate",required:!0,fieldType:"date",gridProps:{hidden:!1}},type:"field"},{mode:"props",props:{fieldLabel:"Active",fieldName:"active",required:!0,fieldType:"checkbox",gridProps:{hidden:!1}},type:"field"}];return t.jsx(bo,{apiActions:a,data:e,setData:i,editMode:{editMode:"modal",specs:{modalTitle:"Example Modal Form",modalIcon:"user"}},formElements:r,girdIcon:"user",gridTitle:"Example Grid "})}}],za=e=>{const{isUserAuthorized:i,isCurrentOrganizationAuthorizedToModule:o}=De();return e?.applicationModule&&!o(e?.applicationModule)?t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!i(e.authority)?t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):t.jsx(t.Fragment,{children:e.children})},Ha=()=>{const e=i.useSelector(e=>e.AppLayout),o=i.useSelector(e=>e.AppInfo.value),a=i.useSelector(e=>e.AppInfo.value.businessRoutes),{UserInfo:r}=De(),n=i.useDispatch(),{show:p,hide:c}=ye(),u=i.useSelector(e=>e.commonStores),[m,T]=s.useState(!1),{isUserAuthorized:A}=De(),{handleGetRequest:_}=Ce();return s.useEffect(()=>{u?.storeKeys&&(async()=>{p("Loading ... please wait"),T(!1);const e=u.stores,t=u.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!A(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||_({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{n(be({storeKey:i,data:e.data}))},failureCallBkFn:()=>{n(be({storeKey:i,data:[]}))}});T(!0),c()})()},[u.storeKeys,r?.currentOrganization]),t.jsxs(l.CacheProvider,{value:"ltr"===e.appDirection?ya:Na,children:[t.jsx(d.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:t.jsxs(N.Routes,{children:[o.enableAdministrationModule?Ka.map((e,i)=>t.jsx(N.Route,{path:e.path,element:t.jsx(za,{authority:e.authority,applicationModule:e.applicationModule,children:t.jsx(e.component,{})})},"adm"+i)):null,a.map((e,i)=>t.jsx(N.Route,{path:e.path,element:t.jsx(za,{authority:e.authority,children:t.jsx(e.component,{})})},"bs"+i))]})}),")"]})},Qa=p.styled("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:ne.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:ne.grey[900]})}));function Za(e){const{window:o}=e,a=i.useSelector(e=>e.SideBar),r=i.useSelector(e=>e.AppInfo.value),n=i.useDispatch(),l=e=>{n(Xo(e))},s=void 0!==o?()=>o().document.body:void 0;return t.jsx(de,{container:s,anchor:"bottom",open:a.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[t.jsx(Qa,{}),t.jsx(d.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:t.jsx(Ea,{})}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[t.jsx(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:r.appName}),t.jsxs(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",r.appVersion]})]})]})})}const $a=()=>{const{t:e}=E.useTranslation(),o=i.useSelector(e=>e.loadingMask.value),a=i.useSelector(e=>e.AppLayout);return t.jsxs(d.Backdrop,{dir:a.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[t.jsx(d.CircularProgress,{color:"inherit"}),t.jsx("div",{style:{marginRight:10,marginLeft:10},children:o?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Xa=()=>{const e=i.useSelector(e=>e.AppInfo.value),[o,a]=s.useState(""),[r,n]=s.useState(""),[p,c]=s.useState(!1),u=i.useSelector(e=>e.UserSession.value),m=i.useDispatch(),T=async()=>{if(null==o||""==o)return void _.toast.error("username is required to proceed");if(null==r||""==r)return void _.toast.error("password is required to proceed");c(!0);let t=null;try{if(t=await f.post(`${e.apiBaseUrl}/api/auth/login`,{username:o,password:r},{withCredentials:!0}),null!=t.data&&""!==t.data){c(!1);const e={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),m(Re.setAuthenticated(e))}}catch(e){c(!1),_.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},A=i.useSelector(e=>e.UserSession.value),I=d.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||qe} #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||qe},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}});return s.useEffect(()=>{console.log("checking usersession on reload",A),console.log("checking usersession app info",e),(async()=>{if(e?.apiBaseUrl&&null==A.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await f.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};m(Re.setAuthenticated(e))}else m(Re.setUnAuthenticated())}catch(e){m(Re.setUnAuthenticated())}}})()},[e,A.isAuthenticated]),t.jsx(l.ThemeProvider,{theme:I,children:t.jsx(d.Paper,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==u.isAuthenticated?t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:e?.appLogo,width:150,height:150}),t.jsx(d.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),t.jsxs(d.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),t.jsx(d.TextField,{label:"username",sx:{width:300,m:1},value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),t.jsx(d.TextField,{label:"password",sx:{width:300,m:1},value:r,type:"password",onChange:e=>{n(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),t.jsx(d.Button,{loading:p,onClick:T,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):t.jsxs(t.Fragment,{children:[t.jsx(d.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})})},Ja=()=>{const[e,o]=s.useState({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:a}=Ce(),r=i.useSelector(e=>e.AppInfo.value);return s.useEffect(()=>{if(r?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{r?.checkLicense?.endpoint&&await a({endPointURI:r.checkLicense?.endpoint,successCallBkFn:e=>{o(e.data)}})})()},r?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[r]),e.isLicensed?t.jsx(t.Fragment,{}):t.jsxs(d.Box,{sx:{flex:1,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"fixed",top:0,background:"rgba(235, 235, 235, 0.8)",left:0,zIndex:9999},children:[t.jsx("img",{src:r.appLogo,style:{height:200,width:200}}),t.jsxs(d.Typography,{variant:"h5",children:[r.appName," - ",r.appVersion]}),t.jsx(d.Typography,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),t.jsx(d.Typography,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),t.jsxs(d.Typography,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),t.jsxs(d.Typography,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},er=p.styled("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const o=i.useSelector(e=>e.AppLayout),a=p.useTheme(),r=ue();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:me+"px",marginRight:r||"rtl"!==o.appDirection||!0!==t?0:me+"px"}});function tr(){const e=i.useSelector(e=>e.SideBar),o=ue(),a=i.useSelector(e=>e.UserSession),r=i.useSelector(e=>e.AppLayout);return t.jsxs(N.BrowserRouter,{children:[t.jsx(_.ToastContainer,{rtl:"rtl"===r.appDirection,draggable:!0,position:"bottom-center"}),t.jsx($a,{}),!0===a.value.isAuthenticated?t.jsxs(er,{open:e.isOpened,children:[t.jsx(c,{}),t.jsx(na,{}),o?null:t.jsx(Oa,{}),o?t.jsx(Za,{}):null,t.jsx(da,{}),t.jsx(Ha,{}),t.jsx(Ja,{})]}):t.jsx(Xa,{})]})}const ir=A.createSlice({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,t)=>{e.value=t.payload}}}),or=ir.actions;var ar=ir.reducer;const rr={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:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationmodule/application/all"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationrole/all"}},nr=e=>{const o=i.useDispatch();le.LicenseInfo.setLicenseKey(e.muiPremiumKey);const a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||Ye} #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||Ye},secondary:{main:e.appTheme?.light?.secondaryColor||Ve},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||qe} #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||qe},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}},n=i.useSelector(e=>e.AppLayout);let p={...a};"dark"===n.themeMode&&(p={...r});const c=d.createTheme({direction:n.appDirection,...p});return s.useEffect(()=>{document.title=e.documentTitle,o(or.setAppInfo(e));let t={};e.enableAdministrationModule&&(t={...rr}),e.businessCommonStoresMetaData&&(t={...t,...e.businessCommonStoresMetaData}),o(Me(t))},[e]),t.jsx(l.ThemeProvider,{theme:c,children:t.jsx(tr,{})})};var dr={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"},lr={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:"Member Role",ORGANIZATION_MEMBER_ROLE_PLURAL:"Member Roles",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",ROLES:"System Roles",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:"Application Authority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"Application Authorities",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:"Application Module",ORGANIZATION_APPLICATION_MODULE_PLURAL:"Application Modules",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 sr={...dr,...lr,...{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:"Dashboard Widget",DASHBOARD_WIDGET_PLURAL:"Dashboard Widgets",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:"Query Parameter",DATA_QUERY_PARAMETER_PLURAL:"Query Parameters",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:"Excel Uploader Detail",EXCEL_UPLOADER_DETAIL_PLURAL:"Excel Uploader Details",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:"Excel Uploader Header",EXCEL_UPLOADER_HEADER_PLURAL:"Excel Uploader Headers",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:"Mail Attachment",MAIL_ATTACHMENT_PLURAL:"Mail Attachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"Mail Body",MAIL_BODY_PLURAL:"Mail Bodies",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:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_PLURAL:"Mail Notification Queue",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:"Mail Recipient",MAIL_RECIPIENT_PLURAL:"Mail Recipients",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:"Notification Queue",NOTIFICATION_QUEUE_PLURAL:"Notification Queue",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:"Report Parameter",REPORT_PARAMETER_PLURAL:"Report Parameters",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:"User Request",USER_REQUEST_PLURAL:"User Requests",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:"Workflow Document Action",WORKFLOW_DOCUMENT_ACTION_PLURAL:"Workflow Document Actions",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:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"Workflow Document Action History",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:"Workflow Document Action Mail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"Workflow Document Action Mails",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:"Workflow Document Mail Log",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"Workflow Document Mail Logs",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:"Workflow Document Status",WORKFLOW_DOCUMENT_STATUS_PLURAL:"Workflow Document Statuses",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 pr={"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:"عرض"},cr={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:"المستخدمين",ROLES:"الصلاحيات",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 ur={...pr,...cr,...{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"}};o.library.add(a.fab),o.library.add(r.far),o.library.add(n.fas);Object.defineProperty(exports,"DataGridPremium",{enumerable:!0,get:function(){return e.DataGridPremium}}),Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return i.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return i.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return T.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return _.toast}}),exports.axios=f,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return E.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return O.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return N.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return N.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return y.zodResolver}}),exports.z=ce,exports.AttachmentCard=Io,exports.AttachmentImageViewer=fo,exports.AttachmentPanel=Eo,exports.BaseApp=e=>{const[o,a]=s.useState({AppLayout:fe,UserSession:Le,loadingMask:Ne,commonStores:Se,SideBar:Jo,AppInfo:ar}),r=A.configureStore({reducer:o}),[n,d]=s.useState(!1);return s.useEffect(()=>{(()=>{const t={AppLayout:fe,UserSession:Le,loadingMask:Ne,commonStores:Se,SideBar:Jo,AppInfo:ar,...e?.businessReduxReducers};a(e=>({...t}));const i={en:{translation:{...sr,...e?.businessLocals?.en}},ar:{translation:{...ur,...e?.businessLocals?.ar}}};I.use(E.initReactI18next).init({resources:i,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),d(!0)})()},[e]),n?t.jsx(i.Provider,{store:r,children:t.jsx(nr,{...e})}):t.jsx(t.Fragment,{})},exports.CheckBox=ke,exports.ComboBox=je,exports.DARK_THEME_INITIAL_MAIN_COLOR=qe,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=Ge,exports.DATE_TIME_FORMAT=We,exports.DashboardRouteView=Ho,exports.DashboardViewer=zo,exports.Datefield=ze,exports.DatetimeField=He,exports.ExcelReportViewer=So,exports.FormElement=To,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=Ye,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=Ve,exports.ReportViewer=Fo,exports.SystemLookupCombobox=Qe,exports.TemplateBarChart=ko,exports.TemplateDataCard=jo,exports.TemplateForm=vo,exports.TemplateGauge=Go,exports.TemplateGrid=bo,exports.TemplateLineChart=Wo,exports.TemplateLineProgress=Vo,exports.TemplatePieChart=qo,exports.TemplateTextField=Fe,exports.TransferList=Be,exports.WorkflowDocumentPanel=wo,exports.WorkflowDocumentTimeLine=Oo,exports.WorkflowRouteComponent=Bo,exports.capitalizeFirstLetter=co,exports.constructGridColumnsFromFields=it,exports.constructValidationSchema=ot,exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=at,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=so,exports.isNumeric=po,exports.isValidEmail=uo,exports.timeAgo=mo,exports.useApiActions=Ue,exports.useAxios=Ce,exports.useConfirmationWindow=ge,exports.useIsMobile=ue,exports.useLoadingMask=ye,exports.useSession=De,exports.useWindow=Pe,Object.keys(d).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return d[e]}})}),Object.keys(k).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return k[e]}})}),Object.keys(j).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return j[e]}})});
37
+ `,ia=e=>{const o=N.useNavigate(),a=i.useSelector(e=>e.AppLayout),{handlePostRequest:r}=Ce();return t.jsxs(t.Fragment,{children:[t.jsxs(d.Button,{fullWidth:!0,onClick:()=>{var t;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&o(e.notificationActionPayload),e?.isNotified||(t=e.id,r({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:t}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[t.jsxs(d.Box,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?t.jsx(T.FontAwesomeIcon,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):t.jsx(t.Fragment,{}),"ltr"===a.appDirection?e.notificationEnText:e.notificationArText,t.jsx(d.Box,{sx:{flex:1}}),e?.isNotified?t.jsx(t.Fragment,{}):t.jsxs(d.Typography,{color:"warning",sx:{animation:`${ta} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[t.jsx(T.FontAwesomeIcon,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===a.appDirection?"New":"جديد"]})]}),t.jsxs(d.Box,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[t.jsx(d.Box,{sx:{marginRight:1,marginLeft:1},children:mo(e.createTime,a.appDirection)}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(d.Box,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?t.jsx(d.Divider,{flexItem:!0}):t.jsx(t.Fragment,{})]})},oa=()=>{const{UserInfo:e}=De(),[o,a]=s.useState(null),{handleGetRequest:r,handlePostRequest:n}=Ce(),l=N.useNavigate(),p=i.useSelector(e=>e.AppLayout),[c,u]=s.useState(!1),[m,A]=s.useState([]);ea(()=>{!0===e.isAuthenticated&&r({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>m.length&&_.toast.info("ltr"===p.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===p.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),A(e.data)}})},1e3);return t.jsx(d.ClickAwayListener,{onClickAway:()=>{u(!1)},children:t.jsxs("div",{style:{cursor:"pointer"},children:[t.jsx(d.IconButton,{color:"inherit",onClick:e=>{a(e.currentTarget),u(!c)},sx:{marginRight:1,marginLeft:1},children:t.jsx(d.Badge,{anchorOrigin:{vertical:"top",horizontal:"ltr"===p.appDirection?"right":"left"},badgeContent:m.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:t.jsx(T.FontAwesomeIcon,{icon:"bell"})})}),t.jsx(d.Popper,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:c,anchorEl:o,dir:p.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>t.jsx(d.Fade,{...e,timeout:350,children:t.jsxs(d.Paper,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[t.jsx(d.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[t.jsx(T.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===p.appDirection?"Notifications":"الاشعارات"]})}),0==m.length?t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:t.jsx(d.Box,{children:"ltr"===p.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):t.jsx(t.Fragment,{}),t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:m.map((e,i)=>t.jsx(ia,{...e,setOpen:u,showDivider:i<m.length-1}))}),t.jsx(d.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsx(d.Button,{sx:{textTransform:"none"},onClick:()=>{l("myNotifications")},children:"ltr"===p.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},aa=e=>{const[i,o]=s.useState(""),[a,r]=s.useState(""),[n,l]=s.useState(""),{handlePostRequest:p}=Ce();return t.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[t.jsxs(d.Box,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),t.jsx(d.Divider,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?t.jsx(Fe,{label:"Current Password",value:i,onChange:e=>{o(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):t.jsx(t.Fragment,{}),t.jsx(Fe,{label:"New Password",value:a,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(Fe,{label:"Confirm New Password",value:n,onChange:e=>{l(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(d.Button,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==i&&""!==i.trim()?null!==a&&""!==a&&null!==n&&""!==n&&a==n?await p({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:i,newPassword:a},successCallBkFn:()=>{e.onSuccessCallBk(),_.toast.success("Your request has been processed successfully")},showMask:!0}):_.toast.error("You must enter new password in required fields and must be identical"):_.toast.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},ra=d.styled(u,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=i.useSelector(e=>e.AppLayout),o=ue();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})}}]}}),na=()=>{const{Window:e,setWindowState:o}=Pe({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),a=i.useSelector(e=>e.AppInfo.value),[r,n]=s.useState(null),l=()=>{n(null)},p=e=>{n(e.currentTarget)},c=i.useSelector(e=>e.AppLayout),u=i.useSelector(e=>e.SideBar),{UserSession:A}=De(),_=A.value.currentOrganization,{Window:f,setWindowState:E}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:O}=Ce(),N=ue(),y=i.useDispatch();return t.jsxs(t.Fragment,{children:[t.jsx(f,{children:t.jsx(aa,{selectedPerson:A.value,isSelfService:!0,onSuccessCallBk:()=>{E(!1)}})}),t.jsx(d.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:r,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(r),onClose:l,children:t.jsx(d.MenuItem,{onClick:()=>{E(!0),l()},children:t.jsx(d.Typography,{sx:{textAlign:"center"},children:"Change Password"})})}),t.jsx(e,{children:t.jsx(Qo,{successChangeCallBackFn:()=>{o(!1)}})}),t.jsx(ra,{position:"fixed",open:u.isOpened,children:t.jsxs(m,{children:[t.jsx(d.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{y($o())},edge:"start",sx:[{mr:"ltr"===c.appDirection?2:void 0,ml:"rtl"===c.appDirection?2:void 0},u.isOpened&&{display:"none"}],children:t.jsx(T.FontAwesomeIcon,{icon:"bars"})}),t.jsx(fo,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:A.value.currentOrganization.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),t.jsx(d.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:N?"":`${a.appName} - ${"ltr"===c.appDirection?_?.organizationEnName:_?.organizationArName}`}),t.jsx(d.Tooltip,{title:"light"===c.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:t.jsx(d.IconButton,{color:"inherit",onClick:()=>{y(_e.setThemeMode("light"===c.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===c.themeMode?"dark":"light")},children:"light"===c.themeMode?t.jsx(T.FontAwesomeIcon,{icon:"moon"}):t.jsx(T.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),t.jsx(d.Tooltip,{title:"ar"===I.language?"Change Language To English":"Change Language To Arabic",children:t.jsx(d.IconButton,{color:"inherit",onClick:()=>{let e="ar"===I.language?"en":"ar";var t;t=e,I.changeLanguage(t),localStorage.setItem("language",t),y(_e.setAppDirection("ar"===e?"rtl":"ltr"))},children:t.jsx(T.FontAwesomeIcon,{icon:"language"})})}),A.value?.userOrganizations&&A.value?.userOrganizations.length>1?t.jsx(d.Tooltip,{title:"Change Current Organization",children:t.jsx(d.IconButton,{color:"inherit",onClick:()=>{o(!0)},children:t.jsx(T.FontAwesomeIcon,{icon:"globe"})})}):t.jsx(t.Fragment,{}),!0===a?.enableUINotifications?t.jsx(oa,{}):t.jsx(t.Fragment,{}),t.jsx("div",{onClick:p,style:{cursor:"pointer"},children:t.jsx(fo,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:A.value?.id+""})}),t.jsx("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:p,children:N?"":A.value?.username}),t.jsx(d.IconButton,{color:"inherit",onClick:async()=>{try{await O({endPointURI:"api/auth/logout"})}catch(e){}y(Re.setUnAuthenticated())},children:t.jsx(T.FontAwesomeIcon,{rotation:"rtl"===c.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},da=d.styled("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),la=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=la(e,i.children);if(t)return t}}},sa=[...[{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",authority:"SYSTEM_ADMIN",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools.rolesx",label:"ROLES",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{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:"DEVELOPMENT_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 pa(){return t.jsx(Y,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const ca=p.styled(X.TreeItem2Root)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${Z.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),ua=p.styled(X.TreeItem2Content)(({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:p.alpha(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})}})),ma=z.animated(H);function Ta(e){const i=z.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return t.jsx(ma,{style:i,...e})}const Aa=p.styled(B)({color:"inherit",fontWeight:500});function _a({icon:e,expandable:o,children:a,...r}){const{t:n}=E.useTranslation(),d=i.useSelector(e=>e.AppLayout);return t.jsxs(X.TreeItem2Label,{...r,sx:{display:"flex",alignItems:"center",padding:1},children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:"ltr"===d.appDirection?7:void 0,marginLeft:"rtl"===d.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),t.jsx(Aa,{variant:"body2",sx:{fontSize:16},children:n(a)}),o&&t.jsx(pa,{})]})}const fa=e=>Array.isArray(e)?e.length>0&&e.some(fa):Boolean(e),Ia=pe.forwardRef(function(e,i){const{id:o,itemId:a,label:r,disabled:n,children:d,...l}=e,{getRootProps:s,getContentProps:p,getIconContainerProps:c,getCheckboxProps:u,getLabelProps:m,getGroupTransitionProps:T,getDragAndDropOverlayProps:A,status:_,publicAPI:f}=$.useTreeItem2({id:o,itemId:a,children:d,label:r,disabled:n,rootRef:i}),I=f.getItem(a),E=fa(d);return t.jsx(ee.TreeItem2Provider,{itemId:a,children:t.jsxs(ca,{...s(l),children:[t.jsxs(ua,{...p({className:ro("content",{"Mui-expanded":_.expanded,"Mui-selected":_.selected,"Mui-focused":_.focused,"Mui-disabled":_.disabled})}),children:[t.jsx(X.TreeItem2IconContainer,{...c(),children:t.jsx(J.TreeItem2Icon,{status:_})}),t.jsx(X.TreeItem2Checkbox,{...u()}),t.jsx(_a,{...m({icon:I?.icon||"book",expandable:E&&_.expanded})}),t.jsx(te.TreeItem2DragAndDropOverlay,{...A()})]}),d&&t.jsx(Ta,{...T()})]})})});function Ea(){const e=N.useNavigate(),o=i.useSelector(e=>e.AppLayout),a=i.useSelector(e=>e.AppInfo.value);i.useDispatch();const r=ue(),{isUserAuthorized:n,isCurrentOrganizationAuthorizedToModule:d}=De(),l=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||n(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||d(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=l(i.children)),t.push(e)}return t},s=[];a.enableAdministrationModule&&s.push(...structuredClone(sa)),s.push(...structuredClone(a.businessNavigationItems));const p=l(s);return t.jsx(Q.RichTreeView,{items:p,onItemClick:(t,i)=>{const o=la(i,s);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||e(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:me,direction:o.appDirection,maxHeight:r?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Ia}})}const Oa=()=>{const e=i.useSelector(e=>e.AppInfo.value),{UserSession:o}=De(),a=o.value.currentOrganization,r=d.useTheme(),n=i.useSelector(e=>e.AppLayout),l=i.useSelector(e=>e.SideBar),s=i.useDispatch();return t.jsxs(K,{sx:{width:me,flexShrink:0,"& .MuiDrawer-paper":{width:me,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===n.appDirection?"left":"right",open:l.isOpened,children:[t.jsxs(da,{children:[t.jsxs(d.Box,{sx:{width:"100%"},children:[t.jsx(d.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[t.jsx(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===n.appDirection?a?.organizationEnName:a?.organizationArName}`}),t.jsxs(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),t.jsx(q,{onClick:()=>{s($o())},children:"ltr"===r.direction?t.jsx(T.FontAwesomeIcon,{icon:"angle-left"}):t.jsx(T.FontAwesomeIcon,{icon:"angle-right"})})]}),t.jsx(M,{}),t.jsx(Ea,{})]})},Na=ae({key:"muirtl",stylisPlugins:[oe.prefixer,ie]}),ya=ae({key:"mui"}),ha=e=>{const[i,o]=s.useState([]),[a,r]=s.useState([]),{handlePostRequest:n,handleGetRequest:l}=Ce();s.useEffect(()=>{e.selectedRecord&&(async()=>{await l({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{o(e.data.currentRoles),r(e.data.availableRoles)}})})()},[e.selectedRecord]);return t.jsxs(t.Fragment,{children:[t.jsx(Be,{displayField:"roleName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(d.Button,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:i,successCallBkFn:()=>{_.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(d.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Ra=e=>{const[o,a]=s.useState(null),{Window:r,setWindowState:n}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),d=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks.data),p=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:c}=E.useTranslation(),[u,m]=s.useState([]),T=Ue({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:m}),A=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:p,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 t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(ha,{selectedRecord:o,closeModalFn:()=>{n(!1)}})}),t.jsx(Mo,{apiActions:T,hideInfoBar:!0,data:u,setData:m,editMode:{editMode:"row"},formElements:A,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{a(e),n(!0)}}],gridLoadParametersValues:{personId:e.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async t=>(t.personId=e.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},La=()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),r=Ue({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:a}),{handleGetRequest:n}=Ce(),d=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks),l=i.useDispatch();return t.jsx(Mo,{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 n({endPointURI:d.url,showMask:!1,successCallBkFn:e=>{l(Me({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{l(Me({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Ca=()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),{handleGetRequest:r}=Ce(),n=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits),d=i.useDispatch(),l=Ue({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:a}),p=[{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:i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnitType.data),optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(Mo,{apiActions:l,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row"},formElements:p,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await r({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{d(Me({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{d(Me({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},ga=()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:o});return t.jsx(Mo,{apiActions:a,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},Da=()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),r=Ue({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:a}),n=i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:d}=Ce(),l=[{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:n,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(Mo,{apiActions:r,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row"},formElements:l,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"}})},Pa=()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:o});return t.jsx(Mo,{apiActions:a,data:i,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"}})},xa=e=>{const[i,o]=s.useState([]),[a,r]=s.useState([]),{handlePostRequest:n,handleGetRequest:l}=Ce();s.useEffect(()=>{e.roleId&&(async()=>{await l({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{o(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()},[e.roleId]);return t.jsxs(t.Fragment,{children:[t.jsx(Be,{displayField:"authorityName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(d.Button,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:i,successCallBkFn:()=>{_.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(d.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Ma=()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),[a,r]=s.useState(null),{Window:n,setWindowState:d}=Pe({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),l=Ue({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:o});return t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(xa,{roleId:a?.id,closeModalFn:()=>{d(!1)}})}),t.jsx(Mo,{apiActions:l,data:i,hideInfoBar:!0,setData:o,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=>{r(e),d(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},ba=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),{t:a}=E.useTranslation(),[r,n]=s.useState([]),d=Ue({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:n}),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:"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:o,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"}}];return t.jsx(Mo,{apiActions:d,data:r,setData:n,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:a("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async t=>(t.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},Sa=()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=Ue({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:r}),d=[{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"}}];return t.jsx(Mo,{apiActions:n,data:a,setData:r,hideInfoBar:!0,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:o("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},Ua=e=>{const{t:o}=E.useTranslation(),a=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),[r,n]=s.useState([]),d=Ue({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:n}),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:a,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return t.jsx(Mo,{apiActions:d,data:r,hideInfoBar:!0,setData:n,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:o("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async t=>(t.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Fa=[{value:"FILE_SYSTEM"},{value:"SFTP"}],wa=(e,t,i,o,a)=>{o?("useSysDatasource"===o&&1==a?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===o&&("Blueprint"===a?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===a?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===a?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))):(e?.useSysCon&&t.hideField("datasourceConId"),e?.reportType?"Blueprint"===e?.reportType?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===e?.reportType?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===e?.reportType&&(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))},va=e=>{const{t:i}=E.useTranslation(),[o,a]=s.useState([]),r=Ue({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:a});return t.jsx(Mo,{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",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!uo(t.recipientMail)?(_.toast.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},Ba=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),d=Ue({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:n,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(Mo,{apiActions:d,data:a,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:o("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},ka=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemReports.data),{t:a}=E.useTranslation(),[r,n]=s.useState([]),d=Ue({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:n}),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:o,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(Mo,{apiActions:d,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:n,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:a("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},ja={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}}},Ga=(e,t,i)=>{if(e&&ja[e]){const o=ja[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},Wa=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=Ue({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:r}),d=i.useSelector(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: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 t.jsx(Mo,{apiActions:n,data:a,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:o("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Ya=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=Ue({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:r}),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.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(Mo,{apiActions:n,data:a,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:t=>(t.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Va=e=>{const[i,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=E.useTranslation(),{handleGetRequest:d}=Ce(),[l,p]=s.useState([]);s.useEffect(()=>{(async()=>{await d({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{p(e.data)}})})()},[e.selectedRecord]);const[c,u]=s.useState([]),m=Ue({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:u}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:l,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 t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Ya,{selectedRecord:i})}),t.jsx(Mo,{apiActions:m,data:c,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=>{o(e),r(!0)}}],formElements:T,keyColumnName:"id",gridTitle:n("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},qa=e=>{const{t:o}=E.useTranslation(),[a,r]=s.useState([]),n=i.useSelector(e=>e.commonStores.stores.SystemWidgets.data),d=Ue({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",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:"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:n,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"}}];return t.jsx(Mo,{apiActions:d,data:a,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:o("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async t=>(t.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Ka=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(fo,{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 t.jsx(t.Fragment,{children:t.jsx(Mo,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:r,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:Ra,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return t.jsx(Mo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:La,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Ca,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:ga,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState(null),{UserInfo:r}=De(),n=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationRanks.data),l=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[p,c]=s.useState([]),u=Ue({findAll:"api/v1/public/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:c}),[m,T]=s.useState(null),{Window:A,setWindowState:f}=Pe({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:I,setWindowState:O}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:N,setWindowState:y}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),h=[{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=>t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(fo,{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:n,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:l,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 t.jsxs(t.Fragment,{children:[t.jsx(I,{children:t.jsx(ha,{selectedRecord:m,closeModalFn:()=>{O(!1)}})}),t.jsx(A,{children:t.jsx(Ra,{selectedPerson:o})}),t.jsx(N,{children:t.jsx(aa,{selectedPerson:o,isSelfService:!1,onSuccessCallBk:()=>{y(!1)}})}),t.jsx(Mo,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:u,data:p,setData:c,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:h,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{a(e),y(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{T({organizationId:r?.currentOrganization?.id,id:e?.organizationMemberId}),O(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{a(e),f(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(_.toast.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||(_.toast.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}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({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:o});return t.jsx(t.Fragment,{children:t.jsx(Mo,{apiActions:a,data:i,setData:o,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:Da,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Pa,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:Ma,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return t.jsx(Mo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:e}=E.useTranslation(),{handleGetRequest:o}=Ce(),[a,r]=s.useState([]),n=Ue({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}),d=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(Mo,{apiActions:n,data:a,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:d,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:ga,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Ca,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:La,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=E.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),[a,r]=s.useState([]),n=Ue({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:r}),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:"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:o,optionDisplayField:"queryName",optionValueField:"id"}}];return t.jsx(Mo,{apiActions:n,data:a,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:d,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,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),n=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:d}=E.useTranslation(),[l,p]=s.useState([]),c=Ue({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:p}),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"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:n,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(ba,{selectedRecord:e})}),t.jsx(Mo,{apiActions:c,rowActions:[{label:"Query Parameters",actionFn:async e=>{o(e),r(!0)},icon:"p"}],data:l,setData:p,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"},formProps:{formValuesChangeCallBk:(e,t,i,o,a)=>{o?"useSysCon"===o&&1==a?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=Ce(),o=i.useSelector(e=>e.commonStores.stores.SystemDataSourceType.data),{t:a}=E.useTranslation(),[r,n]=s.useState([]),d=Ue({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:n,commonStoreKey:"SystemDataSources"}),l=[{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:o,comboboxValueDataType:"string",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"}}];return t.jsx(Mo,{apiActions:d,data:r,setData:n,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:l,keyColumnName:"id",gridTitle:a("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async t=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:t.id},successCallBkFn:e=>{_.toast.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}=E.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemParameterTypes.data),[a,r]=s.useState([]),n=Ue({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:r}),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:"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:o,comboboxValueDataType:"string",optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text"}},{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"}}];return t.jsx(Mo,{apiActions:n,data:a,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:d,keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,i,o,a,r)=>{o?"parameterType"===o?("combobox"===a?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField")),"date"===a||"datetime"===a?(t.showField("parameterValueFormat"),"date"===a?i.setValue("parameterValueFormat",Ge):i.setValue("parameterValueFormat",We)):(t.hideField("parameterValueFormat"),i.setValue("parameterValueFormat",null))):"parameterDataQueryId"==o?null!=a&&""!=a?(i.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==o&&(null!=a&&""!=a?(i.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):"date"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",Ge)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",We)):(i.setValue("parameterValueFormat",null),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.hideField("parameterValueFormat"))}},editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:Sa,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState(null),{Window:r,setWindowState:n}=Pe({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:d,setWindowState:l}=Pe({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[p,c]=s.useState([]),u=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),m=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),T=i.useSelector(e=>e.commonStores.stores.SystemBluePrints.data),A=Ue({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:c}),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",comboboxValueDataType:"string"}},{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:!1,hidden:!0,gridProps:{hidden:!0},comboboxValueDataType:"string",fieldType:"combobox",options:Fa,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},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:u,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:T,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:m,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 t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Fo,{reportCode:o?.reportCode,resultMode:"App"})}),t.jsx(d,{children:t.jsx(Ua,{selectedRecord:o})}),t.jsx(Mo,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:A,data:p,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{a(e),l(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{a(e),n(!0)}}],formProps:{formValuesChangeCallBk:wa},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)||(_.toast.error("You must choose the report query"),!1):(_.toast.error("You must choose the report blueprint"),!1):(_.toast.error("You must enter the jasper report name"),!1):(_.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),o=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),[a,r]=s.useState(null),{Window:n,setWindowState:d}=Pe({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:l,setWindowState:p}=Pe({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:c,setWindowState:u}=Pe({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:m}=E.useTranslation(),[T,A]=s.useState([]),f=Ue({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:A}),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:o,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox",comboboxValueDataType:"string"}},{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 t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(va,{selectedRecord:a,callBkFn:()=>{d(!1)}})}),t.jsx(l,{children:t.jsx(Ba,{selectedRecord:a,callBkFn:()=>{d(!1)}})}),t.jsx(c,{children:t.jsx(ka,{selectedRecord:a,callBkFn:()=>{u(!1)}})}),t.jsx(Mo,{apiActions:f,data:T,setData:A,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:I,keyColumnName:"id",gridTitle:m("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{r(e),d(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{r(e),p(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{r(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)||(_.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(_.toast.error("You must specifiy the period value since this email is periodical"),!1):(_.toast.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}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o}),r=[{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",comboboxValueDataType:"string",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o,a){Ga(t,o,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"}}];return t.jsx(Mo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:r,keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{Ga(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Document Status",windowIcon:"tag"}),{Window:n,setWindowState:d}=Pe({windowTitle:"Document Action",windowIcon:"stamp"}),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),p=i.useSelector(e=>e.commonStores.stores.SystemReports.data),c=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:u}=E.useTranslation(),[m,T]=s.useState([]),A=Ue({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:T}),_=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:l,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:p,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"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:c,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 t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Wa,{selectedRecord:e})}),t.jsx(n,{children:t.jsx(Va,{selectedRecord:e})}),t.jsx(Mo,{apiActions:A,data:m,setData:T,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{o(e),r(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{o(e),d(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:u("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:_,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}=E.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),a=i.useSelector(e=>e.commonStores.stores.SystemWidgetTypes.data),[r,n]=s.useState([]),d=Ue({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:n}),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:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:a,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:o,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:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!0,fieldType:"text"}}]}}];return t.jsx(Mo,{apiActions:d,data:r,setData:n,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:l,keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,d]=s.useState([]),l=N.useNavigate(),p=Ue({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:d});return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(qa,{selectedRecord:i})}),t.jsx(Mo,{apiActions:p,data:n,setData:d,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=>{o(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{l("/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:Ho},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return t.jsx(Mo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=E.useTranslation(),[o,a]=s.useState([]),{handlePostRequest:r}=Ce(),n=Ue({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:a}),d=i.useSelector(e=>e.commonStores.stores.SystemMailTemplates.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:"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"}}];return t.jsx(Mo,{apiActions:n,disableDefaultAction:!0,data:o,setData:a,editMode:{editMode:"none"},formElements:l,rowActions:[{actionFn:async e=>{(async e=>{await r({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{n.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:Da},{path:"dev/system/roles",component:Ma},{path:"dev/system/lookups",component:Sa},{path:"dev/system/modules",component:Pa},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=E.useTranslation(),[i,o]=s.useState([]),a=Ue({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:o}),r=[{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",comboboxValueDataType:"string",options:Fa,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"}}];return t.jsx(Mo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:r,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}=E.useTranslation(),[o,a]=s.useState([]),r=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),n=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=Ue({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:a}),p=[{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",comboboxValueDataType:"string",options:r,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=>t.jsx(d.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?t.jsx(T.FontAwesomeIcon,{icon:e.row.notificationIcon}):t.jsx(t.Fragment,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(d.Box,{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=>t.jsx(d.Box,{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",comboboxValueDataType:"string",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 t.jsx(Mo,{apiActions:l,data:o,setData:a,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:p,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}=De(),o=i.useSelector(e=>e.AppLayout),{handleGetRequest:a,handlePostRequest:r}=Ce(),[n,l]=s.useState([]),p=i.useSelector(e=>e.AppInfo.value),c=()=>{!0===e.isAuthenticated&&a({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{l(e.data)}})};return!0===p?.enableUINotifications&&ea(c,1e3),t.jsxs(t.Fragment,{children:[t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(d.Box,{sx:{flex:1}}),t.jsxs("h3",{children:[t.jsx(T.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===o.appDirection?"Notifications":"الاشعارات"]}),t.jsx(d.Box,{sx:{flex:1}}),t.jsx(d.Button,{sx:{textTransform:"none"},onClick:async()=>{await r({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),t.jsx(d.Button,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await r({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),t.jsx(d.Box,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:t.jsx(d.Box,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:n.map((e,i)=>t.jsx(ia,{...e,showDivider:i<n.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:Bo}]]],za=e=>{const{isUserAuthorized:i,isCurrentOrganizationAuthorizedToModule:o}=De();return e?.applicationModule&&!o(e?.applicationModule)?t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!i(e.authority)?t.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(T.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):t.jsx(t.Fragment,{children:e.children})},Ha=()=>{const e=i.useSelector(e=>e.AppLayout),o=i.useSelector(e=>e.AppInfo.value),a=i.useSelector(e=>e.AppInfo.value.businessRoutes),{UserInfo:r}=De(),n=i.useDispatch(),{show:p,hide:c}=ye(),u=i.useSelector(e=>e.commonStores),[m,T]=s.useState(!1),{isUserAuthorized:A}=De(),{handleGetRequest:_}=Ce();return s.useEffect(()=>{u?.storeKeys&&(async()=>{p("Loading ... please wait"),T(!1);const e=u.stores,t=u.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!A(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||_({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{n(Me({storeKey:i,data:e.data}))},failureCallBkFn:()=>{n(Me({storeKey:i,data:[]}))}});T(!0),c()})()},[u.storeKeys,r?.currentOrganization]),t.jsx(l.CacheProvider,{value:"ltr"===e.appDirection?ya:Na,children:t.jsx(d.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:t.jsxs(N.Routes,{children:[o.enableAdministrationModule?Ka.map((e,i)=>t.jsx(N.Route,{path:e.path,element:t.jsx(za,{authority:e.authority,applicationModule:e.applicationModule,children:t.jsx(e.component,{})})},"adm"+i)):null,a.map((e,i)=>t.jsx(N.Route,{path:e.path,element:t.jsx(za,{authority:e.authority,children:t.jsx(e.component,{})})},"bs"+i))]})})})},Qa=p.styled("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:ne.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:ne.grey[900]})}));function Za(e){const{window:o}=e,a=i.useSelector(e=>e.SideBar),r=i.useSelector(e=>e.AppInfo.value),n=i.useDispatch(),l=e=>{n(Xo(e))},s=void 0!==o?()=>o().document.body:void 0;return t.jsx(de,{container:s,anchor:"bottom",open:a.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[t.jsx(Qa,{}),t.jsx(d.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:t.jsx(Ea,{})}),t.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[t.jsx(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:r.appName}),t.jsxs(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",r.appVersion]})]})]})})}const $a=()=>{const{t:e}=E.useTranslation(),o=i.useSelector(e=>e.loadingMask.value),a=i.useSelector(e=>e.AppLayout);return t.jsxs(d.Backdrop,{dir:a.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[t.jsx(d.CircularProgress,{color:"inherit"}),t.jsx("div",{style:{marginRight:10,marginLeft:10},children:o?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Xa=()=>{const e=i.useSelector(e=>e.AppInfo.value),[o,a]=s.useState(""),[r,n]=s.useState(""),[p,c]=s.useState(!1),u=i.useSelector(e=>e.UserSession.value),m=i.useDispatch(),T=async()=>{if(null==o||""==o)return void _.toast.error("username is required to proceed");if(null==r||""==r)return void _.toast.error("password is required to proceed");c(!0);let t=null;try{if(t=await f.post(`${e.apiBaseUrl}/api/auth/login`,{username:o,password:r},{withCredentials:!0}),null!=t.data&&""!==t.data){c(!1);const e={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),m(Re.setAuthenticated(e))}}catch(e){c(!1),_.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},A=i.useSelector(e=>e.UserSession.value),I=d.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||qe} #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||qe},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}});return s.useEffect(()=>{console.log("checking usersession on reload",A),console.log("checking usersession app info",e),(async()=>{if(e?.apiBaseUrl&&null==A.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await f.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};m(Re.setAuthenticated(e))}else m(Re.setUnAuthenticated())}catch(e){m(Re.setUnAuthenticated())}}})()},[e,A.isAuthenticated]),t.jsx(l.ThemeProvider,{theme:I,children:t.jsx(d.Paper,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==u.isAuthenticated?t.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:e?.appLogo,width:150,height:150}),t.jsx(d.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),t.jsxs(d.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),t.jsx(d.TextField,{label:"username",sx:{width:300,m:1},value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),t.jsx(d.TextField,{label:"password",sx:{width:300,m:1},value:r,type:"password",onChange:e=>{n(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),t.jsx(d.Button,{loading:p,onClick:T,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):t.jsxs(t.Fragment,{children:[t.jsx(d.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})})},Ja=()=>{const[e,o]=s.useState({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:a}=Ce(),r=i.useSelector(e=>e.AppInfo.value);return s.useEffect(()=>{if(r?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{r?.checkLicense?.endpoint&&await a({endPointURI:r.checkLicense?.endpoint,successCallBkFn:e=>{o(e.data)}})})()},r?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[r]),e.isLicensed?t.jsx(t.Fragment,{}):t.jsxs(d.Box,{sx:{flex:1,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"fixed",top:0,background:"rgba(235, 235, 235, 0.8)",left:0,zIndex:9999},children:[t.jsx("img",{src:r.appLogo,style:{height:200,width:200}}),t.jsxs(d.Typography,{variant:"h5",children:[r.appName," - ",r.appVersion]}),t.jsx(d.Typography,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),t.jsx(d.Typography,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),t.jsxs(d.Typography,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),t.jsxs(d.Typography,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},er=p.styled("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const o=i.useSelector(e=>e.AppLayout),a=p.useTheme(),r=ue();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:me+"px",marginRight:r||"rtl"!==o.appDirection||!0!==t?0:me+"px"}});function tr(){const e=i.useSelector(e=>e.SideBar),o=ue(),a=i.useSelector(e=>e.UserSession),r=i.useSelector(e=>e.AppLayout);return t.jsxs(N.BrowserRouter,{children:[t.jsx(_.ToastContainer,{rtl:"rtl"===r.appDirection,draggable:!0,position:"bottom-center"}),t.jsx($a,{}),!0===a.value.isAuthenticated?t.jsxs(er,{open:e.isOpened,children:[t.jsx(c,{}),t.jsx(na,{}),o?null:t.jsx(Oa,{}),o?t.jsx(Za,{}):null,t.jsx(da,{}),t.jsx(Ha,{}),t.jsx(Ja,{})]}):t.jsx(Xa,{})]})}const ir=A.createSlice({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,t)=>{e.value=t.payload}}}),or=ir.actions;var ar=ir.reducer;const rr={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:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationmodule/application/all"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationrole/all"}},nr=e=>{const o=i.useDispatch();le.LicenseInfo.setLicenseKey(e.muiPremiumKey);const a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||Ye} #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||Ye},secondary:{main:e.appTheme?.light?.secondaryColor||Ve},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||qe} #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||qe},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}},n=i.useSelector(e=>e.AppLayout);let p={...a};"dark"===n.themeMode&&(p={...r});const c=d.createTheme({direction:n.appDirection,...p});return s.useEffect(()=>{document.title=e.documentTitle,o(or.setAppInfo(e));let t={};e.enableAdministrationModule&&(t={...rr}),e.businessCommonStoresMetaData&&(t={...t,...e.businessCommonStoresMetaData}),o(be(t))},[e]),t.jsx(l.ThemeProvider,{theme:c,children:t.jsx(tr,{})})};var dr={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"},lr={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:"Member Role",ORGANIZATION_MEMBER_ROLE_PLURAL:"Member Roles",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",ROLES:"System Roles",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:"Application Authority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"Application Authorities",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:"Application Module",ORGANIZATION_APPLICATION_MODULE_PLURAL:"Application Modules",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 sr={...dr,...lr,...{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:"Dashboard Widget",DASHBOARD_WIDGET_PLURAL:"Dashboard Widgets",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:"Query Parameter",DATA_QUERY_PARAMETER_PLURAL:"Query Parameters",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:"Excel Uploader Detail",EXCEL_UPLOADER_DETAIL_PLURAL:"Excel Uploader Details",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:"Excel Uploader Header",EXCEL_UPLOADER_HEADER_PLURAL:"Excel Uploader Headers",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:"Mail Attachment",MAIL_ATTACHMENT_PLURAL:"Mail Attachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"Mail Body",MAIL_BODY_PLURAL:"Mail Bodies",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:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_PLURAL:"Mail Notification Queue",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:"Mail Recipient",MAIL_RECIPIENT_PLURAL:"Mail Recipients",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:"Notification Queue",NOTIFICATION_QUEUE_PLURAL:"Notification Queue",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:"Report Parameter",REPORT_PARAMETER_PLURAL:"Report Parameters",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:"User Request",USER_REQUEST_PLURAL:"User Requests",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:"Workflow Document Action",WORKFLOW_DOCUMENT_ACTION_PLURAL:"Workflow Document Actions",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:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"Workflow Document Action History",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:"Workflow Document Action Mail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"Workflow Document Action Mails",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:"Workflow Document Mail Log",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"Workflow Document Mail Logs",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:"Workflow Document Status",WORKFLOW_DOCUMENT_STATUS_PLURAL:"Workflow Document Statuses",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 pr={"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:"عرض"},cr={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:"المستخدمين",ROLES:"الصلاحيات",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 ur={...pr,...cr,...{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"}};o.library.add(a.fab),o.library.add(r.far),o.library.add(n.fas);Object.defineProperty(exports,"DataGridPremium",{enumerable:!0,get:function(){return e.DataGridPremium}}),Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return i.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return i.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return T.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return _.toast}}),exports.axios=f,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return E.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return O.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return N.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return N.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return y.zodResolver}}),exports.z=ce,exports.AttachmentCard=Io,exports.AttachmentImageViewer=fo,exports.AttachmentPanel=Eo,exports.BaseApp=e=>{const[o,a]=s.useState({AppLayout:fe,UserSession:Le,loadingMask:Ne,commonStores:Se,SideBar:Jo,AppInfo:ar}),r=A.configureStore({reducer:o}),[n,d]=s.useState(!1);return s.useEffect(()=>{(()=>{const t={AppLayout:fe,UserSession:Le,loadingMask:Ne,commonStores:Se,SideBar:Jo,AppInfo:ar,...e?.businessReduxReducers};a(e=>({...t}));const i={en:{translation:{...sr,...e?.businessLocals?.en}},ar:{translation:{...ur,...e?.businessLocals?.ar}}};I.use(E.initReactI18next).init({resources:i,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),d(!0)})()},[e]),n?t.jsx(i.Provider,{store:r,children:t.jsx(nr,{...e})}):t.jsx(t.Fragment,{})},exports.CheckBox=ke,exports.ComboBox=je,exports.DARK_THEME_INITIAL_MAIN_COLOR=qe,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=Ge,exports.DATE_TIME_FORMAT=We,exports.DashboardRouteView=Ho,exports.DashboardViewer=zo,exports.Datefield=ze,exports.DatetimeField=He,exports.ExcelReportViewer=So,exports.FormElement=To,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=Ye,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=Ve,exports.ReportViewer=Fo,exports.SystemLookupCombobox=Qe,exports.TemplateBarChart=ko,exports.TemplateDataCard=jo,exports.TemplateForm=vo,exports.TemplateGauge=Go,exports.TemplateGrid=Mo,exports.TemplateLineChart=Wo,exports.TemplateLineProgress=Vo,exports.TemplatePieChart=qo,exports.TemplateTextField=Fe,exports.TransferList=Be,exports.WorkflowDocumentPanel=wo,exports.WorkflowDocumentTimeLine=Oo,exports.WorkflowRouteComponent=Bo,exports.capitalizeFirstLetter=co,exports.constructGridColumnsFromFields=it,exports.constructValidationSchema=ot,exports.formatDate=(e,t)=>t?U(e).format(t):U(e).format(Ge),exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=at,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=so,exports.isNumeric=po,exports.isValidEmail=uo,exports.parseStringToDate=(e,t)=>t?U(e,t).toDate():U(e,Ge).toDate(),exports.timeAgo=mo,exports.useApiActions=Ue,exports.useAxios=Ce,exports.useConfirmationWindow=ge,exports.useIsMobile=ue,exports.useLoadingMask=ye,exports.useSession=De,exports.useWindow=Pe,Object.keys(d).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return d[e]}})}),Object.keys(k).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return k[e]}})}),Object.keys(j).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return j[e]}})});
38
38
  //# sourceMappingURL=index.js.map