dealposbooks 1.9.1 → 1.9.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.
- package/3rdpartylicenses.txt +28 -28
- package/assets/scss/layouts/dark/_dark.scss +164 -153
- package/assets/scss/style.scss +1 -1
- package/assets/scss/variables/_variables.scss +2 -0
- package/assets/world.json +17808 -1
- package/{chunk-S64TQVWK.js → chunk-2GAPYNNZ.js} +1 -1
- package/chunk-2HYLQR56.js +1 -0
- package/chunk-2VTAWSHV.js +1 -0
- package/chunk-3R4UQAEP.js +1 -0
- package/chunk-3SPHZLLV.js +301 -0
- package/{chunk-CEMQLY34.js → chunk-4EDEITTK.js} +1 -1
- package/{chunk-2ACAW72E.js → chunk-4FHVIHSY.js} +1 -1
- package/{chunk-66DZK3FQ.js → chunk-4OHRBQE4.js} +1 -1
- package/chunk-4OXMK44M.js +1 -0
- package/chunk-4TTJBC5I.js +1 -0
- package/chunk-5CZUTVXD.js +47 -0
- package/{chunk-YT7EC5LI.js → chunk-5M3BH2HK.js} +1 -1
- package/{chunk-NNH4DORM.js → chunk-5MHVGNVO.js} +1 -1
- package/{chunk-VYTUB2DV.js → chunk-63XPN7AG.js} +1 -1
- package/chunk-74EMBNLM.js +1 -0
- package/chunk-75NY4EHJ.js +7 -0
- package/{chunk-ON4N4CPO.js → chunk-7CAU344O.js} +1 -1
- package/chunk-BS6MB7HD.js +1 -0
- package/chunk-C54Z7Z3J.js +246 -0
- package/{chunk-IF72X7RS.js → chunk-CCE4VMYO.js} +1 -1
- package/{chunk-7T6O4KFO.js → chunk-CP57YBBI.js} +1 -1
- package/{chunk-SJTXIIX5.js → chunk-DCES5UJV.js} +1 -1
- package/{chunk-MS3UTNX6.js → chunk-DERWDCI5.js} +1 -1
- package/chunk-EDPSZYHH.js +1 -0
- package/{chunk-TBHL2OSG.js → chunk-ELUESCCC.js} +1 -1
- package/{chunk-CMHZLZ4E.js → chunk-FJ7IM55X.js} +1 -1
- package/{chunk-CEUNPX5D.js → chunk-FNWWNWQP.js} +1 -1
- package/chunk-FOSJHYSQ.js +300 -0
- package/chunk-G4XX7EU2.js +1 -0
- package/chunk-GH3BVHFE.js +1 -0
- package/{chunk-VVC3QQUI.js → chunk-GO3ETPB7.js} +1 -1
- package/chunk-GYI6FJNZ.js +1 -0
- package/{chunk-HZLUYZB3.js → chunk-GYOO2JKC.js} +1 -1
- package/chunk-HF7H6NPN.js +1 -0
- package/chunk-HGUXJRBI.js +1 -0
- package/{chunk-TL6UHPBU.js → chunk-HKFTHGN6.js} +1 -1
- package/{chunk-DWTUKOMR.js → chunk-JBLYOAVS.js} +1 -1
- package/chunk-JDKSRPMM.js +1 -0
- package/chunk-JWPV2SP2.js +59 -0
- package/chunk-K5GIEJY3.js +7 -0
- package/{chunk-QBJKUIXK.js → chunk-KOC7QQ5A.js} +1 -1
- package/{chunk-GLURPAU2.js → chunk-M66SFDOI.js} +1 -1
- package/{chunk-DO2YIWC5.js → chunk-MOGY4H6O.js} +1 -1
- package/{chunk-PATWAZNE.js → chunk-OBBJFGOA.js} +1 -1
- package/{chunk-G7MS6UI4.js → chunk-OPNWLQQY.js} +1 -1
- package/{chunk-35EULUGT.js → chunk-OUJ6CGAI.js} +1 -1
- package/{chunk-AKZM2DMY.js → chunk-OVUTH3B6.js} +1 -1
- package/chunk-OWUXXKGD.js +180 -0
- package/{chunk-R3FUAON5.js → chunk-PAQGWJ3J.js} +1 -1
- package/chunk-PCZW753D.js +1 -0
- package/chunk-PMQ7L7VQ.js +1 -0
- package/chunk-PRVKVHZC.js +1 -0
- package/{chunk-UNNEEFI2.js → chunk-PZRWSIXN.js} +1 -1
- package/{chunk-EKJXB6MV.js → chunk-Q3HG4BLC.js} +2 -2
- package/chunk-QEQCMTMU.js +1 -0
- package/chunk-QMXENXYW.js +1 -0
- package/chunk-R4CV5F66.js +1 -0
- package/{chunk-ABZUNDNB.js → chunk-RJZW77TO.js} +1 -1
- package/{chunk-FNOMC2TM.js → chunk-S6JRFIGG.js} +1 -1
- package/{chunk-F6SXKAYF.js → chunk-TO47DVWB.js} +1 -1
- package/chunk-UHDEQNDX.js +1 -0
- package/{chunk-BLOB7I4P.js → chunk-V4MEQMDJ.js} +3 -3
- package/{chunk-GHZLR44M.js → chunk-VET2QT6C.js} +1 -1
- package/chunk-VHNXAKFS.js +1 -0
- package/chunk-W37QK7Z5.js +520 -0
- package/{chunk-HZ7WPLLK.js → chunk-W56XJVPD.js} +1 -1
- package/chunk-W5VZK5LZ.js +70 -0
- package/chunk-WF2ZEF5P.js +1 -0
- package/{chunk-Q4Y2IGA6.js → chunk-WLFERE5C.js} +1 -1
- package/chunk-WZ5MSCDB.js +1 -0
- package/{chunk-ZBTGGL5M.js → chunk-XFW6LFAM.js} +3 -3
- package/chunk-YAEJRHVD.js +1 -0
- package/chunk-Z5SFK23M.js +960 -0
- package/{chunk-ROX6NFMK.js → chunk-ZQKGNYP5.js} +1 -1
- package/{chunk-26X2X35R.js → chunk-ZZNYX7MX.js} +1 -1
- package/index.html +2 -2
- package/{main-TCYAGQCN.js → main-G22CDQKS.js} +1 -1
- package/package.json +1 -1
- package/styles-ETBLCGC3.css +1 -0
- package/chunk-2VF35PRV.js +0 -7
- package/chunk-6VN6A5B5.js +0 -520
- package/chunk-AER6WLW5.js +0 -1
- package/chunk-AVL6C3VX.js +0 -59
- package/chunk-BPFNN32N.js +0 -1
- package/chunk-C375SLTS.js +0 -246
- package/chunk-C4HBNN2L.js +0 -1
- package/chunk-E2RBYY7Q.js +0 -1
- package/chunk-EFOOUCV3.js +0 -301
- package/chunk-EHULZLLD.js +0 -300
- package/chunk-GFHANKXL.js +0 -1
- package/chunk-GLLO2YQR.js +0 -1
- package/chunk-HZ6QN5ZG.js +0 -7
- package/chunk-I2MAIV44.js +0 -1
- package/chunk-I7T4W6G2.js +0 -47
- package/chunk-JXI4NDYT.js +0 -1
- package/chunk-KHZ5L5UR.js +0 -1
- package/chunk-LAZCPZXL.js +0 -1
- package/chunk-MEKP6D5H.js +0 -1
- package/chunk-NASSFXXN.js +0 -1
- package/chunk-NGKRNFZC.js +0 -1
- package/chunk-NTJQFRIB.js +0 -180
- package/chunk-OCYR2RTP.js +0 -1
- package/chunk-OVJSBJBH.js +0 -197
- package/chunk-P63Q5GYL.js +0 -1
- package/chunk-PGIXMWYT.js +0 -1
- package/chunk-PUEKZGWI.js +0 -1
- package/chunk-R6MI2SDH.js +0 -1
- package/chunk-RA2IZVJ4.js +0 -1
- package/chunk-S6CFVRO6.js +0 -1
- package/chunk-USCTAGKM.js +0 -1
- package/chunk-USO7UKRV.js +0 -821
- package/chunk-UZOBSLZX.js +0 -1
- package/chunk-XCWBG4PB.js +0 -1
- package/styles-H3D5FBL2.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as k}from"./chunk-S6JRFIGG.js";import{a as ae,b as ie}from"./chunk-7CAU344O.js";import"./chunk-VET2QT6C.js";import{a as ce}from"./chunk-2VTAWSHV.js";import{a as X,b as Y}from"./chunk-PZRWSIXN.js";import{h as Z,j as ee,k as te,l as ne}from"./chunk-DERWDCI5.js";import"./chunk-FOSJHYSQ.js";import"./chunk-OVUTH3B6.js";import"./chunk-JWPV2SP2.js";import{c as A,d as O}from"./chunk-5CZUTVXD.js";import{g as W}from"./chunk-OWUXXKGD.js";import"./chunk-W5VZK5LZ.js";import{a as x,b as K,c as $,d as q,e as L,f as Q}from"./chunk-FJ7IM55X.js";import{C as F,D as j}from"./chunk-Z5SFK23M.js";import"./chunk-R4CV5F66.js";import"./chunk-ZZNYX7MX.js";import"./chunk-OUJ6CGAI.js";import"./chunk-FNWWNWQP.js";import"./chunk-F2X3VGZZ.js";import"./chunk-CP57YBBI.js";import{m as D,r as U,s as G,t as z}from"./chunk-DCES5UJV.js";import{Ab as E,Ic as b,Jc as J,Kb as g,Kc as y,Lc as f,Nb as B,Ub as o,Vb as a,Wb as w,X as P,Xc as S,_b as R,c as I,dc as T,ec as s,fb as d,ha as C,pa as _,pc as l,qa as h,qc as u,s as me,tc as V,ub as M,xc as H,yc as N}from"./chunk-K5GIEJY3.js";import{a as p,b as c}from"./chunk-EQDQRRRY.js";var Ce={data:{data:[],totalCount:0},filter:{PageNumber:1,PageSize:20,Number:""}},re=K(Q(Ce),$(t=>({first:S(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:S(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount)),hasCheckedRows:S(()=>t.data().data.some(m=>m.checked)),checkedInvoice:S(()=>t.data().data.filter(m=>m.checked).map(m=>m.id))})),L(t=>{let m=C(k);return{updateFilter(n){x(t,i=>c(p({},i),{filter:p(p({},i.filter),n)}))},onRowSelect(n){x(t,i=>{let r=i.data.data.map(v=>v.id===n.id?c(p({},v),{checked:!0}):v);return c(p({},i),{data:c(p({},i.data),{data:r})})})},onRowUnselect(n){x(t,i=>{let r=i.data.data.map(v=>v.id===n.id?c(p({},v),{checked:!1}):v);return c(p({},i),{data:c(p({},i.data),{data:r})})})},onHeaderCheckboxToggle(n){x(t,i=>{let r=i.data.data.map(v=>c(p({},v),{checked:n}));return c(p({},i),{data:c(p({},i.data),{data:r})})})},getCustomerInvoice:X(I(P(n=>m.getJournalInvoice(n).pipe(me(i=>c(p({},i),{data:i.data.map(r=>c(p({},r),{checked:!1}))})),Y({next:i=>{x(t,r=>c(p({},r),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),q(t=>({onInit:()=>{t.getCustomerInvoice(t.filter)}})));var be=()=>({height:"calc(100vh - 70px)"});function we(t,m){if(t&1){let e=R();o(0,"p-button",8),T("onClick",function(){_(e);let i=s(2);return h(i.onGenerateJournal())}),a()}}function ve(t,m){if(t&1&&E(0,we,1,0,"p-button",7),t&2){let e=s();g("ngIf",e.store.hasCheckedRows())}}function Ee(t,m){t&1&&(o(0,"tr")(1,"th",10),w(2,"p-tableHeaderCheckbox"),a(),o(3,"th"),l(4,"Outlet"),a(),o(5,"th"),l(6,"Number"),a(),o(7,"th"),l(8,"Customer"),a(),o(9,"th"),l(10,"Date"),a(),o(11,"th"),l(12,"Due"),a(),o(13,"th"),l(14,"Amount"),a(),o(15,"th"),l(16,"Payment"),a(),o(17,"th"),l(18,"Delivery"),a()())}function Re(t,m){if(t&1&&(o(0,"tr")(1,"td"),w(2,"p-tableCheckbox",11),a(),o(3,"td"),l(4),a(),o(5,"td"),l(6),a(),o(7,"td"),l(8),a(),o(9,"td"),l(10),b(11,"date"),a(),o(12,"td"),l(13),b(14,"date"),a(),o(15,"td"),l(16),b(17,"number"),a(),o(18,"td"),w(19,"p-chip",12),a(),o(20,"td"),w(21,"p-chip",12),a()()),t&2){let e=m.$implicit;d(2),g("value",e),d(2),u(e.outlet),d(2),u(e.number),d(2),u(e.customer),d(2),u(y(11,9,e.date,"d MMM y hh:mm")),d(3),u(y(14,12,e.due,"d MMM y")),d(3),u(J(17,15,e.amount)),d(3),g("label",e.payment),d(2),g("label",e.delivery)}}function Te(t,m){if(t&1&&l(0),t&2){let e=s(2);V(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function ke(t,m){t&1&&(o(0,"tr")(1,"td",13)(2,"span"),l(3,"No records found."),a()()())}function ye(t,m){if(t&1){let e=R();o(0,"p-panel")(1,"p-table",9),T("onPage",function(i){_(e);let r=s();return h(r.onPageChange(i))})("onRowSelect",function(i){_(e);let r=s();return h(r.onRowSelect(i))})("onRowUnselect",function(i){_(e);let r=s();return h(r.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){_(e);let r=s();return h(r.onHeaderCheckboxToggle(i))}),E(2,Ee,19,0,"ng-template",null,2,f)(4,Re,22,17,"ng-template",null,3,f)(6,Te,1,3,"ng-template",null,4,f)(8,ke,4,0,"ng-template",null,5,f),a()()}if(t&2){let e=s();B(N(9,be)),d(),g("scrollable",!0)("scrollHeight","calc(100vh - 150px)")("lazy",!0)("paginator",!0)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}var fe=(()=>{class t{constructor(){this.store=C(re),this.generateJournalService=C(k)}onSearch(e){this.store.updateFilter(c(p({},this.store.filter()),{Number:e}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let n=e.first/e.rows;this.store.updateFilter(c(p({},this.store.filter()),{PageNumber:n+1}))}onGenerateJournal(){this.generateJournalService.generateJournalInvoice(this.store.checkedInvoice()).pipe(ce("Generate Journal Invoice")).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-customer-invoice"]],features:[H([re])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Customer Invoice",3,"search","isSearchableInput"],["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"],[3,"label"],["colspan","9"]],template:function(n,i){if(n&1){let r=R();o(0,"app-main-panel",6),T("search",function(oe){return _(r),h(i.onSearch(oe))}),E(1,ve,1,1,"ng-template",null,0,f)(3,ye,10,10,"ng-template",null,1,f),a()}n&2&&g("isSearchableInput",!0)},dependencies:[W,ne,Z,ee,te,z,D,G,U,ie,ae,O,A,j,F],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Je={data:{data:[],totalCount:0},filter:{PageNumber:1,PageSize:20,Number:""}},le=K(Q(Je),$(t=>({first:S(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:S(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount)),hasCheckedRows:S(()=>t.data().data.some(m=>m.checked)),checkedSupplierBill:S(()=>t.data().data.filter(m=>m.checked).map(m=>m.id))})),L(t=>{let m=C(k);return{updateFilter(e){x(t,n=>c(p({},n),{filter:p(p({},n.filter),e)}))},onRowSelect(e){x(t,n=>{let i=n.data.data.map(r=>r.id===e.id?c(p({},r),{checked:!0}):r);return c(p({},n),{data:c(p({},n.data),{data:i})})})},onRowUnselect(e){x(t,n=>{let i=n.data.data.map(r=>r.id===e.id?c(p({},r),{checked:!1}):r);return c(p({},n),{data:c(p({},n.data),{data:i})})})},onHeaderCheckboxToggle(e){x(t,n=>{let i=n.data.data.map(r=>c(p({},r),{checked:e}));return c(p({},n),{data:c(p({},n.data),{data:i})})})},getJournalSupplierBill:X(I(P(e=>m.getJournalSupplierBill(e).pipe(Y({next:n=>{x(t,i=>c(p({},i),{data:n}))},error:n=>{console.error("Error fetching journal supplier bill:",n)}})))))}}),q(t=>({onInit:()=>{t.getJournalSupplierBill(t.filter)}})));var Ie=()=>({height:"calc(100vh - 70px)"});function Pe(t,m){if(t&1){let e=R();o(0,"p-button",8),T("onClick",function(){_(e);let i=s(2);return h(i.onGenerateJournal())}),a()}}function Me(t,m){if(t&1&&E(0,Pe,1,0,"p-button",7),t&2){let e=s();g("ngIf",e.store.hasCheckedRows())}}function Be(t,m){t&1&&(o(0,"tr")(1,"th",10),w(2,"p-tableHeaderCheckbox"),a(),o(3,"th"),l(4,"Outlet"),a(),o(5,"th"),l(6,"Number"),a(),o(7,"th"),l(8,"Customer"),a(),o(9,"th"),l(10,"Date"),a(),o(11,"th"),l(12,"Due"),a(),o(13,"th"),l(14,"Amount"),a(),o(15,"th"),l(16,"Payment"),a(),o(17,"th"),l(18,"Delivery"),a()())}function Ve(t,m){if(t&1&&(o(0,"tr")(1,"td"),w(2,"p-tableCheckbox",11),a(),o(3,"td"),l(4),a(),o(5,"td"),l(6),a(),o(7,"td"),l(8),a(),o(9,"td"),l(10),b(11,"date"),a(),o(12,"td"),l(13),b(14,"date"),a(),o(15,"td"),l(16),b(17,"number"),a(),o(18,"td"),w(19,"p-chip",12),a(),o(20,"td"),w(21,"p-chip",12),a()()),t&2){let e=m.$implicit;d(2),g("value",e),d(2),u(e.outlet),d(2),u(e.number),d(2),u(e.customer),d(2),u(y(11,9,e.date,"d MMM y hh:mm")),d(3),u(y(14,12,e.due,"d MMM y")),d(3),u(J(17,15,e.amount)),d(3),g("label",e.payment),d(2),g("label",e.delivery)}}function He(t,m){if(t&1&&l(0),t&2){let e=s(2);V(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Ne(t,m){t&1&&(o(0,"tr")(1,"td",13)(2,"span"),l(3,"No records found."),a()()())}function De(t,m){if(t&1){let e=R();o(0,"p-panel")(1,"p-table",9),T("onPage",function(i){_(e);let r=s();return h(r.onPageChange(i))})("onRowSelect",function(i){_(e);let r=s();return h(r.onRowSelect(i))})("onRowUnselect",function(i){_(e);let r=s();return h(r.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){_(e);let r=s();return h(r.onHeaderCheckboxToggle(i))}),E(2,Be,19,0,"ng-template",null,2,f)(4,Ve,22,17,"ng-template",null,3,f)(6,He,1,3,"ng-template",null,4,f)(8,Ne,4,0,"ng-template",null,5,f),a()()}if(t&2){let e=s();B(N(9,Ie)),d(),g("scrollHeight","calc(100vh - 150px)")("value",e.store.data().data)("scrollable",!0)("paginator",!0)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}var ge=(()=>{class t{constructor(){this.generateJournalService=C(k),this.store=C(le)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedSupplierBill()).subscribe()}onSearch(e){this.store.updateFilter(c(p({},this.store.filter()),{Number:e}))}onPageChange(e){this.store.updateFilter(c(p({},this.store.filter()),{PageNumber:e.first/e.rows+1}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-journal-supplier-bill"]],features:[H([le])],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"],[3,"label"],["colspan","9"]],template:function(n,i){if(n&1){let r=R();o(0,"app-main-panel",6),T("search",function(oe){return _(r),h(i.onSearch(oe))}),E(1,Me,1,1,"ng-template",null,0,f)(3,De,10,10,"ng-template",null,1,f),a()}n&2&&g("isSearchableInput",!0)},dependencies:[W,ne,Z,ee,te,z,D,G,U,ie,ae,O,A,j,F],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ue={data:{data:[],totalCount:0},filter:{PageNumber:1,PageSize:20,Number:""}},pe=K(Q(Ue),$(t=>({first:S(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:S(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount)),hasCheckedRows:S(()=>t.data().data.some(m=>m.checked)),checkedShift:S(()=>t.data().data.filter(m=>m.checked).map(m=>m.id))})),L(t=>{let m=C(k);return{updateFilter(e){x(t,n=>c(p({},n),{filter:p(p({},n.filter),e)}))},onRowSelect(e){x(t,n=>{let i=n.data.data.map(r=>r.id===e.id?c(p({},r),{checked:!0}):r);return c(p({},n),{data:c(p({},n.data),{data:i})})})},onRowUnselect(e){x(t,n=>{let i=n.data.data.map(r=>r.id===e.id?c(p({},r),{checked:!1}):r);return c(p({},n),{data:c(p({},n.data),{data:i})})})},onHeaderCheckboxToggle(e){x(t,n=>{let i=n.data.data.map(r=>c(p({},r),{checked:e}));return c(p({},n),{data:c(p({},n.data),{data:i})})})},getJournalShift:X(I(P(e=>m.getJournalShift(e).pipe(Y(n=>x(t,i=>c(p({},i),{data:n})),n=>console.error("Error fetching journal shift:",n))))))}}),q(t=>({onInit:()=>{t.getJournalShift(t.filter)}})));var Ge=()=>({height:"calc(100vh - 70px)"});function ze(t,m){if(t&1){let e=R();o(0,"p-button",8),T("onClick",function(){_(e);let i=s(2);return h(i.onGenerateJournal())}),a()}}function Fe(t,m){if(t&1&&E(0,ze,1,0,"p-button",7),t&2){let e=s();g("ngIf",e.store.hasCheckedRows())}}function je(t,m){t&1&&(o(0,"tr")(1,"th",10),w(2,"p-tableHeaderCheckbox"),a(),o(3,"th"),l(4,"Number"),a(),o(5,"th"),l(6,"Open"),a(),o(7,"th"),l(8,"Close"),a(),o(9,"th"),l(10,"Cashier"),a(),o(11,"th"),l(12,"Sales + Tax"),a(),o(13,"th"),l(14,"Invoices"),a(),o(15,"th"),l(16,"Outlet"),a(),o(17,"th"),l(18,"Register"),a(),o(19,"th"),l(20,"Visitors"),a()())}function Ae(t,m){if(t&1&&(o(0,"tr")(1,"td"),w(2,"p-tableCheckbox",11),a(),o(3,"td"),l(4),a(),o(5,"td"),l(6),b(7,"date"),a(),o(8,"td"),l(9),b(10,"date"),a(),o(11,"td"),l(12),a(),o(13,"td"),l(14),b(15,"number"),a(),o(16,"td"),l(17),b(18,"number"),a(),o(19,"td"),l(20),a(),o(21,"td"),l(22),a(),o(23,"td"),l(24),b(25,"number"),a()()),t&2){let e=m.$implicit;d(2),g("value",e),d(2),u(e.number),d(2),u(y(7,10,e.open,"dd MMM y hh:mm")),d(3),u(y(10,13,e.close,"dd MMM y hh:mm")),d(3),u(e.cashier),d(2),u(J(15,16,e.salesNTax)),d(3),u(J(18,18,e.totalInvoice)),d(3),u(e.outlet),d(2),u(e.register),d(2),u(J(25,20,e.visitors))}}function Oe(t,m){if(t&1&&l(0),t&2){let e=s(2);V(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Ke(t,m){t&1&&(o(0,"tr")(1,"td",12)(2,"span"),l(3,"No records found."),a()()())}function $e(t,m){if(t&1){let e=R();o(0,"p-panel")(1,"p-table",9),T("onPage",function(i){_(e);let r=s();return h(r.onPageChange(i))})("onRowSelect",function(i){_(e);let r=s();return h(r.onRowSelect(i))})("onRowUnselect",function(i){_(e);let r=s();return h(r.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){_(e);let r=s();return h(r.onHeaderCheckboxToggle(i))}),E(2,je,21,0,"ng-template",null,2,f)(4,Ae,26,22,"ng-template",null,3,f)(6,Oe,1,3,"ng-template",null,4,f)(8,Ke,4,0,"ng-template",null,5,f),a()()}if(t&2){let e=s();B(N(9,Ge)),d(),g("scrollHeight","calc(100vh - 150px)")("scrollable",!0)("paginator",!0)("lazy",!0)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().totalCount)("value",e.store.data().data)}}var xe=(()=>{class t{constructor(){this.generateJournalService=C(k),this.store=C(pe)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onGenerateJournal(){this.generateJournalService.generateJournalSupplierBill(this.store.checkedShift()).subscribe()}onSearch(e){this.store.updateFilter(c(p({},this.store.filter()),{Number:e}))}onPageChange(e){let n=e.first/e.rows;this.store.updateFilter(c(p({},this.store.filter()),{PageNumber:n+1}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-journal-shift"]],features:[H([pe])],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"],["colspan","10"]],template:function(n,i){if(n&1){let r=R();o(0,"app-main-panel",6),T("search",function(oe){return _(r),h(i.onSearch(oe))}),E(1,Fe,1,1,"ng-template",null,0,f)(3,$e,10,10,"ng-template",null,1,f),a()}n&2&&g("isSearchableInput",!0)},dependencies:[W,ne,Z,ee,te,z,D,G,U,ie,O,A,j,F],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var ln=[{path:"invoice",component:fe},{path:"supplier-bill",component:ge},{path:"shift",component:xe},{path:"ar-collection",loadComponent:()=>import("./chunk-GYI6FJNZ.js").then(t=>t.ARJournalComponent)},{path:"ap-collection",loadComponent:()=>import("./chunk-HF7H6NPN.js").then(t=>t.ApJournalComponent)},{path:"adjustment",loadComponent:()=>import("./chunk-4TTJBC5I.js").then(t=>t.AdjustmentJournalComponent)}];export{ln as generateJournalRoutes};
|