@asaleh37/ui-base 25.8.23-1 → 25.8.23-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -28,11 +28,11 @@ object-assign
28
28
  * This source code is licensed under the MIT license found in the
29
29
  * LICENSE file in the root directory of this source tree.
30
30
  */
31
- function(e,t){const i=oe(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})($i),d=pe.forwardRef(function(t,d){const l=function(e=eo){return Ji(e)}(o),{className:s,component:p="div",...c}=to(t);return e.jsx(n,{as:p,ref:d,className:ro(s,r?r(a):a),theme:i&&l[i]||l,...c})});return d}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=no[t];return o?`${i}-${o}`:`${oo.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:oo.generate});function so(e){return"number"==typeof e&&!isNaN(e)}function po(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function co(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function uo(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function mo(e,t){const i=new Date(e),o=new Date,a=Math.floor((i-o)/1e3),r="rtl"===t?"ar":"en",n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}),d=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(const{unit:e,seconds:t}of d){const i=Math.floor(a/t);if(Math.abs(i)>1)return n.format(i,e)}return"ar"===r?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(lo.propTypes={children:wt.node,component:wt.elementType,sx:wt.oneOfType([wt.arrayOf(wt.oneOfType([wt.func,wt.object,wt.bool])),wt.func,wt.object])});const To=t=>{if(t?.fieldInfo){const i=t.fieldInfo,o=t?.formManager||null,a=t?.formActions||null,r=t?.formValues||null,d=t?.fieldInfo?.fieldName||null,l=t?.fieldInfo?.fieldType||null;return i&&o&&r&&d&&l?t.hiddenFields.includes(d)?e.jsx(e.Fragment,{}):e.jsx(n.Grid2,{size:i?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?e.jsx(we,{...i.muiTextFieldProps,fullWidth:!0,type:l,disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),label:i?.fieldLabel,value:r[d],onChange:e=>{let t=null;""!=e.target.value&&(t="number"===l&&po(e.target.value)?Number(e.target.value):e.target.value),o.setValue(d,t),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(t,o,a)},sx:{"& .MuiInputBase-root":{height:`${i?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...i?.formProps?.style},error:null!=o.formState.errors[d],helperText:o?.formState?.errors[d]?.message?.toString()}):"date"===i?.fieldType?e.jsx(ze,{format:i?.dateFormat||Ge,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(d,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},value:r[d],error:null!=o.formState.errors[d],errorMessage:o?.formState?.errors[d]?.message?.toString()}):"datetime"===i?.fieldType?e.jsx(He,{format:i?.dateFormat||We,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(d,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),value:r[d],error:null!=o.formState.errors[d],errorMessage:o?.formState?.errors[d]?.message?.toString()}):"checkbox"===i?.fieldType?e.jsx(ke,{label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(d,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),value:r[d],checkedValue:i?.checkedValue||!0,unCheckedValue:i?.unCheckedValue||!1,disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),sx:i?.formProps?.style}):"combobox"===i?.fieldType?e.jsx(je,{sx:i?.formProps?.style||{width:"100%"},label:i?.fieldLabel,disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),onChangeCallBack:(e,t)=>{let r=null;e&&(r=e),o.setValue(d,r),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(r,o,a,t)},options:i?.options||[],displayField:i?.optionDisplayField||"",valueField:i?.optionValueField||"",value:r[d],errorMessage:o?.formState?.errors[d]?.message?.toString()}):"lookup"===i?.fieldType?e.jsx(Qe,{sx:i?.formProps?.style||{width:"100%"},label:i?.fieldLabel,disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),onChangeCallBack:(e,t)=>{let r=null;e&&(r=e),o.setValue(d,r),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(r,o,a,t)},lookupType:i.lookupType,value:r[d],errorMessage:o?.formState?.errors[d]?.message?.toString()}):null}):e.jsx(e.Fragment,{})}return e.jsx(e.Fragment,{})},Ao=t=>{const i=De(),{ConfirmationWindow:o,setOpen:a}=ge({body:t?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{t?.actionFn(t?.record)}});return null==t?.authority||i.isUserAuthorized(t.authority)?e.jsxs(e.Fragment,{children:[e.jsx(o,{}),e.jsxs(n.Button,{variant:t?.formActionProps?.actionButtonVariant,color:t?.formActionProps?.actionButtonColor,onClick:()=>{if(t?.actionFn){if(t?.preActionValidation&&!t.preActionValidation(t.record))return;!0===t?.isConfirmationRequired?a(!0):t?.actionFn(t.record)}},children:[t?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{marginRight:5,marginLeft:5}}):e.jsx(e.Fragment,{}),e.jsx("div",{children:t?.label})]})]}):e.jsx(e.Fragment,{})},_o=t=>{const{t:i}=I.useTranslation();return e.jsx(e.Fragment,{children:e.jsxs(n.Grid2,{container:!0,sx:t?.style,alignItems:"flex-start",children:[t?.label?e.jsx(n.Grid2,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:t?.icon?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{marginRight:5,marginLeft:5}}),e.jsx("div",{children:i(t.label)})]}):e.jsx(e.Fragment,{children:i(t.label)})}):e.jsx(e.Fragment,{}),t?.elements?t.elements.map(i=>"group"===i.type?e.jsx(_o,{...i.props,formManager:t.formManager,formValues:t.formValues,formActions:t.formActions,hiddenFields:t.hiddenFields,disabledFields:t.disabledFields}):"field"===i.type&&"props"===i.mode?e.jsx(To,{fieldInfo:i.props,formManager:t.formManager,formValues:t.formValues,formActions:t.formActions,hiddenFields:t.hiddenFields,disabledFields:t.disabledFields}):"field"===i.type&&"node"===i.mode?e.jsx(n.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:e.jsx(i.node,{formManager:t.formManager,formValues:t.formValues,formActions:t.formActions})}):void 0):null,t?.actions?e.jsx(n.Grid2,{size:{sm:12},sx:{padding:1},children:t.actions.map(i=>e.jsx(Ao,{...i,record:t.formValues}))}):e.jsx(e.Fragment,{})]})})},fo=i=>{const o=t.useSelector(e=>e.AppInfo.value.apiBaseUrl),[a,r]=l.useState(null);return l.useEffect(()=>{(()=>{let e=o+"/api/v1/attachment/";i?.attachmentId?e+="download?attachmentId="+i.attachmentId:(e+=`downloadImage?attachmentCode=${i.attachmentCode}&refKey=${i.refKey}`,i?.category&&(e+=`&category=${i.category}`)),r(e)})()},[i]),i?.showAsAvatar?e.jsx(n.Avatar,{sx:i.style,onError:()=>{r(i?.onErrorImage?i.onErrorImage:"/no_image.png")},src:a}):e.jsx("img",{src:a,loading:"lazy",alt:"image",onError:()=>{r(i?.onErrorImage?i.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Io=t=>{const{handleGetRequest:i,handleDeleteRequest:o}=Ce(),{isUserAuthorized:a}=De();let r=!0;t?.downloadAuthorityKey&&(r=a(t.downloadAuthorityKey));const{ConfirmationWindow:d,setOpen:l}=ge({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await o({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:t.attachmentCode,refKey:t.refKey,attachmentId:t.id},successCallBkFn:e=>{t.setAttachmentConfig(e.data)},showMask:!0})})()}});return e.jsxs(e.Fragment,{children:[e.jsx(d,{}),e.jsxs(R,{sx:{width:300,border:"0.5px solid gray"},children:[e.jsx(v,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:t?.docType.toLocaleLowerCase().includes("image")?e.jsx(fo,{attachmentId:t.id}):e.jsx(m.FontAwesomeIcon,{icon:"file",size:"3x"})}),e.jsxs(w,{children:[e.jsx(F,{gutterBottom:!0,variant:"h6",component:"div",children:t.fileName}),e.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${t?.attachmentSize||"unknown"} kb`}),e.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${t?.category||"NA"}`}),e.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:t.remark})]}),e.jsxs(U,{children:[t?.allowDelete?e.jsx(n.IconButton,{size:"small",onClick:()=>{l(!0)},children:e.jsx(n.Tooltip,{title:"Delete Attachment",children:e.jsx(m.FontAwesomeIcon,{icon:"trash"})})}):e.jsx(e.Fragment,{}),e.jsx("div",{style:{flex:1}}),r?e.jsx(n.IconButton,{size:"small",onClick:async()=>{await i({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:t.id},showMask:!0,responseType:"blob",successCallBkFn:e=>{const i=window.URL.createObjectURL(new Blob([e.data])),o=document.createElement("a");o.href=i,o.setAttribute("download",t.fileName),document.body.appendChild(o),o.click(),o.remove()}})},children:e.jsx(n.Tooltip,{title:"Download Attachment",children:e.jsx(m.FontAwesomeIcon,{icon:"download"})})}):e.jsx(e.Fragment,{})]})]})]})},Eo=t=>{const{handleUploadRequest:i,handleGetRequest:o}=Ce(),[a,r]=l.useState(null),[d,s]=l.useState([]),[p,c]=l.useState(null),[u,T]=l.useState(null),[_,f]=l.useState([]),[I,E]=l.useState(null),{isUserAuthorized:O}=De(),N=e=>e.split(".").pop()?.toLowerCase()||"";l.useEffect(()=>{(async()=>{await o({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:t.attachmentCode,refKey:t.refKey},successCallBkFn:e=>{E(e.data)}})})()},[t.refKey,t.attachmentCode]),l.useEffect(()=>{if(f(I?.allowedFileTypes?I.allowedFileTypes.split(","):[]),I?.attachmentCategories){const e=[];for(const t of I.attachmentCategories.split(","))e.push({value:t});s(e)}else s([])},[I]);let y=!0;I?.downloadAuthorityKey&&!O(I?.downloadAuthorityKey)&&(y=!1);let h=!0;return!1===t?.enableAttachment&&(h=!1),I?.uploadAuthorityKey&&!O(I.uploadAuthorityKey)&&(h=!1),e.jsxs(n.Paper,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[h?e.jsx(e.Fragment,{children:null==I?.maxAllowedNumberOfFiles||I?.maxAllowedNumberOfFiles>I.refKeyAttachments.length?e.jsxs(e.Fragment,{children:[e.jsxs("h3",{children:[e.jsx(m.FontAwesomeIcon,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),e.jsx("input",{type:"file",style:{margin:20},accept:I?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=N(t.name);if(_.length>0&&!_.includes(e))return void A.toast.error(e+" is not allowed")}r(e.target.files)}}),d.length>0?e.jsx(je,{label:"Attachment Type",sx:{width:300,m:1},options:d,displayField:"value",valueField:"value",value:u,onChangeCallBack:e=>{T(e)}}):e.jsx(e.Fragment,{}),e.jsx(we,{label:"Remark",value:p,onChange:e=>c(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),e.jsx(n.Button,{sx:{m:1},variant:"contained",onClick:async()=>{let e=I?.refKeyAttachments.length||0;if(I?.maxAllowedNumberOfFiles&&a.length+e>I.maxAllowedNumberOfFiles)A.toast.error("Maximum number of attachments is "+I.maxAllowedNumberOfFiles);else if(!0===I?.isCategoryRequired&&d.length>0&&(null==u||void 0===u||""===u))A.toast.error("You must selected document type to process your request");else if(a){for(const e of a)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void A.toast.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await i({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:t.refKey,attachmentCode:t.attachmentCode,remark:p,category:u},files:a,successCallBkFn:e=>{E(e.data),r(null),T(null),c(null),A.toast.success("Your request has been process successfully")}})}else A.toast.error("You must add files to upload")},children:"Upload"})]}):e.jsx(e.Fragment,{})}):e.jsx(e.Fragment,{}),y&&I?.refKeyAttachments?.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("h3",{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),e.jsx(n.Grid2,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:I?.refKeyAttachments.map(i=>e.jsx(n.Grid2,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:e.jsx(Io,{...i,attachmentCode:t.attachmentCode,setAttachmentConfig:E,downloadAuthorityKey:I.downloadAuthorityKey,allowDelete:h})}))})]}):e.jsx(e.Fragment,{})]})},Oo=i=>{const o=t.useSelector(e=>e.AppLayout),{t:a}=I.useTranslation();return e.jsxs(n.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[e.jsxs(n.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[e.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),a("WF_ACTION_HISTORY_LABEL")]}),e.jsx(n.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:i.actionHistory.map((t,a)=>e.jsx(e.Fragment,{children:e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[e.jsxs(n.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[e.jsx(n.Box,{sx:{marginBottom:.2},children:t.actionTime}),e.jsxs(F,{children:["via ",t.actionMethod]})]}),e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[e.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:t?.personId+""||"0",style:{m:1,width:70,height:70}}),a!==i.actionHistory.length-1?e.jsx(n.Box,{sx:{marginTop:11,position:"absolute"},children:"|"}):e.jsx(e.Fragment,{})]}),e.jsxs(n.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[e.jsxs(n.Box,{sx:{width:"100%"},children:["ltr"===o.appDirection?`${t?.documentActionEnName}`:`${t?.documentActionArName}`,t?.actionComment?" - "+t.actionComment:""]}),e.jsx(n.Box,{sx:{width:"100%"},children:"ltr"===o.appDirection?`${t?.employeeEnName}`:`${t?.employeeArName}`})]})]})}))})]})},No=t=>{const{t:i}=I.useTranslation(),o=De(),{ConfirmationWindow:a,setOpen:r}=ge({body:i(t?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(t?.actionFn(t.recordsToProcessActionOn,t.recordIdsToProcessActionOn)),t?.reloadData&&t.reloadData()}});let d=!0;if(t.authority&&(d=o.isUserAuthorized(t.authority)),d)return e.jsxs(e.Fragment,{children:[e.jsx(a,{}),e.jsxs(n.Button,{onClick:async()=>{if(t?.recordsToProcessActionOn&&t?.recordsToProcessActionOn.length>0){if(t?.preActionValidation)for(const e of t.recordsToProcessActionOn)if(!t.preActionValidation(e))return;!0===t?.isConfirmationRequired?r(!0):(await t.actionFn(t.recordsToProcessActionOn,t.recordIdsToProcessActionOn),t?.reloadData&&t.reloadData())}else A.toast.error(i("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:t?.label?"outlined":t?.formActionProps?.actionButtonVariant?t.formActionProps.actionButtonVariant:"text",size:"small",color:t?.formActionProps?.actionButtonColor||"primary",children:[t?.icon?e.jsx(m.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:t.icon}):e.jsx(e.Fragment,{}),t?.label?i(t.label):e.jsx(e.Fragment,{})]})]})},yo=n.styled(B.QuickFilter)({display:"grid",alignItems:"center"}),ho=n.styled(B.ToolbarButton)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])})),Ro=n.styled(n.TextField)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])})),Lo=t=>{const{t:i}=I.useTranslation(),o=De(),a=!t?.templateProps?.editAction?.authority||o.isUserAuthorized(t.templateProps.editAction.authority),r=at(t?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},t?.templateProps?.data||[],t?.templateProps?.keyColumnName||"id");return e.jsxs(B.Toolbar,{children:[a&&"none"!=t?.templateProps?.editMode?.editMode?e.jsxs(n.Button,{onClick:t?.handleCreateNewRecord,children:[e.jsx(m.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),i("ADD_BTN_LABEL")]}):e.jsx(e.Fragment,{}),t?.templateProps?.rowActions?t.templateProps.rowActions.map((e,i)=>!0===e?.gridActionProps?.multiRecord?l.createElement(No,{...e,key:i,reloadData:async()=>{t.templateProps.apiActions.reloadData(t?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:r.selectedRecordIds,recordsToProcessActionOn:r.selectedRecords}):null):e.jsx(e.Fragment,{}),e.jsx(n.Box,{sx:{flex:1,mx:.5},children:t?.templateProps?.tBar}),e.jsx(n.Tooltip,{title:"Columns",children:e.jsx(B.ColumnsPanelTrigger,{render:e.jsx(B.ToolbarButton,{}),children:e.jsx(B.GridViewColumnIcon,{fontSize:"small"})})}),e.jsx(n.Tooltip,{title:"Filters",children:e.jsx(B.FilterPanelTrigger,{render:(t,i)=>e.jsx(B.ToolbarButton,{...t,color:"default",children:e.jsx(n.Badge,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:e.jsx(B.GridFilterListIcon,{fontSize:"small"})})})})}),t?.templateProps?.gridStateKey?e.jsx(n.Tooltip,{title:i("RESET_GRID_STATE"),children:e.jsx(n.IconButton,{onClick:t?.clearGridState,children:e.jsx(m.FontAwesomeIcon,{icon:"eraser"})})}):e.jsx(e.Fragment,{}),e.jsx(n.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),e.jsx(n.Tooltip,{title:i("EXPORT_EXECL_LABEL"),children:e.jsx(B.ExportExcel,{render:e.jsx(n.MenuItem,{}),children:e.jsx(m.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),e.jsxs(yo,{children:[e.jsx(B.QuickFilterTrigger,{render:(t,o)=>e.jsx(n.Tooltip,{title:i("SEARCH_BTN_LABEL"),enterDelay:0,children:e.jsx(ho,{...t,ownerState:{expanded:o.expanded},color:"default","aria-disabled":o.expanded,children:e.jsx(m.FontAwesomeIcon,{icon:"search"})})})}),e.jsx(B.QuickFilterControl,{render:({ref:t,...o},a)=>e.jsx(Ro,{...o,ownerState:{expanded:a.expanded},inputRef:t,"aria-label":"Search",placeholder:`${i("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:e.jsx(n.InputAdornment,{position:"start",children:e.jsx(m.FontAwesomeIcon,{icon:"search"})}),endAdornment:a.value?e.jsx(n.InputAdornment,{position:"end",children:e.jsx(B.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:e.jsx(m.FontAwesomeIcon,{icon:"xmark"})})}):null,...o.slotProps?.input},...o.slotProps}})})]}),e.jsx(n.IconButton,{onClick:()=>{t.templateProps.apiActions.reloadData(t?.templateProps?.gridLoadParametersValues)},children:e.jsx(m.FontAwesomeIcon,{icon:"refresh"})})]})},Co=t=>{const{t:i}=I.useTranslation(),o=De(),{ConfirmationWindow:a,setOpen:r}=ge({body:i(t?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(t?.actionFn(t.record)),t?.reloadData&&t.reloadData()}});let d=!0;t.authority&&(d=o.isUserAuthorized(t.authority));let l={};t?.getActionIconStyleForRecord&&(l=t.getActionIconStyleForRecord(t.record));let s=!0;t?.isActionVisibleForRecord&&(s=t?.isActionVisibleForRecord(t.record));let p=!1;if(t?.isActionDisabledForRecord&&(p=t.isActionDisabledForRecord(t.record)),d&&s)return e.jsxs(e.Fragment,{children:[e.jsx(a,{}),e.jsx(B.GridActionsCellItem,{disabled:p,icon:e.jsx(n.Tooltip,{title:t?.label?i(t.label):"",children:e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{...l,color:p?"gray":null!=l?.color?l.color:void 0}})}),showInMenu:t?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!p){if(t?.preActionValidation&&!t.preActionValidation(t.record))return;!0===t?.isConfirmationRequired?r(!0):(await t.actionFn(t.record),!0===t?.gridActionProps?.reloadGridAfterAction&&t?.reloadData&&t.reloadData())}}})]})};let go=-1;const Do=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Po=(e,t)=>{const i=Do(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},Mo=["__check__","actions"],xo=i=>{const{t:o}=I.useTranslation(),a=t.useSelector(e=>e.AppLayout),[r,d]=l.useState({}),[s,p]=l.useState(!0),{getLookupOptions:c}=(()=>{const{handleGetRequest:e}=Ce(),i=t.useSelector(e=>e.AppLayout),o=async t=>{let i=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let t=await o(e.lookupType);return{...e,options:t,displayField:"ltr"===i.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:o}})(),{Window:u,setWindowState:T}=Pe({windowTitle:o(i.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{i?.apiActions?.reloadData(i.gridLoadParametersValues)}}),{Window:_,setWindowState:f}=Pe({windowTitle:o(i.gridTitle)+" Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"80%",onCloseCallBack:()=>{i?.apiActions?.reloadData(i.gridLoadParametersValues)}}),[E,N]=l.useState([]),h=tt(i.formElements),R=[],L=l.useMemo(()=>i?.gridStateKey?Do(i.gridStateKey):{},[]);for(const e of h)!0===e?.gridProps?.hidden&&R.push(e.fieldName);let C={};if(L?.columnVisibilityModel){C=L.columnVisibilityModel;const e=Object.keys(C);for(const t of R)e.includes(t)||(C[t]=!1)}else for(const e of R)C[e]=!1;const g=t.useSelector(e=>e.AppLayout.appDirection),[D,P]=l.useState(C),[M,x]=l.useState(L.columnOrder||[]),[b,S]=l.useState(L.columnWidths||{}),[U,w]=l.useState(L.columnGroupingModel||[]);let v=L?.pinnedColumns?.left||[];v=v.filter(e=>!Mo.includes(e));let F=L?.pinnedColumns?.right||[]||[];F=F.filter(e=>!Mo.includes(e));const[k,j]=l.useState({left:[..."ltr"===g?Mo:[],...v],right:[..."rtl"===g?Mo:[],...F]}),G=De(),W=O.useNavigate(),[Y,V]=l.useState(null),[q,K]=l.useState(null),[z,H]=l.useState({}),Q=async()=>{let e=it(h,"row"===i?.editMode?.editMode||!1,o);for(let t of e)t?.lookupType&&(t.displayField="ltr"===a.appDirection?"lookupEnDisplay":"lookupArDisplay",t.options=await c(t.lookupType),t.valueField="lookupValue");N(e)},[Z,$]=l.useState({ids:new Set,type:"include"});let X="id";i?.keyColumnName&&(X=i?.keyColumnName);const J=i.setData,ee=y.z.object(ot(h));let te=!0;i?.editAction?.authority&&(te=G.isUserAuthorized(i.editAction.authority));let ie=!0;i?.deleteAction?.authority&&(ie=G.isUserAuthorized(i.deleteAction.authority));const{ConfirmationWindow:oe,setOpen:ae}=ge({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;Y&&!0===Y?.isNew||(e=await i.apiActions.deleteRecordById(Y[X])),e&&(i?.deleteAction?.postActionCallBack&&await i.deleteAction.postActionCallBack(Y),J(e=>e.filter(e=>e[X]!=Y[X])))}});let re,ne,de,le,se,pe;"modal"===i?.editMode?.editMode&&(re=i?.editMode?.specs?.modalHeight||"fit-content",ne=i?.editMode?.specs?.modalWidth||"300",de=i?.editMode?.specs?.modalMinHeight,le=i?.editMode?.specs?.modalMinWidth,se=i?.editMode?.specs?.modalIcon||"window",pe=i?.editMode?.specs?.modalTitle||"Record Form");const{Window:ce,setWindowState:ue}=Pe({height:re,minHeight:de,minWidth:le,onCloseCallBack:()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)},width:ne,windowIcon:se,windowTitle:pe}),me={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:t=>{const a=t.row,r=[];if("none"!=i?.editMode?.editMode&&(void 0===i?.disableDefaultAction||!i.disableDefaultAction)){const t=z[a[X]]?.mode===B.GridRowModes.Edit;if("row"===i.editMode.editMode&&t)te&&(r.push(e.jsx(B.GridActionsCellItem,{icon:e.jsx(m.FontAwesomeIcon,{icon:"save"}),label:o("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const t=e[X];H({...z,[t]:{mode:B.GridRowModes.View}})})(a)}})),r.push(e.jsx(B.GridActionsCellItem,{icon:e.jsx(m.FontAwesomeIcon,{icon:"cancel"}),label:o("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const t=e[X];t&&so(t)&&t<0?(H({...z,[t]:{mode:B.GridRowModes.View,ignoreModifications:!0}}),J(e=>{const i=e.filter(e=>e[X]!=t);return i})):H({...z,[t]:{mode:B.GridRowModes.View,ignoreModifications:!0}})})(a)},color:"inherit"})));else{if(i?.editAction&&!0===i?.editAction?.isEnabled){let t=!0;i?.editAction?.isActionVisibleForRecord&&(t=i?.editAction?.isActionVisibleForRecord(a));let d=!1;i?.editAction?.isActionDisabledForRecord&&(d=i?.editAction?.isActionDisabledForRecord(a)),te&&t&&r.push(e.jsx(B.GridActionsCellItem,{disabled:d,icon:e.jsx(n.Tooltip,{title:o("EDIT_BTN_LABEL"),children:e.jsx(m.FontAwesomeIcon,{icon:"edit",style:{color:d?"gray":void 0}})}),showInMenu:i?.editAction?.gridActionProps?.showInMenu||!1,label:o("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{te&&!d&&(async e=>{if(e)if(K(e),"form"===i.editMode.editMode)W(i.editMode.specs.formRoute+"/"+e[X]);else if("modal"===i.editMode.editMode)ue(!0);else if("row"===i?.editMode?.editMode){const t=e[X];H({...z,[t]:{mode:B.GridRowModes.Edit}})}})(a)}}))}if(i?.deleteAction&&!0===i?.deleteAction?.isEnabled){let t=!0;i?.deleteAction?.isActionVisibleForRecord&&(t=i?.deleteAction?.isActionVisibleForRecord(a));let d=!1;i?.deleteAction?.isActionDisabledForRecord&&(d=i?.deleteAction?.isActionDisabledForRecord(a)),ie&&t&&r.push(e.jsx(B.GridActionsCellItem,{disabled:d,icon:e.jsx(n.Tooltip,{title:o("DELETE_BTN_LABEL"),children:e.jsx(m.FontAwesomeIcon,{icon:"trash",style:{color:d?"gray":void 0}})}),showInMenu:i?.deleteAction?.gridActionProps?.showInMenu||!1,label:o("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(ie&&!d){if(i?.deleteAction?.preActionValidation&&!i.deleteAction.preActionValidation(a))return;V(a),ae(!0)}}}))}}}if(a[i?.keyColumnName||"id"]&&a[i?.keyColumnName||"id"]>0&&i?.attachment&&r?.push(e.jsx(B.GridActionsCellItem,{icon:e.jsx(n.Tooltip,{title:"Attachments",children:e.jsx(m.FontAwesomeIcon,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{d(a),p(!i?.attachment?.enableAttachFn||i.attachment.enableAttachFn(a)),T(!0)}})),a[i?.keyColumnName||"id"]&&a[i?.keyColumnName||"id"]>0&&i?.workFlowDocumentCode&&r?.push(e.jsx(B.GridActionsCellItem,{icon:e.jsx(n.Tooltip,{title:"Approvals",children:e.jsx(m.FontAwesomeIcon,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{d(a),f(!0)}})),a[i?.keyColumnName||"id"]&&a[i?.keyColumnName||"id"]>0&&i?.rowActions)for(const t of i.rowActions)t?.gridActionProps?.multiRecord&&!0===t?.gridActionProps?.multiRecord||r.push(e.jsx(Co,{...t,record:a,reloadData:async()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)}}));return r}};let Te=[];(void 0===i?.disableDefaultAction||!i.disableDefaultAction||i?.rowActions&&i?.rowActions.length>0)&&Te.push(me),Te=[...Te,...E];l.useEffect(()=>{void 0!==i?.autoLoad&&!0!==i.autoLoad||i.apiActions.reloadData(i?.gridLoadParametersValues),Q()},[]),l.useEffect(()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)},[G.UserInfo?.currentOrganization]),l.useEffect(()=>{Q()},[g,i.formElements]);const Ae=l.useMemo(()=>{const e=Te.map(e=>({...e,width:b[e.field]||e.width}));if(M.length){const t=new Map(e.map(e=>[e.field,e]));return M.map(e=>t.get(e)).filter(Boolean)}return e},[M,b,Te]);return e.jsxs(e.Fragment,{children:[e.jsx(oe,{}),"modal"===i?.editMode?.editMode?e.jsx(ce,{children:i?.editMode?.specs?.formComponent?e.jsx(i.editMode.specs.formComponent,{recordIdToEdit:q?q[X]:void 0,formCloseCallBk:()=>{ue(!1),i.apiActions.reloadData(i?.gridLoadParametersValues)}}):e.jsx(vo,{keyColumnName:i.keyColumnName,attachment:i.attachment,formLoadCallBk:i.formLoadCallBk,recordIdToEdit:q?q[X]:void 0,formCloseCallBk:()=>{ue(!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})}):e.jsx(e.Fragment,{}),void 0!==i?.hideInfoBar||i?.hideInfoBar?e.jsx(e.Fragment,{}):e.jsxs(n.Box,{sx:{display:"flex"},children:[void 0!==i?.hideBackButton||i?.hideBackButton?e.jsx(e.Fragment,{}):e.jsx(n.IconButton,{onClick:()=>{W(-1,{replace:!0})},children:e.jsx(m.FontAwesomeIcon,{icon:"ltr"===g?"arrow-left":"arrow-right"})}),e.jsxs(n.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[i?.girdIcon?e.jsx(m.FontAwesomeIcon,{icon:i.girdIcon,style:{marginRight:5,marginLeft:5}}):e.jsx(e.Fragment,{}),e.jsx(n.Typography,{variant:"h5",children:i?.gridTitle?co(o(i?.gridTitle)):""})]})]}),i?.gridLoadParameters&&i?.gridLoadParameters.length>0&&i?.gridLoadParametersValues&&i?.setGridLoadParametersValues?e.jsxs(n.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[e.jsx(n.AccordionSummary,{expandIcon:e.jsx(B.GridExpandMoreIcon,{}),children:e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),e.jsx(n.Typography,{component:"span",children:"Filters"})]})}),e.jsx(n.AccordionDetails,{children:e.jsx(n.Box,{children:e.jsx(vo,{saveButtonSpecs:{label:o("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:o("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})})})]}):e.jsx(e.Fragment,{}),i?.attachment?e.jsx(u,{children:e.jsx(Eo,{attachmentCode:i.attachment.attachmentCode,refKey:r[i?.keyColumnName||"id"],enableAttachment:s})}):e.jsx(e.Fragment,{}),i?.workFlowDocumentCode?e.jsx(_,{children:e.jsx(wo,{workFlowDocumentCode:i.workFlowDocumentCode,refDocumentId:r[i?.keyColumnName||"id"],postActionCallBk:()=>{f(!1),i.apiActions.reloadData(i.gridLoadParametersValues)},cancelActionCallBk:()=>{f(!1),i.apiActions.reloadData(i.gridLoadParametersValues)}})}):e.jsx(e.Fragment,{}),e.jsx(B.DataGridPremium,{...i?.muiProps,slots:{toolbar:Lo},slotProps:{toolbar:{templateProps:{...i,rowSelectionModel:Z,data:i?.data},handleCreateNewRecord:()=>{if("form"===i?.editMode?.editMode)W(i.editMode.specs.formRoute);else if("modal"===i?.editMode?.editMode)K(null),ue(!0);else if("row"===i?.editMode?.editMode){go-=1;const e={};e[X]=go,e.isNew=!0;for(const t of E)"actions"!=t?.type&&t?.field!=X&&t?.field&&(e[t.field]=null);J(t=>[e,...t]),H(e=>({...e,[go]:{mode:B.GridRowModes.Edit}}))}},clearGridState:()=>{i?.gridStateKey&&localStorage.removeItem(i.gridStateKey),P({}),x([]),S({}),w([]),j({left:[..."ltr"===g?Mo:[]],right:[..."rtl"===g?Mo:[]]})}}},getRowId:e=>e[X],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?z:void 0,onRowModesModelChange:"row"==i.editMode.editMode?e=>{H(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async t=>{if("row"===i.editMode.editMode){let o=null;const a=(e=>{try{ee.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof y.z.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(t);if(a){const t=a.split(",");throw A.toast.error(e.jsx("div",{style:{},children:t.map(t=>e.jsxs(e.Fragment,{children:[e.jsx("div",{children:t}),e.jsx(n.Divider,{})]}))})),new Error(a)}if(i?.editAction?.preActionValidation&&!i.editAction.preActionValidation(t))throw new Error("error on the configured presave validation");const r={...t};if(t[X]&&so(t[X])&&Number(t[X])<0&&(r[X]=null),o=await i.apiActions.saveRecord(r),null==o)throw new Error("Failed to process your request, contact your administrator");return i?.editAction?.postActionCallBack&&await i.editAction.postActionCallBack(t),!0===t?.isNew&&J(e=>{const i=e.filter(e=>e[X]!==t[X]);return[o,...i]}),!0===i?.editMode?.reloadAfterSave&&i?.apiActions?.reloadData&&i?.apiActions?.reloadData(i?.gridLoadParametersValues),o}},rowSelectionModel:Z,onRowSelectionModelChange:e=>{$(e)},columnVisibilityModel:D,onColumnVisibilityModelChange:e=>{P(e),i?.gridStateKey&&Po(i.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:o}=e;x(e=>{const a=e.length?[...e]:Te.map(e=>e.field),r=a.indexOf(t.field);return-1===r||(a.splice(r,1),a.splice(o,0,t.field),i?.gridStateKey&&Po(i.gridStateKey,{columnOrder:a})),a})},onColumnWidthChange:e=>{const t={...b,[e.colDef.field]:e.width};S(t),i?.gridStateKey&&Po(i.gridStateKey,{columnWidths:t})},rowGroupingModel:U,onRowGroupingModelChange:e=>{(e=>{w(e),i?.gridStateKey&&Po(i.gridStateKey,{columnGroupingModel:e})})(e)},sx:{width:"100%"}})]})},bo=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return t},So=t=>{const[i,o]=l.useState([]);return l.useEffect(()=>{const e=t.reportData.map((e,t)=>({...e,report_record_data_key:t}));o(e)},[t.reportData]),e.jsx(xo,{data:i,disableDefaultAction:!0,setData:t.setReportData,formElements:bo(t.reportData),gridLoadParameters:t.gridLoadParameters,gridLoadParametersValues:t.gridLoadParametersValues,setGridLoadParametersValues:t.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()=>{t.reloadReport()},saveRecord:async()=>{}}})},Uo=t=>{const[i,o]=l.useState(null),[a,r]=l.useState(null),[d,s]=l.useState([]),[p,c]=l.useState("WAITING_REPORT_CODE"),{handleGetRequest:u,handlePostRequest:T,HandleDownloadHTTPPostPDF:A}=Ce(),[_,f]=l.useState(null),[E,O]=l.useState({...t?.reportParametersValues}),[N,y]=l.useState([]),{t:h}=I.useTranslation(),R=e=>{const t=[];for(const i of e){const e={type:"field",mode:"props",props:{fieldLabel:i?.parameterLabel,fieldName:i?.parameterCode,fieldType:i?.parameterType,hidden:i?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:i?.mandatory,defaultValue:E[i?.parameterCode]||i?.defaultValue}};t.push(e)}return t},L=async(e,i)=>{c("WAITING_RESULT"),"Excel"===e?.reportType?await T({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:t.reportCode,parameters:i,resultMode:t.resultMode,jasperOutPutFileType:t.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT"),s(e.data)}}):e?.reportType&&await A({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:t.reportCode,parameters:i,resultMode:t.resultMode,jasperOutPutFileType:t.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT");const t=e.headers["content-disposition"];let i="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(i=e[1])}if(i.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),i=URL.createObjectURL(t);o(i)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(t),a=document.createElement("a");a.href=o,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}},failureCallBkFn:e=>{r("Failed To run report ... contact your administrator"),c("ERROR")}})};return l.useEffect(()=>{t?.reportCode&&(async()=>{c("LOADING_METADATA"),await u({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:t.reportCode},successCallBkFn:e=>{f(e.data),y(R(e.data.reportParameters)),!0===t?.byPassParameterEntry||0==e.data.reportParameters.length?(L(e.data,E),c("WAITING_RESULT")):c("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{r("Failed loading report metadata ... contact your administrator"),c("ERROR")}})})()},[t.reportCode,t.byPassParameterEntry,t.reportParametersValues,t.jasperOutPutFileType,t.resultMode]),e.jsxs(e.Fragment,{children:[e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[e.jsxs(n.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[e.jsx(m.FontAwesomeIcon,{icon:"Excel"===_?.reportType?"file-excel":"file-pdf",color:"Excel"===_?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),_?.reportName]}),"Excel"!=_?.reportType&&"SHOWING_RESULT"===p?e.jsxs(e.Fragment,{children:[!0===t?.byPassParameterEntry?e.jsx(e.Fragment,{}):N.length>0?e.jsx(n.IconButton,{onClick:()=>{y(R(_.reportParameters)),c("WAITING_PARAMETER_INPUT")},children:e.jsx(m.FontAwesomeIcon,{icon:"filter"})}):e.jsx(e.Fragment,{}),e.jsx(n.IconButton,{children:e.jsx(m.FontAwesomeIcon,{icon:"refresh",onClick:()=>{L(_,E)}})})]}):e.jsx(e.Fragment,{})]}),e.jsx(n.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===p&&"Excel"!=_?.reportType?e.jsxs(n.Accordion,{defaultExpanded:!0,sx:{width:"100%"},expanded:!0,children:[e.jsx(n.AccordionSummary,{children:e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),e.jsx(n.Typography,{component:"span",children:"Filters"})]})}),e.jsx(n.AccordionDetails,{children:e.jsx(n.Box,{children:e.jsx(vo,{saveButtonSpecs:{label:h("SHOW_REPORT_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success",hidden:!0},cancelButtonSpecs:{label:h("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{O(null!=e?e:{}),L(_,e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:N})})})]}):"SHOWING_RESULT"===p||("WAITING_PARAMETER_INPUT"===p||"WAITING_RESULT"===p)&&"Excel"===_?.reportType?"Excel"===_?.reportType?e.jsx(So,{reportData:d,setReportData:s,reloadReport:async()=>{L(_,E)},gridLoadParameters:N,gridLoadParametersValues:E,setGridLoadParametersValues:O}):e.jsx("iframe",{src:i,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===p?e.jsxs(n.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),a]}):e.jsx(e.Fragment,{})})]})},wo=i=>{const o=O.useNavigate(),a=t.useSelector(e=>e.AppLayout),{isUserAuthorized:r,UserInfo:d}=De(),{handleGetRequest:s,handlePostRequest:p}=Ce(),[c,u]=l.useState(null),[T,_]=l.useState([]),{t:f}=I.useTranslation(),[E,N]=l.useState(null),[y,h]=l.useState({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:R,setWindowState:L}=Pe({windowTitle:"ltr"===a.appDirection?y?.workflowDocument&&y?.referencedDocument?`${y?.workflowDocument?.documentEnName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:"Document":y?.workflowDocument&&y?.referencedDocument?`${y?.workflowDocument?.documentArName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),C=async()=>{await s({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:i.workFlowDocumentCode,refDocumentId:i.refDocumentId},successCallBkFn:e=>{h(e.data)},failureCallBkFn:()=>{h({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},g=async()=>{await p({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:y?.workflowDocument?.id,refDocumentId:i.refDocumentId,actionId:c.id,refDocumentStatus:y?.workflowDocumentStatus?.documentStatusCode,actionComment:E},successCallBkFn:async e=>{c?.post_action_endpoint?await p({endPointURI:c.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:i.refDocumentId,actionId:c.id},successCallBkFn:()=>{C(),i?.postActionCallBk&&i.postActionCallBk()}}):C()}})};return l.useEffect(()=>{i.refDocumentId&&i.workFlowDocumentCode&&C()},[i.refDocumentId,i.workFlowDocumentCode]),l.useEffect(()=>{_(y?.nextActions&&y?.nextActions?.length>0?y.nextActions.filter(e=>{if(!y?.workflowDocumentStatus?.nextActionTakersAuthority&&!y?.nextActionTakers)return!0;if(y?.workflowDocumentStatus?.nextActionTakersAuthority&&r(y.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(y?.nextActionTakers)for(const e of y.nextActionTakers)if(d?.username===e?.username||d?.username===e?.USERNAME)return!0;return!1}):[])},[y.nextActions,y.nextActionTakers]),e.jsxs(e.Fragment,{children:[y?.workflowDocumentReport?.id?e.jsx(R,{children:e.jsx(Uo,{reportCode:y?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:i.refDocumentId+""}})}):e.jsx(e.Fragment,{}),y?.workflowDocument?e.jsxs(n.Box,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(n.IconButton,{onClick:()=>{o(-1,{replace:!0})},children:e.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),e.jsx(n.Box,{sx:{flex:1}}),e.jsx(m.FontAwesomeIcon,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?`${y?.workflowDocument?.documentEnName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:`${y?.workflowDocument?.documentArName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`,y?.workflowDocumentStatus?"ltr"===a.appDirection?` ( ${y?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${y?.workflowDocumentStatus?.documentStatusArName} )`:"",e.jsx(n.Box,{sx:{flex:1}}),y?.workflowDocumentReport?.id?e.jsx(n.Button,{onClick:()=>{L(!0)},variant:"outlined",startIcon:e.jsx(m.FontAwesomeIcon,{icon:"eye"}),children:f("VIEW_LABEL")}):e.jsx(e.Fragment,{})]}):e.jsx(e.Fragment,{}),e.jsxs(n.Box,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[T?.length>0?e.jsxs(n.Paper,{sx:{padding:2,display:"flex",flex:1,margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[e.jsx(je,{sx:{marginBottom:2,width:400},label:f("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===a.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:c?.id,options:T,onChangeCallBack:(e,t)=>{u(t)}}),e.jsx(we,{sx:{width:400},rows:3,value:E,onChange:e=>{N(e.target.value)},multiline:!0,label:f("WF_COMMENT_LABEL")}),e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(n.Button,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=c&&null!=c?.id?!0!==c.require_comment&&1!==c.require_comment&&"true"!==c.require_comment||null!==E&&""!==E?c?.pre_action_endpoint?await p({endPointURI:c.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:i.refDocumentId,actionId:c.id},successCallBkFn:()=>{g()}}):g():A.toast.error("You must enter comment for the action to be processed"):A.toast.error("You must select action to process")},children:f("WF_TAKE_ACTION_BTN_LABEL")}),i?.cancelActionCallBk?e.jsx(n.Button,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{i?.cancelActionCallBk&&i.cancelActionCallBk()},children:f("WF_CANCEL_BTN_LABEL")}):e.jsx(e.Fragment,{})]}),y?.nextActionTakers&&y.nextActionTakers.length>0?e.jsxs(e.Fragment,{children:[e.jsx(n.Divider,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:e.jsxs(n.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[e.jsx(m.FontAwesomeIcon,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",f("WF_WAITING_FOR_LABEL")]})}),e.jsx(n.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:y.nextActionTakers.map(t=>e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[e.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:t?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),e.jsxs(n.Box,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[e.jsx("div",{children:"ltr"===a.appDirection?t?.employee_en_name:t?.employee_ar_name}),e.jsx("div",{children:t?.email?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),t?.email]}):e.jsx(e.Fragment,{})}),e.jsx("div",{children:t?.mobile_number?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),t?.mobile_number]}):e.jsx(e.Fragment,{})})]})]}))})]}):e.jsx(e.Fragment,{})]}):e.jsx(e.Fragment,{}),y?.actionsHistory.length>0?e.jsx(Oo,{actionHistory:y.actionsHistory}):e.jsxs(n.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[e.jsxs(n.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[e.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),f("WF_ACTION_HISTORY_LABEL")]}),e.jsx(n.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},vo=t=>{const{Window:i,setWindowState:o}=Pe({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:a,setWindowState:r}=Pe({windowTitle:"Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[d,s]=l.useState(!0),{t:p}=I.useTranslation(),c=tt(t.elements),u=[];for(const e of c)e?.hidden&&u.push(e.fieldName);const[T,_]=l.useState(u),f={};for(const e of t.elements)"field"===e?.type&&"props"===e?.mode&&e?.props?.defaultValue&&(f[e.props.fieldName]=e.props.defaultValue);const[y,h]=l.useState([]),R=ce.object(ot(c)),L=E.useForm({resolver:N.zodResolver(R),defaultValues:f}),C=L.watch(),g=O.useParams(),D=t?.formRouteRecordIdParamName,P=async()=>{let e=null;if(t?.recordIdToEdit?e=t.recordIdToEdit:D&&g[D]&&(e=g[D]),e){const i=await t.apiActions.loadRecordById(e);if(i){L.reset({...i}),t?.formLoadCallBk&&t?.formLoadCallBk(M,L,i);for(const e of c)"combobox"===e?.fieldType&&i[e.fieldName]&&L.setValue(e.fieldName,i[e.fieldName]+"")}}else L.reset({})},M={setFieldValue:(e,t)=>{L.setValue(e,t)},hideField:e=>{_(t=>[...t,e])},showField:e=>{_(t=>t.filter(t=>t!==e))},disableField:e=>{h(t=>[...t,e])},enableField:e=>{h(t=>t.filter(t=>t!==e))}};return l.useEffect(()=>{P()},[t?.recordIdToEdit]),l.useEffect(()=>{s(!t?.attachment||!t?.attachment?.enableAttachFn||t.attachment.enableAttachFn(C))},[C]),e.jsxs(e.Fragment,{children:[t?.attachment?e.jsx(i,{children:e.jsx(Eo,{attachmentCode:t.attachment.attachmentCode,refKey:C[t?.keyColumnName||"id"],enableAttachment:d})}):e.jsx(e.Fragment,{}),t?.workFlowDocumentCode?e.jsx(a,{children:e.jsx(wo,{workFlowDocumentCode:t.workFlowDocumentCode,refDocumentId:C[t?.keyColumnName||"id"],postActionCallBk:()=>{r(!1),P()},cancelActionCallBk:()=>{r(!1)}})}):e.jsx(e.Fragment,{}),e.jsx(lo,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:e.jsx(n.Grid2,{sx:{width:"100%"},container:!0,children:t.elements.map((t,i)=>"group"===t.type?e.jsx(_o,{...t.props,formManager:L,formValues:C,formActions:M,hiddenFields:T,disabledFields:y},i):"field"===t.type&&"props"===t.mode?e.jsx(To,{fieldInfo:t.props,formManager:L,formValues:C,formActions:M,hiddenFields:T,disabledFields:y},i):"field"===t.type&&"node"===t.mode?e.jsx(n.Grid2,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:e.jsx(t.node,{formManager:L,formValues:C})},i):void 0)})}),e.jsxs(lo,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[C[t?.keyColumnName||"id"]&&t?.attachment?e.jsx(n.Tooltip,{title:"Attachments",children:e.jsx(n.IconButton,{onClick:()=>{o(!0)},children:e.jsx(m.FontAwesomeIcon,{icon:"paperclip"})})}):null,C[t?.keyColumnName||"id"]&&t?.workFlowDocumentCode?e.jsx(n.Tooltip,{title:"Approvals",children:e.jsx(n.IconButton,{onClick:()=>{r(!0)},children:e.jsx(m.FontAwesomeIcon,{icon:"stamp"})})}):null,t?.actions&&C[t?.keyColumnName||"id"]?t.actions.map(t=>!0===t?.formActionProps?.enabled?e.jsx(Ao,{...t,record:C}):e.jsx(e.Fragment,{})):e.jsx(e.Fragment,{}),e.jsx("div",{style:{flex:1}}),e.jsx(n.Button,{variant:t?.saveButtonSpecs?.actionButtonVariant?t.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:t?.saveButtonSpecs?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.saveButtonSpecs.icon}):null,color:t?.saveButtonSpecs?.actionButtonColor?t.saveButtonSpecs.actionButtonColor:"primary",onClick:L.handleSubmit(e=>{(async e=>{if((!t?.preSaveValidation||t.preSaveValidation(e))&&e){const i=await t.apiActions.saveRecord(e);i&&(L.reset({...i}),t?.formSavedSuccessfullyCallBk&&t.formSavedSuccessfullyCallBk(i),t?.formCloseCallBk&&t.formCloseCallBk())}})(e)},e=>{A.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:p(t?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e.jsx(n.Button,{variant:t?.cancelButtonSpecs?.actionButtonVariant?t.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:t?.cancelButtonSpecs?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.cancelButtonSpecs.icon}):null,color:t?.cancelButtonSpecs?.actionButtonColor?t.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{t?.formCloseCallBk&&t.formCloseCallBk(),L.reset(f)},children:p(t?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Fo=()=>{const{workflowDocumentCode:t,refDocumentId:i}=O.useParams();return e.jsx(wo,{workFlowDocumentCode:t,refDocumentId:i})},Bo=t=>e.jsx(k.BarChart,{dataset:t.data,xAxis:[{dataKey:t.valueField,scaleType:"band",label:t.valueLabel}],series:t.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),ko=t=>e.jsxs(n.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[e.jsx(n.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:e.jsx("div",{children:t.record[t.valueField]})}),e.jsx(n.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]})]}),jo=t=>e.jsxs(e.Fragment,{children:[e.jsx(n.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]}),e.jsx(k.Gauge,{width:200,height:200,value:t.record[t.valueField],valueMax:t.total})]}),Go=t=>e.jsx(k.LineChart,{dataset:t.data,xAxis:[{dataKey:t.valueField,scaleType:"band",label:t.valueLabel}],series:t.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Wo(t){return e.jsxs(G,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(G,{sx:{width:"100%",mr:1},children:e.jsx(j,{variant:"determinate",...t})}),e.jsx(G,{sx:{minWidth:35},children:e.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(t.value)}%`})})]})}const Yo=t=>e.jsxs(G,{sx:{width:"100%"},children:[e.jsx(F,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]}),e.jsx(Wo,{value:t.record[t.valueField]/t.total*100})]}),Vo=t=>{const i=t.data.map((e,i)=>({id:i,value:e[t.valueField],label:e[t.labelField]+""}));return e.jsx(W.PieChart,{series:[{data:i}]})},qo=t=>{const[i,o]=l.useState(!0),[a,r]=l.useState([]),{handleGetRequest:d}=Ce();l.useEffect(()=>{(async()=>{o(!0),await d({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:t.dataQueryId,...t.parameterValues},successCallBkFn:e=>{o(!1),r(e.data)},failureCallBkFn:()=>{o(!1),r(null)}})})()},[t.parameterValues]);let s=0;if(1==a.length&&(s=100),"CircularProgress"===t.widgetType||"LinearProgress"===t.widgetType)for(const e of a)s+=e[t.verticalAxisField];return e.jsxs(e.Fragment,{children:["LineChart"===t.widgetType||"PieChart"===t.widgetType||"ColumnChart"===t.widgetType?e.jsxs(n.Box,{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:t?.icon||"chart-pie"}),t?.title]}):e.jsx(e.Fragment,{}),e.jsx(n.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:i?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),e.jsx("div",{children:"Loading"})]}):"ColumnChart"===t.widgetType?e.jsx(Bo,{data:a,widgetTitle:t.title,labelField:t.verticalAxisField,valueField:t.horizontalAxisField,valueLabel:t.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===t.widgetType?e.jsx(Go,{data:a,widgetTitle:t.title,labelField:t.verticalAxisField,valueField:t.horizontalAxisField,valueLabel:t.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===t.widgetType?e.jsx(Vo,{data:a,widgetTitle:t.title,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,widgetType:"Line"}):e.jsxs(n.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[e.jsx(n.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:t.title}),a.map((i,o)=>"Card"===t.widgetType?e.jsx(n.Grid2,{size:{md:3,xs:12},children:e.jsx(ko,{widgetTitle:"",record:i,labelField:t.verticalAxisField,valueField:t.horizontalAxisField},o)}):"CircularProgress"===t.widgetType?e.jsx(n.Grid2,{size:{md:3,xs:12},children:e.jsx(jo,{widgetTitle:"",record:i,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,total:s},o)}):"LinearProgress"===t.widgetType?e.jsx(n.Grid2,{size:{md:3,xs:12},children:e.jsx(Yo,{widgetTitle:"",record:i,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,total:s},o)}):void 0)]})})]})},Ko=t=>{const[i,o]=l.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),[a,r]=l.useState(t?.parameters||{}),d=O.useNavigate(),{handleGetRequest:s,handlePostRequest:p}=Ce();return l.useEffect(()=>{t.dashboardCode&&(async()=>{await s({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:t.dashboardCode},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o(null)}})})()},[t.dashboardCode,t.parameters]),e.jsx(e.Fragment,{children:i?e.jsxs(e.Fragment,{children:[e.jsxs(n.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(n.IconButton,{onClick:()=>{d(-1,{replace:!0})},children:e.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),e.jsx(n.Box,{sx:{flex:1}}),e.jsx(m.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),e.jsx(n.Box,{children:i?.dashboardTitle}),e.jsx(n.Box,{sx:{flex:1}})]}),e.jsx(n.Grid2,{container:!0,spacing:1,sx:{flexGrow:1,overflowY:"auto",padding:1},children:i?.widgets.map((t,i)=>e.jsx(n.Grid2,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=t.widgetType?"column":void 0,height:t?.height||300},size:{md:t?.width,sm:12},children:e.jsx(qo,{...t})},i))})]}):e.jsx(n.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},zo=()=>{const{dashboardCode:t}=O.useParams();return e.jsx(Ko,{dashboardCode:t})},Ho=i=>{const{UserSession:o}=De(),a=t.useSelector(e=>e.AppLayout),r=t.useDispatch(),{handlePostRequest:d}=Ce(),[s,p]=l.useState(o.value.currentOrganization.id);return e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[e.jsx(je,{sx:{width:"100%"},displayField:"ltr"===a.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:o.value.userOrganizations,value:s,onChangeCallBack:e=>{p(e)}}),e.jsx(n.Button,{sx:{m:1},variant:"contained",disabled:null==s||s===o.value.currentOrganization.id,onClick:async()=>{await d({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:o.value.username,orgId:s},data:{},successCallBkFn:e=>{const t={...e.data,isAuthenticated:!0};r(Re.setAuthenticated(t)),i.successChangeCallBackFn&&i.successChangeCallBackFn()}})},children:"Change Organization"})]})},Qo=T.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Zo,setSideBarState:$o}=Qo.actions;var Xo=Qo.reducer;function Jo(e,t){const i=l.useRef(e);l.useEffect(()=>{i.current=e},[e]),l.useEffect(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const ea=n.keyframes`
31
+ function(e,t){const i=oe(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})($i),d=pe.forwardRef(function(t,d){const l=function(e=eo){return Ji(e)}(o),{className:s,component:p="div",...c}=to(t);return e.jsx(n,{as:p,ref:d,className:ro(s,r?r(a):a),theme:i&&l[i]||l,...c})});return d}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=no[t];return o?`${i}-${o}`:`${oo.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:oo.generate});function so(e){return"number"==typeof e&&!isNaN(e)}function po(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function co(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function uo(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function mo(e,t){const i=new Date(e),o=new Date,a=Math.floor((i-o)/1e3),r="rtl"===t?"ar":"en",n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}),d=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(const{unit:e,seconds:t}of d){const i=Math.floor(a/t);if(Math.abs(i)>1)return n.format(i,e)}return"ar"===r?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(lo.propTypes={children:wt.node,component:wt.elementType,sx:wt.oneOfType([wt.arrayOf(wt.oneOfType([wt.func,wt.object,wt.bool])),wt.func,wt.object])});const To=t=>{if(t?.fieldInfo){const i=t.fieldInfo,o=t?.formManager||null,a=t?.formActions||null,r=t?.formValues||null,d=t?.fieldInfo?.fieldName||null,l=t?.fieldInfo?.fieldType||null;return i&&o&&r&&d&&l?t.hiddenFields.includes(d)?e.jsx(e.Fragment,{}):e.jsx(n.Grid2,{size:i?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?e.jsx(we,{...i.muiTextFieldProps,fullWidth:!0,type:l,disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),label:i?.fieldLabel,value:r[d],onChange:e=>{let t=null;""!=e.target.value&&(t="number"===l&&po(e.target.value)?Number(e.target.value):e.target.value),o.setValue(d,t),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(t,o,a)},sx:{"& .MuiInputBase-root":{height:`${i?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...i?.formProps?.style},error:null!=o.formState.errors[d],helperText:o?.formState?.errors[d]?.message?.toString()}):"date"===i?.fieldType?e.jsx(ze,{format:i?.dateFormat||Ge,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(d,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},value:r[d],error:null!=o.formState.errors[d],errorMessage:o?.formState?.errors[d]?.message?.toString()}):"datetime"===i?.fieldType?e.jsx(He,{format:i?.dateFormat||We,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(d,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),value:r[d],error:null!=o.formState.errors[d],errorMessage:o?.formState?.errors[d]?.message?.toString()}):"checkbox"===i?.fieldType?e.jsx(ke,{label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(d,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),value:r[d],checkedValue:i?.checkedValue||!0,unCheckedValue:i?.unCheckedValue||!1,disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),sx:i?.formProps?.style}):"combobox"===i?.fieldType?e.jsx(je,{sx:i?.formProps?.style||{width:"100%"},label:i?.fieldLabel,disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),onChangeCallBack:(e,t)=>{let r=null;e&&(r=e),o.setValue(d,r),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(r,o,a,t)},options:i?.options||[],displayField:i?.optionDisplayField||"",valueField:i?.optionValueField||"",value:r[d],errorMessage:o?.formState?.errors[d]?.message?.toString()}):"lookup"===i?.fieldType?e.jsx(Qe,{sx:i?.formProps?.style||{width:"100%"},label:i?.fieldLabel,disabled:!(!i?.disabled&&!t.disabledFields.includes(d)),hidden:!(!i?.hidden&&!t.hiddenFields.includes(d)),onChangeCallBack:(e,t)=>{let r=null;e&&(r=e),o.setValue(d,r),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(r,o,a,t)},lookupType:i.lookupType,value:r[d],errorMessage:o?.formState?.errors[d]?.message?.toString()}):null}):e.jsx(e.Fragment,{})}return e.jsx(e.Fragment,{})},Ao=t=>{const i=De(),{ConfirmationWindow:o,setOpen:a}=ge({body:t?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{t?.actionFn(t?.record)}});return null==t?.authority||i.isUserAuthorized(t.authority)?e.jsxs(e.Fragment,{children:[e.jsx(o,{}),e.jsxs(n.Button,{variant:t?.formActionProps?.actionButtonVariant,color:t?.formActionProps?.actionButtonColor,onClick:()=>{if(t?.actionFn){if(t?.preActionValidation&&!t.preActionValidation(t.record))return;!0===t?.isConfirmationRequired?a(!0):t?.actionFn(t.record)}},children:[t?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{marginRight:5,marginLeft:5}}):e.jsx(e.Fragment,{}),e.jsx("div",{children:t?.label})]})]}):e.jsx(e.Fragment,{})},_o=t=>{const{t:i}=I.useTranslation();return e.jsx(e.Fragment,{children:e.jsxs(n.Grid2,{container:!0,sx:t?.style,alignItems:"flex-start",children:[t?.label?e.jsx(n.Grid2,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:t?.icon?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{marginRight:5,marginLeft:5}}),e.jsx("div",{children:i(t.label)})]}):e.jsx(e.Fragment,{children:i(t.label)})}):e.jsx(e.Fragment,{}),t?.elements?t.elements.map(i=>"group"===i.type?e.jsx(_o,{...i.props,formManager:t.formManager,formValues:t.formValues,formActions:t.formActions,hiddenFields:t.hiddenFields,disabledFields:t.disabledFields}):"field"===i.type&&"props"===i.mode?e.jsx(To,{fieldInfo:i.props,formManager:t.formManager,formValues:t.formValues,formActions:t.formActions,hiddenFields:t.hiddenFields,disabledFields:t.disabledFields}):"field"===i.type&&"node"===i.mode?e.jsx(n.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:e.jsx(i.node,{formManager:t.formManager,formValues:t.formValues,formActions:t.formActions})}):void 0):null,t?.actions?e.jsx(n.Grid2,{size:{sm:12},sx:{padding:1},children:t.actions.map(i=>e.jsx(Ao,{...i,record:t.formValues}))}):e.jsx(e.Fragment,{})]})})},fo=i=>{const o=t.useSelector(e=>e.AppInfo.value.apiBaseUrl),[a,r]=l.useState(null);return l.useEffect(()=>{(()=>{let e=o+"/api/v1/attachment/";i?.attachmentId?e+="download?attachmentId="+i.attachmentId:(e+=`downloadImage?attachmentCode=${i.attachmentCode}&refKey=${i.refKey}`,i?.category&&(e+=`&category=${i.category}`)),r(e)})()},[i]),i?.showAsAvatar?e.jsx(n.Avatar,{sx:i.style,onError:()=>{r(i?.onErrorImage?i.onErrorImage:"/no_image.png")},src:a}):e.jsx("img",{src:a,loading:"lazy",alt:"image",onError:()=>{r(i?.onErrorImage?i.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Io=t=>{const{handleGetRequest:i,handleDeleteRequest:o}=Ce(),{isUserAuthorized:a}=De();let r=!0;t?.downloadAuthorityKey&&(r=a(t.downloadAuthorityKey));const{ConfirmationWindow:d,setOpen:l}=ge({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await o({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:t.attachmentCode,refKey:t.refKey,attachmentId:t.id},successCallBkFn:e=>{t.setAttachmentConfig(e.data)},showMask:!0})})()}});return e.jsxs(e.Fragment,{children:[e.jsx(d,{}),e.jsxs(R,{sx:{width:300,border:"0.5px solid gray"},children:[e.jsx(v,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:t?.docType.toLocaleLowerCase().includes("image")?e.jsx(fo,{attachmentId:t.id}):e.jsx(m.FontAwesomeIcon,{icon:"file",size:"3x"})}),e.jsxs(w,{children:[e.jsx(F,{gutterBottom:!0,variant:"h6",component:"div",children:t.fileName}),e.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${t?.attachmentSize||"unknown"} kb`}),e.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${t?.category||"NA"}`}),e.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:t.remark})]}),e.jsxs(U,{children:[t?.allowDelete?e.jsx(n.IconButton,{size:"small",onClick:()=>{l(!0)},children:e.jsx(n.Tooltip,{title:"Delete Attachment",children:e.jsx(m.FontAwesomeIcon,{icon:"trash"})})}):e.jsx(e.Fragment,{}),e.jsx("div",{style:{flex:1}}),r?e.jsx(n.IconButton,{size:"small",onClick:async()=>{await i({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:t.id},showMask:!0,responseType:"blob",successCallBkFn:e=>{const i=window.URL.createObjectURL(new Blob([e.data])),o=document.createElement("a");o.href=i,o.setAttribute("download",t.fileName),document.body.appendChild(o),o.click(),o.remove()}})},children:e.jsx(n.Tooltip,{title:"Download Attachment",children:e.jsx(m.FontAwesomeIcon,{icon:"download"})})}):e.jsx(e.Fragment,{})]})]})]})},Eo=t=>{const{handleUploadRequest:i,handleGetRequest:o}=Ce(),[a,r]=l.useState(null),[d,s]=l.useState([]),[p,c]=l.useState(null),[u,T]=l.useState(null),[_,f]=l.useState([]),[I,E]=l.useState(null),{isUserAuthorized:O}=De(),N=e=>e.split(".").pop()?.toLowerCase()||"";l.useEffect(()=>{(async()=>{await o({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:t.attachmentCode,refKey:t.refKey},successCallBkFn:e=>{E(e.data)}})})()},[t.refKey,t.attachmentCode]),l.useEffect(()=>{if(f(I?.allowedFileTypes?I.allowedFileTypes.split(","):[]),I?.attachmentCategories){const e=[];for(const t of I.attachmentCategories.split(","))e.push({value:t});s(e)}else s([])},[I]);let y=!0;I?.downloadAuthorityKey&&!O(I?.downloadAuthorityKey)&&(y=!1);let h=!0;return!1===t?.enableAttachment&&(h=!1),I?.uploadAuthorityKey&&!O(I.uploadAuthorityKey)&&(h=!1),e.jsxs(n.Paper,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[h?e.jsx(e.Fragment,{children:null==I?.maxAllowedNumberOfFiles||I?.maxAllowedNumberOfFiles>I.refKeyAttachments.length?e.jsxs(e.Fragment,{children:[e.jsxs("h3",{children:[e.jsx(m.FontAwesomeIcon,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),e.jsx("input",{type:"file",style:{margin:20},accept:I?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=N(t.name);if(_.length>0&&!_.includes(e))return void A.toast.error(e+" is not allowed")}r(e.target.files)}}),d.length>0?e.jsx(je,{label:"Attachment Type",sx:{width:300,m:1},options:d,displayField:"value",valueField:"value",value:u,onChangeCallBack:e=>{T(e)}}):e.jsx(e.Fragment,{}),e.jsx(we,{label:"Remark",value:p,onChange:e=>c(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),e.jsx(n.Button,{sx:{m:1},variant:"contained",onClick:async()=>{let e=I?.refKeyAttachments.length||0;if(I?.maxAllowedNumberOfFiles&&a.length+e>I.maxAllowedNumberOfFiles)A.toast.error("Maximum number of attachments is "+I.maxAllowedNumberOfFiles);else if(!0===I?.isCategoryRequired&&d.length>0&&(null==u||void 0===u||""===u))A.toast.error("You must selected document type to process your request");else if(a){for(const e of a)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void A.toast.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await i({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:t.refKey,attachmentCode:t.attachmentCode,remark:p,category:u},files:a,successCallBkFn:e=>{E(e.data),r(null),T(null),c(null),A.toast.success("Your request has been process successfully")}})}else A.toast.error("You must add files to upload")},children:"Upload"})]}):e.jsx(e.Fragment,{})}):e.jsx(e.Fragment,{}),y&&I?.refKeyAttachments?.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("h3",{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),e.jsx(n.Grid2,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:I?.refKeyAttachments.map(i=>e.jsx(n.Grid2,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:e.jsx(Io,{...i,attachmentCode:t.attachmentCode,setAttachmentConfig:E,downloadAuthorityKey:I.downloadAuthorityKey,allowDelete:h})}))})]}):e.jsx(e.Fragment,{})]})},Oo=i=>{const o=t.useSelector(e=>e.AppLayout),{t:a}=I.useTranslation();return e.jsxs(n.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[e.jsxs(n.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[e.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),a("WF_ACTION_HISTORY_LABEL")]}),e.jsx(n.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:i.actionHistory.map((t,a)=>e.jsx(e.Fragment,{children:e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[e.jsxs(n.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[e.jsx(n.Box,{sx:{marginBottom:.2},children:t.actionTime}),e.jsxs(F,{children:["via ",t.actionMethod]})]}),e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[e.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:t?.personId+""||"0",style:{m:1,width:70,height:70}}),a!==i.actionHistory.length-1?e.jsx(n.Box,{sx:{marginTop:11,position:"absolute"},children:"|"}):e.jsx(e.Fragment,{})]}),e.jsxs(n.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[e.jsxs(n.Box,{sx:{width:"100%"},children:["ltr"===o.appDirection?`${t?.documentActionEnName}`:`${t?.documentActionArName}`,t?.actionComment?" - "+t.actionComment:""]}),e.jsx(n.Box,{sx:{width:"100%"},children:"ltr"===o.appDirection?`${t?.employeeEnName}`:`${t?.employeeArName}`})]})]})}))})]})},No=t=>{const{t:i}=I.useTranslation(),o=De(),{ConfirmationWindow:a,setOpen:r}=ge({body:i(t?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(t?.actionFn(t.recordsToProcessActionOn,t.recordIdsToProcessActionOn)),t?.reloadData&&t.reloadData()}});let d=!0;if(t.authority&&(d=o.isUserAuthorized(t.authority)),d)return e.jsxs(e.Fragment,{children:[e.jsx(a,{}),e.jsxs(n.Button,{onClick:async()=>{if(t?.recordsToProcessActionOn&&t?.recordsToProcessActionOn.length>0){if(t?.preActionValidation)for(const e of t.recordsToProcessActionOn)if(!t.preActionValidation(e))return;!0===t?.isConfirmationRequired?r(!0):(await t.actionFn(t.recordsToProcessActionOn,t.recordIdsToProcessActionOn),t?.reloadData&&t.reloadData())}else A.toast.error(i("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:t?.label?"outlined":t?.formActionProps?.actionButtonVariant?t.formActionProps.actionButtonVariant:"text",size:"small",color:t?.formActionProps?.actionButtonColor||"primary",children:[t?.icon?e.jsx(m.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:t.icon}):e.jsx(e.Fragment,{}),t?.label?i(t.label):e.jsx(e.Fragment,{})]})]})},yo=n.styled(B.QuickFilter)({display:"grid",alignItems:"center"}),ho=n.styled(B.ToolbarButton)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])})),Ro=n.styled(n.TextField)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])})),Lo=t=>{const{t:i}=I.useTranslation(),o=De(),a=!t?.templateProps?.editAction?.authority||o.isUserAuthorized(t.templateProps.editAction.authority),r=at(t?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},t?.templateProps?.data||[],t?.templateProps?.keyColumnName||"id");return e.jsxs(B.Toolbar,{children:[a&&"none"!=t?.templateProps?.editMode?.editMode?e.jsxs(n.Button,{onClick:t?.handleCreateNewRecord,children:[e.jsx(m.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),i("ADD_BTN_LABEL")]}):e.jsx(e.Fragment,{}),t?.templateProps?.rowActions?t.templateProps.rowActions.map((e,i)=>!0===e?.gridActionProps?.multiRecord?l.createElement(No,{...e,key:i,reloadData:async()=>{t.templateProps.apiActions.reloadData(t?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:r.selectedRecordIds,recordsToProcessActionOn:r.selectedRecords}):null):e.jsx(e.Fragment,{}),e.jsx(n.Box,{sx:{flex:1,mx:.5},children:t?.templateProps?.tBar}),e.jsx(n.Tooltip,{title:"Columns",children:e.jsx(B.ColumnsPanelTrigger,{render:e.jsx(B.ToolbarButton,{}),children:e.jsx(B.GridViewColumnIcon,{fontSize:"small"})})}),e.jsx(n.Tooltip,{title:"Filters",children:e.jsx(B.FilterPanelTrigger,{render:(t,i)=>e.jsx(B.ToolbarButton,{...t,color:"default",children:e.jsx(n.Badge,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:e.jsx(B.GridFilterListIcon,{fontSize:"small"})})})})}),t?.templateProps?.gridStateKey?e.jsx(n.Tooltip,{title:i("RESET_GRID_STATE"),children:e.jsx(n.IconButton,{onClick:t?.clearGridState,children:e.jsx(m.FontAwesomeIcon,{icon:"eraser"})})}):e.jsx(e.Fragment,{}),e.jsx(n.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),e.jsx(n.Tooltip,{title:i("EXPORT_EXECL_LABEL"),children:e.jsx(B.ExportExcel,{render:e.jsx(n.MenuItem,{}),children:e.jsx(m.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),e.jsxs(yo,{children:[e.jsx(B.QuickFilterTrigger,{render:(t,o)=>e.jsx(n.Tooltip,{title:i("SEARCH_BTN_LABEL"),enterDelay:0,children:e.jsx(ho,{...t,ownerState:{expanded:o.expanded},color:"default","aria-disabled":o.expanded,children:e.jsx(m.FontAwesomeIcon,{icon:"search"})})})}),e.jsx(B.QuickFilterControl,{render:({ref:t,...o},a)=>e.jsx(Ro,{...o,ownerState:{expanded:a.expanded},inputRef:t,"aria-label":"Search",placeholder:`${i("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:e.jsx(n.InputAdornment,{position:"start",children:e.jsx(m.FontAwesomeIcon,{icon:"search"})}),endAdornment:a.value?e.jsx(n.InputAdornment,{position:"end",children:e.jsx(B.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:e.jsx(m.FontAwesomeIcon,{icon:"xmark"})})}):null,...o.slotProps?.input},...o.slotProps}})})]}),e.jsx(n.IconButton,{onClick:()=>{t.templateProps.apiActions.reloadData(t?.templateProps?.gridLoadParametersValues)},children:e.jsx(m.FontAwesomeIcon,{icon:"refresh"})})]})},Co=t=>{const{t:i}=I.useTranslation(),o=De(),{ConfirmationWindow:a,setOpen:r}=ge({body:i(t?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(t?.actionFn(t.record)),t?.reloadData&&t.reloadData()}});let d=!0;t.authority&&(d=o.isUserAuthorized(t.authority));let l={};t?.getActionIconStyleForRecord&&(l=t.getActionIconStyleForRecord(t.record));let s=!0;t?.isActionVisibleForRecord&&(s=t?.isActionVisibleForRecord(t.record));let p=!1;if(t?.isActionDisabledForRecord&&(p=t.isActionDisabledForRecord(t.record)),d&&s)return e.jsxs(e.Fragment,{children:[e.jsx(a,{}),e.jsx(B.GridActionsCellItem,{disabled:p,icon:e.jsx(n.Tooltip,{title:t?.label?i(t.label):"",children:e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{...l,color:p?"gray":null!=l?.color?l.color:void 0}})}),showInMenu:t?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!p){if(t?.preActionValidation&&!t.preActionValidation(t.record))return;!0===t?.isConfirmationRequired?r(!0):(await t.actionFn(t.record),!0===t?.gridActionProps?.reloadGridAfterAction&&t?.reloadData&&t.reloadData())}}})]})};let go=-1;const Do=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Po=(e,t)=>{const i=Do(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},Mo=["__check__","actions"],xo=i=>{const{t:o}=I.useTranslation(),a=t.useSelector(e=>e.AppLayout),[r,d]=l.useState({}),[s,p]=l.useState(!0),{getLookupOptions:c}=(()=>{const{handleGetRequest:e}=Ce(),i=t.useSelector(e=>e.AppLayout),o=async t=>{let i=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let t=await o(e.lookupType);return{...e,options:t,displayField:"ltr"===i.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:o}})(),{Window:u,setWindowState:T}=Pe({windowTitle:o(i.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{i?.apiActions?.reloadData(i.gridLoadParametersValues)}}),{Window:_,setWindowState:f}=Pe({windowTitle:o(i.gridTitle)+" Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"80%",onCloseCallBack:()=>{i?.apiActions?.reloadData(i.gridLoadParametersValues)}}),[E,N]=l.useState([]),h=tt(i.formElements),R=[],L=l.useMemo(()=>i?.gridStateKey?Do(i.gridStateKey):{},[]);for(const e of h)!0===e?.gridProps?.hidden&&R.push(e.fieldName);let C={};if(L?.columnVisibilityModel){C=L.columnVisibilityModel;const e=Object.keys(C);for(const t of R)e.includes(t)||(C[t]=!1)}else for(const e of R)C[e]=!1;const g=t.useSelector(e=>e.AppLayout.appDirection),[D,P]=l.useState(C),[M,x]=l.useState(L.columnOrder||[]),[b,S]=l.useState(L.columnWidths||{}),[U,w]=l.useState(L.columnGroupingModel||[]);let v=L?.pinnedColumns?.left||[];v=v.filter(e=>!Mo.includes(e));let F=L?.pinnedColumns?.right||[]||[];F=F.filter(e=>!Mo.includes(e));const[k,j]=l.useState({left:[..."ltr"===g?Mo:[],...v],right:[..."rtl"===g?Mo:[],...F]}),G=De(),W=O.useNavigate(),[Y,V]=l.useState(null),[q,K]=l.useState(null),[z,H]=l.useState({}),Q=async()=>{let e=it(h,"row"===i?.editMode?.editMode||!1,o);for(let t of e)t?.lookupType&&(t.displayField="ltr"===a.appDirection?"lookupEnDisplay":"lookupArDisplay",t.options=await c(t.lookupType),t.valueField="lookupValue");N(e)},[Z,$]=l.useState({ids:new Set,type:"include"});let X="id";i?.keyColumnName&&(X=i?.keyColumnName);const J=i.setData,ee=y.z.object(ot(h));let te=!0;i?.editAction?.authority&&(te=G.isUserAuthorized(i.editAction.authority));let ie=!0;i?.deleteAction?.authority&&(ie=G.isUserAuthorized(i.deleteAction.authority));const{ConfirmationWindow:oe,setOpen:ae}=ge({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;Y&&!0===Y?.isNew||(e=await i.apiActions.deleteRecordById(Y[X])),e&&(i?.deleteAction?.postActionCallBack&&await i.deleteAction.postActionCallBack(Y),J(e=>e.filter(e=>e[X]!=Y[X])))}});let re,ne,de,le,se,pe;"modal"===i?.editMode?.editMode&&(re=i?.editMode?.specs?.modalHeight||"fit-content",ne=i?.editMode?.specs?.modalWidth||"300",de=i?.editMode?.specs?.modalMinHeight,le=i?.editMode?.specs?.modalMinWidth,se=i?.editMode?.specs?.modalIcon||"window",pe=i?.editMode?.specs?.modalTitle||"Record Form");const{Window:ce,setWindowState:ue}=Pe({height:re,minHeight:de,minWidth:le,onCloseCallBack:()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)},width:ne,windowIcon:se,windowTitle:pe}),me={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:t=>{const a=t.row,r=[];if("none"!=i?.editMode?.editMode&&(void 0===i?.disableDefaultAction||!i.disableDefaultAction)){const t=z[a[X]]?.mode===B.GridRowModes.Edit;if("row"===i.editMode.editMode&&t)te&&(r.push(e.jsx(B.GridActionsCellItem,{icon:e.jsx(m.FontAwesomeIcon,{icon:"save"}),label:o("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const t=e[X];H({...z,[t]:{mode:B.GridRowModes.View}})})(a)}})),r.push(e.jsx(B.GridActionsCellItem,{icon:e.jsx(m.FontAwesomeIcon,{icon:"cancel"}),label:o("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const t=e[X];t&&so(t)&&t<0?(H({...z,[t]:{mode:B.GridRowModes.View,ignoreModifications:!0}}),J(e=>{const i=e.filter(e=>e[X]!=t);return i})):H({...z,[t]:{mode:B.GridRowModes.View,ignoreModifications:!0}})})(a)},color:"inherit"})));else{if(i?.editAction&&!0===i?.editAction?.isEnabled){let t=!0;i?.editAction?.isActionVisibleForRecord&&(t=i?.editAction?.isActionVisibleForRecord(a));let d=!1;i?.editAction?.isActionDisabledForRecord&&(d=i?.editAction?.isActionDisabledForRecord(a)),te&&t&&r.push(e.jsx(B.GridActionsCellItem,{disabled:d,icon:e.jsx(n.Tooltip,{title:o("EDIT_BTN_LABEL"),children:e.jsx(m.FontAwesomeIcon,{icon:"edit",style:{color:d?"gray":void 0}})}),showInMenu:i?.editAction?.gridActionProps?.showInMenu||!1,label:o("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{te&&!d&&(async e=>{if(e)if(K(e),"form"===i.editMode.editMode)W(i.editMode.specs.formRoute+"/"+e[X]);else if("modal"===i.editMode.editMode)ue(!0);else if("row"===i?.editMode?.editMode){const t=e[X];H({...z,[t]:{mode:B.GridRowModes.Edit}})}})(a)}}))}if(i?.deleteAction&&!0===i?.deleteAction?.isEnabled){let t=!0;i?.deleteAction?.isActionVisibleForRecord&&(t=i?.deleteAction?.isActionVisibleForRecord(a));let d=!1;i?.deleteAction?.isActionDisabledForRecord&&(d=i?.deleteAction?.isActionDisabledForRecord(a)),ie&&t&&r.push(e.jsx(B.GridActionsCellItem,{disabled:d,icon:e.jsx(n.Tooltip,{title:o("DELETE_BTN_LABEL"),children:e.jsx(m.FontAwesomeIcon,{icon:"trash",style:{color:d?"gray":void 0}})}),showInMenu:i?.deleteAction?.gridActionProps?.showInMenu||!1,label:o("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(ie&&!d){if(i?.deleteAction?.preActionValidation&&!i.deleteAction.preActionValidation(a))return;V(a),ae(!0)}}}))}}}if(a[i?.keyColumnName||"id"]&&a[i?.keyColumnName||"id"]>0&&i?.attachment&&r?.push(e.jsx(B.GridActionsCellItem,{icon:e.jsx(n.Tooltip,{title:"Attachments",children:e.jsx(m.FontAwesomeIcon,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{d(a),p(!i?.attachment?.enableAttachFn||i.attachment.enableAttachFn(a)),T(!0)}})),a[i?.keyColumnName||"id"]&&a[i?.keyColumnName||"id"]>0&&i?.workFlowDocumentCode&&r?.push(e.jsx(B.GridActionsCellItem,{icon:e.jsx(n.Tooltip,{title:"Approvals",children:e.jsx(m.FontAwesomeIcon,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{d(a),f(!0)}})),a[i?.keyColumnName||"id"]&&a[i?.keyColumnName||"id"]>0&&i?.rowActions)for(const t of i.rowActions)t?.gridActionProps?.multiRecord&&!0===t?.gridActionProps?.multiRecord||r.push(e.jsx(Co,{...t,record:a,reloadData:async()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)}}));return r}};let Te=[];(void 0===i?.disableDefaultAction||!i.disableDefaultAction||i?.rowActions&&i?.rowActions.length>0)&&Te.push(me),Te=[...Te,...E];l.useEffect(()=>{void 0!==i?.autoLoad&&!0!==i.autoLoad||i.apiActions.reloadData(i?.gridLoadParametersValues),Q()},[]),l.useEffect(()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)},[G.UserInfo?.currentOrganization]),l.useEffect(()=>{Q()},[g,i.formElements]);const Ae=l.useMemo(()=>{const e=Te.map(e=>({...e,width:b[e.field]||e.width}));if(M.length){const t=new Map(e.map(e=>[e.field,e]));return M.map(e=>t.get(e)).filter(Boolean)}return e},[M,b,Te]);return e.jsxs(e.Fragment,{children:[e.jsx(oe,{}),"modal"===i?.editMode?.editMode?e.jsx(ce,{children:i?.editMode?.specs?.formComponent?e.jsx(i.editMode.specs.formComponent,{recordIdToEdit:q?q[X]:void 0,formCloseCallBk:()=>{ue(!1),i.apiActions.reloadData(i?.gridLoadParametersValues)}}):e.jsx(vo,{keyColumnName:i.keyColumnName,attachment:i.attachment,formLoadCallBk:i.formLoadCallBk,recordIdToEdit:q?q[X]:void 0,formCloseCallBk:()=>{ue(!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})}):e.jsx(e.Fragment,{}),void 0!==i?.hideInfoBar||i?.hideInfoBar?e.jsx(e.Fragment,{}):e.jsxs(n.Box,{sx:{display:"flex"},children:[void 0!==i?.hideBackButton||i?.hideBackButton?e.jsx(e.Fragment,{}):e.jsx(n.IconButton,{onClick:()=>{W(-1,{replace:!0})},children:e.jsx(m.FontAwesomeIcon,{icon:"ltr"===g?"arrow-left":"arrow-right"})}),e.jsxs(n.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[i?.girdIcon?e.jsx(m.FontAwesomeIcon,{icon:i.girdIcon,style:{marginRight:5,marginLeft:5}}):e.jsx(e.Fragment,{}),e.jsx(n.Typography,{variant:"h5",children:i?.gridTitle?co(o(i?.gridTitle)):""})]})]}),i?.gridLoadParameters&&i?.gridLoadParameters.length>0&&i?.gridLoadParametersValues&&i?.setGridLoadParametersValues?e.jsxs(n.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[e.jsx(n.AccordionSummary,{expandIcon:e.jsx(B.GridExpandMoreIcon,{}),children:e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),e.jsx(n.Typography,{component:"span",children:"Filters"})]})}),e.jsx(n.AccordionDetails,{children:e.jsx(n.Box,{children:e.jsx(vo,{saveButtonSpecs:{label:o("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:o("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})})})]}):e.jsx(e.Fragment,{}),i?.attachment?e.jsx(u,{children:e.jsx(Eo,{attachmentCode:i.attachment.attachmentCode,refKey:r[i?.keyColumnName||"id"],enableAttachment:s})}):e.jsx(e.Fragment,{}),i?.workFlowDocumentCode?e.jsx(_,{children:e.jsx(wo,{workFlowDocumentCode:i.workFlowDocumentCode,refDocumentId:r[i?.keyColumnName||"id"],postActionCallBk:()=>{f(!1),i.apiActions.reloadData(i.gridLoadParametersValues)},cancelActionCallBk:()=>{f(!1),i.apiActions.reloadData(i.gridLoadParametersValues)}})}):e.jsx(e.Fragment,{}),e.jsx(B.DataGridPremium,{...i?.muiProps,slots:{toolbar:Lo},slotProps:{toolbar:{templateProps:{...i,rowSelectionModel:Z,data:i?.data},handleCreateNewRecord:()=>{if("form"===i?.editMode?.editMode)W(i.editMode.specs.formRoute);else if("modal"===i?.editMode?.editMode)K(null),ue(!0);else if("row"===i?.editMode?.editMode){go-=1;const e={};e[X]=go,e.isNew=!0;for(const t of E)"actions"!=t?.type&&t?.field!=X&&t?.field&&(e[t.field]=null);J(t=>[e,...t]),H(e=>({...e,[go]:{mode:B.GridRowModes.Edit}}))}},clearGridState:()=>{i?.gridStateKey&&localStorage.removeItem(i.gridStateKey),P({}),x([]),S({}),w([]),j({left:[..."ltr"===g?Mo:[]],right:[..."rtl"===g?Mo:[]]})}}},getRowId:e=>e[X],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?z:void 0,onRowModesModelChange:"row"==i.editMode.editMode?e=>{H(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async t=>{if("row"===i.editMode.editMode){let o=null;const a=(e=>{try{ee.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof y.z.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(t);if(a){const t=a.split(",");throw A.toast.error(e.jsx("div",{style:{},children:t.map(t=>e.jsxs(e.Fragment,{children:[e.jsx("div",{children:t}),e.jsx(n.Divider,{})]}))})),new Error(a)}if(i?.editAction?.preActionValidation&&!i.editAction.preActionValidation(t))throw new Error("error on the configured presave validation");const r={...t};if(t[X]&&so(t[X])&&Number(t[X])<0&&(r[X]=null),o=await i.apiActions.saveRecord(r),null==o)throw new Error("Failed to process your request, contact your administrator");return i?.editAction?.postActionCallBack&&await i.editAction.postActionCallBack(t),!0===t?.isNew&&J(e=>{const i=e.filter(e=>e[X]!==t[X]);return[o,...i]}),!0===i?.editMode?.reloadAfterSave&&i?.apiActions?.reloadData&&i?.apiActions?.reloadData(i?.gridLoadParametersValues),o}},rowSelectionModel:Z,onRowSelectionModelChange:e=>{$(e)},columnVisibilityModel:D,onColumnVisibilityModelChange:e=>{P(e),i?.gridStateKey&&Po(i.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:o}=e;x(e=>{const a=e.length?[...e]:Te.map(e=>e.field),r=a.indexOf(t.field);return-1===r||(a.splice(r,1),a.splice(o,0,t.field),i?.gridStateKey&&Po(i.gridStateKey,{columnOrder:a})),a})},onColumnWidthChange:e=>{const t={...b,[e.colDef.field]:e.width};S(t),i?.gridStateKey&&Po(i.gridStateKey,{columnWidths:t})},rowGroupingModel:U,onRowGroupingModelChange:e=>{(e=>{w(e),i?.gridStateKey&&Po(i.gridStateKey,{columnGroupingModel:e})})(e)},sx:{width:"100%"}})]})},bo=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return t},So=t=>{const[i,o]=l.useState([]);return l.useEffect(()=>{const e=t.reportData.map((e,t)=>({...e,report_record_data_key:t}));o(e)},[t.reportData]),e.jsx(xo,{data:i,disableDefaultAction:!0,setData:t.setReportData,formElements:bo(t.reportData),gridLoadParameters:t.gridLoadParameters,gridLoadParametersValues:t.gridLoadParametersValues,setGridLoadParametersValues:t.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()=>{t.reloadReport()},saveRecord:async()=>{}}})},Uo=t=>{const[i,o]=l.useState(null),[a,r]=l.useState(null),[d,s]=l.useState([]),[p,c]=l.useState("WAITING_REPORT_CODE"),{handleGetRequest:u,handlePostRequest:T,HandleDownloadHTTPPostPDF:A}=Ce(),[_,f]=l.useState(null),[E,O]=l.useState({...t?.reportParametersValues}),[N,y]=l.useState([]),{t:h}=I.useTranslation(),R=e=>{const t=[];for(const i of e){const e={type:"field",mode:"props",props:{fieldLabel:i?.parameterLabel,fieldName:i?.parameterCode,fieldType:i?.parameterType,hidden:i?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:i?.mandatory,defaultValue:E[i?.parameterCode]||i?.defaultValue}};t.push(e)}return t},L=async(e,i)=>{c("WAITING_RESULT"),"Excel"===e?.reportType?await T({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:t.reportCode,parameters:i,resultMode:t.resultMode,jasperOutPutFileType:t.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT"),s(e.data)}}):e?.reportType&&await A({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:t.reportCode,parameters:i,resultMode:t.resultMode,jasperOutPutFileType:t.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT");const t=e.headers["content-disposition"];let i="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(i=e[1])}if(i.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),i=URL.createObjectURL(t);o(i)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(t),a=document.createElement("a");a.href=o,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}},failureCallBkFn:e=>{r("Failed To run report ... contact your administrator"),c("ERROR")}})};return l.useEffect(()=>{t?.reportCode&&(async()=>{c("LOADING_METADATA"),await u({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:t.reportCode},successCallBkFn:e=>{f(e.data),y(R(e.data.reportParameters)),!0===t?.byPassParameterEntry||0==e.data.reportParameters.length?(L(e.data,E),c("WAITING_RESULT")):c("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{r("Failed loading report metadata ... contact your administrator"),c("ERROR")}})})()},[t.reportCode,t.byPassParameterEntry,t.reportParametersValues,t.jasperOutPutFileType,t.resultMode]),e.jsxs(e.Fragment,{children:[e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[e.jsxs(n.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[e.jsx(m.FontAwesomeIcon,{icon:"Excel"===_?.reportType?"file-excel":"file-pdf",color:"Excel"===_?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),_?.reportName]}),"Excel"!=_?.reportType&&"SHOWING_RESULT"===p?e.jsxs(e.Fragment,{children:[!0===t?.byPassParameterEntry?e.jsx(e.Fragment,{}):N.length>0?e.jsx(n.IconButton,{onClick:()=>{y(R(_.reportParameters)),c("WAITING_PARAMETER_INPUT")},children:e.jsx(m.FontAwesomeIcon,{icon:"filter"})}):e.jsx(e.Fragment,{}),e.jsx(n.IconButton,{children:e.jsx(m.FontAwesomeIcon,{icon:"refresh",onClick:()=>{L(_,E)}})})]}):e.jsx(e.Fragment,{})]}),e.jsx(n.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===p&&"Excel"!=_?.reportType?e.jsxs(n.Accordion,{defaultExpanded:!0,sx:{width:"100%"},expanded:!0,children:[e.jsx(n.AccordionSummary,{children:e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),e.jsx(n.Typography,{component:"span",children:"Filters"})]})}),e.jsx(n.AccordionDetails,{children:e.jsx(n.Box,{children:e.jsx(vo,{saveButtonSpecs:{label:h("SHOW_REPORT_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success",hidden:!0},cancelButtonSpecs:{label:h("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{O(null!=e?e:{}),L(_,e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:N})})})]}):"SHOWING_RESULT"===p||("WAITING_PARAMETER_INPUT"===p||"WAITING_RESULT"===p)&&"Excel"===_?.reportType?"Excel"===_?.reportType?e.jsx(So,{reportData:d,setReportData:s,reloadReport:async()=>{L(_,E)},gridLoadParameters:N,gridLoadParametersValues:E,setGridLoadParametersValues:O}):e.jsx("iframe",{src:i,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===p?e.jsxs(n.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),a]}):e.jsx(e.Fragment,{})})]})},wo=i=>{const o=O.useNavigate(),a=t.useSelector(e=>e.AppLayout),{isUserAuthorized:r,UserInfo:d}=De(),{handleGetRequest:s,handlePostRequest:p}=Ce(),[c,u]=l.useState(null),[T,_]=l.useState([]),{t:f}=I.useTranslation(),[E,N]=l.useState(null),[y,h]=l.useState({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:R,setWindowState:L}=Pe({windowTitle:"ltr"===a.appDirection?y?.workflowDocument&&y?.referencedDocument?`${y?.workflowDocument?.documentEnName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:"Document":y?.workflowDocument&&y?.referencedDocument?`${y?.workflowDocument?.documentArName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),C=async()=>{await s({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:i.workFlowDocumentCode,refDocumentId:i.refDocumentId},successCallBkFn:e=>{h(e.data)},failureCallBkFn:()=>{h({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},g=async()=>{await p({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:y?.workflowDocument?.id,refDocumentId:i.refDocumentId,actionId:c.id,refDocumentStatus:y?.workflowDocumentStatus?.documentStatusCode,actionComment:E},successCallBkFn:async e=>{c?.post_action_endpoint?await p({endPointURI:c.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:i.refDocumentId,actionId:c.id},successCallBkFn:()=>{C(),i?.postActionCallBk&&i.postActionCallBk()}}):C()}})};return l.useEffect(()=>{i.refDocumentId&&i.workFlowDocumentCode&&C()},[i.refDocumentId,i.workFlowDocumentCode]),l.useEffect(()=>{_(y?.nextActions&&y?.nextActions?.length>0?y.nextActions.filter(e=>{if(!y?.workflowDocumentStatus?.nextActionTakersAuthority&&!y?.nextActionTakers)return!0;if(y?.workflowDocumentStatus?.nextActionTakersAuthority&&r(y.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(y?.nextActionTakers)for(const e of y.nextActionTakers)if(d?.username===e?.username||d?.username===e?.USERNAME)return!0;return!1}):[])},[y.nextActions,y.nextActionTakers]),e.jsxs(e.Fragment,{children:[y?.workflowDocumentReport?.id?e.jsx(R,{children:e.jsx(Uo,{reportCode:y?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:i.refDocumentId+""}})}):e.jsx(e.Fragment,{}),y?.workflowDocument?e.jsxs(n.Box,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(n.IconButton,{onClick:()=>{o(-1,{replace:!0})},children:e.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),e.jsx(n.Box,{sx:{flex:1}}),e.jsx(m.FontAwesomeIcon,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?`${y?.workflowDocument?.documentEnName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`:`${y?.workflowDocument?.documentArName} # ${y?.referencedDocument[y?.workflowDocument?.documentNumberField]}`,y?.workflowDocumentStatus?"ltr"===a.appDirection?` ( ${y?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${y?.workflowDocumentStatus?.documentStatusArName} )`:"",e.jsx(n.Box,{sx:{flex:1}}),y?.workflowDocumentReport?.id?e.jsx(n.Button,{onClick:()=>{L(!0)},variant:"outlined",startIcon:e.jsx(m.FontAwesomeIcon,{icon:"eye"}),children:f("VIEW_LABEL")}):e.jsx(e.Fragment,{})]}):e.jsx(e.Fragment,{}),e.jsxs(n.Box,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[T?.length>0?e.jsxs(n.Paper,{sx:{padding:2,display:"flex",flex:1,margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[e.jsx(je,{sx:{marginBottom:2,width:400},label:f("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===a.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:c?.id,options:T,onChangeCallBack:(e,t)=>{u(t)}}),e.jsx(we,{sx:{width:400},rows:3,value:E,onChange:e=>{N(e.target.value)},multiline:!0,label:f("WF_COMMENT_LABEL")}),e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(n.Button,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=c&&null!=c?.id?!0!==c.require_comment&&1!==c.require_comment&&"true"!==c.require_comment||null!==E&&""!==E?c?.pre_action_endpoint?await p({endPointURI:c.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:i.refDocumentId,actionId:c.id},successCallBkFn:()=>{g()}}):g():A.toast.error("You must enter comment for the action to be processed"):A.toast.error("You must select action to process")},children:f("WF_TAKE_ACTION_BTN_LABEL")}),i?.cancelActionCallBk?e.jsx(n.Button,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{i?.cancelActionCallBk&&i.cancelActionCallBk()},children:f("WF_CANCEL_BTN_LABEL")}):e.jsx(e.Fragment,{})]}),y?.nextActionTakers&&y.nextActionTakers.length>0?e.jsxs(e.Fragment,{children:[e.jsx(n.Divider,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:e.jsxs(n.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[e.jsx(m.FontAwesomeIcon,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",f("WF_WAITING_FOR_LABEL")]})}),e.jsx(n.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:y.nextActionTakers.map(t=>e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[e.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:t?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),e.jsxs(n.Box,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[e.jsx("div",{children:"ltr"===a.appDirection?t?.employee_en_name:t?.employee_ar_name}),e.jsx("div",{children:t?.email?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),t?.email]}):e.jsx(e.Fragment,{})}),e.jsx("div",{children:t?.mobile_number?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),t?.mobile_number]}):e.jsx(e.Fragment,{})})]})]}))})]}):e.jsx(e.Fragment,{})]}):e.jsx(e.Fragment,{}),y?.actionsHistory.length>0?e.jsx(Oo,{actionHistory:y.actionsHistory}):e.jsxs(n.Paper,{sx:{display:"flex",flexDirection:"column",flexGrow:1,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[e.jsxs(n.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[e.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),f("WF_ACTION_HISTORY_LABEL")]}),e.jsx(n.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},vo=t=>{const{Window:i,setWindowState:o}=Pe({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),{Window:a,setWindowState:r}=Pe({windowTitle:"Approvals",windowIcon:"stamp",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[d,s]=l.useState(!0),{t:p}=I.useTranslation(),c=tt(t.elements),u=[];for(const e of c)e?.hidden&&u.push(e.fieldName);const[T,_]=l.useState(u),f={};for(const e of t.elements)"field"===e?.type&&"props"===e?.mode&&e?.props?.defaultValue&&(f[e.props.fieldName]=e.props.defaultValue);const[y,h]=l.useState([]),R=ce.object(ot(c)),L=E.useForm({resolver:N.zodResolver(R),defaultValues:f}),C=L.watch(),g=O.useParams(),D=t?.formRouteRecordIdParamName,P=async()=>{let e=null;if(t?.recordIdToEdit?e=t.recordIdToEdit:D&&g[D]&&(e=g[D]),e){const i=await t.apiActions.loadRecordById(e);if(i){L.reset({...i}),t?.formLoadCallBk&&t?.formLoadCallBk(M,L,i);for(const e of c)"combobox"===e?.fieldType&&i[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?L.setValue(e.fieldName,i[e.fieldName]+""):L.setValue(e.fieldName,i[e.fieldName]))}}else L.reset({})},M={setFieldValue:(e,t)=>{L.setValue(e,t)},hideField:e=>{_(t=>[...t,e])},showField:e=>{_(t=>t.filter(t=>t!==e))},disableField:e=>{h(t=>[...t,e])},enableField:e=>{h(t=>t.filter(t=>t!==e))}};return l.useEffect(()=>{P()},[t?.recordIdToEdit]),l.useEffect(()=>{s(!t?.attachment||!t?.attachment?.enableAttachFn||t.attachment.enableAttachFn(C))},[C]),e.jsxs(e.Fragment,{children:[t?.attachment?e.jsx(i,{children:e.jsx(Eo,{attachmentCode:t.attachment.attachmentCode,refKey:C[t?.keyColumnName||"id"],enableAttachment:d})}):e.jsx(e.Fragment,{}),t?.workFlowDocumentCode?e.jsx(a,{children:e.jsx(wo,{workFlowDocumentCode:t.workFlowDocumentCode,refDocumentId:C[t?.keyColumnName||"id"],postActionCallBk:()=>{r(!1),P()},cancelActionCallBk:()=>{r(!1)}})}):e.jsx(e.Fragment,{}),e.jsx(lo,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:e.jsx(n.Grid2,{sx:{width:"100%"},container:!0,children:t.elements.map((t,i)=>"group"===t.type?e.jsx(_o,{...t.props,formManager:L,formValues:C,formActions:M,hiddenFields:T,disabledFields:y},i):"field"===t.type&&"props"===t.mode?e.jsx(To,{fieldInfo:t.props,formManager:L,formValues:C,formActions:M,hiddenFields:T,disabledFields:y},i):"field"===t.type&&"node"===t.mode?e.jsx(n.Grid2,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:e.jsx(t.node,{formManager:L,formValues:C})},i):void 0)})}),e.jsxs(lo,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[C[t?.keyColumnName||"id"]&&t?.attachment?e.jsx(n.Tooltip,{title:"Attachments",children:e.jsx(n.IconButton,{onClick:()=>{o(!0)},children:e.jsx(m.FontAwesomeIcon,{icon:"paperclip"})})}):null,C[t?.keyColumnName||"id"]&&t?.workFlowDocumentCode?e.jsx(n.Tooltip,{title:"Approvals",children:e.jsx(n.IconButton,{onClick:()=>{r(!0)},children:e.jsx(m.FontAwesomeIcon,{icon:"stamp"})})}):null,t?.actions&&C[t?.keyColumnName||"id"]?t.actions.map(t=>!0===t?.formActionProps?.enabled?e.jsx(Ao,{...t,record:C}):e.jsx(e.Fragment,{})):e.jsx(e.Fragment,{}),e.jsx("div",{style:{flex:1}}),e.jsx(n.Button,{variant:t?.saveButtonSpecs?.actionButtonVariant?t.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:t?.saveButtonSpecs?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.saveButtonSpecs.icon}):null,color:t?.saveButtonSpecs?.actionButtonColor?t.saveButtonSpecs.actionButtonColor:"primary",onClick:L.handleSubmit(e=>{(async e=>{if((!t?.preSaveValidation||t.preSaveValidation(e))&&e){const i=await t.apiActions.saveRecord(e);i&&(L.reset({...i}),t?.formSavedSuccessfullyCallBk&&t.formSavedSuccessfullyCallBk(i),t?.formCloseCallBk&&t.formCloseCallBk())}})(e)},e=>{A.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:p(t?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e.jsx(n.Button,{variant:t?.cancelButtonSpecs?.actionButtonVariant?t.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:t?.cancelButtonSpecs?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.cancelButtonSpecs.icon}):null,color:t?.cancelButtonSpecs?.actionButtonColor?t.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{t?.formCloseCallBk&&t.formCloseCallBk(),L.reset(f)},children:p(t?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Fo=()=>{const{workflowDocumentCode:t,refDocumentId:i}=O.useParams();return e.jsx(wo,{workFlowDocumentCode:t,refDocumentId:i})},Bo=t=>e.jsx(k.BarChart,{dataset:t.data,xAxis:[{dataKey:t.valueField,scaleType:"band",label:t.valueLabel}],series:t.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),ko=t=>e.jsxs(n.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[e.jsx(n.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:e.jsx("div",{children:t.record[t.valueField]})}),e.jsx(n.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]})]}),jo=t=>e.jsxs(e.Fragment,{children:[e.jsx(n.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]}),e.jsx(k.Gauge,{width:200,height:200,value:t.record[t.valueField],valueMax:t.total})]}),Go=t=>e.jsx(k.LineChart,{dataset:t.data,xAxis:[{dataKey:t.valueField,scaleType:"band",label:t.valueLabel}],series:t.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Wo(t){return e.jsxs(G,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(G,{sx:{width:"100%",mr:1},children:e.jsx(j,{variant:"determinate",...t})}),e.jsx(G,{sx:{minWidth:35},children:e.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(t.value)}%`})})]})}const Yo=t=>e.jsxs(G,{sx:{width:"100%"},children:[e.jsx(F,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]}),e.jsx(Wo,{value:t.record[t.valueField]/t.total*100})]}),Vo=t=>{const i=t.data.map((e,i)=>({id:i,value:e[t.valueField],label:e[t.labelField]+""}));return e.jsx(W.PieChart,{series:[{data:i}]})},qo=t=>{const[i,o]=l.useState(!0),[a,r]=l.useState([]),{handleGetRequest:d}=Ce();l.useEffect(()=>{(async()=>{o(!0),await d({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:t.dataQueryId,...t.parameterValues},successCallBkFn:e=>{o(!1),r(e.data)},failureCallBkFn:()=>{o(!1),r(null)}})})()},[t.parameterValues]);let s=0;if(1==a.length&&(s=100),"CircularProgress"===t.widgetType||"LinearProgress"===t.widgetType)for(const e of a)s+=e[t.verticalAxisField];return e.jsxs(e.Fragment,{children:["LineChart"===t.widgetType||"PieChart"===t.widgetType||"ColumnChart"===t.widgetType?e.jsxs(n.Box,{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:t?.icon||"chart-pie"}),t?.title]}):e.jsx(e.Fragment,{}),e.jsx(n.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:i?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),e.jsx("div",{children:"Loading"})]}):"ColumnChart"===t.widgetType?e.jsx(Bo,{data:a,widgetTitle:t.title,labelField:t.verticalAxisField,valueField:t.horizontalAxisField,valueLabel:t.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===t.widgetType?e.jsx(Go,{data:a,widgetTitle:t.title,labelField:t.verticalAxisField,valueField:t.horizontalAxisField,valueLabel:t.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===t.widgetType?e.jsx(Vo,{data:a,widgetTitle:t.title,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,widgetType:"Line"}):e.jsxs(n.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[e.jsx(n.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:t.title}),a.map((i,o)=>"Card"===t.widgetType?e.jsx(n.Grid2,{size:{md:3,xs:12},children:e.jsx(ko,{widgetTitle:"",record:i,labelField:t.verticalAxisField,valueField:t.horizontalAxisField},o)}):"CircularProgress"===t.widgetType?e.jsx(n.Grid2,{size:{md:3,xs:12},children:e.jsx(jo,{widgetTitle:"",record:i,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,total:s},o)}):"LinearProgress"===t.widgetType?e.jsx(n.Grid2,{size:{md:3,xs:12},children:e.jsx(Yo,{widgetTitle:"",record:i,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,total:s},o)}):void 0)]})})]})},Ko=t=>{const[i,o]=l.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),[a,r]=l.useState(t?.parameters||{}),d=O.useNavigate(),{handleGetRequest:s,handlePostRequest:p}=Ce();return l.useEffect(()=>{t.dashboardCode&&(async()=>{await s({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:t.dashboardCode},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o(null)}})})()},[t.dashboardCode,t.parameters]),e.jsx(e.Fragment,{children:i?e.jsxs(e.Fragment,{children:[e.jsxs(n.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(n.IconButton,{onClick:()=>{d(-1,{replace:!0})},children:e.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),e.jsx(n.Box,{sx:{flex:1}}),e.jsx(m.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),e.jsx(n.Box,{children:i?.dashboardTitle}),e.jsx(n.Box,{sx:{flex:1}})]}),e.jsx(n.Grid2,{container:!0,spacing:1,sx:{flexGrow:1,overflowY:"auto",padding:1},children:i?.widgets.map((t,i)=>e.jsx(n.Grid2,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=t.widgetType?"column":void 0,height:t?.height||300},size:{md:t?.width,sm:12},children:e.jsx(qo,{...t})},i))})]}):e.jsx(n.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},zo=()=>{const{dashboardCode:t}=O.useParams();return e.jsx(Ko,{dashboardCode:t})},Ho=i=>{const{UserSession:o}=De(),a=t.useSelector(e=>e.AppLayout),r=t.useDispatch(),{handlePostRequest:d}=Ce(),[s,p]=l.useState(o.value.currentOrganization.id);return e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[e.jsx(je,{sx:{width:"100%"},displayField:"ltr"===a.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:o.value.userOrganizations,value:s,onChangeCallBack:e=>{p(e)}}),e.jsx(n.Button,{sx:{m:1},variant:"contained",disabled:null==s||s===o.value.currentOrganization.id,onClick:async()=>{await d({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:o.value.username,orgId:s},data:{},successCallBkFn:e=>{const t={...e.data,isAuthenticated:!0};r(Re.setAuthenticated(t)),i.successChangeCallBackFn&&i.successChangeCallBackFn()}})},children:"Change Organization"})]})},Qo=T.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Zo,setSideBarState:$o}=Qo.actions;var Xo=Qo.reducer;function Jo(e,t){const i=l.useRef(e);l.useEffect(()=>{i.current=e},[e]),l.useEffect(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const ea=n.keyframes`
32
32
  0% { transform: scale(1); opacity: 1; }
33
33
  25% { transform: scale(1); opacity: 0.6; }
34
34
  50% { transform: scale(1); opacity: 1; }
35
35
  75% { transform: scale(1); opacity: 0.6; }
36
36
  100% { transform: scale(1); opacity: 1; }
37
- `,ta=i=>{const o=O.useNavigate(),a=t.useSelector(e=>e.AppLayout),{handlePostRequest:r}=Ce();return e.jsxs(e.Fragment,{children:[e.jsxs(n.Button,{fullWidth:!0,onClick:()=>{var e;"NAVIGATION"===i?.notificationAction&&i?.notificationActionPayload&&o(i.notificationActionPayload),i?.isNotified||(e=i.id,r({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:e}})),i?.setOpen&&i.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:i?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[e.jsxs(n.Box,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[i?.notificationIcon?e.jsx(m.FontAwesomeIcon,{icon:i.notificationIcon,style:{marginRight:10,marginLeft:10,color:i?.notificationIconColor}}):e.jsx(e.Fragment,{}),"ltr"===a.appDirection?i.notificationEnText:i.notificationArText,e.jsx(n.Box,{sx:{flex:1}}),i?.isNotified?e.jsx(e.Fragment,{}):e.jsxs(n.Typography,{color:"warning",sx:{animation:`${ea} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[e.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===a.appDirection?"New":"جديد"]})]}),e.jsxs(n.Box,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[e.jsx(n.Box,{sx:{marginRight:1,marginLeft:1},children:mo(i.createTime,a.appDirection)}),e.jsx(n.Box,{sx:{flex:1}}),e.jsx(n.Box,{sx:{marginRight:1,marginLeft:1},children:i.createTime})]})]}),i?.showDivider?e.jsx(n.Divider,{flexItem:!0}):e.jsx(e.Fragment,{})]})},ia=()=>{const{UserInfo:i}=De(),[o,a]=l.useState(null),{handleGetRequest:r,handlePostRequest:d}=Ce(),s=O.useNavigate(),p=t.useSelector(e=>e.AppLayout),[c,u]=l.useState(!1),[T,_]=l.useState([]);Jo(()=>{!0===i.isAuthenticated&&r({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>T.length&&A.toast.info("ltr"===p.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===p.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),_(e.data)}})},1e3);return e.jsx(n.ClickAwayListener,{onClickAway:()=>{u(!1)},children:e.jsxs("div",{style:{cursor:"pointer"},children:[e.jsx(n.IconButton,{color:"inherit",onClick:e=>{a(e.currentTarget),u(!c)},sx:{marginRight:1,marginLeft:1},children:e.jsx(n.Badge,{anchorOrigin:{vertical:"top",horizontal:"ltr"===p.appDirection?"right":"left"},badgeContent:T.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:e.jsx(m.FontAwesomeIcon,{icon:"bell"})})}),e.jsx(n.Popper,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:c,anchorEl:o,dir:p.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:t})=>e.jsx(n.Fade,{...t,timeout:350,children:e.jsxs(n.Paper,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[e.jsx(n.Divider,{variant:"fullWidth",flexItem:!0,children:e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[e.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===p.appDirection?"Notifications":"الاشعارات"]})}),0==T.length?e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:e.jsx(n.Box,{children:"ltr"===p.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):e.jsx(e.Fragment,{}),e.jsx(n.Box,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:T.map((t,i)=>e.jsx(ta,{...t,setOpen:u,showDivider:i<T.length-1}))}),e.jsx(n.Divider,{variant:"fullWidth",flexItem:!0,children:e.jsx(n.Button,{sx:{textTransform:"none"},onClick:()=>{s("myNotifications")},children:"ltr"===p.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},oa=t=>{const[i,o]=l.useState(""),[a,r]=l.useState(""),[d,s]=l.useState(""),{handlePostRequest:p}=Ce();return e.jsxs(n.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[e.jsxs(n.Box,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",t?.selectedPerson?.employeeEnName]}),e.jsx(n.Divider,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),t.isSelfService?e.jsx(we,{label:"Current Password",value:i,onChange:e=>{o(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):e.jsx(e.Fragment,{}),e.jsx(we,{label:"New Password",value:a,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),e.jsx(we,{label:"Confirm New Password",value:d,onChange:e=>{s(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),e.jsx(n.Button,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!t.isSelfService||null!==i&&""!==i.trim()?null!==a&&""!==a&&null!==d&&""!==d&&a==d?await p({endPointURI:t.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:t?.selectedPerson?.id,currentPassword:i,newPassword:a},successCallBkFn:()=>{t.onSuccessCallBk(),A.toast.success("Your request has been processed successfully")},showMask:!0}):A.toast.error("You must enter new password in required fields and must be identical"):A.toast.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},aa=n.styled(c,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const i=t.useSelector(e=>e.AppLayout),o=ue();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:o?void 0:"calc(100% - 350px)",marginLeft:o||"ltr"!==i.appDirection?void 0:"350px",marginRight:o||"rtl"!==i.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),ra=()=>{const{Window:i,setWindowState:o}=Pe({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),a=t.useSelector(e=>e.AppInfo.value),[r,d]=l.useState(null),s=()=>{d(null)},p=e=>{d(e.currentTarget)},c=t.useSelector(e=>e.AppLayout),T=t.useSelector(e=>e.SideBar),{UserSession:A}=De(),_=A.value.currentOrganization,{Window:I,setWindowState:E}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:O}=Ce(),N=ue(),y=t.useDispatch();return e.jsxs(e.Fragment,{children:[e.jsx(I,{children:e.jsx(oa,{selectedPerson:A.value,isSelfService:!0,onSuccessCallBk:()=>{E(!1)}})}),e.jsx(n.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:r,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(r),onClose:s,children:e.jsx(n.MenuItem,{onClick:()=>{E(!0),s()},children:e.jsx(n.Typography,{sx:{textAlign:"center"},children:"Change Password"})})}),e.jsx(i,{children:e.jsx(Ho,{successChangeCallBackFn:()=>{o(!1)}})}),e.jsx(aa,{position:"fixed",open:T.isOpened,children:e.jsxs(u,{children:[e.jsx(n.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{y(Zo())},edge:"start",sx:[{mr:"ltr"===c.appDirection?2:void 0,ml:"rtl"===c.appDirection?2:void 0},T.isOpened&&{display:"none"}],children:e.jsx(m.FontAwesomeIcon,{icon:"bars"})}),e.jsx(fo,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:A.value.currentOrganization.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),e.jsx(n.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:N?"":`${a.appName} - ${"ltr"===c.appDirection?_?.organizationEnName:_?.organizationArName}`}),e.jsx(n.Tooltip,{title:"light"===c.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:e.jsx(n.IconButton,{color:"inherit",onClick:()=>{y(_e.setThemeMode("light"===c.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===c.themeMode?"dark":"light")},children:"light"===c.themeMode?e.jsx(m.FontAwesomeIcon,{icon:"moon"}):e.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),e.jsx(n.Tooltip,{title:"ar"===f.language?"Change Language To English":"Change Language To Arabic",children:e.jsx(n.IconButton,{color:"inherit",onClick:()=>{let e="ar"===f.language?"en":"ar";var t;t=e,f.changeLanguage(t),localStorage.setItem("language",t),y(_e.setAppDirection("ar"===e?"rtl":"ltr"))},children:e.jsx(m.FontAwesomeIcon,{icon:"language"})})}),A.value?.userOrganizations&&A.value?.userOrganizations.length>1?e.jsx(n.Tooltip,{title:"Change Current Organization",children:e.jsx(n.IconButton,{color:"inherit",onClick:()=>{o(!0)},children:e.jsx(m.FontAwesomeIcon,{icon:"globe"})})}):e.jsx(e.Fragment,{}),!0===a?.enableUINotifications?e.jsx(ia,{}):e.jsx(e.Fragment,{}),e.jsx("div",{onClick:p,style:{cursor:"pointer"},children:e.jsx(fo,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:A.value?.id+""})}),e.jsx("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:p,children:N?"":A.value?.username}),e.jsx(n.IconButton,{color:"inherit",onClick:async()=>{try{await O({endPointURI:"api/auth/logout"})}catch(e){}y(Re.setUnAuthenticated())},children:e.jsx(m.FontAwesomeIcon,{rotation:"rtl"===c.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},na=n.styled("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),da=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=da(e,i.children);if(t)return t}}},la=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"system_admin.Person",label:"PERSON_PLURAL",authority:"SYSTEM_ADMIN",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools.rolesx",label:"ROLES",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"development_admin.organizations",label:"ORGANIZATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.organization",label:"Organization Info",authority:"DEVELOPMENT_ADMIN",icon:"globe",children:[{id:"development_admin.organization.modules",label:"Subscriped Modules",icon:"layer-group",authority:"ORGANIZATION_ADMIN",action:"NAVIGATION",actionPayload:{path:"admin/org/apps"}},{id:"development_admin.organization.unitTypes",label:"Organization Unit Types",icon:"tags",action:"NAVIGATION",actionPayload:{path:"admin/org/unit/types"}},{id:"development_admin.organization.units",label:"Organization Units",icon:"folder-tree",action:"NAVIGATION",actionPayload:{path:"admin/org/units"}},{id:"development_admin.organization.ranks",label:"Organization Ranks",icon:"street-view",action:"NAVIGATION",actionPayload:{path:"admin/org/ranks"}}]},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",authority:"DEVELOPMENT_ADMIN",icon:"code",children:[{id:"system_admin.devtools.modules",label:"System Modules",icon:"layer-group",action:"NAVIGATION",actionPayload:{path:"dev/system/modules"}},{id:"system_admin.devtools.authorities",label:"System Authorities",icon:"key",action:"NAVIGATION",actionPayload:{path:"dev/system/authorities"}},{id:"system_admin.devtools.roles",label:"System Roles",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"system_admin.devtools.lookups",label:"System Lookups",icon:"list-check",action:"NAVIGATION",actionPayload:{path:"dev/system/lookups"}},{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.AttachmentConfig",label:"ATTACHMENT_CONFIG_PLURAL",icon:"paperclip",action:"NAVIGATION",actionPayload:{path:"dev/attachmentconfigs"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",authority:"DEVELOPMENT_ADMIN",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}]];function sa(){return e.jsx(G,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const pa=s.styled(Z.TreeItem2Root)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${H.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),ca=s.styled(Z.TreeItem2Content)(({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:s.alpha(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}})),ua=q.animated(K);function ma(t){const i=q.useSpring({to:{opacity:t.in?1:0,transform:`translate3d(0,${t.in?0:20}px,0)`}});return e.jsx(ua,{style:i,...t})}const Ta=s.styled(F)({color:"inherit",fontWeight:500});function Aa({icon:i,expandable:o,children:a,...r}){const{t:n}=I.useTranslation(),d=t.useSelector(e=>e.AppLayout);return e.jsxs(Z.TreeItem2Label,{...r,sx:{display:"flex",alignItems:"center",padding:1},children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:"ltr"===d.appDirection?7:void 0,marginLeft:"rtl"===d.appDirection?7:void 0,fontSize:"1.2rem"},icon:i}),e.jsx(Ta,{variant:"body2",sx:{fontSize:16},children:n(a)}),o&&e.jsx(sa,{})]})}const _a=e=>Array.isArray(e)?e.length>0&&e.some(_a):Boolean(e),fa=pe.forwardRef(function(t,i){const{id:o,itemId:a,label:r,disabled:n,children:d,...l}=t,{getRootProps:s,getContentProps:p,getIconContainerProps:c,getCheckboxProps:u,getLabelProps:m,getGroupTransitionProps:T,getDragAndDropOverlayProps:A,status:_,publicAPI:f}=Q.useTreeItem2({id:o,itemId:a,children:d,label:r,disabled:n,rootRef:i}),I=f.getItem(a),E=_a(d);return e.jsx(X.TreeItem2Provider,{itemId:a,children:e.jsxs(pa,{...s(l),children:[e.jsxs(ca,{...p({className:ro("content",{"Mui-expanded":_.expanded,"Mui-selected":_.selected,"Mui-focused":_.focused,"Mui-disabled":_.disabled})}),children:[e.jsx(Z.TreeItem2IconContainer,{...c(),children:e.jsx($.TreeItem2Icon,{status:_})}),e.jsx(Z.TreeItem2Checkbox,{...u()}),e.jsx(Aa,{...m({icon:I?.icon||"book",expandable:E&&_.expanded})}),e.jsx(J.TreeItem2DragAndDropOverlay,{...A()})]}),d&&e.jsx(ma,{...T()})]})})});function Ia(){const i=O.useNavigate(),o=t.useSelector(e=>e.AppLayout),a=t.useSelector(e=>e.AppInfo.value);t.useDispatch();const r=ue(),{isUserAuthorized:n,isCurrentOrganizationAuthorizedToModule:d}=De(),l=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||n(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||d(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=l(i.children)),t.push(e)}return t},s=[];a.enableAdministrationModule&&s.push(...structuredClone(la)),s.push(...structuredClone(a.businessNavigationItems));const p=l(s);return e.jsx(z.RichTreeView,{items:p,onItemClick:(e,t)=>{const o=da(t,s);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||i(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:me,direction:o.appDirection,maxHeight:r?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:fa}})}const Ea=()=>{const i=t.useSelector(e=>e.AppInfo.value),{UserSession:o}=De(),a=o.value.currentOrganization,r=n.useTheme(),d=t.useSelector(e=>e.AppLayout),l=t.useSelector(e=>e.SideBar),s=t.useDispatch();return e.jsxs(V,{sx:{width:me,flexShrink:0,"& .MuiDrawer-paper":{width:me,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===d.appDirection?"left":"right",open:l.isOpened,children:[e.jsxs(na,{children:[e.jsxs(n.Box,{sx:{width:"100%"},children:[e.jsx(n.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[e.jsx(n.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${i.appName} - ${"ltr"===d.appDirection?a?.organizationEnName:a?.organizationArName}`}),e.jsxs(n.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",i.appVersion]})]})]}),e.jsx(Y,{onClick:()=>{s(Zo())},children:"ltr"===r.direction?e.jsx(m.FontAwesomeIcon,{icon:"angle-left"}):e.jsx(m.FontAwesomeIcon,{icon:"angle-right"})})]}),e.jsx(M,{}),e.jsx(Ia,{})]})},Oa=ie({key:"muirtl",stylisPlugins:[te.prefixer,ee]}),Na=ie({key:"mui"}),ya=t=>{const[i,o]=l.useState([]),[a,r]=l.useState([]),{handlePostRequest:d,handleGetRequest:s}=Ce();l.useEffect(()=>{t.selectedRecord&&(async()=>{await s({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:t.selectedRecord.id,organizationId:t.selectedRecord.organizationId},successCallBkFn:e=>{o(e.data.currentRoles),r(e.data.availableRoles)}})})()},[t.selectedRecord]);return e.jsxs(e.Fragment,{children:[e.jsx(Be,{displayField:"roleName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[e.jsx(n.Button,{variant:"contained",onClick:async()=>{await d({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:t.selectedRecord.id},data:i,successCallBkFn:()=>{A.toast.success("Your request has been proccesed successfully"),t.closeModalFn&&t.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),e.jsx(n.Button,{variant:"contained",color:"error",onClick:t.closeModalFn,children:"Cancel"})]})]})},ha=i=>{const[o,a]=l.useState(null),{Window:r,setWindowState:n}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),d=t.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),s=t.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks.data),p=t.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:c}=I.useTranslation(),[u,m]=l.useState([]),T=Ue({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:m}),A=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:p,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}];return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(ya,{selectedRecord:o,closeModalFn:()=>{n(!1)}})}),e.jsx(xo,{apiActions:T,hideInfoBar:!0,data:u,setData:m,editMode:{editMode:"row"},formElements:A,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{a(e),n(!0)}}],gridLoadParametersValues:{personId:i.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async e=>(e.personId=i.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Ra=()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),r=Ue({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:a}),{handleGetRequest:n}=Ce(),d=t.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks),s=t.useDispatch();return e.jsx(xo,{apiActions:r,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",postActionCallBack:()=>{(async()=>{await n({endPointURI:d.url,showMask:!1,successCallBkFn:e=>{s(xe({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{s(xe({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},La=()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),{handleGetRequest:r}=Ce(),n=t.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits),d=t.useDispatch(),s=Ue({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:a}),p=[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:t.useSelector(e=>e.commonStores.stores.SystemOrganizationUnitType.data),optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:s,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row"},formElements:p,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await r({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{d(xe({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{d(xe({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},Ca=()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:o});return e.jsx(xo,{apiActions:a,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},ga=()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),r=Ue({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:a}),n=t.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:d}=Ce(),s=[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:r,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},Da=()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:o});return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},Pa=t=>{const[i,o]=l.useState([]),[a,r]=l.useState([]),{handlePostRequest:d,handleGetRequest:s}=Ce();l.useEffect(()=>{t.roleId&&(async()=>{await s({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:t.roleId},successCallBkFn:e=>{o(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()},[t.roleId]);return e.jsxs(e.Fragment,{children:[e.jsx(Be,{displayField:"authorityName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[e.jsx(n.Button,{variant:"contained",onClick:async()=>{await d({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:t.roleId},data:i,successCallBkFn:()=>{A.toast.success("Your request has been proccesed successfully"),t.closeModalFn&&t.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),e.jsx(n.Button,{variant:"contained",color:"error",onClick:t.closeModalFn,children:"Cancel"})]})]})},Ma=()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),[a,r]=l.useState(null),{Window:n,setWindowState:d}=Pe({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),s=Ue({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:o});return e.jsxs(e.Fragment,{children:[e.jsx(n,{children:e.jsx(Pa,{roleId:a?.id,closeModalFn:()=>{d(!1)}})}),e.jsx(xo,{apiActions:s,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{r(e),d(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},xa=i=>{const o=t.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),{t:a}=I.useTranslation(),[r,n]=l.useState([]),d=Ue({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:d,data:r,setData:n,editMode:{editMode:"row"},hideInfoBar:!0,formElements:s,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:i.selectedRecord.id},gridTitle:a("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async e=>(e.dataQueryId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},ba=()=>{const i=t.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),{t:o}=I.useTranslation(),[a,r]=l.useState([]),n=Ue({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:i,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return e.jsx(xo,{apiActions:n,data:a,setData:r,hideInfoBar:!0,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:o("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},Sa=i=>{const{t:o}=I.useTranslation(),a=t.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),[r,n]=l.useState([]),d=Ue({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return e.jsx(xo,{apiActions:d,data:r,hideInfoBar:!0,setData:n,gridLoadParametersValues:{reportId:i.selectedRecord.id},editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:o("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async e=>(e.reportId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Ua=[{value:"FILE_SYSTEM"},{value:"SFTP"}],wa={Blueprint:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!0,isVisible:!0},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!1,isVisible:!1}},Jasper:{useSysDatasource:{isMandatory:!1,isVisible:!0},datasourceConId:{isMandatory:!1,isVisible:!0},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!0,isVisible:!0}},Excel:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!0,isVisible:!0},reportJasperName:{isMandatory:!1,isVisible:!1}}},va=(e,t,i)=>{if(e&&wa[e]){const o=wa[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportBluePrintId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),i.setValue("useSysDatasource",null),i.setValue("datasourceConId",null),i.setValue("reportBluePrintId",null),i.setValue("reportExcelDataQueryId",null),i.setValue("reportJasperName",null)},Fa=t=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),r=Ue({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:a});return e.jsx(xo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:t.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:e=>e?.recipientMail&&!uo(e.recipientMail)?(A.toast.error("You must enter a valid email address"),!1):(e.mailTemplateId=t.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},Ba=i=>{const{t:o}=I.useTranslation(),[a,r]=l.useState([]),n=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),d=Ue({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:r}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return e.jsx(xo,{apiActions:d,data:a,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:i.selectedRecord.id},setData:r,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:s,keyColumnName:"id",gridTitle:o("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async e=>(e.mailTemplateId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},ka=i=>{const o=t.useSelector(e=>e.commonStores.stores.SystemReports.data),{t:a}=I.useTranslation(),[r,n]=l.useState([]),d=Ue({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:o,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return e.jsx(xo,{apiActions:d,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:i.selectedRecord.id},setData:n,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:a("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:e=>(e.mailTemplateId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},ja={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},Ga=(e,t,i)=>{if(e&&ja[e]){const o=ja[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},Wa=i=>{const{t:o}=I.useTranslation(),[a,r]=l.useState([]),n=Ue({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:r}),d=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:n,data:a,setData:r,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:i.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:s,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:e=>(e.workflowDocumentId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Ya=i=>{const{t:o}=I.useTranslation(),[a,r]=l.useState([]),n=Ue({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:t.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:n,data:a,hideInfoBar:!0,gridLoadParametersValues:{actionId:i.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:e=>(e.documentActionId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Va=t=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=I.useTranslation(),{handleGetRequest:d}=Ce(),[s,p]=l.useState([]);l.useEffect(()=>{(async()=>{await d({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:t.selectedRecord.id},successCallBkFn:e=>{p(e.data)}})})()},[t.selectedRecord]);const[c,u]=l.useState([]),m=Ue({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:u}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:s,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(Ya,{selectedRecord:i})}),e.jsx(xo,{apiActions:m,data:c,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:t.selectedRecord.id},setData:u,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{o(e),r(!0)}}],formElements:T,keyColumnName:"id",gridTitle:n("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:e=>(e.workflowDocumentId=t.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},qa={LineChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},ColumnChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},PieChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},Card:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},CircularProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},LinearProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}}},Ka=(e,t,i)=>{if(e&&qa[e]){const o=qa[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("height"),i.setValue("height",null),t.hideField("width"),i.setValue("width",null),t.hideField("horizontalAxisField"),i.setValue("horizontalAxisField",null),t.hideField("horizontalAxisLabel"),i.setValue("horizontalAxisLabel",null),t.hideField("seriesKeys"),i.setValue("seriesKeys",null),t.hideField("verticalAxisField"),i.setValue("verticalAxisField",null),t.hideField("verticalAxisLabel"),i.setValue("verticalAxisLabel",null)},za=i=>{const{t:o}=I.useTranslation(),[a,r]=l.useState([]),n=t.useSelector(e=>e.commonStores.stores.SystemWidgets.data),d=Ue({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:r}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:d,data:a,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:s,gridLoadParametersValues:{dashboardId:i.selectedRecord.id},keyColumnName:"id",gridTitle:o("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async e=>(e.dashboardId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Ha=[...[...[{path:"admin/organizations",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:t=>e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:e.jsx(fo,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:t.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(e.Fragment,{children:e.jsx(xo,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:r,keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:ha,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:Ra,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:La,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:Ca,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState(null),{UserInfo:r}=De(),d=t.useSelector(e=>e.commonStores.stores.CurrentOrganizationRanks.data),s=t.useSelector(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[p,c]=l.useState([]),u=Ue({findAll:"api/v1/public/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:c}),[m,T]=l.useState(null),{Window:_,setWindowState:f}=Pe({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:E,setWindowState:O}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:N,setWindowState:y}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),h=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:t=>e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:e.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:t.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsxs(e.Fragment,{children:[e.jsx(E,{children:e.jsx(ya,{selectedRecord:m,closeModalFn:()=>{O(!1)}})}),e.jsx(_,{children:e.jsx(ha,{selectedPerson:o})}),e.jsx(N,{children:e.jsx(oa,{selectedPerson:o,isSelfService:!1,onSuccessCallBk:()=>{y(!1)}})}),e.jsx(xo,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:u,data:p,setData:c,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:h,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{a(e),y(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{T({organizationId:r?.currentOrganization?.id,id:e?.organizationMemberId}),O(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{a(e),f(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(A.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(A.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/org/admin/systemapplication/all",deleteById:"api/v1/org/admin/systemapplication",save:"api/v1/org/admin/systemapplication",findById:"api/v1/org/admin/systemapplication",setData:o});return e.jsx(e.Fragment,{children:e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:ga,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Da,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:Ma,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:i}=I.useTranslation(),{handleGetRequest:o}=Ce(),[a,r]=l.useState([]),n=Ue({findAll:"api/v1/org/admin/organizationapplicationmodule/all",deleteById:"api/org/v1/admin/organizationapplicationmodule",save:"api/v1/org/admin/organizationapplicationmodule",findById:"api/org/v1/admin/organizationapplicationmodule",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:t.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:n,data:a,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},authority:"ORGANIZATION_ADMIN"},{path:"admin/org/unit/types",component:Ca,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:La,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Ra,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:i}=I.useTranslation(),o=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),[a,r]=l.useState([]),n=Ue({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}}];return e.jsx(xo,{apiActions:n,data:a,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:d,keyColumnName:"id",gridTitle:i("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=Pe({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),n=t.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:d}=I.useTranslation(),[s,p]=l.useState([]),c=Ue({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:p}),u=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("datasourceConId"),t.setValue("datasourceConId",null)):i.showField("datasourceConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:n,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(xa,{selectedRecord:i})}),e.jsx(xo,{apiActions:c,rowActions:[{label:"Query Parameters",actionFn:async e=>{o(e),r(!0)},icon:"p"}],data:s,setData:p,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:u,keyColumnName:"id",gridTitle:d("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:i}=Ce(),o=t.useSelector(e=>e.commonStores.stores.SystemDataSourceType.data),{t:a}=I.useTranslation(),[r,n]=l.useState([]),d=Ue({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:n,commonStoreKey:"SystemDataSources"}),s=[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:o,optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:d,data:r,setData:n,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:s,keyColumnName:"id",gridTitle:a("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async e=>{await i({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:e.id},successCallBkFn:e=>{A.toast.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:i}=I.useTranslation(),o=t.useSelector(e=>e.commonStores.stores.SystemParameterTypes.data),[a,r]=l.useState([]),n=Ue({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:o,optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o){"combobox"===e?(t.setValue("parameterValueFormat",null),i.showField("parameterDataQueryId"),i.showField("parameterDataset"),i.showField("parameterDisplayField"),i.showField("parameterValueField"),i.hideField("parameterValueFormat")):"date"===e||"datetime"===e?("date"===e?t.setValue("parameterValueFormat",Ge):"datetime"===e&&t.setValue("parameterValueFormat",We),i.hideField("parameterDataQueryId"),i.hideField("parameterDataset"),i.hideField("parameterDisplayField"),i.hideField("parameterValueField"),i.showField("parameterValueFormat")):(t.setValue("parameterValueFormat",null),i.hideField("parameterDataQueryId"),i.hideField("parameterDataset"),i.hideField("parameterDisplayField"),i.hideField("parameterValueField"),i.hideField("parameterValueFormat"))}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,t,i,o){null!=e&&""!=e?(t.setValue("parameterDataset",null),i.hideField("parameterDataset")):i.showField("parameterDataset")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,t,i,o){null!=e&&""!=e?(t.setValue("parameterDataQueryId",null),i.hideField("parameterDataQueryId")):i.showField("parameterDataQueryId")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:n,data:a,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:d,keyColumnName:"id",gridTitle:i("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:ba,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState(null),{Window:r,setWindowState:n}=Pe({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:d,setWindowState:s}=Pe({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[p,c]=l.useState([]),u=t.useSelector(e=>e.commonStores.stores.SystemDataSources.data),m=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),T=t.useSelector(e=>e.commonStores.stores.SystemBluePrints.data),_=Ue({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:c}),f=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",formProps:{onValueChangeCallBack(e,t,i,o){va(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",options:Ua,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("datasourceConId"),t.setValue("datasourceConId",null)):i.showField("datasourceConId")}},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:u,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:T,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:m,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(Uo,{reportCode:o?.reportCode,resultMode:"App"})}),e.jsx(d,{children:e.jsx(Sa,{selectedRecord:o})}),e.jsx(xo,{attachment:{attachmentCode:"JASPER_REPORTS"},apiActions:_,data:p,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{a(e),s(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{a(e),n(!0)}}],formLoadCallBk:(e,t,i)=>{va(i.reportType,e,t),!0===i?.useSysDatasource&&e.hideField("datasourceConId")},formElements:f,keyColumnName:"id",gridTitle:i("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(A.toast.error("You must choose the report query"),!1):(A.toast.error("You must choose the report blueprint"),!1):(A.toast.error("You must enter the jasper report name"),!1):(A.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const i=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),o=t.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),[a,r]=l.useState(null),{Window:n,setWindowState:d}=Pe({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:s,setWindowState:p}=Pe({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:c,setWindowState:u}=Pe({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:m}=I.useTranslation(),[T,_]=l.useState([]),f=Ue({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:_}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:o,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return e.jsxs(e.Fragment,{children:[e.jsx(n,{children:e.jsx(Fa,{selectedRecord:a,callBkFn:()=>{d(!1)}})}),e.jsx(s,{children:e.jsx(Ba,{selectedRecord:a,callBkFn:()=>{d(!1)}})}),e.jsx(c,{children:e.jsx(ka,{selectedRecord:a,callBkFn:()=>{u(!1)}})}),e.jsx(xo,{apiActions:f,data:T,setData:_,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:E,keyColumnName:"id",gridTitle:m("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{r(e),d(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{r(e),p(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{r(e),u(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(A.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(A.toast.error("You must specifiy the period value since this email is periodical"),!1):(A.toast.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o){Ga(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:r,keyColumnName:"id",gridTitle:t("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{Ga(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Document Status",windowIcon:"tag"}),{Window:n,setWindowState:d}=Pe({windowTitle:"Document Action",windowIcon:"stamp"}),s=t.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),p=t.useSelector(e=>e.commonStores.stores.SystemReports.data),c=t.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:u}=I.useTranslation(),[m,T]=l.useState([]),A=Ue({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:T}),_=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:s,optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:p,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("documentConId"),t.setValue("documentConId",null)):i.showField("documentConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:c,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(Wa,{selectedRecord:i})}),e.jsx(n,{children:e.jsx(Va,{selectedRecord:i})}),e.jsx(xo,{apiActions:A,formLoadCallBk:(e,t,i)=>{!0===i.useSystemCon?e.hideField("documentConId"):e.showField("documentConId")},data:m,setData:T,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{o(e),r(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{o(e),d(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:u("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:_,keyColumnName:"id",gridTitle:u("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:i}=I.useTranslation(),o=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),a=t.useSelector(e=>e.commonStores.stores.SystemWidgetTypes.data),[r,n]=l.useState([]),d=Ue({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",options:a,optionDisplayField:"name",optionValueField:"name",formProps:{onValueChangeCallBack(e,t,i,o){Ka(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_SERIES_KEYS",fieldName:"seriesKeys",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_LABEL",fieldName:"verticalAxisLabel",required:!1,fieldType:"text"}}]}}];return e.jsx(xo,{apiActions:d,data:r,setData:n,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:s,keyColumnName:"id",gridTitle:i("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"},formLoadCallBk:(e,t,i)=>{Ka(i.widgetType,e,t)}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,d]=l.useState([]),s=O.useNavigate(),p=Ue({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:d});return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(za,{selectedRecord:i})}),e.jsx(xo,{apiActions:p,data:n,setData:d,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{o(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{s("/dashboard/"+e.dashboardCode)}}],gridTitle:t("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:zo},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),{handlePostRequest:r}=Ce(),n=Ue({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:a}),d=t.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:d,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}];return e.jsx(xo,{apiActions:n,disableDefaultAction:!0,data:o,setData:a,editMode:{editMode:"none"},formElements:s,rowActions:[{actionFn:async e=>{(async e=>{await r({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{n.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],keyColumnName:"id",gridTitle:i("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}},{path:"dev/system/authorities",component:ga},{path:"dev/system/roles",component:Ma},{path:"dev/system/lookups",component:ba},{path:"dev/system/modules",component:Da},{path:"dev/attachmentconfigs",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CODE",fieldName:"attachmentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",fieldName:"relatedDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",options:Ua,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",fieldName:"uploadDirectory",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",fieldName:"allowedFileTypes",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",fieldName:"attachmentCategories",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Is Category Mandatory",fieldName:"isCategoryRequired",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",fieldName:"maxAllowedNumberOfFiles",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",fieldName:"downloadAuthorityKey",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",fieldName:"uploadAuthorityKey",required:!1,fieldType:"text"}}];return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:r,keyColumnName:"id",gridTitle:t("ATTACHMENT_CONFIG_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_DELETE"}})}},{path:"dev/notifications",component:()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),r=t.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),d=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),s=Ue({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:a}),p=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:d,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:d,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",options:r,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:t=>e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",color:t?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:t?.row?.notificationIcon?e.jsx(m.FontAwesomeIcon,{icon:t.row.notificationIcon}):e.jsx(e.Fragment,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:t=>e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",color:t?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:t?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:t=>e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",color:t?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:t?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:s,data:o,setData:a,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:p,keyColumnName:"id",gridTitle:i("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:i}=De(),o=t.useSelector(e=>e.AppLayout),{handleGetRequest:a,handlePostRequest:r}=Ce(),[d,s]=l.useState([]),p=t.useSelector(e=>e.AppInfo.value),c=()=>{!0===i.isAuthenticated&&a({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{s(e.data)}})};return!0===p?.enableUINotifications&&Jo(c,1e3),e.jsxs(e.Fragment,{children:[e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(n.Box,{sx:{flex:1}}),e.jsxs("h3",{children:[e.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===o.appDirection?"Notifications":"الاشعارات"]}),e.jsx(n.Box,{sx:{flex:1}}),e.jsx(n.Button,{sx:{textTransform:"none"},onClick:async()=>{await r({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),e.jsx(n.Button,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await r({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),e.jsx(n.Box,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:e.jsx(n.Box,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:d.map((t,i)=>e.jsx(ta,{...t,showDivider:i<d.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:Fo}]]],Qa=t=>{const{isUserAuthorized:i,isCurrentOrganizationAuthorizedToModule:o}=De();return t?.applicationModule&&!o(t?.applicationModule)?e.jsx(n.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:e.jsxs("h2",{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):t?.authority&&!i(t.authority)?e.jsx(n.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:e.jsxs("h2",{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):e.jsx(e.Fragment,{children:t.children})},Za=()=>{const i=t.useSelector(e=>e.AppLayout),o=t.useSelector(e=>e.AppInfo.value),a=t.useSelector(e=>e.AppInfo.value.businessRoutes),{UserInfo:r}=De(),s=t.useDispatch(),{show:p,hide:c}=ye(),u=t.useSelector(e=>e.commonStores),[m,T]=l.useState(!1),{isUserAuthorized:A}=De(),{handleGetRequest:_}=Ce();return l.useEffect(()=>{u?.storeKeys&&(async()=>{p("Loading ... please wait"),T(!1);const e=u.stores,t=u.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!A(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||await _({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{s(xe({storeKey:i,data:e.data}))},failureCallBkFn:()=>{s(xe({storeKey:i,data:[]}))}});T(!0),c()})()},[u.storeKeys,r?.currentOrganization]),e.jsx(d.CacheProvider,{value:"ltr"===i.appDirection?Na:Oa,children:m?e.jsx(n.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:e.jsxs(O.Routes,{children:[o.enableAdministrationModule?Ha.map((t,i)=>e.jsx(O.Route,{path:t.path,element:e.jsx(Qa,{authority:t.authority,applicationModule:t.applicationModule,children:e.jsx(t.component,{})})},"adm"+i)):null,a.map((t,i)=>e.jsx(O.Route,{path:t.path,element:e.jsx(Qa,{authority:t.authority,children:e.jsx(t.component,{})})},"bs"+i))]})}):e.jsx(e.Fragment,{})})},$a=s.styled("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:ae.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:ae.grey[900]})}));function Xa(i){const{window:o}=i,a=t.useSelector(e=>e.SideBar),r=t.useSelector(e=>e.AppInfo.value),d=t.useDispatch(),l=e=>{d($o(e))},s=void 0!==o?()=>o().document.body:void 0;return e.jsx(re,{container:s,anchor:"bottom",open:a.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[e.jsx($a,{}),e.jsx(n.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:e.jsx(Ia,{})}),e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[e.jsx(n.Typography,{sx:{fontSize:12},color:"textDisabled",children:r.appName}),e.jsxs(n.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",r.appVersion]})]})]})})}const Ja=()=>{const{t:i}=I.useTranslation(),o=t.useSelector(e=>e.loadingMask.value),a=t.useSelector(e=>e.AppLayout);return e.jsxs(n.Backdrop,{dir:a.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[e.jsx(n.CircularProgress,{color:"inherit"}),e.jsx("div",{style:{marginRight:10,marginLeft:10},children:o?.message||i("DEFAULT_LOADING_MESSAGE")})]})},er=()=>{const i=t.useSelector(e=>e.AppInfo.value),[o,a]=l.useState(""),[r,s]=l.useState(""),[p,c]=l.useState(!1),u=t.useSelector(e=>e.UserSession.value),m=t.useDispatch(),T=async()=>{if(null==o||""==o)return void A.toast.error("username is required to proceed");if(null==r||""==r)return void A.toast.error("password is required to proceed");c(!0);let e=null;try{if(e=await _.post(`${i.apiBaseUrl}/api/auth/login`,{username:o,password:r},{withCredentials:!0}),null!=e.data&&""!==e.data){c(!1);const t={...e.data,isAuthenticated:!0};m(Re.setAuthenticated(t))}}catch(e){c(!1),A.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},f=t.useSelector(e=>e.UserSession.value),I=n.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.dark?.primaryColor||qe} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:i.appTheme?.dark?.primaryColor||qe},secondary:{main:i.appTheme?.dark?.secondaryColor||Ke}}});return l.useEffect(()=>{console.log("checking usersession on reload",f),console.log("checking usersession app info",i),(async()=>{if(i?.apiBaseUrl&&null==f.isAuthenticated)try{let e=await _.get(`${i.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0});if(null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};m(Re.setAuthenticated(t))}else m(Re.setUnAuthenticated())}catch(e){m(Re.setUnAuthenticated())}})()},[i,f.isAuthenticated]),e.jsx(d.ThemeProvider,{theme:I,children:e.jsx(n.Paper,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==u.isAuthenticated?e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[e.jsx("img",{src:i?.appLogo,width:150,height:150}),e.jsx(n.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:i?.appName}),e.jsxs(n.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",i.appVersion]}),e.jsx(n.TextField,{label:"username",sx:{width:300,m:1},value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),e.jsx(n.TextField,{label:"password",sx:{width:300,m:1},value:r,type:"password",onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),e.jsx(n.Button,{loading:p,onClick:T,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):e.jsxs(e.Fragment,{children:[e.jsx(n.CircularProgress,{sx:{marginRight:1}}),e.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})})},tr=()=>{const[i,o]=l.useState({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:a}=Ce(),r=t.useSelector(e=>e.AppInfo.value);return l.useEffect(()=>{if(r?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{r?.checkLicense?.endpoint&&await a({endPointURI:r.checkLicense?.endpoint,successCallBkFn:e=>{o(e.data)}})})()},r?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[r]),i.isLicensed?e.jsx(e.Fragment,{}):e.jsxs(n.Box,{sx:{flex:1,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"fixed",top:0,background:"rgba(235, 235, 235, 0.8)",left:0,zIndex:9999},children:[e.jsx("img",{src:r.appLogo,style:{height:200,width:200}}),e.jsxs(n.Typography,{variant:"h5",children:[r.appName," - ",r.appVersion]}),e.jsx(n.Typography,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),e.jsx(n.Typography,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),e.jsxs(n.Typography,{children:["License Check @",i?.lastLicenseCheckTime||"--------"]}),e.jsxs(n.Typography,{children:["License Check Result :"," ",i?.lastLicenseCheckMessage||"--------"]})]})},ir=s.styled("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:i})=>{const o=t.useSelector(e=>e.AppLayout),a=s.useTheme(),r=ue();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&i?"calc(100% - 350px)":"100%",direction:o.appDirection,justifyContent:"flex-start",transition:!0===i?a.transitions.create(["margin","width"],{easing:a.transitions.easing.easeOut,duration:a.transitions.duration.enteringScreen}):a.transitions.create(["margin","width"],{easing:a.transitions.easing.sharp,duration:a.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==o.appDirection||!0!==i?0:me+"px",marginRight:r||"rtl"!==o.appDirection||!0!==i?0:me+"px"}});function or(){const i=t.useSelector(e=>e.SideBar),o=ue(),a=t.useSelector(e=>e.UserSession),r=t.useSelector(e=>e.AppLayout);return e.jsxs(O.BrowserRouter,{children:[e.jsx(A.ToastContainer,{rtl:"rtl"===r.appDirection,draggable:!0,position:"bottom-center"}),e.jsx(Ja,{}),!0===a.value.isAuthenticated?e.jsxs(ir,{open:i.isOpened,children:[e.jsx(p,{}),e.jsx(ra,{}),o?null:e.jsx(Ea,{}),o?e.jsx(Xa,{}):null,e.jsx(na,{}),e.jsx(Za,{}),e.jsx(tr,{})]}):e.jsx(er,{})]})}const ar=T.createSlice({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,enableUINotifications:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,t)=>{e.value=t.payload}}}),rr=ar.actions;var nr=ar.reducer;const dr={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemTimeIntervals:{autoLoad:!1,url:"",data:[{value:"second"},{value:"minute"},{value:"hour"},{value:"day"},{value:"week"},{value:"month"},{value:"year"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/public/organization/all",data:[]},SystemOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organization/ranks/all",data:[]},CurrentOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organizationrank/all",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organization/units/all",data:[]},CurrentOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organizationunit/all",data:[]},SystemOrganizationUnitType:{autoLoad:!0,url:"api/v1/public/organizationunittype/all",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"},SystemApplicationModules:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationmodule/application/all"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationrole/all"}},lr=i=>{const o=t.useDispatch();ne.LicenseInfo.setLicenseKey(i.muiPremiumKey);const a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.light?.primaryColor||Ye} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:i.appTheme?.light?.primaryColor||Ye},secondary:{main:i.appTheme?.light?.secondaryColor||Ve},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.dark?.primaryColor||qe} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:i.appTheme?.dark?.primaryColor||qe},secondary:{main:i.appTheme?.dark?.secondaryColor||Ke}}},s=t.useSelector(e=>e.AppLayout);let p={...a};"dark"===s.themeMode&&(p={...r});const c=n.createTheme({direction:s.appDirection,...p});return l.useEffect(()=>{document.title=i.documentTitle,o(rr.setAppInfo(i));let e={};i.enableAdministrationModule&&(e={...dr}),i.businessCommonStoresMetaData&&(e={...e,...i.businessCommonStoresMetaData}),o(be(e))},[i]),e.jsx(d.ThemeProvider,{theme:c,children:e.jsx(or,{})})};var sr={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>&copy;</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},pr={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 cr={...sr,...pr,...{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 ur={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>&copy;</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},mr={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 Tr={...ur,...mr,...{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(o.fab),i.library.add(a.far),i.library.add(r.fas);Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return t.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return t.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return m.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return A.toast}}),exports.axios=_,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return I.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return E.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return O.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return O.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return N.zodResolver}}),exports.z=ce,exports.AttachmentCard=Io,exports.AttachmentImageViewer=fo,exports.AttachmentPanel=Eo,exports.BaseApp=i=>{const[o,a]=l.useState({AppLayout:fe,UserSession:Le,loadingMask:Ne,commonStores:Se,SideBar:Xo,AppInfo:nr}),r=T.configureStore({reducer:o}),[n,d]=l.useState(!1);return l.useEffect(()=>{(()=>{const e={AppLayout:fe,UserSession:Le,loadingMask:Ne,commonStores:Se,SideBar:Xo,AppInfo:nr,...i?.businessReduxReducers};a(t=>({...e}));const t={en:{translation:{...cr,...i?.businessLocals?.en}},ar:{translation:{...Tr,...i?.businessLocals?.ar}}};f.use(I.initReactI18next).init({resources:t,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),d(!0)})()},[i]),n?e.jsx(t.Provider,{store:r,children:e.jsx(lr,{...i})}):e.jsx(e.Fragment,{})},exports.CheckBox=ke,exports.ComboBox=je,exports.DARK_THEME_INITIAL_MAIN_COLOR=qe,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=Ge,exports.DATE_TIME_FORMAT=We,exports.DashboardRouteView=zo,exports.DashboardViewer=Ko,exports.Datefield=ze,exports.DatetimeField=He,exports.ExcelReportViewer=So,exports.FormElement=To,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=Ye,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=Ve,exports.ReportViewer=Uo,exports.SystemLookupCombobox=Qe,exports.TemplateBarChart=Bo,exports.TemplateDataCard=ko,exports.TemplateForm=vo,exports.TemplateGauge=jo,exports.TemplateGrid=xo,exports.TemplateLineChart=Go,exports.TemplateLineProgress=Yo,exports.TemplatePieChart=Vo,exports.TemplateTextField=we,exports.TransferList=Be,exports.WorkflowDocumentPanel=wo,exports.WorkflowDocumentTimeLine=Oo,exports.WorkflowRouteComponent=Fo,exports.capitalizeFirstLetter=co,exports.constructGridColumnsFromFields=it,exports.constructValidationSchema=ot,exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=at,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=so,exports.isNumeric=po,exports.isValidEmail=uo,exports.timeAgo=mo,exports.useApiActions=Ue,exports.useAxios=Ce,exports.useConfirmationWindow=ge,exports.useIsMobile=ue,exports.useLoadingMask=ye,exports.useSession=De,exports.useWindow=Pe,Object.keys(n).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})}),Object.keys(de).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return de[e]}})}),Object.keys(le).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return le[e]}})});
37
+ `,ta=i=>{const o=O.useNavigate(),a=t.useSelector(e=>e.AppLayout),{handlePostRequest:r}=Ce();return e.jsxs(e.Fragment,{children:[e.jsxs(n.Button,{fullWidth:!0,onClick:()=>{var e;"NAVIGATION"===i?.notificationAction&&i?.notificationActionPayload&&o(i.notificationActionPayload),i?.isNotified||(e=i.id,r({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:e}})),i?.setOpen&&i.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:i?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[e.jsxs(n.Box,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[i?.notificationIcon?e.jsx(m.FontAwesomeIcon,{icon:i.notificationIcon,style:{marginRight:10,marginLeft:10,color:i?.notificationIconColor}}):e.jsx(e.Fragment,{}),"ltr"===a.appDirection?i.notificationEnText:i.notificationArText,e.jsx(n.Box,{sx:{flex:1}}),i?.isNotified?e.jsx(e.Fragment,{}):e.jsxs(n.Typography,{color:"warning",sx:{animation:`${ea} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[e.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===a.appDirection?"New":"جديد"]})]}),e.jsxs(n.Box,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[e.jsx(n.Box,{sx:{marginRight:1,marginLeft:1},children:mo(i.createTime,a.appDirection)}),e.jsx(n.Box,{sx:{flex:1}}),e.jsx(n.Box,{sx:{marginRight:1,marginLeft:1},children:i.createTime})]})]}),i?.showDivider?e.jsx(n.Divider,{flexItem:!0}):e.jsx(e.Fragment,{})]})},ia=()=>{const{UserInfo:i}=De(),[o,a]=l.useState(null),{handleGetRequest:r,handlePostRequest:d}=Ce(),s=O.useNavigate(),p=t.useSelector(e=>e.AppLayout),[c,u]=l.useState(!1),[T,_]=l.useState([]);Jo(()=>{!0===i.isAuthenticated&&r({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>T.length&&A.toast.info("ltr"===p.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===p.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),_(e.data)}})},1e3);return e.jsx(n.ClickAwayListener,{onClickAway:()=>{u(!1)},children:e.jsxs("div",{style:{cursor:"pointer"},children:[e.jsx(n.IconButton,{color:"inherit",onClick:e=>{a(e.currentTarget),u(!c)},sx:{marginRight:1,marginLeft:1},children:e.jsx(n.Badge,{anchorOrigin:{vertical:"top",horizontal:"ltr"===p.appDirection?"right":"left"},badgeContent:T.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:e.jsx(m.FontAwesomeIcon,{icon:"bell"})})}),e.jsx(n.Popper,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:c,anchorEl:o,dir:p.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:t})=>e.jsx(n.Fade,{...t,timeout:350,children:e.jsxs(n.Paper,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[e.jsx(n.Divider,{variant:"fullWidth",flexItem:!0,children:e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[e.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===p.appDirection?"Notifications":"الاشعارات"]})}),0==T.length?e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:e.jsx(n.Box,{children:"ltr"===p.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):e.jsx(e.Fragment,{}),e.jsx(n.Box,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:T.map((t,i)=>e.jsx(ta,{...t,setOpen:u,showDivider:i<T.length-1}))}),e.jsx(n.Divider,{variant:"fullWidth",flexItem:!0,children:e.jsx(n.Button,{sx:{textTransform:"none"},onClick:()=>{s("myNotifications")},children:"ltr"===p.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},oa=t=>{const[i,o]=l.useState(""),[a,r]=l.useState(""),[d,s]=l.useState(""),{handlePostRequest:p}=Ce();return e.jsxs(n.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[e.jsxs(n.Box,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",t?.selectedPerson?.employeeEnName]}),e.jsx(n.Divider,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),t.isSelfService?e.jsx(we,{label:"Current Password",value:i,onChange:e=>{o(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):e.jsx(e.Fragment,{}),e.jsx(we,{label:"New Password",value:a,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),e.jsx(we,{label:"Confirm New Password",value:d,onChange:e=>{s(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),e.jsx(n.Button,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!t.isSelfService||null!==i&&""!==i.trim()?null!==a&&""!==a&&null!==d&&""!==d&&a==d?await p({endPointURI:t.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:t?.selectedPerson?.id,currentPassword:i,newPassword:a},successCallBkFn:()=>{t.onSuccessCallBk(),A.toast.success("Your request has been processed successfully")},showMask:!0}):A.toast.error("You must enter new password in required fields and must be identical"):A.toast.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},aa=n.styled(c,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const i=t.useSelector(e=>e.AppLayout),o=ue();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:o?void 0:"calc(100% - 350px)",marginLeft:o||"ltr"!==i.appDirection?void 0:"350px",marginRight:o||"rtl"!==i.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),ra=()=>{const{Window:i,setWindowState:o}=Pe({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),a=t.useSelector(e=>e.AppInfo.value),[r,d]=l.useState(null),s=()=>{d(null)},p=e=>{d(e.currentTarget)},c=t.useSelector(e=>e.AppLayout),T=t.useSelector(e=>e.SideBar),{UserSession:A}=De(),_=A.value.currentOrganization,{Window:I,setWindowState:E}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:O}=Ce(),N=ue(),y=t.useDispatch();return e.jsxs(e.Fragment,{children:[e.jsx(I,{children:e.jsx(oa,{selectedPerson:A.value,isSelfService:!0,onSuccessCallBk:()=>{E(!1)}})}),e.jsx(n.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:r,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(r),onClose:s,children:e.jsx(n.MenuItem,{onClick:()=>{E(!0),s()},children:e.jsx(n.Typography,{sx:{textAlign:"center"},children:"Change Password"})})}),e.jsx(i,{children:e.jsx(Ho,{successChangeCallBackFn:()=>{o(!1)}})}),e.jsx(aa,{position:"fixed",open:T.isOpened,children:e.jsxs(u,{children:[e.jsx(n.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{y(Zo())},edge:"start",sx:[{mr:"ltr"===c.appDirection?2:void 0,ml:"rtl"===c.appDirection?2:void 0},T.isOpened&&{display:"none"}],children:e.jsx(m.FontAwesomeIcon,{icon:"bars"})}),e.jsx(fo,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:A.value.currentOrganization.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),e.jsx(n.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:N?"":`${a.appName} - ${"ltr"===c.appDirection?_?.organizationEnName:_?.organizationArName}`}),e.jsx(n.Tooltip,{title:"light"===c.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:e.jsx(n.IconButton,{color:"inherit",onClick:()=>{y(_e.setThemeMode("light"===c.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===c.themeMode?"dark":"light")},children:"light"===c.themeMode?e.jsx(m.FontAwesomeIcon,{icon:"moon"}):e.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),e.jsx(n.Tooltip,{title:"ar"===f.language?"Change Language To English":"Change Language To Arabic",children:e.jsx(n.IconButton,{color:"inherit",onClick:()=>{let e="ar"===f.language?"en":"ar";var t;t=e,f.changeLanguage(t),localStorage.setItem("language",t),y(_e.setAppDirection("ar"===e?"rtl":"ltr"))},children:e.jsx(m.FontAwesomeIcon,{icon:"language"})})}),A.value?.userOrganizations&&A.value?.userOrganizations.length>1?e.jsx(n.Tooltip,{title:"Change Current Organization",children:e.jsx(n.IconButton,{color:"inherit",onClick:()=>{o(!0)},children:e.jsx(m.FontAwesomeIcon,{icon:"globe"})})}):e.jsx(e.Fragment,{}),!0===a?.enableUINotifications?e.jsx(ia,{}):e.jsx(e.Fragment,{}),e.jsx("div",{onClick:p,style:{cursor:"pointer"},children:e.jsx(fo,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:A.value?.id+""})}),e.jsx("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:p,children:N?"":A.value?.username}),e.jsx(n.IconButton,{color:"inherit",onClick:async()=>{try{await O({endPointURI:"api/auth/logout"})}catch(e){}y(Re.setUnAuthenticated())},children:e.jsx(m.FontAwesomeIcon,{rotation:"rtl"===c.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},na=n.styled("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),da=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=da(e,i.children);if(t)return t}}},la=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"system_admin.Person",label:"PERSON_PLURAL",authority:"SYSTEM_ADMIN",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools.rolesx",label:"ROLES",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"development_admin.organizations",label:"ORGANIZATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.organization",label:"Organization Info",authority:"DEVELOPMENT_ADMIN",icon:"globe",children:[{id:"development_admin.organization.modules",label:"Subscriped Modules",icon:"layer-group",authority:"ORGANIZATION_ADMIN",action:"NAVIGATION",actionPayload:{path:"admin/org/apps"}},{id:"development_admin.organization.unitTypes",label:"Organization Unit Types",icon:"tags",action:"NAVIGATION",actionPayload:{path:"admin/org/unit/types"}},{id:"development_admin.organization.units",label:"Organization Units",icon:"folder-tree",action:"NAVIGATION",actionPayload:{path:"admin/org/units"}},{id:"development_admin.organization.ranks",label:"Organization Ranks",icon:"street-view",action:"NAVIGATION",actionPayload:{path:"admin/org/ranks"}}]},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",authority:"DEVELOPMENT_ADMIN",icon:"code",children:[{id:"system_admin.devtools.modules",label:"System Modules",icon:"layer-group",action:"NAVIGATION",actionPayload:{path:"dev/system/modules"}},{id:"system_admin.devtools.authorities",label:"System Authorities",icon:"key",action:"NAVIGATION",actionPayload:{path:"dev/system/authorities"}},{id:"system_admin.devtools.roles",label:"System Roles",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"system_admin.devtools.lookups",label:"System Lookups",icon:"list-check",action:"NAVIGATION",actionPayload:{path:"dev/system/lookups"}},{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.AttachmentConfig",label:"ATTACHMENT_CONFIG_PLURAL",icon:"paperclip",action:"NAVIGATION",actionPayload:{path:"dev/attachmentconfigs"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",authority:"DEVELOPMENT_ADMIN",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}]];function sa(){return e.jsx(G,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const pa=s.styled(Z.TreeItem2Root)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${H.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),ca=s.styled(Z.TreeItem2Content)(({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:s.alpha(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}})),ua=q.animated(K);function ma(t){const i=q.useSpring({to:{opacity:t.in?1:0,transform:`translate3d(0,${t.in?0:20}px,0)`}});return e.jsx(ua,{style:i,...t})}const Ta=s.styled(F)({color:"inherit",fontWeight:500});function Aa({icon:i,expandable:o,children:a,...r}){const{t:n}=I.useTranslation(),d=t.useSelector(e=>e.AppLayout);return e.jsxs(Z.TreeItem2Label,{...r,sx:{display:"flex",alignItems:"center",padding:1},children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:"ltr"===d.appDirection?7:void 0,marginLeft:"rtl"===d.appDirection?7:void 0,fontSize:"1.2rem"},icon:i}),e.jsx(Ta,{variant:"body2",sx:{fontSize:16},children:n(a)}),o&&e.jsx(sa,{})]})}const _a=e=>Array.isArray(e)?e.length>0&&e.some(_a):Boolean(e),fa=pe.forwardRef(function(t,i){const{id:o,itemId:a,label:r,disabled:n,children:d,...l}=t,{getRootProps:s,getContentProps:p,getIconContainerProps:c,getCheckboxProps:u,getLabelProps:m,getGroupTransitionProps:T,getDragAndDropOverlayProps:A,status:_,publicAPI:f}=Q.useTreeItem2({id:o,itemId:a,children:d,label:r,disabled:n,rootRef:i}),I=f.getItem(a),E=_a(d);return e.jsx(X.TreeItem2Provider,{itemId:a,children:e.jsxs(pa,{...s(l),children:[e.jsxs(ca,{...p({className:ro("content",{"Mui-expanded":_.expanded,"Mui-selected":_.selected,"Mui-focused":_.focused,"Mui-disabled":_.disabled})}),children:[e.jsx(Z.TreeItem2IconContainer,{...c(),children:e.jsx($.TreeItem2Icon,{status:_})}),e.jsx(Z.TreeItem2Checkbox,{...u()}),e.jsx(Aa,{...m({icon:I?.icon||"book",expandable:E&&_.expanded})}),e.jsx(J.TreeItem2DragAndDropOverlay,{...A()})]}),d&&e.jsx(ma,{...T()})]})})});function Ia(){const i=O.useNavigate(),o=t.useSelector(e=>e.AppLayout),a=t.useSelector(e=>e.AppInfo.value);t.useDispatch();const r=ue(),{isUserAuthorized:n,isCurrentOrganizationAuthorizedToModule:d}=De(),l=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||n(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||d(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=l(i.children)),t.push(e)}return t},s=[];a.enableAdministrationModule&&s.push(...structuredClone(la)),s.push(...structuredClone(a.businessNavigationItems));const p=l(s);return e.jsx(z.RichTreeView,{items:p,onItemClick:(e,t)=>{const o=da(t,s);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||i(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:me,direction:o.appDirection,maxHeight:r?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:fa}})}const Ea=()=>{const i=t.useSelector(e=>e.AppInfo.value),{UserSession:o}=De(),a=o.value.currentOrganization,r=n.useTheme(),d=t.useSelector(e=>e.AppLayout),l=t.useSelector(e=>e.SideBar),s=t.useDispatch();return e.jsxs(V,{sx:{width:me,flexShrink:0,"& .MuiDrawer-paper":{width:me,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===d.appDirection?"left":"right",open:l.isOpened,children:[e.jsxs(na,{children:[e.jsxs(n.Box,{sx:{width:"100%"},children:[e.jsx(n.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[e.jsx(n.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${i.appName} - ${"ltr"===d.appDirection?a?.organizationEnName:a?.organizationArName}`}),e.jsxs(n.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",i.appVersion]})]})]}),e.jsx(Y,{onClick:()=>{s(Zo())},children:"ltr"===r.direction?e.jsx(m.FontAwesomeIcon,{icon:"angle-left"}):e.jsx(m.FontAwesomeIcon,{icon:"angle-right"})})]}),e.jsx(M,{}),e.jsx(Ia,{})]})},Oa=ie({key:"muirtl",stylisPlugins:[te.prefixer,ee]}),Na=ie({key:"mui"}),ya=t=>{const[i,o]=l.useState([]),[a,r]=l.useState([]),{handlePostRequest:d,handleGetRequest:s}=Ce();l.useEffect(()=>{t.selectedRecord&&(async()=>{await s({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:t.selectedRecord.id,organizationId:t.selectedRecord.organizationId},successCallBkFn:e=>{o(e.data.currentRoles),r(e.data.availableRoles)}})})()},[t.selectedRecord]);return e.jsxs(e.Fragment,{children:[e.jsx(Be,{displayField:"roleName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[e.jsx(n.Button,{variant:"contained",onClick:async()=>{await d({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:t.selectedRecord.id},data:i,successCallBkFn:()=>{A.toast.success("Your request has been proccesed successfully"),t.closeModalFn&&t.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),e.jsx(n.Button,{variant:"contained",color:"error",onClick:t.closeModalFn,children:"Cancel"})]})]})},ha=i=>{const[o,a]=l.useState(null),{Window:r,setWindowState:n}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),d=t.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),s=t.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks.data),p=t.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:c}=I.useTranslation(),[u,m]=l.useState([]),T=Ue({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:m}),A=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:p,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}];return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(ya,{selectedRecord:o,closeModalFn:()=>{n(!1)}})}),e.jsx(xo,{apiActions:T,hideInfoBar:!0,data:u,setData:m,editMode:{editMode:"row"},formElements:A,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{a(e),n(!0)}}],gridLoadParametersValues:{personId:i.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async e=>(e.personId=i.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Ra=()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),r=Ue({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:a}),{handleGetRequest:n}=Ce(),d=t.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks),s=t.useDispatch();return e.jsx(xo,{apiActions:r,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",postActionCallBack:()=>{(async()=>{await n({endPointURI:d.url,showMask:!1,successCallBkFn:e=>{s(xe({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{s(xe({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},La=()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),{handleGetRequest:r}=Ce(),n=t.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits),d=t.useDispatch(),s=Ue({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:a}),p=[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:t.useSelector(e=>e.commonStores.stores.SystemOrganizationUnitType.data),optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:s,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row"},formElements:p,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await r({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{d(xe({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{d(xe({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},Ca=()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:o});return e.jsx(xo,{apiActions:a,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},ga=()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),r=Ue({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:a}),n=t.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:d}=Ce(),s=[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:r,data:o,hideInfoBar:!0,setData:a,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},Da=()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:o});return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},Pa=t=>{const[i,o]=l.useState([]),[a,r]=l.useState([]),{handlePostRequest:d,handleGetRequest:s}=Ce();l.useEffect(()=>{t.roleId&&(async()=>{await s({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:t.roleId},successCallBkFn:e=>{o(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()},[t.roleId]);return e.jsxs(e.Fragment,{children:[e.jsx(Be,{displayField:"authorityName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[e.jsx(n.Button,{variant:"contained",onClick:async()=>{await d({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:t.roleId},data:i,successCallBkFn:()=>{A.toast.success("Your request has been proccesed successfully"),t.closeModalFn&&t.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),e.jsx(n.Button,{variant:"contained",color:"error",onClick:t.closeModalFn,children:"Cancel"})]})]})},Ma=()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),[a,r]=l.useState(null),{Window:n,setWindowState:d}=Pe({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),s=Ue({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:o});return e.jsxs(e.Fragment,{children:[e.jsx(n,{children:e.jsx(Pa,{roleId:a?.id,closeModalFn:()=>{d(!1)}})}),e.jsx(xo,{apiActions:s,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{r(e),d(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},xa=i=>{const o=t.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),{t:a}=I.useTranslation(),[r,n]=l.useState([]),d=Ue({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:d,data:r,setData:n,editMode:{editMode:"row"},hideInfoBar:!0,formElements:s,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:i.selectedRecord.id},gridTitle:a("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async e=>(e.dataQueryId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},ba=()=>{const i=t.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),{t:o}=I.useTranslation(),[a,r]=l.useState([]),n=Ue({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:i,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return e.jsx(xo,{apiActions:n,data:a,setData:r,hideInfoBar:!0,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:o("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},Sa=i=>{const{t:o}=I.useTranslation(),a=t.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),[r,n]=l.useState([]),d=Ue({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return e.jsx(xo,{apiActions:d,data:r,hideInfoBar:!0,setData:n,gridLoadParametersValues:{reportId:i.selectedRecord.id},editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:o("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async e=>(e.reportId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Ua=[{value:"FILE_SYSTEM"},{value:"SFTP"}],wa={Blueprint:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!0,isVisible:!0},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!1,isVisible:!1}},Jasper:{useSysDatasource:{isMandatory:!1,isVisible:!0},datasourceConId:{isMandatory:!1,isVisible:!0},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!0,isVisible:!0}},Excel:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!0,isVisible:!0},reportJasperName:{isMandatory:!1,isVisible:!1}}},va=(e,t,i)=>{if(e&&wa[e]){const o=wa[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportBluePrintId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),i.setValue("useSysDatasource",null),i.setValue("datasourceConId",null),i.setValue("reportBluePrintId",null),i.setValue("reportExcelDataQueryId",null),i.setValue("reportJasperName",null)},Fa=t=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),r=Ue({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:a});return e.jsx(xo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:t.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:e=>e?.recipientMail&&!uo(e.recipientMail)?(A.toast.error("You must enter a valid email address"),!1):(e.mailTemplateId=t.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},Ba=i=>{const{t:o}=I.useTranslation(),[a,r]=l.useState([]),n=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),d=Ue({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:r}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return e.jsx(xo,{apiActions:d,data:a,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:i.selectedRecord.id},setData:r,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:s,keyColumnName:"id",gridTitle:o("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async e=>(e.mailTemplateId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},ka=i=>{const o=t.useSelector(e=>e.commonStores.stores.SystemReports.data),{t:a}=I.useTranslation(),[r,n]=l.useState([]),d=Ue({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:o,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return e.jsx(xo,{apiActions:d,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:i.selectedRecord.id},setData:n,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:a("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:e=>(e.mailTemplateId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},ja={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},Ga=(e,t,i)=>{if(e&&ja[e]){const o=ja[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},Wa=i=>{const{t:o}=I.useTranslation(),[a,r]=l.useState([]),n=Ue({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:r}),d=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:n,data:a,setData:r,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:i.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:s,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:e=>(e.workflowDocumentId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Ya=i=>{const{t:o}=I.useTranslation(),[a,r]=l.useState([]),n=Ue({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:t.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:n,data:a,hideInfoBar:!0,gridLoadParametersValues:{actionId:i.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:e=>(e.documentActionId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Va=t=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=I.useTranslation(),{handleGetRequest:d}=Ce(),[s,p]=l.useState([]);l.useEffect(()=>{(async()=>{await d({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:t.selectedRecord.id},successCallBkFn:e=>{p(e.data)}})})()},[t.selectedRecord]);const[c,u]=l.useState([]),m=Ue({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:u}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:s,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(Ya,{selectedRecord:i})}),e.jsx(xo,{apiActions:m,data:c,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:t.selectedRecord.id},setData:u,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{o(e),r(!0)}}],formElements:T,keyColumnName:"id",gridTitle:n("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:e=>(e.workflowDocumentId=t.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},qa={LineChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},ColumnChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},PieChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},Card:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},CircularProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},LinearProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}}},Ka=(e,t,i)=>{if(e&&qa[e]){const o=qa[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("height"),i.setValue("height",null),t.hideField("width"),i.setValue("width",null),t.hideField("horizontalAxisField"),i.setValue("horizontalAxisField",null),t.hideField("horizontalAxisLabel"),i.setValue("horizontalAxisLabel",null),t.hideField("seriesKeys"),i.setValue("seriesKeys",null),t.hideField("verticalAxisField"),i.setValue("verticalAxisField",null),t.hideField("verticalAxisLabel"),i.setValue("verticalAxisLabel",null)},za=i=>{const{t:o}=I.useTranslation(),[a,r]=l.useState([]),n=t.useSelector(e=>e.commonStores.stores.SystemWidgets.data),d=Ue({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:r}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:d,data:a,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:s,gridLoadParametersValues:{dashboardId:i.selectedRecord.id},keyColumnName:"id",gridTitle:o("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async e=>(e.dashboardId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Ha=[...[...[{path:"admin/organizations",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:t=>e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:e.jsx(fo,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:t.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(e.Fragment,{children:e.jsx(xo,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:r,keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:ha,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:Ra,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:La,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:Ca,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState(null),{UserInfo:r}=De(),d=t.useSelector(e=>e.commonStores.stores.CurrentOrganizationRanks.data),s=t.useSelector(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[p,c]=l.useState([]),u=Ue({findAll:"api/v1/public/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:c}),[m,T]=l.useState(null),{Window:_,setWindowState:f}=Pe({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:E,setWindowState:O}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:N,setWindowState:y}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),h=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:t=>e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:e.jsx(fo,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:t.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsxs(e.Fragment,{children:[e.jsx(E,{children:e.jsx(ya,{selectedRecord:m,closeModalFn:()=>{O(!1)}})}),e.jsx(_,{children:e.jsx(ha,{selectedPerson:o})}),e.jsx(N,{children:e.jsx(oa,{selectedPerson:o,isSelfService:!1,onSuccessCallBk:()=>{y(!1)}})}),e.jsx(xo,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:u,data:p,setData:c,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:h,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{a(e),y(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{T({organizationId:r?.currentOrganization?.id,id:e?.organizationMemberId}),O(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{a(e),f(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(A.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(A.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/org/admin/systemapplication/all",deleteById:"api/v1/org/admin/systemapplication",save:"api/v1/org/admin/systemapplication",findById:"api/v1/org/admin/systemapplication",setData:o});return e.jsx(e.Fragment,{children:e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:ga,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Da,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:Ma,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:i}=I.useTranslation(),{handleGetRequest:o}=Ce(),[a,r]=l.useState([]),n=Ue({findAll:"api/v1/org/admin/organizationapplicationmodule/all",deleteById:"api/org/v1/admin/organizationapplicationmodule",save:"api/v1/org/admin/organizationapplicationmodule",findById:"api/org/v1/admin/organizationapplicationmodule",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:t.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:n,data:a,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:d,keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},authority:"ORGANIZATION_ADMIN"},{path:"admin/org/unit/types",component:Ca,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:La,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Ra,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:i}=I.useTranslation(),o=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),[a,r]=l.useState([]),n=Ue({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}}];return e.jsx(xo,{apiActions:n,data:a,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:d,keyColumnName:"id",gridTitle:i("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=Pe({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),n=t.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:d}=I.useTranslation(),[s,p]=l.useState([]),c=Ue({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:p}),u=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("datasourceConId"),t.setValue("datasourceConId",null)):i.showField("datasourceConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:n,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(xa,{selectedRecord:i})}),e.jsx(xo,{apiActions:c,rowActions:[{label:"Query Parameters",actionFn:async e=>{o(e),r(!0)},icon:"p"}],data:s,setData:p,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:u,keyColumnName:"id",gridTitle:d("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:i}=Ce(),o=t.useSelector(e=>e.commonStores.stores.SystemDataSourceType.data),{t:a}=I.useTranslation(),[r,n]=l.useState([]),d=Ue({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:n,commonStoreKey:"SystemDataSources"}),s=[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:o,optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:d,data:r,setData:n,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:s,keyColumnName:"id",gridTitle:a("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async e=>{await i({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:e.id},successCallBkFn:e=>{A.toast.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:i}=I.useTranslation(),o=t.useSelector(e=>e.commonStores.stores.SystemParameterTypes.data),[a,r]=l.useState([]),n=Ue({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:r}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:o,optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o){"combobox"===e?(t.setValue("parameterValueFormat",null),i.showField("parameterDataQueryId"),i.showField("parameterDataset"),i.showField("parameterDisplayField"),i.showField("parameterValueField"),i.hideField("parameterValueFormat")):"date"===e||"datetime"===e?("date"===e?t.setValue("parameterValueFormat",Ge):"datetime"===e&&t.setValue("parameterValueFormat",We),i.hideField("parameterDataQueryId"),i.hideField("parameterDataset"),i.hideField("parameterDisplayField"),i.hideField("parameterValueField"),i.showField("parameterValueFormat")):(t.setValue("parameterValueFormat",null),i.hideField("parameterDataQueryId"),i.hideField("parameterDataset"),i.hideField("parameterDisplayField"),i.hideField("parameterValueField"),i.hideField("parameterValueFormat"))}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,t,i,o){null!=e&&""!=e?(t.setValue("parameterDataset",null),i.hideField("parameterDataset")):i.showField("parameterDataset")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,t,i,o){null!=e&&""!=e?(t.setValue("parameterDataQueryId",null),i.hideField("parameterDataQueryId")):i.showField("parameterDataQueryId")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:n,data:a,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:d,keyColumnName:"id",gridTitle:i("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:ba,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState(null),{Window:r,setWindowState:n}=Pe({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:d,setWindowState:s}=Pe({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[p,c]=l.useState([]),u=t.useSelector(e=>e.commonStores.stores.SystemDataSources.data),m=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),T=t.useSelector(e=>e.commonStores.stores.SystemBluePrints.data),_=Ue({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:c}),f=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",formProps:{onValueChangeCallBack(e,t,i,o){va(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",options:Ua,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("datasourceConId"),t.setValue("datasourceConId",null)):i.showField("datasourceConId")}},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:u,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:T,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:m,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(Uo,{reportCode:o?.reportCode,resultMode:"App"})}),e.jsx(d,{children:e.jsx(Sa,{selectedRecord:o})}),e.jsx(xo,{attachment:{attachmentCode:"JASPER_REPORTS"},apiActions:_,data:p,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{a(e),s(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{a(e),n(!0)}}],formLoadCallBk:(e,t,i)=>{va(i.reportType,e,t),!0===i?.useSysDatasource&&e.hideField("datasourceConId")},formElements:f,keyColumnName:"id",gridTitle:i("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(A.toast.error("You must choose the report query"),!1):(A.toast.error("You must choose the report blueprint"),!1):(A.toast.error("You must enter the jasper report name"),!1):(A.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const i=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),o=t.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),[a,r]=l.useState(null),{Window:n,setWindowState:d}=Pe({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:s,setWindowState:p}=Pe({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:c,setWindowState:u}=Pe({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:m}=I.useTranslation(),[T,_]=l.useState([]),f=Ue({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:_}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:o,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return e.jsxs(e.Fragment,{children:[e.jsx(n,{children:e.jsx(Fa,{selectedRecord:a,callBkFn:()=>{d(!1)}})}),e.jsx(s,{children:e.jsx(Ba,{selectedRecord:a,callBkFn:()=>{d(!1)}})}),e.jsx(c,{children:e.jsx(ka,{selectedRecord:a,callBkFn:()=>{u(!1)}})}),e.jsx(xo,{apiActions:f,data:T,setData:_,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:E,keyColumnName:"id",gridTitle:m("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{r(e),d(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{r(e),p(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{r(e),u(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(A.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(A.toast.error("You must specifiy the period value since this email is periodical"),!1):(A.toast.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o){Ga(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:r,keyColumnName:"id",gridTitle:t("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{Ga(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Document Status",windowIcon:"tag"}),{Window:n,setWindowState:d}=Pe({windowTitle:"Document Action",windowIcon:"stamp"}),s=t.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),p=t.useSelector(e=>e.commonStores.stores.SystemReports.data),c=t.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:u}=I.useTranslation(),[m,T]=l.useState([]),A=Ue({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:T}),_=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:s,optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:p,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("documentConId"),t.setValue("documentConId",null)):i.showField("documentConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:c,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(Wa,{selectedRecord:i})}),e.jsx(n,{children:e.jsx(Va,{selectedRecord:i})}),e.jsx(xo,{apiActions:A,formLoadCallBk:(e,t,i)=>{!0===i.useSystemCon?e.hideField("documentConId"):e.showField("documentConId")},data:m,setData:T,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{o(e),r(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{o(e),d(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:u("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:_,keyColumnName:"id",gridTitle:u("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:i}=I.useTranslation(),o=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),a=t.useSelector(e=>e.commonStores.stores.SystemWidgetTypes.data),[r,n]=l.useState([]),d=Ue({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",options:a,optionDisplayField:"name",optionValueField:"name",formProps:{onValueChangeCallBack(e,t,i,o){Ka(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_SERIES_KEYS",fieldName:"seriesKeys",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_LABEL",fieldName:"verticalAxisLabel",required:!1,fieldType:"text"}}]}}];return e.jsx(xo,{apiActions:d,data:r,setData:n,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:s,keyColumnName:"id",gridTitle:i("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"},formLoadCallBk:(e,t,i)=>{Ka(i.widgetType,e,t)}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState(null),{Window:a,setWindowState:r}=Pe({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,d]=l.useState([]),s=O.useNavigate(),p=Ue({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:d});return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(za,{selectedRecord:i})}),e.jsx(xo,{apiActions:p,data:n,setData:d,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{o(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{s("/dashboard/"+e.dashboardCode)}}],gridTitle:t("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:zo},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),{handlePostRequest:r}=Ce(),n=Ue({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:a}),d=t.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:d,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}];return e.jsx(xo,{apiActions:n,disableDefaultAction:!0,data:o,setData:a,editMode:{editMode:"none"},formElements:s,rowActions:[{actionFn:async e=>{(async e=>{await r({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{n.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],keyColumnName:"id",gridTitle:i("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}},{path:"dev/system/authorities",component:ga},{path:"dev/system/roles",component:Ma},{path:"dev/system/lookups",component:ba},{path:"dev/system/modules",component:Da},{path:"dev/attachmentconfigs",component:()=>{const{t:t}=I.useTranslation(),[i,o]=l.useState([]),a=Ue({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CODE",fieldName:"attachmentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",fieldName:"relatedDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",options:Ua,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",fieldName:"uploadDirectory",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",fieldName:"allowedFileTypes",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",fieldName:"attachmentCategories",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Is Category Mandatory",fieldName:"isCategoryRequired",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",fieldName:"maxAllowedNumberOfFiles",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",fieldName:"downloadAuthorityKey",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",fieldName:"uploadAuthorityKey",required:!1,fieldType:"text"}}];return e.jsx(xo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:r,keyColumnName:"id",gridTitle:t("ATTACHMENT_CONFIG_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_DELETE"}})}},{path:"dev/notifications",component:()=>{const{t:i}=I.useTranslation(),[o,a]=l.useState([]),r=t.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),d=t.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),s=Ue({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:a}),p=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:d,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:d,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",options:r,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:t=>e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",color:t?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:t?.row?.notificationIcon?e.jsx(m.FontAwesomeIcon,{icon:t.row.notificationIcon}):e.jsx(e.Fragment,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:t=>e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",color:t?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:t?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:t=>e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",color:t?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:t?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(xo,{apiActions:s,data:o,setData:a,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:p,keyColumnName:"id",gridTitle:i("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:i}=De(),o=t.useSelector(e=>e.AppLayout),{handleGetRequest:a,handlePostRequest:r}=Ce(),[d,s]=l.useState([]),p=t.useSelector(e=>e.AppInfo.value),c=()=>{!0===i.isAuthenticated&&a({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{s(e.data)}})};return!0===p?.enableUINotifications&&Jo(c,1e3),e.jsxs(e.Fragment,{children:[e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(n.Box,{sx:{flex:1}}),e.jsxs("h3",{children:[e.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===o.appDirection?"Notifications":"الاشعارات"]}),e.jsx(n.Box,{sx:{flex:1}}),e.jsx(n.Button,{sx:{textTransform:"none"},onClick:async()=>{await r({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),e.jsx(n.Button,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await r({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),e.jsx(n.Box,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:e.jsx(n.Box,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:d.map((t,i)=>e.jsx(ta,{...t,showDivider:i<d.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:Fo}]]],Qa=t=>{const{isUserAuthorized:i,isCurrentOrganizationAuthorizedToModule:o}=De();return t?.applicationModule&&!o(t?.applicationModule)?e.jsx(n.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:e.jsxs("h2",{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):t?.authority&&!i(t.authority)?e.jsx(n.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:e.jsxs("h2",{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):e.jsx(e.Fragment,{children:t.children})},Za=()=>{const i=t.useSelector(e=>e.AppLayout),o=t.useSelector(e=>e.AppInfo.value),a=t.useSelector(e=>e.AppInfo.value.businessRoutes),{UserInfo:r}=De(),s=t.useDispatch(),{show:p,hide:c}=ye(),u=t.useSelector(e=>e.commonStores),[m,T]=l.useState(!1),{isUserAuthorized:A}=De(),{handleGetRequest:_}=Ce();return l.useEffect(()=>{u?.storeKeys&&(async()=>{p("Loading ... please wait"),T(!1);const e=u.stores,t=u.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!A(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||await _({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{s(xe({storeKey:i,data:e.data}))},failureCallBkFn:()=>{s(xe({storeKey:i,data:[]}))}});T(!0),c()})()},[u.storeKeys,r?.currentOrganization]),e.jsx(d.CacheProvider,{value:"ltr"===i.appDirection?Na:Oa,children:m?e.jsx(n.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:e.jsxs(O.Routes,{children:[o.enableAdministrationModule?Ha.map((t,i)=>e.jsx(O.Route,{path:t.path,element:e.jsx(Qa,{authority:t.authority,applicationModule:t.applicationModule,children:e.jsx(t.component,{})})},"adm"+i)):null,a.map((t,i)=>e.jsx(O.Route,{path:t.path,element:e.jsx(Qa,{authority:t.authority,children:e.jsx(t.component,{})})},"bs"+i))]})}):e.jsx(e.Fragment,{})})},$a=s.styled("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:ae.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:ae.grey[900]})}));function Xa(i){const{window:o}=i,a=t.useSelector(e=>e.SideBar),r=t.useSelector(e=>e.AppInfo.value),d=t.useDispatch(),l=e=>{d($o(e))},s=void 0!==o?()=>o().document.body:void 0;return e.jsx(re,{container:s,anchor:"bottom",open:a.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[e.jsx($a,{}),e.jsx(n.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:e.jsx(Ia,{})}),e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[e.jsx(n.Typography,{sx:{fontSize:12},color:"textDisabled",children:r.appName}),e.jsxs(n.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",r.appVersion]})]})]})})}const Ja=()=>{const{t:i}=I.useTranslation(),o=t.useSelector(e=>e.loadingMask.value),a=t.useSelector(e=>e.AppLayout);return e.jsxs(n.Backdrop,{dir:a.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[e.jsx(n.CircularProgress,{color:"inherit"}),e.jsx("div",{style:{marginRight:10,marginLeft:10},children:o?.message||i("DEFAULT_LOADING_MESSAGE")})]})},er=()=>{const i=t.useSelector(e=>e.AppInfo.value),[o,a]=l.useState(""),[r,s]=l.useState(""),[p,c]=l.useState(!1),u=t.useSelector(e=>e.UserSession.value),m=t.useDispatch(),T=async()=>{if(null==o||""==o)return void A.toast.error("username is required to proceed");if(null==r||""==r)return void A.toast.error("password is required to proceed");c(!0);let e=null;try{if(e=await _.post(`${i.apiBaseUrl}/api/auth/login`,{username:o,password:r},{withCredentials:!0}),null!=e.data&&""!==e.data){c(!1);const t={...e.data,isAuthenticated:!0};m(Re.setAuthenticated(t))}}catch(e){c(!1),A.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},f=t.useSelector(e=>e.UserSession.value),I=n.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.dark?.primaryColor||qe} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:i.appTheme?.dark?.primaryColor||qe},secondary:{main:i.appTheme?.dark?.secondaryColor||Ke}}});return l.useEffect(()=>{console.log("checking usersession on reload",f),console.log("checking usersession app info",i),(async()=>{if(i?.apiBaseUrl&&null==f.isAuthenticated)try{let e=await _.get(`${i.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0});if(null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};m(Re.setAuthenticated(t))}else m(Re.setUnAuthenticated())}catch(e){m(Re.setUnAuthenticated())}})()},[i,f.isAuthenticated]),e.jsx(d.ThemeProvider,{theme:I,children:e.jsx(n.Paper,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==u.isAuthenticated?e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[e.jsx("img",{src:i?.appLogo,width:150,height:150}),e.jsx(n.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:i?.appName}),e.jsxs(n.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",i.appVersion]}),e.jsx(n.TextField,{label:"username",sx:{width:300,m:1},value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),e.jsx(n.TextField,{label:"password",sx:{width:300,m:1},value:r,type:"password",onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),e.jsx(n.Button,{loading:p,onClick:T,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):e.jsxs(e.Fragment,{children:[e.jsx(n.CircularProgress,{sx:{marginRight:1}}),e.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})})},tr=()=>{const[i,o]=l.useState({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:a}=Ce(),r=t.useSelector(e=>e.AppInfo.value);return l.useEffect(()=>{if(r?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{r?.checkLicense?.endpoint&&await a({endPointURI:r.checkLicense?.endpoint,successCallBkFn:e=>{o(e.data)}})})()},r?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[r]),i.isLicensed?e.jsx(e.Fragment,{}):e.jsxs(n.Box,{sx:{flex:1,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"fixed",top:0,background:"rgba(235, 235, 235, 0.8)",left:0,zIndex:9999},children:[e.jsx("img",{src:r.appLogo,style:{height:200,width:200}}),e.jsxs(n.Typography,{variant:"h5",children:[r.appName," - ",r.appVersion]}),e.jsx(n.Typography,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),e.jsx(n.Typography,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),e.jsxs(n.Typography,{children:["License Check @",i?.lastLicenseCheckTime||"--------"]}),e.jsxs(n.Typography,{children:["License Check Result :"," ",i?.lastLicenseCheckMessage||"--------"]})]})},ir=s.styled("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:i})=>{const o=t.useSelector(e=>e.AppLayout),a=s.useTheme(),r=ue();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&i?"calc(100% - 350px)":"100%",direction:o.appDirection,justifyContent:"flex-start",transition:!0===i?a.transitions.create(["margin","width"],{easing:a.transitions.easing.easeOut,duration:a.transitions.duration.enteringScreen}):a.transitions.create(["margin","width"],{easing:a.transitions.easing.sharp,duration:a.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==o.appDirection||!0!==i?0:me+"px",marginRight:r||"rtl"!==o.appDirection||!0!==i?0:me+"px"}});function or(){const i=t.useSelector(e=>e.SideBar),o=ue(),a=t.useSelector(e=>e.UserSession),r=t.useSelector(e=>e.AppLayout);return e.jsxs(O.BrowserRouter,{children:[e.jsx(A.ToastContainer,{rtl:"rtl"===r.appDirection,draggable:!0,position:"bottom-center"}),e.jsx(Ja,{}),!0===a.value.isAuthenticated?e.jsxs(ir,{open:i.isOpened,children:[e.jsx(p,{}),e.jsx(ra,{}),o?null:e.jsx(Ea,{}),o?e.jsx(Xa,{}):null,e.jsx(na,{}),e.jsx(Za,{}),e.jsx(tr,{})]}):e.jsx(er,{})]})}const ar=T.createSlice({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,enableUINotifications:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,t)=>{e.value=t.payload}}}),rr=ar.actions;var nr=ar.reducer;const dr={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemTimeIntervals:{autoLoad:!1,url:"",data:[{value:"second"},{value:"minute"},{value:"hour"},{value:"day"},{value:"week"},{value:"month"},{value:"year"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/public/organization/all",data:[]},SystemOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organization/ranks/all",data:[]},CurrentOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organizationrank/all",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organization/units/all",data:[]},CurrentOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organizationunit/all",data:[]},SystemOrganizationUnitType:{autoLoad:!0,url:"api/v1/public/organizationunittype/all",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"},SystemApplicationModules:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationmodule/application/all"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationrole/all"}},lr=i=>{const o=t.useDispatch();ne.LicenseInfo.setLicenseKey(i.muiPremiumKey);const a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.light?.primaryColor||Ye} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:i.appTheme?.light?.primaryColor||Ye},secondary:{main:i.appTheme?.light?.secondaryColor||Ve},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.dark?.primaryColor||qe} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:i.appTheme?.dark?.primaryColor||qe},secondary:{main:i.appTheme?.dark?.secondaryColor||Ke}}},s=t.useSelector(e=>e.AppLayout);let p={...a};"dark"===s.themeMode&&(p={...r});const c=n.createTheme({direction:s.appDirection,...p});return l.useEffect(()=>{document.title=i.documentTitle,o(rr.setAppInfo(i));let e={};i.enableAdministrationModule&&(e={...dr}),i.businessCommonStoresMetaData&&(e={...e,...i.businessCommonStoresMetaData}),o(be(e))},[i]),e.jsx(d.ThemeProvider,{theme:c,children:e.jsx(or,{})})};var sr={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>&copy;</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},pr={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 cr={...sr,...pr,...{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 ur={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>&copy;</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},mr={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 Tr={...ur,...mr,...{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(o.fab),i.library.add(a.far),i.library.add(r.fas);Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return t.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return t.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return m.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return A.toast}}),exports.axios=_,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return I.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return E.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return O.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return O.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return N.zodResolver}}),exports.z=ce,exports.AttachmentCard=Io,exports.AttachmentImageViewer=fo,exports.AttachmentPanel=Eo,exports.BaseApp=i=>{const[o,a]=l.useState({AppLayout:fe,UserSession:Le,loadingMask:Ne,commonStores:Se,SideBar:Xo,AppInfo:nr}),r=T.configureStore({reducer:o}),[n,d]=l.useState(!1);return l.useEffect(()=>{(()=>{const e={AppLayout:fe,UserSession:Le,loadingMask:Ne,commonStores:Se,SideBar:Xo,AppInfo:nr,...i?.businessReduxReducers};a(t=>({...e}));const t={en:{translation:{...cr,...i?.businessLocals?.en}},ar:{translation:{...Tr,...i?.businessLocals?.ar}}};f.use(I.initReactI18next).init({resources:t,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),d(!0)})()},[i]),n?e.jsx(t.Provider,{store:r,children:e.jsx(lr,{...i})}):e.jsx(e.Fragment,{})},exports.CheckBox=ke,exports.ComboBox=je,exports.DARK_THEME_INITIAL_MAIN_COLOR=qe,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=Ge,exports.DATE_TIME_FORMAT=We,exports.DashboardRouteView=zo,exports.DashboardViewer=Ko,exports.Datefield=ze,exports.DatetimeField=He,exports.ExcelReportViewer=So,exports.FormElement=To,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=Ye,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=Ve,exports.ReportViewer=Uo,exports.SystemLookupCombobox=Qe,exports.TemplateBarChart=Bo,exports.TemplateDataCard=ko,exports.TemplateForm=vo,exports.TemplateGauge=jo,exports.TemplateGrid=xo,exports.TemplateLineChart=Go,exports.TemplateLineProgress=Yo,exports.TemplatePieChart=Vo,exports.TemplateTextField=we,exports.TransferList=Be,exports.WorkflowDocumentPanel=wo,exports.WorkflowDocumentTimeLine=Oo,exports.WorkflowRouteComponent=Fo,exports.capitalizeFirstLetter=co,exports.constructGridColumnsFromFields=it,exports.constructValidationSchema=ot,exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=at,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=so,exports.isNumeric=po,exports.isValidEmail=uo,exports.timeAgo=mo,exports.useApiActions=Ue,exports.useAxios=Ce,exports.useConfirmationWindow=ge,exports.useIsMobile=ue,exports.useLoadingMask=ye,exports.useSession=De,exports.useWindow=Pe,Object.keys(n).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})}),Object.keys(de).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return de[e]}})}),Object.keys(le).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return le[e]}})});
38
38
  //# sourceMappingURL=index.js.map