dealposbooks 5.50.0 → 5.51.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 (91) hide show
  1. package/3rdpartylicenses.txt +10 -10
  2. package/chunk-2RXAK5B6.js +8 -0
  3. package/chunk-2U3PIWWJ.js +1 -0
  4. package/chunk-32QC4JFI.js +202 -0
  5. package/{chunk-KZU3VXLG.js → chunk-3O7NQ6AZ.js} +1 -1
  6. package/{chunk-PB2MFYIM.js → chunk-3RODMLL2.js} +1 -1
  7. package/chunk-4GZGUASQ.js +1 -0
  8. package/chunk-52EMI2TW.js +803 -0
  9. package/{chunk-DAM2WKDY.js → chunk-52PEVPZN.js} +1 -1
  10. package/{chunk-65V5R4TS.js → chunk-5XVZW6BJ.js} +1 -1
  11. package/chunk-7ET5ZE2L.js +1 -0
  12. package/chunk-7F5JJ627.js +129 -0
  13. package/chunk-7GORVGAV.js +1 -0
  14. package/chunk-AAKZYXG3.js +145 -0
  15. package/{chunk-3ALAWCRA.js → chunk-B7TGZ7J3.js} +1 -1
  16. package/{chunk-DM45YT57.js → chunk-BT4SLG45.js} +1 -1
  17. package/{chunk-IMPGOCFC.js → chunk-BVHTVDYP.js} +1 -1
  18. package/chunk-CPAPQNFC.js +1 -0
  19. package/{chunk-RBNXJUFM.js → chunk-D5WBKKO2.js} +1 -1
  20. package/{chunk-VNZUZ5UI.js → chunk-DAN3PD7R.js} +1 -1
  21. package/chunk-DM42MH3E.js +1 -0
  22. package/chunk-E57RWXDG.js +1 -0
  23. package/{chunk-GU4FXUJC.js → chunk-EDYUAYO2.js} +1 -1
  24. package/{chunk-SX4XIR77.js → chunk-ELZ5FFFM.js} +1 -1
  25. package/{chunk-Z4XRTHAH.js → chunk-F4PHXCVU.js} +1 -1
  26. package/{chunk-TOR7QRRB.js → chunk-G3BJCT7T.js} +1 -1
  27. package/{chunk-XGU6GBEK.js → chunk-GEYRJ2MR.js} +1 -1
  28. package/{chunk-KXW5NWRO.js → chunk-GN7VAGHH.js} +1 -1
  29. package/{chunk-2JFOEOZ2.js → chunk-GQ7SPEZH.js} +1 -1
  30. package/{chunk-ON7PMYMV.js → chunk-H7YYGW7V.js} +1 -1
  31. package/{chunk-XULSWUMO.js → chunk-HYOAHRKW.js} +1 -1
  32. package/chunk-ILQI2X5T.js +1 -0
  33. package/{chunk-A6T2KR7U.js → chunk-J346SEEU.js} +1 -1
  34. package/{chunk-YQYRAH7V.js → chunk-JBYPGHPN.js} +1 -1
  35. package/{chunk-J3HFAWXU.js → chunk-JPKZVL57.js} +1 -1
  36. package/{chunk-LBXNL7E4.js → chunk-JPNJTPYJ.js} +1 -1
  37. package/{chunk-BB2CNXSH.js → chunk-KBJ25I3J.js} +1 -1
  38. package/chunk-KJM3M7Y3.js +1 -0
  39. package/chunk-KU4BYYJE.js +1 -0
  40. package/{chunk-SXNOZOOP.js → chunk-KXWAD3X4.js} +1 -1
  41. package/chunk-L27GCER2.js +160 -0
  42. package/chunk-LF4HTMCE.js +1 -0
  43. package/chunk-MCR6MBS2.js +1 -0
  44. package/{chunk-ZC2ADHDH.js → chunk-MHM3ED4J.js} +1 -1
  45. package/chunk-MWRTPPEI.js +1 -0
  46. package/chunk-NSMNMKCV.js +1 -0
  47. package/{chunk-VKUW7E75.js → chunk-NTVIX4GB.js} +1 -1
  48. package/{chunk-SJOOTBQ5.js → chunk-OILVKUFA.js} +1 -1
  49. package/chunk-OKT36WED.js +1 -0
  50. package/{chunk-KORGIX2B.js → chunk-OOCLTY27.js} +1 -1
  51. package/{chunk-ZAMQ4RCL.js → chunk-QCGJB7O7.js} +1 -1
  52. package/chunk-QSIXT7W7.js +7 -0
  53. package/{chunk-GAXDMEOS.js → chunk-QXE4YYQV.js} +1 -1
  54. package/{chunk-3GYSEQ25.js → chunk-R45WWOYD.js} +1 -1
  55. package/chunk-RFHL2MJ4.js +1 -0
  56. package/{chunk-7DBOORB2.js → chunk-RGVP7KT4.js} +1 -1
  57. package/{chunk-4AGTFPOU.js → chunk-SOD2BIQR.js} +1 -1
  58. package/chunk-TOAH3PY3.js +1 -0
  59. package/{chunk-56CZGYL5.js → chunk-V6BSLJMN.js} +1 -1
  60. package/{chunk-NHW7GVHK.js → chunk-VABCBO2E.js} +1 -1
  61. package/{chunk-RVUOVLL5.js → chunk-VQ62YSFR.js} +1 -1
  62. package/{chunk-4IMFKRR6.js → chunk-WPHZJHC6.js} +1 -1
  63. package/{chunk-SOYJAYJK.js → chunk-YKZN6T5N.js} +1 -1
  64. package/chunk-YMV3SC73.js +1 -0
  65. package/{chunk-DAFEIZYQ.js → chunk-ZLBNHUZF.js} +1 -1
  66. package/{chunk-YU4Q7ASX.js → chunk-ZOMQLK4A.js} +1 -1
  67. package/index.html +2 -2
  68. package/{main-UCTZ3G6L.js → main-ET3JU27S.js} +1 -1
  69. package/package.json +1 -1
  70. package/chunk-27SC6O47.js +0 -1
  71. package/chunk-47G2N7SA.js +0 -1
  72. package/chunk-4RBG4SFN.js +0 -1
  73. package/chunk-5N5QHECN.js +0 -1
  74. package/chunk-6GO647AV.js +0 -1
  75. package/chunk-AF6G72MJ.js +0 -1
  76. package/chunk-BOQI2TMP.js +0 -8
  77. package/chunk-BTFX33U6.js +0 -947
  78. package/chunk-COSMZ2AH.js +0 -1
  79. package/chunk-FHXTQXB7.js +0 -160
  80. package/chunk-HQHEWKLC.js +0 -1
  81. package/chunk-I2OULINE.js +0 -1
  82. package/chunk-JERRSTLA.js +0 -1
  83. package/chunk-OOCCZG53.js +0 -129
  84. package/chunk-SASRJPT7.js +0 -1
  85. package/chunk-URGN4QVD.js +0 -1
  86. package/chunk-UTOLWW4T.js +0 -1
  87. package/chunk-VJROOSEO.js +0 -7
  88. package/chunk-WYLIU52Q.js +0 -1
  89. package/chunk-XN4CDKDI.js +0 -1
  90. package/chunk-Z3ZKNQZS.js +0 -1
  91. package/chunk-ZWNKUBMG.js +0 -202
@@ -0,0 +1 @@
1
+ import{a as we}from"./chunk-B7TGZ7J3.js";import"./chunk-GQ7SPEZH.js";import{a as Ce,b as ve,c as Ee,d as he,e as Ie,f as be}from"./chunk-X6KL7VKV.js";import{a as ye,b as Ve,c as Se}from"./chunk-3O7NQ6AZ.js";import"./chunk-WL6ZZCYW.js";import{b as _e,d as ue,e as fe,f as xe,i as ge}from"./chunk-52EMI2TW.js";import"./chunk-AAKZYXG3.js";import"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import{a as R}from"./chunk-BT7Y4ADP.js";import{a as ie}from"./chunk-5U7KZJ3H.js";import"./chunk-MJGBBYIO.js";import"./chunk-CN6AT4LE.js";import"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-II7KELI4.js";import"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import{a as ce,b as de}from"./chunk-FHJOSHI3.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{e as pe,f as me,i as se}from"./chunk-JPKZVL57.js";import"./chunk-VM56C6ZV.js";import{a as ae,b as le}from"./chunk-ISIYG4D5.js";import"./chunk-FNGX2XFA.js";import"./chunk-ALLR2NXQ.js";import"./chunk-BFEM6LX7.js";import{w as oe,x as re}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import"./chunk-MGIEURA2.js";import{d as ne}from"./chunk-DZCJWJUG.js";import"./chunk-VQ62YSFR.js";import"./chunk-G3BJCT7T.js";import"./chunk-JBYPGHPN.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import"./chunk-KL3TPLRB.js";import{j as X,m as Y,r as Z,s as ee,u as te}from"./chunk-DM2JLWKE.js";import{Eb as d,Ec as J,Fc as T,Ha as S,Hc as q,I as N,Mb as m,Oc as E,Pb as A,Pc as I,Qc as G,Rb as h,Sb as F,Sc as c,Ub as P,Vb as D,Wb as n,Xb as i,Y as U,Yb as _,_ as w,ac as v,fc as y,gb as j,gc as s,ia as k,ib as l,m as M,mc as H,nc as L,oc as O,qa as f,ra as x,rc as $,s as B,sc as r,tc as g,uc as C,xc as Q,yb as K,yc as W,zc as z}from"./chunk-6QJHEOXN.js";import{e as Re}from"./chunk-YQFG5XE2.js";var Je=Re(Ve());var ke=["stepper"],Ae=()=>({width:"30vw"}),Fe=()=>({"1199px":"75vw","575px":"100vw"}),Pe=()=>({height:"calc(100vh - 70px)"}),De=t=>({"col-12":t}),Me=(t,p,e)=>({"bg-gradient-danger":t,"bg-gradient-success":p,"bg-gradient-warning":e}),Te=t=>({"state-danger":t});function Be(t,p){if(t&1){let e=v();n(0,"p-button",14),y("click",function(){f(e);let o=s(2);return x(o.onPrevStep())}),i()}if(t&2){let e=s(2);m("disabled",e.stepActiveIndex()===1)}}function Ne(t,p){if(t&1){let e=v();n(0,"p-button",15),y("click",function(){f(e);let o=s(2);return x(o.onNextStep())}),i()}if(t&2){let e=s(2);m("disabled",e.stepActiveIndex()===3||!e.JournalEntryImport())}}function Ue(t,p){if(t&1){let e=v();n(0,"p-button",16),y("click",function(){f(e);let o=s(2);return x(o.onReset())}),i()}}function je(t,p){if(t&1&&d(0,Be,1,1,"p-button",11)(1,Ne,1,1,"p-button",12)(2,Ue,1,0,"p-button",13),t&2){let e=s();m("ngIf",e.stepActiveIndex()>1),l(),m("ngIf",e.stepActiveIndex()<3),l(),m("ngIf",e.stepActiveIndex()===3)}}function Ke(t,p){if(t&1){let e=v();n(0,"POS-uppy",25),y("fileUploaded",function(o){f(e);let u=s(2);return x(u.onFileUploaded(o))})("fileRemoved",function(o){f(e);let u=s(2);return x(u.onFileRemoved(o))}),i(),n(1,"p",26),r(2," Please refer this "),n(3,"a",27),r(4,"article"),i(),r(5," for more information "),i()}if(t&2){let e=s(2);m("uppyCoreConfiguration",e.uppyCore)("dashboardPropsConfiguration",e.dashboardProps)("sampleUrl",e.SAMPLE_URL)("subtitle",e.subtitle)}}function He(t,p){t&1&&(n(0,"tr"),_(1,"th",29),n(2,"th",30),r(3," Number "),_(4,"p-sortIcon",31),i(),n(5,"th",32),r(6," Outlet "),_(7,"p-sortIcon",33),i(),n(8,"th",34),r(9," Date "),_(10,"p-sortIcon",35),i(),n(11,"th",36),r(12," Status "),_(13,"p-sortIcon",37),i(),n(14,"th"),r(15,"Message"),i()())}function Le(t,p){if(t&1&&(n(0,"div",41)(1,"span"),r(2),i(),n(3,"span"),r(4),i()()),t&2){let e=p.$implicit;l(2),g(e.issue),l(2),g(e.solution)}}function Oe(t,p){if(t&1&&(n(0,"div",40),P(1,Le,5,2,"div",41,F),i()),t&2){let e=s(2).$implicit;l(),D(e.issues)}}function $e(t,p){}function Qe(t,p){if(t&1&&d(0,Oe,3,0,"div",40)(1,$e,0,0),t&2){let e=s().$implicit;h(e.issues&&e.issues.length>0?0:1)}}function We(t,p){if(t&1&&(n(0,"tr")(1,"td"),_(2,"p-button",38),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i(),n(7,"td"),r(8),E(9,"date"),i(),n(10,"td",39),r(11),i(),n(12,"td",39),d(13,Qe,2,1),i()()),t&2){let e=p.$implicit,a=p.expanded,o=s(4);l(2),m("pRowToggler",e)("text",!0)("rounded",!0)("plain",!0)("icon",a?"fa-solid fa-chevron-down":"fa-solid fa-chevron-right"),l(2),g(e.number),l(2),C(" ",e.outlet," "),l(2),g(G(9,12,e.date,"d MMM y")),l(2),m("ngClass",q(15,Me,e.actionName==="Error",e.actionName==="New",e.actionName==="Update")),l(),C(" ",e.actionName," "),l(),m("ngClass",T(19,Te,o.hasIssue)),l(),h(o.hasIssue?13:-1)}}function ze(t,p){t&1&&(n(0,"tr")(1,"th",45),r(2," Code "),_(3,"p-sortIcon",46),i(),n(4,"th",47),r(5," Name "),_(6,"p-sortIcon",48),i(),n(7,"th",49),r(8," Note "),_(9,"p-sortIcon",50),i(),n(10,"th",51),r(11," Debit "),_(12,"p-sortIcon",52),i(),n(13,"th",53),r(14," Credit "),_(15,"p-sortIcon",54),i(),n(16,"th"),r(17,"Message"),i()())}function qe(t,p){if(t&1&&(n(0,"div",41)(1,"span"),r(2),i(),n(3,"span"),r(4),i()()),t&2){let e=p.$implicit;l(2),g(e.issue),l(2),g(e.solution)}}function Ge(t,p){if(t&1&&(n(0,"div",40),P(1,qe,5,2,"div",41,F),i()),t&2){let e=s().$implicit;l(),D(e.issues)}}function Xe(t,p){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),i(),n(5,"td"),r(6),i(),n(7,"td"),r(8),E(9,"number"),i(),n(10,"td"),r(11),E(12,"number"),i(),n(13,"td",39),d(14,Ge,3,0,"div",40),i()()),t&2){let e=p.$implicit,a=s(5);l(2),g(e.accountCode),l(2),g(e.accountName),l(2),g(e.note),l(2),C(" ",I(9,7,e.debitAmount)," "),l(3),C(" ",I(12,9,e.creditAmount)," "),l(2),m("ngClass",T(11,Te,e.issues&&e.issues.length>0)),l(),h(a.hasIssue?14:-1)}}function Ye(t,p){t&1&&(n(0,"tr")(1,"td",55),r(2," There are no order for this product yet. "),i()())}function Ze(t,p){if(t&1&&(n(0,"tr")(1,"td",42)(2,"div",43)(3,"p-table",44),d(4,ze,18,0,"ng-template",null,3,c)(6,Xe,15,13,"ng-template",null,6,c)(8,Ye,3,0,"ng-template",null,8,c),i()()()()),t&2){let e=p.$implicit;l(3),m("value",e.items)}}function et(t,p){if(t&1&&(n(0,"p-table",28),d(1,He,16,0,"ng-template",null,3,c)(3,We,14,21,"ng-template",null,6,c)(5,Ze,10,1,"ng-template",null,7,c),i()),t&2){let e=s(3);m("scrollable",!0)("scrollHeight","calc(100vh - 160px)")("value",e.JournalEntryImport().dataRow)}}function tt(t,p){if(t&1&&d(0,et,7,3,"p-table",28),t&2){let e=s(2);h(e.JournalEntryImport()?0:-1)}}function nt(t,p){t&1&&(n(0,"h5"),r(1,"Successfully Imported"),i())}function it(t,p){if(t&1&&(n(0,"p-panel")(1,"p-scroll-panel")(2,"div",17)(3,"div",18)(4,"p-stepper",19,5)(6,"p-step-list")(7,"p-step",20)(8,"div",21),_(9,"i",22),n(10,"span"),r(11,"Upload"),i()()(),n(12,"p-step",20)(13,"div",21),_(14,"i",23),n(15,"span"),r(16,"Preview"),i()()(),n(17,"p-step",20)(18,"div",21),_(19,"i",24),n(20,"span"),r(21,"Finish"),i()()()(),n(22,"p-step-panels")(23,"p-step-panel",20),d(24,Ke,6,4,"ng-template",null,1,c),i(),n(26,"p-step-panel",20),d(27,tt,1,1,"ng-template",null,1,c),i(),n(29,"p-step-panel",20),d(30,nt,2,0,"ng-template",null,1,c),i()()()()()()()),t&2){let e=s();l(),A(J(11,Pe)),l(2),m("ngClass",T(12,De,e.stepActiveIndex()===2)),l(),m("linear",!0)("value",e.stepActiveIndex()),l(3),m("value",1),l(5),m("value",2),l(5),m("value",3),l(6),m("value",1),l(3),m("value",2),l(3),m("value",3)}}function ot(t,p){if(t&1){let e=v();n(0,"p-button",56),y("onClick",function(){f(e);let o=s();return x(o.summaryDialogVisible.set(!1))}),i()}t&2&&m("rounded",!0)("text",!0)}function rt(t,p){if(t&1&&(n(0,"div",57)(1,"h4",58),r(2,"Import Summary"),i(),n(3,"p",59),r(4),i()()),t&2){let e=s();l(4),C("(",e.CSVRowCount()," rows ready for import)")}}function at(t,p){t&1&&(n(0,"div",63)(1,"h4",64),r(2,"Journal"),i()())}function lt(t,p){t&1&&(n(0,"div",65)(1,"h4",64),r(2,"Debit"),i()())}function pt(t,p){t&1&&(n(0,"div",65)(1,"h4",64),r(2,"Credit"),i()())}function mt(t,p){if(t&1&&(n(0,"div",60)(1,"div",61)(2,"p-card"),d(3,at,3,0,"ng-template",null,3,c),n(5,"div",60)(6,"div",61)(7,"h5",62),r(8),E(9,"number"),i()()()()(),n(10,"div",61)(11,"p-card"),d(12,lt,3,0,"ng-template",null,3,c),n(14,"div",60)(15,"div",61)(16,"h5",62),r(17),E(18,"number"),i()()()()(),n(19,"div",61)(20,"p-card"),d(21,pt,3,0,"ng-template",null,3,c),n(23,"div",60)(24,"div",61)(25,"h5",62),r(26),E(27,"number"),i()()()()()()),t&2){let e=s(2);l(8),C(" ",I(9,3,e.JournalEntryImport().summary.journal)," "),l(9),C(" ",I(18,5,e.JournalEntryImport().summary.debit)," "),l(9),C(" ",I(27,7,e.JournalEntryImport().summary.credit)," ")}}function st(t,p){if(t&1&&d(0,mt,28,9,"div",60),t&2){let e=s();h(e.JournalEntryImport()?0:-1)}}function ct(t,p){if(t&1){let e=v();n(0,"p-button",66),y("click",function(){f(e);let o=s();return x(o.summaryDialogVisible.set(!1))}),i(),n(1,"p-button",67),y("click",function(){f(e);let o=s();return x(o.onConfirmImport())}),i()}}var jt=(()=>{class t{constructor(){this.service=k(we),this.router=k(ne),this.subtitle="Accepted file format: .csv & max file size: 1MB",this.stepActiveIndex=S(1),this.JournalEntryImport=S(null),this.summaryDialogVisible=S(!1),this.CSVRowCount=S(0),this.dashboardProps={inline:!0,width:580,height:350},this.uppyCore={restrictions:{allowedFileTypes:["text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]}},this.SAMPLE_URL="https://resc.cloudinary.com/pos/raw/upload/POS/CSV/Journal_DealPOS.csv"}ngAfterViewInit(){console.log("Stepper instance:",this.stepperRef)}onFileUpload(e){console.log("File upload event:",e);let a=new FormData;Array.isArray(e.currentFiles)&&e.currentFiles.forEach(o=>{o instanceof File&&a.append("File",o,o.name)}),console.log("Form data prepared for upload:",a.get("File")),this.service.importPreviewJournal(a).pipe(R("Import Preview"),B(o=>({cacheKey:o.cacheKey})),U(o=>this.service.importConfirmJournal(o)),w(()=>{this.router.navigate(["/pages/journal/journal-entry"])})).subscribe()}onFileRemoved(e){console.log("File removed event:",e),this.JournalEntryImport.set(null),this.CSVRowCount.set(0)}onNextStep(){if(this.stepActiveIndex()<3&&(this.stepActiveIndex.update(e=>e+1),this.stepActiveIndex()===3)){this.stepActiveIndex.update(()=>this.stepActiveIndex()-1),this.summaryDialogVisible.set(!0);return}}onPrevStep(){this.stepActiveIndex()>1&&this.stepActiveIndex.update(e=>e-1)}onFileUploaded(e){let a=new FormData;if("name"in e&&typeof e.name=="string")a.append("File",e,e.name),this.service.importPreviewJournal(a).pipe(R("Import Preview"),w(o=>{this.JournalEntryImport.set(o)})).subscribe(),Je.default.parse(e,{header:!0,skipEmptyLines:!0,complete:o=>{console.log("CSV Parsing Results:",o),this.CSVRowCount.set(o.data.length)},error:o=>{console.error("Error parsing CSV:",o)}});else return}onConfirmImport(){if(this.JournalEntryImport()&&this.JournalEntryImport().canProceed){let e={cacheKey:this.JournalEntryImport().cacheKey};this.service.importConfirmJournal(e).pipe(R("Import Confirm"),w(()=>{this.router.navigate(["/pages/journal/journal-entry"]),this.stepActiveIndex.update(a=>a+1),this.summaryDialogVisible.update(a=>!a)}),N(a=>(console.error("Error occurred during import confirmation:",a),this.stepActiveIndex.update(o=>o+1),this.summaryDialogVisible.update(o=>!o),M(null)))).subscribe()}else{console.error("Cannot proceed with import, JournalEntryImport is not set or canProceed is false.");return}}onReset(){this.stepActiveIndex.set(1),this.JournalEntryImport.set(null)}handleKeyboardEvent(e){e.key==="F2"&&this.onConfirmImport()}get hasIssue(){let e=this.JournalEntryImport();return e&&Array.isArray(e.dataRow)?e.dataRow.some(a=>{let o=a.issues&&a.issues.length>0,u=Array.isArray(a.items)&&a.items.some(b=>b.issues&&b.issues.length>0);return o||u}):!1}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=K({type:t,selectors:[["app-journal-entry-import"]],viewQuery:function(a,o){if(a&1&&H(ke,5),a&2){let u;L(u=O())&&(o.stepperRef=u.first)}},hostBindings:function(a,o){a&1&&y("keydown",function(b){return o.handleKeyboardEvent(b)},!1,j)},decls:14,vars:10,consts:[["actionButton",""],["content",""],["closeIconTemplate",""],["header",""],["footer",""],["stepper",""],["body",""],["expandedrow",""],["emptymessage",""],["pageTitle","Manual Journal Import"],["position","center","appendTo","body",3,"visibleChange","modal","visible","breakpoints","draggable","closeIconTemplate","dismissableMask"],["label","Back","severity","secondary","variant","outlined",3,"disabled","click",4,"ngIf"],["label","Next","severity","primary",3,"disabled","click",4,"ngIf"],["label","Finish","severity","primary",3,"click",4,"ngIf"],["label","Back","severity","secondary","variant","outlined",3,"click","disabled"],["label","Next","severity","primary",3,"click","disabled"],["label","Finish","severity","primary",3,"click"],[1,"row","justify-content-center"],[1,"col-6",3,"ngClass"],[3,"linear","value"],[3,"value"],[1,"d-flex","gap-2","align-items-center"],[1,"fa-solid","fa-upload"],[1,"fa-solid","fa-file"],[1,"fa-solid","fa-check"],[3,"fileUploaded","fileRemoved","uppyCoreConfiguration","dashboardPropsConfiguration","sampleUrl","subtitle"],[1,"fst-italic"],["href","#","target","_blank",1,"link","link-primary"],["dataKey","number",3,"scrollable","scrollHeight","value"],[2,"width","5rem"],["pSortableColumn","number"],["field","number"],["pSortableColumn","outlet"],["field","outlet"],["pSortableColumn","date"],["field","date"],["pSortableColumn","inventoryStatus"],["field","inventoryStatus"],["type","button","pRipple","",3,"pRowToggler","text","rounded","plain","icon"],[3,"ngClass"],[1,"d-flex","flex-column","gap-2"],[1,"d-flex","flex-column"],["colspan","8"],[1,"p-4"],["dataKey","accountID",3,"value"],["pSortableColumn","accountCode"],["field","accountCode"],["pSortableColumn","accountName"],["field","accountName"],["pSortableColumn","note"],["field","note"],["pSortableColumn","debitAmount"],["field","debitAmount"],["pSortableColumn","creditAmount"],["field","creditAmount"],["colspan","6"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],[1,"d-flex","gap-2","align-items-baseline"],[1,"fs-4","text-white","m-0"],[1,"m-0","fs-3"],[1,"row"],[1,"col"],[1,"fs-2"],[1,"state-new"],[1,"fs-3","m-0"],[1,"state-unchanged"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click"]],template:function(a,o){if(a&1){let u=v();n(0,"app-main-panel",9),d(1,je,3,3,"ng-template",null,0,c)(3,it,32,14,"ng-template",null,1,c),i(),n(5,"p-dialog",10),z("visibleChange",function(V){return f(u),W(o.summaryDialogVisible,V)||(o.summaryDialogVisible=V),x(V)}),d(6,ot,1,2,"ng-template",null,2,c)(8,rt,5,1,"ng-template",null,3,c)(10,st,1,1,"ng-template",null,1,c)(12,ct,2,0,"ng-template",null,4,c),i()}if(a&2){let u=$(7);l(5),A(J(8,Ae)),m("modal",!0),Q("visible",o.summaryDialogVisible),m("breakpoints",J(9,Fe))("draggable",!1)("closeIconTemplate",u)("dismissableMask",!0)}},dependencies:[se,te,X,Y,ee,Z,le,ae,ye,de,ce,be,Ie,Ce,he,Ee,ve,Se,re,oe,ge,_e,ue,xe,fe,me,pe,ie],styles:[".p-datatable-thead>tr>th{background-color:transparent!important;color:#000!important} .p-stepper{display:flex;flex-direction:column;align-items:center} .p-stepper .p-steplist{width:40vw} .p-stepper .p-steppanels{width:100%} .p-card{border-radius:4px} .p-card .p-card-body{padding:.75rem!important} .p-card .p-card-header{display:flex;align-items:center;width:100%} .p-card .p-card-header .state-new{width:inherit;padding:.75rem;vertical-align:middle;background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important} .p-card .p-card-header .state-updated{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important} .p-card .p-card-header .state-unchanged{width:inherit;padding:.75rem;border-bottom:1px solid #dee2e6} .p-card .p-card-header .state-error{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important} pos-uppy div div h4{font-size:16px} pos-uppy div div p{font-size:14px!important} pos-uppy div div hr{margin:0}"],changeDetection:0})}}return t})();export{jt as JournalEntryImportComponent};
@@ -1 +1 @@
1
- import{a as X,b as Z,c as Q,d as Y,e as C,f as T,g as ee,h as te,i as ae,j as f,k as se,l as ne}from"./chunk-Q4XWXOWE.js";import{Aa as m,Bb as W,Ha as n,J,N,W as A,Wc as $,Y as O,ca as c,da as G,fa as y,h as K,ha as o,m as u,o as d,ob as I,s as k,ua as j,w as E,x as P,y as B,zb as z}from"./chunk-6QJHEOXN.js";import{a as S}from"./chunk-YQFG5XE2.js";var L=class{},ie=(()=>{class a extends L{getTranslation(e){return u({})}static \u0275fac=(()=>{let e;return function(s){return(e||(e=j(a)))(s||a)}})();static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})(),D=class{},le=(()=>{class a{handle(e){return e.key}static \u0275fac=function(t){return new(t||a)};static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})();function H(a,r){if(a===r)return!0;if(a===null||r===null)return!1;if(a!==a&&r!==r)return!0;let e=typeof a,t=typeof r,s,i,l;if(e==t&&e=="object")if(Array.isArray(a)){if(!Array.isArray(r))return!1;if((s=a.length)==r.length){for(i=0;i<s;i++)if(!H(a[i],r[i]))return!1;return!0}}else{if(Array.isArray(r))return!1;l=Object.create(null);for(i in a){if(!H(a[i],r[i]))return!1;l[i]=!0}for(i in r)if(!(i in l)&&typeof r[i]<"u")return!1;return!0}return!1}function h(a){return typeof a<"u"&&a!==null}function M(a){return a&&typeof a=="object"&&!Array.isArray(a)}function ue(a,r){let e=Object.assign({},a);return M(a)&&M(r)&&Object.keys(r).forEach(t=>{M(r[t])?t in a?e[t]=ue(a[t],r[t]):Object.assign(e,{[t]:r[t]}):Object.assign(e,{[t]:r[t]})}),e}var v=class{},re=(()=>{class a extends v{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,t){let s;return typeof e=="string"?s=this.interpolateString(e,t):typeof e=="function"?s=this.interpolateFunction(e,t):s=e,s}getValue(e,t){let s=typeof t=="string"?t.split("."):[t];t="";do t+=s.shift(),h(e)&&h(e[t])&&(typeof e[t]=="object"||!s.length)?(e=e[t],t=""):s.length?t+=".":e=void 0;while(s.length);return e}interpolateFunction(e,t){return e(t)}interpolateString(e,t){return t?e.replace(this.templateMatcher,(s,i)=>{let l=this.getValue(t,i);return h(l)?l:s}):e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=j(a)))(s||a)}})();static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})(),x=class{},oe=(()=>{class a extends x{compile(e,t){return e}compileTranslations(e,t){return e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=j(a)))(s||a)}})();static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})(),R=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new m;onLangChange=new m;onDefaultLangChange=new m},q=new y("USE_STORE"),V=new y("USE_DEFAULT_LANG"),_=new y("DEFAULT_LANGUAGE"),F=new y("USE_EXTEND"),U=(()=>{class a{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;isolate;extend;loadingTranslations;pending=!1;_onTranslationChange=new m;_onLangChange=new m;_onDefaultLangChange=new m;_defaultLang;_currentLang;_langs=[];_translations={};_translationRequests={};get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(e){this.isolate?this._defaultLang=e:this.store.defaultLang=e}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(e){this.isolate?this._currentLang=e:this.store.currentLang=e}get langs(){return this.isolate?this._langs:this.store.langs}set langs(e){this.isolate?this._langs=e:this.store.langs=e}get translations(){return this.isolate?this._translations:this.store.translations}set translations(e){this.isolate?this._translations=e:this.store.translations=e}constructor(e,t,s,i,l,g=!0,p=!1,b=!1,w){this.store=e,this.currentLoader=t,this.compiler=s,this.parser=i,this.missingTranslationHandler=l,this.useDefaultLang=g,this.isolate=p,this.extend=b,w&&this.setDefaultLang(w)}setDefaultLang(e){if(e===this.defaultLang)return;let t=this.retrieveTranslations(e);typeof t<"u"?(this.defaultLang==null&&(this.defaultLang=e),t.pipe(N(1)).subscribe(s=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(e===this.currentLang)return u(this.translations[e]);let t=this.retrieveTranslations(e);return typeof t<"u"?(this.currentLang||(this.currentLang=e),t.pipe(N(1)).subscribe(s=>{this.changeLang(e)}),t):(this.changeLang(e),u(this.translations[e]))}retrieveTranslations(e){let t;return(typeof this.translations[e]>"u"||this.extend)&&(this._translationRequests[e]=this._translationRequests[e]||this.getTranslation(e),t=this._translationRequests[e]),t}getTranslation(e){this.pending=!0;let t=this.currentLoader.getTranslation(e).pipe(A(1),N(1));return this.loadingTranslations=t.pipe(k(s=>this.compiler.compileTranslations(s,e)),A(1),N(1)),this.loadingTranslations.subscribe({next:s=>{this.translations[e]=this.extend&&this.translations[e]?S(S({},s),this.translations[e]):s,this.updateLangs(),this.pending=!1},error:s=>{this.pending=!1}}),t}setTranslation(e,t,s=!1){t=this.compiler.compileTranslations(t,e),(s||this.extend)&&this.translations[e]?this.translations[e]=ue(this.translations[e],t):this.translations[e]=t,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){e.forEach(t=>{this.langs.indexOf(t)===-1&&this.langs.push(t)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(e,t,s){let i;if(t instanceof Array){let l={},g=!1;for(let p of t)l[p]=this.getParsedResult(e,p,s),d(l[p])&&(g=!0);if(g){let p=t.map(b=>d(l[b])?l[b]:u(l[b]));return B(p).pipe(k(b=>{let w={};return b.forEach((fe,de)=>{w[t[de]]=fe}),w}))}return l}if(e&&(i=this.parser.interpolate(this.parser.getValue(e,t),s)),typeof i>"u"&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],t),s)),typeof i>"u"){let l={key:t,translateService:this};typeof s<"u"&&(l.interpolateParams=s),i=this.missingTranslationHandler.handle(l)}return typeof i<"u"?i:t}get(e,t){if(!h(e)||!e.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(J(s=>(s=this.getParsedResult(s,e,t),d(s)?s:u(s))));{let s=this.getParsedResult(this.translations[this.currentLang],e,t);return d(s)?s:u(s)}}getStreamOnTranslationChange(e,t){if(!h(e)||!e.length)throw new Error('Parameter "key" required');return E(P(()=>this.get(e,t)),this.onTranslationChange.pipe(O(s=>{let i=this.getParsedResult(s.translations,e,t);return typeof i.subscribe=="function"?i:u(i)})))}stream(e,t){if(!h(e)||!e.length)throw new Error('Parameter "key" required');return E(P(()=>this.get(e,t)),this.onLangChange.pipe(O(s=>{let i=this.getParsedResult(s.translations,e,t);return d(i)?i:u(i)})))}instant(e,t){if(!h(e)||!e.length)throw new Error('Parameter "key" required');let s=this.getParsedResult(this.translations[this.currentLang],e,t);if(d(s)){if(e instanceof Array){let i={};return e.forEach((l,g)=>{i[e[g]]=e[g]}),i}return e}else return s}set(e,t,s=this.currentLang){this.translations[s][e]=this.compiler.compile(t,s),this.updateLangs(),this.onTranslationChange.emit({lang:s,translations:this.translations[s]})}changeLang(e){this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),this.defaultLang==null&&this.changeDefaultLang(e)}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.getTranslation(e)}resetLang(e){this._translationRequests[e]=void 0,this.translations[e]=void 0}getBrowserLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let e=window.navigator.languages?window.navigator.languages[0]:null;if(e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,!(typeof e>"u"))return e.indexOf("-")!==-1&&(e=e.split("-")[0]),e.indexOf("_")!==-1&&(e=e.split("_")[0]),e}getBrowserCultureLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,e}static \u0275fac=function(t){return new(t||a)(o(R),o(L),o(x),o(v),o(D),o(V),o(q),o(F),o(_))};static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})();var De=(()=>{class a{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,t){this.translate=e,this._ref=t}updateValue(e,t,s){let i=l=>{this.value=l!==void 0?l:e,this.lastKey=e,this._ref.markForCheck()};if(s){let l=this.translate.getParsedResult(s,e,t);d(l.subscribe)?l.subscribe(i):i(l)}this.translate.get(e,t).subscribe(i)}transform(e,...t){if(!e||!e.length)return e;if(H(e,this.lastKey)&&H(t,this.lastParams))return this.value;let s;if(h(t[0])&&t.length)if(typeof t[0]=="string"&&t[0].length){let i=t[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{s=JSON.parse(i)}catch{throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${t[0]}`)}}else typeof t[0]=="object"&&!Array.isArray(t[0])&&(s=t[0]);return this.lastKey=e,this.lastParams=t,this.updateValue(e,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(t){return new(t||a)(I(U,16),I($,16))};static \u0275pipe=W({name:"translate",type:a,pure:!1,standalone:!1});static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})(),je=(()=>{class a{static forRoot(e={}){return{ngModule:a,providers:[e.loader||{provide:L,useClass:ie},e.compiler||{provide:x,useClass:oe},e.parser||{provide:v,useClass:re},e.missingTranslationHandler||{provide:D,useClass:le},R,{provide:q,useValue:e.isolate},{provide:V,useValue:e.useDefaultLang},{provide:F,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},U]}}static forChild(e={}){return{ngModule:a,providers:[e.loader||{provide:L,useClass:ie},e.compiler||{provide:x,useClass:oe},e.parser||{provide:v,useClass:re},e.missingTranslationHandler||{provide:D,useClass:le},{provide:q,useValue:e.isolate},{provide:V,useValue:e.useDefaultLang},{provide:F,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},U]}}static \u0275fac=function(t){return new(t||a)};static \u0275mod=z({type:a});static \u0275inj=G({})}return a})();var ce=[{path:"/pages/dashboard",title:"Dashboard",iconName:"fa-light fa-display-chart-up",class:"",extralink:!1,label:"",labelClass:"",submenu:[],requiredRoles:[X.view],isHidden:n(!1)},{path:"/pages/cash-bank",title:"Cash and Bank",requiredRoles:[Z.view],iconName:"fa-light fa-building-columns",class:"",extralink:!1,label:"",labelClass:"",submenu:[],isHidden:n(!1)},{path:"",title:"COA",iconName:"fa-light fa-calculator",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[Y.view],submenu:[{path:"/pages/chart-of-account/account",title:"Accounts",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/chart-of-account/coa-types",title:"Category",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"/pages/journal",title:"Journal",iconName:"fa-light fa-file-lines",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[T.view],submenu:[{path:"/pages/journal/journal-entry",title:"Manual Journal",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[]},{path:"/pages/journal/record-expense",title:"Record Expense",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[T.create]},{path:"/pages/journal/receive-money",title:"Receive Money",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[T.create]}],isHidden:n(!1)},{path:"/pages/report",title:"Reports",iconName:"fa-light fa-chart-column",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[f.finance,f.ledger],submenu:[{path:"/pages/report/general-ledger",title:"General Ledger",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,requiredRoles:[f.ledger,f.finance],submenu:[],isHidden:n(!1)},{path:"/pages/report/multiple-general-ledger",title:"Multi Ledger",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,requiredRoles:[f.ledger,f.finance],submenu:[],isHidden:n(!1)},{path:"/pages/report/profit-loss",title:"Profit & Loss",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,requiredRoles:[f.finance],submenu:[],isHidden:n(!1)},{path:"/pages/report/balance-sheet",title:"Balance Sheet",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,requiredRoles:[f.finance],submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"",title:"Recurring",iconName:"fa-light fa-money-bill-1",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[ae.view],submenu:[{path:"/pages/recurring/recurring-expense",title:"Recurring Expenses",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/recurring/asset-value",title:"Asset Value",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/recurring/post-to-journal",title:"Post Recurring Expenses",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"",title:"Tools",iconName:"fa-light fa-wrench",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[se.view],submenu:[{path:"/pages/tools/generate-coa",title:"Update COA Balance",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/tools/unbalance-journal",title:"Unbalance Journal",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"/pages/migrate",title:"Migrate",iconName:"fa-light fa-paste",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[ee.view],submenu:[{path:"/pages/migrate/chart-of-account",title:"Chart of Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/coa-category",title:"COA Category",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/coa-configuration",title:"COA Configuration",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/outlet-account",title:"COA Outlet Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/payment-account",title:"Payment Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/writeoff-outlet",title:"Write Off Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/tax-account",title:"Tax Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/expense-account",title:"Expense Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/manual-journal",title:"Manual Journals",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"/pages/ticket",title:"Generate Journal",iconName:"fa-light fa-book",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[],submenu:[{path:"/pages/generate-journal/invoice",title:"Customer Invoice",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.invoice]},{path:"/pages/generate-journal/supplier-bill",title:"Supplier Bill",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.nonInvoice]},{path:"/pages/generate-journal/shift",title:"Shift",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.nonInvoice]},{path:"/pages/generate-journal/adjustment",title:"Adjustment",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.nonInvoice]},{path:"/pages/generate-journal/join-invoice",title:"Join Invoce",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.nonInvoice]},{path:"/pages/generate-journal/join-bill",title:"Join Bill",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.nonInvoice]}],isHidden:n(!1)},{path:"/pages/pos-setup",title:"POS Setup",iconName:"fa-light fa-gears",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[te.view],submenu:[{path:"/pages/pos-setup/global",title:"Global",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/pos-setup/outlets",title:"Outlet",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/pos-setup/payments",title:"Payments",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/pos-setup/taxs",title:"Tax",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/pos-setup/expense-option",title:"Expense Option",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/pos-setup/writeoff",title:"Write Off",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"/pages/ticket",title:"Accounting Setup",iconName:"fa-light fa-gears",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[Q.view],submenu:[{path:"/pages/accounting-setup/timezone",title:"Timezone",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/journal-tag",title:"Tag",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/accounting-integration",title:"Configuration",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/closing-entries",title:"Closing",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/format-journal",title:"Format Journal",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/opening-balance-form",title:"Opening Balance",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/api-crendetial",title:"API Credential",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/flush-cached",title:"Flush Cached",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"/pages/users",title:"Users",iconName:"fa-light fa-user",class:"",label:"",labelClass:"",extralink:!1,submenu:[],requiredRoles:[ne.view],isHidden:n(!1)}];var Ae=(()=>{class a{constructor(){this.collapseSidebar=!1,this.fullScreen=!1,this.MENUITEMS=ce,this.items=new K(this.MENUITEMS)}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275prov=c({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();export{L as a,De as b,je as c,Ae as d};
1
+ import{a as X,b as Z,c as Q,d as Y,e as C,f as T,g as ee,h as te,i as ae,j as f,k as se,l as ne}from"./chunk-Q4XWXOWE.js";import{Aa as m,Bb as W,Ha as n,J,N,W as P,Wc as $,Y as O,ca as c,da as G,fa as y,h as K,ha as o,m as u,o as d,ob as I,s as k,ua as j,w as E,x as A,y as B,zb as z}from"./chunk-6QJHEOXN.js";import{a as S}from"./chunk-YQFG5XE2.js";var v=class{},ie=(()=>{class a extends v{getTranslation(e){return u({})}static \u0275fac=(()=>{let e;return function(s){return(e||(e=j(a)))(s||a)}})();static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})(),D=class{},le=(()=>{class a{handle(e){return e.key}static \u0275fac=function(t){return new(t||a)};static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})();function H(a,r){if(a===r)return!0;if(a===null||r===null)return!1;if(a!==a&&r!==r)return!0;let e=typeof a,t=typeof r,s,i,l;if(e==t&&e=="object")if(Array.isArray(a)){if(!Array.isArray(r))return!1;if((s=a.length)==r.length){for(i=0;i<s;i++)if(!H(a[i],r[i]))return!1;return!0}}else{if(Array.isArray(r))return!1;l=Object.create(null);for(i in a){if(!H(a[i],r[i]))return!1;l[i]=!0}for(i in r)if(!(i in l)&&typeof r[i]<"u")return!1;return!0}return!1}function h(a){return typeof a<"u"&&a!==null}function M(a){return a&&typeof a=="object"&&!Array.isArray(a)}function ue(a,r){let e=Object.assign({},a);return M(a)&&M(r)&&Object.keys(r).forEach(t=>{M(r[t])?t in a?e[t]=ue(a[t],r[t]):Object.assign(e,{[t]:r[t]}):Object.assign(e,{[t]:r[t]})}),e}var L=class{},re=(()=>{class a extends L{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,t){let s;return typeof e=="string"?s=this.interpolateString(e,t):typeof e=="function"?s=this.interpolateFunction(e,t):s=e,s}getValue(e,t){let s=typeof t=="string"?t.split("."):[t];t="";do t+=s.shift(),h(e)&&h(e[t])&&(typeof e[t]=="object"||!s.length)?(e=e[t],t=""):s.length?t+=".":e=void 0;while(s.length);return e}interpolateFunction(e,t){return e(t)}interpolateString(e,t){return t?e.replace(this.templateMatcher,(s,i)=>{let l=this.getValue(t,i);return h(l)?l:s}):e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=j(a)))(s||a)}})();static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})(),x=class{},oe=(()=>{class a extends x{compile(e,t){return e}compileTranslations(e,t){return e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=j(a)))(s||a)}})();static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})(),R=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new m;onLangChange=new m;onDefaultLangChange=new m},q=new y("USE_STORE"),V=new y("USE_DEFAULT_LANG"),_=new y("DEFAULT_LANGUAGE"),F=new y("USE_EXTEND"),U=(()=>{class a{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;isolate;extend;loadingTranslations;pending=!1;_onTranslationChange=new m;_onLangChange=new m;_onDefaultLangChange=new m;_defaultLang;_currentLang;_langs=[];_translations={};_translationRequests={};get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(e){this.isolate?this._defaultLang=e:this.store.defaultLang=e}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(e){this.isolate?this._currentLang=e:this.store.currentLang=e}get langs(){return this.isolate?this._langs:this.store.langs}set langs(e){this.isolate?this._langs=e:this.store.langs=e}get translations(){return this.isolate?this._translations:this.store.translations}set translations(e){this.isolate?this._translations=e:this.store.translations=e}constructor(e,t,s,i,l,g=!0,p=!1,b=!1,w){this.store=e,this.currentLoader=t,this.compiler=s,this.parser=i,this.missingTranslationHandler=l,this.useDefaultLang=g,this.isolate=p,this.extend=b,w&&this.setDefaultLang(w)}setDefaultLang(e){if(e===this.defaultLang)return;let t=this.retrieveTranslations(e);typeof t<"u"?(this.defaultLang==null&&(this.defaultLang=e),t.pipe(N(1)).subscribe(s=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(e===this.currentLang)return u(this.translations[e]);let t=this.retrieveTranslations(e);return typeof t<"u"?(this.currentLang||(this.currentLang=e),t.pipe(N(1)).subscribe(s=>{this.changeLang(e)}),t):(this.changeLang(e),u(this.translations[e]))}retrieveTranslations(e){let t;return(typeof this.translations[e]>"u"||this.extend)&&(this._translationRequests[e]=this._translationRequests[e]||this.getTranslation(e),t=this._translationRequests[e]),t}getTranslation(e){this.pending=!0;let t=this.currentLoader.getTranslation(e).pipe(P(1),N(1));return this.loadingTranslations=t.pipe(k(s=>this.compiler.compileTranslations(s,e)),P(1),N(1)),this.loadingTranslations.subscribe({next:s=>{this.translations[e]=this.extend&&this.translations[e]?S(S({},s),this.translations[e]):s,this.updateLangs(),this.pending=!1},error:s=>{this.pending=!1}}),t}setTranslation(e,t,s=!1){t=this.compiler.compileTranslations(t,e),(s||this.extend)&&this.translations[e]?this.translations[e]=ue(this.translations[e],t):this.translations[e]=t,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){e.forEach(t=>{this.langs.indexOf(t)===-1&&this.langs.push(t)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(e,t,s){let i;if(t instanceof Array){let l={},g=!1;for(let p of t)l[p]=this.getParsedResult(e,p,s),d(l[p])&&(g=!0);if(g){let p=t.map(b=>d(l[b])?l[b]:u(l[b]));return B(p).pipe(k(b=>{let w={};return b.forEach((fe,de)=>{w[t[de]]=fe}),w}))}return l}if(e&&(i=this.parser.interpolate(this.parser.getValue(e,t),s)),typeof i>"u"&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],t),s)),typeof i>"u"){let l={key:t,translateService:this};typeof s<"u"&&(l.interpolateParams=s),i=this.missingTranslationHandler.handle(l)}return typeof i<"u"?i:t}get(e,t){if(!h(e)||!e.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(J(s=>(s=this.getParsedResult(s,e,t),d(s)?s:u(s))));{let s=this.getParsedResult(this.translations[this.currentLang],e,t);return d(s)?s:u(s)}}getStreamOnTranslationChange(e,t){if(!h(e)||!e.length)throw new Error('Parameter "key" required');return E(A(()=>this.get(e,t)),this.onTranslationChange.pipe(O(s=>{let i=this.getParsedResult(s.translations,e,t);return typeof i.subscribe=="function"?i:u(i)})))}stream(e,t){if(!h(e)||!e.length)throw new Error('Parameter "key" required');return E(A(()=>this.get(e,t)),this.onLangChange.pipe(O(s=>{let i=this.getParsedResult(s.translations,e,t);return d(i)?i:u(i)})))}instant(e,t){if(!h(e)||!e.length)throw new Error('Parameter "key" required');let s=this.getParsedResult(this.translations[this.currentLang],e,t);if(d(s)){if(e instanceof Array){let i={};return e.forEach((l,g)=>{i[e[g]]=e[g]}),i}return e}else return s}set(e,t,s=this.currentLang){this.translations[s][e]=this.compiler.compile(t,s),this.updateLangs(),this.onTranslationChange.emit({lang:s,translations:this.translations[s]})}changeLang(e){this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),this.defaultLang==null&&this.changeDefaultLang(e)}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.getTranslation(e)}resetLang(e){this._translationRequests[e]=void 0,this.translations[e]=void 0}getBrowserLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let e=window.navigator.languages?window.navigator.languages[0]:null;if(e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,!(typeof e>"u"))return e.indexOf("-")!==-1&&(e=e.split("-")[0]),e.indexOf("_")!==-1&&(e=e.split("_")[0]),e}getBrowserCultureLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,e}static \u0275fac=function(t){return new(t||a)(o(R),o(v),o(x),o(L),o(D),o(V),o(q),o(F),o(_))};static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})();var De=(()=>{class a{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,t){this.translate=e,this._ref=t}updateValue(e,t,s){let i=l=>{this.value=l!==void 0?l:e,this.lastKey=e,this._ref.markForCheck()};if(s){let l=this.translate.getParsedResult(s,e,t);d(l.subscribe)?l.subscribe(i):i(l)}this.translate.get(e,t).subscribe(i)}transform(e,...t){if(!e||!e.length)return e;if(H(e,this.lastKey)&&H(t,this.lastParams))return this.value;let s;if(h(t[0])&&t.length)if(typeof t[0]=="string"&&t[0].length){let i=t[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{s=JSON.parse(i)}catch{throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${t[0]}`)}}else typeof t[0]=="object"&&!Array.isArray(t[0])&&(s=t[0]);return this.lastKey=e,this.lastParams=t,this.updateValue(e,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(t){return new(t||a)(I(U,16),I($,16))};static \u0275pipe=W({name:"translate",type:a,pure:!1,standalone:!1});static \u0275prov=c({token:a,factory:a.\u0275fac})}return a})(),je=(()=>{class a{static forRoot(e={}){return{ngModule:a,providers:[e.loader||{provide:v,useClass:ie},e.compiler||{provide:x,useClass:oe},e.parser||{provide:L,useClass:re},e.missingTranslationHandler||{provide:D,useClass:le},R,{provide:q,useValue:e.isolate},{provide:V,useValue:e.useDefaultLang},{provide:F,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},U]}}static forChild(e={}){return{ngModule:a,providers:[e.loader||{provide:v,useClass:ie},e.compiler||{provide:x,useClass:oe},e.parser||{provide:L,useClass:re},e.missingTranslationHandler||{provide:D,useClass:le},{provide:q,useValue:e.isolate},{provide:V,useValue:e.useDefaultLang},{provide:F,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},U]}}static \u0275fac=function(t){return new(t||a)};static \u0275mod=z({type:a});static \u0275inj=G({})}return a})();var ce=[{path:"/pages/dashboard",title:"Dashboard",iconName:"fa-light fa-display-chart-up",class:"",extralink:!1,label:"",labelClass:"",submenu:[],requiredRoles:[X.view],isHidden:n(!1)},{path:"/pages/cash-bank",title:"Cash and Bank",requiredRoles:[Z.view],iconName:"fa-light fa-building-columns",class:"",extralink:!1,label:"",labelClass:"",submenu:[],isHidden:n(!1)},{path:"",title:"COA",iconName:"fa-light fa-calculator",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[Y.view],submenu:[{path:"/pages/chart-of-account/account",title:"Accounts",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/chart-of-account/coa-types",title:"Category",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"/pages/journal",title:"Journal",iconName:"fa-light fa-file-lines",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[T.view],submenu:[{path:"/pages/journal/journal-entry",title:"Manual Journal",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[]},{path:"/pages/journal/record-expense",title:"Record Expense",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[T.create]},{path:"/pages/journal/receive-money",title:"Receive Money",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[T.create]}],isHidden:n(!1)},{path:"/pages/report",title:"Reports",iconName:"fa-light fa-chart-column",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[f.finance,f.ledger],submenu:[{path:"/pages/report/general-ledger",title:"General Ledger",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,requiredRoles:[f.ledger,f.finance],submenu:[],isHidden:n(!1)},{path:"/pages/report/multiple-general-ledger",title:"Multi Ledger",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,requiredRoles:[f.ledger,f.finance],submenu:[],isHidden:n(!1)},{path:"/pages/report/profit-loss",title:"Profit & Loss",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,requiredRoles:[f.finance],submenu:[],isHidden:n(!1)},{path:"/pages/report/balance-sheet",title:"Balance Sheet",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,requiredRoles:[f.finance],submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"",title:"Recurring",iconName:"fa-light fa-money-bill-1",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[ae.view],submenu:[{path:"/pages/recurring/recurring-expense",title:"Recurring Expenses",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/recurring/asset-value",title:"Asset Value",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/recurring/post-to-journal",title:"Post Recurring Expenses",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"",title:"Tools",iconName:"fa-light fa-wrench",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[se.view],submenu:[{path:"/pages/tools/generate-coa",title:"Update COA Balance",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/tools/unbalance-journal",title:"Unbalance Journal",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"/pages/migrate",title:"Migrate",iconName:"fa-light fa-paste",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[ee.view],submenu:[{path:"/pages/migrate/chart-of-account",title:"Chart of Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/coa-category",title:"COA Category",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/coa-configuration",title:"COA Configuration",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/outlet-account",title:"COA Outlet Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/payment-account",title:"Payment Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/writeoff-outlet",title:"Write Off Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/tax-account",title:"Tax Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/expense-account",title:"Expense Account",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/migrate/manual-journal",title:"Manual Journals",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"/pages/ticket",title:"Generate Journal",iconName:"fa-light fa-book",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[],submenu:[{path:"/pages/generate-journal/invoice",title:"Customer Invoice",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.invoice]},{path:"/pages/generate-journal/supplier-bill",title:"Supplier Bill",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.nonInvoice]},{path:"/pages/generate-journal/shift",title:"Shift",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.nonInvoice]},{path:"/pages/generate-journal/adjustment",title:"Adjustment",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.nonInvoice]},{path:"/pages/generate-journal/join-invoice",title:"Join Invoce",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.nonInvoice]},{path:"/pages/generate-journal/join-bill",title:"Join Bill",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1),requiredRoles:[C.nonInvoice]}],isHidden:n(!1)},{path:"/pages/pos-setup",title:"POS Setup",iconName:"fa-light fa-gears",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[te.view],submenu:[{path:"/pages/pos-setup/global",title:"Global",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/pos-setup/outlets",title:"Outlet",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/pos-setup/payments",title:"Payments",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/pos-setup/taxs",title:"Tax",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/pos-setup/expense-option",title:"Expense Option",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/pos-setup/writeoff",title:"Write Off",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"/pages/ticket",title:"Accounting Setup",iconName:"fa-light fa-gears",class:"has-arrow",label:"",labelClass:"",extralink:!1,requiredRoles:[Q.view],submenu:[{path:"/pages/accounting-setup/journal-number",title:"Journal Number",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/journal-tag",title:"Tag",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/timezone",title:"Timezone",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/opening-balance-form",title:"Opening Balance",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/closing-entries",title:"Closing",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/api-crendetial",title:"API Credential",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/advanced",title:"Advanced",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/format-journal",title:"Format Journal",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)},{path:"/pages/accounting-setup/flush-cached",title:"Flush Cached",iconName:"",class:"",label:"",labelClass:"",extralink:!1,submenu:[],isHidden:n(!1)}],isHidden:n(!1)},{path:"/pages/users",title:"Users",iconName:"fa-light fa-user",class:"",label:"",labelClass:"",extralink:!1,submenu:[],requiredRoles:[ne.view],isHidden:n(!1)}];var Pe=(()=>{class a{constructor(){this.collapseSidebar=!1,this.fullScreen=!1,this.MENUITEMS=ce,this.items=new K(this.MENUITEMS)}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275prov=c({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();export{v as a,De as b,je as c,Pe as d};
@@ -1 +1 @@
1
- import{a as b,b as J}from"./chunk-VKUW7E75.js";import"./chunk-LBXNL7E4.js";import{m as V}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{a as j,b as R}from"./chunk-5U7KZJ3H.js";import"./chunk-FHJOSHI3.js";import{i as z}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as G,b as H}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import{w as D,x as N,y as L,z as q}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import"./chunk-MGIEURA2.js";import"./chunk-TOR7QRRB.js";import{a as O}from"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import{p as E,u as I}from"./chunk-DM2JLWKE.js";import{Dc as F,Eb as _,Ec as S,Mb as l,Oc as s,Pb as y,Pc as m,Rb as h,Sc as T,W as k,Wb as o,Xb as n,Y as B,Yb as g,_ as P,ac as x,fc as v,gc as a,h as M,ia as c,ib as r,qa as f,ra as d,s as C,sa as w,ta as $,yb as A}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var K=()=>({height:"calc(100vh - 100px)"});function Q(t,u){if(t&1){let e=x();o(0,"p-button",6),v("onClick",function(){f(e);let p=a(2);return d(p.onFormatCOACategory())}),n()}}function U(t,u){if(t&1){let e=x();o(0,"p-button",7),s(1,"async"),s(2,"async"),v("onClick",function(){f(e);let p=a(2);return d(p.onMigrateCoaCategory())}),n()}if(t&2){let e=a(2);l("disabled",m(1,2,e.countInBooks$)!==0)("pTooltip",m(2,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function W(t,u){if(t&1&&(o(0,"div",3),_(1,Q,1,0,"p-button",4)(2,U,3,6,"p-button",5),n()),t&2){let e=a();r(),h(e.roleService.permissions().migrate.delete?1:-1),r(),h(e.roleService.permissions().migrate.create?2:-1)}}function X(t,u){if(t&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",8),g(3,"app-migration-cards",9),s(4,"async"),w(),o(5,"svg",10),g(6,"path",11),n(),$(),g(7,"app-migration-cards",12),s(8,"async"),n()()()),t&2){let e=a();y(S(12,K)),r(),y(S(13,K)),r(2),l("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),r(4),l("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var _e=(()=>{class t{constructor(){this.migrateService=c(b),this.toastr=c(O),this.refresh$=new M(void 0),this.pageTitle="Chart of Account Category",this.roleService=c(V)}ngOnInit(){let e=this.refresh$.pipe(B(()=>this.migrateService.getCOACategoryCount()),P(i=>console.log("API response:",i)),k(1));this.countInPOS$=e.pipe(C(i=>Number(i.pos))),this.countInBooks$=e.pipe(C(i=>Number(i.books)))}onMigrateCoaCategory(){this.migrateService.migrateCoaCategory().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormatCOACategory(){confirm("Are you sure you want to format?")&&this.migrateService.formatManualCOACategory().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-coa-configuration"]],features:[F([b])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger"],["label","Create","tooltipPosition","left",3,"disabled","pTooltip"],["label","Format","severity","danger",3,"onClick"],["label","Create","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(i,p){i&1&&(o(0,"app-main-panel",2),_(1,W,3,2,"ng-template",null,0,T)(3,X,9,14,"ng-template",null,1,T),n()),i&2&&l("pageTitle",p.pageTitle)},dependencies:[z,I,E,N,D,R,j,H,G,q,L,J],encapsulation:2})}}return t})();export{_e as CoaCategoryComponent};
1
+ import{a as b,b as J}from"./chunk-NTVIX4GB.js";import"./chunk-JPNJTPYJ.js";import{m as V}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{a as j,b as R}from"./chunk-5U7KZJ3H.js";import"./chunk-FHJOSHI3.js";import{i as z}from"./chunk-JPKZVL57.js";import"./chunk-VM56C6ZV.js";import{a as G,b as H}from"./chunk-ISIYG4D5.js";import"./chunk-FNGX2XFA.js";import"./chunk-ALLR2NXQ.js";import"./chunk-BFEM6LX7.js";import{w as D,x as N,y as L,z as q}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import"./chunk-MGIEURA2.js";import"./chunk-VQ62YSFR.js";import"./chunk-G3BJCT7T.js";import{a as O}from"./chunk-JBYPGHPN.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import"./chunk-KL3TPLRB.js";import{p as E,u as I}from"./chunk-DM2JLWKE.js";import{Dc as F,Eb as _,Ec as S,Mb as l,Oc as s,Pb as y,Pc as m,Rb as h,Sc as T,W as k,Wb as o,Xb as n,Y as B,Yb as g,_ as P,ac as x,fc as v,gc as a,h as M,ia as c,ib as r,qa as f,ra as d,s as C,sa as w,ta as $,yb as A}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var K=()=>({height:"calc(100vh - 100px)"});function Q(t,u){if(t&1){let e=x();o(0,"p-button",6),v("onClick",function(){f(e);let p=a(2);return d(p.onFormatCOACategory())}),n()}}function U(t,u){if(t&1){let e=x();o(0,"p-button",7),s(1,"async"),s(2,"async"),v("onClick",function(){f(e);let p=a(2);return d(p.onMigrateCoaCategory())}),n()}if(t&2){let e=a(2);l("disabled",m(1,2,e.countInBooks$)!==0)("pTooltip",m(2,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function W(t,u){if(t&1&&(o(0,"div",3),_(1,Q,1,0,"p-button",4)(2,U,3,6,"p-button",5),n()),t&2){let e=a();r(),h(e.roleService.permissions().migrate.delete?1:-1),r(),h(e.roleService.permissions().migrate.create?2:-1)}}function X(t,u){if(t&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",8),g(3,"app-migration-cards",9),s(4,"async"),w(),o(5,"svg",10),g(6,"path",11),n(),$(),g(7,"app-migration-cards",12),s(8,"async"),n()()()),t&2){let e=a();y(S(12,K)),r(),y(S(13,K)),r(2),l("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),r(4),l("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var _e=(()=>{class t{constructor(){this.migrateService=c(b),this.toastr=c(O),this.refresh$=new M(void 0),this.pageTitle="Chart of Account Category",this.roleService=c(V)}ngOnInit(){let e=this.refresh$.pipe(B(()=>this.migrateService.getCOACategoryCount()),P(i=>console.log("API response:",i)),k(1));this.countInPOS$=e.pipe(C(i=>Number(i.pos))),this.countInBooks$=e.pipe(C(i=>Number(i.books)))}onMigrateCoaCategory(){this.migrateService.migrateCoaCategory().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormatCOACategory(){confirm("Are you sure you want to format?")&&this.migrateService.formatManualCOACategory().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-coa-configuration"]],features:[F([b])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger"],["label","Create","tooltipPosition","left",3,"disabled","pTooltip"],["label","Format","severity","danger",3,"onClick"],["label","Create","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(i,p){i&1&&(o(0,"app-main-panel",2),_(1,W,3,2,"ng-template",null,0,T)(3,X,9,14,"ng-template",null,1,T),n()),i&2&&l("pageTitle",p.pageTitle)},dependencies:[z,I,E,N,D,R,j,H,G,q,L,J],encapsulation:2})}}return t})();export{_e as CoaCategoryComponent};
@@ -1 +1 @@
1
- import{ca as m}from"./chunk-6QJHEOXN.js";import{a as n,b as l}from"./chunk-YQFG5XE2.js";var c={production:!0,version:"5.50.0",changelogUrl:"https://changelog.dealpos.com/?categories=cat_O6pYAT7GI1mts",defaultTimezone:"Asia/Jakarta",intercom:{appId:"xv1oomgl"}};var o=class s{static{this.emailRegex=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/}static{this.phoneNumberRegex=/^\d+$/}static{this.GuidEmpty="00000000-0000-0000-0000-000000000000"}static{this.DecimalMinValue="-7.922816251426434e+28"}static{this.InputLockTimeSpan=500}static{this.MinDate="0001-01-01T00:00:00"}static{this.MinTime="00:00:00"}static{this.MinDecimal="-79228162514264337593543950335"}static StringFormat(e,...t){for(let i=0;i<t.length;i++)e=e.replace(`{${i}}`,t[i]);return e}static{this.isMobileDevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}static IsNotEmpty(e){return e!=""&&!s.containsOnlySpaces(e)&&e!=s.GuidEmpty&&e!=null&&e!=null}static IsEmpty(e){return!!(e==""||s.containsOnlySpaces(e)||e==null||e==null||e==s.GuidEmpty)}static isGuid(e){let t=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi,i=!1;return e&&(i=t.test(e)),i}static containsOnlySpaces(e){return/^\s*$/.test(e)}static FilterByID(e,t){try{let i=e.filter(a=>a.ID==t);if(i.length>0)return i[0]}catch{}return null}static{this.Months=[{ID:1,Label:"January"},{ID:2,Label:"February"},{ID:3,Label:"March"},{ID:4,Label:"April"},{ID:5,Label:"May"},{ID:6,Label:"June"},{ID:7,Label:"July"},{ID:8,Label:"August"},{ID:9,Label:"September"},{ID:10,Label:"October"},{ID:11,Label:"November"},{ID:12,Label:"December"}]}static GenerateYears(e,t,i){let a=-1;(t==null||t==null)&&(t=11),(i==null||i==null||!i)&&(a=1);let r=[];for(let u=0;u<t;u++)r.push(e+u*a);return r}static DateOnly(e){return e?new Date(new Date(e).toDateString()):new Date(new Date().toDateString())}static differentInDays(e,t){let i=t.getTime()-e.getTime();return Math.floor(i/(1e3*3600*24))}static minutesDiff(e,t){let i=(t.getTime()-e.getTime())/6e4;return Math.ceil(i)}static hoursDiff(e,t){let a=(t.getTime()-e.getTime())/(1e3*3600);return parseFloat(a.toFixed(1))}static Guid_NewGuid(){let e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var a=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(i=="x"?a:a&3|8).toString(16)})}static parseJwt(e){var t=e.split(".")[1],i=t.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(i).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}static numberOnly(e){let t=e.which?e.which:e.keyCode;return!(t>31&&(t<48||t>57))}static formatNumber(e){let t="",i="",a=Math.abs(e);return a>999&&a<1e6?(i="K",t=(a/1e3).toFixed(0)):a>=1e6?(i="M",t=(a/1e6).toFixed(0)):a<999&&(t=a.toString()),e<0&&(t="-"+t),t.replace(/\B(?=(\d{3})+(?!\d))/g,",")+i}static isToDay(e){if(this.IsNotEmpty(e)){e=typeof e=="string"?new Date(e):e;let t=new Date;return t.setHours(0,0,0,0),e.setHours(0,0,0,0),t.getTime()==e.getTime()}return!1}static setToLatestTime(e){let t=new Date(e);return t.setHours(23,59,59),t}static setToFirstTime(e){let t=new Date(e);return t.setHours(0,0,0),t}static compare(e,t,i){return(e<t?-1:1)*(i?1:-1)}static generateSerialasNote(e=[]){let t="";return e&&e.length>0&&(t=`[${e.map((a,r)=>`${r>0?" ":""}${a.Number}${a.Quantity>1||a.Quantity<0?"*"+a.Quantity:""}`)}]`),t}static getDatesInRange(e,t){let i=new Date(e.getTime()),a=[];for(;i<=t;)a.push(new Date(i)),i.setDate(i.getDate()+1);return a}static getDaysBefore(e,t){return new Date(e.setDate(new Date().getDate()-t))}static getRangeDate(e,t){let i=new Date;i.setMonth(e),i.setFullYear(t);let a=new Date(i.getFullYear(),i.getMonth()-1,1),r=new Date(i.getFullYear(),i.getMonth(),0);return{firstDay:a,lastDay:r}}static setDateTime(e,t){let i=new Date;t&&(i=new Date(t));let a=e.split(":");return i.setHours(parseInt(a[0])),i.setMinutes(parseInt(a[1])),i}static isMaskingField(e=""){return e.includes("?")}static generateMaskingField(e=[]){let t={};return e.forEach((i,a)=>{i=i.split(" ")?.join(""),t=l(n({},t),{[i]:!0})}),t}static checkJSApiSupported(e){let t;return e in window?t=!0:t=!1,t}static cloneObject(e){let t;return this.checkJSApiSupported("structuredClone")?t=structuredClone(e):t=JSON.parse(JSON.stringify(e)),t}static formatTitleFromDate(e,t){let i=null,a=new Date(e),r=new Date(t);return a.getDate()!=r.getDate()&&(i="d"),a.getMonth()!=r.getMonth()&&(i="d MMM"),a.getFullYear()!=r.getFullYear()&&(i="d MMM yyyy"),i}};var y=(()=>{class s{initializeIntercom(){let t=this.getFromLocalStorage();o.IsNotEmpty(t)&&window.Intercom("boot",{app_id:c.intercom.appId,name:t.name,email:t.email,created_at:t.created,user_hash:t.hash})}shutdown(){window.Intercom("shutdown"),this.clearStorage()}clearStorage(){localStorage.removeItem("INTERCOM")}updateLocalStorage(t){localStorage.setItem("INTERCOM",JSON.stringify(t))}getFromLocalStorage(){let t=localStorage.getItem("INTERCOM");return JSON.parse(t)}hideLauncher(){let t=this.getFromLocalStorage();t.hide_default_launcher=!0,window.Intercom("update",n({app_id:c.intercom.appId},t)),this.updateLocalStorage(t)}showLauncher(){let t=this.getFromLocalStorage();t.hide_default_launcher=!1,window.Intercom("update",n({app_id:c.intercom.appId},t)),this.updateLocalStorage(t)}isHideLauncher(){let t=this.getFromLocalStorage();return o.IsEmpty(t?.hide_default_launcher)?!1:t?.hide_default_launcher}static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275prov=m({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{o as a,c as b,y as c};
1
+ import{ca as m}from"./chunk-6QJHEOXN.js";import{a as n,b as l}from"./chunk-YQFG5XE2.js";var c={production:!0,version:"5.51.0",changelogUrl:"https://changelog.dealpos.com/?categories=cat_O6pYAT7GI1mts",defaultTimezone:"Asia/Jakarta",intercom:{appId:"xv1oomgl"}};var o=class s{static{this.emailRegex=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/}static{this.phoneNumberRegex=/^\d+$/}static{this.GuidEmpty="00000000-0000-0000-0000-000000000000"}static{this.DecimalMinValue="-7.922816251426434e+28"}static{this.InputLockTimeSpan=500}static{this.MinDate="0001-01-01T00:00:00"}static{this.MinTime="00:00:00"}static{this.MinDecimal="-79228162514264337593543950335"}static StringFormat(e,...t){for(let i=0;i<t.length;i++)e=e.replace(`{${i}}`,t[i]);return e}static{this.isMobileDevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}static IsNotEmpty(e){return e!=""&&!s.containsOnlySpaces(e)&&e!=s.GuidEmpty&&e!=null&&e!=null}static IsEmpty(e){return!!(e==""||s.containsOnlySpaces(e)||e==null||e==null||e==s.GuidEmpty)}static isGuid(e){let t=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi,i=!1;return e&&(i=t.test(e)),i}static containsOnlySpaces(e){return/^\s*$/.test(e)}static FilterByID(e,t){try{let i=e.filter(a=>a.ID==t);if(i.length>0)return i[0]}catch{}return null}static{this.Months=[{ID:1,Label:"January"},{ID:2,Label:"February"},{ID:3,Label:"March"},{ID:4,Label:"April"},{ID:5,Label:"May"},{ID:6,Label:"June"},{ID:7,Label:"July"},{ID:8,Label:"August"},{ID:9,Label:"September"},{ID:10,Label:"October"},{ID:11,Label:"November"},{ID:12,Label:"December"}]}static GenerateYears(e,t,i){let a=-1;(t==null||t==null)&&(t=11),(i==null||i==null||!i)&&(a=1);let r=[];for(let u=0;u<t;u++)r.push(e+u*a);return r}static DateOnly(e){return e?new Date(new Date(e).toDateString()):new Date(new Date().toDateString())}static differentInDays(e,t){let i=t.getTime()-e.getTime();return Math.floor(i/(1e3*3600*24))}static minutesDiff(e,t){let i=(t.getTime()-e.getTime())/6e4;return Math.ceil(i)}static hoursDiff(e,t){let a=(t.getTime()-e.getTime())/(1e3*3600);return parseFloat(a.toFixed(1))}static Guid_NewGuid(){let e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var a=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(i=="x"?a:a&3|8).toString(16)})}static parseJwt(e){var t=e.split(".")[1],i=t.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(i).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}static numberOnly(e){let t=e.which?e.which:e.keyCode;return!(t>31&&(t<48||t>57))}static formatNumber(e){let t="",i="",a=Math.abs(e);return a>999&&a<1e6?(i="K",t=(a/1e3).toFixed(0)):a>=1e6?(i="M",t=(a/1e6).toFixed(0)):a<999&&(t=a.toString()),e<0&&(t="-"+t),t.replace(/\B(?=(\d{3})+(?!\d))/g,",")+i}static isToDay(e){if(this.IsNotEmpty(e)){e=typeof e=="string"?new Date(e):e;let t=new Date;return t.setHours(0,0,0,0),e.setHours(0,0,0,0),t.getTime()==e.getTime()}return!1}static setToLatestTime(e){let t=new Date(e);return t.setHours(23,59,59),t}static setToFirstTime(e){let t=new Date(e);return t.setHours(0,0,0),t}static compare(e,t,i){return(e<t?-1:1)*(i?1:-1)}static generateSerialasNote(e=[]){let t="";return e&&e.length>0&&(t=`[${e.map((a,r)=>`${r>0?" ":""}${a.Number}${a.Quantity>1||a.Quantity<0?"*"+a.Quantity:""}`)}]`),t}static getDatesInRange(e,t){let i=new Date(e.getTime()),a=[];for(;i<=t;)a.push(new Date(i)),i.setDate(i.getDate()+1);return a}static getDaysBefore(e,t){return new Date(e.setDate(new Date().getDate()-t))}static getRangeDate(e,t){let i=new Date;i.setMonth(e),i.setFullYear(t);let a=new Date(i.getFullYear(),i.getMonth()-1,1),r=new Date(i.getFullYear(),i.getMonth(),0);return{firstDay:a,lastDay:r}}static setDateTime(e,t){let i=new Date;t&&(i=new Date(t));let a=e.split(":");return i.setHours(parseInt(a[0])),i.setMinutes(parseInt(a[1])),i}static isMaskingField(e=""){return e.includes("?")}static generateMaskingField(e=[]){let t={};return e.forEach((i,a)=>{i=i.split(" ")?.join(""),t=l(n({},t),{[i]:!0})}),t}static checkJSApiSupported(e){let t;return e in window?t=!0:t=!1,t}static cloneObject(e){let t;return this.checkJSApiSupported("structuredClone")?t=structuredClone(e):t=JSON.parse(JSON.stringify(e)),t}static formatTitleFromDate(e,t){let i=null,a=new Date(e),r=new Date(t);return a.getDate()!=r.getDate()&&(i="d"),a.getMonth()!=r.getMonth()&&(i="d MMM"),a.getFullYear()!=r.getFullYear()&&(i="d MMM yyyy"),i}};var y=(()=>{class s{initializeIntercom(){let t=this.getFromLocalStorage();o.IsNotEmpty(t)&&window.Intercom("boot",{app_id:c.intercom.appId,name:t.name,email:t.email,created_at:t.created,user_hash:t.hash})}shutdown(){window.Intercom("shutdown"),this.clearStorage()}clearStorage(){localStorage.removeItem("INTERCOM")}updateLocalStorage(t){localStorage.setItem("INTERCOM",JSON.stringify(t))}getFromLocalStorage(){let t=localStorage.getItem("INTERCOM");return JSON.parse(t)}hideLauncher(){let t=this.getFromLocalStorage();t.hide_default_launcher=!0,window.Intercom("update",n({app_id:c.intercom.appId},t)),this.updateLocalStorage(t)}showLauncher(){let t=this.getFromLocalStorage();t.hide_default_launcher=!1,window.Intercom("update",n({app_id:c.intercom.appId},t)),this.updateLocalStorage(t)}isHideLauncher(){let t=this.getFromLocalStorage();return o.IsEmpty(t?.hide_default_launcher)?!1:t?.hide_default_launcher}static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275prov=m({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{o as a,c as b,y as c};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-2JFOEOZ2.js";import{a as o}from"./chunk-TOR7QRRB.js";import{ca as i,ia as n}from"./chunk-6QJHEOXN.js";var d=(()=>{class r{constructor(){this.httpService=n(o),this.authService=n(u)}getJournalInvoiceLoader(){return this.httpService.get(void 0,"api/GenerateJournal/invoice/Loader")}getCustomerSuggestions(e){let t={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:t})}getJournalInvoice(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/invoice/get",t)}generateJournalInvoice(e){return this.httpService.post(void 0,"api/GenerateJournal/invoice/Submit",e)}getGJSupplierBillLoader(){return this.httpService.get(void 0,"api/GenerateJournal/bill/Loader")}getJournalSupplierBill(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/bill/get",t)}generateJournalSupplierBill(e){return this.httpService.post(void 0,"api/GenerateJournal/bill/Submit",e)}getGJShiftLoader(){return this.httpService.get(void 0,"api/GenerateJournal/Shift/Loader")}getJournalShift(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/Shift/get",t)}generateJornalShift(e){return this.httpService.post(void 0,"api/GenerateJournal/Shift/Submit",e)}getARJournalLoader(){return this.httpService.get(void 0,"/api/GenerateJournal/JoinInvoice/Loader")}getARJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/JoinInvoice/get",t)}createARJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/JoinInvoice/Submit",e)}getAPJournalLoader(){return this.httpService.get(void 0,"/api/GenerateJournal/JoinBill/Loader")}getAPJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/JoinBill/get",t)}createAPJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/JoinBill/Submit",e)}getGJAdjustmentLoader(){return this.httpService.get(void 0,"api/GenerateJournal/InventoryAdjustment/Loader")}getAdjustmentJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/InventoryAdjustment/get",t)}createAdjustmentJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/InventoryAdjustment/Submit",e)}getSupplierSuggestions(e){let t={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:t})}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{d as a};
1
+ import{a as u}from"./chunk-GQ7SPEZH.js";import{a as o}from"./chunk-G3BJCT7T.js";import{ca as i,ia as n}from"./chunk-6QJHEOXN.js";var d=(()=>{class r{constructor(){this.httpService=n(o),this.authService=n(u)}getJournalInvoiceLoader(){return this.httpService.get(void 0,"api/GenerateJournal/invoice/Loader")}getCustomerSuggestions(e){let t={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:t})}getJournalInvoice(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/invoice/get",t)}generateJournalInvoice(e){return this.httpService.post(void 0,"api/GenerateJournal/invoice/Submit",e)}getGJSupplierBillLoader(){return this.httpService.get(void 0,"api/GenerateJournal/bill/Loader")}getJournalSupplierBill(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/bill/get",t)}generateJournalSupplierBill(e){return this.httpService.post(void 0,"api/GenerateJournal/bill/Submit",e)}getGJShiftLoader(){return this.httpService.get(void 0,"api/GenerateJournal/Shift/Loader")}getJournalShift(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/Shift/get",t)}generateJornalShift(e){return this.httpService.post(void 0,"api/GenerateJournal/Shift/Submit",e)}getARJournalLoader(){return this.httpService.get(void 0,"/api/GenerateJournal/JoinInvoice/Loader")}getARJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/JoinInvoice/get",t)}createARJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/JoinInvoice/Submit",e)}getAPJournalLoader(){return this.httpService.get(void 0,"/api/GenerateJournal/JoinBill/Loader")}getAPJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/JoinBill/get",t)}createAPJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/JoinBill/Submit",e)}getGJAdjustmentLoader(){return this.httpService.get(void 0,"api/GenerateJournal/InventoryAdjustment/Loader")}getAdjustmentJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/InventoryAdjustment/get",t)}createAdjustmentJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/InventoryAdjustment/Submit",e)}getSupplierSuggestions(e){let t={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:t})}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{d as a};
@@ -1 +1 @@
1
- import{a}from"./chunk-TOR7QRRB.js";import{ca as c,i as o,ia as n}from"./chunk-6QJHEOXN.js";import{a as i}from"./chunk-YQFG5XE2.js";var d=(()=>{class r{constructor(){this.httpService=n(a),this.categoryOptionsCache$=new o(1),this.isInitialized=!1}getChartOfAccountLoader(){return this.httpService.get("","api/ChartOfAccountLoader/GetPaginatedList")}getPaginatedChartAccounts(t){let e=i({},t);return this.httpService.post("","api/ChartOfAccount/GetPaginatedList",e,{observe:"body"})}getChartAccountForm(){return this.httpService.get("","api/ChartOfAccount/Form")}getChartAccountById(t){return this.httpService.get("",`api/ChartOfAccount/Info/${t}`)}getChartAccountFormById(t){return this.httpService.get("",`api/ChartOfAccount/Form/${t}`)}submitChartAccount(t,e={}){return this.httpService.post("","api/ChartOfAccount/Submit",t,e)}deleteChartAccount(t){if(t.length>1){let e={body:t};return this.httpService.delete("","api/ChartOfAccount/Batch",e)}else return this.httpService.delete("",`api/ChartOfAccount/${t[0]}`)}fetchCategoryOptions(){return this.httpService.get("","api/ChartOfAccount/CategoryOptions")}getCachedCategoriesOptions(){return this.isInitialized||(this.isInitialized=!0,this.fetchCategoryOptions().subscribe({next:t=>this.categoryOptionsCache$.next(t),error:t=>this.categoryOptionsCache$.error(t)})),this.categoryOptionsCache$.asObservable()}exportChartOfAccounts(t){return this.httpService.post(void 0,"api/ChartOfAccountExport/export",t,{observe:"response",responseType:"blob"})}importPreviewChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importpreview",t)}importConfirmChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importconfirm",t)}discountedChartAccounts(t,e){return this.httpService.put(void 0,`/api/ChartOfAccount/${t}/discontinued`,e)}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{d as a};
1
+ import{a}from"./chunk-G3BJCT7T.js";import{ca as c,i as o,ia as n}from"./chunk-6QJHEOXN.js";import{a as i}from"./chunk-YQFG5XE2.js";var d=(()=>{class r{constructor(){this.httpService=n(a),this.categoryOptionsCache$=new o(1),this.isInitialized=!1}getChartOfAccountLoader(){return this.httpService.get("","api/ChartOfAccountLoader/GetPaginatedList")}getPaginatedChartAccounts(t){let e=i({},t);return this.httpService.post("","api/ChartOfAccount/GetPaginatedList",e,{observe:"body"})}getChartAccountForm(){return this.httpService.get("","api/ChartOfAccount/Form")}getChartAccountById(t){return this.httpService.get("",`api/ChartOfAccount/Info/${t}`)}getChartAccountFormById(t){return this.httpService.get("",`api/ChartOfAccount/Form/${t}`)}submitChartAccount(t,e={}){return this.httpService.post("","api/ChartOfAccount/Submit",t,e)}deleteChartAccount(t){if(t.length>1){let e={body:t};return this.httpService.delete("","api/ChartOfAccount/Batch",e)}else return this.httpService.delete("",`api/ChartOfAccount/${t[0]}`)}fetchCategoryOptions(){return this.httpService.get("","api/ChartOfAccount/CategoryOptions")}getCachedCategoriesOptions(){return this.isInitialized||(this.isInitialized=!0,this.fetchCategoryOptions().subscribe({next:t=>this.categoryOptionsCache$.next(t),error:t=>this.categoryOptionsCache$.error(t)})),this.categoryOptionsCache$.asObservable()}exportChartOfAccounts(t){return this.httpService.post(void 0,"api/ChartOfAccountExport/export",t,{observe:"response",responseType:"blob"})}importPreviewChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importpreview",t)}importConfirmChartOfAccounts(t){return this.httpService.post(void 0,"api/chartofaccount/importconfirm",t)}discountedChartAccounts(t,e){return this.httpService.put(void 0,`/api/ChartOfAccount/${t}/discontinued`,e)}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{d as a};
@@ -0,0 +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-JPKZVL57.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-VQ62YSFR.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 K}from"./chunk-ON7PMYMV.js";import{b as q}from"./chunk-LBXNL7E4.js";import{a as z,b as H}from"./chunk-KARG227P.js";import{a as J}from"./chunk-XKI7WLHE.js";import{a as O,b as W}from"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{i as I}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as G,b as A}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import{o as j,w as k,x as B}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{b as y,e as D,f as M,k as T,m as w,p as N,v as V,y as R}from"./chunk-MGIEURA2.js";import{d as P}from"./chunk-DZCJWJUG.js";import"./chunk-TOR7QRRB.js";import"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import{u as F}from"./chunk-DM2JLWKE.js";import{Cb as S,Eb as p,Mb as c,Sc as a,Wb as i,Xb as t,Yb as f,_ as C,ac as b,fc as E,gc as u,ia as m,ib as _,qa as x,ra as h,sc as l,yb as v}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";function L(e,d){if(e&1){let o=b();i(0,"p-button",4),E("onClick",function(){x(o);let n=u();return h(n.onSubmit())}),t()}}function Q(e,d){e&1&&(i(0,"div",13)(1,"h3",14),l(2,"General"),t(),i(3,"span",15),l(4,"Enter your closing Fiscal Date"),t()())}function U(e,d){if(e&1&&(i(0,"div",5)(1,"div",6)(2,"p-panel"),p(3,Q,5,0,"ng-template",null,2,a),i(5,"div",5)(6,"div",7)(7,"form",8)(8,"div",9)(9,"label",10),l(10,"Period"),t(),f(11,"p-datePicker",11),t(),i(12,"div",9)(13,"label",10),l(14,"Description"),t(),f(15,"textarea",12),t()()()()()()()),e&2){let o=u();_(7),c("formGroup",o.form)}}var he=(()=>{class e extends J{constructor(){super(),this.closingEntriesService=m(K),this.dayjsService=m(q),this.fb=m(V),this.router=m(P)}ngOnInit(){this.initForm()}initForm(){this.form=this.fb.group({Period:this.fb.control(new Date),Note:this.fb.control("")})}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{Period:o}=this.form.getRawValue(),r=Object.entries(this.form.getRawValue()).reduce((n,[s,g])=>(s==="Period"?n[s]=this.dayjsService.from(o)?this.dayjsService.format(g):"":n[s]=g,n),{});this.closingEntriesService.createClosingEntry(r).pipe(C(()=>{this.router.navigate(["/pages/accounting-setup/closing-entries"])})).subscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=v({type:e,selectors:[["app-closing-form"]],features:[S],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Closing Entries Form",3,"hasMainWrapperPadding"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"col-4"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["formControlName","Period","fluid",""],["formControlName","Note","rows","5","cols","30","pTextarea",""],[1,"d-flex","flex-column","mx-2"],[1,"fs-5","m-0"],[1,"fs-3"]],template:function(r,n){r&1&&(i(0,"app-main-panel",3),p(1,L,1,0,"ng-template",null,0,a)(3,U,16,1,"ng-template",null,1,a),t()),r&2&&c("hasMainWrapperPadding",!0)},dependencies:[I,F,A,G,W,O,j,H,z,B,k,R,T,y,D,M,w,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();export{he as ClosingFormComponent};
1
+ import{a as K}from"./chunk-H7YYGW7V.js";import{b as q}from"./chunk-JPNJTPYJ.js";import{a as z,b as H}from"./chunk-KARG227P.js";import{a as J}from"./chunk-XKI7WLHE.js";import{a as O,b as W}from"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{i as I}from"./chunk-JPKZVL57.js";import"./chunk-VM56C6ZV.js";import{a as G,b as A}from"./chunk-ISIYG4D5.js";import"./chunk-FNGX2XFA.js";import"./chunk-ALLR2NXQ.js";import"./chunk-BFEM6LX7.js";import{o as j,w as k,x as B}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{b as y,e as D,f as M,k as T,m as w,p as N,v as V,y as R}from"./chunk-MGIEURA2.js";import{d as P}from"./chunk-DZCJWJUG.js";import"./chunk-VQ62YSFR.js";import"./chunk-G3BJCT7T.js";import"./chunk-JBYPGHPN.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import"./chunk-KL3TPLRB.js";import{u as F}from"./chunk-DM2JLWKE.js";import{Cb as S,Eb as p,Mb as c,Sc as a,Wb as i,Xb as t,Yb as f,_ as C,ac as b,fc as E,gc as u,ia as m,ib as _,qa as x,ra as h,sc as l,yb as v}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";function L(e,d){if(e&1){let o=b();i(0,"p-button",4),E("onClick",function(){x(o);let n=u();return h(n.onSubmit())}),t()}}function Q(e,d){e&1&&(i(0,"div",13)(1,"h3",14),l(2,"General"),t(),i(3,"span",15),l(4,"Enter your closing Fiscal Date"),t()())}function U(e,d){if(e&1&&(i(0,"div",5)(1,"div",6)(2,"p-panel"),p(3,Q,5,0,"ng-template",null,2,a),i(5,"div",5)(6,"div",7)(7,"form",8)(8,"div",9)(9,"label",10),l(10,"Period"),t(),f(11,"p-datePicker",11),t(),i(12,"div",9)(13,"label",10),l(14,"Description"),t(),f(15,"textarea",12),t()()()()()()()),e&2){let o=u();_(7),c("formGroup",o.form)}}var he=(()=>{class e extends J{constructor(){super(),this.closingEntriesService=m(K),this.dayjsService=m(q),this.fb=m(V),this.router=m(P)}ngOnInit(){this.initForm()}initForm(){this.form=this.fb.group({Period:this.fb.control(new Date),Note:this.fb.control("")})}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{Period:o}=this.form.getRawValue(),r=Object.entries(this.form.getRawValue()).reduce((n,[s,g])=>(s==="Period"?n[s]=this.dayjsService.from(o)?this.dayjsService.format(g):"":n[s]=g,n),{});this.closingEntriesService.createClosingEntry(r).pipe(C(()=>{this.router.navigate(["/pages/accounting-setup/closing-entries"])})).subscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=v({type:e,selectors:[["app-closing-form"]],features:[S],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Closing Entries Form",3,"hasMainWrapperPadding"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"col-4"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["formControlName","Period","fluid",""],["formControlName","Note","rows","5","cols","30","pTextarea",""],[1,"d-flex","flex-column","mx-2"],[1,"fs-5","m-0"],[1,"fs-3"]],template:function(r,n){r&1&&(i(0,"app-main-panel",3),p(1,L,1,0,"ng-template",null,0,a)(3,U,16,1,"ng-template",null,1,a),t()),r&2&&c("hasMainWrapperPadding",!0)},dependencies:[I,F,A,G,W,O,j,H,z,B,k,R,T,y,D,M,w,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();export{he as ClosingFormComponent};
@@ -1 +1 @@
1
- import{a as i}from"./chunk-2JFOEOZ2.js";import{d as r}from"./chunk-DZCJWJUG.js";import{ia as e}from"./chunk-6QJHEOXN.js";var f=(a,o)=>{let t=e(i),s=e(r),n=t.isAuthenticated(),u=!t.isTokenExpired(),c=t.checkAuthKeysExists();return!n||!u||!c?(s.navigate(["/"],{queryParams:{returnUrl:o.url}}),!1):!0};export{f as a};
1
+ import{a as i}from"./chunk-GQ7SPEZH.js";import{d as r}from"./chunk-DZCJWJUG.js";import{ia as e}from"./chunk-6QJHEOXN.js";var f=(a,o)=>{let t=e(i),s=e(r),n=t.isAuthenticated(),u=!t.isTokenExpired(),c=t.checkAuthKeysExists();return!n||!u||!c?(s.navigate(["/"],{queryParams:{returnUrl:o.url}}),!1):!0};export{f as a};