dealposbooks 5.41.0 → 5.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunk-242HAH3I.js +1 -0
- package/{chunk-6XPCPRHF.js → chunk-2GE6IJDH.js} +1 -1
- package/{chunk-4TW5N3R5.js → chunk-2LQVI4EI.js} +1 -1
- package/{chunk-WDQXDERR.js → chunk-34OIHS3O.js} +1 -1
- package/chunk-3DX5CNAC.js +129 -0
- package/{chunk-ZXXBWTY6.js → chunk-3KVSQTYU.js} +1 -1
- package/{chunk-UVIJU7TM.js → chunk-3KYU6FI2.js} +1 -1
- package/{chunk-MO4YK4HT.js → chunk-46ZIN2SL.js} +1 -1
- package/{chunk-H4KAOKJR.js → chunk-4FPYSVLT.js} +1 -1
- package/{chunk-IIW75XWJ.js → chunk-4IUATLDH.js} +1 -1
- package/{chunk-4ZDV2QVO.js → chunk-5DWE547V.js} +1 -1
- package/{chunk-MUFRLGLG.js → chunk-5JV52UYK.js} +1 -1
- package/{chunk-AOOR6RAK.js → chunk-6GMA5NUD.js} +1 -1
- package/chunk-6K5LNQ4J.js +7 -0
- package/{chunk-C4LGY75Z.js → chunk-6LDKZMHR.js} +12 -12
- package/{chunk-5YZ63KSK.js → chunk-6V36DOK2.js} +1 -1
- package/{chunk-IFNPFJH5.js → chunk-6WJFHQYD.js} +1 -1
- package/chunk-72LNXEXV.js +193 -0
- package/chunk-75PF5HO6.js +1 -0
- package/{chunk-N5W3C4LG.js → chunk-76LPTGLX.js} +1 -1
- package/{chunk-MDNCQKUT.js → chunk-7FFMPB6T.js} +1 -1
- package/{chunk-B5RBLDGE.js → chunk-ACTRMWEI.js} +1 -1
- package/{chunk-EGS6BIKL.js → chunk-AGWRTDO7.js} +1 -1
- package/{chunk-NTCCFR6P.js → chunk-AJZ7YLT4.js} +1 -1
- package/{chunk-PTEBSIFB.js → chunk-AL647DUL.js} +1 -1
- package/{chunk-76QGHXHT.js → chunk-ARXP327B.js} +1 -1
- package/{chunk-W6IKDXXT.js → chunk-ATJ55H5D.js} +1 -1
- package/{chunk-TKBMWC2X.js → chunk-BJ4RON42.js} +1 -1
- package/{chunk-XZIY7XVI.js → chunk-BTMQCF6U.js} +1 -1
- package/{chunk-64ODJHGP.js → chunk-CNXEJBY5.js} +1 -1
- package/{chunk-BSFKUGYO.js → chunk-CWHL7PNC.js} +1 -1
- package/{chunk-S2Q6V4IV.js → chunk-CX3TZ3F3.js} +1 -1
- package/{chunk-Y7NHB6MD.js → chunk-D5ADAY3I.js} +1 -1
- package/{chunk-XOEBC23H.js → chunk-DCSJM3I3.js} +1 -1
- package/{chunk-3267XKO5.js → chunk-DUPO34WD.js} +1 -1
- package/{chunk-CDXFHUDN.js → chunk-E3QNEH3B.js} +1 -1
- package/{chunk-DUEYD2IO.js → chunk-E3ZGQRZ3.js} +1 -1
- package/chunk-EFDD6Q3K.js +1 -0
- package/{chunk-NI4XE6XQ.js → chunk-EOT2WEXN.js} +1 -1
- package/{chunk-OCFTAJHS.js → chunk-EPLCCBQT.js} +1 -1
- package/{chunk-IANH6F5O.js → chunk-H32TBMJG.js} +1 -1
- package/{chunk-4XLWJIA4.js → chunk-HBYPFYO2.js} +1 -1
- package/{chunk-7UB4B7A7.js → chunk-HEX727RH.js} +1 -1
- package/{chunk-QC7LTJLT.js → chunk-HGTQEDZZ.js} +1 -1
- package/{chunk-A7LRQMLA.js → chunk-I7ILLTFH.js} +1 -1
- package/{chunk-EALZUKSJ.js → chunk-IJTQE2H4.js} +1 -1
- package/chunk-JI5CHNB7.js +7 -0
- package/{chunk-T4TFJFL4.js → chunk-K4P3JOA6.js} +1 -1
- package/{chunk-RB3MCWL5.js → chunk-KD7RTUDM.js} +1 -1
- package/{chunk-BRCJWPEZ.js → chunk-KLKIEREL.js} +1 -1
- package/chunk-KXE3J4PK.js +1 -0
- package/{chunk-WNA57NZF.js → chunk-L3PZS6EL.js} +1 -1
- package/{chunk-BWBNGOLL.js → chunk-LSS5QMZU.js} +1 -1
- package/{chunk-V6VS3FMZ.js → chunk-M5PA3FZY.js} +1 -1
- package/{chunk-I4WD74I3.js → chunk-MAID3JDN.js} +1 -1
- package/chunk-MJ6ZJF3H.js +1 -0
- package/{chunk-UTG7WNU7.js → chunk-MPHY6FVN.js} +1 -1
- package/{chunk-4R64ZVCC.js → chunk-MR2SA2JX.js} +1 -1
- package/{chunk-Y52DQWVS.js → chunk-MS6WBVQX.js} +1 -1
- package/{chunk-X3JXYOSR.js → chunk-MWFWXJG3.js} +1 -1
- package/{chunk-VDXMHX3J.js → chunk-MZAFOBGT.js} +1 -1
- package/{chunk-RNPNKSFR.js → chunk-NHZLS6JU.js} +1 -1
- package/{chunk-GLOECGB7.js → chunk-NMSYINDE.js} +1 -1
- package/{chunk-IIS3WYGB.js → chunk-NY7ETA6V.js} +1 -1
- package/chunk-O5K5EPK7.js +1 -0
- package/{chunk-5AD3KAHO.js → chunk-OB46Z7ZH.js} +1 -1
- package/{chunk-P6CXZZTO.js → chunk-ODRV6XWO.js} +1 -1
- package/{chunk-YTNI3IAH.js → chunk-OIMJHXJV.js} +1 -1
- package/{chunk-YS5U5SXP.js → chunk-ORLKNWW4.js} +1 -1
- package/{chunk-4IEK5V2S.js → chunk-PGHK6GXT.js} +1 -1
- package/{chunk-K5CHFPJQ.js → chunk-QE4CQXCC.js} +1 -1
- package/chunk-SB5MSLCX.js +2 -0
- package/{chunk-5B3BG43K.js → chunk-SPKOXGSS.js} +1 -1
- package/{chunk-FOCWONCO.js → chunk-SSAF54X3.js} +1 -1
- package/{chunk-QFOKESND.js → chunk-TLAUXEMR.js} +1 -1
- package/{chunk-E2R6VN7Z.js → chunk-TLGQR5YK.js} +1 -1
- package/{chunk-CCBBIKGU.js → chunk-TVIJHSEG.js} +1 -1
- package/{chunk-KIFK2NRF.js → chunk-UDIFKJ7M.js} +1 -1
- package/chunk-UKBDY33R.js +1 -0
- package/{chunk-VHKZXNG3.js → chunk-ULK67XHG.js} +1 -1
- package/{chunk-T5LNS6MU.js → chunk-ULNWFQ5X.js} +1 -1
- package/{chunk-WZWAFKRU.js → chunk-VEIICIKO.js} +1 -1
- package/{chunk-A25JUSCO.js → chunk-VENJDQOT.js} +1 -1
- package/chunk-VOIH4XOQ.js +1 -0
- package/{chunk-OUIY2TC7.js → chunk-VPQ6B3ID.js} +2 -2
- package/{chunk-MASZROSE.js → chunk-VRKBMD72.js} +1 -1
- package/{chunk-4WAIBWB3.js → chunk-W6XE64JK.js} +1 -1
- package/{chunk-KKZF4RQM.js → chunk-WLKS6LBU.js} +1 -1
- package/{chunk-AE7ZMPUT.js → chunk-WPQGYVNT.js} +1 -1
- package/{chunk-PS4MFIBX.js → chunk-WXT6EZ2V.js} +1 -1
- package/{chunk-RZI2OI6V.js → chunk-X4KTMWVO.js} +1 -1
- package/{chunk-O2725QPF.js → chunk-XCIAUU4G.js} +2 -2
- package/{chunk-ZEVIDUTH.js → chunk-XL33YQXU.js} +1 -1
- package/{chunk-UA264VBG.js → chunk-XLPFLHKU.js} +1 -1
- package/chunk-XZ4KHRLK.js +1 -0
- package/{chunk-2JNTUTNL.js → chunk-YARSQDTX.js} +1 -1
- package/{chunk-YIAUCENA.js → chunk-YMGWRELP.js} +1 -1
- package/{chunk-5PDLMIPF.js → chunk-YYMZW726.js} +2 -2
- package/{chunk-R3JWL2J6.js → chunk-ZDTMCWOO.js} +1 -1
- package/{chunk-LNN3TWH2.js → chunk-ZEWON3MW.js} +1 -1
- package/{chunk-HBNGOJIS.js → chunk-ZOCDX3DT.js} +1 -1
- package/index.html +2 -2
- package/main-WZTRI4K4.js +1 -0
- package/package.json +1 -1
- package/chunk-4V6IW37R.js +0 -1
- package/chunk-7CUSFSFC.js +0 -1
- package/chunk-7IC4BZ6J.js +0 -7
- package/chunk-DOKG43W6.js +0 -1
- package/chunk-HWZKSQ5E.js +0 -1
- package/chunk-JGPCJCYI.js +0 -1
- package/chunk-JO34HDB4.js +0 -129
- package/chunk-KUHLDSNT.js +0 -1
- package/chunk-NHXCR55X.js +0 -193
- package/chunk-NM7Z2FA7.js +0 -1
- package/chunk-TEEBLB6T.js +0 -7
- package/chunk-VU532YE3.js +0 -2
- package/chunk-ZVRETQOI.js +0 -1
- package/chunk-ZW6ONWWO.js +0 -1
- package/main-ILDJZYPX.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-YQFG5XE2.js";var t=[{path:"",redirectTo:"tax-account",pathMatch:"full"},{path:"tax-account",loadComponent:()=>import("./chunk-2GE6IJDH.js").then(o=>o.TaxAccountComponent)},{path:"chart-of-account",loadComponent:()=>import("./chunk-TVIJHSEG.js").then(o=>o.ChartOfAccountComponent)},{path:"manual-journal",loadComponent:()=>import("./chunk-AGWRTDO7.js").then(o=>o.ManualJournalComponent)},{path:"payment-account",loadComponent:()=>import("./chunk-DCSJM3I3.js").then(o=>o.PaymentAccountComponent)},{path:"writeoff-outlet",loadComponent:()=>import("./chunk-TLGQR5YK.js").then(o=>o.WriteOffOutletComponent)},{path:"expense-account",loadComponent:()=>import("./chunk-OIMJHXJV.js").then(o=>o.ExpenseAccountComponent)},{path:"coa-configuration",loadComponent:()=>import("./chunk-W6XE64JK.js").then(o=>o.CoaConfigurationComponent)},{path:"coa-category",loadComponent:()=>import("./chunk-EPLCCBQT.js").then(o=>o.CoaCategoryComponent)},{path:"outlet-account",loadComponent:()=>import("./chunk-D5ADAY3I.js").then(o=>o.OutletAccountComponent)}];export{t as MIGRATE_ROUTES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C,b as L}from"./chunk-
|
|
1
|
+
import{a as C,b as L}from"./chunk-HGTQEDZZ.js";import"./chunk-VEIICIKO.js";import{a as E,b as V}from"./chunk-E3QNEH3B.js";import"./chunk-WXT6EZ2V.js";import{h as H}from"./chunk-PGHK6GXT.js";import{b as N,c as G}from"./chunk-L3PZS6EL.js";import{a as R,b as D}from"./chunk-5JV52UYK.js";import"./chunk-ACTRMWEI.js";import"./chunk-ARXP327B.js";import{w as j,x as O}from"./chunk-7FFMPB6T.js";import"./chunk-UKBDY33R.js";import"./chunk-72LNXEXV.js";import"./chunk-VENJDQOT.js";import{a as I}from"./chunk-ZDTMCWOO.js";import"./chunk-F2X3VGZZ.js";import{n as $,s as F}from"./chunk-SB5MSLCX.js";import{$b as P,Cc as w,Db as A,Dc as _,Lb as p,Nc as c,Ob as x,Oc as l,Rc as T,Vb as n,W as y,Wb as o,Xb as m,Y as M,_ as S,ec as h,fc as s,h as v,hb as a,ia as f,qa as g,ra as d,s as u,sa as b,ta as k,xb as B}from"./chunk-6K5LNQ4J.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=P();n(0,"div",3)(1,"p-button",4),h("onClick",function(){g(e);let r=s();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),h("onClick",function(){g(e);let r=s();return d(r.onMigrate())}),o()()}if(i&2){let e=s();a(2),p("disabled",l(3,2,e.countInBooks$)!==0)("pTooltip",l(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),m(3,"app-migration-cards",7),c(4,"async"),b(),n(5,"svg",8),m(6,"path",9),o(),k(),m(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=s();x(_(12,q)),a(),x(_(13,q)),a(2),p("migrationCount",l(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",l(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var ue=(()=>{class i{constructor(){this.migrateService=f(C),this.toastr=f(I),this.refresh$=new v(void 0),this.pageTitle="Tax Account"}ngOnInit(){let e=this.refresh$.pipe(M(()=>this.migrateService.getTaxAccountCount()),S(t=>console.log("API response:",t)),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrate(){this.migrateService.migrateTaxAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatTaxAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-tax-account"]],features:[w([C])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(n(0,"app-main-panel",2),A(1,J,5,6,"ng-template",null,0,T)(3,K,9,14,"ng-template",null,1,T),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[H,F,$,V,E,D,R,G,N,L,O,j],encapsulation:2})}}return i})();export{ue as TaxAccountComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as fe}from"./chunk-
|
|
1
|
+
import{a as fe}from"./chunk-L3PZS6EL.js";import{a as he,h as G,n as _e,r as be}from"./chunk-7FFMPB6T.js";import{La as me,Ma as K,Ua as de,a as le,aa as pe,d as ce}from"./chunk-72LNXEXV.js";import{h as re,k as oe,l as se,m as ue,s as ae}from"./chunk-SB5MSLCX.js";import{$b as S,$c as E,Aa as k,Bb as F,Cc as ie,Db as g,Kb as _,Lb as l,Ob as te,Pb as w,Vb as I,Wb as C,Xb as x,Yb as R,Zb as $,_c as T,ba as Q,ca as H,da as W,ec as V,fc as u,hb as f,ia as Z,kc as U,lc as ne,mc as A,nb as Y,nc as L,pa as J,qa as m,ra as d,sa as O,ua as N,wa as X,xb as M,yb as ee}from"./chunk-6K5LNQ4J.js";import{a as q,b as j}from"./chunk-YQFG5XE2.js";var xe=(()=>{class i extends G{static \u0275fac=(()=>{let e;return function(t){return(e||(e=N(i)))(t||i)}})();static \u0275cmp=M({type:i,selectors:[["AngleDownIcon"]],features:[F],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z","fill","currentColor"]],template:function(n,t){n&1&&(O(),I(0,"svg",0),x(1,"path",1),C()),n&2&&(w(t.getClassNames()),_("aria-label",t.ariaLabel)("aria-hidden",t.ariaHidden)("role",t.role))},encapsulation:2})}return i})();var ye=(()=>{class i extends G{static \u0275fac=(()=>{let e;return function(t){return(e||(e=N(i)))(t||i)}})();static \u0275cmp=M({type:i,selectors:[["AngleUpIcon"]],features:[F],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z","fill","currentColor"]],template:function(n,t){n&1&&(O(),I(0,"svg",0),x(1,"path",1),C()),n&2&&(w(t.getClassNames()),_("aria-label",t.ariaLabel)("aria-hidden",t.ariaHidden)("role",t.role))},encapsulation:2})}return i})();var we=["clearicon"],Te=["incrementbuttonicon"],Be=["decrementbuttonicon"],ve=["input"];function De(i,h){if(i&1){let e=S();I(0,"TimesIcon",7),V("click",function(){m(e);let t=u(2);return d(t.clear())}),C()}i&2&&(l("ngClass","p-inputnumber-clear-icon"),_("data-pc-section","clearIcon"))}function Ve(i,h){}function Ee(i,h){i&1&&g(0,Ve,0,0,"ng-template")}function Se(i,h){if(i&1){let e=S();I(0,"span",8),V("click",function(){m(e);let t=u(2);return d(t.clear())}),g(1,Ee,1,0,null,9),C()}if(i&2){let e=u(2);_("data-pc-section","clearIcon"),f(),l("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function Ne(i,h){if(i&1&&(R(0),g(1,De,1,2,"TimesIcon",5)(2,Se,2,2,"span",6),$()),i&2){let e=u();f(),l("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),f(),l("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function ke(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.incrementButtonIcon),_("data-pc-section","incrementbuttonicon")}}function Me(i,h){i&1&&x(0,"AngleUpIcon"),i&2&&_("data-pc-section","incrementbuttonicon")}function Fe(i,h){}function Re(i,h){i&1&&g(0,Fe,0,0,"ng-template")}function $e(i,h){if(i&1&&(R(0),g(1,Me,1,1,"AngleUpIcon",2)(2,Re,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function Ae(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.decrementButtonIcon),_("data-pc-section","decrementbuttonicon")}}function Le(i,h){i&1&&x(0,"AngleDownIcon"),i&2&&_("data-pc-section","decrementbuttonicon")}function Ue(i,h){}function ze(i,h){i&1&&g(0,Ue,0,0,"ng-template")}function Oe(i,h){if(i&1&&(R(0),g(1,Le,1,1,"AngleDownIcon",2)(2,ze,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function Ke(i,h){if(i&1){let e=S();I(0,"span",10)(1,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onUpButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onUpButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onUpButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onUpButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onUpButtonKeyUp())}),g(2,ke,1,2,"span",12)(3,$e,3,2,"ng-container",2),C(),I(4,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onDownButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onDownButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onDownButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onDownButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onDownButtonKeyUp())}),g(5,Ae,1,2,"span",12)(6,Oe,3,2,"ng-container",2),C()()}if(i&2){let e=u();_("data-pc-section","buttonGroup"),f(),w(e.incrementButtonClass),l("ngClass",e._incrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","incrementbutton"),f(),l("ngIf",e.incrementButtonIcon),f(),l("ngIf",!e.incrementButtonIcon),f(),w(e.decrementButtonClass),l("ngClass",e._decrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","decrementbutton"),f(),l("ngIf",e.decrementButtonIcon),f(),l("ngIf",!e.decrementButtonIcon)}}function Ge(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.incrementButtonIcon),_("data-pc-section","incrementbuttonicon")}}function Pe(i,h){i&1&&x(0,"AngleUpIcon"),i&2&&_("data-pc-section","incrementbuttonicon")}function qe(i,h){}function je(i,h){i&1&&g(0,qe,0,0,"ng-template")}function Qe(i,h){if(i&1&&(R(0),g(1,Pe,1,1,"AngleUpIcon",2)(2,je,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function He(i,h){if(i&1){let e=S();I(0,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onUpButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onUpButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onUpButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onUpButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onUpButtonKeyUp())}),g(1,Ge,1,2,"span",12)(2,Qe,3,2,"ng-container",2),C()}if(i&2){let e=u();w(e.incrementButtonClass),l("ngClass",e._incrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","incrementbutton"),f(),l("ngIf",e.incrementButtonIcon),f(),l("ngIf",!e.incrementButtonIcon)}}function We(i,h){if(i&1&&x(0,"span",13),i&2){let e=u(2);l("ngClass",e.decrementButtonIcon),_("data-pc-section","decrementbuttonicon")}}function Ze(i,h){i&1&&x(0,"AngleDownIcon"),i&2&&_("data-pc-section","decrementbuttonicon")}function Je(i,h){}function Xe(i,h){i&1&&g(0,Je,0,0,"ng-template")}function Ye(i,h){if(i&1&&(R(0),g(1,Ze,1,1,"AngleDownIcon",2)(2,Xe,1,0,null,9),$()),i&2){let e=u(2);f(),l("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),f(),l("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function et(i,h){if(i&1){let e=S();I(0,"button",11),V("mousedown",function(t){m(e);let r=u();return d(r.onDownButtonMouseDown(t))})("mouseup",function(){m(e);let t=u();return d(t.onDownButtonMouseUp())})("mouseleave",function(){m(e);let t=u();return d(t.onDownButtonMouseLeave())})("keydown",function(t){m(e);let r=u();return d(r.onDownButtonKeyDown(t))})("keyup",function(){m(e);let t=u();return d(t.onDownButtonKeyUp())}),g(1,We,1,2,"span",12)(2,Ye,3,2,"ng-container",2),C()}if(i&2){let e=u();w(e.decrementButtonClass),l("ngClass",e._decrementButtonClass)("disabled",e.disabled),_("aria-hidden",!0)("data-pc-section","decrementbutton"),f(),l("ngIf",e.decrementButtonIcon),f(),l("ngIf",!e.decrementButtonIcon)}}var tt=({dt:i})=>`
|
|
2
2
|
.p-inputnumber {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as we}from"./chunk-IANH6F5O.js";import"./chunk-IIS3WYGB.js";import{a as Ce,b as ve,c as Ee,d as he,e as Ie,f as be}from"./chunk-P6CXZZTO.js";import{b as ye,c as Ve,d as Se}from"./chunk-H4KAOKJR.js";import"./chunk-KKZF4RQM.js";import{d as _e,f as ue,g as fe,h as xe,k as ge}from"./chunk-BRCJWPEZ.js";import"./chunk-N5W3C4LG.js";import"./chunk-BSFKUGYO.js";import"./chunk-MASZROSE.js";import{a as R}from"./chunk-7CUSFSFC.js";import{a as ie}from"./chunk-CDXFHUDN.js";import"./chunk-NI4XE6XQ.js";import"./chunk-RZI2OI6V.js";import"./chunk-A7LRQMLA.js";import"./chunk-4TW5N3R5.js";import"./chunk-NTCCFR6P.js";import"./chunk-W6IKDXXT.js";import"./chunk-5B3BG43K.js";import"./chunk-UVIJU7TM.js";import"./chunk-EALZUKSJ.js";import{a as ce,b as de}from"./chunk-PS4MFIBX.js";import{e as pe,f as me,h as se}from"./chunk-4IEK5V2S.js";import"./chunk-WNA57NZF.js";import{a as ae,b as le}from"./chunk-MUFRLGLG.js";import"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import{w as oe,x as re}from"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import"./chunk-NHXCR55X.js";import{d as ne}from"./chunk-DOKG43W6.js";import"./chunk-A25JUSCO.js";import"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import{h as X,k as Y,p as Z,q as ee,s as te}from"./chunk-VU532YE3.js";import{Cb as d,Cc as J,Dc as T,Fc as q,Ga as S,I as N,Kb as m,Mc as E,Nb as A,Nc as I,Oc as G,Pb as h,Qb as F,Qc as c,Sb as P,Tb as D,Ub as n,Vb as i,Wb as _,X as U,Z as w,_b as v,dc as y,eb as j,ec as s,gb as l,ha as k,kc as H,lc as L,m as M,mc as O,pa as f,pc as $,qa as x,qc as r,rc as g,s as B,sc as C,vc as Q,wb as K,wc as W,xc as z}from"./chunk-7IC4BZ6J.js";import{e as Re}from"./chunk-YQFG5XE2.js";var Je=Re(Ve());var ke=["stepper"],Ae=()=>({width:"30vw"}),Fe=()=>({"1199px":"75vw","575px":"100vw"}),Pe=()=>({height:"calc(100vh - 70px)"}),De=t=>({"col-12":t}),Me=(t,p,e)=>({"bg-gradient-danger":t,"bg-gradient-success":p,"bg-gradient-warning":e}),Te=t=>({"state-danger":t});function Be(t,p){if(t&1){let e=v();n(0,"p-button",14),y("click",function(){f(e);let o=s(2);return x(o.onPrevStep())}),i()}if(t&2){let e=s(2);m("disabled",e.stepActiveIndex()===1)}}function Ne(t,p){if(t&1){let e=v();n(0,"p-button",15),y("click",function(){f(e);let o=s(2);return x(o.onNextStep())}),i()}if(t&2){let e=s(2);m("disabled",e.stepActiveIndex()===3||!e.JournalEntryImport())}}function Ue(t,p){if(t&1){let e=v();n(0,"p-button",16),y("click",function(){f(e);let o=s(2);return x(o.onReset())}),i()}}function je(t,p){if(t&1&&d(0,Be,1,1,"p-button",11)(1,Ne,1,1,"p-button",12)(2,Ue,1,0,"p-button",13),t&2){let e=s();m("ngIf",e.stepActiveIndex()>1),l(),m("ngIf",e.stepActiveIndex()<3),l(),m("ngIf",e.stepActiveIndex()===3)}}function Ke(t,p){if(t&1){let e=v();n(0,"POS-uppy",25),y("fileUploaded",function(o){f(e);let u=s(2);return x(u.onFileUploaded(o))})("fileRemoved",function(o){f(e);let u=s(2);return x(u.onFileRemoved(o))}),i(),n(1,"p",26),r(2," Please refer this "),n(3,"a",27),r(4,"article"),i(),r(5," for more information "),i()}if(t&2){let e=s(2);m("uppyCoreConfiguration",e.uppyCore)("dashboardPropsConfiguration",e.dashboardProps)("sampleUrl",e.SAMPLE_URL)("subtitle",e.subtitle)}}function He(t,p){t&1&&(n(0,"tr"),_(1,"th",29),n(2,"th",30),r(3," Number "),_(4,"p-sortIcon",31),i(),n(5,"th",32),r(6," Outlet "),_(7,"p-sortIcon",33),i(),n(8,"th",34),r(9," Date "),_(10,"p-sortIcon",35),i(),n(11,"th",36),r(12," Status "),_(13,"p-sortIcon",37),i(),n(14,"th"),r(15,"Message"),i()())}function Le(t,p){if(t&1&&(n(0,"div",41)(1,"span"),r(2),i(),n(3,"span"),r(4),i()()),t&2){let e=p.$implicit;l(2),g(e.issue),l(2),g(e.solution)}}function Oe(t,p){if(t&1&&(n(0,"div",40),P(1,Le,5,2,"div",41,F),i()),t&2){let e=s(2).$implicit;l(),D(e.issues)}}function $e(t,p){}function Qe(t,p){if(t&1&&d(0,Oe,3,0,"div",40)(1,$e,0,0),t&2){let e=s().$implicit;h(e.issues&&e.issues.length>0?0:1)}}function We(t,p){if(t&1&&(n(0,"tr")(1,"td"),_(2,"p-button",38),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i(),n(7,"td"),r(8),E(9,"date"),i(),n(10,"td",39),r(11),i(),n(12,"td",39),d(13,Qe,2,1),i()()),t&2){let e=p.$implicit,a=p.expanded,o=s(4);l(2),m("pRowToggler",e)("text",!0)("rounded",!0)("plain",!0)("icon",a?"fa-solid fa-chevron-down":"fa-solid fa-chevron-right"),l(2),g(e.number),l(2),C(" ",e.outlet," "),l(2),g(G(9,12,e.date,"d MMM y")),l(2),m("ngClass",q(15,Me,e.actionName==="Error",e.actionName==="New",e.actionName==="Update")),l(),C(" ",e.actionName," "),l(),m("ngClass",T(19,Te,o.hasIssue)),l(),h(o.hasIssue?13:-1)}}function ze(t,p){t&1&&(n(0,"tr")(1,"th",45),r(2," Code "),_(3,"p-sortIcon",46),i(),n(4,"th",47),r(5," Name "),_(6,"p-sortIcon",48),i(),n(7,"th",49),r(8," Note "),_(9,"p-sortIcon",50),i(),n(10,"th",51),r(11," Debit "),_(12,"p-sortIcon",52),i(),n(13,"th",53),r(14," Credit "),_(15,"p-sortIcon",54),i(),n(16,"th"),r(17,"Message"),i()())}function qe(t,p){if(t&1&&(n(0,"div",41)(1,"span"),r(2),i(),n(3,"span"),r(4),i()()),t&2){let e=p.$implicit;l(2),g(e.issue),l(2),g(e.solution)}}function Ge(t,p){if(t&1&&(n(0,"div",40),P(1,qe,5,2,"div",41,F),i()),t&2){let e=s().$implicit;l(),D(e.issues)}}function Xe(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i(),n(7,"td"),r(8),E(9,"number"),i(),n(10,"td"),r(11),E(12,"number"),i(),n(13,"td",39),d(14,Ge,3,0,"div",40),i()()),t&2){let e=p.$implicit,a=s(5);l(2),g(e.accountCode),l(2),g(e.accountName),l(2),g(e.note),l(2),C(" ",I(9,7,e.debitAmount)," "),l(3),C(" ",I(12,9,e.creditAmount)," "),l(2),m("ngClass",T(11,Te,e.issues&&e.issues.length>0)),l(),h(a.hasIssue?14:-1)}}function Ye(t,p){t&1&&(n(0,"tr")(1,"td",55),r(2," There are no order for this product yet. "),i()())}function Ze(t,p){if(t&1&&(n(0,"tr")(1,"td",42)(2,"div",43)(3,"p-table",44),d(4,ze,18,0,"ng-template",null,3,c)(6,Xe,15,13,"ng-template",null,6,c)(8,Ye,3,0,"ng-template",null,8,c),i()()()()),t&2){let e=p.$implicit;l(3),m("value",e.items)}}function et(t,p){if(t&1&&(n(0,"p-table",28),d(1,He,16,0,"ng-template",null,3,c)(3,We,14,21,"ng-template",null,6,c)(5,Ze,10,1,"ng-template",null,7,c),i()),t&2){let e=s(3);m("scrollable",!0)("scrollHeight","calc(100vh - 160px)")("value",e.JournalEntryImport().dataRow)}}function tt(t,p){if(t&1&&d(0,et,7,3,"p-table",28),t&2){let e=s(2);h(e.JournalEntryImport()?0:-1)}}function nt(t,p){t&1&&(n(0,"h5"),r(1,"Successfully Imported"),i())}function it(t,p){if(t&1&&(n(0,"p-panel")(1,"p-scroll-panel")(2,"div",17)(3,"div",18)(4,"p-stepper",19,5)(6,"p-step-list")(7,"p-step",20)(8,"div",21),_(9,"i",22),n(10,"span"),r(11,"Upload"),i()()(),n(12,"p-step",20)(13,"div",21),_(14,"i",23),n(15,"span"),r(16,"Preview"),i()()(),n(17,"p-step",20)(18,"div",21),_(19,"i",24),n(20,"span"),r(21,"Finish"),i()()()(),n(22,"p-step-panels")(23,"p-step-panel",20),d(24,Ke,6,4,"ng-template",null,1,c),i(),n(26,"p-step-panel",20),d(27,tt,1,1,"ng-template",null,1,c),i(),n(29,"p-step-panel",20),d(30,nt,2,0,"ng-template",null,1,c),i()()()()()()()),t&2){let e=s();l(),A(J(11,Pe)),l(2),m("ngClass",T(12,De,e.stepActiveIndex()===2)),l(),m("linear",!0)("value",e.stepActiveIndex()),l(3),m("value",1),l(5),m("value",2),l(5),m("value",3),l(6),m("value",1),l(3),m("value",2),l(3),m("value",3)}}function ot(t,p){if(t&1){let e=v();n(0,"p-button",56),y("onClick",function(){f(e);let o=s();return x(o.summaryDialogVisible.set(!1))}),i()}t&2&&m("rounded",!0)("text",!0)}function rt(t,p){if(t&1&&(n(0,"div",57)(1,"h4",58),r(2,"Import Summary"),i(),n(3,"p",59),r(4),i()()),t&2){let e=s();l(4),C("(",e.CSVRowCount()," rows ready for import)")}}function at(t,p){t&1&&(n(0,"div",63)(1,"h4",64),r(2,"Journal"),i()())}function lt(t,p){t&1&&(n(0,"div",65)(1,"h4",64),r(2,"Debit"),i()())}function pt(t,p){t&1&&(n(0,"div",65)(1,"h4",64),r(2,"Credit"),i()())}function mt(t,p){if(t&1&&(n(0,"div",60)(1,"div",61)(2,"p-card"),d(3,at,3,0,"ng-template",null,3,c),n(5,"div",60)(6,"div",61)(7,"h5",62),r(8),E(9,"number"),i()()()()(),n(10,"div",61)(11,"p-card"),d(12,lt,3,0,"ng-template",null,3,c),n(14,"div",60)(15,"div",61)(16,"h5",62),r(17),E(18,"number"),i()()()()(),n(19,"div",61)(20,"p-card"),d(21,pt,3,0,"ng-template",null,3,c),n(23,"div",60)(24,"div",61)(25,"h5",62),r(26),E(27,"number"),i()()()()()()),t&2){let e=s(2);l(8),C(" ",I(9,3,e.JournalEntryImport().summary.journal)," "),l(9),C(" ",I(18,5,e.JournalEntryImport().summary.debit)," "),l(9),C(" ",I(27,7,e.JournalEntryImport().summary.credit)," ")}}function st(t,p){if(t&1&&d(0,mt,28,9,"div",60),t&2){let e=s();h(e.JournalEntryImport()?0:-1)}}function ct(t,p){if(t&1){let e=v();n(0,"p-button",66),y("click",function(){f(e);let o=s();return x(o.summaryDialogVisible.set(!1))}),i(),n(1,"p-button",67),y("click",function(){f(e);let o=s();return x(o.onConfirmImport())}),i()}}var jt=(()=>{class t{constructor(){this.service=k(we),this.router=k(ne),this.subtitle="Accepted file format: .csv & max file size: 1MB",this.stepActiveIndex=S(1),this.JournalEntryImport=S(null),this.summaryDialogVisible=S(!1),this.CSVRowCount=S(0),this.dashboardProps={inline:!0,width:580,height:350},this.uppyCore={restrictions:{allowedFileTypes:["text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]}},this.SAMPLE_URL="https://res.cloudinary.com/pos/raw/upload/POS/CSV/Journal_DealPOS.csv"}ngAfterViewInit(){console.log("Stepper instance:",this.stepperRef)}onFileUpload(e){console.log("File upload event:",e);let a=new FormData;Array.isArray(e.currentFiles)&&e.currentFiles.forEach(o=>{o instanceof File&&a.append("File",o,o.name)}),console.log("Form data prepared for upload:",a.get("File")),this.service.importPreviewJournal(a).pipe(R("Import Preview"),B(o=>({cacheKey:o.cacheKey})),U(o=>this.service.importConfirmJournal(o)),w(()=>{this.router.navigate(["/pages/journal/journal-entry"])})).subscribe()}onFileRemoved(e){console.log("File removed event:",e),this.JournalEntryImport.set(null),this.CSVRowCount.set(0)}onNextStep(){if(this.stepActiveIndex()<3&&(this.stepActiveIndex.update(e=>e+1),this.stepActiveIndex()===3)){this.stepActiveIndex.update(()=>this.stepActiveIndex()-1),this.summaryDialogVisible.set(!0);return}}onPrevStep(){this.stepActiveIndex()>1&&this.stepActiveIndex.update(e=>e-1)}onFileUploaded(e){let a=new FormData;if("name"in e&&typeof e.name=="string")a.append("File",e,e.name),this.service.importPreviewJournal(a).pipe(R("Import Preview"),w(o=>{this.JournalEntryImport.set(o)})).subscribe(),Je.default.parse(e,{header:!0,skipEmptyLines:!0,complete:o=>{console.log("CSV Parsing Results:",o),this.CSVRowCount.set(o.data.length)},error:o=>{console.error("Error parsing CSV:",o)}});else return}onConfirmImport(){if(this.JournalEntryImport()&&this.JournalEntryImport().canProceed){let e={cacheKey:this.JournalEntryImport().cacheKey};this.service.importConfirmJournal(e).pipe(R("Import Confirm"),w(()=>{this.router.navigate(["/pages/journal/journal-entry"]),this.stepActiveIndex.update(a=>a+1),this.summaryDialogVisible.update(a=>!a)}),N(a=>(console.error("Error occurred during import confirmation:",a),this.stepActiveIndex.update(o=>o+1),this.summaryDialogVisible.update(o=>!o),M(null)))).subscribe()}else{console.error("Cannot proceed with import, JournalEntryImport is not set or canProceed is false.");return}}onReset(){this.stepActiveIndex.set(1),this.JournalEntryImport.set(null)}handleKeyboardEvent(e){e.key==="F2"&&this.onConfirmImport()}get hasIssue(){let e=this.JournalEntryImport();return e&&Array.isArray(e.dataRow)?e.dataRow.some(a=>{let o=a.issues&&a.issues.length>0,u=Array.isArray(a.items)&&a.items.some(b=>b.issues&&b.issues.length>0);return o||u}):!1}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=K({type:t,selectors:[["app-journal-entry-import"]],viewQuery:function(a,o){if(a&1&&H(ke,5),a&2){let u;L(u=O())&&(o.stepperRef=u.first)}},hostBindings:function(a,o){a&1&&y("keydown",function(b){return o.handleKeyboardEvent(b)},!1,j)},decls:14,vars:10,consts:[["actionButton",""],["content",""],["closeIconTemplate",""],["header",""],["footer",""],["stepper",""],["body",""],["expandedrow",""],["emptymessage",""],["pageTitle","Manual Journal Import"],["position","center","appendTo","body",3,"visibleChange","modal","visible","breakpoints","draggable","closeIconTemplate","dismissableMask"],["label","Back","severity","secondary","variant","outlined",3,"disabled","click",4,"ngIf"],["label","Next","severity","primary",3,"disabled","click",4,"ngIf"],["label","Finish","severity","primary",3,"click",4,"ngIf"],["label","Back","severity","secondary","variant","outlined",3,"click","disabled"],["label","Next","severity","primary",3,"click","disabled"],["label","Finish","severity","primary",3,"click"],[1,"row","justify-content-center"],[1,"col-6",3,"ngClass"],[3,"linear","value"],[3,"value"],[1,"d-flex","gap-2","align-items-center"],[1,"fa-solid","fa-upload"],[1,"fa-solid","fa-file"],[1,"fa-solid","fa-check"],[3,"fileUploaded","fileRemoved","uppyCoreConfiguration","dashboardPropsConfiguration","sampleUrl","subtitle"],[1,"fst-italic"],["href","#","target","_blank",1,"link","link-primary"],["dataKey","number",3,"scrollable","scrollHeight","value"],[2,"width","5rem"],["pSortableColumn","number"],["field","number"],["pSortableColumn","outlet"],["field","outlet"],["pSortableColumn","date"],["field","date"],["pSortableColumn","inventoryStatus"],["field","inventoryStatus"],["type","button","pRipple","",3,"pRowToggler","text","rounded","plain","icon"],[3,"ngClass"],[1,"d-flex","flex-column","gap-2"],[1,"d-flex","flex-column"],["colspan","8"],[1,"p-4"],["dataKey","accountID",3,"value"],["pSortableColumn","accountCode"],["field","accountCode"],["pSortableColumn","accountName"],["field","accountName"],["pSortableColumn","note"],["field","note"],["pSortableColumn","debitAmount"],["field","debitAmount"],["pSortableColumn","creditAmount"],["field","creditAmount"],["colspan","6"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],[1,"d-flex","gap-2","align-items-baseline"],[1,"fs-4","text-white","m-0"],[1,"m-0","fs-3"],[1,"row"],[1,"col"],[1,"fs-2"],[1,"state-new"],[1,"fs-3","m-0"],[1,"state-unchanged"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click"]],template:function(a,o){if(a&1){let u=v();n(0,"app-main-panel",9),d(1,je,3,3,"ng-template",null,0,c)(3,it,32,14,"ng-template",null,1,c),i(),n(5,"p-dialog",10),z("visibleChange",function(V){return f(u),W(o.summaryDialogVisible,V)||(o.summaryDialogVisible=V),x(V)}),d(6,ot,1,2,"ng-template",null,2,c)(8,rt,5,1,"ng-template",null,3,c)(10,st,1,1,"ng-template",null,1,c)(12,ct,2,0,"ng-template",null,4,c),i()}if(a&2){let u=$(7);l(5),A(J(8,Ae)),m("modal",!0),Q("visible",o.summaryDialogVisible),m("breakpoints",J(9,Fe))("draggable",!1)("closeIconTemplate",u)("dismissableMask",!0)}},dependencies:[se,te,X,Y,ee,Z,le,ae,ye,de,ce,be,Ie,Ce,he,Ee,ve,Se,re,oe,ge,_e,ue,xe,fe,me,pe,ie],styles:[".p-datatable-thead>tr>th{background-color:transparent!important;color:#000!important} .p-stepper{display:flex;flex-direction:column;align-items:center} .p-stepper .p-steplist{width:40vw} .p-stepper .p-steppanels{width:100%} .p-card{border-radius:4px} .p-card .p-card-body{padding:.75rem!important} .p-card .p-card-header{display:flex;align-items:center;width:100%} .p-card .p-card-header .state-new{width:inherit;padding:.75rem;vertical-align:middle;background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important} .p-card .p-card-header .state-updated{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important} .p-card .p-card-header .state-unchanged{width:inherit;padding:.75rem;border-bottom:1px solid #dee2e6} .p-card .p-card-header .state-error{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important} pos-uppy div div h4{font-size:16px} pos-uppy div div p{font-size:14px!important} pos-uppy div div hr{margin:0}"],changeDetection:0})}}return t})();export{jt as JournalEntryImportComponent};
|
|
1
|
+
import{a as we}from"./chunk-H32TBMJG.js";import"./chunk-NY7ETA6V.js";import{a as Ce,b as ve,c as Ee,d as he,e as Ie,f as be}from"./chunk-ODRV6XWO.js";import{b as ye,c as Ve,d as Se}from"./chunk-4FPYSVLT.js";import"./chunk-WLKS6LBU.js";import{d as _e,f as ue,g as fe,h as xe,k as ge}from"./chunk-KLKIEREL.js";import"./chunk-76LPTGLX.js";import"./chunk-CWHL7PNC.js";import"./chunk-VRKBMD72.js";import{a as R}from"./chunk-KXE3J4PK.js";import{a as ie}from"./chunk-E3QNEH3B.js";import"./chunk-EOT2WEXN.js";import"./chunk-X4KTMWVO.js";import"./chunk-I7ILLTFH.js";import"./chunk-2LQVI4EI.js";import"./chunk-AJZ7YLT4.js";import"./chunk-ATJ55H5D.js";import"./chunk-SPKOXGSS.js";import"./chunk-3KYU6FI2.js";import"./chunk-IJTQE2H4.js";import{a as ce,b as de}from"./chunk-WXT6EZ2V.js";import{e as pe,f as me,h as se}from"./chunk-PGHK6GXT.js";import"./chunk-L3PZS6EL.js";import{a as ae,b as le}from"./chunk-5JV52UYK.js";import"./chunk-ACTRMWEI.js";import"./chunk-ARXP327B.js";import{w as oe,x as re}from"./chunk-7FFMPB6T.js";import"./chunk-UKBDY33R.js";import"./chunk-72LNXEXV.js";import{d as ne}from"./chunk-EFDD6Q3K.js";import"./chunk-VENJDQOT.js";import"./chunk-ZDTMCWOO.js";import"./chunk-F2X3VGZZ.js";import{h as X,k as Y,p as Z,q as ee,s as te}from"./chunk-SB5MSLCX.js";import{$b as v,Db as d,Dc as J,Ec as T,Gc as q,Ha as S,I as N,Lb as m,Nc as E,Ob as A,Oc as I,Pc as G,Qb as h,Rb as F,Rc as c,Tb as P,Ub as D,Vb as n,Wb as i,Xb as _,Y as U,_ as w,ec as y,fb as j,fc as s,hb as l,ia as k,lc as H,m as M,mc as L,nc as O,qa as f,qc as $,ra as x,rc as r,s as B,sc as g,tc as C,wc as Q,xb as K,xc as W,yc as z}from"./chunk-6K5LNQ4J.js";import{e as Re}from"./chunk-YQFG5XE2.js";var Je=Re(Ve());var ke=["stepper"],Ae=()=>({width:"30vw"}),Fe=()=>({"1199px":"75vw","575px":"100vw"}),Pe=()=>({height:"calc(100vh - 70px)"}),De=t=>({"col-12":t}),Me=(t,p,e)=>({"bg-gradient-danger":t,"bg-gradient-success":p,"bg-gradient-warning":e}),Te=t=>({"state-danger":t});function Be(t,p){if(t&1){let e=v();n(0,"p-button",14),y("click",function(){f(e);let o=s(2);return x(o.onPrevStep())}),i()}if(t&2){let e=s(2);m("disabled",e.stepActiveIndex()===1)}}function Ne(t,p){if(t&1){let e=v();n(0,"p-button",15),y("click",function(){f(e);let o=s(2);return x(o.onNextStep())}),i()}if(t&2){let e=s(2);m("disabled",e.stepActiveIndex()===3||!e.JournalEntryImport())}}function Ue(t,p){if(t&1){let e=v();n(0,"p-button",16),y("click",function(){f(e);let o=s(2);return x(o.onReset())}),i()}}function je(t,p){if(t&1&&d(0,Be,1,1,"p-button",11)(1,Ne,1,1,"p-button",12)(2,Ue,1,0,"p-button",13),t&2){let e=s();m("ngIf",e.stepActiveIndex()>1),l(),m("ngIf",e.stepActiveIndex()<3),l(),m("ngIf",e.stepActiveIndex()===3)}}function Ke(t,p){if(t&1){let e=v();n(0,"POS-uppy",25),y("fileUploaded",function(o){f(e);let u=s(2);return x(u.onFileUploaded(o))})("fileRemoved",function(o){f(e);let u=s(2);return x(u.onFileRemoved(o))}),i(),n(1,"p",26),r(2," Please refer this "),n(3,"a",27),r(4,"article"),i(),r(5," for more information "),i()}if(t&2){let e=s(2);m("uppyCoreConfiguration",e.uppyCore)("dashboardPropsConfiguration",e.dashboardProps)("sampleUrl",e.SAMPLE_URL)("subtitle",e.subtitle)}}function He(t,p){t&1&&(n(0,"tr"),_(1,"th",29),n(2,"th",30),r(3," Number "),_(4,"p-sortIcon",31),i(),n(5,"th",32),r(6," Outlet "),_(7,"p-sortIcon",33),i(),n(8,"th",34),r(9," Date "),_(10,"p-sortIcon",35),i(),n(11,"th",36),r(12," Status "),_(13,"p-sortIcon",37),i(),n(14,"th"),r(15,"Message"),i()())}function Le(t,p){if(t&1&&(n(0,"div",41)(1,"span"),r(2),i(),n(3,"span"),r(4),i()()),t&2){let e=p.$implicit;l(2),g(e.issue),l(2),g(e.solution)}}function Oe(t,p){if(t&1&&(n(0,"div",40),P(1,Le,5,2,"div",41,F),i()),t&2){let e=s(2).$implicit;l(),D(e.issues)}}function $e(t,p){}function Qe(t,p){if(t&1&&d(0,Oe,3,0,"div",40)(1,$e,0,0),t&2){let e=s().$implicit;h(e.issues&&e.issues.length>0?0:1)}}function We(t,p){if(t&1&&(n(0,"tr")(1,"td"),_(2,"p-button",38),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i(),n(7,"td"),r(8),E(9,"date"),i(),n(10,"td",39),r(11),i(),n(12,"td",39),d(13,Qe,2,1),i()()),t&2){let e=p.$implicit,a=p.expanded,o=s(4);l(2),m("pRowToggler",e)("text",!0)("rounded",!0)("plain",!0)("icon",a?"fa-solid fa-chevron-down":"fa-solid fa-chevron-right"),l(2),g(e.number),l(2),C(" ",e.outlet," "),l(2),g(G(9,12,e.date,"d MMM y")),l(2),m("ngClass",q(15,Me,e.actionName==="Error",e.actionName==="New",e.actionName==="Update")),l(),C(" ",e.actionName," "),l(),m("ngClass",T(19,Te,o.hasIssue)),l(),h(o.hasIssue?13:-1)}}function ze(t,p){t&1&&(n(0,"tr")(1,"th",45),r(2," Code "),_(3,"p-sortIcon",46),i(),n(4,"th",47),r(5," Name "),_(6,"p-sortIcon",48),i(),n(7,"th",49),r(8," Note "),_(9,"p-sortIcon",50),i(),n(10,"th",51),r(11," Debit "),_(12,"p-sortIcon",52),i(),n(13,"th",53),r(14," Credit "),_(15,"p-sortIcon",54),i(),n(16,"th"),r(17,"Message"),i()())}function qe(t,p){if(t&1&&(n(0,"div",41)(1,"span"),r(2),i(),n(3,"span"),r(4),i()()),t&2){let e=p.$implicit;l(2),g(e.issue),l(2),g(e.solution)}}function Ge(t,p){if(t&1&&(n(0,"div",40),P(1,qe,5,2,"div",41,F),i()),t&2){let e=s().$implicit;l(),D(e.issues)}}function Xe(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i(),n(7,"td"),r(8),E(9,"number"),i(),n(10,"td"),r(11),E(12,"number"),i(),n(13,"td",39),d(14,Ge,3,0,"div",40),i()()),t&2){let e=p.$implicit,a=s(5);l(2),g(e.accountCode),l(2),g(e.accountName),l(2),g(e.note),l(2),C(" ",I(9,7,e.debitAmount)," "),l(3),C(" ",I(12,9,e.creditAmount)," "),l(2),m("ngClass",T(11,Te,e.issues&&e.issues.length>0)),l(),h(a.hasIssue?14:-1)}}function Ye(t,p){t&1&&(n(0,"tr")(1,"td",55),r(2," There are no order for this product yet. "),i()())}function Ze(t,p){if(t&1&&(n(0,"tr")(1,"td",42)(2,"div",43)(3,"p-table",44),d(4,ze,18,0,"ng-template",null,3,c)(6,Xe,15,13,"ng-template",null,6,c)(8,Ye,3,0,"ng-template",null,8,c),i()()()()),t&2){let e=p.$implicit;l(3),m("value",e.items)}}function et(t,p){if(t&1&&(n(0,"p-table",28),d(1,He,16,0,"ng-template",null,3,c)(3,We,14,21,"ng-template",null,6,c)(5,Ze,10,1,"ng-template",null,7,c),i()),t&2){let e=s(3);m("scrollable",!0)("scrollHeight","calc(100vh - 160px)")("value",e.JournalEntryImport().dataRow)}}function tt(t,p){if(t&1&&d(0,et,7,3,"p-table",28),t&2){let e=s(2);h(e.JournalEntryImport()?0:-1)}}function nt(t,p){t&1&&(n(0,"h5"),r(1,"Successfully Imported"),i())}function it(t,p){if(t&1&&(n(0,"p-panel")(1,"p-scroll-panel")(2,"div",17)(3,"div",18)(4,"p-stepper",19,5)(6,"p-step-list")(7,"p-step",20)(8,"div",21),_(9,"i",22),n(10,"span"),r(11,"Upload"),i()()(),n(12,"p-step",20)(13,"div",21),_(14,"i",23),n(15,"span"),r(16,"Preview"),i()()(),n(17,"p-step",20)(18,"div",21),_(19,"i",24),n(20,"span"),r(21,"Finish"),i()()()(),n(22,"p-step-panels")(23,"p-step-panel",20),d(24,Ke,6,4,"ng-template",null,1,c),i(),n(26,"p-step-panel",20),d(27,tt,1,1,"ng-template",null,1,c),i(),n(29,"p-step-panel",20),d(30,nt,2,0,"ng-template",null,1,c),i()()()()()()()),t&2){let e=s();l(),A(J(11,Pe)),l(2),m("ngClass",T(12,De,e.stepActiveIndex()===2)),l(),m("linear",!0)("value",e.stepActiveIndex()),l(3),m("value",1),l(5),m("value",2),l(5),m("value",3),l(6),m("value",1),l(3),m("value",2),l(3),m("value",3)}}function ot(t,p){if(t&1){let e=v();n(0,"p-button",56),y("onClick",function(){f(e);let o=s();return x(o.summaryDialogVisible.set(!1))}),i()}t&2&&m("rounded",!0)("text",!0)}function rt(t,p){if(t&1&&(n(0,"div",57)(1,"h4",58),r(2,"Import Summary"),i(),n(3,"p",59),r(4),i()()),t&2){let e=s();l(4),C("(",e.CSVRowCount()," rows ready for import)")}}function at(t,p){t&1&&(n(0,"div",63)(1,"h4",64),r(2,"Journal"),i()())}function lt(t,p){t&1&&(n(0,"div",65)(1,"h4",64),r(2,"Debit"),i()())}function pt(t,p){t&1&&(n(0,"div",65)(1,"h4",64),r(2,"Credit"),i()())}function mt(t,p){if(t&1&&(n(0,"div",60)(1,"div",61)(2,"p-card"),d(3,at,3,0,"ng-template",null,3,c),n(5,"div",60)(6,"div",61)(7,"h5",62),r(8),E(9,"number"),i()()()()(),n(10,"div",61)(11,"p-card"),d(12,lt,3,0,"ng-template",null,3,c),n(14,"div",60)(15,"div",61)(16,"h5",62),r(17),E(18,"number"),i()()()()(),n(19,"div",61)(20,"p-card"),d(21,pt,3,0,"ng-template",null,3,c),n(23,"div",60)(24,"div",61)(25,"h5",62),r(26),E(27,"number"),i()()()()()()),t&2){let e=s(2);l(8),C(" ",I(9,3,e.JournalEntryImport().summary.journal)," "),l(9),C(" ",I(18,5,e.JournalEntryImport().summary.debit)," "),l(9),C(" ",I(27,7,e.JournalEntryImport().summary.credit)," ")}}function st(t,p){if(t&1&&d(0,mt,28,9,"div",60),t&2){let e=s();h(e.JournalEntryImport()?0:-1)}}function ct(t,p){if(t&1){let e=v();n(0,"p-button",66),y("click",function(){f(e);let o=s();return x(o.summaryDialogVisible.set(!1))}),i(),n(1,"p-button",67),y("click",function(){f(e);let o=s();return x(o.onConfirmImport())}),i()}}var jt=(()=>{class t{constructor(){this.service=k(we),this.router=k(ne),this.subtitle="Accepted file format: .csv & max file size: 1MB",this.stepActiveIndex=S(1),this.JournalEntryImport=S(null),this.summaryDialogVisible=S(!1),this.CSVRowCount=S(0),this.dashboardProps={inline:!0,width:580,height:350},this.uppyCore={restrictions:{allowedFileTypes:["text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]}},this.SAMPLE_URL="https://res.cloudinary.com/pos/raw/upload/POS/CSV/Journal_DealPOS.csv"}ngAfterViewInit(){console.log("Stepper instance:",this.stepperRef)}onFileUpload(e){console.log("File upload event:",e);let a=new FormData;Array.isArray(e.currentFiles)&&e.currentFiles.forEach(o=>{o instanceof File&&a.append("File",o,o.name)}),console.log("Form data prepared for upload:",a.get("File")),this.service.importPreviewJournal(a).pipe(R("Import Preview"),B(o=>({cacheKey:o.cacheKey})),U(o=>this.service.importConfirmJournal(o)),w(()=>{this.router.navigate(["/pages/journal/journal-entry"])})).subscribe()}onFileRemoved(e){console.log("File removed event:",e),this.JournalEntryImport.set(null),this.CSVRowCount.set(0)}onNextStep(){if(this.stepActiveIndex()<3&&(this.stepActiveIndex.update(e=>e+1),this.stepActiveIndex()===3)){this.stepActiveIndex.update(()=>this.stepActiveIndex()-1),this.summaryDialogVisible.set(!0);return}}onPrevStep(){this.stepActiveIndex()>1&&this.stepActiveIndex.update(e=>e-1)}onFileUploaded(e){let a=new FormData;if("name"in e&&typeof e.name=="string")a.append("File",e,e.name),this.service.importPreviewJournal(a).pipe(R("Import Preview"),w(o=>{this.JournalEntryImport.set(o)})).subscribe(),Je.default.parse(e,{header:!0,skipEmptyLines:!0,complete:o=>{console.log("CSV Parsing Results:",o),this.CSVRowCount.set(o.data.length)},error:o=>{console.error("Error parsing CSV:",o)}});else return}onConfirmImport(){if(this.JournalEntryImport()&&this.JournalEntryImport().canProceed){let e={cacheKey:this.JournalEntryImport().cacheKey};this.service.importConfirmJournal(e).pipe(R("Import Confirm"),w(()=>{this.router.navigate(["/pages/journal/journal-entry"]),this.stepActiveIndex.update(a=>a+1),this.summaryDialogVisible.update(a=>!a)}),N(a=>(console.error("Error occurred during import confirmation:",a),this.stepActiveIndex.update(o=>o+1),this.summaryDialogVisible.update(o=>!o),M(null)))).subscribe()}else{console.error("Cannot proceed with import, JournalEntryImport is not set or canProceed is false.");return}}onReset(){this.stepActiveIndex.set(1),this.JournalEntryImport.set(null)}handleKeyboardEvent(e){e.key==="F2"&&this.onConfirmImport()}get hasIssue(){let e=this.JournalEntryImport();return e&&Array.isArray(e.dataRow)?e.dataRow.some(a=>{let o=a.issues&&a.issues.length>0,u=Array.isArray(a.items)&&a.items.some(b=>b.issues&&b.issues.length>0);return o||u}):!1}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=K({type:t,selectors:[["app-journal-entry-import"]],viewQuery:function(a,o){if(a&1&&H(ke,5),a&2){let u;L(u=O())&&(o.stepperRef=u.first)}},hostBindings:function(a,o){a&1&&y("keydown",function(b){return o.handleKeyboardEvent(b)},!1,j)},decls:14,vars:10,consts:[["actionButton",""],["content",""],["closeIconTemplate",""],["header",""],["footer",""],["stepper",""],["body",""],["expandedrow",""],["emptymessage",""],["pageTitle","Manual Journal Import"],["position","center","appendTo","body",3,"visibleChange","modal","visible","breakpoints","draggable","closeIconTemplate","dismissableMask"],["label","Back","severity","secondary","variant","outlined",3,"disabled","click",4,"ngIf"],["label","Next","severity","primary",3,"disabled","click",4,"ngIf"],["label","Finish","severity","primary",3,"click",4,"ngIf"],["label","Back","severity","secondary","variant","outlined",3,"click","disabled"],["label","Next","severity","primary",3,"click","disabled"],["label","Finish","severity","primary",3,"click"],[1,"row","justify-content-center"],[1,"col-6",3,"ngClass"],[3,"linear","value"],[3,"value"],[1,"d-flex","gap-2","align-items-center"],[1,"fa-solid","fa-upload"],[1,"fa-solid","fa-file"],[1,"fa-solid","fa-check"],[3,"fileUploaded","fileRemoved","uppyCoreConfiguration","dashboardPropsConfiguration","sampleUrl","subtitle"],[1,"fst-italic"],["href","#","target","_blank",1,"link","link-primary"],["dataKey","number",3,"scrollable","scrollHeight","value"],[2,"width","5rem"],["pSortableColumn","number"],["field","number"],["pSortableColumn","outlet"],["field","outlet"],["pSortableColumn","date"],["field","date"],["pSortableColumn","inventoryStatus"],["field","inventoryStatus"],["type","button","pRipple","",3,"pRowToggler","text","rounded","plain","icon"],[3,"ngClass"],[1,"d-flex","flex-column","gap-2"],[1,"d-flex","flex-column"],["colspan","8"],[1,"p-4"],["dataKey","accountID",3,"value"],["pSortableColumn","accountCode"],["field","accountCode"],["pSortableColumn","accountName"],["field","accountName"],["pSortableColumn","note"],["field","note"],["pSortableColumn","debitAmount"],["field","debitAmount"],["pSortableColumn","creditAmount"],["field","creditAmount"],["colspan","6"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],[1,"d-flex","gap-2","align-items-baseline"],[1,"fs-4","text-white","m-0"],[1,"m-0","fs-3"],[1,"row"],[1,"col"],[1,"fs-2"],[1,"state-new"],[1,"fs-3","m-0"],[1,"state-unchanged"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click"]],template:function(a,o){if(a&1){let u=v();n(0,"app-main-panel",9),d(1,je,3,3,"ng-template",null,0,c)(3,it,32,14,"ng-template",null,1,c),i(),n(5,"p-dialog",10),z("visibleChange",function(V){return f(u),W(o.summaryDialogVisible,V)||(o.summaryDialogVisible=V),x(V)}),d(6,ot,1,2,"ng-template",null,2,c)(8,rt,5,1,"ng-template",null,3,c)(10,st,1,1,"ng-template",null,1,c)(12,ct,2,0,"ng-template",null,4,c),i()}if(a&2){let u=$(7);l(5),A(J(8,Ae)),m("modal",!0),Q("visible",o.summaryDialogVisible),m("breakpoints",J(9,Fe))("draggable",!1)("closeIconTemplate",u)("dismissableMask",!0)}},dependencies:[se,te,X,Y,ee,Z,le,ae,ye,de,ce,be,Ie,Ce,he,Ee,ve,Se,re,oe,ge,_e,ue,xe,fe,me,pe,ie],styles:[".p-datatable-thead>tr>th{background-color:transparent!important;color:#000!important} .p-stepper{display:flex;flex-direction:column;align-items:center} .p-stepper .p-steplist{width:40vw} .p-stepper .p-steppanels{width:100%} .p-card{border-radius:4px} .p-card .p-card-body{padding:.75rem!important} .p-card .p-card-header{display:flex;align-items:center;width:100%} .p-card .p-card-header .state-new{width:inherit;padding:.75rem;vertical-align:middle;background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important} .p-card .p-card-header .state-updated{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important} .p-card .p-card-header .state-unchanged{width:inherit;padding:.75rem;border-bottom:1px solid #dee2e6} .p-card .p-card-header .state-error{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important} pos-uppy div div h4{font-size:16px} pos-uppy div div p{font-size:14px!important} pos-uppy div div hr{margin:0}"],changeDetection:0})}}return t})();export{jt as JournalEntryImportComponent};
|