dealposbooks 1.9.4 → 1.9.6-p
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +374 -374
- package/assets/scss/layouts/_sidebar.scss +2 -2
- package/assets/scss/style.scss +34 -3
- package/assets/scss/variables/_variables.scss +1 -2
- package/chunk-27SWEVDU.js +1 -0
- package/chunk-2DV653RD.js +1 -0
- package/chunk-2OECREUZ.js +1 -0
- package/{chunk-NL5IYBHF.js → chunk-32BR7AQL.js} +1 -1
- package/chunk-34XRAZFC.js +1 -0
- package/chunk-35CWG2OK.js +180 -0
- package/chunk-35KDUCM3.js +1 -0
- package/{chunk-BGDKOH3U.js → chunk-3DN7TZCI.js} +1 -1
- package/chunk-3G3QSUWH.js +1 -0
- package/chunk-3HW557B7.js +1 -0
- package/chunk-3L7IWFXM.js +527 -0
- package/chunk-3WB76KQC.js +430 -0
- package/chunk-43WCLYRX.js +1 -0
- package/chunk-46TNY5N4.js +185 -0
- package/chunk-4FGQ5T64.js +2 -0
- package/chunk-4KXSM3HP.js +1 -0
- package/chunk-4QKRWFW4.js +1 -0
- package/{chunk-AM66YD6C.js → chunk-4S33ZRKF.js} +1 -1
- package/chunk-54OPMMIM.js +1 -0
- package/chunk-6HQX2SM2.js +1 -0
- package/chunk-6TA77CRR.js +1 -0
- package/{chunk-F7TF7ASR.js → chunk-6ZZARVQO.js} +1 -1
- package/{chunk-XMZ7ADZB.js → chunk-7WXXPCRV.js} +1 -1
- package/{chunk-5QMHSLSU.js → chunk-AKMHO3LC.js} +1 -1
- package/chunk-AOSPVPK7.js +231 -0
- package/{chunk-5OU7ECCN.js → chunk-ASK2IVMC.js} +1 -1
- package/chunk-B7JILYJO.js +1 -0
- package/chunk-BNI5KUDE.js +193 -0
- package/chunk-BX3CRF44.js +1 -0
- package/{chunk-KQAMA66M.js → chunk-BYD3JK4R.js} +1 -1
- package/chunk-C4LZX33Q.js +449 -0
- package/{chunk-7TKATLB4.js → chunk-C5GEP4MM.js} +1 -1
- package/chunk-C7UZ6ZYF.js +1 -0
- package/chunk-CSMMP7XG.js +188 -0
- package/chunk-CTCQB63H.js +1 -0
- package/chunk-DCKLQNGL.js +1 -0
- package/chunk-DNK2GUDB.js +1 -0
- package/{chunk-VKO43FOT.js → chunk-DOM7WYRM.js} +1 -1
- package/chunk-ELWFWCNU.js +246 -0
- package/{chunk-5OXHRN43.js → chunk-EXVUABTO.js} +1 -1
- package/chunk-G6FJQBZZ.js +1 -0
- package/chunk-GJXWL5XV.js +1 -0
- package/chunk-GNP7WGSH.js +1 -0
- package/chunk-GTGRV7IH.js +1 -0
- package/chunk-HFFH2WIX.js +98 -0
- package/chunk-HRPP75N7.js +1 -0
- package/{chunk-7XAJOA36.js → chunk-HRQJ5DXP.js} +1 -1
- package/{chunk-XEATX3IC.js → chunk-I3HFXOYS.js} +1 -1
- package/{chunk-HDO45X7Q.js → chunk-IIB2DZLA.js} +1 -1
- package/{chunk-FCGAJLPQ.js → chunk-J2SK4PGN.js} +1 -1
- package/chunk-J77A3DFB.js +1 -0
- package/chunk-JDW35ZB5.js +47 -0
- package/chunk-JMLETF7Y.js +1 -0
- package/{chunk-56MVOUHH.js → chunk-JP3F2QND.js} +1 -1
- package/chunk-JYNZPVLW.js +1 -0
- package/chunk-K6753MGR.js +7 -0
- package/chunk-LD4G6ND6.js +130 -0
- package/{chunk-JQ4DHNFQ.js → chunk-LKZL77YR.js} +1 -1
- package/chunk-LR2DJRRL.js +79 -0
- package/chunk-LTZA6IIO.js +1 -0
- package/chunk-M7MFX6BW.js +1 -0
- package/chunk-MCDQ2TIS.js +1 -0
- package/chunk-MJVSTWYY.js +1 -0
- package/chunk-N2RYBZK7.js +1 -0
- package/{chunk-HPKZYS2A.js → chunk-N6JCA3CN.js} +2 -2
- package/chunk-NF3TF3LT.js +397 -0
- package/chunk-OEJBOFI5.js +1 -0
- package/{chunk-7PDAUPWN.js → chunk-OEOAUJY5.js} +12 -12
- package/{chunk-JRYP3YPK.js → chunk-OVCTOPAO.js} +1 -1
- package/{chunk-4FK4QI2U.js → chunk-OZACNHDP.js} +1 -1
- package/chunk-P6CJ2ONT.js +1 -0
- package/{chunk-T2A6NORZ.js → chunk-PGECEXRR.js} +1 -1
- package/{chunk-ITIRJVUS.js → chunk-QPKNYNLC.js} +2 -2
- package/chunk-RBDJZRHY.js +1 -0
- package/{chunk-25XKSUYX.js → chunk-RT5PUZ5F.js} +1 -1
- package/{chunk-ZKXT6RSI.js → chunk-TC43COAE.js} +1 -1
- package/chunk-TFV5QZKR.js +947 -0
- package/chunk-TK3G2BVM.js +222 -0
- package/{chunk-R6HGHSPM.js → chunk-TQZNJ5WF.js} +1 -1
- package/chunk-UEOO2LYA.js +82 -0
- package/chunk-WEWEITR7.js +1 -0
- package/chunk-WGZN6AN2.js +1 -0
- package/chunk-WZO2ZLBL.js +1 -0
- package/chunk-X34Y3TVX.js +1 -0
- package/chunk-XFSZDZPJ.js +1 -0
- package/chunk-XKEV5AED.js +201 -0
- package/chunk-XZGFG6E3.js +1 -0
- package/chunk-YOEPO6LK.js +959 -0
- package/{chunk-D5AXB5DE.js → chunk-YVEUYFCE.js} +2 -2
- package/chunk-ZWHB7NI7.js +1 -0
- package/index.html +2 -2
- package/main-U5PC2W2C.js +1 -0
- package/package.json +1 -1
- package/styles-GTUKYMN7.css +1 -0
- package/chunk-2TUOAI22.js +0 -1
- package/chunk-3IHOEH5O.js +0 -1
- package/chunk-3VC2KAML.js +0 -1
- package/chunk-4J3EFT67.js +0 -1
- package/chunk-6J5S4UPN.js +0 -2
- package/chunk-7GT5MR57.js +0 -1
- package/chunk-7LCGNNCW.js +0 -627
- package/chunk-7NXTCJMX.js +0 -1
- package/chunk-A3NY5EYN.js +0 -1
- package/chunk-AH5PA2TO.js +0 -1
- package/chunk-B4COOFJS.js +0 -2
- package/chunk-BJGK47CG.js +0 -1
- package/chunk-BWS6U7BM.js +0 -193
- package/chunk-D5RQBZNF.js +0 -1
- package/chunk-DELPZQZH.js +0 -246
- package/chunk-DJUGUNXR.js +0 -503
- package/chunk-DSFIM36S.js +0 -1
- package/chunk-EHCALTHK.js +0 -1
- package/chunk-FUGCJNGU.js +0 -960
- package/chunk-GMLRRSMP.js +0 -1
- package/chunk-IACJNRVA.js +0 -25
- package/chunk-IQZ2MKLS.js +0 -1
- package/chunk-IXPPR5MV.js +0 -1
- package/chunk-J3B5HVW4.js +0 -1
- package/chunk-L6VKOTIV.js +0 -180
- package/chunk-LATJGOV3.js +0 -185
- package/chunk-LLV6TGMT.js +0 -1
- package/chunk-MNCUT4L4.js +0 -1
- package/chunk-NBRL2K4H.js +0 -1
- package/chunk-NDOZ5YES.js +0 -1
- package/chunk-SCEMI63T.js +0 -1
- package/chunk-SDTMCYSJ.js +0 -1
- package/chunk-TDX2HSWE.js +0 -1
- package/chunk-UHVZAFKN.js +0 -1
- package/chunk-UMYCPFK5.js +0 -1660
- package/chunk-UOAJWMSO.js +0 -1
- package/chunk-UZCNPNT7.js +0 -2
- package/chunk-VF7TG32T.js +0 -47
- package/chunk-VI3AV775.js +0 -1
- package/chunk-VK5TK23W.js +0 -7
- package/chunk-VNHXLUHA.js +0 -1
- package/chunk-W6UD5NO5.js +0 -2
- package/chunk-WUGCCSIP.js +0 -1
- package/chunk-X234EQET.js +0 -129
- package/chunk-X3FQFXUZ.js +0 -300
- package/chunk-XJ5BSLZV.js +0 -1
- package/chunk-YAKYBQQ6.js +0 -1
- package/chunk-YQRWSN5V.js +0 -1
- package/main-VQYYYR67.js +0 -1
- package/styles-IDKYTRGA.css +0 -1
package/chunk-2TUOAI22.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as i,M as r}from"./chunk-KQAMA66M.js";import{Wb as n,wb as o}from"./chunk-D5AXB5DE.js";import"./chunk-YQFG5XE2.js";var c=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=o({type:e,selectors:[["app-blank-layout"]],decls:1,vars:0,template:function(t,a){t&1&&n(0,"router-outlet")},dependencies:[r,i],encapsulation:2})}}return e})();export{c as BlankComponent};
|
package/chunk-3IHOEH5O.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Pe,b as Fe}from"./chunk-5QMHSLSU.js";import{a as Be}from"./chunk-G4XX7EU2.js";import{a as k}from"./chunk-VNHXLUHA.js";import{b as me}from"./chunk-YQRWSN5V.js";import{a as W}from"./chunk-GMLRRSMP.js";import{a as ue,b as pe}from"./chunk-R6HGHSPM.js";import"./chunk-4FK4QI2U.js";import{a as B,b as N}from"./chunk-56MVOUHH.js";import{b as Ve,c as Je,h as oe,m as re,n as ae,o as le}from"./chunk-UMYCPFK5.js";import{f as Me,g as De}from"./chunk-X3FQFXUZ.js";import"./chunk-7TKATLB4.js";import"./chunk-ZKXT6RSI.js";import{a as fe}from"./chunk-7GT5MR57.js";import{c as X,d as Y}from"./chunk-VF7TG32T.js";import{g as ne}from"./chunk-L6VKOTIV.js";import"./chunk-5OXHRN43.js";import{a as v,b as Z,c as $,d as ee,e as te,f as ie}from"./chunk-AM66YD6C.js";import{E as q,F as Q,v as ke,w as Re}from"./chunk-FUGCJNGU.js";import{b as Ce,e as be,f as ve,k as we,m as ye,p as Ee,w as Ie,z as Te}from"./chunk-BWS6U7BM.js";import"./chunk-VI3AV775.js";import"./chunk-F2X3VGZZ.js";import{f as O,k as A,l as L,m as K}from"./chunk-KQAMA66M.js";import{Cb as T,Ga as se,Ic as y,Jc as V,Kb as u,Kc as R,Lc as C,Nb as U,Ub as a,Vb as o,Wb as g,X as M,Xc as w,Z as D,_b as E,c as J,cb as P,dc as I,ec as d,gb as s,ha as S,pa as _,pc as l,qa as h,qc as b,rc as F,s as ce,tc as j,uc as xe,vc as de,wb as H,wc as Se,xc as z,yc as G}from"./chunk-D5AXB5DE.js";import{a as p,b as m}from"./chunk-YQFG5XE2.js";var Le={data:{data:[],totalCount:0},meta:{options:{outlets:[],paymentStates:[],deliveryStates:[]},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4}},filter:{number:null,outletName:null,paymentState:0,deliveryState:0,from:null,to:null,customerID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4}},_e=Z(ie(Le),$(t=>({first:w(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:w(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:w(()=>t.data().data.some(c=>c.checked)),checkedInvoice:w(()=>t.data().data.filter(c=>c.checked).map(c=>c.id))})),te(t=>{let c=S(k),e=S(me);return{updateFilter(i){v(t,n=>m(p({},n),{filter:p(p({},n.filter),i)}))},onRowSelect(i){v(t,n=>{let f=n.data.data.map(x=>x.id===i.id?m(p({},x),{checked:!0}):x);return m(p({},n),{data:m(p({},n.data),{data:f})})})},onRowUnselect(i){v(t,n=>{let f=n.data.data.map(x=>x.id===i.id?m(p({},x),{checked:!1}):x);return m(p({},n),{data:m(p({},n.data),{data:f})})})},onHeaderCheckboxToggle(i){v(t,n=>{let f=n.data.data.map(x=>m(p({},x),{checked:i}));return m(p({},n),{data:m(p({},n.data),{data:f})})})},getCustomerInvoice:B(J(M(i=>c.getJournalInvoice(i).pipe(ce(n=>m(p({},n),{data:n.data.map(f=>m(p({},f),{due:e.from(f.due)?e.from(f.due).format():null,checked:!1}))})),N({next:n=>{v(t,f=>m(p({},f),{data:n}))},error:n=>{console.error("Error fetching customer invoice:",n)}}))))),getCustomerInvoiceLoader:B(J(M(()=>c.getJournalInvoiceLoader().pipe(N({next:i=>{v(t,n=>m(p({},n),{meta:i}))},error:i=>{console.error("Error fetching customer invoice loader:",i)}})))))}}),ee(t=>({onInit:()=>{t.getCustomerInvoiceLoader()}})));var We=()=>({height:"calc(100vh - 70px)"});function qe(t,c){if(t&1){let e=E();a(0,"p-button",9),I("onClick",function(){_(e);let i=d(2);return h(i.onGenerateJournal())}),o()}}function Qe(t,c){if(t&1&&T(0,qe,1,0,"p-button",8),t&2){let e=d();u("ngIf",e.store.hasCheckedRows())}}function Xe(t,c){t&1&&(a(0,"tr")(1,"th",11),g(2,"p-tableHeaderCheckbox"),o(),a(3,"th"),l(4,"Outlet"),o(),a(5,"th"),l(6,"Number"),o(),a(7,"th"),l(8,"Customer"),o(),a(9,"th"),l(10,"Date"),o(),a(11,"th"),l(12,"Due"),o(),a(13,"th"),l(14,"Amount"),o(),a(15,"th"),l(16,"Payment"),o(),a(17,"th"),l(18,"Delivery"),o(),g(19,"th"),o())}function Ye(t,c){if(t&1&&(a(0,"tr")(1,"td"),g(2,"p-tableCheckbox",12),o(),a(3,"td"),l(4),o(),a(5,"td")(6,"a",13),l(7),o()(),a(8,"td")(9,"a",13),l(10),o()(),a(11,"td"),l(12),y(13,"date"),o(),a(14,"td"),l(15),y(16,"date"),o(),a(17,"td"),l(18),y(19,"number"),o(),a(20,"td"),g(21,"p-chip",14),o(),a(22,"td"),g(23,"p-chip",14),o(),a(24,"td"),g(25,"p-button",15),o()()),t&2){let e=c.$implicit,r=d(2);s(2),u("value",e),s(2),b(e.outlet),s(2),u("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Customer_Invoice/Info?ID="+e.id,P),s(),F(" ",e.number," "),s(2),u("href",r.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,P),s(),F(" ",e.customer," "),s(2),b(R(13,14,e.date,"d MMM y hh:mm")),s(3),b(e.due?R(16,17,e.due,"d MMM y hh:mm"):"-"),s(3),b(V(19,20,e.amount)),s(3),u("label",e.payment),s(2),u("label",e.delivery),s(2),u("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Ze(t,c){if(t&1&&l(0),t&2){let e=d(2);j(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function $e(t,c){t&1&&(a(0,"tr")(1,"td",16)(2,"span"),l(3,"No records found."),o()()())}function et(t,c){if(t&1){let e=E();a(0,"p-panel")(1,"p-table",10),I("onPage",function(i){_(e);let n=d();return h(n.onPageChange(i))})("onRowSelect",function(i){_(e);let n=d();return h(n.onRowSelect(i))})("onRowUnselect",function(i){_(e);let n=d();return h(n.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){_(e);let n=d();return h(n.onHeaderCheckboxToggle(i))}),T(2,Xe,20,0,"ng-template",null,3,C)(4,Ye,26,22,"ng-template",null,4,C)(6,Ze,1,3,"ng-template",null,5,C)(8,$e,4,0,"ng-template",null,6,C),o()()}if(t&2){let e=d();U(G(9,We)),s(),u("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("lazy",!0)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}function tt(t,c){if(t&1){let e=E();a(0,"form",17)(1,"div",18)(2,"label",19),l(3,"Outlet"),o(),g(4,"p-select",20),o(),a(5,"div",18)(6,"label",19),l(7,"Payment"),o(),g(8,"p-select",21),o(),a(9,"div",18)(10,"label",19),l(11,"Delivery"),o(),g(12,"p-select",22),o(),a(13,"div",18)(14,"label",19),l(15,"From"),o(),g(16,"p-datepicker",23),o(),a(17,"div",18)(18,"label",19),l(19,"To"),o(),g(20,"p-datepicker",24),o(),a(21,"div",18)(22,"label",19),l(23,"Customer"),o(),a(24,"p-autocomplete",25),I("completeMethod",function(i){_(e);let n=d();return h(n.onSearchContact(i))}),o()(),a(25,"div",18)(26,"label",19),l(27,"Page Size"),o(),g(28,"input",26),o()()}if(t&2){let e=d();u("formGroup",e.filterForm),s(4),u("options",e.store.meta().options.outlets),s(4),u("options",e.store.meta().options.paymentStates),s(4),u("options",e.store.meta().options.deliveryStates),s(4),u("iconDisplay","input")("showIcon",!0),s(4),u("iconDisplay","input")("showIcon",!0),s(4),u("suggestions",e.customerSuggestions())}}var Ge=(()=>{class t{constructor(){this.store=S(_e),this.dayjsService=S(me),this.generateJournalService=S(k),this.authService=S(W),this.isDialogFilterVisible=se(!1),this.isInitDialogFilterVisible=se(!0),this.customerSuggestions=se([]),this.fb=S(Ie)}ngOnInit(){console.log(this.dayjsService.from('0001-01-01T00:00:00"')&&!0),this.generateFilterForm()}generateFilterForm(){this.filterForm=this.fb.group({number:this.fb.control(null),outletName:this.fb.control(null),paymentState:this.fb.control(0),deliveryState:this.fb.control(0),from:this.fb.control(null),to:this.fb.control(null),customerID:this.fb.control(null),pageNumber:this.fb.control(1),rowCount:this.fb.control(20),pageSize:this.fb.control(20),export:this.fb.control(!1),exportPageNumber:this.fb.control(1),exportRowCount:this.fb.control(1e4)})}onSearchContact(e){let{query:r}=e;this.generateJournalService.getCustomerSuggestions(r).pipe(fe("Customer Suggestions"),D(i=>{this.customerSuggestions.set(i)})).subscribe()}onSearch(e){this.store.updateFilter(m(p({},this.store.filter()),{number:e}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(m(p({},this.store.filter()),{pageNumber:r+1}))}onGenerateJournal(){this.generateJournalService.generateJournalInvoice(this.store.checkedInvoice()).pipe(D(()=>{this.store.getCustomerInvoice(this.store.filter)})).subscribe()}onFilterOKEvent(){let e=Object.entries(this.filterForm.getRawValue()).reduce((r,[i,n])=>{switch(i){case"customerID":n||(r[i]=Be);break;case"from":typeof n=="object"?r[i]=this.dayjsService.from(n).format():r[i]=n!=null?String(n):null;break;case"to":typeof n=="object"?r[i]=this.dayjsService.from(n).format():r[i]=n!=null?String(n):null;break;default:r[i]=n;break}return r},{});console.log("Filter Body:",e),this.generateJournalService.getJournalInvoice(e).pipe(fe("Get Journal Invoice")).subscribe(),this.isDialogFilterVisible.set(!1)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=H({type:t,selectors:[["app-customer-invoice"]],features:[z([_e])],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Customer Invoice",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","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","scrollable","scrollHeight","lazy","paginator","rows","totalRecords","value"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","10"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"options"],["formControlName","paymentState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Payment",3,"options"],["formControlName","deliveryState","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a Delivery",3,"options"],["formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","customerID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize"]],template:function(r,i){if(r&1){let n=E();a(0,"app-main-panel",7),Se("isDialogFilterVisibleChange",function(x){return _(n),de(i.isDialogFilterVisible,x)||(i.isDialogFilterVisible=x),h(x)})("isInitDialogFilterVisibleChange",function(x){return _(n),de(i.isInitDialogFilterVisible,x)||(i.isInitDialogFilterVisible=x),h(x)}),I("filterConfirmed",function(){return _(n),h(i.onFilterOKEvent())})("search",function(x){return _(n),h(i.onSearch(x))}),T(1,Qe,1,1,"ng-template",null,0,C)(3,et,10,10,"ng-template",null,1,C)(5,tt,29,9,"ng-template",null,2,C),o()}r&2&&(u("isSearchableInput",!0)("isFilterable",!0),xe("isDialogFilterVisible",i.isDialogFilterVisible)("isInitDialogFilterVisible",i.isInitDialogFilterVisible))},dependencies:[ne,le,oe,re,ae,K,O,L,A,pe,ue,Y,X,Q,q,De,Me,Je,Ve,Re,ke,Fe,Pe,Te,we,Ce,be,ve,ye,Ee],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var it={data:{data:[],totalCount:0},filter:{PageNumber:1,PageSize:20,Number:""}},he=Z(ie(it),$(t=>({first:w(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:w(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount)),hasCheckedRows:w(()=>t.data().data.some(c=>c.checked)),checkedSupplierBill:w(()=>t.data().data.filter(c=>c.checked).map(c=>c.id))})),te(t=>{let c=S(k),e=S(me);return{updateFilter(r){v(t,i=>m(p({},i),{filter:p(p({},i.filter),r)}))},onRowSelect(r){v(t,i=>{let n=i.data.data.map(f=>f.id===r.id?m(p({},f),{checked:!0}):f);return m(p({},i),{data:m(p({},i.data),{data:n})})})},onRowUnselect(r){v(t,i=>{let n=i.data.data.map(f=>f.id===r.id?m(p({},f),{checked:!1}):f);return m(p({},i),{data:m(p({},i.data),{data:n})})})},onHeaderCheckboxToggle(r){v(t,i=>{let n=i.data.data.map(f=>m(p({},f),{checked:r}));return m(p({},i),{data:m(p({},i.data),{data:n})})})},getJournalSupplierBill:B(J(M(r=>c.getJournalSupplierBill(r).pipe(ce(i=>m(p({},i),{data:i.data.map(n=>m(p({},n),{due:e.from(n.due)?e.from(n.due).format():null,checked:!1}))})),N({next:i=>{v(t,n=>m(p({},n),{data:i}))},error:i=>{console.error("Error fetching journal supplier bill:",i)}})))))}}),ee(t=>({onInit:()=>{t.getJournalSupplierBill(t.filter)}})));var nt=()=>({height:"calc(100vh - 70px)"});function ot(t,c){if(t&1){let e=E();a(0,"p-button",8),I("onClick",function(){_(e);let i=d(2);return h(i.onGenerateJournal())}),o()}}function rt(t,c){if(t&1&&T(0,ot,1,0,"p-button",7),t&2){let e=d();u("ngIf",e.store.hasCheckedRows())}}function at(t,c){t&1&&(a(0,"tr")(1,"th",10),g(2,"p-tableHeaderCheckbox"),o(),a(3,"th"),l(4,"Outlet"),o(),a(5,"th"),l(6,"Number"),o(),a(7,"th"),l(8,"Supplier"),o(),a(9,"th"),l(10,"Date"),o(),a(11,"th"),l(12,"Due"),o(),a(13,"th"),l(14,"Amount"),o(),a(15,"th"),l(16,"Payment"),o(),a(17,"th"),l(18,"Delivery"),o(),g(19,"th"),o())}function lt(t,c){if(t&1&&(a(0,"tr")(1,"td"),g(2,"p-tableCheckbox",11),o(),a(3,"td"),l(4),o(),a(5,"td")(6,"a",12),l(7),o()(),a(8,"td"),l(9),o(),a(10,"td"),l(11),y(12,"date"),o(),a(13,"td"),l(14),y(15,"date"),o(),a(16,"td"),l(17),y(18,"number"),o(),a(19,"td"),g(20,"p-chip",13),o(),a(21,"td"),g(22,"p-chip",13),o(),a(23,"td"),g(24,"p-button",14),o()()),t&2){let e=c.$implicit,r=d(2);s(2),u("value",e),s(2),b(e.outlet),s(2),u("href",r.authService.getTenantExternalURL()+"/menu/Orders/Orders/Supplier_Bill/Info?ID="+e.id,P),s(),F(" ",e.number," "),s(2),b(e.customer),s(2),b(R(12,13,e.date,"d MMM y hh:mm")),s(3),b(e.due?R(15,16,e.due,"d MMM y hh:mm"):"-"),s(3),b(V(18,19,e.amount)),s(3),u("label",e.payment),s(2),u("label",e.delivery),s(2),u("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function pt(t,c){if(t&1&&l(0),t&2){let e=d(2);j(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function mt(t,c){t&1&&(a(0,"tr")(1,"td",15)(2,"span"),l(3,"No records found."),o()()())}function ct(t,c){if(t&1){let e=E();a(0,"p-panel")(1,"p-table",9),I("onPage",function(i){_(e);let n=d();return h(n.onPageChange(i))})("onRowSelect",function(i){_(e);let n=d();return h(n.onRowSelect(i))})("onRowUnselect",function(i){_(e);let n=d();return h(n.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){_(e);let n=d();return h(n.onHeaderCheckboxToggle(i))}),T(2,at,20,0,"ng-template",null,2,C)(4,lt,25,21,"ng-template",null,3,C)(6,pt,1,3,"ng-template",null,4,C)(8,mt,4,0,"ng-template",null,5,C),o()()}if(t&2){let e=d();U(G(9,nt)),s(),u("scrollHeight","calc(100vh - 142px)")("value",e.store.data().data)("scrollable",!0)("paginator",!0)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}var Oe=(()=>{class t{constructor(){this.generateJournalService=S(k),this.store=S(he),this.authService=S(W)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedSupplierBill()).pipe(D(()=>{this.store.getJournalSupplierBill(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(m(p({},this.store.filter()),{Number:e}))}onPageChange(e){this.store.updateFilter(m(p({},this.store.filter()),{PageNumber:e.first/e.rows+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=H({type:t,selectors:[["app-journal-supplier-bill"]],features:[z([he])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Supplier Bill",3,"search","isSearchableInput"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","scrollHeight","value","scrollable","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"label"],[3,"icon","severity","text"],["colspan","9"]],template:function(r,i){if(r&1){let n=E();a(0,"app-main-panel",6),I("search",function(x){return _(n),h(i.onSearch(x))}),T(1,rt,1,1,"ng-template",null,0,C)(3,ct,10,10,"ng-template",null,1,C),o()}r&2&&u("isSearchableInput",!0)},dependencies:[ne,le,oe,re,ae,K,O,L,A,pe,ue,Y,X,Q,q],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var st={data:{data:[],totalCount:0},filter:{PageNumber:1,PageSize:20,Number:""}},ge=Z(ie(st),$(t=>({first:w(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:w(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount)),hasCheckedRows:w(()=>t.data().data.some(c=>c.checked)),checkedShift:w(()=>t.data().data.filter(c=>c.checked).map(c=>c.id))})),te(t=>{let c=S(k);return{updateFilter(e){v(t,r=>m(p({},r),{filter:p(p({},r.filter),e)}))},onRowSelect(e){v(t,r=>{let i=r.data.data.map(n=>n.id===e.id?m(p({},n),{checked:!0}):n);return m(p({},r),{data:m(p({},r.data),{data:i})})})},onRowUnselect(e){v(t,r=>{let i=r.data.data.map(n=>n.id===e.id?m(p({},n),{checked:!1}):n);return m(p({},r),{data:m(p({},r.data),{data:i})})})},onHeaderCheckboxToggle(e){v(t,r=>{let i=r.data.data.map(n=>m(p({},n),{checked:e}));return m(p({},r),{data:m(p({},r.data),{data:i})})})},getJournalShift:B(J(M(e=>c.getJournalShift(e).pipe(N(r=>v(t,i=>m(p({},i),{data:r})),r=>console.error("Error fetching journal shift:",r))))))}}),ee(t=>({onInit:()=>{t.getJournalShift(t.filter)}})));var ut=()=>({height:"calc(100vh - 70px)"});function dt(t,c){if(t&1){let e=E();a(0,"p-button",8),I("onClick",function(){_(e);let i=d(2);return h(i.onGenerateJournal())}),o()}}function ft(t,c){if(t&1&&T(0,dt,1,0,"p-button",7),t&2){let e=d();u("ngIf",e.store.hasCheckedRows())}}function _t(t,c){t&1&&(a(0,"tr")(1,"th",10),g(2,"p-tableHeaderCheckbox"),o(),a(3,"th"),l(4,"Number"),o(),a(5,"th"),l(6,"Open"),o(),a(7,"th"),l(8,"Close"),o(),a(9,"th"),l(10,"Cashier"),o(),a(11,"th"),l(12,"Sales + Tax"),o(),a(13,"th"),l(14,"Invoices"),o(),a(15,"th"),l(16,"Outlet"),o(),a(17,"th"),l(18,"Register"),o(),a(19,"th"),l(20,"Visitors"),o(),g(21,"th"),o())}function ht(t,c){if(t&1&&(a(0,"tr")(1,"td"),g(2,"p-tableCheckbox",11),o(),a(3,"td")(4,"a",12),l(5),o()(),a(6,"td"),l(7),y(8,"date"),o(),a(9,"td"),l(10),y(11,"date"),o(),a(12,"td"),l(13),o(),a(14,"td"),l(15),y(16,"number"),o(),a(17,"td"),l(18),y(19,"number"),o(),a(20,"td"),l(21),o(),a(22,"td"),l(23),o(),a(24,"td"),l(25),y(26,"number"),o(),a(27,"td"),g(28,"p-button",13),o()()),t&2){let e=c.$implicit,r=d(2);s(2),u("value",e),s(2),u("href",r.authService.getTenantExternalURL()+"/menu/Shift/Main/Previous_Shift/Register_Shift_Detail?ID="+e.id,P),s(),F(" ",e.number," "),s(2),b(R(8,14,e.open,"dd MMM y hh:mm")),s(3),b(R(11,17,e.close,"dd MMM y hh:mm")),s(3),b(e.cashier),s(2),b(V(16,20,e.salesNTax)),s(3),b(V(19,22,e.totalInvoice)),s(3),b(e.outlet),s(2),b(e.register),s(2),b(V(26,24,e.visitors)),s(3),u("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function gt(t,c){if(t&1&&l(0),t&2){let e=d(2);j(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function xt(t,c){t&1&&(a(0,"tr")(1,"td",14)(2,"span"),l(3,"No records found."),o()()())}function St(t,c){if(t&1){let e=E();a(0,"p-panel")(1,"p-table",9),I("onPage",function(i){_(e);let n=d();return h(n.onPageChange(i))})("onRowSelect",function(i){_(e);let n=d();return h(n.onRowSelect(i))})("onRowUnselect",function(i){_(e);let n=d();return h(n.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){_(e);let n=d();return h(n.onHeaderCheckboxToggle(i))}),T(2,_t,22,0,"ng-template",null,2,C)(4,ht,29,26,"ng-template",null,3,C)(6,gt,1,3,"ng-template",null,4,C)(8,xt,4,0,"ng-template",null,5,C),o()()}if(t&2){let e=d();U(G(9,ut)),s(),u("scrollHeight","calc(100vh - 142px)")("scrollable",!0)("paginator",!0)("lazy",!0)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}var Ae=(()=>{class t{constructor(){this.generateJournalService=S(k),this.store=S(ge),this.authService=S(W)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(r=>{this.store.onRowUnselect(r)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedShift()).pipe(D(()=>{this.store.getJournalShift(this.store.filter)})).subscribe()}onSearch(e){this.store.updateFilter(m(p({},this.store.filter()),{Number:e}))}onPageChange(e){let r=e.first/e.rows;this.store.updateFilter(m(p({},this.store.filter()),{PageNumber:r+1}))}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=H({type:t,selectors:[["app-journal-shift"]],features:[z([ge])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Shift Journal",3,"search","isSearchableInput"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","scrollHeight","scrollable","paginator","lazy","rows","totalRecords","value"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"icon","severity","text"],["colspan","10"]],template:function(r,i){if(r&1){let n=E();a(0,"app-main-panel",6),I("search",function(x){return _(n),h(i.onSearch(x))}),T(1,ft,1,1,"ng-template",null,0,C)(3,St,10,10,"ng-template",null,1,C),o()}r&2&&u("isSearchableInput",!0)},dependencies:[ne,le,oe,re,ae,K,O,L,A,pe,Y,X,Q,q],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var $i=[{path:"invoice",component:Ge},{path:"supplier-bill",component:Oe},{path:"shift",component:Ae},{path:"join-invoice",loadComponent:()=>import("./chunk-D5RQBZNF.js").then(t=>t.ARJournalComponent)},{path:"join-bill",loadComponent:()=>import("./chunk-MNCUT4L4.js").then(t=>t.ApJournalComponent)},{path:"adjustment",loadComponent:()=>import("./chunk-LLV6TGMT.js").then(t=>t.AdjustmentJournalComponent)}];export{$i as generateJournalRoutes};
|
package/chunk-3VC2KAML.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Je}from"./chunk-G4XX7EU2.js";import{a as qe,b as Qe,c as Xe,d as Ze,e as et,f as tt}from"./chunk-VKO43FOT.js";import{a as Z,b as re}from"./chunk-JQ4DHNFQ.js";import{a as ze,b as Ye}from"./chunk-56MVOUHH.js";import{h as ee,i as Ke,m as ve,n as ye,o as te}from"./chunk-UMYCPFK5.js";import{f as Y,g as K}from"./chunk-X3FQFXUZ.js";import"./chunk-7TKATLB4.js";import"./chunk-ZKXT6RSI.js";import{a as Ie}from"./chunk-7GT5MR57.js";import{c as H,d as W}from"./chunk-VF7TG32T.js";import{a as Se,b as z}from"./chunk-F7TF7ASR.js";import{g as R}from"./chunk-L6VKOTIV.js";import"./chunk-5OXHRN43.js";import{a as ce,b as Ve,c as $e,d as We,e as Ue,f as je,g as He}from"./chunk-AM66YD6C.js";import{E as B,F as V,w as Be}from"./chunk-FUGCJNGU.js";import{e as j,f as de,j as ae,k as fe,m as _e,n as ge,o as Ne,p as xe,w as he,y as X,z as Ce}from"./chunk-BWS6U7BM.js";import{d as ue}from"./chunk-VI3AV775.js";import"./chunk-F2X3VGZZ.js";import{C as ie,E as Ge,F as N,M as A,f as k,j as Le,m as D}from"./chunk-KQAMA66M.js";import{Cb as f,Ga as O,Ic as ke,Jc as Ae,Kb as s,Lc as u,Nb as T,Pb as De,Qb as v,Sb as y,Tb as b,Ub as i,Vb as o,Wb as $,X as Q,Xc as me,Z as E,_b as M,ba as se,bb as we,c as Me,dc as w,ec as c,gb as p,ha as h,pa as C,pc as l,qa as S,qc as d,rc as P,s as q,wb as F,xc as Re,yc as I,zc as oe}from"./chunk-D5AXB5DE.js";import{a as g,b as x}from"./chunk-YQFG5XE2.js";var L=(()=>{class t{constructor(){this.httpService=h(ue)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration")}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(){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration")}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=se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var G=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}(G||{});var nt={[G.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"}],[G.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"}],[G.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[G.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[G.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"}],[G.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[G.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[G.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[G.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function ft(t,r){if(t&1){let e=M();i(0,"div",5)(1,"p-button",6),w("onClick",function(){C(e);let a=c();return S(a.onSubmit())}),o()()}}function _t(t,r){if(t&1&&(i(0,"p-tab",10),l(1),o()),t&2){let e=r.$implicit;s("value",e.value),p(),d(e.label)}}function gt(t,r){if(t&1&&(i(0,"div",19)(1,"div")(2,"span"),l(3),o()(),i(4,"div")(5,"span"),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function xt(t,r){if(t&1&&(i(0,"div",19)(1,"div")(2,"span"),l(3),o()(),i(4,"div")(5,"span"),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function ht(t,r){if(t&1&&(i(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),l(4),o(),i(5,"span",17),l(6),o()(),i(7,"p-select",18),f(8,gt,7,2,"ng-template",null,2,u)(10,xt,7,2,"ng-template",null,3,u),o()()()),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 Ct(t,r){if(t&1&&(i(0,"div",19)(1,"div")(2,"span"),l(3),o()(),i(4,"div")(5,"span"),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function St(t,r){if(t&1&&(i(0,"div",19)(1,"div")(2,"span"),l(3),o()(),i(4,"div")(5,"span"),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function vt(t,r){if(t&1&&(i(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),l(4),o(),i(5,"span",20),l(6),o()(),i(7,"p-select",18),f(8,Ct,7,2,"ng-template",null,2,u)(10,St,7,2,"ng-template",null,3,u),o()()()),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 yt(t,r){if(t&1&&(i(0,"p-tabpanel",10)(1,"div",11)(2,"div",12)(3,"div",13),y(4,ht,12,4,"div",14,v),o()(),i(6,"div",12)(7,"div",13),y(8,vt,12,4,"div",14,v),o()()()()),t&2){let e=r.$implicit,n=c(3);s("value",e.value),p(),s("formGroupName",e.value),p(3),b(n.getDebitEntries(e.value)),p(4),b(n.getCreditEntries(e.value))}}function bt(t,r){if(t&1){let e=M();i(0,"form",8),w("ngSubmit",function(){C(e);let a=c(2);return S(a.onSubmit())}),i(1,"p-tabs",9)(2,"p-tablist"),y(3,_t,2,2,"p-tab",10,v),o(),i(5,"p-tabpanels"),y(6,yt,10,2,"p-tabpanel",10,v),o()()()}if(t&2){let e=c(2);s("formGroup",e.accountForm),p(),s("value",e.tab())("lazy",!0),p(2),b(e.tabs()),p(3),b(e.tabs())}}function Pt(t,r){if(t&1&&f(0,bt,8,3,"form",7),t&2){let e=c();s("ngIf",e.posIntegration()&&e.accountForm)}}var ot=(()=>{class t{constructor(){this.posConfigService=h(L),this.fb=h(he),this.tab=O(G.POSGLOBAL_SELL),this.tabs=O(Object.values(G).map(e=>({label:e,value:e}))),this.posIntegration=O(null),this.form=O([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=G}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(E(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 a=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,a),e[n.value]=this.fb.array(a.map(m=>this.createEntryFormGroup(m)))}),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(a=>{this.syncAccountIDs(e.typeID,a,n)}),n}getAccountIDByTypeID(e){return this.form().find(a=>a.typeID===e)?.accountID||""}getEntriesForTab(e){return nt[e]||[]}getTabEntries(e){return this.accountForm.get(e)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],a=new Set;for(let m of Object.values(e))for(let{typeID:_,accountID:U}of m){let Te=`${_}_${U}`;a.has(Te)||(a.add(Te),n.push({typeID:_,accountID:U||Je}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:m=>console.error("Save failed",m)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,a)=>({entry:n,index:a})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,a)=>({entry:n,index:a})).filter(n=>n.entry.value.side==="credit")}syncAccountIDs(e,n,a){Object.values(this.accountForm.controls).forEach(m=>{m.controls.forEach(_=>{_!==a&&_.get("typeID")?.value===e&&_.get("accountID")?.value!==n&&_.get("accountID")?.setValue(n,{emitEvent:!1})})})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({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,a){n&1&&(i(0,"app-main-panel",4),f(1,ft,2,0,"ng-template",null,0,u)(3,Pt,1,1,"ng-template",null,1,u),o())},dependencies:[R,tt,et,Ze,Xe,qe,Qe,Be,K,Y,X,fe,j,de,D,k,A,V,B,Ce,_e,xe,ge],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ot=t=>[t];function It(t,r){if(t&1&&(i(0,"th",8),l(1),o()),t&2){let e=r.$implicit;p(),d(e.name.slice(0,10))}}function Et(t,r){if(t&1&&(i(0,"tr")(1,"th",6),l(2,"Method"),o(),i(3,"th",7),l(4,"Outlet"),o()(),i(5,"tr"),y(6,It,2,1,"th",8,v),o()),t&2){let e=c(3);p(3),s("colSpan",e.paymentConfiguration().outlets.length),p(3),b(e.paymentConfiguration().outlets)}}function Ft(t,r){if(t&1&&(i(0,"td"),l(1),o()),t&2){let e=r.$implicit;p(),d(e.accountName)}}function Tt(t,r){if(t&1&&(i(0,"tr")(1,"td",9)(2,"a",10),l(3),o()(),y(4,Ft,2,1,"td",null,v),o()),t&2){let e=r.$implicit;p(2),s("routerLink",oe(2,Ot,e.id)),p(),d(e.name),p(),b(e.accounts)}}function Mt(t,r){if(t&1&&(i(0,"p-table",5),f(1,Et,8,1,"ng-template",null,1,u)(3,Tt,6,4,"ng-template",null,2,u),o()),t&2){let e=c(2);s("scrollable",!0)("scrollHeight","calc(100vh - 70px)")("value",e.paymentConfiguration().payment)}}function wt(t,r){t&1&&(i(0,"app-main-panel",4),f(1,Mt,5,3,"ng-template",null,0,u),o())}var it=(()=>{class t{constructor(){this.POSSetupService=h(L),this.paymentConfiguration=O(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration().pipe(E(e=>{this.paymentConfiguration.set(e)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",4,"ngIf"],["pageTitle","Payment Method Accounting"],[3,"scrollable","scrollHeight","value"],["rowspan","3",2,"min-width","300px"],[3,"colSpan"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,a){n&1&&f(0,wt,3,0,"app-main-panel",3),n&2&&s("ngIf",a.paymentConfiguration())},dependencies:[R,te,ee,Ke,D,k,A,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Dt=()=>({height:"calc(100vh - 70px)"}),Rt=t=>[t];function kt(t,r){if(t&1&&(i(0,"th"),l(1),o()),t&2){let e=r.$implicit;p(),d(e.value)}}function At(t,r){if(t&1&&(i(0,"tr")(1,"th"),l(2,"Name"),o(),y(3,kt,2,1,"th",null,v),o()),t&2){let e=c(3);p(3),b(e.outletList().listCOAType)}}function Lt(t,r){if(t&1&&(i(0,"td"),l(1),o()),t&2){let e=r.$implicit;p(),d(e)}}function Gt(t,r){if(t&1&&(i(0,"tr")(1,"td")(2,"a",6),l(3),o()(),y(4,Lt,2,1,"td",null,v),o()),t&2){let e=r.$implicit;p(2),s("routerLink",oe(2,Rt,e.OutletID)),p(),P(" ",e.OutletName,""),p(),b(e.Accounts)}}function Nt(t,r){if(t&1&&(i(0,"p-panel")(1,"p-table",5),f(2,At,5,0,"ng-template",null,1,u)(4,Gt,6,4,"ng-template",null,2,u),o()()),t&2){let e=c(2);T(I(5,Dt)),p(),s("scrollable",!0)("scrollHeight","calc(100vh - 100px)")("value",e.outletList().listOutletAccount)}}function Bt(t,r){if(t&1&&f(0,Nt,6,6,"p-panel",4),t&2){let e=c();s("ngIf",e.outletList())}}var at=(()=>{class t{constructor(){this.POSSetupService=h(L),this.outletList=O(null)}ngOnInit(){this.POSSetupService.fetchPOSOutletConfiguration().pipe(E(e=>{this.outletList.set(e)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-outlet"]],decls:3,vars:0,consts:[["content",""],["header",""],["body",""],["pageTitle","Outlet Account"],[3,"style",4,"ngIf"],[3,"scrollable","scrollHeight","value"],[1,"link","link-primary",3,"routerLink"]],template:function(n,a){n&1&&(i(0,"app-main-panel",3),f(1,Bt,1,1,"ng-template",null,0,u),o())},dependencies:[R,D,k,z,te,ee,A,N,W,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Vt=()=>({height:"calc(100vh - 100px)"}),$t=()=>({height:"calc(100vh - 150px)"});function Wt(t,r){if(t&1){let e=M();i(0,"a",5),l(1,"Cancel"),o(),i(2,"p-button",6),w("onClick",function(){C(e);let a=c();return S(a.updatePOsOutletConfiguration())}),o()}}function Ut(t,r){if(t&1&&(i(0,"div",16)(1,"div",17)(2,"span"),l(3),o()(),i(4,"div",17)(5,"span",17),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function jt(t,r){if(t&1&&(i(0,"div",16)(1,"div",17)(2,"span"),l(3),o()(),i(4,"div",18)(5,"span",17),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function Ht(t,r){if(t&1&&(i(0,"div",12)(1,"span",14),l(2),o(),i(3,"p-select",15),f(4,Ut,7,2,"ng-template",null,2,u)(6,jt,7,2,"ng-template",null,3,u),o()()),t&2){let e,n=r.$implicit,a=r.$index,m=c(3);s("formGroupName",a),p(2),d((e=n.get("TypeName"))==null?null:e.value),p(),s("options",m.options.accounts)}}function zt(t,r){t&1&&$(0,"hr")}function Yt(t,r){if(t&1&&(i(0,"div",9)(1,"h3",10),l(2),ke(3,"titlecase"),o(),i(4,"div",11),y(5,Ht,8,3,"div",12,v),o()(),f(7,zt,1,0,"hr",13)),t&2){let e,n=r.$implicit,a=r.$index,m=r.$index,_=r.$count,U=c(2);s("formGroupName",a),p(2),P(" ",Ae(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),b(U.getAccountsFormArray(m).controls),p(2),s("ngIf",m!==_-1)}}function Kt(t,r){if(t&1&&(i(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),y(4,Yt,8,5,null,null,v),o()()()()),t&2){let e=c();T(I(5,Vt)),p(),T(I(6,$t)),p(),s("formGroup",e.accountsForm),p(2),b(e.accountGroupsArray.controls)}}var rt=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(L),this.outletForm=O(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(he)}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(q(e=>e.get("id")),Q(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),E(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(a=>{a.accounts=this.allAccounts.filter(m=>a.typeIds.includes(m.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(a=>{n.push(this.createAccountGroupControl(a))})})).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(a=>a.accounts.map(m=>({AccountID:m.AccountID,TypeID:m.TypeID,TypeName:m.TypeName,OutletID:m.OutletID,OutletName:m.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-outlet-form"]],decls:5,vars:2,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],["routerLink","/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,a){n&1&&(i(0,"app-main-panel",4),f(1,Wt,3,0,"ng-template",null,0,u)(3,Kt,6,7,"ng-template",null,1,u),o()),n&2&&s("pageTitle","Edit "+a.outletName)("hasMainWrapperPadding",!0)},dependencies:[R,D,k,Le,z,Ce,fe,j,de,_e,xe,ge,Ne,K,Y,W,H,Z,V,B,A,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var qt=()=>({height:"calc(100vh - 100px)"}),Qt=()=>({width:"100%",height:"calc(100vh - 150px)"}),Xt=()=>({width:"100%"});function Zt(t,r){if(t&1){let e=M();i(0,"a",6),l(1,"Cancel"),o(),i(2,"p-button",7),w("onClick",function(){C(e);let a=c(3);return S(a.updatePOSOutletConfiguration())}),o()}}function en(t,r){if(t&1&&(i(0,"div",16)(1,"div",17)(2,"span"),l(3),o()(),i(4,"div",17)(5,"span",17),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function tn(t,r){if(t&1&&(i(0,"div",16)(1,"div",17)(2,"span"),l(3),o()(),i(4,"div",18)(5,"span",17),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function nn(t,r){if(t&1){let e=M();i(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),l(4),o()(),$(5,"div",13),i(6,"div",14)(7,"p-select",15),w("ngModelChange",function(a){let m=C(e).$index,_=c(4);return S(_.updateAccountById(a,m))}),f(8,en,7,2,"ng-template",null,2,u)(10,tn,7,2,"ng-template",null,3,u),o()()()()}if(t&2){let e=r.$implicit,n=r.$index,a=c(4);p(4),d(e.outletName.slice(0,15)),p(3),T(I(7,Xt)),s("ngModel",a.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",a.paymentForm().options.chartOfAccount)}}function on(t,r){if(t&1&&(i(0,"p-card")(1,"p-scrollpanel")(2,"div",8),y(3,nn,12,8,"div",9,v),o()()()),t&2){let e=c(3);T(I(4,qt)),p(),T(I(5,Qt)),p(2),b(e.paymentForm().form.accounts)}}function an(t,r){if(t&1&&(i(0,"app-main-panel",4),f(1,Zt,3,0,"ng-template",null,0,u)(3,on,5,6,"ng-template",null,1,u),o()),t&2){let e=c(2);s("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")("hasMainWrapperPadding",!0)}}function rn(t,r){if(t&1&&f(0,an,5,2,"app-main-panel",5),t&2){let e=c();s("ngIf",e.paymentForm())}}var lt=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(L),this.paymentForm=O(null),this.router=h(Ge)}ngOnInit(){this.route.paramMap.pipe(q(e=>+e.get("id")),Q(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),E(e=>{this.paymentForm.set(e)}),Ie("response")).subscribe()}updateAccountById(e,n){let a=this.paymentForm().form.accounts,m=x(g({},this.paymentForm()),{form:x(g({},this.paymentForm().form),{accounts:a.map((_,U)=>U===n?x(g({},_),{accountID:e}):_)})});this.paymentForm.set(m)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Ie("response"),E(()=>{this.router.navigate(["/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({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","/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,a){n&1&&f(0,rn,1,1,"app-main-panel",4),n&2&&De(a.paymentForm()?0:-1)},dependencies:[z,Se,R,D,k,re,Z,K,Y,X,j,ae,A,N,V,B,W],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var pn=()=>({height:"calc(100vh - 70px)"}),ln=()=>({width:"100%",height:"calc(100vh - 100px)"});function mn(t,r){if(t&1){let e=M();i(0,"div",5)(1,"a",6),l(2,"Cancel"),o(),i(3,"p-button",7),w("onClick",function(){C(e);let a=c();return S(a.updatePOSTaxConfiguration())}),o()()}}function cn(t,r){if(t&1&&(i(0,"div",5)(1,"div",15)(2,"span"),l(3),o()(),i(4,"div",15)(5,"span",15),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function sn(t,r){if(t&1&&(i(0,"div",5)(1,"div",15)(2,"span"),l(3),o()(),i(4,"div",16)(5,"span",15),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function un(t,r){if(t&1){let e=M();i(0,"div",11)(1,"div",12)(2,"label",13),l(3),o(),i(4,"p-select",14),w("ngModelChange",function(a){let m=C(e).$index,_=c(2);return S(_.updateAccountID(a,m))}),f(5,cn,7,2,"ng-template",null,2,u)(7,sn,7,2,"ng-template",null,3,u),o()()()}if(t&2){let e=r.$implicit,n=r.$index,a=c(2);p(3),d(e.name),p(),s("options",a.taxForm().options.chartOfAccount)("ngModel",a.taxForm().form[n].accountID)}}function dn(t,r){if(t&1&&(i(0,"p-panel")(1,"p-scroll-panel")(2,"div",8)(3,"div",9)(4,"div",10),y(5,un,9,3,"div",11,v),o()()()()()),t&2){let e=c();T(I(4,pn)),p(),T(I(5,ln)),p(4),b(e.taxForm().form)}}var mt=(()=>{class t{constructor(){this.POSSetupService=h(L),this.taxForm=O(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(E(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let a=this.taxForm().form,m=x(g({},this.taxForm()),{form:a.map((_,U)=>U===n?x(g({},_),{accountID:e}):_)});this.taxForm.set(m)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(E(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({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,a){n&1&&(i(0,"app-main-panel",4),f(1,mn,4,0,"ng-template",null,0,u)(3,dn,7,6,"ng-template",null,1,u),o())},dependencies:[R,z,D,K,Y,re,Z,X,j,ae,A,N,V,B,W,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var fn=()=>({height:"calc(100vh - 70px)"}),_n=()=>({"min-width":"50rem"}),gn=t=>[t];function xn(t,r){t&1&&$(0,"p-button",6)}function hn(t,r){if(t&1&&f(0,xn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.hasCheckedItems())}}function Cn(t,r){t&1&&(i(0,"tr")(1,"th",8),$(2,"p-tableHeaderCheckbox"),o(),i(3,"th"),l(4,"Name"),o(),i(5,"th"),l(6,"Description"),o()())}function Sn(t,r){if(t&1&&(i(0,"tr")(1,"td"),$(2,"p-tableCheckbox",9),o(),i(3,"td")(4,"a",10),l(5),o()(),i(6,"td"),l(7),o()()),t&2){let e,n=r.$implicit;p(2),s("value",n),p(2),s("routerLink",oe(4,gn,n.id)),p(),d(n.name),p(2),d((e=n.description)!==null&&e!==void 0?e:"N/A")}}function vn(t,r){if(t&1){let e=M();i(0,"p-panel")(1,"p-table",7),w("onRowSelect",function(a){C(e);let m=c();return S(m.onRowSelect(a))})("onRowUnselect",function(a){C(e);let m=c();return S(m.onRowSelect(a))})("onHeaderCheckboxToggle",function(a){C(e);let m=c();return S(m.onSelectAll(a))}),f(2,Cn,7,0,"ng-template",null,2,u)(4,Sn,8,6,"ng-template",null,3,u),o()()}if(t&2){let e=c();T(I(4,fn)),p(),s("value",e.writeoffList().data)("tableStyle",I(5,_n))}}var ct=(()=>{class t{constructor(){this.POSSetupService=h(L),this.writeoffList=O(null),this.hasCheckedItems=me(()=>{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(g({},e),{data:e.data.map(n=>x(g({},n),{checked:!1}))})),E(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let a=n.data.findIndex(m=>m.id===e.data.id);if(a!==-1){let m=[...n.data];m[a]=x(g({},m[a]),{checked:!m[a].checked}),this.writeoffList.set(x(g({},n),{data:m}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let a=n.data.map(m=>x(g({},m),{checked:e.checked}));this.writeoffList.set(x(g({},n),{data:a}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({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"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","4rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,a){n&1&&(i(0,"app-main-panel",4),f(1,hn,1,1,"ng-template",null,0,u)(3,vn,6,6,"ng-template",null,1,u),o())},dependencies:[R,D,k,te,ee,ve,ye,A,N,V,B,W,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var yn=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function bn(t,r){if(t&1){let e=M();i(0,"div",6)(1,"a",7),l(2,"Cancel"),o(),i(3,"p-button",8),w("onClick",function(){C(e);let a=c(2);return S(a.updateWriteOffConfiguration())}),o()()}}function Pn(t,r){if(t&1&&(i(0,"div",6)(1,"span",16),l(2),o(),i(3,"span",16),l(4),o()()),t&2){let e=r.$implicit;p(2),P("(",e.code,")"),p(2),d(e.name)}}function On(t,r){if(t&1&&(i(0,"div",6)(1,"span",16),l(2),o(),i(3,"span",16),l(4),o()()),t&2){let e=r.$implicit;p(2),P("(",e.code,")"),p(2),d(e.name)}}function In(t,r){if(t&1){let e=M();i(0,"div",12)(1,"div",13)(2,"label",14),l(3),o(),i(4,"p-select",15),w("ngModelChange",function(a){let m=C(e).$index,_=c(3);return S(_.updateAccountById(a,m))}),f(5,Pn,5,2,"ng-template",null,2,u)(7,On,5,2,"ng-template",null,3,u),o()()()}if(t&2){let e=r.$implicit,n=c(3);p(3),d(e.name),p(),s("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function En(t,r){if(t&1&&(i(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),y(5,In,9,5,"div",12,v),o()()()()()),t&2){let e=c(2);p(),T(I(2,yn)),p(4),b(e.writeOffForm().form)}}function Fn(t,r){if(t&1&&(i(0,"app-main-panel",5),f(1,bn,4,0,"ng-template",null,0,u)(3,En,7,3,"ng-template",null,1,u),o()),t&2){let e=c();s("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var st=(()=>{class t{constructor(){this.POSSetupService=h(L),this.route=h(ie),this.writeOffForm=O(null)}ngOnInit(){this.route.paramMap.pipe(q(e=>e.get("id")),Q(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),E(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let a=this.writeOffForm().form,m=x(g({},this.writeOffForm()),{form:a.map((_,U)=>U===n?x(g({},_),{accountID:e}):_)});this.writeOffForm.set(m)}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=F({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","/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,a){n&1&&f(0,Fn,5,2,"app-main-panel",4),n&2&&s("ngIf",a.writeOffForm())},dependencies:[R,D,k,z,Se,re,Z,K,Y,X,j,ae,A,N,V,B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var ut=(()=>{class t{constructor(){this.httpService=h(ue)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Tn={data:{expenseOptions:[]}},Fe=Ve(je(Tn),He("POSExpenseOptionStore"),$e(t=>({hasCheckedRows:me(()=>t.data().expenseOptions.some(r=>r.checked)),checkedInvoice:me(()=>t.data().expenseOptions.filter(r=>r.checked).map(r=>r.id))})),Ue(t=>{let r=h(ut);return{onRowSelect(n){ce(t,a=>{let m=a.data.expenseOptions.map(_=>_.id===n.id?x(g({},_),{checked:!0}):_);return x(g({},a),{data:x(g({},a.data),{expenseOptions:m})})})},onRowUnselect(n){ce(t,a=>{let m=a.data.expenseOptions.map(_=>_.id===n.id?x(g({},_),{checked:!1}):_);return x(g({},a),{data:x(g({},a.data),{expenseOptions:m})})})},onHeaderCheckboxToggle(n){ce(t,a=>{let m=a.data.expenseOptions.map(_=>x(g({},_),{checked:n}));return x(g({},a),{data:x(g({},a.data),{expenseOptions:m})})})},getExpenseOptions:ze(Me(Q(()=>r.getExpenseOptions().pipe(Ye({next:n=>{ce(t,a=>x(g({},a),{data:x(g({},a.data),{expenseOptions:n.expenseOptions.map(m=>x(g({},m),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),We({onInit:t=>{t.getExpenseOptions()}}));var Mn=()=>({height:"calc(100vh - 70px)"});function wn(t,r){t&1&&$(0,"p-button",6)}function Dn(t,r){if(t&1&&f(0,wn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.store.hasCheckedRows())}}function Rn(t,r){t&1&&(i(0,"tr")(1,"th",8),$(2,"p-tableHeaderCheckbox"),o(),i(3,"th"),l(4,"Name"),o(),i(5,"th"),l(6,"Account"),o(),i(7,"th"),l(8,"Description"),o()())}function kn(t,r){if(t&1&&(i(0,"tr")(1,"td"),$(2,"p-tableCheckbox",9),o(),i(3,"td"),l(4),o(),i(5,"td"),l(6),o(),i(7,"td"),$(8,"p",10),o()()),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,we)}}function An(t,r){if(t&1){let e=M();i(0,"p-panel")(1,"p-table",7),w("onRowSelect",function(a){C(e);let m=c();return S(m.onRowSelect(a))})("onRowUnselect",function(a){C(e);let m=c();return S(m.onRowUnselect(a))})("onHeaderCheckboxToggle",function(a){C(e);let m=c();return S(m.onHeaderCheckboxToggle(a))}),f(2,Rn,9,0,"ng-template",null,2,u)(4,kn,9,4,"ng-template",null,3,u),o()()}if(t&2){let e=c();T(I(3,Mn)),p(),s("value",e.store.data().expenseOptions)}}var dt=(()=>{class t{constructor(){this.store=h(Fe)}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=F({type:t,selectors:[["app-pos-expense-option"]],features:[Re([Fe])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Contact Form"],["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,a){n&1&&(i(0,"app-main-panel",4),f(1,Dn,1,1,"ng-template",null,0,u)(3,An,6,4,"ng-template",null,1,u),o())},dependencies:[R,te,ee,ve,ye,W,H,V,B,D,k],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ma=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:ot},{path:"outlets",component:at},{path:"outlets/:id",component:rt},{path:"payments",component:it},{path:"payments/:id",component:lt},{path:"taxs",component:mt},{path:"writeoff",component:ct},{path:"writeoff/:id",component:st},{path:"expense-option",component:dt}]}];export{Ma as POS_SETUP_ROUTES};
|
package/chunk-4J3EFT67.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as a}from"./chunk-VI3AV775.js";import{V as o,ba as i,ha as n}from"./chunk-D5AXB5DE.js";import{a as c}from"./chunk-YQFG5XE2.js";var C=(()=>{class r{constructor(){this.httpService=n(a)}getChartOfAccountLoader(){return this.httpService.get("","api/ChartOfAccountLoader")}getPaginatedChartAccounts(t){let e=c({},t);return this.httpService.post("","api/ChartOfAccount/GetPaginatedList",e)}getChartAccountForm(){return this.httpService.get("","api/ChartOfAccount/Form")}getChartAccountById(t){return this.httpService.get("",`api/ChartOfAccount/Info/${t}`)}getChartAccountFormById(t){return this.httpService.get("",`api/ChartOfAccount/Form/${t}`)}submitChartAccount(t,e={}){return this.httpService.post("","api/ChartOfAccount/Submit",t,e)}deleteChartAccount(t){if(t.length>1){let e={body:t};return this.httpService.delete("","api/ChartOfAccount/Batch",e)}else return this.httpService.delete("",`api/ChartOfAccount/${t[0]}`)}fetchCategoryOptions(){return this.httpService.get("","api/ChartOfAccount/CategoryOptions")}getCachedCategoriesOptions(){return this.categoryOptionsCache$||(this.categoryOptionsCache$=this.fetchCategoryOptions().pipe(o(1))),this.categoryOptionsCache$}exportChartOfAccounts(t){return this.httpService.post(void 0,"api/ChartOfAccountExport/export",t,{responseType:"blob"})}importPreviewChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importpreview",t)}importConfirmChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importconfirm",t)}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{C as a};
|
package/chunk-6J5S4UPN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{F as g,M as v,c as u,m as f}from"./chunk-KQAMA66M.js";import{Kb as a,Ub as e,Vb as t,Wb as i,dc as p,gb as r,pc as n,wb as s,yc as d,zc as c}from"./chunk-D5AXB5DE.js";import"./chunk-YQFG5XE2.js";var h=o=>({"d-none":o}),k=()=>["/"],x=()=>["/authentication/signup2"],y=o=>({"d-block":o}),_=(()=>{class o{constructor(){this.loginform=!0,this.recoverform=!1}showRecoverForm(){this.loginform=!this.loginform,this.recoverform=!this.recoverform}static{this.\u0275fac=function(m){return new(m||o)}}static{this.\u0275cmp=s({type:o,selectors:[["app-login"]],decls:62,vars:10,consts:[[1,"auth-wrapper","d-flex","no-block","justify-content-center","align-items-center",2,"background",`url(../../../../../assets/images/background/login-register.jpg)
|
|
2
|
-
no-repeat center center`],[1,"auth-box","on-sidebar","m-3","m-md-0"],["id","loginform",3,"ngClass"],[1,"text-center"],[1,"db"],["src","../../../../../assets/images/logos/logo-icon.svg","alt","logo"],[1,"font-medium","mb-4","mt-2"],[1,"row"],[1,"col-12"],["id","loginform",1,"form-horizontal","mt-3"],[1,"input-group","mb-3"],["id","basic-addon1",1,"input-group-text"],[1,"ti-user"],["type","text","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1",1,"form-control"],["id","basic-addon2",1,"input-group-text"],[1,"ti-pencil"],["type","text","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1",1,"form-control"],[1,"form-group","row"],[1,"col-md-12"],[1,"form-check","d-flex"],["type","checkbox","id","customCheck1",1,"form-check-input"],["for","customCheck1",1,"form-check-label","fs-3","ms-2"],["href","javascript:void(0)","id","to-recover",1,"text-dark","ms-auto","fs-3",3,"click"],[1,"fa","fa-lock","me-2"],[1,"form-group","text-center","mt-4"],[1,"col-xs-12"],[1,"btn","d-block","w-100","btn-primary",3,"routerLink"],[1,"row","mt-4"],[1,"col-xs-12","col-sm-12","col-md-12","mt-2","text-center"],[1,"social"],["href","javascript:void(0)","data-toggle","tooltip","title","","data-original-title","Login with Facebook",1,"btn","btn-primary","me-2"],["aria-hidden","true",1,"fab","fa-facebook-f"],["href","javascript:void(0)","data-toggle","tooltip","title","","data-original-title","Login with Google",1,"btn","btn-danger"],["aria-hidden","true",1,"fab","fa-google"],[1,"form-group","mb-0","mt-2"],[1,"col-sm-12","text-center"],[1,"text-primary","ms-1",3,"routerLink"],["id","recoverform",3,"ngClass"],[1,"logo"],[1,"db","mb-2","d-block"],[1,"row","mt-3"],["action","../../../../../index.html",1,"col-12"],["type","email","required","","placeholder","Username",1,"form-control","form-control-lg"],["type","submit","name","action",1,"btn","d-block","w-100","btn-lg","btn-danger"]],template:function(m,l){m&1&&(e(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),i(5,"img",5),t(),e(6,"h5",6),n(7,"Sign In to Admin"),t()(),e(8,"div",7)(9,"div",8)(10,"form",9)(11,"div",10)(12,"span",11),i(13,"i",12),t(),i(14,"input",13),t(),e(15,"div",10)(16,"span",14),i(17,"i",15),t(),i(18,"input",16),t(),e(19,"div",17)(20,"div",18)(21,"div",19),i(22,"input",20),e(23,"label",21),n(24,"Remember me"),t(),e(25,"a",22),p("click",function(){return l.showRecoverForm()}),i(26,"i",23),n(27," Forgot pwd?"),t()()()(),e(28,"div",24)(29,"div",25)(30,"a",26),n(31,"Log In"),t()()(),e(32,"div",27)(33,"div",28)(34,"div",29)(35,"a",30),i(36,"i",31),t(),e(37,"a",32),i(38,"i",33),t()()()(),e(39,"div",34)(40,"div",35),n(41," Don't have an account? "),e(42,"a",36)(43,"b"),n(44,"Sign Up"),t()()()()()()()(),e(45,"div",37)(46,"div",38)(47,"span",39),i(48,"img",5),t(),e(49,"h5",6),n(50,"Recover Password"),t(),e(51,"span"),n(52,"Enter your Email and instructions will be sent to you!"),t()(),e(53,"div",40)(54,"form",41)(55,"div",17)(56,"div",8),i(57,"input",42),t()(),e(58,"div",40)(59,"div",8)(60,"button",43),n(61," Reset "),t()()()()()()()()),m&2&&(r(2),a("ngClass",c(4,h,l.recoverform)),r(28),a("routerLink",d(6,k)),r(12),a("routerLink",d(7,x)),r(3),a("ngClass",c(8,y,l.recoverform)))},dependencies:[f,u,v,g],encapsulation:2})}}return o})();export{_ as Login2Component};
|
package/chunk-7GT5MR57.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Z as o}from"./chunk-D5AXB5DE.js";function i(e="emit"){return r=>r.pipe(o(t=>console.log(`${e}`,t)))}export{i as a};
|