dealposbooks 5.47.0 → 5.48.0
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/3rdpartylicenses.txt +75 -26
- package/assets/images/users/user1_160.jpg +0 -0
- package/assets/images/users/user1_40.jpg +0 -0
- package/assets/images/users/user1_80.jpg +0 -0
- package/assets/scss/layouts/_sidebar.scss +0 -1
- package/{chunk-2MKKFLNJ.js → chunk-2BI7WNJP.js} +1 -1
- package/{chunk-OVEQKHUV.js → chunk-2H7KQZEC.js} +2 -2
- package/{chunk-XT4YHL2M.js → chunk-2JNXKEYZ.js} +1 -1
- package/{chunk-53HJBLFX.js → chunk-2VZ7JZIO.js} +1 -1
- package/{chunk-YFNWEI3R.js → chunk-2XW2ZOT4.js} +1 -1
- package/{chunk-E4MHRZVH.js → chunk-3DBSHDAQ.js} +1 -1
- package/{chunk-MT3DTYJO.js → chunk-3NWFEFT2.js} +1 -1
- package/{chunk-JOHRJHEX.js → chunk-3UAQHNUY.js} +1 -1
- package/{chunk-3A4BFUGD.js → chunk-3VQUNDVT.js} +1 -1
- package/{chunk-CL4EKWSU.js → chunk-4LI7GDDM.js} +1 -1
- package/chunk-52U5NSQT.js +2 -0
- package/{chunk-VK3G2VIU.js → chunk-5B5AMMR3.js} +1 -1
- package/{chunk-5K3KAKU5.js → chunk-5FV7K5RQ.js} +1 -1
- package/{chunk-6NX36ZC2.js → chunk-6DTQWLB3.js} +1 -1
- package/chunk-6GQ4PTPT.js +7 -0
- package/chunk-6QJHEOXN.js +7 -0
- package/chunk-6WWXJJID.js +1 -0
- package/chunk-72H3DW5Z.js +1 -0
- package/{chunk-L2524E6T.js → chunk-7OP477BS.js} +1 -1
- package/{chunk-EIV4TELQ.js → chunk-7WCUKMRG.js} +1 -1
- package/{chunk-XDJSQLQN.js → chunk-ACDLAA4B.js} +1 -1
- package/{chunk-BUDZ3ONE.js → chunk-AD247LWQ.js} +1 -1
- package/{chunk-HQMTUZZQ.js → chunk-AMGBUOC4.js} +1 -1
- package/{chunk-CWFLUFKM.js → chunk-AN4SAUSA.js} +1 -1
- package/{chunk-KIBBRAL5.js → chunk-ARJ7OCQO.js} +1 -1
- package/{chunk-EEJGJ7WF.js → chunk-B3VZ2ZHJ.js} +1 -1
- package/{chunk-5BXMDXZD.js → chunk-B4C3ZPN6.js} +1 -1
- package/{chunk-WFIXL354.js → chunk-BG6BR7KI.js} +1 -1
- package/chunk-BKTBVFNX.js +1 -0
- package/chunk-BNPR5SPH.js +1 -0
- package/chunk-BT7Y4ADP.js +1 -0
- package/{chunk-5YO43YBO.js → chunk-CEK7MQW2.js} +1 -1
- package/chunk-CVDRHTES.js +1 -0
- package/{chunk-IYFNOI7S.js → chunk-CZSVRFCL.js} +1 -1
- package/chunk-D6IS6PE6.js +1 -0
- package/{chunk-GDQUB54I.js → chunk-DDM2KWNX.js} +1 -1
- package/{chunk-Q7SK53ST.js → chunk-DJXQKSLT.js} +1 -1
- package/chunk-DSZOROE6.js +1 -0
- package/{chunk-2D2YD753.js → chunk-DTYVTTET.js} +1 -1
- package/{chunk-PTQPB44D.js → chunk-E6SW7I4D.js} +1 -1
- package/{chunk-NDLX3ORI.js → chunk-E7QWESN4.js} +1 -1
- package/{chunk-CNXYBR45.js → chunk-ENH6HA3V.js} +1 -1
- package/{chunk-6XE7LGUS.js → chunk-EQTP2O7O.js} +1 -1
- package/{chunk-NHHXXJY6.js → chunk-F3RSX7TC.js} +1 -1
- package/{chunk-3IEOINKV.js → chunk-F6LZM7H5.js} +1 -1
- package/{chunk-AOOG6YOT.js → chunk-F7PVAVLQ.js} +1 -1
- package/{chunk-BXEGWIR3.js → chunk-F7XGJYCZ.js} +1 -1
- package/{chunk-53I5JFOQ.js → chunk-FSB3LHPU.js} +1 -1
- package/{chunk-S3FQPUAS.js → chunk-FUCKNGW4.js} +1 -1
- package/{chunk-AHX56FH2.js → chunk-FVYL3BQ7.js} +1 -1
- package/{chunk-5SYYPB6N.js → chunk-G42V3ZZU.js} +1 -1
- package/{chunk-C3IOIS5V.js → chunk-H7GQCGCR.js} +1 -1
- package/{chunk-F5CCLXIY.js → chunk-IDHDHBFV.js} +1 -1
- package/{chunk-JZVNZ3I3.js → chunk-JD3HX7VY.js} +1 -1
- package/{chunk-DEOAL7PG.js → chunk-JE4XET33.js} +1 -1
- package/{chunk-VSHPIUZM.js → chunk-KZHI6PGZ.js} +1 -1
- package/{chunk-PXN4RATH.js → chunk-LBREDZL5.js} +1 -1
- package/{chunk-35UWKNGE.js → chunk-LCKRY7CZ.js} +1 -1
- package/{chunk-SZAGTA5I.js → chunk-LXLOWSN6.js} +1 -1
- package/{chunk-YZTBV6HG.js → chunk-M4SSELXT.js} +1 -1
- package/{chunk-IMVMIXVJ.js → chunk-ME4ALIS7.js} +1 -1
- package/{chunk-LABWETHZ.js → chunk-MHRSQRHT.js} +1 -1
- package/{chunk-CWDU4F7J.js → chunk-NNNKDAA2.js} +1 -1
- package/{chunk-DRTMMJ4Q.js → chunk-NPXVSAMB.js} +1 -1
- package/chunk-O76TW6JA.js +1 -0
- package/{chunk-U5XXKH2H.js → chunk-OJTHBHGK.js} +1 -1
- package/{chunk-RZFXAB7W.js → chunk-OT3UFDBI.js} +1 -1
- package/chunk-OVDG3ZBT.js +1 -0
- package/{chunk-Q4LKKVQU.js → chunk-PGOSR3RI.js} +1 -1
- package/{chunk-XPRP6AB4.js → chunk-PPXXWO4E.js} +1 -1
- package/{chunk-ML5KV2U2.js → chunk-PQL4GCC5.js} +1 -1
- package/{chunk-QWTGY7FA.js → chunk-QPPFPDWZ.js} +1 -1
- package/{chunk-EQU7DDK6.js → chunk-RE5GBQH6.js} +1 -1
- package/{chunk-PKOERZXQ.js → chunk-RM5HLXNW.js} +1 -1
- package/{chunk-NM5M567G.js → chunk-RXR5DXWS.js} +1 -1
- package/{chunk-ZUDQOT7C.js → chunk-S27Z7D3D.js} +1 -1
- package/{chunk-GJYEM7DL.js → chunk-S2BFXF7C.js} +1 -1
- package/{chunk-DTFLX2XQ.js → chunk-SFMFIWMX.js} +1 -1
- package/{chunk-OLLF6BKH.js → chunk-SUXEBUIX.js} +1 -1
- package/chunk-SV6BE4HG.js +130 -0
- package/{chunk-SEXB43QC.js → chunk-T367AQJ2.js} +1 -1
- package/{chunk-SS4J7T3N.js → chunk-TOGXYKTE.js} +1 -1
- package/{chunk-IGWIRCAS.js → chunk-U2VDC52W.js} +1 -1
- package/{chunk-OW25MQS7.js → chunk-UEFTMQDF.js} +1 -1
- package/{chunk-4X3G6MGP.js → chunk-UI2UMYSE.js} +1 -1
- package/{chunk-RXOOTYEO.js → chunk-UPSNJEHO.js} +1 -1
- package/{chunk-LWYAFMN3.js → chunk-URH77XNK.js} +1 -1
- package/{chunk-HZ7BZ72K.js → chunk-UVSR4LPB.js} +1 -1
- package/{chunk-AXU3K2IY.js → chunk-V22QPBAO.js} +1 -1
- package/{chunk-T3EH4DR2.js → chunk-VDXZGF3M.js} +1 -1
- package/{chunk-ZBO62XAM.js → chunk-VKT27VPR.js} +2 -2
- package/{chunk-OIBDX2CA.js → chunk-VMI3QWC6.js} +1 -1
- package/{chunk-VTCV67A4.js → chunk-VVAI7ZGN.js} +1 -1
- package/{chunk-6PNHT5U7.js → chunk-VW2FJYIZ.js} +1 -1
- package/{chunk-VL2HEHI5.js → chunk-W5E37PZP.js} +1 -1
- package/chunk-W63NE6LU.js +229 -0
- package/{chunk-OJ2VC4ER.js → chunk-WKHQICFW.js} +1 -1
- package/{chunk-DHLFL3KH.js → chunk-WMZF4DQK.js} +1 -1
- package/{chunk-ETFYQ4GV.js → chunk-WOYTUHJD.js} +1 -1
- package/{chunk-WPMC3LJJ.js → chunk-WPJGKTVO.js} +5 -5
- package/{chunk-ZMIVD3SF.js → chunk-WXIG4CXY.js} +1 -1
- package/{chunk-Q47KHO2M.js → chunk-XCTUTMD3.js} +1 -1
- package/{chunk-MBJKUKHJ.js → chunk-XOSALV7T.js} +1 -1
- package/{chunk-RF27SIL3.js → chunk-Y7SF5NXD.js} +1 -1
- package/{chunk-DU72RNAU.js → chunk-YPOBALKC.js} +1 -1
- package/{chunk-V4SH72WU.js → chunk-ZFNIPERQ.js} +1 -1
- package/chunk-ZK43JB4A.js +2 -0
- package/{chunk-5JZTWUDG.js → chunk-ZQWFATZY.js} +1 -1
- package/index.html +2 -2
- package/main-XTOQBEFQ.js +1 -0
- package/package.json +1 -1
- package/{styles-4HAX3IDP.css → styles-4L5CAR46.css} +1 -1
- package/chunk-2RNKYO2Q.js +0 -1
- package/chunk-5CZNOXPC.js +0 -1
- package/chunk-5HZBSMCT.js +0 -7
- package/chunk-6ZZZTNIH.js +0 -130
- package/chunk-EPLZY6T4.js +0 -1
- package/chunk-M3TKVRYP.js +0 -1
- package/chunk-NMCKMUY4.js +0 -7
- package/chunk-QF4D5YPK.js +0 -1
- package/chunk-SN7DLFX2.js +0 -1
- package/chunk-TUFQ5JVG.js +0 -180
- package/chunk-V4B5LQYD.js +0 -2
- package/chunk-VZ5CMS5O.js +0 -2
- package/chunk-WGJFR6CK.js +0 -1
- package/main-Q2T6QX2N.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-XT4YHL2M.js";import{a as it}from"./chunk-G4XX7EU2.js";import{a as Pe}from"./chunk-VSHPIUZM.js";import{a as Ue,b as He}from"./chunk-HZ7BZ72K.js";import{a as te}from"./chunk-NHHXXJY6.js";import{b as N}from"./chunk-DU72RNAU.js";import{a as Me}from"./chunk-XKI7WLHE.js";import{a as Ge,b as Be}from"./chunk-T3EH4DR2.js";import"./chunk-LABWETHZ.js";import"./chunk-IGWIRCAS.js";import{a as z,b as j}from"./chunk-3A4BFUGD.js";import{d as De,i as ke,j as Je,k as Ne}from"./chunk-3IEOINKV.js";import{a as Ee,b as Te}from"./chunk-53I5JFOQ.js";import"./chunk-HQMTUZZQ.js";import"./chunk-RXOOTYEO.js";import{a as Re}from"./chunk-QF4D5YPK.js";import"./chunk-SEXB43QC.js";import{a as Ve,b as Fe}from"./chunk-CWFLUFKM.js";import"./chunk-LWYAFMN3.js";import"./chunk-NDLX3ORI.js";import"./chunk-E4MHRZVH.js";import"./chunk-XPRP6AB4.js";import"./chunk-YZTBV6HG.js";import"./chunk-DHLFL3KH.js";import"./chunk-QWTGY7FA.js";import{g as Ie}from"./chunk-TUFQ5JVG.js";import"./chunk-ZUDQOT7C.js";import{a as _e,b as ge}from"./chunk-BUDZ3ONE.js";import{a as xe,b as y,c as Ce,d as be,e as ve,f as ye,g as we,h as tt}from"./chunk-SN7DLFX2.js";import"./chunk-V4SH72WU.js";import{n as ce,o as de,w as ue,x as fe,y as he,z as Se}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import{b as ie,c as ne,e as oe,f as re,k as le,l as ae,o as pe,u as me,x as se}from"./chunk-OIBDX2CA.js";import"./chunk-AOOG6YOT.js";import"./chunk-M3TKVRYP.js";import"./chunk-2MKKFLNJ.js";import{h as $,j as Q,k as X,n as et,p as Y,q as Z,s as ee}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as E,Bb as L,Cc as q,Db as g,Ec as V,Ha as k,Lb as s,Nc as w,Oc as P,Pc as F,Rc as b,Vb as l,Wb as o,Xb as x,Y as B,_ as G,bd as I,c as R,db as U,ec as T,fc as _,hb as a,ia as v,qa as h,ra as S,rc as m,s as O,sc as C,tc as J,ua as Ze,vc as A,wc as W,xb as H,xc as M,yc as K}from"./chunk-NMCKMUY4.js";import{a as c,b as d}from"./chunk-YQFG5XE2.js";var gt={data:{data:[],totalCount:0},meta:{options:{outlets:[],paymentStates:[],deliveryStates:[]},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},Ke=Ce(we(gt),be(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedInvoice:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),ye(t=>{let p=v(D),e=v(N);return{updateFilter(n){y(t,i=>d(c({},i),{filter:c(c({},i.filter),n),skipRequestFirst:!1}))},onRowSelect(n){y(t,i=>{let f=i.data.data.map(u=>u.id===n.id?d(c({},u),{checked:!0}):u);return d(c({},i),{data:d(c({},i.data),{data:f})})})},onRowUnselect(n){y(t,i=>{let f=i.data.data.map(u=>u.id===n.id?d(c({},u),{checked:!1}):u);return d(c({},i),{data:d(c({},i.data),{data:f})})})},onHeaderCheckboxToggle(n){y(t,i=>{let f=i.data.data.map(u=>d(c({},u),{checked:n}));return d(c({},i),{data:d(c({},i.data),{data:f})})})},getCustomerInvoice:z(R(O(n=>Object.entries(n).reduce((i,[f,u])=>(u!=null&&(i[f]=u),i),{})),B(n=>p.getJournalInvoice(n).pipe(O(i=>d(c({},i),{data:i.data.map(f=>d(c({},f),{due:e.from(f.due)?e.from(f.due).format():null,checked:!1}))})),Re("getCustomerInvoice"),j({next:i=>{y(t,f=>d(c({},f),{data:d(c({},f.data),{data:i.data,totalCount:i.totalCount})}))},error:i=>{console.error("Error fetching customer invoice:",i)}}))))),getCustomerInvoiceLoader:z(R(B(()=>p.getJournalInvoiceLoader().pipe(j({next:n=>{y(t,i=>d(c({},i),{meta:n}))},error:n=>{console.error("Error fetching customer invoice loader:",n)}})))))}}),ve(t=>({onInit:()=>{t.getCustomerInvoiceLoader(),t.getCustomerInvoice(t.filter)}})));var qe=t=>({"ng-invalid ng-dirty":t});function xt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function Ct(t,p){if(t&1&&g(0,xt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function bt(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Outlet"),o(),l(5,"th",14),m(6,"Number"),o(),l(7,"th",15),m(8,"Customer"),o(),l(9,"th",16),m(10,"Date"),o(),l(11,"th",16),m(12,"Due"),o(),l(13,"th",13),m(14,"Amount"),o(),l(15,"th",17),m(16,"Payment"),o(),l(17,"th",17),m(18,"Delivery"),o(),x(19,"th",18),o())}function vt(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td"),m(4),o(),l(5,"td")(6,"a",20),m(7),o()(),l(8,"td")(9,"a",20),m(10),o()(),l(11,"td"),m(12),w(13,"date"),o(),l(14,"td"),m(15),w(16,"date"),o(),l(17,"td"),m(18),w(19,"number"),o(),l(20,"td"),x(21,"p-chip",21),o(),l(22,"td"),x(23,"p-chip",21),o(),l(24,"td"),x(25,"p-button",22),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),C(e.outlet),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Customer_Invoice/Info?ID="+e.id,U),a(),J(" ",e.number," "),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.customerID,U),a(),J(" ",e.customer," "),a(2),C(F(13,14,e.date,"d MMM y hh:mm")),a(3),C(e.due?F(16,17,e.due,"d MMM y hh:mm"):"-"),a(3),C(P(19,20,e.amount)),a(3),s("label",e.payment),a(2),s("label",e.delivery),a(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function yt(t,p){if(t&1&&m(0),t&2){let e=_(2);A(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function wt(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function It(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,bt,20,0,"ng-template",null,3,b)(4,vt,26,22,"ng-template",null,4,b)(6,yt,1,3,"ng-template",null,5,b)(8,wt,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("lazy",!0)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}function Et(t,p){if(t&1&&(l(0,"span",36),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),J(" ",F(2,2,e.name,30)," ")}}function Tt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Vt(t,p){if(t&1&&(l(0,"div"),g(1,Tt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function Ft(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Dt(t,p){if(t&1&&(l(0,"div"),g(1,Ft,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function kt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Jt(t,p){if(t&1&&(l(0,"div"),g(1,kt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function Nt(t,p){if(t&1){let e=E();l(0,"form",24)(1,"div",25)(2,"label",26),m(3,"Outlet"),o(),l(4,"p-select",27),g(5,Et,3,5,"ng-template",null,7,b),o()(),l(7,"div",25)(8,"label",26),m(9,"Payment"),o(),x(10,"p-select",28),o(),l(11,"div",25)(12,"label",26),m(13,"Delivery"),o(),x(14,"p-select",29),o(),l(15,"div",25)(16,"label",26),m(17,"From - To"),o(),l(18,"div",30),x(19,"p-datepicker",31),g(20,Vt,2,1,"div",32),x(21,"p-datepicker",33),g(22,Dt,2,1,"div",32),o()(),l(23,"div",25)(24,"label",26),m(25,"Customer"),o(),l(26,"p-autocomplete",34),T("completeMethod",function(n){h(e);let i=_();return S(i.onSearchContact(n))}),o()(),l(27,"div",25)(28,"label",26),m(29,"Page Size"),o(),x(30,"input",35),g(31,Jt,2,1,"div",32),o()()}if(t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),a(6),s("options",e.store.meta().options.paymentStates),a(4),s("options",e.store.meta().options.deliveryStates),a(5),s("iconDisplay","input")("showIcon",!0)("ngClass",V(16,qe,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",V(18,qe,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",e.customerSuggestions()),a(4),s("ngClass",V(20,qe,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var ut=(()=>{class t extends Me{constructor(){super(...arguments),this.store=v(Ke),this.dayjsService=v(N),this.generateJournalService=v(D),this.authService=v(te),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.customerSuggestions=k([]),this.fb=v(me)}ngOnInit(){console.log(this.dayjsService.from('0001-01-01T00:00:00"')&&!0),this.generateFilterForm()}generateFilterForm(){let{number:e,outletName:r,paymentState:n,deliveryState:i,from:f,to:u,customerID:ze,pageNumber:je,pageSize:Oe,export:Le,exportPageNumber:Ae,exportPageSize:We}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(r),paymentState:this.fb.control(n),deliveryState:this.fb.control(i),from:this.fb.control(this.dayjsService.from(f)?this.dayjsService.from(f).toDate():null),to:this.fb.control(this.dayjsService.from(u)?this.dayjsService.from(u).toDate():null),customerID:this.fb.control(ze),pageNumber:this.fb.control(je),pageSize:this.fb.control(Oe,[ne.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(Ae),exportPageSize:this.fb.control(We)})}onSearchContact(e){let{query:r}=e;this.generateJournalService.getCustomerSuggestions(r).pipe(Re("Customer Suggestions"),G(n=>{this.customerSuggestions.set(n)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:r+1}))}onGenerateJournal(){this.generateJournalService.generateJournalInvoice(this.store.checkedInvoice()).pipe(G(()=>{this.store.getCustomerInvoice(this.store.filter)})).subscribe()}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>{switch(n){case"customerID":i||(r[n]=it);break;case"from":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;default:r[n]=i===null?"":i;break}return r},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Ze(t)))(n||t)}})()}static{this.\u0275cmp=H({type:t,selectors:[["app-customer-invoice"]],features:[q([Ke]),L],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Customer Invoice",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","lazy","paginator","rows","totalRecords","value"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","10"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],["showClear","","formControlName","paymentState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Payment",3,"options"],["showClear","","formControlName","deliveryState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Delivery",3,"options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","customerID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize","appMaskNumber","",3,"ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),M(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),M(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,Ct,1,1,"ng-template",null,0,b)(3,It,10,5,"ng-template",null,1,b)(5,Nt,32,22,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ie,Ne,De,ke,Je,ee,$,Q,X,Z,Y,Be,Ge,ge,_e,fe,ue,Fe,Ve,Te,Ee,de,ce,He,Ue,se,le,ie,oe,re,ae,pe,Se,he,xe,Pe],encapsulation:2,changeDetection:0})}}return t})();var Rt={data:{data:[],totalCount:0},meta:{options:{Outlets:[],PaymentStates:[],DeliveryStates:[]},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4},skipRequestFirst:!0},$e=Ce(tt("JournalSupplierBillStore"),we(Rt),be(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedSupplierBill:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),ye(t=>{let p=v(D),e=v(N);return{updateFilter(r){y(t,n=>d(c({},n),{filter:c(c({},n.filter),r),skipRequestFirst:!1}))},onRowSelect(r){y(t,n=>{let i=n.data.data.map(f=>f.id===r.id?d(c({},f),{checked:!0}):f);return d(c({},n),{data:d(c({},n.data),{data:i})})})},onRowUnselect(r){y(t,n=>{let i=n.data.data.map(f=>f.id===r.id?d(c({},f),{checked:!1}):f);return d(c({},n),{data:d(c({},n.data),{data:i})})})},onHeaderCheckboxToggle(r){y(t,n=>{let i=n.data.data.map(f=>d(c({},f),{checked:r}));return d(c({},n),{data:d(c({},n.data),{data:i})})})},getGJSupplierBillLoader:z(R(B(()=>p.getGJSupplierBillLoader().pipe(j({next:r=>{console.log("GJSupplierBillLoader response:",r),y(t,n=>d(c({},n),{meta:r}))},error:r=>{console.error("Error fetching GJSupplierBillLoader:",r)}}))))),getJournalSupplierBill:z(R(O(r=>Object.entries(r).reduce((n,[i,f])=>(f!=null&&(n[i]=f),n),{})),B(r=>p.getJournalSupplierBill(r).pipe(O(n=>d(c({},n),{data:n.data.map(i=>d(c({},i),{due:e.from(i.due)?e.from(i.due).format():null,checked:!1}))})),j({next:n=>{y(t,i=>d(c({},i),{data:n}))},error:n=>{console.error("Error fetching journal supplier bill:",n)}})))))}}),ve(t=>({onInit:()=>{t.getGJSupplierBillLoader(),t.getJournalSupplierBill(t.filter)}})));var Qe=t=>({"ng-invalid ng-dirty":t});function Bt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function Mt(t,p){if(t&1&&g(0,Bt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function Pt(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Outlet"),o(),l(5,"th",14),m(6,"Number"),o(),l(7,"th",15),m(8,"Supplier"),o(),l(9,"th",16),m(10,"Date"),o(),l(11,"th",16),m(12,"Due"),o(),l(13,"th",13),m(14,"Amount"),o(),l(15,"th",17),m(16,"Payment"),o(),l(17,"th",17),m(18,"Delivery"),o(),x(19,"th",18),o())}function zt(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td"),m(4),o(),l(5,"td")(6,"a",20),m(7),o()(),l(8,"td"),m(9),o(),l(10,"td"),m(11),w(12,"date"),o(),l(13,"td"),m(14),w(15,"date"),o(),l(16,"td"),m(17),w(18,"number"),o(),l(19,"td"),x(20,"p-chip",21),o(),l(21,"td"),x(22,"p-chip",21),o(),l(23,"td"),x(24,"p-button",22),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),C(e.outlet),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Supplier_Bill/Info?ID="+e.id,U),a(),J(" ",e.number," "),a(2),C(e.customer),a(2),C(F(12,13,e.date,"d MMM y hh:mm")),a(3),C(e.due?F(15,16,e.due,"d MMM y hh:mm"):"-"),a(3),C(P(18,19,e.amount)),a(3),s("label",e.payment),a(2),s("label",e.delivery),a(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function jt(t,p){if(t&1&&m(0),t&2){let e=_(2);A(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Ot(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function Gt(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,Pt,20,0,"ng-template",null,3,b)(4,zt,25,21,"ng-template",null,4,b)(6,jt,1,3,"ng-template",null,5,b)(8,Ot,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function Ut(t,p){if(t&1&&(l(0,"span",36),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),J(" ",F(2,2,e.name,30)," ")}}function Ht(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Lt(t,p){if(t&1&&(l(0,"div"),g(1,Ht,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function At(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Wt(t,p){if(t&1&&(l(0,"div"),g(1,At,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function Kt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function qt(t,p){if(t&1&&(l(0,"div"),g(1,Kt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function $t(t,p){if(t&1){let e=E();l(0,"form",24)(1,"div",25)(2,"label",26),m(3,"Outlet"),o(),l(4,"p-select",27),g(5,Ut,3,5,"ng-template",null,7,b),o()(),l(7,"div",25)(8,"label",26),m(9,"Payment"),o(),x(10,"p-select",28),o(),l(11,"div",25)(12,"label",26),m(13,"Delivery"),o(),x(14,"p-select",29),o(),l(15,"div",25)(16,"label",26),m(17,"From - To"),o(),l(18,"div",30),x(19,"p-datepicker",31),g(20,Lt,2,1,"div",32),x(21,"p-datepicker",33),g(22,Wt,2,1,"div",32),o()(),l(23,"div",25)(24,"label",26),m(25,"Supplier"),o(),l(26,"p-autocomplete",34),w(27,"async"),T("completeMethod",function(n){h(e);let i=_();return S(i.onSearchSupplier(n))}),o()(),l(28,"div",25)(29,"label",26),m(30,"Page Size"),o(),x(31,"input",35),g(32,qt,2,1,"div",32),o()()}if(t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.Outlets),a(6),s("options",e.store.meta().options.PaymentStates),a(4),s("options",e.store.meta().options.DeliveryStates),a(5),s("iconDisplay","input")("showIcon",!0)("ngClass",V(18,Qe,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",V(20,Qe,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",P(27,16,e.supplierSuggestions$)),a(5),s("ngClass",V(22,Qe,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var ft=(()=>{class t extends Me{constructor(){super(),this.generateJournalService=v(D),this.store=v($e),this.authService=v(te),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=v(me),this.dayjsService=v(N)}ngOnInit(){this.initform()}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>(i!=null&&(n==="from"||n==="to"?(typeof i=="string"||typeof i=="number"||i instanceof Date)&&(r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null):r[n]=i),r),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(r=>!r)}onRowSelect(e){this.store.onRowSelect(e.data)}onSearchSupplier(e){this.supplierSuggestions$=this.generateJournalService.getSupplierSuggestions(e.query).pipe(Re("Supplier Suggestions"))}initform(){let{outletName:e,number:r,from:n,to:i,paymentState:f,deliveryState:u,supplierID:ze,pageNumber:je,pageSize:Oe,export:Le,exportPageNumber:Ae,exportPageSize:We}=this.store.filter();this.form=this.fb.group({outletName:this.fb.control(e),number:this.fb.control(r),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),paymentState:this.fb.control(f),deliveryState:this.fb.control(u),supplierID:this.fb.control(ze),pageNumber:this.fb.control(je),pageSize:this.fb.control(Oe,[ne.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(Ae),exportPageSize:this.fb.control(We)})}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedSupplierBill()).pipe(G(()=>{this.store.getJournalSupplierBill(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onPageChange(e){this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:e.first/e.rows+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=H({type:t,selectors:[["app-journal-supplier-bill"]],features:[q([$e]),L],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Supplier Bill",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","10"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],["showClear","","formControlName","paymentState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Payment",3,"options"],["showClear","","formControlName","deliveryState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Delivery",3,"options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","supplierID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","appMaskNumber","","formControlName","pageSize",3,"ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),M(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),M(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,Mt,1,1,"ng-template",null,0,b)(3,Gt,10,5,"ng-template",null,1,b)(5,$t,33,24,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ie,Ne,De,ke,Je,ee,$,Q,X,et,Z,Y,Be,Ge,ge,_e,fe,ue,Fe,Ve,Te,Ee,He,Ue,se,le,ie,oe,re,ae,pe,de,ce,xe,Se,he,Pe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Qt={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},Xe=Ce(we(Qt),be(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedShift:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),ye(t=>{let p=v(D);return{updateFilter(e){y(t,r=>d(c({},r),{filter:c(c({},r.filter),e)}))},onRowSelect(e){y(t,r=>{let n=r.data.data.map(i=>i.id===e.id?d(c({},i),{checked:!0}):i);return d(c({},r),{data:d(c({},r.data),{data:n})})})},onRowUnselect(e){y(t,r=>{let n=r.data.data.map(i=>i.id===e.id?d(c({},i),{checked:!1}):i);return d(c({},r),{data:d(c({},r.data),{data:n})})})},onHeaderCheckboxToggle(e){y(t,r=>{let n=r.data.data.map(i=>d(c({},i),{checked:e}));return d(c({},r),{data:d(c({},r.data),{data:n})})})},getGJShiftLoader:z(R(B(()=>p.getGJShiftLoader().pipe(j(e=>y(t,r=>d(c({},r),{meta:e})),e=>console.error("Error fetching GJ Shift Loader:",e)))))),getJournalShift:z(R(O(e=>Object.entries(e).reduce((r,[n,i])=>(i!=null&&(r[n]=i),r),{})),B(e=>p.getJournalShift(e).pipe(j(r=>y(t,n=>d(c({},n),{data:r})),r=>console.error("Error fetching journal shift:",r))))))}}),ve(t=>({onInit:()=>{t.getGJShiftLoader(),t.getJournalShift(t.filter)}})));var Ye=t=>({"ng-invalid ng-dirty":t});function Xt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function Yt(t,p){if(t&1&&g(0,Xt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function Zt(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Number"),o(),l(5,"th",14),m(6,"Open"),o(),l(7,"th",14),m(8,"Close"),o(),l(9,"th",15),m(10,"Cashier"),o(),l(11,"th",16),m(12,"Sales + Tax"),o(),l(13,"th",17),m(14,"Invoices"),o(),l(15,"th",16),m(16,"Outlet"),o(),l(17,"th",17),m(18,"Register"),o(),l(19,"th",17),m(20,"Visitors"),o(),x(21,"th",18),o())}function ei(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td")(4,"a",20),m(5),o()(),l(6,"td"),m(7),w(8,"date"),o(),l(9,"td"),m(10),w(11,"date"),o(),l(12,"td"),m(13),o(),l(14,"td"),m(15),w(16,"number"),o(),l(17,"td"),m(18),w(19,"number"),o(),l(20,"td"),m(21),o(),l(22,"td"),m(23),o(),l(24,"td"),m(25),w(26,"number"),o(),l(27,"td"),x(28,"p-button",21),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Shift/Main/Previous_Shift/Register_Shift_Detail?ID="+e.id,U),a(),J(" ",e.number," "),a(2),C(F(8,14,e.open,"dd MMM y hh:mm")),a(3),C(F(11,17,e.close,"dd MMM y hh:mm")),a(3),C(e.cashier),a(2),C(P(16,20,e.salesNTax)),a(3),C(P(19,22,e.totalInvoice)),a(3),C(e.outlet),a(2),C(e.register),a(2),C(P(26,24,e.visitors)),a(3),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function ti(t,p){if(t&1&&m(0),t&2){let e=_(2);A(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function ii(t,p){t&1&&(l(0,"tr")(1,"td",22)(2,"span"),m(3,"No records found."),o()()())}function ni(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,Zt,22,0,"ng-template",null,3,b)(4,ei,29,26,"ng-template",null,4,b)(6,ti,1,3,"ng-template",null,5,b)(8,ii,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("paginator",!0)("lazy",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}function oi(t,p){if(t&1&&(l(0,"span",32),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),J(" ",F(2,2,e.name,30)," ")}}function ri(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function li(t,p){if(t&1&&(l(0,"div"),g(1,ri,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function ai(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function pi(t,p){if(t&1&&(l(0,"div"),g(1,ai,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function mi(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function si(t,p){if(t&1&&(l(0,"div"),g(1,mi,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function ci(t,p){if(t&1&&(l(0,"form",23)(1,"div",24)(2,"label",25),m(3,"Outlet"),o(),l(4,"p-select",26),g(5,oi,3,5,"ng-template",null,7,b),o()(),l(7,"div",24)(8,"label",25),m(9,"From - To"),o(),l(10,"div",27),x(11,"p-datepicker",28),g(12,li,2,1,"div",29),x(13,"p-datepicker",30),g(14,pi,2,1,"div",29),o()(),l(15,"div",24)(16,"label",25),m(17,"Page Size"),o(),x(18,"input",31),g(19,si,2,1,"div",29),o()()),t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),a(7),s("iconDisplay","input")("showIcon",!0)("ngClass",V(13,Ye,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",V(15,Ye,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("ngClass",V(17,Ye,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var _t=(()=>{class t extends Me{constructor(){super(),this.generateJournalService=v(D),this.store=v(Xe),this.authService=v(te),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=v(me),this.dayjsService=v(N)}ngOnInit(){this.initForm()}initForm(){let{number:e,outletName:r,from:n,to:i,pageNumber:f,pageSize:u,export:ze,exportPageNumber:je,exportPageSize:Oe}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(r),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),pageNumber:this.fb.control(f),pageSize:this.fb.control(u,[ne.required]),export:this.fb.control(ze),exportPageNumber:this.fb.control(je),exportPageSize:this.fb.control(Oe)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>{switch(n){case"from":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;default:r[n]=i===null?"":i;break}return r},{});this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedShift()).pipe(G(()=>{this.store.getJournalShift(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:r+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=H({type:t,selectors:[["app-journal-shift"]],features:[q([Xe]),L],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Shift Journal",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","paginator","lazy","rows","totalRecords","value"],[2,"width","1rem"],[2,"width","12rem"],[2,"width","11rem"],[2,"width","14rem"],[2,"width","10rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"icon","severity","text"],["colspan","11"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["type","text","pInputText","","formControlName","pageSize","appMaskNumber","",3,"ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),M(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),M(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,Yt,1,1,"ng-template",null,0,b)(3,ni,10,5,"ng-template",null,1,b)(5,ci,20,19,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ie,Ne,De,ke,Je,ee,$,Q,X,Z,Y,Be,ge,_e,fe,ue,se,le,ie,oe,re,ae,pe,Fe,Ve,Te,Ee,xe,Se,he,de,ce,Pe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var fo=[{path:"invoice",component:ut},{path:"supplier-bill",component:ft},{path:"shift",component:_t},{path:"join-invoice",loadComponent:()=>import("./chunk-OLLF6BKH.js").then(t=>t.ARJournalComponent)},{path:"join-bill",loadComponent:()=>import("./chunk-RF27SIL3.js").then(t=>t.ApJournalComponent)},{path:"adjustment",loadComponent:()=>import("./chunk-5K3KAKU5.js").then(t=>t.AdjustmentJournalComponent)}];export{fo as generateJournalRoutes};
|
|
1
|
+
import{a as D}from"./chunk-2JNXKEYZ.js";import{a as it}from"./chunk-G4XX7EU2.js";import{a as Pe}from"./chunk-KZHI6PGZ.js";import{a as Ue,b as He}from"./chunk-UVSR4LPB.js";import{a as te}from"./chunk-F3RSX7TC.js";import{b as N}from"./chunk-YPOBALKC.js";import{a as Me}from"./chunk-XKI7WLHE.js";import{a as Ge,b as Be}from"./chunk-VDXZGF3M.js";import"./chunk-MHRSQRHT.js";import"./chunk-U2VDC52W.js";import{a as z,b as j}from"./chunk-3VQUNDVT.js";import{d as ke,i as Je,j as Ne,k as Re}from"./chunk-F6LZM7H5.js";import{a as Ee,b as Te}from"./chunk-FSB3LHPU.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import{a as Ve}from"./chunk-BT7Y4ADP.js";import"./chunk-T367AQJ2.js";import{a as Fe,b as De}from"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-E7QWESN4.js";import"./chunk-3DBSHDAQ.js";import"./chunk-PPXXWO4E.js";import"./chunk-M4SSELXT.js";import"./chunk-WMZF4DQK.js";import"./chunk-QPPFPDWZ.js";import{i as Ie}from"./chunk-W63NE6LU.js";import"./chunk-S27Z7D3D.js";import{a as _e,b as ge}from"./chunk-AD247LWQ.js";import{a as xe,b as y,c as Ce,d as be,e as ve,f as ye,g as we,h as tt}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{n as ce,o as de,w as ue,x as fe,y as he,z as Se}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{b as ie,c as ne,e as oe,f as re,k as le,l as ae,o as pe,u as me,x as se}from"./chunk-VMI3QWC6.js";import"./chunk-F7PVAVLQ.js";import"./chunk-DSZOROE6.js";import"./chunk-2BI7WNJP.js";import{h as $,j as Q,k as X,n as et,p as Y,q as Z,s as ee}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Cb as L,Dc as q,Eb as g,Fc as V,Ha as k,Mb as s,Oc as w,Pc as P,Qc as F,Sc as b,Wb as l,Xb as o,Y as B,Yb as x,_ as G,ac as E,bd as I,c as R,eb as U,fc as T,gc as _,ia as v,ib as a,qa as h,ra as S,s as O,sc as m,tc as C,ua as Ze,uc as J,wc as A,xc as W,yb as H,yc as M,zc as K}from"./chunk-6QJHEOXN.js";import{a as c,b as d}from"./chunk-YQFG5XE2.js";var gt={data:{data:[],totalCount:0},meta:{options:{outlets:[],paymentStates:[],deliveryStates:[]},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},Ke=Ce(we(gt),be(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedInvoice:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),ye(t=>{let p=v(D),e=v(N);return{updateFilter(n){y(t,i=>d(c({},i),{filter:c(c({},i.filter),n),skipRequestFirst:!1}))},onRowSelect(n){y(t,i=>{let f=i.data.data.map(u=>u.id===n.id?d(c({},u),{checked:!0}):u);return d(c({},i),{data:d(c({},i.data),{data:f})})})},onRowUnselect(n){y(t,i=>{let f=i.data.data.map(u=>u.id===n.id?d(c({},u),{checked:!1}):u);return d(c({},i),{data:d(c({},i.data),{data:f})})})},onHeaderCheckboxToggle(n){y(t,i=>{let f=i.data.data.map(u=>d(c({},u),{checked:n}));return d(c({},i),{data:d(c({},i.data),{data:f})})})},getCustomerInvoice:z(R(O(n=>Object.entries(n).reduce((i,[f,u])=>(u!=null&&(i[f]=u),i),{})),B(n=>p.getJournalInvoice(n).pipe(O(i=>d(c({},i),{data:i.data.map(f=>d(c({},f),{due:e.from(f.due)?e.from(f.due).format():null,checked:!1}))})),Ve("getCustomerInvoice"),j({next:i=>{y(t,f=>d(c({},f),{data:d(c({},f.data),{data:i.data,totalCount:i.totalCount})}))},error:i=>{console.error("Error fetching customer invoice:",i)}}))))),getCustomerInvoiceLoader:z(R(B(()=>p.getJournalInvoiceLoader().pipe(j({next:n=>{y(t,i=>d(c({},i),{meta:n}))},error:n=>{console.error("Error fetching customer invoice loader:",n)}})))))}}),ve(t=>({onInit:()=>{t.getCustomerInvoiceLoader(),t.getCustomerInvoice(t.filter)}})));var qe=t=>({"ng-invalid ng-dirty":t});function xt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function Ct(t,p){if(t&1&&g(0,xt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function bt(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Outlet"),o(),l(5,"th",14),m(6,"Number"),o(),l(7,"th",15),m(8,"Customer"),o(),l(9,"th",16),m(10,"Date"),o(),l(11,"th",16),m(12,"Due"),o(),l(13,"th",13),m(14,"Amount"),o(),l(15,"th",17),m(16,"Payment"),o(),l(17,"th",17),m(18,"Delivery"),o(),x(19,"th",18),o())}function vt(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td"),m(4),o(),l(5,"td")(6,"a",20),m(7),o()(),l(8,"td")(9,"a",20),m(10),o()(),l(11,"td"),m(12),w(13,"date"),o(),l(14,"td"),m(15),w(16,"date"),o(),l(17,"td"),m(18),w(19,"number"),o(),l(20,"td"),x(21,"p-chip",21),o(),l(22,"td"),x(23,"p-chip",21),o(),l(24,"td"),x(25,"p-button",22),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),C(e.outlet),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Customer_Invoice/Info?ID="+e.id,U),a(),J(" ",e.number," "),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.customerID,U),a(),J(" ",e.customer," "),a(2),C(F(13,14,e.date,"d MMM y hh:mm")),a(3),C(e.due?F(16,17,e.due,"d MMM y hh:mm"):"-"),a(3),C(P(19,20,e.amount)),a(3),s("label",e.payment),a(2),s("label",e.delivery),a(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function yt(t,p){if(t&1&&m(0),t&2){let e=_(2);A(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function wt(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function It(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,bt,20,0,"ng-template",null,3,b)(4,vt,26,22,"ng-template",null,4,b)(6,yt,1,3,"ng-template",null,5,b)(8,wt,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("lazy",!0)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}function Et(t,p){if(t&1&&(l(0,"span",36),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),J(" ",F(2,2,e.name,30)," ")}}function Tt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Vt(t,p){if(t&1&&(l(0,"div"),g(1,Tt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function Ft(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Dt(t,p){if(t&1&&(l(0,"div"),g(1,Ft,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function kt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Jt(t,p){if(t&1&&(l(0,"div"),g(1,kt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function Nt(t,p){if(t&1){let e=E();l(0,"form",24)(1,"div",25)(2,"label",26),m(3,"Outlet"),o(),l(4,"p-select",27),g(5,Et,3,5,"ng-template",null,7,b),o()(),l(7,"div",25)(8,"label",26),m(9,"Payment"),o(),x(10,"p-select",28),o(),l(11,"div",25)(12,"label",26),m(13,"Delivery"),o(),x(14,"p-select",29),o(),l(15,"div",25)(16,"label",26),m(17,"From - To"),o(),l(18,"div",30),x(19,"p-datepicker",31),g(20,Vt,2,1,"div",32),x(21,"p-datepicker",33),g(22,Dt,2,1,"div",32),o()(),l(23,"div",25)(24,"label",26),m(25,"Customer"),o(),l(26,"p-autocomplete",34),T("completeMethod",function(n){h(e);let i=_();return S(i.onSearchContact(n))}),o()(),l(27,"div",25)(28,"label",26),m(29,"Page Size"),o(),x(30,"input",35),g(31,Jt,2,1,"div",32),o()()}if(t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),a(6),s("options",e.store.meta().options.paymentStates),a(4),s("options",e.store.meta().options.deliveryStates),a(5),s("iconDisplay","input")("showIcon",!0)("ngClass",V(16,qe,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",V(18,qe,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",e.customerSuggestions()),a(4),s("ngClass",V(20,qe,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var ut=(()=>{class t extends Me{constructor(){super(...arguments),this.store=v(Ke),this.dayjsService=v(N),this.generateJournalService=v(D),this.authService=v(te),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.customerSuggestions=k([]),this.fb=v(me)}ngOnInit(){console.log(this.dayjsService.from('0001-01-01T00:00:00"')&&!0),this.generateFilterForm()}generateFilterForm(){let{number:e,outletName:r,paymentState:n,deliveryState:i,from:f,to:u,customerID:ze,pageNumber:je,pageSize:Oe,export:Le,exportPageNumber:Ae,exportPageSize:We}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(r),paymentState:this.fb.control(n),deliveryState:this.fb.control(i),from:this.fb.control(this.dayjsService.from(f)?this.dayjsService.from(f).toDate():null),to:this.fb.control(this.dayjsService.from(u)?this.dayjsService.from(u).toDate():null),customerID:this.fb.control(ze),pageNumber:this.fb.control(je),pageSize:this.fb.control(Oe,[ne.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(Ae),exportPageSize:this.fb.control(We)})}onSearchContact(e){let{query:r}=e;this.generateJournalService.getCustomerSuggestions(r).pipe(Ve("Customer Suggestions"),G(n=>{this.customerSuggestions.set(n)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:r+1}))}onGenerateJournal(){this.generateJournalService.generateJournalInvoice(this.store.checkedInvoice()).pipe(G(()=>{this.store.getCustomerInvoice(this.store.filter)})).subscribe()}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>{switch(n){case"customerID":i||(r[n]=it);break;case"from":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;default:r[n]=i===null?"":i;break}return r},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Ze(t)))(n||t)}})()}static{this.\u0275cmp=H({type:t,selectors:[["app-customer-invoice"]],features:[q([Ke]),L],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Customer Invoice",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","lazy","paginator","rows","totalRecords","value"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","10"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],["showClear","","formControlName","paymentState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Payment",3,"options"],["showClear","","formControlName","deliveryState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Delivery",3,"options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","customerID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize","appMaskNumber","",3,"ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),M(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),M(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,Ct,1,1,"ng-template",null,0,b)(3,It,10,5,"ng-template",null,1,b)(5,Nt,32,22,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ie,Re,ke,Je,Ne,ee,$,Q,X,Z,Y,Be,Ge,ge,_e,fe,ue,De,Fe,Te,Ee,de,ce,He,Ue,se,le,ie,oe,re,ae,pe,Se,he,xe,Pe],encapsulation:2,changeDetection:0})}}return t})();var Rt={data:{data:[],totalCount:0},meta:{options:{Outlets:[],PaymentStates:[],DeliveryStates:[]},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4},skipRequestFirst:!0},$e=Ce(tt("JournalSupplierBillStore"),we(Rt),be(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedSupplierBill:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),ye(t=>{let p=v(D),e=v(N);return{updateFilter(r){y(t,n=>d(c({},n),{filter:c(c({},n.filter),r),skipRequestFirst:!1}))},onRowSelect(r){y(t,n=>{let i=n.data.data.map(f=>f.id===r.id?d(c({},f),{checked:!0}):f);return d(c({},n),{data:d(c({},n.data),{data:i})})})},onRowUnselect(r){y(t,n=>{let i=n.data.data.map(f=>f.id===r.id?d(c({},f),{checked:!1}):f);return d(c({},n),{data:d(c({},n.data),{data:i})})})},onHeaderCheckboxToggle(r){y(t,n=>{let i=n.data.data.map(f=>d(c({},f),{checked:r}));return d(c({},n),{data:d(c({},n.data),{data:i})})})},getGJSupplierBillLoader:z(R(B(()=>p.getGJSupplierBillLoader().pipe(j({next:r=>{console.log("GJSupplierBillLoader response:",r),y(t,n=>d(c({},n),{meta:r}))},error:r=>{console.error("Error fetching GJSupplierBillLoader:",r)}}))))),getJournalSupplierBill:z(R(O(r=>Object.entries(r).reduce((n,[i,f])=>(f!=null&&(n[i]=f),n),{})),B(r=>p.getJournalSupplierBill(r).pipe(O(n=>d(c({},n),{data:n.data.map(i=>d(c({},i),{due:e.from(i.due)?e.from(i.due).format():null,checked:!1}))})),j({next:n=>{y(t,i=>d(c({},i),{data:n}))},error:n=>{console.error("Error fetching journal supplier bill:",n)}})))))}}),ve(t=>({onInit:()=>{t.getGJSupplierBillLoader(),t.getJournalSupplierBill(t.filter)}})));var Qe=t=>({"ng-invalid ng-dirty":t});function Bt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function Mt(t,p){if(t&1&&g(0,Bt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function Pt(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Outlet"),o(),l(5,"th",14),m(6,"Number"),o(),l(7,"th",15),m(8,"Supplier"),o(),l(9,"th",16),m(10,"Date"),o(),l(11,"th",16),m(12,"Due"),o(),l(13,"th",13),m(14,"Amount"),o(),l(15,"th",17),m(16,"Payment"),o(),l(17,"th",17),m(18,"Delivery"),o(),x(19,"th",18),o())}function zt(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td"),m(4),o(),l(5,"td")(6,"a",20),m(7),o()(),l(8,"td"),m(9),o(),l(10,"td"),m(11),w(12,"date"),o(),l(13,"td"),m(14),w(15,"date"),o(),l(16,"td"),m(17),w(18,"number"),o(),l(19,"td"),x(20,"p-chip",21),o(),l(21,"td"),x(22,"p-chip",21),o(),l(23,"td"),x(24,"p-button",22),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),C(e.outlet),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Supplier_Bill/Info?ID="+e.id,U),a(),J(" ",e.number," "),a(2),C(e.customer),a(2),C(F(12,13,e.date,"d MMM y hh:mm")),a(3),C(e.due?F(15,16,e.due,"d MMM y hh:mm"):"-"),a(3),C(P(18,19,e.amount)),a(3),s("label",e.payment),a(2),s("label",e.delivery),a(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function jt(t,p){if(t&1&&m(0),t&2){let e=_(2);A(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Ot(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function Gt(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,Pt,20,0,"ng-template",null,3,b)(4,zt,25,21,"ng-template",null,4,b)(6,jt,1,3,"ng-template",null,5,b)(8,Ot,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function Ut(t,p){if(t&1&&(l(0,"span",36),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),J(" ",F(2,2,e.name,30)," ")}}function Ht(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Lt(t,p){if(t&1&&(l(0,"div"),g(1,Ht,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function At(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function Wt(t,p){if(t&1&&(l(0,"div"),g(1,At,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function Kt(t,p){if(t&1&&(l(0,"div")(1,"span",38),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function qt(t,p){if(t&1&&(l(0,"div"),g(1,Kt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function $t(t,p){if(t&1){let e=E();l(0,"form",24)(1,"div",25)(2,"label",26),m(3,"Outlet"),o(),l(4,"p-select",27),g(5,Ut,3,5,"ng-template",null,7,b),o()(),l(7,"div",25)(8,"label",26),m(9,"Payment"),o(),x(10,"p-select",28),o(),l(11,"div",25)(12,"label",26),m(13,"Delivery"),o(),x(14,"p-select",29),o(),l(15,"div",25)(16,"label",26),m(17,"From - To"),o(),l(18,"div",30),x(19,"p-datepicker",31),g(20,Lt,2,1,"div",32),x(21,"p-datepicker",33),g(22,Wt,2,1,"div",32),o()(),l(23,"div",25)(24,"label",26),m(25,"Supplier"),o(),l(26,"p-autocomplete",34),w(27,"async"),T("completeMethod",function(n){h(e);let i=_();return S(i.onSearchSupplier(n))}),o()(),l(28,"div",25)(29,"label",26),m(30,"Page Size"),o(),x(31,"input",35),g(32,qt,2,1,"div",32),o()()}if(t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.Outlets),a(6),s("options",e.store.meta().options.PaymentStates),a(4),s("options",e.store.meta().options.DeliveryStates),a(5),s("iconDisplay","input")("showIcon",!0)("ngClass",V(18,Qe,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",V(20,Qe,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",P(27,16,e.supplierSuggestions$)),a(5),s("ngClass",V(22,Qe,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var ft=(()=>{class t extends Me{constructor(){super(),this.generateJournalService=v(D),this.store=v($e),this.authService=v(te),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=v(me),this.dayjsService=v(N)}ngOnInit(){this.initform()}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>(i!=null&&(n==="from"||n==="to"?(typeof i=="string"||typeof i=="number"||i instanceof Date)&&(r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null):r[n]=i),r),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(r=>!r)}onRowSelect(e){this.store.onRowSelect(e.data)}onSearchSupplier(e){this.supplierSuggestions$=this.generateJournalService.getSupplierSuggestions(e.query).pipe(Ve("Supplier Suggestions"))}initform(){let{outletName:e,number:r,from:n,to:i,paymentState:f,deliveryState:u,supplierID:ze,pageNumber:je,pageSize:Oe,export:Le,exportPageNumber:Ae,exportPageSize:We}=this.store.filter();this.form=this.fb.group({outletName:this.fb.control(e),number:this.fb.control(r),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),paymentState:this.fb.control(f),deliveryState:this.fb.control(u),supplierID:this.fb.control(ze),pageNumber:this.fb.control(je),pageSize:this.fb.control(Oe,[ne.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(Ae),exportPageSize:this.fb.control(We)})}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedSupplierBill()).pipe(G(()=>{this.store.getJournalSupplierBill(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onPageChange(e){this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:e.first/e.rows+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=H({type:t,selectors:[["app-journal-supplier-bill"]],features:[q([$e]),L],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Supplier Bill",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","10"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],["showClear","","formControlName","paymentState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Payment",3,"options"],["showClear","","formControlName","deliveryState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Delivery",3,"options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","supplierID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","appMaskNumber","","formControlName","pageSize",3,"ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),M(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),M(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,Mt,1,1,"ng-template",null,0,b)(3,Gt,10,5,"ng-template",null,1,b)(5,$t,33,24,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ie,Re,ke,Je,Ne,ee,$,Q,X,et,Z,Y,Be,Ge,ge,_e,fe,ue,De,Fe,Te,Ee,He,Ue,se,le,ie,oe,re,ae,pe,de,ce,xe,Se,he,Pe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Qt={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{number:null,outletName:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},Xe=Ce(we(Qt),be(t=>({first:I(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:I(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:I(()=>t.data().data.some(p=>p.checked)),checkedShift:I(()=>t.data().data.filter(p=>p.checked).map(p=>p.id))})),ye(t=>{let p=v(D);return{updateFilter(e){y(t,r=>d(c({},r),{filter:c(c({},r.filter),e)}))},onRowSelect(e){y(t,r=>{let n=r.data.data.map(i=>i.id===e.id?d(c({},i),{checked:!0}):i);return d(c({},r),{data:d(c({},r.data),{data:n})})})},onRowUnselect(e){y(t,r=>{let n=r.data.data.map(i=>i.id===e.id?d(c({},i),{checked:!1}):i);return d(c({},r),{data:d(c({},r.data),{data:n})})})},onHeaderCheckboxToggle(e){y(t,r=>{let n=r.data.data.map(i=>d(c({},i),{checked:e}));return d(c({},r),{data:d(c({},r.data),{data:n})})})},getGJShiftLoader:z(R(B(()=>p.getGJShiftLoader().pipe(j(e=>y(t,r=>d(c({},r),{meta:e})),e=>console.error("Error fetching GJ Shift Loader:",e)))))),getJournalShift:z(R(O(e=>Object.entries(e).reduce((r,[n,i])=>(i!=null&&(r[n]=i),r),{})),B(e=>p.getJournalShift(e).pipe(j(r=>y(t,n=>d(c({},n),{data:r})),r=>console.error("Error fetching journal shift:",r))))))}}),ve(t=>({onInit:()=>{t.getGJShiftLoader(),t.getJournalShift(t.filter)}})));var Ye=t=>({"ng-invalid ng-dirty":t});function Xt(t,p){if(t&1){let e=E();l(0,"p-button",10),T("onClick",function(){h(e);let n=_(2);return S(n.onGenerateJournal())}),o()}}function Yt(t,p){if(t&1&&g(0,Xt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function Zt(t,p){t&1&&(l(0,"tr")(1,"th",12),x(2,"p-tableHeaderCheckbox"),o(),l(3,"th",13),m(4,"Number"),o(),l(5,"th",14),m(6,"Open"),o(),l(7,"th",14),m(8,"Close"),o(),l(9,"th",15),m(10,"Cashier"),o(),l(11,"th",16),m(12,"Sales + Tax"),o(),l(13,"th",17),m(14,"Invoices"),o(),l(15,"th",16),m(16,"Outlet"),o(),l(17,"th",17),m(18,"Register"),o(),l(19,"th",17),m(20,"Visitors"),o(),x(21,"th",18),o())}function ei(t,p){if(t&1&&(l(0,"tr")(1,"td"),x(2,"p-tableCheckbox",19),o(),l(3,"td")(4,"a",20),m(5),o()(),l(6,"td"),m(7),w(8,"date"),o(),l(9,"td"),m(10),w(11,"date"),o(),l(12,"td"),m(13),o(),l(14,"td"),m(15),w(16,"number"),o(),l(17,"td"),m(18),w(19,"number"),o(),l(20,"td"),m(21),o(),l(22,"td"),m(23),o(),l(24,"td"),m(25),w(26,"number"),o(),l(27,"td"),x(28,"p-button",21),o()()),t&2){let e=p.$implicit,r=_(2);a(2),s("value",e),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Shift/Main/Previous_Shift/Register_Shift_Detail?ID="+e.id,U),a(),J(" ",e.number," "),a(2),C(F(8,14,e.open,"dd MMM y hh:mm")),a(3),C(F(11,17,e.close,"dd MMM y hh:mm")),a(3),C(e.cashier),a(2),C(P(16,20,e.salesNTax)),a(3),C(P(19,22,e.totalInvoice)),a(3),C(e.outlet),a(2),C(e.register),a(2),C(P(26,24,e.visitors)),a(3),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function ti(t,p){if(t&1&&m(0),t&2){let e=_(2);A(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function ii(t,p){t&1&&(l(0,"tr")(1,"td",22)(2,"span"),m(3,"No records found."),o()()())}function ni(t,p){if(t&1){let e=E();l(0,"p-panel")(1,"p-table",11),T("onPage",function(n){h(e);let i=_();return S(i.onPageChange(n))})("onRowSelect",function(n){h(e);let i=_();return S(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return S(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return S(i.onHeaderCheckboxToggle(n))}),g(2,Zt,22,0,"ng-template",null,3,b)(4,ei,29,26,"ng-template",null,4,b)(6,ti,1,3,"ng-template",null,5,b)(8,ii,4,0,"ng-template",null,6,b),o()()}if(t&2){let e=_();a(),s("paginator",!0)("lazy",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}function oi(t,p){if(t&1&&(l(0,"span",32),m(1),w(2,"truncate"),o()),t&2){let e=p.$implicit;s("pTooltip",e.name),a(),J(" ",F(2,2,e.name,30)," ")}}function ri(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function li(t,p){if(t&1&&(l(0,"div"),g(1,ri,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function ai(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function pi(t,p){if(t&1&&(l(0,"div"),g(1,ai,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function mi(t,p){if(t&1&&(l(0,"div")(1,"span",34),m(2),o()()),t&2){let e=p.$implicit;a(2),C(e)}}function si(t,p){if(t&1&&(l(0,"div"),g(1,mi,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function ci(t,p){if(t&1&&(l(0,"form",23)(1,"div",24)(2,"label",25),m(3,"Outlet"),o(),l(4,"p-select",26),g(5,oi,3,5,"ng-template",null,7,b),o()(),l(7,"div",24)(8,"label",25),m(9,"From - To"),o(),l(10,"div",27),x(11,"p-datepicker",28),g(12,li,2,1,"div",29),x(13,"p-datepicker",30),g(14,pi,2,1,"div",29),o()(),l(15,"div",24)(16,"label",25),m(17,"Page Size"),o(),x(18,"input",31),g(19,si,2,1,"div",29),o()()),t&2){let e=_();s("formGroup",e.form),a(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),a(7),s("iconDisplay","input")("showIcon",!0)("ngClass",V(13,Ye,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",V(15,Ye,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("ngClass",V(17,Ye,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var _t=(()=>{class t extends Me{constructor(){super(),this.generateJournalService=v(D),this.store=v(Xe),this.authService=v(te),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=v(me),this.dayjsService=v(N)}ngOnInit(){this.initForm()}initForm(){let{number:e,outletName:r,from:n,to:i,pageNumber:f,pageSize:u,export:ze,exportPageNumber:je,exportPageSize:Oe}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(r),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),pageNumber:this.fb.control(f),pageSize:this.fb.control(u,[ne.required]),export:this.fb.control(ze),exportPageNumber:this.fb.control(je),exportPageSize:this.fb.control(Oe)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((r,[n,i])=>{switch(n){case"from":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?r[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:r[n]=i!=null?String(i):null;break;default:r[n]=i===null?"":i;break}return r},{});this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedShift()).pipe(G(()=>{this.store.getJournalShift(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(d(c({},this.store.filter()),{number:e}))}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(d(c({},this.store.filter()),{pageNumber:r+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=H({type:t,selectors:[["app-journal-shift"]],features:[q([Xe]),L],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Shift Journal",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","paginator","lazy","rows","totalRecords","value"],[2,"width","1rem"],[2,"width","12rem"],[2,"width","11rem"],[2,"width","14rem"],[2,"width","10rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"icon","severity","text"],["colspan","11"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["type","text","pInputText","","formControlName","pageSize","appMaskNumber","",3,"ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(r,n){if(r&1){let i=E();l(0,"app-main-panel",8),K("isDialogFilterVisibleChange",function(u){return h(i),M(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),M(n.isInitDialogFilterVisible,u)||(n.isInitDialogFilterVisible=u),S(u)}),T("filterConfirmed",function(){return h(i),S(n.onFilterOKEvent())})("search",function(u){return h(i),S(n.onSearch(u))}),g(1,Yt,1,1,"ng-template",null,0,b)(3,ni,10,5,"ng-template",null,1,b)(5,ci,20,19,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ie,Re,ke,Je,Ne,ee,$,Q,X,Z,Y,Be,ge,_e,fe,ue,se,le,ie,oe,re,ae,pe,De,Fe,Te,Ee,xe,Se,he,de,ce,Pe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var fo=[{path:"invoice",component:ut},{path:"supplier-bill",component:ft},{path:"shift",component:_t},{path:"join-invoice",loadComponent:()=>import("./chunk-SUXEBUIX.js").then(t=>t.ARJournalComponent)},{path:"join-bill",loadComponent:()=>import("./chunk-Y7SF5NXD.js").then(t=>t.ApJournalComponent)},{path:"adjustment",loadComponent:()=>import("./chunk-5FV7K5RQ.js").then(t=>t.AdjustmentJournalComponent)}];export{fo as generateJournalRoutes};
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import{a as ht}from"./chunk-S27Z7D3D.js";import{a as Mt,i as zt}from"./chunk-BKTBVFNX.js";import{a as rt,b as st}from"./chunk-ZFNIPERQ.js";import{a as q,b as ft,f as Qe,h as we,j as bt,k as Ct,l as yt,m as xt,n as vt,o as Tt,w as ke,x as wt,y as kt,z as It}from"./chunk-ME4ALIS7.js";import{$ as ve,A as Le,B as xe,C as Oe,D as He,Da as B,I as Be,K as pt,La as gt,Ma as L,N as dt,Na as ut,R as Re,U as ct,Ua as Te,Z as mt,b as nt,e as ot,j as at,ma as _t,w as lt,y as ie,z as ye}from"./chunk-VMI3QWC6.js";import{d as it}from"./chunk-DSZOROE6.js";import{a as et,h as Z,k as he,l as be,m as Ce,s as $,t as te}from"./chunk-ZK43JB4A.js";import{c as tt,d as De,f as Ee,h as Fe,i as Ve,k as Pe}from"./chunk-F2X3VGZZ.js";import{$b as D,$c as fe,Aa as P,Ab as $e,Ba as Xe,Cb as z,Da as re,Dc as X,Ea as k,Eb as m,Ec as ee,Fc as j,Gc as Ge,Ha as je,Hc as Ke,La as Ye,Lb as v,Mb as o,Ob as qe,Oc as ze,Pb as R,Pc as Se,Qb as S,Rb as Q,Sc as Y,Wb as p,Xb as d,Yb as h,Zb as A,_b as W,_c as C,ac as b,bd as Ue,ca as ae,cd as Je,da as K,fc as u,gb as Ze,gc as s,hc as pe,ia as I,ib as a,ic as J,lc as T,mc as de,nc as y,oc as x,pa as Ne,qa as _,ra as g,rc as ce,sa as le,sc as N,tb as se,tc as me,ua as w,uc as Me,xc as _e,yb as M,yc as ge,zb as U,zc as ue}from"./chunk-6QJHEOXN.js";import{a as V,b as Ie}from"./chunk-YQFG5XE2.js";var St=(()=>{class t extends we{pathId;ngOnInit(){this.pathId="url(#"+B()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=w(t)))(i||t)}})();static \u0275cmp=M({type:t,selectors:[["WindowMaximizeIcon"]],features:[z],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&(le(),p(0,"svg",0)(1,"g"),h(2,"path",1),d(),p(3,"defs")(4,"clipPath",2),h(5,"rect",3),d()()()),n&2&&(S(i.getClassNames()),v("aria-label",i.ariaLabel)("aria-hidden",i.ariaHidden)("role",i.role),a(),v("clip-path",i.pathId),a(3),o("id",i.pathId))},encapsulation:2})}return t})();var Dt=(()=>{class t extends we{pathId;ngOnInit(){this.pathId="url(#"+B()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=w(t)))(i||t)}})();static \u0275cmp=M({type:t,selectors:[["WindowMinimizeIcon"]],features:[z],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&(le(),p(0,"svg",0)(1,"g"),h(2,"path",1),d(),p(3,"defs")(4,"clipPath",2),h(5,"rect",3),d()()()),n&2&&(S(i.getClassNames()),v("aria-label",i.ariaLabel)("aria-hidden",i.ariaHidden)("role",i.role),a(),v("clip-path",i.pathId),a(3),o("id",i.pathId))},encapsulation:2})}return t})();var Et=(()=>{class t extends q{pFocusTrapDisabled=!1;platformId=I(Ye);document=I(et);firstHiddenFocusableElement;lastHiddenFocusableElement;ngOnInit(){super.ngOnInit(),te(this.platformId)&&!this.pFocusTrapDisabled&&!this.firstHiddenFocusableElement&&!this.lastHiddenFocusableElement&&this.createHiddenFocusableElements()}ngOnChanges(e){super.ngOnChanges(e),e.pFocusTrapDisabled&&te(this.platformId)&&(e.pFocusTrapDisabled.currentValue?this.removeHiddenFocusableElements():this.createHiddenFocusableElements())}removeHiddenFocusableElements(){this.firstHiddenFocusableElement&&this.firstHiddenFocusableElement.parentNode&&this.firstHiddenFocusableElement.parentNode.removeChild(this.firstHiddenFocusableElement),this.lastHiddenFocusableElement&&this.lastHiddenFocusableElement.parentNode&&this.lastHiddenFocusableElement.parentNode.removeChild(this.lastHiddenFocusableElement)}getComputedSelector(e){return`:not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])${e??""}`}createHiddenFocusableElements(){let e="0",n=i=>dt("span",{class:"p-hidden-accessible p-hidden-focusable",tabindex:e,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:i?.bind(this)});this.firstHiddenFocusableElement=n(this.onFirstHiddenElementFocus),this.lastHiddenFocusableElement=n(this.onLastHiddenElementFocus),this.firstHiddenFocusableElement.setAttribute("data-pc-section","firstfocusableelement"),this.lastHiddenFocusableElement.setAttribute("data-pc-section","lastfocusableelement"),this.el.nativeElement.prepend(this.firstHiddenFocusableElement),this.el.nativeElement.append(this.lastHiddenFocusableElement)}onFirstHiddenElementFocus(e){let{currentTarget:n,relatedTarget:i}=e,l=i===this.lastHiddenFocusableElement||!this.el.nativeElement?.contains(i)?ct(n.parentElement,":not(.p-hidden-focusable)"):this.lastHiddenFocusableElement;Re(l)}onLastHiddenElementFocus(e){let{currentTarget:n,relatedTarget:i}=e,l=i===this.firstHiddenFocusableElement||!this.el.nativeElement?.contains(i)?mt(n.parentElement,":not(.p-hidden-focusable)"):this.firstHiddenFocusableElement;Re(l)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=w(t)))(i||t)}})();static \u0275dir=$e({type:t,selectors:[["","pFocusTrap",""]],inputs:{pFocusTrapDisabled:[2,"pFocusTrapDisabled","pFocusTrapDisabled",C]},features:[z,Ne]})}return t})();var Rt=["header"],Ft=["content"],Vt=["footer"],Qt=["closeicon"],At=["maximizeicon"],Wt=["minimizeicon"],Nt=["headless"],Xt=["titlebar"],jt=["*",[["p-footer"]]],Yt=["*","p-footer"],Zt=(t,r,e)=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex","justify-content":t,"align-items":r,"pointer-events":e}),$t=t=>({"p-dialog p-component":!0,"p-dialog-maximized":t}),qt=()=>({display:"flex","flex-direction":"column","pointer-events":"auto"}),Gt=(t,r)=>({transform:t,transition:r}),Kt=t=>({value:"visible",params:t});function Ut(t,r){t&1&&D(0)}function Jt(t,r){if(t&1&&(A(0),m(1,Ut,1,0,"ng-container",11),W()),t&2){let e=s(3);a(),o("ngTemplateOutlet",e._headlessTemplate||e.headlessTemplate||e.headlessT)}}function ei(t,r){if(t&1){let e=b();p(0,"div",15),u("mousedown",function(i){_(e);let l=s(4);return g(l.initResize(i))}),d()}if(t&2){let e=s(4);o("ngClass",e.cx("resizeHandle"))}}function ti(t,r){if(t&1&&(p(0,"span",21),N(1),d()),t&2){let e=s(5);o("id",e.ariaLabelledBy)("ngClass",e.cx("title")),a(),me(e.header)}}function ii(t,r){t&1&&D(0)}function ni(t,r){if(t&1&&h(0,"span",18),t&2){let e=s(6);o("ngClass",e.maximized?e.minimizeIcon:e.maximizeIcon)}}function oi(t,r){t&1&&h(0,"WindowMaximizeIcon")}function ai(t,r){t&1&&h(0,"WindowMinimizeIcon")}function li(t,r){if(t&1&&(A(0),m(1,oi,1,0,"WindowMaximizeIcon",23)(2,ai,1,0,"WindowMinimizeIcon",23),W()),t&2){let e=s(6);a(),o("ngIf",!e.maximized&&!e._maximizeiconTemplate&&!e.maximizeIconTemplate&&!e.maximizeIconT),a(),o("ngIf",e.maximized&&!e._minimizeiconTemplate&&!e.minimizeIconTemplate&&!e.minimizeIconT)}}function ri(t,r){}function si(t,r){t&1&&m(0,ri,0,0,"ng-template")}function pi(t,r){if(t&1&&(A(0),m(1,si,1,0,null,11),W()),t&2){let e=s(6);a(),o("ngTemplateOutlet",e._maximizeiconTemplate||e.maximizeIconTemplate||e.maximizeIconT)}}function di(t,r){}function ci(t,r){t&1&&m(0,di,0,0,"ng-template")}function mi(t,r){if(t&1&&(A(0),m(1,ci,1,0,null,11),W()),t&2){let e=s(6);a(),o("ngTemplateOutlet",e._minimizeiconTemplate||e.minimizeIconTemplate||e.minimizeIconT)}}function _i(t,r){if(t&1){let e=b();p(0,"p-button",22),u("onClick",function(){_(e);let i=s(5);return g(i.maximize())})("keydown.enter",function(){_(e);let i=s(5);return g(i.maximize())}),m(1,ni,1,1,"span",14)(2,li,3,2,"ng-container",23)(3,pi,2,1,"ng-container",23)(4,mi,2,1,"ng-container",23),d()}if(t&2){let e=s(5);o("styleClass",e.cx("pcMaximizeButton"))("tabindex",e.maximizable?"0":"-1")("ariaLabel",e.maximizeLabel)("buttonProps",e.maximizeButtonProps),a(),o("ngIf",e.maximizeIcon&&!e._maximizeiconTemplate&&!e._minimizeiconTemplate),a(),o("ngIf",!e.maximizeIcon&&!(e.maximizeButtonProps!=null&&e.maximizeButtonProps.icon)),a(),o("ngIf",!e.maximized),a(),o("ngIf",e.maximized)}}function gi(t,r){if(t&1&&h(0,"span",18),t&2){let e=s(8);o("ngClass",e.closeIcon)}}function ui(t,r){t&1&&h(0,"TimesIcon")}function fi(t,r){if(t&1&&(A(0),m(1,gi,1,1,"span",14)(2,ui,1,0,"TimesIcon",23),W()),t&2){let e=s(7);a(),o("ngIf",e.closeIcon),a(),o("ngIf",!e.closeIcon)}}function hi(t,r){}function bi(t,r){t&1&&m(0,hi,0,0,"ng-template")}function Ci(t,r){if(t&1&&(p(0,"span"),m(1,bi,1,0,null,11),d()),t&2){let e=s(7);a(),o("ngTemplateOutlet",e._closeiconTemplate||e.closeIconTemplate||e.closeIconT)}}function yi(t,r){if(t&1&&m(0,fi,3,2,"ng-container",23)(1,Ci,2,1,"span",23),t&2){let e=s(6);o("ngIf",!e._closeiconTemplate&&!e.closeIconTemplate&&!e.closeIconT&&!(e.closeButtonProps!=null&&e.closeButtonProps.icon)),a(),o("ngIf",e._closeiconTemplate||e.closeIconTemplate||e.closeIconT)}}function xi(t,r){if(t&1){let e=b();p(0,"p-button",24),u("onClick",function(i){_(e);let l=s(5);return g(l.close(i))})("keydown.enter",function(i){_(e);let l=s(5);return g(l.close(i))}),m(1,yi,2,2,"ng-template",null,4,Y),d()}if(t&2){let e=s(5);o("styleClass",e.cx("pcCloseButton"))("ariaLabel",e.closeAriaLabel)("tabindex",e.closeTabindex)("buttonProps",e.closeButtonProps)}}function vi(t,r){if(t&1){let e=b();p(0,"div",16,3),u("mousedown",function(i){_(e);let l=s(4);return g(l.initDrag(i))}),m(2,ti,2,3,"span",17)(3,ii,1,0,"ng-container",11),p(4,"div",18),m(5,_i,5,8,"p-button",19)(6,xi,3,4,"p-button",20),d()()}if(t&2){let e=s(4);o("ngClass",e.cx("header")),a(2),o("ngIf",!e._headerTemplate&&!e.headerTemplate&&!e.headerT),a(),o("ngTemplateOutlet",e._headerTemplate||e.headerTemplate||e.headerT),a(),o("ngClass",e.cx("headerActions")),a(),o("ngIf",e.maximizable),a(),o("ngIf",e.closable)}}function Ti(t,r){t&1&&D(0)}function wi(t,r){t&1&&D(0)}function ki(t,r){if(t&1&&(p(0,"div",18,5),J(2,1),m(3,wi,1,0,"ng-container",11),d()),t&2){let e=s(4);o("ngClass",e.cx("footer")),a(3),o("ngTemplateOutlet",e._footerTemplate||e.footerTemplate||e.footerT)}}function Ii(t,r){if(t&1&&(m(0,ei,1,1,"div",12)(1,vi,7,6,"div",13),p(2,"div",7,2),J(4),m(5,Ti,1,0,"ng-container",11),d(),m(6,ki,4,2,"div",14)),t&2){let e=s(3);o("ngIf",e.resizable),a(),o("ngIf",e.showHeader),a(),S(e.contentStyleClass),o("ngClass",e.cx("content"))("ngStyle",e.contentStyle),v("data-pc-section","content"),a(3),o("ngTemplateOutlet",e._contentTemplate||e.contentTemplate||e.contentT),a(),o("ngIf",e._footerTemplate||e.footerTemplate||e.footerT)}}function Mi(t,r){if(t&1){let e=b();p(0,"div",9,0),u("@animation.start",function(i){_(e);let l=s(2);return g(l.onAnimationStart(i))})("@animation.done",function(i){_(e);let l=s(2);return g(l.onAnimationEnd(i))}),m(2,Jt,2,1,"ng-container",10)(3,Ii,7,9,"ng-template",null,1,Y),d()}if(t&2){let e=ce(4),n=s(2);R(n.style),S(n.styleClass),o("ngClass",j(13,$t,n.maximizable&&n.maximized))("ngStyle",ee(15,qt))("pFocusTrapDisabled",n.focusTrap===!1)("@animation",j(19,Kt,Ge(16,Gt,n.transformOptions,n.transitionOptions))),v("role",n.role)("aria-labelledby",n.ariaLabelledBy)("aria-modal",!0),a(2),o("ngIf",n._headlessTemplate||n.headlessTemplate||n.headlessT)("ngIfElse",e)}}function zi(t,r){if(t&1&&(p(0,"div",7),m(1,Mi,5,21,"div",8),d()),t&2){let e=s();R(e.maskStyle),S(e.maskStyleClass),o("ngClass",e.maskClass)("ngStyle",Ke(7,Zt,e.position==="left"||e.position==="topleft"||e.position==="bottomleft"?"flex-start":e.position==="right"||e.position==="topright"||e.position==="bottomright"?"flex-end":"center",e.position==="top"||e.position==="topleft"||e.position==="topright"?"flex-start":e.position==="bottom"||e.position==="bottomleft"||e.position==="bottomright"?"flex-end":"center",e.modal?"auto":"none")),a(),o("ngIf",e.visible)}}var Si=({dt:t})=>`
|
|
2
|
+
.p-dialog {
|
|
3
|
+
max-height: 90%;
|
|
4
|
+
transform: scale(1);
|
|
5
|
+
border-radius: ${t("dialog.border.radius")};
|
|
6
|
+
box-shadow: ${t("dialog.shadow")};
|
|
7
|
+
background: ${t("dialog.background")};
|
|
8
|
+
border: 1px solid ${t("dialog.border.color")};
|
|
9
|
+
color: ${t("dialog.color")};
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
pointer-events: auto
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.p-dialog-content {
|
|
16
|
+
overflow-y: auto;
|
|
17
|
+
padding: ${t("dialog.content.padding")};
|
|
18
|
+
flex-grow: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.p-dialog-header {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
padding: ${t("dialog.header.padding")};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.p-dialog-title {
|
|
30
|
+
font-weight: ${t("dialog.title.font.weight")};
|
|
31
|
+
font-size: ${t("dialog.title.font.size")};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.p-dialog-footer {
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
padding: ${t("dialog.footer.padding")};
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: flex-end;
|
|
39
|
+
gap: ${t("dialog.footer.gap")};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.p-dialog-header-actions {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
gap: ${t("dialog.header.gap")};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.p-dialog-enter-active {
|
|
49
|
+
transition: all 150ms cubic-bezier(0, 0, 0.2, 1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.p-dialog-leave-active {
|
|
53
|
+
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.p-dialog-enter-from,
|
|
57
|
+
.p-dialog-leave-to {
|
|
58
|
+
opacity: 0;
|
|
59
|
+
transform: scale(0.7);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.p-dialog-top .p-dialog,
|
|
63
|
+
.p-dialog-bottom .p-dialog,
|
|
64
|
+
.p-dialog-left .p-dialog,
|
|
65
|
+
.p-dialog-right .p-dialog,
|
|
66
|
+
.p-dialog-topleft .p-dialog,
|
|
67
|
+
.p-dialog-topright .p-dialog,
|
|
68
|
+
.p-dialog-bottomleft .p-dialog,
|
|
69
|
+
.p-dialog-bottomright .p-dialog {
|
|
70
|
+
margin: 0.75rem;
|
|
71
|
+
transform: translate3d(0px, 0px, 0px);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.p-dialog-top .p-dialog-enter-active,
|
|
75
|
+
.p-dialog-top .p-dialog-leave-active,
|
|
76
|
+
.p-dialog-bottom .p-dialog-enter-active,
|
|
77
|
+
.p-dialog-bottom .p-dialog-leave-active,
|
|
78
|
+
.p-dialog-left .p-dialog-enter-active,
|
|
79
|
+
.p-dialog-left .p-dialog-leave-active,
|
|
80
|
+
.p-dialog-right .p-dialog-enter-active,
|
|
81
|
+
.p-dialog-right .p-dialog-leave-active,
|
|
82
|
+
.p-dialog-topleft .p-dialog-enter-active,
|
|
83
|
+
.p-dialog-topleft .p-dialog-leave-active,
|
|
84
|
+
.p-dialog-topright .p-dialog-enter-active,
|
|
85
|
+
.p-dialog-topright .p-dialog-leave-active,
|
|
86
|
+
.p-dialog-bottomleft .p-dialog-enter-active,
|
|
87
|
+
.p-dialog-bottomleft .p-dialog-leave-active,
|
|
88
|
+
.p-dialog-bottomright .p-dialog-enter-active,
|
|
89
|
+
.p-dialog-bottomright .p-dialog-leave-active {
|
|
90
|
+
transition: all 0.3s ease-out;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.p-dialog-top .p-dialog-enter-from,
|
|
94
|
+
.p-dialog-top .p-dialog-leave-to {
|
|
95
|
+
transform: translate3d(0px, -100%, 0px);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.p-dialog-bottom .p-dialog-enter-from,
|
|
99
|
+
.p-dialog-bottom .p-dialog-leave-to {
|
|
100
|
+
transform: translate3d(0px, 100%, 0px);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.p-dialog-left .p-dialog-enter-from,
|
|
104
|
+
.p-dialog-left .p-dialog-leave-to,
|
|
105
|
+
.p-dialog-topleft .p-dialog-enter-from,
|
|
106
|
+
.p-dialog-topleft .p-dialog-leave-to,
|
|
107
|
+
.p-dialog-bottomleft .p-dialog-enter-from,
|
|
108
|
+
.p-dialog-bottomleft .p-dialog-leave-to {
|
|
109
|
+
transform: translate3d(-100%, 0px, 0px);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.p-dialog-right .p-dialog-enter-from,
|
|
113
|
+
.p-dialog-right .p-dialog-leave-to,
|
|
114
|
+
.p-dialog-topright .p-dialog-enter-from,
|
|
115
|
+
.p-dialog-topright .p-dialog-leave-to,
|
|
116
|
+
.p-dialog-bottomright .p-dialog-enter-from,
|
|
117
|
+
.p-dialog-bottomright .p-dialog-leave-to {
|
|
118
|
+
transform: translate3d(100%, 0px, 0px);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.p-dialog-left:dir(rtl) .p-dialog-enter-from,
|
|
122
|
+
.p-dialog-left:dir(rtl) .p-dialog-leave-to,
|
|
123
|
+
.p-dialog-topleft:dir(rtl) .p-dialog-enter-from,
|
|
124
|
+
.p-dialog-topleft:dir(rtl) .p-dialog-leave-to,
|
|
125
|
+
.p-dialog-bottomleft:dir(rtl) .p-dialog-enter-from,
|
|
126
|
+
.p-dialog-bottomleft:dir(rtl) .p-dialog-leave-to {
|
|
127
|
+
transform: translate3d(100%, 0px, 0px);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.p-dialog-right:dir(rtl) .p-dialog-enter-from,
|
|
131
|
+
.p-dialog-right:dir(rtl) .p-dialog-leave-to,
|
|
132
|
+
.p-dialog-topright:dir(rtl) .p-dialog-enter-from,
|
|
133
|
+
.p-dialog-topright:dir(rtl) .p-dialog-leave-to,
|
|
134
|
+
.p-dialog-bottomright:dir(rtl) .p-dialog-enter-from,
|
|
135
|
+
.p-dialog-bottomright:dir(rtl) .p-dialog-leave-to {
|
|
136
|
+
transform: translate3d(-100%, 0px, 0px);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.p-dialog-maximized {
|
|
140
|
+
width: 100vw !important;
|
|
141
|
+
height: 100vh !important;
|
|
142
|
+
top: 0px !important;
|
|
143
|
+
left: 0px !important;
|
|
144
|
+
max-height: 100%;
|
|
145
|
+
height: 100%;
|
|
146
|
+
border-radius: 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.p-dialog-maximized .p-dialog-content {
|
|
150
|
+
flex-grow: 1;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.p-overlay-mask:dir(rtl) {
|
|
154
|
+
flex-direction: row-reverse;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* For PrimeNG */
|
|
158
|
+
|
|
159
|
+
.p-dialog .p-resizable-handle {
|
|
160
|
+
position: absolute;
|
|
161
|
+
font-size: 0.1px;
|
|
162
|
+
display: block;
|
|
163
|
+
cursor: se-resize;
|
|
164
|
+
width: 12px;
|
|
165
|
+
height: 12px;
|
|
166
|
+
right: 1px;
|
|
167
|
+
bottom: 1px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.p-confirm-dialog .p-dialog-content {
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
}
|
|
174
|
+
`,Di={mask:({instance:t})=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:t.position==="left"||t.position==="topleft"||t.position==="bottomleft"?"flex-start":t.position==="right"||t.position==="topright"||t.position==="bottomright"?"flex-end":"center",alignItems:t.position==="top"||t.position==="topleft"||t.position==="topright"?"flex-start":t.position==="bottom"||t.position==="bottomleft"||t.position==="bottomright"?"flex-end":"center",pointerEvents:t.modal?"auto":"none"}),root:{display:"flex",flexDirection:"column",pointerEvents:"auto"}},Ei={mask:({instance:t})=>{let e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find(n=>n===t.position);return{"p-dialog-mask":!0,"p-overlay-mask p-overlay-mask-enter":t.modal,[`p-dialog-${e}`]:e}},root:({instance:t})=>({"p-dialog p-component":!0,"p-dialog-maximized":t.maximizable&&t.maximized}),header:"p-dialog-header",title:"p-dialog-title",resizeHandle:"p-resizable-handle",headerActions:"p-dialog-header-actions",pcMaximizeButton:"p-dialog-maximize-button",pcCloseButton:"p-dialog-close-button",content:"p-dialog-content",footer:"p-dialog-footer"},Pt=(()=>{class t extends Te{name="dialog";theme=Si;classes=Ei;inlineStyles=Di;static \u0275fac=(()=>{let e;return function(i){return(e||(e=w(t)))(i||t)}})();static \u0275prov=ae({token:t,factory:t.\u0275fac})}return t})();var Fi=Ve([Ee({transform:"{{transform}}",opacity:0}),De("{{transition}}")]),Vi=Ve([De("{{transition}}",Ee({transform:"{{transform}}",opacity:0}))]),Ae=(()=>{class t extends q{header;draggable=!0;resizable=!0;get positionLeft(){return 0}set positionLeft(e){console.log("positionLeft property is deprecated.")}get positionTop(){return 0}set positionTop(e){console.log("positionTop property is deprecated.")}contentStyle;contentStyleClass;modal=!1;closeOnEscape=!0;dismissableMask=!1;rtl=!1;closable=!0;get responsive(){return!1}set responsive(e){console.log("Responsive property is deprecated.")}appendTo;breakpoints;styleClass;maskStyleClass;maskStyle;showHeader=!0;get breakpoint(){return 649}set breakpoint(e){console.log("Breakpoint property is not utilized and deprecated, use breakpoints or CSS media queries instead.")}blockScroll=!1;autoZIndex=!0;baseZIndex=0;minX=0;minY=0;focusOnShow=!0;maximizable=!1;keepInViewport=!0;focusTrap=!0;transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";closeIcon;closeAriaLabel;closeTabindex="0";minimizeIcon;maximizeIcon;closeButtonProps={severity:"secondary",text:!0,rounded:!0};maximizeButtonProps={severity:"secondary",text:!0,rounded:!0};get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.maskVisible&&(this.maskVisible=!0)}get style(){return this._style}set style(e){e&&(this._style=V({},e),this.originalStyle=e)}get position(){return this._position}set position(e){switch(this._position=e,e){case"topleft":case"bottomleft":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"topright":case"bottomright":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)";break}}role="dialog";onShow=new P;onHide=new P;visibleChange=new P;onResizeInit=new P;onResizeEnd=new P;onDragEnd=new P;onMaximize=new P;headerViewChild;contentViewChild;footerViewChild;headerTemplate;contentTemplate;footerTemplate;closeIconTemplate;maximizeIconTemplate;minimizeIconTemplate;headlessTemplate;_headerTemplate;_contentTemplate;_footerTemplate;_closeiconTemplate;_maximizeiconTemplate;_minimizeiconTemplate;_headlessTemplate;_visible=!1;maskVisible;container;wrapper;dragging;ariaLabelledBy=this.getAriaLabelledBy();documentDragListener;documentDragEndListener;resizing;documentResizeListener;documentResizeEndListener;documentEscapeListener;maskClickListener;lastPageX;lastPageY;preventVisibleChangePropagation;maximized;preMaximizeContentHeight;preMaximizeContainerWidth;preMaximizeContainerHeight;preMaximizePageX;preMaximizePageY;id=B("pn_id_");_style={};_position="center";originalStyle;transformOptions="scale(0.7)";styleElement;window;_componentStyle=I(Pt);headerT;contentT;footerT;closeIconT;maximizeIconT;minimizeIconT;headlessT;get maximizeLabel(){return this.config.getTranslation(ut.ARIA).maximizeLabel}zone=I(Xe);get maskClass(){let n=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find(i=>i===this.position);return{"p-dialog-mask":!0,"p-overlay-mask p-overlay-mask-enter":this.modal||this.dismissableMask,[`p-dialog-${n}`]:n}}ngOnInit(){super.ngOnInit(),this.breakpoints&&this.createStyle()}templates;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"header":this.headerT=e.template;break;case"content":this.contentT=e.template;break;case"footer":this.footerT=e.template;break;case"closeicon":this.closeIconT=e.template;break;case"maximizeicon":this.maximizeIconT=e.template;break;case"minimizeicon":this.minimizeIconT=e.template;break;case"headless":this.headlessT=e.template;break;default:this.contentT=e.template;break}})}getAriaLabelledBy(){return this.header!==null?B("pn_id_")+"_header":null}parseDurationToMilliseconds(e){let n=/([\d\.]+)(ms|s)\b/g,i=0,l;for(;(l=n.exec(e))!==null;){let c=parseFloat(l[1]),f=l[2];f==="ms"?i+=c:f==="s"&&(i+=c*1e3)}if(i!==0)return i}_focus(e){if(e){let n=this.parseDurationToMilliseconds(this.transitionOptions),i=ft.getFocusableElements(e);if(i&&i.length>0)return this.zone.runOutsideAngular(()=>{setTimeout(()=>i[0].focus(),n||5)}),!0}return!1}focus(e){let n=this._focus(e);n||(n=this._focus(this.footerViewChild?.nativeElement),n||(n=this._focus(this.headerViewChild?.nativeElement),n||this._focus(this.contentViewChild?.nativeElement)))}close(e){this.visibleChange.emit(!1),e.preventDefault()}enableModality(){this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",e=>{this.wrapper&&this.wrapper.isSameNode(e.target)&&this.close(e)})),this.modal&&Le()}disableModality(){if(this.wrapper){this.dismissableMask&&this.unbindMaskClickListener();let e=document.querySelectorAll(".p-dialog-mask-scrollblocker");this.modal&&e&&e.length==1&&Oe(),this.cd.destroyed||this.cd.detectChanges()}}maximize(){this.maximized=!this.maximized,!this.modal&&!this.blockScroll&&(this.maximized?Le():Oe()),this.onMaximize.emit({maximized:this.maximized})}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}moveOnTop(){this.autoZIndex&&(Qe.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}createStyle(){if(te(this.platformId)&&!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",this.renderer.appendChild(this.document.head,this.styleElement);let e="";for(let n in this.breakpoints)e+=`
|
|
175
|
+
@media screen and (max-width: ${n}) {
|
|
176
|
+
.p-dialog[${this.id}]:not(.p-dialog-maximized) {
|
|
177
|
+
width: ${this.breakpoints[n]} !important;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
`;this.renderer.setProperty(this.styleElement,"innerHTML",e),_t(this.styleElement,"nonce",this.config?.csp()?.nonce)}}initDrag(e){ie(e.target,"p-dialog-maximize-icon")||ie(e.target,"p-dialog-header-close-icon")||ie(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",ye(this.document.body,"p-unselectable-text"))}onDrag(e){if(this.dragging){let n=Be(this.container),i=ve(this.container),l=e.pageX-this.lastPageX,c=e.pageY-this.lastPageY,f=this.container.getBoundingClientRect(),O=getComputedStyle(this.container),H=parseFloat(O.marginLeft),oe=parseFloat(O.marginTop),E=f.left+l-H,F=f.top+c-oe,G=He();this.container.style.position="fixed",this.keepInViewport?(E>=this.minX&&E+n<G.width&&(this._style.left=`${E}px`,this.lastPageX=e.pageX,this.container.style.left=`${E}px`),F>=this.minY&&F+i<G.height&&(this._style.top=`${F}px`,this.lastPageY=e.pageY,this.container.style.top=`${F}px`)):(this.lastPageX=e.pageX,this.container.style.left=`${E}px`,this.lastPageY=e.pageY,this.container.style.top=`${F}px`)}}endDrag(e){this.dragging&&(this.dragging=!1,xe(this.document.body,"p-unselectable-text"),this.cd.detectChanges(),this.onDragEnd.emit(e))}resetPosition(){this.container.style.position="",this.container.style.left="",this.container.style.top="",this.container.style.margin=""}center(){this.resetPosition()}initResize(e){this.resizable&&(this.resizing=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,ye(this.document.body,"p-unselectable-text"),this.onResizeInit.emit(e))}onResize(e){if(this.resizing){let n=e.pageX-this.lastPageX,i=e.pageY-this.lastPageY,l=Be(this.container),c=ve(this.container),f=ve(this.contentViewChild?.nativeElement),O=l+n,H=c+i,oe=this.container.style.minWidth,E=this.container.style.minHeight,F=this.container.getBoundingClientRect(),G=He();(!parseInt(this.container.style.top)||!parseInt(this.container.style.left))&&(O+=n,H+=i),(!oe||O>parseInt(oe))&&F.left+O<G.width&&(this._style.width=O+"px",this.container.style.width=this._style.width),(!E||H>parseInt(E))&&F.top+H<G.height&&(this.contentViewChild.nativeElement.style.height=f+H-c+"px",this._style.height&&(this._style.height=H+"px",this.container.style.height=this._style.height)),this.lastPageX=e.pageX,this.lastPageY=e.pageY}}resizeEnd(e){this.resizing&&(this.resizing=!1,xe(this.document.body,"p-unselectable-text"),this.onResizeEnd.emit(e))}bindGlobalListeners(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.resizable&&this.bindDocumentResizeListeners(),this.closeOnEscape&&this.closable&&this.bindDocumentEscapeListener()}unbindGlobalListeners(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentResizeListeners(),this.unbindDocumentEscapeListener()}bindDocumentDragListener(){this.documentDragListener||this.zone.runOutsideAngular(()=>{this.documentDragListener=this.renderer.listen(this.document.defaultView,"mousemove",this.onDrag.bind(this))})}unbindDocumentDragListener(){this.documentDragListener&&(this.documentDragListener(),this.documentDragListener=null)}bindDocumentDragEndListener(){this.documentDragEndListener||this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.renderer.listen(this.document.defaultView,"mouseup",this.endDrag.bind(this))})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(this.documentDragEndListener(),this.documentDragEndListener=null)}bindDocumentResizeListeners(){!this.documentResizeListener&&!this.documentResizeEndListener&&this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.renderer.listen(this.document.defaultView,"mousemove",this.onResize.bind(this)),this.documentResizeEndListener=this.renderer.listen(this.document.defaultView,"mouseup",this.resizeEnd.bind(this))})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(this.documentResizeListener(),this.documentResizeEndListener(),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindDocumentEscapeListener(){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(e,"keydown",n=>{n.key=="Escape"&&this.close(n)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.wrapper):pt(this.appendTo,this.wrapper))}restoreAppend(){this.container&&this.appendTo&&this.renderer.appendChild(this.el.nativeElement,this.wrapper)}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container?.parentElement,this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.container?.setAttribute(this.id,""),this.modal&&this.enableModality(),this.focusOnShow&&this.focus();break;case"void":this.wrapper&&this.modal&&ye(this.wrapper,"p-overlay-mask-leave");break}}onAnimationEnd(e){switch(e.toState){case"void":this.onContainerDestroy(),this.onHide.emit({}),this.cd.markForCheck(),this.maskVisible!==this.visible&&(this.maskVisible=this.visible);break;case"visible":this.onShow.emit({});break}}onContainerDestroy(){this.unbindGlobalListeners(),this.dragging=!1,this.maskVisible=!1,this.maximized&&(this.document.body.style.removeProperty("--scrollbar;-width"),this.maximized=!1),this.modal&&this.disableModality(),ie(this.document.body,"p-overflow-hidden")&&xe(this.document.body,"p-overflow-hidden"),this.container&&this.autoZIndex&&Qe.clear(this.container),this.container=null,this.wrapper=null,this._style=this.originalStyle?V({},this.originalStyle):{}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngOnDestroy(){this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.destroyStyle(),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=w(t)))(i||t)}})();static \u0275cmp=M({type:t,selectors:[["p-dialog"]],contentQueries:function(n,i,l){if(n&1&&(T(l,Rt,4),T(l,Ft,4),T(l,Vt,4),T(l,Qt,4),T(l,At,4),T(l,Wt,4),T(l,Nt,4),T(l,gt,4)),n&2){let c;y(c=x())&&(i._headerTemplate=c.first),y(c=x())&&(i._contentTemplate=c.first),y(c=x())&&(i._footerTemplate=c.first),y(c=x())&&(i._closeiconTemplate=c.first),y(c=x())&&(i._maximizeiconTemplate=c.first),y(c=x())&&(i._minimizeiconTemplate=c.first),y(c=x())&&(i._headlessTemplate=c.first),y(c=x())&&(i.templates=c)}},viewQuery:function(n,i){if(n&1&&(de(Xt,5),de(Ft,5),de(Vt,5)),n&2){let l;y(l=x())&&(i.headerViewChild=l.first),y(l=x())&&(i.contentViewChild=l.first),y(l=x())&&(i.footerViewChild=l.first)}},inputs:{header:"header",draggable:[2,"draggable","draggable",C],resizable:[2,"resizable","resizable",C],positionLeft:"positionLeft",positionTop:"positionTop",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",modal:[2,"modal","modal",C],closeOnEscape:[2,"closeOnEscape","closeOnEscape",C],dismissableMask:[2,"dismissableMask","dismissableMask",C],rtl:[2,"rtl","rtl",C],closable:[2,"closable","closable",C],responsive:"responsive",appendTo:"appendTo",breakpoints:"breakpoints",styleClass:"styleClass",maskStyleClass:"maskStyleClass",maskStyle:"maskStyle",showHeader:[2,"showHeader","showHeader",C],breakpoint:"breakpoint",blockScroll:[2,"blockScroll","blockScroll",C],autoZIndex:[2,"autoZIndex","autoZIndex",C],baseZIndex:[2,"baseZIndex","baseZIndex",fe],minX:[2,"minX","minX",fe],minY:[2,"minY","minY",fe],focusOnShow:[2,"focusOnShow","focusOnShow",C],maximizable:[2,"maximizable","maximizable",C],keepInViewport:[2,"keepInViewport","keepInViewport",C],focusTrap:[2,"focusTrap","focusTrap",C],transitionOptions:"transitionOptions",closeIcon:"closeIcon",closeAriaLabel:"closeAriaLabel",closeTabindex:"closeTabindex",minimizeIcon:"minimizeIcon",maximizeIcon:"maximizeIcon",closeButtonProps:"closeButtonProps",maximizeButtonProps:"maximizeButtonProps",visible:"visible",style:"style",position:"position",role:"role",headerTemplate:[0,"content","headerTemplate"],contentTemplate:"contentTemplate",footerTemplate:"footerTemplate",closeIconTemplate:"closeIconTemplate",maximizeIconTemplate:"maximizeIconTemplate",minimizeIconTemplate:"minimizeIconTemplate",headlessTemplate:"headlessTemplate"},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange",onResizeInit:"onResizeInit",onResizeEnd:"onResizeEnd",onDragEnd:"onDragEnd",onMaximize:"onMaximize"},features:[X([Pt]),z],ngContentSelectors:Yt,decls:1,vars:1,consts:[["container",""],["notHeadless",""],["content",""],["titlebar",""],["icon",""],["footer",""],[3,"ngClass","class","ngStyle","style",4,"ngIf"],[3,"ngClass","ngStyle"],["pFocusTrap","",3,"class","ngClass","ngStyle","style","pFocusTrapDisabled",4,"ngIf"],["pFocusTrap","",3,"ngClass","ngStyle","pFocusTrapDisabled"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["style","z-index: 90;",3,"ngClass","mousedown",4,"ngIf"],[3,"ngClass","mousedown",4,"ngIf"],[3,"ngClass",4,"ngIf"],[2,"z-index","90",3,"mousedown","ngClass"],[3,"mousedown","ngClass"],[3,"id","ngClass",4,"ngIf"],[3,"ngClass"],[3,"styleClass","tabindex","ariaLabel","buttonProps","onClick","keydown.enter",4,"ngIf"],[3,"styleClass","ariaLabel","tabindex","buttonProps","onClick","keydown.enter",4,"ngIf"],[3,"id","ngClass"],[3,"onClick","keydown.enter","styleClass","tabindex","ariaLabel","buttonProps"],[4,"ngIf"],[3,"onClick","keydown.enter","styleClass","ariaLabel","tabindex","buttonProps"]],template:function(n,i){n&1&&(pe(jt),m(0,zi,2,11,"div",6)),n&2&&o("ngIf",i.maskVisible)},dependencies:[$,Z,he,Ce,be,ke,Et,ht,St,Dt,L],encapsulation:2,data:{animation:[tt("animation",[Fe("void => visible",[Pe(Fi)]),Fe("visible => void",[Pe(Vi)])])]},changeDetection:0})}return t})(),Ot=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=U({type:t});static \u0275inj=K({imports:[Ae,L,L]})}return t})();var Li=({dt:t})=>`
|
|
181
|
+
.p-skeleton {
|
|
182
|
+
overflow: hidden;
|
|
183
|
+
background: ${t("skeleton.background")};
|
|
184
|
+
border-radius: ${t("skeleton.border.radius")};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.p-skeleton::after {
|
|
188
|
+
content: "";
|
|
189
|
+
animation: p-skeleton-animation 1.2s infinite;
|
|
190
|
+
height: 100%;
|
|
191
|
+
left: 0;
|
|
192
|
+
position: absolute;
|
|
193
|
+
right: 0;
|
|
194
|
+
top: 0;
|
|
195
|
+
transform: translateX(-100%);
|
|
196
|
+
z-index: 1;
|
|
197
|
+
background: linear-gradient(90deg, rgba(255, 255, 255, 0), ${t("skeleton.animation.background")}, rgba(255, 255, 255, 0));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
[dir='rtl'] .p-skeleton::after {
|
|
201
|
+
animation-name: p-skeleton-animation-rtl;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.p-skeleton-circle {
|
|
205
|
+
border-radius: 50%;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.p-skeleton-animation-none::after {
|
|
209
|
+
animation: none;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
@keyframes p-skeleton-animation {
|
|
213
|
+
from {
|
|
214
|
+
transform: translateX(-100%);
|
|
215
|
+
}
|
|
216
|
+
to {
|
|
217
|
+
transform: translateX(100%);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@keyframes p-skeleton-animation-rtl {
|
|
222
|
+
from {
|
|
223
|
+
transform: translateX(100%);
|
|
224
|
+
}
|
|
225
|
+
to {
|
|
226
|
+
transform: translateX(-100%);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
`,Oi={root:{position:"relative"}},Hi={root:({props:t})=>["p-skeleton p-component",{"p-skeleton-circle":t.shape==="circle","p-skeleton-animation-none":t.animation==="none"}]},Ht=(()=>{class t extends Te{name="skeleton";theme=Li;classes=Hi;inlineStyles=Oi;static \u0275fac=(()=>{let e;return function(i){return(e||(e=w(t)))(i||t)}})();static \u0275prov=ae({token:t,factory:t.\u0275fac})}return t})();var We=(()=>{class t extends q{styleClass;style;shape="rectangle";animation="wave";borderRadius;size;width="100%";height="1rem";_componentStyle=I(Ht);containerClass(){return{"p-skeleton p-component":!0,"p-skeleton-circle":this.shape==="circle","p-skeleton-animation-none":this.animation==="none"}}get containerStyle(){let e=this._componentStyle?.inlineStyles.root,n;return this.size?n=Ie(V(V({},this.style),e),{width:this.size,height:this.size,borderRadius:this.borderRadius}):n=V(Ie(V({},e),{width:this.width,height:this.height,borderRadius:this.borderRadius}),this.style),n}static \u0275fac=(()=>{let e;return function(i){return(e||(e=w(t)))(i||t)}})();static \u0275cmp=M({type:t,selectors:[["p-skeleton"]],inputs:{styleClass:"styleClass",style:"style",shape:"shape",animation:"animation",borderRadius:"borderRadius",size:"size",width:"width",height:"height"},features:[X([Ht]),z],decls:1,vars:7,consts:[[3,"ngClass","ngStyle"]],template:function(n,i){n&1&&h(0,"div",0),n&2&&(S(i.styleClass),o("ngClass",i.containerClass())("ngStyle",i.containerStyle),v("data-pc-name","skeleton")("aria-hidden",!0)("data-pc-section","root"))},dependencies:[$,Z,be,L],encapsulation:2,changeDetection:0})}return t})(),Bt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=U({type:t});static \u0275inj=K({imports:[We,L,L]})}return t})();var Ri=["actionButton"],Qi=["filters"],Ai=["content"],Wi=[[["tabs"]]],Ni=["tabs"],Xi=t=>({"border-bottom":t}),ji=t=>({"overflow-y":t,"padding-bottom":"80px"}),Yi=()=>({width:"30vw"}),Zi=()=>({"1199px":"75vw","575px":"100vw"});function $i(t,r){if(t&1){let e=b();p(0,"p-button",33),u("onClick",function(){_(e);let i=s();return g(i.isSearchbarCollapse=!i.isSearchbarCollapse)}),d()}t&2&&o("text",!0)}function qi(t,r){if(t&1){let e=b();p(0,"p-button",34),u("click",function(){_(e);let i=s();return g(i.isCollapsed=!i.isCollapsed)}),d()}if(t&2){let e=s();o("text",!0),v("aria-expanded",!e.isCollapsed)}}function Gi(t,r){if(t&1&&(p(0,"h1",20)(1,"span"),N(2),d(),p(3,"span")(4,"small",35),N(5),ze(6,"truncate"),d()()()),t&2){let e=s();a(2),me(e.pageTitle()),a(3),Me(" ",Se(6,2,e.pageSubTitle()),"")}}function Ki(t,r){t&1&&h(0,"p-skeleton",21)}function Ui(t,r){if(t&1){let e=b();p(0,"p-iconfield",23)(1,"input",36),u("ngModelChange",function(i){_(e);let l=s();return g(l.searchQuery.set(i))})("keyup.enter",function(){_(e);let i=s();return g(i.emitSearch())}),d(),p(2,"p-inputicon",37),u("click",function(){_(e);let i=s();return g(i.emitSearch())}),d()()}if(t&2){let e=s();a(),o("ngModel",e.searchQuery())}}function Ji(t,r){if(t&1){let e=b();p(0,"button",38),u("click",function(){_(e);let i=s();return g(i.onOpenFilterDialog())}),h(1,"i",39)(2,"i",40),d()}}function en(t,r){t&1&&D(0)}function tn(t,r){if(t&1){let e=b();p(0,"p-iconfield")(1,"input",36),u("ngModelChange",function(i){_(e);let l=s();return g(l.searchQuery.set(i))})("keyup.enter",function(){_(e);let i=s();return g(i.emitSearch())}),d(),p(2,"p-inputicon",37),u("click",function(){_(e);let i=s();return g(i.emitSearch())}),d()()}if(t&2){let e=s();a(),o("ngModel",e.searchQuery())}}function nn(t,r){if(t&1){let e=b();p(0,"button",38),u("click",function(){_(e);let i=s();return g(i.onOpenFilterDialog())}),h(1,"i",39)(2,"i",40),d()}}function on(t,r){t&1&&D(0)}function an(t,r){t&1&&D(0)}function ln(t,r){t&1&&D(0)}function rn(t,r){if(t&1){let e=b();p(0,"p-button",41),u("onClick",function(){_(e);let i=s();return g(i.closeFilter())}),d()}t&2&&o("rounded",!0)("text",!0)}function sn(t,r){if(t&1){let e=b();p(0,"p-button",44),u("click",function(){_(e);let i=s(2);return g(i.cancelFilter())}),d()}}function pn(t,r){if(t&1){let e=b();p(0,"p-button",45),u("click",function(){_(e);let i=s(2);return g(i.confirmFilter())}),d()}}function dn(t,r){if(t&1&&m(0,sn,1,0,"p-button",42)(1,pn,1,0,"p-button",43),t&2){let e=s();o("ngIf",e.showCancelButton()),a(),o("ngIf",e.showConfirmButton())}}var cn=9999,Po=(()=>{class t{ngAfterViewInit(){this.intercomService.initializeIntercom()}confirmFilter(){this.filterConfirmed.emit()}cancelFilter(){this.filterCanceled.emit(),this.isDialogFilterVisible.update(e=>!e)}closeFilter(){this.filterCanceled.emit(),this.isDialogFilterVisible.update(e=>!e)}constructor(){this.intercomService=I(it),this.scrollable=k(!1),this.limitStrLength=k(cn),this.overflowScroll=k(!1),this.isCollapsed=!0,this.isSearchbarCollapse=!0,this.store=I(zt),this.pageTitle=k(""),this.pageSubTitle=k(""),this.isSearchableInput=k(!1),this.isFilterable=k(!1),this.hasMainWrapperPadding=k(!1),this.search=re(),this.searchQuery=je(""),this.filterConfirmed=re(),this.filterCanceled=re(),this.isDialogFilterVisible=se(!1),this.isInitDialogFilterVisible=se(!1),this.isLoading=se(!1),this.pageTitleComputed=Ue(()=>this.pageTitle()?this.pageTitle().length>50?this.pageTitle().slice(0,50)+"...":this.pageTitle():""),this.showCancelButton=k(!0),this.showConfirmButton=k(!0),this.dialogTitle=k("Filter"),Je(()=>{this.isInitDialogFilterVisible()&&this.onOpenFilterDialog()})}onOpenFilterDialog(){this.isDialogFilterVisible.update(e=>!e)}emitSearch(){this.search.emit(this.searchQuery())}handleKeyboardEvent(e){e.key==="F2"&&this.filterConfirmed.emit()}get mainPanelClasses(){return{"p-3":this.hasMainWrapperPadding()}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-main-panel"]],contentQueries:function(n,i,l){if(n&1&&(T(l,Ri,7),T(l,Qi,7),T(l,Ai,7)),n&2){let c;y(c=x())&&(i.actionButtonTemplate=c.first),y(c=x())&&(i.filterTemplate=c.first),y(c=x())&&(i.contentTemplate=c.first)}},hostBindings:function(n,i){n&1&&u("keydown",function(c){return i.handleKeyboardEvent(c)},!1,Ze)},inputs:{scrollable:[1,"scrollable"],limitStrLength:[1,"limitStrLength"],overflowScroll:[1,"overflowScroll"],pageTitle:[1,"pageTitle"],pageSubTitle:[1,"pageSubTitle"],isSearchableInput:[1,"isSearchableInput"],isFilterable:[1,"isFilterable"],hasMainWrapperPadding:[1,"hasMainWrapperPadding"],isDialogFilterVisible:[1,"isDialogFilterVisible"],isInitDialogFilterVisible:[1,"isInitDialogFilterVisible"],isLoading:[1,"isLoading"],showCancelButton:[1,"showCancelButton"],showConfirmButton:[1,"showConfirmButton"],dialogTitle:[1,"dialogTitle"]},outputs:{search:"search",filterConfirmed:"filterConfirmed",filterCanceled:"filterCanceled",isDialogFilterVisible:"isDialogFilterVisibleChange",isInitDialogFilterVisible:"isInitDialogFilterVisibleChange",isLoading:"isLoadingChange"},features:[X([])],ngContentSelectors:Ni,decls:47,vars:39,consts:[["collapse","ngbCollapse"],["closeIconTemplate",""],["footer",""],[1,"container-wrapper"],[2,"position","sticky","top","0","z-index","1000","background","white"],[1,"navbar","navbar-expand-lg","bg-white","border-bottom",3,"ngClass"],[1,"container-fluid","px-lg-3","px-1"],[1,"row","w-100","d-block","d-lg-none","mx-0"],[1,"col","d-flex","align-items-center","justify-content-between","flex-wrap","px-0"],[1,"d-flex","align-items-center"],["icon","fa-solid fa-bars","severity","contrast",1,"text-dark",3,"onClick","text"],[1,"fs-4","m-0","fw-bolder"],["icon","fa-solid fa-magnifying-glass","severity","contrast",3,"text","onClick",4,"ngIf"],["icon","fa-solid fa-ellipsis-vertical","severity","contrast",3,"text","click",4,"ngIf"],[1,"w-100","d-none","d-lg-flex"],[1,"col-8","d-flex"],[1,"row","w-100"],[1,"col-12","d-flex","align-items-center"],[1,"d-flex","align-items-center","justify-content-between","w-100","gap-2"],["tooltipPosition","top",1,"flex-shrink-1",3,"pTooltip"],[1,"page-title","fs-6","m-0","fw-semibold","align-middle"],["height","2rem","width","15rem"],[1,"d-flex","align-items-center","flex-grow-1","gap-2"],[2,"max-width","300px"],["type","button",1,"btn","btn-link","p-0"],[1,"col-4","align-self-center","d-flex","gap-2","justify-content-end"],[4,"ngTemplateOutlet"],[3,"ngbCollapseChange","ngbCollapse"],[1,"card"],[1,"card-body"],[1,"d-flex","align-items-center","gap-2"],[1,"flex-grow-1",3,"ngClass"],["position","center","appendTo","body",3,"visibleChange","header","modal","visible","breakpoints","draggable","closeIconTemplate","dismissableMask"],["icon","fa-solid fa-magnifying-glass","severity","contrast",3,"onClick","text"],["icon","fa-solid fa-ellipsis-vertical","severity","contrast",3,"click","text"],[2,"font-size","14px"],["pTooltip","Search...","tooltipPosition","top","placeholder","Search...","type","text","pInputText","",3,"ngModelChange","keyup.enter","ngModel"],["styleClass","fa-solid fa-magnifying-glass",3,"click"],["type","button",1,"btn","btn-link","p-0",3,"click"],[1,"fa-solid","fa-filter"],[1,"fa-solid","fa-caret-down"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],["label","Cancel","severity","secondary","variant","outlined",3,"click",4,"ngIf"],["label","OK (F2)",3,"click",4,"ngIf"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click"]],template:function(n,i){if(n&1){let l=b();pe(Wi),p(0,"div",3)(1,"div",4)(2,"nav",5)(3,"div",6)(4,"div",7)(5,"div",8)(6,"div",9)(7,"p-button",10),u("onClick",function(){return _(l),g(i.store.updateSidebarType())}),d(),p(8,"h1",11),N(9),d(),m(10,$i,1,1,"p-button",12),d(),m(11,qi,1,2,"p-button",13),d()(),p(12,"div",14)(13,"div",15)(14,"div",16)(15,"div",17)(16,"div",18)(17,"div",19),ze(18,"truncate"),m(19,Gi,7,4,"h1",20)(20,Ki,1,0,"p-skeleton",21),d(),p(21,"div",22),m(22,Ui,3,1,"p-iconfield",23)(23,Ji,3,0,"button",24),d()()()()(),p(24,"div",25),m(25,en,1,0,"ng-container",26),d()()()(),p(26,"div",27,0),ue("ngbCollapseChange",function(f){return _(l),ge(i.isSearchbarCollapse,f)||(i.isSearchbarCollapse=f),g(f)}),p(28,"div",28)(29,"div",29)(30,"div",30),m(31,tn,3,1,"p-iconfield")(32,nn,3,0,"button",24),d()()()(),p(33,"div",27,0),ue("ngbCollapseChange",function(f){return _(l),ge(i.isCollapsed,f)||(i.isCollapsed=f),g(f)}),p(35,"div",28)(36,"div",29),m(37,on,1,0,"ng-container",26),d()()(),J(38),d(),p(39,"div",31),m(40,an,1,0,"ng-container",26),d()(),p(41,"p-dialog",32),ue("visibleChange",function(f){return _(l),ge(i.isDialogFilterVisible,f)||(i.isDialogFilterVisible=f),g(f)}),m(42,ln,1,0,"ng-container",26)(43,rn,1,2,"ng-template",null,1,Y)(45,dn,2,2,"ng-template",null,2,Y),d()}if(n&2){let l=ce(44);qe("overflow-y-auto",i.scrollable()),a(2),o("ngClass",j(33,Xi,i.hasMainWrapperPadding())),a(5),o("text",!0),a(2),Me(" ",i.pageTitleComputed()," "),a(),o("ngIf",i.isSearchableInput()),a(),o("ngIf",i.actionButtonTemplate),a(6),o("pTooltip",Se(18,31,i.pageTitle())!==i.pageTitle()?i.pageTitle():null),a(2),Q(i.isLoading()?20:19),a(3),Q(i.isSearchableInput()?22:-1),a(),Q(i.isFilterable()?23:-1),a(2),o("ngTemplateOutlet",i.actionButtonTemplate),a(),_e("ngbCollapse",i.isSearchbarCollapse),a(5),Q(i.isSearchableInput()?31:-1),a(),Q(i.isFilterable()?32:-1),a(),_e("ngbCollapse",i.isCollapsed),a(4),o("ngTemplateOutlet",i.actionButtonTemplate),a(2),R(j(35,ji,i.overflowScroll()?"auto":"visible")),o("ngClass",i.mainPanelClasses),a(),o("ngTemplateOutlet",i.contentTemplate),a(),R(ee(37,Yi)),o("header",i.dialogTitle())("modal",!0),_e("visible",i.isDialogFilterVisible),o("breakpoints",ee(38,Zi))("draggable",!1)("closeIconTemplate",l)("dismissableMask",!0),a(),o("ngTemplateOutlet",i.filterTemplate)}},dependencies:[st,rt,lt,nt,ot,at,Ct,bt,xt,yt,Tt,vt,Ot,Ae,wt,ke,$,Z,he,Ce,It,kt,Mt,Bt,We],styles:["[_nghost-%COMP%]{display:block}.page-title[_ngcontent-%COMP%]{margin-left:5px;color:#000}.container-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;height:100vh;scrollbar-width:thin;scrollbar-color:var(--primary-color) #f1f1f1}.container-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.container-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.container-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--primary-color);border-radius:10px;border:2px solid #f1f1f1}.container-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--primary-700)}.navbar-collapse.show[_ngcontent-%COMP%]{padding-bottom:auto}.input-group[_ngcontent-%COMP%]{align-items:center}.input-group-text[_ngcontent-%COMP%]{background-color:transparent}input[type=checkbox][_ngcontent-%COMP%]:checked ~ a[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{transform:rotate(90deg);transition:transform .3s ease}label[for=check][_ngcontent-%COMP%]{width:25px;height:25px;border-radius:50%;border:1px solid #000;display:flex;justify-content:center;align-items:center}label[for=check][_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{transition:.4s cubic-bezier(.68,-.6,.32,1.6);font-size:.6rem}label[for=check][_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}label[for=check][_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{transform:rotate(180deg)}@media (max-width: 575px){ .p-dialog{height:100vh!important;max-height:100vh!important;border-radius:0!important} .p-dialog-content{overflow:auto;height:calc(100vh - 4rem)}} p-inputicon.fa-solid.fa-magnifying-glass{top:53%}"],changeDetection:0})}}return t})();export{St as a,Dt as b,Et as c,Pt as d,Ae as e,Ot as f,We as g,Bt as h,Po as i};
|