PageSourceSearch

https://workmanagercloud.com/static/js/6176.ef2a9579.chunk.js

js workmanagercloud.com collected 2026-09-25 18:37:01 UTC 16,341 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkwm_core_front=self.webpackChunkwm_core_front||[]).push([[6176],{4263:(e,t,a)=>{function s(e){let t="";if(!isNaN(e.getTime())){let t,a=e.getHours(),s=e.getMinutes();t=a>=12?"pm":"am",a=a%12||12,s<10&&(s="0"+s);let n=a+":"+s+" "+t;return e.getDate()+"/"+(e.getMonth()+1)+"/"+e.getFullYear()+" "+n}return t="",t}a.d(t,{g:()=>s})},6176:(e,t,a)=>{a.r(t),a.d(t,{default:()=>q});var s=a(65043),n=a(25852),i=a(13718),r=a(75304),l=a(44864),o=a(91688),d=a(74117),c=a(94834),m=a(57092),h=a(75188),u=a.n(h),p=a(36505),x=a(38477),g=a(8586),b=a(93394),j=a(78974),f=a(69979),v=a(71036),N=a(36085),L=a(66651),_=a(79910),A=a(20467),w=a(70579);const T=()=>{const{t:e}=(0,d.Bd)(),{setCanNext:t,createListState:a,setCreateListState:n,setErrorList:r}=(0,b.T)(),{getLists:l}=(0,_.A)(),{options:o,isLoading:c,loadInitial:m,loadInitialDebounced:h,loadMore:T,resetSearch:E}=(0,A.A)({fetchFn:(e,t,a)=>l(e,t,a),formatFn:e=>({value:e.uuid,label:e.name}),filterFn:e=>e.status===v.X_j.LIST_ACTIVE}),[S,I]=(0,s.useState)(null);let B=null;return(0,s.useEffect)((()=>{m(),r(!1)}),[]),(0,s.useEffect)((()=>{!a.name||a.name.length<2||a.name.length>100||!j.Bf.test(a.name)?t(!0):t(!1)}),[a.name]),B=e(!0===c?"loading":"form.designerLabel10.1"),(0,w.jsxs)(s.Fragment,{children:[(0,f.EW)(c),(0,w.jsx)(u(),{component:"div",transitionName:"TabsAnimation",transitionAppear:!0,transitionAppearTimeout:0,transitionEnter:!1,transitionLeave:!1,children:(0,w.jsx)("div",{children:(0,w.jsxs)(p.kv,{className:"mb-2",children:[(0,w.jsx)(x.A,{className:"mb-4",children:e("list.designerItem2")}),(0,w.jsxs)(p.l0,{row:!0,children:[(0,w.jsx)(N.A,{id:"name_list",place:"top",type:"info",effect:"solid",children:e("trd.Tooltip4")}),(0,w.jsx)(g.A,{for:"list_name",className:"is-required",sm:3,children:e("list.designerLabel1")}),(0,w.jsx)(i.A,{md:9,children:(0,w.jsx)(p.eh,{id:"name_list",name:"name_list",type:"text","data-test-id":"name-list","data-tip":!0,"data-for":"name_list",autoComplete:"off",onChange:e=>{n({...a,name:e.target.value})},onBlur:e=>{n({...a,name:e.target.value.trim()})},onKeyPress:e=>{"Enter"===e.key&&e.preventDefault()},value:a.name,validate:{required:{value:!0,errorMessage:"".concat(e("fieldRequired"))},pattern:{value:j.Bf,errorMessage:"".concat(e("list.designerFeedback1"))},minLength:{value:v.FOE.MIN_LENGTH_NAME_LIST,errorMessage:"".concat(e("fieldValidateLengthBetween")," 2 ").concat(e("and")," 
1100 ").concat(e("characters"))},maxLength:{value:v.FOE.MAX_LENGTH_NAME_LIST,errorMessage:"".concat(e("fieldValidateLengthBetween")," 2 ").concat(e("and")," 100 ").concat(e("characters"))}}})})]}),(0,w.jsxs)(p.l0,{row:!0,children:[(0,w.jsx)(g.A,{for:"parent_List",sm:3,children:e("list.designerLabel2")}),(0,w.jsx)(i.A,{md:9,children:(0,w.jsx)(L.Ay,{id:"parent_List",name:"parent_List",placeholder:B,value:S,options:o,onChange:e=>{if(I(e),e)n({...a,parent_id:e.value});else{const e={...a};delete e.parent_id,n(e)}},onMenuClose:()=>{E(),m()},onMenuScrollToBottom:T,onInputChange:(e,t)=>{"input-change"===t.action&&h(e)},filterOption:null,isLoading:c,noOptionsMessage:()=>e("form.designerLabel10.1"),isClearable:!0})})]})]})})})]})};var E=a(87382),S=a(4263),I=a(86431),B=a(98139),M=a.n(B),F=a(73023),y=a.n(F),C=a(45708);const D=()=>{const{t:e}=(0,d.Bd)(),{itemsList:t,setItemsList:a,setCanNext:n,listId:l,setListId:o,setErrorList:m,createListState:h,setCreateListState:T,isLoadingCreateList:B,setIsLoadingCreateList:F}=(0,b.T)(),{createListWithItem:D,createItemsInList:P,getItems:O}=(0,_.A)(),[k,z]=(0,s.useState)(!1),H=(0,s.useRef)(null),{options:X,isLoading:V,loadInitial:q,loadInitialDebounced:R,loadMore:W,resetSearch:G,reset:Y}=(0,A.A)({fetchFn:(e,t,a)=>O(h.parent_id,e,t,a),formatFn:e=>({value:e.uuid,label:e.name}),filterFn:e=>e.status===v.X_j.LIST_ACTIVE}),[K,U]=(0,s.useState)(null),[J,Z]=(0,s.useState)(!1);let Q=null,$=!1,ee="",te="",ae=null,se={required:{value:!0,errorMessage:"".concat(e("form.field46"))},pattern:{value:j.aw,errorMessage:"".concat(e("list.designerFeedback2"))},minLength:{value:v.m3E.MIN_LENGTH_NAME_ITEM,errorMessage:"".concat(e("fieldValidateLengthBetween")," 1 ").concat(e("and")," 300 ").concat(e("characters"))},maxLength:{value:v.m3E.MAX_LENGTH_NAME_ITEM,errorMessage:"".concat(e("fieldValidateLengthBetween")," 1 ").concat(e("and")," 300 ").concat(e("characters"))}};h.parent_id||($=!0);let ne={required:{value:!$,errorMessage:"".concat(e("form.field46"))}};h.item&&(ee=h.item.name,te=h.item.parent_id),!1===k&&(se=null,ne=null),t.length>0&&(Q=(0,w.jsx)(C.A,{data:t,columns:[{Header:e("itemList.designerLabel1"),accessor:"name"},{Header:e("itemList.designerLabel2"),accessor:"parent_item"},{Header:e("itemList.designerLabel3"),accessor:"date"}],className:"-striped -highlight",defaultPageSize:5,showPageJump:!1,noDataText:"".concat(e("tableRowsEmpty")),previousText:"".concat(e("previousText")),nextText:"".concat(e("nextText")),pageText:(0,w.jsx)("span",{className:"pr-2",children:e("pageText")}),ofText:(0,w.jsx)("span",{className:"px-2",children:e("ofText")}),pageSize:t.length}));const ie=()=>{y()({title:e("modal.DoneError.header"),text:e("itemList.createSucess"),icon:"success",button:e("modal.Done.footerButton")})};return(0,s.useEffect)((()=>{h.parent_id&&(Y(),q())}),[h.parent_id]),(0,s.useEffect)((()=>{y()({title:e("modal.DoneError.header"),text:e("list.instruction"),icon:"info",button:e("modal.Done.footerButton")})}),[]),(0,s.useEffect)((()=>{0===t.length?n(!0):n(!1)}),[t]),ae=e(!0===V?"loading":"form.designerLabel10.1"),(0,w.jsxs)(s.Fragment,{children:[(0,f.EW)(B),(0,w.jsxs)(u(),{component:"div",transitionName:"TabsAnimation",transitionAppear:!0,transitionAppearTimeout:0,transitionEnter:!1,transitionLeave:!1,children:[(0,w.jsxs)(r.A,{className:"forms-fields pb-4",children:[(0,w.jsxs)(x.A,{className:"mb-4",children:[e("itemList.designerItem4"),"\xa0",(0,w.jsx)("em",{className:"text-info ",children:h.name})]}),(0,w.jsxs)(p.kv,{className:"mb-2",onSubmit:(e,s)=>{if(0===s.length&&z(!0),s.length>0||!1===k)e.preventDefault();else{if(ne&&ne.required.value&&!K&&!te)return Z(!0),void e.preventDefault();if(0===t.length)F(!0),(e=>{let t=null;!1===(0,c.hX)(K)&&(t=K.label);const s={name:e.name,...e.parent_id&&{parent_id:e.parent_id},item:{name:e.item.name,...e.item.parent_id&&{parent_id:e.item.parent_id}}};D(s).then((s=>{201===s.status?(a((a=>[...a,{name:e.item.name,parent_item:t,date:(0,S.g)(new Date)}])),o(s.data.data.uuid),ie()):(0,I.pW)()})).catch((()=>{m(!0)})).finally((()=>{F(!1),z(!1),H.current&&H.current.scrollIntoView({behavior:"smooth"}),e.parent_id?(U(null),T({...e,item:{...e.item,name:"",parent_id:""}})):T({...e,item:{...e.item,name:""}})}))})(h);else{const e=h.item;F(!0),((e,t)=>{const s=K?K.label:null,n={name:e.name,...e.parent_id&&{parent_id:e.parent_id}};P(n,t).then((e=>{201===e.status?(a((e=>[...e,{name:h.item.name,parent_item:s,date:(0,S.g)(new Date)}])),ie()):(0,I.pW)()})).finally((()=>{F(!1),z(!1),H.current&&H.current.scrollIntoView({behavior:"smooth"}),h.parent_id?(U(null),T({...h,item:{...h.item,name:"",parent_id:""}})):T({...h,item:{...h.item,name:""}})}))})(e,l)}}},"data-test-id":"form-create-item",children:[(0,w.jsxs)(p.l0,{row:!0,children:[(0,w.jsx)(N.A,{id:"item_name",place:"top",type:"info",effect:"solid",children:e("itemList.Tooltip1")}),(0,w.jsxs)(g.A,{for:"name",className:"is-required",sm:2,children:[e("itemList.designerLabel1")," "]}),(0,w.jsx)(i.A,{md:10,children:(0,w.jsx)(p.eh,{id:"name",name:"name",type:"text","date-test-id":"item-name","data-tip":!0,"data-for":"item_name",autoComplete:"off",onChange:e=>{z(!0),T({...h,item:{...h.item,[e.target.name]:e.target.value}})},onKeyPress:e=>{"Enter"===e.key&&e.preventDefault()},onBlur:e=>{z(!0),T({...h,item:{...h.item,[e.target.name]:e.target.value.trim()}})},value:ee,validate:se})})]}),(0,w.jsxs)(p.l0,{row:!0,children:[(0,w.jsx)(g.A,{for:"parent_id",className:M()("",{"is-required":!1===$,"labels-error":J}),sm:2,children:e("itemList.designerLabel2")}),(0,w.jsxs)(i.A,{md:10,children:[(0,w.jsx)(L.Ay,{id:"parent_id",name:"parent_id",placeholder:ae,value:K,options:X,onChange:e=>{let t="";!1===(0,c.hX)(e)&&(t=e.value),U(e),Z(!1),z(!0),T({...h,item:{...h.item,parent_id:t}}
1)},onMenuClose:()=>{G(),q()},onMenuScrollToBottom:W,onInputChange:(e,t)=>{"input-change"===t.action&&R(e)},filterOption:null,isLoading:V,isDisabled:$,noOptionsMessage:()=>e("form.designerLabel10.1"),isClearable:!0}),J&&(0,w.jsx)("span",{className:"text-danger text small",children:e("form.field46")})]})]}),(0,w.jsx)("div",{className:"d-block text-right",children:(0,w.jsxs)(E.A,{"date-test-id":"add-item-button",type:"submit",disabled:V,color:"cyan",children:["+",e("createRoles.configFormAdd")]})})]})]}),(0,w.jsx)("div",{ref:H,children:Q})]})]})};var P=a(83910),O=a(97929);const k=e=>{const{t:t}=(0,d.Bd)(),{steps:a,showNavigation:n}=e,[i,r]=(0,s.useState)({showPreviousBtn:!1,showNextBtn:!0}),{canNext:l,compState:o,setCompState:c,errorList:m,itemsList:h,setItemsList:u,setList:p,setItem:x,createListState:g,setCreateListState:j}=(0,b.T)(),f=(e,t)=>{const a=Array(t).fill("todo");return a[e]="doing",e>0&&a.fill("done",0,e),{current:e,styles:a}},[v,N]=(0,s.useState)({navState:f(0,a.length)}),L=e=>{var t,s;N({...v,navState:f(e,a.length)}),e<a.length&&c(e),r((t=e,s=a.length,t>0&&t<s-1?{showPreviousBtn:!0,showNextBtn:!0}:0===t?{showPreviousBtn:!1,showNextBtn:!0}:2===t?{showPreviousBtn:!1,showNextBtn:!1}:{showPreviousBtn:!0,showNextBtn:!1}))},_=()=>{o>0&&(L(o-1),u([]),p([]),x([]),0===h.length?j({name:g.name,parent_id:g.parent_id}):j({name:"",parent_id:"",item:{name:"",parent_id:""}}))},A=(e,t)=>e+"-"+v.navState.styles[t];return(0,s.useEffect)((()=>{!0===m&&_()}),[m]),(0,w.jsxs)("div",{children:[(0,w.jsx)("div",{className:"d-block text-right",children:(0,w.jsx)("a",{href:"/formsdesigner/consultlist","data-test-id":"consultlist-link",children:(0,w.jsxs)(E.A,{"data-test-id":"back-button-to-lists",className:"btn-icon",color:"cyan",children:[(0,w.jsx)(P.g,{icon:O.f3N,className:"mr-2"}),t("list.designerItem3")]})})}),(0,w.jsx)("ol",{className:"forms-wizard",children:a.map(((e,t)=>(0,w.jsxs)("li",{className:A("form-wizard-step",t),value:t,children:[(0,w.jsx)("em",{children:t+1}),(0,w.jsx)("span",{children:a[t].name})]},t)))}),a[o].component,(0,w.jsx)("div",{className:"clearfix pt-2",children:(0,w.jsxs)("div",{className:M()("",{showButtonFooter:!1===n}
1),children:[(0,w.jsx)(E.A,{"data-test-id":"prevous-wizard-button",color:"gray",className:M()("btn-shadow float-left btn-wide",{showButtonFooter:!1===i.showPreviousBtn}),onClick:_,children:t("itemList.designerButton2")}),(0,w.jsx)(E.A,{"data-test-id":"next-wizard-button",color:"cyan",className:M()("btn-shadow btn-wide float-right btn-hover-shine",{showButtonFooter:!1===i.showNextBtn}),onClick:()=>{L(o+1)},disabled:l,children:t("itemList.designerButton1")})]})})]})};k.defaultProps={showNavigation:!0};const z=k;var H=a(62582);const X=()=>{const{t:e}=(0,d.Bd)();return(0,w.jsx)(s.Fragment,{children:(0,w.jsx)("div",{className:"form-wizard-content",children:(0,w.jsxs)("div",{className:"no-results",children:[(0,w.jsxs)("div",{className:"sa-icon sa-success animate",children:[(0,w.jsx)("span",{className:"sa-line sa-tip animateSuccessTip"}),(0,w.jsx)("span",{className:"sa-line sa-long animateSuccessLong"}),(0,w.jsx)("div",{className:"sa-placeholder"}),(0,w.jsx)("div",{className:"sa-fix"})]}),(0,w.jsx)("div",{className:"results-subtitle mt-4",children:e("modal.Done.body")}),(0,w.jsx)("div",{className:"results-title",children:e("list.designerMessage")}),(0,w.jsx)("div",{className:"mt-3 mb-3"}),(0,w.jsx)("div",{className:"text-center",children:(0,w.jsx)(H.N_,{to:"/formsdesigner/consultList",children:(0,w.jsx)(E.A,{color:"success",size:"lg",className:"btn-shadow btn-wide",children:e("modal.Done.footerButton")})})})]})})})},V=()=>{const{t:e}=(0,d.Bd)(),{id:t}=(0,o.useParams)(),a=t;let h=e("list.designerItem1"),u=e("list.designerMotto");const p=[{name:e("list.designerItem2"),component:(0,w.jsx)(T,{isWizard:!0})},{name:e("itemList.designerItem2"),component:(0,w.jsx)(D,{})},{name:e("form.field4"),component:(0,w.jsx)(X,{})}];return!1===(0,c.hX)(a)&&(h=e("list.designerItem1"),u=e("list.designerMotto")),(0,w.jsx)(s.Fragment,{children:(0,w.jsx)(m.A,{heading:h,subheading:u,icon:"menu",children:(0,w.jsx)(n.A,{children:(0,w.jsx)(i.A,{md:"12",children:(0,w.jsx)(r.A,{className:"main-card mb-3",children:(0,w.jsx)(l.A,{children:(0,w.jsx)("div",{className:"forms-wizard-vertical",children:(0,w.jsx)(z,{showNavigation:!0,steps:p})})})})})})})})};const q=function(){return(0,w.jsx)(b.Z,{children:(0,w.jsx)(V,{})})}},31573:(e,t,a)=>{a.d(t,{A:()=>j});var s=a(65043),n=a(62582),i=a(44963),r=a(72926),l=a(83910),o=a(97929),d=a(71036),c=a(74117),m=a(98139),h=a.n(m),u=a(23967),p=a(87076),x=a(70579);const g=()=>(0,x.jsx)(s.Fragment,{children:(0,x.jsxs)(u.A,{children:[(0,x.jsx)(p.A,{children:(0,x.jsx)(n.N_,{to:"/dashboard",children:(0,x.jsx)(l.g,{icon:o.v02,color:"primary"})})}),(0,x.jsx)(p.A,{active:!0})]})});var b=a(13438);const j=e=>{const{t:t}=(0,c.Bd)(),{heading:a,icon:m,subheading:u}=e,p=(0,i.d4)((e=>e.ThemeOptions.enablePageTitleIcon)),j=(0,i.d4)((e=>e.ThemeOptions.enablePageTitleSubheading)),{passwordExpirationDays:f}=(0,s.useContext)(b.A);let v=null,N=null;return null!==f&&f<=d.dxB.SEVEN_DAYS_EXPIRATION&&f>d.dxB.ULTIMATE_DAY_EXPIRATION&&(v=(0,x.jsx)("div",{className:"content-alert expiration-days-header",children:(0,x.jsxs)(r.A,{color:"info",className:"expiration-days-alert",children:[(0,x.jsx)("span",{className:"pr-2 text-bold",children:(0,x.jsx)(l.g,{icon:o.zpE,className:"mr-2 "})}),(0,x.jsx)(n.N_,{to:"/renew-password",children:(0,x.jsxs)("p",{children:[t("password.expiration.label1"),"\n",f," ",t("password.expiration.label2")]})})]})})),f===d.dxB.ULTIMATE_DAY_EXPIRATION&&(N=(0,x.jsx)("div",{className:"content-alert expiration-days-header",children:(0,x.jsxs)(r.A,{color:"danger",className:"expiration-days-alert",children:[(0,x.jsx)("span",{className:"pr-2 text-bold",children:(0,x.jsx)(l.g,{icon:o.zpE,className:"mr-2 "})}),(0,x.jsx)("p",{children:(0,x.jsx)(n.N_,{to:"/renew-password",className:"expiration-days-link",children:t("password.expiration.label3")})})]})})),(0,x.jsxs)("div",{className:"app-page-title",children:[v,N,(0,x.jsx)("div",{className:"page-title-wrapper",children:(0,x.jsxs)("div",{className:"page-title-heading",children:[(0,x.jsx)("div",{className:h()("page-title-icon rounded-circle",{"d-none":!p}),children:(0,x.jsx)("i",{className:m})}),(0,x.jsxs)("div",{children:[a,(0,x.jsxs)("div",{className:h()("page-title-subheading",{"d-none":!j}),children:[u,(0,x.jsx)(g,{})]})]})]})})]})}},57092:(e,t,a)=>{a.d(t,{A:()=>j});var s=a(65043),n=a(91688),i=a(44963),r=a(74117),l=a(98139),o=a.n(l),d=a(82937),c=a(75188),m=a.n(c),h=a(64150),u=a(31573),p=a(93122),x=a(26842),g=a(36295),b=a(70579);const j=(0,n.withRouter)((0,i.Ng)((e=>({colorScheme:e.ThemeOptions.colorScheme,enableFixedHeader:e.ThemeOptions.enableFixedHeader,enableMobileMenu:e.ThemeOptions.enableMobileMenu,enableFixedFooter:e.ThemeOptions.enableFixedFooter,enableFixedSidebar:e.ThemeOptions.enableFixedSidebar,enableClosedSidebar:e.ThemeOptions.enableClosedSidebar,enablePageTabsAlt:e.ThemeOptions.enablePageTabsAlt})))((e=>{const{t:t}=(0,r.Bd)();
1let{colorScheme:a,enableFixedHeader:i,enableFixedSidebar:l,enableFixedFooter:c,enableClosedSidebar:j,closedSmallerSidebar:f,enableMobileMenu:v,enablePageTabsAlt:N}=e;const L=(0,n.useHistory)(),{isLogged:_}=(0,h.A)();return(0,s.useEffect)((()=>{_||L.push("/")}),[_,L]),(0,b.jsx)(d.Ay,{handleWidth:!0,render:n=>{let{width:r}=n;return(0,b.jsx)(s.Fragment,{children:(0,b.jsxs)("div",{className:o()("app-container app-theme-"+a,{"fixed-header":i},{"fixed-sidebar":l||r<1250},{"fixed-footer":c},{"closed-sidebar":j||r<1250},{"closed-sidebar-mobile":f||r<1250},{"sidebar-mobile-open":v},{"body-tabs-shadow-btn":N}),children:[(0,b.jsx)(p.A,{}),(0,b.jsxs)("div",{className:"app-main",children:[(0,b.jsx)(x.A,{}),(0,b.jsxs)("div",{className:"app-main__outer",children:[(0,b.jsx)("div",{className:"app-main__inner",children:(0,b.jsxs)(m(),{component:"div",transitionName:"TabsAnimation",transitionAppear:!0,transitionAppearTimeout:0,transitionEnter:!1,transitionLeave:!1,children:[(0,b.jsx)(u.A,{heading:t(e.heading),subheading:t(e.subheading),icon:"pe-7s-".concat(e.icon," text-blue")}),e.children]})}),(0,b.jsx)(g.A,{})]})]})]})})}})})))}}]);
2//# sourceMappingURL=6176.ef2a9579.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.