@asaleh37/ui-base 25.10.24 → 25.12.10
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.d.ts +7 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +112 -112
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/common/ChangeOrgForm.tsx +4 -0
- package/src/hooks/index.ts +3 -2
- package/src/hooks/useCommonStore.tsx +29 -0
- package/src/main.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ 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 o=ne(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const i=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${i})()\` 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(${i})(...args) API requires all its args to be defined.`),o(...t)}:o}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Jo),s=ce.forwardRef(function(e,s){const l=function(e=ti){return ei(e)}(i),{className:d,component:c="div",...u}=oi(e);return t.jsx(a,{as:c,ref:s,className:ai(d,n?n(r):r),theme:o&&l[o]||l,...u})});return s}({defaultClassName:function(e,t,o="Mui"){const i={};return t.forEach(t=>{i[t]=function(e,t,o="Mui"){const i=si[t];return i?`${o}-${i}`:`${ri.generate(e)}-${t}`}(e,t,o)}),i}("MuiBox",["root"]).root,generateClassName:ri.generate});function di(e){return"number"==typeof e&&!isNaN(e)}function ci(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function ui(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function pi(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function hi(e,t){const o=new Date(e),i=new Date,r=Math.floor((o-i)/1e3),n="rtl"===t?"ar":"en",a=new Intl.RelativeTimeFormat(n,{numeric:"auto"}),s=[{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 s){const o=Math.floor(r/t);if(Math.abs(o)>1)return a.format(o,e)}return"ar"===n?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(li.propTypes={children:Dt.node,component:Dt.elementType,sx:Dt.oneOfType([Dt.arrayOf(Dt.oneOfType([Dt.func,Dt.object,Dt.bool])),Dt.func,Dt.object])});const mi=e=>{if(e?.fieldInfo){const o=e.fieldInfo,i=e?.formManager||null,r=e?.formActions||null,n=e?.formValues||null,a=e?.fieldInfo?.fieldName||null,l=e?.fieldInfo?.fieldType||null;if(!(o&&i&&n&&a&&l))return t.jsx(t.Fragment,{});const d=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(n):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return e.hiddenFields.includes(a)?t.jsx(t.Fragment,{}):t.jsx(s.Grid2,{size:o?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?t.jsx(De,{...o.muiTextFieldProps,fullWidth:!0,type:l,disabled:e.disabledFields.includes(a),label:d(),value:n[a],onChange:t=>{let o=null;""!=t.target.value&&(o="number"===l&&ci(t.target.value)?Number(t.target.value):t.target.value),i.setValue(a,o),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,o)},sx:{"& .MuiInputBase-root":{height:`${o?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...o?.formProps?.style,display:e.hiddenFields.includes(a)?"none":void 0},error:null!=i.formState.errors[a],helperText:i?.formState?.errors[a]?.message?.toString()}):"date"===o?.fieldType?t.jsx(Ve,{format:o?.dateFormat||je,sx:o?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),label:d(),onChangeCallBack:t=>{i.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,t)},value:n[a],error:null!=i.formState.errors[a],errorMessage:i?.formState?.errors[a]?.message?.toString()}):"datetime"===o?.fieldType?t.jsx(ze,{format:o?.dateFormat||Ge,sx:o?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),label:d(),onChangeCallBack:t=>{i.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,t)},value:n[a],error:null!=i.formState.errors[a],errorMessage:i?.formState?.errors[a]?.message?.toString()}):"checkbox"===o?.fieldType?t.jsx(Be,{label:d(),onChangeCallBack:t=>{i.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,t)},value:n[a],checkedValue:o?.checkedValue||!0,unCheckedValue:o?.unCheckedValue||!1,disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),sx:o?.formProps?.style}):"combobox"===o?.fieldType?t.jsx(qe,{sx:o?.formProps?.style||{width:"100%"},label:d(),commonStoreKey:o?.commonStoreKey,dataQueryId:o?.dataQueryId,storeUrl:o?.storeUrl,storeLoadParam:o?.storeLoadParam,disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),onChangeCallBack:(t,o)=>{let s=null;t&&(s=t),i.setValue(a,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,t,o)},options:o?.options||[],displayField:o?.optionDisplayField||"",valueField:o?.optionValueField||"",value:n[a],errorMessage:i?.formState?.errors[a]?.message?.toString()}):"lookup"===o?.fieldType?t.jsx(Qe,{sx:o?.formProps?.style||{width:"100%"},label:d(),disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),onChangeCallBack:(t,o)=>{let s=null;t&&(s=t),i.setValue(a,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,t,o)},lookupType:o.lookupType,value:n[a],errorMessage:i?.formState?.errors[a]?.message?.toString()}):null})}return t.jsx(t.Fragment,{})},fi=e=>{const o=we(),{ConfirmationWindow:i,setOpen:r}=be({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||o.isUserAuthorized(e.authority)?t.jsxs(t.Fragment,{children:[t.jsx(i,{}),t.jsxs(s.Button,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?r(!0):e?.actionFn(e.record)}},children:[e?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx("div",{children:e?.label})]})]}):t.jsx(t.Fragment,{})},gi=e=>{const{t:o}=y.useTranslation();return t.jsx(t.Fragment,{children:t.jsxs(s.Grid2,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?t.jsx(s.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(m.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),t.jsx("div",{children:o(e.label)})]}):t.jsx(t.Fragment,{children:o(e.label)})}):t.jsx(t.Fragment,{}),e?.elements?e.elements.map(o=>"group"===o.type?t.jsx(gi,{...o.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields,formValuesChangeCallBk:e?.formValuesChangeCallBk}):"field"===o.type&&"props"===o.mode?t.jsx(mi,{fieldInfo:o.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields,formValuesChangeCallBk:e?.formValuesChangeCallBk}):"field"===o.type&&"node"===o.mode?t.jsx(s.Grid2,{size:o?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:t.jsx(o.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?t.jsx(s.Grid2,{size:{sm:12},sx:{padding:1},children:e.actions.map(o=>t.jsx(fi,{...o,record:e.formValues}))}):t.jsx(t.Fragment,{})]})})},Ti=e=>{const i=o.useSelector(e=>e.AppInfo.value.apiBaseUrl),[r,n]=d.useState(null);return d.useEffect(()=>{e?.refKey&&(()=>{let t=i+"/api/v1/attachment/";e?.attachmentId?t+="download?attachmentId="+e.attachmentId:(t+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(t+=`&category=${e.category}`)),n(t)})()},[e.refKey]),e?.showAsAvatar?t.jsx(s.Avatar,{sx:e.style,onError:()=>{n(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:r}):t.jsx("img",{src:r,loading:"lazy",alt:"image",onError:()=>{n(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Ai=e=>{const{handleGetRequest:o,handleDeleteRequest:i}=Re(),{isUserAuthorized:r}=we();let n=!0;e?.downloadAuthorityKey&&(n=r(e.downloadAuthorityKey));const{ConfirmationWindow:a,setOpen:l}=be({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await i({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(a,{}),t.jsxs(N,{sx:{width:300,border:"0.5px solid gray"},children:[t.jsx(U,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?t.jsx(Ti,{attachmentId:e.id}):t.jsx(m.FontAwesomeIcon,{icon:"file",size:"3x"})}),t.jsxs(k,{children:[t.jsx(F,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),t.jsxs(D,{children:[e?.allowDelete?t.jsx(s.IconButton,{size:"small",onClick:()=>{l(!0)},children:t.jsx(s.Tooltip,{title:"Delete Attachment",children:t.jsx(m.FontAwesomeIcon,{icon:"trash"})})}):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),n?t.jsx(s.IconButton,{size:"small",onClick:async()=>{await o({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:e.id},showMask:!0,responseType:"blob",successCallBkFn:t=>{const o=window.URL.createObjectURL(new Blob([t.data])),i=document.createElement("a");i.href=o,i.setAttribute("download",e.fileName),document.body.appendChild(i),i.click(),i.remove()}})},children:t.jsx(s.Tooltip,{title:"Download Attachment",children:t.jsx(m.FontAwesomeIcon,{icon:"download"})})}):t.jsx(t.Fragment,{})]})]})]})},yi=e=>{const{handleUploadRequest:o,handleGetRequest:i}=Re(),[r,n]=d.useState(null),[a,l]=d.useState([]),[c,u]=d.useState(null),[p,h]=d.useState(null),[f,T]=d.useState([]),[A,y]=d.useState(null),{isUserAuthorized:I}=we(),_=e=>e.split(".").pop()?.toLowerCase()||"";d.useEffect(()=>{(async()=>{await i({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{y(e.data)}})})()},[e.refKey,e.attachmentCode]),d.useEffect(()=>{if(T(A?.allowedFileTypes?A.allowedFileTypes.split(","):[]),A?.attachmentCategories){const e=[];for(const t of A.attachmentCategories.split(","))e.push({value:t});l(e)}else l([])},[A]);let E=!0;A?.downloadAuthorityKey&&!I(A?.downloadAuthorityKey)&&(E=!1);let O=!0;return!1===e?.enableAttachment&&(O=!1),A?.uploadAuthorityKey&&!I(A.uploadAuthorityKey)&&(O=!1),t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:"100%",minHeight:400,alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[O?t.jsx(t.Fragment,{children:null==A?.maxAllowedNumberOfFiles||A?.maxAllowedNumberOfFiles>A.refKeyAttachments.length?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),t.jsx("input",{type:"file",style:{margin:20},accept:A?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=_(t.name);if(f.length>0&&!f.includes(e))return void g.toast.error(e+" is not allowed")}n(e.target.files)}}),a.length>0?t.jsx(qe,{label:"Attachment Type",sx:{width:300,m:1},options:a,displayField:"value",valueField:"value",value:p,onChangeCallBack:e=>{h(e)}}):t.jsx(t.Fragment,{}),t.jsx(De,{label:"Remark",value:c,onChange:e=>u(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),t.jsx(s.Button,{sx:{m:1},variant:"contained",onClick:async()=>{let t=A?.refKeyAttachments.length||0;if(A?.maxAllowedNumberOfFiles&&r.length+t>A.maxAllowedNumberOfFiles)g.toast.error("Maximum number of attachments is "+A.maxAllowedNumberOfFiles);else if(!0===A?.isCategoryRequired&&a.length>0&&(null==p||void 0===p||""===p))g.toast.error("You must selected document type to process your request");else if(r){for(const e of r)if(e.type.startsWith("image/")){const t=600,o=1024*t;if(e.size>o)return void g.toast.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await o({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:c,category:p},files:r,successCallBkFn:e=>{y(e.data),n(null),h(null),u(null),g.toast.success("Your request has been process successfully")}})}else g.toast.error("You must add files to upload")},children:"Upload"})]}):t.jsx(t.Fragment,{})}):t.jsx(t.Fragment,{}),E&&A?.refKeyAttachments?.length>0?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),t.jsx(s.Grid2,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:A?.refKeyAttachments.map(o=>t.jsx(s.Grid2,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:t.jsx(Ai,{...o,attachmentCode:e.attachmentCode,setAttachmentConfig:y,downloadAuthorityKey:A.downloadAuthorityKey,allowDelete:O})}))})]}):t.jsx(t.Fragment,{})]})},Ii=e=>{const i=o.useSelector(e=>e.AppLayout),{t:r}=y.useTranslation();return t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:600,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),r("WF_ACTION_HISTORY_LABEL")]}),t.jsx(s.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((o,r)=>t.jsx(t.Fragment,{children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[t.jsxs(s.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[t.jsx(s.Box,{sx:{marginBottom:.2},children:o.actionTime}),t.jsxs(F,{children:["via ",o.actionMethod]})]}),t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[t.jsx(Ti,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:o?.personId?o?.personId+"":void 0,style:{m:1,width:70,height:70}}),r!==e.actionHistory.length-1?t.jsx(s.Box,{sx:{marginTop:11,position:"absolute"},children:"|"}):t.jsx(t.Fragment,{})]}),t.jsxs(s.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%"},children:["ltr"===i.appDirection?`${o?.documentActionEnName}`:`${o?.documentActionArName}`,o?.actionComment?" - "+o.actionComment:""]}),t.jsx(s.Box,{sx:{width:"100%"},children:"ltr"===i.appDirection?`${o?.employeeEnName}`:`${o?.employeeArName}`})]})]})}))})]})},_i=e=>{const{t:o}=y.useTranslation(),i=we(),{ConfirmationWindow:r,setOpen:n}=be({body:o(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:o("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let a=!0;if(e.authority&&(a=i.isUserAuthorized(e.authority)),a)return t.jsxs(t.Fragment,{children:[t.jsx(r,{}),t.jsxs(s.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?n(!0):(await e.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn),e?.reloadData&&e.reloadData())}else g.toast.error(o("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(m.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:e.icon}):t.jsx(t.Fragment,{}),e?.label?o(e.label):t.jsx(t.Fragment,{})]})]})},Ei=s.styled(e.QuickFilter)({display:"grid",alignItems:"center"}),Oi=s.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"])})),Ci=s.styled(s.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"])})),Ni=o=>{const{t:i}=y.useTranslation(),r=we(),n=!o?.templateProps?.editAction?.authority||r.isUserAuthorized(o.templateProps.editAction.authority),a=rt(o?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},o?.templateProps?.data||[],o?.templateProps?.keyColumnName||"id");return t.jsxs(e.Toolbar,{children:[n&&"none"!=o?.templateProps?.editMode?.editMode&&(void 0===o?.templateProps?.hideCreateBtn||!1===o?.templateProps?.hideCreateBtn)?t.jsxs(s.Button,{onClick:o?.handleCreateNewRecord,children:[t.jsx(m.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),i("ADD_BTN_LABEL")]}):t.jsx(t.Fragment,{}),o?.templateProps?.rowActions?o.templateProps.rowActions.map((e,t)=>!0===e?.gridActionProps?.multiRecord?d.createElement(_i,{...e,key:t,reloadData:async()=>{o.templateProps.apiActions.reloadData(o?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:a.selectedRecordIds,recordsToProcessActionOn:a.selectedRecords}):null):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,mx:.5,my:.5,padding:1},children:o?.templateProps?.tBar}),t.jsx(s.Tooltip,{title:"Columns",children:t.jsx(e.ColumnsPanelTrigger,{render:t.jsx(e.ToolbarButton,{}),children:t.jsx(e.GridViewColumnIcon,{fontSize:"small"})})}),t.jsx(s.Tooltip,{title:"Filters",children:t.jsx(e.FilterPanelTrigger,{render:(o,i)=>t.jsx(e.ToolbarButton,{...o,color:"default",children:t.jsx(s.Badge,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:t.jsx(e.GridFilterListIcon,{fontSize:"small"})})})})}),o?.templateProps?.gridStateKey?t.jsx(s.Tooltip,{title:i("RESET_GRID_STATE"),children:t.jsx(s.IconButton,{onClick:o?.clearGridState,children:t.jsx(m.FontAwesomeIcon,{icon:"eraser"})})}):t.jsx(t.Fragment,{}),t.jsx(s.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),t.jsx(s.Tooltip,{title:i("EXPORT_EXECL_LABEL"),children:t.jsx(e.ExportExcel,{render:t.jsx(s.MenuItem,{}),children:t.jsx(m.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),t.jsxs(Ei,{children:[t.jsx(e.QuickFilterTrigger,{render:(e,o)=>t.jsx(s.Tooltip,{title:i("SEARCH_BTN_LABEL"),enterDelay:0,children:t.jsx(Oi,{...e,ownerState:{expanded:o.expanded},color:"default","aria-disabled":o.expanded,children:t.jsx(m.FontAwesomeIcon,{icon:"search"})})})}),t.jsx(e.QuickFilterControl,{render:({ref:o,...r},n)=>t.jsx(Ci,{...r,ownerState:{expanded:n.expanded},inputRef:o,"aria-label":"Search",placeholder:`${i("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:t.jsx(s.InputAdornment,{position:"start",children:t.jsx(m.FontAwesomeIcon,{icon:"search"})}),endAdornment:n.value?t.jsx(s.InputAdornment,{position:"end",children:t.jsx(e.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:t.jsx(m.FontAwesomeIcon,{icon:"xmark"})})}):null,...r.slotProps?.input},...r.slotProps}})})]}),t.jsx(s.IconButton,{onClick:()=>{o.templateProps.apiActions.reloadData(o?.templateProps?.gridLoadParametersValues)},children:t.jsx(m.FontAwesomeIcon,{icon:"refresh"})})]})},Ri=o=>{const{t:i}=y.useTranslation(),r=we(),{ConfirmationWindow:n,setOpen:a}=be({body:i(o?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(o?.actionFn(o.record)),o?.reloadData&&o.reloadData()}});let l=!0;o.authority&&(l=r.isUserAuthorized(o.authority));let d={};o?.getActionIconStyleForRecord&&(d=o.getActionIconStyleForRecord(o.record));let c=!0;o?.isActionVisibleForRecord&&(c=o?.isActionVisibleForRecord(o.record));let u=!1;if(o?.isActionDisabledForRecord&&(u=o.isActionDisabledForRecord(o.record)),l&&c)return t.jsxs(t.Fragment,{children:[t.jsx(n,{}),t.jsx(e.GridActionsCellItem,{disabled:u,icon:t.jsx(s.Tooltip,{title:o?.label?i(o.label):"",children:t.jsx(m.FontAwesomeIcon,{icon:o.icon,style:{...d,color:u?"gray":null!=d?.color?d.color:void 0}})}),showInMenu:o?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!u){if(o?.preActionValidation&&!o.preActionValidation(o.record))return;!0===o?.isConfirmationRequired?a(!0):(await o.actionFn(o.record),!0===o?.gridActionProps?.reloadGridAfterAction&&o?.reloadData&&o.reloadData())}}})]})};let bi=-1;const wi=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Si=(e,t)=>{const o=wi(e);localStorage.setItem(e,JSON.stringify({...o,...t}))},Pi=["__check__","actions"],vi=i=>{const{t:r}=y.useTranslation(),{handleGetRequest:n}=Re(),a=o.useSelector(e=>e.commonStores.stores),l=o.useSelector(e=>e.AppLayout),[c,u]=d.useState({}),[p,h]=d.useState(!0),{getLookupOptions:f}=(()=>{const{handleGetRequest:e}=Re(),t=o.useSelector(e=>e.AppLayout),i=async t=>{let o=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{o=e.data}}),o};return{generateLookupGridColumn:async e=>{let o=await i(e.lookupType);return{...e,options:o,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:i}})(),{Window:T,setWindowState:A}=Se({windowTitle:r(i.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{i?.apiActions?.reloadData(i.gridLoadParametersValues)}}),{Window:I,setWindowState:E}=Se({windowTitle:r(i.gridTitle)+" Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:()=>{i?.apiActions?.reloadData(i.gridLoadParametersValues)}}),[C,N]=d.useState([]),R=tt(i.formElements),b=[],w=d.useMemo(()=>i?.gridStateKey?wi(i.gridStateKey):{},[]);for(const e of R)!0===e?.gridProps?.hidden&&b.push(e.fieldName);let S={};if(w?.columnVisibilityModel){S=w.columnVisibilityModel;const e=Object.keys(S);for(const t of b)e.includes(t)||(S[t]=!1)}else for(const e of b)S[e]=!1;const P=o.useSelector(e=>e.AppLayout.appDirection),[v,L]=d.useState(S),[M,x]=d.useState(w.columnOrder||[]),[D,k]=d.useState(w.columnWidths||{}),[U,F]=d.useState(w.columnGroupingModel||[]);let B=w?.pinnedColumns?.left||[];B=B.filter(e=>!Pi.includes(e));let q=w?.pinnedColumns?.right||[]||[];q=q.filter(e=>!Pi.includes(e));const[j,G]=d.useState({left:[..."ltr"===P?Pi:[],...B],right:[..."rtl"===P?Pi:[],...q]}),W=we(),H=_.useNavigate(),[Y,K]=d.useState(null),[V,z]=d.useState(null),[Q,$]=d.useState({}),Z=async(e,t,o)=>{let i=[];return e?await n({endPointURI:e,showMask:!1,parameters:t,successCallBkFn:e=>{i=e.data}}):o&&await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:o,...t},successCallBkFn:e=>{i=e.data}}),i},J=async()=>{let e=ot(R,"row"===i?.editMode?.editMode||!1,r);for(let t of e)if(t?.lookupType&&(t.displayField="ltr"===l.appDirection?"lookupEnDisplay":"lookupArDisplay",t.options=await f(t.lookupType),t.valueField="lookupValue"),"custom"===t.type){if(t?.options)continue;t.options=t?.commonStoreKey?a[t.commonStoreKey]?.data||[]:await Z(t?.storeUrl,t?.storeLoadParam,t?.dataQueryId)}N(e)},[X,ee]=d.useState({ids:new Set,type:"include"});let te="id";i?.keyColumnName&&(te=i?.keyColumnName);const oe=i.setData;let ie=null;ie=i?.validationSchema?i.validationSchema:O.z.object(it(R));let re=!0;i?.editAction?.authority&&(re=W.isUserAuthorized(i.editAction.authority));let ne=!0;i?.deleteAction?.authority&&(ne=W.isUserAuthorized(i.deleteAction.authority));const{ConfirmationWindow:ae,setOpen:se}=be({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;Y&&!0===Y?.isNew||(e=await i.apiActions.deleteRecordById(Y[te])),e&&(i?.deleteAction?.postActionCallBack&&await i.deleteAction.postActionCallBack(Y),oe(e=>e.filter(e=>e[te]!=Y[te])))}});let le,de,ce,ue,pe,he;"modal"===i?.editMode?.editMode&&(le=i?.editMode?.specs?.modalHeight||"fit-content",de=i?.editMode?.specs?.modalWidth||"300",ce=i?.editMode?.specs?.modalMinHeight,ue=i?.editMode?.specs?.modalMinWidth,pe=i?.editMode?.specs?.modalIcon||"window",he=i?.editMode?.specs?.modalTitle||"Record Form");const{Window:me,setWindowState:fe}=Se({height:le,minHeight:ce,minWidth:ue,onCloseCallBack:()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)},width:de,windowIcon:pe,windowTitle:he}),ge={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(i?.rowActions?30*i.rowActions.length:0)+(i?.editAction&&i?.editAction?.isEnabled?30:0)+(i?.deleteAction&&i?.deleteAction?.isEnabled?30:0)+(i?.attachment?30:0)+(i?.workFlowDocumentCode?30:0),getActions:o=>{const n=o.row,a=[];if("none"!=i?.editMode?.editMode&&(void 0===i?.disableDefaultAction||!i.disableDefaultAction)){const o=Q[n[te]]?.mode===e.GridRowModes.Edit;if("row"===i.editMode.editMode&&o)re&&(a.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(m.FontAwesomeIcon,{icon:"save"}),label:r("SAVE_BTN_LABEL"),onClick:()=>{(t=>{const o=t[te];$({...Q,[o]:{mode:e.GridRowModes.View}})})(n)}})),a.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(m.FontAwesomeIcon,{icon:"cancel"}),label:r("CANCEL_BTN_LABEL"),onClick:()=>{(t=>{const o=t[te];o&&di(o)&&o<0?($({...Q,[o]:{mode:e.GridRowModes.View,ignoreModifications:!0}}),oe(e=>{const t=e.filter(e=>e[te]!=o);return t})):$({...Q,[o]:{mode:e.GridRowModes.View,ignoreModifications:!0}})})(n)},color:"inherit"})));else{if(i?.editAction&&!0===i?.editAction?.isEnabled){let o=!0;i?.editAction?.isActionVisibleForRecord&&(o=i?.editAction?.isActionVisibleForRecord(n));let l=!1;i?.editAction?.isActionDisabledForRecord&&(l=i?.editAction?.isActionDisabledForRecord(n)),re&&o&&a.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(s.Tooltip,{title:r("EDIT_BTN_LABEL"),children:t.jsx(m.FontAwesomeIcon,{icon:"edit",style:{color:l?"gray":void 0}})}),showInMenu:i?.editAction?.gridActionProps?.showInMenu||!1,label:r("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{re&&!l&&(async t=>{if(t)if(z(t),"form"===i.editMode.editMode)H(i.editMode.specs.formRoute+"/"+t[te]);else if("modal"===i.editMode.editMode)fe(!0);else if("row"===i?.editMode?.editMode){const o=t[te];$({...Q,[o]:{mode:e.GridRowModes.Edit}})}})(n)}}))}if(i?.deleteAction&&!0===i?.deleteAction?.isEnabled){let o=!0;i?.deleteAction?.isActionVisibleForRecord&&(o=i?.deleteAction?.isActionVisibleForRecord(n));let l=!1;i?.deleteAction?.isActionDisabledForRecord&&(l=i?.deleteAction?.isActionDisabledForRecord(n)),ne&&o&&a.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(s.Tooltip,{title:r("DELETE_BTN_LABEL"),children:t.jsx(m.FontAwesomeIcon,{icon:"trash",style:{color:l?"gray":void 0}})}),showInMenu:i?.deleteAction?.gridActionProps?.showInMenu||!1,label:r("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(ne&&!l){if(i?.deleteAction?.preActionValidation&&!i.deleteAction.preActionValidation(n))return;K(n),se(!0)}}}))}}}if(n[i?.keyColumnName||"id"]&&n[i?.keyColumnName||"id"]>0&&i?.attachment&&a?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(s.Tooltip,{title:"Attachments",children:t.jsx(m.FontAwesomeIcon,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{u(n),h(!i?.attachment?.enableAttachFn||i.attachment.enableAttachFn(n)),A(!0)}})),n[i?.keyColumnName||"id"]&&n[i?.keyColumnName||"id"]>0&&i?.workFlowDocumentCode&&a?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(s.Tooltip,{title:"Approvals",children:t.jsx(m.FontAwesomeIcon,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{u(n),E(!0)}})),n[i?.keyColumnName||"id"]&&n[i?.keyColumnName||"id"]>0&&i?.rowActions)for(const e of i.rowActions)e?.gridActionProps?.multiRecord&&!0===e?.gridActionProps?.multiRecord||a.push(t.jsx(Ri,{...e,record:n,reloadData:async()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)}}));return a}};let Te=[];(void 0===i?.disableDefaultAction||!i.disableDefaultAction||i?.rowActions&&i?.rowActions.length>0)&&Te.push(ge),Te=[...Te,...C];d.useEffect(()=>{void 0!==i?.autoLoad&&!0!==i.autoLoad||i.apiActions.reloadData(i?.gridLoadParametersValues),J()},[]),d.useEffect(()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)},[W.UserInfo?.currentOrganization]),d.useEffect(()=>{J()},[P,i.formElements]);const Ae=d.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,D,Te]);return t.jsxs(t.Fragment,{children:[t.jsx(ae,{}),"modal"===i?.editMode?.editMode?t.jsx(me,{children:i?.editMode?.specs?.formComponent?t.jsx(i.editMode.specs.formComponent,{recordIdToEdit:V?V[te]:void 0,formCloseCallBk:()=>{fe(!1),i.apiActions.reloadData(i?.gridLoadParametersValues)}}):t.jsx(Ui,{keyColumnName:i.keyColumnName,attachment:i.attachment,formValuesChangeCallBk:i?.formProps?.formValuesChangeCallBk,recordIdToEdit:V?V[te]:void 0,formCloseCallBk:()=>{fe(!1),i.apiActions.reloadData(i?.gridLoadParametersValues)},elements:i.formElements,apiActions:i.apiActions,editAuthorityKey:i?.editAction?.authority,formSavedSuccessfullyCallBk:i?.editAction?.postActionCallBack,preSaveValidation:i?.editAction?.preActionValidation,actions:i?.rowActions})}):t.jsx(t.Fragment,{}),void 0!==i?.hideInfoBar||i?.hideInfoBar?t.jsx(t.Fragment,{}):t.jsxs(s.Box,{sx:{display:"flex"},children:[void 0!==i?.hideBackButton||i?.hideBackButton?t.jsx(t.Fragment,{}):t.jsx(s.IconButton,{onClick:()=>{H(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"ltr"===P?"arrow-left":"arrow-right"})}),t.jsxs(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[i?.girdIcon?t.jsx(m.FontAwesomeIcon,{icon:i.girdIcon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx(s.Typography,{variant:"h5",children:i?.gridTitle?ui(r(i?.gridTitle)):""})]})]}),i?.gridLoadParameters&&i?.gridLoadParameters.length>0&&i?.gridLoadParametersValues&&i?.setGridLoadParametersValues?t.jsxs(s.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(s.AccordionSummary,{expandIcon:t.jsx(e.GridExpandMoreIcon,{}),children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(s.Typography,{component:"span",children:"Filters"})]})}),t.jsx(s.AccordionDetails,{children:t.jsx(s.Box,{children:t.jsx(Ui,{saveButtonSpecs:{label:r("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:r("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?i.setGridLoadParametersValues(e):i.setGridLoadParametersValues({}),i.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:i.gridLoadParameters})})})]}):t.jsx(t.Fragment,{}),i?.attachment?t.jsx(T,{children:t.jsx(yi,{attachmentCode:i.attachment.attachmentCode,refKey:c[i?.keyColumnName||"id"],enableAttachment:p})}):t.jsx(t.Fragment,{}),i?.workFlowDocumentCode?t.jsx(I,{children:t.jsx(ki,{workFlowDocumentCode:i.workFlowDocumentCode,refDocumentId:c[i?.keyColumnName||"id"],postActionCallBk:()=>{E(!1),i.apiActions.reloadData(i.gridLoadParametersValues)},cancelActionCallBk:()=>{E(!1),i.apiActions.reloadData(i.gridLoadParametersValues)}})}):t.jsx(t.Fragment,{}),t.jsx(e.DataGridPremium,{...i?.muiProps,slots:{toolbar:Ni},slotProps:{toolbar:{templateProps:{...i,rowSelectionModel:X,data:i?.data},handleCreateNewRecord:()=>{if("form"===i?.editMode?.editMode)H(i.editMode.specs.formRoute);else if("modal"===i?.editMode?.editMode)z(null),fe(!0);else if("row"===i?.editMode?.editMode){bi-=1;const t={};t[te]=bi,t.isNew=!0;for(const e of C)"actions"!=e?.type&&e?.field!=te&&e?.field&&(t[e.field]=null);oe(e=>[t,...e]),$(t=>({...t,[bi]:{mode:e.GridRowModes.Edit}}))}},clearGridState:()=>{i?.gridStateKey&&localStorage.removeItem(i.gridStateKey),L({}),x([]),k({}),F([]),G({left:[..."ltr"===P?Pi:[]],right:[..."rtl"===P?Pi:[]]})}}},getRowId:e=>e[te],showToolbar:!0,rows:i?.data,columns:Ae,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==i.editMode.editMode?Q:void 0,onRowModesModelChange:"row"==i.editMode.editMode?e=>{$(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async e=>{if("row"===i.editMode.editMode){let o=null;const r=(e=>{try{ie.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof O.z.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(e);if(r){const e=r.split(",");throw g.toast.error(t.jsx("div",{style:{},children:e.map(e=>t.jsxs(t.Fragment,{children:[t.jsx("div",{children:e}),t.jsx(s.Divider,{})]}))})),new Error(r)}if(i?.editAction?.preActionValidation&&!i.editAction.preActionValidation(e))throw new Error("error on the configured presave validation");const n={...e};if(e[te]&&di(e[te])&&Number(e[te])<0&&(n[te]=null),o=await i.apiActions.saveRecord(n),null==o)throw new Error("Failed to process your request, contact your administrator");return i?.editAction?.postActionCallBack&&await i.editAction.postActionCallBack(e),!0===e?.isNew&&oe(t=>{const i=t.filter(t=>t[te]!==e[te]);return[o,...i]}),!0===i?.editMode?.reloadAfterSave&&i?.apiActions?.reloadData&&i?.apiActions?.reloadData(i?.gridLoadParametersValues),o}},rowSelectionModel:X,onRowSelectionModelChange:e=>{ee(e)},columnVisibilityModel:v,onColumnVisibilityModelChange:e=>{L(e),i?.gridStateKey&&Si(i.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:o}=e;x(e=>{const r=e.length?[...e]:Te.map(e=>e.field),n=r.indexOf(t.field);return-1===n||(r.splice(n,1),r.splice(o,0,t.field),i?.gridStateKey&&Si(i.gridStateKey,{columnOrder:r})),r})},rowGroupingModel:U,onRowGroupingModelChange:e=>{(e=>{F(e),i?.gridStateKey&&Si(i.gridStateKey,{columnGroupingModel:e})})(e)},sx:{width:"100%"}})]})},Li=e=>{if(0===e.length)return[];const t=[];for(const o of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:o,fieldName:o,fieldType:"text"}};t.push(e)}return t},Mi=e=>{const[o,i]=d.useState([]);return d.useEffect(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));i(t)},[e.reportData]),t.jsx(vi,{data:o,disableDefaultAction:!0,setData:e.setReportData,formElements:Li(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()=>{}}})},xi=e=>{const[o,i]=d.useState({...e?.initialParameterValues}),r=((e,t)=>{const o=[];for(const i of e){const e={type:"field",mode:"props",props:{fieldLabel:i?.parameterLabel,fieldName:i?.parameterCode,fieldType:i?.parameterType,hidden:i?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:i?.mandatory,defaultValue:t[i?.parameterCode]||i?.defaultValue}};o.push(e)}return o})(e.parameters,o);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:o}=y.useTranslation();return t.jsxs(s.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(s.AccordionSummary,{expandIcon:t.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(s.Typography,{component:"span",children:"Filters"})]})}),t.jsx(s.AccordionDetails,{children:t.jsx(s.Box,{children:t.jsx(Ui,{saveButtonSpecs:{label:o("Filter"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:o("RESET_BTN_LABEL"),icon:"eraser",hidden:!0,actionButtonVariant:"outlined",actionButtonColor:"error"},actions:[{label:o("RESET_BTN_LABEL"),icon:"eraser",isIdRequired:!1,formActionProps:{enabled:!0},actionFn:async(e,t)=>{i({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{i(null!=t?t:{}),e&&await e(t)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:r})})})]})},parametersValues:o,setParametersValues:i,panelElements:r}},Di=e=>{const[o,i]=d.useState(null),[r,n]=d.useState(null),[a,l]=d.useState([]),[c,u]=d.useState("WAITING_REPORT_CODE"),{handleGetRequest:p,handlePostRequest:h,HandleDownloadHTTPPostPDF:f}=Re(),[g,T]=d.useState(null),{ParameterPanel:A,parametersValues:y,panelElements:I,setParametersValues:_}=xi({parameters:g?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}});d.useEffect(()=>{g&&(!0===e?.byPassParameterEntry||0==g.reportParameters.length?(E(y),u("WAITING_RESULT")):u("WAITING_PARAMETER_INPUT"))},[g]);const E=async t=>{u("WAITING_RESULT"),"Excel"===g?.reportType?await h({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{u("SHOWING_RESULT"),l(e.data)}}):g?.reportType&&await f({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{u("SHOWING_RESULT");const t=e.headers["content-disposition"];let o="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(o=e[1])}if(o.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),o=URL.createObjectURL(t);i(o)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),i=window.URL.createObjectURL(t),r=document.createElement("a");r.href=i,r.download=o,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(i)}},failureCallBkFn:e=>{n("Failed To run report ... contact your administrator"),u("ERROR")}})};return d.useEffect(()=>{e?.reportCode&&(async()=>{u("LOADING_METADATA"),await p({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:e=>{T(e.data)},failureCallBkFn:e=>{n("Failed loading report metadata ... contact your administrator"),u("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[t.jsxs(s.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[t.jsx(m.FontAwesomeIcon,{icon:"Excel"===g?.reportType?"file-excel":"file-pdf",color:"Excel"===g?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),g?.reportName]}),"Excel"!=g?.reportType&&"SHOWING_RESULT"===c?t.jsxs(t.Fragment,{children:[!0===e?.byPassParameterEntry?t.jsx(t.Fragment,{}):g?.reportParameters.length>0?t.jsx(s.IconButton,{onClick:()=>{u("WAITING_PARAMETER_INPUT")},children:t.jsx(m.FontAwesomeIcon,{icon:"filter"})}):t.jsx(t.Fragment,{}),t.jsx(s.IconButton,{children:t.jsx(m.FontAwesomeIcon,{icon:"refresh",onClick:()=>{E(y)}})})]}):t.jsx(t.Fragment,{})]}),t.jsx(s.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===c&&"Excel"!=g?.reportType?t.jsx(A,{searchBtnClickCallBk:E}):"SHOWING_RESULT"===c||("WAITING_PARAMETER_INPUT"===c||"WAITING_RESULT"===c)&&"Excel"===g?.reportType?"Excel"===g?.reportType?t.jsx(Mi,{reportData:a,setReportData:l,reloadReport:async()=>{E(y)},gridLoadParameters:I,gridLoadParametersValues:y,setGridLoadParametersValues:_}):t.jsx("iframe",{src:o,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===c?t.jsxs(s.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),r]}):t.jsx(t.Fragment,{})})]})},ki=e=>{const i=_.useNavigate(),r=o.useSelector(e=>e.AppLayout),{isUserAuthorized:n,UserInfo:a}=we(),{handleGetRequest:l,handlePostRequest:c}=Re(),[u,p]=d.useState(null),[h,f]=d.useState([]),{t:T}=y.useTranslation(),[A,I]=d.useState(null),[E,O]=d.useState({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:C,setWindowState:N}=Se({windowTitle:"ltr"===r.appDirection?E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"Document":E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),R=async()=>{await l({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{O(structuredClone(e.data))},failureCallBkFn:()=>{O({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},b=async()=>{await c({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:E?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:u.id,refDocumentStatus:E?.workflowDocumentStatus?.documentStatusCode,actionComment:A},successCallBkFn:async t=>{u?.post_action_endpoint?await c({endPointURI:u.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:u.id},successCallBkFn:()=>{R(),e?.postActionCallBk&&e.postActionCallBk()}}):R()}})};return d.useEffect(()=>{e.refDocumentId&&e.workFlowDocumentCode&&R()},[e.refDocumentId,e.workFlowDocumentCode]),d.useEffect(()=>{f(E?.nextActions&&E?.nextActions?.length>0?E.nextActions.filter(e=>{if(!E?.workflowDocumentStatus?.nextActionTakersAuthority&&!E?.nextActionTakers)return!0;if(E?.workflowDocumentStatus?.nextActionTakersAuthority&&n(E.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(E?.nextActionTakers)for(const e of E.nextActionTakers)if(a?.username===e?.username||a?.username===e?.USERNAME)return!0;return!1}):[])},[E.nextActions,E.nextActionTakers]),t.jsxs(t.Fragment,{children:[E?.workflowDocumentReport?.id?t.jsx(C,{children:t.jsx(Di,{reportCode:E?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):t.jsx(t.Fragment,{}),E?.workflowDocument?t.jsxs(s.Box,{sx:{width:"100%",maxWidth:600,textAlign:"center",fontSize:16,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.IconButton,{onClick:()=>{i(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(m.FontAwesomeIcon,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===r.appDirection?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`,E?.workflowDocumentStatus?"ltr"===r.appDirection?` ( ${E?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${E?.workflowDocumentStatus?.documentStatusArName} )`:"",t.jsx(s.Box,{sx:{flex:1}}),E?.workflowDocumentReport?.id?t.jsx(s.Button,{onClick:()=>{N(!0)},variant:"outlined",startIcon:t.jsx(m.FontAwesomeIcon,{icon:"eye"}),children:T("VIEW_LABEL")}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),t.jsxs(s.Box,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[h?.length>0?t.jsxs(s.Paper,{sx:{padding:2,display:"flex",margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[t.jsx(qe,{sx:{marginBottom:2,width:400},label:T("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===r.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:u?.id,options:h,onChangeCallBack:(e,t)=>{p(t)}}),t.jsx(De,{sx:{width:400},rows:3,value:A,onChange:e=>{I(e.target.value)},multiline:!0,label:T("WF_COMMENT_LABEL")}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.Button,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=u&&null!=u?.id?!0!==u.require_comment&&1!==u.require_comment&&"true"!==u.require_comment||null!==A&&""!==A?u?.pre_action_endpoint?await c({endPointURI:u.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:u.id},successCallBkFn:()=>{b()}}):b():g.toast.error("You must enter comment for the action to be processed"):g.toast.error("You must select action to process")},children:T("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?t.jsx(s.Button,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:T("WF_CANCEL_BTN_LABEL")}):t.jsx(t.Fragment,{})]}),E?.nextActionTakers&&E.nextActionTakers.length>0?t.jsxs(t.Fragment,{children:[t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",T("WF_WAITING_FOR_LABEL")]})}),t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:E.nextActionTakers.map(e=>t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[t.jsx(Ti,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),t.jsxs(s.Box,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsx("div",{children:"ltr"===r.appDirection?e?.employee_en_name:e?.employee_ar_name}),t.jsx("div",{children:e?.email?t.jsxs(t.Fragment,{children:[t.jsx(m.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(m.FontAwesomeIcon,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):t.jsx(t.Fragment,{})})]})]}))})]}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),E?.actionsHistory.length>0?t.jsx(Ii,{actionHistory:E.actionsHistory}):t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:600,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),T("WF_ACTION_HISTORY_LABEL")]}),t.jsx(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},Ui=e=>{const{Window:o,setWindowState:i}=Se({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[r,n]=d.useState(!0),{t:a}=y.useTranslation(),l=tt(e.elements),[c,u]=d.useState([]),[p,h]=d.useState([]),f={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(f[t.props.fieldName]=t.props.defaultValue);let T=null;T=e?.validationSchema?e.validationSchema:ue.object(it(l));const A=I.useForm({resolver:E.zodResolver(T),defaultValues:f}),O=A.watch(),C=_.useParams(),N=e?.formRouteRecordIdParamName,R=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:N&&C[N]&&(t=C[N]),t){const o=await e.apiActions.loadRecordById(t);if(o){A.reset({...o});for(const e of l)"combobox"===e?.fieldType&&o[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?A.setValue(e.fieldName,o[e.fieldName]+""):A.setValue(e.fieldName,o[e.fieldName]));e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(O,S,A)}}else A.reset({}),e.formValuesChangeCallBk(O,S,A)},{Window:b,setWindowState:w}=Se({windowTitle:"Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:async()=>{await R()}}),S={setFieldValue:(e,t)=>{A.setValue(e,t)},hideField:e=>{h(t=>[...t,e])},showField:e=>{h(t=>t.filter(t=>t!==e))},disableField:e=>{u(t=>[...t,e])},enableField:e=>{u(t=>t.filter(t=>t!==e))}};return d.useEffect(()=>{const e=[],t=[];for(const o of l)o?.hidden&&e.push(o.fieldName),o?.disabled&&t.push(o.fieldName);h(e),u(t)},[e.elements]),d.useEffect(()=>{R()},[e?.recordIdToEdit]),d.useEffect(()=>{n(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(O))},[O]),t.jsxs(t.Fragment,{children:[e?.attachment?t.jsx(o,{children:t.jsx(yi,{attachmentCode:e.attachment.attachmentCode,refKey:O[e?.keyColumnName||"id"],enableAttachment:r})}):t.jsx(t.Fragment,{}),e?.workFlowDocumentCode?t.jsx(b,{children:t.jsx(ki,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:O[e?.keyColumnName||"id"],postActionCallBk:()=>{w(!1),R()},cancelActionCallBk:()=>{w(!1),R()}})}):t.jsx(t.Fragment,{}),t.jsx(li,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:t.jsx(s.Grid2,{sx:{width:"100%"},container:!0,children:e.elements.map((o,i)=>"group"===o.type?t.jsx(gi,{...o.props,formManager:A,formValues:O,formActions:S,hiddenFields:p,disabledFields:c,formValuesChangeCallBk:e.formValuesChangeCallBk},i):"field"===o.type&&"props"===o.mode?t.jsx(mi,{fieldInfo:o.props,formManager:A,formValues:O,formActions:S,hiddenFields:p,disabledFields:c,formValuesChangeCallBk:e.formValuesChangeCallBk},i):"field"===o.type&&"node"===o.mode?t.jsx(s.Grid2,{size:o?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:t.jsx(o.node,{formManager:A,formValues:O})},i):void 0)})}),t.jsxs(li,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[O[e?.keyColumnName||"id"]&&e?.attachment?t.jsx(s.Tooltip,{title:"Attachments",children:t.jsx(s.IconButton,{onClick:()=>{i(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"paperclip"})})}):null,O[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?t.jsx(s.Tooltip,{title:"Approvals",children:t.jsx(s.IconButton,{onClick:()=>{w(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"stamp"})})}):null,e?.actions?e.actions.map(o=>!1===o?.isIdRequired?t.jsx(fi,{...o,record:O}):O[e?.keyColumnName||"id"]?!0===o?.formActionProps?.enabled?t.jsx(fi,{...o,record:O}):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(s.Button,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:A.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const o=await e.apiActions.saveRecord(t);o&&(A.reset({...o}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(o),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{g.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:a(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(s.Button,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),A.reset(f)},children:a(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Fi=()=>{const{workflowDocumentCode:e,refDocumentId:o}=_.useParams();return t.jsx(ki,{workFlowDocumentCode:e,refDocumentId:o})},Bi=e=>t.jsx(j.BarChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),qi=e=>t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[t.jsx(s.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:t.jsx("div",{children:e.record[e.valueField]})}),t.jsx(s.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),ji=e=>t.jsxs(t.Fragment,{children:[t.jsx(s.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(j.Gauge,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),Gi=e=>t.jsx(j.LineChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Wi(e){return t.jsxs(W,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(W,{sx:{width:"100%",mr:1},children:t.jsx(G,{variant:"determinate",...e})}),t.jsx(W,{sx:{minWidth:35},children:t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const Hi=e=>t.jsxs(W,{sx:{width:"100%"},children:[t.jsx(F,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(Wi,{value:e.record[e.valueField]/e.total*100})]}),Yi=e=>{const o=e.data.map((t,o)=>({id:o,value:t[e.valueField],label:t[e.labelField]+""}));return t.jsx(H.PieChart,{series:[{data:o}]})},Ki=e=>{const[o,i]=d.useState(!0),[r,n]=d.useState([]),{handleGetRequest:a}=Re();d.useEffect(()=>{e.loadWidget?(async()=>{i(!0),await a({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{i(!1),n(e.data)},failureCallBkFn:()=>{i(!1),n([])}})})():i(!1)},[e.loadWidget,e.loadCounter]);let l=0;if(1==r.length)l=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of r)l+=t[e.verticalAxisField];return t.jsxs(t.Fragment,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?t.jsxs(s.Box,{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:o?t.jsxs(t.Fragment,{children:[t.jsx(m.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(Bi,{data:r,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?t.jsx(Gi,{data:r,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?t.jsx(Yi,{data:r,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):t.jsxs(s.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[t.jsx(s.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),r.map((o,i)=>"Card"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(qi,{widgetTitle:"",record:o,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},i)}):"CircularProgress"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(ji,{widgetTitle:"",record:o,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},i)}):"LinearProgress"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(Hi,{widgetTitle:"",record:o,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},i)}):void 0)]})})]})},Vi=e=>{const[o,i]=d.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:r,parametersValues:n}=xi({parameters:o?.dashboardParameters||[],initialParameterValues:{}}),[a,l]=d.useState(0),[c,u]=d.useState(!1);d.useEffect(()=>{if(null!=o.dashboardCode&&null!=o.dashboardCode&&""!=o.dashboardCode){u(!1);let e=!0;if(o?.dashboardParameters.length>0)for(const t of o?.dashboardParameters)if(!0===t?.mandatory&&(void 0===n[t.parameterCode]||null===n[t.parameterCode]||""===n[t.parameterCode])){e=!1;break}e&&u(e),l(a+1)}},[o?.dashboardParameters,n]);const p=_.useNavigate(),{handleGetRequest:h,handlePostRequest:f}=Re();return d.useEffect(()=>{e.dashboardCode&&(async()=>{await h({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{i(e.data)},failureCallBkFn:()=>{i(null)}})})()},[e.dashboardCode,e.parameters]),t.jsx(t.Fragment,{children:o?t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.IconButton,{onClick:()=>{p(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(m.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),t.jsx(s.Box,{children:o?.dashboardTitle}),t.jsx(s.Box,{sx:{flex:1}})]}),o?.dashboardParameters.length>0?t.jsx(r,{searchBtnClickCallBk:async e=>{l(a+1)}}):t.jsx(t.Fragment,{}),t.jsx(s.Grid2,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:o?.widgets.map((e,o)=>t.jsx(s.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(Ki,{...e,parameterValues:n,loadWidget:c})},o))})]}):t.jsx(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},zi=()=>{const{dashboardCode:e}=_.useParams();return t.jsx(Vi,{dashboardCode:e})},Qi=e=>{const{UserSession:i}=we(),r=o.useSelector(e=>e.AppLayout),n=o.useDispatch(),{handlePostRequest:a}=Re(),[l,c]=d.useState(i.value.currentOrganization.id);return t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[t.jsx(qe,{sx:{width:"100%"},displayField:"ltr"===r.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:i.value.userOrganizations,value:l,onChangeCallBack:e=>{c(e)}}),t.jsx(s.Button,{sx:{m:1},variant:"contained",disabled:null==l||l===i.value.currentOrganization.id,onClick:async()=>{await a({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:i.value.username,orgId:l},data:{},successCallBkFn:t=>{const o={...t.data,isAuthenticated:!0};n(Ce.setAuthenticated(o)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},$i=f.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Zi,setSideBarState:Ji}=$i.actions;var Xi=$i.reducer;function er(e,t){const o=d.useRef(e);d.useEffect(()=>{o.current=e},[e]),d.useEffect(()=>{const e=setInterval(()=>o.current?.(),t);return()=>clearInterval(e)},[t])}const tr=s.keyframes`
|
|
31
|
+
function(e,t){const o=ne(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const i=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${i})()\` 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(${i})(...args) API requires all its args to be defined.`),o(...t)}:o}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Jo),s=ce.forwardRef(function(e,s){const l=function(e=ti){return ei(e)}(i),{className:d,component:c="div",...u}=oi(e);return t.jsx(a,{as:c,ref:s,className:ai(d,n?n(r):r),theme:o&&l[o]||l,...u})});return s}({defaultClassName:function(e,t,o="Mui"){const i={};return t.forEach(t=>{i[t]=function(e,t,o="Mui"){const i=si[t];return i?`${o}-${i}`:`${ri.generate(e)}-${t}`}(e,t,o)}),i}("MuiBox",["root"]).root,generateClassName:ri.generate});function di(e){return"number"==typeof e&&!isNaN(e)}function ci(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function ui(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function pi(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function hi(e,t){const o=new Date(e),i=new Date,r=Math.floor((o-i)/1e3),n="rtl"===t?"ar":"en",a=new Intl.RelativeTimeFormat(n,{numeric:"auto"}),s=[{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 s){const o=Math.floor(r/t);if(Math.abs(o)>1)return a.format(o,e)}return"ar"===n?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(li.propTypes={children:Dt.node,component:Dt.elementType,sx:Dt.oneOfType([Dt.arrayOf(Dt.oneOfType([Dt.func,Dt.object,Dt.bool])),Dt.func,Dt.object])});const mi=e=>{if(e?.fieldInfo){const o=e.fieldInfo,i=e?.formManager||null,r=e?.formActions||null,n=e?.formValues||null,a=e?.fieldInfo?.fieldName||null,l=e?.fieldInfo?.fieldType||null;if(!(o&&i&&n&&a&&l))return t.jsx(t.Fragment,{});const d=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(n):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return e.hiddenFields.includes(a)?t.jsx(t.Fragment,{}):t.jsx(s.Grid2,{size:o?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?t.jsx(De,{...o.muiTextFieldProps,fullWidth:!0,type:l,disabled:e.disabledFields.includes(a),label:d(),value:n[a],onChange:t=>{let o=null;""!=t.target.value&&(o="number"===l&&ci(t.target.value)?Number(t.target.value):t.target.value),i.setValue(a,o),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,o)},sx:{"& .MuiInputBase-root":{height:`${o?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...o?.formProps?.style,display:e.hiddenFields.includes(a)?"none":void 0},error:null!=i.formState.errors[a],helperText:i?.formState?.errors[a]?.message?.toString()}):"date"===o?.fieldType?t.jsx(Ve,{format:o?.dateFormat||je,sx:o?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),label:d(),onChangeCallBack:t=>{i.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,t)},value:n[a],error:null!=i.formState.errors[a],errorMessage:i?.formState?.errors[a]?.message?.toString()}):"datetime"===o?.fieldType?t.jsx(ze,{format:o?.dateFormat||Ge,sx:o?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),label:d(),onChangeCallBack:t=>{i.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,t)},value:n[a],error:null!=i.formState.errors[a],errorMessage:i?.formState?.errors[a]?.message?.toString()}):"checkbox"===o?.fieldType?t.jsx(Be,{label:d(),onChangeCallBack:t=>{i.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,t)},value:n[a],checkedValue:o?.checkedValue||!0,unCheckedValue:o?.unCheckedValue||!1,disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),sx:o?.formProps?.style}):"combobox"===o?.fieldType?t.jsx(qe,{sx:o?.formProps?.style||{width:"100%"},label:d(),commonStoreKey:o?.commonStoreKey,dataQueryId:o?.dataQueryId,storeUrl:o?.storeUrl,storeLoadParam:o?.storeLoadParam,disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),onChangeCallBack:(t,o)=>{let s=null;t&&(s=t),i.setValue(a,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,t,o)},options:o?.options||[],displayField:o?.optionDisplayField||"",valueField:o?.optionValueField||"",value:n[a],errorMessage:i?.formState?.errors[a]?.message?.toString()}):"lookup"===o?.fieldType?t.jsx(Qe,{sx:o?.formProps?.style||{width:"100%"},label:d(),disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),onChangeCallBack:(t,o)=>{let s=null;t&&(s=t),i.setValue(a,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,i,a,t,o)},lookupType:o.lookupType,value:n[a],errorMessage:i?.formState?.errors[a]?.message?.toString()}):null})}return t.jsx(t.Fragment,{})},fi=e=>{const o=we(),{ConfirmationWindow:i,setOpen:r}=be({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||o.isUserAuthorized(e.authority)?t.jsxs(t.Fragment,{children:[t.jsx(i,{}),t.jsxs(s.Button,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?r(!0):e?.actionFn(e.record)}},children:[e?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx("div",{children:e?.label})]})]}):t.jsx(t.Fragment,{})},gi=e=>{const{t:o}=y.useTranslation();return t.jsx(t.Fragment,{children:t.jsxs(s.Grid2,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?t.jsx(s.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(m.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),t.jsx("div",{children:o(e.label)})]}):t.jsx(t.Fragment,{children:o(e.label)})}):t.jsx(t.Fragment,{}),e?.elements?e.elements.map(o=>"group"===o.type?t.jsx(gi,{...o.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields,formValuesChangeCallBk:e?.formValuesChangeCallBk}):"field"===o.type&&"props"===o.mode?t.jsx(mi,{fieldInfo:o.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields,formValuesChangeCallBk:e?.formValuesChangeCallBk}):"field"===o.type&&"node"===o.mode?t.jsx(s.Grid2,{size:o?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:t.jsx(o.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?t.jsx(s.Grid2,{size:{sm:12},sx:{padding:1},children:e.actions.map(o=>t.jsx(fi,{...o,record:e.formValues}))}):t.jsx(t.Fragment,{})]})})},Ti=e=>{const i=o.useSelector(e=>e.AppInfo.value.apiBaseUrl),[r,n]=d.useState(null);return d.useEffect(()=>{e?.refKey&&(()=>{let t=i+"/api/v1/attachment/";e?.attachmentId?t+="download?attachmentId="+e.attachmentId:(t+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(t+=`&category=${e.category}`)),n(t)})()},[e.refKey]),e?.showAsAvatar?t.jsx(s.Avatar,{sx:e.style,onError:()=>{n(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:r}):t.jsx("img",{src:r,loading:"lazy",alt:"image",onError:()=>{n(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Ai=e=>{const{handleGetRequest:o,handleDeleteRequest:i}=Re(),{isUserAuthorized:r}=we();let n=!0;e?.downloadAuthorityKey&&(n=r(e.downloadAuthorityKey));const{ConfirmationWindow:a,setOpen:l}=be({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await i({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(a,{}),t.jsxs(N,{sx:{width:300,border:"0.5px solid gray"},children:[t.jsx(U,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?t.jsx(Ti,{attachmentId:e.id}):t.jsx(m.FontAwesomeIcon,{icon:"file",size:"3x"})}),t.jsxs(k,{children:[t.jsx(F,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),t.jsxs(D,{children:[e?.allowDelete?t.jsx(s.IconButton,{size:"small",onClick:()=>{l(!0)},children:t.jsx(s.Tooltip,{title:"Delete Attachment",children:t.jsx(m.FontAwesomeIcon,{icon:"trash"})})}):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),n?t.jsx(s.IconButton,{size:"small",onClick:async()=>{await o({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:e.id},showMask:!0,responseType:"blob",successCallBkFn:t=>{const o=window.URL.createObjectURL(new Blob([t.data])),i=document.createElement("a");i.href=o,i.setAttribute("download",e.fileName),document.body.appendChild(i),i.click(),i.remove()}})},children:t.jsx(s.Tooltip,{title:"Download Attachment",children:t.jsx(m.FontAwesomeIcon,{icon:"download"})})}):t.jsx(t.Fragment,{})]})]})]})},yi=e=>{const{handleUploadRequest:o,handleGetRequest:i}=Re(),[r,n]=d.useState(null),[a,l]=d.useState([]),[c,u]=d.useState(null),[p,h]=d.useState(null),[f,T]=d.useState([]),[A,y]=d.useState(null),{isUserAuthorized:I}=we(),_=e=>e.split(".").pop()?.toLowerCase()||"";d.useEffect(()=>{(async()=>{await i({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{y(e.data)}})})()},[e.refKey,e.attachmentCode]),d.useEffect(()=>{if(T(A?.allowedFileTypes?A.allowedFileTypes.split(","):[]),A?.attachmentCategories){const e=[];for(const t of A.attachmentCategories.split(","))e.push({value:t});l(e)}else l([])},[A]);let E=!0;A?.downloadAuthorityKey&&!I(A?.downloadAuthorityKey)&&(E=!1);let O=!0;return!1===e?.enableAttachment&&(O=!1),A?.uploadAuthorityKey&&!I(A.uploadAuthorityKey)&&(O=!1),t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:"100%",minHeight:400,alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[O?t.jsx(t.Fragment,{children:null==A?.maxAllowedNumberOfFiles||A?.maxAllowedNumberOfFiles>A.refKeyAttachments.length?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),t.jsx("input",{type:"file",style:{margin:20},accept:A?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=_(t.name);if(f.length>0&&!f.includes(e))return void g.toast.error(e+" is not allowed")}n(e.target.files)}}),a.length>0?t.jsx(qe,{label:"Attachment Type",sx:{width:300,m:1},options:a,displayField:"value",valueField:"value",value:p,onChangeCallBack:e=>{h(e)}}):t.jsx(t.Fragment,{}),t.jsx(De,{label:"Remark",value:c,onChange:e=>u(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),t.jsx(s.Button,{sx:{m:1},variant:"contained",onClick:async()=>{let t=A?.refKeyAttachments.length||0;if(A?.maxAllowedNumberOfFiles&&r.length+t>A.maxAllowedNumberOfFiles)g.toast.error("Maximum number of attachments is "+A.maxAllowedNumberOfFiles);else if(!0===A?.isCategoryRequired&&a.length>0&&(null==p||void 0===p||""===p))g.toast.error("You must selected document type to process your request");else if(r){for(const e of r)if(e.type.startsWith("image/")){const t=600,o=1024*t;if(e.size>o)return void g.toast.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await o({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:c,category:p},files:r,successCallBkFn:e=>{y(e.data),n(null),h(null),u(null),g.toast.success("Your request has been process successfully")}})}else g.toast.error("You must add files to upload")},children:"Upload"})]}):t.jsx(t.Fragment,{})}):t.jsx(t.Fragment,{}),E&&A?.refKeyAttachments?.length>0?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),t.jsx(s.Grid2,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:A?.refKeyAttachments.map(o=>t.jsx(s.Grid2,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:t.jsx(Ai,{...o,attachmentCode:e.attachmentCode,setAttachmentConfig:y,downloadAuthorityKey:A.downloadAuthorityKey,allowDelete:O})}))})]}):t.jsx(t.Fragment,{})]})},Ii=e=>{const i=o.useSelector(e=>e.AppLayout),{t:r}=y.useTranslation();return t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:600,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),r("WF_ACTION_HISTORY_LABEL")]}),t.jsx(s.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((o,r)=>t.jsx(t.Fragment,{children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[t.jsxs(s.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[t.jsx(s.Box,{sx:{marginBottom:.2},children:o.actionTime}),t.jsxs(F,{children:["via ",o.actionMethod]})]}),t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[t.jsx(Ti,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:o?.personId?o?.personId+"":void 0,style:{m:1,width:70,height:70}}),r!==e.actionHistory.length-1?t.jsx(s.Box,{sx:{marginTop:11,position:"absolute"},children:"|"}):t.jsx(t.Fragment,{})]}),t.jsxs(s.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%"},children:["ltr"===i.appDirection?`${o?.documentActionEnName}`:`${o?.documentActionArName}`,o?.actionComment?" - "+o.actionComment:""]}),t.jsx(s.Box,{sx:{width:"100%"},children:"ltr"===i.appDirection?`${o?.employeeEnName}`:`${o?.employeeArName}`})]})]})}))})]})},_i=e=>{const{t:o}=y.useTranslation(),i=we(),{ConfirmationWindow:r,setOpen:n}=be({body:o(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:o("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let a=!0;if(e.authority&&(a=i.isUserAuthorized(e.authority)),a)return t.jsxs(t.Fragment,{children:[t.jsx(r,{}),t.jsxs(s.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?n(!0):(await e.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn),e?.reloadData&&e.reloadData())}else g.toast.error(o("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(m.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:e.icon}):t.jsx(t.Fragment,{}),e?.label?o(e.label):t.jsx(t.Fragment,{})]})]})},Ei=s.styled(e.QuickFilter)({display:"grid",alignItems:"center"}),Oi=s.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"])})),Ci=s.styled(s.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"])})),Ni=o=>{const{t:i}=y.useTranslation(),r=we(),n=!o?.templateProps?.editAction?.authority||r.isUserAuthorized(o.templateProps.editAction.authority),a=rt(o?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},o?.templateProps?.data||[],o?.templateProps?.keyColumnName||"id");return t.jsxs(e.Toolbar,{children:[n&&"none"!=o?.templateProps?.editMode?.editMode&&(void 0===o?.templateProps?.hideCreateBtn||!1===o?.templateProps?.hideCreateBtn)?t.jsxs(s.Button,{onClick:o?.handleCreateNewRecord,children:[t.jsx(m.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),i("ADD_BTN_LABEL")]}):t.jsx(t.Fragment,{}),o?.templateProps?.rowActions?o.templateProps.rowActions.map((e,t)=>!0===e?.gridActionProps?.multiRecord?d.createElement(_i,{...e,key:t,reloadData:async()=>{o.templateProps.apiActions.reloadData(o?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:a.selectedRecordIds,recordsToProcessActionOn:a.selectedRecords}):null):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,mx:.5,my:.5,padding:1},children:o?.templateProps?.tBar}),t.jsx(s.Tooltip,{title:"Columns",children:t.jsx(e.ColumnsPanelTrigger,{render:t.jsx(e.ToolbarButton,{}),children:t.jsx(e.GridViewColumnIcon,{fontSize:"small"})})}),t.jsx(s.Tooltip,{title:"Filters",children:t.jsx(e.FilterPanelTrigger,{render:(o,i)=>t.jsx(e.ToolbarButton,{...o,color:"default",children:t.jsx(s.Badge,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:t.jsx(e.GridFilterListIcon,{fontSize:"small"})})})})}),o?.templateProps?.gridStateKey?t.jsx(s.Tooltip,{title:i("RESET_GRID_STATE"),children:t.jsx(s.IconButton,{onClick:o?.clearGridState,children:t.jsx(m.FontAwesomeIcon,{icon:"eraser"})})}):t.jsx(t.Fragment,{}),t.jsx(s.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),t.jsx(s.Tooltip,{title:i("EXPORT_EXECL_LABEL"),children:t.jsx(e.ExportExcel,{render:t.jsx(s.MenuItem,{}),children:t.jsx(m.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),t.jsxs(Ei,{children:[t.jsx(e.QuickFilterTrigger,{render:(e,o)=>t.jsx(s.Tooltip,{title:i("SEARCH_BTN_LABEL"),enterDelay:0,children:t.jsx(Oi,{...e,ownerState:{expanded:o.expanded},color:"default","aria-disabled":o.expanded,children:t.jsx(m.FontAwesomeIcon,{icon:"search"})})})}),t.jsx(e.QuickFilterControl,{render:({ref:o,...r},n)=>t.jsx(Ci,{...r,ownerState:{expanded:n.expanded},inputRef:o,"aria-label":"Search",placeholder:`${i("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:t.jsx(s.InputAdornment,{position:"start",children:t.jsx(m.FontAwesomeIcon,{icon:"search"})}),endAdornment:n.value?t.jsx(s.InputAdornment,{position:"end",children:t.jsx(e.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:t.jsx(m.FontAwesomeIcon,{icon:"xmark"})})}):null,...r.slotProps?.input},...r.slotProps}})})]}),t.jsx(s.IconButton,{onClick:()=>{o.templateProps.apiActions.reloadData(o?.templateProps?.gridLoadParametersValues)},children:t.jsx(m.FontAwesomeIcon,{icon:"refresh"})})]})},Ri=o=>{const{t:i}=y.useTranslation(),r=we(),{ConfirmationWindow:n,setOpen:a}=be({body:i(o?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(o?.actionFn(o.record)),o?.reloadData&&o.reloadData()}});let l=!0;o.authority&&(l=r.isUserAuthorized(o.authority));let d={};o?.getActionIconStyleForRecord&&(d=o.getActionIconStyleForRecord(o.record));let c=!0;o?.isActionVisibleForRecord&&(c=o?.isActionVisibleForRecord(o.record));let u=!1;if(o?.isActionDisabledForRecord&&(u=o.isActionDisabledForRecord(o.record)),l&&c)return t.jsxs(t.Fragment,{children:[t.jsx(n,{}),t.jsx(e.GridActionsCellItem,{disabled:u,icon:t.jsx(s.Tooltip,{title:o?.label?i(o.label):"",children:t.jsx(m.FontAwesomeIcon,{icon:o.icon,style:{...d,color:u?"gray":null!=d?.color?d.color:void 0}})}),showInMenu:o?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!u){if(o?.preActionValidation&&!o.preActionValidation(o.record))return;!0===o?.isConfirmationRequired?a(!0):(await o.actionFn(o.record),!0===o?.gridActionProps?.reloadGridAfterAction&&o?.reloadData&&o.reloadData())}}})]})};let bi=-1;const wi=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Si=(e,t)=>{const o=wi(e);localStorage.setItem(e,JSON.stringify({...o,...t}))},Pi=["__check__","actions"],vi=i=>{const{t:r}=y.useTranslation(),{handleGetRequest:n}=Re(),a=o.useSelector(e=>e.commonStores.stores),l=o.useSelector(e=>e.AppLayout),[c,u]=d.useState({}),[p,h]=d.useState(!0),{getLookupOptions:f}=(()=>{const{handleGetRequest:e}=Re(),t=o.useSelector(e=>e.AppLayout),i=async t=>{let o=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{o=e.data}}),o};return{generateLookupGridColumn:async e=>{let o=await i(e.lookupType);return{...e,options:o,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:i}})(),{Window:T,setWindowState:A}=Se({windowTitle:r(i.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{i?.apiActions?.reloadData(i.gridLoadParametersValues)}}),{Window:I,setWindowState:E}=Se({windowTitle:r(i.gridTitle)+" Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:()=>{i?.apiActions?.reloadData(i.gridLoadParametersValues)}}),[C,N]=d.useState([]),R=tt(i.formElements),b=[],w=d.useMemo(()=>i?.gridStateKey?wi(i.gridStateKey):{},[]);for(const e of R)!0===e?.gridProps?.hidden&&b.push(e.fieldName);let S={};if(w?.columnVisibilityModel){S=w.columnVisibilityModel;const e=Object.keys(S);for(const t of b)e.includes(t)||(S[t]=!1)}else for(const e of b)S[e]=!1;const P=o.useSelector(e=>e.AppLayout.appDirection),[v,L]=d.useState(S),[M,x]=d.useState(w.columnOrder||[]),[D,k]=d.useState(w.columnWidths||{}),[U,F]=d.useState(w.columnGroupingModel||[]);let B=w?.pinnedColumns?.left||[];B=B.filter(e=>!Pi.includes(e));let q=w?.pinnedColumns?.right||[]||[];q=q.filter(e=>!Pi.includes(e));const[j,G]=d.useState({left:[..."ltr"===P?Pi:[],...B],right:[..."rtl"===P?Pi:[],...q]}),W=we(),H=_.useNavigate(),[Y,K]=d.useState(null),[V,z]=d.useState(null),[Q,$]=d.useState({}),Z=async(e,t,o)=>{let i=[];return e?await n({endPointURI:e,showMask:!1,parameters:t,successCallBkFn:e=>{i=e.data}}):o&&await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:o,...t},successCallBkFn:e=>{i=e.data}}),i},J=async()=>{let e=ot(R,"row"===i?.editMode?.editMode||!1,r);for(let t of e)if(t?.lookupType&&(t.displayField="ltr"===l.appDirection?"lookupEnDisplay":"lookupArDisplay",t.options=await f(t.lookupType),t.valueField="lookupValue"),"custom"===t.type){if(t?.options)continue;t.options=t?.commonStoreKey?a[t.commonStoreKey]?.data||[]:await Z(t?.storeUrl,t?.storeLoadParam,t?.dataQueryId)}N(e)},[X,ee]=d.useState({ids:new Set,type:"include"});let te="id";i?.keyColumnName&&(te=i?.keyColumnName);const oe=i.setData;let ie=null;ie=i?.validationSchema?i.validationSchema:O.z.object(it(R));let re=!0;i?.editAction?.authority&&(re=W.isUserAuthorized(i.editAction.authority));let ne=!0;i?.deleteAction?.authority&&(ne=W.isUserAuthorized(i.deleteAction.authority));const{ConfirmationWindow:ae,setOpen:se}=be({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;Y&&!0===Y?.isNew||(e=await i.apiActions.deleteRecordById(Y[te])),e&&(i?.deleteAction?.postActionCallBack&&await i.deleteAction.postActionCallBack(Y),oe(e=>e.filter(e=>e[te]!=Y[te])))}});let le,de,ce,ue,pe,he;"modal"===i?.editMode?.editMode&&(le=i?.editMode?.specs?.modalHeight||"fit-content",de=i?.editMode?.specs?.modalWidth||"300",ce=i?.editMode?.specs?.modalMinHeight,ue=i?.editMode?.specs?.modalMinWidth,pe=i?.editMode?.specs?.modalIcon||"window",he=i?.editMode?.specs?.modalTitle||"Record Form");const{Window:me,setWindowState:fe}=Se({height:le,minHeight:ce,minWidth:ue,onCloseCallBack:()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)},width:de,windowIcon:pe,windowTitle:he}),ge={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(i?.rowActions?30*i.rowActions.length:0)+(i?.editAction&&i?.editAction?.isEnabled?30:0)+(i?.deleteAction&&i?.deleteAction?.isEnabled?30:0)+(i?.attachment?30:0)+(i?.workFlowDocumentCode?30:0),getActions:o=>{const n=o.row,a=[];if("none"!=i?.editMode?.editMode&&(void 0===i?.disableDefaultAction||!i.disableDefaultAction)){const o=Q[n[te]]?.mode===e.GridRowModes.Edit;if("row"===i.editMode.editMode&&o)re&&(a.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(m.FontAwesomeIcon,{icon:"save"}),label:r("SAVE_BTN_LABEL"),onClick:()=>{(t=>{const o=t[te];$({...Q,[o]:{mode:e.GridRowModes.View}})})(n)}})),a.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(m.FontAwesomeIcon,{icon:"cancel"}),label:r("CANCEL_BTN_LABEL"),onClick:()=>{(t=>{const o=t[te];o&&di(o)&&o<0?($({...Q,[o]:{mode:e.GridRowModes.View,ignoreModifications:!0}}),oe(e=>{const t=e.filter(e=>e[te]!=o);return t})):$({...Q,[o]:{mode:e.GridRowModes.View,ignoreModifications:!0}})})(n)},color:"inherit"})));else{if(i?.editAction&&!0===i?.editAction?.isEnabled){let o=!0;i?.editAction?.isActionVisibleForRecord&&(o=i?.editAction?.isActionVisibleForRecord(n));let l=!1;i?.editAction?.isActionDisabledForRecord&&(l=i?.editAction?.isActionDisabledForRecord(n)),re&&o&&a.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(s.Tooltip,{title:r("EDIT_BTN_LABEL"),children:t.jsx(m.FontAwesomeIcon,{icon:"edit",style:{color:l?"gray":void 0}})}),showInMenu:i?.editAction?.gridActionProps?.showInMenu||!1,label:r("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{re&&!l&&(async t=>{if(t)if(z(t),"form"===i.editMode.editMode)H(i.editMode.specs.formRoute+"/"+t[te]);else if("modal"===i.editMode.editMode)fe(!0);else if("row"===i?.editMode?.editMode){const o=t[te];$({...Q,[o]:{mode:e.GridRowModes.Edit}})}})(n)}}))}if(i?.deleteAction&&!0===i?.deleteAction?.isEnabled){let o=!0;i?.deleteAction?.isActionVisibleForRecord&&(o=i?.deleteAction?.isActionVisibleForRecord(n));let l=!1;i?.deleteAction?.isActionDisabledForRecord&&(l=i?.deleteAction?.isActionDisabledForRecord(n)),ne&&o&&a.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(s.Tooltip,{title:r("DELETE_BTN_LABEL"),children:t.jsx(m.FontAwesomeIcon,{icon:"trash",style:{color:l?"gray":void 0}})}),showInMenu:i?.deleteAction?.gridActionProps?.showInMenu||!1,label:r("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(ne&&!l){if(i?.deleteAction?.preActionValidation&&!i.deleteAction.preActionValidation(n))return;K(n),se(!0)}}}))}}}if(n[i?.keyColumnName||"id"]&&n[i?.keyColumnName||"id"]>0&&i?.attachment&&a?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(s.Tooltip,{title:"Attachments",children:t.jsx(m.FontAwesomeIcon,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{u(n),h(!i?.attachment?.enableAttachFn||i.attachment.enableAttachFn(n)),A(!0)}})),n[i?.keyColumnName||"id"]&&n[i?.keyColumnName||"id"]>0&&i?.workFlowDocumentCode&&a?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(s.Tooltip,{title:"Approvals",children:t.jsx(m.FontAwesomeIcon,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{u(n),E(!0)}})),n[i?.keyColumnName||"id"]&&n[i?.keyColumnName||"id"]>0&&i?.rowActions)for(const e of i.rowActions)e?.gridActionProps?.multiRecord&&!0===e?.gridActionProps?.multiRecord||a.push(t.jsx(Ri,{...e,record:n,reloadData:async()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)}}));return a}};let Te=[];(void 0===i?.disableDefaultAction||!i.disableDefaultAction||i?.rowActions&&i?.rowActions.length>0)&&Te.push(ge),Te=[...Te,...C];d.useEffect(()=>{void 0!==i?.autoLoad&&!0!==i.autoLoad||i.apiActions.reloadData(i?.gridLoadParametersValues),J()},[]),d.useEffect(()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)},[W.UserInfo?.currentOrganization]),d.useEffect(()=>{J()},[P,i.formElements]);const Ae=d.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,D,Te]);return t.jsxs(t.Fragment,{children:[t.jsx(ae,{}),"modal"===i?.editMode?.editMode?t.jsx(me,{children:i?.editMode?.specs?.formComponent?t.jsx(i.editMode.specs.formComponent,{recordIdToEdit:V?V[te]:void 0,formCloseCallBk:()=>{fe(!1),i.apiActions.reloadData(i?.gridLoadParametersValues)}}):t.jsx(Ui,{keyColumnName:i.keyColumnName,attachment:i.attachment,formValuesChangeCallBk:i?.formProps?.formValuesChangeCallBk,recordIdToEdit:V?V[te]:void 0,formCloseCallBk:()=>{fe(!1),i.apiActions.reloadData(i?.gridLoadParametersValues)},elements:i.formElements,apiActions:i.apiActions,editAuthorityKey:i?.editAction?.authority,formSavedSuccessfullyCallBk:i?.editAction?.postActionCallBack,preSaveValidation:i?.editAction?.preActionValidation,actions:i?.rowActions})}):t.jsx(t.Fragment,{}),void 0!==i?.hideInfoBar||i?.hideInfoBar?t.jsx(t.Fragment,{}):t.jsxs(s.Box,{sx:{display:"flex"},children:[void 0!==i?.hideBackButton||i?.hideBackButton?t.jsx(t.Fragment,{}):t.jsx(s.IconButton,{onClick:()=>{H(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"ltr"===P?"arrow-left":"arrow-right"})}),t.jsxs(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[i?.girdIcon?t.jsx(m.FontAwesomeIcon,{icon:i.girdIcon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx(s.Typography,{variant:"h5",children:i?.gridTitle?ui(r(i?.gridTitle)):""})]})]}),i?.gridLoadParameters&&i?.gridLoadParameters.length>0&&i?.gridLoadParametersValues&&i?.setGridLoadParametersValues?t.jsxs(s.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(s.AccordionSummary,{expandIcon:t.jsx(e.GridExpandMoreIcon,{}),children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(s.Typography,{component:"span",children:"Filters"})]})}),t.jsx(s.AccordionDetails,{children:t.jsx(s.Box,{children:t.jsx(Ui,{saveButtonSpecs:{label:r("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:r("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?i.setGridLoadParametersValues(e):i.setGridLoadParametersValues({}),i.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:i.gridLoadParameters})})})]}):t.jsx(t.Fragment,{}),i?.attachment?t.jsx(T,{children:t.jsx(yi,{attachmentCode:i.attachment.attachmentCode,refKey:c[i?.keyColumnName||"id"],enableAttachment:p})}):t.jsx(t.Fragment,{}),i?.workFlowDocumentCode?t.jsx(I,{children:t.jsx(ki,{workFlowDocumentCode:i.workFlowDocumentCode,refDocumentId:c[i?.keyColumnName||"id"],postActionCallBk:()=>{E(!1),i.apiActions.reloadData(i.gridLoadParametersValues)},cancelActionCallBk:()=>{E(!1),i.apiActions.reloadData(i.gridLoadParametersValues)}})}):t.jsx(t.Fragment,{}),t.jsx(e.DataGridPremium,{...i?.muiProps,slots:{toolbar:Ni},slotProps:{toolbar:{templateProps:{...i,rowSelectionModel:X,data:i?.data},handleCreateNewRecord:()=>{if("form"===i?.editMode?.editMode)H(i.editMode.specs.formRoute);else if("modal"===i?.editMode?.editMode)z(null),fe(!0);else if("row"===i?.editMode?.editMode){bi-=1;const t={};t[te]=bi,t.isNew=!0;for(const e of C)"actions"!=e?.type&&e?.field!=te&&e?.field&&(t[e.field]=null);oe(e=>[t,...e]),$(t=>({...t,[bi]:{mode:e.GridRowModes.Edit}}))}},clearGridState:()=>{i?.gridStateKey&&localStorage.removeItem(i.gridStateKey),L({}),x([]),k({}),F([]),G({left:[..."ltr"===P?Pi:[]],right:[..."rtl"===P?Pi:[]]})}}},getRowId:e=>e[te],showToolbar:!0,rows:i?.data,columns:Ae,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==i.editMode.editMode?Q:void 0,onRowModesModelChange:"row"==i.editMode.editMode?e=>{$(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async e=>{if("row"===i.editMode.editMode){let o=null;const r=(e=>{try{ie.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof O.z.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(e);if(r){const e=r.split(",");throw g.toast.error(t.jsx("div",{style:{},children:e.map(e=>t.jsxs(t.Fragment,{children:[t.jsx("div",{children:e}),t.jsx(s.Divider,{})]}))})),new Error(r)}if(i?.editAction?.preActionValidation&&!i.editAction.preActionValidation(e))throw new Error("error on the configured presave validation");const n={...e};if(e[te]&&di(e[te])&&Number(e[te])<0&&(n[te]=null),o=await i.apiActions.saveRecord(n),null==o)throw new Error("Failed to process your request, contact your administrator");return i?.editAction?.postActionCallBack&&await i.editAction.postActionCallBack(e),!0===e?.isNew&&oe(t=>{const i=t.filter(t=>t[te]!==e[te]);return[o,...i]}),!0===i?.editMode?.reloadAfterSave&&i?.apiActions?.reloadData&&i?.apiActions?.reloadData(i?.gridLoadParametersValues),o}},rowSelectionModel:X,onRowSelectionModelChange:e=>{ee(e)},columnVisibilityModel:v,onColumnVisibilityModelChange:e=>{L(e),i?.gridStateKey&&Si(i.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:o}=e;x(e=>{const r=e.length?[...e]:Te.map(e=>e.field),n=r.indexOf(t.field);return-1===n||(r.splice(n,1),r.splice(o,0,t.field),i?.gridStateKey&&Si(i.gridStateKey,{columnOrder:r})),r})},rowGroupingModel:U,onRowGroupingModelChange:e=>{(e=>{F(e),i?.gridStateKey&&Si(i.gridStateKey,{columnGroupingModel:e})})(e)},sx:{width:"100%"}})]})},Li=e=>{if(0===e.length)return[];const t=[];for(const o of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:o,fieldName:o,fieldType:"text"}};t.push(e)}return t},Mi=e=>{const[o,i]=d.useState([]);return d.useEffect(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));i(t)},[e.reportData]),t.jsx(vi,{data:o,disableDefaultAction:!0,setData:e.setReportData,formElements:Li(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()=>{}}})},xi=e=>{const[o,i]=d.useState({...e?.initialParameterValues}),r=((e,t)=>{const o=[];for(const i of e){const e={type:"field",mode:"props",props:{fieldLabel:i?.parameterLabel,fieldName:i?.parameterCode,fieldType:i?.parameterType,hidden:i?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:i?.mandatory,defaultValue:t[i?.parameterCode]||i?.defaultValue}};o.push(e)}return o})(e.parameters,o);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:o}=y.useTranslation();return t.jsxs(s.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(s.AccordionSummary,{expandIcon:t.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(s.Typography,{component:"span",children:"Filters"})]})}),t.jsx(s.AccordionDetails,{children:t.jsx(s.Box,{children:t.jsx(Ui,{saveButtonSpecs:{label:o("Filter"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:o("RESET_BTN_LABEL"),icon:"eraser",hidden:!0,actionButtonVariant:"outlined",actionButtonColor:"error"},actions:[{label:o("RESET_BTN_LABEL"),icon:"eraser",isIdRequired:!1,formActionProps:{enabled:!0},actionFn:async(e,t)=>{i({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{i(null!=t?t:{}),e&&await e(t)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:r})})})]})},parametersValues:o,setParametersValues:i,panelElements:r}},Di=e=>{const[o,i]=d.useState(null),[r,n]=d.useState(null),[a,l]=d.useState([]),[c,u]=d.useState("WAITING_REPORT_CODE"),{handleGetRequest:p,handlePostRequest:h,HandleDownloadHTTPPostPDF:f}=Re(),[g,T]=d.useState(null),{ParameterPanel:A,parametersValues:y,panelElements:I,setParametersValues:_}=xi({parameters:g?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}});d.useEffect(()=>{g&&(!0===e?.byPassParameterEntry||0==g.reportParameters.length?(E(y),u("WAITING_RESULT")):u("WAITING_PARAMETER_INPUT"))},[g]);const E=async t=>{u("WAITING_RESULT"),"Excel"===g?.reportType?await h({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{u("SHOWING_RESULT"),l(e.data)}}):g?.reportType&&await f({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{u("SHOWING_RESULT");const t=e.headers["content-disposition"];let o="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(o=e[1])}if(o.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),o=URL.createObjectURL(t);i(o)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),i=window.URL.createObjectURL(t),r=document.createElement("a");r.href=i,r.download=o,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(i)}},failureCallBkFn:e=>{n("Failed To run report ... contact your administrator"),u("ERROR")}})};return d.useEffect(()=>{e?.reportCode&&(async()=>{u("LOADING_METADATA"),await p({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:e=>{T(e.data)},failureCallBkFn:e=>{n("Failed loading report metadata ... contact your administrator"),u("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[t.jsxs(s.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[t.jsx(m.FontAwesomeIcon,{icon:"Excel"===g?.reportType?"file-excel":"file-pdf",color:"Excel"===g?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),g?.reportName]}),"Excel"!=g?.reportType&&"SHOWING_RESULT"===c?t.jsxs(t.Fragment,{children:[!0===e?.byPassParameterEntry?t.jsx(t.Fragment,{}):g?.reportParameters.length>0?t.jsx(s.IconButton,{onClick:()=>{u("WAITING_PARAMETER_INPUT")},children:t.jsx(m.FontAwesomeIcon,{icon:"filter"})}):t.jsx(t.Fragment,{}),t.jsx(s.IconButton,{children:t.jsx(m.FontAwesomeIcon,{icon:"refresh",onClick:()=>{E(y)}})})]}):t.jsx(t.Fragment,{})]}),t.jsx(s.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===c&&"Excel"!=g?.reportType?t.jsx(A,{searchBtnClickCallBk:E}):"SHOWING_RESULT"===c||("WAITING_PARAMETER_INPUT"===c||"WAITING_RESULT"===c)&&"Excel"===g?.reportType?"Excel"===g?.reportType?t.jsx(Mi,{reportData:a,setReportData:l,reloadReport:async()=>{E(y)},gridLoadParameters:I,gridLoadParametersValues:y,setGridLoadParametersValues:_}):t.jsx("iframe",{src:o,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===c?t.jsxs(s.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),r]}):t.jsx(t.Fragment,{})})]})},ki=e=>{const i=_.useNavigate(),r=o.useSelector(e=>e.AppLayout),{isUserAuthorized:n,UserInfo:a}=we(),{handleGetRequest:l,handlePostRequest:c}=Re(),[u,p]=d.useState(null),[h,f]=d.useState([]),{t:T}=y.useTranslation(),[A,I]=d.useState(null),[E,O]=d.useState({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:C,setWindowState:N}=Se({windowTitle:"ltr"===r.appDirection?E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"Document":E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),R=async()=>{await l({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{O(structuredClone(e.data))},failureCallBkFn:()=>{O({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},b=async()=>{await c({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:E?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:u.id,refDocumentStatus:E?.workflowDocumentStatus?.documentStatusCode,actionComment:A},successCallBkFn:async t=>{u?.post_action_endpoint?await c({endPointURI:u.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:u.id},successCallBkFn:()=>{R(),e?.postActionCallBk&&e.postActionCallBk()}}):R()}})};return d.useEffect(()=>{e.refDocumentId&&e.workFlowDocumentCode&&R()},[e.refDocumentId,e.workFlowDocumentCode]),d.useEffect(()=>{f(E?.nextActions&&E?.nextActions?.length>0?E.nextActions.filter(e=>{if(!E?.workflowDocumentStatus?.nextActionTakersAuthority&&!E?.nextActionTakers)return!0;if(E?.workflowDocumentStatus?.nextActionTakersAuthority&&n(E.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(E?.nextActionTakers)for(const e of E.nextActionTakers)if(a?.username===e?.username||a?.username===e?.USERNAME)return!0;return!1}):[])},[E.nextActions,E.nextActionTakers]),t.jsxs(t.Fragment,{children:[E?.workflowDocumentReport?.id?t.jsx(C,{children:t.jsx(Di,{reportCode:E?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):t.jsx(t.Fragment,{}),E?.workflowDocument?t.jsxs(s.Box,{sx:{width:"100%",maxWidth:600,textAlign:"center",fontSize:16,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.IconButton,{onClick:()=>{i(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(m.FontAwesomeIcon,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===r.appDirection?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`,E?.workflowDocumentStatus?"ltr"===r.appDirection?` ( ${E?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${E?.workflowDocumentStatus?.documentStatusArName} )`:"",t.jsx(s.Box,{sx:{flex:1}}),E?.workflowDocumentReport?.id?t.jsx(s.Button,{onClick:()=>{N(!0)},variant:"outlined",startIcon:t.jsx(m.FontAwesomeIcon,{icon:"eye"}),children:T("VIEW_LABEL")}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),t.jsxs(s.Box,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[h?.length>0?t.jsxs(s.Paper,{sx:{padding:2,display:"flex",margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[t.jsx(qe,{sx:{marginBottom:2,width:400},label:T("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===r.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:u?.id,options:h,onChangeCallBack:(e,t)=>{p(t)}}),t.jsx(De,{sx:{width:400},rows:3,value:A,onChange:e=>{I(e.target.value)},multiline:!0,label:T("WF_COMMENT_LABEL")}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.Button,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=u&&null!=u?.id?!0!==u.require_comment&&1!==u.require_comment&&"true"!==u.require_comment||null!==A&&""!==A?u?.pre_action_endpoint?await c({endPointURI:u.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:u.id},successCallBkFn:()=>{b()}}):b():g.toast.error("You must enter comment for the action to be processed"):g.toast.error("You must select action to process")},children:T("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?t.jsx(s.Button,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:T("WF_CANCEL_BTN_LABEL")}):t.jsx(t.Fragment,{})]}),E?.nextActionTakers&&E.nextActionTakers.length>0?t.jsxs(t.Fragment,{children:[t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",T("WF_WAITING_FOR_LABEL")]})}),t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:E.nextActionTakers.map(e=>t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[t.jsx(Ti,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),t.jsxs(s.Box,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsx("div",{children:"ltr"===r.appDirection?e?.employee_en_name:e?.employee_ar_name}),t.jsx("div",{children:e?.email?t.jsxs(t.Fragment,{children:[t.jsx(m.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(m.FontAwesomeIcon,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):t.jsx(t.Fragment,{})})]})]}))})]}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),E?.actionsHistory.length>0?t.jsx(Ii,{actionHistory:E.actionsHistory}):t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:600,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),T("WF_ACTION_HISTORY_LABEL")]}),t.jsx(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},Ui=e=>{const{Window:o,setWindowState:i}=Se({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[r,n]=d.useState(!0),{t:a}=y.useTranslation(),l=tt(e.elements),[c,u]=d.useState([]),[p,h]=d.useState([]),f={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(f[t.props.fieldName]=t.props.defaultValue);let T=null;T=e?.validationSchema?e.validationSchema:ue.object(it(l));const A=I.useForm({resolver:E.zodResolver(T),defaultValues:f}),O=A.watch(),C=_.useParams(),N=e?.formRouteRecordIdParamName,R=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:N&&C[N]&&(t=C[N]),t){const o=await e.apiActions.loadRecordById(t);if(o){A.reset({...o});for(const e of l)"combobox"===e?.fieldType&&o[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?A.setValue(e.fieldName,o[e.fieldName]+""):A.setValue(e.fieldName,o[e.fieldName]));e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(O,S,A)}}else A.reset({}),e.formValuesChangeCallBk(O,S,A)},{Window:b,setWindowState:w}=Se({windowTitle:"Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:async()=>{await R()}}),S={setFieldValue:(e,t)=>{A.setValue(e,t)},hideField:e=>{h(t=>[...t,e])},showField:e=>{h(t=>t.filter(t=>t!==e))},disableField:e=>{u(t=>[...t,e])},enableField:e=>{u(t=>t.filter(t=>t!==e))}};return d.useEffect(()=>{const e=[],t=[];for(const o of l)o?.hidden&&e.push(o.fieldName),o?.disabled&&t.push(o.fieldName);h(e),u(t)},[e.elements]),d.useEffect(()=>{R()},[e?.recordIdToEdit]),d.useEffect(()=>{n(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(O))},[O]),t.jsxs(t.Fragment,{children:[e?.attachment?t.jsx(o,{children:t.jsx(yi,{attachmentCode:e.attachment.attachmentCode,refKey:O[e?.keyColumnName||"id"],enableAttachment:r})}):t.jsx(t.Fragment,{}),e?.workFlowDocumentCode?t.jsx(b,{children:t.jsx(ki,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:O[e?.keyColumnName||"id"],postActionCallBk:()=>{w(!1),R()},cancelActionCallBk:()=>{w(!1),R()}})}):t.jsx(t.Fragment,{}),t.jsx(li,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:t.jsx(s.Grid2,{sx:{width:"100%"},container:!0,children:e.elements.map((o,i)=>"group"===o.type?t.jsx(gi,{...o.props,formManager:A,formValues:O,formActions:S,hiddenFields:p,disabledFields:c,formValuesChangeCallBk:e.formValuesChangeCallBk},i):"field"===o.type&&"props"===o.mode?t.jsx(mi,{fieldInfo:o.props,formManager:A,formValues:O,formActions:S,hiddenFields:p,disabledFields:c,formValuesChangeCallBk:e.formValuesChangeCallBk},i):"field"===o.type&&"node"===o.mode?t.jsx(s.Grid2,{size:o?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:t.jsx(o.node,{formManager:A,formValues:O})},i):void 0)})}),t.jsxs(li,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[O[e?.keyColumnName||"id"]&&e?.attachment?t.jsx(s.Tooltip,{title:"Attachments",children:t.jsx(s.IconButton,{onClick:()=>{i(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"paperclip"})})}):null,O[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?t.jsx(s.Tooltip,{title:"Approvals",children:t.jsx(s.IconButton,{onClick:()=>{w(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"stamp"})})}):null,e?.actions?e.actions.map(o=>!1===o?.isIdRequired?t.jsx(fi,{...o,record:O}):O[e?.keyColumnName||"id"]?!0===o?.formActionProps?.enabled?t.jsx(fi,{...o,record:O}):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(s.Button,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:A.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const o=await e.apiActions.saveRecord(t);o&&(A.reset({...o}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(o),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{g.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:a(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(s.Button,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),A.reset(f)},children:a(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Fi=()=>{const{workflowDocumentCode:e,refDocumentId:o}=_.useParams();return t.jsx(ki,{workFlowDocumentCode:e,refDocumentId:o})},Bi=e=>t.jsx(j.BarChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),qi=e=>t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[t.jsx(s.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:t.jsx("div",{children:e.record[e.valueField]})}),t.jsx(s.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),ji=e=>t.jsxs(t.Fragment,{children:[t.jsx(s.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(j.Gauge,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),Gi=e=>t.jsx(j.LineChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Wi(e){return t.jsxs(W,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(W,{sx:{width:"100%",mr:1},children:t.jsx(G,{variant:"determinate",...e})}),t.jsx(W,{sx:{minWidth:35},children:t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const Hi=e=>t.jsxs(W,{sx:{width:"100%"},children:[t.jsx(F,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(Wi,{value:e.record[e.valueField]/e.total*100})]}),Yi=e=>{const o=e.data.map((t,o)=>({id:o,value:t[e.valueField],label:t[e.labelField]+""}));return t.jsx(H.PieChart,{series:[{data:o}]})},Ki=e=>{const[o,i]=d.useState(!0),[r,n]=d.useState([]),{handleGetRequest:a}=Re();d.useEffect(()=>{e.loadWidget?(async()=>{i(!0),await a({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{i(!1),n(e.data)},failureCallBkFn:()=>{i(!1),n([])}})})():i(!1)},[e.loadWidget,e.loadCounter]);let l=0;if(1==r.length)l=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of r)l+=t[e.verticalAxisField];return t.jsxs(t.Fragment,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?t.jsxs(s.Box,{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:o?t.jsxs(t.Fragment,{children:[t.jsx(m.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(Bi,{data:r,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?t.jsx(Gi,{data:r,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?t.jsx(Yi,{data:r,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):t.jsxs(s.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[t.jsx(s.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),r.map((o,i)=>"Card"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(qi,{widgetTitle:"",record:o,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},i)}):"CircularProgress"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(ji,{widgetTitle:"",record:o,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},i)}):"LinearProgress"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(Hi,{widgetTitle:"",record:o,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},i)}):void 0)]})})]})},Vi=e=>{const[o,i]=d.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:r,parametersValues:n}=xi({parameters:o?.dashboardParameters||[],initialParameterValues:{}}),[a,l]=d.useState(0),[c,u]=d.useState(!1);d.useEffect(()=>{if(null!=o.dashboardCode&&null!=o.dashboardCode&&""!=o.dashboardCode){u(!1);let e=!0;if(o?.dashboardParameters.length>0)for(const t of o?.dashboardParameters)if(!0===t?.mandatory&&(void 0===n[t.parameterCode]||null===n[t.parameterCode]||""===n[t.parameterCode])){e=!1;break}e&&u(e),l(a+1)}},[o?.dashboardParameters,n]);const p=_.useNavigate(),{handleGetRequest:h,handlePostRequest:f}=Re();return d.useEffect(()=>{e.dashboardCode&&(async()=>{await h({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{i(e.data)},failureCallBkFn:()=>{i(null)}})})()},[e.dashboardCode,e.parameters]),t.jsx(t.Fragment,{children:o?t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.IconButton,{onClick:()=>{p(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(m.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),t.jsx(s.Box,{children:o?.dashboardTitle}),t.jsx(s.Box,{sx:{flex:1}})]}),o?.dashboardParameters.length>0?t.jsx(r,{searchBtnClickCallBk:async e=>{l(a+1)}}):t.jsx(t.Fragment,{}),t.jsx(s.Grid2,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:o?.widgets.map((e,o)=>t.jsx(s.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(Ki,{...e,parameterValues:n,loadWidget:c})},o))})]}):t.jsx(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},zi=()=>{const{dashboardCode:e}=_.useParams();return t.jsx(Vi,{dashboardCode:e})},Qi=e=>{const{UserSession:i}=we(),r=o.useSelector(e=>e.AppLayout),n=o.useDispatch(),{handlePostRequest:a}=Re(),[l,c]=d.useState(i.value.currentOrganization.id);return t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[t.jsx(qe,{sx:{width:"100%"},displayField:"ltr"===r.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:i.value.userOrganizations,value:l,onChangeCallBack:e=>{c(e)}}),t.jsx(s.Button,{sx:{m:1},variant:"contained",disabled:null==l||l===i.value.currentOrganization.id,onClick:async()=>{await a({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:i.value.username,orgId:l},data:{},successCallBkFn:t=>{const o={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),o.token=null,n(Ce.setAuthenticated(o)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},$i=f.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Zi,setSideBarState:Ji}=$i.actions;var Xi=$i.reducer;function er(e,t){const o=d.useRef(e);d.useEffect(()=>{o.current=e},[e]),d.useEffect(()=>{const e=setInterval(()=>o.current?.(),t);return()=>clearInterval(e)},[t])}const tr=s.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; }
|
|
@@ -162,5 +162,5 @@ class yT{static async createPublicClientApplication(e){const t=await async funct
|
|
|
162
162
|
/*! @azure/msal-react v3.0.19 2025-08-19 */const ET={instance:IT,inProgress:hm,accounts:[],logger:new Cs({})},OT=ce.createContext(ET);
|
|
163
163
|
/*! @azure/msal-react v3.0.19 2025-08-19 */
|
|
164
164
|
function CT(e,t){if(e.length!==t.length)return!1;const o=[...t];return e.every(e=>{const t=o.shift();return!(!e||!t)&&(e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username)})}
|
|
165
|
-
/*! @azure/msal-react v3.0.19 2025-08-19 */OT.Consumer;const NT="3.0.19",RT="UNBLOCK_INPROGRESS",bT="EVENT",wT=(e,t)=>{const{type:o,payload:i}=t;let r=e.inProgress;switch(o){case RT:e.inProgress===sm&&(r=hm,i.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case bT:const t=i.message,n=_T.getInteractionStatusFromEvent(t,e.inProgress);n&&(i.logger.info(`MsalProvider - ${t.eventType} results in setting inProgress from ${e.inProgress} to ${n}`),r=n);break;default:throw new Error(`Unknown action type: ${o}`)}if(r===sm)return e;const n=i.instance.getAllAccounts();return r===e.inProgress||CT(n,e.accounts)?r!==e.inProgress?{...e,inProgress:r}:CT(n,e.accounts)?e:{...e,accounts:n}:{...e,inProgress:r,accounts:n}};function ST({instance:e,children:t}){d.useEffect(()=>{e.initializeWrapperLibrary(fm,NT)},[e]);const o=d.useMemo(()=>e.getLogger().clone("@azure/msal-react",NT),[e]),[i,r]=d.useReducer(wT,void 0,()=>({inProgress:sm,accounts:[]}));d.useEffect(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:o,message:t},type:bT})});return o.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:o},type:RT})})}).catch(()=>{}),()=>{t&&(o.verbose(`MsalProvider - Removing event callback ${t}`),e.removeEventCallback(t))}},[e,o]);const n={instance:e,inProgress:i.inProgress,accounts:i.accounts,logger:o};return d.createElement(OT.Provider,{value:n},t)}const PT=e=>{const i=o.useDispatch();let r;"AZURE"===e?.authenticationMethod&&(r=new yT({auth:{clientId:e?.azureConfiguration?.frontEndClientId,authority:`https://login.microsoftonline.com/${e?.azureConfiguration?.tenantId}`,redirectUri:e?.azureConfiguration?.redirectURL}})),le.LicenseInfo.setLicenseKey(e.muiPremiumKey);const n={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||We} #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||We},secondary:{main:e.appTheme?.light?.secondaryColor||He},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #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||Ye},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}},c=o.useSelector(e=>e.AppLayout);let u={...n};"dark"===c.themeMode&&(u={...a});const p=s.createTheme({direction:c.appDirection,...u});return d.useEffect(()=>{document.title=e.documentTitle,i(an.setAppInfo(e));let t={};e.enableAdministrationModule&&(t={...ln}),e.businessCommonStoresMetaData&&(t={...t,...e.businessCommonStoresMetaData}),i(Le(t))},[e]),t.jsx(l.ThemeProvider,{theme:p,children:"AZURE"===e?.authenticationMethod?t.jsx(ST,{instance:r,children:t.jsx(rn,{msalInstance:r})}):t.jsx(rn,{msalInstance:r})})};var vT={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>©</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},LT={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 MT={...vT,...LT,...{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 xT={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>©</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},DT={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 kT={...xT,...DT,...{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"}};i.library.add(r.fab),i.library.add(n.far),i.library.add(a.fas);Object.defineProperty(exports,"DataGridPremium",{enumerable:!0,get:function(){return e.DataGridPremium}}),Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return o.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return o.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return m.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return g.toast}}),exports.axios=T,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return y.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return I.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return _.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return _.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return E.zodResolver}}),exports.z=ue,exports.AttachmentCard=Ai,exports.AttachmentImageViewer=Ti,exports.AttachmentPanel=yi,exports.BaseApp=e=>{const[i,r]=d.useState({AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xi,AppInfo:sn}),n=f.configureStore({reducer:i}),[a,s]=d.useState(!1);return d.useEffect(()=>{(()=>{const t={AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xi,AppInfo:sn,...e?.businessReduxReducers};r(e=>({...t}));const o={en:{translation:{...MT,...e?.businessLocals?.en}},ar:{translation:{...kT,...e?.businessLocals?.ar}}};A.use(y.initReactI18next).init({resources:o,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),s(!0)})()},[e]),a?t.jsx(o.Provider,{store:n,children:t.jsx(PT,{...e})}):t.jsx(t.Fragment,{})},exports.CheckBox=Be,exports.ComboBox=qe,exports.DARK_THEME_INITIAL_MAIN_COLOR=Ye,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=je,exports.DATE_TIME_FORMAT=Ge,exports.DashboardRouteView=zi,exports.DashboardViewer=Vi,exports.Datefield=Ve,exports.DatetimeField=ze,exports.ExcelReportViewer=Mi,exports.FormElement=mi,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=We,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=He,exports.ReportViewer=Di,exports.SystemLookupCombobox=Qe,exports.TemplateBarChart=Bi,exports.TemplateDataCard=qi,exports.TemplateForm=Ui,exports.TemplateGauge=ji,exports.TemplateGrid=vi,exports.TemplateLineChart=Gi,exports.TemplateLineProgress=Hi,exports.TemplatePieChart=Yi,exports.TemplateTextField=De,exports.TransferList=Fe,exports.WorkflowDocumentPanel=ki,exports.WorkflowDocumentTimeLine=Ii,exports.WorkflowRouteComponent=Fi,exports.capitalizeFirstLetter=ui,exports.constructGridColumnsFromFields=ot,exports.constructValidationSchema=it,exports.formatDate=(e,t)=>t?x(e).format(t):x(e).format(je),exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=rt,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=di,exports.isNumeric=ci,exports.isValidEmail=pi,exports.parseStringToDate=(e,t)=>t?x(e,t).toDate():x(e,je).toDate(),exports.timeAgo=hi,exports.useApiActions=xe,exports.useAxios=Re,exports.useConfirmationWindow=be,exports.useIsMobile=pe,exports.useLoadingMask=Ee,exports.useSession=we,exports.useWindow=Se,Object.keys(s).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return s[e]}})}),Object.keys(B).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return B[e]}})}),Object.keys(q).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return q[e]}})});
|
|
165
|
+
/*! @azure/msal-react v3.0.19 2025-08-19 */OT.Consumer;const NT="3.0.19",RT="UNBLOCK_INPROGRESS",bT="EVENT",wT=(e,t)=>{const{type:o,payload:i}=t;let r=e.inProgress;switch(o){case RT:e.inProgress===sm&&(r=hm,i.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case bT:const t=i.message,n=_T.getInteractionStatusFromEvent(t,e.inProgress);n&&(i.logger.info(`MsalProvider - ${t.eventType} results in setting inProgress from ${e.inProgress} to ${n}`),r=n);break;default:throw new Error(`Unknown action type: ${o}`)}if(r===sm)return e;const n=i.instance.getAllAccounts();return r===e.inProgress||CT(n,e.accounts)?r!==e.inProgress?{...e,inProgress:r}:CT(n,e.accounts)?e:{...e,accounts:n}:{...e,inProgress:r,accounts:n}};function ST({instance:e,children:t}){d.useEffect(()=>{e.initializeWrapperLibrary(fm,NT)},[e]);const o=d.useMemo(()=>e.getLogger().clone("@azure/msal-react",NT),[e]),[i,r]=d.useReducer(wT,void 0,()=>({inProgress:sm,accounts:[]}));d.useEffect(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:o,message:t},type:bT})});return o.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:o},type:RT})})}).catch(()=>{}),()=>{t&&(o.verbose(`MsalProvider - Removing event callback ${t}`),e.removeEventCallback(t))}},[e,o]);const n={instance:e,inProgress:i.inProgress,accounts:i.accounts,logger:o};return d.createElement(OT.Provider,{value:n},t)}const PT=e=>{const i=o.useDispatch();let r;"AZURE"===e?.authenticationMethod&&(r=new yT({auth:{clientId:e?.azureConfiguration?.frontEndClientId,authority:`https://login.microsoftonline.com/${e?.azureConfiguration?.tenantId}`,redirectUri:e?.azureConfiguration?.redirectURL}})),le.LicenseInfo.setLicenseKey(e.muiPremiumKey);const n={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||We} #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||We},secondary:{main:e.appTheme?.light?.secondaryColor||He},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #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||Ye},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}},c=o.useSelector(e=>e.AppLayout);let u={...n};"dark"===c.themeMode&&(u={...a});const p=s.createTheme({direction:c.appDirection,...u});return d.useEffect(()=>{document.title=e.documentTitle,i(an.setAppInfo(e));let t={};e.enableAdministrationModule&&(t={...ln}),e.businessCommonStoresMetaData&&(t={...t,...e.businessCommonStoresMetaData}),i(Le(t))},[e]),t.jsx(l.ThemeProvider,{theme:p,children:"AZURE"===e?.authenticationMethod?t.jsx(ST,{instance:r,children:t.jsx(rn,{msalInstance:r})}):t.jsx(rn,{msalInstance:r})})};var vT={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>©</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},LT={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 MT={...vT,...LT,...{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 xT={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>©</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},DT={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 kT={...xT,...DT,...{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"}};i.library.add(r.fab),i.library.add(n.far),i.library.add(a.fas);Object.defineProperty(exports,"DataGridPremium",{enumerable:!0,get:function(){return e.DataGridPremium}}),Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return o.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return o.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return m.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return g.toast}}),exports.axios=T,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return y.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return I.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return _.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return _.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return E.zodResolver}}),exports.z=ue,exports.AttachmentCard=Ai,exports.AttachmentImageViewer=Ti,exports.AttachmentPanel=yi,exports.BaseApp=e=>{const[i,r]=d.useState({AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xi,AppInfo:sn}),n=f.configureStore({reducer:i}),[a,s]=d.useState(!1);return d.useEffect(()=>{(()=>{const t={AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xi,AppInfo:sn,...e?.businessReduxReducers};r(e=>({...t}));const o={en:{translation:{...MT,...e?.businessLocals?.en}},ar:{translation:{...kT,...e?.businessLocals?.ar}}};A.use(y.initReactI18next).init({resources:o,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),s(!0)})()},[e]),a?t.jsx(o.Provider,{store:n,children:t.jsx(PT,{...e})}):t.jsx(t.Fragment,{})},exports.CheckBox=Be,exports.ComboBox=qe,exports.DARK_THEME_INITIAL_MAIN_COLOR=Ye,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=je,exports.DATE_TIME_FORMAT=Ge,exports.DashboardRouteView=zi,exports.DashboardViewer=Vi,exports.Datefield=Ve,exports.DatetimeField=ze,exports.ExcelReportViewer=Mi,exports.FormElement=mi,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=We,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=He,exports.ReportViewer=Di,exports.SystemLookupCombobox=Qe,exports.TemplateBarChart=Bi,exports.TemplateDataCard=qi,exports.TemplateForm=Ui,exports.TemplateGauge=ji,exports.TemplateGrid=vi,exports.TemplateLineChart=Gi,exports.TemplateLineProgress=Hi,exports.TemplatePieChart=Yi,exports.TemplateTextField=De,exports.TransferList=Fe,exports.WorkflowDocumentPanel=ki,exports.WorkflowDocumentTimeLine=Ii,exports.WorkflowRouteComponent=Fi,exports.capitalizeFirstLetter=ui,exports.constructGridColumnsFromFields=ot,exports.constructValidationSchema=it,exports.formatDate=(e,t)=>t?x(e).format(t):x(e).format(je),exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=rt,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=di,exports.isNumeric=ci,exports.isValidEmail=pi,exports.parseStringToDate=(e,t)=>t?x(e,t).toDate():x(e,je).toDate(),exports.timeAgo=hi,exports.useApiActions=xe,exports.useAxios=Re,exports.useCommonStore=e=>{const t=o.useDispatch(),{handleGetRequest:i}=Re(),r=o.useSelector(t=>t?.commonStores?.stores[e]);return{reload:async()=>{r&&r?.url&&await i({endPointURI:r.url,showMask:!0,successCallBkFn:o=>{t(ve({storeKey:e,data:o.data}))},failureCallBkFn:()=>{t(ve({storeKey:e,data:[]}))}})},data:r?.data,store:r}},exports.useConfirmationWindow=be,exports.useIsMobile=pe,exports.useLoadingMask=Ee,exports.useSession=we,exports.useWindow=Se,Object.keys(s).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return s[e]}})}),Object.keys(B).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return B[e]}})}),Object.keys(q).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return q[e]}})});
|
|
166
166
|
//# sourceMappingURL=index.js.map
|