@asaleh37/ui-base 25.9.1 → 25.9.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.d.ts +5 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/common/Login.tsx +101 -75
- package/src/main.tsx +5 -1
- package/src/redux/features/common/AppInfoSlice.ts +6 -0
package/dist/index.mjs
CHANGED
|
@@ -34,7 +34,7 @@ function(e,t){const i=St(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
|
|
|
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
|
-
`,wn=e=>{const t=Ue(),i=y(e=>e.AppLayout),{handlePostRequest:o}=Qt();return f(T,{children:[f(v,{fullWidth:!0,onClick:()=>{var i;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&t(e.notificationActionPayload),e?.isNotified||(i=e.id,o({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:i}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[f(S,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?g(Re,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):g(T,{}),"ltr"===i.appDirection?e.notificationEnText:e.notificationArText,g(S,{sx:{flex:1}}),e?.isNotified?g(T,{}):f(k,{color:"warning",sx:{animation:`${Pn} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[g(Re,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===i.appDirection?"New":"جديد"]})]}),f(S,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[g(S,{sx:{marginRight:1,marginLeft:1},children:xr(e.createTime,i.appDirection)}),g(S,{sx:{flex:1}}),g(S,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?g(Q,{flexItem:!0}):g(T,{})]})},vn=()=>{const{UserInfo:e}=Zt(),[t,i]=me(null),{handleGetRequest:o,handlePostRequest:r}=Qt(),n=Ue(),a=y(e=>e.AppLayout),[s,l]=me(!1),[d,c]=me([]);bn(()=>{!0===e.isAuthenticated&&o({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>d.length&&we.info("ltr"===a.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===a.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),c(e.data)}})},1e3);return g(ie,{onClickAway:()=>{l(!1)},children:f("div",{style:{cursor:"pointer"},children:[g(U,{color:"inherit",onClick:e=>{i(e.currentTarget),l(!s)},sx:{marginRight:1,marginLeft:1},children:g($,{anchorOrigin:{vertical:"top",horizontal:"ltr"===a.appDirection?"right":"left"},badgeContent:d.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:g(Re,{icon:"bell"})})}),g(Y,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:s,anchorEl:t,dir:a.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>g(oe,{...e,timeout:350,children:f(x,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[g(Q,{variant:"fullWidth",flexItem:!0,children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?"Notifications":"الاشعارات"]})}),0==d.length?g(S,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:g(S,{children:"ltr"===a.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):g(T,{}),g(S,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:d.map((e,t)=>g(wn,{...e,setOpen:l,showDivider:t<d.length-1}))}),g(Q,{variant:"fullWidth",flexItem:!0,children:g(v,{sx:{textTransform:"none"},onClick:()=>{n("myNotifications")},children:"ltr"===a.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},Ln=e=>{const[t,i]=me(""),[o,r]=me(""),[n,a]=me(""),{handlePostRequest:s}=Qt();return f(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[f(S,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),g(Q,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?g(ri,{label:"Current Password",value:t,onChange:e=>{i(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):g(T,{}),g(ri,{label:"New Password",value:o,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(ri,{label:"Confirm New Password",value:n,onChange:e=>{a(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(v,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==t&&""!==t.trim()?null!==o&&""!==o&&null!==n&&""!==n&&o==n?await s({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:t,newPassword:o},successCallBkFn:()=>{e.onSuccessCallBk(),we.success("Your request has been processed successfully")},showMask:!0}):we.error("You must enter new password in required fields and must be identical"):we.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},Sn=z(Ce,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=y(e=>e.AppLayout),i=Ut();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:i?void 0:"calc(100% - 350px)",marginLeft:i||"ltr"!==t.appDirection?void 0:"350px",marginRight:i||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),Mn=()=>{const{Window:e,setWindowState:t}=Jt({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),i=y(e=>e.AppInfo.value),[o,r]=me(null),n=()=>{r(null)},a=e=>{r(e.currentTarget)},s=y(e=>e.AppLayout),l=y(e=>e.SideBar),{UserSession:d}=Zt(),c=d.value.currentOrganization,{Window:p,setWindowState:u}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:h}=Qt(),m=Ut(),I=A();return f(T,{children:[g(p,{children:g(Ln,{selectedPerson:d.value,isSelfService:!0,onSuccessCallBk:()=>{u(!1)}})}),g(re,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:o,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(o),onClose:n,children:g(j,{onClick:()=>{u(!0),n()},children:g(k,{sx:{textAlign:"center"},children:"Change Password"})})}),g(e,{children:g(En,{successChangeCallBackFn:()=>{t(!1)}})}),g(Sn,{position:"fixed",open:l.isOpened,children:f(Ne,{children:[g(U,{color:"inherit","aria-label":"open drawer",onClick:()=>{I(Cn())},edge:"start",sx:[{mr:"ltr"===s.appDirection?2:void 0,ml:"rtl"===s.appDirection?2:void 0},l.isOpened&&{display:"none"}],children:g(Re,{icon:"bars"})}),g(Hr,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:d?.value?.currentOrganization?.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),g(k,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:m?"":`${i.appName} - ${"ltr"===s.appDirection?c?.organizationEnName:c?.organizationArName}`}),g(V,{title:"light"===s.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:g(U,{color:"inherit",onClick:()=>{I(Bt.setThemeMode("light"===s.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===s.themeMode?"dark":"light")},children:"light"===s.themeMode?g(Re,{icon:"moon"}):g(Re,{icon:{prefix:"far",iconName:"sun"}})})}),g(V,{title:"ar"===Se.language?"Change Language To English":"Change Language To Arabic",children:g(U,{color:"inherit",onClick:()=>{let e="ar"===Se.language?"en":"ar";var t;t=e,Se.changeLanguage(t),localStorage.setItem("language",t),I(Bt.setAppDirection("ar"===e?"rtl":"ltr"))},children:g(Re,{icon:"language"})})}),d.value?.userOrganizations&&d.value?.userOrganizations.length>1?g(V,{title:"Change Current Organization",children:g(U,{color:"inherit",onClick:()=>{t(!0)},children:g(Re,{icon:"globe"})})}):g(T,{}),g(!0===i?.enableUINotifications?vn:T,{}),g("div",{onClick:a,style:{cursor:"pointer"},children:g(Hr,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:d.value?.id+""})}),g("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:a,children:m?"":d.value?.username}),g(U,{color:"inherit",onClick:async()=>{try{await h({endPointURI:"api/auth/logout"})}catch(e){}I(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")},children:g(Re,{rotation:"rtl"===s.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},Dn=z("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),kn=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=kn(e,i.children);if(t)return t}}},Un=[...[{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 xn(){return g(pt,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const Fn=Ie(_t)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${yt.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),Bn=Ie(Et)(({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:_e(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})}})),qn=ft(Tt);function Wn(e){const t=gt({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return g(qn,{style:t,...e})}const Gn=Ie(at)({color:"inherit",fontWeight:500});function Hn({icon:e,expandable:t,children:i,...o}){const{t:r}=Me(),n=y(e=>e.AppLayout);return f(Nt,{...o,sx:{display:"flex",alignItems:"center",padding:1},children:[g(Re,{style:{marginRight:"ltr"===n.appDirection?7:void 0,marginLeft:"rtl"===n.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),g(Gn,{variant:"body2",sx:{fontSize:16},children:r(i)}),t&&g(xn,{})]})}const Yn=e=>Array.isArray(e)?e.length>0&&e.some(Yn):Boolean(e),Kn=ue.forwardRef(function(e,t){const{id:i,itemId:o,label:r,disabled:n,children:a,...s}=e,{getRootProps:l,getContentProps:d,getIconContainerProps:c,getCheckboxProps:p,getLabelProps:u,getGroupTransitionProps:h,getDragAndDropOverlayProps:m,status:T,publicAPI:A}=It({id:i,itemId:o,children:a,label:r,disabled:n,rootRef:t}),y=A.getItem(o),I=Yn(a);return g(bt,{itemId:o,children:f(Fn,{...l(s),children:[f(Bn,{...d({className:wr("content",{"Mui-expanded":T.expanded,"Mui-selected":T.selected,"Mui-focused":T.focused,"Mui-disabled":T.disabled})}),children:[g(Ot,{...c(),children:g(Rt,{status:T})}),g(Ct,{...p()}),g(Hn,{...u({icon:y?.icon||"book",expandable:I&&T.expanded})}),g(Pt,{...m()})]}),a&&g(Wn,{...h()})]})})});function Vn(){const e=Ue(),t=y(e=>e.AppLayout),i=y(e=>e.AppInfo.value);A();const o=Ut(),{isUserAuthorized:r,isCurrentOrganizationAuthorizedToModule:n}=Zt(),a=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||r(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||n(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=a(i.children)),t.push(e)}return t},s=[];i.enableAdministrationModule&&s.push(...structuredClone(Un)),s.push(...structuredClone(i.businessNavigationItems));const l=a(s);return g(At,{items:l,onItemClick:(t,i)=>{const o=kn(i,s);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||e(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:xt,direction:t.appDirection,maxHeight:o?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Kn}})}const zn=()=>{const e=y(e=>e.AppInfo.value),{UserSession:t}=Zt(),i=t.value.currentOrganization,o=ne(),r=y(e=>e.AppLayout),n=y(e=>e.SideBar),a=A();return f(mt,{sx:{width:xt,flexShrink:0,"& .MuiDrawer-paper":{width:xt,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===r.appDirection?"left":"right",open:n.isOpened,children:[f(Dn,{children:[f(S,{sx:{width:"100%"},children:[g(k,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===r.appDirection?i?.organizationEnName:i?.organizationArName}`}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),g(ht,{onClick:()=>{a(Cn())},children:"ltr"===o.direction?g(Re,{icon:"angle-left"}):g(Re,{icon:"angle-right"})})]}),g(Ze,{}),g(Vn,{})]})},$n=Lt({key:"muirtl",stylisPlugins:[vt,wt]}),Qn=Lt({key:"mui"}),jn=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=Qt();fe(()=>{e.selectedRecord&&(async()=>{await a({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{i(e.data.currentRoles),r(e.data.availableRoles)}})})()},[e.selectedRecord]);return f(T,{children:[g(si,{displayField:"roleName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:t,successCallBkFn:()=>{we.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Zn=e=>{const[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),n=y(e=>e.commonStores.stores.SystemOrganizations.data),a=y(e=>e.commonStores.stores.SystemOrganizationRanks.data),s=y(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:l}=Me(),[d,c]=me([]),p=oi({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:c}),u=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:s,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 f(T,{children:[g(o,{children:g(jn,{selectedRecord:t,closeModalFn:()=>{r(!1)}})}),g(rn,{apiActions:p,hideInfoBar:!0,data:d,setData:c,editMode:{editMode:"row"},formElements:u,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{i(e),r(!0)}}],gridLoadParametersValues:{personId:e.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async t=>(t.personId=e.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Jn=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:i}),{handleGetRequest:r}=Qt(),n=y(e=>e.commonStores.stores.SystemOrganizationRanks),a=A();return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,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 r({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{a(ei({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{a(ei({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Xn=()=>{const{t:e}=Me(),[t,i]=me([]),{handleGetRequest:o}=Qt(),r=y(e=>e.commonStores.stores.SystemOrganizationUnits),n=A(),a=oi({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:i}),s=y(e=>e.commonStores.stores.SystemOrganizationUnitType.data);return g(rn,{apiActions:a,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:t,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await o({endPointURI:r.url,showMask:!1,successCallBkFn:e=>{n(ei({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{n(ei({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},ea=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:i});return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,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"}})},ta=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:i}),r=y(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:n}=Qt();return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},ia=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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"}})},oa=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=Qt();fe(()=>{e.roleId&&(async()=>{await a({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{i(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()},[e.roleId]);return f(T,{children:[g(si,{displayField:"authorityName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:t,successCallBkFn:()=>{we.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},ra=()=>{const{t:e}=Me(),[t,i]=me([]),[o,r]=me(null),{Window:n,setWindowState:a}=Jt({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),s=oi({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:i});return f(T,{children:[g(n,{children:g(oa,{roleId:o?.id,closeModalFn:()=>{a(!1)}})}),g(rn,{apiActions:s,data:t,hideInfoBar:!0,setData:i,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),a(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},na=e=>{const t=y(e=>e.commonStores.stores.SystemEntityParameters.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:r});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:t,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:i("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async t=>(t.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},aa=()=>{const e=y(e=>e.commonStores.stores.SystemOrganizations.data),{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:o});return g(rn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:e,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}],keyColumnName:"id",gridTitle:t("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},sa=e=>{const{t:t}=Me(),i=y(e=>e.commonStores.stores.SystemEntityParameters.data),[o,r]=me([]),n=oi({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:r}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:i,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 g(rn,{apiActions:n,data:o,hideInfoBar:!0,setData:r,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:t("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async t=>(t.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},la=[{value:"FILE_SYSTEM"},{value:"SFTP"}],da=(e,t,i,o,r)=>{o?("useSysDatasource"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===o&&("Blueprint"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===r?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))):(e?.useSysCon&&t.hideField("datasourceConId"),e?.reportType?"Blueprint"===e?.reportType?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===e?.reportType?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===e?.reportType&&(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))},ca=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:o});return g(rn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value",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:t("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!Ur(t.recipientMail)?(we.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},pa=e=>{const{t:t}=Me(),[i,o]=me([]),r=y(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:o}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:r,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return g(rn,{apiActions:n,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:o,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:a,keyColumnName:"id",gridTitle:t("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},ua=e=>{const t=y(e=>e.commonStores.stores.SystemReports.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:r}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:t,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return g(rn,{apiActions:n,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:i("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},ha={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}}},ma=(e,t,i)=>{if(e&&ha[e]){const o=ha[e],r=Object.keys(o);for(const e of r){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)},fa=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:o}),n=y(e=>e.commonStores.stores.SystemDataQueries.data),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return g(rn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:a,keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},ga=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"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:y(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 g(rn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:o,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:t=>(t.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Ta=e=>{const[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=Me(),{handleGetRequest:a}=Qt(),[s,l]=me([]);fe(()=>{(async()=>{await a({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{l(e.data)}})})()},[e.selectedRecord]);const[d,c]=me([]),p=oi({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:c}),u=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"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 f(T,{children:[g(o,{children:g(ga,{selectedRecord:t})}),g(rn,{apiActions:p,data:d,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:c,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{i(e),r(!0)}}],formElements:u,keyColumnName:"id",gridTitle:n("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},Aa=e=>{const{t:t}=Me(),[i,o]=me([]),r=y(e=>e.commonStores.stores.SystemWidgets.data),n=oi({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:o});return g(rn,{apiActions:n,data:i,setData:o,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:t("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async t=>(t.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},ya=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:i}),r=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Hr,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return g(T,{children:g(rn,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:o,data:t,setData:i,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:Zn,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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:Jn,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Xn,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:ea,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=Me(),[t,i]=me(null),{UserInfo:o}=Zt(),r=y(e=>e.commonStores.stores.CurrentOrganizationRanks.data),n=y(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[a,s]=me([]),l=oi({findAll:"api/v1/public/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:s}),[d,c]=me(null),{Window:p,setWindowState:u}=Jt({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:h,setWindowState:m}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:A,setWindowState:I}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),_=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Hr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:n,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 f(T,{children:[g(h,{children:g(jn,{selectedRecord:d,closeModalFn:()=>{m(!1)}})}),g(p,{children:g(Zn,{selectedPerson:t})}),g(A,{children:g(Ln,{selectedPerson:t,isSelfService:!1,onSuccessCallBk:()=>{I(!1)}})}),g(rn,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:l,data:a,setData:s,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:_,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{i(e),I(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{c({organizationId:o?.currentOrganization?.id,id:e?.organizationMemberId}),m(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{i(e),u(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(we.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||(we.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({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:i});return g(T,{children:g(rn,{apiActions:o,data:t,setData:i,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:ta,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:ia,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:ra,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:e}=Me(),{handleGetRequest:t}=Qt(),[i,o]=me([]),r=oi({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:o}),n=y(e=>e.commonStores.stores.SystemApplicationModules.data);return g(rn,{apiActions:r,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},authority:"ORGANIZATION_ADMIN"},{path:"admin/org/unit/types",component:ea,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Xn,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Jn,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=Me(),t=y(e=>e.commonStores.stores.SystemDataQueries.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:o});return g(rn,{apiActions:r,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:t,optionDisplayField:"queryName",optionValueField:"id"}}],keyColumnName:"id",gridTitle:e("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[e,t]=me(null),{Window:i,setWindowState:o}=Jt({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),r=y(e=>e.commonStores.stores.SystemDataSources.data),{t:n}=Me(),[a,s]=me([]),l=oi({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:s}),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:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:r,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return f(T,{children:[g(i,{children:g(na,{selectedRecord:e})}),g(rn,{apiActions:l,rowActions:[{label:"Query Parameters",actionFn:async e=>{t(e),o(!0)},icon:"p"}],data:a,setData:s,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:d,keyColumnName:"id",gridTitle:n("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"},formProps:{formValuesChangeCallBk:(e,t,i,o,r)=>{o?"useSysCon"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=Qt(),t=y(e=>e.commonStores.stores.SystemDataSourceType.data),{t:i}=Me(),[o,r]=me([]),n=oi({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:r,commonStoreKey:"SystemDataSources"});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:t,comboboxValueDataType:"string",optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async t=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:t.id},successCallBkFn:e=>{we.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:e}=Me(),t=y(e=>e.commonStores.stores.SystemParameterTypes.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:o}),n=y(e=>e.commonStores.stores.SystemDataQueries.data);return g(rn,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:t,comboboxValueDataType:"string",optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:n,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,i,o,r,n)=>{o?"parameterType"===o?("combobox"===r?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField")),"date"===r||"datetime"===r?(t.showField("parameterValueFormat"),"date"===r?i.setValue("parameterValueFormat",ci):i.setValue("parameterValueFormat",pi)):(t.hideField("parameterValueFormat"),i.setValue("parameterValueFormat",null))):"parameterDataQueryId"==o?null!=r&&""!=r?(i.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==o&&(null!=r&&""!=r?(i.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):"date"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",ci)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",pi)):(i.setValue("parameterValueFormat",null),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.hideField("parameterValueFormat"))}},editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:aa,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:n,setWindowState:a}=Jt({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[s,l]=me([]),d=y(e=>e.commonStores.stores.SystemDataSources.data),c=y(e=>e.commonStores.stores.SystemDataQueries.data),p=y(e=>e.commonStores.stores.SystemBluePrints.data),u=oi({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:l}),h=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!1,hidden:!0,gridProps:{hidden:!0},comboboxValueDataType:"string",fieldType:"combobox",options:la,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:d,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:p,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:c,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 f(T,{children:[g(o,{children:g(ln,{reportCode:t?.reportCode,resultMode:"App"})}),g(n,{children:g(sa,{selectedRecord:t})}),g(rn,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:u,data:s,setData:l,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)=>{i(e),a(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{i(e),r(!0)}}],formProps:{formValuesChangeCallBk:da},formElements:h,keyColumnName:"id",gridTitle:e("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(we.error("You must choose the report query"),!1):(we.error("You must choose the report blueprint"),!1):(we.error("You must enter the jasper report name"),!1):(we.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=y(e=>e.commonStores.stores.SystemDataQueries.data),t=y(e=>e.commonStores.stores.SystemTimeIntervals.data),[i,o]=me(null),{Window:r,setWindowState:n}=Jt({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:a,setWindowState:s}=Jt({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:l,setWindowState:d}=Jt({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:c}=Me(),[p,u]=me([]),h=oi({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:u}),m=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:t,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return f(T,{children:[g(r,{children:g(ca,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(a,{children:g(pa,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(l,{children:g(ua,{selectedRecord:i,callBkFn:()=>{d(!1)}})}),g(rn,{apiActions:h,data:p,setData:u,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:m,keyColumnName:"id",gridTitle:c("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{o(e),n(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{o(e),s(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{o(e),d(!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)||(we.error("You must specifiy the start sending time since this email is periodical"),!1):(we.error("You must specifiy the period value since this email is periodical"),!1):(we.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o,r){ma(t,o,i)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{ma(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,t]=me(null),{Window:i,setWindowState:o}=Jt({windowTitle:"Document Status",windowIcon:"tag"}),{Window:r,setWindowState:n}=Jt({windowTitle:"Document Action",windowIcon:"stamp"}),a=y(e=>e.commonStores.stores.SystemOrganizations.data),s=y(e=>e.commonStores.stores.SystemReports.data),l=y(e=>e.commonStores.stores.SystemDataSources.data),{t:d}=Me(),[c,p]=me([]),u=oi({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:p}),h=[{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:a,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:s,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:l,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 f(T,{children:[g(i,{children:g(fa,{selectedRecord:e})}),g(r,{children:g(Ta,{selectedRecord:e})}),g(rn,{apiActions:u,data:c,setData:p,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{t(e),o(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{t(e),n(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:d("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:h,keyColumnName:"id",gridTitle:d("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:e}=Me(),t=y(e=>e.commonStores.stores.SystemDataQueries.data),i=y(e=>e.commonStores.stores.SystemWidgetTypes.data),[o,r]=me([]),n=oi({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:r});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:i,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:t,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!0,fieldType:"text"}}]}}],keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:e}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,a]=me([]),s=Ue(),l=oi({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:a});return f(T,{children:[g(o,{children:g(Aa,{selectedRecord:t})}),g(rn,{apiActions:l,data:n,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:"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=>{i(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{s("/dashboard/"+e.dashboardCode)}}],gridTitle:e("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:_n},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=Me(),[t,i]=me([]),{handlePostRequest:o}=Qt(),r=oi({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:i}),n=y(e=>e.commonStores.stores.SystemMailTemplates.data);return g(rn,{apiActions:r,disableDefaultAction:!0,data:t,setData:i,editMode:{editMode:"none"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],rowActions:[{actionFn:async e=>{(async e=>{await o({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{r.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],keyColumnName:"id",gridTitle:e("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}},{path:"dev/system/authorities",component:ta},{path:"dev/system/roles",component:ra},{path:"dev/system/lookups",component:aa},{path:"dev/system/modules",component:ia},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CODE",fieldName:"attachmentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",fieldName:"relatedDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:la,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",fieldName:"uploadDirectory",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",fieldName:"allowedFileTypes",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",fieldName:"attachmentCategories",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Is Category Mandatory",fieldName:"isCategoryRequired",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",fieldName:"maxAllowedNumberOfFiles",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",fieldName:"downloadAuthorityKey",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",fieldName:"uploadAuthorityKey",required:!1,fieldType:"text"}}],keyColumnName:"id",gridTitle:e("ATTACHMENT_CONFIG_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_DELETE"}})}},{path:"dev/notifications",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=y(e=>e.commonStores.stores.SystemTimeIntervals.data),r=y(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:i}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:r,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:r,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",comboboxValueDataType:"string",options:o,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?g(Re,{icon:e.row.notificationIcon}):g(T,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return g(rn,{apiActions:n,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:a,keyColumnName:"id",gridTitle:e("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:e}=Zt(),t=y(e=>e.AppLayout),{handleGetRequest:i,handlePostRequest:o}=Qt(),[r,n]=me([]),a=y(e=>e.AppInfo.value),s=()=>{!0===e.isAuthenticated&&i({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{n(e.data)}})};return!0===a?.enableUINotifications&&bn(s,1e3),f(T,{children:[f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(S,{sx:{flex:1}}),f("h3",{children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===t.appDirection?"Notifications":"الاشعارات"]}),g(S,{sx:{flex:1}}),g(v,{sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),g(v,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),g(S,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:g(S,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:r.map((e,t)=>g(wn,{...e,showDivider:t<r.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:pn}]]],Ia=e=>{const{isUserAuthorized:t,isCurrentOrganizationAuthorizedToModule:i}=Zt();return e?.applicationModule&&!i(e?.applicationModule)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!t(e.authority)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):g(T,{children:e.children})},_a=()=>{const e=y(e=>e.AppLayout),t=y(e=>e.AppInfo.value),i=y(e=>e.AppInfo.value.businessRoutes),{UserInfo:o}=Zt(),r=A(),{show:n,hide:a}=Kt(),s=y(e=>e.commonStores),[l,d]=me(!1),{isUserAuthorized:c}=Zt(),{handleGetRequest:p}=Qt();return fe(()=>{s?.storeKeys&&(async()=>{n("Loading ... please wait"),d(!1);const e=s.stores,t=s.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!c(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||p({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{r(ei({storeKey:i,data:e.data}))},failureCallBkFn:()=>{r(ei({storeKey:i,data:[]}))}});d(!0),a()})()},[s.storeKeys,o?.currentOrganization]),g(ce,{value:"ltr"===e.appDirection?Qn:$n,children:g(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:f(Fe,{children:[t.enableAdministrationModule?ya.map((e,t)=>g(Be,{path:e.path,element:g(Ia,{authority:e.authority,applicationModule:e.applicationModule,children:g(e.component,{})})},"adm"+t)):null,i.map((e,t)=>g(Be,{path:e.path,element:g(Ia,{authority:e.authority,children:g(e.component,{})})},"bs"+t))]})})})},Ea=Ie("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:Mt[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:Mt[900]})}));function Oa(e){const{window:t}=e,i=y(e=>e.SideBar),o=y(e=>e.AppInfo.value),r=A(),n=e=>{r(Nn(e))};return g(Dt,{container:void 0!==t?()=>t().document.body:void 0,anchor:"bottom",open:i.isOpened,onClose:()=>{n(!1)},onOpen:()=>{n(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[g(Ea,{}),g(S,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:g(Vn,{})}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:o.appName}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",o.appVersion]})]})]})})}const Ca=()=>{const{t:e}=Me(),t=y(e=>e.loadingMask.value),i=y(e=>e.AppLayout);return f(ae,{dir:i.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:t.isOpened,children:[g(se,{color:"inherit"}),g("div",{style:{marginRight:10,marginLeft:10},children:t?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Na=()=>{const e=y(e=>e.AppInfo.value),[t,i]=me(""),[o,r]=me(""),[n,a]=me(!1),s=y(e=>e.UserSession.value),l=A(),d=async()=>{if(null==t||""==t)return void we.error("username is required to proceed");if(null==o||""==o)return void we.error("password is required to proceed");a(!0);let i=null;try{if(i=await Le.post(`${e.apiBaseUrl}/api/auth/login`,{username:t,password:o},{withCredentials:!0}),null!=i.data&&""!==i.data){a(!1);const e={...i.data,isAuthenticated:!0};i?.data?.token&&localStorage.setItem("TOKEN",i.data.token),l(zt.setAuthenticated(e))}}catch(e){a(!1),we.error(e?.response?.data||"failed to authenticate, contact your administrator")}},c=y(e=>e.UserSession.value),p=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||mi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:e.appTheme?.dark?.primaryColor||mi},secondary:{main:e.appTheme?.dark?.secondaryColor||fi}}});return fe(()=>{console.log("checking usersession on reload",c),console.log("checking usersession app info",e),(async()=>{if(e?.apiBaseUrl&&null==c.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await Le.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};l(zt.setAuthenticated(e))}else l(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){l(zt.setUnAuthenticated())}}})()},[e,c.isAuthenticated]),g(pe,{theme:p,children:g(x,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==s.isAuthenticated?f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[g("img",{src:e?.appLogo,width:150,height:150}),g(k,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),f(k,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),g(F,{label:"username",sx:{width:300,m:1},value:t,onChange:e=>{i(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(F,{label:"password",sx:{width:300,m:1},value:o,type:"password",onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(v,{loading:n,onClick:d,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):f(T,{children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})})},Ra=()=>{const[e,t]=me({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:i}=Qt(),o=y(e=>e.AppInfo.value);return fe(()=>{if(o?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{o?.checkLicense?.endpoint&&await i({endPointURI:o.checkLicense?.endpoint,successCallBkFn:e=>{t(e.data)}})})()},o?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[o]),e.isLicensed?g(T,{}):f(S,{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:[g("img",{src:o.appLogo,style:{height:200,width:200}}),f(k,{variant:"h5",children:[o.appName," - ",o.appVersion]}),g(k,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),g(k,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),f(k,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),f(k,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},ba=({msalInstance:e})=>{const t=y(e=>e.AppInfo.value),i=y(e=>e.UserSession.value),{handleGetRequest:o}=Qt(),r=A();return g(S,{children:g(v,{onClick:async()=>{const n=await e.acquireTokenPopup({scopes:t?.azureConfiguration?.scopes});n?.accessToken&&(localStorage.setItem("TOKEN",n.accessToken),(async()=>{t?.apiBaseUrl&&null==i.isAuthenticated&&(localStorage.getItem("TOKEN"),o({endPointURI:"api/auth/userInfo",showMask:!0,successCallBkFn:e=>{if(null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};r(zt.setAuthenticated(t))}else r(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")}}))})())},children:"Azure Login "})})},Pa=Ie("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const i=y(e=>e.AppLayout),o=Ee(),r=Ut();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&t?"calc(100% - 350px)":"100%",direction:i.appDirection,justifyContent:"flex-start",transition:!0===t?o.transitions.create(["margin","width"],{easing:o.transitions.easing.easeOut,duration:o.transitions.duration.enteringScreen}):o.transitions.create(["margin","width"],{easing:o.transitions.easing.sharp,duration:o.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==i.appDirection||!0!==t?0:xt+"px",marginRight:r||"rtl"!==i.appDirection||!0!==t?0:xt+"px"}}),wa=({msalInstance:e})=>{const t=y(e=>e.SideBar),i=y(e=>e.AppInfo.value),o=Ut(),r=y(e=>e.UserSession),n=y(e=>e.AppLayout);return f(qe,{children:[g(ve,{rtl:"rtl"===n.appDirection,draggable:!0,position:"bottom-center"}),g(Ca,{}),!0===r.value.isAuthenticated?f(Pa,{open:t.isOpened,children:[g(Oe,{}),g(Mn,{}),o?null:g(zn,{}),o?g(Oa,{}):null,g(Dn,{}),g(_a,{}),g(Ra,{})]}):"AZURE"===i.authenticationMethod?g(ba,{msalInstance:e}):g(Na,{})]})},va=be({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}}}),La=va.actions;var Sa=va.reducer;const Ma={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"}},Da={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},ka=200,Ua=400,xa=400,Fa=499,Ba=500,qa=599,Wa="GET",Ga="POST",Ha=[Da.OPENID_SCOPE,Da.PROFILE_SCOPE,Da.OFFLINE_ACCESS_SCOPE],Ya=[...Ha,Da.EMAIL_SCOPE],Ka="Content-Type",Va="Content-Length",za="Retry-After",$a="X-AnchorMailbox",Qa="x-ms-request-id",ja="x-ms-httpver",Za="active-account-filters",Ja="common",Xa="organizations",es="consumers",ts="access_token",is="xms_cc",os="login",rs="select_account",ns="consent",as="none",ss="no_session",ls="code",ds="id_token token refresh_token",cs="query",ps="fragment",us="query",hs="authorization_code",ms="refresh_token",fs="MSSTS",gs="ADFS",Ts="Generic",As="-",ys=".",Is={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},_s="appmetadata",Es="1",Os="authority-metadata",Cs=86400,Ns="config",Rs="cache",bs="network",Ps="hardcoded_values",ws={SCHEMA_VERSION:5,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},vs={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},Ls=60,Ss=3600,Ms="throttling",Ds="retry-after, h429",ks="invalid_grant",Us="client_mismatch",xs="1",Fs="3",Bs="4",qs="2",Ws="4",Gs="5",Hs="0",Ys="1",Ks="2",Vs="3",zs="4",$s="pop",Qs="unexpected_error",js="post_request_failed",Zs={[Qs]:"Unexpected error in authentication.",[js]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};
|
|
37
|
+
`,wn=e=>{const t=Ue(),i=y(e=>e.AppLayout),{handlePostRequest:o}=Qt();return f(T,{children:[f(v,{fullWidth:!0,onClick:()=>{var i;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&t(e.notificationActionPayload),e?.isNotified||(i=e.id,o({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:i}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[f(S,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?g(Re,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):g(T,{}),"ltr"===i.appDirection?e.notificationEnText:e.notificationArText,g(S,{sx:{flex:1}}),e?.isNotified?g(T,{}):f(k,{color:"warning",sx:{animation:`${Pn} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[g(Re,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===i.appDirection?"New":"جديد"]})]}),f(S,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[g(S,{sx:{marginRight:1,marginLeft:1},children:xr(e.createTime,i.appDirection)}),g(S,{sx:{flex:1}}),g(S,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?g(Q,{flexItem:!0}):g(T,{})]})},vn=()=>{const{UserInfo:e}=Zt(),[t,i]=me(null),{handleGetRequest:o,handlePostRequest:r}=Qt(),n=Ue(),a=y(e=>e.AppLayout),[s,l]=me(!1),[d,c]=me([]);bn(()=>{!0===e.isAuthenticated&&o({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>d.length&&we.info("ltr"===a.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===a.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),c(e.data)}})},1e3);return g(ie,{onClickAway:()=>{l(!1)},children:f("div",{style:{cursor:"pointer"},children:[g(U,{color:"inherit",onClick:e=>{i(e.currentTarget),l(!s)},sx:{marginRight:1,marginLeft:1},children:g($,{anchorOrigin:{vertical:"top",horizontal:"ltr"===a.appDirection?"right":"left"},badgeContent:d.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:g(Re,{icon:"bell"})})}),g(Y,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:s,anchorEl:t,dir:a.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>g(oe,{...e,timeout:350,children:f(x,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[g(Q,{variant:"fullWidth",flexItem:!0,children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?"Notifications":"الاشعارات"]})}),0==d.length?g(S,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:g(S,{children:"ltr"===a.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):g(T,{}),g(S,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:d.map((e,t)=>g(wn,{...e,setOpen:l,showDivider:t<d.length-1}))}),g(Q,{variant:"fullWidth",flexItem:!0,children:g(v,{sx:{textTransform:"none"},onClick:()=>{n("myNotifications")},children:"ltr"===a.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},Ln=e=>{const[t,i]=me(""),[o,r]=me(""),[n,a]=me(""),{handlePostRequest:s}=Qt();return f(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[f(S,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),g(Q,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?g(ri,{label:"Current Password",value:t,onChange:e=>{i(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):g(T,{}),g(ri,{label:"New Password",value:o,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(ri,{label:"Confirm New Password",value:n,onChange:e=>{a(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(v,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==t&&""!==t.trim()?null!==o&&""!==o&&null!==n&&""!==n&&o==n?await s({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:t,newPassword:o},successCallBkFn:()=>{e.onSuccessCallBk(),we.success("Your request has been processed successfully")},showMask:!0}):we.error("You must enter new password in required fields and must be identical"):we.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},Sn=z(Ce,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=y(e=>e.AppLayout),i=Ut();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:i?void 0:"calc(100% - 350px)",marginLeft:i||"ltr"!==t.appDirection?void 0:"350px",marginRight:i||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),Mn=()=>{const{Window:e,setWindowState:t}=Jt({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),i=y(e=>e.AppInfo.value),[o,r]=me(null),n=()=>{r(null)},a=e=>{r(e.currentTarget)},s=y(e=>e.AppLayout),l=y(e=>e.SideBar),{UserSession:d}=Zt(),c=d.value.currentOrganization,{Window:p,setWindowState:u}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:h}=Qt(),m=Ut(),I=A();return f(T,{children:[g(p,{children:g(Ln,{selectedPerson:d.value,isSelfService:!0,onSuccessCallBk:()=>{u(!1)}})}),g(re,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:o,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(o),onClose:n,children:g(j,{onClick:()=>{u(!0),n()},children:g(k,{sx:{textAlign:"center"},children:"Change Password"})})}),g(e,{children:g(En,{successChangeCallBackFn:()=>{t(!1)}})}),g(Sn,{position:"fixed",open:l.isOpened,children:f(Ne,{children:[g(U,{color:"inherit","aria-label":"open drawer",onClick:()=>{I(Cn())},edge:"start",sx:[{mr:"ltr"===s.appDirection?2:void 0,ml:"rtl"===s.appDirection?2:void 0},l.isOpened&&{display:"none"}],children:g(Re,{icon:"bars"})}),g(Hr,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:d?.value?.currentOrganization?.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),g(k,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:m?"":`${i.appName} - ${"ltr"===s.appDirection?c?.organizationEnName:c?.organizationArName}`}),g(V,{title:"light"===s.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:g(U,{color:"inherit",onClick:()=>{I(Bt.setThemeMode("light"===s.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===s.themeMode?"dark":"light")},children:"light"===s.themeMode?g(Re,{icon:"moon"}):g(Re,{icon:{prefix:"far",iconName:"sun"}})})}),g(V,{title:"ar"===Se.language?"Change Language To English":"Change Language To Arabic",children:g(U,{color:"inherit",onClick:()=>{let e="ar"===Se.language?"en":"ar";var t;t=e,Se.changeLanguage(t),localStorage.setItem("language",t),I(Bt.setAppDirection("ar"===e?"rtl":"ltr"))},children:g(Re,{icon:"language"})})}),d.value?.userOrganizations&&d.value?.userOrganizations.length>1?g(V,{title:"Change Current Organization",children:g(U,{color:"inherit",onClick:()=>{t(!0)},children:g(Re,{icon:"globe"})})}):g(T,{}),g(!0===i?.enableUINotifications?vn:T,{}),g("div",{onClick:a,style:{cursor:"pointer"},children:g(Hr,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:d.value?.id+""})}),g("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:a,children:m?"":d.value?.username}),g(U,{color:"inherit",onClick:async()=>{try{await h({endPointURI:"api/auth/logout"})}catch(e){}I(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")},children:g(Re,{rotation:"rtl"===s.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},Dn=z("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),kn=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=kn(e,i.children);if(t)return t}}},Un=[...[{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 xn(){return g(pt,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const Fn=Ie(_t)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${yt.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),Bn=Ie(Et)(({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:_e(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})}})),qn=ft(Tt);function Wn(e){const t=gt({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return g(qn,{style:t,...e})}const Gn=Ie(at)({color:"inherit",fontWeight:500});function Hn({icon:e,expandable:t,children:i,...o}){const{t:r}=Me(),n=y(e=>e.AppLayout);return f(Nt,{...o,sx:{display:"flex",alignItems:"center",padding:1},children:[g(Re,{style:{marginRight:"ltr"===n.appDirection?7:void 0,marginLeft:"rtl"===n.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),g(Gn,{variant:"body2",sx:{fontSize:16},children:r(i)}),t&&g(xn,{})]})}const Yn=e=>Array.isArray(e)?e.length>0&&e.some(Yn):Boolean(e),Kn=ue.forwardRef(function(e,t){const{id:i,itemId:o,label:r,disabled:n,children:a,...s}=e,{getRootProps:l,getContentProps:d,getIconContainerProps:c,getCheckboxProps:p,getLabelProps:u,getGroupTransitionProps:h,getDragAndDropOverlayProps:m,status:T,publicAPI:A}=It({id:i,itemId:o,children:a,label:r,disabled:n,rootRef:t}),y=A.getItem(o),I=Yn(a);return g(bt,{itemId:o,children:f(Fn,{...l(s),children:[f(Bn,{...d({className:wr("content",{"Mui-expanded":T.expanded,"Mui-selected":T.selected,"Mui-focused":T.focused,"Mui-disabled":T.disabled})}),children:[g(Ot,{...c(),children:g(Rt,{status:T})}),g(Ct,{...p()}),g(Hn,{...u({icon:y?.icon||"book",expandable:I&&T.expanded})}),g(Pt,{...m()})]}),a&&g(Wn,{...h()})]})})});function Vn(){const e=Ue(),t=y(e=>e.AppLayout),i=y(e=>e.AppInfo.value);A();const o=Ut(),{isUserAuthorized:r,isCurrentOrganizationAuthorizedToModule:n}=Zt(),a=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||r(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||n(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=a(i.children)),t.push(e)}return t},s=[];i.enableAdministrationModule&&s.push(...structuredClone(Un)),s.push(...structuredClone(i.businessNavigationItems));const l=a(s);return g(At,{items:l,onItemClick:(t,i)=>{const o=kn(i,s);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||e(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:xt,direction:t.appDirection,maxHeight:o?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Kn}})}const zn=()=>{const e=y(e=>e.AppInfo.value),{UserSession:t}=Zt(),i=t.value.currentOrganization,o=ne(),r=y(e=>e.AppLayout),n=y(e=>e.SideBar),a=A();return f(mt,{sx:{width:xt,flexShrink:0,"& .MuiDrawer-paper":{width:xt,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===r.appDirection?"left":"right",open:n.isOpened,children:[f(Dn,{children:[f(S,{sx:{width:"100%"},children:[g(k,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===r.appDirection?i?.organizationEnName:i?.organizationArName}`}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),g(ht,{onClick:()=>{a(Cn())},children:"ltr"===o.direction?g(Re,{icon:"angle-left"}):g(Re,{icon:"angle-right"})})]}),g(Ze,{}),g(Vn,{})]})},$n=Lt({key:"muirtl",stylisPlugins:[vt,wt]}),Qn=Lt({key:"mui"}),jn=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=Qt();fe(()=>{e.selectedRecord&&(async()=>{await a({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{i(e.data.currentRoles),r(e.data.availableRoles)}})})()},[e.selectedRecord]);return f(T,{children:[g(si,{displayField:"roleName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:t,successCallBkFn:()=>{we.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Zn=e=>{const[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),n=y(e=>e.commonStores.stores.SystemOrganizations.data),a=y(e=>e.commonStores.stores.SystemOrganizationRanks.data),s=y(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:l}=Me(),[d,c]=me([]),p=oi({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:c}),u=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:s,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 f(T,{children:[g(o,{children:g(jn,{selectedRecord:t,closeModalFn:()=>{r(!1)}})}),g(rn,{apiActions:p,hideInfoBar:!0,data:d,setData:c,editMode:{editMode:"row"},formElements:u,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{i(e),r(!0)}}],gridLoadParametersValues:{personId:e.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async t=>(t.personId=e.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Jn=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:i}),{handleGetRequest:r}=Qt(),n=y(e=>e.commonStores.stores.SystemOrganizationRanks),a=A();return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,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 r({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{a(ei({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{a(ei({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Xn=()=>{const{t:e}=Me(),[t,i]=me([]),{handleGetRequest:o}=Qt(),r=y(e=>e.commonStores.stores.SystemOrganizationUnits),n=A(),a=oi({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:i}),s=y(e=>e.commonStores.stores.SystemOrganizationUnitType.data);return g(rn,{apiActions:a,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:t,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await o({endPointURI:r.url,showMask:!1,successCallBkFn:e=>{n(ei({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{n(ei({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},ea=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:i});return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,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"}})},ta=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:i}),r=y(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:n}=Qt();return g(rn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},ia=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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"}})},oa=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=Qt();fe(()=>{e.roleId&&(async()=>{await a({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{i(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()},[e.roleId]);return f(T,{children:[g(si,{displayField:"authorityName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:t,successCallBkFn:()=>{we.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},ra=()=>{const{t:e}=Me(),[t,i]=me([]),[o,r]=me(null),{Window:n,setWindowState:a}=Jt({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),s=oi({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:i});return f(T,{children:[g(n,{children:g(oa,{roleId:o?.id,closeModalFn:()=>{a(!1)}})}),g(rn,{apiActions:s,data:t,hideInfoBar:!0,setData:i,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),a(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},na=e=>{const t=y(e=>e.commonStores.stores.SystemEntityParameters.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:r});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:t,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:i("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async t=>(t.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},aa=()=>{const e=y(e=>e.commonStores.stores.SystemOrganizations.data),{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:o});return g(rn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:e,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}],keyColumnName:"id",gridTitle:t("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},sa=e=>{const{t:t}=Me(),i=y(e=>e.commonStores.stores.SystemEntityParameters.data),[o,r]=me([]),n=oi({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:r}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:i,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 g(rn,{apiActions:n,data:o,hideInfoBar:!0,setData:r,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:t("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async t=>(t.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},la=[{value:"FILE_SYSTEM"},{value:"SFTP"}],da=(e,t,i,o,r)=>{o?("useSysDatasource"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===o&&("Blueprint"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===r?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))):(e?.useSysCon&&t.hideField("datasourceConId"),e?.reportType?"Blueprint"===e?.reportType?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===e?.reportType?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===e?.reportType&&(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))},ca=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:o});return g(rn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value",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:t("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!Ur(t.recipientMail)?(we.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},pa=e=>{const{t:t}=Me(),[i,o]=me([]),r=y(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:o}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:r,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return g(rn,{apiActions:n,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:o,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:a,keyColumnName:"id",gridTitle:t("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},ua=e=>{const t=y(e=>e.commonStores.stores.SystemReports.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:r}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:t,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return g(rn,{apiActions:n,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:i("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},ha={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}}},ma=(e,t,i)=>{if(e&&ha[e]){const o=ha[e],r=Object.keys(o);for(const e of r){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)},fa=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:o}),n=y(e=>e.commonStores.stores.SystemDataQueries.data),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return g(rn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:a,keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},ga=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"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:y(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 g(rn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:o,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:t=>(t.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Ta=e=>{const[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=Me(),{handleGetRequest:a}=Qt(),[s,l]=me([]);fe(()=>{(async()=>{await a({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{l(e.data)}})})()},[e.selectedRecord]);const[d,c]=me([]),p=oi({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:c}),u=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"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 f(T,{children:[g(o,{children:g(ga,{selectedRecord:t})}),g(rn,{apiActions:p,data:d,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:c,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{i(e),r(!0)}}],formElements:u,keyColumnName:"id",gridTitle:n("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},Aa=e=>{const{t:t}=Me(),[i,o]=me([]),r=y(e=>e.commonStores.stores.SystemWidgets.data),n=oi({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:o});return g(rn,{apiActions:n,data:i,setData:o,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:t("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async t=>(t.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},ya=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:i}),r=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Hr,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return g(T,{children:g(rn,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:o,data:t,setData:i,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:Zn,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:i});return g(rn,{apiActions:o,data:t,setData:i,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:Jn,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Xn,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:ea,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=Me(),[t,i]=me(null),{UserInfo:o}=Zt(),r=y(e=>e.commonStores.stores.CurrentOrganizationRanks.data),n=y(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[a,s]=me([]),l=oi({findAll:"api/v1/public/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:s}),[d,c]=me(null),{Window:p,setWindowState:u}=Jt({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:h,setWindowState:m}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:A,setWindowState:I}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),_=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Hr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:n,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 f(T,{children:[g(h,{children:g(jn,{selectedRecord:d,closeModalFn:()=>{m(!1)}})}),g(p,{children:g(Zn,{selectedPerson:t})}),g(A,{children:g(Ln,{selectedPerson:t,isSelfService:!1,onSuccessCallBk:()=>{I(!1)}})}),g(rn,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:l,data:a,setData:s,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:_,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{i(e),I(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{c({organizationId:o?.currentOrganization?.id,id:e?.organizationMemberId}),m(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{i(e),u(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(we.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||(we.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({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:i});return g(T,{children:g(rn,{apiActions:o,data:t,setData:i,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:ta,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:ia,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:ra,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:e}=Me(),{handleGetRequest:t}=Qt(),[i,o]=me([]),r=oi({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:o}),n=y(e=>e.commonStores.stores.SystemApplicationModules.data);return g(rn,{apiActions:r,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},authority:"ORGANIZATION_ADMIN"},{path:"admin/org/unit/types",component:ea,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Xn,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Jn,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=Me(),t=y(e=>e.commonStores.stores.SystemDataQueries.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:o});return g(rn,{apiActions:r,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:t,optionDisplayField:"queryName",optionValueField:"id"}}],keyColumnName:"id",gridTitle:e("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[e,t]=me(null),{Window:i,setWindowState:o}=Jt({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),r=y(e=>e.commonStores.stores.SystemDataSources.data),{t:n}=Me(),[a,s]=me([]),l=oi({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:s}),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:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:r,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return f(T,{children:[g(i,{children:g(na,{selectedRecord:e})}),g(rn,{apiActions:l,rowActions:[{label:"Query Parameters",actionFn:async e=>{t(e),o(!0)},icon:"p"}],data:a,setData:s,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:d,keyColumnName:"id",gridTitle:n("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"},formProps:{formValuesChangeCallBk:(e,t,i,o,r)=>{o?"useSysCon"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=Qt(),t=y(e=>e.commonStores.stores.SystemDataSourceType.data),{t:i}=Me(),[o,r]=me([]),n=oi({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:r,commonStoreKey:"SystemDataSources"});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:t,comboboxValueDataType:"string",optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async t=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:t.id},successCallBkFn:e=>{we.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:e}=Me(),t=y(e=>e.commonStores.stores.SystemParameterTypes.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:o}),n=y(e=>e.commonStores.stores.SystemDataQueries.data);return g(rn,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:t,comboboxValueDataType:"string",optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:n,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,i,o,r,n)=>{o?"parameterType"===o?("combobox"===r?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField")),"date"===r||"datetime"===r?(t.showField("parameterValueFormat"),"date"===r?i.setValue("parameterValueFormat",ci):i.setValue("parameterValueFormat",pi)):(t.hideField("parameterValueFormat"),i.setValue("parameterValueFormat",null))):"parameterDataQueryId"==o?null!=r&&""!=r?(i.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==o&&(null!=r&&""!=r?(i.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):"date"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",ci)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",pi)):(i.setValue("parameterValueFormat",null),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.hideField("parameterValueFormat"))}},editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:aa,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:n,setWindowState:a}=Jt({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[s,l]=me([]),d=y(e=>e.commonStores.stores.SystemDataSources.data),c=y(e=>e.commonStores.stores.SystemDataQueries.data),p=y(e=>e.commonStores.stores.SystemBluePrints.data),u=oi({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:l}),h=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!1,hidden:!0,gridProps:{hidden:!0},comboboxValueDataType:"string",fieldType:"combobox",options:la,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:d,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:p,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:c,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 f(T,{children:[g(o,{children:g(ln,{reportCode:t?.reportCode,resultMode:"App"})}),g(n,{children:g(sa,{selectedRecord:t})}),g(rn,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:u,data:s,setData:l,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)=>{i(e),a(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{i(e),r(!0)}}],formProps:{formValuesChangeCallBk:da},formElements:h,keyColumnName:"id",gridTitle:e("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(we.error("You must choose the report query"),!1):(we.error("You must choose the report blueprint"),!1):(we.error("You must enter the jasper report name"),!1):(we.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=y(e=>e.commonStores.stores.SystemDataQueries.data),t=y(e=>e.commonStores.stores.SystemTimeIntervals.data),[i,o]=me(null),{Window:r,setWindowState:n}=Jt({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:a,setWindowState:s}=Jt({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:l,setWindowState:d}=Jt({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:c}=Me(),[p,u]=me([]),h=oi({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:u}),m=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:t,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return f(T,{children:[g(r,{children:g(ca,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(a,{children:g(pa,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(l,{children:g(ua,{selectedRecord:i,callBkFn:()=>{d(!1)}})}),g(rn,{apiActions:h,data:p,setData:u,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:m,keyColumnName:"id",gridTitle:c("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{o(e),n(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{o(e),s(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{o(e),d(!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)||(we.error("You must specifiy the start sending time since this email is periodical"),!1):(we.error("You must specifiy the period value since this email is periodical"),!1):(we.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o,r){ma(t,o,i)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{ma(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,t]=me(null),{Window:i,setWindowState:o}=Jt({windowTitle:"Document Status",windowIcon:"tag"}),{Window:r,setWindowState:n}=Jt({windowTitle:"Document Action",windowIcon:"stamp"}),a=y(e=>e.commonStores.stores.SystemOrganizations.data),s=y(e=>e.commonStores.stores.SystemReports.data),l=y(e=>e.commonStores.stores.SystemDataSources.data),{t:d}=Me(),[c,p]=me([]),u=oi({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:p}),h=[{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:a,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:s,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:l,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 f(T,{children:[g(i,{children:g(fa,{selectedRecord:e})}),g(r,{children:g(Ta,{selectedRecord:e})}),g(rn,{apiActions:u,data:c,setData:p,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{t(e),o(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{t(e),n(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:d("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:h,keyColumnName:"id",gridTitle:d("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:e}=Me(),t=y(e=>e.commonStores.stores.SystemDataQueries.data),i=y(e=>e.commonStores.stores.SystemWidgetTypes.data),[o,r]=me([]),n=oi({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:r});return g(rn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:i,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:t,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!0,fieldType:"text"}}]}}],keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:e}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,a]=me([]),s=Ue(),l=oi({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:a});return f(T,{children:[g(o,{children:g(Aa,{selectedRecord:t})}),g(rn,{apiActions:l,data:n,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:"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=>{i(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{s("/dashboard/"+e.dashboardCode)}}],gridTitle:e("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:_n},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=Me(),[t,i]=me([]),{handlePostRequest:o}=Qt(),r=oi({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:i}),n=y(e=>e.commonStores.stores.SystemMailTemplates.data);return g(rn,{apiActions:r,disableDefaultAction:!0,data:t,setData:i,editMode:{editMode:"none"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],rowActions:[{actionFn:async e=>{(async e=>{await o({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{r.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],keyColumnName:"id",gridTitle:e("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}},{path:"dev/system/authorities",component:ta},{path:"dev/system/roles",component:ra},{path:"dev/system/lookups",component:aa},{path:"dev/system/modules",component:ia},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:i});return g(rn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CODE",fieldName:"attachmentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",fieldName:"relatedDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:la,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",fieldName:"uploadDirectory",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",fieldName:"allowedFileTypes",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",fieldName:"attachmentCategories",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Is Category Mandatory",fieldName:"isCategoryRequired",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",fieldName:"maxAllowedNumberOfFiles",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",fieldName:"downloadAuthorityKey",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",fieldName:"uploadAuthorityKey",required:!1,fieldType:"text"}}],keyColumnName:"id",gridTitle:e("ATTACHMENT_CONFIG_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_DELETE"}})}},{path:"dev/notifications",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=y(e=>e.commonStores.stores.SystemTimeIntervals.data),r=y(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:i}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:r,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:r,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",comboboxValueDataType:"string",options:o,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?g(Re,{icon:e.row.notificationIcon}):g(T,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return g(rn,{apiActions:n,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:a,keyColumnName:"id",gridTitle:e("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:e}=Zt(),t=y(e=>e.AppLayout),{handleGetRequest:i,handlePostRequest:o}=Qt(),[r,n]=me([]),a=y(e=>e.AppInfo.value),s=()=>{!0===e.isAuthenticated&&i({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{n(e.data)}})};return!0===a?.enableUINotifications&&bn(s,1e3),f(T,{children:[f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(S,{sx:{flex:1}}),f("h3",{children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===t.appDirection?"Notifications":"الاشعارات"]}),g(S,{sx:{flex:1}}),g(v,{sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),g(v,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),g(S,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:g(S,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:r.map((e,t)=>g(wn,{...e,showDivider:t<r.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:pn}]]],Ia=e=>{const{isUserAuthorized:t,isCurrentOrganizationAuthorizedToModule:i}=Zt();return e?.applicationModule&&!i(e?.applicationModule)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!t(e.authority)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):g(T,{children:e.children})},_a=()=>{const e=y(e=>e.AppLayout),t=y(e=>e.AppInfo.value),i=y(e=>e.AppInfo.value.businessRoutes),{UserInfo:o}=Zt(),r=A(),{show:n,hide:a}=Kt(),s=y(e=>e.commonStores),[l,d]=me(!1),{isUserAuthorized:c}=Zt(),{handleGetRequest:p}=Qt();return fe(()=>{s?.storeKeys&&(async()=>{n("Loading ... please wait"),d(!1);const e=s.stores,t=s.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!c(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||p({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{r(ei({storeKey:i,data:e.data}))},failureCallBkFn:()=>{r(ei({storeKey:i,data:[]}))}});d(!0),a()})()},[s.storeKeys,o?.currentOrganization]),g(ce,{value:"ltr"===e.appDirection?Qn:$n,children:g(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:f(Fe,{children:[t.enableAdministrationModule?ya.map((e,t)=>g(Be,{path:e.path,element:g(Ia,{authority:e.authority,applicationModule:e.applicationModule,children:g(e.component,{})})},"adm"+t)):null,i.map((e,t)=>g(Be,{path:e.path,element:g(Ia,{authority:e.authority,children:g(e.component,{})})},"bs"+t))]})})})},Ea=Ie("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:Mt[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:Mt[900]})}));function Oa(e){const{window:t}=e,i=y(e=>e.SideBar),o=y(e=>e.AppInfo.value),r=A(),n=e=>{r(Nn(e))};return g(Dt,{container:void 0!==t?()=>t().document.body:void 0,anchor:"bottom",open:i.isOpened,onClose:()=>{n(!1)},onOpen:()=>{n(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[g(Ea,{}),g(S,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:g(Vn,{})}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:o.appName}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",o.appVersion]})]})]})})}const Ca=()=>{const{t:e}=Me(),t=y(e=>e.loadingMask.value),i=y(e=>e.AppLayout);return f(ae,{dir:i.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:t.isOpened,children:[g(se,{color:"inherit"}),g("div",{style:{marginRight:10,marginLeft:10},children:t?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Na=()=>{const e=y(e=>e.AppInfo.value),[t,i]=me(""),[o,r]=me(""),[n,a]=me(!1),s=y(e=>e.UserSession.value),l=A(),d=async()=>{if(null==t||""==t)return void we.error("username is required to proceed");if(null==o||""==o)return void we.error("password is required to proceed");a(!0);let i=null;try{if(i=await Le.post(`${e.apiBaseUrl}/api/auth/login`,{username:t,password:o},{withCredentials:!0}),null!=i.data&&""!==i.data){a(!1);const e={...i.data,isAuthenticated:!0};i?.data?.token&&localStorage.setItem("TOKEN",i.data.token),l(zt.setAuthenticated(e))}}catch(e){a(!1),we.error(e?.response?.data||"failed to authenticate, contact your administrator")}},c=y(e=>e.UserSession.value),p=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||mi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:e?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.primaryColor||ui:e.appTheme?.dark?.primaryColor||mi},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||hi:e.appTheme?.dark?.secondaryColor||fi}}});return fe(()=>{console.log("checking usersession on reload",c),console.log("checking usersession app info",e),(async()=>{if(e?.apiBaseUrl&&null==c.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await Le.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};l(zt.setAuthenticated(e))}else l(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){l(zt.setUnAuthenticated())}}})()},[e,c.isAuthenticated]),g(pe,{theme:p,children:g(S,{sx:{minHeight:"100vh",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:e?.loginScreenStyle?.backgroundColor,backgroundImage:`url('/${e?.loginScreenStyle?.backgroundImageNameInPublicFolder}')`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center"},children:g(x,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center"},children:0==s.isAuthenticated?f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[g("img",{src:e?.appLogo,width:150,height:150}),g(k,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),f(k,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),g(F,{label:"username",sx:{width:300,m:1},value:t,onChange:e=>{i(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(F,{label:"password",sx:{width:300,m:1},value:o,type:"password",onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(v,{loading:n,onClick:d,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):f(T,{children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})})})},Ra=()=>{const[e,t]=me({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:i}=Qt(),o=y(e=>e.AppInfo.value);return fe(()=>{if(o?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{o?.checkLicense?.endpoint&&await i({endPointURI:o.checkLicense?.endpoint,successCallBkFn:e=>{t(e.data)}})})()},o?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[o]),e.isLicensed?g(T,{}):f(S,{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:[g("img",{src:o.appLogo,style:{height:200,width:200}}),f(k,{variant:"h5",children:[o.appName," - ",o.appVersion]}),g(k,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),g(k,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),f(k,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),f(k,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},ba=({msalInstance:e})=>{const t=y(e=>e.AppInfo.value),i=y(e=>e.UserSession.value),{handleGetRequest:o}=Qt(),r=A();return g(S,{children:g(v,{onClick:async()=>{const n=await e.acquireTokenPopup({scopes:t?.azureConfiguration?.scopes});n?.accessToken&&(localStorage.setItem("TOKEN",n.accessToken),(async()=>{t?.apiBaseUrl&&null==i.isAuthenticated&&(localStorage.getItem("TOKEN"),o({endPointURI:"api/auth/userInfo",showMask:!0,successCallBkFn:e=>{if(null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};r(zt.setAuthenticated(t))}else r(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")}}))})())},children:"Azure Login "})})},Pa=Ie("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const i=y(e=>e.AppLayout),o=Ee(),r=Ut();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&t?"calc(100% - 350px)":"100%",direction:i.appDirection,justifyContent:"flex-start",transition:!0===t?o.transitions.create(["margin","width"],{easing:o.transitions.easing.easeOut,duration:o.transitions.duration.enteringScreen}):o.transitions.create(["margin","width"],{easing:o.transitions.easing.sharp,duration:o.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==i.appDirection||!0!==t?0:xt+"px",marginRight:r||"rtl"!==i.appDirection||!0!==t?0:xt+"px"}}),wa=({msalInstance:e})=>{const t=y(e=>e.SideBar),i=y(e=>e.AppInfo.value),o=Ut(),r=y(e=>e.UserSession),n=y(e=>e.AppLayout);return f(qe,{children:[g(ve,{rtl:"rtl"===n.appDirection,draggable:!0,position:"bottom-center"}),g(Ca,{}),!0===r.value.isAuthenticated?f(Pa,{open:t.isOpened,children:[g(Oe,{}),g(Mn,{}),o?null:g(zn,{}),o?g(Oa,{}):null,g(Dn,{}),g(_a,{}),g(Ra,{})]}):"AZURE"===i.authenticationMethod?g(ba,{msalInstance:e}):g(Na,{})]})},va=be({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,authenticationMethod:"APP",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}}}),La=va.actions;var Sa=va.reducer;const Ma={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"}},Da={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},ka=200,Ua=400,xa=400,Fa=499,Ba=500,qa=599,Wa="GET",Ga="POST",Ha=[Da.OPENID_SCOPE,Da.PROFILE_SCOPE,Da.OFFLINE_ACCESS_SCOPE],Ya=[...Ha,Da.EMAIL_SCOPE],Ka="Content-Type",Va="Content-Length",za="Retry-After",$a="X-AnchorMailbox",Qa="x-ms-request-id",ja="x-ms-httpver",Za="active-account-filters",Ja="common",Xa="organizations",es="consumers",ts="access_token",is="xms_cc",os="login",rs="select_account",ns="consent",as="none",ss="no_session",ls="code",ds="id_token token refresh_token",cs="query",ps="fragment",us="query",hs="authorization_code",ms="refresh_token",fs="MSSTS",gs="ADFS",Ts="Generic",As="-",ys=".",Is={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},_s="appmetadata",Es="1",Os="authority-metadata",Cs=86400,Ns="config",Rs="cache",bs="network",Ps="hardcoded_values",ws={SCHEMA_VERSION:5,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},vs={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},Ls=60,Ss=3600,Ms="throttling",Ds="retry-after, h429",ks="invalid_grant",Us="client_mismatch",xs="1",Fs="3",Bs="4",qs="2",Ws="4",Gs="5",Hs="0",Ys="1",Ks="2",Vs="3",zs="4",$s="pop",Qs="unexpected_error",js="post_request_failed",Zs={[Qs]:"Unexpected error in authentication.",[js]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};
|
|
38
38
|
/*! @azure/msal-common v15.12.0 2025-08-19 */class Js extends Error{constructor(e,t,i){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,Js.prototype),this.errorCode=e||Da.EMPTY_STRING,this.errorMessage=t||Da.EMPTY_STRING,this.subError=i||Da.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function Xs(e,t){return new Js(e,t?`${Zs[e]} ${t}`:Zs[e])}
|
|
39
39
|
/*! @azure/msal-common v15.12.0 2025-08-19 */const el="client_info_decoding_error",tl="client_info_empty_error",il="token_parsing_error",ol="null_or_empty_token",rl="endpoints_resolution_error",nl="network_error",al="openid_config_error",sl="hash_not_deserialized",ll="invalid_state",dl="state_mismatch",cl="state_not_found",pl="nonce_mismatch",ul="auth_time_not_found",hl="max_age_transpired",ml="multiple_matching_tokens",fl="multiple_matching_accounts",gl="multiple_matching_appMetadata",Tl="request_cannot_be_made",Al="cannot_remove_empty_scope",yl="cannot_append_scopeset",Il="empty_input_scopeset",_l="device_code_polling_cancelled",El="device_code_expired",Ol="device_code_unknown_error",Cl="no_account_in_silent_request",Nl="invalid_cache_record",Rl="invalid_cache_environment",bl="no_account_found",Pl="no_crypto_object",wl="unexpected_credential_type",vl="invalid_assertion",Ll="invalid_client_credential",Sl="token_refresh_required",Ml="user_timeout_reached",Dl="token_claims_cnf_required_for_signedjwt",kl="authorization_code_missing_from_server_response",Ul="binding_key_not_removed",xl="end_session_endpoint_not_supported",Fl="key_id_missing",Bl="no_network_connectivity",ql="user_canceled",Wl="missing_tenant_id_error",Gl="method_not_implemented",Hl="nested_app_auth_bridge_disabled",Yl={[el]:"The client info could not be parsed/decoded correctly",[tl]:"The client info was empty",[il]:"Token cannot be parsed",[ol]:"The token is null or empty",[rl]:"Endpoints cannot be resolved",[nl]:"Network request failed",[al]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[sl]:"The hash parameters could not be deserialized",[ll]:"State was not the expected format",[dl]:"State mismatch error",[cl]:"State not found",[pl]:"Nonce mismatch error",[ul]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[hl]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[ml]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[fl]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[gl]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[Tl]:"Token request cannot be made without authorization code or refresh token.",[Al]:"Cannot remove null or empty scope from ScopeSet",[yl]:"Cannot append ScopeSet",[Il]:"Empty input ScopeSet cannot be processed",[_l]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[El]:"Device code is expired.",[Ol]:"Device code stopped polling for unknown reasons.",[Cl]:"Please pass an account object, silent flow is not supported without account information",[Nl]:"Cache record object was null or undefined.",[Rl]:"Invalid environment when attempting to create cache entry",[bl]:"No account found in cache for given key.",[Pl]:"No crypto object detected.",[wl]:"Unexpected credential type.",[vl]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[Ll]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[Sl]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[Ml]:"User defined timeout for device code polling reached",[Dl]:"Cannot generate a POP jwt if the token_claims are not populated",[kl]:"Server response does not contain an authorization code to proceed",[Ul]:"Could not remove the credential's binding key from storage.",[xl]:"The provided authority does not support logout",[Fl]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[Bl]:"No network connectivity. Check your internet connection.",[ql]:"User cancelled the flow.",[Wl]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Gl]:"This method has not been implemented",[Hl]:"The nested app auth bridge is disabled"};class Kl extends Js{constructor(e,t){super(e,t?`${Yl[e]}: ${t}`:Yl[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Kl.prototype)}}function Vl(e,t){return new Kl(e,t)}
|
|
40
40
|
/*! @azure/msal-common v15.12.0 2025-08-19 */const zl={createNewGuid:()=>{throw Vl(Gl)},base64Decode:()=>{throw Vl(Gl)},base64Encode:()=>{throw Vl(Gl)},base64UrlEncode:()=>{throw Vl(Gl)},encodeKid:()=>{throw Vl(Gl)},async getPublicKeyThumbprint(){throw Vl(Gl)},async removeTokenBindingKey(){throw Vl(Gl)},async clearKeystore(){throw Vl(Gl)},async signJwt(){throw Vl(Gl)},async hashString(){throw Vl(Gl)}};
|