dealposbooks 5.45.2 → 5.46.1

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.
Files changed (72) hide show
  1. package/3rdpartylicenses.txt +5 -23
  2. package/assets/scss/components/_tables.scss +29 -3
  3. package/assets/scss/style.scss +4 -0
  4. package/{chunk-QY6YO5GR.js → chunk-325YO3CB.js} +1 -1
  5. package/{chunk-OZG2M6UV.js → chunk-53W5RLOG.js} +4 -4
  6. package/{chunk-W325ZFGZ.js → chunk-56N6E5N3.js} +1 -1
  7. package/{chunk-WO62II7E.js → chunk-6HNKPNHQ.js} +1 -1
  8. package/{chunk-26UQWFZL.js → chunk-7UGQCTEO.js} +1 -1
  9. package/{chunk-WZQ3ORPU.js → chunk-A3XYHEBB.js} +1 -1
  10. package/chunk-AS6FT6H3.js +1 -0
  11. package/{chunk-FXATM6DM.js → chunk-BPBHYTKN.js} +1 -1
  12. package/{chunk-MLC5Q3HL.js → chunk-BPZ7LLVJ.js} +1 -1
  13. package/{chunk-AJUXGEAH.js → chunk-C2KFSD3V.js} +1 -1
  14. package/chunk-CRRQQY3W.js +1 -0
  15. package/{chunk-DWCZUCH4.js → chunk-DAUF3TQ2.js} +1 -1
  16. package/{chunk-66OMKKIW.js → chunk-FXWKWGGZ.js} +1 -1
  17. package/{chunk-GZYN6L4H.js → chunk-FYFSBGP3.js} +1 -1
  18. package/chunk-G25NFEKL.js +1 -0
  19. package/chunk-GKXIOXWW.js +8 -0
  20. package/{chunk-NMNIOSPK.js → chunk-HXXN64RL.js} +1 -1
  21. package/chunk-ICH2UTRM.js +1 -0
  22. package/{chunk-QTPVRMTB.js → chunk-IZCYMXSH.js} +1 -1
  23. package/chunk-JGRTH5OW.js +1 -0
  24. package/{chunk-GNLE4WCA.js → chunk-JYEZYL2U.js} +1 -1
  25. package/{chunk-BSDEDT6G.js → chunk-KGTXHU4K.js} +1 -1
  26. package/{chunk-JTUKNSIL.js → chunk-KYQ3HOYB.js} +1 -1
  27. package/{chunk-CDM64DTS.js → chunk-LLPR22QN.js} +1 -1
  28. package/{chunk-BXJSXLQV.js → chunk-LWIIL6RI.js} +1 -1
  29. package/{chunk-PYQLVU3L.js → chunk-ME7O3OZS.js} +1 -1
  30. package/chunk-MOUK63TZ.js +4 -0
  31. package/{chunk-FPBO6QHG.js → chunk-MYE27TEJ.js} +1 -1
  32. package/{chunk-HWYLSS7R.js → chunk-NID2PW3N.js} +1 -1
  33. package/{chunk-Y4NMBCL7.js → chunk-NLRLM4WP.js} +1 -1
  34. package/{chunk-HSCJP74Q.js → chunk-O4TXGGHF.js} +1 -1
  35. package/chunk-OBX4APL6.js +1 -0
  36. package/chunk-OKX4P7HR.js +1 -0
  37. package/{chunk-SZPSOPM4.js → chunk-PQB7CIVB.js} +1 -1
  38. package/chunk-PRW2K6L4.js +129 -0
  39. package/{chunk-4LXFEAO3.js → chunk-QKRPHDSG.js} +1 -1
  40. package/{chunk-JOKE4TMJ.js → chunk-QXZZJ543.js} +1 -1
  41. package/{chunk-4TTCPL3N.js → chunk-R7TX5W65.js} +1 -1
  42. package/{chunk-XBIY3I5H.js → chunk-SBAIX6FL.js} +1 -1
  43. package/{chunk-3KUSIKRO.js → chunk-SLUPHKW6.js} +1 -1
  44. package/{chunk-KUECUVZ7.js → chunk-SPFVPLUI.js} +1 -1
  45. package/{chunk-OX6CAMTK.js → chunk-SZUKKFRX.js} +1 -1
  46. package/{chunk-MMQTWRG5.js → chunk-TOSO7HJJ.js} +1 -1
  47. package/chunk-TYVIEINK.js +1 -0
  48. package/{chunk-GJJEUBYR.js → chunk-VBCL4G4V.js} +1 -1
  49. package/{chunk-UP4DWDNE.js → chunk-W4HYYYPX.js} +1 -1
  50. package/{chunk-OQD4ZKBU.js → chunk-XILZA7G5.js} +1 -1
  51. package/{chunk-Y7P7BGVH.js → chunk-Y2PXP5OT.js} +2 -2
  52. package/{chunk-2CZSVC7E.js → chunk-Y3UB475V.js} +1 -1
  53. package/chunk-YM5BXLAN.js +1 -0
  54. package/{chunk-AOJUTF6L.js → chunk-YUNKEY4N.js} +1 -1
  55. package/{chunk-YDFJ65ST.js → chunk-Z2ADGCWR.js} +1 -1
  56. package/{chunk-A2PK5UDL.js → chunk-ZYDAEVQY.js} +1 -1
  57. package/index.html +2 -2
  58. package/{main-TUODCJBC.js → main-7RGHX2IL.js} +1 -1
  59. package/package.json +1 -1
  60. package/{styles-TEWF6HBI.css → styles-4HAX3IDP.css} +1 -1
  61. package/chunk-3HOFEEIL.js +0 -1
  62. package/chunk-5M4DFZYR.js +0 -8
  63. package/chunk-BTVPGIVW.js +0 -1
  64. package/chunk-DHA762N3.js +0 -1
  65. package/chunk-JRVYSBUZ.js +0 -5
  66. package/chunk-KQGEEF2E.js +0 -129
  67. package/chunk-N4CQ65FU.js +0 -1
  68. package/chunk-OVHHHUDY.js +0 -1
  69. package/chunk-P63CD72K.js +0 -1
  70. package/chunk-QUL4J2CF.js +0 -1
  71. package/chunk-VEALQLJ2.js +0 -1
  72. package/chunk-YVO6JHL7.js +0 -1
package/chunk-3HOFEEIL.js DELETED
@@ -1 +0,0 @@
1
- import{a as D}from"./chunk-FXATM6DM.js";import{a as nt}from"./chunk-G4XX7EU2.js";import{a as ze}from"./chunk-JRVYSBUZ.js";import{a as Ae,b as He}from"./chunk-BLR3HBYP.js";import{a as ie}from"./chunk-GZYN6L4H.js";import{b as J}from"./chunk-GNLE4WCA.js";import{a as Me}from"./chunk-XKI7WLHE.js";import{a as Ue,b as Pe}from"./chunk-7DYACF4D.js";import"./chunk-NZN6QJR3.js";import"./chunk-IGWIRCAS.js";import{a as z,b as j}from"./chunk-3A4BFUGD.js";import{d as ke,i as Ne,j as Je,k as Re}from"./chunk-EL5BUFMO.js";import{a as Te,b as Fe}from"./chunk-EQ4PLHI4.js";import"./chunk-H7Q35Y7G.js";import"./chunk-R7N6BWL5.js";import{a as Be}from"./chunk-QF4D5YPK.js";import"./chunk-2AAVNIG7.js";import{a as Ve,b as De}from"./chunk-LFZCMZAP.js";import"./chunk-6A2KUPOG.js";import"./chunk-36OX4S7M.js";import"./chunk-Q5CVMJZC.js";import"./chunk-3GGXPPQT.js";import"./chunk-MFK5RQPJ.js";import"./chunk-6GN3MGBY.js";import"./chunk-Q24GCSGD.js";import{g as Ie,h as Ee}from"./chunk-Y7P7BGVH.js";import{b as ye,c as we}from"./chunk-VGNJD35F.js";import{a as ge,b as he}from"./chunk-2XUSZCQL.js";import{a as y,b as Se,c as xe,d as Ce,e as be,f as ve,g as it}from"./chunk-YV2QJ63P.js";import"./chunk-ARH3WEEF.js";import{n as de,o as ue,w as fe,x as _e}from"./chunk-H6HNANYB.js";import"./chunk-2D2YD753.js";import{b as ne,c as oe,e as re,f as le,k as ae,l as pe,o as me,u as se,x as ce}from"./chunk-OIBDX2CA.js";import"./chunk-AOOG6YOT.js";import"./chunk-4TTCPL3N.js";import"./chunk-2MKKFLNJ.js";import{h as Q,j as X,k as Y,n as tt,p as Z,q as ee,s as te}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as E,Bb as H,Cc as q,Db as g,Dc as $,Ec as F,Ha as k,Lb as s,Nc as w,Oc as M,Pc as V,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 N,ua as et,vc as L,wc as W,xb as A,xc as P,yc as K}from"./chunk-NMCKMUY4.js";import{a as c,b as d}from"./chunk-YQFG5XE2.js";var ht={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}},qe=Se(ve(ht),xe(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))})),be(t=>{let p=v(D),e=v(J);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}))})),Be("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)}})))))}}),Ce(t=>({onInit:()=>{t.getCustomerInvoiceLoader(),t.getCustomerInvoice(t.filter)}})));var $e=t=>({"ng-invalid ng-dirty":t}),Ct=()=>({});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 vt(t,p){if(t&1&&g(0,bt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function yt(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 wt(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(),N(" ",e.number," "),a(2),s("href",r.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.customerID,U),a(),N(" ",e.customer," "),a(2),C(V(13,14,e.date,"d MMM y hh:mm")),a(3),C(e.due?V(16,17,e.due,"d MMM y hh:mm"):"-"),a(3),C(M(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 It(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Et(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function Tt(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,yt,20,0,"ng-template",null,3,b)(4,wt,26,22,"ng-template",null,4,b)(6,It,1,3,"ng-template",null,5,b)(8,Et,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 Ft(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(),N(" ",V(2,2,e.name,30)," ")}}function Vt(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,Vt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}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 Nt(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("to"))}}function Jt(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 Rt(t,p){if(t&1&&(l(0,"div"),g(1,Jt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function Bt(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,Ft,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,Dt,2,1,"div",32),x(21,"p-datepicker",33),g(22,Nt,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,Rt,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",F(17,$e,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(19,$e,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",e.customerSuggestions()),a(4),s("ngClass",F(21,$e,e.isInvalid("pageSize")))("autoNumeric",$(23,Ct)),a(),s("ngIf",e.isInvalid("pageSize"))}}var ft=(()=>{class t extends Me{constructor(){super(...arguments),this.store=v(qe),this.dayjsService=v(J),this.generateJournalService=v(D),this.authService=v(ie),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.customerSuggestions=k([]),this.fb=v(se)}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:je,pageNumber:Oe,pageSize:Ge,export:Le,exportPageNumber:We,exportPageSize:Ke}=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(je),pageNumber:this.fb.control(Oe),pageSize:this.fb.control(Ge,[oe.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(We),exportPageSize:this.fb.control(Ke)})}onSearchContact(e){let{query:r}=e;this.generateJournalService.getCustomerSuggestions(r).pipe(Be("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]=nt);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=et(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["app-customer-invoice"]],features:[q([qe]),H],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",3,"ngClass","autoNumeric"],[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),P(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),P(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,vt,1,1,"ng-template",null,0,b)(3,Tt,10,5,"ng-template",null,1,b)(5,Bt,32,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:[Ee,Re,ke,Ne,Je,te,Q,X,Y,ee,Z,Pe,Ue,he,ge,_e,fe,De,Ve,Fe,Te,ue,de,He,Ae,ce,ae,ne,re,le,pe,me,we,ye,Ie,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Pt={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},Qe=Se(it("JournalSupplierBillStore"),ve(Pt),xe(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))})),be(t=>{let p=v(D),e=v(J);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)}})))))}}),Ce(t=>({onInit:()=>{t.getGJSupplierBillLoader(),t.getJournalSupplierBill(t.filter)}})));var Xe=t=>({"ng-invalid ng-dirty":t}),Mt=()=>({});function zt(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 jt(t,p){if(t&1&&g(0,zt,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function Ot(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 Gt(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(),N(" ",e.number," "),a(2),C(e.customer),a(2),C(V(12,13,e.date,"d MMM y hh:mm")),a(3),C(e.due?V(15,16,e.due,"d MMM y hh:mm"):"-"),a(3),C(M(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 Ut(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function At(t,p){t&1&&(l(0,"tr")(1,"td",23)(2,"span"),m(3,"No records found."),o()()())}function Ht(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,Ot,20,0,"ng-template",null,3,b)(4,Gt,25,21,"ng-template",null,4,b)(6,Ut,1,3,"ng-template",null,5,b)(8,At,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 Lt(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(),N(" ",V(2,2,e.name,30)," ")}}function Wt(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 Kt(t,p){if(t&1&&(l(0,"div"),g(1,Wt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("from"))}}function qt(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 $t(t,p){if(t&1&&(l(0,"div"),g(1,qt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function Qt(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 Xt(t,p){if(t&1&&(l(0,"div"),g(1,Qt,3,1,"div",37),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function Yt(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,Lt,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,Kt,2,1,"div",32),x(21,"p-datepicker",33),g(22,$t,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,Xt,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",F(19,Xe,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(21,Xe,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("suggestions",M(27,17,e.supplierSuggestions$)),a(5),s("autoNumeric",$(23,Mt))("ngClass",F(24,Xe,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var _t=(()=>{class t extends Me{constructor(){super(),this.generateJournalService=v(D),this.store=v(Qe),this.authService=v(ie),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=v(se),this.dayjsService=v(J)}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(Be("Supplier Suggestions"))}initform(){let{outletName:e,number:r,from:n,to:i,paymentState:f,deliveryState:u,supplierID:je,pageNumber:Oe,pageSize:Ge,export:Le,exportPageNumber:We,exportPageSize:Ke}=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(je),pageNumber:this.fb.control(Oe),pageSize:this.fb.control(Ge,[oe.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(We),exportPageSize:this.fb.control(Ke)})}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=A({type:t,selectors:[["app-journal-supplier-bill"]],features:[q([Qe]),H],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","","formControlName","pageSize",3,"autoNumeric","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),P(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),P(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,jt,1,1,"ng-template",null,0,b)(3,Ht,10,5,"ng-template",null,1,b)(5,Yt,33,26,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ee,Re,ke,Ne,Je,te,Q,X,Y,tt,ee,Z,Pe,Ue,he,ge,_e,fe,De,Ve,Fe,Te,He,Ae,ce,ae,ne,re,le,pe,me,ue,de,Ie,we,ye,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Zt={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}},Ye=Se(ve(Zt),xe(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))})),be(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))))))}}),Ce(t=>({onInit:()=>{t.getGJShiftLoader(),t.getJournalShift(t.filter)}})));var Ze=t=>({"ng-invalid ng-dirty":t}),ei=()=>({});function ti(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 ii(t,p){if(t&1&&g(0,ti,1,0,"p-button",9),t&2){let e=_();s("ngIf",e.store.hasCheckedRows())}}function ni(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 oi(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(),N(" ",e.number," "),a(2),C(V(8,14,e.open,"dd MMM y hh:mm")),a(3),C(V(11,17,e.close,"dd MMM y hh:mm")),a(3),C(e.cashier),a(2),C(M(16,20,e.salesNTax)),a(3),C(M(19,22,e.totalInvoice)),a(3),C(e.outlet),a(2),C(e.register),a(2),C(M(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 ri(t,p){if(t&1&&m(0),t&2){let e=_(2);L(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function li(t,p){t&1&&(l(0,"tr")(1,"td",22)(2,"span"),m(3,"No records found."),o()()())}function ai(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,ni,22,0,"ng-template",null,3,b)(4,oi,29,26,"ng-template",null,4,b)(6,ri,1,3,"ng-template",null,5,b)(8,li,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 pi(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(),N(" ",V(2,2,e.name,30)," ")}}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("from"))}}function ci(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 di(t,p){if(t&1&&(l(0,"div"),g(1,ci,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("to"))}}function ui(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 fi(t,p){if(t&1&&(l(0,"div"),g(1,ui,3,1,"div",33),o()),t&2){let e=_(2);a(),s("ngForOf",e.getErrors("pageSize"))}}function _i(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,pi,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,si,2,1,"div",29),x(13,"p-datepicker",30),g(14,di,2,1,"div",29),o()(),l(15,"div",24)(16,"label",25),m(17,"Page Size"),o(),x(18,"input",31),g(19,fi,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",F(14,Ze,e.isInvalid("from"))),a(),s("ngIf",e.isInvalid("from")),a(),s("iconDisplay","input")("showIcon",!0)("ngClass",F(16,Ze,e.isInvalid("to"))),a(),s("ngIf",e.isInvalid("to")),a(4),s("autoNumeric",$(18,ei))("ngClass",F(19,Ze,e.isInvalid("pageSize"))),a(),s("ngIf",e.isInvalid("pageSize"))}}var gt=(()=>{class t extends Me{constructor(){super(),this.generateJournalService=v(D),this.store=v(Ye),this.authService=v(ie),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=v(se),this.dayjsService=v(J)}ngOnInit(){this.initForm()}initForm(){let{number:e,outletName:r,from:n,to:i,pageNumber:f,pageSize:u,export:je,exportPageNumber:Oe,exportPageSize:Ge}=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,[oe.required]),export:this.fb.control(je),exportPageNumber:this.fb.control(Oe),exportPageSize:this.fb.control(Ge)})}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=A({type:t,selectors:[["app-journal-shift"]],features:[q([Ye]),H],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",3,"autoNumeric","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),P(n.isDialogFilterVisible,u)||(n.isDialogFilterVisible=u),S(u)})("isInitDialogFilterVisibleChange",function(u){return h(i),P(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,ii,1,1,"ng-template",null,0,b)(3,ai,10,5,"ng-template",null,1,b)(5,_i,20,21,"ng-template",null,2,b),o()}r&2&&(s("isSearchableInput",!0)("isFilterable",!0),W("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Ee,Re,ke,Ne,Je,te,Q,X,Y,ee,Z,Pe,he,ge,_e,fe,ce,ae,ne,re,le,pe,me,De,Ve,Fe,Te,Ie,we,ye,ue,de,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var So=[{path:"invoice",component:ft},{path:"supplier-bill",component:_t},{path:"shift",component:gt},{path:"join-invoice",loadComponent:()=>import("./chunk-P63CD72K.js").then(t=>t.ARJournalComponent)},{path:"join-bill",loadComponent:()=>import("./chunk-BTVPGIVW.js").then(t=>t.ApJournalComponent)},{path:"adjustment",loadComponent:()=>import("./chunk-OVHHHUDY.js").then(t=>t.AdjustmentJournalComponent)}];export{So as generateJournalRoutes};
package/chunk-5M4DFZYR.js DELETED
@@ -1,8 +0,0 @@
1
- import{a as Ke,b as Qe,c as Xe,d as Ye,e as Ze,f as et}from"./chunk-XD7VHCRC.js";import{a as $e,b as ze,c as Ue,d as qe}from"./chunk-UP67MADL.js";import{a as We,b as He}from"./chunk-NCDT6JPP.js";import{a as Le}from"./chunk-JRVYSBUZ.js";import{b as Me}from"./chunk-GNLE4WCA.js";import{a as Je,b as je}from"./chunk-HG5MKVNR.js";import"./chunk-NZN6QJR3.js";import{a as Be,b as Ve,d as Oe,k as ke}from"./chunk-EL5BUFMO.js";import{a as Te,b as we}from"./chunk-EQ4PLHI4.js";import"./chunk-H7Q35Y7G.js";import"./chunk-R7N6BWL5.js";import{a as Re}from"./chunk-QF4D5YPK.js";import{a as Q,b as X}from"./chunk-VJ3IBUVO.js";import"./chunk-2AAVNIG7.js";import{a as Ge,b as Pe}from"./chunk-LFZCMZAP.js";import"./chunk-6A2KUPOG.js";import{a as Ne,b as De}from"./chunk-36OX4S7M.js";import"./chunk-Q5CVMJZC.js";import"./chunk-3GGXPPQT.js";import"./chunk-MFK5RQPJ.js";import{b as Y}from"./chunk-KJ2WX3FC.js";import"./chunk-6GN3MGBY.js";import"./chunk-Q24GCSGD.js";import{h as A}from"./chunk-Y7P7BGVH.js";import"./chunk-VGNJD35F.js";import{a as J,b as j}from"./chunk-2XUSZCQL.js";import"./chunk-YV2QJ63P.js";import"./chunk-ARH3WEEF.js";import{n as K,o as F,w as k,x as R}from"./chunk-H6HNANYB.js";import"./chunk-2D2YD753.js";import{Ha as O,La as Ee,b as N,c as le,e as y,f as D,j as Ae,l as G,m as W,n as Ie,o as P,u as B,w as H,x as V}from"./chunk-OIBDX2CA.js";import{b as Ce,e as xe,l as Se}from"./chunk-AOOG6YOT.js";import{a as Fe}from"./chunk-4TTCPL3N.js";import{a as ye}from"./chunk-2MKKFLNJ.js";import{h as be,k as ve,q as _e,s as S}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as _,Cc as q,Db as g,Dc as I,Ec as oe,Ha as L,L as se,Lb as p,Nc as re,Ob as $,Oc as ae,Rb as T,Rc as f,Tb as w,Ub as M,Vb as i,Wb as n,Xb as c,Z as ue,_ as E,ca as de,ec as C,fc as d,g as pe,hb as l,ia as u,nb as ie,qa as h,ra as b,rc as r,s as ce,sc as U,tc as z,wc as fe,xb as x,xc as ge,yc as he}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var v=(()=>{class t{#e=u(Fe);fetchLoaderConfiguration(){return this.#e.get("","api/SetupLoader/Load")}updateAccountingIntegrationConfiguration(e){return this.#e.post(void 0,"/api/setup/SubmitConfig",e)}fetchOpeningBalanceFormConfiguration(){return this.#e.get("","/api/setup/OpeningBalance/Form")}submitOpeningBalanceFormConfiguration(e){return this.#e.post("","api/setup/OpeningBalance/Submit",e)}fetchAPICredential(){return this.#e.get(void 0,"/api/AccountConfig")}updateAPICredential(e){return this.#e.put(void 0,"/api/AccountConfig",e)}verifyAPICredential(e){return this.#e.post(void 0,"/api/AccountConfig/Validate",e)}formatJournal(e){return this.#e.post("","/api/setup/formatdata/clearjournal",{domain:e})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=de({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ut=()=>({height:"calc(100vh - 100px)"});function dt(t,m){if(t&1){let e=_();i(0,"div",4)(1,"a",5),r(2,"Cancel"),n(),i(3,"p-button",6),C("click",function(){h(e);let a=d();return b(a.updateAccountingIntegration())}),n()()}}function ft(t,m){if(t&1&&(i(0,"p-tab",8),r(1),n()),t&2){let e=m.$implicit,o=m.$index;p("value",o),l(),U(e)}}function gt(t,m){if(t&1&&(i(0,"div",25),c(1,"p-radiobutton",41),i(2,"label",42),r(3),n()()),t&2){let e=m.$implicit;l(),p("value",e.key)("inputId",e.value),l(),p("for",e.value),l(),U(e.value)}}function ht(t,m){if(t&1&&(i(0,"div",40)(1,"div",25),c(2,"p-radiobutton",43),i(3,"label",42),r(4),n()()()),t&2){let e=m.$implicit;l(2),p("value",e.key)("inputId",e.key.toString()),l(),p("for",e.key),l(),U(e.value)}}function bt(t,m){if(t&1&&(i(0,"p-scrollpanel",null,2)(2,"p-tabs",7)(3,"p-tablist"),w(4,ft,2,2,"p-tab",8,T),n(),i(6,"p-tabpanels")(7,"p-tabpanel",9)(8,"div",10)(9,"h3",11),r(10,"Accounting Numbering"),n(),i(11,"div",12)(12,"div",13)(13,"div",14)(14,"div",13)(15,"div",15)(16,"label",16),r(17,"Digit"),n(),c(18,"p-inputnumber",17),n()(),i(19,"div",13)(20,"div",15)(21,"label",18),r(22,"Seed"),n(),c(23,"p-inputnumber",19),n()(),i(24,"div",13)(25,"div",15)(26,"label",20),r(27,"Last Number"),n(),c(28,"p-inputnumber",21),n()(),i(29,"div",13)(30,"div",15)(31,"label",22),r(32,"Format"),n(),c(33,"p-select",23),n()(),i(34,"div",13)(35,"div",15)(36,"label",22),r(37,"Reset Every"),n(),i(38,"div",24),w(39,gt,4,4,"div",25,T),n()()()()()()()(),i(41,"p-tabpanel",8)(42,"div",26)(43,"div",27)(44,"h3",11),r(45,"Journal Generate"),n(),i(46,"p"),r(47,"Configure generate transaction"),n()(),i(48,"div",12)(49,"div",28)(50,"div",12)(51,"div",29)(52,"div",15)(53,"label",22),r(54,"Outlet Delivery Journal"),n(),c(55,"p-toggleswitch",30),n()(),i(56,"div",31)(57,"div",15)(58,"label",22),r(59,"Payment Discount Journal On Payment"),n(),c(60,"p-toggleswitch",32),n()()()()()(),c(61,"hr"),i(62,"div",26)(63,"div",28)(64,"div",12)(65,"div",33)(66,"label",22),r(67,"Note"),n()(),i(68,"div",29)(69,"div",15)(70,"label",22),r(71,"Note Required On Journal"),n(),c(72,"p-toggleswitch",34),n()(),i(73,"div",29)(74,"div",15)(75,"label",22),r(76,"Trial Balance Footer Visible"),n(),c(77,"p-toggleswitch",35),n()(),c(78,"div",29),n()()()(),i(79,"p-tabpanel",36)(80,"div",10)(81,"h3",11),r(82,"Report"),n(),i(83,"div",12)(84,"div",27)(85,"div",37)(86,"div")(87,"label",38),r(88,"Accounting For Treatment"),n(),i(89,"div",12)(90,"div",39)(91,"div",12),w(92,ht,5,4,"div",40,T),n()()()()()()()()()()()()),t&2){let e,o,a,s=d();$(I(8,ut)),l(2),p("value",0)("formGroup",s.form),l(2),M(s.tabs()),l(3),p("value",0),l(26),p("options",(e=s.accountingIntegration())==null||e.options==null?null:e.options.monthlyResetPeriodFormat),l(6),M((o=s.accountingIntegration())==null||o.options==null?null:o.options.resetPeriods),l(2),p("value",1),l(38),p("value",2),l(13),M((a=s.accountingIntegration())==null||a.options==null?null:a.options.generatePrepaidJournal)}}var nt=(()=>{class t{constructor(){this.accountingSetupService=u(v),this.fb=u(B).nonNullable,this.tabs=L(["Numbering","Journal","Report"]),this.accountingIntegration=L(null)}ngOnInit(){this.initializeForm(),this.loadAccountingConfiguration()}initializeForm(){this.form=this.fb.group({number:this.createNumberGroup(),report:this.createReportGroup(),journalGenerate:this.createJournalGenerateGroup()})}createNumberGroup(){return this.fb.group({seed:this.fb.control(""),digit:this.fb.control(""),resetEvery:this.fb.control(""),monthlyFormat:this.fb.control(""),lastNumber:this.fb.control(""),lastModified:this.fb.control("")})}createReportGroup(){return this.fb.group({accountingAuditType:this.fb.control(""),accountingEntityAccess:this.fb.control(""),generatePrepaidJournal:this.fb.control("")})}createJournalGenerateGroup(){return this.fb.group({eodExpenseJournal:this.fb.control(""),transferOrder:this.fb.control(""),paymentDiscount:this.fb.control(""),noteMandatory:this.fb.control(""),trialBalanceFooterVisible:this.fb.control("")})}loadAccountingConfiguration(){this.accountingSetupService.fetchLoaderConfiguration().pipe(E(e=>{this.accountingIntegration.set(e),this.form.patchValue(e.form)})).subscribe()}updateAccountingIntegration(){let e={form:this.form.getRawValue()};this.accountingSetupService.updateAccountingIntegrationConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["app-accounting-integration"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["scrollPanelContainer",""],["pageTitle","Accounting Integration"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"click"],[1,"border-top",3,"value","formGroup"],[3,"value"],["formGroupName","number",3,"value"],[1,""],[1,"fs-5"],[1,"row"],[1,"col-6"],[1,"row","row-gap-3"],[1,"d-flex","flex-column"],["for","digit",1,"fs-4"],["inputId","digit","formControlName","digit"],["for","seed",1,"fs-4"],["inputId","seed","formControlName","seed"],["for","lastNumber",1,"fs-4"],["inputId","lastNumber","formControlName","lastNumber"],["for","",1,"fs-4"],["appendTo","body","formControlName","monthlyFormat","optionValue","key","optionLabel","value",3,"options"],[1,"d-flex","gap-4"],[1,"d-flex","align-items-center","gap-2"],["formGroupName","journalGenerate",1,"row"],[1,"col-12"],[1,"col-10"],[1,"col-md-4","mb-3"],["formControlName","transferOrder"],[1,"col-md-6","mb-4"],["formControlName","paymentDiscount"],[1,"col-12","mb-2"],["formControlName","noteMandatory"],["formControlName","trialBalanceFooterVisible"],["formGroupName","report",3,"value"],[1,"d-flex","flex-column","gap-4"],["for","generatePrepaidJournal",1,"fs-4","mb-2"],[1,"col-8"],[1,"col-4"],["name","resetEvery","formControlName","resetEvery",3,"value","inputId"],[1,"m-0",3,"for"],["name","generatePrepaidJournal","formControlName","generatePrepaidJournal",3,"value","inputId"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,dt,4,0,"ng-template",null,0,f)(3,bt,94,9,"ng-template",null,1,f),n())},dependencies:[S,et,Ze,Ye,Xe,Ke,Qe,A,Y,Ve,Be,V,y,D,G,P,W,F,Pe,Ge,je,Je,Se,xe,R,k,De,Ne,X,Q],styles:["[_nghost-%COMP%]{display:block}.inactive-state[_ngcontent-%COMP%]{background-color:#e5e5e5}.active-state[_ngcontent-%COMP%]{background-color:var(--p-primary-color)}"],changeDetection:0})}}return t})();var Ct=()=>({height:"cacl(100vh - 200px)"}),xt=()=>({height:"calc(100vh - 250px)"}),it=()=>({});function St(t,m){if(t&1){let e=_();i(0,"div")(1,"p-button",5),C("onClick",function(){h(e);let a=d();return b(a.submitForm())}),n()()}}function yt(t,m){t&1&&(i(0,"div",17)(1,"h3",18),r(2,"Date"),n(),c(3,"p-datePicker",19),n())}function Ft(t,m){t&1&&(i(0,"tr")(1,"th",25),r(2,"Account Name"),n(),i(3,"th",26),r(4,"Debit"),n(),i(5,"th",26),r(6,"Credit"),n()())}function At(t,m){if(t&1&&(i(0,"tr",9)(1,"td",25),r(2),n(),i(3,"td"),c(4,"input",27),n(),i(5,"td"),c(6,"input",28),n()()),t&2){let e,o=m.$implicit,a=m.rowIndex,s=d(4);p("formGroupName",a),l(2),z(" ",(e=s.asFormGroup(o).get("accountName"))==null?null:e.value," "),l(2),p("autoNumeric",I(4,it)),l(2),p("autoNumeric",I(5,it))}}function It(t,m){if(t&1&&(i(0,"div",9)(1,"h4",20),r(2),n(),i(3,"div",21)(4,"p-table",22),g(5,Ft,7,0,"ng-template",23)(6,At,7,6,"ng-template",24),n()()()),t&2){let e=m.$implicit,o=m.$index,a=d(3);p("formGroupName",o),l(2),z(" ",e.get("name").value," "),l(2),p("value",a.getItemsArray(a.asFormGroup(e)).controls)}}function Et(t,m){if(t&1&&(i(0,"p-panel",7),g(1,yt,4,0,"ng-template",null,2,f),c(3,"p-divider"),i(4,"p-scroll-panel")(5,"div",8),w(6,It,7,3,"div",9,T),n()(),i(8,"div",10)(9,"table",11)(10,"tr")(11,"td",12)(12,"p",13),r(13," Total: "),n()(),i(14,"td",14)(15,"p",15),r(16),re(17,"number"),n()(),i(18,"td",16)(19,"p",15),r(20),re(21,"number"),n()()()()()()),t&2){let e=d(2);$(I(11,Ct)),p("formGroup",e.formGroups),l(4),$(I(12,xt)),l(2),M(e.formsArray.controls),l(10),z(" ",ae(17,7,e.subtotalDebit)," "),l(4),z(" ",ae(21,9,e.subtotalCredit)," ")}}function Tt(t,m){if(t&1&&g(0,Et,22,13,"p-panel",6),t&2){let e=d();p("ngIf",e.formGroups)}}var rt=(()=>{class t{constructor(){this.destroy$=new pe,this.subtotalDebit=0,this.subtotalCredit=0,this.fb=u(B),this.accSetupService=u(v),this.dayjsService=u(Me),this.date=new Date,this.routes=u(Ce)}ngOnInit(){this.initializeForm(),this.loadFormData(),this.calculateSubtotalDebit(),this.formGroups.get("forms").valueChanges.pipe(se(300),ue(this.destroy$)).subscribe(()=>{this.calculateSubtotalDebit()})}initializeForm(){this.formGroups=this.fb.group({forms:this.fb.array([]),date:this.fb.control(new Date)})}get formsArray(){return this.formGroups.get("forms")}getItemsArray(e){return e.get("items")}asFormGroup(e){return e}createFormGroup(e){return this.fb.group({id:[e.id],name:[e.name],items:this.createItemsArray(e.items)})}createItemsArray(e){let o=e.map(a=>this.createItemGroup(a));return this.fb.array(o)}createItemGroup(e){return this.fb.group({accountName:[e.accountName],accountCode:[e.accountCode],id:[e.id],journalID:[e.journalID],accountID:[e.accountID],debitAmount:[e.debitAmount],creditAmount:[e.creditAmount],index:[e.index],note:[e.note]})}loadFormData(){this.routes.data.pipe(ce(e=>e.data),Re("response"),E(e=>{for(;this.formsArray.length>0;)this.formsArray.removeAt(0);e.form.filter(a=>a.items&&a.items.length>0).forEach(a=>{this.formsArray.push(this.createFormGroup(a))})})).subscribe({error:e=>console.error("Error loading form data:",e)})}calculateSubtotalDebit(){let e=this.formGroups.controls.forms;this.subtotalDebit=0,this.subtotalCredit=0,e.controls.forEach(o=>{let a=this.getItemsArray(o),s=a.controls.reduce((ee,te)=>{let ne=te.get("debitAmount").value||0;return ee+ne},0),ct=a.controls.reduce((ee,te)=>{let ne=te.get("creditAmount").value||0;return ee+ne},0);this.subtotalDebit+=s,this.subtotalCredit+=ct})}submitForm(){let e=Object.entries(this.formGroups.getRawValue()).reduce((o,[a,s])=>(a==="date"?o[a]=s instanceof Date?this.dayjsService.format(s):s:a==="forms"?o.form=s:o[a]=s,o),{});console.log("Submitting form data:",e),this.accSetupService.submitOpeningBalanceFormConfiguration(e).subscribe(),console.log("Submitting form data:",e)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["app-acc-opening-balance-form"]],features:[q([O])],decls:6,vars:1,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Opening Balance Form",3,"scrollable"],["preventOpenDuplicates",""],["label","Submit",3,"onClick"],[3,"formGroup","style",4,"ngIf"],[3,"formGroup"],["formArrayName","forms",1,"d-flex","flex-column","row-gap-4"],[3,"formGroupName"],[2,"position","fixed","bottom","0","left","241px",`/* offset from the left edge (assuming 250px sidebar) */
2
- width`,`calc(
3
- 100% - 243px
4
- )`,`/* adjust width to fit the remaining space */
5
- z-index`,"91","background-color","white",`/* added background */
6
- /* box-shadow`,"0 -2px 5px rgba(0, 0, 0, 0.1)",`*/ /* added subtle shadow */
7
- padding`,"8px 0",`/* added padding for height */
8
- border-top`,"1px solid #e0e0e0"],[1,"w-100","px-4"],[1,"ps-5"],[1,"fw-semibold","fs-4","m-0","text-end",2,"margin-right","10px !important"],[1,"",2,"width","200px"],[1,"fw-semibold","fs-4","m-0","text-start"],[1,"pe-5",2,"width","200px"],[1,"d-flex","flex-column","gap-2","mx-2"],[1,"fs-5","m-0"],["formControlName","date"],[1,"fs-4"],["formArrayName","items"],["dataKey","id",3,"value"],["pTemplate","header"],["pTemplate","body"],[1,"fs-3"],[1,"fs-3",2,"width","200px"],["formControlName","debitAmount",1,"fs-3","form-control",3,"autoNumeric"],["formControlName","creditAmount",1,"fs-3","form-control",3,"autoNumeric"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,St,2,0,"ng-template",null,0,f)(3,Tt,1,1,"ng-template",null,1,f),n(),c(5,"p-toast",4)),o&2&&p("scrollable",!0)},dependencies:[A,Y,Ee,S,ve,_e,we,Te,ke,Oe,X,Q,H,N,y,D,F,Ue,R,k,j,J,Le,V,G,P,W,Ie,He,We],styles:["[_nghost-%COMP%]{display:block} .container-wrapper .p-datatable .p-datatable-thead>tr>th{top:0!important}"],changeDetection:0})}}return t})();var at=t=>({"ng-invalid ng-dirty":t});function Mt(t,m){if(t&1){let e=_();i(0,"p-button",4),C("onClick",function(){h(e);let a=d();return b(a.verifyCredentials())}),r(1,"Verify"),n(),i(2,"p-button",4),C("onClick",function(){h(e);let a=d();return b(a.saveCredentials())}),r(3,"Update"),n()}}function Nt(t,m){t&1&&(i(0,"div",12)(1,"h3",13),r(2,"Account"),n(),i(3,"small",14),r(4,"Configure Client ID and Client Secret"),n()())}function Dt(t,m){if(t&1&&(i(0,"div",5)(1,"p-panel"),g(2,Nt,5,0,"ng-template",null,2,f),i(4,"div",6)(5,"div",7)(6,"div",8)(7,"label",9),r(8,"Client ID"),n(),c(9,"input",10),n()(),i(10,"div",7)(11,"div",8)(12,"label",9),r(13,"Client Secret"),n(),c(14,"input",11),n()()()()()),t&2){let e=d();l(4),p("formGroup",e.credentialForm),l(5),p("ngClass",oe(3,at,e.clientIDControl.invalid&&e.clientIDControl.dirty||e.clientIDControl.touched)),l(5),p("ngClass",oe(5,at,e.clientSecretControl.invalid&&e.clientSecretControl.dirty||e.clientSecretControl.touched))}}var lt=(()=>{class t{constructor(e,o){this.fb=e,this.messageService=o,this.setupService=u(v)}ngOnInit(){this.initForm(),this.setupService.fetchAPICredential().pipe(E(e=>{this.credentialForm.patchValue({clientID:e.clientID||"",clientSecret:e.clientSecret||""})})).subscribe()}initForm(){this.credentialForm=this.fb.group({clientID:["",[le.required]],clientSecret:["",[le.required]]})}get clientIDControl(){return this.credentialForm.get("clientID")}get clientSecretControl(){return this.credentialForm.get("clientSecret")}saveCredentials(){if(this.credentialForm.invalid){this.credentialForm.markAllAsTouched();return}let e=this.credentialForm.getRawValue();console.log("Saving credentials:",e),this.setupService.updateAPICredential(e).subscribe()}verifyCredentials(){if(this.credentialForm.invalid){this.credentialForm.markAllAsTouched();return}let e=this.credentialForm.getRawValue();console.log("Verifying credentials:",e),this.setupService.verifyAPICredential(e).subscribe({next:o=>{console.log("Verify result:",o),this.messageService.add({severity:"success",summary:"Verified",detail:"Credentials are valid!"})},error:o=>{console.error("Verify failed:",o),this.messageService.add({severity:"error",summary:"Invalid",detail:"Client ID or Secret is wrong!"})}})}static{this.\u0275fac=function(o){return new(o||t)(ie(B),ie(O))}}static{this.\u0275cmp=x({type:t,selectors:[["app-api-credential"]],features:[q([O])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","API Credential"],[3,"onClick"],[1,"d-flex","flex-column","row-gap-4"],[1,"row",3,"formGroup"],[1,"col-6"],[1,"d-flex","flex-column"],["for","outlet"],["type","text","pInputText","","formControlName","clientID",3,"ngClass"],["type","text","pInputText","","formControlName","clientSecret",3,"ngClass"],[1,"d-flex","flex-column","px-2"],[1,"mb-0","fw-bold"],[1,"fst-italic","text-muted"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,Mt,4,0,"ng-template",null,0,f)(3,Dt,15,7,"ng-template",null,1,f),n())},dependencies:[S,be,V,N,y,D,G,P,F,K,j,J,A,R,k,qe],encapsulation:2})}}return t})();function Gt(t,m){if(t&1){let e=_();i(0,"button",4),C("click",function(){h(e);let a=d();return b(a.onFormatJournal())}),r(1," Format "),n()}}function Pt(t,m){t&1&&(i(0,"div",12)(1,"div",13)(2,"h4",14),r(3,"Journal Configuration"),n(),i(4,"small",15),r(5," Enter your account information to format journal entries "),n()()())}function Bt(t,m){if(t&1){let e=_();i(0,"div",5)(1,"p-panel"),g(2,Pt,6,0,"ng-template",null,2,f),i(4,"div",6)(5,"div",7)(6,"p-floatlabel",8)(7,"input",9),he("ngModelChange",function(a){h(e);let s=d();return ge(s.subdomain,a)||(s.subdomain=a),b(a)}),n(),i(8,"label",10),r(9,"Subdomain"),n()(),i(10,"small",11),r(11,"Enter your account subdomain (e.g., mycompany.dealpos.net)"),n()()()()()}if(t&2){let e=d();l(7),fe("ngModel",e.subdomain)}}var mt=(()=>{class t{constructor(){this.setupService=u(v),this.subdomain=L(""),this.toastrService=u(ye)}onFormatJournal(){if(!this.subdomain()){this.toastrService.error("Please enter a subdomain","Error");return}this.setupService.formatJournal(this.subdomain()).subscribe({next:e=>{this.toastrService.success(e.message,"Success")}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["app-format-jurnal"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Format Journal"],[1,"btn","btn-success","rounded",3,"click"],[1,"d-flex","flex-column","row-gap-4"],[1,"row","mt-6"],[1,"col-12"],["variant","on"],["pInputText","","id","subdomain","autocomplete","off",1,"w-100",3,"ngModelChange","ngModel"],["for","subdomain"],[1,"text-muted","fst-italic",2,"font-size","12px"],[1,"row","ps-2"],[1,"col-12","d-flex","flex-column"],[1,"mb-1","fw-bold"],[1,"fst-italic","text-muted"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,Gt,2,0,"ng-template",null,0,f)(3,Bt,12,1,"ng-template",null,1,f),n())},dependencies:[S,H,N,y,Ae,F,K,A,j,J,ze,$e],encapsulation:2})}}return t})();var pt=()=>u(v).fetchOpeningBalanceFormConfiguration();var bi=[{path:"",redirectTo:"accounting-integration",pathMatch:"full"},{path:"",children:[{path:"journal-tag",loadComponent:()=>import("./chunk-QUL4J2CF.js").then(t=>t.JournalTagComponent)},{path:"journal-tag/info",loadComponent:()=>import("./chunk-MLC5Q3HL.js").then(t=>t.JournalTagInfoComponent)},{path:"journal-tag/form",loadComponent:()=>import("./chunk-66OMKKIW.js").then(t=>t.JournalTagFormComponent)},{path:"accounting-integration",component:nt},{path:"opening-balance-form",component:rt,resolve:{data:pt}},{path:"api-crendetial",component:lt},{path:"format-journal",component:mt},{path:"closing-entries",loadComponent:()=>import("./chunk-2CZSVC7E.js").then(t=>t.ClosingPageComponent)},{path:"closing-entries/create",loadComponent:()=>import("./chunk-26UQWFZL.js").then(t=>t.ClosingFormComponent)}]}];export{bi as ACCOUNTING_SETUP_ROUTES};
package/chunk-BTVPGIVW.js DELETED
@@ -1 +0,0 @@
1
- import{a as F}from"./chunk-FXATM6DM.js";import{a as je}from"./chunk-JRVYSBUZ.js";import{a as Be,b as Oe}from"./chunk-BLR3HBYP.js";import{a as re}from"./chunk-GZYN6L4H.js";import{b as D}from"./chunk-GNLE4WCA.js";import{a as ze}from"./chunk-XKI7WLHE.js";import"./chunk-7DYACF4D.js";import"./chunk-NZN6QJR3.js";import"./chunk-IGWIRCAS.js";import{a as z,b as j}from"./chunk-3A4BFUGD.js";import{d as Pe,i as ke,j as Re,k as Me}from"./chunk-EL5BUFMO.js";import{a as De,b as Fe}from"./chunk-EQ4PLHI4.js";import"./chunk-H7Q35Y7G.js";import"./chunk-R7N6BWL5.js";import"./chunk-2AAVNIG7.js";import{a as Je,b as Ne}from"./chunk-LFZCMZAP.js";import"./chunk-6A2KUPOG.js";import"./chunk-36OX4S7M.js";import"./chunk-Q5CVMJZC.js";import"./chunk-3GGXPPQT.js";import"./chunk-MFK5RQPJ.js";import"./chunk-6GN3MGBY.js";import"./chunk-Q24GCSGD.js";import{g as Ve,h as Ae}from"./chunk-Y7P7BGVH.js";import{b as Te,c as Ee}from"./chunk-VGNJD35F.js";import{a as Ce,b as Se}from"./chunk-2XUSZCQL.js";import{a as y,b as be,c as ve,d as ye,e as we,f as Ie}from"./chunk-YV2QJ63P.js";import"./chunk-ARH3WEEF.js";import{n as _e,o as ge,w as he,x as xe}from"./chunk-H6HNANYB.js";import"./chunk-2D2YD753.js";import{b as ae,c as le,e as pe,f as me,k as se,l as ce,o as de,u as ue,x as fe}from"./chunk-OIBDX2CA.js";import"./chunk-AOOG6YOT.js";import"./chunk-4TTCPL3N.js";import"./chunk-2MKKFLNJ.js";import{h as Z,j as ee,k as te,n as ie,p as ne,s as oe}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as w,Bb as K,Cc as Q,Db as x,Dc as X,Ec as V,Ha as k,Lb as c,Nc as T,Oc as Y,Pc as A,Rc as v,Vb as r,Wb as o,Xb as S,Y as P,_ as H,bd as E,c as J,cb as U,db as L,ec as I,fc as _,hb as l,ia as C,qa as g,ra as h,rc as s,s as N,sc as b,tc as R,vc as W,wc as $,xb as G,xc as M,yc as q}from"./chunk-NMCKMUY4.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var We={data:{data:[],totalCount:0},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}}},B=be(Ie(We),ve(t=>({first:E(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:E(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:E(()=>t.data().data.some(a=>a.checked)),checkedAPCollection:E(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),we(t=>{let a=C(F),e=C(D);return{updateFilter(n){y(t,i=>f(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){y(t,i=>{let u=i.data.data.map(m=>m.id===n.id?f(d({},m),{checked:!0}):m);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){y(t,i=>{let u=i.data.data.map(m=>m.id===n.id?f(d({},m),{checked:!1}):m);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){y(t,i=>{let u=i.data.data.map(m=>f(d({},m),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getAPLoader:z(J(P(()=>a.getAPJournalLoader().pipe(j({next:n=>{y(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AP journal:",n)}}))))),getARCollection:z(J(N(n=>Object.entries(n).reduce((i,[u,m])=>(m!=null&&(i[u]=m),i),{})),P(n=>a.getAPJournal(n).pipe(N(i=>f(d({},i),{data:i.data.map(u=>f(d({},u),{due:e.from(u.due)?e.from(u.due).format():null,checked:!1}))})),j({next:i=>{y(t,u=>f(d({},u),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),ye(t=>({onInit:()=>{t.getAPLoader(),t.getARCollection(t.filter)}})));var O=t=>({"ng-invalid ng-dirty":t}),$e=()=>({});function qe(t,a){if(t&1){let e=w();r(0,"p-button",10),I("onClick",function(){g(e);let n=_(2);return h(n.onCreateJournal())}),o()}}function Qe(t,a){if(t&1&&x(0,qe,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function Xe(t,a){t&1&&(r(0,"tr")(1,"th",12),S(2,"p-tableHeaderCheckbox"),o(),r(3,"th",13),s(4,"Outlet"),o(),r(5,"th",14),s(6,"Number"),o(),r(7,"th",15),s(8,"Supplier"),o(),r(9,"th",16),s(10,"Date"),o(),r(11,"th",16),s(12,"Due"),o(),r(13,"th",15),s(14,"Note"),o(),r(15,"th",17),s(16,"Payment"),o(),S(17,"th",18),o())}function Ye(t,a){if(t&1&&(r(0,"tr")(1,"td"),S(2,"p-tableCheckbox",19),o(),r(3,"td"),s(4),o(),r(5,"td")(6,"a",20),s(7),o()(),r(8,"td"),s(9),o(),r(10,"td"),s(11),T(12,"date"),o(),r(13,"td"),s(14),T(15,"date"),o(),r(16,"td"),S(17,"div",21),o(),r(18,"td"),s(19),o(),r(20,"td"),S(21,"p-button",22),o()()),t&2){let e=a.$implicit,p=_(2);l(2),c("value",e),l(2),b(e.outlet),l(2),c("href",p.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Bill/New_Join_Bill/Info?ID="+e.id,L),l(),R(" ",e.number," "),l(2),b(e.customer),l(2),b(A(12,12,e.date,"d MMM y")),l(3),b(e.due?A(15,15,e.due,"d MMM y hh:mm"):"-"),l(3),c("innerHTML",e.note,U),l(2),b(e.payment),l(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Ze(t,a){if(t&1&&s(0),t&2){let e=_(2);W(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function et(t,a){t&1&&(r(0,"tr")(1,"td",23)(2,"span"),s(3,"No records found."),o()()())}function tt(t,a){if(t&1){let e=w();r(0,"p-panel")(1,"p-table",11),I("onPage",function(n){g(e);let i=_();return h(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){g(e);let i=_();return h(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){g(e);let i=_();return h(i.onRowSelect(n))})("onRowUnselect",function(n){g(e);let i=_();return h(i.onRowUnselect(n))}),x(2,Xe,18,0,"ng-template",null,3,v)(4,Ye,22,18,"ng-template",null,4,v)(6,Ze,1,3,"ng-template",null,5,v)(8,et,4,0,"ng-template",null,6,v),o()()}if(t&2){let e=_();l(),c("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function it(t,a){if(t&1&&(r(0,"span",34),s(1),T(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),l(),R(" ",A(2,2,e.name,30)," ")}}function nt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function ot(t,a){if(t&1&&(r(0,"div"),x(1,nt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("from"))}}function rt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function at(t,a){if(t&1&&(r(0,"div"),x(1,rt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("to"))}}function lt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function pt(t,a){if(t&1&&(r(0,"div"),x(1,lt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("pageSize"))}}function mt(t,a){if(t&1){let e=w();r(0,"form",24)(1,"div",25)(2,"label",26),s(3,"Outlet"),o(),r(4,"p-select",27),x(5,it,3,5,"ng-template",null,7,v),o()(),r(7,"div",25)(8,"label",26),s(9,"From - To"),o(),r(10,"div",28),S(11,"p-datepicker",29),x(12,ot,2,1,"div",30),S(13,"p-datepicker",31),x(14,at,2,1,"div",30),o()(),r(15,"div",25)(16,"label",26),s(17,"Supplier"),o(),r(18,"p-autocomplete",32),T(19,"async"),I("completeMethod",function(n){g(e);let i=_();return h(i.onSearchSupplier(n))}),o()(),r(20,"div",25)(21,"label",26),s(22,"Page Size"),o(),S(23,"input",33),x(24,pt,2,1,"div",30),o()()}if(t&2){let e=_();c("formGroup",e.form),l(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),l(7),c("iconDisplay","input")("showIcon",!0)("ngClass",V(17,O,e.isInvalid("from"))),l(),c("ngIf",e.isInvalid("from")),l(),c("iconDisplay","input")("showIcon",!0)("ngClass",V(19,O,e.isInvalid("to"))),l(),c("ngIf",e.isInvalid("to")),l(4),c("suggestions",Y(19,15,e.supplierSuggestions$)),l(5),c("autoNumeric",X(21,$e))("ngClass",V(22,O,e.isInvalid("pageSize"))),l(),c("ngIf",e.isInvalid("pageSize"))}}var Yt=(()=>{class t extends ze{constructor(){super(),this.store=C(B),this.generateJournalService=C(F),this.authService=C(re),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(ue),this.dayjsService=C(D)}ngOnInit(){this.initform()}initform(){let{outletName:e,number:p,from:n,to:i,paymentState:u,supplierID:m,pageNumber:He,pageSize:Ue,export:Le,exportPageNumber:Ge,exportPageSize:Ke}=this.store.filter();this.form=this.fb.group({outletName:this.fb.control(e),number:this.fb.control(p),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(u),supplierID:this.fb.control(m),pageNumber:this.fb.control(He),pageSize:this.fb.control(Ue,[le.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(Ge),exportPageSize:this.fb.control(Ke)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((p,[n,i])=>(i!=null&&(n==="from"||n==="to"?(typeof i=="string"||typeof i=="number"||i instanceof Date)&&(p[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null):p[n]=i),p),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(p=>!p)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e}))}onSearchSupplier(e){this.supplierSuggestions$=this.generateJournalService.getSupplierSuggestions(e.query).pipe()}onPageChange(e){let p=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:p+1}))}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(p=>{this.store.onRowUnselect(p)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createAPJournal(this.store.checkedAPCollection()).pipe(H(()=>{this.store.getARCollection(this.store.filter)})).subscribe()}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=G({type:t,selectors:[["app-ap-journal"]],features:[Q([B]),K],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AP Collection",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","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","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,"innerHTML"],[3,"icon","severity","text"],["colspan","9"],[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"],["showClear","","formControlName","supplierID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(p,n){if(p&1){let i=w();r(0,"app-main-panel",8),q("isDialogFilterVisibleChange",function(m){return g(i),M(n.isDialogFilterVisible,m)||(n.isDialogFilterVisible=m),h(m)})("isInitDialogFilterVisibleChange",function(m){return g(i),M(n.isInitDialogFilterVisible,m)||(n.isInitDialogFilterVisible=m),h(m)}),I("filterConfirmed",function(){return g(i),h(n.onFilterOKEvent())})("search",function(m){return g(i),h(n.onSearch(m))}),x(1,Qe,1,1,"ng-template",null,0,v)(3,tt,10,5,"ng-template",null,1,v)(5,mt,25,24,"ng-template",null,2,v),o()}p&2&&(c("isSearchableInput",!0)("isFilterable",!0),$("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),c("scrollable",!0))},dependencies:[Ae,Me,Pe,ke,Re,oe,Z,ee,te,ie,ne,xe,he,Se,Ce,fe,se,ae,pe,me,ce,de,Ne,Je,Fe,De,ge,_e,Oe,Be,Ee,Te,Ve,je],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Yt as ApJournalComponent};
package/chunk-DHA762N3.js DELETED
@@ -1 +0,0 @@
1
- import{a as Xe,b as Ze,c as et,d as tt,e as nt,f as ot}from"./chunk-XD7VHCRC.js";import{a as Qe}from"./chunk-G4XX7EU2.js";import{a as Te,b as Fe}from"./chunk-3A4BFUGD.js";import{d as te,e as qe,i as we,j as Me,k as ne}from"./chunk-EL5BUFMO.js";import"./chunk-EQ4PLHI4.js";import"./chunk-H7Q35Y7G.js";import"./chunk-R7N6BWL5.js";import{a as Ae}from"./chunk-QF4D5YPK.js";import{a as re,b as pe}from"./chunk-VJ3IBUVO.js";import"./chunk-2AAVNIG7.js";import{a as Y,b as K}from"./chunk-LFZCMZAP.js";import"./chunk-6A2KUPOG.js";import"./chunk-36OX4S7M.js";import"./chunk-Q5CVMJZC.js";import"./chunk-3GGXPPQT.js";import"./chunk-MFK5RQPJ.js";import{a as Ee,b as z}from"./chunk-KJ2WX3FC.js";import"./chunk-6GN3MGBY.js";import"./chunk-Q24GCSGD.js";import{h as F}from"./chunk-Y7P7BGVH.js";import"./chunk-VGNJD35F.js";import{a as H,b as $}from"./chunk-2XUSZCQL.js";import{a as ee,b as ye,c as be,d as Pe,e as Oe,f as Ie,g as Je}from"./chunk-YV2QJ63P.js";import"./chunk-ARH3WEEF.js";import{o as Ke,w as G,x as L}from"./chunk-H6HNANYB.js";import"./chunk-2D2YD753.js";import{e as j,f as _e,j as ae,k as ge,l as xe,m as he,n as Ye,o as Ce,u as Se,w as Z,x as ve}from"./chunk-OIBDX2CA.js";import{b as ie,d as ze,e as N,l as D}from"./chunk-AOOG6YOT.js";import{a as fe}from"./chunk-4TTCPL3N.js";import"./chunk-2MKKFLNJ.js";import{k as A,o as He,s as T}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as v,Cc as de,Db as _,Dc as W,Ec as oe,Ha as M,Lb as s,Nc as Ue,Ob as q,Oc as je,Qb as $e,Rb as b,Rc as u,Tb as P,Ub as O,Vb as a,Wb as i,Xb as B,Y as U,_ as w,bd as X,c as se,ca as ue,cb as Ve,ec as y,fc as c,hb as p,ia as h,qa as C,ra as S,rc as m,s as Q,sc as d,tc as I,vc as We,xb as E}from"./chunk-NMCKMUY4.js";import{a as f,b as x}from"./chunk-YQFG5XE2.js";var R=(()=>{class t{constructor(){this.httpService=h(fe)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(e){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration",{params:e})}fetchPOSOutletFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/Setup/OutletConfigurationForm",n)}updatePOSOutletConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitOutletConfiguration",e)}fetchPOSPaymentConfiguration(e){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration",{params:e})}fetchPOSPaymentFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"api/Setup/PaymentConfigurationForm",n)}updatePOSPaymentConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitPaymentConfiguration",e)}fetchPOSTaxConfiguration(){return this.httpService.get(void 0,"/api/setup/TaxConfigurationForm")}updatePOSTaxConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitTaxConfiguration",e)}fetchPOSWriteOffConfiguration(){return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationList")}fetchPOSWriteOffFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationForm",n)}updatePOSWriteOffConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitWriteOffConfiguration",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ue({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var k=function(t){return t.POSGLOBAL_SELL="Sell",t.POSGLOBAL_BUY="Buy",t.POSGLOBAL_ADJUSTMENT="Adjustment",t.POSGLOBAL_PREPAID="Prepaid",t.POSGLOBAL_RETURN="Return",t.POSGLOBAL_DEBT="Debt",t.POSGLOBAL_PAYMENTFEE="Payment Fee",t.POSGLOBAL_MANUFACTURING="Manufacturing",t.POSGLOBAL_ADVANCE="Advance",t}(k||{});var it={[k.POSGLOBAL_SELL]:[{typeID:2,side:"debit",label:"Account Receivable"},{typeID:1,side:"credit",label:"Sales"},{typeID:4,side:"debit",label:"COGS"},{typeID:3,side:"credit",label:"Sold Inventory"},{typeID:10,side:"debit",label:"Sales Discount"}],[k.POSGLOBAL_BUY]:[{typeID:27,side:"debit",label:"Pending Paid Inventory"},{typeID:5,side:"credit",label:"Account Payable"},{typeID:28,side:"debit",label:"Inventory Bought"},{typeID:27,side:"credit",label:"Pending Paid Inventory"},{typeID:11,side:"credit",label:"Purchase Discount"}],[k.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[k.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[k.POSGLOBAL_RETURN]:[{typeID:8,side:"debit",label:"Sales Return"},{typeID:27,side:"debit",label:"Inventory"},{typeID:4,side:"credit",label:"COGS"},{typeID:9,side:"credit",label:"Purchase Return"}],[k.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[k.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[k.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[k.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function _t(t,r){if(t&1){let e=v();a(0,"div",5)(1,"p-button",6),y("onClick",function(){C(e);let o=c();return S(o.onSubmit())}),i()()}}function gt(t,r){if(t&1&&(a(0,"p-tab",10),m(1),i()),t&2){let e=r.$implicit;s("value",e.value),p(),d(e.label)}}function xt(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),i()(),a(4,"div")(5,"span"),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function ht(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),i()(),a(4,"div")(5,"span"),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function Ct(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),i(),a(5,"span",17),m(6),i()(),a(7,"p-select",18),_(8,xt,7,2,"ng-template",null,2,u)(10,ht,7,2,"ng-template",null,3,u),i()()()),t&2){let e=r.$implicit,n=c(4);s("formGroupName",e.index),p(4),d(e.entry.value.label),p(2),d(e.entry.value.side),p(),s("options",n.posIntegration().options.accounts)}}function St(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),i()(),a(4,"div")(5,"span"),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function vt(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),i()(),a(4,"div")(5,"span"),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function yt(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),i(),a(5,"span",20),m(6),i()(),a(7,"p-select",18),_(8,St,7,2,"ng-template",null,2,u)(10,vt,7,2,"ng-template",null,3,u),i()()()),t&2){let e=r.$implicit,n=c(4);s("formGroupName",e.index),p(4),d(e.entry.value.label),p(2),d(e.entry.value.side),p(),s("options",n.posIntegration().options.accounts)}}function bt(t,r){if(t&1&&(a(0,"p-tabpanel",10)(1,"div",11)(2,"div",12)(3,"div",13),P(4,Ct,12,4,"div",14,b),i()(),a(6,"div",12)(7,"div",13),P(8,yt,12,4,"div",14,b),i()()()()),t&2){let e=r.$implicit,n=c(3);s("value",e.value),p(),s("formGroupName",e.value),p(3),O(n.getDebitEntries(e.value)),p(4),O(n.getCreditEntries(e.value))}}function Pt(t,r){if(t&1){let e=v();a(0,"form",8),y("ngSubmit",function(){C(e);let o=c(2);return S(o.onSubmit())}),a(1,"p-tabs",9)(2,"p-tablist"),P(3,gt,2,2,"p-tab",10,b),i(),a(5,"p-tabpanels"),P(6,bt,10,2,"p-tabpanel",10,b),i()()()}if(t&2){let e=c(2);s("formGroup",e.accountForm),p(),s("value",e.tab())("lazy",!0),p(2),O(e.tabs()),p(3),O(e.tabs())}}function Ot(t,r){if(t&1&&_(0,Pt,8,3,"form",7),t&2){let e=c();s("ngIf",e.posIntegration()&&e.accountForm)}}var at=(()=>{class t{constructor(){this.posConfigService=h(R),this.fb=h(Se),this.tab=M(k.POSGLOBAL_SELL),this.tabs=M(Object.values(k).map(e=>({label:e,value:e}))),this.posIntegration=M(null),this.form=M([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=k}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(w(e=>{this.posIntegration.set(e),this.form.set(e.form),this.descriptionsMap=new Map(e.descriptions.map(n=>[+n.id,n.name])),this.initializeForm()})).subscribe()}initializeForm(){let e={};this.tabs().forEach(n=>{let o=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,o),e[n.value]=this.fb.array(o.map(l=>this.createEntryFormGroup(l)))}),this.accountForm=this.fb.group(e)}createEntryFormGroup(e){let n=this.fb.group({typeID:[e.typeID],label:[e.label],side:[e.side],accountID:[this.getAccountIDByTypeID(e.typeID)]});return n.get("accountID").valueChanges.subscribe(o=>{this.syncAccountIDs(e.typeID,o,n)}),n}getAccountIDByTypeID(e){return this.form().find(o=>o.typeID===e)?.accountID||""}getEntriesForTab(e){return it[e]||[]}getTabEntries(e){return this.accountForm.get(e)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],o=new Set;for(let l of Object.values(e))for(let{typeID:g,accountID:V}of l){let Be=`${g}_${V}`;o.has(Be)||(o.add(Be),n.push({typeID:g,accountID:V||Qe}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:l=>console.error("Save failed",l)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="credit")}syncAccountIDs(e,n,o){Object.values(this.accountForm.controls).forEach(l=>{l.controls.forEach(g=>{g!==o&&g.get("typeID")?.value===e&&g.get("accountID")?.value!==n&&g.get("accountID")?.setValue(n,{emitEvent:!1})})})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-pos-global"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","POS Integration"],[1,"d-flex","gap-2"],["label","Submit",3,"onClick"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"border-top",3,"value","lazy"],[3,"value"],[1,"row",3,"formGroupName"],[1,"col"],[1,"row","gap-3"],[1,"col-12",3,"formGroupName"],[1,"form-group","d-flex","flex-column"],["for","",1,"fs-3"],[1,"text-success","fs-3"],["filter","","filterBy","code,name","formControlName","accountID","optionLabel","name","optionValue","id",3,"options"],[1,"d-flex","align-items-center","gap-2"],[1,"text-danger","fs-3"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,_t,2,0,"ng-template",null,0,u)(3,Ot,1,1,"ng-template",null,1,u),i())},dependencies:[F,ot,nt,tt,et,Xe,Ze,Ke,K,Y,Z,ge,j,_e,T,A,D,L,G,ve,xe,Ce,he],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var It=t=>[t];function Et(t,r){if(t&1&&(a(0,"th",7),m(1),i()),t&2){let e=r.$implicit;p(),d(e.name.slice(0,10))}}function Tt(t,r){if(t&1&&(a(0,"tr")(1,"th",6),m(2,"Method"),i()(),a(3,"tr"),P(4,Et,2,1,"th",7,b),i()),t&2){let e=c(3);p(4),O(e.paymentConfiguration().outlets)}}function Ft(t,r){if(t&1&&(a(0,"td"),m(1),i()),t&2){let e=r.$implicit;p(),d(e.accountName)}}function wt(t,r){if(t&1&&(a(0,"tr")(1,"td",8)(2,"a",9),m(3),i()(),P(4,Ft,2,1,"td",null,b),i()),t&2){let e=r.$implicit;p(2),s("routerLink",oe(2,It,e.id)),p(),d(e.name),p(),O(e.accounts)}}function Mt(t,r){if(t&1&&(a(0,"p-table",5),_(1,Tt,6,0,"ng-template",null,1,u)(3,wt,6,4,"ng-template",null,2,u),i()),t&2){let e=c(2);s("value",e.paymentConfiguration().payment)}}function Dt(t,r){if(t&1){let e=v();a(0,"app-main-panel",4),y("search",function(o){C(e);let l=c();return S(l.onSearch(o))}),_(1,Mt,5,1,"ng-template",null,0,u),i()}t&2&&s("isSearchableInput",!0)("scrollable",!0)}var rt=(()=>{class t{constructor(){this.POSSetupService=h(R),this.paymentConfiguration=M(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration({}).pipe(w(e=>{this.paymentConfiguration.set(e)})).subscribe()}onSearch(e){this.POSSetupService.fetchPOSPaymentConfiguration({Search:e}).pipe(w(n=>{this.paymentConfiguration.set(n)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",3,"isSearchableInput","scrollable","search",4,"ngIf"],["pageTitle","Payment Method Accounting",3,"search","isSearchableInput","scrollable"],[3,"value"],["rowspan","3",2,"min-width","300px"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&_(0,Dt,3,2,"app-main-panel",3),n&2&&s("ngIf",o.paymentConfiguration())},dependencies:[F,ne,te,qe,T,A,D,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Rt={data:{listOutletAccount:[],listCOAType:[],pageNumber:1,pageSize:20,totalCount:0,totalPages:0},filter:{PageNumber:1,PageSize:20,Search:""}},Ge=ye(Ie(Rt),be(t=>({first:X(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:X(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount))})),Oe(t=>{let r=h(R);return{updateFilter:n=>{ee(t,o=>x(f({},o),{filter:f(f({},o.filter),n)}))},getPOSOutlets:Te(se(U(n=>r.fetchPOSOutletConfiguration(n).pipe(Fe({next:o=>{ee(t,l=>x(f({},l),{data:o}))},error:o=>{console.error("Error fetching POS outlets:",o)}})))))}}),Pe(t=>({onInit:()=>{t.getPOSOutlets(t.filter)}})));var kt=t=>[t];function At(t,r){if(t&1&&(a(0,"th"),m(1),i()),t&2){let e=r.$implicit;p(),d(e.value)}}function Nt(t,r){if(t&1&&(a(0,"tr")(1,"th"),m(2,"Name"),i(),P(3,At,2,1,"th",null,b),i()),t&2){let e=c(2);p(3),O(e.store.data().listCOAType)}}function Gt(t,r){if(t&1&&(a(0,"td"),m(1),i()),t&2){let e=r.$implicit;p(),d(e)}}function Lt(t,r){if(t&1&&(a(0,"tr")(1,"td")(2,"a",7),m(3),i()(),P(4,Gt,2,1,"td",null,b),i()),t&2){let e=r.$implicit;p(2),s("routerLink",oe(2,kt,e.OutletID)),p(),I(" ",e.OutletName,""),p(),O(e.Accounts)}}function Bt(t,r){if(t&1&&m(0),t&2){let e=c(2);We(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Vt(t,r){t&1&&(a(0,"tr")(1,"td",8)(2,"span"),m(3," No journal entries found. "),i()()())}function $t(t,r){if(t&1){let e=v();a(0,"p-panel")(1,"p-table",6),y("onPage",function(o){C(e);let l=c();return S(l.onPage(o))}),_(2,Nt,5,0,"ng-template",null,1,u)(4,Lt,6,4,"ng-template",null,2,u)(6,Bt,1,3,"ng-template",null,3,u)(8,Vt,4,0,"ng-template",null,4,u),i()()}if(t&2){let e=c();p(),s("value",e.store.data().listOutletAccount)("paginator",!0)("rows",e.store.filter().PageSize)("lazy",!0)("totalRecords",e.store.data().totalCount)}}var pt=(()=>{class t{constructor(){this.store=h(Ge)}onSearch(e){this.store.updateFilter({PageNumber:1,PageSize:20,Search:e})}onPage(e){let n=e.first/e.rows+1;this.store.updateFilter(x(f({},this.store.filter()),{PageSize:e.rows,PageNumber:n}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-pos-outlet"]],features:[de([Ge])],decls:3,vars:2,consts:[["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Outlet Account",3,"search","isSearchableInput","scrollable"],["styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","value","paginator","rows","lazy","totalRecords"],[1,"link","link-primary",3,"routerLink"],["colspan","8"]],template:function(n,o){if(n&1){let l=v();a(0,"app-main-panel",5),y("search",function(V){return C(l),S(o.onSearch(V))}),_(1,$t,10,5,"ng-template",null,0,u),i()}n&2&&s("isSearchableInput",!0)("scrollable",!0)},dependencies:[F,T,z,ne,te,D,N,$,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Wt=()=>({height:"calc(100vh - 100px)"}),Ut=()=>({height:"calc(100vh - 150px)"});function jt(t,r){if(t&1){let e=v();a(0,"a",5),m(1,"Cancel"),i(),a(2,"p-button",6),y("onClick",function(){C(e);let o=c();return S(o.updatePOsOutletConfiguration())}),i()}}function Ht(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),i()(),a(4,"div",17)(5,"span",17),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function zt(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),i()(),a(4,"div",18)(5,"span",17),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function Yt(t,r){if(t&1&&(a(0,"div",12)(1,"span",14),m(2),i(),a(3,"p-select",15),_(4,Ht,7,2,"ng-template",null,2,u)(6,zt,7,2,"ng-template",null,3,u),i()()),t&2){let e,n=r.$implicit,o=r.$index,l=c(3);s("formGroupName",o),p(2),d((e=n.get("TypeName"))==null?null:e.value),p(),s("options",l.options.accounts)}}function Kt(t,r){t&1&&B(0,"hr")}function Jt(t,r){if(t&1&&(a(0,"div",9)(1,"h3",10),m(2),Ue(3,"titlecase"),i(),a(4,"div",11),P(5,Yt,8,3,"div",12,b),i()(),_(7,Kt,1,0,"hr",13)),t&2){let e,n=r.$implicit,o=r.$index,l=r.$index,g=r.$count,V=c(2);s("formGroupName",o),p(2),I(" ",je(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),O(V.getAccountsFormArray(l).controls),p(2),s("ngIf",l!==g-1)}}function qt(t,r){if(t&1&&(a(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),P(4,Jt,8,5,null,null,b),i()()()()),t&2){let e=c();q(W(5,Wt)),p(),q(W(6,Ut)),p(),s("formGroup",e.accountsForm),p(2),O(e.accountGroupsArray.controls)}}var lt=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(R),this.outletForm=M(null),this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2,10],accounts:[]},{name:"delivery",typeIds:[3,4],accounts:[]},{name:"buy",typeIds:[27,11,28],accounts:[]},{name:"purchase return",typeIds:[9],accounts:[]},{name:"sales return",typeIds:[8],accounts:[]},{name:"adjustment",typeIds:[21,26],accounts:[]}],this.fb=h(Se)}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(Q(e=>e.get("id")),U(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),w(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(o=>{o.accounts=this.allAccounts.filter(l=>o.typeIds.includes(l.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(o=>{n.push(this.createAccountGroupControl(o))})})).subscribe()}get accountGroupsArray(){return this.accountsForm.get("accountGroups")}getAccountsFormArray(e){return this.accountGroupsArray.at(e).get("accounts")}createAccountGroupControl(e){return this.fb.group({groupName:[e.name],accounts:this.fb.array(e.accounts.map(n=>this.createAccountControl(n)))})}createAccountControl(e){return this.fb.group({AccountID:[e.AccountID],TypeID:[e.TypeID],TypeName:[e.TypeName],OutletID:[e.OutletID],OutletName:[e.OutletName]})}updatePOsOutletConfiguration(){let{accountGroups:e}=this.accountsForm.value,n={form:e.flatMap(o=>o.accounts.map(l=>({AccountID:l.AccountID,TypeID:l.TypeID,TypeName:l.TypeName,OutletID:l.OutletID,OutletName:l.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-pos-outlet-form"]],decls:5,vars:2,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],["routerLink","/pages/pos-setup/outlets",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"",3,"formGroup"],["formArrayName","accountGroups",1,"d-flex","flex-column","gap-2"],[1,"row",3,"formGroupName"],[1,"fs-4","fw-semibold"],["formArrayName","accounts",1,"row","row-gap-3"],[1,"col-6",3,"formGroupName"],[4,"ngIf"],[1,"fs-3"],["formControlName","AccountID","filter","","filterBy","code,name","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-100",3,"options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,jt,3,0,"ng-template",null,0,u)(3,qt,6,7,"ng-template",null,1,u),i()),n&2&&s("pageTitle","Edit "+o.outletName)("hasMainWrapperPadding",!0)},dependencies:[F,T,A,He,z,ve,ge,j,_e,xe,Ce,he,Ye,K,Y,$,H,re,L,G,D,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Zt=()=>({height:"calc(100vh - 100px)"}),en=()=>({width:"100%",height:"calc(100vh - 150px)"}),tn=()=>({width:"100%"});function nn(t,r){if(t&1){let e=v();a(0,"a",6),m(1,"Cancel"),i(),a(2,"p-button",7),y("onClick",function(){C(e);let o=c(3);return S(o.updatePOSOutletConfiguration())}),i()}}function on(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),i()(),a(4,"div",17)(5,"span",17),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function an(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),i()(),a(4,"div",18)(5,"span",17),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function rn(t,r){if(t&1){let e=v();a(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),m(4),i()(),B(5,"div",13),a(6,"div",14)(7,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,g=c(4);return S(g.updateAccountById(o,l))}),_(8,on,7,2,"ng-template",null,2,u)(10,an,7,2,"ng-template",null,3,u),i()()()()}if(t&2){let e=r.$implicit,n=r.$index,o=c(4);p(4),d(e.outletName.slice(0,15)),p(3),q(W(7,tn)),s("ngModel",o.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.paymentForm().options.chartOfAccount)}}function pn(t,r){if(t&1&&(a(0,"p-card")(1,"p-scrollpanel")(2,"div",8),P(3,rn,12,8,"div",9,b),i()()()),t&2){let e=c(3);q(W(4,Zt)),p(),q(W(5,en)),p(2),O(e.paymentForm().form.accounts)}}function ln(t,r){if(t&1&&(a(0,"app-main-panel",4),_(1,nn,3,0,"ng-template",null,0,u)(3,pn,5,6,"ng-template",null,1,u),i()),t&2){let e=c(2);s("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")("hasMainWrapperPadding",!0)}}function mn(t,r){if(t&1&&_(0,ln,5,2,"app-main-panel",5),t&2){let e=c();s("ngIf",e.paymentForm())}}var mt=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(R),this.paymentForm=M(null),this.router=h(ze)}ngOnInit(){this.route.paramMap.pipe(Q(e=>+e.get("id")),U(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),w(e=>{this.paymentForm.set(e)}),Ae("response")).subscribe()}updateAccountById(e,n){let o=this.paymentForm().form.accounts,l=x(f({},this.paymentForm()),{form:x(f({},this.paymentForm().form),{accounts:o.map((g,V)=>V===n?x(f({},g),{accountID:e}):g)})});this.paymentForm.set(l)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Ae("response"),w(()=>{this.router.navigate(["/pages/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-pos-payment-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],["routerLink","/pages/pos-setup/payments",1,"p-button","p-button-outlined","p-button-secondary"],["label","Submit",3,"onClick"],[1,"row","row-gap-3"],[1,"col-6","d-flex","flex-column","gap-2"],[1,"row","row-gap-4"],[1,"col-2"],["for",""],[1,"col-3"],[1,"col-7"],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-full",3,"ngModelChange","ngModel","virtualScroll","virtualScrollItemSize","options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&_(0,mn,1,1,"app-main-panel",4),n&2&&$e(o.paymentForm()?0:-1)},dependencies:[z,Ee,F,T,A,pe,re,K,Y,Z,j,ae,D,N,L,G,$],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();function cn(t,r){if(t&1){let e=v();a(0,"div",5)(1,"a",6),m(2,"Cancel"),i(),a(3,"p-button",7),y("onClick",function(){C(e);let o=c();return S(o.updatePOSTaxConfiguration())}),i()()}}function sn(t,r){if(t&1&&(a(0,"div",5)(1,"div",15)(2,"span"),m(3),i()(),a(4,"div",15)(5,"span",15),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function un(t,r){if(t&1&&(a(0,"div",5)(1,"div",15)(2,"span"),m(3),i()(),a(4,"div",16)(5,"span",15),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function dn(t,r){if(t&1){let e=v();a(0,"div",11)(1,"div",12)(2,"label",13),m(3),i(),a(4,"p-select",14),y("ngModelChange",function(o){let l=C(e).$index,g=c(2);return S(g.updateAccountID(o,l))}),_(5,sn,7,2,"ng-template",null,2,u)(7,un,7,2,"ng-template",null,3,u),i()()()}if(t&2){let e=r.$implicit,n=r.$index,o=c(2);p(3),d(e.name),p(),s("options",o.taxForm().options.chartOfAccount)("ngModel",o.taxForm().form[n].accountID)}}function fn(t,r){if(t&1&&(a(0,"p-panel")(1,"div",8)(2,"div",9)(3,"div",10),P(4,dn,9,3,"div",11,b),i()()()()),t&2){let e=c();p(4),O(e.taxForm().form)}}var ct=(()=>{class t{constructor(){this.POSSetupService=h(R),this.taxForm=M(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(w(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let o=this.taxForm().form,l=x(f({},this.taxForm()),{form:o.map((g,V)=>V===n?x(f({},g),{accountID:e}):g)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(w(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-pos-tax"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],[1,"col-12"],[1,"d-flex","flex-column"],["for",""],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an Account",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,cn,4,0,"ng-template",null,0,u)(3,fn,6,0,"ng-template",null,1,u),i()),n&2&&s("scrollable",!0)},dependencies:[F,z,T,K,Y,pe,Z,j,ae,D,N,L,G,$,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var _n=()=>({"min-width":"50rem"}),gn=t=>[t];function xn(t,r){t&1&&B(0,"p-button",6)}function hn(t,r){if(t&1&&_(0,xn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.hasCheckedItems())}}function Cn(t,r){t&1&&(a(0,"tr")(1,"th",8),B(2,"p-tableHeaderCheckbox"),i(),a(3,"th"),m(4,"Name"),i(),a(5,"th"),m(6,"Description"),i()())}function Sn(t,r){if(t&1&&(a(0,"tr")(1,"td"),B(2,"p-tableCheckbox",9),i(),a(3,"td")(4,"a",10),m(5),i()(),a(6,"td"),m(7),i()()),t&2){let e=r.$implicit;p(2),s("value",e),p(2),s("routerLink",oe(4,gn,e.id)),p(),d(e.name),p(2),d(e.description)}}function vn(t,r){if(t&1){let e=v();a(0,"p-panel")(1,"p-table",7),y("onRowSelect",function(o){C(e);let l=c();return S(l.onRowSelect(o))})("onRowUnselect",function(o){C(e);let l=c();return S(l.onRowSelect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=c();return S(l.onSelectAll(o))}),_(2,Cn,7,0,"ng-template",null,2,u)(4,Sn,8,6,"ng-template",null,3,u),i()()}if(t&2){let e=c();p(),s("value",e.writeoffList().data)("tableStyle",W(2,_n))}}var st=(()=>{class t{constructor(){this.POSSetupService=h(R),this.writeoffList=M(null),this.hasCheckedItems=X(()=>{let e=this.writeoffList();return!e||!e.data||!Array.isArray(e.data)?!1:e.data.some(n=>n&&n.checked===!0)})}ngOnInit(){this.POSSetupService.fetchPOSWriteOffConfiguration().pipe(Q(e=>x(f({},e),{data:e.data.map(n=>x(f({},n),{checked:!1}))})),w(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let o=n.data.findIndex(l=>l.id===e.data.id);if(o!==-1){let l=[...n.data];l[o]=x(f({},l[o]),{checked:!l[o].checked}),this.writeoffList.set(x(f({},n),{data:l}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let o=n.data.map(l=>x(f({},l),{checked:e.checked}));this.writeoffList.set(x(f({},n),{data:o}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off",3,"scrollable"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","1rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,hn,1,1,"ng-template",null,0,u)(3,vn,6,3,"ng-template",null,1,u),i()),n&2&&s("scrollable",!0)},dependencies:[F,T,A,ne,te,we,Me,D,N,L,G,$,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var yn=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function bn(t,r){if(t&1){let e=v();a(0,"div",6)(1,"a",7),m(2,"Cancel"),i(),a(3,"p-button",8),y("onClick",function(){C(e);let o=c(2);return S(o.updateWriteOffConfiguration())}),i()()}}function Pn(t,r){if(t&1&&(a(0,"div",6)(1,"span",16),m(2),i(),a(3,"span",16),m(4),i()()),t&2){let e=r.$implicit;p(2),I("(",e.code,")"),p(2),d(e.name)}}function On(t,r){if(t&1&&(a(0,"div",6)(1,"span",16),m(2),i(),a(3,"span",16),m(4),i()()),t&2){let e=r.$implicit;p(2),I("(",e.code,")"),p(2),d(e.name)}}function In(t,r){if(t&1){let e=v();a(0,"div",12)(1,"div",13)(2,"label",14),m(3),i(),a(4,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,g=c(3);return S(g.updateAccountById(o,l))}),_(5,Pn,5,2,"ng-template",null,2,u)(7,On,5,2,"ng-template",null,3,u),i()()()}if(t&2){let e=r.$implicit,n=c(3);p(3),d(e.name),p(),s("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function En(t,r){if(t&1&&(a(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),P(5,In,9,5,"div",12,b),i()()()()()),t&2){let e=c(2);p(),q(W(2,yn)),p(4),O(e.writeOffForm().form)}}function Tn(t,r){if(t&1&&(a(0,"app-main-panel",5),_(1,bn,4,0,"ng-template",null,0,u)(3,En,7,3,"ng-template",null,1,u),i()),t&2){let e=c();s("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var ut=(()=>{class t{constructor(){this.POSSetupService=h(R),this.route=h(ie),this.writeOffForm=M(null)}ngOnInit(){this.route.paramMap.pipe(Q(e=>e.get("id")),U(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),w(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let o=this.writeOffForm().form,l=x(f({},this.writeOffForm()),{form:o.map((g,V)=>V===n?x(f({},g),{accountID:e}):g)});this.writeOffForm.set(l)}updateWriteOffConfiguration(){let e={form:this.writeOffForm().form};this.POSSetupService.updatePOSWriteOffConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-pos-writeoff-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],[3,"pageTitle","hasMainWrapperPadding"],[1,"d-flex","gap-2"],["routerLink","/pages/pos-setup/writeoff",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"row","row-gap-3"],[1,"col-3"],[1,"d-flex","flex-column"],["for","",1,"d-inline-block","text-truncate",2,"max-width","300px"],["filter","","filterBy","name,code","optionLabel","name","filter","","filterBy","name,code","optionValue","id","placeholder","Select an account",3,"ngModelChange","ngModel","options","virtualScroll","virtualScrollItemSize"],[1,""]],template:function(n,o){n&1&&_(0,Tn,5,2,"app-main-panel",4),n&2&&s("ngIf",o.writeOffForm())},dependencies:[F,T,A,z,Ee,pe,re,K,Y,Z,j,ae,D,N,L,G],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var dt=(()=>{class t{constructor(){this.httpService=h(fe)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ue({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Fn={data:{expenseOptions:[]}},Le=ye(Ie(Fn),Je("POSExpenseOptionStore"),be(t=>({hasCheckedRows:X(()=>t.data().expenseOptions.some(r=>r.checked)),checkedInvoice:X(()=>t.data().expenseOptions.filter(r=>r.checked).map(r=>r.id))})),Oe(t=>{let r=h(dt);return{onRowSelect(n){ee(t,o=>{let l=o.data.expenseOptions.map(g=>g.id===n.id?x(f({},g),{checked:!0}):g);return x(f({},o),{data:x(f({},o.data),{expenseOptions:l})})})},onRowUnselect(n){ee(t,o=>{let l=o.data.expenseOptions.map(g=>g.id===n.id?x(f({},g),{checked:!1}):g);return x(f({},o),{data:x(f({},o.data),{expenseOptions:l})})})},onHeaderCheckboxToggle(n){ee(t,o=>{let l=o.data.expenseOptions.map(g=>x(f({},g),{checked:n}));return x(f({},o),{data:x(f({},o.data),{expenseOptions:l})})})},getExpenseOptions:Te(se(U(()=>r.getExpenseOptions().pipe(Fe({next:n=>{ee(t,o=>x(f({},o),{data:x(f({},o.data),{expenseOptions:n.expenseOptions.map(l=>x(f({},l),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),Pe({onInit:t=>{t.getExpenseOptions()}}));function wn(t,r){t&1&&B(0,"p-button",6)}function Mn(t,r){if(t&1&&_(0,wn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.store.hasCheckedRows())}}function Dn(t,r){t&1&&(a(0,"tr")(1,"th",8),B(2,"p-tableHeaderCheckbox"),i(),a(3,"th"),m(4,"Name"),i(),a(5,"th"),m(6,"Account"),i(),a(7,"th"),m(8,"Description"),i()())}function Rn(t,r){if(t&1&&(a(0,"tr")(1,"td"),B(2,"p-tableCheckbox",9),i(),a(3,"td"),m(4),i(),a(5,"td"),m(6),i(),a(7,"td"),B(8,"p",10),i()()),t&2){let e=r.$implicit;p(2),s("value",e),p(2),d(e.name),p(2),d(e.accountName),p(2),s("innerHTML",e.description,Ve)}}function kn(t,r){if(t&1){let e=v();a(0,"p-panel")(1,"p-table",7),y("onRowSelect",function(o){C(e);let l=c();return S(l.onRowSelect(o))})("onRowUnselect",function(o){C(e);let l=c();return S(l.onRowUnselect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=c();return S(l.onHeaderCheckboxToggle(o))}),_(2,Dn,9,0,"ng-template",null,2,u)(4,Rn,9,4,"ng-template",null,3,u),i()()}if(t&2){let e=c();p(),s("value",e.store.data().expenseOptions)}}var ft=(()=>{class t{constructor(){this.store=h(Le)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){Array.isArray(e.data)?e.data.forEach(n=>{this.store.onRowUnselect(n)}):this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-pos-expense-option"]],features:[de([Le])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Expense Option",3,"scrollable"],["label","Delete","severity","danger","icon","fa-solid fa-trash",4,"ngIf"],["label","Delete","severity","danger","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value"],[2,"width","1rem"],[3,"value"],[3,"innerHTML"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,Mn,1,1,"ng-template",null,0,u)(3,kn,6,1,"ng-template",null,1,u),i()),n&2&&s("scrollable",!0)},dependencies:[F,ne,te,we,Me,$,H,L,G,T,A],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ga=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:at},{path:"outlets",component:pt},{path:"outlets/:id",component:lt},{path:"payments",component:rt},{path:"payments/:id",component:mt},{path:"taxs",component:ct},{path:"writeoff",component:st},{path:"writeoff/:id",component:ut},{path:"expense-option",component:ft}]}];export{Ga as POS_SETUP_ROUTES};