dealposbooks 5.45.2 → 5.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/assets/scss/components/_tables.scss +27 -3
  2. package/assets/scss/style.scss +4 -0
  3. package/{chunk-WO62II7E.js → chunk-265PINEB.js} +1 -1
  4. package/{chunk-OQD4ZKBU.js → chunk-2G2COOKC.js} +1 -1
  5. package/{chunk-2CZSVC7E.js → chunk-37MHHHLT.js} +1 -1
  6. package/{chunk-NMNIOSPK.js → chunk-3H2MG3RX.js} +1 -1
  7. package/{chunk-4TTCPL3N.js → chunk-3UEIZQIL.js} +1 -1
  8. package/{chunk-VEALQLJ2.js → chunk-3WWUSVNY.js} +1 -1
  9. package/{chunk-GJJEUBYR.js → chunk-45SKCDTK.js} +1 -1
  10. package/{chunk-AOJUTF6L.js → chunk-5VNZJNWI.js} +1 -1
  11. package/{chunk-BSDEDT6G.js → chunk-6E6DIFFQ.js} +1 -1
  12. package/{chunk-YDFJ65ST.js → chunk-6ETOXPS6.js} +1 -1
  13. package/{chunk-DWCZUCH4.js → chunk-6KPBN6PL.js} +1 -1
  14. package/{chunk-MMQTWRG5.js → chunk-6XOFO2US.js} +1 -1
  15. package/chunk-76ISI6NH.js +8 -0
  16. package/{chunk-AJUXGEAH.js → chunk-7QXFTI7P.js} +1 -1
  17. package/{chunk-JTUKNSIL.js → chunk-BEKYAQHU.js} +1 -1
  18. package/chunk-BXCTHZLV.js +129 -0
  19. package/{chunk-HSCJP74Q.js → chunk-CJMQPCRF.js} +1 -1
  20. package/{chunk-A2PK5UDL.js → chunk-DJSX32J5.js} +1 -1
  21. package/{chunk-4LXFEAO3.js → chunk-ECB5EIQL.js} +1 -1
  22. package/{chunk-BTVPGIVW.js → chunk-FQIBBQO2.js} +1 -1
  23. package/{chunk-PYQLVU3L.js → chunk-FVWAFBXC.js} +1 -1
  24. package/{chunk-HWYLSS7R.js → chunk-G3GX7TJT.js} +1 -1
  25. package/{chunk-Y7P7BGVH.js → chunk-GVZFU3IL.js} +2 -2
  26. package/{chunk-P63CD72K.js → chunk-H5BCW5OG.js} +1 -1
  27. package/{chunk-FXATM6DM.js → chunk-H5J2ODXS.js} +1 -1
  28. package/chunk-H7WUM7IF.js +1 -0
  29. package/{chunk-3KUSIKRO.js → chunk-HOHCN6MI.js} +1 -1
  30. package/{chunk-66OMKKIW.js → chunk-J4KTOC3S.js} +1 -1
  31. package/{chunk-WZQ3ORPU.js → chunk-JDN7HSFT.js} +1 -1
  32. package/{chunk-OZG2M6UV.js → chunk-KJLM2JDU.js} +4 -4
  33. package/{chunk-CDM64DTS.js → chunk-KRHMP57P.js} +1 -1
  34. package/{chunk-BXJSXLQV.js → chunk-KXRN2WUT.js} +1 -1
  35. package/{chunk-XBIY3I5H.js → chunk-LVSES747.js} +1 -1
  36. package/{chunk-OX6CAMTK.js → chunk-MXWBKCQV.js} +1 -1
  37. package/{chunk-SZPSOPM4.js → chunk-NA23LDSJ.js} +1 -1
  38. package/{chunk-MLC5Q3HL.js → chunk-NCP5HSZO.js} +1 -1
  39. package/{chunk-KUECUVZ7.js → chunk-NUAND7BZ.js} +1 -1
  40. package/{chunk-OVHHHUDY.js → chunk-NWVLHJBT.js} +1 -1
  41. package/{chunk-N4CQ65FU.js → chunk-R4SNCEXI.js} +1 -1
  42. package/{chunk-26UQWFZL.js → chunk-RAM3BLIZ.js} +1 -1
  43. package/chunk-S2HTMYMU.js +1 -0
  44. package/chunk-ST5JWMO4.js +1 -0
  45. package/{chunk-Y4NMBCL7.js → chunk-TN245HA6.js} +1 -1
  46. package/{chunk-QY6YO5GR.js → chunk-UOJZMQ6X.js} +1 -1
  47. package/{chunk-GZYN6L4H.js → chunk-UOSXT5W7.js} +1 -1
  48. package/{chunk-UP4DWDNE.js → chunk-V4A5GTYQ.js} +1 -1
  49. package/{chunk-QTPVRMTB.js → chunk-VDUU7T7V.js} +1 -1
  50. package/chunk-WLS2E4JE.js +1 -0
  51. package/{chunk-GNLE4WCA.js → chunk-X5TFTF7J.js} +1 -1
  52. package/{chunk-JOKE4TMJ.js → chunk-X5UUEKFM.js} +1 -1
  53. package/{chunk-FPBO6QHG.js → chunk-YUYV2CG7.js} +1 -1
  54. package/{chunk-W325ZFGZ.js → chunk-YXJCCERT.js} +1 -1
  55. package/index.html +2 -2
  56. package/{main-TUODCJBC.js → main-6YJJH4E2.js} +1 -1
  57. package/package.json +1 -1
  58. package/{styles-TEWF6HBI.css → styles-D4BND7FA.css} +1 -1
  59. package/chunk-3HOFEEIL.js +0 -1
  60. package/chunk-5M4DFZYR.js +0 -8
  61. package/chunk-DHA762N3.js +0 -1
  62. package/chunk-KQGEEF2E.js +0 -129
  63. package/chunk-QUL4J2CF.js +0 -1
  64. package/chunk-YVO6JHL7.js +0 -1
@@ -0,0 +1,8 @@
1
+ import{a as He,b as Ke,c as Qe,d as Xe,e as Ye,f as Ze}from"./chunk-XD7VHCRC.js";import{a as Le,b as $e,c as ze,d as Ue}from"./chunk-UP67MADL.js";import{a as qe,b as We}from"./chunk-NCDT6JPP.js";import{a as je}from"./chunk-JRVYSBUZ.js";import{b as Ne}from"./chunk-X5TFTF7J.js";import{a as Re,b as Je}from"./chunk-HG5MKVNR.js";import"./chunk-NZN6QJR3.js";import{a as Be,b as ke,k as Oe}from"./chunk-EL5BUFMO.js";import{a as Te,b as Me}from"./chunk-EQ4PLHI4.js";import"./chunk-H7Q35Y7G.js";import"./chunk-R7N6BWL5.js";import{a as Ve}from"./chunk-QF4D5YPK.js";import{a as Q,b as X}from"./chunk-VJ3IBUVO.js";import"./chunk-2AAVNIG7.js";import{a as Ge,b as Pe}from"./chunk-LFZCMZAP.js";import"./chunk-6A2KUPOG.js";import{a as we,b as De}from"./chunk-36OX4S7M.js";import"./chunk-Q5CVMJZC.js";import"./chunk-3GGXPPQT.js";import"./chunk-MFK5RQPJ.js";import{b as Y}from"./chunk-KJ2WX3FC.js";import"./chunk-6GN3MGBY.js";import"./chunk-Q24GCSGD.js";import{h as A}from"./chunk-GVZFU3IL.js";import"./chunk-VGNJD35F.js";import{a as J,b as j}from"./chunk-2XUSZCQL.js";import"./chunk-YV2QJ63P.js";import"./chunk-ARH3WEEF.js";import{n as K,o as F,w as V,x as R}from"./chunk-H6HNANYB.js";import"./chunk-2D2YD753.js";import{Ha as O,b as w,c as le,e as y,f as D,j as Ie,l as G,m as W,n as Ee,o as P,u as B,w as H,x as k}from"./chunk-OIBDX2CA.js";import{b as xe,e as Se,l as ye}from"./chunk-AOOG6YOT.js";import{a as Ae}from"./chunk-3UEIZQIL.js";import{a as Fe}from"./chunk-2MKKFLNJ.js";import{h as he,j as ve,k as Ce,q as _e,s as S}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as C,Cc as q,Db as g,Dc as I,Ec as oe,Ha as L,L as se,Lb as p,Nc as re,Ob as $,Oc as ae,Rb as T,Rc as f,Tb as M,Ub as N,Vb as i,Wb as n,Xb as c,Z as ue,_ as E,ca as de,ec as _,fc as d,g as pe,hb as l,ia as u,nb as ie,qa as b,ra as h,rc as r,s as ce,sc as U,tc as z,wc as fe,xb as x,xc as ge,yc as be}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var v=(()=>{class t{#e=u(Ae);fetchLoaderConfiguration(){return this.#e.get("","api/SetupLoader/Load")}updateAccountingIntegrationConfiguration(e){return this.#e.post(void 0,"/api/setup/SubmitConfig",e)}fetchOpeningBalanceFormConfiguration(){return this.#e.get("","/api/setup/OpeningBalance/Form")}submitOpeningBalanceFormConfiguration(e){return this.#e.post("","api/setup/OpeningBalance/Submit",e)}fetchAPICredential(){return this.#e.get(void 0,"/api/AccountConfig")}updateAPICredential(e){return this.#e.put(void 0,"/api/AccountConfig",e)}verifyAPICredential(e){return this.#e.post(void 0,"/api/AccountConfig/Validate",e)}formatJournal(e){return this.#e.post("","/api/setup/formatdata/clearjournal",{domain:e})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=de({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var st=()=>({height:"calc(100vh - 100px)"});function ut(t,m){if(t&1){let e=C();i(0,"div",4)(1,"a",5),r(2,"Cancel"),n(),i(3,"p-button",6),_("click",function(){b(e);let a=d();return h(a.updateAccountingIntegration())}),n()()}}function dt(t,m){if(t&1&&(i(0,"p-tab",8),r(1),n()),t&2){let e=m.$implicit,o=m.$index;p("value",o),l(),U(e)}}function ft(t,m){if(t&1&&(i(0,"div",25),c(1,"p-radiobutton",41),i(2,"label",42),r(3),n()()),t&2){let e=m.$implicit;l(),p("value",e.key)("inputId",e.value),l(),p("for",e.value),l(),U(e.value)}}function gt(t,m){if(t&1&&(i(0,"div",40)(1,"div",25),c(2,"p-radiobutton",43),i(3,"label",42),r(4),n()()()),t&2){let e=m.$implicit;l(2),p("value",e.key)("inputId",e.key.toString()),l(),p("for",e.key),l(),U(e.value)}}function bt(t,m){if(t&1&&(i(0,"p-scrollpanel",null,2)(2,"p-tabs",7)(3,"p-tablist"),M(4,dt,2,2,"p-tab",8,T),n(),i(6,"p-tabpanels")(7,"p-tabpanel",9)(8,"div",10)(9,"h3",11),r(10,"Accounting Numbering"),n(),i(11,"div",12)(12,"div",13)(13,"div",14)(14,"div",13)(15,"div",15)(16,"label",16),r(17,"Digit"),n(),c(18,"p-inputnumber",17),n()(),i(19,"div",13)(20,"div",15)(21,"label",18),r(22,"Seed"),n(),c(23,"p-inputnumber",19),n()(),i(24,"div",13)(25,"div",15)(26,"label",20),r(27,"Last Number"),n(),c(28,"p-inputnumber",21),n()(),i(29,"div",13)(30,"div",15)(31,"label",22),r(32,"Format"),n(),c(33,"p-select",23),n()(),i(34,"div",13)(35,"div",15)(36,"label",22),r(37,"Reset Every"),n(),i(38,"div",24),M(39,ft,4,4,"div",25,T),n()()()()()()()(),i(41,"p-tabpanel",8)(42,"div",26)(43,"div",27)(44,"h3",11),r(45,"Journal Generate"),n(),i(46,"p"),r(47,"Configure generate transaction"),n()(),i(48,"div",12)(49,"div",28)(50,"div",12)(51,"div",29)(52,"div",15)(53,"label",22),r(54,"Outlet Delivery Journal"),n(),c(55,"p-toggleswitch",30),n()(),i(56,"div",31)(57,"div",15)(58,"label",22),r(59,"Payment Discount Journal On Payment"),n(),c(60,"p-toggleswitch",32),n()()()()()(),c(61,"hr"),i(62,"div",26)(63,"div",28)(64,"div",12)(65,"div",33)(66,"label",22),r(67,"Note"),n()(),i(68,"div",29)(69,"div",15)(70,"label",22),r(71,"Note Required On Journal"),n(),c(72,"p-toggleswitch",34),n()(),i(73,"div",29)(74,"div",15)(75,"label",22),r(76,"Trial Balance Footer Visible"),n(),c(77,"p-toggleswitch",35),n()(),c(78,"div",29),n()()()(),i(79,"p-tabpanel",36)(80,"div",10)(81,"h3",11),r(82,"Report"),n(),i(83,"div",12)(84,"div",27)(85,"div",37)(86,"div")(87,"label",38),r(88,"Accounting For Treatment"),n(),i(89,"div",12)(90,"div",39)(91,"div",12),M(92,gt,5,4,"div",40,T),n()()()()()()()()()()()()),t&2){let e,o,a,s=d();$(I(8,st)),l(2),p("value",0)("formGroup",s.form),l(2),N(s.tabs()),l(3),p("value",0),l(26),p("options",(e=s.accountingIntegration())==null||e.options==null?null:e.options.monthlyResetPeriodFormat),l(6),N((o=s.accountingIntegration())==null||o.options==null?null:o.options.resetPeriods),l(2),p("value",1),l(38),p("value",2),l(13),N((a=s.accountingIntegration())==null||a.options==null?null:a.options.generatePrepaidJournal)}}var tt=(()=>{class t{constructor(){this.accountingSetupService=u(v),this.fb=u(B).nonNullable,this.tabs=L(["Numbering","Journal","Report"]),this.accountingIntegration=L(null)}ngOnInit(){this.initializeForm(),this.loadAccountingConfiguration()}initializeForm(){this.form=this.fb.group({number:this.createNumberGroup(),report:this.createReportGroup(),journalGenerate:this.createJournalGenerateGroup()})}createNumberGroup(){return this.fb.group({seed:this.fb.control(""),digit:this.fb.control(""),resetEvery:this.fb.control(""),monthlyFormat:this.fb.control(""),lastNumber:this.fb.control(""),lastModified:this.fb.control("")})}createReportGroup(){return this.fb.group({accountingAuditType:this.fb.control(""),accountingEntityAccess:this.fb.control(""),generatePrepaidJournal:this.fb.control("")})}createJournalGenerateGroup(){return this.fb.group({eodExpenseJournal:this.fb.control(""),transferOrder:this.fb.control(""),paymentDiscount:this.fb.control(""),noteMandatory:this.fb.control(""),trialBalanceFooterVisible:this.fb.control("")})}loadAccountingConfiguration(){this.accountingSetupService.fetchLoaderConfiguration().pipe(E(e=>{this.accountingIntegration.set(e),this.form.patchValue(e.form)})).subscribe()}updateAccountingIntegration(){let e={form:this.form.getRawValue()};this.accountingSetupService.updateAccountingIntegrationConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["app-accounting-integration"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["scrollPanelContainer",""],["pageTitle","Accounting Integration"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"click"],[1,"border-top",3,"value","formGroup"],[3,"value"],["formGroupName","number",3,"value"],[1,""],[1,"fs-5"],[1,"row"],[1,"col-6"],[1,"row","row-gap-3"],[1,"d-flex","flex-column"],["for","digit",1,"fs-4"],["inputId","digit","formControlName","digit"],["for","seed",1,"fs-4"],["inputId","seed","formControlName","seed"],["for","lastNumber",1,"fs-4"],["inputId","lastNumber","formControlName","lastNumber"],["for","",1,"fs-4"],["appendTo","body","formControlName","monthlyFormat","optionValue","key","optionLabel","value",3,"options"],[1,"d-flex","gap-4"],[1,"d-flex","align-items-center","gap-2"],["formGroupName","journalGenerate",1,"row"],[1,"col-12"],[1,"col-10"],[1,"col-md-4","mb-3"],["formControlName","transferOrder"],[1,"col-md-6","mb-4"],["formControlName","paymentDiscount"],[1,"col-12","mb-2"],["formControlName","noteMandatory"],["formControlName","trialBalanceFooterVisible"],["formGroupName","report",3,"value"],[1,"d-flex","flex-column","gap-4"],["for","generatePrepaidJournal",1,"fs-4","mb-2"],[1,"col-8"],[1,"col-4"],["name","resetEvery","formControlName","resetEvery",3,"value","inputId"],[1,"m-0",3,"for"],["name","generatePrepaidJournal","formControlName","generatePrepaidJournal",3,"value","inputId"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,ut,4,0,"ng-template",null,0,f)(3,bt,94,9,"ng-template",null,1,f),n())},dependencies:[S,Ze,Ye,Xe,Qe,He,Ke,A,Y,ke,Be,k,y,D,G,P,W,F,Pe,Ge,Je,Re,ye,Se,R,V,De,we,X,Q],styles:["[_nghost-%COMP%]{display:block}.inactive-state[_ngcontent-%COMP%]{background-color:#e5e5e5}.active-state[_ngcontent-%COMP%]{background-color:var(--p-primary-color)}"],changeDetection:0})}}return t})();var vt=()=>({height:"cacl(100vh - 200px)"}),Ct=()=>({height:"calc(100vh - 250px)"}),nt=()=>({});function _t(t,m){if(t&1){let e=C();i(0,"div")(1,"p-button",5),_("onClick",function(){b(e);let a=d();return h(a.submitForm())}),n()()}}function xt(t,m){t&1&&(i(0,"div",17)(1,"h3",18),r(2,"Date"),n(),c(3,"p-datePicker",19),n())}function St(t,m){if(t&1&&(i(0,"tr",9)(1,"td",27),r(2),n(),i(3,"td"),c(4,"input",28),n(),i(5,"td"),c(6,"input",29),n()()),t&2){let e,o=m.$implicit,a=m.index,s=d(4);p("formGroupName",a),l(2),z(" ",(e=s.asFormGroup(o).get("accountName"))==null?null:e.value," "),l(2),p("autoNumeric",I(4,nt)),l(2),p("autoNumeric",I(5,nt))}}function yt(t,m){if(t&1&&(i(0,"div",9)(1,"h4",20),r(2),n(),i(3,"div",21)(4,"table",22)(5,"thead",23)(6,"tr")(7,"th",24),r(8,"Account Name"),n(),i(9,"th",25),r(10,"Debit"),n(),i(11,"th",25),r(12,"Credit"),n()()(),i(13,"tbody"),g(14,St,7,6,"tr",26),n()()()()),t&2){let e=m.$implicit,o=m.$index,a=d(3);p("formGroupName",o),l(2),z(" ",e.get("name").value," "),l(12),p("ngForOf",a.getItemsArray(a.asFormGroup(e)).controls)}}function Ft(t,m){if(t&1&&(i(0,"p-panel",7),g(1,xt,4,0,"ng-template",null,2,f),c(3,"p-divider"),i(4,"p-scroll-panel")(5,"div",8),M(6,yt,15,3,"div",9,T),n()(),i(8,"div",10)(9,"table",11)(10,"tr")(11,"td",12)(12,"p",13),r(13," Total: "),n()(),i(14,"td",14)(15,"p",15),r(16),re(17,"number"),n()(),i(18,"td",16)(19,"p",15),r(20),re(21,"number"),n()()()()()()),t&2){let e=d(2);$(I(11,vt)),p("formGroup",e.formGroups),l(4),$(I(12,Ct)),l(2),N(e.formsArray.controls),l(10),z(" ",ae(17,7,e.subtotalDebit)," "),l(4),z(" ",ae(21,9,e.subtotalCredit)," ")}}function At(t,m){if(t&1&&g(0,Ft,22,13,"p-panel",6),t&2){let e=d();p("ngIf",e.formGroups)}}var ot=(()=>{class t{constructor(){this.destroy$=new pe,this.subtotalDebit=0,this.subtotalCredit=0,this.fb=u(B),this.accSetupService=u(v),this.dayjsService=u(Ne),this.date=new Date,this.routes=u(xe)}ngOnInit(){this.initializeForm(),this.loadFormData(),this.calculateSubtotalDebit(),this.formGroups.get("forms").valueChanges.pipe(se(300),ue(this.destroy$)).subscribe(()=>{this.calculateSubtotalDebit()})}initializeForm(){this.formGroups=this.fb.group({forms:this.fb.array([]),date:this.fb.control(new Date)})}get formsArray(){return this.formGroups.get("forms")}getItemsArray(e){return e.get("items")}asFormGroup(e){return e}createFormGroup(e){return this.fb.group({id:[e.id],name:[e.name],items:this.createItemsArray(e.items)})}createItemsArray(e){let o=e.map(a=>this.createItemGroup(a));return this.fb.array(o)}createItemGroup(e){return this.fb.group({accountName:[e.accountName],accountCode:[e.accountCode],id:[e.id],journalID:[e.journalID],accountID:[e.accountID],debitAmount:[e.debitAmount],creditAmount:[e.creditAmount],index:[e.index],note:[e.note]})}loadFormData(){this.routes.data.pipe(ce(e=>e.data),Ve("response"),E(e=>{for(;this.formsArray.length>0;)this.formsArray.removeAt(0);e.form.filter(a=>a.items&&a.items.length>0).forEach(a=>{this.formsArray.push(this.createFormGroup(a))})})).subscribe({error:e=>console.error("Error loading form data:",e)})}calculateSubtotalDebit(){let e=this.formGroups.controls.forms;this.subtotalDebit=0,this.subtotalCredit=0,e.controls.forEach(o=>{let a=this.getItemsArray(o),s=a.controls.reduce((ee,te)=>{let ne=te.get("debitAmount").value||0;return ee+ne},0),pt=a.controls.reduce((ee,te)=>{let ne=te.get("creditAmount").value||0;return ee+ne},0);this.subtotalDebit+=s,this.subtotalCredit+=pt})}submitForm(){let e=Object.entries(this.formGroups.getRawValue()).reduce((o,[a,s])=>(a==="date"?o[a]=s instanceof Date?this.dayjsService.format(s):s:a==="forms"?o.form=s:o[a]=s,o),{});console.log("Submitting form data:",e),this.accSetupService.submitOpeningBalanceFormConfiguration(e).subscribe(),console.log("Submitting form data:",e)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["app-acc-opening-balance-form"]],features:[q([O])],decls:6,vars:1,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Opening Balance Form",3,"scrollable"],["preventOpenDuplicates",""],["label","Submit",3,"onClick"],[3,"formGroup","style",4,"ngIf"],[3,"formGroup"],["formArrayName","forms",1,"d-flex","flex-column","row-gap-4"],[3,"formGroupName"],[2,"position","fixed","bottom","0","left","241px",`/* offset from the left edge (assuming 250px sidebar) */
2
+ width`,`calc(
3
+ 100% - 243px
4
+ )`,`/* adjust width to fit the remaining space */
5
+ z-index`,"91","background-color","white",`/* added background */
6
+ /* box-shadow`,"0 -2px 5px rgba(0, 0, 0, 0.1)",`*/ /* added subtle shadow */
7
+ padding`,"8px 0",`/* added padding for height */
8
+ border-top`,"1px solid #e0e0e0"],[1,"w-100","px-4"],[1,"ps-5"],[1,"fw-semibold","fs-4","m-0","text-end",2,"margin-right","10px !important"],[1,"",2,"width","200px"],[1,"fw-semibold","fs-4","m-0","text-start"],[1,"pe-5",2,"width","200px"],[1,"d-flex","flex-column","gap-2","mx-2"],[1,"fs-5","m-0"],["formControlName","date"],[1,"fs-4"],["formArrayName","items"],[1,"table"],[1,"table-secondary"],[1,"fs-3"],[1,"fs-3",2,"width","200px"],[3,"formGroupName",4,"ngFor","ngForOf"],[1,"fs-3","text-dark"],["formControlName","debitAmount",1,"fs-3","form-control","text-dark",3,"autoNumeric"],["formControlName","creditAmount",1,"fs-3","form-control","text-dark",3,"autoNumeric"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,_t,2,0,"ng-template",null,0,f)(3,At,1,1,"ng-template",null,1,f),n(),c(5,"p-toast",4)),o&2&&p("scrollable",!0)},dependencies:[A,Y,S,ve,Ce,_e,Me,Te,Oe,X,Q,H,w,y,D,F,ze,R,V,j,J,je,k,G,P,W,Ee,We,qe],styles:["[_nghost-%COMP%]{display:block} .table thead tr th{border:none}"],changeDetection:0})}}return t})();var rt=t=>({"ng-invalid ng-dirty":t});function Et(t,m){if(t&1){let e=C();i(0,"p-button",4),_("onClick",function(){b(e);let a=d();return h(a.verifyCredentials())}),r(1,"Verify"),n(),i(2,"p-button",4),_("onClick",function(){b(e);let a=d();return h(a.saveCredentials())}),r(3,"Update"),n()}}function Tt(t,m){t&1&&(i(0,"div",12)(1,"h3",13),r(2,"Account"),n(),i(3,"small",14),r(4,"Configure Client ID and Client Secret"),n()())}function Mt(t,m){if(t&1&&(i(0,"div",5)(1,"p-panel"),g(2,Tt,5,0,"ng-template",null,2,f),i(4,"div",6)(5,"div",7)(6,"div",8)(7,"label",9),r(8,"Client ID"),n(),c(9,"input",10),n()(),i(10,"div",7)(11,"div",8)(12,"label",9),r(13,"Client Secret"),n(),c(14,"input",11),n()()()()()),t&2){let e=d();l(4),p("formGroup",e.credentialForm),l(5),p("ngClass",oe(3,rt,e.clientIDControl.invalid&&e.clientIDControl.dirty||e.clientIDControl.touched)),l(5),p("ngClass",oe(5,rt,e.clientSecretControl.invalid&&e.clientSecretControl.dirty||e.clientSecretControl.touched))}}var at=(()=>{class t{constructor(e,o){this.fb=e,this.messageService=o,this.setupService=u(v)}ngOnInit(){this.initForm(),this.setupService.fetchAPICredential().pipe(E(e=>{this.credentialForm.patchValue({clientID:e.clientID||"",clientSecret:e.clientSecret||""})})).subscribe()}initForm(){this.credentialForm=this.fb.group({clientID:["",[le.required]],clientSecret:["",[le.required]]})}get clientIDControl(){return this.credentialForm.get("clientID")}get clientSecretControl(){return this.credentialForm.get("clientSecret")}saveCredentials(){if(this.credentialForm.invalid){this.credentialForm.markAllAsTouched();return}let e=this.credentialForm.getRawValue();console.log("Saving credentials:",e),this.setupService.updateAPICredential(e).subscribe()}verifyCredentials(){if(this.credentialForm.invalid){this.credentialForm.markAllAsTouched();return}let e=this.credentialForm.getRawValue();console.log("Verifying credentials:",e),this.setupService.verifyAPICredential(e).subscribe({next:o=>{console.log("Verify result:",o),this.messageService.add({severity:"success",summary:"Verified",detail:"Credentials are valid!"})},error:o=>{console.error("Verify failed:",o),this.messageService.add({severity:"error",summary:"Invalid",detail:"Client ID or Secret is wrong!"})}})}static{this.\u0275fac=function(o){return new(o||t)(ie(B),ie(O))}}static{this.\u0275cmp=x({type:t,selectors:[["app-api-credential"]],features:[q([O])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","API Credential"],[3,"onClick"],[1,"d-flex","flex-column","row-gap-4"],[1,"row",3,"formGroup"],[1,"col-6"],[1,"d-flex","flex-column"],["for","outlet"],["type","text","pInputText","","formControlName","clientID",3,"ngClass"],["type","text","pInputText","","formControlName","clientSecret",3,"ngClass"],[1,"d-flex","flex-column","px-2"],[1,"mb-0","fw-bold"],[1,"fst-italic","text-muted"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,Et,4,0,"ng-template",null,0,f)(3,Mt,15,7,"ng-template",null,1,f),n())},dependencies:[S,he,k,w,y,D,G,P,F,K,j,J,A,R,V,Ue],encapsulation:2})}}return t})();function Nt(t,m){if(t&1){let e=C();i(0,"button",4),_("click",function(){b(e);let a=d();return h(a.onFormatJournal())}),r(1," Format "),n()}}function wt(t,m){t&1&&(i(0,"div",12)(1,"div",13)(2,"h4",14),r(3,"Journal Configuration"),n(),i(4,"small",15),r(5," Enter your account information to format journal entries "),n()()())}function Dt(t,m){if(t&1){let e=C();i(0,"div",5)(1,"p-panel"),g(2,wt,6,0,"ng-template",null,2,f),i(4,"div",6)(5,"div",7)(6,"p-floatlabel",8)(7,"input",9),be("ngModelChange",function(a){b(e);let s=d();return ge(s.subdomain,a)||(s.subdomain=a),h(a)}),n(),i(8,"label",10),r(9,"Subdomain"),n()(),i(10,"small",11),r(11,"Enter your account subdomain (e.g., mycompany.dealpos.net)"),n()()()()()}if(t&2){let e=d();l(7),fe("ngModel",e.subdomain)}}var lt=(()=>{class t{constructor(){this.setupService=u(v),this.subdomain=L(""),this.toastrService=u(Fe)}onFormatJournal(){if(!this.subdomain()){this.toastrService.error("Please enter a subdomain","Error");return}this.setupService.formatJournal(this.subdomain()).subscribe({next:e=>{this.toastrService.success(e.message,"Success")}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["app-format-jurnal"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Format Journal"],[1,"btn","btn-success","rounded",3,"click"],[1,"d-flex","flex-column","row-gap-4"],[1,"row","mt-6"],[1,"col-12"],["variant","on"],["pInputText","","id","subdomain","autocomplete","off",1,"w-100",3,"ngModelChange","ngModel"],["for","subdomain"],[1,"text-muted","fst-italic",2,"font-size","12px"],[1,"row","ps-2"],[1,"col-12","d-flex","flex-column"],[1,"mb-1","fw-bold"],[1,"fst-italic","text-muted"]],template:function(o,a){o&1&&(i(0,"app-main-panel",3),g(1,Nt,2,0,"ng-template",null,0,f)(3,Dt,12,1,"ng-template",null,1,f),n())},dependencies:[S,H,w,y,Ie,F,K,A,j,J,$e,Le],encapsulation:2})}}return t})();var mt=()=>u(v).fetchOpeningBalanceFormConfiguration();var fi=[{path:"",redirectTo:"accounting-integration",pathMatch:"full"},{path:"",children:[{path:"journal-tag",loadComponent:()=>import("./chunk-H7WUM7IF.js").then(t=>t.JournalTagComponent)},{path:"journal-tag/info",loadComponent:()=>import("./chunk-NCP5HSZO.js").then(t=>t.JournalTagInfoComponent)},{path:"journal-tag/form",loadComponent:()=>import("./chunk-J4KTOC3S.js").then(t=>t.JournalTagFormComponent)},{path:"accounting-integration",component:tt},{path:"opening-balance-form",component:ot,resolve:{data:mt}},{path:"api-crendetial",component:at},{path:"format-journal",component:lt},{path:"closing-entries",loadComponent:()=>import("./chunk-37MHHHLT.js").then(t=>t.ClosingPageComponent)},{path:"closing-entries/create",loadComponent:()=>import("./chunk-RAM3BLIZ.js").then(t=>t.ClosingFormComponent)}]}];export{fi as ACCOUNTING_SETUP_ROUTES};