dealposbooks 5.32.1 → 5.32.2

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 (55) hide show
  1. package/{chunk-IU2PF53V.js → chunk-2CSSUKCF.js} +1 -1
  2. package/{chunk-5IH7TCZZ.js → chunk-2QWFLAG5.js} +1 -1
  3. package/{chunk-FXAIEUA7.js → chunk-4EUKDALJ.js} +1 -1
  4. package/{chunk-WIHAMVJN.js → chunk-4W2QF5R5.js} +1 -1
  5. package/{chunk-INXSCWN3.js → chunk-5OYK64TO.js} +1 -1
  6. package/{chunk-EJHIGE6D.js → chunk-6UIJBWT6.js} +1 -1
  7. package/{chunk-ZABJ7AB6.js → chunk-7I5R2CUM.js} +1 -1
  8. package/{chunk-VVHTNAHQ.js → chunk-AGLKA7OG.js} +1 -1
  9. package/{chunk-JK7K55HA.js → chunk-ALYAGR32.js} +1 -1
  10. package/{chunk-UILTGHYP.js → chunk-B4HCPA6E.js} +1 -1
  11. package/{chunk-JRMUK54Y.js → chunk-B7A5CWPE.js} +1 -1
  12. package/{chunk-2KB4NNVP.js → chunk-BDDB5AS7.js} +1 -1
  13. package/{chunk-GORMHEMA.js → chunk-BJ7FEOET.js} +1 -1
  14. package/{chunk-63YXSI43.js → chunk-CACGTOSZ.js} +1 -1
  15. package/{chunk-RZKMT3UP.js → chunk-CJ6UGNBN.js} +1 -1
  16. package/{chunk-MXBBJHYA.js → chunk-CMRVHYI7.js} +1 -1
  17. package/{chunk-2FA22FEI.js → chunk-CR2R5F5T.js} +2 -2
  18. package/{chunk-BGWDOZQM.js → chunk-ERFXO32T.js} +1 -1
  19. package/{chunk-W24I5WPW.js → chunk-EXGI2AG7.js} +1 -1
  20. package/{chunk-7VQQO4OE.js → chunk-FP5LIX5S.js} +1 -1
  21. package/{chunk-Q5XM4DLN.js → chunk-FSEW3LUP.js} +1 -1
  22. package/{chunk-M7MYXWUB.js → chunk-GK2S4TYF.js} +1 -1
  23. package/{chunk-5Y5SFUMY.js → chunk-HICPZPJI.js} +1 -1
  24. package/{chunk-J5GPRN74.js → chunk-HKQCPLSX.js} +1 -1
  25. package/{chunk-WMKKO7RI.js → chunk-ICOTZOJJ.js} +5 -5
  26. package/{chunk-A6AM5FZ4.js → chunk-JZU6YAPX.js} +1 -1
  27. package/{chunk-FI3ZD46J.js → chunk-MEXKKLEE.js} +1 -1
  28. package/{chunk-L725MUU2.js → chunk-NCY25JG4.js} +4 -4
  29. package/{chunk-HO2UBUXM.js → chunk-OQ52MPGS.js} +1 -1
  30. package/{chunk-4ZMRBRIS.js → chunk-QTALSVSB.js} +1 -1
  31. package/{chunk-C6U3U6SW.js → chunk-RPPLUBX5.js} +1 -1
  32. package/{chunk-7EJVMM7V.js → chunk-RQ4G322O.js} +1 -1
  33. package/{chunk-B5JORMF2.js → chunk-SASCD5HU.js} +1 -1
  34. package/{chunk-3LDYJV3L.js → chunk-SUYXXZHZ.js} +1 -1
  35. package/{chunk-TT745CJN.js → chunk-SZ3LQIKH.js} +1 -1
  36. package/{chunk-2BCAGP7R.js → chunk-UEWFM35O.js} +1 -1
  37. package/{chunk-AIZN44RL.js → chunk-UVXRATHG.js} +1 -1
  38. package/{chunk-6DRYMDZA.js → chunk-V5OZ47U6.js} +1 -1
  39. package/{chunk-MVYMAQJE.js → chunk-VJBDOS6M.js} +1 -1
  40. package/{chunk-EHUDHXDQ.js → chunk-VVGZUJP6.js} +1 -1
  41. package/{chunk-ZNIFAG4O.js → chunk-W4GXLPRM.js} +1 -1
  42. package/{chunk-2FU3LWGL.js → chunk-Y5FQDBGQ.js} +1 -1
  43. package/chunk-YBZSBC7H.js +7 -0
  44. package/chunk-YGEMHXDD.js +1 -0
  45. package/{chunk-JLV66YQR.js → chunk-ZA5U4RYI.js} +1 -1
  46. package/chunk-ZGXJEG37.js +1 -0
  47. package/{chunk-VZI3JZPU.js → chunk-ZM5TVQUU.js} +1 -1
  48. package/{chunk-KBHFQM5L.js → chunk-ZSVULSVG.js} +1 -1
  49. package/index.html +2 -2
  50. package/main-RAHFUIZB.js +1 -0
  51. package/package.json +1 -1
  52. package/chunk-6OJOOXYM.js +0 -7
  53. package/chunk-HVAA6I4V.js +0 -1
  54. package/chunk-P3V7Z3A6.js +0 -1
  55. package/main-CTDZ2YSE.js +0 -1
@@ -1 +1 @@
1
- import{a as Qe}from"./chunk-G4XX7EU2.js";import{a as Xe,b as Ze,c as et,d as tt,e as nt,f as ot}from"./chunk-EDCDR4RJ.js";import{a as Te,b as Fe}from"./chunk-O4QM64EH.js";import{d as ne,e as qe,i as we,j as Me,k as oe}from"./chunk-EW3R2HAB.js";import"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import{a as Ae}from"./chunk-XKCLERWG.js";import{a as ee,b as pe}from"./chunk-4LGDNQMZ.js";import"./chunk-PKN47FQE.js";import{a as K,b as J}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{a as Ee,b as Y}from"./chunk-5R3XKSDM.js";import{h as M}from"./chunk-UYC454VQ.js";import"./chunk-C7LM5UCK.js";import{a as z,b as U}from"./chunk-J4XRJAME.js";import{a as te,b as ye,c as Pe,d as be,e as Oe,f as Ie,g as Je}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{o as Ke,w as B,x as V}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{e as H,f as _e,j as re,k as ge,l as xe,m as he,n as Ye,o as Ce,v as Se,x as Z,y as ve}from"./chunk-FMVCTBCQ.js";import{a as fe}from"./chunk-P3V7Z3A6.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{D as ae,F as ze,G,N as k,f as L,j as He,m as w}from"./chunk-B63BKC6F.js";import{Ac as ie,Cb as _,Ga as R,Jc as Ue,Kb as s,Kc as je,Mc as u,Nb as F,Pb as $e,Qb as P,Sb as b,Tb as O,Ub as a,Vb as i,Wb as $,X as j,Yc as X,Z as D,_b as v,ba as ue,bb as Ve,c as se,dc as y,ec as c,gb as p,ha as h,pa as C,qa as S,qc as m,rc as d,s as Q,sc as I,uc as We,wb as T,yc as de,zc as E}from"./chunk-JP6RBSB3.js";import{a as f,b as x}from"./chunk-YQFG5XE2.js";var A=(()=>{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 N=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}(N||{});var it={[N.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"}],[N.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"}],[N.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[N.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[N.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"}],[N.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[N.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[N.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[N.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function gt(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 xt(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 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",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 St(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,ht,7,2,"ng-template",null,2,u)(10,Ct,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 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",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 Pt(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,vt,7,2,"ng-template",null,2,u)(10,yt,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),b(4,St,12,4,"div",14,P),i()(),a(6,"div",12)(7,"div",13),b(8,Pt,12,4,"div",14,P),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 Ot(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"),b(3,xt,2,2,"p-tab",10,P),i(),a(5,"p-tabpanels"),b(6,bt,10,2,"p-tabpanel",10,P),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 It(t,r){if(t&1&&_(0,Ot,8,3,"form",7),t&2){let e=c();s("ngIf",e.posIntegration()&&e.accountForm)}}var at=(()=>{class t{constructor(){this.posConfigService=h(A),this.fb=h(Se),this.tab=R(N.POSGLOBAL_SELL),this.tabs=R(Object.values(N).map(e=>({label:e,value:e}))),this.posIntegration=R(null),this.form=R([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=N}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(D(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:W}of l){let Be=`${g}_${W}`;o.has(Be)||(o.add(Be),n.push({typeID:g,accountID:W||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=T({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,gt,2,0,"ng-template",null,0,u)(3,It,1,1,"ng-template",null,1,u),i())},dependencies:[M,ot,nt,tt,et,Xe,Ze,Ke,J,K,Z,ge,H,_e,w,L,k,V,B,ve,xe,Ce,he],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Et=t=>[t];function Tt(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 Ft(t,r){if(t&1&&(a(0,"tr")(1,"th",6),m(2,"Method"),i()(),a(3,"tr"),b(4,Tt,2,1,"th",7,P),i()),t&2){let e=c(3);p(4),O(e.paymentConfiguration().outlets)}}function wt(t,r){if(t&1&&(a(0,"td"),m(1),i()),t&2){let e=r.$implicit;p(),d(e.accountName)}}function Mt(t,r){if(t&1&&(a(0,"tr")(1,"td",8)(2,"a",9),m(3),i()(),b(4,wt,2,1,"td",null,P),i()),t&2){let e=r.$implicit;p(2),s("routerLink",ie(2,Et,e.id)),p(),d(e.name),p(),O(e.accounts)}}function Dt(t,r){if(t&1&&(a(0,"p-table",5),_(1,Ft,6,0,"ng-template",null,1,u)(3,Mt,6,4,"ng-template",null,2,u),i()),t&2){let e=c(2);s("scrollable",!0)("scrollHeight","calc(100vh - 70px)")("value",e.paymentConfiguration().payment)}}function Rt(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,Dt,5,3,"ng-template",null,0,u),i()}t&2&&s("isSearchableInput",!0)}var rt=(()=>{class t{constructor(){this.POSSetupService=h(A),this.paymentConfiguration=R(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration({}).pipe(D(e=>{this.paymentConfiguration.set(e)})).subscribe()}onSearch(e){this.POSSetupService.fetchPOSPaymentConfiguration({Search:e}).pipe(D(n=>{this.paymentConfiguration.set(n)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",3,"isSearchableInput","search",4,"ngIf"],["pageTitle","Payment Method Accounting",3,"search","isSearchableInput"],[3,"scrollable","scrollHeight","value"],["rowspan","3",2,"min-width","300px"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&_(0,Rt,3,1,"app-main-panel",3),n&2&&s("ngIf",o.paymentConfiguration())},dependencies:[M,oe,ne,qe,w,L,k,G],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var kt={data:{listOutletAccount:[],listCOAType:[],pageNumber:1,pageSize:20,totalCount:0,totalPages:0},filter:{PageNumber:1,PageSize:20,Search:""}},Le=ye(Ie(kt),Pe(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(A);return{updateFilter:n=>{te(t,o=>x(f({},o),{filter:f(f({},o.filter),n)}))},getPOSOutlets:Te(se(j(n=>r.fetchPOSOutletConfiguration(n).pipe(Fe({next:o=>{te(t,l=>x(f({},l),{data:o}))},error:o=>{console.error("Error fetching POS outlets:",o)}})))))}}),be(t=>({onInit:()=>{t.getPOSOutlets(t.filter)}})));var At=()=>({height:"calc(100vh - 70px)"}),Nt=t=>[t];function Lt(t,r){if(t&1&&(a(0,"th"),m(1),i()),t&2){let e=r.$implicit;p(),d(e.value)}}function Gt(t,r){if(t&1&&(a(0,"tr")(1,"th"),m(2,"Name"),i(),b(3,Lt,2,1,"th",null,P),i()),t&2){let e=c(2);p(3),O(e.store.data().listCOAType)}}function Bt(t,r){if(t&1&&(a(0,"td"),m(1),i()),t&2){let e=r.$implicit;p(),d(e)}}function Vt(t,r){if(t&1&&(a(0,"tr")(1,"td")(2,"a",7),m(3),i()(),b(4,Bt,2,1,"td",null,P),i()),t&2){let e=r.$implicit;p(2),s("routerLink",ie(2,Nt,e.OutletID)),p(),I(" ",e.OutletName,""),p(),O(e.Accounts)}}function $t(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 Wt(t,r){t&1&&(a(0,"tr")(1,"td",8)(2,"span"),m(3," No journal entries found. "),i()()())}function Ut(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,Gt,5,0,"ng-template",null,1,u)(4,Vt,6,4,"ng-template",null,2,u)(6,$t,1,3,"ng-template",null,3,u)(8,Wt,4,0,"ng-template",null,4,u),i()()}if(t&2){let e=c();F(E(11,At)),p(),s("scrollable",!0)("scrollHeight","calc(100vh - 100px)")("value",e.store.data().listOutletAccount)("paginator",!0)("rows",e.store.filter().PageSize)("lazy",!0)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("totalRecords",e.store.data().totalCount)}}var pt=(()=>{class t{constructor(){this.store=h(Le)}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=T({type:t,selectors:[["app-pos-outlet"]],features:[de([Le])],decls:3,vars:1,consts:[["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Outlet Account",3,"search","isSearchableInput"],["styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","scrollable","scrollHeight","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(W){return C(l),S(o.onSearch(W))}),_(1,Ut,10,12,"ng-template",null,0,u),i()}n&2&&s("isSearchableInput",!0)},dependencies:[M,w,Y,oe,ne,k,G,U,z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var jt=()=>({height:"calc(100vh - 100px)"}),Ht=()=>({height:"calc(100vh - 150px)"});function zt(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 Yt(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 Kt(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 Jt(t,r){if(t&1&&(a(0,"div",12)(1,"span",14),m(2),i(),a(3,"p-select",15),_(4,Yt,7,2,"ng-template",null,2,u)(6,Kt,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 qt(t,r){t&1&&$(0,"hr")}function Qt(t,r){if(t&1&&(a(0,"div",9)(1,"h3",10),m(2),Ue(3,"titlecase"),i(),a(4,"div",11),b(5,Jt,8,3,"div",12,P),i()(),_(7,qt,1,0,"hr",13)),t&2){let e,n=r.$implicit,o=r.$index,l=r.$index,g=r.$count,W=c(2);s("formGroupName",o),p(2),I(" ",je(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),O(W.getAccountsFormArray(l).controls),p(2),s("ngIf",l!==g-1)}}function Xt(t,r){if(t&1&&(a(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),b(4,Qt,8,5,null,null,P),i()()()()),t&2){let e=c();F(E(5,jt)),p(),F(E(6,Ht)),p(),s("formGroup",e.accountsForm),p(2),O(e.accountGroupsArray.controls)}}var lt=(()=>{class t{constructor(){this.route=h(ae),this.POSSetupService=h(A),this.outletForm=R(null),this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2],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")),j(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),D(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=T({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,zt,3,0,"ng-template",null,0,u)(3,Xt,6,7,"ng-template",null,1,u),i()),n&2&&s("pageTitle","Edit "+o.outletName)("hasMainWrapperPadding",!0)},dependencies:[M,w,L,He,Y,ve,ge,H,_e,xe,Ce,he,Ye,J,K,U,z,ee,V,B,k,G],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var en=()=>({height:"calc(100vh - 100px)"}),tn=()=>({width:"100%",height:"calc(100vh - 150px)"}),nn=()=>({width:"100%"});function on(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 an(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 rn(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 pn(t,r){if(t&1){let e=v();a(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),m(4),i()(),$(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,an,7,2,"ng-template",null,2,u)(10,rn,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),F(E(7,nn)),s("ngModel",o.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.paymentForm().options.chartOfAccount)}}function ln(t,r){if(t&1&&(a(0,"p-card")(1,"p-scrollpanel")(2,"div",8),b(3,pn,12,8,"div",9,P),i()()()),t&2){let e=c(3);F(E(4,en)),p(),F(E(5,tn)),p(2),O(e.paymentForm().form.accounts)}}function mn(t,r){if(t&1&&(a(0,"app-main-panel",4),_(1,on,3,0,"ng-template",null,0,u)(3,ln,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 cn(t,r){if(t&1&&_(0,mn,5,2,"app-main-panel",5),t&2){let e=c();s("ngIf",e.paymentForm())}}var ct=(()=>{class t{constructor(){this.route=h(ae),this.POSSetupService=h(A),this.paymentForm=R(null),this.router=h(ze)}ngOnInit(){this.route.paramMap.pipe(Q(e=>+e.get("id")),j(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),D(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,W)=>W===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"),D(()=>{this.router.navigate(["/pages/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({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,cn,1,1,"app-main-panel",4),n&2&&$e(o.paymentForm()?0:-1)},dependencies:[Y,Ee,M,w,L,pe,ee,J,K,Z,H,re,k,G,V,B,U],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var sn=()=>({height:"calc(100vh - 70px)"}),un=()=>({width:"100%",height:"calc(100vh - 100px)"});function dn(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 fn(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 _n(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 gn(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,fn,7,2,"ng-template",null,2,u)(7,_n,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 xn(t,r){if(t&1&&(a(0,"p-panel")(1,"p-scroll-panel")(2,"div",8)(3,"div",9)(4,"div",10),b(5,gn,9,3,"div",11,P),i()()()()()),t&2){let e=c();F(E(4,sn)),p(),F(E(5,un)),p(4),O(e.taxForm().form)}}var st=(()=>{class t{constructor(){this.POSSetupService=h(A),this.taxForm=R(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(D(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let o=this.taxForm().form,l=x(f({},this.taxForm()),{form:o.map((g,W)=>W===n?x(f({},g),{accountID:e}):g)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(D(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-tax"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup"],[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,dn,4,0,"ng-template",null,0,u)(3,xn,7,6,"ng-template",null,1,u),i())},dependencies:[M,Y,w,J,K,pe,ee,Z,H,re,k,G,V,B,U,z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var hn=()=>({height:"calc(100vh - 70px)"}),Cn=()=>({"min-width":"50rem"}),Sn=t=>[t];function vn(t,r){t&1&&$(0,"p-button",6)}function yn(t,r){if(t&1&&_(0,vn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.hasCheckedItems())}}function Pn(t,r){t&1&&(a(0,"tr")(1,"th",9),$(2,"p-tableHeaderCheckbox"),i(),a(3,"th"),m(4,"Name"),i(),a(5,"th"),m(6,"Description"),i()())}function bn(t,r){if(t&1&&(a(0,"tr")(1,"td"),$(2,"p-tableCheckbox",10),i(),a(3,"td")(4,"a",11),m(5),i()(),a(6,"td"),m(7),i()()),t&2){let e=r.$implicit;p(2),s("value",e),p(2),s("routerLink",ie(4,Sn,e.id)),p(),d(e.name),p(2),d(e.description)}}function On(t,r){if(t&1){let e=v();a(0,"p-panel")(1,"p-table",8),y("onRowSelect",function(o){C(e);let l=c(2);return S(l.onRowSelect(o))})("onRowUnselect",function(o){C(e);let l=c(2);return S(l.onRowSelect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=c(2);return S(l.onSelectAll(o))}),_(2,Pn,7,0,"ng-template",null,2,u)(4,bn,8,6,"ng-template",null,3,u),i()()}if(t&2){let e=c(2);F(E(4,hn)),p(),s("value",e.writeoffList().data)("tableStyle",E(5,Cn))}}function In(t,r){if(t&1&&_(0,On,6,6,"p-panel",7),t&2){let e=c();s("ngIf",e.writeoffList())}}var ut=(()=>{class t{constructor(){this.POSSetupService=h(A),this.writeoffList=R(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}))})),D(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=T({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],[3,"style",4,"ngIf"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","4rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,yn,1,1,"ng-template",null,0,u)(3,In,1,1,"ng-template",null,1,u),i())},dependencies:[M,w,L,oe,ne,we,Me,k,G,V,B,U,z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var En=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function Tn(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 Fn(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 wn(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 Mn(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,Fn,5,2,"ng-template",null,2,u)(7,wn,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 Dn(t,r){if(t&1&&(a(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),b(5,Mn,9,5,"div",12,P),i()()()()()),t&2){let e=c(2);p(),F(E(2,En)),p(4),O(e.writeOffForm().form)}}function Rn(t,r){if(t&1&&(a(0,"app-main-panel",5),_(1,Tn,4,0,"ng-template",null,0,u)(3,Dn,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 dt=(()=>{class t{constructor(){this.POSSetupService=h(A),this.route=h(ae),this.writeOffForm=R(null)}ngOnInit(){this.route.paramMap.pipe(Q(e=>e.get("id")),j(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),D(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let o=this.writeOffForm().form,l=x(f({},this.writeOffForm()),{form:o.map((g,W)=>W===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=T({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,Rn,5,2,"app-main-panel",4),n&2&&s("ngIf",o.writeOffForm())},dependencies:[M,w,L,Y,Ee,pe,ee,J,K,Z,H,re,k,G,V,B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var ft=(()=>{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 kn={data:{expenseOptions:[]}},Ge=ye(Ie(kn),Je("POSExpenseOptionStore"),Pe(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(ft);return{onRowSelect(n){te(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){te(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){te(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(j(()=>r.getExpenseOptions().pipe(Fe({next:n=>{te(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)}})))))}}),be({onInit:t=>{t.getExpenseOptions()}}));var An=()=>({height:"calc(100vh - 70px)"});function Nn(t,r){t&1&&$(0,"p-button",6)}function Ln(t,r){if(t&1&&_(0,Nn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.store.hasCheckedRows())}}function Gn(t,r){t&1&&(a(0,"tr")(1,"th",8),$(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 Bn(t,r){if(t&1&&(a(0,"tr")(1,"td"),$(2,"p-tableCheckbox",9),i(),a(3,"td"),m(4),i(),a(5,"td"),m(6),i(),a(7,"td"),$(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 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.onRowUnselect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=c();return S(l.onHeaderCheckboxToggle(o))}),_(2,Gn,9,0,"ng-template",null,2,u)(4,Bn,9,4,"ng-template",null,3,u),i()()}if(t&2){let e=c();F(E(3,An)),p(),s("value",e.store.data().expenseOptions)}}var _t=(()=>{class t{constructor(){this.store=h(Ge)}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=T({type:t,selectors:[["app-pos-expense-option"]],features:[de([Ge])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Expense Option"],["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","4rem"],[3,"value"],[3,"innerHTML"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,Ln,1,1,"ng-template",null,0,u)(3,Vn,6,4,"ng-template",null,1,u),i())},dependencies:[M,oe,ne,we,Me,U,z,V,B,w,L],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ua=[{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:ct},{path:"taxs",component:st},{path:"writeoff",component:ut},{path:"writeoff/:id",component:dt},{path:"expense-option",component:_t}]}];export{Ua as POS_SETUP_ROUTES};
1
+ import{a as Qe}from"./chunk-G4XX7EU2.js";import{a as Xe,b as Ze,c as et,d as tt,e as nt,f as ot}from"./chunk-EDCDR4RJ.js";import{a as Te,b as Fe}from"./chunk-O4QM64EH.js";import{d as ne,e as qe,i as we,j as Me,k as oe}from"./chunk-EW3R2HAB.js";import"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import{a as Ae}from"./chunk-XKCLERWG.js";import{a as ee,b as pe}from"./chunk-4LGDNQMZ.js";import"./chunk-PKN47FQE.js";import{a as K,b as J}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{a as Ee,b as Y}from"./chunk-5R3XKSDM.js";import{h as M}from"./chunk-UYC454VQ.js";import"./chunk-C7LM5UCK.js";import{a as z,b as U}from"./chunk-J4XRJAME.js";import{a as te,b as ye,c as Pe,d as be,e as Oe,f as Ie,g as Je}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{o as Ke,w as B,x as V}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{e as H,f as _e,j as re,k as ge,l as xe,m as he,n as Ye,o as Ce,v as Se,x as Z,y as ve}from"./chunk-FMVCTBCQ.js";import{a as fe}from"./chunk-ZGXJEG37.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{D as ae,F as ze,G,N as k,f as L,j as He,m as w}from"./chunk-B63BKC6F.js";import{Ac as ie,Cb as _,Ga as R,Jc as Ue,Kb as s,Kc as je,Mc as u,Nb as F,Pb as $e,Qb as P,Sb as b,Tb as O,Ub as a,Vb as i,Wb as $,X as j,Yc as X,Z as D,_b as v,ba as ue,bb as Ve,c as se,dc as y,ec as c,gb as p,ha as h,pa as C,qa as S,qc as m,rc as d,s as Q,sc as I,uc as We,wb as T,yc as de,zc as E}from"./chunk-JP6RBSB3.js";import{a as f,b as x}from"./chunk-YQFG5XE2.js";var A=(()=>{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 N=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}(N||{});var it={[N.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"}],[N.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"}],[N.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[N.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[N.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"}],[N.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[N.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[N.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[N.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function gt(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 xt(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 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",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 St(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,ht,7,2,"ng-template",null,2,u)(10,Ct,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 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",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 Pt(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,vt,7,2,"ng-template",null,2,u)(10,yt,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),b(4,St,12,4,"div",14,P),i()(),a(6,"div",12)(7,"div",13),b(8,Pt,12,4,"div",14,P),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 Ot(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"),b(3,xt,2,2,"p-tab",10,P),i(),a(5,"p-tabpanels"),b(6,bt,10,2,"p-tabpanel",10,P),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 It(t,r){if(t&1&&_(0,Ot,8,3,"form",7),t&2){let e=c();s("ngIf",e.posIntegration()&&e.accountForm)}}var at=(()=>{class t{constructor(){this.posConfigService=h(A),this.fb=h(Se),this.tab=R(N.POSGLOBAL_SELL),this.tabs=R(Object.values(N).map(e=>({label:e,value:e}))),this.posIntegration=R(null),this.form=R([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=N}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(D(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:W}of l){let Be=`${g}_${W}`;o.has(Be)||(o.add(Be),n.push({typeID:g,accountID:W||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=T({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,gt,2,0,"ng-template",null,0,u)(3,It,1,1,"ng-template",null,1,u),i())},dependencies:[M,ot,nt,tt,et,Xe,Ze,Ke,J,K,Z,ge,H,_e,w,L,k,V,B,ve,xe,Ce,he],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Et=t=>[t];function Tt(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 Ft(t,r){if(t&1&&(a(0,"tr")(1,"th",6),m(2,"Method"),i()(),a(3,"tr"),b(4,Tt,2,1,"th",7,P),i()),t&2){let e=c(3);p(4),O(e.paymentConfiguration().outlets)}}function wt(t,r){if(t&1&&(a(0,"td"),m(1),i()),t&2){let e=r.$implicit;p(),d(e.accountName)}}function Mt(t,r){if(t&1&&(a(0,"tr")(1,"td",8)(2,"a",9),m(3),i()(),b(4,wt,2,1,"td",null,P),i()),t&2){let e=r.$implicit;p(2),s("routerLink",ie(2,Et,e.id)),p(),d(e.name),p(),O(e.accounts)}}function Dt(t,r){if(t&1&&(a(0,"p-table",5),_(1,Ft,6,0,"ng-template",null,1,u)(3,Mt,6,4,"ng-template",null,2,u),i()),t&2){let e=c(2);s("scrollable",!0)("scrollHeight","calc(100vh - 70px)")("value",e.paymentConfiguration().payment)}}function Rt(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,Dt,5,3,"ng-template",null,0,u),i()}t&2&&s("isSearchableInput",!0)}var rt=(()=>{class t{constructor(){this.POSSetupService=h(A),this.paymentConfiguration=R(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration({}).pipe(D(e=>{this.paymentConfiguration.set(e)})).subscribe()}onSearch(e){this.POSSetupService.fetchPOSPaymentConfiguration({Search:e}).pipe(D(n=>{this.paymentConfiguration.set(n)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",3,"isSearchableInput","search",4,"ngIf"],["pageTitle","Payment Method Accounting",3,"search","isSearchableInput"],[3,"scrollable","scrollHeight","value"],["rowspan","3",2,"min-width","300px"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&_(0,Rt,3,1,"app-main-panel",3),n&2&&s("ngIf",o.paymentConfiguration())},dependencies:[M,oe,ne,qe,w,L,k,G],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var kt={data:{listOutletAccount:[],listCOAType:[],pageNumber:1,pageSize:20,totalCount:0,totalPages:0},filter:{PageNumber:1,PageSize:20,Search:""}},Le=ye(Ie(kt),Pe(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(A);return{updateFilter:n=>{te(t,o=>x(f({},o),{filter:f(f({},o.filter),n)}))},getPOSOutlets:Te(se(j(n=>r.fetchPOSOutletConfiguration(n).pipe(Fe({next:o=>{te(t,l=>x(f({},l),{data:o}))},error:o=>{console.error("Error fetching POS outlets:",o)}})))))}}),be(t=>({onInit:()=>{t.getPOSOutlets(t.filter)}})));var At=()=>({height:"calc(100vh - 70px)"}),Nt=t=>[t];function Lt(t,r){if(t&1&&(a(0,"th"),m(1),i()),t&2){let e=r.$implicit;p(),d(e.value)}}function Gt(t,r){if(t&1&&(a(0,"tr")(1,"th"),m(2,"Name"),i(),b(3,Lt,2,1,"th",null,P),i()),t&2){let e=c(2);p(3),O(e.store.data().listCOAType)}}function Bt(t,r){if(t&1&&(a(0,"td"),m(1),i()),t&2){let e=r.$implicit;p(),d(e)}}function Vt(t,r){if(t&1&&(a(0,"tr")(1,"td")(2,"a",7),m(3),i()(),b(4,Bt,2,1,"td",null,P),i()),t&2){let e=r.$implicit;p(2),s("routerLink",ie(2,Nt,e.OutletID)),p(),I(" ",e.OutletName,""),p(),O(e.Accounts)}}function $t(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 Wt(t,r){t&1&&(a(0,"tr")(1,"td",8)(2,"span"),m(3," No journal entries found. "),i()()())}function Ut(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,Gt,5,0,"ng-template",null,1,u)(4,Vt,6,4,"ng-template",null,2,u)(6,$t,1,3,"ng-template",null,3,u)(8,Wt,4,0,"ng-template",null,4,u),i()()}if(t&2){let e=c();F(E(11,At)),p(),s("scrollable",!0)("scrollHeight","calc(100vh - 100px)")("value",e.store.data().listOutletAccount)("paginator",!0)("rows",e.store.filter().PageSize)("lazy",!0)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("totalRecords",e.store.data().totalCount)}}var pt=(()=>{class t{constructor(){this.store=h(Le)}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=T({type:t,selectors:[["app-pos-outlet"]],features:[de([Le])],decls:3,vars:1,consts:[["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Outlet Account",3,"search","isSearchableInput"],["styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","scrollable","scrollHeight","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(W){return C(l),S(o.onSearch(W))}),_(1,Ut,10,12,"ng-template",null,0,u),i()}n&2&&s("isSearchableInput",!0)},dependencies:[M,w,Y,oe,ne,k,G,U,z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var jt=()=>({height:"calc(100vh - 100px)"}),Ht=()=>({height:"calc(100vh - 150px)"});function zt(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 Yt(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 Kt(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 Jt(t,r){if(t&1&&(a(0,"div",12)(1,"span",14),m(2),i(),a(3,"p-select",15),_(4,Yt,7,2,"ng-template",null,2,u)(6,Kt,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 qt(t,r){t&1&&$(0,"hr")}function Qt(t,r){if(t&1&&(a(0,"div",9)(1,"h3",10),m(2),Ue(3,"titlecase"),i(),a(4,"div",11),b(5,Jt,8,3,"div",12,P),i()(),_(7,qt,1,0,"hr",13)),t&2){let e,n=r.$implicit,o=r.$index,l=r.$index,g=r.$count,W=c(2);s("formGroupName",o),p(2),I(" ",je(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),O(W.getAccountsFormArray(l).controls),p(2),s("ngIf",l!==g-1)}}function Xt(t,r){if(t&1&&(a(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),b(4,Qt,8,5,null,null,P),i()()()()),t&2){let e=c();F(E(5,jt)),p(),F(E(6,Ht)),p(),s("formGroup",e.accountsForm),p(2),O(e.accountGroupsArray.controls)}}var lt=(()=>{class t{constructor(){this.route=h(ae),this.POSSetupService=h(A),this.outletForm=R(null),this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2],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")),j(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),D(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=T({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,zt,3,0,"ng-template",null,0,u)(3,Xt,6,7,"ng-template",null,1,u),i()),n&2&&s("pageTitle","Edit "+o.outletName)("hasMainWrapperPadding",!0)},dependencies:[M,w,L,He,Y,ve,ge,H,_e,xe,Ce,he,Ye,J,K,U,z,ee,V,B,k,G],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var en=()=>({height:"calc(100vh - 100px)"}),tn=()=>({width:"100%",height:"calc(100vh - 150px)"}),nn=()=>({width:"100%"});function on(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 an(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 rn(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 pn(t,r){if(t&1){let e=v();a(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),m(4),i()(),$(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,an,7,2,"ng-template",null,2,u)(10,rn,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),F(E(7,nn)),s("ngModel",o.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.paymentForm().options.chartOfAccount)}}function ln(t,r){if(t&1&&(a(0,"p-card")(1,"p-scrollpanel")(2,"div",8),b(3,pn,12,8,"div",9,P),i()()()),t&2){let e=c(3);F(E(4,en)),p(),F(E(5,tn)),p(2),O(e.paymentForm().form.accounts)}}function mn(t,r){if(t&1&&(a(0,"app-main-panel",4),_(1,on,3,0,"ng-template",null,0,u)(3,ln,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 cn(t,r){if(t&1&&_(0,mn,5,2,"app-main-panel",5),t&2){let e=c();s("ngIf",e.paymentForm())}}var ct=(()=>{class t{constructor(){this.route=h(ae),this.POSSetupService=h(A),this.paymentForm=R(null),this.router=h(ze)}ngOnInit(){this.route.paramMap.pipe(Q(e=>+e.get("id")),j(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),D(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,W)=>W===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"),D(()=>{this.router.navigate(["/pages/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({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,cn,1,1,"app-main-panel",4),n&2&&$e(o.paymentForm()?0:-1)},dependencies:[Y,Ee,M,w,L,pe,ee,J,K,Z,H,re,k,G,V,B,U],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var sn=()=>({height:"calc(100vh - 70px)"}),un=()=>({width:"100%",height:"calc(100vh - 100px)"});function dn(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 fn(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 _n(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 gn(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,fn,7,2,"ng-template",null,2,u)(7,_n,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 xn(t,r){if(t&1&&(a(0,"p-panel")(1,"p-scroll-panel")(2,"div",8)(3,"div",9)(4,"div",10),b(5,gn,9,3,"div",11,P),i()()()()()),t&2){let e=c();F(E(4,sn)),p(),F(E(5,un)),p(4),O(e.taxForm().form)}}var st=(()=>{class t{constructor(){this.POSSetupService=h(A),this.taxForm=R(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(D(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let o=this.taxForm().form,l=x(f({},this.taxForm()),{form:o.map((g,W)=>W===n?x(f({},g),{accountID:e}):g)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(D(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-tax"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup"],[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,dn,4,0,"ng-template",null,0,u)(3,xn,7,6,"ng-template",null,1,u),i())},dependencies:[M,Y,w,J,K,pe,ee,Z,H,re,k,G,V,B,U,z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var hn=()=>({height:"calc(100vh - 70px)"}),Cn=()=>({"min-width":"50rem"}),Sn=t=>[t];function vn(t,r){t&1&&$(0,"p-button",6)}function yn(t,r){if(t&1&&_(0,vn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.hasCheckedItems())}}function Pn(t,r){t&1&&(a(0,"tr")(1,"th",9),$(2,"p-tableHeaderCheckbox"),i(),a(3,"th"),m(4,"Name"),i(),a(5,"th"),m(6,"Description"),i()())}function bn(t,r){if(t&1&&(a(0,"tr")(1,"td"),$(2,"p-tableCheckbox",10),i(),a(3,"td")(4,"a",11),m(5),i()(),a(6,"td"),m(7),i()()),t&2){let e=r.$implicit;p(2),s("value",e),p(2),s("routerLink",ie(4,Sn,e.id)),p(),d(e.name),p(2),d(e.description)}}function On(t,r){if(t&1){let e=v();a(0,"p-panel")(1,"p-table",8),y("onRowSelect",function(o){C(e);let l=c(2);return S(l.onRowSelect(o))})("onRowUnselect",function(o){C(e);let l=c(2);return S(l.onRowSelect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=c(2);return S(l.onSelectAll(o))}),_(2,Pn,7,0,"ng-template",null,2,u)(4,bn,8,6,"ng-template",null,3,u),i()()}if(t&2){let e=c(2);F(E(4,hn)),p(),s("value",e.writeoffList().data)("tableStyle",E(5,Cn))}}function In(t,r){if(t&1&&_(0,On,6,6,"p-panel",7),t&2){let e=c();s("ngIf",e.writeoffList())}}var ut=(()=>{class t{constructor(){this.POSSetupService=h(A),this.writeoffList=R(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}))})),D(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=T({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],[3,"style",4,"ngIf"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","4rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,yn,1,1,"ng-template",null,0,u)(3,In,1,1,"ng-template",null,1,u),i())},dependencies:[M,w,L,oe,ne,we,Me,k,G,V,B,U,z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var En=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function Tn(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 Fn(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 wn(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 Mn(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,Fn,5,2,"ng-template",null,2,u)(7,wn,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 Dn(t,r){if(t&1&&(a(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),b(5,Mn,9,5,"div",12,P),i()()()()()),t&2){let e=c(2);p(),F(E(2,En)),p(4),O(e.writeOffForm().form)}}function Rn(t,r){if(t&1&&(a(0,"app-main-panel",5),_(1,Tn,4,0,"ng-template",null,0,u)(3,Dn,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 dt=(()=>{class t{constructor(){this.POSSetupService=h(A),this.route=h(ae),this.writeOffForm=R(null)}ngOnInit(){this.route.paramMap.pipe(Q(e=>e.get("id")),j(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),D(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let o=this.writeOffForm().form,l=x(f({},this.writeOffForm()),{form:o.map((g,W)=>W===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=T({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,Rn,5,2,"app-main-panel",4),n&2&&s("ngIf",o.writeOffForm())},dependencies:[M,w,L,Y,Ee,pe,ee,J,K,Z,H,re,k,G,V,B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var ft=(()=>{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 kn={data:{expenseOptions:[]}},Ge=ye(Ie(kn),Je("POSExpenseOptionStore"),Pe(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(ft);return{onRowSelect(n){te(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){te(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){te(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(j(()=>r.getExpenseOptions().pipe(Fe({next:n=>{te(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)}})))))}}),be({onInit:t=>{t.getExpenseOptions()}}));var An=()=>({height:"calc(100vh - 70px)"});function Nn(t,r){t&1&&$(0,"p-button",6)}function Ln(t,r){if(t&1&&_(0,Nn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.store.hasCheckedRows())}}function Gn(t,r){t&1&&(a(0,"tr")(1,"th",8),$(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 Bn(t,r){if(t&1&&(a(0,"tr")(1,"td"),$(2,"p-tableCheckbox",9),i(),a(3,"td"),m(4),i(),a(5,"td"),m(6),i(),a(7,"td"),$(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 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.onRowUnselect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=c();return S(l.onHeaderCheckboxToggle(o))}),_(2,Gn,9,0,"ng-template",null,2,u)(4,Bn,9,4,"ng-template",null,3,u),i()()}if(t&2){let e=c();F(E(3,An)),p(),s("value",e.store.data().expenseOptions)}}var _t=(()=>{class t{constructor(){this.store=h(Ge)}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=T({type:t,selectors:[["app-pos-expense-option"]],features:[de([Ge])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Expense Option"],["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","4rem"],[3,"value"],[3,"innerHTML"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,Ln,1,1,"ng-template",null,0,u)(3,Vn,6,4,"ng-template",null,1,u),i())},dependencies:[M,oe,ne,we,Me,U,z,V,B,w,L],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ua=[{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:ct},{path:"taxs",component:st},{path:"writeoff",component:ut},{path:"writeoff/:id",component:dt},{path:"expense-option",component:_t}]}];export{Ua as POS_SETUP_ROUTES};
@@ -1 +1 @@
1
- import{a as v,b as A}from"./chunk-O4QM64EH.js";import{d as V,k as W}from"./chunk-EW3R2HAB.js";import"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import"./chunk-PKN47FQE.js";import"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{b as Q}from"./chunk-5R3XKSDM.js";import{h as J}from"./chunk-UYC454VQ.js";import"./chunk-C7LM5UCK.js";import{a as N,b as j}from"./chunk-J4XRJAME.js";import{a as S,b as G,c as K,d as U,e as q,f as $,g as z}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{x as H}from"./chunk-FMVCTBCQ.js";import{a as O}from"./chunk-P3V7Z3A6.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{G as R,N as F,l as I,m as L}from"./chunk-B63BKC6F.js";import{Ac as x,Cb as g,Jc as k,Kb as m,Kc as B,Mc as c,Nb as b,Ub as n,Vb as a,Wb as M,X as u,Yc as D,ba as y,c as f,ec as C,gb as l,ha as p,qc as i,rc as s,sc as T,wb as P,yc as w,zc as _}from"./chunk-JP6RBSB3.js";import{a as d,b as h}from"./chunk-YQFG5XE2.js";var X=(()=>{class t{constructor(){this.httpService=p(O)}fetchCashAndBankLoader(){return this.httpService.get("","api/CashAndBankLoader/GetCashAndBank")}fetchCashAndBankData(){return this.httpService.get("","api/CashAndBank/GetCashAndBank")}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var et={data:[],filter:[],options:{hasGeneralLedger:!1}},E=G(z("cash-bank-store"),$(et),K(t=>({totalBalance:D(()=>t.data().reduce((o,e)=>o+e.balance,0))})),q(t=>{let o=p(X);return{loadCashAndBankLoader:v(f(u(()=>o.fetchCashAndBankLoader().pipe(A({next:e=>{console.log("response",e),S(t,r=>h(d({},r),{options:e.options}))},error:e=>{console.log("error",e)}}))))),loadCashAndBankData:v(f(u(()=>o.fetchCashAndBankData().pipe(A({next:e=>{console.log("response",e),S(t,r=>h(d({},r),{data:e}))},error:e=>{console.log("error",e)}})))))}}),U({onInit(t){t.loadCashAndBankLoader(),t.loadCashAndBankData()}}));var nt=["class","page"],at=()=>({height:"calc(100vh - 70px)"}),ot=t=>[t],it=()=>["/pages/report/general-ledger"],rt=t=>({id:t});function lt(t,o){t&1&&(n(0,"tr")(1,"th"),i(2,"Code"),a(),n(3,"th"),i(4,"Name"),a(),n(5,"th",7),i(6,"Balance"),a()())}function pt(t,o){if(t&1&&(n(0,"tr")(1,"td"),i(2),a(),n(3,"td")(4,"a",8),i(5),a()(),n(6,"td",7)(7,"a",9),i(8),k(9,"number"),a()()()),t&2){let e=o.$implicit;l(2),s(e.code),l(2),m("routerLink",x(8,ot,"/pages/chart-of-account/account/"+e.accountID)),l(),s(e.name),l(2),m("routerLink",_(10,it))("queryParams",x(11,rt,e.accountID)),l(),s(B(9,6,e.balance))}}function ct(t,o){if(t&1&&(n(0,"tr"),M(1,"td"),n(2,"td",10),i(3,"Total"),a(),n(4,"td",11),i(5),k(6,"number"),a()()),t&2){let e=C(2);l(5),T(" ",B(6,1,e.store.totalBalance())," ")}}function mt(t,o){t&1&&(n(0,"tr")(1,"td",12)(2,"span"),i(3,"No records found."),a()()())}function st(t,o){if(t&1&&(n(0,"p-panel")(1,"p-table",6),g(2,lt,7,0,"ng-template",null,1,c)(4,pt,10,13,"ng-template",null,2,c)(6,ct,7,3,"ng-template",null,3,c)(8,mt,4,0,"ng-template",null,4,c),a()()),t&2){let e=C();b(_(4,at)),l(),m("value",e.store.data())("scrollHeight","calc(100vh - 100px)")}}var Y=(()=>{class t{constructor(){this.store=p(E),this.routeInfo=Z}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-cash-bank",8,"page"]],features:[w([E])],attrs:nt,decls:3,vars:0,consts:[["content",""],["header",""],["body",""],["footer",""],["emptymessage",""],["pageTitle","Cash and Bank"],["scrollable","",3,"value","scrollHeight"],[1,"text-end"],[1,"link","link-primary",3,"routerLink"],[1,"link","link-primary",3,"routerLink","queryParams"],[1,"fw-bold"],[1,"text-end","fw-bold"],["colspan","3"]],template:function(r,dt){r&1&&(n(0,"app-main-panel",5),g(1,st,10,5,"ng-template",null,0,c),a())},dependencies:[L,I,J,H,W,V,Q,F,R,j,N],styles:[".card[_ngcontent-%COMP%]{height:calc(100vh - 120px)}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:inherit;overflow-y:auto}"],changeDetection:0})}}return t})();var qt=[{path:"",component:Y,children:[]}],Z={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[]};export{qt as CASH_BANK_ROUTES,Z as CASH_BANK_ROUTE_PAGE};
1
+ import{a as v,b as A}from"./chunk-O4QM64EH.js";import{d as V,k as W}from"./chunk-EW3R2HAB.js";import"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import"./chunk-PKN47FQE.js";import"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{b as Q}from"./chunk-5R3XKSDM.js";import{h as J}from"./chunk-UYC454VQ.js";import"./chunk-C7LM5UCK.js";import{a as N,b as j}from"./chunk-J4XRJAME.js";import{a as S,b as G,c as K,d as U,e as q,f as $,g as z}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{x as H}from"./chunk-FMVCTBCQ.js";import{a as O}from"./chunk-ZGXJEG37.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{G as R,N as F,l as I,m as L}from"./chunk-B63BKC6F.js";import{Ac as x,Cb as g,Jc as k,Kb as m,Kc as B,Mc as c,Nb as b,Ub as n,Vb as a,Wb as M,X as u,Yc as D,ba as y,c as f,ec as C,gb as l,ha as p,qc as i,rc as s,sc as T,wb as P,yc as w,zc as _}from"./chunk-JP6RBSB3.js";import{a as d,b as h}from"./chunk-YQFG5XE2.js";var X=(()=>{class t{constructor(){this.httpService=p(O)}fetchCashAndBankLoader(){return this.httpService.get("","api/CashAndBankLoader/GetCashAndBank")}fetchCashAndBankData(){return this.httpService.get("","api/CashAndBank/GetCashAndBank")}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var et={data:[],filter:[],options:{hasGeneralLedger:!1}},E=G(z("cash-bank-store"),$(et),K(t=>({totalBalance:D(()=>t.data().reduce((o,e)=>o+e.balance,0))})),q(t=>{let o=p(X);return{loadCashAndBankLoader:v(f(u(()=>o.fetchCashAndBankLoader().pipe(A({next:e=>{console.log("response",e),S(t,r=>h(d({},r),{options:e.options}))},error:e=>{console.log("error",e)}}))))),loadCashAndBankData:v(f(u(()=>o.fetchCashAndBankData().pipe(A({next:e=>{console.log("response",e),S(t,r=>h(d({},r),{data:e}))},error:e=>{console.log("error",e)}})))))}}),U({onInit(t){t.loadCashAndBankLoader(),t.loadCashAndBankData()}}));var nt=["class","page"],at=()=>({height:"calc(100vh - 70px)"}),ot=t=>[t],it=()=>["/pages/report/general-ledger"],rt=t=>({id:t});function lt(t,o){t&1&&(n(0,"tr")(1,"th"),i(2,"Code"),a(),n(3,"th"),i(4,"Name"),a(),n(5,"th",7),i(6,"Balance"),a()())}function pt(t,o){if(t&1&&(n(0,"tr")(1,"td"),i(2),a(),n(3,"td")(4,"a",8),i(5),a()(),n(6,"td",7)(7,"a",9),i(8),k(9,"number"),a()()()),t&2){let e=o.$implicit;l(2),s(e.code),l(2),m("routerLink",x(8,ot,"/pages/chart-of-account/account/"+e.accountID)),l(),s(e.name),l(2),m("routerLink",_(10,it))("queryParams",x(11,rt,e.accountID)),l(),s(B(9,6,e.balance))}}function ct(t,o){if(t&1&&(n(0,"tr"),M(1,"td"),n(2,"td",10),i(3,"Total"),a(),n(4,"td",11),i(5),k(6,"number"),a()()),t&2){let e=C(2);l(5),T(" ",B(6,1,e.store.totalBalance())," ")}}function mt(t,o){t&1&&(n(0,"tr")(1,"td",12)(2,"span"),i(3,"No records found."),a()()())}function st(t,o){if(t&1&&(n(0,"p-panel")(1,"p-table",6),g(2,lt,7,0,"ng-template",null,1,c)(4,pt,10,13,"ng-template",null,2,c)(6,ct,7,3,"ng-template",null,3,c)(8,mt,4,0,"ng-template",null,4,c),a()()),t&2){let e=C();b(_(4,at)),l(),m("value",e.store.data())("scrollHeight","calc(100vh - 100px)")}}var Y=(()=>{class t{constructor(){this.store=p(E),this.routeInfo=Z}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-cash-bank",8,"page"]],features:[w([E])],attrs:nt,decls:3,vars:0,consts:[["content",""],["header",""],["body",""],["footer",""],["emptymessage",""],["pageTitle","Cash and Bank"],["scrollable","",3,"value","scrollHeight"],[1,"text-end"],[1,"link","link-primary",3,"routerLink"],[1,"link","link-primary",3,"routerLink","queryParams"],[1,"fw-bold"],[1,"text-end","fw-bold"],["colspan","3"]],template:function(r,dt){r&1&&(n(0,"app-main-panel",5),g(1,st,10,5,"ng-template",null,0,c),a())},dependencies:[L,I,J,H,W,V,Q,F,R,j,N],styles:[".card[_ngcontent-%COMP%]{height:calc(100vh - 120px)}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:inherit;overflow-y:auto}"],changeDetection:0})}}return t})();var qt=[{path:"",component:Y,children:[]}],Z={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[]};export{qt as CASH_BANK_ROUTES,Z as CASH_BANK_ROUTE_PAGE};
@@ -1 +1 @@
1
- import{a as A}from"./chunk-W24I5WPW.js";import{a as Ue}from"./chunk-G4XX7EU2.js";import{a as Oe,b as Be}from"./chunk-HHJMN4BS.js";import{a as He}from"./chunk-MDH73MG3.js";import{b as V}from"./chunk-BGWDOZQM.js";import"./chunk-VZI3JZPU.js";import{a as ae}from"./chunk-VVHTNAHQ.js";import"./chunk-YOUPD27G.js";import{a as ze}from"./chunk-XKI7WLHE.js";import"./chunk-AZUQDRJU.js";import"./chunk-C2GO6SPF.js";import{a as z,b as H}from"./chunk-O4QM64EH.js";import{d as ke,i as Me,j as Pe,k as je}from"./chunk-EW3R2HAB.js";import{a as Ae,b as De}from"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import"./chunk-PKN47FQE.js";import{a as Je,b as Ne}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{g as Fe,h as Ve}from"./chunk-UYC454VQ.js";import{b as Ee,c as Te}from"./chunk-C7LM5UCK.js";import{a as be,b as Se}from"./chunk-J4XRJAME.js";import{a as v,b as we,c as ve,d as ye,e as Re,f as Ie}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{n as ge,o as he,w as xe,x as Ce}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{b as le,c as me,e as pe,f as se,k as ce,l as de,o as ue,v as fe,y as _e}from"./chunk-FMVCTBCQ.js";import"./chunk-P3V7Z3A6.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{c as ee,e as te,f as ie,i as ne,k as oe,m as re}from"./chunk-B63BKC6F.js";import{Ab as W,Ac as T,Cb as g,Ga as k,Jc as I,Kb as c,Kc as Z,Lc as F,Mc as w,Nb as $,Ub as r,Vb as o,Wb as b,X as N,Yc as E,Z as U,_b as y,bb as L,c as D,cb as G,dc as R,ec as _,gb as m,ha as C,pa as h,qa as x,qc as p,rc as S,s as J,sc as M,uc as q,vc as Q,wb as K,wc as P,xc as X,yc as Y,zc as j}from"./chunk-JP6RBSB3.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var Qe={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,paymentState:0}},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,paymentState:0}},O=we(Ie(Qe),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)),checkedARCollection:E(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),Re(t=>{let a=C(A),e=C(V);return{updateFilter(n){v(t,i=>f(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){v(t,i=>{let u=i.data.data.map(s=>s.id===n.id?f(d({},s),{checked:!0}):s);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){v(t,i=>{let u=i.data.data.map(s=>s.id===n.id?f(d({},s),{checked:!1}):s);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){v(t,i=>{let u=i.data.data.map(s=>f(d({},s),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getARLoader:z(D(N(()=>a.getARJournalLoader().pipe(H({next:n=>{v(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AR collection loader:",n)}}))))),getARCollection:z(D(J(n=>Object.entries(n).reduce((i,[u,s])=>(s!=null&&(i[u]=s),i),{})),N(n=>a.getARJournal(n).pipe(J(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}))})),H({next:i=>{v(t,u=>f(d({},u),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),ye(t=>({onInit:()=>{t.getARLoader(),t.getARCollection(t.filter)}})));var Xe=()=>({height:"calc(100vh - 70px)"}),B=t=>({"ng-invalid ng-dirty":t}),Ye=()=>({});function Ze(t,a){if(t&1){let e=y();r(0,"p-button",10),R("onClick",function(){h(e);let n=_(2);return x(n.onCreateJournal())}),o()}}function et(t,a){if(t&1&&g(0,Ze,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function tt(t,a){t&1&&(r(0,"tr")(1,"th",12),b(2,"p-tableHeaderCheckbox"),o(),r(3,"th",13),p(4,"Outlet"),o(),r(5,"th",14),p(6,"Number"),o(),r(7,"th",15),p(8,"Customer"),o(),r(9,"th",16),p(10,"Date"),o(),r(11,"th",16),p(12,"Due"),o(),r(13,"th",15),p(14,"Note"),o(),r(15,"th",17),p(16,"Payment"),o(),b(17,"th",12),o())}function it(t,a){if(t&1&&(r(0,"tr")(1,"td"),b(2,"p-tableCheckbox",18),o(),r(3,"td"),p(4),o(),r(5,"td")(6,"a",19),p(7),o()(),r(8,"td"),p(9),o(),r(10,"td"),p(11),I(12,"date"),o(),r(13,"td"),p(14),I(15,"date"),o(),r(16,"td"),b(17,"div",20),o(),r(18,"td"),p(19),o(),r(20,"td"),b(21,"p-button",21),o()()),t&2){let e=a.$implicit,l=_(2);m(2),c("value",e),m(2),S(e.outlet),m(2),c("href",l.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Invoice/New_Join_Invoice/Info?ID="+e.id,G),m(),M(" ",e.number," "),m(2),S(e.customer),m(2),S(F(12,12,e.date,"d MMM y")),m(3),S(e.due?F(15,15,e.due,"d MMM y hh:mm"):"-"),m(3),c("innerHTML",e.note,L),m(2),S(e.payment),m(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function nt(t,a){if(t&1&&p(0),t&2){let e=_(2);q(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function ot(t,a){t&1&&(r(0,"tr")(1,"td",22)(2,"span"),p(3,"No records found."),o()()())}function rt(t,a){if(t&1){let e=y();r(0,"p-panel")(1,"p-table",11),R("onPage",function(n){h(e);let i=_();return x(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return x(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){h(e);let i=_();return x(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return x(i.onRowUnselect(n))}),g(2,tt,18,0,"ng-template",null,3,w)(4,it,22,18,"ng-template",null,4,w)(6,nt,1,3,"ng-template",null,5,w)(8,ot,4,0,"ng-template",null,6,w),o()()}if(t&2){let e=_();$(j(9,Xe)),m(),c("value",e.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function at(t,a){if(t&1&&(r(0,"span",32),p(1),I(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),m(),M(" ",F(2,2,e.name,30)," ")}}function lt(t,a){if(t&1&&(r(0,"div")(1,"span",34),p(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function mt(t,a){if(t&1&&(r(0,"div"),g(1,lt,3,1,"div",33),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("from"))}}function pt(t,a){if(t&1&&(r(0,"div")(1,"span",34),p(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function st(t,a){if(t&1&&(r(0,"div"),g(1,pt,3,1,"div",33),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("to"))}}function ct(t,a){if(t&1&&(r(0,"div")(1,"span",34),p(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function dt(t,a){if(t&1&&(r(0,"div"),g(1,ct,3,1,"div",33),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("pageSize"))}}function ut(t,a){if(t&1){let e=y();r(0,"form",23)(1,"div",24)(2,"label",25),p(3,"Outlet"),o(),r(4,"p-select",26),g(5,at,3,5,"ng-template",null,7,w),o()(),r(7,"div",24)(8,"label",25),p(9,"From"),o(),b(10,"p-datepicker",27),g(11,mt,2,1,"div",28),o(),r(12,"div",24)(13,"label",25),p(14,"To"),o(),b(15,"p-datepicker",29),g(16,st,2,1,"div",28),o(),r(17,"div",24)(18,"label",25),p(19,"Customer"),o(),r(20,"p-autocomplete",30),I(21,"async"),R("completeMethod",function(n){h(e);let i=_();return x(i.onSearchContact(n))}),o()(),r(22,"div",24)(23,"label",25),p(24,"Page Size"),o(),b(25,"input",31),g(26,dt,2,1,"div",28),o()()}if(t&2){let e=_();c("formGroup",e.form),m(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),m(6),c("iconDisplay","input")("showIcon",!0)("ngClass",T(17,B,e.isInvalid("from"))),m(),c("ngIf",e.isInvalid("from")),m(4),c("iconDisplay","input")("showIcon",!0)("ngClass",T(19,B,e.isInvalid("to"))),m(),c("ngIf",e.isInvalid("to")),m(4),c("suggestions",Z(21,15,e.customerSuggestions$)),m(5),c("autoNumeric",j(21,Ye))("ngClass",T(22,B,e.isInvalid("pageSize"))),m(),c("ngIf",e.isInvalid("pageSize"))}}var ni=(()=>{class t extends ze{constructor(){super(),this.store=C(O),this.generateJournalService=C(A),this.authService=C(ae),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(fe),this.dayjsService=C(V)}ngOnInit(){this.initForm()}initForm(){let{number:e,from:l,to:n,pageNumber:i,rowCount:u,pageSize:s,export:Le,exportPageNumber:Ge,exportRowCount:Ke,outletName:We,customerID:$e,paymentState:qe}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),from:this.fb.control(this.dayjsService.from(l)?this.dayjsService.from(l).toDate():null),to:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),pageNumber:this.fb.control(i),rowCount:this.fb.control(u),pageSize:this.fb.control(s,[me.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(Ge),exportRowCount:this.fb.control(Ke),outletName:this.fb.control(We),customerID:this.fb.control($e),paymentState:this.fb.control(qe)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((l,[n,i])=>{switch(n){case"customerID":i||(l[n]=Ue);break;case"from":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;default:l[n]=i===null?"":i;break}return l},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onSearchContact(e){this.customerSuggestions$=this.generateJournalService.getCustomerSuggestions(e.query)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e,pageNumber:1})),this.store.getARCollection(this.store.filter())}onPageChange(e){let l=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:l+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(l=>{this.store.onRowUnselect(l)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createARJournal(this.store.checkedARCollection()).pipe(U(()=>this.store.getARCollection(this.store.filter))).subscribe()}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=K({type:t,selectors:[["app-ar-journal"]],features:[Y([O]),W],decls:8,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AR Collection",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[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"],["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,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(l,n){if(l&1){let i=y();r(0,"app-main-panel",8),X("isDialogFilterVisibleChange",function(s){return h(i),P(n.isDialogFilterVisible,s)||(n.isDialogFilterVisible=s),x(s)})("isInitDialogFilterVisibleChange",function(s){return h(i),P(n.isInitDialogFilterVisible,s)||(n.isInitDialogFilterVisible=s),x(s)}),R("filterConfirmed",function(){return h(i),x(n.onFilterOKEvent())})("search",function(s){return h(i),x(n.onSearch(s))}),g(1,et,1,1,"ng-template",null,0,w)(3,rt,10,10,"ng-template",null,1,w),p(5," <"),g(6,ut,27,24,"ng-template",null,2,w),o()}l&2&&(c("isSearchableInput",!0)("isFilterable",!0),Q("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible))},dependencies:[Ve,re,ee,te,ie,ne,oe,je,ke,Me,Pe,Ce,xe,Se,be,_e,ce,le,pe,se,de,ue,Ne,Je,De,Ae,Be,Oe,he,ge,Fe,Te,Ee,He],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{ni as ARJournalComponent};
1
+ import{a as A}from"./chunk-EXGI2AG7.js";import{a as Ue}from"./chunk-G4XX7EU2.js";import{a as Oe,b as Be}from"./chunk-HHJMN4BS.js";import{a as He}from"./chunk-MDH73MG3.js";import{b as V}from"./chunk-ERFXO32T.js";import"./chunk-ZM5TVQUU.js";import{a as ae}from"./chunk-AGLKA7OG.js";import"./chunk-YOUPD27G.js";import{a as ze}from"./chunk-XKI7WLHE.js";import"./chunk-AZUQDRJU.js";import"./chunk-C2GO6SPF.js";import{a as z,b as H}from"./chunk-O4QM64EH.js";import{d as ke,i as Me,j as Pe,k as je}from"./chunk-EW3R2HAB.js";import{a as Ae,b as De}from"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import"./chunk-PKN47FQE.js";import{a as Je,b as Ne}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{g as Fe,h as Ve}from"./chunk-UYC454VQ.js";import{b as Ee,c as Te}from"./chunk-C7LM5UCK.js";import{a as be,b as Se}from"./chunk-J4XRJAME.js";import{a as v,b as we,c as ve,d as ye,e as Re,f as Ie}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{n as ge,o as he,w as xe,x as Ce}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{b as le,c as me,e as pe,f as se,k as ce,l as de,o as ue,v as fe,y as _e}from"./chunk-FMVCTBCQ.js";import"./chunk-ZGXJEG37.js";import"./chunk-VFEEFGWW.js";import"./chunk-F2X3VGZZ.js";import{c as ee,e as te,f as ie,i as ne,k as oe,m as re}from"./chunk-B63BKC6F.js";import{Ab as W,Ac as T,Cb as g,Ga as k,Jc as I,Kb as c,Kc as Z,Lc as F,Mc as w,Nb as $,Ub as r,Vb as o,Wb as b,X as N,Yc as E,Z as U,_b as y,bb as L,c as D,cb as G,dc as R,ec as _,gb as m,ha as C,pa as h,qa as x,qc as p,rc as S,s as J,sc as M,uc as q,vc as Q,wb as K,wc as P,xc as X,yc as Y,zc as j}from"./chunk-JP6RBSB3.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var Qe={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,paymentState:0}},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,paymentState:0}},O=we(Ie(Qe),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)),checkedARCollection:E(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),Re(t=>{let a=C(A),e=C(V);return{updateFilter(n){v(t,i=>f(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){v(t,i=>{let u=i.data.data.map(s=>s.id===n.id?f(d({},s),{checked:!0}):s);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){v(t,i=>{let u=i.data.data.map(s=>s.id===n.id?f(d({},s),{checked:!1}):s);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){v(t,i=>{let u=i.data.data.map(s=>f(d({},s),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getARLoader:z(D(N(()=>a.getARJournalLoader().pipe(H({next:n=>{v(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AR collection loader:",n)}}))))),getARCollection:z(D(J(n=>Object.entries(n).reduce((i,[u,s])=>(s!=null&&(i[u]=s),i),{})),N(n=>a.getARJournal(n).pipe(J(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}))})),H({next:i=>{v(t,u=>f(d({},u),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),ye(t=>({onInit:()=>{t.getARLoader(),t.getARCollection(t.filter)}})));var Xe=()=>({height:"calc(100vh - 70px)"}),B=t=>({"ng-invalid ng-dirty":t}),Ye=()=>({});function Ze(t,a){if(t&1){let e=y();r(0,"p-button",10),R("onClick",function(){h(e);let n=_(2);return x(n.onCreateJournal())}),o()}}function et(t,a){if(t&1&&g(0,Ze,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function tt(t,a){t&1&&(r(0,"tr")(1,"th",12),b(2,"p-tableHeaderCheckbox"),o(),r(3,"th",13),p(4,"Outlet"),o(),r(5,"th",14),p(6,"Number"),o(),r(7,"th",15),p(8,"Customer"),o(),r(9,"th",16),p(10,"Date"),o(),r(11,"th",16),p(12,"Due"),o(),r(13,"th",15),p(14,"Note"),o(),r(15,"th",17),p(16,"Payment"),o(),b(17,"th",12),o())}function it(t,a){if(t&1&&(r(0,"tr")(1,"td"),b(2,"p-tableCheckbox",18),o(),r(3,"td"),p(4),o(),r(5,"td")(6,"a",19),p(7),o()(),r(8,"td"),p(9),o(),r(10,"td"),p(11),I(12,"date"),o(),r(13,"td"),p(14),I(15,"date"),o(),r(16,"td"),b(17,"div",20),o(),r(18,"td"),p(19),o(),r(20,"td"),b(21,"p-button",21),o()()),t&2){let e=a.$implicit,l=_(2);m(2),c("value",e),m(2),S(e.outlet),m(2),c("href",l.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Invoice/New_Join_Invoice/Info?ID="+e.id,G),m(),M(" ",e.number," "),m(2),S(e.customer),m(2),S(F(12,12,e.date,"d MMM y")),m(3),S(e.due?F(15,15,e.due,"d MMM y hh:mm"):"-"),m(3),c("innerHTML",e.note,L),m(2),S(e.payment),m(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function nt(t,a){if(t&1&&p(0),t&2){let e=_(2);q(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function ot(t,a){t&1&&(r(0,"tr")(1,"td",22)(2,"span"),p(3,"No records found."),o()()())}function rt(t,a){if(t&1){let e=y();r(0,"p-panel")(1,"p-table",11),R("onPage",function(n){h(e);let i=_();return x(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return x(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){h(e);let i=_();return x(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return x(i.onRowUnselect(n))}),g(2,tt,18,0,"ng-template",null,3,w)(4,it,22,18,"ng-template",null,4,w)(6,nt,1,3,"ng-template",null,5,w)(8,ot,4,0,"ng-template",null,6,w),o()()}if(t&2){let e=_();$(j(9,Xe)),m(),c("value",e.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function at(t,a){if(t&1&&(r(0,"span",32),p(1),I(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),m(),M(" ",F(2,2,e.name,30)," ")}}function lt(t,a){if(t&1&&(r(0,"div")(1,"span",34),p(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function mt(t,a){if(t&1&&(r(0,"div"),g(1,lt,3,1,"div",33),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("from"))}}function pt(t,a){if(t&1&&(r(0,"div")(1,"span",34),p(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function st(t,a){if(t&1&&(r(0,"div"),g(1,pt,3,1,"div",33),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("to"))}}function ct(t,a){if(t&1&&(r(0,"div")(1,"span",34),p(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function dt(t,a){if(t&1&&(r(0,"div"),g(1,ct,3,1,"div",33),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("pageSize"))}}function ut(t,a){if(t&1){let e=y();r(0,"form",23)(1,"div",24)(2,"label",25),p(3,"Outlet"),o(),r(4,"p-select",26),g(5,at,3,5,"ng-template",null,7,w),o()(),r(7,"div",24)(8,"label",25),p(9,"From"),o(),b(10,"p-datepicker",27),g(11,mt,2,1,"div",28),o(),r(12,"div",24)(13,"label",25),p(14,"To"),o(),b(15,"p-datepicker",29),g(16,st,2,1,"div",28),o(),r(17,"div",24)(18,"label",25),p(19,"Customer"),o(),r(20,"p-autocomplete",30),I(21,"async"),R("completeMethod",function(n){h(e);let i=_();return x(i.onSearchContact(n))}),o()(),r(22,"div",24)(23,"label",25),p(24,"Page Size"),o(),b(25,"input",31),g(26,dt,2,1,"div",28),o()()}if(t&2){let e=_();c("formGroup",e.form),m(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),m(6),c("iconDisplay","input")("showIcon",!0)("ngClass",T(17,B,e.isInvalid("from"))),m(),c("ngIf",e.isInvalid("from")),m(4),c("iconDisplay","input")("showIcon",!0)("ngClass",T(19,B,e.isInvalid("to"))),m(),c("ngIf",e.isInvalid("to")),m(4),c("suggestions",Z(21,15,e.customerSuggestions$)),m(5),c("autoNumeric",j(21,Ye))("ngClass",T(22,B,e.isInvalid("pageSize"))),m(),c("ngIf",e.isInvalid("pageSize"))}}var ni=(()=>{class t extends ze{constructor(){super(),this.store=C(O),this.generateJournalService=C(A),this.authService=C(ae),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(fe),this.dayjsService=C(V)}ngOnInit(){this.initForm()}initForm(){let{number:e,from:l,to:n,pageNumber:i,rowCount:u,pageSize:s,export:Le,exportPageNumber:Ge,exportRowCount:Ke,outletName:We,customerID:$e,paymentState:qe}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),from:this.fb.control(this.dayjsService.from(l)?this.dayjsService.from(l).toDate():null),to:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),pageNumber:this.fb.control(i),rowCount:this.fb.control(u),pageSize:this.fb.control(s,[me.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(Ge),exportRowCount:this.fb.control(Ke),outletName:this.fb.control(We),customerID:this.fb.control($e),paymentState:this.fb.control(qe)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((l,[n,i])=>{switch(n){case"customerID":i||(l[n]=Ue);break;case"from":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;default:l[n]=i===null?"":i;break}return l},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onSearchContact(e){this.customerSuggestions$=this.generateJournalService.getCustomerSuggestions(e.query)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e,pageNumber:1})),this.store.getARCollection(this.store.filter())}onPageChange(e){let l=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:l+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(l=>{this.store.onRowUnselect(l)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createARJournal(this.store.checkedARCollection()).pipe(U(()=>this.store.getARCollection(this.store.filter))).subscribe()}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=K({type:t,selectors:[["app-ar-journal"]],features:[Y([O]),W],decls:8,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AR Collection",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[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"],["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,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(l,n){if(l&1){let i=y();r(0,"app-main-panel",8),X("isDialogFilterVisibleChange",function(s){return h(i),P(n.isDialogFilterVisible,s)||(n.isDialogFilterVisible=s),x(s)})("isInitDialogFilterVisibleChange",function(s){return h(i),P(n.isInitDialogFilterVisible,s)||(n.isInitDialogFilterVisible=s),x(s)}),R("filterConfirmed",function(){return h(i),x(n.onFilterOKEvent())})("search",function(s){return h(i),x(n.onSearch(s))}),g(1,et,1,1,"ng-template",null,0,w)(3,rt,10,10,"ng-template",null,1,w),p(5," <"),g(6,ut,27,24,"ng-template",null,2,w),o()}l&2&&(c("isSearchableInput",!0)("isFilterable",!0),Q("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible))},dependencies:[Ve,re,ee,te,ie,ne,oe,je,ke,Me,Pe,Ce,xe,Se,be,_e,ce,le,pe,se,de,ue,Ne,Je,De,Ae,Be,Oe,he,ge,Fe,Te,Ee,He],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{ni as ARJournalComponent};
@@ -1,4 +1,4 @@
1
- import{a as J,b as yt}from"./chunk-2BCAGP7R.js";import{a as xt}from"./chunk-G4XX7EU2.js";import{f as Ct}from"./chunk-EDCDR4RJ.js";import"./chunk-HHDFSN55.js";import{a as bt}from"./chunk-XKI7WLHE.js";import{a as ot}from"./chunk-6ACYDH2N.js";import"./chunk-C2GO6SPF.js";import{a as W,b as K}from"./chunk-O4QM64EH.js";import{d as ft,i as ht,j as gt,k as wt}from"./chunk-EW3R2HAB.js";import"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import{a as _e}from"./chunk-XKCLERWG.js";import"./chunk-PKN47FQE.js";import{a as ut,b as _t}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{h as dt}from"./chunk-UYC454VQ.js";import{a as Je}from"./chunk-C7LM5UCK.js";import{a as nt,b as rt}from"./chunk-J4XRJAME.js";import{a as I,b as at,c as st,d as lt,e as pt,f as ct,g as mt}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{a as Ke,f as L,k as Xe,m as Ye,o as et,s as tt,w as $,x as it}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{A as ue,B as Ge,D as je,L as qe,Ma as $e,Na as Z,Va as We,c as de,e as Ae,f as Be,l as He,na as Ze,o as Ne,v as Qe,y as ze}from"./chunk-FMVCTBCQ.js";import"./chunk-P3V7Z3A6.js";import"./chunk-VFEEFGWW.js";import{c as Oe,d as se,f as le,h as pe,i as ce,k as me}from"./chunk-F2X3VGZZ.js";import{D as Re,F as Le,G as Me,c as G,f as j,h as Pe,m as q}from"./chunk-B63BKC6F.js";import{Ab as H,Ac as V,Bc as Ee,Cb as _,Fc as Ue,Ga as R,Jb as D,Kb as s,Mc as x,Nb as N,Ob as ee,Pb as xe,Qb as te,Sb as ie,Tb as ne,Ub as p,Vb as m,Vc as T,Wb as k,Wc as Fe,X as O,Xb as Ce,Yb as ye,Yc as P,Z as X,Zb as E,Zc as Ve,_b as S,ba as ge,c as M,ca as we,dc as b,ec as l,fc as ve,gb as a,gc as ke,ha as C,jc as U,kc as Q,lc as y,mc as v,pa as d,pc as Se,qa as u,qc as g,rc as F,sc as Te,ta as Y,uc as Ie,vc as re,wb as B,wc as oe,xb as be,xc as ae,yc as z,za as A,zc as De}from"./chunk-JP6RBSB3.js";import{a as f,b as h}from"./chunk-YQFG5XE2.js";var Tt={data:[],count:0,filter:{pagination:1,pageSize:10,groupID:null,text:""},meta:{filter:{pagination:1,pageSize:10,groupID:null,text:""},options:{groups:[]}},metaForm:{form:{id:"",groupID:""},options:{users:[],groups:[]}}},fe=at(mt("UserStore"),ct(Tt),st(t=>({first:P(()=>(t.filter().pagination-1)*t.filter().pageSize+1),end:P(()=>Math.min(t.filter().pagination*t.filter().pageSize,t.count())),hasCheckedRows:P(()=>t.data().some(o=>o.checked)),checkedData:P(()=>t.data().filter(o=>o.checked).map(o=>o.userID)),selectedID:P(()=>t.data().find(o=>o.checked)?.userID||null)})),pt(t=>{let o=C(J);return{setFilter(n){I(t,i=>h(f({},i),{filter:n}))},onRowSelect(n){I(t,i=>{let r=i.data.map(c=>c.userID===n.userID?h(f({},c),{checked:!0}):c);return h(f({},i),{data:r})})},onRowUnselect(n){I(t,i=>{let r=i.data.map(c=>c.userID===n.userID?h(f({},c),{checked:!1}):c);return h(f({},i),{data:r})})},onHeaderCheckboxToggle(n){let i=localStorage.getItem("AUTH_USERNAME");I(t,r=>{let c=r.data.map(w=>w.userName!==i?h(f({},w),{checked:n}):h(f({},w),{checked:!1}));return h(f({},r),{data:c})})},getUserLoader:W(M(O(()=>o.getUserLoaderList().pipe(K({next:n=>{I(t,i=>h(f({},i),{meta:n}))},error:n=>{console.error("Failed to fetch user loader list:",n)}}))))),getUserFormMeta:W(M(O(n=>o.getUserFormMeta(n).pipe(K({next:i=>{I(t,r=>h(f({},r),{metaForm:i}))},error:i=>{console.error("Failed to fetch user form meta:",i)}}))))),getUsers:W(M(O(n=>o.getUsers(n).pipe(K({next:i=>{I(t,r=>h(f({},r),{data:i.data.map(c=>h(f({},c),{checked:!1})),count:i.count}))},error:i=>{console.error("Failed to fetch users:",i)}})))))}}),lt({onInit:t=>{t.getUserLoader(),t.getUsers(t.filter)}}));var Et=["header"],Ut=["footer"],Ft=["content"],Vt=["closeicon"],Pt=["headless"],Rt=["maskRef"],Lt=["container"],Mt=["closeButton"],Ot=["*"],At=(t,o,e,n,i,r)=>({"p-drawer":!0,"p-drawer-active":t,"p-drawer-left":o,"p-drawer-right":e,"p-drawer-top":n,"p-drawer-bottom":i,"p-drawer-full":r}),Bt=(t,o)=>({transform:t,transition:o}),Ht=t=>({value:"visible",params:t});function Nt(t,o){t&1&&E(0)}function Qt(t,o){if(t&1&&_(0,Nt,1,0,"ng-container",4),t&2){let e=l(2);s("ngTemplateOutlet",e.headlessTemplate||e._headlessTemplate)}}function zt(t,o){t&1&&E(0)}function Gt(t,o){if(t&1&&(p(0,"div"),g(1),m()),t&2){let e=l(3);ee(e.cx("title")),a(),F(e.header)}}function jt(t,o){t&1&&k(0,"TimesIcon"),t&2&&D("data-pc-section","closeicon")}function qt(t,o){}function Zt(t,o){t&1&&_(0,qt,0,0,"ng-template")}function $t(t,o){if(t&1&&_(0,jt,1,1,"TimesIcon",8)(1,Zt,1,0,null,4),t&2){let e=l(4);s("ngIf",!e.closeIconTemplate&&!e._closeIconTemplate),a(),s("ngTemplateOutlet",e.closeIconTemplate||e._closeIconTemplate)}}function Wt(t,o){if(t&1){let e=S();p(0,"p-button",9),b("onClick",function(i){d(e);let r=l(3);return u(r.close(i))})("keydown.enter",function(i){d(e);let r=l(3);return u(r.close(i))}),_(1,$t,2,2,"ng-template",null,1,x),m()}if(t&2){let e=l(3);s("ngClass",e.cx("closeButton"))("buttonProps",e.closeButtonProps)("ariaLabel",e.ariaCloseLabel),D("data-pc-section","closebutton")("data-pc-group-section","iconcontainer")}}function Kt(t,o){t&1&&E(0)}function Jt(t,o){t&1&&E(0)}function Xt(t,o){if(t&1&&(Ce(0),p(1,"div",5),_(2,Jt,1,0,"ng-container",4),m(),ye()),t&2){let e=l(3);a(),s("ngClass",e.cx("footer")),D("data-pc-section","footer"),a(),s("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}function Yt(t,o){if(t&1&&(p(0,"div",5),_(1,zt,1,0,"ng-container",4)(2,Gt,2,3,"div",6)(3,Wt,3,5,"p-button",7),m(),p(4,"div",5),ke(5),_(6,Kt,1,0,"ng-container",4),m(),_(7,Xt,3,3,"ng-container",8)),t&2){let e=l(2);s("ngClass",e.cx("header")),D("data-pc-section","header"),a(),s("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),a(),s("ngIf",e.header),a(),s("ngIf",e.showCloseIcon&&e.closable),a(),s("ngClass",e.cx("content")),D("data-pc-section","content"),a(2),s("ngTemplateOutlet",e.contentTemplate||e._contentTemplate),a(),s("ngIf",e.footerTemplate||e._footerTemplate)}}function ei(t,o){if(t&1){let e=S();p(0,"div",3,0),b("@panelState.start",function(i){d(e);let r=l();return u(r.onAnimationStart(i))})("@panelState.done",function(i){d(e);let r=l();return u(r.onAnimationEnd(i))})("keydown",function(i){d(e);let r=l();return u(r.onKeyDown(i))}),_(2,Qt,1,1,"ng-container")(3,Yt,8,9),m()}if(t&2){let e=l();N(e.style),ee(e.styleClass),s("ngClass",Ue(9,At,e.visible,e.position==="left"&&!e.fullScreen,e.position==="right"&&!e.fullScreen,e.position==="top"&&!e.fullScreen,e.position==="bottom"&&!e.fullScreen,e.fullScreen||e.position==="full"))("@panelState",V(19,Ht,Ee(16,Bt,e.transformOptions,e.transitionOptions))),D("data-pc-name","sidebar")("data-pc-section","root"),a(2),xe(e.headlessTemplate||e._headlessTemplate?2:3)}}var ti=({dt:t})=>`
1
+ import{a as J,b as yt}from"./chunk-UEWFM35O.js";import{a as xt}from"./chunk-G4XX7EU2.js";import{f as Ct}from"./chunk-EDCDR4RJ.js";import"./chunk-HHDFSN55.js";import{a as bt}from"./chunk-XKI7WLHE.js";import{a as ot}from"./chunk-6ACYDH2N.js";import"./chunk-C2GO6SPF.js";import{a as W,b as K}from"./chunk-O4QM64EH.js";import{d as ft,i as ht,j as gt,k as wt}from"./chunk-EW3R2HAB.js";import"./chunk-OLOVFS3Y.js";import"./chunk-QCLAOAVG.js";import"./chunk-Q33XIUDN.js";import{a as _e}from"./chunk-XKCLERWG.js";import"./chunk-PKN47FQE.js";import{a as ut,b as _t}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import"./chunk-NA5YXAMJ.js";import"./chunk-253IFSMV.js";import"./chunk-QYXQYPHB.js";import"./chunk-FBEBMNVC.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{h as dt}from"./chunk-UYC454VQ.js";import{a as Je}from"./chunk-C7LM5UCK.js";import{a as nt,b as rt}from"./chunk-J4XRJAME.js";import{a as I,b as at,c as st,d as lt,e as pt,f as ct,g as mt}from"./chunk-JBSIAXM5.js";import"./chunk-GH5Z5SPB.js";import{a as Ke,f as L,k as Xe,m as Ye,o as et,s as tt,w as $,x as it}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{A as ue,B as Ge,D as je,L as qe,Ma as $e,Na as Z,Va as We,c as de,e as Ae,f as Be,l as He,na as Ze,o as Ne,v as Qe,y as ze}from"./chunk-FMVCTBCQ.js";import"./chunk-ZGXJEG37.js";import"./chunk-VFEEFGWW.js";import{c as Oe,d as se,f as le,h as pe,i as ce,k as me}from"./chunk-F2X3VGZZ.js";import{D as Re,F as Le,G as Me,c as G,f as j,h as Pe,m as q}from"./chunk-B63BKC6F.js";import{Ab as H,Ac as V,Bc as Ee,Cb as _,Fc as Ue,Ga as R,Jb as D,Kb as s,Mc as x,Nb as N,Ob as ee,Pb as xe,Qb as te,Sb as ie,Tb as ne,Ub as p,Vb as m,Vc as T,Wb as k,Wc as Fe,X as O,Xb as Ce,Yb as ye,Yc as P,Z as X,Zb as E,Zc as Ve,_b as S,ba as ge,c as M,ca as we,dc as b,ec as l,fc as ve,gb as a,gc as ke,ha as C,jc as U,kc as Q,lc as y,mc as v,pa as d,pc as Se,qa as u,qc as g,rc as F,sc as Te,ta as Y,uc as Ie,vc as re,wb as B,wc as oe,xb as be,xc as ae,yc as z,za as A,zc as De}from"./chunk-JP6RBSB3.js";import{a as f,b as h}from"./chunk-YQFG5XE2.js";var Tt={data:[],count:0,filter:{pagination:1,pageSize:10,groupID:null,text:""},meta:{filter:{pagination:1,pageSize:10,groupID:null,text:""},options:{groups:[]}},metaForm:{form:{id:"",groupID:""},options:{users:[],groups:[]}}},fe=at(mt("UserStore"),ct(Tt),st(t=>({first:P(()=>(t.filter().pagination-1)*t.filter().pageSize+1),end:P(()=>Math.min(t.filter().pagination*t.filter().pageSize,t.count())),hasCheckedRows:P(()=>t.data().some(o=>o.checked)),checkedData:P(()=>t.data().filter(o=>o.checked).map(o=>o.userID)),selectedID:P(()=>t.data().find(o=>o.checked)?.userID||null)})),pt(t=>{let o=C(J);return{setFilter(n){I(t,i=>h(f({},i),{filter:n}))},onRowSelect(n){I(t,i=>{let r=i.data.map(c=>c.userID===n.userID?h(f({},c),{checked:!0}):c);return h(f({},i),{data:r})})},onRowUnselect(n){I(t,i=>{let r=i.data.map(c=>c.userID===n.userID?h(f({},c),{checked:!1}):c);return h(f({},i),{data:r})})},onHeaderCheckboxToggle(n){let i=localStorage.getItem("AUTH_USERNAME");I(t,r=>{let c=r.data.map(w=>w.userName!==i?h(f({},w),{checked:n}):h(f({},w),{checked:!1}));return h(f({},r),{data:c})})},getUserLoader:W(M(O(()=>o.getUserLoaderList().pipe(K({next:n=>{I(t,i=>h(f({},i),{meta:n}))},error:n=>{console.error("Failed to fetch user loader list:",n)}}))))),getUserFormMeta:W(M(O(n=>o.getUserFormMeta(n).pipe(K({next:i=>{I(t,r=>h(f({},r),{metaForm:i}))},error:i=>{console.error("Failed to fetch user form meta:",i)}}))))),getUsers:W(M(O(n=>o.getUsers(n).pipe(K({next:i=>{I(t,r=>h(f({},r),{data:i.data.map(c=>h(f({},c),{checked:!1})),count:i.count}))},error:i=>{console.error("Failed to fetch users:",i)}})))))}}),lt({onInit:t=>{t.getUserLoader(),t.getUsers(t.filter)}}));var Et=["header"],Ut=["footer"],Ft=["content"],Vt=["closeicon"],Pt=["headless"],Rt=["maskRef"],Lt=["container"],Mt=["closeButton"],Ot=["*"],At=(t,o,e,n,i,r)=>({"p-drawer":!0,"p-drawer-active":t,"p-drawer-left":o,"p-drawer-right":e,"p-drawer-top":n,"p-drawer-bottom":i,"p-drawer-full":r}),Bt=(t,o)=>({transform:t,transition:o}),Ht=t=>({value:"visible",params:t});function Nt(t,o){t&1&&E(0)}function Qt(t,o){if(t&1&&_(0,Nt,1,0,"ng-container",4),t&2){let e=l(2);s("ngTemplateOutlet",e.headlessTemplate||e._headlessTemplate)}}function zt(t,o){t&1&&E(0)}function Gt(t,o){if(t&1&&(p(0,"div"),g(1),m()),t&2){let e=l(3);ee(e.cx("title")),a(),F(e.header)}}function jt(t,o){t&1&&k(0,"TimesIcon"),t&2&&D("data-pc-section","closeicon")}function qt(t,o){}function Zt(t,o){t&1&&_(0,qt,0,0,"ng-template")}function $t(t,o){if(t&1&&_(0,jt,1,1,"TimesIcon",8)(1,Zt,1,0,null,4),t&2){let e=l(4);s("ngIf",!e.closeIconTemplate&&!e._closeIconTemplate),a(),s("ngTemplateOutlet",e.closeIconTemplate||e._closeIconTemplate)}}function Wt(t,o){if(t&1){let e=S();p(0,"p-button",9),b("onClick",function(i){d(e);let r=l(3);return u(r.close(i))})("keydown.enter",function(i){d(e);let r=l(3);return u(r.close(i))}),_(1,$t,2,2,"ng-template",null,1,x),m()}if(t&2){let e=l(3);s("ngClass",e.cx("closeButton"))("buttonProps",e.closeButtonProps)("ariaLabel",e.ariaCloseLabel),D("data-pc-section","closebutton")("data-pc-group-section","iconcontainer")}}function Kt(t,o){t&1&&E(0)}function Jt(t,o){t&1&&E(0)}function Xt(t,o){if(t&1&&(Ce(0),p(1,"div",5),_(2,Jt,1,0,"ng-container",4),m(),ye()),t&2){let e=l(3);a(),s("ngClass",e.cx("footer")),D("data-pc-section","footer"),a(),s("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}function Yt(t,o){if(t&1&&(p(0,"div",5),_(1,zt,1,0,"ng-container",4)(2,Gt,2,3,"div",6)(3,Wt,3,5,"p-button",7),m(),p(4,"div",5),ke(5),_(6,Kt,1,0,"ng-container",4),m(),_(7,Xt,3,3,"ng-container",8)),t&2){let e=l(2);s("ngClass",e.cx("header")),D("data-pc-section","header"),a(),s("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),a(),s("ngIf",e.header),a(),s("ngIf",e.showCloseIcon&&e.closable),a(),s("ngClass",e.cx("content")),D("data-pc-section","content"),a(2),s("ngTemplateOutlet",e.contentTemplate||e._contentTemplate),a(),s("ngIf",e.footerTemplate||e._footerTemplate)}}function ei(t,o){if(t&1){let e=S();p(0,"div",3,0),b("@panelState.start",function(i){d(e);let r=l();return u(r.onAnimationStart(i))})("@panelState.done",function(i){d(e);let r=l();return u(r.onAnimationEnd(i))})("keydown",function(i){d(e);let r=l();return u(r.onKeyDown(i))}),_(2,Qt,1,1,"ng-container")(3,Yt,8,9),m()}if(t&2){let e=l();N(e.style),ee(e.styleClass),s("ngClass",Ue(9,At,e.visible,e.position==="left"&&!e.fullScreen,e.position==="right"&&!e.fullScreen,e.position==="top"&&!e.fullScreen,e.position==="bottom"&&!e.fullScreen,e.fullScreen||e.position==="full"))("@panelState",V(19,Ht,Ee(16,Bt,e.transformOptions,e.transitionOptions))),D("data-pc-name","sidebar")("data-pc-section","root"),a(2),xe(e.headlessTemplate||e._headlessTemplate?2:3)}}var ti=({dt:t})=>`
2
2
  .p-drawer {
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{a as Ti}from"./chunk-VZI3JZPU.js";import{a as un}from"./chunk-VVHTNAHQ.js";import{a as qn}from"./chunk-BTDW4G2F.js";import{a as Xn}from"./chunk-6ACYDH2N.js";import"./chunk-C2GO6SPF.js";import{a as Fn}from"./chunk-QCLAOAVG.js";import{a as $n}from"./chunk-Q33XIUDN.js";import{b as Wn}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import{a as Vn}from"./chunk-253IFSMV.js";import{a as Dn}from"./chunk-QYXQYPHB.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{b as jn}from"./chunk-5R3XKSDM.js";import{b as Yn,c as Si}from"./chunk-C7LM5UCK.js";import{b as Gn}from"./chunk-J4XRJAME.js";import{c as Mn}from"./chunk-GH5Z5SPB.js";import{a as et,c as An,f as ai,o as Bn,p as Rn,t as Hn,u as Mi,w as Nn,x as oi}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{Ea as si,H as Sn,Ja as Ln,K as Tn,Ka as kn,L as Pn,La as zn,Ma as ri,Na as ge,Q as Ie,R as _t,S as Nt,T as En,Va as Je,b as mn,e as fn,f as gn,h as hn,j as vn,ja as On,k as wn,na as In,p as bn,q as yn,r as _n,s as Cn,x as ni,y as xn}from"./chunk-FMVCTBCQ.js";import{a as cn}from"./chunk-P3V7Z3A6.js";import{a as pn}from"./chunk-VFEEFGWW.js";import{c as dn,d as _i,f as Ci,h as xi}from"./chunk-F2X3VGZZ.js";import{A as sn,D as rn,F as an,G as on,H as ln,N as Ht,c as ct,e as ii,f as Ft,g as Bt,h as Rt,i as tn,m as we,n as Oe,s as nn}from"./chunk-B63BKC6F.js";import{Aa as Wi,Ab as Ke,Ac as pe,Bc as Be,Ca as qi,Cb as X,Cc as ti,Da as xe,Ea as wt,Ga as Ee,Jb as Z,Jc as Dt,Ka as Ui,Kb as $,Kc as $t,Mb as Ki,Mc as dt,Nb as Qt,Ob as ye,Pb as Kt,Qb as Zt,Sb as Jt,Tb as ei,Ub as G,V as Xi,Vb as N,Vc as pt,Wb as te,Wc as Vt,Xb as at,Yb as ot,Yc as en,Zb as Me,_b as ve,aa as Yi,ba as Ye,bb as bi,ca as je,cb as qe,dc as ie,ec as H,fc as bt,gb as R,gc as lt,ha as ae,jc as fe,kc as yt,lc as ne,mb as Ue,mc as se,oa as ji,pa as U,pc as Lt,qa as Q,qc as le,rb as Ut,rc as Fe,s as wi,sc as yi,t as Gi,ta as Ae,tc as Zi,vc as kt,wb as he,wc as zt,xb as Qe,xc as At,yc as Ze,za as We,zb as Qi,zc as Ji}from"./chunk-JP6RBSB3.js";import{a as me,b as It}from"./chunk-YQFG5XE2.js";var sr=["*"],rr=({dt:i})=>`
1
+ import{a as Ti}from"./chunk-ZM5TVQUU.js";import{a as un}from"./chunk-AGLKA7OG.js";import{a as qn}from"./chunk-BTDW4G2F.js";import{a as Xn}from"./chunk-6ACYDH2N.js";import"./chunk-C2GO6SPF.js";import{a as Fn}from"./chunk-QCLAOAVG.js";import{a as $n}from"./chunk-Q33XIUDN.js";import{b as Wn}from"./chunk-LRRVQSMI.js";import"./chunk-42UIGXWH.js";import{a as Vn}from"./chunk-253IFSMV.js";import{a as Dn}from"./chunk-QYXQYPHB.js";import"./chunk-6NGIQJIP.js";import"./chunk-YDEVG4CR.js";import{b as jn}from"./chunk-5R3XKSDM.js";import{b as Yn,c as Si}from"./chunk-C7LM5UCK.js";import{b as Gn}from"./chunk-J4XRJAME.js";import{c as Mn}from"./chunk-GH5Z5SPB.js";import{a as et,c as An,f as ai,o as Bn,p as Rn,t as Hn,u as Mi,w as Nn,x as oi}from"./chunk-67VPWIWW.js";import"./chunk-BHV2HCJY.js";import{Ea as si,H as Sn,Ja as Ln,K as Tn,Ka as kn,L as Pn,La as zn,Ma as ri,Na as ge,Q as Ie,R as _t,S as Nt,T as En,Va as Je,b as mn,e as fn,f as gn,h as hn,j as vn,ja as On,k as wn,na as In,p as bn,q as yn,r as _n,s as Cn,x as ni,y as xn}from"./chunk-FMVCTBCQ.js";import{a as cn}from"./chunk-ZGXJEG37.js";import{a as pn}from"./chunk-VFEEFGWW.js";import{c as dn,d as _i,f as Ci,h as xi}from"./chunk-F2X3VGZZ.js";import{A as sn,D as rn,F as an,G as on,H as ln,N as Ht,c as ct,e as ii,f as Ft,g as Bt,h as Rt,i as tn,m as we,n as Oe,s as nn}from"./chunk-B63BKC6F.js";import{Aa as Wi,Ab as Ke,Ac as pe,Bc as Be,Ca as qi,Cb as X,Cc as ti,Da as xe,Ea as wt,Ga as Ee,Jb as Z,Jc as Dt,Ka as Ui,Kb as $,Kc as $t,Mb as Ki,Mc as dt,Nb as Qt,Ob as ye,Pb as Kt,Qb as Zt,Sb as Jt,Tb as ei,Ub as G,V as Xi,Vb as N,Vc as pt,Wb as te,Wc as Vt,Xb as at,Yb as ot,Yc as en,Zb as Me,_b as ve,aa as Yi,ba as Ye,bb as bi,ca as je,cb as qe,dc as ie,ec as H,fc as bt,gb as R,gc as lt,ha as ae,jc as fe,kc as yt,lc as ne,mb as Ue,mc as se,oa as ji,pa as U,pc as Lt,qa as Q,qc as le,rb as Ut,rc as Fe,s as wi,sc as yi,t as Gi,ta as Ae,tc as Zi,vc as kt,wb as he,wc as zt,xb as Qe,xc as At,yc as Ze,za as We,zb as Qi,zc as Ji}from"./chunk-JP6RBSB3.js";import{a as me,b as It}from"./chunk-YQFG5XE2.js";var sr=["*"],rr=({dt:i})=>`
2
2
  .p-inputgroup,
3
3
  .p-inputgroup .p-floatlabel,
4
4
  .p-inputgroup .p-iftalabel {
@@ -325,4 +325,4 @@ import{a as Ti}from"./chunk-VZI3JZPU.js";import{a as un}from"./chunk-VVHTNAHQ.js
325
325
  ${qs(this.passedParams)?`
326
326
  <div part="scrollbar" class="swiper-scrollbar"></div>
327
327
  `:""}
328
- `),this.shadowRoot.appendChild(t),this.rendered=!0}initialize(){var e=this;if(this.swiper&&this.swiper.initialized)return;let{params:t,passedParams:n}=Bi(this);this.swiperParams=t,this.passedParams=n,delete this.swiperParams.init,this.render(),this.swiper=new st(this.shadowRoot.querySelector(".swiper"),It(me(me({},t.virtual?{}:{observer:!0}),t),{touchEventsTarget:"container",onAny:function(s){s==="observerUpdate"&&e.calcSlideSlots();let r=t.eventsPrefix?`${t.eventsPrefix}${s.toLowerCase()}`:s.toLowerCase();for(var a=arguments.length,d=new Array(a>1?a-1:0),u=1;u<a;u++)d[u-1]=arguments[u];let c=new CustomEvent(r,{detail:d,bubbles:s!=="hashChange",cancelable:!0});e.dispatchEvent(c)}}))}connectedCallback(){this.swiper&&this.swiper.initialized&&this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.init===!1||this.getAttribute("init")==="false"||this.initialize()}disconnectedCallback(){this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.swiper&&this.swiper.destroy&&this.swiper.destroy()}updateSwiperOnPropChange(e,t){let{params:n,passedParams:s}=Bi(this,e,t);this.passedParams=s,this.swiperParams=n,!(this.swiper&&this.swiper.params[e]===t)&&Us(me(me(me({swiper:this.swiper,passedParams:this.passedParams,changedParams:[Tt(e)]},e==="navigation"&&s[e]?{prevEl:".swiper-button-prev",nextEl:".swiper-button-next"}:{}),e==="pagination"&&s[e]?{paginationEl:".swiper-pagination"}:{}),e==="scrollbar"&&s[e]?{scrollbarEl:".swiper-scrollbar"}:{}))}attributeChangedCallback(e,t,n){this.swiper&&this.swiper.initialized&&(t==="true"&&n===null&&(n=!1),this.updateSwiperOnPropChange(e,n))}static get observedAttributes(){return St.filter(t=>t.includes("_")).map(t=>t.replace(/[A-Z]/g,n=>`-${n}`).replace("_","").toLowerCase())}};St.forEach(i=>{i!=="init"&&(i=i.replace("_",""),Object.defineProperty(ui.prototype,i,{configurable:!0,get(){return(this.passedParams||{})[i]},set(e){this.passedParams||(this.passedParams={}),this.passedParams[i]=e,this.swiper&&this.swiper.initialized&&this.updateSwiperOnPropChange(i,e)}}))});var Hi=class extends Js{constructor(){super(),this.attachShadow({mode:"open"})}render(){let e=this.lazy||this.getAttribute("lazy")===""||this.getAttribute("lazy")==="true";if(er(this.shadowRoot,bl),this.shadowRoot.appendChild(document.createElement("slot")),e){let t=document.createElement("div");t.classList.add("swiper-lazy-preloader"),t.part.add("preloader"),this.shadowRoot.appendChild(t)}}initialize(){this.render()}connectedCallback(){this.swiperLoopMoveDOM||this.initialize()}},tr=()=>{typeof window>"u"||(window.customElements.get("swiper-container")||window.customElements.define("swiper-container",ui),window.customElements.get("swiper-slide")||window.customElements.define("swiper-slide",Hi))};typeof window<"u"&&(window.SwiperElementRegisterParams=i=>{St.push(...i)});function yl(i,e){if(i&1&&(G(0,"swiper-slide")(1,"div")(2,"a",1),te(3,"img",2),N()(),G(4,"a",3),le(5),N(),G(6,"p",4),le(7),N()()),i&2){let t=e.$implicit;R(2),$("href",t.href,qe),R(),$("src",t.imgSrc,qe),R(),$("href",t.href,qe),R(),Fe(t.title),R(2),Fe(t.description)}}tr();var ir=(()=>{class i{constructor(){this.elementRef=ae(wt),this.newsList=xe([]),this.colorTheme=xe()}ngOnInit(){this.applyThemeColors()}applyThemeColors(){this.elementRef.nativeElement.style.setProperty("--swiper-primary-color",this.colorTheme())}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-news-swiper"]],inputs:{newsList:[1,"newsList"],colorTheme:[1,"colorTheme"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false"],["target","_blank",3,"href"],[1,"border-0","rounded-1","swiper-image",3,"src"],["target","_blank",1,"h5","swiper-text",3,"href"],[1,"mb-0"]],template:function(n,s){n&1&&(G(0,"swiper-container",0),Jt(1,yl,8,5,"swiper-slide",null,Zt),N()),n&2&&(R(),ei(s.newsList()))},dependencies:[we],styles:["[_nghost-%COMP%]{--swiper-primary-color: #89b03e}[_nghost-%COMP%] swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: var(--swiper-primary-color);--swiper-pagination-color: var(--swiper-primary-color);--swiper-pagination-bottom: 0px;margin-top:30px;height:265px}[_nghost-%COMP%] img.swiper-image[_ngcontent-%COMP%]{width:252px;height:152px;margin-bottom:16px}[_nghost-%COMP%] .swiper-text[_ngcontent-%COMP%]{color:var(--swiper-primary-color);font-weight:700}[_nghost-%COMP%] h5[_ngcontent-%COMP%], [_nghost-%COMP%] .h5[_ngcontent-%COMP%]{font-size:.875rem!important}"]})}}return i})();var _l=(i,e)=>({"fa-eye":i,"fa-eye-slash":e});function Cl(i,e){if(i&1&&(G(0,"option",25),le(1),N()),i&2){let t=e.$implicit;$("value",t),R(),Fe(t)}}function xl(i,e){if(i&1){let t=ve();G(0,"div",15)(1,"h2",16),le(2),N(),G(3,"small",17),le(4),N()(),G(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),te(10,"i",22),N()(),G(11,"input",23,0),At("ngModelChange",function(s){U(t);let r=H();return zt(r.subdomain,s)||(r.subdomain=s),Q(s)}),N(),G(13,"div")(14,"select",24),At("ngModelChange",function(s){U(t);let r=H();return zt(r.domain,s)||(r.domain=s),Q(s)}),Jt(15,Cl,2,2,"option",25,Zt),N()()(),G(17,"div",26)(18,"button",27),ie("click",function(){U(t);let s=H();return Q(s.onNextState())}),le(19," Next "),N()()()()}if(i&2){let t=H();R(2),Fe(t.title()),R(2),yi(" ",t.subtitle()," "),R(7),kt("ngModel",t.subdomain),R(3),kt("ngModel",t.domain),R(),ei(t.domains())}}function Ml(i,e){i&1&&(G(0,"span",30),le(1,"to"),N())}function Sl(i,e){if(i&1){let t=ve();G(0,"h6",31)(1,"div",42),le(2),N(),G(3,"i",43),ie("click",function(){U(t);let s=H(2);return Q(s.onEditDomain())}),N()()}if(i&2){let t=H(2);R(2),Zi("(",t.subdomain(),"",t.domain(),")")}}function Tl(i,e){if(i&1){let t=ve();G(0,"div",28)(1,"h3",29)(2,"span"),le(3,"Sign in"),N(),X(4,Ml,2,0,"span",30),N(),X(5,Sl,4,2,"h6",31),N(),G(6,"form",32)(7,"div",20)(8,"div",21)(9,"span"),te(10,"i",33),N()(),G(11,"input",34,1),At("ngModelChange",function(s){U(t);let r=H();return zt(r.username,s)||(r.username=s),Q(s)}),N()(),G(13,"div",35)(14,"div",21)(15,"span"),te(16,"i",36),N()(),G(17,"input",37,2),At("ngModelChange",function(s){U(t);let r=H();return zt(r.password,s)||(r.password=s),Q(s)}),N(),G(19,"span",38)(20,"i",39),ie("click",function(){U(t);let s=H();return Q(s.onHidePassowrd())}),N()()(),G(21,"div",40)(22,"button",41),ie("click",function(){U(t);let s=H();return Q(s.onLogin())}),le(23," Log in "),N()()()}if(i&2){let t=H();R(4),Kt(t.hasSubdomainInput()?4:-1),R(),Kt(t.hasSubdomainInput()?5:-1),R(6),kt("ngModel",t.username),R(6),$("type",t.passwordVisible()?"text":"password"),kt("ngModel",t.password),R(3),$("ngClass",Be(6,_l,t.passwordVisible()===!1,t.passwordVisible()))}}var nr=(()=>{class i{constructor(){this.elementRef=ae(wt),this.toastr=ae(pn),this.changelogUrl=xe(),this.version=xe(),this.domains=xe([".dealpos.co.id",".dealpos.net",".dealpos.com",".dealpos.app"]),this.news=xe([]),this.colorTheme=xe("#1a73e8"),this.subtitle=xe("Your Subtitle Here"),this.title=xe("Your title here"),this.loginChange=qi({alias:"onLoginChange"}),this.hasSubdomainInput=xe(!0),this.loginState=Ee("FORM_DOMAIN"),this.subdomain=Ut(null),this.domain=Ut(".dealpos.app"),this.username=Ut(null),this.password=Ee(null),this.passwordVisible=Ee(!1)}ngOnInit(){document.body.classList.add("login-body"),this.applyThemeColors(),this.initLoginState()}initLoginState(){this.hasSubdomainInput()?this.loginState.set("FORM_DOMAIN"):this.loginState.set("FORM_LOGIN")}onNextState(){if(!this.subdomain()){this.toastr.error("Subdomain is required","Warning");return}this.loginState.set("FORM_LOGIN")}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onHidePassowrd(){this.passwordVisible.set(!this.passwordVisible())}onLogin(){let t=this.subdomain()?.trim(),n={username:this.username(),password:this.password()};this.hasSubdomainInput()&&(n=me({domain:this.domain(),subdomain:t},n)),this.loginChange.emit(n)}applyThemeColors(){this.elementRef.nativeElement.style.setProperty("--login-primary-color",this.colorTheme())}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-login-ui"]],inputs:{changelogUrl:[1,"changelogUrl"],version:[1,"version"],domains:[1,"domains"],news:[1,"news"],colorTheme:[1,"colorTheme"],subtitle:[1,"subtitle"],title:[1,"title"],hasSubdomainInput:[1,"hasSubdomainInput"],subdomain:[1,"subdomain"],domain:[1,"domain"],username:[1,"username"]},outputs:{loginChange:"onLoginChange",subdomain:"subdomainChange",domain:"domainChange",username:"usernameChange"},decls:17,vars:5,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"text-center"],[3,"colorTheme","newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"me-2","mb-0"],[1,"text-secondary-emphasis","fst-italic","opacity-75",2,"font-size","11px"],[2,"margin-top","50px"],[1,"form-block"],[1,"input-group","input-group-lg"],[1,"input-group-text","border-end-0","bg-white",2,"width","52px","border-bottom-left-radius","8px","border-top-left-radius","8px"],[1,"fa-solid","fa-cloud","text-dark","input-icon"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1","fs-4","text-dark",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","rounded-start-0","domain-option",2,"height","58px","border-bottom-right-radius","8px","border-top-right-radius","8px",3,"ngModelChange","ngModel"],[3,"value"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-theme","btn-block","w-100",2,"height","44.6px","border-radius","7px",3,"click"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"fw-normal","mb-0","me-2"],[1,"ms-2"],[1,"fw-normal","mb-0","d-flex","align-items-center"],[2,"margin-top","46px"],[1,"fas","fa-user","fa-lg","text-dark","input-icon"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username","autocomplete","off",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1","text-dark",2,"height","58px",3,"ngModelChange","ngModel"],[1,"input-group","input-group-lg",2,"margin-top","16px"],[1,"fas","fa-key","fa-lg","input-icon","text-dark"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","autofocus","","name","password","autocomplete","off",1,"form-control","form-control-lg","rounded-end","border-start-0","border-end-0","ps-1","text-dark",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end","bg-white"],[1,"input-icon","fa",3,"click","ngClass"],[1,"w-100",2,"margin-top","16px"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-theme","btn-block","w-100",3,"click"],[1,"text-theme","me-2"],["title","Edit Store Address",1,"fa-solid","fa-edit","text-theme","pointer",2,"font-size","0.875rem",3,"click"]],template:function(n,s){n&1&&(G(0,"div",3)(1,"div",4)(2,"div",5)(3,"h2",6),le(4,"New Features"),N(),te(5,"app-news-swiper",7),N(),G(6,"div",8),X(7,xl,20,4)(8,Tl,24,9),N()(),G(9,"div",9)(10,"span",10),le(11,"powered by :"),N(),te(12,"a",11),N(),G(13,"div",12)(14,"a",13),le(15),te(16,"i",14),N()()()),n&2&&(R(5),$("colorTheme",s.colorTheme())("newsList",s.news()),R(2),Kt(s.loginState()=="FORM_DOMAIN"?7:8),R(7),$("href",s.changelogUrl(),qe),R(),yi("version ",s.version(),""))},dependencies:[we,ct,ni,wn,yn,_n,mn,bn,fn,gn,Cn,vn,hn,ir],styles:["[_nghost-%COMP%]{--login-primary-color: red}[_nghost-%COMP%] .mt-0[_ngcontent-%COMP%]{margin-top:0!important}[_nghost-%COMP%] .mb-0[_ngcontent-%COMP%]{margin-bottom:0!important}[_nghost-%COMP%] .ms-0[_ngcontent-%COMP%]{margin-left:0!important}[_nghost-%COMP%] .me-0[_ngcontent-%COMP%]{margin-right:0!important}[_nghost-%COMP%] .mx-0[_ngcontent-%COMP%]{margin-left:0!important;margin-right:0!important}[_nghost-%COMP%] .my-0[_ngcontent-%COMP%]{margin-top:0!important;margin-bottom:0!important}[_nghost-%COMP%] .m-0[_ngcontent-%COMP%]{margin:0!important}[_nghost-%COMP%] .pt-0[_ngcontent-%COMP%]{padding-top:0!important}[_nghost-%COMP%] .pb-0[_ngcontent-%COMP%]{padding-bottom:0!important}[_nghost-%COMP%] .ps-0[_ngcontent-%COMP%]{padding-left:0!important}[_nghost-%COMP%] .pe-0[_ngcontent-%COMP%]{padding-right:0!important}[_nghost-%COMP%] .px-0[_ngcontent-%COMP%]{padding-left:0!important;padding-right:0!important}[_nghost-%COMP%] .py-0[_ngcontent-%COMP%]{padding-top:0!important;padding-bottom:0!important}[_nghost-%COMP%] .p-0[_ngcontent-%COMP%]{padding:0!important}[_nghost-%COMP%] .gap-0[_ngcontent-%COMP%]{gap:0!important}[_nghost-%COMP%] .mt-1[_ngcontent-%COMP%]{margin-top:.125rem!important}[_nghost-%COMP%] .mb-1[_ngcontent-%COMP%]{margin-bottom:.125rem!important}[_nghost-%COMP%] .ms-1[_ngcontent-%COMP%]{margin-left:.125rem!important}[_nghost-%COMP%] .me-1[_ngcontent-%COMP%]{margin-right:.125rem!important}[_nghost-%COMP%] .mx-1[_ngcontent-%COMP%]{margin-left:.125rem!important;margin-right:.125rem!important}[_nghost-%COMP%] .my-1[_ngcontent-%COMP%]{margin-top:.125rem!important;margin-bottom:.125rem!important}[_nghost-%COMP%] .m-1[_ngcontent-%COMP%]{margin:.125rem!important}[_nghost-%COMP%] .pt-1[_ngcontent-%COMP%]{padding-top:.125rem!important}[_nghost-%COMP%] .pb-1[_ngcontent-%COMP%]{padding-bottom:.125rem!important}[_nghost-%COMP%] .ps-1[_ngcontent-%COMP%]{padding-left:.125rem!important}[_nghost-%COMP%] .pe-1[_ngcontent-%COMP%]{padding-right:.125rem!important}[_nghost-%COMP%] .px-1[_ngcontent-%COMP%]{padding-left:.125rem!important;padding-right:.125rem!important}[_nghost-%COMP%] .py-1[_ngcontent-%COMP%]{padding-top:.125rem!important;padding-bottom:.125rem!important}[_nghost-%COMP%] .p-1[_ngcontent-%COMP%]{padding:.125rem!important}[_nghost-%COMP%] .gap-1[_ngcontent-%COMP%]{gap:.125rem!important}[_nghost-%COMP%] .mt-2[_ngcontent-%COMP%]{margin-top:.25rem!important}[_nghost-%COMP%] .mb-2[_ngcontent-%COMP%]{margin-bottom:.25rem!important}[_nghost-%COMP%] .ms-2[_ngcontent-%COMP%]{margin-left:.25rem!important}[_nghost-%COMP%] .me-2[_ngcontent-%COMP%]{margin-right:.25rem!important}[_nghost-%COMP%] .mx-2[_ngcontent-%COMP%]{margin-left:.25rem!important;margin-right:.25rem!important}[_nghost-%COMP%] .my-2[_ngcontent-%COMP%]{margin-top:.25rem!important;margin-bottom:.25rem!important}[_nghost-%COMP%] .m-2[_ngcontent-%COMP%]{margin:.25rem!important}[_nghost-%COMP%] .pt-2[_ngcontent-%COMP%]{padding-top:.25rem!important}[_nghost-%COMP%] .pb-2[_ngcontent-%COMP%]{padding-bottom:.25rem!important}[_nghost-%COMP%] .ps-2[_ngcontent-%COMP%]{padding-left:.25rem!important}[_nghost-%COMP%] .pe-2[_ngcontent-%COMP%]{padding-right:.25rem!important}[_nghost-%COMP%] .px-2[_ngcontent-%COMP%]{padding-left:.25rem!important;padding-right:.25rem!important}[_nghost-%COMP%] .py-2[_ngcontent-%COMP%]{padding-top:.25rem!important;padding-bottom:.25rem!important}[_nghost-%COMP%] .p-2[_ngcontent-%COMP%]{padding:.25rem!important}[_nghost-%COMP%] .gap-2[_ngcontent-%COMP%]{gap:.25rem!important}[_nghost-%COMP%] .mt-3[_ngcontent-%COMP%]{margin-top:.375rem!important}[_nghost-%COMP%] .mb-3[_ngcontent-%COMP%]{margin-bottom:.375rem!important}[_nghost-%COMP%] .ms-3[_ngcontent-%COMP%]{margin-left:.375rem!important}[_nghost-%COMP%] .me-3[_ngcontent-%COMP%]{margin-right:.375rem!important}[_nghost-%COMP%] .mx-3[_ngcontent-%COMP%]{margin-left:.375rem!important;margin-right:.375rem!important}[_nghost-%COMP%] .my-3[_ngcontent-%COMP%]{margin-top:.375rem!important;margin-bottom:.375rem!important}[_nghost-%COMP%] .m-3[_ngcontent-%COMP%]{margin:.375rem!important}[_nghost-%COMP%] .pt-3[_ngcontent-%COMP%]{padding-top:.375rem!important}[_nghost-%COMP%] .pb-3[_ngcontent-%COMP%]{padding-bottom:.375rem!important}[_nghost-%COMP%] .ps-3[_ngcontent-%COMP%]{padding-left:.375rem!important}[_nghost-%COMP%] .pe-3[_ngcontent-%COMP%]{padding-right:.375rem!important}[_nghost-%COMP%] .px-3[_ngcontent-%COMP%]{padding-left:.375rem!important;padding-right:.375rem!important}[_nghost-%COMP%] .py-3[_ngcontent-%COMP%]{padding-top:.375rem!important;padding-bottom:.375rem!important}[_nghost-%COMP%] .p-3[_ngcontent-%COMP%]{padding:.375rem!important}[_nghost-%COMP%] .gap-3[_ngcontent-%COMP%]{gap:.375rem!important}[_nghost-%COMP%] .mt-4[_ngcontent-%COMP%]{margin-top:.5rem!important}[_nghost-%COMP%] .mb-4[_ngcontent-%COMP%]{margin-bottom:.5rem!important}[_nghost-%COMP%] .ms-4[_ngcontent-%COMP%]{margin-left:.5rem!important}[_nghost-%COMP%] .me-4[_ngcontent-%COMP%]{margin-right:.5rem!important}[_nghost-%COMP%] .mx-4[_ngcontent-%COMP%]{margin-left:.5rem!important;margin-right:.5rem!important}[_nghost-%COMP%] .my-4[_ngcontent-%COMP%]{margin-top:.5rem!important;margin-bottom:.5rem!important}[_nghost-%COMP%] .m-4[_ngcontent-%COMP%]{margin:.5rem!important}[_nghost-%COMP%] .pt-4[_ngcontent-%COMP%]{padding-top:.5rem!important}[_nghost-%COMP%] .pb-4[_ngcontent-%COMP%]{padding-bottom:.5rem!important}[_nghost-%COMP%] .ps-4[_ngcontent-%COMP%]{padding-left:.5rem!important}[_nghost-%COMP%] .pe-4[_ngcontent-%COMP%]{padding-right:.5rem!important}[_nghost-%COMP%] .px-4[_ngcontent-%COMP%]{padding-left:.5rem!important;padding-right:.5rem!important}[_nghost-%COMP%] .py-4[_ngcontent-%COMP%]{padding-top:.5rem!important;padding-bottom:.5rem!important}[_nghost-%COMP%] .p-4[_ngcontent-%COMP%]{padding:.5rem!important}[_nghost-%COMP%] .gap-4[_ngcontent-%COMP%]{gap:.5rem!important}[_nghost-%COMP%] .mt-5[_ngcontent-%COMP%]{margin-top:.625rem!important}[_nghost-%COMP%] .mb-5[_ngcontent-%COMP%]{margin-bottom:.625rem!important}[_nghost-%COMP%] .ms-5[_ngcontent-%COMP%]{margin-left:.625rem!important}[_nghost-%COMP%] .me-5[_ngcontent-%COMP%]{margin-right:.625rem!important}[_nghost-%COMP%] .mx-5[_ngcontent-%COMP%]{margin-left:.625rem!important;margin-right:.625rem!important}[_nghost-%COMP%] .my-5[_ngcontent-%COMP%]{margin-top:.625rem!important;margin-bottom:.625rem!important}[_nghost-%COMP%] .m-5[_ngcontent-%COMP%]{margin:.625rem!important}[_nghost-%COMP%] .pt-5[_ngcontent-%COMP%]{padding-top:.625rem!important}[_nghost-%COMP%] .pb-5[_ngcontent-%COMP%]{padding-bottom:.625rem!important}[_nghost-%COMP%] .ps-5[_ngcontent-%COMP%]{padding-left:.625rem!important}[_nghost-%COMP%] .pe-5[_ngcontent-%COMP%]{padding-right:.625rem!important}[_nghost-%COMP%] .px-5[_ngcontent-%COMP%]{padding-left:.625rem!important;padding-right:.625rem!important}[_nghost-%COMP%] .py-5[_ngcontent-%COMP%]{padding-top:.625rem!important;padding-bottom:.625rem!important}[_nghost-%COMP%] .p-5[_ngcontent-%COMP%]{padding:.625rem!important}[_nghost-%COMP%] .gap-5[_ngcontent-%COMP%]{gap:.625rem!important}[_nghost-%COMP%] .mt-6[_ngcontent-%COMP%]{margin-top:.75rem!important}[_nghost-%COMP%] .mb-6[_ngcontent-%COMP%]{margin-bottom:.75rem!important}[_nghost-%COMP%] .ms-6[_ngcontent-%COMP%]{margin-left:.75rem!important}[_nghost-%COMP%] .me-6[_ngcontent-%COMP%]{margin-right:.75rem!important}[_nghost-%COMP%] .mx-6[_ngcontent-%COMP%]{margin-left:.75rem!important;margin-right:.75rem!important}[_nghost-%COMP%] .my-6[_ngcontent-%COMP%]{margin-top:.75rem!important;margin-bottom:.75rem!important}[_nghost-%COMP%] .m-6[_ngcontent-%COMP%]{margin:.75rem!important}[_nghost-%COMP%] .pt-6[_ngcontent-%COMP%]{padding-top:.75rem!important}[_nghost-%COMP%] .pb-6[_ngcontent-%COMP%]{padding-bottom:.75rem!important}[_nghost-%COMP%] .ps-6[_ngcontent-%COMP%]{padding-left:.75rem!important}[_nghost-%COMP%] .pe-6[_ngcontent-%COMP%]{padding-right:.75rem!important}[_nghost-%COMP%] .px-6[_ngcontent-%COMP%]{padding-left:.75rem!important;padding-right:.75rem!important}[_nghost-%COMP%] .py-6[_ngcontent-%COMP%]{padding-top:.75rem!important;padding-bottom:.75rem!important}[_nghost-%COMP%] .p-6[_ngcontent-%COMP%]{padding:.75rem!important}[_nghost-%COMP%] .gap-6[_ngcontent-%COMP%]{gap:.75rem!important}[_nghost-%COMP%] .mt-7[_ngcontent-%COMP%]{margin-top:.875rem!important}[_nghost-%COMP%] .mb-7[_ngcontent-%COMP%]{margin-bottom:.875rem!important}[_nghost-%COMP%] .ms-7[_ngcontent-%COMP%]{margin-left:.875rem!important}[_nghost-%COMP%] .me-7[_ngcontent-%COMP%]{margin-right:.875rem!important}[_nghost-%COMP%] .mx-7[_ngcontent-%COMP%]{margin-left:.875rem!important;margin-right:.875rem!important}[_nghost-%COMP%] .my-7[_ngcontent-%COMP%]{margin-top:.875rem!important;margin-bottom:.875rem!important}[_nghost-%COMP%] .m-7[_ngcontent-%COMP%]{margin:.875rem!important}[_nghost-%COMP%] .pt-7[_ngcontent-%COMP%]{padding-top:.875rem!important}[_nghost-%COMP%] .pb-7[_ngcontent-%COMP%]{padding-bottom:.875rem!important}[_nghost-%COMP%] .ps-7[_ngcontent-%COMP%]{padding-left:.875rem!important}[_nghost-%COMP%] .pe-7[_ngcontent-%COMP%]{padding-right:.875rem!important}[_nghost-%COMP%] .px-7[_ngcontent-%COMP%]{padding-left:.875rem!important;padding-right:.875rem!important}[_nghost-%COMP%] .py-7[_ngcontent-%COMP%]{padding-top:.875rem!important;padding-bottom:.875rem!important}[_nghost-%COMP%] .p-7[_ngcontent-%COMP%]{padding:.875rem!important}[_nghost-%COMP%] .gap-7[_ngcontent-%COMP%]{gap:.875rem!important}[_nghost-%COMP%] .mt-8[_ngcontent-%COMP%]{margin-top:1rem!important}[_nghost-%COMP%] .mb-8[_ngcontent-%COMP%]{margin-bottom:1rem!important}[_nghost-%COMP%] .ms-8[_ngcontent-%COMP%]{margin-left:1rem!important}[_nghost-%COMP%] .me-8[_ngcontent-%COMP%]{margin-right:1rem!important}[_nghost-%COMP%] .mx-8[_ngcontent-%COMP%]{margin-left:1rem!important;margin-right:1rem!important}[_nghost-%COMP%] .my-8[_ngcontent-%COMP%]{margin-top:1rem!important;margin-bottom:1rem!important}[_nghost-%COMP%] .m-8[_ngcontent-%COMP%]{margin:1rem!important}[_nghost-%COMP%] .pt-8[_ngcontent-%COMP%]{padding-top:1rem!important}[_nghost-%COMP%] .pb-8[_ngcontent-%COMP%]{padding-bottom:1rem!important}[_nghost-%COMP%] .ps-8[_ngcontent-%COMP%]{padding-left:1rem!important}[_nghost-%COMP%] .pe-8[_ngcontent-%COMP%]{padding-right:1rem!important}[_nghost-%COMP%] .px-8[_ngcontent-%COMP%]{padding-left:1rem!important;padding-right:1rem!important}[_nghost-%COMP%] .py-8[_ngcontent-%COMP%]{padding-top:1rem!important;padding-bottom:1rem!important}[_nghost-%COMP%] .p-8[_ngcontent-%COMP%]{padding:1rem!important}[_nghost-%COMP%] .gap-8[_ngcontent-%COMP%]{gap:1rem!important}[_nghost-%COMP%] .mt-9[_ngcontent-%COMP%]{margin-top:1.125rem!important}[_nghost-%COMP%] .mb-9[_ngcontent-%COMP%]{margin-bottom:1.125rem!important}[_nghost-%COMP%] .ms-9[_ngcontent-%COMP%]{margin-left:1.125rem!important}[_nghost-%COMP%] .me-9[_ngcontent-%COMP%]{margin-right:1.125rem!important}[_nghost-%COMP%] .mx-9[_ngcontent-%COMP%]{margin-left:1.125rem!important;margin-right:1.125rem!important}[_nghost-%COMP%] .my-9[_ngcontent-%COMP%]{margin-top:1.125rem!important;margin-bottom:1.125rem!important}[_nghost-%COMP%] .m-9[_ngcontent-%COMP%]{margin:1.125rem!important}[_nghost-%COMP%] .pt-9[_ngcontent-%COMP%]{padding-top:1.125rem!important}[_nghost-%COMP%] .pb-9[_ngcontent-%COMP%]{padding-bottom:1.125rem!important}[_nghost-%COMP%] .ps-9[_ngcontent-%COMP%]{padding-left:1.125rem!important}[_nghost-%COMP%] .pe-9[_ngcontent-%COMP%]{padding-right:1.125rem!important}[_nghost-%COMP%] .px-9[_ngcontent-%COMP%]{padding-left:1.125rem!important;padding-right:1.125rem!important}[_nghost-%COMP%] .py-9[_ngcontent-%COMP%]{padding-top:1.125rem!important;padding-bottom:1.125rem!important}[_nghost-%COMP%] .p-9[_ngcontent-%COMP%]{padding:1.125rem!important}[_nghost-%COMP%] .gap-9[_ngcontent-%COMP%]{gap:1.125rem!important}[_nghost-%COMP%] .mt-10[_ngcontent-%COMP%]{margin-top:1.25rem!important}[_nghost-%COMP%] .mb-10[_ngcontent-%COMP%]{margin-bottom:1.25rem!important}[_nghost-%COMP%] .ms-10[_ngcontent-%COMP%]{margin-left:1.25rem!important}[_nghost-%COMP%] .me-10[_ngcontent-%COMP%]{margin-right:1.25rem!important}[_nghost-%COMP%] .mx-10[_ngcontent-%COMP%]{margin-left:1.25rem!important;margin-right:1.25rem!important}[_nghost-%COMP%] .my-10[_ngcontent-%COMP%]{margin-top:1.25rem!important;margin-bottom:1.25rem!important}[_nghost-%COMP%] .m-10[_ngcontent-%COMP%]{margin:1.25rem!important}[_nghost-%COMP%] .pt-10[_ngcontent-%COMP%]{padding-top:1.25rem!important}[_nghost-%COMP%] .pb-10[_ngcontent-%COMP%]{padding-bottom:1.25rem!important}[_nghost-%COMP%] .ps-10[_ngcontent-%COMP%]{padding-left:1.25rem!important}[_nghost-%COMP%] .pe-10[_ngcontent-%COMP%]{padding-right:1.25rem!important}[_nghost-%COMP%] .px-10[_ngcontent-%COMP%]{padding-left:1.25rem!important;padding-right:1.25rem!important}[_nghost-%COMP%] .py-10[_ngcontent-%COMP%]{padding-top:1.25rem!important;padding-bottom:1.25rem!important}[_nghost-%COMP%] .p-10[_ngcontent-%COMP%]{padding:1.25rem!important}[_nghost-%COMP%] .gap-10[_ngcontent-%COMP%]{gap:1.25rem!important}[_nghost-%COMP%] .mt-11[_ngcontent-%COMP%]{margin-top:1.375rem!important}[_nghost-%COMP%] .mb-11[_ngcontent-%COMP%]{margin-bottom:1.375rem!important}[_nghost-%COMP%] .ms-11[_ngcontent-%COMP%]{margin-left:1.375rem!important}[_nghost-%COMP%] .me-11[_ngcontent-%COMP%]{margin-right:1.375rem!important}[_nghost-%COMP%] .mx-11[_ngcontent-%COMP%]{margin-left:1.375rem!important;margin-right:1.375rem!important}[_nghost-%COMP%] .my-11[_ngcontent-%COMP%]{margin-top:1.375rem!important;margin-bottom:1.375rem!important}[_nghost-%COMP%] .m-11[_ngcontent-%COMP%]{margin:1.375rem!important}[_nghost-%COMP%] .pt-11[_ngcontent-%COMP%]{padding-top:1.375rem!important}[_nghost-%COMP%] .pb-11[_ngcontent-%COMP%]{padding-bottom:1.375rem!important}[_nghost-%COMP%] .ps-11[_ngcontent-%COMP%]{padding-left:1.375rem!important}[_nghost-%COMP%] .pe-11[_ngcontent-%COMP%]{padding-right:1.375rem!important}[_nghost-%COMP%] .px-11[_ngcontent-%COMP%]{padding-left:1.375rem!important;padding-right:1.375rem!important}[_nghost-%COMP%] .py-11[_ngcontent-%COMP%]{padding-top:1.375rem!important;padding-bottom:1.375rem!important}[_nghost-%COMP%] .p-11[_ngcontent-%COMP%]{padding:1.375rem!important}[_nghost-%COMP%] .gap-11[_ngcontent-%COMP%]{gap:1.375rem!important}[_nghost-%COMP%] .mt-12[_ngcontent-%COMP%]{margin-top:1.5rem!important}[_nghost-%COMP%] .mb-12[_ngcontent-%COMP%]{margin-bottom:1.5rem!important}[_nghost-%COMP%] .ms-12[_ngcontent-%COMP%]{margin-left:1.5rem!important}[_nghost-%COMP%] .me-12[_ngcontent-%COMP%]{margin-right:1.5rem!important}[_nghost-%COMP%] .mx-12[_ngcontent-%COMP%]{margin-left:1.5rem!important;margin-right:1.5rem!important}[_nghost-%COMP%] .my-12[_ngcontent-%COMP%]{margin-top:1.5rem!important;margin-bottom:1.5rem!important}[_nghost-%COMP%] .m-12[_ngcontent-%COMP%]{margin:1.5rem!important}[_nghost-%COMP%] .pt-12[_ngcontent-%COMP%]{padding-top:1.5rem!important}[_nghost-%COMP%] .pb-12[_ngcontent-%COMP%]{padding-bottom:1.5rem!important}[_nghost-%COMP%] .ps-12[_ngcontent-%COMP%]{padding-left:1.5rem!important}[_nghost-%COMP%] .pe-12[_ngcontent-%COMP%]{padding-right:1.5rem!important}[_nghost-%COMP%] .px-12[_ngcontent-%COMP%]{padding-left:1.5rem!important;padding-right:1.5rem!important}[_nghost-%COMP%] .py-12[_ngcontent-%COMP%]{padding-top:1.5rem!important;padding-bottom:1.5rem!important}[_nghost-%COMP%] .p-12[_ngcontent-%COMP%]{padding:1.5rem!important}[_nghost-%COMP%] .gap-12[_ngcontent-%COMP%]{gap:1.5rem!important}[_nghost-%COMP%] h1[_ngcontent-%COMP%], [_nghost-%COMP%] .h1[_ngcontent-%COMP%]{font-size:1.375rem;font-weight:500!important}[_nghost-%COMP%] h2[_ngcontent-%COMP%], [_nghost-%COMP%] .h2[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500!important}[_nghost-%COMP%] h3[_ngcontent-%COMP%], [_nghost-%COMP%] .h3[_ngcontent-%COMP%]{font-size:1.125rem;font-weight:500!important}[_nghost-%COMP%] h4[_ngcontent-%COMP%], [_nghost-%COMP%] .h4[_ngcontent-%COMP%]{font-size:1rem;font-weight:500!important}[_nghost-%COMP%] h5[_ngcontent-%COMP%], [_nghost-%COMP%] .h5[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500!important}[_nghost-%COMP%] h6[_ngcontent-%COMP%], [_nghost-%COMP%] .h6[_ngcontent-%COMP%]{font-size:.75rem;font-weight:500!important}[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px;min-height:370px}@media (max-width: 768px){[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{margin-top:30px}}[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{box-shadow:none;border-color:#dfe5ef!important}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid var(--login-primary-color);border-right:1px solid var(--login-primary-color);border-top:1px solid var(--login-primary-color);border-radius:0 10px 10px 0}}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:15px!important}@media (max-width: 768px){[_nghost-%COMP%] .features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){[_nghost-%COMP%] .features-pane[_ngcontent-%COMP%]{border-left:1px solid var(--login-primary-color);border-bottom:1px solid var(--login-primary-color);border-top:1px solid var(--login-primary-color);border-radius:10px 0 0 10px}}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{position:fixed;bottom:1.25rem;left:1.25rem;margin-left:20px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}[_nghost-%COMP%] .version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:fixed;margin-right:18px}@media (max-width: 768px){[_nghost-%COMP%] .copyright[_ngcontent-%COMP%], [_nghost-%COMP%] .version[_ngcontent-%COMP%]{position:static;margin-top:10px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{justify-content:center}}[_nghost-%COMP%] div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}[_nghost-%COMP%] button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}[_nghost-%COMP%] .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}[_nghost-%COMP%] .fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}[_nghost-%COMP%] .domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}[_nghost-%COMP%] .btn-theme[_ngcontent-%COMP%]{background-color:var(--login-primary-color)!important;color:#fff!important;font-size:14px;height:36.6px;border-radius:7px}[_nghost-%COMP%] .text-theme[_ngcontent-%COMP%]{color:var(--login-primary-color)!important}[_nghost-%COMP%] .input-icon[_ngcontent-%COMP%]{font-size:15px}"]})}}return i})();var em=(()=>{class i{constructor(){this.authService=ae(un),this.router=ae(an),this.httpService=ae(cn),this.appVersion=Ti.version,this.changelogUrl=Ti.changelogUrl,this.route=ae(rn),this.roleService=ae(Xn),this.subdomain=Ee(""),this.domain=Ee(""),this.username=Ee("")}ngOnInit(){this.initNews()}ngAfterViewInit(){this.subdomain.set(localStorage.getItem("AUTH_SUB_DOMAIN")||""),this.username.set(localStorage.getItem("AUTH_USERNAME")||""),this.domain.set(localStorage.getItem("AUTH_DOMAIN")||"")}initNews(){let t=new nn().set("fetch","children:books").set("sort","sortOrder:asc");this.news$=this.httpService.get("https://changelog.dealpos.app/","umbraco/delivery/api/v2/content",{params:t}).pipe(wi(n=>n.items.map(r=>r.properties)),Xi(1))}onLogin(t){let n={SubDomain:t.subdomain+t.domain,Username:t.username,Password:t.password};Gi([this.authService.login(n),this.route.queryParams.pipe(wi(s=>s.returnUrl||"/"))]).subscribe(s=>{let r=s[1];if(r=="/"){if(this.roleService.report.view){if(!this.roleService.coa.view){this.router.navigate(["/pages/journal/journal-entry"]);return}}else{this.router.navigate(["/pages/chart-of-account/account"]);return}this.router.navigate(["/pages/dashboard"])}else this.router.navigate([r])})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-login"]],decls:2,vars:8,consts:[["colorTheme","#0a8754","title","DealPOS Accounting","subtitle","Streamline Your Accounting with Ease",3,"onLoginChange","news","subdomain","domain","username","version","changelogUrl"]],template:function(n,s){n&1&&(G(0,"app-login-ui",0),Dt(1,"async"),ie("onLoginChange",function(a){return s.onLogin(a)}),N()),n&2&&$("news",$t(1,6,s.news$))("subdomain",s.subdomain())("domain",s.domain())("username",s.username())("version",s.appVersion)("changelogUrl",s.changelogUrl)},dependencies:[we,tn,Ht,Mn,qn,xn,ni,Bn,Qn,Zn,oi,ss,Wn,jn,Gn,os,nr],encapsulation:2})}}return i})();export{em as LoginComponent};
328
+ `),this.shadowRoot.appendChild(t),this.rendered=!0}initialize(){var e=this;if(this.swiper&&this.swiper.initialized)return;let{params:t,passedParams:n}=Bi(this);this.swiperParams=t,this.passedParams=n,delete this.swiperParams.init,this.render(),this.swiper=new st(this.shadowRoot.querySelector(".swiper"),It(me(me({},t.virtual?{}:{observer:!0}),t),{touchEventsTarget:"container",onAny:function(s){s==="observerUpdate"&&e.calcSlideSlots();let r=t.eventsPrefix?`${t.eventsPrefix}${s.toLowerCase()}`:s.toLowerCase();for(var a=arguments.length,d=new Array(a>1?a-1:0),u=1;u<a;u++)d[u-1]=arguments[u];let c=new CustomEvent(r,{detail:d,bubbles:s!=="hashChange",cancelable:!0});e.dispatchEvent(c)}}))}connectedCallback(){this.swiper&&this.swiper.initialized&&this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.init===!1||this.getAttribute("init")==="false"||this.initialize()}disconnectedCallback(){this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.swiper&&this.swiper.destroy&&this.swiper.destroy()}updateSwiperOnPropChange(e,t){let{params:n,passedParams:s}=Bi(this,e,t);this.passedParams=s,this.swiperParams=n,!(this.swiper&&this.swiper.params[e]===t)&&Us(me(me(me({swiper:this.swiper,passedParams:this.passedParams,changedParams:[Tt(e)]},e==="navigation"&&s[e]?{prevEl:".swiper-button-prev",nextEl:".swiper-button-next"}:{}),e==="pagination"&&s[e]?{paginationEl:".swiper-pagination"}:{}),e==="scrollbar"&&s[e]?{scrollbarEl:".swiper-scrollbar"}:{}))}attributeChangedCallback(e,t,n){this.swiper&&this.swiper.initialized&&(t==="true"&&n===null&&(n=!1),this.updateSwiperOnPropChange(e,n))}static get observedAttributes(){return St.filter(t=>t.includes("_")).map(t=>t.replace(/[A-Z]/g,n=>`-${n}`).replace("_","").toLowerCase())}};St.forEach(i=>{i!=="init"&&(i=i.replace("_",""),Object.defineProperty(ui.prototype,i,{configurable:!0,get(){return(this.passedParams||{})[i]},set(e){this.passedParams||(this.passedParams={}),this.passedParams[i]=e,this.swiper&&this.swiper.initialized&&this.updateSwiperOnPropChange(i,e)}}))});var Hi=class extends Js{constructor(){super(),this.attachShadow({mode:"open"})}render(){let e=this.lazy||this.getAttribute("lazy")===""||this.getAttribute("lazy")==="true";if(er(this.shadowRoot,bl),this.shadowRoot.appendChild(document.createElement("slot")),e){let t=document.createElement("div");t.classList.add("swiper-lazy-preloader"),t.part.add("preloader"),this.shadowRoot.appendChild(t)}}initialize(){this.render()}connectedCallback(){this.swiperLoopMoveDOM||this.initialize()}},tr=()=>{typeof window>"u"||(window.customElements.get("swiper-container")||window.customElements.define("swiper-container",ui),window.customElements.get("swiper-slide")||window.customElements.define("swiper-slide",Hi))};typeof window<"u"&&(window.SwiperElementRegisterParams=i=>{St.push(...i)});function yl(i,e){if(i&1&&(G(0,"swiper-slide")(1,"div")(2,"a",1),te(3,"img",2),N()(),G(4,"a",3),le(5),N(),G(6,"p",4),le(7),N()()),i&2){let t=e.$implicit;R(2),$("href",t.href,qe),R(),$("src",t.imgSrc,qe),R(),$("href",t.href,qe),R(),Fe(t.title),R(2),Fe(t.description)}}tr();var ir=(()=>{class i{constructor(){this.elementRef=ae(wt),this.newsList=xe([]),this.colorTheme=xe()}ngOnInit(){this.applyThemeColors()}applyThemeColors(){this.elementRef.nativeElement.style.setProperty("--swiper-primary-color",this.colorTheme())}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-news-swiper"]],inputs:{newsList:[1,"newsList"],colorTheme:[1,"colorTheme"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false"],["target","_blank",3,"href"],[1,"border-0","rounded-1","swiper-image",3,"src"],["target","_blank",1,"h5","swiper-text",3,"href"],[1,"mb-0"]],template:function(n,s){n&1&&(G(0,"swiper-container",0),Jt(1,yl,8,5,"swiper-slide",null,Zt),N()),n&2&&(R(),ei(s.newsList()))},dependencies:[we],styles:["[_nghost-%COMP%]{--swiper-primary-color: #89b03e}[_nghost-%COMP%] swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: var(--swiper-primary-color);--swiper-pagination-color: var(--swiper-primary-color);--swiper-pagination-bottom: 0px;margin-top:30px;height:265px}[_nghost-%COMP%] img.swiper-image[_ngcontent-%COMP%]{width:252px;height:152px;margin-bottom:16px}[_nghost-%COMP%] .swiper-text[_ngcontent-%COMP%]{color:var(--swiper-primary-color);font-weight:700}[_nghost-%COMP%] h5[_ngcontent-%COMP%], [_nghost-%COMP%] .h5[_ngcontent-%COMP%]{font-size:.875rem!important}"]})}}return i})();var _l=(i,e)=>({"fa-eye":i,"fa-eye-slash":e});function Cl(i,e){if(i&1&&(G(0,"option",25),le(1),N()),i&2){let t=e.$implicit;$("value",t),R(),Fe(t)}}function xl(i,e){if(i&1){let t=ve();G(0,"div",15)(1,"h2",16),le(2),N(),G(3,"small",17),le(4),N()(),G(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),te(10,"i",22),N()(),G(11,"input",23,0),At("ngModelChange",function(s){U(t);let r=H();return zt(r.subdomain,s)||(r.subdomain=s),Q(s)}),N(),G(13,"div")(14,"select",24),At("ngModelChange",function(s){U(t);let r=H();return zt(r.domain,s)||(r.domain=s),Q(s)}),Jt(15,Cl,2,2,"option",25,Zt),N()()(),G(17,"div",26)(18,"button",27),ie("click",function(){U(t);let s=H();return Q(s.onNextState())}),le(19," Next "),N()()()()}if(i&2){let t=H();R(2),Fe(t.title()),R(2),yi(" ",t.subtitle()," "),R(7),kt("ngModel",t.subdomain),R(3),kt("ngModel",t.domain),R(),ei(t.domains())}}function Ml(i,e){i&1&&(G(0,"span",30),le(1,"to"),N())}function Sl(i,e){if(i&1){let t=ve();G(0,"h6",31)(1,"div",42),le(2),N(),G(3,"i",43),ie("click",function(){U(t);let s=H(2);return Q(s.onEditDomain())}),N()()}if(i&2){let t=H(2);R(2),Zi("(",t.subdomain(),"",t.domain(),")")}}function Tl(i,e){if(i&1){let t=ve();G(0,"div",28)(1,"h3",29)(2,"span"),le(3,"Sign in"),N(),X(4,Ml,2,0,"span",30),N(),X(5,Sl,4,2,"h6",31),N(),G(6,"form",32)(7,"div",20)(8,"div",21)(9,"span"),te(10,"i",33),N()(),G(11,"input",34,1),At("ngModelChange",function(s){U(t);let r=H();return zt(r.username,s)||(r.username=s),Q(s)}),N()(),G(13,"div",35)(14,"div",21)(15,"span"),te(16,"i",36),N()(),G(17,"input",37,2),At("ngModelChange",function(s){U(t);let r=H();return zt(r.password,s)||(r.password=s),Q(s)}),N(),G(19,"span",38)(20,"i",39),ie("click",function(){U(t);let s=H();return Q(s.onHidePassowrd())}),N()()(),G(21,"div",40)(22,"button",41),ie("click",function(){U(t);let s=H();return Q(s.onLogin())}),le(23," Log in "),N()()()}if(i&2){let t=H();R(4),Kt(t.hasSubdomainInput()?4:-1),R(),Kt(t.hasSubdomainInput()?5:-1),R(6),kt("ngModel",t.username),R(6),$("type",t.passwordVisible()?"text":"password"),kt("ngModel",t.password),R(3),$("ngClass",Be(6,_l,t.passwordVisible()===!1,t.passwordVisible()))}}var nr=(()=>{class i{constructor(){this.elementRef=ae(wt),this.toastr=ae(pn),this.changelogUrl=xe(),this.version=xe(),this.domains=xe([".dealpos.co.id",".dealpos.net",".dealpos.com",".dealpos.app"]),this.news=xe([]),this.colorTheme=xe("#1a73e8"),this.subtitle=xe("Your Subtitle Here"),this.title=xe("Your title here"),this.loginChange=qi({alias:"onLoginChange"}),this.hasSubdomainInput=xe(!0),this.loginState=Ee("FORM_DOMAIN"),this.subdomain=Ut(null),this.domain=Ut(".dealpos.app"),this.username=Ut(null),this.password=Ee(null),this.passwordVisible=Ee(!1)}ngOnInit(){document.body.classList.add("login-body"),this.applyThemeColors(),this.initLoginState()}initLoginState(){this.hasSubdomainInput()?this.loginState.set("FORM_DOMAIN"):this.loginState.set("FORM_LOGIN")}onNextState(){if(!this.subdomain()){this.toastr.error("Subdomain is required","Warning");return}this.loginState.set("FORM_LOGIN")}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onHidePassowrd(){this.passwordVisible.set(!this.passwordVisible())}onLogin(){let t=this.subdomain()?.trim(),n={username:this.username(),password:this.password()};this.hasSubdomainInput()&&(n=me({domain:this.domain(),subdomain:t},n)),this.loginChange.emit(n)}applyThemeColors(){this.elementRef.nativeElement.style.setProperty("--login-primary-color",this.colorTheme())}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-login-ui"]],inputs:{changelogUrl:[1,"changelogUrl"],version:[1,"version"],domains:[1,"domains"],news:[1,"news"],colorTheme:[1,"colorTheme"],subtitle:[1,"subtitle"],title:[1,"title"],hasSubdomainInput:[1,"hasSubdomainInput"],subdomain:[1,"subdomain"],domain:[1,"domain"],username:[1,"username"]},outputs:{loginChange:"onLoginChange",subdomain:"subdomainChange",domain:"domainChange",username:"usernameChange"},decls:17,vars:5,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"text-center"],[3,"colorTheme","newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"me-2","mb-0"],[1,"text-secondary-emphasis","fst-italic","opacity-75",2,"font-size","11px"],[2,"margin-top","50px"],[1,"form-block"],[1,"input-group","input-group-lg"],[1,"input-group-text","border-end-0","bg-white",2,"width","52px","border-bottom-left-radius","8px","border-top-left-radius","8px"],[1,"fa-solid","fa-cloud","text-dark","input-icon"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1","fs-4","text-dark",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","rounded-start-0","domain-option",2,"height","58px","border-bottom-right-radius","8px","border-top-right-radius","8px",3,"ngModelChange","ngModel"],[3,"value"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-theme","btn-block","w-100",2,"height","44.6px","border-radius","7px",3,"click"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"fw-normal","mb-0","me-2"],[1,"ms-2"],[1,"fw-normal","mb-0","d-flex","align-items-center"],[2,"margin-top","46px"],[1,"fas","fa-user","fa-lg","text-dark","input-icon"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username","autocomplete","off",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1","text-dark",2,"height","58px",3,"ngModelChange","ngModel"],[1,"input-group","input-group-lg",2,"margin-top","16px"],[1,"fas","fa-key","fa-lg","input-icon","text-dark"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","autofocus","","name","password","autocomplete","off",1,"form-control","form-control-lg","rounded-end","border-start-0","border-end-0","ps-1","text-dark",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end","bg-white"],[1,"input-icon","fa",3,"click","ngClass"],[1,"w-100",2,"margin-top","16px"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-theme","btn-block","w-100",3,"click"],[1,"text-theme","me-2"],["title","Edit Store Address",1,"fa-solid","fa-edit","text-theme","pointer",2,"font-size","0.875rem",3,"click"]],template:function(n,s){n&1&&(G(0,"div",3)(1,"div",4)(2,"div",5)(3,"h2",6),le(4,"New Features"),N(),te(5,"app-news-swiper",7),N(),G(6,"div",8),X(7,xl,20,4)(8,Tl,24,9),N()(),G(9,"div",9)(10,"span",10),le(11,"powered by :"),N(),te(12,"a",11),N(),G(13,"div",12)(14,"a",13),le(15),te(16,"i",14),N()()()),n&2&&(R(5),$("colorTheme",s.colorTheme())("newsList",s.news()),R(2),Kt(s.loginState()=="FORM_DOMAIN"?7:8),R(7),$("href",s.changelogUrl(),qe),R(),yi("version ",s.version(),""))},dependencies:[we,ct,ni,wn,yn,_n,mn,bn,fn,gn,Cn,vn,hn,ir],styles:["[_nghost-%COMP%]{--login-primary-color: red}[_nghost-%COMP%] .mt-0[_ngcontent-%COMP%]{margin-top:0!important}[_nghost-%COMP%] .mb-0[_ngcontent-%COMP%]{margin-bottom:0!important}[_nghost-%COMP%] .ms-0[_ngcontent-%COMP%]{margin-left:0!important}[_nghost-%COMP%] .me-0[_ngcontent-%COMP%]{margin-right:0!important}[_nghost-%COMP%] .mx-0[_ngcontent-%COMP%]{margin-left:0!important;margin-right:0!important}[_nghost-%COMP%] .my-0[_ngcontent-%COMP%]{margin-top:0!important;margin-bottom:0!important}[_nghost-%COMP%] .m-0[_ngcontent-%COMP%]{margin:0!important}[_nghost-%COMP%] .pt-0[_ngcontent-%COMP%]{padding-top:0!important}[_nghost-%COMP%] .pb-0[_ngcontent-%COMP%]{padding-bottom:0!important}[_nghost-%COMP%] .ps-0[_ngcontent-%COMP%]{padding-left:0!important}[_nghost-%COMP%] .pe-0[_ngcontent-%COMP%]{padding-right:0!important}[_nghost-%COMP%] .px-0[_ngcontent-%COMP%]{padding-left:0!important;padding-right:0!important}[_nghost-%COMP%] .py-0[_ngcontent-%COMP%]{padding-top:0!important;padding-bottom:0!important}[_nghost-%COMP%] .p-0[_ngcontent-%COMP%]{padding:0!important}[_nghost-%COMP%] .gap-0[_ngcontent-%COMP%]{gap:0!important}[_nghost-%COMP%] .mt-1[_ngcontent-%COMP%]{margin-top:.125rem!important}[_nghost-%COMP%] .mb-1[_ngcontent-%COMP%]{margin-bottom:.125rem!important}[_nghost-%COMP%] .ms-1[_ngcontent-%COMP%]{margin-left:.125rem!important}[_nghost-%COMP%] .me-1[_ngcontent-%COMP%]{margin-right:.125rem!important}[_nghost-%COMP%] .mx-1[_ngcontent-%COMP%]{margin-left:.125rem!important;margin-right:.125rem!important}[_nghost-%COMP%] .my-1[_ngcontent-%COMP%]{margin-top:.125rem!important;margin-bottom:.125rem!important}[_nghost-%COMP%] .m-1[_ngcontent-%COMP%]{margin:.125rem!important}[_nghost-%COMP%] .pt-1[_ngcontent-%COMP%]{padding-top:.125rem!important}[_nghost-%COMP%] .pb-1[_ngcontent-%COMP%]{padding-bottom:.125rem!important}[_nghost-%COMP%] .ps-1[_ngcontent-%COMP%]{padding-left:.125rem!important}[_nghost-%COMP%] .pe-1[_ngcontent-%COMP%]{padding-right:.125rem!important}[_nghost-%COMP%] .px-1[_ngcontent-%COMP%]{padding-left:.125rem!important;padding-right:.125rem!important}[_nghost-%COMP%] .py-1[_ngcontent-%COMP%]{padding-top:.125rem!important;padding-bottom:.125rem!important}[_nghost-%COMP%] .p-1[_ngcontent-%COMP%]{padding:.125rem!important}[_nghost-%COMP%] .gap-1[_ngcontent-%COMP%]{gap:.125rem!important}[_nghost-%COMP%] .mt-2[_ngcontent-%COMP%]{margin-top:.25rem!important}[_nghost-%COMP%] .mb-2[_ngcontent-%COMP%]{margin-bottom:.25rem!important}[_nghost-%COMP%] .ms-2[_ngcontent-%COMP%]{margin-left:.25rem!important}[_nghost-%COMP%] .me-2[_ngcontent-%COMP%]{margin-right:.25rem!important}[_nghost-%COMP%] .mx-2[_ngcontent-%COMP%]{margin-left:.25rem!important;margin-right:.25rem!important}[_nghost-%COMP%] .my-2[_ngcontent-%COMP%]{margin-top:.25rem!important;margin-bottom:.25rem!important}[_nghost-%COMP%] .m-2[_ngcontent-%COMP%]{margin:.25rem!important}[_nghost-%COMP%] .pt-2[_ngcontent-%COMP%]{padding-top:.25rem!important}[_nghost-%COMP%] .pb-2[_ngcontent-%COMP%]{padding-bottom:.25rem!important}[_nghost-%COMP%] .ps-2[_ngcontent-%COMP%]{padding-left:.25rem!important}[_nghost-%COMP%] .pe-2[_ngcontent-%COMP%]{padding-right:.25rem!important}[_nghost-%COMP%] .px-2[_ngcontent-%COMP%]{padding-left:.25rem!important;padding-right:.25rem!important}[_nghost-%COMP%] .py-2[_ngcontent-%COMP%]{padding-top:.25rem!important;padding-bottom:.25rem!important}[_nghost-%COMP%] .p-2[_ngcontent-%COMP%]{padding:.25rem!important}[_nghost-%COMP%] .gap-2[_ngcontent-%COMP%]{gap:.25rem!important}[_nghost-%COMP%] .mt-3[_ngcontent-%COMP%]{margin-top:.375rem!important}[_nghost-%COMP%] .mb-3[_ngcontent-%COMP%]{margin-bottom:.375rem!important}[_nghost-%COMP%] .ms-3[_ngcontent-%COMP%]{margin-left:.375rem!important}[_nghost-%COMP%] .me-3[_ngcontent-%COMP%]{margin-right:.375rem!important}[_nghost-%COMP%] .mx-3[_ngcontent-%COMP%]{margin-left:.375rem!important;margin-right:.375rem!important}[_nghost-%COMP%] .my-3[_ngcontent-%COMP%]{margin-top:.375rem!important;margin-bottom:.375rem!important}[_nghost-%COMP%] .m-3[_ngcontent-%COMP%]{margin:.375rem!important}[_nghost-%COMP%] .pt-3[_ngcontent-%COMP%]{padding-top:.375rem!important}[_nghost-%COMP%] .pb-3[_ngcontent-%COMP%]{padding-bottom:.375rem!important}[_nghost-%COMP%] .ps-3[_ngcontent-%COMP%]{padding-left:.375rem!important}[_nghost-%COMP%] .pe-3[_ngcontent-%COMP%]{padding-right:.375rem!important}[_nghost-%COMP%] .px-3[_ngcontent-%COMP%]{padding-left:.375rem!important;padding-right:.375rem!important}[_nghost-%COMP%] .py-3[_ngcontent-%COMP%]{padding-top:.375rem!important;padding-bottom:.375rem!important}[_nghost-%COMP%] .p-3[_ngcontent-%COMP%]{padding:.375rem!important}[_nghost-%COMP%] .gap-3[_ngcontent-%COMP%]{gap:.375rem!important}[_nghost-%COMP%] .mt-4[_ngcontent-%COMP%]{margin-top:.5rem!important}[_nghost-%COMP%] .mb-4[_ngcontent-%COMP%]{margin-bottom:.5rem!important}[_nghost-%COMP%] .ms-4[_ngcontent-%COMP%]{margin-left:.5rem!important}[_nghost-%COMP%] .me-4[_ngcontent-%COMP%]{margin-right:.5rem!important}[_nghost-%COMP%] .mx-4[_ngcontent-%COMP%]{margin-left:.5rem!important;margin-right:.5rem!important}[_nghost-%COMP%] .my-4[_ngcontent-%COMP%]{margin-top:.5rem!important;margin-bottom:.5rem!important}[_nghost-%COMP%] .m-4[_ngcontent-%COMP%]{margin:.5rem!important}[_nghost-%COMP%] .pt-4[_ngcontent-%COMP%]{padding-top:.5rem!important}[_nghost-%COMP%] .pb-4[_ngcontent-%COMP%]{padding-bottom:.5rem!important}[_nghost-%COMP%] .ps-4[_ngcontent-%COMP%]{padding-left:.5rem!important}[_nghost-%COMP%] .pe-4[_ngcontent-%COMP%]{padding-right:.5rem!important}[_nghost-%COMP%] .px-4[_ngcontent-%COMP%]{padding-left:.5rem!important;padding-right:.5rem!important}[_nghost-%COMP%] .py-4[_ngcontent-%COMP%]{padding-top:.5rem!important;padding-bottom:.5rem!important}[_nghost-%COMP%] .p-4[_ngcontent-%COMP%]{padding:.5rem!important}[_nghost-%COMP%] .gap-4[_ngcontent-%COMP%]{gap:.5rem!important}[_nghost-%COMP%] .mt-5[_ngcontent-%COMP%]{margin-top:.625rem!important}[_nghost-%COMP%] .mb-5[_ngcontent-%COMP%]{margin-bottom:.625rem!important}[_nghost-%COMP%] .ms-5[_ngcontent-%COMP%]{margin-left:.625rem!important}[_nghost-%COMP%] .me-5[_ngcontent-%COMP%]{margin-right:.625rem!important}[_nghost-%COMP%] .mx-5[_ngcontent-%COMP%]{margin-left:.625rem!important;margin-right:.625rem!important}[_nghost-%COMP%] .my-5[_ngcontent-%COMP%]{margin-top:.625rem!important;margin-bottom:.625rem!important}[_nghost-%COMP%] .m-5[_ngcontent-%COMP%]{margin:.625rem!important}[_nghost-%COMP%] .pt-5[_ngcontent-%COMP%]{padding-top:.625rem!important}[_nghost-%COMP%] .pb-5[_ngcontent-%COMP%]{padding-bottom:.625rem!important}[_nghost-%COMP%] .ps-5[_ngcontent-%COMP%]{padding-left:.625rem!important}[_nghost-%COMP%] .pe-5[_ngcontent-%COMP%]{padding-right:.625rem!important}[_nghost-%COMP%] .px-5[_ngcontent-%COMP%]{padding-left:.625rem!important;padding-right:.625rem!important}[_nghost-%COMP%] .py-5[_ngcontent-%COMP%]{padding-top:.625rem!important;padding-bottom:.625rem!important}[_nghost-%COMP%] .p-5[_ngcontent-%COMP%]{padding:.625rem!important}[_nghost-%COMP%] .gap-5[_ngcontent-%COMP%]{gap:.625rem!important}[_nghost-%COMP%] .mt-6[_ngcontent-%COMP%]{margin-top:.75rem!important}[_nghost-%COMP%] .mb-6[_ngcontent-%COMP%]{margin-bottom:.75rem!important}[_nghost-%COMP%] .ms-6[_ngcontent-%COMP%]{margin-left:.75rem!important}[_nghost-%COMP%] .me-6[_ngcontent-%COMP%]{margin-right:.75rem!important}[_nghost-%COMP%] .mx-6[_ngcontent-%COMP%]{margin-left:.75rem!important;margin-right:.75rem!important}[_nghost-%COMP%] .my-6[_ngcontent-%COMP%]{margin-top:.75rem!important;margin-bottom:.75rem!important}[_nghost-%COMP%] .m-6[_ngcontent-%COMP%]{margin:.75rem!important}[_nghost-%COMP%] .pt-6[_ngcontent-%COMP%]{padding-top:.75rem!important}[_nghost-%COMP%] .pb-6[_ngcontent-%COMP%]{padding-bottom:.75rem!important}[_nghost-%COMP%] .ps-6[_ngcontent-%COMP%]{padding-left:.75rem!important}[_nghost-%COMP%] .pe-6[_ngcontent-%COMP%]{padding-right:.75rem!important}[_nghost-%COMP%] .px-6[_ngcontent-%COMP%]{padding-left:.75rem!important;padding-right:.75rem!important}[_nghost-%COMP%] .py-6[_ngcontent-%COMP%]{padding-top:.75rem!important;padding-bottom:.75rem!important}[_nghost-%COMP%] .p-6[_ngcontent-%COMP%]{padding:.75rem!important}[_nghost-%COMP%] .gap-6[_ngcontent-%COMP%]{gap:.75rem!important}[_nghost-%COMP%] .mt-7[_ngcontent-%COMP%]{margin-top:.875rem!important}[_nghost-%COMP%] .mb-7[_ngcontent-%COMP%]{margin-bottom:.875rem!important}[_nghost-%COMP%] .ms-7[_ngcontent-%COMP%]{margin-left:.875rem!important}[_nghost-%COMP%] .me-7[_ngcontent-%COMP%]{margin-right:.875rem!important}[_nghost-%COMP%] .mx-7[_ngcontent-%COMP%]{margin-left:.875rem!important;margin-right:.875rem!important}[_nghost-%COMP%] .my-7[_ngcontent-%COMP%]{margin-top:.875rem!important;margin-bottom:.875rem!important}[_nghost-%COMP%] .m-7[_ngcontent-%COMP%]{margin:.875rem!important}[_nghost-%COMP%] .pt-7[_ngcontent-%COMP%]{padding-top:.875rem!important}[_nghost-%COMP%] .pb-7[_ngcontent-%COMP%]{padding-bottom:.875rem!important}[_nghost-%COMP%] .ps-7[_ngcontent-%COMP%]{padding-left:.875rem!important}[_nghost-%COMP%] .pe-7[_ngcontent-%COMP%]{padding-right:.875rem!important}[_nghost-%COMP%] .px-7[_ngcontent-%COMP%]{padding-left:.875rem!important;padding-right:.875rem!important}[_nghost-%COMP%] .py-7[_ngcontent-%COMP%]{padding-top:.875rem!important;padding-bottom:.875rem!important}[_nghost-%COMP%] .p-7[_ngcontent-%COMP%]{padding:.875rem!important}[_nghost-%COMP%] .gap-7[_ngcontent-%COMP%]{gap:.875rem!important}[_nghost-%COMP%] .mt-8[_ngcontent-%COMP%]{margin-top:1rem!important}[_nghost-%COMP%] .mb-8[_ngcontent-%COMP%]{margin-bottom:1rem!important}[_nghost-%COMP%] .ms-8[_ngcontent-%COMP%]{margin-left:1rem!important}[_nghost-%COMP%] .me-8[_ngcontent-%COMP%]{margin-right:1rem!important}[_nghost-%COMP%] .mx-8[_ngcontent-%COMP%]{margin-left:1rem!important;margin-right:1rem!important}[_nghost-%COMP%] .my-8[_ngcontent-%COMP%]{margin-top:1rem!important;margin-bottom:1rem!important}[_nghost-%COMP%] .m-8[_ngcontent-%COMP%]{margin:1rem!important}[_nghost-%COMP%] .pt-8[_ngcontent-%COMP%]{padding-top:1rem!important}[_nghost-%COMP%] .pb-8[_ngcontent-%COMP%]{padding-bottom:1rem!important}[_nghost-%COMP%] .ps-8[_ngcontent-%COMP%]{padding-left:1rem!important}[_nghost-%COMP%] .pe-8[_ngcontent-%COMP%]{padding-right:1rem!important}[_nghost-%COMP%] .px-8[_ngcontent-%COMP%]{padding-left:1rem!important;padding-right:1rem!important}[_nghost-%COMP%] .py-8[_ngcontent-%COMP%]{padding-top:1rem!important;padding-bottom:1rem!important}[_nghost-%COMP%] .p-8[_ngcontent-%COMP%]{padding:1rem!important}[_nghost-%COMP%] .gap-8[_ngcontent-%COMP%]{gap:1rem!important}[_nghost-%COMP%] .mt-9[_ngcontent-%COMP%]{margin-top:1.125rem!important}[_nghost-%COMP%] .mb-9[_ngcontent-%COMP%]{margin-bottom:1.125rem!important}[_nghost-%COMP%] .ms-9[_ngcontent-%COMP%]{margin-left:1.125rem!important}[_nghost-%COMP%] .me-9[_ngcontent-%COMP%]{margin-right:1.125rem!important}[_nghost-%COMP%] .mx-9[_ngcontent-%COMP%]{margin-left:1.125rem!important;margin-right:1.125rem!important}[_nghost-%COMP%] .my-9[_ngcontent-%COMP%]{margin-top:1.125rem!important;margin-bottom:1.125rem!important}[_nghost-%COMP%] .m-9[_ngcontent-%COMP%]{margin:1.125rem!important}[_nghost-%COMP%] .pt-9[_ngcontent-%COMP%]{padding-top:1.125rem!important}[_nghost-%COMP%] .pb-9[_ngcontent-%COMP%]{padding-bottom:1.125rem!important}[_nghost-%COMP%] .ps-9[_ngcontent-%COMP%]{padding-left:1.125rem!important}[_nghost-%COMP%] .pe-9[_ngcontent-%COMP%]{padding-right:1.125rem!important}[_nghost-%COMP%] .px-9[_ngcontent-%COMP%]{padding-left:1.125rem!important;padding-right:1.125rem!important}[_nghost-%COMP%] .py-9[_ngcontent-%COMP%]{padding-top:1.125rem!important;padding-bottom:1.125rem!important}[_nghost-%COMP%] .p-9[_ngcontent-%COMP%]{padding:1.125rem!important}[_nghost-%COMP%] .gap-9[_ngcontent-%COMP%]{gap:1.125rem!important}[_nghost-%COMP%] .mt-10[_ngcontent-%COMP%]{margin-top:1.25rem!important}[_nghost-%COMP%] .mb-10[_ngcontent-%COMP%]{margin-bottom:1.25rem!important}[_nghost-%COMP%] .ms-10[_ngcontent-%COMP%]{margin-left:1.25rem!important}[_nghost-%COMP%] .me-10[_ngcontent-%COMP%]{margin-right:1.25rem!important}[_nghost-%COMP%] .mx-10[_ngcontent-%COMP%]{margin-left:1.25rem!important;margin-right:1.25rem!important}[_nghost-%COMP%] .my-10[_ngcontent-%COMP%]{margin-top:1.25rem!important;margin-bottom:1.25rem!important}[_nghost-%COMP%] .m-10[_ngcontent-%COMP%]{margin:1.25rem!important}[_nghost-%COMP%] .pt-10[_ngcontent-%COMP%]{padding-top:1.25rem!important}[_nghost-%COMP%] .pb-10[_ngcontent-%COMP%]{padding-bottom:1.25rem!important}[_nghost-%COMP%] .ps-10[_ngcontent-%COMP%]{padding-left:1.25rem!important}[_nghost-%COMP%] .pe-10[_ngcontent-%COMP%]{padding-right:1.25rem!important}[_nghost-%COMP%] .px-10[_ngcontent-%COMP%]{padding-left:1.25rem!important;padding-right:1.25rem!important}[_nghost-%COMP%] .py-10[_ngcontent-%COMP%]{padding-top:1.25rem!important;padding-bottom:1.25rem!important}[_nghost-%COMP%] .p-10[_ngcontent-%COMP%]{padding:1.25rem!important}[_nghost-%COMP%] .gap-10[_ngcontent-%COMP%]{gap:1.25rem!important}[_nghost-%COMP%] .mt-11[_ngcontent-%COMP%]{margin-top:1.375rem!important}[_nghost-%COMP%] .mb-11[_ngcontent-%COMP%]{margin-bottom:1.375rem!important}[_nghost-%COMP%] .ms-11[_ngcontent-%COMP%]{margin-left:1.375rem!important}[_nghost-%COMP%] .me-11[_ngcontent-%COMP%]{margin-right:1.375rem!important}[_nghost-%COMP%] .mx-11[_ngcontent-%COMP%]{margin-left:1.375rem!important;margin-right:1.375rem!important}[_nghost-%COMP%] .my-11[_ngcontent-%COMP%]{margin-top:1.375rem!important;margin-bottom:1.375rem!important}[_nghost-%COMP%] .m-11[_ngcontent-%COMP%]{margin:1.375rem!important}[_nghost-%COMP%] .pt-11[_ngcontent-%COMP%]{padding-top:1.375rem!important}[_nghost-%COMP%] .pb-11[_ngcontent-%COMP%]{padding-bottom:1.375rem!important}[_nghost-%COMP%] .ps-11[_ngcontent-%COMP%]{padding-left:1.375rem!important}[_nghost-%COMP%] .pe-11[_ngcontent-%COMP%]{padding-right:1.375rem!important}[_nghost-%COMP%] .px-11[_ngcontent-%COMP%]{padding-left:1.375rem!important;padding-right:1.375rem!important}[_nghost-%COMP%] .py-11[_ngcontent-%COMP%]{padding-top:1.375rem!important;padding-bottom:1.375rem!important}[_nghost-%COMP%] .p-11[_ngcontent-%COMP%]{padding:1.375rem!important}[_nghost-%COMP%] .gap-11[_ngcontent-%COMP%]{gap:1.375rem!important}[_nghost-%COMP%] .mt-12[_ngcontent-%COMP%]{margin-top:1.5rem!important}[_nghost-%COMP%] .mb-12[_ngcontent-%COMP%]{margin-bottom:1.5rem!important}[_nghost-%COMP%] .ms-12[_ngcontent-%COMP%]{margin-left:1.5rem!important}[_nghost-%COMP%] .me-12[_ngcontent-%COMP%]{margin-right:1.5rem!important}[_nghost-%COMP%] .mx-12[_ngcontent-%COMP%]{margin-left:1.5rem!important;margin-right:1.5rem!important}[_nghost-%COMP%] .my-12[_ngcontent-%COMP%]{margin-top:1.5rem!important;margin-bottom:1.5rem!important}[_nghost-%COMP%] .m-12[_ngcontent-%COMP%]{margin:1.5rem!important}[_nghost-%COMP%] .pt-12[_ngcontent-%COMP%]{padding-top:1.5rem!important}[_nghost-%COMP%] .pb-12[_ngcontent-%COMP%]{padding-bottom:1.5rem!important}[_nghost-%COMP%] .ps-12[_ngcontent-%COMP%]{padding-left:1.5rem!important}[_nghost-%COMP%] .pe-12[_ngcontent-%COMP%]{padding-right:1.5rem!important}[_nghost-%COMP%] .px-12[_ngcontent-%COMP%]{padding-left:1.5rem!important;padding-right:1.5rem!important}[_nghost-%COMP%] .py-12[_ngcontent-%COMP%]{padding-top:1.5rem!important;padding-bottom:1.5rem!important}[_nghost-%COMP%] .p-12[_ngcontent-%COMP%]{padding:1.5rem!important}[_nghost-%COMP%] .gap-12[_ngcontent-%COMP%]{gap:1.5rem!important}[_nghost-%COMP%] h1[_ngcontent-%COMP%], [_nghost-%COMP%] .h1[_ngcontent-%COMP%]{font-size:1.375rem;font-weight:500!important}[_nghost-%COMP%] h2[_ngcontent-%COMP%], [_nghost-%COMP%] .h2[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500!important}[_nghost-%COMP%] h3[_ngcontent-%COMP%], [_nghost-%COMP%] .h3[_ngcontent-%COMP%]{font-size:1.125rem;font-weight:500!important}[_nghost-%COMP%] h4[_ngcontent-%COMP%], [_nghost-%COMP%] .h4[_ngcontent-%COMP%]{font-size:1rem;font-weight:500!important}[_nghost-%COMP%] h5[_ngcontent-%COMP%], [_nghost-%COMP%] .h5[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500!important}[_nghost-%COMP%] h6[_ngcontent-%COMP%], [_nghost-%COMP%] .h6[_ngcontent-%COMP%]{font-size:.75rem;font-weight:500!important}[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px;min-height:370px}@media (max-width: 768px){[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{margin-top:30px}}[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{box-shadow:none;border-color:#dfe5ef!important}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid var(--login-primary-color);border-right:1px solid var(--login-primary-color);border-top:1px solid var(--login-primary-color);border-radius:0 10px 10px 0}}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:15px!important}@media (max-width: 768px){[_nghost-%COMP%] .features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){[_nghost-%COMP%] .features-pane[_ngcontent-%COMP%]{border-left:1px solid var(--login-primary-color);border-bottom:1px solid var(--login-primary-color);border-top:1px solid var(--login-primary-color);border-radius:10px 0 0 10px}}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{position:fixed;bottom:1.25rem;left:1.25rem;margin-left:20px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}[_nghost-%COMP%] .version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:fixed;margin-right:18px}@media (max-width: 768px){[_nghost-%COMP%] .copyright[_ngcontent-%COMP%], [_nghost-%COMP%] .version[_ngcontent-%COMP%]{position:static;margin-top:10px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{justify-content:center}}[_nghost-%COMP%] div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}[_nghost-%COMP%] button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}[_nghost-%COMP%] .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}[_nghost-%COMP%] .fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}[_nghost-%COMP%] .domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}[_nghost-%COMP%] .btn-theme[_ngcontent-%COMP%]{background-color:var(--login-primary-color)!important;color:#fff!important;font-size:14px;height:36.6px;border-radius:7px}[_nghost-%COMP%] .text-theme[_ngcontent-%COMP%]{color:var(--login-primary-color)!important}[_nghost-%COMP%] .input-icon[_ngcontent-%COMP%]{font-size:15px}"]})}}return i})();var em=(()=>{class i{constructor(){this.authService=ae(un),this.router=ae(an),this.httpService=ae(cn),this.appVersion=Ti.version,this.changelogUrl=Ti.changelogUrl,this.route=ae(rn),this.roleService=ae(Xn),this.subdomain=Ee(""),this.domain=Ee(""),this.username=Ee("")}ngOnInit(){this.initNews()}ngAfterViewInit(){this.subdomain.set(localStorage.getItem("AUTH_SUB_DOMAIN")||""),this.username.set(localStorage.getItem("AUTH_USERNAME")||""),this.domain.set(localStorage.getItem("AUTH_DOMAIN")||".dealpos.co.id")}initNews(){let t=new nn().set("fetch","children:books").set("sort","sortOrder:asc");this.news$=this.httpService.get("https://changelog.dealpos.app/","umbraco/delivery/api/v2/content",{params:t}).pipe(wi(n=>n.items.map(r=>r.properties)),Xi(1))}onLogin(t){let n={SubDomain:t.subdomain+t.domain,Username:t.username,Password:t.password};Gi([this.authService.login(n),this.route.queryParams.pipe(wi(s=>s.returnUrl||"/"))]).subscribe(s=>{let r=s[1];if(r=="/"){if(this.roleService.report.view){if(!this.roleService.coa.view){this.router.navigate(["/pages/journal/journal-entry"]);return}}else{this.router.navigate(["/pages/chart-of-account/account"]);return}this.router.navigate(["/pages/dashboard"])}else this.router.navigate([r])})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-login"]],decls:2,vars:8,consts:[["colorTheme","#0a8754","title","DealPOS Accounting","subtitle","Streamline Your Accounting with Ease",3,"onLoginChange","news","subdomain","domain","username","version","changelogUrl"]],template:function(n,s){n&1&&(G(0,"app-login-ui",0),Dt(1,"async"),ie("onLoginChange",function(a){return s.onLogin(a)}),N()),n&2&&$("news",$t(1,6,s.news$))("subdomain",s.subdomain())("domain",s.domain())("username",s.username())("version",s.appVersion)("changelogUrl",s.changelogUrl)},dependencies:[we,tn,Ht,Mn,qn,xn,ni,Bn,Qn,Zn,oi,ss,Wn,jn,Gn,os,nr],encapsulation:2})}}return i})();export{em as LoginComponent};