dealposbooks 5.36.3 → 5.36.4
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-K6XRQ3BT.js → chunk-2G2XJK2K.js} +1 -1
- package/{chunk-7BWZMKYR.js → chunk-2JQ3JEJ3.js} +1 -1
- package/{chunk-AF7SZ7GC.js → chunk-2RWNWJIJ.js} +1 -1
- package/{chunk-KY7VHQP6.js → chunk-3ZX2C4CS.js} +2 -2
- package/{chunk-ENIW7TNR.js → chunk-4Q3RSJHE.js} +1 -1
- package/{chunk-VG24FAJ7.js → chunk-4ZZS7RNX.js} +1 -1
- package/{chunk-PXCF3E7D.js → chunk-5YNFFJYR.js} +1 -1
- package/{chunk-HNKJIRE3.js → chunk-7BTYXICA.js} +1 -1
- package/{chunk-I4PT5J7Y.js → chunk-7DMSRUGW.js} +1 -1
- package/{chunk-CQPOKER3.js → chunk-AL2ZC3FX.js} +1 -1
- package/{chunk-LGEAM7GG.js → chunk-AXKMFP7U.js} +1 -1
- package/{chunk-CT4PVBTR.js → chunk-BQU2QE7O.js} +4 -4
- package/{chunk-7ABLTWH5.js → chunk-C3WPT3H7.js} +1 -1
- package/chunk-CPGDR2QI.js +1 -0
- package/{chunk-HGXQRTWW.js → chunk-DBY5EYPK.js} +1 -1
- package/{chunk-NHIRDW4W.js → chunk-E3LLXUXO.js} +1 -1
- package/chunk-EATLNF4I.js +1 -0
- package/{chunk-QBFAXFUM.js → chunk-ECIZYNA4.js} +1 -1
- package/{chunk-A52O36YW.js → chunk-EJ3E4VHA.js} +1 -1
- package/{chunk-7QH3KK6N.js → chunk-FAKMCF4Y.js} +1 -1
- package/chunk-GPH5BEIK.js +1 -0
- package/{chunk-2LQZ4KWH.js → chunk-I3NMOMCW.js} +1 -1
- package/{chunk-4DYLPYFL.js → chunk-K27Y4V4L.js} +1 -1
- package/{chunk-QUUZKSSA.js → chunk-KFKB4A5O.js} +1 -1
- package/{chunk-GI246KYJ.js → chunk-KRKMQYJ2.js} +1 -1
- package/{chunk-6VR5JNBD.js → chunk-KTL3KEN6.js} +1 -1
- package/{chunk-6I5H3YGD.js → chunk-KUXDU3TW.js} +1 -1
- package/chunk-LJ3UX4FK.js +7 -0
- package/chunk-LKKQVF4C.js +1 -0
- package/{chunk-J2PXABSJ.js → chunk-OJPJVKM5.js} +1 -1
- package/{chunk-DOISARVN.js → chunk-OL75RFEO.js} +1 -1
- package/{chunk-7INXBUUN.js → chunk-OVHBR6ZK.js} +1 -1
- package/chunk-PQJXIO2P.js +1 -0
- package/{chunk-6M3ROM2S.js → chunk-PWQCJZ4S.js} +1 -1
- package/{chunk-GIYK6BQG.js → chunk-QOCCHVWD.js} +1 -1
- package/{chunk-EY42XRK4.js → chunk-R3VGWSRA.js} +5 -5
- package/{chunk-CV4R4TBA.js → chunk-SJ2FUSMD.js} +1 -1
- package/chunk-SJCVDRU7.js +1 -0
- package/{chunk-IPYNYURM.js → chunk-TJE77JOF.js} +1 -1
- package/{chunk-KGYYEYB3.js → chunk-TLWO5UJD.js} +1 -1
- package/{chunk-66USIUOD.js → chunk-UFRSHXNU.js} +1 -1
- package/{chunk-AA444QAF.js → chunk-UM4NAL5M.js} +1 -1
- package/chunk-VDZ673ZY.js +1 -0
- package/{chunk-JJ4OPVUC.js → chunk-WODWFYV4.js} +1 -1
- package/{chunk-FHKTIAXX.js → chunk-X74L3UX6.js} +1 -1
- package/{chunk-YIH3GJPY.js → chunk-ZDXP6UW4.js} +1 -1
- package/{chunk-INB6OCHW.js → chunk-ZJ7X5V7U.js} +1 -1
- package/{chunk-G3SKSKOH.js → chunk-ZVIU7CUD.js} +1 -1
- package/index.html +2 -2
- package/{main-JNWTJZEO.js → main-B7PE3RXN.js} +1 -1
- package/package.json +1 -1
- package/chunk-2CFYVQAK.js +0 -7
- package/chunk-6EKEG6RN.js +0 -1
- package/chunk-C5LLL3Q2.js +0 -1
- package/chunk-FXYYPCNX.js +0 -1
- package/chunk-MLQD24WT.js +0 -1
- package/chunk-OEK2FZGW.js +0 -1
- package/chunk-OWIJGDDS.js +0 -1
- package/chunk-YZSCPMW2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y,b as C,e as F,f as M}from"./chunk-3VJJTR55.js";import{b as T}from"./chunk-YYDAQ7AW.js";import{d as L,e as S}from"./chunk-Z45NTTES.js";import{a as G}from"./chunk-
|
|
1
|
+
import{a as y,b as C,e as F,f as M}from"./chunk-3VJJTR55.js";import{b as T}from"./chunk-YYDAQ7AW.js";import{d as L,e as S}from"./chunk-Z45NTTES.js";import{a as G}from"./chunk-SJ2FUSMD.js";import{r as U}from"./chunk-OKCHQM5Q.js";import{Ac as g,Kb as n,Ob as l,Sb as m,Tb as f,Ub as a,Vb as p,ba as c,ec as h,gb as s,ha as i,qc as v,rc as b,wb as d}from"./chunk-JP6RBSB3.js";var $=(()=>{class t{constructor(){this.httpService=i(G)}getUserLoaderList(){return this.httpService.get(void 0,"api/UserLoader/List")}getUsers(e){return this.httpService.post(void 0,"api/User/List",e)}getUserFormMeta(e){return this.httpService.post(void 0,"api/UserLoader/Form",{ID:e})}inviteUser(e){return this.httpService.post(void 0,"api/User/Submit",e)}deleteUser(e){return this.httpService.post(void 0,"api/User/Delete",{ListID:e})}getGroupLoader(){return this.httpService.get(void 0,"api/UserGroupLoader/List")}getGroupList(e){return this.httpService.post(void 0,"api/UserGroup/List",e)}getGroupFormMeta(e){return this.httpService.get(void 0,e?`api/UserGroup/Form/${e}`:"api/UserGroup/Form")}assignGroupRole(e){return this.httpService.post(void 0,"api/UserGroup/AssignRole",e)}deleteGroup(e){return this.httpService.post(void 0,"api/UserGroup/Delete",{ListID:e})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var k=t=>({"ps-0":t}),x=(t,o)=>o.route;function _(t,o){if(t&1&&(a(0,"p-tab",2)(1,"span"),v(2),p()()),t&2){let e=o.$implicit,r=h();l(g(5,k,r.router.url.includes("forms"))),n("value",e.route)("routerLink",e.route),s(2),b(e.label)}}var B=(()=>{class t{constructor(){this.router=i(L),this.tabs=[{route:"/pages/users/users",label:"Users"},{route:"/pages/users/groups",label:"Groups"}]}get activeTab(){return this.tabs.find(r=>this.router.url.startsWith(r.route)).route||this.tabs[0].route}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=d({type:t,selectors:[["app-user-tabs"]],decls:4,vars:1,consts:[[3,"value"],[3,"value","routerLink","class"],[3,"value","routerLink"]],template:function(r,u){r&1&&(a(0,"p-tabs",0)(1,"p-tablist"),m(2,_,3,7,"p-tab",1,x),p()()),r&2&&(n("value",u.activeTab),s(2),f(u.tabs))},dependencies:[M,F,y,C,S,T,U],styles:["[_nghost-%COMP%]{display:block} .p-tabs .p-tab{padding:0 1.125rem .6rem 0!important}"],changeDetection:0})}}return t})();export{$ as a,B as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ue}from"./chunk-5YNFFJYR.js";import{b as be}from"./chunk-Q23KXB3T.js";import"./chunk-C2GO6SPF.js";import{a as q,b as Q}from"./chunk-O4QM64EH.js";import{d as W,i as xe,j as he,k as X}from"./chunk-SVXDMOLP.js";import"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as Ce}from"./chunk-XKCLERWG.js";import"./chunk-GDX5XEV3.js";import"./chunk-DLUALPHU.js";import"./chunk-4DOELXOP.js";import"./chunk-VVUSFS6O.js";import"./chunk-ZTEDQLOG.js";import"./chunk-EDGADVEY.js";import"./chunk-JTDJJORR.js";import"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{b as ge}from"./chunk-4CDAAU6Z.js";import{h as K}from"./chunk-OVHBR6ZK.js";import"./chunk-X22YKT5B.js";import{a as F,b as A}from"./chunk-JYCUE5HV.js";import{a as b,b as j,c as H,d as L,e as G,f as $}from"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{o as _e,w as z,x as V}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import{x as fe}from"./chunk-G5S5AZA7.js";import{e as ce,l as me}from"./chunk-Z45NTTES.js";import{a as se}from"./chunk-SJ2FUSMD.js";import{a as de}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{k as re,p as le,q as D,r as N,y as pe}from"./chunk-OKCHQM5Q.js";import{Ac as oe,Cb as T,Jc as S,Kb as g,Kc as U,Lc as ie,Mc as _,Nb as I,Ub as o,Vb as i,Wb as J,X as k,Yc as v,Z as te,_b as E,ba as ne,c as R,cb as ae,dc as y,ec as s,gb as m,ha as u,pa as h,qa as C,qc as r,rc as f,s as ee,uc as B,wb as M,yc as O,zc as P}from"./chunk-JP6RBSB3.js";import{a as l,b as d}from"./chunk-YQFG5XE2.js";var w=(()=>{class e{constructor(){this.httpService=u(se)}getGenerateCoa(t){let n={params:new pe().set("PageNumber",t.PageNumber).set("PageSize",t.PageSize)};return this.httpService.get(void 0,"api/Tools/GetListCOA",n)}updateCOABalance(t={}){return this.httpService.put(void 0,"api/Tools/UpdateCOABalance",void 0,t)}getUnbalanceJournal(t){return this.httpService.get(void 0,"api/Tools/UnbalanceJurnal/"+t.PageNumber+"/"+t.PageSize)}updateUnbalanceJournal(t){let a={ListID:t};return this.httpService.put(void 0,"api/Tools/RegenerateUnBalanceJournal",a)}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Te={filter:{PageNumber:1,PageSize:20},data:{data:[],count:0}},Y=j($(Te),H(e=>({first:v(()=>(e.filter().PageNumber-1)*e.filter().PageSize+1),end:v(()=>Math.min(e.filter().PageNumber*e.filter().PageSize,e.data().count))})),G(e=>{let p=u(w);return{updateFilter:a=>{b(e,n=>d(l({},n),{filter:l(l({},n.filter),a)}))},getUpdateCOA:q(R(k(a=>p.getGenerateCoa(a).pipe(Q({next:n=>{b(e,c=>d(l({},c),{data:n}))},error:n=>{console.error(n)}})))))}}),L({onInit(e){e.getUpdateCOA(e.filter)}}));var Re=()=>({height:"calc(100vh - 70px)"}),ke=()=>({"min-width":"50rem"});function Me(e,p){if(e&1){let t=E();o(0,"p-button",7),y("onClick",function(){h(t);let n=s();return C(n.updateCoaBalance())}),i()}}function Ie(e,p){e&1&&(o(0,"tr")(1,"th"),r(2,"Code"),i(),o(3,"th"),r(4,"Name"),i(),o(5,"th"),r(6,"Outlet"),i(),o(7,"th"),r(8,"COA Balance"),i(),o(9,"th"),r(10,"Correct Balance"),i()())}function Je(e,p){if(e&1&&(o(0,"tr")(1,"td"),r(2),i(),o(3,"td"),r(4),i(),o(5,"td"),r(6),i(),o(7,"td"),r(8),S(9,"number"),i(),o(10,"td"),r(11),S(12,"number"),i()()),e&2){let t=p.$implicit;m(2),f(t.Code),m(2),f(t.Name),m(2),f(t.OutletName),m(2),f(U(9,5,t.Balance)),m(3),f(U(12,7,t.CorrectBalance))}}function Be(e,p){if(e&1&&(o(0,"div",9)(1,"p",10),r(2),i()()),e&2){let t=s(2);m(2),B(" Showing ",t.store.first()," to ",t.store.end()," of ",t.store.data().count," entries ")}}function Oe(e,p){e&1&&(o(0,"tr")(1,"td",11)(2,"span"),r(3,"No records found."),i()()())}function De(e,p){if(e&1){let t=E();o(0,"p-panel")(1,"p-table",8),y("onPage",function(n){h(t);let c=s();return C(c.onPageChange(n))}),T(2,Ie,11,0,"ng-template",null,2,_)(4,Je,13,9,"ng-template",null,3,_)(6,Be,3,3,"ng-template",null,4,_)(8,Oe,4,0,"ng-template",null,5,_),i()()}if(e&2){let t=s();I(P(8,Re)),m(),g("paginator",!0)("lazy",!0)("totalRecords",t.store.data().count)("rows",t.store.filter().PageSize)("value",t.store.data().data)("tableStyle",P(9,ke))}}var ve=(()=>{class e{constructor(){this.store=u(Y),this.coaService=u(w),this.toastrService=u(de)}onPageChange(t){this.store.updateFilter(d(l({},this.store.filter()),{PageNumber:Math.floor(t.first/t.rows)+1}))}updateCoaBalance(){this.coaService.updateCOABalance({observe:"response"}).pipe(Ce("Update COA Balance"),te(()=>{this.store.updateFilter(this.store.filter())})).subscribe()}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=M({type:e,selectors:[["app-tools-update-coa"]],features:[O([Y])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Update COA Balance",3,"scrollable"],["label","Update",3,"onClick"],[3,"onPage","paginator","lazy","totalRecords","rows","value","tableStyle"],[1,"flex","align-items-center","custom-font-footer",2,"height","100%"],[1,"m-0"],["colspan","5"]],template:function(a,n){a&1&&(o(0,"app-main-panel",6),T(1,Me,1,0,"ng-template",null,0,_)(3,De,10,10,"ng-template",null,1,_),i()),a&2&&g("scrollable",!0)},dependencies:[K,X,W,ge,N,D,V,z,A,F],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit} .p-paginator .p-paginator-pages .p-paginator-page{font-size:14px}.custom-font-footer[_ngcontent-%COMP%]{font-size:.875rem}"],changeDetection:0})}}return e})();var Ne={data:{count:0,data:[]},filter:{PageNumber:1,PageSize:20}},Z=j($(Ne),H(e=>({first:v(()=>(e.filter().PageNumber-1)*e.filter().PageSize+1),end:v(()=>Math.min(e.filter().PageNumber*e.filter().PageSize,e.data().count)),selectedItems:v(()=>e.data().data.filter(p=>p.checked)),hasCheckedRows:v(()=>e.data().data.some(p=>p.checked))})),G(e=>{let p=u(w);return{updateFilter(a){b(e,n=>d(l({},n),{filter:l(l({},n.filter),a)}))},onRowSelect(a){b(e,n=>{let c=n.data.data.map(x=>x.id===a.id?d(l({},x),{checked:!0}):x);return d(l({},n),{data:d(l({},n.data),{data:c})})})},onRowUnselect(a){b(e,n=>{let c=n.data.data.map(x=>x.id===a.id?d(l({},x),{checked:!1}):x);return d(l({},n),{data:d(l({},n.data),{data:c})})})},onHeaderCheckboxToggle(a){b(e,n=>{let c=n.data.data.map(x=>d(l({},x),{checked:a}));return d(l({},n),{data:d(l({},n.data),{data:c})})})},loadData:q(R(k(a=>p.getUnbalanceJournal(a).pipe(ee(n=>d(l({},n),{data:n.data.map(c=>d(l({},c),{checked:!1}))})),Q({next:n=>{b(e,c=>d(l({},c),{data:n}))},error:n=>{console.error("Error loading unbalance journal data:",n)}})))))}}),L(e=>({onInit:()=>{e.loadData(e.filter)}})));var ze=()=>({height:"calc(100vh - 70px)"}),Ve=e=>["/pages/journal/journal-entry",e];function Fe(e,p){if(e&1){let t=E();o(0,"div",8),J(1,"p-button",9),o(2,"p-button",10),y("onClick",function(){h(t);let n=s(2);return C(n.regenerateUnbalanceJournal())}),r(3,"Regenerate"),i()()}}function Ae(e,p){if(e&1&&T(0,Fe,4,0,"div",7),e&2){let t=s();g("ngIf",t.store.hasCheckedRows())}}function je(e,p){e&1&&(o(0,"tr")(1,"th",12),J(2,"p-tableHeaderCheckbox"),i(),o(3,"th"),r(4,"Date"),i(),o(5,"th"),r(6,"Number"),i(),o(7,"th",13),r(8,"Debit SUM"),i(),o(9,"th",13),r(10,"Credit SUM"),i(),o(11,"th",13),r(12,"Difference"),i(),o(13,"th"),r(14,"Reference"),i(),o(15,"th"),r(16,"Outlet"),i()())}function He(e,p){if(e&1&&(o(0,"tr")(1,"td"),J(2,"p-tableCheckbox",14),i(),o(3,"td"),r(4),S(5,"date"),i(),o(6,"td")(7,"a",15),r(8),i()(),o(9,"td",13),r(10),S(11,"number"),i(),o(12,"td",13),r(13),S(14,"number"),i(),o(15,"td",13),r(16),S(17,"number"),i(),o(18,"td")(19,"a",16),r(20),i()(),o(21,"td"),r(22),i()()),e&2){let t=p.$implicit,a=s(2);m(2),g("value",t),m(2),f(ie(5,10,t.date,"dd MMM yyyy")),m(3),g("routerLink",oe(19,Ve,t.id)),m(),f(t.number),m(2),f(U(11,13,t.debitSum)),m(3),f(U(14,15,t.creditSum)),m(3),f(U(17,17,t.differences)),m(3),g("href",a.authService.getTenantExternalURL()+"/menu/Orders/Orders/Customer_Invoice/Info?ID="+t.id,ae),m(),f(t.referenceText),m(2),f(t.outletName)}}function Le(e,p){if(e&1&&r(0),e&2){let t=s(2);B(" Showing ",t.store.first()," to ",t.store.end()," of ",t.store.data().count," entries ")}}function Ge(e,p){e&1&&(o(0,"tr")(1,"td",17)(2,"span"),r(3,"No records found."),i()()())}function $e(e,p){if(e&1){let t=E();o(0,"p-panel")(1,"p-table",11),y("onPage",function(n){h(t);let c=s();return C(c.onPageChange(n))})("onRowSelect",function(n){h(t);let c=s();return C(c.onRowSelect(n))})("onRowUnselect",function(n){h(t);let c=s();return C(c.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(t);let c=s();return C(c.onHeaderCheckboxToggle(n))}),T(2,je,17,0,"ng-template",null,2,_)(4,He,23,21,"ng-template",null,3,_)(6,Le,1,3,"ng-template",null,4,_)(8,Ge,4,0,"ng-template",null,5,_),i()()}if(e&2){let t=s();I(P(7,ze)),m(),g("value",t.store.data().data)("lazy",!0)("paginator",!0)("rows",t.store.filter().PageSize)("totalRecords",t.store.data().count)}}var we=(()=>{class e{constructor(){this.store=u(Z),this.toolsService=u(w),this.authService=u(ue)}onPageChange(t){console.log("Page changed:",t);let a=t.first/t.rows;this.store.updateFilter({PageNumber:a+1})}onRowSelect(t){this.store.onRowSelect(t.data)}onRowUnselect(t){if(Array.isArray(t.data)){t.data.forEach(a=>{this.store.onRowUnselect(a)});return}else this.store.onRowUnselect(t.data)}onHeaderCheckboxToggle(t){this.store.onHeaderCheckboxToggle(t.checked)}regenerateUnbalanceJournal(){let a=this.store.selectedItems().filter(n=>n.checked==!0).map(n=>n.id);this.toolsService.updateUnbalanceJournal(a).subscribe()}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=M({type:e,selectors:[["app-unbalance-journal"]],features:[O([Z])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Unbalance Journal",3,"scrollable"],["class","d-flex gap-2",4,"ngIf"],[1,"d-flex","gap-2"],["icon","fa-solid fa-trash","label","Delete","severity","danger"],[3,"onClick"],["paginatorStyleClass","d-flex justify-content-end","dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","lazy","paginator","rows","totalRecords"],[2,"width","1rem"],[1,"text-end"],[3,"value"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"href"],["colspan","6"]],template:function(a,n){a&1&&(o(0,"app-main-panel",6),T(1,Ae,1,1,"ng-template",null,0,_)(3,$e,10,8,"ng-template",null,1,_),i()),a&2&&g("scrollable",!0)},dependencies:[K,X,W,xe,he,be,_e,N,re,D,le,fe,V,z,A,F,me,ce],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var Qt=[{path:"",redirectTo:"generate-coa",pathMatch:"full"},{path:"generate-coa",component:ve},{path:"unbalance-journal",component:we}];export{Qt as TOOLS_ROUTES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-5YNFFJYR.js";import{d as e}from"./chunk-Z45NTTES.js";import{ha as t}from"./chunk-JP6RBSB3.js";var m=(n,i)=>{let r=t(u),o=t(e);return!r.isAuthenticated()||r.isTokenExpired()||!r.checkAuthKeysExists()?(o.navigate(["/"],{queryParams:{returnUrl:i.url}}),!1):!0};export{m as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v,b as L}from"./chunk-
|
|
1
|
+
import{a as v,b as L}from"./chunk-X74L3UX6.js";import"./chunk-ZJ7X5V7U.js";import{a as I,b as E}from"./chunk-H57SDRPH.js";import"./chunk-4CDAAU6Z.js";import{h as H}from"./chunk-OVHBR6ZK.js";import{b as N,c as G}from"./chunk-X22YKT5B.js";import{a as R,b as D}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as V,x as j}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import"./chunk-G5S5AZA7.js";import"./chunk-SJ2FUSMD.js";import{a as F}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{n as w,r as $}from"./chunk-OKCHQM5Q.js";import{Cb as B,Jc as c,Kb as p,Kc as s,Mc as x,Nb as h,Ub as n,V as T,Vb as o,Wb as m,X as M,Z as S,_b as O,dc as _,ec as l,gb as a,h as y,ha as f,pa as g,qa as d,ra as b,s as u,sa as k,wb as A,yc as P,zc as C}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let t=O();n(0,"div",3)(1,"p-button",4),_("onClick",function(){g(t);let r=l();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),_("onClick",function(){g(t);let r=l();return d(r.onMigrateOutletAccount())}),o()()}if(i&2){let t=l();a(2),p("disabled",s(3,2,t.countInBooks$)!==0)("pTooltip",s(4,4,t.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 t=l();h(C(12,q)),a(),h(C(13,q)),a(2),p("migrationCount",s(4,8,t.countInPOS$))("migrationTitle",t.pageTitle),a(4),p("migrationCount",s(8,10,t.countInBooks$))("migrationTitle",t.pageTitle)}}var ut=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f(F),this.refresh$=new y(void 0),this.pageTitle="Outlet Account"}ngOnInit(){let t=this.refresh$.pipe(M(()=>this.migrateService.getOutletAccountCount()),S(e=>console.log("API response:",e)),T(1));this.countInPOS$=t.pipe(u(e=>Number(e.pos))),this.countInBooks$=t.pipe(u(e=>Number(e.books)))}onMigrateOutletAccount(){this.migrateService.migrateOutletAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatOutletAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=A({type:i,selectors:[["app-outlet-account"]],features:[P([v])],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(e,r){e&1&&(n(0,"app-main-panel",2),B(1,J,5,6,"ng-template",null,0,x)(3,K,9,14,"ng-template",null,1,x),o()),e&2&&p("pageTitle",r.pageTitle)},dependencies:[H,$,w,j,V,E,I,D,R,G,N,L],encapsulation:2})}}return i})();export{ut as OutletAccountComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v,b as H}from"./chunk-
|
|
1
|
+
import{a as v,b as H}from"./chunk-X74L3UX6.js";import"./chunk-ZJ7X5V7U.js";import{a as F,b as I}from"./chunk-H57SDRPH.js";import"./chunk-4CDAAU6Z.js";import{h as G}from"./chunk-OVHBR6ZK.js";import{b as D,c as N}from"./chunk-X22YKT5B.js";import{a as O,b as R}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as V,x as j}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import"./chunk-G5S5AZA7.js";import"./chunk-SJ2FUSMD.js";import{a as $}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{n as A,r as P}from"./chunk-OKCHQM5Q.js";import{Cb as E,Jc as c,Kb as p,Kc as m,Mc as C,Nb as x,Ub as n,V as y,Vb as o,Wb as l,X as b,_b as w,dc as h,ec as s,gb as a,h as T,ha as f,pa as g,qa as d,ra as M,s as u,sa as S,wb as k,yc as B,zc as _}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var L=()=>({height:"calc(100vh - 100px)"});function z(i,q){if(i&1){let e=w();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",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function J(i,q){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),c(4,"async"),M(),n(5,"svg",8),l(6,"path",9),o(),S(),l(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=s();x(_(12,L)),a(),x(_(13,L)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var le=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f($),this.refresh$=new T(void 0),this.pageTitle="Expense Account"}ngOnInit(){let e=this.refresh$.pipe(b(()=>this.migrateService.getExpenseAccountCount()),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrate(){this.migrateService.migrateExpenseAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatExpenseAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-expense-account"]],features:[B([v])],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),E(1,z,5,6,"ng-template",null,0,C)(3,J,9,14,"ng-template",null,1,C),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[G,P,A,I,F,R,O,N,D,H,j,V],encapsulation:2})}}return i})();export{le as ExpenseAccountComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as D}from"./chunk-WODWFYV4.js";import{a as He}from"./chunk-G4XX7EU2.js";import{a as Oe,b as Be}from"./chunk-AACWH3EJ.js";import{a as je}from"./chunk-YPBGL37O.js";import{b as A}from"./chunk-ZJ7X5V7U.js";import{a as re}from"./chunk-5YNFFJYR.js";import"./chunk-FLZXCWDU.js";import{a as ze}from"./chunk-XKI7WLHE.js";import"./chunk-DHW7UHFT.js";import"./chunk-C2GO6SPF.js";import{a as z,b as j}from"./chunk-O4QM64EH.js";import{d as Ne,i as ke,j as Me,k as Pe}from"./chunk-SVXDMOLP.js";import{a as Ae,b as De}from"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import"./chunk-GDX5XEV3.js";import{a as Fe,b as Je}from"./chunk-DLUALPHU.js";import"./chunk-4DOELXOP.js";import"./chunk-VVUSFS6O.js";import"./chunk-ZTEDQLOG.js";import"./chunk-EDGADVEY.js";import"./chunk-JTDJJORR.js";import"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{g as Ee,h as Ve}from"./chunk-OVHBR6ZK.js";import{b as Ie,c as Te}from"./chunk-X22YKT5B.js";import{a as Ce,b as be}from"./chunk-JYCUE5HV.js";import{a as y,b as Se,c as ve,d as ye,e as we,f as Re}from"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{n as _e,o as ge,w as he,x as xe}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import{b as ae,c as le,e as me,f as pe,k as se,l as ce,o as de,u as ue,x as fe}from"./chunk-G5S5AZA7.js";import"./chunk-Z45NTTES.js";import"./chunk-SJ2FUSMD.js";import"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{h as Z,j as ee,k as te,n as ie,p as ne,r as oe}from"./chunk-OKCHQM5Q.js";import{Ab as K,Ac as E,Cb as g,Ga as k,Jc as I,Kb as c,Kc as Y,Lc as V,Mc as v,Ub as r,Vb as o,Wb as b,X as N,Yc as T,Z as H,_b as w,bb as U,c as F,cb as L,dc as R,ec as _,gb as m,ha as C,pa as h,qa as x,qc as s,rc as S,s as J,sc as M,uc as W,vc as $,wb as G,wc as P,xc as q,yc as Q,zc as X}from"./chunk-JP6RBSB3.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var $e={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}},O=Se(Re($e),ve(t=>({first:T(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:T(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:T(()=>t.data().data.some(a=>a.checked)),checkedARCollection:T(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),we(t=>{let a=C(D),e=C(A);return{updateFilter(n){y(t,i=>f(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){y(t,i=>{let u=i.data.data.map(p=>p.id===n.id?f(d({},p),{checked:!0}):p);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){y(t,i=>{let u=i.data.data.map(p=>p.id===n.id?f(d({},p),{checked:!1}):p);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){y(t,i=>{let u=i.data.data.map(p=>f(d({},p),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getARLoader:z(F(N(()=>a.getARJournalLoader().pipe(j({next:n=>{y(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AR collection loader:",n)}}))))),getARCollection:z(F(J(n=>Object.entries(n).reduce((i,[u,p])=>(p!=null&&(i[u]=p),i),{})),N(n=>a.getARJournal(n).pipe(J(i=>f(d({},i),{data:i.data.map(u=>f(d({},u),{due:e.from(u.due)?e.from(u.due).format():null,checked:!1}))})),j({next:i=>{y(t,u=>f(d({},u),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),ye(t=>({onInit:()=>{t.getARLoader(),t.getARCollection(t.filter)}})));var B=t=>({"ng-invalid ng-dirty":t}),qe=()=>({});function Qe(t,a){if(t&1){let e=w();r(0,"p-button",10),R("onClick",function(){h(e);let n=_(2);return x(n.onCreateJournal())}),o()}}function Xe(t,a){if(t&1&&g(0,Qe,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function Ye(t,a){t&1&&(r(0,"tr")(1,"th",12),b(2,"p-tableHeaderCheckbox"),o(),r(3,"th",13),s(4,"Outlet"),o(),r(5,"th",14),s(6,"Number"),o(),r(7,"th",15),s(8,"Customer"),o(),r(9,"th",16),s(10,"Date"),o(),r(11,"th",16),s(12,"Due"),o(),r(13,"th",15),s(14,"Note"),o(),r(15,"th",17),s(16,"Payment"),o(),b(17,"th",18),o())}function Ze(t,a){if(t&1&&(r(0,"tr")(1,"td"),b(2,"p-tableCheckbox",19),o(),r(3,"td"),s(4),o(),r(5,"td")(6,"a",20),s(7),o()(),r(8,"td"),s(9),o(),r(10,"td"),s(11),I(12,"date"),o(),r(13,"td"),s(14),I(15,"date"),o(),r(16,"td"),b(17,"div",21),o(),r(18,"td"),s(19),o(),r(20,"td"),b(21,"p-button",22),o()()),t&2){let e=a.$implicit,l=_(2);m(2),c("value",e),m(2),S(e.outlet),m(2),c("href",l.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Invoice/New_Join_Invoice/Info?ID="+e.id,L),m(),M(" ",e.number," "),m(2),S(e.customer),m(2),S(V(12,12,e.date,"d MMM y")),m(3),S(e.due?V(15,15,e.due,"d MMM y hh:mm"):"-"),m(3),c("innerHTML",e.note,U),m(2),S(e.payment),m(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function et(t,a){if(t&1&&s(0),t&2){let e=_(2);W(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function tt(t,a){t&1&&(r(0,"tr")(1,"td",23)(2,"span"),s(3,"No records found."),o()()())}function it(t,a){if(t&1){let e=w();r(0,"p-panel")(1,"p-table",11),R("onPage",function(n){h(e);let i=_();return x(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return x(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){h(e);let i=_();return x(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return x(i.onRowUnselect(n))}),g(2,Ye,18,0,"ng-template",null,3,v)(4,Ze,22,18,"ng-template",null,4,v)(6,et,1,3,"ng-template",null,5,v)(8,tt,4,0,"ng-template",null,6,v),o()()}if(t&2){let e=_();m(),c("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function nt(t,a){if(t&1&&(r(0,"span",34),s(1),I(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),m(),M(" ",V(2,2,e.name,30)," ")}}function ot(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function rt(t,a){if(t&1&&(r(0,"div"),g(1,ot,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("from"))}}function at(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function lt(t,a){if(t&1&&(r(0,"div"),g(1,at,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("to"))}}function mt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function pt(t,a){if(t&1&&(r(0,"div"),g(1,mt,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("pageSize"))}}function st(t,a){if(t&1){let e=w();r(0,"form",24)(1,"div",25)(2,"label",26),s(3,"Outlet"),o(),r(4,"p-select",27),g(5,nt,3,5,"ng-template",null,7,v),o()(),r(7,"div",25)(8,"label",26),s(9,"From - To"),o(),r(10,"div",28),b(11,"p-datepicker",29),g(12,rt,2,1,"div",30),b(13,"p-datepicker",31),g(14,lt,2,1,"div",30),o()(),r(15,"div",25)(16,"label",26),s(17,"Customer"),o(),r(18,"p-autocomplete",32),I(19,"async"),R("completeMethod",function(n){h(e);let i=_();return x(i.onSearchContact(n))}),o()(),r(20,"div",25)(21,"label",26),s(22,"Page Size"),o(),b(23,"input",33),g(24,pt,2,1,"div",30),o()()}if(t&2){let e=_();c("formGroup",e.form),m(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),m(7),c("iconDisplay","input")("showIcon",!0)("ngClass",E(17,B,e.isInvalid("from"))),m(),c("ngIf",e.isInvalid("from")),m(),c("iconDisplay","input")("showIcon",!0)("ngClass",E(19,B,e.isInvalid("to"))),m(),c("ngIf",e.isInvalid("to")),m(4),c("suggestions",Y(19,15,e.customerSuggestions$)),m(5),c("autoNumeric",X(21,qe))("ngClass",E(22,B,e.isInvalid("pageSize"))),m(),c("ngIf",e.isInvalid("pageSize"))}}var ei=(()=>{class t extends ze{constructor(){super(),this.store=C(O),this.generateJournalService=C(D),this.authService=C(re),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(ue),this.dayjsService=C(A)}ngOnInit(){this.initForm()}initForm(){let{number:e,from:l,to:n,pageNumber:i,pageSize:u,export:p,exportPageNumber:Ue,exportPageSize:Le,outletName:Ge,customerID:Ke,paymentState:We}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),from:this.fb.control(this.dayjsService.from(l)?this.dayjsService.from(l).toDate():null),to:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),pageNumber:this.fb.control(i),pageSize:this.fb.control(u,[le.required]),export:this.fb.control(p),exportPageNumber:this.fb.control(Ue),exportPageSize:this.fb.control(Le),outletName:this.fb.control(Ge),customerID:this.fb.control(Ke),paymentState:this.fb.control(We)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((l,[n,i])=>{switch(n){case"customerID":i||(l[n]=He);break;case"from":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;default:l[n]=i===null?"":i;break}return l},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onSearchContact(e){this.customerSuggestions$=this.generateJournalService.getCustomerSuggestions(e.query)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e,pageNumber:1})),this.store.getARCollection(this.store.filter())}onPageChange(e){let l=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:l+1}))}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(l=>{this.store.onRowUnselect(l)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createARJournal(this.store.checkedARCollection()).pipe(H(()=>this.store.getARCollection(this.store.filter))).subscribe()}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=G({type:t,selectors:[["app-ar-journal"]],features:[Q([O]),K],decls:8,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AR Collection",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","9"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","customerID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(l,n){if(l&1){let i=w();r(0,"app-main-panel",8),q("isDialogFilterVisibleChange",function(p){return h(i),P(n.isDialogFilterVisible,p)||(n.isDialogFilterVisible=p),x(p)})("isInitDialogFilterVisibleChange",function(p){return h(i),P(n.isInitDialogFilterVisible,p)||(n.isInitDialogFilterVisible=p),x(p)}),R("filterConfirmed",function(){return h(i),x(n.onFilterOKEvent())})("search",function(p){return h(i),x(n.onSearch(p))}),g(1,Xe,1,1,"ng-template",null,0,v)(3,it,10,5,"ng-template",null,1,v),s(5," <"),g(6,st,25,24,"ng-template",null,2,v),o()}l&2&&(c("isSearchableInput",!0)("isFilterable",!0),$("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),c("scrollable",!0))},dependencies:[Ve,oe,Z,ee,te,ie,ne,Pe,Ne,ke,Me,xe,he,be,Ce,fe,se,ae,me,pe,ce,de,Je,Fe,De,Ae,Be,Oe,ge,_e,Ee,Te,Ie,je],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{ei as ARJournalComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y}from"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-OJPJVKM5.js";import{a as D,b as H}from"./chunk-O4QM64EH.js";import{d as Y,i as Z,j as ee,k as te}from"./chunk-SVXDMOLP.js";import"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import"./chunk-GDX5XEV3.js";import"./chunk-DLUALPHU.js";import"./chunk-4DOELXOP.js";import"./chunk-VVUSFS6O.js";import"./chunk-ZTEDQLOG.js";import"./chunk-EDGADVEY.js";import"./chunk-JTDJJORR.js";import"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{h as X}from"./chunk-OVHBR6ZK.js";import"./chunk-X22YKT5B.js";import{a as f,b as $,c as q,d as G,e as J,f as Q,g as W}from"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as K,x as O}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import"./chunk-G5S5AZA7.js";import{e as L}from"./chunk-Z45NTTES.js";import"./chunk-SJ2FUSMD.js";import"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{k as j,p as F,r as A}from"./chunk-OKCHQM5Q.js";import{Cb as E,Jc as v,Kb as h,Lc as M,Mc as _,Ub as r,Vb as l,Wb as S,X as k,Yc as b,Z as N,_b as R,c as P,dc as T,ec as g,gb as d,ha as x,pa as u,qa as C,qc as p,rc as w,s as V,uc as z,wb as U,yc as B}from"./chunk-JP6RBSB3.js";import{a,b as c}from"./chunk-YQFG5XE2.js";var ne={data:[],count:0,filter:{PageSize:20,PageNumber:1}},I=$(Q(ne),W("Closing Entries Store"),q(t=>({first:b(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:b(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.count())),hasCheckedRows:b(()=>t.data().some(s=>s.checked)),selectedItems:b(()=>t.data().filter(s=>s.checked))})),J(t=>{let s=x(y),e={updateFilter:o=>{f(t,n=>c(a({},n),{filter:a(a({},n.filter),o)}))},onRowSelect(o){f(t,n=>{let i=n.data.map(m=>m.id===o.id?c(a({},m),{checked:!0}):m);return c(a({},n),{data:i})})},onRowUnselect(o){f(t,n=>{let i=n.data.map(m=>m.id===o.id?c(a({},m),{checked:!1}):m);return c(a({},n),{data:i})})},onHeaderCheckboxToggle(o){f(t,n=>{let i=n.data.map(m=>c(a({},m),{checked:o}));return c(a({},n),{data:i})})},getClosingEntries:D(P(k(o=>s.getClosingEntries(o).pipe(V(n=>n.map(i=>c(a({},i),{checked:!1}))),H({next:n=>{f(t,i=>c(a({},i),{data:n})),e.getClosingEntryCount()},error:n=>{console.error("Error fetching closing entries:",n)}}))))),getClosingEntryCount:D(P(k(()=>s.getClosingEntryCount().pipe(H({next:({count:o})=>{f(t,n=>c(a({},n),{count:o}))},error:o=>{console.error("Error fetching closing entry count:",o)}})))))};return e}),G(t=>({onInit:()=>{t.getClosingEntries(t.filter)}})));function oe(t,s){if(t&1){let e=R();r(0,"p-button",11),T("onClick",function(){u(e);let n=g(2);return C(n.onDeleteClosingEntries())}),l()}}function ie(t,s){if(t&1&&(r(0,"div",7),E(1,oe,1,0,"p-button",8),r(2,"a",9),S(3,"i",10),p(4," Add"),l()()),t&2){let e=g();d(),h("ngIf",e.store.hasCheckedRows())}}function re(t,s){t&1&&(r(0,"tr")(1,"th",13),S(2,"p-tableHeaderCheckbox"),l(),r(3,"th"),p(4,"Period"),l(),r(5,"th"),p(6,"Note"),l(),r(7,"th"),p(8,"Created"),l(),r(9,"th"),p(10,"CreatedBy"),l()())}function ae(t,s){if(t&1&&(r(0,"tr")(1,"td"),S(2,"p-tableCheckbox",14),l(),r(3,"td"),p(4),v(5,"date"),l(),r(6,"td"),p(7),l(),r(8,"td"),p(9),v(10,"date"),l(),r(11,"td"),p(12),l()()),t&2){let e=s.$implicit;d(2),h("value",e),d(2),w(M(5,5,e.period,"d MMM y")),d(3),w(e.note),d(2),w(M(10,8,e.created,"d MMM y")),d(3),w(e.creatorName)}}function le(t,s){if(t&1&&p(0),t&2){let e=g(2);z(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.count()," entries ")}}function se(t,s){t&1&&(r(0,"tr")(1,"td",15)(2,"span"),p(3," No journal entries found. "),l()()())}function ce(t,s){if(t&1){let e=R();r(0,"p-table",12),T("onPage",function(n){u(e);let i=g();return C(i.onPageChange(n))})("onRowSelect",function(n){u(e);let i=g();return C(i.onRowSelect(n))})("onRowUnselect",function(n){u(e);let i=g();return C(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){u(e);let i=g();return C(i.onHeaderCheckboxToggle(n))}),E(1,re,11,0,"ng-template",null,2,_)(3,ae,13,11,"ng-template",null,3,_)(5,le,1,3,"ng-template",null,4,_)(7,se,4,0,"ng-template",null,5,_),l()}if(t&2){let e=g();h("value",e.store.data())("paginator",!0)("totalRecords",e.store.count())("lazy",!0)("rows",e.store.filter().PageSize)("scrollHeight","calc(100vh - 142px)")}}var Ve=(()=>{class t{constructor(){this.store=x(I),this.closingEntryService=x(y)}onPageChange(e){let o=e.first/e.rows+1;this.store.updateFilter(c(a({},this.store.filter()),{PageSize:o}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(o=>{this.store.onRowUnselect(o)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onDeleteClosingEntries(){let e=this.store.selectedItems().map(o=>o.id).join(",");console.log("Deleting closing entries with IDs:",e),this.closingEntryService.deleteClosingEntry(e).pipe(N(()=>{this.store.updateFilter(a({},this.store.filter()))})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=U({type:t,selectors:[["app-closing-page"]],features:[B([I])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Closing Entries List",3,"scrollable"],[1,"d-flex","gap-2"],["label","Delete","severity","danger","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],[1,"fa-solid","fa-plus"],["label","Delete","severity","danger","icon","fa-solid fa-trash",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","paginator","totalRecords","lazy","rows","scrollHeight"],[2,"width","1rem"],[3,"value"],["colspan","5"]],template:function(o,n){o&1&&(r(0,"app-main-panel",6),E(1,ie,5,1,"ng-template",null,0,_)(3,ce,9,6,"ng-template",null,1,_),l()),o&2&&h("scrollable",!0)},dependencies:[X,A,j,F,te,Y,Z,ee,L,O,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Ve as ClosingPageComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as V,b as oe}from"./chunk-
|
|
1
|
+
import{a as V,b as oe}from"./chunk-X74L3UX6.js";import"./chunk-ZJ7X5V7U.js";import{a as te,b as ie}from"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as K,b as Q}from"./chunk-H57SDRPH.js";import{a as ne,b as re}from"./chunk-VVUSFS6O.js";import"./chunk-ZTEDQLOG.js";import"./chunk-EDGADVEY.js";import{b as ee}from"./chunk-4CDAAU6Z.js";import{h as $}from"./chunk-OVHBR6ZK.js";import"./chunk-X22YKT5B.js";import{a as Y,b as Z}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as U,x as X}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import{e as G,j as H,w as q}from"./chunk-G5S5AZA7.js";import"./chunk-SJ2FUSMD.js";import{a as A}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{n as z,r as R}from"./chunk-OKCHQM5Q.js";import{Cb as L,Ga as b,Jc as T,Kb as u,Kc as P,Mc as M,Nb as S,Ub as r,V as E,Vb as o,Wb as C,X as B,Z as W,_b as h,dc as f,ec as m,gb as s,h as J,ha as x,pa as l,qa as p,qc as _,ra as I,s as y,sa as N,vc as c,wb as O,wc as g,xc as d,yc as j,zc as F}from"./chunk-JP6RBSB3.js";import{a as D}from"./chunk-YQFG5XE2.js";var ae=()=>({height:"calc(100vh - 100px)"});function le(a,v){if(a&1){let t=h();r(0,"div",4)(1,"p-button",5),f("onClick",function(){l(t);let e=m();return p(e.onFormat())}),o(),r(2,"p-button",6),f("onClick",function(){l(t);let e=m();return p(e.openMigrateDialog())}),o()()}}function pe(a,v){if(a&1){let t=h();r(0,"div",7)(1,"div",8)(2,"label",9),_(3,"From"),o(),r(4,"p-datepicker",10),d("ngModelChange",function(e){l(t);let n=m();return g(n.filter().From,e)||(n.filter().From=e),p(e)}),o()(),r(5,"div",8)(6,"label",9),_(7,"To"),o(),r(8,"p-datepicker",10),d("ngModelChange",function(e){l(t);let n=m();return g(n.filter().To,e)||(n.filter().To=e),p(e)}),o()(),r(9,"div",8)(10,"label",9),_(11,"Page Number"),o(),r(12,"p-inputnumber",11),d("ngModelChange",function(e){l(t);let n=m();return g(n.filter().PageNumber,e)||(n.filter().PageNumber=e),p(e)}),o()(),r(13,"div",8)(14,"label",9),_(15,"Page Size"),o(),r(16,"p-inputnumber",11),d("ngModelChange",function(e){l(t);let n=m();return g(n.filter().PageSize,e)||(n.filter().PageSize=e),p(e)}),o()()()}if(a&2){let t=m();s(4),u("showIcon",!0),c("ngModel",t.filter().From),s(4),u("showIcon",!0),c("ngModel",t.filter().To),s(4),c("ngModel",t.filter().PageNumber),s(4),c("ngModel",t.filter().PageSize)}}function me(a,v){if(a&1&&(r(0,"p-scroll-panel")(1,"p-panel")(2,"div",12),C(3,"app-migration-cards",13),T(4,"async"),I(),r(5,"svg",14),C(6,"path",15),o(),N(),C(7,"app-migration-cards",16),T(8,"async"),o()()()),a&2){let t=m();S(F(12,ae)),s(),S(F(13,ae)),s(2),u("migrationCount",P(4,8,t.countInPOS$))("migrationTitle",t.pageTitle),s(4),u("migrationCount",P(8,10,t.countInBooks$))("migrationTitle",t.pageTitle)}}var We=(()=>{class a{constructor(){this.migrateService=x(V),this.refresh$=new J(void 0),this.toastr=x(A),this.pageTitle="Manual Journal",this.filter=b({From:new Date,To:new Date,PageSize:45e3,PageNumber:1}),this.isFilterDialogOpen=b(!1),this.previousFilter=null}ngOnInit(){let t=this.refresh$.pipe(B(()=>this.migrateService.getManualJournalCount()),E(1));this.countInPOS$=t.pipe(y(i=>Number(i.pos))),this.countInBooks$=t.pipe(y(i=>Number(i.books)))}openMigrateDialog(){this.previousFilter=D({},this.filter()),this.isFilterDialogOpen.set(!0)}onMigrate(){this.migrateService.migrateManualJournal(this.filter()).pipe(W(()=>{this.isFilterDialogOpen.update(t=>!t),this.refresh$.next(),this.previousFilter=null})).subscribe()}onFilterCanceled(){this.previousFilter&&(this.filter.set(this.previousFilter),this.previousFilter=null)}onFormat(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatManualJournal().subscribe(i=>{this.refresh$.next(),this.toastr.success(i.message,"Format Successful")})}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=O({type:a,selectors:[["app-manual-journal"]],features:[j([V])],decls:7,vars:2,consts:[["actionButton",""],["filters",""],["content",""],[3,"filterConfirmed","isDialogFilterVisibleChange","filterCanceled","pageTitle","isDialogFilterVisible"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate",3,"onClick"],[1,"d-flex","flex-column","row-gap-3"],[1,"d-flex","flex-column"],["for","outlet"],["styleClass","w-100","appendTo","body","iconDisplay","input","inputId","icondisplay",3,"ngModelChange","showIcon","ngModel"],["inputId","integeronly",3,"ngModelChange","ngModel"],[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(i,e){if(i&1){let n=h();r(0,"app-main-panel",3),f("filterConfirmed",function(){return l(n),p(e.onMigrate())}),d("isDialogFilterVisibleChange",function(w){return l(n),g(e.isFilterDialogOpen,w)||(e.isFilterDialogOpen=w),p(w)}),f("filterCanceled",function(){return l(n),p(e.onFilterCanceled())}),L(1,le,3,0,"ng-template",null,0,M)(3,pe,17,6,"ng-template",null,1,M)(5,me,9,14,"ng-template",null,2,M),o()}i&2&&(u("pageTitle",e.pageTitle),c("isDialogFilterVisible",e.isFilterDialogOpen))},dependencies:[$,R,z,ee,X,U,Q,K,Z,Y,oe,ie,te,q,G,H,re,ne],encapsulation:2})}}return a})();export{We as ManualJournalComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Qe,b as Xe,c as Ye,d as Ze,e as et,f as tt}from"./chunk-3VJJTR55.js";import{a as ze,b as Ue,c as qe,d as We}from"./chunk-XAWSZFE3.js";import{a as He,b as Ke}from"./chunk-YYDAQ7AW.js";import{a as $e}from"./chunk-YPBGL37O.js";import{b as Le}from"./chunk-INB6OCHW.js";import{a as Je,b as je}from"./chunk-Q23KXB3T.js";import"./chunk-DHW7UHFT.js";import{a as Be,b as Oe,d as Ve,k as ke}from"./chunk-SVXDMOLP.js";import{a as Ne,b as Me}from"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as Re}from"./chunk-XKCLERWG.js";import{a as K,b as Q}from"./chunk-H57SDRPH.js";import"./chunk-GDX5XEV3.js";import{a as Ge,b as Pe}from"./chunk-DLUALPHU.js";import"./chunk-4DOELXOP.js";import{a as De,b as we}from"./chunk-VVUSFS6O.js";import"./chunk-ZTEDQLOG.js";import"./chunk-EDGADVEY.js";import"./chunk-JTDJJORR.js";import"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{b as X}from"./chunk-4CDAAU6Z.js";import{h as I}from"./chunk-7INXBUUN.js";import"./chunk-X22YKT5B.js";import{a as L,b as $}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{n as H,o as E,w as J,x as j}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import{Ha as R,La as Te,b as G,c as le,e as A,f as P,j as Ee,l as B,m as q,n as Ie,o as O,u as V,w as W,x as k}from"./chunk-G5S5AZA7.js";import{b as xe,e as Se,l as ye}from"./chunk-Z45NTTES.js";import{a as Ae}from"./chunk-CV4R4TBA.js";import{a as Fe}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{h as be,k as Ce,q as he,r as F}from"./chunk-OKCHQM5Q.js";import{Ac as oe,Cb as g,Ga as z,Jc as re,Kb as p,Kc as ae,L as ue,Mc as f,Nb as fe,Qb as T,Sb as N,Tb as M,Ub as i,Vb as n,Wb as c,Y as se,Z as D,_b as C,ba as de,dc as h,ec as u,g as pe,gb as l,ha as s,mb as ne,pa as v,qa as _,qc as r,rc as y,s as ce,sc as ie,vc as ge,wb as S,wc as ve,xc as _e,yc as U,zc as w}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var b=(()=>{class t{#e=s(Ae);fetchLoaderConfiguration(){return this.#e.get("","api/SetupLoader/Load")}updateAccountingIntegrationConfiguration(e){return this.#e.post(void 0,"/api/setup/SubmitConfig",e)}fetchOpeningBalanceFormConfiguration(){return this.#e.get("","/api/setup/OpeningBalance/Form")}submitOpeningBalanceFormConfiguration(e){return this.#e.post("","api/setup/OpeningBalance/Submit",e)}fetchAPICredential(){return this.#e.get(void 0,"/api/AccountConfig")}updateAPICredential(e){return this.#e.put(void 0,"/api/AccountConfig",e)}verifyAPICredential(e){return this.#e.post(void 0,"/api/AccountConfig/Validate",e)}formatJournal(e){return this.#e.post("","/api/setup/formatdata/clearjournal",{domain:e})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=de({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var st=()=>({height:"calc(100vh - 100px)"});function dt(t,m){if(t&1){let e=C();i(0,"div",4)(1,"a",5),r(2,"Cancel"),n(),i(3,"p-button",6),h("click",function(){v(e);let a=u();return _(a.updateAccountingIntegration())}),n()()}}function ft(t,m){if(t&1&&(i(0,"p-tab",8),r(1),n()),t&2){let e=m.$implicit,o=m.$index;p("value",o),l(),y(e)}}function gt(t,m){if(t&1&&(i(0,"div",25),c(1,"p-radiobutton",42),i(2,"label",43),r(3),n()()),t&2){let e=m.$implicit;l(),p("value",e.key)("inputId",e.value),l(),p("for",e.value),l(),y(e.value)}}function vt(t,m){if(t&1&&(i(0,"div",40)(1,"div",25),c(2,"p-radiobutton",44),i(3,"label",43),r(4),n()()()),t&2){let e=m.$implicit;l(2),p("value",e.key)("inputId",e.key.toString()),l(),p("for",e.key),l(),y(e.value)}}function _t(t,m){if(t&1&&(i(0,"div",40)(1,"div",25),c(2,"p-radiobutton",45),i(3,"label",43),r(4),n()()()),t&2){let e=m.$implicit;l(2),p("value",e.key)("inputId",e.value),l(),p("for",e.value),l(),y(e.value)}}function bt(t,m){if(t&1&&(i(0,"p-scrollpanel",null,2)(2,"p-tabs",7)(3,"p-tablist"),N(4,ft,2,2,"p-tab",8,T),n(),i(6,"p-tabpanels")(7,"p-tabpanel",9)(8,"div",10)(9,"h3",11),r(10,"Accounting Numbering"),n(),i(11,"div",12)(12,"div",13)(13,"div",14)(14,"div",13)(15,"div",15)(16,"label",16),r(17,"Digit"),n(),c(18,"p-inputnumber",17),n()(),i(19,"div",13)(20,"div",15)(21,"label",18),r(22,"Seed"),n(),c(23,"p-inputnumber",19),n()(),i(24,"div",13)(25,"div",15)(26,"label",20),r(27,"Last Number"),n(),c(28,"p-inputnumber",21),n()(),i(29,"div",13)(30,"div",15)(31,"label",22),r(32,"Format"),n(),c(33,"p-select",23),n()(),i(34,"div",13)(35,"div",15)(36,"label",22),r(37,"Reset Every"),n(),i(38,"div",24),N(39,gt,4,4,"div",25,T),n()()()()()()()(),i(41,"p-tabpanel",8)(42,"div",26)(43,"div",27)(44,"h3",11),r(45,"Journal Generate"),n(),i(46,"p"),r(47,"Configure generate transaction"),n()(),i(48,"div",12)(49,"div",28)(50,"div",12)(51,"div",29)(52,"div",15)(53,"label",22),r(54,"Outlet Delivery Journal"),n(),c(55,"p-toggleswitch",30),n()(),i(56,"div",31)(57,"div",15)(58,"label",22),r(59,"Payment Discount Journal On Payment"),n(),c(60,"p-toggleswitch",32),n()()()()()(),c(61,"hr"),i(62,"div",26)(63,"div",28)(64,"div",12)(65,"div",33)(66,"label",22),r(67,"Note"),n()(),i(68,"div",29)(69,"div",15)(70,"label",22),r(71,"Note Required On Journal"),n(),c(72,"p-toggleswitch",34),n()(),i(73,"div",29)(74,"div",15)(75,"label",22),r(76,"Trial Balance Footer Visible"),n(),c(77,"p-toggleswitch",35),n()(),c(78,"div",29),n()()()(),i(79,"p-tabpanel",36)(80,"div",10)(81,"h3",11),r(82,"Report"),n(),i(83,"div",12)(84,"div",27)(85,"div",37)(86,"div")(87,"label",38),r(88,"Accounting For Treatment"),n(),i(89,"div",12)(90,"div",39)(91,"div",12),N(92,vt,5,4,"div",40,T),n()()()(),i(94,"div")(95,"label",41),r(96,"Configure Report Access Control in COA"),n(),i(97,"div",12)(98,"div",39)(99,"div",12),N(100,_t,5,4,"div",40,T),n()()()()()()()()()()()()),t&2){let e,o,a,d,x=u();fe(w(8,st)),l(2),p("value",0)("formGroup",x.form),l(2),M(x.tabs()),l(3),p("value",0),l(26),p("options",(e=x.accountingIntegration())==null||e.options==null?null:e.options.monthlyResetPeriodFormat),l(6),M((o=x.accountingIntegration())==null||o.options==null?null:o.options.resetPeriods),l(2),p("value",1),l(38),p("value",2),l(13),M((a=x.accountingIntegration())==null||a.options==null?null:a.options.generatePrepaidJournal),l(8),M((d=x.accountingIntegration())==null||d.options==null?null:d.options.entityAccess)}}var it=(()=>{class t{constructor(){this.accountingSetupService=s(b),this.fb=s(V).nonNullable,this.tabs=z(["Numbering","Journal","Report"]),this.accountingIntegration=z(null)}ngOnInit(){this.initializeForm(),this.loadAccountingConfiguration()}initializeForm(){this.form=this.fb.group({number:this.createNumberGroup(),report:this.createReportGroup(),journalGenerate:this.createJournalGenerateGroup()})}createNumberGroup(){return this.fb.group({seed:this.fb.control(""),digit:this.fb.control(""),resetEvery:this.fb.control(""),monthlyFormat:this.fb.control(""),lastNumber:this.fb.control(""),lastModified:this.fb.control("")})}createReportGroup(){return this.fb.group({accountingAuditType:this.fb.control(""),accountingEntityAccess:this.fb.control(""),generatePrepaidJournal:this.fb.control("")})}createJournalGenerateGroup(){return this.fb.group({eodExpenseJournal:this.fb.control(""),transferOrder:this.fb.control(""),paymentDiscount:this.fb.control(""),noteMandatory:this.fb.control(""),trialBalanceFooterVisible:this.fb.control("")})}loadAccountingConfiguration(){this.accountingSetupService.fetchLoaderConfiguration().pipe(D(e=>{this.accountingIntegration.set(e),this.form.patchValue(e.form)})).subscribe()}updateAccountingIntegration(){let e={form:this.form.getRawValue()};this.accountingSetupService.updateAccountingIntegrationConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-accounting-integration"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["scrollPanelContainer",""],["pageTitle","Accounting Integration"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"click"],[1,"border-top",3,"value","formGroup"],[3,"value"],["formGroupName","number",3,"value"],[1,""],[1,"fs-5"],[1,"row"],[1,"col-6"],[1,"row","row-gap-3"],[1,"d-flex","flex-column"],["for","digit",1,"fs-4"],["inputId","digit","formControlName","digit"],["for","seed",1,"fs-4"],["inputId","seed","formControlName","seed"],["for","lastNumber",1,"fs-4"],["inputId","lastNumber","formControlName","lastNumber"],["for","",1,"fs-4"],["appendTo","body","formControlName","monthlyFormat","optionValue","key","optionLabel","value",3,"options"],[1,"d-flex","gap-4"],[1,"d-flex","align-items-center","gap-2"],["formGroupName","journalGenerate",1,"row"],[1,"col-12"],[1,"col-10"],[1,"col-md-4","mb-3"],["formControlName","transferOrder"],[1,"col-md-6","mb-4"],["formControlName","paymentDiscount"],[1,"col-12","mb-2"],["formControlName","noteMandatory"],["formControlName","trialBalanceFooterVisible"],["formGroupName","report",3,"value"],[1,"d-flex","flex-column","gap-4"],["for","generatePrepaidJournal",1,"fs-4","mb-2"],[1,"col-8"],[1,"col-4"],["for","accountingEntityAccess",1,"fs-4","mb-2"],["name","resetEvery","formControlName","resetEvery",3,"value","inputId"],[1,"m-0",3,"for"],["name","generatePrepaidJournal","formControlName","generatePrepaidJournal",3,"value","inputId"],["name","accountingEntityAccess","formControlName","accountingEntityAccess",3,"value","inputId"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,dt,4,0,"ng-template",null,0,f)(3,bt,102,9,"ng-template",null,1,f),n())},dependencies:[F,tt,et,Ze,Ye,Qe,Xe,I,X,Oe,Be,k,A,P,B,O,q,E,Pe,Ge,je,Je,ye,Se,j,J,we,De,Q,K],styles:["[_nghost-%COMP%]{display:block}.inactive-state[_ngcontent-%COMP%]{background-color:#e5e5e5}.active-state[_ngcontent-%COMP%]{background-color:var(--p-primary-color)}"],changeDetection:0})}}return t})();var xt=()=>[],ot=()=>({});function St(t,m){if(t&1){let e=C();i(0,"div")(1,"p-button",6),h("onClick",function(){v(e);let a=u();return _(a.submitForm())}),n()()}}function yt(t,m){t&1&&(i(0,"div",12)(1,"h3",13),r(2,"Date"),n(),c(3,"p-datePicker",14),n())}function Ft(t,m){t&1&&(i(0,"tr")(1,"th",20),r(2,"Account Name"),n(),i(3,"th",21),r(4,"Debit"),n(),i(5,"th",21),r(6,"Credit"),n()())}function At(t,m){if(t&1&&(i(0,"tr",10)(1,"td",20),r(2),n(),i(3,"td"),c(4,"input",22),n(),i(5,"td"),c(6,"input",23),n()()),t&2){let e,o=m.$implicit,a=m.rowIndex,d=u(4);p("formGroupName",a),l(2),ie(" ",(e=d.asFormGroup(o).get("accountName"))==null?null:e.value," "),l(2),p("autoNumeric",w(4,ot)),l(2),p("autoNumeric",w(5,ot))}}function Et(t,m){if(t&1&&(i(0,"div",10)(1,"h4",15),r(2),n(),i(3,"div",16)(4,"p-table",17),g(5,Ft,7,0,"ng-template",18)(6,At,7,6,"ng-template",19),n()()()),t&2){let e=m.$implicit,o=m.$index,a=u(3);p("formGroupName",o),l(2),ie(" ",e.get("name").value," "),l(2),p("value",a.getItemsArray(a.asFormGroup(e)).controls)}}function It(t,m){if(t&1&&(i(0,"tr")(1,"td")(2,"p",24),r(3,"Total"),n()(),i(4,"td",25)(5,"p",24),r(6),re(7,"number"),n()(),i(8,"td",25)(9,"p",24),r(10),re(11,"number"),n()()()),t&2){let e=u(3);l(6),y(ae(7,2,e.subtotalDebit)),l(4),y(ae(11,4,e.subtotalCredit))}}function Tt(t,m){if(t&1&&(i(0,"p-panel",8),g(1,yt,4,0,"ng-template",null,2,f),c(3,"p-divider"),i(4,"p-scroll-panel")(5,"div",9),N(6,Et,7,3,"div",10,T),n()(),i(8,"p-table",11),g(9,It,12,6,"ng-template",null,3,f),n()()),t&2){let e=u(2);p("formGroup",e.formGroups),l(6),M(e.formsArray.controls),l(2),p("value",w(2,xt))}}function Nt(t,m){if(t&1&&g(0,Tt,11,3,"p-panel",7),t&2){let e=u();p("ngIf",e.formGroups)}}var at=(()=>{class t{constructor(){this.destroy$=new pe,this.subtotalDebit=0,this.subtotalCredit=0,this.fb=s(V),this.accSetupService=s(b),this.dayjsService=s(Le),this.date=new Date,this.routes=s(xe)}ngOnInit(){this.initializeForm(),this.loadFormData(),this.calculateSubtotalDebit(),this.formGroups.get("forms").valueChanges.pipe(ue(300),se(this.destroy$)).subscribe(()=>{this.calculateSubtotalDebit()})}initializeForm(){this.formGroups=this.fb.group({forms:this.fb.array([]),date:this.fb.control(new Date)})}get formsArray(){return this.formGroups.get("forms")}getItemsArray(e){return e.get("items")}asFormGroup(e){return e}createFormGroup(e){return this.fb.group({id:[e.id],name:[e.name],items:this.createItemsArray(e.items)})}createItemsArray(e){let o=e.map(a=>this.createItemGroup(a));return this.fb.array(o)}createItemGroup(e){return this.fb.group({accountName:[e.accountName],accountCode:[e.accountCode],id:[e.id],journalID:[e.journalID],accountID:[e.accountID],debitAmount:[e.debitAmount],creditAmount:[e.creditAmount],index:[e.index],note:[e.note]})}loadFormData(){this.routes.data.pipe(ce(e=>e.data),Re("response"),D(e=>{for(;this.formsArray.length>0;)this.formsArray.removeAt(0);e.form.filter(a=>a.items&&a.items.length>0).forEach(a=>{this.formsArray.push(this.createFormGroup(a))})})).subscribe({error:e=>console.error("Error loading form data:",e)})}calculateSubtotalDebit(){let e=this.formGroups.controls.forms;this.subtotalDebit=0,this.subtotalCredit=0,e.controls.forEach(o=>{let a=this.getItemsArray(o),d=a.controls.reduce((Z,ee)=>{let te=ee.get("debitAmount").value||0;return Z+te},0),x=a.controls.reduce((Z,ee)=>{let te=ee.get("creditAmount").value||0;return Z+te},0);this.subtotalDebit+=d,this.subtotalCredit+=x})}submitForm(){let e=Object.entries(this.formGroups.getRawValue()).reduce((o,[a,d])=>(a==="date"?o[a]=d instanceof Date?this.dayjsService.format(d):d:a==="forms"?o.form=d:o[a]=d,o),{});console.log("Submitting form data:",e),this.accSetupService.submitOpeningBalanceFormConfiguration(e).subscribe(),console.log("Submitting form data:",e)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-acc-opening-balance-form"]],features:[U([R])],decls:6,vars:1,consts:[["actionButton",""],["content",""],["header",""],["footer",""],["pageTitle","Opening Balance Form",3,"scrollable"],["preventOpenDuplicates",""],["label","Submit",3,"onClick"],[3,"formGroup",4,"ngIf"],[3,"formGroup"],["formArrayName","forms",1,"d-flex","flex-column","row-gap-4"],[3,"formGroupName"],[3,"value"],[1,"d-flex","flex-column","gap-2","mx-2"],[1,"fs-5","m-0"],["formControlName","date"],[1,"fs-4"],["formArrayName","items"],["dataKey","id",3,"value"],["pTemplate","header"],["pTemplate","body"],[1,"fs-3"],[1,"fs-3",2,"width","200px"],["formControlName","debitAmount",1,"fs-3","form-control",3,"autoNumeric"],["formControlName","creditAmount",1,"fs-3","form-control",3,"autoNumeric"],[1,"fw-semibold","fs-4"],[1,"text-end",2,"width","200px"]],template:function(o,a){o&1&&(i(0,"app-main-panel",4),g(1,St,2,0,"ng-template",null,0,f)(3,Nt,1,1,"ng-template",null,1,f),n(),c(5,"p-toast",5)),o&2&&p("scrollable",!0)},dependencies:[I,X,Te,F,Ce,he,Me,Ne,ke,Ve,Q,K,W,G,A,P,E,qe,j,J,$,L,$e,k,B,O,q,Ie,Ke,He],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var lt=t=>({"ng-invalid ng-dirty":t});function Dt(t,m){if(t&1){let e=C();i(0,"p-button",4),h("onClick",function(){v(e);let a=u();return _(a.verifyCredentials())}),r(1,"Verify"),n(),i(2,"p-button",4),h("onClick",function(){v(e);let a=u();return _(a.saveCredentials())}),r(3,"Update"),n()}}function wt(t,m){t&1&&(i(0,"div",12)(1,"h3",13),r(2,"Account"),n(),i(3,"small",14),r(4,"Configure Client ID and Client Secret"),n()())}function Gt(t,m){if(t&1&&(i(0,"div",5)(1,"p-panel"),g(2,wt,5,0,"ng-template",null,2,f),i(4,"div",6)(5,"div",7)(6,"div",8)(7,"label",9),r(8,"Client ID"),n(),c(9,"input",10),n()(),i(10,"div",7)(11,"div",8)(12,"label",9),r(13,"Client Secret"),n(),c(14,"input",11),n()()()()()),t&2){let e=u();l(4),p("formGroup",e.credentialForm),l(5),p("ngClass",oe(3,lt,e.clientIDControl.invalid&&e.clientIDControl.dirty||e.clientIDControl.touched)),l(5),p("ngClass",oe(5,lt,e.clientSecretControl.invalid&&e.clientSecretControl.dirty||e.clientSecretControl.touched))}}var mt=(()=>{class t{constructor(e,o){this.fb=e,this.messageService=o,this.setupService=s(b)}ngOnInit(){this.initForm(),this.setupService.fetchAPICredential().pipe(D(e=>{this.credentialForm.patchValue({clientID:e.clientID||"",clientSecret:e.clientSecret||""})})).subscribe()}initForm(){this.credentialForm=this.fb.group({clientID:["",[le.required]],clientSecret:["",[le.required]]})}get clientIDControl(){return this.credentialForm.get("clientID")}get clientSecretControl(){return this.credentialForm.get("clientSecret")}saveCredentials(){if(this.credentialForm.invalid){this.credentialForm.markAllAsTouched();return}let e=this.credentialForm.getRawValue();console.log("Saving credentials:",e),this.setupService.updateAPICredential(e).subscribe()}verifyCredentials(){if(this.credentialForm.invalid){this.credentialForm.markAllAsTouched();return}let e=this.credentialForm.getRawValue();console.log("Verifying credentials:",e),this.setupService.verifyAPICredential(e).subscribe({next:o=>{console.log("Verify result:",o),this.messageService.add({severity:"success",summary:"Verified",detail:"Credentials are valid!"})},error:o=>{console.error("Verify failed:",o),this.messageService.add({severity:"error",summary:"Invalid",detail:"Client ID or Secret is wrong!"})}})}static{this.\u0275fac=function(o){return new(o||t)(ne(V),ne(R))}}static{this.\u0275cmp=S({type:t,selectors:[["app-api-credential"]],features:[U([R])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","API Credential"],[3,"onClick"],[1,"d-flex","flex-column","row-gap-4"],[1,"row",3,"formGroup"],[1,"col-6"],[1,"d-flex","flex-column"],["for","outlet"],["type","text","pInputText","","formControlName","clientID",3,"ngClass"],["type","text","pInputText","","formControlName","clientSecret",3,"ngClass"],[1,"d-flex","flex-column","px-2"],[1,"mb-0","fw-bold"],[1,"fst-italic","text-muted"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,Dt,4,0,"ng-template",null,0,f)(3,Gt,15,7,"ng-template",null,1,f),n())},dependencies:[F,be,k,G,A,P,B,O,E,H,$,L,I,j,J,We],encapsulation:2})}}return t})();function Pt(t,m){if(t&1){let e=C();i(0,"button",4),h("click",function(){v(e);let a=u();return _(a.onFormatJournal())}),r(1," Format "),n()}}function Bt(t,m){t&1&&(i(0,"div",12)(1,"div",13)(2,"h4",14),r(3,"Journal Configuration"),n(),i(4,"small",15),r(5," Enter your account information to format journal entries "),n()()())}function Ot(t,m){if(t&1){let e=C();i(0,"div",5)(1,"p-panel"),g(2,Bt,6,0,"ng-template",null,2,f),i(4,"div",6)(5,"div",7)(6,"p-floatlabel",8)(7,"input",9),_e("ngModelChange",function(a){v(e);let d=u();return ve(d.subdomain,a)||(d.subdomain=a),_(a)}),n(),i(8,"label",10),r(9,"Subdomain"),n()(),i(10,"small",11),r(11,"Enter your account subdomain (e.g., mycompany.dealpos.net)"),n()()()()()}if(t&2){let e=u();l(7),ge("ngModel",e.subdomain)}}var pt=(()=>{class t{constructor(){this.setupService=s(b),this.subdomain=z(""),this.toastrService=s(Fe)}onFormatJournal(){if(!this.subdomain()){this.toastrService.error("Please enter a subdomain","Error");return}this.setupService.formatJournal(this.subdomain()).subscribe({next:e=>{this.toastrService.success(e.message,"Success")}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-format-jurnal"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Format Journal"],[1,"btn","btn-success","rounded",3,"click"],[1,"d-flex","flex-column","row-gap-4"],[1,"row","mt-6"],[1,"col-12"],["variant","on"],["pInputText","","id","subdomain","autocomplete","off",1,"w-100",3,"ngModelChange","ngModel"],["for","subdomain"],[1,"text-muted","fst-italic",2,"font-size","12px"],[1,"row","ps-2"],[1,"col-12","d-flex","flex-column"],[1,"mb-1","fw-bold"],[1,"fst-italic","text-muted"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,Pt,2,0,"ng-template",null,0,f)(3,Ot,12,1,"ng-template",null,1,f),n())},dependencies:[F,W,G,A,Ee,E,H,I,$,L,Ue,ze],encapsulation:2})}}return t})();var ct=()=>s(b).fetchOpeningBalanceFormConfiguration();var bi=[{path:"",redirectTo:"accounting-integration",pathMatch:"full"},{path:"",children:[{path:"accounting-integration",component:it},{path:"opening-balance-form",component:at,resolve:{data:ct}},{path:"api-crendetial",component:mt},{path:"format-journal",component:pt},{path:"closing-entries",loadComponent:()=>import("./chunk-2LQZ4KWH.js").then(t=>t.ClosingPageComponent)},{path:"closing-entries/create",loadComponent:()=>import("./chunk-HNKJIRE3.js").then(t=>t.ClosingFormComponent)}]}];export{bi as ACCOUNTING_SETUP_ROUTES};
|
|
1
|
+
import{a as Qe,b as Xe,c as Ye,d as Ze,e as et,f as tt}from"./chunk-3VJJTR55.js";import{a as ze,b as Ue,c as qe,d as We}from"./chunk-XAWSZFE3.js";import{a as He,b as Ke}from"./chunk-YYDAQ7AW.js";import{a as $e}from"./chunk-YPBGL37O.js";import{b as Le}from"./chunk-ZJ7X5V7U.js";import{a as Je,b as je}from"./chunk-Q23KXB3T.js";import"./chunk-DHW7UHFT.js";import{a as Be,b as Oe,d as Ve,k as ke}from"./chunk-SVXDMOLP.js";import{a as Ne,b as Me}from"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as Re}from"./chunk-XKCLERWG.js";import{a as K,b as Q}from"./chunk-H57SDRPH.js";import"./chunk-GDX5XEV3.js";import{a as Ge,b as Pe}from"./chunk-DLUALPHU.js";import"./chunk-4DOELXOP.js";import{a as De,b as we}from"./chunk-VVUSFS6O.js";import"./chunk-ZTEDQLOG.js";import"./chunk-EDGADVEY.js";import"./chunk-JTDJJORR.js";import"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{b as X}from"./chunk-4CDAAU6Z.js";import{h as I}from"./chunk-OVHBR6ZK.js";import"./chunk-X22YKT5B.js";import{a as L,b as $}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{n as H,o as E,w as J,x as j}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import{Ha as R,La as Te,b as G,c as le,e as A,f as P,j as Ee,l as B,m as q,n as Ie,o as O,u as V,w as W,x as k}from"./chunk-G5S5AZA7.js";import{b as xe,e as Se,l as ye}from"./chunk-Z45NTTES.js";import{a as Ae}from"./chunk-SJ2FUSMD.js";import{a as Fe}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{h as be,k as Ce,q as he,r as F}from"./chunk-OKCHQM5Q.js";import{Ac as oe,Cb as g,Ga as z,Jc as re,Kb as p,Kc as ae,L as ue,Mc as f,Nb as fe,Qb as T,Sb as N,Tb as M,Ub as i,Vb as n,Wb as c,Y as se,Z as D,_b as C,ba as de,dc as h,ec as u,g as pe,gb as l,ha as s,mb as ne,pa as v,qa as _,qc as r,rc as y,s as ce,sc as ie,vc as ge,wb as S,wc as ve,xc as _e,yc as U,zc as w}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var b=(()=>{class t{#e=s(Ae);fetchLoaderConfiguration(){return this.#e.get("","api/SetupLoader/Load")}updateAccountingIntegrationConfiguration(e){return this.#e.post(void 0,"/api/setup/SubmitConfig",e)}fetchOpeningBalanceFormConfiguration(){return this.#e.get("","/api/setup/OpeningBalance/Form")}submitOpeningBalanceFormConfiguration(e){return this.#e.post("","api/setup/OpeningBalance/Submit",e)}fetchAPICredential(){return this.#e.get(void 0,"/api/AccountConfig")}updateAPICredential(e){return this.#e.put(void 0,"/api/AccountConfig",e)}verifyAPICredential(e){return this.#e.post(void 0,"/api/AccountConfig/Validate",e)}formatJournal(e){return this.#e.post("","/api/setup/formatdata/clearjournal",{domain:e})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=de({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var st=()=>({height:"calc(100vh - 100px)"});function dt(t,m){if(t&1){let e=C();i(0,"div",4)(1,"a",5),r(2,"Cancel"),n(),i(3,"p-button",6),h("click",function(){v(e);let a=u();return _(a.updateAccountingIntegration())}),n()()}}function ft(t,m){if(t&1&&(i(0,"p-tab",8),r(1),n()),t&2){let e=m.$implicit,o=m.$index;p("value",o),l(),y(e)}}function gt(t,m){if(t&1&&(i(0,"div",25),c(1,"p-radiobutton",42),i(2,"label",43),r(3),n()()),t&2){let e=m.$implicit;l(),p("value",e.key)("inputId",e.value),l(),p("for",e.value),l(),y(e.value)}}function vt(t,m){if(t&1&&(i(0,"div",40)(1,"div",25),c(2,"p-radiobutton",44),i(3,"label",43),r(4),n()()()),t&2){let e=m.$implicit;l(2),p("value",e.key)("inputId",e.key.toString()),l(),p("for",e.key),l(),y(e.value)}}function _t(t,m){if(t&1&&(i(0,"div",40)(1,"div",25),c(2,"p-radiobutton",45),i(3,"label",43),r(4),n()()()),t&2){let e=m.$implicit;l(2),p("value",e.key)("inputId",e.value),l(),p("for",e.value),l(),y(e.value)}}function bt(t,m){if(t&1&&(i(0,"p-scrollpanel",null,2)(2,"p-tabs",7)(3,"p-tablist"),N(4,ft,2,2,"p-tab",8,T),n(),i(6,"p-tabpanels")(7,"p-tabpanel",9)(8,"div",10)(9,"h3",11),r(10,"Accounting Numbering"),n(),i(11,"div",12)(12,"div",13)(13,"div",14)(14,"div",13)(15,"div",15)(16,"label",16),r(17,"Digit"),n(),c(18,"p-inputnumber",17),n()(),i(19,"div",13)(20,"div",15)(21,"label",18),r(22,"Seed"),n(),c(23,"p-inputnumber",19),n()(),i(24,"div",13)(25,"div",15)(26,"label",20),r(27,"Last Number"),n(),c(28,"p-inputnumber",21),n()(),i(29,"div",13)(30,"div",15)(31,"label",22),r(32,"Format"),n(),c(33,"p-select",23),n()(),i(34,"div",13)(35,"div",15)(36,"label",22),r(37,"Reset Every"),n(),i(38,"div",24),N(39,gt,4,4,"div",25,T),n()()()()()()()(),i(41,"p-tabpanel",8)(42,"div",26)(43,"div",27)(44,"h3",11),r(45,"Journal Generate"),n(),i(46,"p"),r(47,"Configure generate transaction"),n()(),i(48,"div",12)(49,"div",28)(50,"div",12)(51,"div",29)(52,"div",15)(53,"label",22),r(54,"Outlet Delivery Journal"),n(),c(55,"p-toggleswitch",30),n()(),i(56,"div",31)(57,"div",15)(58,"label",22),r(59,"Payment Discount Journal On Payment"),n(),c(60,"p-toggleswitch",32),n()()()()()(),c(61,"hr"),i(62,"div",26)(63,"div",28)(64,"div",12)(65,"div",33)(66,"label",22),r(67,"Note"),n()(),i(68,"div",29)(69,"div",15)(70,"label",22),r(71,"Note Required On Journal"),n(),c(72,"p-toggleswitch",34),n()(),i(73,"div",29)(74,"div",15)(75,"label",22),r(76,"Trial Balance Footer Visible"),n(),c(77,"p-toggleswitch",35),n()(),c(78,"div",29),n()()()(),i(79,"p-tabpanel",36)(80,"div",10)(81,"h3",11),r(82,"Report"),n(),i(83,"div",12)(84,"div",27)(85,"div",37)(86,"div")(87,"label",38),r(88,"Accounting For Treatment"),n(),i(89,"div",12)(90,"div",39)(91,"div",12),N(92,vt,5,4,"div",40,T),n()()()(),i(94,"div")(95,"label",41),r(96,"Configure Report Access Control in COA"),n(),i(97,"div",12)(98,"div",39)(99,"div",12),N(100,_t,5,4,"div",40,T),n()()()()()()()()()()()()),t&2){let e,o,a,d,x=u();fe(w(8,st)),l(2),p("value",0)("formGroup",x.form),l(2),M(x.tabs()),l(3),p("value",0),l(26),p("options",(e=x.accountingIntegration())==null||e.options==null?null:e.options.monthlyResetPeriodFormat),l(6),M((o=x.accountingIntegration())==null||o.options==null?null:o.options.resetPeriods),l(2),p("value",1),l(38),p("value",2),l(13),M((a=x.accountingIntegration())==null||a.options==null?null:a.options.generatePrepaidJournal),l(8),M((d=x.accountingIntegration())==null||d.options==null?null:d.options.entityAccess)}}var it=(()=>{class t{constructor(){this.accountingSetupService=s(b),this.fb=s(V).nonNullable,this.tabs=z(["Numbering","Journal","Report"]),this.accountingIntegration=z(null)}ngOnInit(){this.initializeForm(),this.loadAccountingConfiguration()}initializeForm(){this.form=this.fb.group({number:this.createNumberGroup(),report:this.createReportGroup(),journalGenerate:this.createJournalGenerateGroup()})}createNumberGroup(){return this.fb.group({seed:this.fb.control(""),digit:this.fb.control(""),resetEvery:this.fb.control(""),monthlyFormat:this.fb.control(""),lastNumber:this.fb.control(""),lastModified:this.fb.control("")})}createReportGroup(){return this.fb.group({accountingAuditType:this.fb.control(""),accountingEntityAccess:this.fb.control(""),generatePrepaidJournal:this.fb.control("")})}createJournalGenerateGroup(){return this.fb.group({eodExpenseJournal:this.fb.control(""),transferOrder:this.fb.control(""),paymentDiscount:this.fb.control(""),noteMandatory:this.fb.control(""),trialBalanceFooterVisible:this.fb.control("")})}loadAccountingConfiguration(){this.accountingSetupService.fetchLoaderConfiguration().pipe(D(e=>{this.accountingIntegration.set(e),this.form.patchValue(e.form)})).subscribe()}updateAccountingIntegration(){let e={form:this.form.getRawValue()};this.accountingSetupService.updateAccountingIntegrationConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-accounting-integration"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["scrollPanelContainer",""],["pageTitle","Accounting Integration"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"click"],[1,"border-top",3,"value","formGroup"],[3,"value"],["formGroupName","number",3,"value"],[1,""],[1,"fs-5"],[1,"row"],[1,"col-6"],[1,"row","row-gap-3"],[1,"d-flex","flex-column"],["for","digit",1,"fs-4"],["inputId","digit","formControlName","digit"],["for","seed",1,"fs-4"],["inputId","seed","formControlName","seed"],["for","lastNumber",1,"fs-4"],["inputId","lastNumber","formControlName","lastNumber"],["for","",1,"fs-4"],["appendTo","body","formControlName","monthlyFormat","optionValue","key","optionLabel","value",3,"options"],[1,"d-flex","gap-4"],[1,"d-flex","align-items-center","gap-2"],["formGroupName","journalGenerate",1,"row"],[1,"col-12"],[1,"col-10"],[1,"col-md-4","mb-3"],["formControlName","transferOrder"],[1,"col-md-6","mb-4"],["formControlName","paymentDiscount"],[1,"col-12","mb-2"],["formControlName","noteMandatory"],["formControlName","trialBalanceFooterVisible"],["formGroupName","report",3,"value"],[1,"d-flex","flex-column","gap-4"],["for","generatePrepaidJournal",1,"fs-4","mb-2"],[1,"col-8"],[1,"col-4"],["for","accountingEntityAccess",1,"fs-4","mb-2"],["name","resetEvery","formControlName","resetEvery",3,"value","inputId"],[1,"m-0",3,"for"],["name","generatePrepaidJournal","formControlName","generatePrepaidJournal",3,"value","inputId"],["name","accountingEntityAccess","formControlName","accountingEntityAccess",3,"value","inputId"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,dt,4,0,"ng-template",null,0,f)(3,bt,102,9,"ng-template",null,1,f),n())},dependencies:[F,tt,et,Ze,Ye,Qe,Xe,I,X,Oe,Be,k,A,P,B,O,q,E,Pe,Ge,je,Je,ye,Se,j,J,we,De,Q,K],styles:["[_nghost-%COMP%]{display:block}.inactive-state[_ngcontent-%COMP%]{background-color:#e5e5e5}.active-state[_ngcontent-%COMP%]{background-color:var(--p-primary-color)}"],changeDetection:0})}}return t})();var xt=()=>[],ot=()=>({});function St(t,m){if(t&1){let e=C();i(0,"div")(1,"p-button",6),h("onClick",function(){v(e);let a=u();return _(a.submitForm())}),n()()}}function yt(t,m){t&1&&(i(0,"div",12)(1,"h3",13),r(2,"Date"),n(),c(3,"p-datePicker",14),n())}function Ft(t,m){t&1&&(i(0,"tr")(1,"th",20),r(2,"Account Name"),n(),i(3,"th",21),r(4,"Debit"),n(),i(5,"th",21),r(6,"Credit"),n()())}function At(t,m){if(t&1&&(i(0,"tr",10)(1,"td",20),r(2),n(),i(3,"td"),c(4,"input",22),n(),i(5,"td"),c(6,"input",23),n()()),t&2){let e,o=m.$implicit,a=m.rowIndex,d=u(4);p("formGroupName",a),l(2),ie(" ",(e=d.asFormGroup(o).get("accountName"))==null?null:e.value," "),l(2),p("autoNumeric",w(4,ot)),l(2),p("autoNumeric",w(5,ot))}}function Et(t,m){if(t&1&&(i(0,"div",10)(1,"h4",15),r(2),n(),i(3,"div",16)(4,"p-table",17),g(5,Ft,7,0,"ng-template",18)(6,At,7,6,"ng-template",19),n()()()),t&2){let e=m.$implicit,o=m.$index,a=u(3);p("formGroupName",o),l(2),ie(" ",e.get("name").value," "),l(2),p("value",a.getItemsArray(a.asFormGroup(e)).controls)}}function It(t,m){if(t&1&&(i(0,"tr")(1,"td")(2,"p",24),r(3,"Total"),n()(),i(4,"td",25)(5,"p",24),r(6),re(7,"number"),n()(),i(8,"td",25)(9,"p",24),r(10),re(11,"number"),n()()()),t&2){let e=u(3);l(6),y(ae(7,2,e.subtotalDebit)),l(4),y(ae(11,4,e.subtotalCredit))}}function Tt(t,m){if(t&1&&(i(0,"p-panel",8),g(1,yt,4,0,"ng-template",null,2,f),c(3,"p-divider"),i(4,"p-scroll-panel")(5,"div",9),N(6,Et,7,3,"div",10,T),n()(),i(8,"p-table",11),g(9,It,12,6,"ng-template",null,3,f),n()()),t&2){let e=u(2);p("formGroup",e.formGroups),l(6),M(e.formsArray.controls),l(2),p("value",w(2,xt))}}function Nt(t,m){if(t&1&&g(0,Tt,11,3,"p-panel",7),t&2){let e=u();p("ngIf",e.formGroups)}}var at=(()=>{class t{constructor(){this.destroy$=new pe,this.subtotalDebit=0,this.subtotalCredit=0,this.fb=s(V),this.accSetupService=s(b),this.dayjsService=s(Le),this.date=new Date,this.routes=s(xe)}ngOnInit(){this.initializeForm(),this.loadFormData(),this.calculateSubtotalDebit(),this.formGroups.get("forms").valueChanges.pipe(ue(300),se(this.destroy$)).subscribe(()=>{this.calculateSubtotalDebit()})}initializeForm(){this.formGroups=this.fb.group({forms:this.fb.array([]),date:this.fb.control(new Date)})}get formsArray(){return this.formGroups.get("forms")}getItemsArray(e){return e.get("items")}asFormGroup(e){return e}createFormGroup(e){return this.fb.group({id:[e.id],name:[e.name],items:this.createItemsArray(e.items)})}createItemsArray(e){let o=e.map(a=>this.createItemGroup(a));return this.fb.array(o)}createItemGroup(e){return this.fb.group({accountName:[e.accountName],accountCode:[e.accountCode],id:[e.id],journalID:[e.journalID],accountID:[e.accountID],debitAmount:[e.debitAmount],creditAmount:[e.creditAmount],index:[e.index],note:[e.note]})}loadFormData(){this.routes.data.pipe(ce(e=>e.data),Re("response"),D(e=>{for(;this.formsArray.length>0;)this.formsArray.removeAt(0);e.form.filter(a=>a.items&&a.items.length>0).forEach(a=>{this.formsArray.push(this.createFormGroup(a))})})).subscribe({error:e=>console.error("Error loading form data:",e)})}calculateSubtotalDebit(){let e=this.formGroups.controls.forms;this.subtotalDebit=0,this.subtotalCredit=0,e.controls.forEach(o=>{let a=this.getItemsArray(o),d=a.controls.reduce((Z,ee)=>{let te=ee.get("debitAmount").value||0;return Z+te},0),x=a.controls.reduce((Z,ee)=>{let te=ee.get("creditAmount").value||0;return Z+te},0);this.subtotalDebit+=d,this.subtotalCredit+=x})}submitForm(){let e=Object.entries(this.formGroups.getRawValue()).reduce((o,[a,d])=>(a==="date"?o[a]=d instanceof Date?this.dayjsService.format(d):d:a==="forms"?o.form=d:o[a]=d,o),{});console.log("Submitting form data:",e),this.accSetupService.submitOpeningBalanceFormConfiguration(e).subscribe(),console.log("Submitting form data:",e)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-acc-opening-balance-form"]],features:[U([R])],decls:6,vars:1,consts:[["actionButton",""],["content",""],["header",""],["footer",""],["pageTitle","Opening Balance Form",3,"scrollable"],["preventOpenDuplicates",""],["label","Submit",3,"onClick"],[3,"formGroup",4,"ngIf"],[3,"formGroup"],["formArrayName","forms",1,"d-flex","flex-column","row-gap-4"],[3,"formGroupName"],[3,"value"],[1,"d-flex","flex-column","gap-2","mx-2"],[1,"fs-5","m-0"],["formControlName","date"],[1,"fs-4"],["formArrayName","items"],["dataKey","id",3,"value"],["pTemplate","header"],["pTemplate","body"],[1,"fs-3"],[1,"fs-3",2,"width","200px"],["formControlName","debitAmount",1,"fs-3","form-control",3,"autoNumeric"],["formControlName","creditAmount",1,"fs-3","form-control",3,"autoNumeric"],[1,"fw-semibold","fs-4"],[1,"text-end",2,"width","200px"]],template:function(o,a){o&1&&(i(0,"app-main-panel",4),g(1,St,2,0,"ng-template",null,0,f)(3,Nt,1,1,"ng-template",null,1,f),n(),c(5,"p-toast",5)),o&2&&p("scrollable",!0)},dependencies:[I,X,Te,F,Ce,he,Me,Ne,ke,Ve,Q,K,W,G,A,P,E,qe,j,J,$,L,$e,k,B,O,q,Ie,Ke,He],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var lt=t=>({"ng-invalid ng-dirty":t});function Dt(t,m){if(t&1){let e=C();i(0,"p-button",4),h("onClick",function(){v(e);let a=u();return _(a.verifyCredentials())}),r(1,"Verify"),n(),i(2,"p-button",4),h("onClick",function(){v(e);let a=u();return _(a.saveCredentials())}),r(3,"Update"),n()}}function wt(t,m){t&1&&(i(0,"div",12)(1,"h3",13),r(2,"Account"),n(),i(3,"small",14),r(4,"Configure Client ID and Client Secret"),n()())}function Gt(t,m){if(t&1&&(i(0,"div",5)(1,"p-panel"),g(2,wt,5,0,"ng-template",null,2,f),i(4,"div",6)(5,"div",7)(6,"div",8)(7,"label",9),r(8,"Client ID"),n(),c(9,"input",10),n()(),i(10,"div",7)(11,"div",8)(12,"label",9),r(13,"Client Secret"),n(),c(14,"input",11),n()()()()()),t&2){let e=u();l(4),p("formGroup",e.credentialForm),l(5),p("ngClass",oe(3,lt,e.clientIDControl.invalid&&e.clientIDControl.dirty||e.clientIDControl.touched)),l(5),p("ngClass",oe(5,lt,e.clientSecretControl.invalid&&e.clientSecretControl.dirty||e.clientSecretControl.touched))}}var mt=(()=>{class t{constructor(e,o){this.fb=e,this.messageService=o,this.setupService=s(b)}ngOnInit(){this.initForm(),this.setupService.fetchAPICredential().pipe(D(e=>{this.credentialForm.patchValue({clientID:e.clientID||"",clientSecret:e.clientSecret||""})})).subscribe()}initForm(){this.credentialForm=this.fb.group({clientID:["",[le.required]],clientSecret:["",[le.required]]})}get clientIDControl(){return this.credentialForm.get("clientID")}get clientSecretControl(){return this.credentialForm.get("clientSecret")}saveCredentials(){if(this.credentialForm.invalid){this.credentialForm.markAllAsTouched();return}let e=this.credentialForm.getRawValue();console.log("Saving credentials:",e),this.setupService.updateAPICredential(e).subscribe()}verifyCredentials(){if(this.credentialForm.invalid){this.credentialForm.markAllAsTouched();return}let e=this.credentialForm.getRawValue();console.log("Verifying credentials:",e),this.setupService.verifyAPICredential(e).subscribe({next:o=>{console.log("Verify result:",o),this.messageService.add({severity:"success",summary:"Verified",detail:"Credentials are valid!"})},error:o=>{console.error("Verify failed:",o),this.messageService.add({severity:"error",summary:"Invalid",detail:"Client ID or Secret is wrong!"})}})}static{this.\u0275fac=function(o){return new(o||t)(ne(V),ne(R))}}static{this.\u0275cmp=S({type:t,selectors:[["app-api-credential"]],features:[U([R])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","API Credential"],[3,"onClick"],[1,"d-flex","flex-column","row-gap-4"],[1,"row",3,"formGroup"],[1,"col-6"],[1,"d-flex","flex-column"],["for","outlet"],["type","text","pInputText","","formControlName","clientID",3,"ngClass"],["type","text","pInputText","","formControlName","clientSecret",3,"ngClass"],[1,"d-flex","flex-column","px-2"],[1,"mb-0","fw-bold"],[1,"fst-italic","text-muted"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,Dt,4,0,"ng-template",null,0,f)(3,Gt,15,7,"ng-template",null,1,f),n())},dependencies:[F,be,k,G,A,P,B,O,E,H,$,L,I,j,J,We],encapsulation:2})}}return t})();function Pt(t,m){if(t&1){let e=C();i(0,"button",4),h("click",function(){v(e);let a=u();return _(a.onFormatJournal())}),r(1," Format "),n()}}function Bt(t,m){t&1&&(i(0,"div",12)(1,"div",13)(2,"h4",14),r(3,"Journal Configuration"),n(),i(4,"small",15),r(5," Enter your account information to format journal entries "),n()()())}function Ot(t,m){if(t&1){let e=C();i(0,"div",5)(1,"p-panel"),g(2,Bt,6,0,"ng-template",null,2,f),i(4,"div",6)(5,"div",7)(6,"p-floatlabel",8)(7,"input",9),_e("ngModelChange",function(a){v(e);let d=u();return ve(d.subdomain,a)||(d.subdomain=a),_(a)}),n(),i(8,"label",10),r(9,"Subdomain"),n()(),i(10,"small",11),r(11,"Enter your account subdomain (e.g., mycompany.dealpos.net)"),n()()()()()}if(t&2){let e=u();l(7),ge("ngModel",e.subdomain)}}var pt=(()=>{class t{constructor(){this.setupService=s(b),this.subdomain=z(""),this.toastrService=s(Fe)}onFormatJournal(){if(!this.subdomain()){this.toastrService.error("Please enter a subdomain","Error");return}this.setupService.formatJournal(this.subdomain()).subscribe({next:e=>{this.toastrService.success(e.message,"Success")}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-format-jurnal"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Format Journal"],[1,"btn","btn-success","rounded",3,"click"],[1,"d-flex","flex-column","row-gap-4"],[1,"row","mt-6"],[1,"col-12"],["variant","on"],["pInputText","","id","subdomain","autocomplete","off",1,"w-100",3,"ngModelChange","ngModel"],["for","subdomain"],[1,"text-muted","fst-italic",2,"font-size","12px"],[1,"row","ps-2"],[1,"col-12","d-flex","flex-column"],[1,"mb-1","fw-bold"],[1,"fst-italic","text-muted"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,Pt,2,0,"ng-template",null,0,f)(3,Ot,12,1,"ng-template",null,1,f),n())},dependencies:[F,W,G,A,Ee,E,H,I,$,L,Ue,ze],encapsulation:2})}}return t})();var ct=()=>s(b).fetchOpeningBalanceFormConfiguration();var bi=[{path:"",redirectTo:"accounting-integration",pathMatch:"full"},{path:"",children:[{path:"accounting-integration",component:it},{path:"opening-balance-form",component:at,resolve:{data:ct}},{path:"api-crendetial",component:mt},{path:"format-journal",component:pt},{path:"closing-entries",loadComponent:()=>import("./chunk-I3NMOMCW.js").then(t=>t.ClosingPageComponent)},{path:"closing-entries/create",loadComponent:()=>import("./chunk-7BTYXICA.js").then(t=>t.ClosingFormComponent)}]}];export{bi as ACCOUNTING_SETUP_ROUTES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as x,b as L}from"./chunk-
|
|
1
|
+
import{a as x,b as L}from"./chunk-X74L3UX6.js";import"./chunk-ZJ7X5V7U.js";import{a as E,b as O}from"./chunk-H57SDRPH.js";import"./chunk-4CDAAU6Z.js";import{h as H}from"./chunk-OVHBR6ZK.js";import{b as N,c as G}from"./chunk-X22YKT5B.js";import{a as R,b as D}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as V,x as j}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import"./chunk-G5S5AZA7.js";import"./chunk-SJ2FUSMD.js";import{a as I}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{n as A,r as F}from"./chunk-OKCHQM5Q.js";import{Cb as P,Jc as l,Kb as p,Kc as m,Mc as _,Nb as d,Ub as o,V as T,Vb as n,Wb as c,X as M,Z as S,_b as w,dc as y,ec as s,gb as a,h as v,ha as u,pa as f,qa as C,ra as b,s as g,sa as k,wb as B,yc as $,zc as h}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=w();o(0,"div",3)(1,"p-button",4),y("onClick",function(){f(e);let r=s();return C(r.onFormatCOACategory())}),n(),o(2,"p-button",5),l(3,"async"),l(4,"async"),y("onClick",function(){f(e);let r=s();return C(r.onMigrateCoaCategory())}),n()()}if(i&2){let e=s();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),c(3,"app-migration-cards",7),l(4,"async"),b(),o(5,"svg",8),c(6,"path",9),n(),k(),c(7,"app-migration-cards",10),l(8,"async"),n()()()),i&2){let e=s();d(h(12,q)),a(),d(h(13,q)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var ge=(()=>{class i{constructor(){this.migrateService=u(x),this.toastr=u(I),this.refresh$=new v(void 0),this.pageTitle="Chart of Account Category"}ngOnInit(){let e=this.refresh$.pipe(M(()=>this.migrateService.getCOACategoryCount()),S(t=>console.log("API response:",t)),T(1));this.countInPOS$=e.pipe(g(t=>Number(t.pos))),this.countInBooks$=e.pipe(g(t=>Number(t.books)))}onMigrateCoaCategory(){this.migrateService.migrateCoaCategory().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormatCOACategory(){confirm("Are you sure you want to format?")&&this.migrateService.formatManualCOACategory().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-coa-configuration"]],features:[$([x])],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&&(o(0,"app-main-panel",2),P(1,J,5,6,"ng-template",null,0,_)(3,K,9,14,"ng-template",null,1,_),n()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[H,F,A,j,V,O,E,D,R,G,N,L],encapsulation:2})}}return i})();export{ge as CoaCategoryComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as un}from"./chunk-
|
|
1
|
+
import{a as un}from"./chunk-5YNFFJYR.js";import{a as qn}from"./chunk-BTDW4G2F.js";import{a as Xn}from"./chunk-BY6QUHQI.js";import"./chunk-C2GO6SPF.js";import{a as Fn}from"./chunk-LWLJZPBI.js";import{a as $n}from"./chunk-3NU3P6NL.js";import{b as Wn}from"./chunk-DLUALPHU.js";import"./chunk-4DOELXOP.js";import{a as Vn}from"./chunk-ZTEDQLOG.js";import{a as Dn}from"./chunk-EDGADVEY.js";import"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{b as jn}from"./chunk-4CDAAU6Z.js";import{b as Yn,c as Ti}from"./chunk-X22YKT5B.js";import{b as Gn}from"./chunk-JYCUE5HV.js";import{c as Mn}from"./chunk-FUZFAJGJ.js";import{a as et,c as An,f as ai,o as Bn,p as Rn,t as Hn,u as Si,w as Nn,x as oi}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import{Da as si,G as Sn,Ia as Ln,J as Tn,Ja as kn,K as Pn,Ka as zn,La as ri,Ma as ge,P as Ie,Q as _t,R as Nt,S as En,Ua as Je,b as mn,e as fn,f as gn,h as hn,ia as On,j as vn,k as wn,ma as In,p as bn,q as yn,r as _n,s as Cn,w as ni,x as xn}from"./chunk-G5S5AZA7.js";import{b as rn,d as an,e as on,f as ln,l as Ht}from"./chunk-Z45NTTES.js";import{a as cn,c as Mi}from"./chunk-SJ2FUSMD.js";import{a as pn}from"./chunk-BLQJXMNV.js";import{c as dn,d as _i,f as Ci,h as xi}from"./chunk-F2X3VGZZ.js";import{G as sn,h as ct,j as ii,k as Ft,l as Bt,m as Rt,n as tn,r as we,s as Oe,y as nn}from"./chunk-OKCHQM5Q.js";import{Aa as Wi,Ab as Ke,Ac as pe,Bc as Be,Ca as qi,Cb as X,Cc as ti,Da as xe,Ea as wt,Ga as Ee,Jb as Z,Jc as Dt,Ka as Ui,Kb as $,Kc as $t,Mb as Ki,Mc as dt,Nb as Qt,Ob as ye,Pb as Kt,Qb as Zt,Sb as Jt,Tb as ei,Ub as G,V as Xi,Vb as N,Vc as pt,Wb as te,Wc as Vt,Xb as at,Yb as ot,Yc as en,Zb as Me,_b as ve,aa as Yi,ba as Ye,bb as bi,ca as je,cb as qe,dc as ie,ec as H,fc as bt,gb as R,gc as lt,ha as ae,jc as fe,kc as yt,lc as ne,mb as Ue,mc as se,oa as ji,pa as U,pc as Lt,qa as Q,qc as le,rb as Ut,rc as Fe,s as wi,sc as yi,t as Gi,ta as Ae,tc as Zi,vc as kt,wb as he,wc as zt,xb as Qe,xc as At,yc as Ze,za as We,zb as Qi,zc as Ji}from"./chunk-JP6RBSB3.js";import{a as me,b as It}from"./chunk-YQFG5XE2.js";var sr=["*"],rr=({dt:i})=>`
|
|
2
2
|
.p-inputgroup,
|
|
3
3
|
.p-inputgroup .p-floatlabel,
|
|
4
4
|
.p-inputgroup .p-iftalabel {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C,b as L}from"./chunk-
|
|
1
|
+
import{a as C,b as L}from"./chunk-X74L3UX6.js";import"./chunk-ZJ7X5V7U.js";import{a as E,b as V}from"./chunk-H57SDRPH.js";import"./chunk-4CDAAU6Z.js";import{h as H}from"./chunk-OVHBR6ZK.js";import{b as N,c as G}from"./chunk-X22YKT5B.js";import{a as R,b as D}from"./chunk-JYCUE5HV.js";import"./chunk-JMEBBWX4.js";import"./chunk-FUZFAJGJ.js";import{w as j,x as O}from"./chunk-5FSMHZSY.js";import"./chunk-A5HAJEPC.js";import"./chunk-G5S5AZA7.js";import"./chunk-SJ2FUSMD.js";import{a as I}from"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import{n as $,r as F}from"./chunk-OKCHQM5Q.js";import{Cb as A,Jc as c,Kb as p,Kc as l,Mc as T,Nb as x,Ub as n,V as y,Vb as o,Wb as m,X as M,Z as S,_b as P,dc as h,ec as s,gb as a,h as v,ha as f,pa as g,qa as d,ra as b,s as u,sa as k,wb as B,yc as w,zc as _}from"./chunk-JP6RBSB3.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};
|