dealposbooks 5.37.1 → 5.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +26 -26
- package/chunk-2AMMZHXQ.js +1 -0
- package/{chunk-5BTX6G5Y.js → chunk-2TOKALFG.js} +1 -1
- package/{chunk-TXD7DO47.js → chunk-5ZZHL43J.js} +1 -1
- package/{chunk-NKXIC6W4.js → chunk-64BNX23H.js} +1 -1
- package/{chunk-RDLPFQ2D.js → chunk-6OQBIS63.js} +1 -1
- package/{chunk-P42D576F.js → chunk-6WODKZWN.js} +1 -1
- package/{chunk-KHMIHCAB.js → chunk-76AI32N3.js} +1 -1
- package/chunk-7U7SHAIK.js +160 -0
- package/{chunk-KGGIWN5W.js → chunk-7VGK2GTV.js} +1 -1
- package/{chunk-JDZMCMCO.js → chunk-A256BFGM.js} +1 -1
- package/{chunk-4BMO6GHT.js → chunk-BPNHJZKZ.js} +1 -1
- package/{chunk-2DAPTQ7N.js → chunk-C4C5DIN2.js} +1 -1
- package/{chunk-U2OTWITI.js → chunk-CTKWFS7F.js} +1 -1
- package/{chunk-UHUGKP5L.js → chunk-DKXXL4X2.js} +1 -1
- package/{chunk-CVOI5T6R.js → chunk-E34SEVZS.js} +1 -1
- package/chunk-ECNRIDLC.js +1 -0
- package/{chunk-KEGWYPJ2.js → chunk-ENOCDIVK.js} +2 -2
- package/{chunk-MNQQQQRE.js → chunk-ENZMSDHX.js} +5 -5
- package/chunk-HMSYKSI6.js +7 -0
- package/{chunk-67P7OKVV.js → chunk-I4WD74I3.js} +1 -1
- package/{chunk-RV7TVDYN.js → chunk-I5YQOGRZ.js} +1 -1
- package/{chunk-QZRK5J6G.js → chunk-IGWW72HN.js} +1 -1
- package/chunk-IQRU2J36.js +1 -0
- package/{chunk-QNSTXREL.js → chunk-ISQYSQRX.js} +1 -1
- package/{chunk-WOKDHWWC.js → chunk-IXOM3GPT.js} +2 -2
- package/{chunk-DKYLWJXD.js → chunk-JYELXDHY.js} +1 -1
- package/{chunk-T6TUPYUS.js → chunk-KEMY45CH.js} +1 -1
- package/{chunk-DFBPVWWJ.js → chunk-MS6ARTHK.js} +2 -2
- package/{chunk-BIB37SKB.js → chunk-MWMAH2KO.js} +1 -1
- package/{chunk-WCM7PDH3.js → chunk-NTTAMN4Q.js} +1 -1
- package/{chunk-3EHLCVDF.js → chunk-NU6SYZAJ.js} +1 -1
- package/{chunk-NMPX3YVB.js → chunk-OPTFBHGE.js} +1 -1
- package/{chunk-YHRJY65N.js → chunk-OXAHPW2L.js} +1 -1
- package/{chunk-CGQEEDRE.js → chunk-PQSFZ3JI.js} +1 -1
- package/{chunk-TIL4F3YR.js → chunk-PWPKBPEC.js} +1 -1
- package/{chunk-HSG33HWO.js → chunk-RWTIBNIV.js} +2 -2
- package/{chunk-43IWPYHH.js → chunk-SUBNNB3F.js} +1 -1
- package/{chunk-CUWNYABC.js → chunk-TAJINBQY.js} +1 -1
- package/{chunk-HDKEYJ4D.js → chunk-TWSGVX4G.js} +1 -1
- package/{chunk-A7DO5VFX.js → chunk-TYG6AINI.js} +1 -1
- package/{chunk-VKPPDDEW.js → chunk-W7Q3NWBG.js} +1 -1
- package/chunk-WPMY4QOF.js +1 -0
- package/{chunk-ZUBMF5VC.js → chunk-WZXOEZ5J.js} +1 -1
- package/{chunk-LQCMUDVC.js → chunk-XAGCP2AA.js} +1 -1
- package/{chunk-FT65M3TM.js → chunk-YO2YHPV5.js} +1 -1
- package/{chunk-GACHEN2E.js → chunk-YS5U5SXP.js} +1 -1
- package/{chunk-URTRLKMJ.js → chunk-ZA6OJTWT.js} +1 -1
- package/{chunk-BVS6QVV7.js → chunk-ZBVMLQ5Q.js} +1 -1
- package/{chunk-L4U6CZR3.js → chunk-ZGVGNFVA.js} +1 -1
- package/{chunk-ILRZCFZP.js → chunk-ZUBQV3YF.js} +1 -1
- package/index.html +2 -2
- package/{main-Y4CHDO3C.js → main-KU6QKT2F.js} +1 -1
- package/package.json +1 -1
- package/chunk-AIX2GOSV.js +0 -1
- package/chunk-IYMRJK4T.js +0 -1
- package/chunk-L3VFI54W.js +0 -7
- package/chunk-Q2VDXWZJ.js +0 -1
- package/chunk-TTNZ3IGM.js +0 -1
- package/chunk-XAIS3MEH.js +0 -160
package/3rdpartylicenses.txt
CHANGED
|
@@ -179,32 +179,6 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
179
179
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
180
180
|
OTHER DEALINGS IN THE SOFTWARE.
|
|
181
181
|
|
|
182
|
-
--------------------------------------------------------------------------------
|
|
183
|
-
Package: dayjs
|
|
184
|
-
License: "MIT"
|
|
185
|
-
|
|
186
|
-
MIT License
|
|
187
|
-
|
|
188
|
-
Copyright (c) 2018-present, iamkun
|
|
189
|
-
|
|
190
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
191
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
192
|
-
in the Software without restriction, including without limitation the rights
|
|
193
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
194
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
195
|
-
furnished to do so, subject to the following conditions:
|
|
196
|
-
|
|
197
|
-
The above copyright notice and this permission notice shall be included in all
|
|
198
|
-
copies or substantial portions of the Software.
|
|
199
|
-
|
|
200
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
201
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
202
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
203
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
204
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
205
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
206
|
-
SOFTWARE.
|
|
207
|
-
|
|
208
182
|
--------------------------------------------------------------------------------
|
|
209
183
|
Package: @angular/platform-browser
|
|
210
184
|
License: "MIT"
|
|
@@ -415,6 +389,32 @@ Package: ngx-scrollbar
|
|
|
415
389
|
License: "MIT"
|
|
416
390
|
|
|
417
391
|
|
|
392
|
+
--------------------------------------------------------------------------------
|
|
393
|
+
Package: dayjs
|
|
394
|
+
License: "MIT"
|
|
395
|
+
|
|
396
|
+
MIT License
|
|
397
|
+
|
|
398
|
+
Copyright (c) 2018-present, iamkun
|
|
399
|
+
|
|
400
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
401
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
402
|
+
in the Software without restriction, including without limitation the rights
|
|
403
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
404
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
405
|
+
furnished to do so, subject to the following conditions:
|
|
406
|
+
|
|
407
|
+
The above copyright notice and this permission notice shall be included in all
|
|
408
|
+
copies or substantial portions of the Software.
|
|
409
|
+
|
|
410
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
411
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
412
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
413
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
414
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
415
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
416
|
+
SOFTWARE.
|
|
417
|
+
|
|
418
418
|
--------------------------------------------------------------------------------
|
|
419
419
|
Package: papaparse
|
|
420
420
|
License: "MIT"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ke,b as Me}from"./chunk-C4C5DIN2.js";import{a as ve,b as be,c as xe,d as Ce,e as ye,f as Fe}from"./chunk-5AD3KAHO.js";import"./chunk-DUEYD2IO.js";import{a as ge,b as he}from"./chunk-V6VS3FMZ.js";import{a as _e}from"./chunk-XKI7WLHE.js";import{a as ce}from"./chunk-YS5U5SXP.js";import"./chunk-KKZF4RQM.js";import"./chunk-MASZROSE.js";import{a as I}from"./chunk-7CUSFSFC.js";import"./chunk-NTCCFR6P.js";import{a as re,b as ie}from"./chunk-5B3BG43K.js";import"./chunk-EALZUKSJ.js";import{h as fe}from"./chunk-MS6ARTHK.js";import{b as de,c as ue}from"./chunk-WNA57NZF.js";import{a as se,b as me}from"./chunk-MUFRLGLG.js";import"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import{n as ne,o as ae,w as le,x as pe}from"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import{b as H,c as J,e as K,f as Q,k as W,l as X,m as Y,n as Z,o as ee,u as te,x as oe}from"./chunk-NHXCR55X.js";import{b as U,d as L}from"./chunk-DOKG43W6.js";import"./chunk-I5YQOGRZ.js";import"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import{h as $,j,k as q,s as z}from"./chunk-VU532YE3.js";import{Ab as O,Cb as f,Cc as v,Dc as b,Ga as D,Kb as a,Nb as _,Ob as y,Qb as F,Qc as T,Sb as k,Tb as M,Ub as i,Uc as B,Vb as n,Wb as g,X as G,Z as C,_b as w,dc as R,ec as d,gb as r,ha as c,pa as E,qa as N,qc as h,rc as S,sc as V,ta as A,wb as P}from"./chunk-7IC4BZ6J.js";import"./chunk-YQFG5XE2.js";var Ge=()=>({height:"calc(100vh - 70px)"}),Ee=t=>({"ng-invalid ng-dirty":t}),Se=t=>({"ps-0":t}),Te=()=>({display:"flex"});function Ne(t,l){if(t&1){let e=w();i(0,"p-button",4),R("onClick",function(){E(e);let p=d(2);return N(p.onSubmit())}),n()}}function Ae(t,l){if(t&1&&f(0,Ne,1,0,"p-button",3),t&2){let e=d();a("ngIf",e.roleService.user.edit)}}function De(t,l){if(t&1&&(i(0,"div")(1,"span",16),h(2),n()()),t&2){let e=l.$implicit;r(2),S(e)}}function Pe(t,l){if(t&1&&(i(0,"div"),f(1,De,3,1,"div",15),n()),t&2){let e=d(2);r(),a("ngForOf",e.getErrors("name"))}}function Oe(t,l){if(t&1&&(i(0,"div",25)(1,"div",26),g(2,"p-checkbox",27),i(3,"p",28),h(4),n()()()),t&2){let e=l.$implicit,o=l.$index;a("formGroupName",o)("pTooltip",e.get("description").value),r(2),_(v(6,Te)),a("binary",!0),r(2),V(" ",e.get("name").value," ")}}function we(t,l){if(t&1&&(i(0,"div",18)(1,"div",19)(2,"div",20)(3,"span",21),h(4),n()(),g(5,"p-checkbox",22),n(),i(6,"div",23)(7,"div",24),k(8,Oe,5,7,"div",25,F),n()()()),t&2){let e=l.$implicit,o=l.$index,p=d(3);a("formGroupName",o),r(4),S(e.get("groupName").value),r(),_(v(5,Te)),a("binary",!0),r(3),M(p.getRolesArray(o).controls)}}function Re(t,l){if(t&1&&(i(0,"div",17),k(1,we,10,6,"div",18,F),n()),t&2){let e=d(2);r(),M(e.rolesFormArray.controls)}}function Ve(t,l){if(t&1&&(i(0,"p-panel")(1,"div",5),g(2,"app-user-tabs"),i(3,"form",6),g(4,"input",7),f(5,Pe,2,1,"div",8),n(),i(6,"p-tabs",9)(7,"p-tablist")(8,"p-tab",9),h(9,"Permission"),n(),i(10,"p-tab",10),h(11,"Description"),n()(),i(12,"p-tabpanels",11)(13,"p-tabpanel",9)(14,"form",6),f(15,Re,3,0,"div",12),n()(),i(16,"p-tabpanel",10)(17,"div",13),g(18,"textarea",14),n()()()()()()),t&2){let e=d();_(v(13,Ge)),r(3),a("formGroup",e.form),r(),a("fluid",!0)("ngClass",b(14,Ee,e.isInvalid("name"))),r(),a("ngIf",e.isInvalid("name")),r(3),y(b(16,Se,e.router.url.includes("forms"))),r(2),y(b(18,Se,e.router.url.includes("forms"))),r(4),a("formGroup",e.form),r(),a("ngIf",e.rolesFormArray.length>0),r(2),a("formGroup",e.form)}}var gt=(()=>{class t extends _e{constructor(){super(...arguments),this.service=c(ke),this.fb=c(te),this.cdr=c(B),this.route=c(U),this.router=c(L),this.roleService=c(ce),this.form=this.fb.group({groupID:this.fb.control(""),name:this.fb.control("",[J.required]),description:this.fb.control(""),roles:this.fb.array([])}),this.groupFormMeta=D(null)}ngOnInit(){this.route.queryParamMap.pipe(G(e=>this.service.getGroupFormMeta(e.get("groupID")).pipe(I("Group form meta loaded"),C(o=>{this.groupFormMeta.set(o),this.populateForm(o)})))).subscribe()}populateForm(e){this.form.patchValue({groupID:e.form.groupID,name:e.form.name,description:e.form.description});let o=this.rolesFormArray;o.clear(),e.options.roles.forEach(p=>{let m=this.fb.array(p.roles.map(s=>this.fb.group({id:this.fb.control(s.id),name:this.fb.control(s.name),checked:this.fb.control({value:e.form.rolesID.includes(s.id),disabled:!this.roleService.user.edit}),description:this.fb.control(s.description||"")}))),u=this.fb.group({groupName:this.fb.control(p.name),groupChecked:this.fb.control(!1),roles:m}),Ie=m.controls.every(s=>s.get("checked").value);u.get("groupChecked").setValue(Ie,{emitEvent:!1}),this.roleService.user.edit?u.get("groupChecked").enable():u.get("groupChecked").disable(),u.get("groupChecked").valueChanges.subscribe(s=>{m.controls.forEach(x=>{x.get("checked").setValue(s,{emitEvent:!1})})}),m.valueChanges.subscribe(()=>{let s=m.controls.every(x=>x.get("checked").value);u.get("groupChecked").setValue(s,{emitEvent:!1})}),o.push(u)}),this.cdr.detectChanges()}get rolesFormArray(){return this.form.get("roles")}getRolesArray(e){return this.rolesFormArray.at(e).get("roles")}getSelectedRoleIDs(){let e=[];return this.rolesFormArray.controls.forEach(o=>{o.get("roles").controls.forEach(m=>{m.get("checked").value&&e.push(m.get("id").value)})}),e}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let e={groupID:this.form.get("groupID").value,name:this.form.get("name").value,rolesID:this.getSelectedRoleIDs(),description:this.form.controls.description.value};this.service.assignGroupRole(e).pipe(I("Group roles assigned successfully"),C(()=>{this.router.navigate(["/pages/users/groups"])})).subscribe(),console.log(e)}static{this.\u0275fac=(()=>{let e;return function(p){return(e||(e=A(t)))(p||t)}})()}static{this.\u0275cmp=P({type:t,selectors:[["app-group-form"]],features:[O],decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Group Form",3,"overflowScroll"],["label","Submit",3,"onClick",4,"ngIf"],["label","Submit",3,"onClick"],[1,"d-flex","flex-column","gap-3","py-2"],[1,"d-flex","flex-column","gap-2",3,"formGroup"],["type","text","pInputText","","formControlName","name","placeholder","Group Name",3,"fluid","ngClass"],[4,"ngIf"],["value","0"],["value","1"],[2,"padding-left","0"],["formArrayName","roles","class","container-fluid d-flex flex-column row-gap-3",4,"ngIf"],[3,"formGroup"],["formControlName","description","fluid","","rows","5","cols","30","pTextarea",""],[4,"ngFor","ngForOf"],[1,"text-danger"],["formArrayName","roles",1,"container-fluid","d-flex","flex-column","row-gap-3"],[1,"row","align-items-stretch",3,"formGroupName"],[1,"col-2","py-2","border-top","border-bottom","border-start","d-flex","justify-content-between",2,"background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100"],[1,"text-dark","fw-semibold","fs-2"],["size","small","formControlName","groupChecked",3,"binary"],[1,"col","p-0"],["formArrayName","roles",1,"roles-grid","h-100"],["tooltipPosition","top",1,"role-cell",3,"formGroupName","pTooltip"],[1,"py-2","d-flex","h-100","align-items-center","gap-2","px-2"],["size","small","formControlName","checked",3,"binary"],[1,"fs-2","text-dark","m-0"]],template:function(o,p){o&1&&(i(0,"app-main-panel",2),f(1,Ae,1,1,"ng-template",null,0,T)(3,Ve,19,20,"ng-template",null,1,T),n()),o&2&&a("overflowScroll",!0)},dependencies:[fe,ie,re,oe,W,H,K,Q,X,ee,Y,Z,z,$,j,q,ae,ne,Fe,ye,Ce,xe,ve,be,he,ge,pe,le,Me,me,se,ue,de],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .p-checkbox{display:flex!important}[_nghost-%COMP%] .p-tabs .p-tab{padding-left:0!important}[_nghost-%COMP%] .p-panel .p-panel-header{display:none!important}.roles-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr)}.role-cell[_ngcontent-%COMP%]{border:1px solid #ddd;border-top:none;border-left:none;background:#fff}.roles-grid[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:nth-child(-n+4){border-top:1px solid #ddd}.roles-grid[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:nth-child(4n+1){border-left:1px solid #ddd}"],changeDetection:0})}}return t})();export{gt as GroupFormComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I,b as k,c as F,d as j,e as R,f as O}from"./chunk-5AD3KAHO.js";import"./chunk-MASZROSE.js";import{a as E}from"./chunk-7CUSFSFC.js";import"./chunk-NTCCFR6P.js";import{b as T}from"./chunk-5B3BG43K.js";import"./chunk-EALZUKSJ.js";import{h as w}from"./chunk-
|
|
1
|
+
import{a as I,b as k,c as F,d as j,e as R,f as O}from"./chunk-5AD3KAHO.js";import"./chunk-MASZROSE.js";import{a as E}from"./chunk-7CUSFSFC.js";import"./chunk-NTCCFR6P.js";import{b as T}from"./chunk-5B3BG43K.js";import"./chunk-EALZUKSJ.js";import{h as w}from"./chunk-MS6ARTHK.js";import"./chunk-WNA57NZF.js";import{a as S}from"./chunk-MUFRLGLG.js";import"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import"./chunk-NHXCR55X.js";import{a as P}from"./chunk-I5YQOGRZ.js";import"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import{s as M}from"./chunk-VU532YE3.js";import{Cb as h,Cc as _,Ga as u,Nb as v,Qb as m,Qc as C,Sb as c,Tb as s,Ub as o,Vb as r,Z as f,ba as d,ec as g,gb as n,ha as l,qc as p,rc as x,sc as y,wb as b}from"./chunk-7IC4BZ6J.js";import"./chunk-YQFG5XE2.js";var D=(()=>{class e{constructor(){this.httpService=l(P)}getUserProfile(){return this.httpService.get(void 0,"api/MyProfile")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var A=()=>({height:"calc(100vh - 70px)"});function B(e,a){if(e&1&&(o(0,"div",10)(1,"div",11)(2,"p",12),p(3),r()()()),e&2){let t=a.$implicit;n(3),y(" ",t.roleName," ")}}function L(e,a){if(e&1&&(o(0,"div",4)(1,"div",5)(2,"div",6)(3,"span",7),p(4),r()()(),o(5,"div",8)(6,"div",9),c(7,B,4,1,"div",10,m),r()()()),e&2){let t=a.$implicit;n(4),x(t.roleGroupName),n(3),s(t.listRole)}}function $(e,a){if(e&1&&(o(0,"p-panel")(1,"p-tabs",2)(2,"p-tablist")(3,"p-tab",2),p(4,"Roles"),r()(),o(5,"p-tabpanels")(6,"p-tabpanel",2)(7,"div",3),c(8,L,9,1,"div",4,m),r()()()()()),e&2){let t,i=g();v(_(2,A)),n(8),s((t=i.roles())==null?null:t.Roles)}}var N=(()=>{class e{constructor(){this.profileService=l(D),this.roles=u(null)}ngOnInit(){this.profileService.getUserProfile().pipe(E("response"),f(t=>this.roles.set(t))).subscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=b({type:e,selectors:[["app-my-profile"]],decls:3,vars:0,consts:[["content",""],["pageTitle","My Profile"],["value","0"],["formArrayName","roles",1,"container-fluid","d-flex","flex-column","row-gap-3"],[1,"row"],[1,"col-2","border","d-flex","align-items-center","justify-content-between",2,"height","50px","background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100"],[1,"text-dark","fw-semibold","fs-2"],[1,"col"],["formArrayName","roles",1,"row","h-100"],[1,"col-3","border-top","border-bottom","border-end","p-0","bg-white"],[1,"d-flex","h-100","align-items-center","gap-2","px-2"],[1,"fs-2","text-dark","m-0"]],template:function(i,G){i&1&&(o(0,"app-main-panel",1),h(1,$,10,3,"ng-template",null,0,C),r())},dependencies:[w,S,O,R,j,F,I,k,M,T],styles:["[_nghost-%COMP%]{display:block} .p-tabs .p-tab{padding-top:0!important}"],changeDetection:0})}}return e})();var le=[{path:"",redirectTo:"my-profile",pathMatch:"full"},{path:"",children:[{path:"my-profile",component:N}]}];export{le as PROFILE_ROUTES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v,b as H}from"./chunk-
|
|
1
|
+
import{a as v,b as H}from"./chunk-NU6SYZAJ.js";import"./chunk-W7Q3NWBG.js";import{a as F,b as I}from"./chunk-CDXFHUDN.js";import"./chunk-PS4MFIBX.js";import{h as G}from"./chunk-MS6ARTHK.js";import{b as D,c as N}from"./chunk-WNA57NZF.js";import{a as O,b as R}from"./chunk-MUFRLGLG.js";import"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import{w as V,x as j}from"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import"./chunk-NHXCR55X.js";import"./chunk-I5YQOGRZ.js";import{a as $}from"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import{n as A,s as P}from"./chunk-VU532YE3.js";import{Bc as B,Cb as E,Cc as _,Kb as p,Mc as c,Nb as x,Nc as m,Qc as C,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}from"./chunk-7IC4BZ6J.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-YQFG5XE2.js";var t=[{path:"",redirectTo:"users",pathMatch:"full"},{path:"",children:[{path:"users",loadComponent:()=>import("./chunk-
|
|
1
|
+
import"./chunk-YQFG5XE2.js";var t=[{path:"",redirectTo:"users",pathMatch:"full"},{path:"",children:[{path:"users",loadComponent:()=>import("./chunk-OPTFBHGE.js").then(o=>o.UserPageComponent)},{path:"groups",loadComponent:()=>import("./chunk-XAGCP2AA.js").then(o=>o.GroupPageComponent)},{path:"groups/forms",loadComponent:()=>import("./chunk-2AMMZHXQ.js").then(o=>o.GroupFormComponent)}]}];export{t as USERS_ROUTES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-YO2YHPV5.js";import"./chunk-KKZF4RQM.js";import{d as e}from"./chunk-DOKG43W6.js";import"./chunk-I5YQOGRZ.js";import"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import"./chunk-VU532YE3.js";import{ha as o}from"./chunk-7IC4BZ6J.js";import"./chunk-YQFG5XE2.js";var r=()=>{let t=o(n),i=o(e);return t.isAuthenticated()&&!t.isTokenExpired()&&t.checkAuthKeysExists()?(i.navigate(["/pages/dashboard"]),!1):!0};var h=[{path:"",canActivate:[r],loadComponent:()=>import("./chunk-IXOM3GPT.js").then(t=>t.LoginComponent)},{path:"404",loadComponent:()=>import("./chunk-X3JXYOSR.js").then(t=>t.NotfoundComponent)},{path:"signup",loadComponent:()=>import("./chunk-AE7ZMPUT.js").then(t=>t.SignupComponent)},{path:"504",loadComponent:()=>import("./chunk-VDXMHX3J.js").then(t=>t.TimeoutComponent)}];export{h as AuthenticationRoutes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F}from"./chunk-CVOI5T6R.js";import{a as Be,b as Oe}from"./chunk-S2Q6V4IV.js";import{a as je}from"./chunk-T4TFJFL4.js";import{b as D}from"./chunk-VKPPDDEW.js";import{a as re}from"./chunk-FT65M3TM.js";import"./chunk-64ODJHGP.js";import{a as ze}from"./chunk-XKI7WLHE.js";import"./chunk-GLOECGB7.js";import"./chunk-KKZF4RQM.js";import{a as z,b as j}from"./chunk-RNPNKSFR.js";import{d as Pe,i as ke,j as Re,k as Me}from"./chunk-BRCJWPEZ.js";import{a as De,b as Fe}from"./chunk-N5W3C4LG.js";import"./chunk-BSFKUGYO.js";import"./chunk-MASZROSE.js";import"./chunk-NI4XE6XQ.js";import{a as Je,b as Ne}from"./chunk-RZI2OI6V.js";import"./chunk-A7LRQMLA.js";import"./chunk-4TW5N3R5.js";import"./chunk-NTCCFR6P.js";import"./chunk-W6IKDXXT.js";import"./chunk-5B3BG43K.js";import"./chunk-UVIJU7TM.js";import"./chunk-EALZUKSJ.js";import{g as Ve,h as Ae}from"./chunk-DFBPVWWJ.js";import{b as Te,c as Ee}from"./chunk-WNA57NZF.js";import{a as Ce,b as Se}from"./chunk-MUFRLGLG.js";import{a as y,b as be,c as ve,d as ye,e as we,f as Ie}from"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import{n as _e,o as ge,w as he,x as xe}from"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import{b as ae,c as le,e as pe,f as me,k as se,l as ce,o as de,u as ue,x as fe}from"./chunk-NHXCR55X.js";import"./chunk-DOKG43W6.js";import"./chunk-RV7TVDYN.js";import"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import{h as Z,j as ee,k as te,n as ie,p as ne,s as oe}from"./chunk-VU532YE3.js";import{Ab as K,Bc as Q,Cb as x,Cc as X,Dc as V,Ga as k,Kb as c,Mc as T,Nc as Y,Oc as A,Qc as v,Ub as r,Vb as o,Wb as S,X as P,Z as H,_b as w,ad as E,bb as U,c as J,cb as L,dc as I,ec as _,gb as l,ha as C,pa as g,qa as h,qc as s,rc as b,s as N,sc as R,uc as W,vc as $,wb as G,wc as M,xc as q}from"./chunk-7IC4BZ6J.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var We={data:{data:[],totalCount:0},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}}},B=be(Ie(We),ve(t=>({first:E(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:E(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:E(()=>t.data().data.some(a=>a.checked)),checkedAPCollection:E(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),we(t=>{let a=C(F),e=C(D);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(m=>m.id===n.id?f(d({},m),{checked:!0}):m);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){y(t,i=>{let u=i.data.data.map(m=>m.id===n.id?f(d({},m),{checked:!1}):m);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){y(t,i=>{let u=i.data.data.map(m=>f(d({},m),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getAPLoader:z(J(P(()=>a.getAPJournalLoader().pipe(j({next:n=>{y(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AP journal:",n)}}))))),getARCollection:z(J(N(n=>Object.entries(n).reduce((i,[u,m])=>(m!=null&&(i[u]=m),i),{})),P(n=>a.getAPJournal(n).pipe(N(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.getAPLoader(),t.getARCollection(t.filter)}})));var O=t=>({"ng-invalid ng-dirty":t}),$e=()=>({});function qe(t,a){if(t&1){let e=w();r(0,"p-button",10),I("onClick",function(){g(e);let n=_(2);return h(n.onCreateJournal())}),o()}}function Qe(t,a){if(t&1&&x(0,qe,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function Xe(t,a){t&1&&(r(0,"tr")(1,"th",12),S(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,"Supplier"),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(),S(17,"th",18),o())}function Ye(t,a){if(t&1&&(r(0,"tr")(1,"td"),S(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),T(12,"date"),o(),r(13,"td"),s(14),T(15,"date"),o(),r(16,"td"),S(17,"div",21),o(),r(18,"td"),s(19),o(),r(20,"td"),S(21,"p-button",22),o()()),t&2){let e=a.$implicit,p=_(2);l(2),c("value",e),l(2),b(e.outlet),l(2),c("href",p.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Bill/New_Join_Bill/Info?ID="+e.id,L),l(),R(" ",e.number," "),l(2),b(e.customer),l(2),b(A(12,12,e.date,"d MMM y")),l(3),b(e.due?A(15,15,e.due,"d MMM y hh:mm"):"-"),l(3),c("innerHTML",e.note,U),l(2),b(e.payment),l(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Ze(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 et(t,a){t&1&&(r(0,"tr")(1,"td",23)(2,"span"),s(3,"No records found."),o()()())}function tt(t,a){if(t&1){let e=w();r(0,"p-panel")(1,"p-table",11),I("onPage",function(n){g(e);let i=_();return h(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){g(e);let i=_();return h(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){g(e);let i=_();return h(i.onRowSelect(n))})("onRowUnselect",function(n){g(e);let i=_();return h(i.onRowUnselect(n))}),x(2,Xe,18,0,"ng-template",null,3,v)(4,Ye,22,18,"ng-template",null,4,v)(6,Ze,1,3,"ng-template",null,5,v)(8,et,4,0,"ng-template",null,6,v),o()()}if(t&2){let e=_();l(),c("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function it(t,a){if(t&1&&(r(0,"span",34),s(1),T(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),l(),R(" ",A(2,2,e.name,30)," ")}}function nt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function ot(t,a){if(t&1&&(r(0,"div"),x(1,nt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("from"))}}function rt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function at(t,a){if(t&1&&(r(0,"div"),x(1,rt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("to"))}}function lt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function pt(t,a){if(t&1&&(r(0,"div"),x(1,lt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("pageSize"))}}function mt(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),x(5,it,3,5,"ng-template",null,7,v),o()(),r(7,"div",25)(8,"label",26),s(9,"From - To"),o(),r(10,"div",28),S(11,"p-datepicker",29),x(12,ot,2,1,"div",30),S(13,"p-datepicker",31),x(14,at,2,1,"div",30),o()(),r(15,"div",25)(16,"label",26),s(17,"Supplier"),o(),r(18,"p-autocomplete",32),T(19,"async"),I("completeMethod",function(n){g(e);let i=_();return h(i.onSearchSupplier(n))}),o()(),r(20,"div",25)(21,"label",26),s(22,"Page Size"),o(),S(23,"input",33),x(24,pt,2,1,"div",30),o()()}if(t&2){let e=_();c("formGroup",e.form),l(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),l(7),c("iconDisplay","input")("showIcon",!0)("ngClass",V(17,O,e.isInvalid("from"))),l(),c("ngIf",e.isInvalid("from")),l(),c("iconDisplay","input")("showIcon",!0)("ngClass",V(19,O,e.isInvalid("to"))),l(),c("ngIf",e.isInvalid("to")),l(4),c("suggestions",Y(19,15,e.supplierSuggestions$)),l(5),c("autoNumeric",X(21,$e))("ngClass",V(22,O,e.isInvalid("pageSize"))),l(),c("ngIf",e.isInvalid("pageSize"))}}var Yt=(()=>{class t extends ze{constructor(){super(),this.store=C(B),this.generateJournalService=C(F),this.authService=C(re),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(ue),this.dayjsService=C(D)}ngOnInit(){this.initform()}initform(){let{outletName:e,number:p,from:n,to:i,paymentState:u,supplierID:m,pageNumber:He,pageSize:Ue,export:Le,exportPageNumber:Ge,exportPageSize:Ke}=this.store.filter();this.form=this.fb.group({outletName:this.fb.control(e),number:this.fb.control(p),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),paymentState:this.fb.control(u),supplierID:this.fb.control(m),pageNumber:this.fb.control(He),pageSize:this.fb.control(Ue,[le.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(Ge),exportPageSize:this.fb.control(Ke)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((p,[n,i])=>(i!=null&&(n==="from"||n==="to"?(typeof i=="string"||typeof i=="number"||i instanceof Date)&&(p[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null):p[n]=i),p),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(p=>!p)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e}))}onSearchSupplier(e){this.supplierSuggestions$=this.generateJournalService.getSupplierSuggestions(e.query).pipe()}onPageChange(e){let p=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:p+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(p=>{this.store.onRowUnselect(p)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createAPJournal(this.store.checkedAPCollection()).pipe(H(()=>{this.store.getARCollection(this.store.filter)})).subscribe()}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=G({type:t,selectors:[["app-ap-journal"]],features:[Q([B]),K],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AP 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","supplierID","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(p,n){if(p&1){let i=w();r(0,"app-main-panel",8),q("isDialogFilterVisibleChange",function(m){return g(i),M(n.isDialogFilterVisible,m)||(n.isDialogFilterVisible=m),h(m)})("isInitDialogFilterVisibleChange",function(m){return g(i),M(n.isInitDialogFilterVisible,m)||(n.isInitDialogFilterVisible=m),h(m)}),I("filterConfirmed",function(){return g(i),h(n.onFilterOKEvent())})("search",function(m){return g(i),h(n.onSearch(m))}),x(1,Qe,1,1,"ng-template",null,0,v)(3,tt,10,5,"ng-template",null,1,v)(5,mt,25,24,"ng-template",null,2,v),o()}p&2&&(c("isSearchableInput",!0)("isFilterable",!0),$("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),c("scrollable",!0))},dependencies:[Ae,Me,Pe,ke,Re,oe,Z,ee,te,ie,ne,xe,he,Se,Ce,fe,se,ae,pe,me,ce,de,Ne,Je,Fe,De,ge,_e,Oe,Be,Ee,Te,Ve,je],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Yt as ApJournalComponent};
|
|
1
|
+
import{a as F}from"./chunk-E34SEVZS.js";import{a as Be,b as Oe}from"./chunk-S2Q6V4IV.js";import{a as je}from"./chunk-T4TFJFL4.js";import{a as re}from"./chunk-YO2YHPV5.js";import{b as D}from"./chunk-W7Q3NWBG.js";import"./chunk-64ODJHGP.js";import{a as ze}from"./chunk-XKI7WLHE.js";import"./chunk-GLOECGB7.js";import"./chunk-KKZF4RQM.js";import{a as z,b as j}from"./chunk-RNPNKSFR.js";import{d as Pe,i as ke,j as Re,k as Me}from"./chunk-BRCJWPEZ.js";import{a as De,b as Fe}from"./chunk-N5W3C4LG.js";import"./chunk-BSFKUGYO.js";import"./chunk-MASZROSE.js";import"./chunk-NI4XE6XQ.js";import{a as Je,b as Ne}from"./chunk-RZI2OI6V.js";import"./chunk-A7LRQMLA.js";import"./chunk-4TW5N3R5.js";import"./chunk-NTCCFR6P.js";import"./chunk-W6IKDXXT.js";import"./chunk-5B3BG43K.js";import"./chunk-UVIJU7TM.js";import"./chunk-EALZUKSJ.js";import{g as Ve,h as Ae}from"./chunk-MS6ARTHK.js";import{b as Te,c as Ee}from"./chunk-WNA57NZF.js";import{a as Ce,b as Se}from"./chunk-MUFRLGLG.js";import{a as y,b as be,c as ve,d as ye,e as we,f as Ie}from"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import{n as _e,o as ge,w as he,x as xe}from"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import{b as ae,c as le,e as pe,f as me,k as se,l as ce,o as de,u as ue,x as fe}from"./chunk-NHXCR55X.js";import"./chunk-DOKG43W6.js";import"./chunk-I5YQOGRZ.js";import"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import{h as Z,j as ee,k as te,n as ie,p as ne,s as oe}from"./chunk-VU532YE3.js";import{Ab as K,Bc as Q,Cb as x,Cc as X,Dc as V,Ga as k,Kb as c,Mc as T,Nc as Y,Oc as A,Qc as v,Ub as r,Vb as o,Wb as S,X as P,Z as H,_b as w,ad as E,bb as U,c as J,cb as L,dc as I,ec as _,gb as l,ha as C,pa as g,qa as h,qc as s,rc as b,s as N,sc as R,uc as W,vc as $,wb as G,wc as M,xc as q}from"./chunk-7IC4BZ6J.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var We={data:{data:[],totalCount:0},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,supplierID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}}},B=be(Ie(We),ve(t=>({first:E(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:E(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:E(()=>t.data().data.some(a=>a.checked)),checkedAPCollection:E(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),we(t=>{let a=C(F),e=C(D);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(m=>m.id===n.id?f(d({},m),{checked:!0}):m);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){y(t,i=>{let u=i.data.data.map(m=>m.id===n.id?f(d({},m),{checked:!1}):m);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){y(t,i=>{let u=i.data.data.map(m=>f(d({},m),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getAPLoader:z(J(P(()=>a.getAPJournalLoader().pipe(j({next:n=>{y(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AP journal:",n)}}))))),getARCollection:z(J(N(n=>Object.entries(n).reduce((i,[u,m])=>(m!=null&&(i[u]=m),i),{})),P(n=>a.getAPJournal(n).pipe(N(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.getAPLoader(),t.getARCollection(t.filter)}})));var O=t=>({"ng-invalid ng-dirty":t}),$e=()=>({});function qe(t,a){if(t&1){let e=w();r(0,"p-button",10),I("onClick",function(){g(e);let n=_(2);return h(n.onCreateJournal())}),o()}}function Qe(t,a){if(t&1&&x(0,qe,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function Xe(t,a){t&1&&(r(0,"tr")(1,"th",12),S(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,"Supplier"),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(),S(17,"th",18),o())}function Ye(t,a){if(t&1&&(r(0,"tr")(1,"td"),S(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),T(12,"date"),o(),r(13,"td"),s(14),T(15,"date"),o(),r(16,"td"),S(17,"div",21),o(),r(18,"td"),s(19),o(),r(20,"td"),S(21,"p-button",22),o()()),t&2){let e=a.$implicit,p=_(2);l(2),c("value",e),l(2),b(e.outlet),l(2),c("href",p.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Bill/New_Join_Bill/Info?ID="+e.id,L),l(),R(" ",e.number," "),l(2),b(e.customer),l(2),b(A(12,12,e.date,"d MMM y")),l(3),b(e.due?A(15,15,e.due,"d MMM y hh:mm"):"-"),l(3),c("innerHTML",e.note,U),l(2),b(e.payment),l(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Ze(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 et(t,a){t&1&&(r(0,"tr")(1,"td",23)(2,"span"),s(3,"No records found."),o()()())}function tt(t,a){if(t&1){let e=w();r(0,"p-panel")(1,"p-table",11),I("onPage",function(n){g(e);let i=_();return h(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){g(e);let i=_();return h(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){g(e);let i=_();return h(i.onRowSelect(n))})("onRowUnselect",function(n){g(e);let i=_();return h(i.onRowUnselect(n))}),x(2,Xe,18,0,"ng-template",null,3,v)(4,Ye,22,18,"ng-template",null,4,v)(6,Ze,1,3,"ng-template",null,5,v)(8,et,4,0,"ng-template",null,6,v),o()()}if(t&2){let e=_();l(),c("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function it(t,a){if(t&1&&(r(0,"span",34),s(1),T(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),l(),R(" ",A(2,2,e.name,30)," ")}}function nt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function ot(t,a){if(t&1&&(r(0,"div"),x(1,nt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("from"))}}function rt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function at(t,a){if(t&1&&(r(0,"div"),x(1,rt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("to"))}}function lt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;l(2),b(e)}}function pt(t,a){if(t&1&&(r(0,"div"),x(1,lt,3,1,"div",35),o()),t&2){let e=_(2);l(),c("ngForOf",e.getErrors("pageSize"))}}function mt(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),x(5,it,3,5,"ng-template",null,7,v),o()(),r(7,"div",25)(8,"label",26),s(9,"From - To"),o(),r(10,"div",28),S(11,"p-datepicker",29),x(12,ot,2,1,"div",30),S(13,"p-datepicker",31),x(14,at,2,1,"div",30),o()(),r(15,"div",25)(16,"label",26),s(17,"Supplier"),o(),r(18,"p-autocomplete",32),T(19,"async"),I("completeMethod",function(n){g(e);let i=_();return h(i.onSearchSupplier(n))}),o()(),r(20,"div",25)(21,"label",26),s(22,"Page Size"),o(),S(23,"input",33),x(24,pt,2,1,"div",30),o()()}if(t&2){let e=_();c("formGroup",e.form),l(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),l(7),c("iconDisplay","input")("showIcon",!0)("ngClass",V(17,O,e.isInvalid("from"))),l(),c("ngIf",e.isInvalid("from")),l(),c("iconDisplay","input")("showIcon",!0)("ngClass",V(19,O,e.isInvalid("to"))),l(),c("ngIf",e.isInvalid("to")),l(4),c("suggestions",Y(19,15,e.supplierSuggestions$)),l(5),c("autoNumeric",X(21,$e))("ngClass",V(22,O,e.isInvalid("pageSize"))),l(),c("ngIf",e.isInvalid("pageSize"))}}var Yt=(()=>{class t extends ze{constructor(){super(),this.store=C(B),this.generateJournalService=C(F),this.authService=C(re),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(ue),this.dayjsService=C(D)}ngOnInit(){this.initform()}initform(){let{outletName:e,number:p,from:n,to:i,paymentState:u,supplierID:m,pageNumber:He,pageSize:Ue,export:Le,exportPageNumber:Ge,exportPageSize:Ke}=this.store.filter();this.form=this.fb.group({outletName:this.fb.control(e),number:this.fb.control(p),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),paymentState:this.fb.control(u),supplierID:this.fb.control(m),pageNumber:this.fb.control(He),pageSize:this.fb.control(Ue,[le.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(Ge),exportPageSize:this.fb.control(Ke)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((p,[n,i])=>(i!=null&&(n==="from"||n==="to"?(typeof i=="string"||typeof i=="number"||i instanceof Date)&&(p[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null):p[n]=i),p),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(p=>!p)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e}))}onSearchSupplier(e){this.supplierSuggestions$=this.generateJournalService.getSupplierSuggestions(e.query).pipe()}onPageChange(e){let p=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:p+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(p=>{this.store.onRowUnselect(p)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createAPJournal(this.store.checkedAPCollection()).pipe(H(()=>{this.store.getARCollection(this.store.filter)})).subscribe()}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=G({type:t,selectors:[["app-ap-journal"]],features:[Q([B]),K],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AP 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","supplierID","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(p,n){if(p&1){let i=w();r(0,"app-main-panel",8),q("isDialogFilterVisibleChange",function(m){return g(i),M(n.isDialogFilterVisible,m)||(n.isDialogFilterVisible=m),h(m)})("isInitDialogFilterVisibleChange",function(m){return g(i),M(n.isInitDialogFilterVisible,m)||(n.isInitDialogFilterVisible=m),h(m)}),I("filterConfirmed",function(){return g(i),h(n.onFilterOKEvent())})("search",function(m){return g(i),h(n.onSearch(m))}),x(1,Qe,1,1,"ng-template",null,0,v)(3,tt,10,5,"ng-template",null,1,v)(5,mt,25,24,"ng-template",null,2,v),o()}p&2&&(c("isSearchableInput",!0)("isFilterable",!0),$("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),c("scrollable",!0))},dependencies:[Ae,Me,Pe,ke,Re,oe,Z,ee,te,ie,ne,xe,he,Se,Ce,fe,se,ae,pe,me,ce,de,Ne,Je,Fe,De,ge,_e,Oe,Be,Ee,Te,Ve,je],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Yt as ApJournalComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v,b as L}from"./chunk-
|
|
1
|
+
import{a as v,b as L}from"./chunk-NU6SYZAJ.js";import"./chunk-W7Q3NWBG.js";import{a as E,b as O}from"./chunk-CDXFHUDN.js";import"./chunk-PS4MFIBX.js";import{h as H}from"./chunk-MS6ARTHK.js";import{b as N,c as G}from"./chunk-WNA57NZF.js";import{a as R,b as D}from"./chunk-MUFRLGLG.js";import"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import{w as V,x as j}from"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import"./chunk-NHXCR55X.js";import"./chunk-I5YQOGRZ.js";import{a as I}from"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import{n as A,s as F}from"./chunk-VU532YE3.js";import{Bc as $,Cb as B,Cc as _,Kb as p,Mc as m,Nb as d,Nc as l,Qc as x,Ub as o,V as y,Vb as n,Wb as c,X as M,Z as b,_b as P,dc as h,ec as s,gb as a,h as T,ha as f,pa as g,qa as C,ra as S,s as u,sa as k,wb as w}from"./chunk-7IC4BZ6J.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=P();o(0,"div",3)(1,"p-button",4),h("onClick",function(){g(e);let r=s();return C(r.onFormatCOAConfig())}),n(),o(2,"p-button",5),m(3,"async"),m(4,"async"),h("onClick",function(){g(e);let r=s();return C(r.onMigrateCoaConfig())}),n()()}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&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),c(3,"app-migration-cards",7),m(4,"async"),S(),o(5,"svg",8),c(6,"path",9),n(),k(),c(7,"app-migration-cards",10),m(8,"async"),n()()()),i&2){let e=s();d(_(12,q)),a(),d(_(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 ge=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f(I),this.refresh$=new T(void 0),this.pageTitle="Chart of Account Configuration"}ngOnInit(){let e=this.refresh$.pipe(M(()=>this.migrateService.getCOAConfigurationCount()),b(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)))}onMigrateCoaConfig(){this.migrateService.migrateCoaConfig().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormatCOAConfig(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatManualCOAConfig().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=w({type:i,selectors:[["app-coa-configuration"]],features:[$([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&&(o(0,"app-main-panel",2),B(1,J,5,6,"ng-template",null,0,x)(3,K,9,14,"ng-template",null,1,x),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 CoaConfigurationComponent};
|