dealpos 26.15.0 → 26.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/browser/{chunk-BMNK3NU4.js → chunk-3CQB5DRP.js} +1 -1
  2. package/browser/chunk-3FFCXYTG.js +1 -0
  3. package/browser/{chunk-KDABJIU6.js → chunk-3S2P3E3X.js} +1 -1
  4. package/browser/{chunk-T2YDURIS.js → chunk-43SPCYEG.js} +1 -1
  5. package/browser/{chunk-WXJTJIGO.js → chunk-47OAJURU.js} +2 -2
  6. package/browser/{chunk-RJJJF6LW.js → chunk-4JC3MRWV.js} +1 -1
  7. package/browser/{chunk-2LTAN7FZ.js → chunk-4NEI2FZX.js} +2 -2
  8. package/browser/{chunk-ZXPGI2W2.js → chunk-4UV5NWOQ.js} +1 -1
  9. package/browser/{chunk-U6DL5563.js → chunk-4VMU55T7.js} +1 -1
  10. package/browser/{chunk-3YX2ZGQG.js → chunk-5GVDVGC7.js} +2 -2
  11. package/browser/{chunk-KL5ZFOBR.js → chunk-5WGMF33Z.js} +2 -2
  12. package/browser/{chunk-F5IUQMR2.js → chunk-62MO2GX6.js} +1 -1
  13. package/browser/{chunk-GR2GQDQN.js → chunk-6G3WAFHE.js} +3 -3
  14. package/browser/{chunk-ARNQO2UW.js → chunk-6YEGCCK6.js} +1 -1
  15. package/browser/{chunk-KUGSG4FZ.js → chunk-7KGUSEZE.js} +1 -1
  16. package/browser/chunk-7PGL3EMQ.js +1 -0
  17. package/browser/{chunk-4W3WM54W.js → chunk-7XGN7LT7.js} +1 -1
  18. package/browser/{chunk-XCN2NXHO.js → chunk-AC4PQGX6.js} +1 -1
  19. package/browser/{chunk-35DTNDSU.js → chunk-BK5AF6O6.js} +1 -1
  20. package/browser/{chunk-VDYEHG5L.js → chunk-C6FGVEWJ.js} +1 -1
  21. package/browser/{chunk-XF2CLHVB.js → chunk-CEBF2EVJ.js} +1 -1
  22. package/browser/{chunk-ZOV7CJTX.js → chunk-DDNJLCTS.js} +1 -1
  23. package/browser/{chunk-KPQ4RBJ5.js → chunk-DVZXFQAN.js} +1 -1
  24. package/browser/{chunk-7WLLE7QC.js → chunk-E6NANKMG.js} +1 -1
  25. package/browser/{chunk-SFHA6G2U.js → chunk-EEQW44XJ.js} +1 -1
  26. package/browser/{chunk-T7HVULED.js → chunk-ER2H6JP4.js} +1 -1
  27. package/browser/{chunk-WA7YB7FK.js → chunk-FMIDDJEB.js} +1 -1
  28. package/browser/{chunk-B2WKX7LR.js → chunk-GEPG5FBO.js} +1 -1
  29. package/browser/{chunk-RRHX3XL3.js → chunk-GFGZIUMR.js} +1 -1
  30. package/browser/{chunk-VVB5SCZ2.js → chunk-HHOIEFMH.js} +1 -1
  31. package/browser/{chunk-BGAUREZE.js → chunk-HKHQYAOV.js} +1 -1
  32. package/browser/{chunk-3NQ6H6PR.js → chunk-HNYDMUND.js} +1 -1
  33. package/browser/{chunk-74EGVPSQ.js → chunk-I4ZZLEOC.js} +1 -1
  34. package/browser/{chunk-JHH6C3WV.js → chunk-I6GR43TO.js} +1 -1
  35. package/browser/{chunk-HLZB62HO.js → chunk-IEA6ZSNA.js} +1 -1
  36. package/browser/{chunk-JGEP2PED.js → chunk-ILNHKEOD.js} +1 -1
  37. package/browser/{chunk-47SZJFVS.js → chunk-J5MCFPA6.js} +1 -1
  38. package/browser/{chunk-M7P264EH.js → chunk-K6RLLSRA.js} +1 -1
  39. package/browser/{chunk-U5ZVWWPT.js → chunk-KHNHYTCN.js} +1 -1
  40. package/browser/{chunk-O4RYTUQG.js → chunk-KS3S56I5.js} +1 -1
  41. package/browser/{chunk-CJBY4AK7.js → chunk-KYDTFNOL.js} +1 -1
  42. package/browser/{chunk-2DXXLRC2.js → chunk-LFDVMJ23.js} +1 -1
  43. package/browser/{chunk-TBMT7NJN.js → chunk-LJ3EUBVC.js} +1 -1
  44. package/browser/{chunk-4B4TULBJ.js → chunk-MMTN65TG.js} +1 -1
  45. package/browser/{chunk-AS73F5LK.js → chunk-N5C34BHA.js} +3 -3
  46. package/browser/{chunk-FJ3TRSP6.js → chunk-NWWCVGSJ.js} +2 -2
  47. package/browser/{chunk-URXBD2J7.js → chunk-NZPQWSQD.js} +1 -1
  48. package/browser/{chunk-O4LXQ4M4.js → chunk-ORUXOS6G.js} +1 -1
  49. package/browser/{chunk-4RHKOTCF.js → chunk-POKDP5NZ.js} +1 -1
  50. package/browser/{chunk-RX3LHPWI.js → chunk-QAIZR3KP.js} +1 -1
  51. package/browser/{chunk-K6TO33C2.js → chunk-RDM4KOYX.js} +1 -1
  52. package/browser/{chunk-KKTVTLGH.js → chunk-RGJATBLC.js} +1 -1
  53. package/browser/{chunk-R4IALNXZ.js → chunk-RKGORDWJ.js} +1 -1
  54. package/browser/{chunk-T4OOCMEW.js → chunk-RNXAYLRD.js} +1 -1
  55. package/browser/{chunk-FELTBUVH.js → chunk-RVMJNYX6.js} +1 -1
  56. package/browser/{chunk-IWEETW3N.js → chunk-S7VNVTHV.js} +1 -1
  57. package/browser/{chunk-QCXJWQOS.js → chunk-TD5B6VOV.js} +1 -1
  58. package/browser/{chunk-UOIMBSXP.js → chunk-TEEERQZU.js} +1 -1
  59. package/browser/{chunk-P5EGYAMX.js → chunk-TU5H7ER7.js} +1 -1
  60. package/browser/{chunk-QVLC556Y.js → chunk-U5KDHVSC.js} +1 -1
  61. package/browser/{chunk-NGW5XDAO.js → chunk-UDWJOZLR.js} +1 -1
  62. package/browser/{chunk-ZXIJ6JMZ.js → chunk-UE3WR3V6.js} +1 -1
  63. package/browser/{chunk-U37ULFKU.js → chunk-UEHABJKQ.js} +6 -6
  64. package/browser/{chunk-SUTD7PMG.js → chunk-VBZ4FC4V.js} +1 -1
  65. package/browser/{chunk-XX5E4B34.js → chunk-VKKKBAHJ.js} +1 -1
  66. package/browser/{chunk-QVXIJGA7.js → chunk-WF6XUMP5.js} +1 -1
  67. package/browser/{chunk-VVCHL73Y.js → chunk-WMLNK3GE.js} +1 -1
  68. package/browser/{chunk-AEMSC7PZ.js → chunk-WN7MDIY5.js} +1 -1
  69. package/browser/{chunk-ZRNHWVYM.js → chunk-WVVNXJT6.js} +1 -1
  70. package/browser/{chunk-KIRSPWMT.js → chunk-XHT2W245.js} +1 -1
  71. package/browser/{chunk-4CTSUDJU.js → chunk-XLGELJO6.js} +1 -1
  72. package/browser/{chunk-23PPM2WO.js → chunk-XTQKYUQZ.js} +1 -1
  73. package/browser/{chunk-6OQ73VRZ.js → chunk-XYGVXFMF.js} +1 -1
  74. package/browser/{chunk-HCCBJVAB.js → chunk-XYWKHD3C.js} +1 -1
  75. package/browser/{chunk-AUMMMQP7.js → chunk-XZIVW6HK.js} +2 -2
  76. package/browser/{chunk-WTE7LBLL.js → chunk-Y4J2OX7Z.js} +1 -1
  77. package/browser/{chunk-ANDXWEOC.js → chunk-YDJWQ54G.js} +1 -1
  78. package/browser/chunk-YEPTS7L5.js +18 -0
  79. package/browser/{chunk-HSJ6W3QC.js → chunk-ZQLSIM4I.js} +1 -1
  80. package/browser/{chunk-G6RGYFNH.js → chunk-ZY6O2TC4.js} +1 -1
  81. package/browser/index.html +2 -2
  82. package/browser/{main-IUVTP3KM.js → main-E7RLPCVS.js} +2 -2
  83. package/package.json +1 -1
  84. package/browser/chunk-5JKENFZN.js +0 -1
  85. package/browser/chunk-UJ5ABLGU.js +0 -1
  86. package/browser/chunk-VTW6NVG3.js +0 -18
@@ -1 +1 @@
1
- import{a as c}from"./chunk-3DEA4WWC.js";import{a as t}from"./chunk-6OQ73VRZ.js";import{na as i}from"./chunk-2ERDZXCS.js";import{a}from"./chunk-SNAKHGZS.js";var n=class o{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:t.intercom.appId,name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){localStorage.setItem("Intercom",JSON.stringify(e))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(e.hide_default_launcher=!0,window.Intercom("update",a({app_id:t.intercom.appId},e)),this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(e.hide_default_launcher=!1,window.Intercom("update",a({app_id:t.intercom.appId},e)),this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return c.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}static \u0275fac=function(r){return new(r||o)};static \u0275prov=i({token:o,factory:o.\u0275fac,providedIn:"root"})};export{n as a};
1
+ import{a as c}from"./chunk-3DEA4WWC.js";import{a as t}from"./chunk-XYGVXFMF.js";import{na as i}from"./chunk-2ERDZXCS.js";import{a}from"./chunk-SNAKHGZS.js";var n=class o{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:t.intercom.appId,name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){localStorage.setItem("Intercom",JSON.stringify(e))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(e.hide_default_launcher=!0,window.Intercom("update",a({app_id:t.intercom.appId},e)),this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(e.hide_default_launcher=!1,window.Intercom("update",a({app_id:t.intercom.appId},e)),this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return c.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}static \u0275fac=function(r){return new(r||o)};static \u0275prov=i({token:o,factory:o.\u0275fac,providedIn:"root"})};export{n as a};
@@ -0,0 +1 @@
1
+ import{a as P}from"./chunk-5UIG35CC.js";import{a as h}from"./chunk-HD6QZ4JW.js";import{a as _}from"./chunk-6E4EOPEV.js";import{a as O}from"./chunk-QLLG7ZRD.js";import{a as D}from"./chunk-UZTNTDRV.js";import{a as C}from"./chunk-F35SJSL6.js";import"./chunk-RESFCVEN.js";import"./chunk-KFPJSZWS.js";import"./chunk-YZP54ECO.js";import"./chunk-5GHN24QS.js";import"./chunk-B3U3BHLU.js";import"./chunk-ZFPL5GZZ.js";import"./chunk-RRTVC6Y2.js";import"./chunk-Z3I6U6KT.js";import"./chunk-QGI3QC76.js";import"./chunk-PPNXP25T.js";import"./chunk-MHPH7T32.js";import"./chunk-UNAPWUZC.js";import"./chunk-EKGQU5OA.js";import"./chunk-IOBYB6AV.js";import"./chunk-JFS6EFNT.js";import"./chunk-YNQPX5G6.js";import"./chunk-ZRBKLF75.js";import"./chunk-GCPQTFRO.js";import"./chunk-NFVNHSX5.js";import"./chunk-Z6KYVNJQ.js";import"./chunk-4NWLXS6M.js";import"./chunk-OEFF3O4P.js";import"./chunk-ZLJTB3SO.js";import"./chunk-OG6UIE5Q.js";import"./chunk-LYYPWLC4.js";import"./chunk-4CLMG36L.js";import{E as S,h as y,o as b}from"./chunk-DHBFOXIN.js";import"./chunk-VFWU5XQ6.js";import"./chunk-3DEA4WWC.js";import"./chunk-2WBWJI4D.js";import{Ib as t,Jb as i,Kb as n,Rd as c,Tc as s,Za as r,ib as f,ra as m,rc as a,sc as l,tc as d}from"./chunk-2ERDZXCS.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var M=class g{activatedRoute=m(c);settings=m(C);formData=s(()=>this.settings.formData());options=s(()=>this.settings.options());configDefault=s(()=>this.settings.configDefault());constructor(){this.settings.initFormData(this.activatedRoute)}static \u0275fac=function(u){return new(u||g)};static \u0275cmp=f({type:g,selectors:[["POS-orders"]],decls:22,vars:34,consts:[["cardTitle","Void","id","voidOrders",3,"description"],[1,"row"],[1,"col-12"],[3,"ngModelChange","label","description","defaultConfig","ngModel"],["cardTitle","Customer Invoice Detail","id","customerInvoiceDetailOrders"],["cardTitle","Default Values","id","defaultValuesOrders",3,"description"],["keyLabel","Value","keyValue","Key",3,"ngModelChange","label","description","options","defaultConfig","ngModel"],["bindLabel","Value","bindValue","Key",3,"ngModelChange","label","options","ngModel","isHorizontalLayout","description"],["cardTitle","Non Sargable Query","id","nonSargableQueryOrders",3,"description"],[3,"ngModelChange","label","type","ngModel","isHorizontalLayout","description"]],template:function(u,e){u&1&&(i(0,"POS-card",0)(1,"div",1)(2,"div",2)(3,"POS-input-toggle",3),d("ngModelChange",function(o){return l(e.formData().VoidEnabled,o)||(e.formData().VoidEnabled=o),o}),n()()()(),i(4,"POS-card",4)(5,"div",1)(6,"div",2)(7,"POS-input-toggle",3),d("ngModelChange",function(o){return l(e.formData().ShowNumberOfPerson,o)||(e.formData().ShowNumberOfPerson=o),o}),n()(),i(8,"div",2)(9,"POS-input-toggle",3),d("ngModelChange",function(o){return l(e.formData().ProductImageVisible,o)||(e.formData().ProductImageVisible=o),o}),n()()()(),i(10,"POS-card",5)(11,"div",1)(12,"div",2)(13,"POS-button-group",6),d("ngModelChange",function(o){return l(e.formData().InvoiceDefaultSorting,o)||(e.formData().InvoiceDefaultSorting=o),o}),n()(),i(14,"div",2)(15,"POS-input-select",7),d("ngModelChange",function(o){return l(e.formData().NumberFilterComparator,o)||(e.formData().NumberFilterComparator=o),o}),n()()()(),i(16,"POS-card",8)(17,"div",1)(18,"div",2)(19,"POS-input-field",9),d("ngModelChange",function(o){return l(e.formData().NonSargableOrderNumberQuery.DefaultLookbackDays,o)||(e.formData().NonSargableOrderNumberQuery.DefaultLookbackDays=o),o}),n()(),i(20,"div",2)(21,"POS-input-toggle",3),d("ngModelChange",function(o){return l(e.formData().NonSargableOrderNumberQuery.QueryOptionRecompile,o)||(e.formData().NonSargableOrderNumberQuery.QueryOptionRecompile=o),o}),n()()()()),u&2&&(t("description","Enable Void & restore in Customer invoice"),r(3),t("label","Enable")("description","Enable void feature for Supplier Bill")("defaultConfig",e.configDefault().VoidEnabled),a("ngModel",e.formData().VoidEnabled),r(4),t("label","Number of Person Visible")("description","Hide or show number of person in the customer invoice info (Outlet Section)")("defaultConfig",e.configDefault().ShowNumberOfPerson),a("ngModel",e.formData().ShowNumberOfPerson),r(2),t("label","Product Image Visible")("description","Hide or show product image in the customer invoice info (Items Section)")("defaultConfig",e.configDefault().ProductImageVisible),a("ngModel",e.formData().ProductImageVisible),r(),t("description","Default values for filter in customer invoice & supplier bill list"),r(3),t("label","Invoice & Bill Default Sorting")("description","Set default sort for customer invoice and supplier bill list")("options",e.options().CustomerInvoiceSortFilterOption)("defaultConfig",e.configDefault().InvoiceDefaultSorting),a("ngModel",e.formData().InvoiceDefaultSorting),r(2),t("label","Number Filter Comparator")("options",e.options().SearchComparatorTypeOption),a("ngModel",e.formData().NumberFilterComparator),t("isHorizontalLayout",!0)("description","Configure default value for number filter comparator"),r(),t("description","Optimization for query that cannot use Index efficiently"),r(3),t("label","Number Filter Lookback Days")("type","number"),a("ngModel",e.formData().NonSargableOrderNumberQuery.DefaultLookbackDays),t("isHorizontalLayout",!0)("description","Default From Value when searching Order Number with Contains or Ends With operator to speed up Query Index SCAN."),r(2),t("label","Product Query Option Recompile")("description","Whether to recompile query when searching Order Number with Contains or Ends With operator")("defaultConfig",e.configDefault().NonSargableOrderNumberQuery.QueryOptionRecompile),a("ngModel",e.formData().NonSargableOrderNumberQuery.QueryOptionRecompile))},dependencies:[D,O,h,P,_,S,y,b],encapsulation:2})};export{M as OrdersComponent};
@@ -1 +1 @@
1
- import{b as Z}from"./chunk-37PZPWZY.js";import"./chunk-TTZUIFLN.js";import{d as st}from"./chunk-6C7NKVRP.js";import"./chunk-6TWTQLKB.js";import"./chunk-SASYAFMF.js";import"./chunk-QP7B4347.js";import"./chunk-STYLBZL4.js";import"./chunk-XLS7AM5H.js";import"./chunk-U7XVI26F.js";import"./chunk-B3U3BHLU.js";import{a as ct,b as dt}from"./chunk-ZIWP67C5.js";import{b as nt}from"./chunk-FZGFUOJQ.js";import{a as $}from"./chunk-XF2CLHVB.js";import"./chunk-URXBD2J7.js";import{a as ot}from"./chunk-E6MKUJD5.js";import{f as pt,g as mt}from"./chunk-74EGVPSQ.js";import"./chunk-HB5JT7XV.js";import"./chunk-35ECO23I.js";import"./chunk-G2UNSH3R.js";import"./chunk-VIKIXIX5.js";import"./chunk-IFLLAVLK.js";import"./chunk-HCCBJVAB.js";import"./chunk-A3HVDWQA.js";import{a as at}from"./chunk-U6DL5563.js";import"./chunk-3GZUX2TV.js";import"./chunk-LWCDPG6P.js";import"./chunk-ANISRDEI.js";import"./chunk-4TOQ7EGN.js";import"./chunk-3TFWTYY2.js";import"./chunk-52KMSRYQ.js";import"./chunk-STIMAG44.js";import"./chunk-EKGQU5OA.js";import"./chunk-IOBYB6AV.js";import"./chunk-JFS6EFNT.js";import"./chunk-YNQPX5G6.js";import{G as rt,O as lt}from"./chunk-FAZ7G5H6.js";import{d as et,e as it}from"./chunk-ZRBKLF75.js";import"./chunk-VBXYBASD.js";import{c as tt}from"./chunk-CPHICIOL.js";import"./chunk-GCPQTFRO.js";import"./chunk-NFVNHSX5.js";import"./chunk-N4STXFCX.js";import"./chunk-ZLJTB3SO.js";import"./chunk-OG6UIE5Q.js";import"./chunk-LYYPWLC4.js";import"./chunk-4CLMG36L.js";import{E as z,h as U,o as Y}from"./chunk-DHBFOXIN.js";import"./chunk-NGW5XDAO.js";import"./chunk-BMNK3NU4.js";import"./chunk-VFWU5XQ6.js";import{b as X}from"./chunk-HQQZZQUW.js";import"./chunk-3DEA4WWC.js";import"./chunk-6OQ73VRZ.js";import{n as K,q as Q}from"./chunk-2WBWJI4D.js";import{Bb as f,Cc as B,Db as D,Dc as j,Eb as A,Gb as W,Hb as k,Ib as s,Jb as n,Kb as i,Kc as v,Lb as b,Mc as T,Nd as H,Pb as h,Qb as I,Qc as N,Ub as y,Ud as J,Wd as q,Xb as w,Za as l,Zb as m,dd as G,eb as u,ib as P,mc as p,nb as V,nc as x,ob as L,oc as O,ra as F,rc as g,sc as _,tc as C,va as c,wa as d,zd as R}from"./chunk-2ERDZXCS.js";import"./chunk-WFMAM73Y.js";import{a as E,b as M}from"./chunk-SNAKHGZS.js";var Ct=()=>["/menu/Contacts/Contact/Customers/Info"],St=o=>({ID:o});function ut(o,S){if(o&1){let t=y();n(0,"button",9),w("click",function(){c(t);let e=m(2);return d(e.openExportModal())}),b(1,"i",10),p(2," Export "),i()}}function xt(o,S){if(o&1){let t=y();n(0,"div")(1,"div",11)(2,"h6"),p(3,"Status"),i(),n(4,"ng-select",12),C("ngModelChange",function(e){c(t);let a=m(2);return _(a.contactState,e)||(a.contactState=e),d(e)}),i(),n(5,"h6"),p(6,"Outlet Sign Up"),i(),n(7,"ng-select",13),C("ngModelChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.CreatorEntityID,e)||(a.pageData.Filter.CreatorEntityID=e),d(e)}),i(),n(8,"h6"),p(9,"Group"),i(),n(10,"ng-select",14),C("ngModelChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.GroupID,e)||(a.pageData.Filter.GroupID=e),d(e)}),i(),n(11,"h6"),p(12,"Join Date Range"),i(),n(13,"div")(14,"datepicker",15),C("dateChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.From,e)||(a.pageData.Filter.From=e),d(e)}),i()(),n(15,"div",16)(16,"datepicker",17),C("dateChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.To,e)||(a.pageData.Filter.To=e),d(e)}),i()(),n(17,"h6"),p(18,"Sign In Date Range"),i(),n(19,"div")(20,"datepicker",15),C("dateChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.SignFrom,e)||(a.pageData.Filter.SignFrom=e),d(e)}),i()(),n(21,"div",16)(22,"datepicker",17),C("dateChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.SignTo,e)||(a.pageData.Filter.SignTo=e),d(e)}),i()()()()}if(o&2){let t=m(2);l(4),g("ngModel",t.contactState),s("items",t.pageData.Options.ContactStates)("clearable",!1),l(3),g("ngModel",t.pageData.Filter.CreatorEntityID),s("items",t.pageData.Options.Entities),l(3),g("ngModel",t.pageData.Filter.GroupID),s("items",t.pageData.Options.Groups),l(4),s("isFloatingLabel",!1),g("date",t.pageData.Filter.From),l(2),s("isFloatingLabel",!1),g("date",t.pageData.Filter.To),l(4),s("isFloatingLabel",!1),g("date",t.pageData.Filter.SignFrom),l(2),s("isFloatingLabel",!1),g("date",t.pageData.Filter.SignTo)}}function ft(o,S){if(o&1&&(n(0,"tr")(1,"th")(2,"a",27),p(3),i()(),n(4,"td"),p(5),i(),n(6,"td"),p(7),i(),n(8,"td"),p(9),i(),n(10,"td"),p(11),v(12,"IsMinDate"),i(),n(13,"td"),p(14),v(15,"IsMinDate"),i()()),o&2){let t=S.$implicit;l(2),s("routerLink",B(14,Ct))("queryParams",j(15,St,t.ID)),l(),x(t.Name),l(2),x(t.Code),l(2),x(t.Mobile),l(2),x(t.Email),l(2),x(T(12,8,t.JoinDate,"dd MMM yyyy")),l(3),O(" ",T(15,11,t.AppLastSignIn,"dd MMM yyyy HH:mm")," ")}}function Dt(o,S){if(o&1){let t=y();n(0,"div",26)(1,"POS-complex-pagination",28),w("jumpToPage",function(){c(t);let e=m(3);return d(e.getListData())})("previousPage",function(){c(t);let e=m(3);return d(e.getListData())})("nextPage",function(){c(t);let e=m(3);return d(e.getListData())}),i()()}if(o&2){let t=m(3);l(),s("total",t.data.Data.length)("pageData",t.pageData)}}function yt(o,S){if(o&1&&(h(0,8),n(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr",22)(6,"th"),p(7,"Name"),i(),n(8,"th",23),p(9,"Code"),i(),n(10,"th",23),p(11,"Mobile"),i(),n(12,"th",24),p(13,"Email"),i(),n(14,"th",25),p(15,"Join Date"),i(),n(16,"th",23),p(17,"Last Sign In"),i()()(),n(18,"tbody"),W(19,ft,16,17,"tr",null,A),i()()(),f(21,Dt,2,2,"div",26),i(),I()),o&2){let t=m(2);l(19),k(t.data.Data),l(2),D(t.pageData.Filter?21:-1)}}function ht(o,S){if(o&1){let t=y();n(0,"mainpanel-cmp",2),C("textChange",function(e){c(t);let a=m();return _(a.pageData.Filter.Text,e)||(a.pageData.Filter.Text=e),d(e)}),w("onSubmit",function(){c(t);let e=m();return d(e.searchFromPageOne())}),C("filterChange",function(e){c(t);let a=m();return _(a.pageData.Filter,e)||(a.pageData.Filter=e),d(e)}),h(1,3),n(2,"a",4),b(3,"i",5),p(4,"Get Your Brand Loyalty App "),i(),f(5,ut,3,0,"button",6),I(),h(6,7),L(7,xt,23,15,"ng-template",null,0,N),I(),f(9,yt,22,1,"ng-container",8),i()}if(o&2){let t=m();s("pageData",t.menuData),g("text",t.pageData.Filter.Text),s("isFilterOnDropdown",!1),g("filter",t.pageData.Filter),l(5),D(t.role.global.Export?5:-1),l(4),D(t.data&&t.data.Data?9:-1)}}var gt=class o extends ${constructor(t,r,e,a,_t,It){super(t,r,"Contact/CustomerAppSignInList","ContactLoader/CustomerList",_t);this.httpService=r;this.csvConverter=e;this.matDialog=a;this.role=It}cdr=F(G);title=F(H);contactState;ngOnInit(){let t=JSON.parse(localStorage.getItem("AccountInfo"));this.title.setTitle(t.BrandName+" POS | App Sign In")}postInit(t){this.menuData.H="App Sign In",this.cdr.markForCheck()}preInitList(){this.contactState=this.pageData.Filter.ContactStateID,this.pageData.Options.ContactStates=[{Key:0,Value:"All"},...this.pageData.Options.ContactStates],this.pageData.Filter=M(E({},this.pageData.Filter),{SignFrom:this.pageData.Filter.SignFrom?this.pageData.Filter.SignFrom:"0001-01-01T00:00:00",SignTo:this.pageData.Filter.SignTo?this.pageData.Filter.SignTo:"0001-01-01T00:00:00"})}openExportModal(){this.matDialog.open(nt,{data:{title:"Loyalty App Last Sign In",exportTypes:[{ID:"ContactExport/LoyaltyLastSignIn",Value:"Default",FileName:"LoyaltyAppLastSignIn"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}preGetList(){this.pageData.Filter.ContactStateID=this.contactState==0?null:this.contactState}static \u0275fac=function(r){return new(r||o)(u(at),u(Q),u(ot),u(tt),u(K),u(X))};static \u0275cmp=P({type:o,selectors:[["pos-app-sign-in"]],features:[V],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["ngProjectAs","actions",5,["actions"]],["target","_blank","href","https://www.dealpos.co.id/tour/customer-loyalty-program",1,"btn","btn-outline-secondary"],[1,"fa-solid","fa-mobile","me-1"],[1,"btn","btn-outline-secondary"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["bindLabel","Value","bindValue","Key","placeholder","Choose Status",3,"ngModelChange","ngModel","items","clearable"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an Outlet...",3,"ngModelChange","ngModel","items"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Group...",3,"ngModelChange","ngModel","items"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","150px"],[2,"width","200px"],[2,"width","100px"],[1,"mt-2"],[1,"fw-normal",3,"routerLink","queryParams"],["api","Contact/CustomerAppSignInCount",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(r,e){r&1&&f(0,ht,10,6,"mainpanel-cmp",1),r&2&&D(e.pageData.Filter?0:-1)},dependencies:[R,mt,pt,st,z,U,Y,q,J,Z,it,et,dt,ct,lt,rt],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{gt as AppSignInComponent};
1
+ import{b as Z}from"./chunk-37PZPWZY.js";import"./chunk-TTZUIFLN.js";import{d as st}from"./chunk-6C7NKVRP.js";import"./chunk-6TWTQLKB.js";import"./chunk-SASYAFMF.js";import"./chunk-QP7B4347.js";import"./chunk-STYLBZL4.js";import"./chunk-XLS7AM5H.js";import"./chunk-U7XVI26F.js";import"./chunk-B3U3BHLU.js";import{a as ct,b as dt}from"./chunk-ZIWP67C5.js";import{b as nt}from"./chunk-FZGFUOJQ.js";import{a as $}from"./chunk-CEBF2EVJ.js";import"./chunk-NZPQWSQD.js";import{a as ot}from"./chunk-E6MKUJD5.js";import{f as pt,g as mt}from"./chunk-I4ZZLEOC.js";import"./chunk-HB5JT7XV.js";import"./chunk-35ECO23I.js";import"./chunk-G2UNSH3R.js";import"./chunk-VIKIXIX5.js";import"./chunk-IFLLAVLK.js";import"./chunk-XYWKHD3C.js";import"./chunk-A3HVDWQA.js";import{a as at}from"./chunk-4VMU55T7.js";import"./chunk-3GZUX2TV.js";import"./chunk-LWCDPG6P.js";import"./chunk-ANISRDEI.js";import"./chunk-4TOQ7EGN.js";import"./chunk-3TFWTYY2.js";import"./chunk-52KMSRYQ.js";import"./chunk-STIMAG44.js";import"./chunk-EKGQU5OA.js";import"./chunk-IOBYB6AV.js";import"./chunk-JFS6EFNT.js";import"./chunk-YNQPX5G6.js";import{G as rt,O as lt}from"./chunk-FAZ7G5H6.js";import{d as et,e as it}from"./chunk-ZRBKLF75.js";import"./chunk-VBXYBASD.js";import{c as tt}from"./chunk-CPHICIOL.js";import"./chunk-GCPQTFRO.js";import"./chunk-NFVNHSX5.js";import"./chunk-N4STXFCX.js";import"./chunk-ZLJTB3SO.js";import"./chunk-OG6UIE5Q.js";import"./chunk-LYYPWLC4.js";import"./chunk-4CLMG36L.js";import{E as z,h as U,o as Y}from"./chunk-DHBFOXIN.js";import"./chunk-UDWJOZLR.js";import"./chunk-3CQB5DRP.js";import"./chunk-VFWU5XQ6.js";import{b as X}from"./chunk-HQQZZQUW.js";import"./chunk-3DEA4WWC.js";import"./chunk-XYGVXFMF.js";import{n as K,q as Q}from"./chunk-2WBWJI4D.js";import{Bb as f,Cc as B,Db as D,Dc as j,Eb as A,Gb as W,Hb as k,Ib as s,Jb as n,Kb as i,Kc as v,Lb as b,Mc as T,Nd as H,Pb as h,Qb as I,Qc as N,Ub as y,Ud as J,Wd as q,Xb as w,Za as l,Zb as m,dd as G,eb as u,ib as P,mc as p,nb as V,nc as x,ob as L,oc as O,ra as F,rc as g,sc as _,tc as C,va as c,wa as d,zd as R}from"./chunk-2ERDZXCS.js";import"./chunk-WFMAM73Y.js";import{a as E,b as M}from"./chunk-SNAKHGZS.js";var Ct=()=>["/menu/Contacts/Contact/Customers/Info"],St=o=>({ID:o});function ut(o,S){if(o&1){let t=y();n(0,"button",9),w("click",function(){c(t);let e=m(2);return d(e.openExportModal())}),b(1,"i",10),p(2," Export "),i()}}function xt(o,S){if(o&1){let t=y();n(0,"div")(1,"div",11)(2,"h6"),p(3,"Status"),i(),n(4,"ng-select",12),C("ngModelChange",function(e){c(t);let a=m(2);return _(a.contactState,e)||(a.contactState=e),d(e)}),i(),n(5,"h6"),p(6,"Outlet Sign Up"),i(),n(7,"ng-select",13),C("ngModelChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.CreatorEntityID,e)||(a.pageData.Filter.CreatorEntityID=e),d(e)}),i(),n(8,"h6"),p(9,"Group"),i(),n(10,"ng-select",14),C("ngModelChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.GroupID,e)||(a.pageData.Filter.GroupID=e),d(e)}),i(),n(11,"h6"),p(12,"Join Date Range"),i(),n(13,"div")(14,"datepicker",15),C("dateChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.From,e)||(a.pageData.Filter.From=e),d(e)}),i()(),n(15,"div",16)(16,"datepicker",17),C("dateChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.To,e)||(a.pageData.Filter.To=e),d(e)}),i()(),n(17,"h6"),p(18,"Sign In Date Range"),i(),n(19,"div")(20,"datepicker",15),C("dateChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.SignFrom,e)||(a.pageData.Filter.SignFrom=e),d(e)}),i()(),n(21,"div",16)(22,"datepicker",17),C("dateChange",function(e){c(t);let a=m(2);return _(a.pageData.Filter.SignTo,e)||(a.pageData.Filter.SignTo=e),d(e)}),i()()()()}if(o&2){let t=m(2);l(4),g("ngModel",t.contactState),s("items",t.pageData.Options.ContactStates)("clearable",!1),l(3),g("ngModel",t.pageData.Filter.CreatorEntityID),s("items",t.pageData.Options.Entities),l(3),g("ngModel",t.pageData.Filter.GroupID),s("items",t.pageData.Options.Groups),l(4),s("isFloatingLabel",!1),g("date",t.pageData.Filter.From),l(2),s("isFloatingLabel",!1),g("date",t.pageData.Filter.To),l(4),s("isFloatingLabel",!1),g("date",t.pageData.Filter.SignFrom),l(2),s("isFloatingLabel",!1),g("date",t.pageData.Filter.SignTo)}}function ft(o,S){if(o&1&&(n(0,"tr")(1,"th")(2,"a",27),p(3),i()(),n(4,"td"),p(5),i(),n(6,"td"),p(7),i(),n(8,"td"),p(9),i(),n(10,"td"),p(11),v(12,"IsMinDate"),i(),n(13,"td"),p(14),v(15,"IsMinDate"),i()()),o&2){let t=S.$implicit;l(2),s("routerLink",B(14,Ct))("queryParams",j(15,St,t.ID)),l(),x(t.Name),l(2),x(t.Code),l(2),x(t.Mobile),l(2),x(t.Email),l(2),x(T(12,8,t.JoinDate,"dd MMM yyyy")),l(3),O(" ",T(15,11,t.AppLastSignIn,"dd MMM yyyy HH:mm")," ")}}function Dt(o,S){if(o&1){let t=y();n(0,"div",26)(1,"POS-complex-pagination",28),w("jumpToPage",function(){c(t);let e=m(3);return d(e.getListData())})("previousPage",function(){c(t);let e=m(3);return d(e.getListData())})("nextPage",function(){c(t);let e=m(3);return d(e.getListData())}),i()()}if(o&2){let t=m(3);l(),s("total",t.data.Data.length)("pageData",t.pageData)}}function yt(o,S){if(o&1&&(h(0,8),n(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr",22)(6,"th"),p(7,"Name"),i(),n(8,"th",23),p(9,"Code"),i(),n(10,"th",23),p(11,"Mobile"),i(),n(12,"th",24),p(13,"Email"),i(),n(14,"th",25),p(15,"Join Date"),i(),n(16,"th",23),p(17,"Last Sign In"),i()()(),n(18,"tbody"),W(19,ft,16,17,"tr",null,A),i()()(),f(21,Dt,2,2,"div",26),i(),I()),o&2){let t=m(2);l(19),k(t.data.Data),l(2),D(t.pageData.Filter?21:-1)}}function ht(o,S){if(o&1){let t=y();n(0,"mainpanel-cmp",2),C("textChange",function(e){c(t);let a=m();return _(a.pageData.Filter.Text,e)||(a.pageData.Filter.Text=e),d(e)}),w("onSubmit",function(){c(t);let e=m();return d(e.searchFromPageOne())}),C("filterChange",function(e){c(t);let a=m();return _(a.pageData.Filter,e)||(a.pageData.Filter=e),d(e)}),h(1,3),n(2,"a",4),b(3,"i",5),p(4,"Get Your Brand Loyalty App "),i(),f(5,ut,3,0,"button",6),I(),h(6,7),L(7,xt,23,15,"ng-template",null,0,N),I(),f(9,yt,22,1,"ng-container",8),i()}if(o&2){let t=m();s("pageData",t.menuData),g("text",t.pageData.Filter.Text),s("isFilterOnDropdown",!1),g("filter",t.pageData.Filter),l(5),D(t.role.global.Export?5:-1),l(4),D(t.data&&t.data.Data?9:-1)}}var gt=class o extends ${constructor(t,r,e,a,_t,It){super(t,r,"Contact/CustomerAppSignInList","ContactLoader/CustomerList",_t);this.httpService=r;this.csvConverter=e;this.matDialog=a;this.role=It}cdr=F(G);title=F(H);contactState;ngOnInit(){let t=JSON.parse(localStorage.getItem("AccountInfo"));this.title.setTitle(t.BrandName+" POS | App Sign In")}postInit(t){this.menuData.H="App Sign In",this.cdr.markForCheck()}preInitList(){this.contactState=this.pageData.Filter.ContactStateID,this.pageData.Options.ContactStates=[{Key:0,Value:"All"},...this.pageData.Options.ContactStates],this.pageData.Filter=M(E({},this.pageData.Filter),{SignFrom:this.pageData.Filter.SignFrom?this.pageData.Filter.SignFrom:"0001-01-01T00:00:00",SignTo:this.pageData.Filter.SignTo?this.pageData.Filter.SignTo:"0001-01-01T00:00:00"})}openExportModal(){this.matDialog.open(nt,{data:{title:"Loyalty App Last Sign In",exportTypes:[{ID:"ContactExport/LoyaltyLastSignIn",Value:"Default",FileName:"LoyaltyAppLastSignIn"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}preGetList(){this.pageData.Filter.ContactStateID=this.contactState==0?null:this.contactState}static \u0275fac=function(r){return new(r||o)(u(at),u(Q),u(ot),u(tt),u(K),u(X))};static \u0275cmp=P({type:o,selectors:[["pos-app-sign-in"]],features:[V],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["ngProjectAs","actions",5,["actions"]],["target","_blank","href","https://www.dealpos.co.id/tour/customer-loyalty-program",1,"btn","btn-outline-secondary"],[1,"fa-solid","fa-mobile","me-1"],[1,"btn","btn-outline-secondary"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["bindLabel","Value","bindValue","Key","placeholder","Choose Status",3,"ngModelChange","ngModel","items","clearable"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an Outlet...",3,"ngModelChange","ngModel","items"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Group...",3,"ngModelChange","ngModel","items"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","150px"],[2,"width","200px"],[2,"width","100px"],[1,"mt-2"],[1,"fw-normal",3,"routerLink","queryParams"],["api","Contact/CustomerAppSignInCount",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(r,e){r&1&&f(0,ht,10,6,"mainpanel-cmp",1),r&2&&D(e.pageData.Filter?0:-1)},dependencies:[R,mt,pt,st,z,U,Y,q,J,Z,it,et,dt,ct,lt,rt],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{gt as AppSignInComponent};
@@ -1 +1 @@
1
- import{b as k}from"./chunk-SPWUI2AJ.js";import{b as v,c as P,d as j}from"./chunk-QIU4DALL.js";import{a as D,b as V}from"./chunk-NEUUD5VB.js";import{a as p}from"./chunk-NSNUUKNK.js";import{b as G,c as L}from"./chunk-4TOQ7EGN.js";import{P as m}from"./chunk-FAZ7G5H6.js";import{a as l}from"./chunk-3DEA4WWC.js";import{a as R}from"./chunk-6OQ73VRZ.js";import{n as w,q as U}from"./chunk-2WBWJI4D.js";import{F as A,J as g,R as N,b as f,e as C,na as x,p as S,qa as h,s as T,u as E}from"./chunk-2ERDZXCS.js";import{i as u}from"./chunk-SNAKHGZS.js";var M=(o=>(o[o.IsNew=0]="IsNew",o[o.IsComplete=1]="IsComplete",o[o.IsEdit=2]="IsEdit",o[o.isPark=3]="isPark",o[o.IsRetrieve=4]="IsRetrieve",o[o.IsSplit=5]="IsSplit",o[o.IsBill=6]="IsBill",o[o.IsReturn=7]="IsReturn",o[o.IsUndo=8]="IsUndo",o[o.UploadOrderFail=9]="UploadOrderFail",o))(M||{});var H=(s=>(s[s.Unsent=0]="Unsent",s[s.AwaitingCollection=1]="AwaitingCollection",s[s.Partial=2]="Partial",s[s.Sent=3]="Sent",s))(H||{});var b=class{ID;EntityID;RegisterID;TypeID;Date;Number;CustomerID;SalesID;Discount=0;Discount2=0;DiscountAmount=0;CustomerDiscountRate=0;Note="";DeliveryOutletID;TaxTypeID;CurrencyID;CurrencyRate;PointUsed;InvoicedStateID;ReferenceNumber="";LogisticsServiceID;ParkLabel="";NumberOfPerson;ClientTimestamp;Created;PromotionCoupon="";CouponType=1;PromotionNote="";DeliveryStateID;CouponProvider="Internal";CurrencySymbol;constructor(){this.ID=l.GuidEmpty,this.EntityID=l.GuidEmpty,this.RegisterID=l.GuidEmpty,this.Number="",this.CustomerID=null,this.SalesID=null,this.Discount=0,this.Discount2=0,this.DiscountAmount=0,this.Note="",this.TaxTypeID=l.GuidEmpty,this.CurrencyID=1,this.CurrencyRate=1,this.DeliveryStateID=3,this.PointUsed=0,this.NumberOfPerson=1,this.Date=new Date}removeEnterNote(){this.Note&&(this.Note=this.Note.replace(/\n/g,""))}};var y=class{DeliveryEntityID;Type;NewOrderID;constructor(){this.DeliveryEntityID="",this.Type=3}};var d=class{Amount;ApplyToProduct;Code;Type;TypeDescription;Coupon;Notification;MaxDiscount;Note};var a=class{Order;Invoice;Shipping;Action;Payments;Items;CartItems;Promotion;ContactName;SplitParkLabel;get cartQuantity(){let t=0;for(let e of this.CartItems)t+=e.Quantity;return t}constructor(){this.Order=new b,this.Invoice=new v,this.Shipping=new P,this.Action=new y,this.Payments=Array(),this.Items=Array(),this.CartItems=Array(),this.ContactName=""}get TotalPaidAmount(){let t=0;return this.Payments.forEach(e=>{t+=e.PaidAmount}),t}get RedeemableAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID!=1);return this.GetAmountByCart(t)}get TotalQuantity(){let t=0;return this.CartItems.forEach(e=>{e.PromotionGift||(t+=e.Quantity)}),t}get CashOnlyAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID==1);return this.GetAmountByCart(t)}get PointOnlyAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID==2);return this.GetAmountByCart(t)}get PrepaidPackageItem(){return this.CartItems.filter(e=>e.Variant.TypeID==10)}GetAmountByCart(t){let e=0;return t.forEach(r=>{e+=r.Total}),e=e*(100-this.Order.Discount)/100,e=e*(100-this.Order.Discount2)/100,e}getRewards(){return this.CartItems.filter(e=>e.PromotionGift)}};u([p(()=>b)],a.prototype,"Order",2),u([p(()=>v)],a.prototype,"Invoice",2),u([p(()=>P)],a.prototype,"Shipping",2),u([p(()=>y)],a.prototype,"Action",2),u([p(()=>j)],a.prototype,"Payments",2),u([p(()=>D)],a.prototype,"Items",2),u([p(()=>V)],a.prototype,"CartItems",2),u([p(()=>d)],a.prototype,"Promotion",2);var O=class{Success;Message;message;ObjectID;SalesOrderID;OutDeliveryID;Contact;LoyaltyPoint;InvoiceNumber;Creator;OrderTimeString;PrintMode;PaymentStateID;PaymentStateLabel;Final;InvoiceNumberResult;constructor(){this.Success=!0,this.Message="",this.ObjectID="",this.SalesOrderID="",this.OutDeliveryID="",this.Contact=null,this.LoyaltyPoint="",this.InvoiceNumber="",this.Creator="",this.OrderTimeString="",this.PrintMode=0,this.PaymentStateID=0,this.PaymentStateLabel="",this.Final=0}};var B=class c{constructor(t,e,r,s){this.httpService=t;this._localDataService=e;this._onlineStatusService=r;this._toastrService=s;this._onlineStatusService.getOnlineStatus$().subscribe(I=>{this.isOnline=I})}_Data=new C(null);Data$=this._Data.pipe(N(),A(t=>t!==null));isOnline;get Data(){return this._Data.value}pushNewValue(t){this._Data.next(t)}getSalesOrderPrint(t){return this.httpService.post("/API/POS/GetSalesOrderPrint",{TemplateID:t})}submitOrder(t,e){let r=this.generatePOSDataForSubmission(t,this.isOnline);if(this.isOnline)return this.submitOnline(r).pipe(this.handleTimeOutError(r));if(e.ModuleSell.EnableOfflineTransaction)return this._localDataService.syncOrder(r).pipe(E(()=>this.generateCompleteData(r)));this._toastrService.warning("Offline order is not Supported!","Info!")}uploadOfflineOrder(t){return this._localDataService.uploadSingleOrder(t).pipe(g(e=>e?.message?.includes("objectStore does not exists")?this.submitOnline(t):S(()=>e)))}submitOnline(t){return this.httpService.post(m.SubmitOrder,t,R.pos.submitOrderTimeout)}handleTimeOutError(t){return f(g(e=>{if(e instanceof T||e?.name=="TimeoutError"){let r=this.generateCompleteData(t);this.pushNewValue(r)}throw e}))}generatePOSDataForSubmission(t,e=!0){let r=Object.assign(new a,t);r.Items=[],r.Order.CustomerID==null&&(r.Order.CustomerID=l.GuidEmpty),r.Order.SalesID==null&&(r.Order.SalesID=l.GuidEmpty);let s=1;r.Payments=r.Payments.map(i=>(i.Date=r.Order.Date,i.Index=s,s++,delete i.TypeID,i));let I=1;for(let i of r.CartItems){let n=new D;n.ID=i.ID,n.VariantID=i.VariantID,n.Quantity=i.Quantity,n.Cost=i.Cost,n.Price=i.Price,n.Discount=i.Discount,n.DiscountAmount=i.DiscountAmount,n.Note=i.Note,n.Taxable=i.Variant.Taxable,n.LoyaltyPoint=i.LoyaltyPoint,n.UnitCost=i.Cost,n.UnitPrice=i.Price,n.UnitPriceOriginal=i.UnitPriceOriginal,n.UnitExpense=i.UnitExpense,n.EntityID=i.EntityID,n.Index=I,n.UnitQuantity=i.UnitQuantity,n.PriceTypeID=i.PriceTypeID,n.PriceNote=i.PriceNote,n.Splited=i.SplitQuantity>0,n.SplitQuantity=i.SplitQuantity,n.InventoryTypeID=i.Variant.TypeID,n.SalesID="",n.Serial=i.Serial,i.SalesID&&(n.SalesID=i.SalesID),delete i.CouponDiscount,r.Items.push(n),I++}return e?(delete r.CartItems,delete r.Order.ClientTimestamp):r.Order.ClientTimestamp=new Date,r}generateCompleteData(t){let e=new O;return e.InvoiceNumber=t.Order.Number,e.OrderTimeString=new Date().toString(),e.PaymentStateID=t.Action?.Type,e.PaymentStateLabel="Offline",e.Success=!0,e.OutDeliveryID=t.Action.DeliveryEntityID,e}GetReturnInvoice(t,e){return this.httpService.get(m.ReturInvoice,[{key:"EntityID",value:e},{key:"Number",value:t}])}GetInvoiceBySoID(t){return this.httpService.get(m.GetPOSDataByID,[{key:"ID",value:t}])}UploadCSV(t,e){let r={CartItems:t,EntityID:e};return this.httpService.post(m.UploadCsv,r)}sendEmail(t,e){return new Promise((r,s)=>{this._localDataService.isProductFromServer().subscribe(I=>{if(I){let i={invoiceID:e,email:t};this.httpService.post(m.SendInvoiceEmail,i).subscribe({next:n=>{r(n)},error:n=>{s(n)}})}else s(G.wrongOfflineAction)})})}sendWhatsaap(t,e){let r={InvoiceID:t,PhoneNumber:e};return this.httpService.post(m.SendInvoiceWhatsapp,r)}createCustomerByInvoice(t,e){let r={InvoiceID:t,Mobile:e};return this.httpService.post(m.CreateCustomerInvoice,r)}saveCommission(t,e){let r={SOID:t,commission:e};return this.httpService.POSText("/API/Transaction/SetCommission",r)}generateReceiptA4(t){let e={ID:t};return this.httpService.post(m.InvoiceA4,e)}getVacant(t){return this.httpService.get(m.GetVacant,[{key:"EntityID",value:t}])}static \u0275fac=function(e){return new(e||c)(h(U),h(L),h(k),h(w))};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};export{M as a,H as b,a as c,O as d,B as e};
1
+ import{b as k}from"./chunk-SPWUI2AJ.js";import{b as v,c as P,d as j}from"./chunk-QIU4DALL.js";import{a as D,b as V}from"./chunk-NEUUD5VB.js";import{a as p}from"./chunk-NSNUUKNK.js";import{b as G,c as L}from"./chunk-4TOQ7EGN.js";import{P as m}from"./chunk-FAZ7G5H6.js";import{a as l}from"./chunk-3DEA4WWC.js";import{a as R}from"./chunk-XYGVXFMF.js";import{n as w,q as U}from"./chunk-2WBWJI4D.js";import{F as A,J as g,R as N,b as f,e as C,na as x,p as S,qa as h,s as T,u as E}from"./chunk-2ERDZXCS.js";import{i as u}from"./chunk-SNAKHGZS.js";var M=(o=>(o[o.IsNew=0]="IsNew",o[o.IsComplete=1]="IsComplete",o[o.IsEdit=2]="IsEdit",o[o.isPark=3]="isPark",o[o.IsRetrieve=4]="IsRetrieve",o[o.IsSplit=5]="IsSplit",o[o.IsBill=6]="IsBill",o[o.IsReturn=7]="IsReturn",o[o.IsUndo=8]="IsUndo",o[o.UploadOrderFail=9]="UploadOrderFail",o))(M||{});var H=(s=>(s[s.Unsent=0]="Unsent",s[s.AwaitingCollection=1]="AwaitingCollection",s[s.Partial=2]="Partial",s[s.Sent=3]="Sent",s))(H||{});var b=class{ID;EntityID;RegisterID;TypeID;Date;Number;CustomerID;SalesID;Discount=0;Discount2=0;DiscountAmount=0;CustomerDiscountRate=0;Note="";DeliveryOutletID;TaxTypeID;CurrencyID;CurrencyRate;PointUsed;InvoicedStateID;ReferenceNumber="";LogisticsServiceID;ParkLabel="";NumberOfPerson;ClientTimestamp;Created;PromotionCoupon="";CouponType=1;PromotionNote="";DeliveryStateID;CouponProvider="Internal";CurrencySymbol;constructor(){this.ID=l.GuidEmpty,this.EntityID=l.GuidEmpty,this.RegisterID=l.GuidEmpty,this.Number="",this.CustomerID=null,this.SalesID=null,this.Discount=0,this.Discount2=0,this.DiscountAmount=0,this.Note="",this.TaxTypeID=l.GuidEmpty,this.CurrencyID=1,this.CurrencyRate=1,this.DeliveryStateID=3,this.PointUsed=0,this.NumberOfPerson=1,this.Date=new Date}removeEnterNote(){this.Note&&(this.Note=this.Note.replace(/\n/g,""))}};var y=class{DeliveryEntityID;Type;NewOrderID;constructor(){this.DeliveryEntityID="",this.Type=3}};var d=class{Amount;ApplyToProduct;Code;Type;TypeDescription;Coupon;Notification;MaxDiscount;Note};var a=class{Order;Invoice;Shipping;Action;Payments;Items;CartItems;Promotion;ContactName;SplitParkLabel;get cartQuantity(){let t=0;for(let e of this.CartItems)t+=e.Quantity;return t}constructor(){this.Order=new b,this.Invoice=new v,this.Shipping=new P,this.Action=new y,this.Payments=Array(),this.Items=Array(),this.CartItems=Array(),this.ContactName=""}get TotalPaidAmount(){let t=0;return this.Payments.forEach(e=>{t+=e.PaidAmount}),t}get RedeemableAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID!=1);return this.GetAmountByCart(t)}get TotalQuantity(){let t=0;return this.CartItems.forEach(e=>{e.PromotionGift||(t+=e.Quantity)}),t}get CashOnlyAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID==1);return this.GetAmountByCart(t)}get PointOnlyAmount(){let t=this.CartItems.filter(e=>e.Variant.PaymentTypeID==2);return this.GetAmountByCart(t)}get PrepaidPackageItem(){return this.CartItems.filter(e=>e.Variant.TypeID==10)}GetAmountByCart(t){let e=0;return t.forEach(r=>{e+=r.Total}),e=e*(100-this.Order.Discount)/100,e=e*(100-this.Order.Discount2)/100,e}getRewards(){return this.CartItems.filter(e=>e.PromotionGift)}};u([p(()=>b)],a.prototype,"Order",2),u([p(()=>v)],a.prototype,"Invoice",2),u([p(()=>P)],a.prototype,"Shipping",2),u([p(()=>y)],a.prototype,"Action",2),u([p(()=>j)],a.prototype,"Payments",2),u([p(()=>D)],a.prototype,"Items",2),u([p(()=>V)],a.prototype,"CartItems",2),u([p(()=>d)],a.prototype,"Promotion",2);var O=class{Success;Message;message;ObjectID;SalesOrderID;OutDeliveryID;Contact;LoyaltyPoint;InvoiceNumber;Creator;OrderTimeString;PrintMode;PaymentStateID;PaymentStateLabel;Final;InvoiceNumberResult;constructor(){this.Success=!0,this.Message="",this.ObjectID="",this.SalesOrderID="",this.OutDeliveryID="",this.Contact=null,this.LoyaltyPoint="",this.InvoiceNumber="",this.Creator="",this.OrderTimeString="",this.PrintMode=0,this.PaymentStateID=0,this.PaymentStateLabel="",this.Final=0}};var B=class c{constructor(t,e,r,s){this.httpService=t;this._localDataService=e;this._onlineStatusService=r;this._toastrService=s;this._onlineStatusService.getOnlineStatus$().subscribe(I=>{this.isOnline=I})}_Data=new C(null);Data$=this._Data.pipe(N(),A(t=>t!==null));isOnline;get Data(){return this._Data.value}pushNewValue(t){this._Data.next(t)}getSalesOrderPrint(t){return this.httpService.post("/API/POS/GetSalesOrderPrint",{TemplateID:t})}submitOrder(t,e){let r=this.generatePOSDataForSubmission(t,this.isOnline);if(this.isOnline)return this.submitOnline(r).pipe(this.handleTimeOutError(r));if(e.ModuleSell.EnableOfflineTransaction)return this._localDataService.syncOrder(r).pipe(E(()=>this.generateCompleteData(r)));this._toastrService.warning("Offline order is not Supported!","Info!")}uploadOfflineOrder(t){return this._localDataService.uploadSingleOrder(t).pipe(g(e=>e?.message?.includes("objectStore does not exists")?this.submitOnline(t):S(()=>e)))}submitOnline(t){return this.httpService.post(m.SubmitOrder,t,R.pos.submitOrderTimeout)}handleTimeOutError(t){return f(g(e=>{if(e instanceof T||e?.name=="TimeoutError"){let r=this.generateCompleteData(t);this.pushNewValue(r)}throw e}))}generatePOSDataForSubmission(t,e=!0){let r=Object.assign(new a,t);r.Items=[],r.Order.CustomerID==null&&(r.Order.CustomerID=l.GuidEmpty),r.Order.SalesID==null&&(r.Order.SalesID=l.GuidEmpty);let s=1;r.Payments=r.Payments.map(i=>(i.Date=r.Order.Date,i.Index=s,s++,delete i.TypeID,i));let I=1;for(let i of r.CartItems){let n=new D;n.ID=i.ID,n.VariantID=i.VariantID,n.Quantity=i.Quantity,n.Cost=i.Cost,n.Price=i.Price,n.Discount=i.Discount,n.DiscountAmount=i.DiscountAmount,n.Note=i.Note,n.Taxable=i.Variant.Taxable,n.LoyaltyPoint=i.LoyaltyPoint,n.UnitCost=i.Cost,n.UnitPrice=i.Price,n.UnitPriceOriginal=i.UnitPriceOriginal,n.UnitExpense=i.UnitExpense,n.EntityID=i.EntityID,n.Index=I,n.UnitQuantity=i.UnitQuantity,n.PriceTypeID=i.PriceTypeID,n.PriceNote=i.PriceNote,n.Splited=i.SplitQuantity>0,n.SplitQuantity=i.SplitQuantity,n.InventoryTypeID=i.Variant.TypeID,n.SalesID="",n.Serial=i.Serial,i.SalesID&&(n.SalesID=i.SalesID),delete i.CouponDiscount,r.Items.push(n),I++}return e?(delete r.CartItems,delete r.Order.ClientTimestamp):r.Order.ClientTimestamp=new Date,r}generateCompleteData(t){let e=new O;return e.InvoiceNumber=t.Order.Number,e.OrderTimeString=new Date().toString(),e.PaymentStateID=t.Action?.Type,e.PaymentStateLabel="Offline",e.Success=!0,e.OutDeliveryID=t.Action.DeliveryEntityID,e}GetReturnInvoice(t,e){return this.httpService.get(m.ReturInvoice,[{key:"EntityID",value:e},{key:"Number",value:t}])}GetInvoiceBySoID(t){return this.httpService.get(m.GetPOSDataByID,[{key:"ID",value:t}])}UploadCSV(t,e){let r={CartItems:t,EntityID:e};return this.httpService.post(m.UploadCsv,r)}sendEmail(t,e){return new Promise((r,s)=>{this._localDataService.isProductFromServer().subscribe(I=>{if(I){let i={invoiceID:e,email:t};this.httpService.post(m.SendInvoiceEmail,i).subscribe({next:n=>{r(n)},error:n=>{s(n)}})}else s(G.wrongOfflineAction)})})}sendWhatsaap(t,e){let r={InvoiceID:t,PhoneNumber:e};return this.httpService.post(m.SendInvoiceWhatsapp,r)}createCustomerByInvoice(t,e){let r={InvoiceID:t,Mobile:e};return this.httpService.post(m.CreateCustomerInvoice,r)}saveCommission(t,e){let r={SOID:t,commission:e};return this.httpService.POSText("/API/Transaction/SetCommission",r)}generateReceiptA4(t){let e={ID:t};return this.httpService.post(m.InvoiceA4,e)}getVacant(t){return this.httpService.get(m.GetVacant,[{key:"EntityID",value:t}])}static \u0275fac=function(e){return new(e||c)(h(U),h(L),h(k),h(w))};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};export{M as a,H as b,a as c,O as d,B as e};