dealposbooks 5.51.1 → 5.51.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-ZM7C3PCP.js → chunk-2P6N6225.js} +1 -1
- package/{chunk-YI5IYWUO.js → chunk-3NF5ANCH.js} +1 -1
- package/{chunk-UNKPZO2B.js → chunk-4EGQ563G.js} +1 -1
- package/{chunk-3PM6I5JR.js → chunk-5DAIWPJH.js} +1 -1
- package/{chunk-OW6NHTGL.js → chunk-5UVNTB7W.js} +1 -1
- package/{chunk-QSZKELXB.js → chunk-6YXA7GFO.js} +1 -1
- package/{chunk-X7I6QMMX.js → chunk-7QQAIIXC.js} +1 -1
- package/{chunk-U7I6X4QJ.js → chunk-BPJERO47.js} +2 -2
- package/{chunk-EZXX3QNG.js → chunk-CNWZ52LV.js} +1 -1
- package/{chunk-G25BIGG3.js → chunk-CYTZBS64.js} +1 -1
- package/{chunk-JNPTKMYO.js → chunk-DJAA5EF6.js} +1 -1
- package/{chunk-KPSZN2UI.js → chunk-DOPSA7V7.js} +1 -1
- package/chunk-EZGBB4MD.js +1 -0
- package/{chunk-YZ76QE4R.js → chunk-H6JPNVHO.js} +1 -1
- package/{chunk-JRHKJYE2.js → chunk-HK6564XM.js} +1 -1
- package/{chunk-BBR4SZ4S.js → chunk-HKEKJASB.js} +1 -1
- package/{chunk-PQ2NDMDD.js → chunk-HUNIPNEV.js} +1 -1
- package/{chunk-RA2HD63W.js → chunk-I2SBX2TZ.js} +1 -1
- package/{chunk-N3AQU3B6.js → chunk-IBPU4HMB.js} +1 -1
- package/{chunk-RCHTOR4U.js → chunk-ICDJTXVE.js} +1 -1
- package/{chunk-2UDDXT3B.js → chunk-ITGMU5MB.js} +1 -1
- package/{chunk-2Z3VSENH.js → chunk-IVCIH4GN.js} +1 -1
- package/{chunk-LP4UYVTQ.js → chunk-JK2F33M6.js} +2 -2
- package/{chunk-HR6W3DC4.js → chunk-KR465WRL.js} +1 -1
- package/{chunk-5MLCIFDJ.js → chunk-L5IWZ4Y2.js} +1 -1
- package/{chunk-E2PHUSPH.js → chunk-LRD5A6EL.js} +1 -1
- package/{chunk-FJM77N3D.js → chunk-LTIBX74D.js} +1 -1
- package/{chunk-LZCLNB3T.js → chunk-M2RAH7HZ.js} +1 -1
- package/{chunk-PZCAY2XI.js → chunk-NBWU3VSN.js} +1 -1
- package/{chunk-EO32GXB6.js → chunk-NGMAZPWL.js} +1 -1
- package/{chunk-MDE76CBT.js → chunk-Q4WVEWIJ.js} +1 -1
- package/{chunk-IYV5JRCZ.js → chunk-QQYGISGZ.js} +1 -1
- package/{chunk-7XSFPN5T.js → chunk-RBJEQZ2O.js} +1 -1
- package/{chunk-VZHZFGQ2.js → chunk-RK23P4VG.js} +1 -1
- package/{chunk-6JWBYLFX.js → chunk-RSAW2IGP.js} +1 -1
- package/{chunk-PXAENMFN.js → chunk-S36SGADP.js} +1 -1
- package/{chunk-OZYL2K6P.js → chunk-SXKPF3GY.js} +1 -1
- package/{chunk-I3DG6HPA.js → chunk-TRH6BRRC.js} +1 -1
- package/{chunk-KU3G54A2.js → chunk-TZH35FNY.js} +2 -2
- package/{chunk-VANY33VH.js → chunk-UCJ6JQWA.js} +1 -1
- package/{chunk-5SDFH3ZF.js → chunk-UPBPXKNV.js} +1 -1
- package/{chunk-Z2MDQN57.js → chunk-VQM5QCPU.js} +1 -1
- package/{chunk-RNMAINY3.js → chunk-W6SE4LJW.js} +1 -1
- package/{chunk-FUYYSJF7.js → chunk-WZ5LBHF5.js} +1 -1
- package/{chunk-IWB6L5HR.js → chunk-WZ6BCBDQ.js} +1 -1
- package/{chunk-MGEVP222.js → chunk-YAFMVKX5.js} +1 -1
- package/{chunk-U52NCHP2.js → chunk-YB424QNC.js} +1 -1
- package/{chunk-VYR5D7SO.js → chunk-YCOTHSE5.js} +1 -1
- package/{chunk-3IOJJMQE.js → chunk-Z2KELIGC.js} +1 -1
- package/{chunk-4BAARBYV.js → chunk-ZRPU3QYR.js} +1 -1
- package/{chunk-Y4SHAFGQ.js → chunk-ZVDGEDMP.js} +1 -1
- package/{chunk-WNEAYP2J.js → chunk-ZZLTM7V6.js} +1 -1
- package/index.html +2 -2
- package/{main-ARGVLXJ4.js → main-6DNI2R4P.js} +1 -1
- package/package.json +1 -1
- package/chunk-UMDFA3TV.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Z}from"./chunk-52PEVPZN.js";import{a as X,b as Y}from"./chunk-AAKZYXG3.js";import{a as v}from"./chunk-BT7Y4ADP.js";import{a as U,b as W}from"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import"./chunk-FMAG3RQL.js";import{i as Q}from"./chunk-
|
|
1
|
+
import{a as Z}from"./chunk-52PEVPZN.js";import{a as X,b as Y}from"./chunk-AAKZYXG3.js";import{a as v}from"./chunk-BT7Y4ADP.js";import{a as U,b as W}from"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import"./chunk-FMAG3RQL.js";import{i as Q}from"./chunk-3NF5ANCH.js";import"./chunk-VM56C6ZV.js";import{a as H,b as K}from"./chunk-ISIYG4D5.js";import"./chunk-FNGX2XFA.js";import"./chunk-ALLR2NXQ.js";import"./chunk-BFEM6LX7.js";import{n as A,o as $,w as q,x as z}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{b as w,e as B,f as V,k as O,m as D,p as G,v as L,y as j}from"./chunk-MGIEURA2.js";import"./chunk-H6JPNVHO.js";import"./chunk-G3BJCT7T.js";import"./chunk-JBYPGHPN.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import"./chunk-KL3TPLRB.js";import"./chunk-DM2JLWKE.js";import{Eb as d,Ec as M,Ha as N,Mb as u,Pb as E,Rb as _,Sb as F,Sc as x,Ub as T,Vb as J,Wb as o,Xb as n,Yb as p,_ as C,ac as I,bd as R,fc as k,gc as s,ia as g,ib as m,qa as y,ra as h,sc as i,tc as P,yb as S}from"./chunk-6QJHEOXN.js";import{a as c,b as f}from"./chunk-YQFG5XE2.js";var ie=()=>({height:"40px"});function re(t,r){if(t&1){let e=I();o(0,"p-button",4),k("onClick",function(){y(e);let l=s();return h(l.onSubmit())}),n()}}function ae(t,r){t&1&&(o(0,"div",6)(1,"div",7)(2,"h3",8),i(3,"Journal Number Generator"),n(),o(4,"p",9),i(5," Configure numbering format and rule for journal "),n()()())}function le(t,r){if(t&1&&(o(0,"div",7)(1,"div",24),p(2,"p-radiobutton",25),o(3,"label",26),i(4),n()()()),t&2){let e=r.$implicit;m(2),u("inputId","resetPeriod"+e.key)("value",e.key),m(),u("for","resetPeriod"+e.key),m(),P(e.value)}}function me(t,r){t&1&&(o(0,"span",15),i(1,"Format"),n())}function pe(t,r){t&1&&(o(0,"span",15),i(1,"Format"),n())}function ue(t,r){if(t&1&&p(0,"p-select",16),t&2){let e=s(3);u("fluid",!0)("options",e.loader().options.dayResetPeriodFormat)}}function se(t,r){if(t&1&&p(0,"p-select",17),t&2){let e=s(3);u("fluid",!0)("options",e.loader().options.monthlyResetPeriodFormat)}}function de(t,r){if(t&1&&(o(0,"form",5)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",7)(5,"div",13)(6,"div",14)(7,"span",15),i(8,"Journal Number Reset Range"),n()(),o(9,"div",7)(10,"div",13),T(11,le,5,4,"div",7,F),n()()()(),o(13,"div",7)(14,"div",13)(15,"div",14),d(16,me,2,0,"span",15)(17,pe,2,0,"span",15),n(),o(18,"div",7),d(19,ue,1,2,"p-select",16)(20,se,1,2,"p-select",17),n()()()(),o(21,"div",10)(22,"div",18)(23,"div",19)(24,"span",15),i(25,"Prefix"),n(),p(26,"input",20),n()(),o(27,"div",18)(28,"div",19)(29,"span",15),i(30,"Separator"),n(),p(31,"input",21),n()(),o(32,"div",18)(33,"div",19)(34,"span",15),i(35,"Digit Behind Number"),n(),p(36,"input",22),n()(),o(37,"div",18)(38,"div",19)(39,"span",15),i(40,"Last Number"),n(),p(41,"input",23),n()()()()()()),t&2){let e,a,l=s(2);u("formGroup",l.form),m(9),E(M(5,ie)),m(2),J(l.resetPeriodOptions()),m(5),_((e=l.form.controls.resetEvery.value)===0?16:e===1?17:-1),m(3),_((a=l.form.controls.resetEvery.value)===0?19:a===1?20:-1)}}function ce(t,r){if(t&1&&(o(0,"p-panel"),d(1,ae,6,0,"ng-template",null,2,x)(3,de,42,6,"form",5),n()),t&2){let e=s();m(3),_(e.loader()?3:-1)}}var Re=(()=>{class t{constructor(){this.loader=N(null),this.resetPeriodOptions=R(()=>this.loader()?.options?.resetPeriods??[]),this.accountingSetupService=g(Z),this.fb=g(L)}generateForm(e){this.form=this.fb.group({resetEvery:this.fb.control(e.formatting.resetEvery),monthlyFormat:this.fb.control(e.formatting.monthlyFormat),dailyFormat:this.fb.control(e.formatting.dailyFormat),lastNumber:this.fb.control(e.number.lastNumber),prefix:this.fb.control(e.formatting.prefix),separator:this.fb.control(e.formatting.separator),digit:this.fb.control(e.formatting.digit)})}ngOnInit(){this.accountingSetupService.fetchLoaderConfiguration().pipe(v("Loader Configuration"),C(e=>{this.loader.set(e),this.generateForm(e.form)})).subscribe()}onSubmit(){let{lastNumber:e,prefix:a,separator:l,dailyFormat:ee,monthlyFormat:te,resetEvery:ne,digit:oe}=this.form.value,b=f(c({},this.loader().form),{formatting:f(c({},this.loader().form.formatting),{digit:+oe,separator:l,resetEvery:+ne,monthlyFormat:+te,prefix:a,dailyFormat:+ee}),number:f(c({},this.loader().form.number),{lastNumber:e})});console.log(b),this.accountingSetupService.updateAccountingIntegrationConfiguration(b).pipe(v("response")).subscribe()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-journal-number"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Journal Number"],["icon","fa-solid fa-floppy-disk","label","Save",3,"onClick"],[3,"formGroup"],[1,"row","px-2"],[1,"col"],[1,"fs-4","m-0"],[1,"fs-3","text-secondary"],[1,"row"],[1,"col-10","col-xl-8","d-flex","flex-column","gap-4"],[1,"row","gap-4"],[1,"row","h-100"],[1,"col-12"],[1,"fs-3","text-black","fw-normal"],["formControlName","dailyFormat","inputId","monthlyReset","optionLabel","value","optionValue","key",3,"fluid","options"],["formControlName","monthlyFormat","inputId","monthlyReset","optionLabel","value","optionValue","key",3,"fluid","options"],[1,"col-3"],[1,"d-flex","flex-column"],["formControlName","prefix","pInputText","","type","text"],["formControlName","separator","pInputText","","type","text"],["formControlName","digit","pInputText","","type","text"],["formControlName","lastNumber","pInputText","","type","text"],[1,"d-flex","align-items-center","gap-2","h-100"],["formControlName","resetEvery","name","resetEvery",3,"inputId","value"],[1,"m-0",3,"for"]],template:function(a,l){a&1&&(o(0,"app-main-panel",3),d(1,re,1,0,"ng-template",null,0,x)(3,ce,4,1,"ng-template",null,1,x),n())},dependencies:[Q,K,H,$,A,Y,X,j,O,w,B,V,D,G,W,U,z,q],styles:["fieldset[_ngcontent-%COMP%]{background-color:#eee}legend[_ngcontent-%COMP%]{background-color:gray;color:#fff;padding:5px 10px}"]})}}return t})();export{Re as JournalNumberComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ft}from"./chunk-VM56C6ZV.js";import{a as Mt,i as zt}from"./chunk-FNGX2XFA.js";import{a as rt,b as st}from"./chunk-BFEM6LX7.js";import{a as q,b as ht,f as Qe,h as Ie,j as bt,k as Ct,l as yt,m as xt,n as vt,o as Tt,w as Me,x as wt,y as kt,z as It}from"./chunk-O44DI62I.js";import{A as ve,B as Le,C as Te,D as Oe,E as He,Ea as W,J as Be,L as pt,Ma as gt,Na as O,O as ct,Oa as ut,S as Re,V as dt,Va as ke,_ as mt,aa as we,b as nt,e as ot,j as at,na as _t,x as lt,z as oe}from"./chunk-MGIEURA2.js";import{c as it}from"./chunk-YZ76QE4R.js";import{c as tt,d as De,f as Ee,h as Fe,i as Ve,k as Pe}from"./chunk-F2X3VGZZ.js";import{a as et,j as Z,m as Ce,n as ye,o as xe,u as $,x as ne}from"./chunk-DM2JLWKE.js";import{$b as D,$c as be,Aa as L,Ab as $e,Ba as Xe,Cb as z,Da as pe,Dc as j,Ea as v,Eb as m,Ec as fe,Fc as Q,Gc as Ge,Ha as je,Hc as Ke,La as Ye,Lb as T,Mb as o,Ob as qe,Oc as te,Pb as A,Pc as ie,Qb as S,Rb as E,Sc as Y,Wb as p,Xb as c,Yb as h,Zb as N,_b as X,_c as C,ac as b,bd as Ue,ca as re,cd as Je,da as K,fc as u,gb as Ze,gc as s,hc as de,ia as I,ib as a,ic as J,lc as w,mc as me,nc as y,oc as x,pa as Ne,qa as _,ra as g,rc as _e,sa as se,sc as R,tb as ce,tc as ee,ua as k,uc as Se,xc as ge,yb as M,yc as ue,zb as U,zc as he}from"./chunk-6QJHEOXN.js";import{a as P,b as ze}from"./chunk-YQFG5XE2.js";var St=(()=>{class t extends Ie{pathId;ngOnInit(){this.pathId="url(#"+W()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=k(t)))(i||t)}})();static \u0275cmp=M({type:t,selectors:[["WindowMaximizeIcon"]],features:[z],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&(se(),p(0,"svg",0)(1,"g"),h(2,"path",1),c(),p(3,"defs")(4,"clipPath",2),h(5,"rect",3),c()()()),n&2&&(S(i.getClassNames()),T("aria-label",i.ariaLabel)("aria-hidden",i.ariaHidden)("role",i.role),a(),T("clip-path",i.pathId),a(3),o("id",i.pathId))},encapsulation:2})}return t})();var Dt=(()=>{class t extends Ie{pathId;ngOnInit(){this.pathId="url(#"+W()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=k(t)))(i||t)}})();static \u0275cmp=M({type:t,selectors:[["WindowMinimizeIcon"]],features:[z],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&(se(),p(0,"svg",0)(1,"g"),h(2,"path",1),c(),p(3,"defs")(4,"clipPath",2),h(5,"rect",3),c()()()),n&2&&(S(i.getClassNames()),T("aria-label",i.ariaLabel)("aria-hidden",i.ariaHidden)("role",i.role),a(),T("clip-path",i.pathId),a(3),o("id",i.pathId))},encapsulation:2})}return t})();var Et=(()=>{class t extends q{pFocusTrapDisabled=!1;platformId=I(Ye);document=I(et);firstHiddenFocusableElement;lastHiddenFocusableElement;ngOnInit(){super.ngOnInit(),ne(this.platformId)&&!this.pFocusTrapDisabled&&!this.firstHiddenFocusableElement&&!this.lastHiddenFocusableElement&&this.createHiddenFocusableElements()}ngOnChanges(e){super.ngOnChanges(e),e.pFocusTrapDisabled&&ne(this.platformId)&&(e.pFocusTrapDisabled.currentValue?this.removeHiddenFocusableElements():this.createHiddenFocusableElements())}removeHiddenFocusableElements(){this.firstHiddenFocusableElement&&this.firstHiddenFocusableElement.parentNode&&this.firstHiddenFocusableElement.parentNode.removeChild(this.firstHiddenFocusableElement),this.lastHiddenFocusableElement&&this.lastHiddenFocusableElement.parentNode&&this.lastHiddenFocusableElement.parentNode.removeChild(this.lastHiddenFocusableElement)}getComputedSelector(e){return`:not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])${e??""}`}createHiddenFocusableElements(){let e="0",n=i=>ct("span",{class:"p-hidden-accessible p-hidden-focusable",tabindex:e,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:i?.bind(this)});this.firstHiddenFocusableElement=n(this.onFirstHiddenElementFocus),this.lastHiddenFocusableElement=n(this.onLastHiddenElementFocus),this.firstHiddenFocusableElement.setAttribute("data-pc-section","firstfocusableelement"),this.lastHiddenFocusableElement.setAttribute("data-pc-section","lastfocusableelement"),this.el.nativeElement.prepend(this.firstHiddenFocusableElement),this.el.nativeElement.append(this.lastHiddenFocusableElement)}onFirstHiddenElementFocus(e){let{currentTarget:n,relatedTarget:i}=e,l=i===this.lastHiddenFocusableElement||!this.el.nativeElement?.contains(i)?dt(n.parentElement,":not(.p-hidden-focusable)"):this.lastHiddenFocusableElement;Re(l)}onLastHiddenElementFocus(e){let{currentTarget:n,relatedTarget:i}=e,l=i===this.firstHiddenFocusableElement||!this.el.nativeElement?.contains(i)?mt(n.parentElement,":not(.p-hidden-focusable)"):this.firstHiddenFocusableElement;Re(l)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=k(t)))(i||t)}})();static \u0275dir=$e({type:t,selectors:[["","pFocusTrap",""]],inputs:{pFocusTrapDisabled:[2,"pFocusTrapDisabled","pFocusTrapDisabled",C]},features:[z,Ne]})}return t})();var Rt=["header"],Ft=["content"],Vt=["footer"],Qt=["closeicon"],Wt=["maximizeicon"],At=["minimizeicon"],Nt=["headless"],Xt=["titlebar"],jt=["*",[["p-footer"]]],Yt=["*","p-footer"],Zt=(t,r,e)=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex","justify-content":t,"align-items":r,"pointer-events":e}),$t=t=>({"p-dialog p-component":!0,"p-dialog-maximized":t}),qt=()=>({display:"flex","flex-direction":"column","pointer-events":"auto"}),Gt=(t,r)=>({transform:t,transition:r}),Kt=t=>({value:"visible",params:t});function Ut(t,r){t&1&&D(0)}function Jt(t,r){if(t&1&&(N(0),m(1,Ut,1,0,"ng-container",11),X()),t&2){let e=s(3);a(),o("ngTemplateOutlet",e._headlessTemplate||e.headlessTemplate||e.headlessT)}}function ei(t,r){if(t&1){let e=b();p(0,"div",15),u("mousedown",function(i){_(e);let l=s(4);return g(l.initResize(i))}),c()}if(t&2){let e=s(4);o("ngClass",e.cx("resizeHandle"))}}function ti(t,r){if(t&1&&(p(0,"span",21),R(1),c()),t&2){let e=s(5);o("id",e.ariaLabelledBy)("ngClass",e.cx("title")),a(),ee(e.header)}}function ii(t,r){t&1&&D(0)}function ni(t,r){if(t&1&&h(0,"span",18),t&2){let e=s(6);o("ngClass",e.maximized?e.minimizeIcon:e.maximizeIcon)}}function oi(t,r){t&1&&h(0,"WindowMaximizeIcon")}function ai(t,r){t&1&&h(0,"WindowMinimizeIcon")}function li(t,r){if(t&1&&(N(0),m(1,oi,1,0,"WindowMaximizeIcon",23)(2,ai,1,0,"WindowMinimizeIcon",23),X()),t&2){let e=s(6);a(),o("ngIf",!e.maximized&&!e._maximizeiconTemplate&&!e.maximizeIconTemplate&&!e.maximizeIconT),a(),o("ngIf",e.maximized&&!e._minimizeiconTemplate&&!e.minimizeIconTemplate&&!e.minimizeIconT)}}function ri(t,r){}function si(t,r){t&1&&m(0,ri,0,0,"ng-template")}function pi(t,r){if(t&1&&(N(0),m(1,si,1,0,null,11),X()),t&2){let e=s(6);a(),o("ngTemplateOutlet",e._maximizeiconTemplate||e.maximizeIconTemplate||e.maximizeIconT)}}function ci(t,r){}function di(t,r){t&1&&m(0,ci,0,0,"ng-template")}function mi(t,r){if(t&1&&(N(0),m(1,di,1,0,null,11),X()),t&2){let e=s(6);a(),o("ngTemplateOutlet",e._minimizeiconTemplate||e.minimizeIconTemplate||e.minimizeIconT)}}function _i(t,r){if(t&1){let e=b();p(0,"p-button",22),u("onClick",function(){_(e);let i=s(5);return g(i.maximize())})("keydown.enter",function(){_(e);let i=s(5);return g(i.maximize())}),m(1,ni,1,1,"span",14)(2,li,3,2,"ng-container",23)(3,pi,2,1,"ng-container",23)(4,mi,2,1,"ng-container",23),c()}if(t&2){let e=s(5);o("styleClass",e.cx("pcMaximizeButton"))("tabindex",e.maximizable?"0":"-1")("ariaLabel",e.maximizeLabel)("buttonProps",e.maximizeButtonProps),a(),o("ngIf",e.maximizeIcon&&!e._maximizeiconTemplate&&!e._minimizeiconTemplate),a(),o("ngIf",!e.maximizeIcon&&!(e.maximizeButtonProps!=null&&e.maximizeButtonProps.icon)),a(),o("ngIf",!e.maximized),a(),o("ngIf",e.maximized)}}function gi(t,r){if(t&1&&h(0,"span",18),t&2){let e=s(8);o("ngClass",e.closeIcon)}}function ui(t,r){t&1&&h(0,"TimesIcon")}function hi(t,r){if(t&1&&(N(0),m(1,gi,1,1,"span",14)(2,ui,1,0,"TimesIcon",23),X()),t&2){let e=s(7);a(),o("ngIf",e.closeIcon),a(),o("ngIf",!e.closeIcon)}}function fi(t,r){}function bi(t,r){t&1&&m(0,fi,0,0,"ng-template")}function Ci(t,r){if(t&1&&(p(0,"span"),m(1,bi,1,0,null,11),c()),t&2){let e=s(7);a(),o("ngTemplateOutlet",e._closeiconTemplate||e.closeIconTemplate||e.closeIconT)}}function yi(t,r){if(t&1&&m(0,hi,3,2,"ng-container",23)(1,Ci,2,1,"span",23),t&2){let e=s(6);o("ngIf",!e._closeiconTemplate&&!e.closeIconTemplate&&!e.closeIconT&&!(e.closeButtonProps!=null&&e.closeButtonProps.icon)),a(),o("ngIf",e._closeiconTemplate||e.closeIconTemplate||e.closeIconT)}}function xi(t,r){if(t&1){let e=b();p(0,"p-button",24),u("onClick",function(i){_(e);let l=s(5);return g(l.close(i))})("keydown.enter",function(i){_(e);let l=s(5);return g(l.close(i))}),m(1,yi,2,2,"ng-template",null,4,Y),c()}if(t&2){let e=s(5);o("styleClass",e.cx("pcCloseButton"))("ariaLabel",e.closeAriaLabel)("tabindex",e.closeTabindex)("buttonProps",e.closeButtonProps)}}function vi(t,r){if(t&1){let e=b();p(0,"div",16,3),u("mousedown",function(i){_(e);let l=s(4);return g(l.initDrag(i))}),m(2,ti,2,3,"span",17)(3,ii,1,0,"ng-container",11),p(4,"div",18),m(5,_i,5,8,"p-button",19)(6,xi,3,4,"p-button",20),c()()}if(t&2){let e=s(4);o("ngClass",e.cx("header")),a(2),o("ngIf",!e._headerTemplate&&!e.headerTemplate&&!e.headerT),a(),o("ngTemplateOutlet",e._headerTemplate||e.headerTemplate||e.headerT),a(),o("ngClass",e.cx("headerActions")),a(),o("ngIf",e.maximizable),a(),o("ngIf",e.closable)}}function Ti(t,r){t&1&&D(0)}function wi(t,r){t&1&&D(0)}function ki(t,r){if(t&1&&(p(0,"div",18,5),J(2,1),m(3,wi,1,0,"ng-container",11),c()),t&2){let e=s(4);o("ngClass",e.cx("footer")),a(3),o("ngTemplateOutlet",e._footerTemplate||e.footerTemplate||e.footerT)}}function Ii(t,r){if(t&1&&(m(0,ei,1,1,"div",12)(1,vi,7,6,"div",13),p(2,"div",7,2),J(4),m(5,Ti,1,0,"ng-container",11),c(),m(6,ki,4,2,"div",14)),t&2){let e=s(3);o("ngIf",e.resizable),a(),o("ngIf",e.showHeader),a(),S(e.contentStyleClass),o("ngClass",e.cx("content"))("ngStyle",e.contentStyle),T("data-pc-section","content"),a(3),o("ngTemplateOutlet",e._contentTemplate||e.contentTemplate||e.contentT),a(),o("ngIf",e._footerTemplate||e.footerTemplate||e.footerT)}}function Mi(t,r){if(t&1){let e=b();p(0,"div",9,0),u("@animation.start",function(i){_(e);let l=s(2);return g(l.onAnimationStart(i))})("@animation.done",function(i){_(e);let l=s(2);return g(l.onAnimationEnd(i))}),m(2,Jt,2,1,"ng-container",10)(3,Ii,7,9,"ng-template",null,1,Y),c()}if(t&2){let e=_e(4),n=s(2);A(n.style),S(n.styleClass),o("ngClass",Q(13,$t,n.maximizable&&n.maximized))("ngStyle",fe(15,qt))("pFocusTrapDisabled",n.focusTrap===!1)("@animation",Q(19,Kt,Ge(16,Gt,n.transformOptions,n.transitionOptions))),T("role",n.role)("aria-labelledby",n.ariaLabelledBy)("aria-modal",!0),a(2),o("ngIf",n._headlessTemplate||n.headlessTemplate||n.headlessT)("ngIfElse",e)}}function zi(t,r){if(t&1&&(p(0,"div",7),m(1,Mi,5,21,"div",8),c()),t&2){let e=s();A(e.maskStyle),S(e.maskStyleClass),o("ngClass",e.maskClass)("ngStyle",Ke(7,Zt,e.position==="left"||e.position==="topleft"||e.position==="bottomleft"?"flex-start":e.position==="right"||e.position==="topright"||e.position==="bottomright"?"flex-end":"center",e.position==="top"||e.position==="topleft"||e.position==="topright"?"flex-start":e.position==="bottom"||e.position==="bottomleft"||e.position==="bottomright"?"flex-end":"center",e.modal?"auto":"none")),a(),o("ngIf",e.visible)}}var Si=({dt:t})=>`
|
|
1
|
+
import{a as ft}from"./chunk-VM56C6ZV.js";import{a as Mt,i as zt}from"./chunk-FNGX2XFA.js";import{a as rt,b as st}from"./chunk-BFEM6LX7.js";import{a as q,b as ht,f as Qe,h as Ie,j as bt,k as Ct,l as yt,m as xt,n as vt,o as Tt,w as Me,x as wt,y as kt,z as It}from"./chunk-O44DI62I.js";import{A as ve,B as Le,C as Te,D as Oe,E as He,Ea as W,J as Be,L as pt,Ma as gt,Na as O,O as ct,Oa as ut,S as Re,V as dt,Va as ke,_ as mt,aa as we,b as nt,e as ot,j as at,na as _t,x as lt,z as oe}from"./chunk-MGIEURA2.js";import{c as it}from"./chunk-H6JPNVHO.js";import{c as tt,d as De,f as Ee,h as Fe,i as Ve,k as Pe}from"./chunk-F2X3VGZZ.js";import{a as et,j as Z,m as Ce,n as ye,o as xe,u as $,x as ne}from"./chunk-DM2JLWKE.js";import{$b as D,$c as be,Aa as L,Ab as $e,Ba as Xe,Cb as z,Da as pe,Dc as j,Ea as v,Eb as m,Ec as fe,Fc as Q,Gc as Ge,Ha as je,Hc as Ke,La as Ye,Lb as T,Mb as o,Ob as qe,Oc as te,Pb as A,Pc as ie,Qb as S,Rb as E,Sc as Y,Wb as p,Xb as c,Yb as h,Zb as N,_b as X,_c as C,ac as b,bd as Ue,ca as re,cd as Je,da as K,fc as u,gb as Ze,gc as s,hc as de,ia as I,ib as a,ic as J,lc as w,mc as me,nc as y,oc as x,pa as Ne,qa as _,ra as g,rc as _e,sa as se,sc as R,tb as ce,tc as ee,ua as k,uc as Se,xc as ge,yb as M,yc as ue,zb as U,zc as he}from"./chunk-6QJHEOXN.js";import{a as P,b as ze}from"./chunk-YQFG5XE2.js";var St=(()=>{class t extends Ie{pathId;ngOnInit(){this.pathId="url(#"+W()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=k(t)))(i||t)}})();static \u0275cmp=M({type:t,selectors:[["WindowMaximizeIcon"]],features:[z],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&(se(),p(0,"svg",0)(1,"g"),h(2,"path",1),c(),p(3,"defs")(4,"clipPath",2),h(5,"rect",3),c()()()),n&2&&(S(i.getClassNames()),T("aria-label",i.ariaLabel)("aria-hidden",i.ariaHidden)("role",i.role),a(),T("clip-path",i.pathId),a(3),o("id",i.pathId))},encapsulation:2})}return t})();var Dt=(()=>{class t extends Ie{pathId;ngOnInit(){this.pathId="url(#"+W()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=k(t)))(i||t)}})();static \u0275cmp=M({type:t,selectors:[["WindowMinimizeIcon"]],features:[z],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&(se(),p(0,"svg",0)(1,"g"),h(2,"path",1),c(),p(3,"defs")(4,"clipPath",2),h(5,"rect",3),c()()()),n&2&&(S(i.getClassNames()),T("aria-label",i.ariaLabel)("aria-hidden",i.ariaHidden)("role",i.role),a(),T("clip-path",i.pathId),a(3),o("id",i.pathId))},encapsulation:2})}return t})();var Et=(()=>{class t extends q{pFocusTrapDisabled=!1;platformId=I(Ye);document=I(et);firstHiddenFocusableElement;lastHiddenFocusableElement;ngOnInit(){super.ngOnInit(),ne(this.platformId)&&!this.pFocusTrapDisabled&&!this.firstHiddenFocusableElement&&!this.lastHiddenFocusableElement&&this.createHiddenFocusableElements()}ngOnChanges(e){super.ngOnChanges(e),e.pFocusTrapDisabled&&ne(this.platformId)&&(e.pFocusTrapDisabled.currentValue?this.removeHiddenFocusableElements():this.createHiddenFocusableElements())}removeHiddenFocusableElements(){this.firstHiddenFocusableElement&&this.firstHiddenFocusableElement.parentNode&&this.firstHiddenFocusableElement.parentNode.removeChild(this.firstHiddenFocusableElement),this.lastHiddenFocusableElement&&this.lastHiddenFocusableElement.parentNode&&this.lastHiddenFocusableElement.parentNode.removeChild(this.lastHiddenFocusableElement)}getComputedSelector(e){return`:not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])${e??""}`}createHiddenFocusableElements(){let e="0",n=i=>ct("span",{class:"p-hidden-accessible p-hidden-focusable",tabindex:e,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:i?.bind(this)});this.firstHiddenFocusableElement=n(this.onFirstHiddenElementFocus),this.lastHiddenFocusableElement=n(this.onLastHiddenElementFocus),this.firstHiddenFocusableElement.setAttribute("data-pc-section","firstfocusableelement"),this.lastHiddenFocusableElement.setAttribute("data-pc-section","lastfocusableelement"),this.el.nativeElement.prepend(this.firstHiddenFocusableElement),this.el.nativeElement.append(this.lastHiddenFocusableElement)}onFirstHiddenElementFocus(e){let{currentTarget:n,relatedTarget:i}=e,l=i===this.lastHiddenFocusableElement||!this.el.nativeElement?.contains(i)?dt(n.parentElement,":not(.p-hidden-focusable)"):this.lastHiddenFocusableElement;Re(l)}onLastHiddenElementFocus(e){let{currentTarget:n,relatedTarget:i}=e,l=i===this.firstHiddenFocusableElement||!this.el.nativeElement?.contains(i)?mt(n.parentElement,":not(.p-hidden-focusable)"):this.firstHiddenFocusableElement;Re(l)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=k(t)))(i||t)}})();static \u0275dir=$e({type:t,selectors:[["","pFocusTrap",""]],inputs:{pFocusTrapDisabled:[2,"pFocusTrapDisabled","pFocusTrapDisabled",C]},features:[z,Ne]})}return t})();var Rt=["header"],Ft=["content"],Vt=["footer"],Qt=["closeicon"],Wt=["maximizeicon"],At=["minimizeicon"],Nt=["headless"],Xt=["titlebar"],jt=["*",[["p-footer"]]],Yt=["*","p-footer"],Zt=(t,r,e)=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex","justify-content":t,"align-items":r,"pointer-events":e}),$t=t=>({"p-dialog p-component":!0,"p-dialog-maximized":t}),qt=()=>({display:"flex","flex-direction":"column","pointer-events":"auto"}),Gt=(t,r)=>({transform:t,transition:r}),Kt=t=>({value:"visible",params:t});function Ut(t,r){t&1&&D(0)}function Jt(t,r){if(t&1&&(N(0),m(1,Ut,1,0,"ng-container",11),X()),t&2){let e=s(3);a(),o("ngTemplateOutlet",e._headlessTemplate||e.headlessTemplate||e.headlessT)}}function ei(t,r){if(t&1){let e=b();p(0,"div",15),u("mousedown",function(i){_(e);let l=s(4);return g(l.initResize(i))}),c()}if(t&2){let e=s(4);o("ngClass",e.cx("resizeHandle"))}}function ti(t,r){if(t&1&&(p(0,"span",21),R(1),c()),t&2){let e=s(5);o("id",e.ariaLabelledBy)("ngClass",e.cx("title")),a(),ee(e.header)}}function ii(t,r){t&1&&D(0)}function ni(t,r){if(t&1&&h(0,"span",18),t&2){let e=s(6);o("ngClass",e.maximized?e.minimizeIcon:e.maximizeIcon)}}function oi(t,r){t&1&&h(0,"WindowMaximizeIcon")}function ai(t,r){t&1&&h(0,"WindowMinimizeIcon")}function li(t,r){if(t&1&&(N(0),m(1,oi,1,0,"WindowMaximizeIcon",23)(2,ai,1,0,"WindowMinimizeIcon",23),X()),t&2){let e=s(6);a(),o("ngIf",!e.maximized&&!e._maximizeiconTemplate&&!e.maximizeIconTemplate&&!e.maximizeIconT),a(),o("ngIf",e.maximized&&!e._minimizeiconTemplate&&!e.minimizeIconTemplate&&!e.minimizeIconT)}}function ri(t,r){}function si(t,r){t&1&&m(0,ri,0,0,"ng-template")}function pi(t,r){if(t&1&&(N(0),m(1,si,1,0,null,11),X()),t&2){let e=s(6);a(),o("ngTemplateOutlet",e._maximizeiconTemplate||e.maximizeIconTemplate||e.maximizeIconT)}}function ci(t,r){}function di(t,r){t&1&&m(0,ci,0,0,"ng-template")}function mi(t,r){if(t&1&&(N(0),m(1,di,1,0,null,11),X()),t&2){let e=s(6);a(),o("ngTemplateOutlet",e._minimizeiconTemplate||e.minimizeIconTemplate||e.minimizeIconT)}}function _i(t,r){if(t&1){let e=b();p(0,"p-button",22),u("onClick",function(){_(e);let i=s(5);return g(i.maximize())})("keydown.enter",function(){_(e);let i=s(5);return g(i.maximize())}),m(1,ni,1,1,"span",14)(2,li,3,2,"ng-container",23)(3,pi,2,1,"ng-container",23)(4,mi,2,1,"ng-container",23),c()}if(t&2){let e=s(5);o("styleClass",e.cx("pcMaximizeButton"))("tabindex",e.maximizable?"0":"-1")("ariaLabel",e.maximizeLabel)("buttonProps",e.maximizeButtonProps),a(),o("ngIf",e.maximizeIcon&&!e._maximizeiconTemplate&&!e._minimizeiconTemplate),a(),o("ngIf",!e.maximizeIcon&&!(e.maximizeButtonProps!=null&&e.maximizeButtonProps.icon)),a(),o("ngIf",!e.maximized),a(),o("ngIf",e.maximized)}}function gi(t,r){if(t&1&&h(0,"span",18),t&2){let e=s(8);o("ngClass",e.closeIcon)}}function ui(t,r){t&1&&h(0,"TimesIcon")}function hi(t,r){if(t&1&&(N(0),m(1,gi,1,1,"span",14)(2,ui,1,0,"TimesIcon",23),X()),t&2){let e=s(7);a(),o("ngIf",e.closeIcon),a(),o("ngIf",!e.closeIcon)}}function fi(t,r){}function bi(t,r){t&1&&m(0,fi,0,0,"ng-template")}function Ci(t,r){if(t&1&&(p(0,"span"),m(1,bi,1,0,null,11),c()),t&2){let e=s(7);a(),o("ngTemplateOutlet",e._closeiconTemplate||e.closeIconTemplate||e.closeIconT)}}function yi(t,r){if(t&1&&m(0,hi,3,2,"ng-container",23)(1,Ci,2,1,"span",23),t&2){let e=s(6);o("ngIf",!e._closeiconTemplate&&!e.closeIconTemplate&&!e.closeIconT&&!(e.closeButtonProps!=null&&e.closeButtonProps.icon)),a(),o("ngIf",e._closeiconTemplate||e.closeIconTemplate||e.closeIconT)}}function xi(t,r){if(t&1){let e=b();p(0,"p-button",24),u("onClick",function(i){_(e);let l=s(5);return g(l.close(i))})("keydown.enter",function(i){_(e);let l=s(5);return g(l.close(i))}),m(1,yi,2,2,"ng-template",null,4,Y),c()}if(t&2){let e=s(5);o("styleClass",e.cx("pcCloseButton"))("ariaLabel",e.closeAriaLabel)("tabindex",e.closeTabindex)("buttonProps",e.closeButtonProps)}}function vi(t,r){if(t&1){let e=b();p(0,"div",16,3),u("mousedown",function(i){_(e);let l=s(4);return g(l.initDrag(i))}),m(2,ti,2,3,"span",17)(3,ii,1,0,"ng-container",11),p(4,"div",18),m(5,_i,5,8,"p-button",19)(6,xi,3,4,"p-button",20),c()()}if(t&2){let e=s(4);o("ngClass",e.cx("header")),a(2),o("ngIf",!e._headerTemplate&&!e.headerTemplate&&!e.headerT),a(),o("ngTemplateOutlet",e._headerTemplate||e.headerTemplate||e.headerT),a(),o("ngClass",e.cx("headerActions")),a(),o("ngIf",e.maximizable),a(),o("ngIf",e.closable)}}function Ti(t,r){t&1&&D(0)}function wi(t,r){t&1&&D(0)}function ki(t,r){if(t&1&&(p(0,"div",18,5),J(2,1),m(3,wi,1,0,"ng-container",11),c()),t&2){let e=s(4);o("ngClass",e.cx("footer")),a(3),o("ngTemplateOutlet",e._footerTemplate||e.footerTemplate||e.footerT)}}function Ii(t,r){if(t&1&&(m(0,ei,1,1,"div",12)(1,vi,7,6,"div",13),p(2,"div",7,2),J(4),m(5,Ti,1,0,"ng-container",11),c(),m(6,ki,4,2,"div",14)),t&2){let e=s(3);o("ngIf",e.resizable),a(),o("ngIf",e.showHeader),a(),S(e.contentStyleClass),o("ngClass",e.cx("content"))("ngStyle",e.contentStyle),T("data-pc-section","content"),a(3),o("ngTemplateOutlet",e._contentTemplate||e.contentTemplate||e.contentT),a(),o("ngIf",e._footerTemplate||e.footerTemplate||e.footerT)}}function Mi(t,r){if(t&1){let e=b();p(0,"div",9,0),u("@animation.start",function(i){_(e);let l=s(2);return g(l.onAnimationStart(i))})("@animation.done",function(i){_(e);let l=s(2);return g(l.onAnimationEnd(i))}),m(2,Jt,2,1,"ng-container",10)(3,Ii,7,9,"ng-template",null,1,Y),c()}if(t&2){let e=_e(4),n=s(2);A(n.style),S(n.styleClass),o("ngClass",Q(13,$t,n.maximizable&&n.maximized))("ngStyle",fe(15,qt))("pFocusTrapDisabled",n.focusTrap===!1)("@animation",Q(19,Kt,Ge(16,Gt,n.transformOptions,n.transitionOptions))),T("role",n.role)("aria-labelledby",n.ariaLabelledBy)("aria-modal",!0),a(2),o("ngIf",n._headlessTemplate||n.headlessTemplate||n.headlessT)("ngIfElse",e)}}function zi(t,r){if(t&1&&(p(0,"div",7),m(1,Mi,5,21,"div",8),c()),t&2){let e=s();A(e.maskStyle),S(e.maskStyleClass),o("ngClass",e.maskClass)("ngStyle",Ke(7,Zt,e.position==="left"||e.position==="topleft"||e.position==="bottomleft"?"flex-start":e.position==="right"||e.position==="topright"||e.position==="bottomright"?"flex-end":"center",e.position==="top"||e.position==="topleft"||e.position==="topright"?"flex-start":e.position==="bottom"||e.position==="bottomleft"||e.position==="bottomright"?"flex-end":"center",e.modal?"auto":"none")),a(),o("ngIf",e.visible)}}var Si=({dt:t})=>`
|
|
2
2
|
.p-dialog {
|
|
3
3
|
max-height: 90%;
|
|
4
4
|
transform: scale(1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as E}from"./chunk-
|
|
1
|
+
import{b as E}from"./chunk-ZVDGEDMP.js";import{b as w}from"./chunk-5U7KZJ3H.js";import{a as T,b as j}from"./chunk-FHJOSHI3.js";import{b as P}from"./chunk-ISIYG4D5.js";import{x as b}from"./chunk-O44DI62I.js";import{a as y}from"./chunk-G3BJCT7T.js";import{d as _}from"./chunk-KL3TPLRB.js";import{s as O,u as A}from"./chunk-DM2JLWKE.js";import{Ea as c,Eb as C,Oc as M,Qc as S,Sc as a,Wb as i,Xb as r,Yb as x,ca as s,gc as m,ia as g,ib as u,sc as p,tc as v,uc as l,yb as h}from"./chunk-6QJHEOXN.js";var N=(()=>{class t{constructor(){this.httpService=g(y),this.dayjs=g(E)}migrateTaxAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/tax",{})}getManualJournalCount(){return this.httpService.get(void 0,"api/migrate/accounting/journalheader-count",{})}getCOACount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountcount",{})}getCOAConfigurationCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountConfigcount",{})}getCOACategoryCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountCategorycount",{})}getOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/outletaccount-count",{})}getPaymentMethodAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/paymentmethodaccountcount",{})}getWriteOffOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/writeoffoutletaccountCount",{})}getTaxAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/taxcount",{})}getExpenseAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/expenseaccountcount",{})}migrateCoaAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccount",{})}migrateCoaConfig(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountConfig",{})}migrateCoaCategory(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountCategory",{})}migrateOutletAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/outletaccount",{})}migrateManualJournal(e){let n={From:e.From?this.dayjs.from(e.From).format():null,To:e.To?this.dayjs.from(e.To).format():null,PageNumber:e.PageNumber||1,PageSize:e.PageSize||50},o=new _;return Object.keys(n).forEach(f=>{o=o.append(f,n[f])}),this.httpService.get(void 0,"api/migrate/accounting/journalheader",{params:o})}formatManualCOA(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa",{})}formatExpenseAccount(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-expenseaccount",{})}formatWriteOff(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-writeoff",{})}formatManualCOAConfig(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa-config",{})}formatOutletAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-outlet-account",{})}formatPaymentAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-paymentmethod",{})}formatTaxAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-tax",{})}formatManualJournal(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-journal",{})}formatManualCOACategory(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-coag",{})}migratePaymentMethod(){return this.httpService.post(void 0,"api/Migrate/accounting/paymentmethodaccount",{})}migrateWriteOffOutlet(){return this.httpService.post(void 0,"api/Migrate/accounting/writeoffoutletaccount",{})}migrateExpenseAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/expenseaccount",{})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=s({token:t,factory:t.\u0275fac})}}return t})();function F(t,d){t&1&&(i(0,"div",5)(1,"div",6),x(2,"i",7),r()())}function I(t,d){if(t&1&&(i(0,"div",8),p(1),M(2,"number"),r()),t&2){let e=m();u(),l(" ",S(2,1,e.migrationCount(),"1.0-0")," ")}}function D(t,d){if(t&1&&(i(0,"div",9),p(1),r()),t&2){let e=m();u(),l(" ",e.migrationTitle()," ")}}function R(t,d){if(t&1&&(i(0,"div",10)(1,"div",11),p(2),r()()),t&2){let e=m();u(2),v(e.migrationPlace())}}var q=(()=>{class t{constructor(){this.migrationTitle=c(),this.migrationCount=c(),this.migrationPlace=c()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=h({type:t,selectors:[["app-migration-cards"]],inputs:{migrationTitle:[1,"migrationTitle"],migrationCount:[1,"migrationCount"],migrationPlace:[1,"migrationPlace"]},decls:9,vars:0,consts:[["header",""],["title",""],["subtitle",""],["footer",""],[1,"text-center","flex","flex-column","justify-content-center","align-items-center","card-shadow","responsive-card"],[1,"d-flex","justify-content-center"],[1,"d-flex","justify-content-center","align-items-center","mt-4",2,"width","60px","height","60px","background-color","#e0f0ff","border-radius","50%"],[1,"icon","fa-file-lines","fa-light",2,"font-size","25px","color","#007bff"],[1,"bigscale","fw-bold"],[1,"text-sm","text-secondary"],[1,"flex","mt-5"],[1,"p-6","fs-7","fw-bold"]],template:function(n,o){n&1&&(i(0,"p-card",4),C(1,F,3,0,"ng-template",null,0,a)(3,I,3,4,"ng-template",null,1,a)(5,D,2,1,"ng-template",null,2,a)(7,R,3,1,"ng-template",null,3,a),r())},dependencies:[A,O,j,T,b,w,P],styles:["[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}[_nghost-%COMP%] .p-card{box-shadow:0 .25rem 1.25rem #0000001a!important;width:21.875rem!important;height:25rem!important}@media (max-width: 85rem){[_nghost-%COMP%] .p-card{width:18.875rem!important;height:21rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:2rem!important;margin-top:1rem!important}}@media (min-width: 85.001rem) and (max-width: 97.999rem){[_nghost-%COMP%] .p-card{width:21rem!important;height:25rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}}@media (min-width: 98rem){[_nghost-%COMP%] .p-card{width:25rem!important;height:28rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:5rem!important;margin-top:2rem!important}}"]})}}return t})();export{N as a,q as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ze,b as et,c as tt,d as nt,e as ot,f as it}from"./chunk-TAN6GLIH.js";import{a as Xe}from"./chunk-YHLRDTIS.js";import{m as Y}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{a as fe,b as ge}from"./chunk-3VQUNDVT.js";import{b as se,c as Ke,g as qe,h as Qe,i as ie}from"./chunk-52EMI2TW.js";import"./chunk-AAKZYXG3.js";import"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import{a as Ne}from"./chunk-BT7Y4ADP.js";import{a as le,b as me}from"./chunk-5U7KZJ3H.js";import"./chunk-MJGBBYIO.js";import"./chunk-CN6AT4LE.js";import{a as j,b as U}from"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-II7KELI4.js";import"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import{a as Re,b as q}from"./chunk-FHJOSHI3.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{i as M}from"./chunk-YI5IYWUO.js";import"./chunk-VM56C6ZV.js";import{a as K,b as W}from"./chunk-ISIYG4D5.js";import{b as Z,c as Te,d as we,e as Me,f as De,g as Ae,h as Je}from"./chunk-FNGX2XFA.js";import"./chunk-ALLR2NXQ.js";import"./chunk-BFEM6LX7.js";import{o as Ye,w as N,x as G}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{e as $,f as Pe,j as oe,k as be,m as Oe,n as Ee,o as He,p as Ie,v as Fe,x as J,y as pe}from"./chunk-MGIEURA2.js";import{b as re,d as ze,e as D,l as A}from"./chunk-DZCJWJUG.js";import"./chunk-YZ76QE4R.js";import{a as ye}from"./chunk-G3BJCT7T.js";import"./chunk-JBYPGHPN.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import"./chunk-KL3TPLRB.js";import{m as V,q as Ue,u as w}from"./chunk-DM2JLWKE.js";import{Dc as ve,Eb as f,Ec as H,Fc as ae,Ha as E,Mb as c,Oc as $e,Pb as X,Pc as We,Rb as B,Sb as P,Sc as u,Ub as b,Vb as O,Wb as r,Xb as a,Y as z,Yb as te,_ as F,ac as v,bd as ne,c as _e,ca as Se,cd as je,fc as y,gc as s,ia as C,ib as p,qa as h,ra as S,s as ee,sc as m,tc as g,uc as I,wc as Ve,yb as T}from"./chunk-6QJHEOXN.js";import{a as _,b as x}from"./chunk-YQFG5XE2.js";var R=(()=>{class t{constructor(){this.httpService=C(ye)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(e){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration",{params:e})}fetchPOSOutletFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/Setup/OutletConfigurationForm",n)}updatePOSOutletConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitOutletConfiguration",e)}fetchPOSPaymentConfiguration(e){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration",{params:e})}fetchPOSPaymentFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"api/Setup/PaymentConfigurationForm",n)}updatePOSPaymentConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitPaymentConfiguration",e)}fetchPOSTaxConfiguration(){return this.httpService.get(void 0,"/api/setup/TaxConfigurationForm")}updatePOSTaxConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitTaxConfiguration",e)}fetchPOSWriteOffConfiguration(){return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationList")}fetchPOSWriteOffFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationForm",n)}updatePOSWriteOffConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitWriteOffConfiguration",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=Se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var k=function(t){return t.POSGLOBAL_SELL="Sell",t.POSGLOBAL_BUY="Buy",t.POSGLOBAL_ADJUSTMENT="Adjustment",t.POSGLOBAL_PREPAID="Prepaid",t.POSGLOBAL_RETURN="Return",t.POSGLOBAL_DEBT="Debt",t.POSGLOBAL_PAYMENTFEE="Payment Fee",t.POSGLOBAL_MANUFACTURING="Manufacturing",t.POSGLOBAL_ADVANCE="Advance",t}(k||{});var at={[k.POSGLOBAL_SELL]:[{typeID:2,side:"debit",label:"Account Receivable"},{typeID:1,side:"credit",label:"Sales"},{typeID:4,side:"debit",label:"COGS"},{typeID:3,side:"credit",label:"Sold Inventory"},{typeID:10,side:"debit",label:"Sales Discount"},{typeID:31,side:"credit",label:"Sold Non-Inventory"}],[k.POSGLOBAL_BUY]:[{typeID:27,side:"debit",label:"Pending Paid Inventory"},{typeID:5,side:"credit",label:"Account Payable"},{typeID:28,side:"debit",label:"Inventory Bought"},{typeID:27,side:"credit",label:"Pending Paid Inventory"},{typeID:11,side:"credit",label:"Purchase Discount"}],[k.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[k.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[k.POSGLOBAL_RETURN]:[{typeID:8,side:"debit",label:"Sales Return"},{typeID:3,side:"debit",label:"Inventory"},{typeID:4,side:"credit",label:"COGS"},{typeID:9,side:"credit",label:"Purchase Return"}],[k.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[k.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[k.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[k.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function gt(t,i){if(t&1){let e=v();r(0,"p-button",7),y("onClick",function(){h(e);let o=s(2);return S(o.onSubmit())}),a()}}function xt(t,i){if(t&1&&(r(0,"div",5),f(1,gt,1,0,"p-button",6),a()),t&2){let e=s();p(),B(e.roleService.permissions().posSetup.edit?1:-1)}}function Ct(t,i){if(t&1&&(r(0,"p-tab",11),m(1),a()),t&2){let e=i.$implicit;c("value",e.value),p(),g(e.label)}}function ht(t,i){if(t&1&&(r(0,"div",20)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function St(t,i){if(t&1&&(r(0,"div",20)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function vt(t,i){if(t&1&&(r(0,"div",15)(1,"div",16)(2,"div",5)(3,"label",17),m(4),a(),r(5,"span",18),m(6),a()(),r(7,"p-select",19),f(8,ht,7,2,"ng-template",null,2,u)(10,St,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),g(e.entry.value.label),p(2),g(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function yt(t,i){if(t&1&&(r(0,"div",20)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function Pt(t,i){if(t&1&&(r(0,"div",20)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function bt(t,i){if(t&1&&(r(0,"div",15)(1,"div",16)(2,"div",5)(3,"label",17),m(4),a(),r(5,"span",21),m(6),a()(),r(7,"p-select",19),f(8,yt,7,2,"ng-template",null,2,u)(10,Pt,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),g(e.entry.value.label),p(2),g(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function Ot(t,i){if(t&1&&(r(0,"p-tabpanel",11)(1,"div",12)(2,"div",13)(3,"div",14),b(4,vt,12,4,"div",15,P),a()(),r(6,"div",13)(7,"div",14),b(8,bt,12,4,"div",15,P),a()()()()),t&2){let e=i.$implicit,n=s(3);c("value",e.value),p(),c("formGroupName",e.value),p(3),O(n.getDebitEntries(e.value)),p(4),O(n.getCreditEntries(e.value))}}function Et(t,i){if(t&1){let e=v();r(0,"form",9),y("ngSubmit",function(){h(e);let o=s(2);return S(o.onSubmit())}),r(1,"p-tabs",10)(2,"p-tablist"),b(3,Ct,2,2,"p-tab",11,P),a(),r(5,"p-tabpanels"),b(6,Ot,10,2,"p-tabpanel",11,P),a()()()}if(t&2){let e=s(2);c("formGroup",e.accountForm),p(),c("value",e.tab())("lazy",!0),p(2),O(e.tabs()),p(3),O(e.tabs())}}function It(t,i){if(t&1&&f(0,Et,8,3,"form",8),t&2){let e=s();c("ngIf",e.posIntegration()&&e.accountForm)}}var rt=(()=>{class t{constructor(){this.posConfigService=C(R),this.fb=C(Fe),this.roleService=C(Y),this.tab=E(k.POSGLOBAL_SELL),this.tabs=E(Object.values(k).map(e=>({label:e,value:e}))),this.posIntegration=E(null),this.form=E([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=k}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(F(e=>{this.posIntegration.set(e),this.form.set(e.form),this.descriptionsMap=new Map(e.descriptions.map(n=>[+n.id,n.name])),this.initializeForm()})).subscribe()}initializeForm(){let e={};this.tabs().forEach(n=>{let o=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,o),e[n.value]=this.fb.array(o.map(l=>this.createEntryFormGroup(l)))}),this.accountForm=this.fb.group(e)}createEntryFormGroup(e){let n=this.fb.group({typeID:[e.typeID],label:[e.label],side:[e.side],accountID:[this.getAccountIDByTypeID(e.typeID)]});return n.get("accountID").valueChanges.subscribe(o=>{this.syncAccountIDs(e.typeID,o,n)}),n}getAccountIDByTypeID(e){return this.form().find(o=>o.typeID===e)?.accountID||""}getEntriesForTab(e){return at[e]||[]}getTabEntries(e){return this.accountForm.get(e)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],o=new Set;for(let l of Object.values(e))for(let{typeID:d,accountID:L}of l){let de=`${d}_${L}`;o.has(de)||(o.add(de),n.push({typeID:d,accountID:L||Xe}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:l=>console.error("Save failed",l)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="credit")}syncAccountIDs(e,n,o){Object.values(this.accountForm.controls).forEach(l=>{l.controls.forEach(d=>{d!==o&&d.get("typeID")?.value===e&&d.get("accountID")?.value!==n&&d.get("accountID")?.setValue(n,{emitEvent:!1})})})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-global"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","POS Integration"],[1,"d-flex","gap-2"],["label","Submit"],["label","Submit",3,"onClick"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"border-top",3,"value","lazy"],[3,"value"],[1,"row",3,"formGroupName"],[1,"col"],[1,"row","gap-3"],[1,"col-12",3,"formGroupName"],[1,"form-group","d-flex","flex-column"],["for","",1,"fs-3"],[1,"text-success","fs-3"],["filter","","filterBy","code,name","formControlName","accountID","optionLabel","name","optionValue","id",3,"options"],[1,"d-flex","align-items-center","gap-2"],[1,"text-danger","fs-3"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),f(1,xt,2,1,"ng-template",null,0,u)(3,It,1,1,"ng-template",null,1,u),a())},dependencies:[M,it,ot,nt,tt,Ze,et,Ye,U,j,J,be,$,Pe,w,V,A,G,N,pe,Oe,Ie,Ee],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ft=t=>[t];function Tt(t,i){if(t&1&&(r(0,"th",7),m(1),a()),t&2){let e=i.$implicit;p(),g(e.name.slice(0,10))}}function wt(t,i){if(t&1&&(r(0,"tr")(1,"th",6),m(2,"Method"),a()(),r(3,"tr"),b(4,Tt,2,1,"th",7,P),a()),t&2){let e=s(3);p(4),O(e.paymentConfiguration().outlets)}}function Mt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),g(e.accountName)}}function Dt(t,i){if(t&1&&(r(0,"tr")(1,"td",8)(2,"a",9),m(3),a()(),b(4,Mt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",ae(2,Ft,e.id)),p(),g(e.name),p(),O(e.accounts)}}function At(t,i){if(t&1&&(r(0,"p-table",5),f(1,wt,6,0,"ng-template",null,1,u)(3,Dt,6,4,"ng-template",null,2,u),a()),t&2){let e=s(2);c("value",e.paymentConfiguration().payment)}}function Rt(t,i){if(t&1){let e=v();r(0,"app-main-panel",4),y("search",function(o){h(e);let l=s();return S(l.onSearch(o))}),f(1,At,5,1,"ng-template",null,0,u),a()}t&2&&c("isSearchableInput",!0)("scrollable",!0)}var lt=(()=>{class t{constructor(){this.POSSetupService=C(R),this.paymentConfiguration=E(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration({}).pipe(F(e=>{this.paymentConfiguration.set(e)})).subscribe()}onSearch(e){this.POSSetupService.fetchPOSPaymentConfiguration({Search:e}).pipe(F(n=>{this.paymentConfiguration.set(n)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",3,"isSearchableInput","scrollable","search",4,"ngIf"],["pageTitle","Payment Method Accounting",3,"search","isSearchableInput","scrollable"],[3,"value"],["rowspan","3",2,"min-width","300px"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&f(0,Rt,3,2,"app-main-panel",3),n&2&&c("ngIf",o.paymentConfiguration())},dependencies:[M,ie,se,Ke,w,V,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var kt={data:{listOutletAccount:[],listCOAType:[],pageNumber:1,pageSize:20,totalCount:0,totalPages:0},filter:{PageNumber:1,PageSize:20,Search:""}},Ge=Te(Ae(kt),we(t=>({first:ne(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:ne(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount))})),De(t=>{let i=C(R);return{updateFilter:n=>{Z(t,o=>x(_({},o),{filter:_(_({},o.filter),n)}))},getPOSOutlets:fe(_e(z(n=>i.fetchPOSOutletConfiguration(n).pipe(ge({next:o=>{Z(t,l=>x(_({},l),{data:o}))},error:o=>{console.error("Error fetching POS outlets:",o)}})))))}}),Me(t=>({onInit:()=>{t.getPOSOutlets(t.filter)}})));var Lt=t=>[t];function Nt(t,i){if(t&1&&(r(0,"th"),m(1),a()),t&2){let e=i.$implicit;p(),g(e.value)}}function Gt(t,i){if(t&1&&(r(0,"tr")(1,"th"),m(2,"Name"),a(),b(3,Nt,2,1,"th",null,P),a()),t&2){let e=s(2);p(3),O(e.store.data().listCOAType)}}function Bt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),g(e)}}function Vt(t,i){if(t&1&&(r(0,"tr")(1,"td")(2,"a",7),m(3),a()(),b(4,Bt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",ae(2,Lt,e.OutletID)),p(),I(" ",e.OutletName,""),p(),O(e.Accounts)}}function $t(t,i){if(t&1&&m(0),t&2){let e=s(2);Ve(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Wt(t,i){t&1&&(r(0,"tr")(1,"td",8)(2,"span"),m(3," No journal entries found. "),a()()())}function jt(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",6),y("onPage",function(o){h(e);let l=s();return S(l.onPage(o))}),f(2,Gt,5,0,"ng-template",null,1,u)(4,Vt,6,4,"ng-template",null,2,u)(6,$t,1,3,"ng-template",null,3,u)(8,Wt,4,0,"ng-template",null,4,u),a()()}if(t&2){let e=s();p(),c("value",e.store.data().listOutletAccount)("paginator",!0)("rows",e.store.filter().PageSize)("lazy",!0)("totalRecords",e.store.data().totalCount)}}var mt=(()=>{class t{constructor(){this.store=C(Ge)}onSearch(e){this.store.updateFilter({PageNumber:1,PageSize:20,Search:e})}onPage(e){let n=e.first/e.rows+1;this.store.updateFilter(x(_({},this.store.filter()),{PageSize:e.rows,PageNumber:n}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet"]],features:[ve([Ge])],decls:3,vars:2,consts:[["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Outlet Account",3,"search","isSearchableInput","scrollable"],["styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","value","paginator","rows","lazy","totalRecords"],[1,"link","link-primary",3,"routerLink"],["colspan","8"]],template:function(n,o){if(n&1){let l=v();r(0,"app-main-panel",5),y("search",function(L){return h(l),S(o.onSearch(L))}),f(1,jt,10,5,"ng-template",null,0,u),a()}n&2&&c("isSearchableInput",!0)("scrollable",!0)},dependencies:[M,w,q,ie,se,A,D,W,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ut=()=>({height:"calc(100vh - 100px)"}),zt=()=>({height:"calc(100vh - 150px)"});function Ht(t,i){if(t&1){let e=v();r(0,"p-button",7),y("onClick",function(){h(e);let o=s(2);return S(o.updatePOsOutletConfiguration())}),a()}}function Yt(t,i){if(t&1&&(r(0,"a",5),m(1,"Cancel"),a(),f(2,Ht,1,0,"p-button",6)),t&2){let e=s();p(2),B(e.roleService.permissions().posSetup.edit?2:-1)}}function Jt(t,i){if(t&1&&(r(0,"div",17)(1,"div",18)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",18),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function Kt(t,i){if(t&1&&(r(0,"div",17)(1,"div",18)(2,"span"),m(3),a()(),r(4,"div",19)(5,"span",18),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function qt(t,i){if(t&1&&(r(0,"div",13)(1,"span",15),m(2),a(),r(3,"p-select",16),f(4,Jt,7,2,"ng-template",null,2,u)(6,Kt,7,2,"ng-template",null,3,u),a()()),t&2){let e,n=i.$implicit,o=i.$index,l=s(3);c("formGroupName",o),p(2),g((e=n.get("TypeName"))==null?null:e.value),p(),c("options",l.options.accounts)}}function Qt(t,i){t&1&&te(0,"hr")}function Xt(t,i){if(t&1&&(r(0,"div",10)(1,"h3",11),m(2),$e(3,"titlecase"),a(),r(4,"div",12),b(5,qt,8,3,"div",13,P),a()(),f(7,Qt,1,0,"hr",14)),t&2){let e,n=i.$implicit,o=i.$index,l=i.$index,d=i.$count,L=s(2);c("formGroupName",o),p(2),I(" ",We(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),O(L.getAccountsFormArray(l).controls),p(2),c("ngIf",l!==d-1)}}function Zt(t,i){if(t&1&&(r(0,"p-panel")(1,"p-scroll-panel")(2,"form",8)(3,"div",9),b(4,Xt,8,5,null,null,P),a()()()()),t&2){let e=s();X(H(5,Ut)),p(),X(H(6,zt)),p(),c("formGroup",e.accountsForm),p(2),O(e.accountGroupsArray.controls)}}var st=(()=>{class t{constructor(){this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2,10],accounts:[]},{name:"delivery",typeIds:[3,4],accounts:[]},{name:"buy",typeIds:[27,11,28],accounts:[]},{name:"purchase return",typeIds:[9],accounts:[]},{name:"sales return",typeIds:[8],accounts:[]},{name:"adjustment",typeIds:[21,26],accounts:[]}],this.outletForm=E(null),this.roleService=C(Y),this.route=C(re),this.POSSetupService=C(R),this.fb=C(Fe)}get accountGroupsArray(){return this.accountsForm.get("accountGroups")}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(ee(e=>e.get("id")),z(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),F(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(o=>{o.accounts=this.allAccounts.filter(l=>o.typeIds.includes(l.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(o=>{n.push(this.createAccountGroupControl(o))})})).subscribe()}getAccountsFormArray(e){return this.accountGroupsArray.at(e).get("accounts")}updatePOsOutletConfiguration(){let{accountGroups:e}=this.accountsForm.value,n={form:e.flatMap(o=>o.accounts.map(l=>({AccountID:l.AccountID,TypeID:l.TypeID,TypeName:l.TypeName,OutletID:l.OutletID,OutletName:l.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}createAccountGroupControl(e){return this.fb.group({groupName:[e.name],accounts:this.fb.array(e.accounts.map(n=>this.createAccountControl(n)))})}createAccountControl(e){return this.fb.group({AccountID:[e.AccountID],TypeID:[e.TypeID],TypeName:[e.TypeName],OutletID:[e.OutletID],OutletName:[e.OutletName]})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet-form"]],decls:5,vars:2,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"hasMainWrapperPadding","pageTitle"],["routerLink","/pages/pos-setup/outlets",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit"],["label","Submit",3,"onClick"],[1,"",3,"formGroup"],["formArrayName","accountGroups",1,"d-flex","flex-column","gap-2"],[1,"row",3,"formGroupName"],[1,"fs-4","fw-semibold"],["formArrayName","accounts",1,"row","row-gap-3"],[1,"col-6",3,"formGroupName"],[4,"ngIf"],[1,"fs-3"],["filter","","filterBy","code,name","formControlName","AccountID","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-100",3,"options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),f(1,Yt,3,1,"ng-template",null,0,u)(3,Zt,6,7,"ng-template",null,1,u),a()),n&2&&c("hasMainWrapperPadding",!0)("pageTitle","Edit "+o.outletName)},dependencies:[M,w,V,Ue,q,pe,be,$,Pe,Oe,Ie,Ee,He,U,j,W,K,le,G,N,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var nn=()=>({height:"calc(100vh - 100px)"}),on=()=>({width:"100%",height:"calc(100vh - 150px)"}),an=()=>({width:"100%"});function rn(t,i){if(t&1){let e=v();r(0,"p-button",8),y("onClick",function(){h(e);let o=s(4);return S(o.updatePOSOutletConfiguration())}),a()}}function pn(t,i){if(t&1&&(r(0,"a",6),m(1,"Cancel"),a(),f(2,rn,1,0,"p-button",7)),t&2){let e=s(3);p(2),B(e.roleService.permissions().posSetup.edit?2:-1)}}function ln(t,i){if(t&1&&(r(0,"div",17)(1,"div",18)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",18),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function mn(t,i){if(t&1&&(r(0,"div",17)(1,"div",18)(2,"span"),m(3),a()(),r(4,"div",19)(5,"span",18),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function sn(t,i){if(t&1){let e=v();r(0,"div",10)(1,"div",11)(2,"div",12)(3,"label",13),m(4),a()(),te(5,"div",14),r(6,"div",15)(7,"p-select",16),y("ngModelChange",function(o){let l=h(e).$index,d=s(4);return S(d.updateAccountById(o,l))}),f(8,ln,7,2,"ng-template",null,2,u)(10,mn,7,2,"ng-template",null,3,u),a()()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(4);p(4),g(e.outletName.slice(0,15)),p(3),X(H(7,an)),c("ngModel",o.paymentForm().form.accounts[n].accountID)("options",o.paymentForm().options.chartOfAccount)("virtualScrollItemSize",50)("virtualScroll",!0)}}function cn(t,i){if(t&1&&(r(0,"p-card")(1,"p-scrollpanel")(2,"div",9),b(3,sn,12,8,"div",10,P),a()()()),t&2){let e=s(3);X(H(4,nn)),p(),X(H(5,on)),p(2),O(e.paymentForm().form.accounts)}}function un(t,i){if(t&1&&(r(0,"app-main-panel",4),f(1,pn,3,1,"ng-template",null,0,u)(3,cn,5,6,"ng-template",null,1,u),a()),t&2){let e=s(2);c("hasMainWrapperPadding",!0)("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")}}function dn(t,i){if(t&1&&f(0,un,5,2,"app-main-panel",5),t&2){let e=s();c("ngIf",e.paymentForm())}}var ct=(()=>{class t{constructor(){this.paymentForm=E(null),this.roleService=C(Y),this.route=C(re),this.POSSetupService=C(R),this.router=C(ze)}ngOnInit(){this.route.paramMap.pipe(ee(e=>+e.get("id")),z(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),F(e=>{this.paymentForm.set(e)}),Ne("response")).subscribe()}updateAccountById(e,n){let o=this.paymentForm().form.accounts,l=x(_({},this.paymentForm()),{form:x(_({},this.paymentForm().form),{accounts:o.map((d,L)=>L===n?x(_({},d),{accountID:e}):d)})});this.paymentForm.set(l)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Ne("response"),F(()=>{this.router.navigate(["/pages/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"hasMainWrapperPadding","pageTitle"],[3,"hasMainWrapperPadding","pageTitle",4,"ngIf"],["routerLink","/pages/pos-setup/payments",1,"p-button","p-button-outlined","p-button-secondary"],["label","Submit"],["label","Submit",3,"onClick"],[1,"row","row-gap-3"],[1,"col-6","d-flex","flex-column","gap-2"],[1,"row","row-gap-4"],[1,"col-2"],["for",""],[1,"col-3"],[1,"col-7"],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-full",3,"ngModelChange","ngModel","options","virtualScrollItemSize","virtualScroll"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&f(0,dn,1,1,"app-main-panel",4),n&2&&B(o.paymentForm()?0:-1)},dependencies:[q,Re,M,w,V,me,le,U,j,J,$,oe,A,D,G,N,W],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();function _n(t,i){if(t&1){let e=v();r(0,"p-button",8),y("onClick",function(){h(e);let o=s(2);return S(o.updatePOSTaxConfiguration())}),a()}}function fn(t,i){if(t&1&&(r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),f(3,_n,1,0,"p-button",7),a()),t&2){let e=s();p(3),B(e.roleService.permissions().posSetup.edit?3:-1)}}function gn(t,i){if(t&1&&(r(0,"div",5)(1,"div",16)(2,"span"),m(3),a()(),r(4,"div",16)(5,"span",16),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function xn(t,i){if(t&1&&(r(0,"div",5)(1,"div",16)(2,"span"),m(3),a()(),r(4,"div",17)(5,"span",16),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function Cn(t,i){if(t&1){let e=v();r(0,"div",12)(1,"div",13)(2,"label",14),m(3),a(),r(4,"p-select",15),y("ngModelChange",function(o){let l=h(e).$index,d=s(2);return S(d.updateAccountID(o,l))}),f(5,gn,7,2,"ng-template",null,2,u)(7,xn,7,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(2);p(3),g(e.name),p(),c("ngModel",o.taxForm().form[n].accountID)("options",o.taxForm().options.chartOfAccount)}}function hn(t,i){if(t&1&&(r(0,"p-panel")(1,"div",9)(2,"div",10)(3,"div",11),b(4,Cn,9,3,"div",12,P),a()()()()),t&2){let e=s();p(4),O(e.taxForm().form)}}var ut=(()=>{class t{constructor(){this.taxForm=E(null),this.roleService=C(Y),this.POSSetupService=C(R)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(F(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let o=this.taxForm().form,l=x(_({},this.taxForm()),{form:o.map((d,L)=>L===n?x(_({},d),{accountID:e}):d)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(F(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-tax"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],[1,"col-12"],[1,"d-flex","flex-column"],["for",""],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an Account",3,"ngModelChange","ngModel","options"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),f(1,fn,4,1,"ng-template",null,0,u)(3,hn,6,0,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,q,w,U,j,me,J,$,oe,A,D,G,N,W,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Sn=()=>({"min-width":"50rem"}),vn=t=>[t];function yn(t,i){t&1&&te(0,"p-button",6)}function Pn(t,i){if(t&1&&f(0,yn,1,0,"p-button",5),t&2){let e=s();c("ngIf",e.hasCheckedItems())}}function bn(t,i){t&1&&(r(0,"tr")(1,"th",8),te(2,"p-tableHeaderCheckbox"),a(),r(3,"th"),m(4,"Name"),a(),r(5,"th"),m(6,"Description"),a()())}function On(t,i){if(t&1&&(r(0,"tr")(1,"td"),te(2,"p-tableCheckbox",9),a(),r(3,"td")(4,"a",10),m(5),a()(),r(6,"td"),m(7),a()()),t&2){let e=i.$implicit;p(2),c("value",e),p(2),c("routerLink",ae(4,vn,e.id)),p(),g(e.name),p(2),g(e.description)}}function En(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",7),y("onRowSelect",function(o){h(e);let l=s();return S(l.onRowSelect(o))})("onRowUnselect",function(o){h(e);let l=s();return S(l.onRowSelect(o))})("onHeaderCheckboxToggle",function(o){h(e);let l=s();return S(l.onSelectAll(o))}),f(2,bn,7,0,"ng-template",null,2,u)(4,On,8,6,"ng-template",null,3,u),a()()}if(t&2){let e=s();p(),c("value",e.writeoffList().data)("tableStyle",H(2,Sn))}}var dt=(()=>{class t{constructor(){this.POSSetupService=C(R),this.writeoffList=E(null),this.hasCheckedItems=ne(()=>{let e=this.writeoffList();return!e||!e.data||!Array.isArray(e.data)?!1:e.data.some(n=>n&&n.checked===!0)})}ngOnInit(){this.POSSetupService.fetchPOSWriteOffConfiguration().pipe(ee(e=>x(_({},e),{data:e.data.map(n=>x(_({},n),{checked:!1}))})),F(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let o=n.data.findIndex(l=>l.id===e.data.id);if(o!==-1){let l=[...n.data];l[o]=x(_({},l[o]),{checked:!l[o].checked}),this.writeoffList.set(x(_({},n),{data:l}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let o=n.data.map(l=>x(_({},l),{checked:e.checked}));this.writeoffList.set(x(_({},n),{data:o}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off",3,"scrollable"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","1rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),f(1,Pn,1,1,"ng-template",null,0,u)(3,En,6,3,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,w,V,ie,se,qe,Qe,A,D,G,N,W,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var In=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function Fn(t,i){if(t&1){let e=v();r(0,"div",6)(1,"a",7),m(2,"Cancel"),a(),r(3,"p-button",8),y("onClick",function(){h(e);let o=s(2);return S(o.updateWriteOffConfiguration())}),a()()}}function Tn(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),I("(",e.code,")"),p(2),g(e.name)}}function wn(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),I("(",e.code,")"),p(2),g(e.name)}}function Mn(t,i){if(t&1){let e=v();r(0,"div",12)(1,"div",13)(2,"label",14),m(3),a(),r(4,"p-select",15),y("ngModelChange",function(o){let l=h(e).$index,d=s(3);return S(d.updateAccountById(o,l))}),f(5,Tn,5,2,"ng-template",null,2,u)(7,wn,5,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=s(3);p(3),g(e.name),p(),c("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function Dn(t,i){if(t&1&&(r(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),b(5,Mn,9,5,"div",12,P),a()()()()()),t&2){let e=s(2);p(),X(H(2,In)),p(4),O(e.writeOffForm().form)}}function An(t,i){if(t&1&&(r(0,"app-main-panel",5),f(1,Fn,4,0,"ng-template",null,0,u)(3,Dn,7,3,"ng-template",null,1,u),a()),t&2){let e=s();c("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var _t=(()=>{class t{constructor(){this.POSSetupService=C(R),this.route=C(re),this.writeOffForm=E(null)}ngOnInit(){this.route.paramMap.pipe(ee(e=>e.get("id")),z(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),F(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let o=this.writeOffForm().form,l=x(_({},this.writeOffForm()),{form:o.map((d,L)=>L===n?x(_({},d),{accountID:e}):d)});this.writeOffForm.set(l)}updateWriteOffConfiguration(){let e={form:this.writeOffForm().form};this.POSSetupService.updatePOSWriteOffConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],[3,"pageTitle","hasMainWrapperPadding"],[1,"d-flex","gap-2"],["routerLink","/pages/pos-setup/writeoff",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"row","row-gap-3"],[1,"col-3"],[1,"d-flex","flex-column"],["for","",1,"d-inline-block","text-truncate",2,"max-width","300px"],["filter","","filterBy","name,code","optionLabel","name","filter","","filterBy","name,code","optionValue","id","placeholder","Select an account",3,"ngModelChange","ngModel","options","virtualScroll","virtualScrollItemSize"],[1,""]],template:function(n,o){n&1&&f(0,An,5,2,"app-main-panel",4),n&2&&c("ngIf",o.writeOffForm())},dependencies:[M,w,V,q,Re,me,le,U,j,J,$,oe,A,D,G,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Le=(()=>{class t{constructor(){this.httpService=C(ye)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}getExpenseOptionsLoader(){return this.httpService.get(void 0,"/api/SetupExpenseOptionLoader/GetExpenseOptions")}updatePOSExpenseOptionConfiguration(e){return this.httpService.put(void 0,"/api/SetupExpenseOption/UpdateExpenseAccount",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=Se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Rn={data:{expenseOptions:[],options:{chartOfAccountOptions:[]}}},Be=Te(Ae(Rn),Je("POSExpenseOptionStore"),we(t=>({hasCheckedRows:ne(()=>t.data().expenseOptions.some(i=>i.checked)),checkedInvoice:ne(()=>t.data().expenseOptions.filter(i=>i.checked).map(i=>i.id))})),De(t=>{let i=C(Le);return{onRowSelect(n){Z(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?x(_({},d),{checked:!0}):d);return x(_({},o),{data:x(_({},o.data),{expenseOptions:l})})})},onRowUnselect(n){Z(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?x(_({},d),{checked:!1}):d);return x(_({},o),{data:x(_({},o.data),{expenseOptions:l})})})},onHeaderCheckboxToggle(n){Z(t,o=>{let l=o.data.expenseOptions.map(d=>x(_({},d),{checked:n}));return x(_({},o),{data:x(_({},o.data),{expenseOptions:l})})})},getExpenseOptions:fe(_e(z(()=>i.getExpenseOptions().pipe(ge({next:n=>{Z(t,o=>x(_({},o),{data:x(_({},o.data),{expenseOptions:n.expenseOptions.map(l=>x(_({},l),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}}))))),getExpenseOptionsLoader:fe(_e(z(()=>i.getExpenseOptionsLoader().pipe(ge({next:n=>{Z(t,o=>x(_({},o),{data:x(_({},o.data),{options:{chartOfAccountOptions:n.options.chartOfAccountOptions}})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),Me({onInit:t=>{t.getExpenseOptions(),t.getExpenseOptionsLoader()}}));function kn(t,i){if(t&1){let e=v();r(0,"p-button",8),y("onClick",function(){h(e);let o=s(2);return S(o.updatePOSExpenseOptionConfiguration())}),a()}}function Ln(t,i){if(t&1&&(r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),f(3,kn,1,0,"p-button",7),a()),t&2){let e=s();p(3),B(e.roleService.permissions().posSetup.edit?3:-1)}}function Nn(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span",15),m(3),a()()()),t&2){let e=i.$implicit;p(3),g(e.value)}}function Gn(t,i){if(t&1&&(r(0,"div",5)(1,"div",16)(2,"span",15),m(3),a()()()),t&2){let e=i.$implicit;p(3),g(e.value)}}function Bn(t,i){if(t&1){let e=v();r(0,"div",11)(1,"div",12)(2,"label",13),m(3),a(),r(4,"p-select",14),y("ngModelChange",function(o){let l=h(e).$index,d=s(3);return S(d.updateData(o,l))}),f(5,Nn,4,1,"ng-template",null,2,u)(7,Gn,4,1,"ng-template",null,3,u),a()()()}if(t&2){let e,n=i.$implicit,o=i.$index,l=s(3);p(3),g(n.name),p(),c("ngModel",((e=l.expenseOptForm().ListData[o])==null?null:e.AccountID)||"")("options",l.store.data().options.chartOfAccountOptions)}}function Vn(t,i){if(t&1&&b(0,Bn,9,3,"div",11,P),t&2){let e=s(2);O(e.store.data().expenseOptions)}}function $n(t,i){t&1&&(r(0,"div",10)(1,"p"),m(2,"No expense options available."),a()())}function Wn(t,i){if(t&1&&(r(0,"p-panel")(1,"div",9)(2,"div",10)(3,"div",9),f(4,Vn,2,0)(5,$n,3,0,"div",10),a()()()()),t&2){let e=s();p(4),B(e.store.data().expenseOptions&&e.store.data().expenseOptions.length?4:5)}}var ft=(()=>{class t{constructor(){this.store=C(Be),this.roleService=C(Y),this.expenseOptForm=E({ListData:[]}),this.expenseOptService=C(Le),this.originalData=E([]),je(()=>{let e=this.store.data().expenseOptions;if(e&&e.length>0){let n=e.map(o=>({ID:o.id,AccountID:o.accountID||""}));this.expenseOptForm.set({ListData:n}),this.originalData.set([...n])}})}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){Array.isArray(e.data)?e.data.forEach(n=>{this.store.onRowUnselect(n)}):this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}updatePOSExpenseOptionConfiguration(){let e=this.expenseOptForm().ListData,n=this.originalData(),o=e.filter((d,L)=>{let de=n[L];return de&&d.AccountID!==de.AccountID});if(o.length===0)return;let l={ListData:o};this.expenseOptService.updatePOSExpenseOptionConfiguration(l).pipe(F(d=>{console.log("Update response:",d),this.originalData.set([...e])})).subscribe()}updateData(e,n){let l=[...this.expenseOptForm().ListData];l[n]&&(l[n]=x(_({},l[n]),{AccountID:e}),this.expenseOptForm.set({ListData:l}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-expense-option"]],features:[ve([Be])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Expense Option",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-12"],[1,"col-4"],[1,"d-flex","flex-column","card","rounded-3","p-3","border"],["for",""],["filter","","filterBy","key,value","optionLabel","value","optionValue","key","placeholder","Select COA",3,"ngModelChange","ngModel","options"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),f(1,Ln,4,1,"ng-template",null,0,u)(3,Wn,6,1,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,ie,W,K,G,N,w,D,U,j,pe,$,J,oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var nr=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:rt},{path:"outlets",component:mt},{path:"outlets/:id",component:st},{path:"payments",component:lt},{path:"payments/:id",component:ct},{path:"taxs",component:ut},{path:"writeoff",component:dt},{path:"writeoff/:id",component:_t},{path:"expense-option",component:ft}]}];export{nr as POS_SETUP_ROUTES};
|
|
1
|
+
import{a as Ze,b as et,c as tt,d as nt,e as ot,f as it}from"./chunk-TAN6GLIH.js";import{a as Xe}from"./chunk-YHLRDTIS.js";import{m as Y}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{a as fe,b as ge}from"./chunk-3VQUNDVT.js";import{b as se,c as Ke,g as qe,h as Qe,i as ie}from"./chunk-52EMI2TW.js";import"./chunk-AAKZYXG3.js";import"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import{a as Ne}from"./chunk-BT7Y4ADP.js";import{a as le,b as me}from"./chunk-5U7KZJ3H.js";import"./chunk-MJGBBYIO.js";import"./chunk-CN6AT4LE.js";import{a as j,b as U}from"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-II7KELI4.js";import"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import{a as Re,b as q}from"./chunk-FHJOSHI3.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{i as M}from"./chunk-3NF5ANCH.js";import"./chunk-VM56C6ZV.js";import{a as K,b as W}from"./chunk-ISIYG4D5.js";import{b as Z,c as Te,d as we,e as Me,f as De,g as Ae,h as Je}from"./chunk-FNGX2XFA.js";import"./chunk-ALLR2NXQ.js";import"./chunk-BFEM6LX7.js";import{o as Ye,w as N,x as G}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{e as $,f as Pe,j as oe,k as be,m as Oe,n as Ee,o as He,p as Ie,v as Fe,x as J,y as pe}from"./chunk-MGIEURA2.js";import{b as re,d as ze,e as D,l as A}from"./chunk-DZCJWJUG.js";import"./chunk-H6JPNVHO.js";import{a as ye}from"./chunk-G3BJCT7T.js";import"./chunk-JBYPGHPN.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import"./chunk-KL3TPLRB.js";import{m as V,q as Ue,u as w}from"./chunk-DM2JLWKE.js";import{Dc as ve,Eb as f,Ec as H,Fc as ae,Ha as E,Mb as c,Oc as $e,Pb as X,Pc as We,Rb as B,Sb as P,Sc as u,Ub as b,Vb as O,Wb as r,Xb as a,Y as z,Yb as te,_ as F,ac as v,bd as ne,c as _e,ca as Se,cd as je,fc as y,gc as s,ia as C,ib as p,qa as h,ra as S,s as ee,sc as m,tc as g,uc as I,wc as Ve,yb as T}from"./chunk-6QJHEOXN.js";import{a as _,b as x}from"./chunk-YQFG5XE2.js";var R=(()=>{class t{constructor(){this.httpService=C(ye)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(e){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration",{params:e})}fetchPOSOutletFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/Setup/OutletConfigurationForm",n)}updatePOSOutletConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitOutletConfiguration",e)}fetchPOSPaymentConfiguration(e){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration",{params:e})}fetchPOSPaymentFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"api/Setup/PaymentConfigurationForm",n)}updatePOSPaymentConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitPaymentConfiguration",e)}fetchPOSTaxConfiguration(){return this.httpService.get(void 0,"/api/setup/TaxConfigurationForm")}updatePOSTaxConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitTaxConfiguration",e)}fetchPOSWriteOffConfiguration(){return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationList")}fetchPOSWriteOffFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationForm",n)}updatePOSWriteOffConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitWriteOffConfiguration",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=Se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var k=function(t){return t.POSGLOBAL_SELL="Sell",t.POSGLOBAL_BUY="Buy",t.POSGLOBAL_ADJUSTMENT="Adjustment",t.POSGLOBAL_PREPAID="Prepaid",t.POSGLOBAL_RETURN="Return",t.POSGLOBAL_DEBT="Debt",t.POSGLOBAL_PAYMENTFEE="Payment Fee",t.POSGLOBAL_MANUFACTURING="Manufacturing",t.POSGLOBAL_ADVANCE="Advance",t}(k||{});var at={[k.POSGLOBAL_SELL]:[{typeID:2,side:"debit",label:"Account Receivable"},{typeID:1,side:"credit",label:"Sales"},{typeID:4,side:"debit",label:"COGS"},{typeID:3,side:"credit",label:"Sold Inventory"},{typeID:10,side:"debit",label:"Sales Discount"},{typeID:31,side:"credit",label:"Sold Non-Inventory"}],[k.POSGLOBAL_BUY]:[{typeID:27,side:"debit",label:"Pending Paid Inventory"},{typeID:5,side:"credit",label:"Account Payable"},{typeID:28,side:"debit",label:"Inventory Bought"},{typeID:27,side:"credit",label:"Pending Paid Inventory"},{typeID:11,side:"credit",label:"Purchase Discount"}],[k.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[k.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[k.POSGLOBAL_RETURN]:[{typeID:8,side:"debit",label:"Sales Return"},{typeID:3,side:"debit",label:"Inventory"},{typeID:4,side:"credit",label:"COGS"},{typeID:9,side:"credit",label:"Purchase Return"}],[k.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[k.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[k.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[k.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function gt(t,i){if(t&1){let e=v();r(0,"p-button",7),y("onClick",function(){h(e);let o=s(2);return S(o.onSubmit())}),a()}}function xt(t,i){if(t&1&&(r(0,"div",5),f(1,gt,1,0,"p-button",6),a()),t&2){let e=s();p(),B(e.roleService.permissions().posSetup.edit?1:-1)}}function Ct(t,i){if(t&1&&(r(0,"p-tab",11),m(1),a()),t&2){let e=i.$implicit;c("value",e.value),p(),g(e.label)}}function ht(t,i){if(t&1&&(r(0,"div",20)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function St(t,i){if(t&1&&(r(0,"div",20)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function vt(t,i){if(t&1&&(r(0,"div",15)(1,"div",16)(2,"div",5)(3,"label",17),m(4),a(),r(5,"span",18),m(6),a()(),r(7,"p-select",19),f(8,ht,7,2,"ng-template",null,2,u)(10,St,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),g(e.entry.value.label),p(2),g(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function yt(t,i){if(t&1&&(r(0,"div",20)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function Pt(t,i){if(t&1&&(r(0,"div",20)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function bt(t,i){if(t&1&&(r(0,"div",15)(1,"div",16)(2,"div",5)(3,"label",17),m(4),a(),r(5,"span",21),m(6),a()(),r(7,"p-select",19),f(8,yt,7,2,"ng-template",null,2,u)(10,Pt,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),g(e.entry.value.label),p(2),g(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function Ot(t,i){if(t&1&&(r(0,"p-tabpanel",11)(1,"div",12)(2,"div",13)(3,"div",14),b(4,vt,12,4,"div",15,P),a()(),r(6,"div",13)(7,"div",14),b(8,bt,12,4,"div",15,P),a()()()()),t&2){let e=i.$implicit,n=s(3);c("value",e.value),p(),c("formGroupName",e.value),p(3),O(n.getDebitEntries(e.value)),p(4),O(n.getCreditEntries(e.value))}}function Et(t,i){if(t&1){let e=v();r(0,"form",9),y("ngSubmit",function(){h(e);let o=s(2);return S(o.onSubmit())}),r(1,"p-tabs",10)(2,"p-tablist"),b(3,Ct,2,2,"p-tab",11,P),a(),r(5,"p-tabpanels"),b(6,Ot,10,2,"p-tabpanel",11,P),a()()()}if(t&2){let e=s(2);c("formGroup",e.accountForm),p(),c("value",e.tab())("lazy",!0),p(2),O(e.tabs()),p(3),O(e.tabs())}}function It(t,i){if(t&1&&f(0,Et,8,3,"form",8),t&2){let e=s();c("ngIf",e.posIntegration()&&e.accountForm)}}var rt=(()=>{class t{constructor(){this.posConfigService=C(R),this.fb=C(Fe),this.roleService=C(Y),this.tab=E(k.POSGLOBAL_SELL),this.tabs=E(Object.values(k).map(e=>({label:e,value:e}))),this.posIntegration=E(null),this.form=E([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=k}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(F(e=>{this.posIntegration.set(e),this.form.set(e.form),this.descriptionsMap=new Map(e.descriptions.map(n=>[+n.id,n.name])),this.initializeForm()})).subscribe()}initializeForm(){let e={};this.tabs().forEach(n=>{let o=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,o),e[n.value]=this.fb.array(o.map(l=>this.createEntryFormGroup(l)))}),this.accountForm=this.fb.group(e)}createEntryFormGroup(e){let n=this.fb.group({typeID:[e.typeID],label:[e.label],side:[e.side],accountID:[this.getAccountIDByTypeID(e.typeID)]});return n.get("accountID").valueChanges.subscribe(o=>{this.syncAccountIDs(e.typeID,o,n)}),n}getAccountIDByTypeID(e){return this.form().find(o=>o.typeID===e)?.accountID||""}getEntriesForTab(e){return at[e]||[]}getTabEntries(e){return this.accountForm.get(e)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],o=new Set;for(let l of Object.values(e))for(let{typeID:d,accountID:L}of l){let de=`${d}_${L}`;o.has(de)||(o.add(de),n.push({typeID:d,accountID:L||Xe}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:l=>console.error("Save failed",l)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="credit")}syncAccountIDs(e,n,o){Object.values(this.accountForm.controls).forEach(l=>{l.controls.forEach(d=>{d!==o&&d.get("typeID")?.value===e&&d.get("accountID")?.value!==n&&d.get("accountID")?.setValue(n,{emitEvent:!1})})})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-global"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","POS Integration"],[1,"d-flex","gap-2"],["label","Submit"],["label","Submit",3,"onClick"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"border-top",3,"value","lazy"],[3,"value"],[1,"row",3,"formGroupName"],[1,"col"],[1,"row","gap-3"],[1,"col-12",3,"formGroupName"],[1,"form-group","d-flex","flex-column"],["for","",1,"fs-3"],[1,"text-success","fs-3"],["filter","","filterBy","code,name","formControlName","accountID","optionLabel","name","optionValue","id",3,"options"],[1,"d-flex","align-items-center","gap-2"],[1,"text-danger","fs-3"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),f(1,xt,2,1,"ng-template",null,0,u)(3,It,1,1,"ng-template",null,1,u),a())},dependencies:[M,it,ot,nt,tt,Ze,et,Ye,U,j,J,be,$,Pe,w,V,A,G,N,pe,Oe,Ie,Ee],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ft=t=>[t];function Tt(t,i){if(t&1&&(r(0,"th",7),m(1),a()),t&2){let e=i.$implicit;p(),g(e.name.slice(0,10))}}function wt(t,i){if(t&1&&(r(0,"tr")(1,"th",6),m(2,"Method"),a()(),r(3,"tr"),b(4,Tt,2,1,"th",7,P),a()),t&2){let e=s(3);p(4),O(e.paymentConfiguration().outlets)}}function Mt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),g(e.accountName)}}function Dt(t,i){if(t&1&&(r(0,"tr")(1,"td",8)(2,"a",9),m(3),a()(),b(4,Mt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",ae(2,Ft,e.id)),p(),g(e.name),p(),O(e.accounts)}}function At(t,i){if(t&1&&(r(0,"p-table",5),f(1,wt,6,0,"ng-template",null,1,u)(3,Dt,6,4,"ng-template",null,2,u),a()),t&2){let e=s(2);c("value",e.paymentConfiguration().payment)}}function Rt(t,i){if(t&1){let e=v();r(0,"app-main-panel",4),y("search",function(o){h(e);let l=s();return S(l.onSearch(o))}),f(1,At,5,1,"ng-template",null,0,u),a()}t&2&&c("isSearchableInput",!0)("scrollable",!0)}var lt=(()=>{class t{constructor(){this.POSSetupService=C(R),this.paymentConfiguration=E(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration({}).pipe(F(e=>{this.paymentConfiguration.set(e)})).subscribe()}onSearch(e){this.POSSetupService.fetchPOSPaymentConfiguration({Search:e}).pipe(F(n=>{this.paymentConfiguration.set(n)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",3,"isSearchableInput","scrollable","search",4,"ngIf"],["pageTitle","Payment Method Accounting",3,"search","isSearchableInput","scrollable"],[3,"value"],["rowspan","3",2,"min-width","300px"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&f(0,Rt,3,2,"app-main-panel",3),n&2&&c("ngIf",o.paymentConfiguration())},dependencies:[M,ie,se,Ke,w,V,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var kt={data:{listOutletAccount:[],listCOAType:[],pageNumber:1,pageSize:20,totalCount:0,totalPages:0},filter:{PageNumber:1,PageSize:20,Search:""}},Ge=Te(Ae(kt),we(t=>({first:ne(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:ne(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount))})),De(t=>{let i=C(R);return{updateFilter:n=>{Z(t,o=>x(_({},o),{filter:_(_({},o.filter),n)}))},getPOSOutlets:fe(_e(z(n=>i.fetchPOSOutletConfiguration(n).pipe(ge({next:o=>{Z(t,l=>x(_({},l),{data:o}))},error:o=>{console.error("Error fetching POS outlets:",o)}})))))}}),Me(t=>({onInit:()=>{t.getPOSOutlets(t.filter)}})));var Lt=t=>[t];function Nt(t,i){if(t&1&&(r(0,"th"),m(1),a()),t&2){let e=i.$implicit;p(),g(e.value)}}function Gt(t,i){if(t&1&&(r(0,"tr")(1,"th"),m(2,"Name"),a(),b(3,Nt,2,1,"th",null,P),a()),t&2){let e=s(2);p(3),O(e.store.data().listCOAType)}}function Bt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),g(e)}}function Vt(t,i){if(t&1&&(r(0,"tr")(1,"td")(2,"a",7),m(3),a()(),b(4,Bt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",ae(2,Lt,e.OutletID)),p(),I(" ",e.OutletName,""),p(),O(e.Accounts)}}function $t(t,i){if(t&1&&m(0),t&2){let e=s(2);Ve(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Wt(t,i){t&1&&(r(0,"tr")(1,"td",8)(2,"span"),m(3," No journal entries found. "),a()()())}function jt(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",6),y("onPage",function(o){h(e);let l=s();return S(l.onPage(o))}),f(2,Gt,5,0,"ng-template",null,1,u)(4,Vt,6,4,"ng-template",null,2,u)(6,$t,1,3,"ng-template",null,3,u)(8,Wt,4,0,"ng-template",null,4,u),a()()}if(t&2){let e=s();p(),c("value",e.store.data().listOutletAccount)("paginator",!0)("rows",e.store.filter().PageSize)("lazy",!0)("totalRecords",e.store.data().totalCount)}}var mt=(()=>{class t{constructor(){this.store=C(Ge)}onSearch(e){this.store.updateFilter({PageNumber:1,PageSize:20,Search:e})}onPage(e){let n=e.first/e.rows+1;this.store.updateFilter(x(_({},this.store.filter()),{PageSize:e.rows,PageNumber:n}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet"]],features:[ve([Ge])],decls:3,vars:2,consts:[["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Outlet Account",3,"search","isSearchableInput","scrollable"],["styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","value","paginator","rows","lazy","totalRecords"],[1,"link","link-primary",3,"routerLink"],["colspan","8"]],template:function(n,o){if(n&1){let l=v();r(0,"app-main-panel",5),y("search",function(L){return h(l),S(o.onSearch(L))}),f(1,jt,10,5,"ng-template",null,0,u),a()}n&2&&c("isSearchableInput",!0)("scrollable",!0)},dependencies:[M,w,q,ie,se,A,D,W,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ut=()=>({height:"calc(100vh - 100px)"}),zt=()=>({height:"calc(100vh - 150px)"});function Ht(t,i){if(t&1){let e=v();r(0,"p-button",7),y("onClick",function(){h(e);let o=s(2);return S(o.updatePOsOutletConfiguration())}),a()}}function Yt(t,i){if(t&1&&(r(0,"a",5),m(1,"Cancel"),a(),f(2,Ht,1,0,"p-button",6)),t&2){let e=s();p(2),B(e.roleService.permissions().posSetup.edit?2:-1)}}function Jt(t,i){if(t&1&&(r(0,"div",17)(1,"div",18)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",18),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function Kt(t,i){if(t&1&&(r(0,"div",17)(1,"div",18)(2,"span"),m(3),a()(),r(4,"div",19)(5,"span",18),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function qt(t,i){if(t&1&&(r(0,"div",13)(1,"span",15),m(2),a(),r(3,"p-select",16),f(4,Jt,7,2,"ng-template",null,2,u)(6,Kt,7,2,"ng-template",null,3,u),a()()),t&2){let e,n=i.$implicit,o=i.$index,l=s(3);c("formGroupName",o),p(2),g((e=n.get("TypeName"))==null?null:e.value),p(),c("options",l.options.accounts)}}function Qt(t,i){t&1&&te(0,"hr")}function Xt(t,i){if(t&1&&(r(0,"div",10)(1,"h3",11),m(2),$e(3,"titlecase"),a(),r(4,"div",12),b(5,qt,8,3,"div",13,P),a()(),f(7,Qt,1,0,"hr",14)),t&2){let e,n=i.$implicit,o=i.$index,l=i.$index,d=i.$count,L=s(2);c("formGroupName",o),p(2),I(" ",We(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),O(L.getAccountsFormArray(l).controls),p(2),c("ngIf",l!==d-1)}}function Zt(t,i){if(t&1&&(r(0,"p-panel")(1,"p-scroll-panel")(2,"form",8)(3,"div",9),b(4,Xt,8,5,null,null,P),a()()()()),t&2){let e=s();X(H(5,Ut)),p(),X(H(6,zt)),p(),c("formGroup",e.accountsForm),p(2),O(e.accountGroupsArray.controls)}}var st=(()=>{class t{constructor(){this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2,10],accounts:[]},{name:"delivery",typeIds:[3,4],accounts:[]},{name:"buy",typeIds:[27,11,28],accounts:[]},{name:"purchase return",typeIds:[9],accounts:[]},{name:"sales return",typeIds:[8],accounts:[]},{name:"adjustment",typeIds:[21,26],accounts:[]}],this.outletForm=E(null),this.roleService=C(Y),this.route=C(re),this.POSSetupService=C(R),this.fb=C(Fe)}get accountGroupsArray(){return this.accountsForm.get("accountGroups")}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(ee(e=>e.get("id")),z(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),F(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(o=>{o.accounts=this.allAccounts.filter(l=>o.typeIds.includes(l.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(o=>{n.push(this.createAccountGroupControl(o))})})).subscribe()}getAccountsFormArray(e){return this.accountGroupsArray.at(e).get("accounts")}updatePOsOutletConfiguration(){let{accountGroups:e}=this.accountsForm.value,n={form:e.flatMap(o=>o.accounts.map(l=>({AccountID:l.AccountID,TypeID:l.TypeID,TypeName:l.TypeName,OutletID:l.OutletID,OutletName:l.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}createAccountGroupControl(e){return this.fb.group({groupName:[e.name],accounts:this.fb.array(e.accounts.map(n=>this.createAccountControl(n)))})}createAccountControl(e){return this.fb.group({AccountID:[e.AccountID],TypeID:[e.TypeID],TypeName:[e.TypeName],OutletID:[e.OutletID],OutletName:[e.OutletName]})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet-form"]],decls:5,vars:2,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"hasMainWrapperPadding","pageTitle"],["routerLink","/pages/pos-setup/outlets",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit"],["label","Submit",3,"onClick"],[1,"",3,"formGroup"],["formArrayName","accountGroups",1,"d-flex","flex-column","gap-2"],[1,"row",3,"formGroupName"],[1,"fs-4","fw-semibold"],["formArrayName","accounts",1,"row","row-gap-3"],[1,"col-6",3,"formGroupName"],[4,"ngIf"],[1,"fs-3"],["filter","","filterBy","code,name","formControlName","AccountID","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-100",3,"options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),f(1,Yt,3,1,"ng-template",null,0,u)(3,Zt,6,7,"ng-template",null,1,u),a()),n&2&&c("hasMainWrapperPadding",!0)("pageTitle","Edit "+o.outletName)},dependencies:[M,w,V,Ue,q,pe,be,$,Pe,Oe,Ie,Ee,He,U,j,W,K,le,G,N,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var nn=()=>({height:"calc(100vh - 100px)"}),on=()=>({width:"100%",height:"calc(100vh - 150px)"}),an=()=>({width:"100%"});function rn(t,i){if(t&1){let e=v();r(0,"p-button",8),y("onClick",function(){h(e);let o=s(4);return S(o.updatePOSOutletConfiguration())}),a()}}function pn(t,i){if(t&1&&(r(0,"a",6),m(1,"Cancel"),a(),f(2,rn,1,0,"p-button",7)),t&2){let e=s(3);p(2),B(e.roleService.permissions().posSetup.edit?2:-1)}}function ln(t,i){if(t&1&&(r(0,"div",17)(1,"div",18)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",18),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function mn(t,i){if(t&1&&(r(0,"div",17)(1,"div",18)(2,"span"),m(3),a()(),r(4,"div",19)(5,"span",18),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function sn(t,i){if(t&1){let e=v();r(0,"div",10)(1,"div",11)(2,"div",12)(3,"label",13),m(4),a()(),te(5,"div",14),r(6,"div",15)(7,"p-select",16),y("ngModelChange",function(o){let l=h(e).$index,d=s(4);return S(d.updateAccountById(o,l))}),f(8,ln,7,2,"ng-template",null,2,u)(10,mn,7,2,"ng-template",null,3,u),a()()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(4);p(4),g(e.outletName.slice(0,15)),p(3),X(H(7,an)),c("ngModel",o.paymentForm().form.accounts[n].accountID)("options",o.paymentForm().options.chartOfAccount)("virtualScrollItemSize",50)("virtualScroll",!0)}}function cn(t,i){if(t&1&&(r(0,"p-card")(1,"p-scrollpanel")(2,"div",9),b(3,sn,12,8,"div",10,P),a()()()),t&2){let e=s(3);X(H(4,nn)),p(),X(H(5,on)),p(2),O(e.paymentForm().form.accounts)}}function un(t,i){if(t&1&&(r(0,"app-main-panel",4),f(1,pn,3,1,"ng-template",null,0,u)(3,cn,5,6,"ng-template",null,1,u),a()),t&2){let e=s(2);c("hasMainWrapperPadding",!0)("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")}}function dn(t,i){if(t&1&&f(0,un,5,2,"app-main-panel",5),t&2){let e=s();c("ngIf",e.paymentForm())}}var ct=(()=>{class t{constructor(){this.paymentForm=E(null),this.roleService=C(Y),this.route=C(re),this.POSSetupService=C(R),this.router=C(ze)}ngOnInit(){this.route.paramMap.pipe(ee(e=>+e.get("id")),z(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),F(e=>{this.paymentForm.set(e)}),Ne("response")).subscribe()}updateAccountById(e,n){let o=this.paymentForm().form.accounts,l=x(_({},this.paymentForm()),{form:x(_({},this.paymentForm().form),{accounts:o.map((d,L)=>L===n?x(_({},d),{accountID:e}):d)})});this.paymentForm.set(l)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Ne("response"),F(()=>{this.router.navigate(["/pages/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"hasMainWrapperPadding","pageTitle"],[3,"hasMainWrapperPadding","pageTitle",4,"ngIf"],["routerLink","/pages/pos-setup/payments",1,"p-button","p-button-outlined","p-button-secondary"],["label","Submit"],["label","Submit",3,"onClick"],[1,"row","row-gap-3"],[1,"col-6","d-flex","flex-column","gap-2"],[1,"row","row-gap-4"],[1,"col-2"],["for",""],[1,"col-3"],[1,"col-7"],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-full",3,"ngModelChange","ngModel","options","virtualScrollItemSize","virtualScroll"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&f(0,dn,1,1,"app-main-panel",4),n&2&&B(o.paymentForm()?0:-1)},dependencies:[q,Re,M,w,V,me,le,U,j,J,$,oe,A,D,G,N,W],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();function _n(t,i){if(t&1){let e=v();r(0,"p-button",8),y("onClick",function(){h(e);let o=s(2);return S(o.updatePOSTaxConfiguration())}),a()}}function fn(t,i){if(t&1&&(r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),f(3,_n,1,0,"p-button",7),a()),t&2){let e=s();p(3),B(e.roleService.permissions().posSetup.edit?3:-1)}}function gn(t,i){if(t&1&&(r(0,"div",5)(1,"div",16)(2,"span"),m(3),a()(),r(4,"div",16)(5,"span",16),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function xn(t,i){if(t&1&&(r(0,"div",5)(1,"div",16)(2,"span"),m(3),a()(),r(4,"div",17)(5,"span",16),m(6),a()()()),t&2){let e=i.$implicit;p(3),I("(",e.code,")"),p(3),g(e.name)}}function Cn(t,i){if(t&1){let e=v();r(0,"div",12)(1,"div",13)(2,"label",14),m(3),a(),r(4,"p-select",15),y("ngModelChange",function(o){let l=h(e).$index,d=s(2);return S(d.updateAccountID(o,l))}),f(5,gn,7,2,"ng-template",null,2,u)(7,xn,7,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(2);p(3),g(e.name),p(),c("ngModel",o.taxForm().form[n].accountID)("options",o.taxForm().options.chartOfAccount)}}function hn(t,i){if(t&1&&(r(0,"p-panel")(1,"div",9)(2,"div",10)(3,"div",11),b(4,Cn,9,3,"div",12,P),a()()()()),t&2){let e=s();p(4),O(e.taxForm().form)}}var ut=(()=>{class t{constructor(){this.taxForm=E(null),this.roleService=C(Y),this.POSSetupService=C(R)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(F(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let o=this.taxForm().form,l=x(_({},this.taxForm()),{form:o.map((d,L)=>L===n?x(_({},d),{accountID:e}):d)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(F(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-tax"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],[1,"col-12"],[1,"d-flex","flex-column"],["for",""],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an Account",3,"ngModelChange","ngModel","options"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),f(1,fn,4,1,"ng-template",null,0,u)(3,hn,6,0,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,q,w,U,j,me,J,$,oe,A,D,G,N,W,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Sn=()=>({"min-width":"50rem"}),vn=t=>[t];function yn(t,i){t&1&&te(0,"p-button",6)}function Pn(t,i){if(t&1&&f(0,yn,1,0,"p-button",5),t&2){let e=s();c("ngIf",e.hasCheckedItems())}}function bn(t,i){t&1&&(r(0,"tr")(1,"th",8),te(2,"p-tableHeaderCheckbox"),a(),r(3,"th"),m(4,"Name"),a(),r(5,"th"),m(6,"Description"),a()())}function On(t,i){if(t&1&&(r(0,"tr")(1,"td"),te(2,"p-tableCheckbox",9),a(),r(3,"td")(4,"a",10),m(5),a()(),r(6,"td"),m(7),a()()),t&2){let e=i.$implicit;p(2),c("value",e),p(2),c("routerLink",ae(4,vn,e.id)),p(),g(e.name),p(2),g(e.description)}}function En(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",7),y("onRowSelect",function(o){h(e);let l=s();return S(l.onRowSelect(o))})("onRowUnselect",function(o){h(e);let l=s();return S(l.onRowSelect(o))})("onHeaderCheckboxToggle",function(o){h(e);let l=s();return S(l.onSelectAll(o))}),f(2,bn,7,0,"ng-template",null,2,u)(4,On,8,6,"ng-template",null,3,u),a()()}if(t&2){let e=s();p(),c("value",e.writeoffList().data)("tableStyle",H(2,Sn))}}var dt=(()=>{class t{constructor(){this.POSSetupService=C(R),this.writeoffList=E(null),this.hasCheckedItems=ne(()=>{let e=this.writeoffList();return!e||!e.data||!Array.isArray(e.data)?!1:e.data.some(n=>n&&n.checked===!0)})}ngOnInit(){this.POSSetupService.fetchPOSWriteOffConfiguration().pipe(ee(e=>x(_({},e),{data:e.data.map(n=>x(_({},n),{checked:!1}))})),F(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let o=n.data.findIndex(l=>l.id===e.data.id);if(o!==-1){let l=[...n.data];l[o]=x(_({},l[o]),{checked:!l[o].checked}),this.writeoffList.set(x(_({},n),{data:l}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let o=n.data.map(l=>x(_({},l),{checked:e.checked}));this.writeoffList.set(x(_({},n),{data:o}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off",3,"scrollable"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","1rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),f(1,Pn,1,1,"ng-template",null,0,u)(3,En,6,3,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,w,V,ie,se,qe,Qe,A,D,G,N,W,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var In=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function Fn(t,i){if(t&1){let e=v();r(0,"div",6)(1,"a",7),m(2,"Cancel"),a(),r(3,"p-button",8),y("onClick",function(){h(e);let o=s(2);return S(o.updateWriteOffConfiguration())}),a()()}}function Tn(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),I("(",e.code,")"),p(2),g(e.name)}}function wn(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),I("(",e.code,")"),p(2),g(e.name)}}function Mn(t,i){if(t&1){let e=v();r(0,"div",12)(1,"div",13)(2,"label",14),m(3),a(),r(4,"p-select",15),y("ngModelChange",function(o){let l=h(e).$index,d=s(3);return S(d.updateAccountById(o,l))}),f(5,Tn,5,2,"ng-template",null,2,u)(7,wn,5,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=s(3);p(3),g(e.name),p(),c("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function Dn(t,i){if(t&1&&(r(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),b(5,Mn,9,5,"div",12,P),a()()()()()),t&2){let e=s(2);p(),X(H(2,In)),p(4),O(e.writeOffForm().form)}}function An(t,i){if(t&1&&(r(0,"app-main-panel",5),f(1,Fn,4,0,"ng-template",null,0,u)(3,Dn,7,3,"ng-template",null,1,u),a()),t&2){let e=s();c("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var _t=(()=>{class t{constructor(){this.POSSetupService=C(R),this.route=C(re),this.writeOffForm=E(null)}ngOnInit(){this.route.paramMap.pipe(ee(e=>e.get("id")),z(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),F(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let o=this.writeOffForm().form,l=x(_({},this.writeOffForm()),{form:o.map((d,L)=>L===n?x(_({},d),{accountID:e}):d)});this.writeOffForm.set(l)}updateWriteOffConfiguration(){let e={form:this.writeOffForm().form};this.POSSetupService.updatePOSWriteOffConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],[3,"pageTitle","hasMainWrapperPadding"],[1,"d-flex","gap-2"],["routerLink","/pages/pos-setup/writeoff",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"row","row-gap-3"],[1,"col-3"],[1,"d-flex","flex-column"],["for","",1,"d-inline-block","text-truncate",2,"max-width","300px"],["filter","","filterBy","name,code","optionLabel","name","filter","","filterBy","name,code","optionValue","id","placeholder","Select an account",3,"ngModelChange","ngModel","options","virtualScroll","virtualScrollItemSize"],[1,""]],template:function(n,o){n&1&&f(0,An,5,2,"app-main-panel",4),n&2&&c("ngIf",o.writeOffForm())},dependencies:[M,w,V,q,Re,me,le,U,j,J,$,oe,A,D,G,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Le=(()=>{class t{constructor(){this.httpService=C(ye)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}getExpenseOptionsLoader(){return this.httpService.get(void 0,"/api/SetupExpenseOptionLoader/GetExpenseOptions")}updatePOSExpenseOptionConfiguration(e){return this.httpService.put(void 0,"/api/SetupExpenseOption/UpdateExpenseAccount",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=Se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Rn={data:{expenseOptions:[],options:{chartOfAccountOptions:[]}}},Be=Te(Ae(Rn),Je("POSExpenseOptionStore"),we(t=>({hasCheckedRows:ne(()=>t.data().expenseOptions.some(i=>i.checked)),checkedInvoice:ne(()=>t.data().expenseOptions.filter(i=>i.checked).map(i=>i.id))})),De(t=>{let i=C(Le);return{onRowSelect(n){Z(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?x(_({},d),{checked:!0}):d);return x(_({},o),{data:x(_({},o.data),{expenseOptions:l})})})},onRowUnselect(n){Z(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?x(_({},d),{checked:!1}):d);return x(_({},o),{data:x(_({},o.data),{expenseOptions:l})})})},onHeaderCheckboxToggle(n){Z(t,o=>{let l=o.data.expenseOptions.map(d=>x(_({},d),{checked:n}));return x(_({},o),{data:x(_({},o.data),{expenseOptions:l})})})},getExpenseOptions:fe(_e(z(()=>i.getExpenseOptions().pipe(ge({next:n=>{Z(t,o=>x(_({},o),{data:x(_({},o.data),{expenseOptions:n.expenseOptions.map(l=>x(_({},l),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}}))))),getExpenseOptionsLoader:fe(_e(z(()=>i.getExpenseOptionsLoader().pipe(ge({next:n=>{Z(t,o=>x(_({},o),{data:x(_({},o.data),{options:{chartOfAccountOptions:n.options.chartOfAccountOptions}})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),Me({onInit:t=>{t.getExpenseOptions(),t.getExpenseOptionsLoader()}}));function kn(t,i){if(t&1){let e=v();r(0,"p-button",8),y("onClick",function(){h(e);let o=s(2);return S(o.updatePOSExpenseOptionConfiguration())}),a()}}function Ln(t,i){if(t&1&&(r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),f(3,kn,1,0,"p-button",7),a()),t&2){let e=s();p(3),B(e.roleService.permissions().posSetup.edit?3:-1)}}function Nn(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span",15),m(3),a()()()),t&2){let e=i.$implicit;p(3),g(e.value)}}function Gn(t,i){if(t&1&&(r(0,"div",5)(1,"div",16)(2,"span",15),m(3),a()()()),t&2){let e=i.$implicit;p(3),g(e.value)}}function Bn(t,i){if(t&1){let e=v();r(0,"div",11)(1,"div",12)(2,"label",13),m(3),a(),r(4,"p-select",14),y("ngModelChange",function(o){let l=h(e).$index,d=s(3);return S(d.updateData(o,l))}),f(5,Nn,4,1,"ng-template",null,2,u)(7,Gn,4,1,"ng-template",null,3,u),a()()()}if(t&2){let e,n=i.$implicit,o=i.$index,l=s(3);p(3),g(n.name),p(),c("ngModel",((e=l.expenseOptForm().ListData[o])==null?null:e.AccountID)||"")("options",l.store.data().options.chartOfAccountOptions)}}function Vn(t,i){if(t&1&&b(0,Bn,9,3,"div",11,P),t&2){let e=s(2);O(e.store.data().expenseOptions)}}function $n(t,i){t&1&&(r(0,"div",10)(1,"p"),m(2,"No expense options available."),a()())}function Wn(t,i){if(t&1&&(r(0,"p-panel")(1,"div",9)(2,"div",10)(3,"div",9),f(4,Vn,2,0)(5,$n,3,0,"div",10),a()()()()),t&2){let e=s();p(4),B(e.store.data().expenseOptions&&e.store.data().expenseOptions.length?4:5)}}var ft=(()=>{class t{constructor(){this.store=C(Be),this.roleService=C(Y),this.expenseOptForm=E({ListData:[]}),this.expenseOptService=C(Le),this.originalData=E([]),je(()=>{let e=this.store.data().expenseOptions;if(e&&e.length>0){let n=e.map(o=>({ID:o.id,AccountID:o.accountID||""}));this.expenseOptForm.set({ListData:n}),this.originalData.set([...n])}})}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){Array.isArray(e.data)?e.data.forEach(n=>{this.store.onRowUnselect(n)}):this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}updatePOSExpenseOptionConfiguration(){let e=this.expenseOptForm().ListData,n=this.originalData(),o=e.filter((d,L)=>{let de=n[L];return de&&d.AccountID!==de.AccountID});if(o.length===0)return;let l={ListData:o};this.expenseOptService.updatePOSExpenseOptionConfiguration(l).pipe(F(d=>{console.log("Update response:",d),this.originalData.set([...e])})).subscribe()}updateData(e,n){let l=[...this.expenseOptForm().ListData];l[n]&&(l[n]=x(_({},l[n]),{AccountID:e}),this.expenseOptForm.set({ListData:l}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-expense-option"]],features:[ve([Be])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Expense Option",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-12"],[1,"col-4"],[1,"d-flex","flex-column","card","rounded-3","p-3","border"],["for",""],["filter","","filterBy","key,value","optionLabel","value","optionValue","key","placeholder","Select COA",3,"ngModelChange","ngModel","options"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),f(1,Ln,4,1,"ng-template",null,0,u)(3,Wn,6,1,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,ie,W,K,G,N,w,D,U,j,pe,$,J,oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var nr=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:rt},{path:"outlets",component:mt},{path:"outlets/:id",component:st},{path:"payments",component:lt},{path:"payments/:id",component:ct},{path:"taxs",component:ut},{path:"writeoff",component:dt},{path:"writeoff/:id",component:_t},{path:"expense-option",component:ft}]}];export{nr as POS_SETUP_ROUTES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Fe,b as Se}from"./chunk-SOD2BIQR.js";import{a as _e,b as ve,c as be,d as xe,e as Ce,f as ye}from"./chunk-TAN6GLIH.js";import"./chunk-GIRWHO6Q.js";import{a as fe,b as ge}from"./chunk-KARG227P.js";import{a as he}from"./chunk-XKI7WLHE.js";import{m as L}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import"./chunk-7L5IAWG2.js";import{a as re,b as ie}from"./chunk-II7KELI4.js";import"./chunk-L4ENW4RK.js";import"./chunk-KONCSTVQ.js";import{i as ue}from"./chunk-
|
|
1
|
+
import{a as Fe,b as Se}from"./chunk-SOD2BIQR.js";import{a as _e,b as ve,c as be,d as xe,e as Ce,f as ye}from"./chunk-TAN6GLIH.js";import"./chunk-GIRWHO6Q.js";import{a as fe,b as ge}from"./chunk-KARG227P.js";import{a as he}from"./chunk-XKI7WLHE.js";import{m as L}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import"./chunk-7L5IAWG2.js";import{a as re,b as ie}from"./chunk-II7KELI4.js";import"./chunk-L4ENW4RK.js";import"./chunk-KONCSTVQ.js";import{i as ue}from"./chunk-3NF5ANCH.js";import"./chunk-VM56C6ZV.js";import{a as se,b as me}from"./chunk-ISIYG4D5.js";import"./chunk-FNGX2XFA.js";import"./chunk-ALLR2NXQ.js";import"./chunk-BFEM6LX7.js";import{n as ne,o as ae,w as le,x as pe,y as ce,z as de}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{b as H,c as J,e as K,f as Q,k as W,m as X,n as Y,o as Z,p as ee,v as te,y as oe}from"./chunk-MGIEURA2.js";import{b as z,d as U}from"./chunk-DZCJWJUG.js";import"./chunk-H6JPNVHO.js";import"./chunk-G3BJCT7T.js";import"./chunk-JBYPGHPN.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import"./chunk-KL3TPLRB.js";import{j as B,l as $,m as j,u as q}from"./chunk-DM2JLWKE.js";import{Cb as P,Eb as f,Ec as v,Fc as b,Ha as A,Mb as a,Pb as _,Qb as y,Sb as F,Sc as T,Ub as S,Vb as k,Wb as i,Wc as V,Xb as n,Y as I,Yb as g,_ as C,ac as O,fc as w,gc as d,ia as c,ib as r,qa as G,ra as E,sc as h,tc as M,ua as N,uc as R,yb as D}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var Ie=()=>({height:"calc(100vh - 70px)"}),Ge=t=>({"ng-invalid ng-dirty":t}),ke=t=>({"ps-0":t}),Me=()=>({display:"flex"});function Ee(t,l){if(t&1){let e=O();i(0,"p-button",4),w("onClick",function(){G(e);let p=d(2);return E(p.onSubmit())}),n()}}function Ne(t,l){if(t&1&&f(0,Ee,1,0,"p-button",3),t&2){let e=d();a("ngIf",e.roleService.permissions().user.edit||e.roleService.permissions().user.create)}}function Ae(t,l){if(t&1&&(i(0,"div")(1,"span",16),h(2),n()()),t&2){let e=l.$implicit;r(2),M(e)}}function De(t,l){if(t&1&&(i(0,"div"),f(1,Ae,3,1,"div",15),n()),t&2){let e=d(2);r(),a("ngForOf",e.getErrors("name"))}}function Pe(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,Me)),a("binary",!0),r(2),R(" ",e.get("name").value," ")}}function Oe(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),S(8,Pe,5,7,"div",25,F),n()()()),t&2){let e=l.$implicit,o=l.$index,p=d(3);a("formGroupName",o),r(4),M(e.get("groupName").value),r(),_(v(5,Me)),a("binary",!0),r(3),k(p.getRolesArray(o).controls)}}function we(t,l){if(t&1&&(i(0,"div",17),S(1,Oe,10,6,"div",18,F),n()),t&2){let e=d(2);r(),k(e.rolesFormArray.controls)}}function Re(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,De,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,we,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,Ie)),r(3),a("formGroup",e.form),r(),a("fluid",!0)("ngClass",b(14,Ge,e.isInvalid("name"))),r(),a("ngIf",e.isInvalid("name")),r(3),y(b(16,ke,e.router.url.includes("forms"))),r(2),y(b(18,ke,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 ut=(()=>{class t extends he{constructor(){super(...arguments),this.service=c(Fe),this.fb=c(te),this.cdr=c(V),this.route=c(z),this.router=c(U),this.roleService=c(L),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=A(null)}ngOnInit(){this.route.queryParamMap.pipe(I(e=>this.service.getGroupFormMeta(e.get("groupID")).pipe(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.permissions().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}),Te=m.controls.every(s=>s.get("checked").value);u.get("groupChecked").setValue(Te,{emitEvent:!1}),this.roleService.permissions().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(C(()=>{this.router.navigate(["/pages/users/groups"])})).subscribe()}static{this.\u0275fac=(()=>{let e;return function(p){return(e||(e=N(t)))(p||t)}})()}static{this.\u0275cmp=D({type:t,selectors:[["app-group-form"]],features:[P],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,Ne,1,1,"ng-template",null,0,T)(3,Re,19,20,"ng-template",null,1,T),n()),o&2&&a("overflowScroll",!0)},dependencies:[ue,ie,re,oe,W,H,K,Q,X,ee,Y,Z,q,B,$,j,ae,ne,ye,Ce,xe,be,_e,ve,ge,fe,pe,le,Se,me,se,de,ce],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{ut as GroupFormComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i,b as T}from"./chunk-WL6ZZCYW.js";import{d as s}from"./chunk-DZCJWJUG.js";import{c as m}from"./chunk-
|
|
1
|
+
import{a as i,b as T}from"./chunk-WL6ZZCYW.js";import{d as s}from"./chunk-DZCJWJUG.js";import{c as m}from"./chunk-H6JPNVHO.js";import{a as l}from"./chunk-G3BJCT7T.js";import{_ as a,ca as c,ia as r}from"./chunk-6QJHEOXN.js";var h=(()=>{class o{constructor(){this.httpService=r(l),this.router=r(s),this.intercomService=r(m),this.tokenService=r(T),this.autoLogout()}login(e){return this.httpService.post("","api/Authentication/login",e).pipe(a(t=>{let n=e.SubDomain;localStorage.setItem("AUTH_TOKEN",t.access_token),localStorage.setItem("AUTH_POS_TOKEN",t.pos.access_token),localStorage.setItem("AUTH_TOKEN_TYPE",t.token_type),localStorage.setItem("AUTH_EXPIRES_AT",t.expiredAt),localStorage.setItem("AUTH_DOMAIN",n.substring(n.indexOf("."))),localStorage.setItem("AUTH_SUB_DOMAIN",e.SubDomain.split(".")[0]),localStorage.setItem("AUTH_USERNAME",e.Username),this.storeIntercom(t),this.storeTenantId(t.pos.access_token),this.storeRoles(t.access_token),this.tokenService.setToken(t.access_token),this.autoLogout()}))}storeIntercom(e){let t=e.intercomWidget?JSON.stringify(e.intercomWidget):null;t&&localStorage.setItem("INTERCOM",t)}isAuthenticated(){return!!localStorage.getItem("AUTH_TOKEN")}getToken(){return localStorage.getItem("AUTH_TOKEN")}getTokenType(){return localStorage.getItem("AUTH_TOKEN_TYPE")}isTokenExpired(){let e=localStorage.getItem("AUTH_EXPIRES_AT");return e?new Date(e).getTime()<Date.now():!0}autoLogout(){clearTimeout(this.logoutTimer);let e=localStorage.getItem("AUTH_EXPIRES_AT");if(!e)return;let t=new Date(e).getTime()-Date.now();t>0?this.logoutTimer=setTimeout(()=>this.logout(),t):this.logout()}getTenantExternalURL(){let e=localStorage.getItem("AUTH_SUB_DOMAIN")||"",t=localStorage.getItem("AUTH_DOMAIN")||"";return e&&t?`https://${e}${t}`:""}getTanantToken(){return localStorage.getItem("AUTH_POS_TOKEN")}logout(){this.intercomService.shutdown(),localStorage.removeItem("AUTH_TOKEN"),localStorage.removeItem("AUTH_TOKEN_TYPE"),localStorage.removeItem("AUTH_EXPIRES_AT"),localStorage.removeItem("INTERCOM"),clearTimeout(this.logoutTimer),this.router.navigate([""])}getFullDomain(){let e=localStorage.getItem("AUTH_SUB_DOMAIN"),t=localStorage.getItem("AUTH_DOMAIN");return!e||!t?(console.error("Subdomain or domain is missing in local storage."),null):`${e}${t}`}storeTenantId(e){let t=i(e);console.log("Decoded Token:",t),t&&(localStorage.setItem("AC_TENANT_BRAND",t.Brand),localStorage.setItem("AC_TENANT_LID",t.LID))}storeRoles(e){let t=i(e);console.log("Decoded Token:",t),t&&localStorage.setItem("AUTH_ROLES",JSON.stringify(t["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"]))}checkAuthKeysExists(){return["AC_TENANT_BRAND","AC_TENANT_LID","AUTH_DOMAIN","AUTH_EXPIRES_AT","AUTH_POS_TOKEN","AUTH_SUB_DOMAIN","AUTH_TOKEN","AUTH_TOKEN_TYPE","AUTH_USERNAME","AUTH_ROLES"].every(t=>!!localStorage.getItem(t))}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F}from"./chunk-QCGJB7O7.js";import{a as q}from"./chunk-HMZX6SME.js";import{a as R}from"./chunk-BT7Y4ADP.js";import{i as w}from"./chunk-
|
|
1
|
+
import{a as F}from"./chunk-QCGJB7O7.js";import{a as q}from"./chunk-HMZX6SME.js";import{a as R}from"./chunk-BT7Y4ADP.js";import{i as w}from"./chunk-3NF5ANCH.js";import"./chunk-VM56C6ZV.js";import{a as k}from"./chunk-ISIYG4D5.js";import"./chunk-FNGX2XFA.js";import"./chunk-ALLR2NXQ.js";import"./chunk-BFEM6LX7.js";import{w as P}from"./chunk-O44DI62I.js";import{b as M}from"./chunk-DTYVTTET.js";import"./chunk-MGIEURA2.js";import{b as I,d as E,e as D}from"./chunk-DZCJWJUG.js";import"./chunk-H6JPNVHO.js";import"./chunk-G3BJCT7T.js";import"./chunk-JBYPGHPN.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import"./chunk-KL3TPLRB.js";import"./chunk-DM2JLWKE.js";import{D as f,Eb as u,Ec as J,Fc as b,Mb as m,Rb as h,Sc as s,Wb as n,Xb as o,Y as _,Yb as j,_ as x,ac as y,fc as S,gc as a,ia as l,ib as p,qa as T,ra as v,sc as r,tc as c,yb as C}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var V=()=>["/pages/accounting-setup/journal-tag/form"],B=t=>({id:t});function L(t,d){if(t&1){let e=y();n(0,"div",3)(1,"p-button-group"),j(2,"p-button",4),n(3,"p-button",5),S("onClick",function(){T(e);let g=a();return v(g.onJournalTagDelete())}),o()()()}if(t&2){let e=a();p(2),m("routerLink",J(2,V))("queryParams",b(3,B,e.journalTag().id))}}function W(t,d){if(t&1&&(n(0,"div",6)(1,"div",7)(2,"p-panel",8)(3,"div",9)(4,"div",6)(5,"div",10),r(6,"Name"),o(),n(7,"div",10),r(8),o()(),n(9,"div",6)(10,"div",10),r(11,"Description"),o(),n(12,"div",10),r(13),o()()()()()()),t&2){let e=a(2);p(8),c(e.journalTag().name),p(5),c(e.journalTag().description)}}function A(t,d){if(t&1&&u(0,W,14,2,"div",6),t&2){let e=a();h(e.journalTag()?0:-1)}}var tt=(()=>{class t{constructor(){this.journalTagService=l(F),this.route=l(I),this.router=l(E),this.journalTag=M(this.route.queryParamMap.pipe(f(e=>e.has("id")),_(e=>this.journalTagService.journalTagInfo(e.get("id"))),R("Journal Tag Info ")),{initialValue:null})}onJournalTagDelete(){this.journalTagService.journalTagDelete(this.journalTag().id).pipe(x(()=>this.router.navigate(["/pages/accounting-setup/journal-tag"]))).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["app-journal-tag-info"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Journal Tag Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["severity","secondary","outlined","","label","Edit","icon","fa-solid fa-pen-to-square",3,"routerLink","queryParams"],["severity","secondary","outlined","","label","Delete","icon","fa-solid fa-trash",3,"onClick"],[1,"row"],[1,"col-6"],["styleClass","rounded-2"],[1,"d-flex","flex-column","gap-2"],[1,"col"]],template:function(i,g){i&1&&(n(0,"app-main-panel",2),u(1,L,4,5,"ng-template",null,0,s)(3,A,1,1,"ng-template",null,1,s),o()),i&2&&m("hasMainWrapperPadding",!0)},dependencies:[w,k,q,P,D],encapsulation:2})}}return t})();export{tt as JournalTagInfoComponent};
|