marketplacepos 5.46.5 → 5.46.6

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 (74) hide show
  1. package/Marketplace/{chunk-OFEZTCJA.js → chunk-22ARBR7W.js} +1 -1
  2. package/Marketplace/{chunk-LEM7ESKJ.js → chunk-2BV7ZXRB.js} +1 -1
  3. package/Marketplace/{chunk-VEYUDPOA.js → chunk-2DLU2LJJ.js} +1 -1
  4. package/Marketplace/{chunk-6WE2RKUX.js → chunk-4HOZLG47.js} +1 -1
  5. package/Marketplace/{chunk-U23D2EPE.js → chunk-5BHSTOJT.js} +1 -1
  6. package/Marketplace/{chunk-HVA57ZPZ.js → chunk-5DTUHJSS.js} +1 -1
  7. package/Marketplace/{chunk-GHFADTRR.js → chunk-5EIQGYTB.js} +1 -1
  8. package/Marketplace/{chunk-WHV5AYGI.js → chunk-5KUKIH4H.js} +1 -1
  9. package/Marketplace/{chunk-BVV5R6HN.js → chunk-5Z5Y537T.js} +1 -1
  10. package/Marketplace/{chunk-C7YK5TDP.js → chunk-63ANFYRV.js} +1 -1
  11. package/Marketplace/{chunk-DGIH7HSJ.js → chunk-7TI3OR34.js} +1 -1
  12. package/Marketplace/{chunk-74AYYW2T.js → chunk-7WY57PVD.js} +1 -1
  13. package/Marketplace/{chunk-OG4QM5FO.js → chunk-7Y7SPMGZ.js} +1 -1
  14. package/Marketplace/{chunk-6NZJ2XKE.js → chunk-AWNZSJSP.js} +1 -1
  15. package/Marketplace/{chunk-7QKEL4DD.js → chunk-B2ZWLW3F.js} +1 -1
  16. package/Marketplace/{chunk-CO5XZENC.js → chunk-CBQUB3KW.js} +1 -1
  17. package/Marketplace/{chunk-5X2M3HM4.js → chunk-CRD4OUSG.js} +1 -1
  18. package/Marketplace/{chunk-KEW73FTY.js → chunk-CT73GC7O.js} +1 -1
  19. package/Marketplace/chunk-D2TELRO7.js +1 -0
  20. package/Marketplace/{chunk-6YBD22SK.js → chunk-EFB55SZR.js} +1 -1
  21. package/Marketplace/{chunk-UQL42ODX.js → chunk-ELZBUFG5.js} +1 -1
  22. package/Marketplace/chunk-EUYQST7Q.js +1 -0
  23. package/Marketplace/{chunk-CAK6MZUW.js → chunk-EXSI44LD.js} +1 -1
  24. package/Marketplace/{chunk-PHLSX23M.js → chunk-F2XHUFJC.js} +2 -2
  25. package/Marketplace/{chunk-MACYDQHW.js → chunk-F3GLNINI.js} +1 -1
  26. package/Marketplace/{chunk-DRVWJPA2.js → chunk-FHNST4Y7.js} +1 -1
  27. package/Marketplace/{chunk-XHBBUUIF.js → chunk-FKQ7ZVGD.js} +1 -1
  28. package/Marketplace/{chunk-WREH3C74.js → chunk-FOT5AJYX.js} +2 -2
  29. package/Marketplace/{chunk-RUXJCVKX.js → chunk-GSVFDIM6.js} +1 -1
  30. package/Marketplace/{chunk-5ZR5WIHG.js → chunk-GZS2MOSK.js} +1 -1
  31. package/Marketplace/{chunk-WY37QAZ4.js → chunk-JAWWMIGP.js} +1 -1
  32. package/Marketplace/{chunk-VIXNFSMT.js → chunk-JUJFPAAU.js} +1 -1
  33. package/Marketplace/{chunk-WBCI5HV5.js → chunk-JZDOMET2.js} +1 -1
  34. package/Marketplace/chunk-KTB223SK.js +1 -0
  35. package/Marketplace/{chunk-IJVKHW3C.js → chunk-KWHVCPX2.js} +1 -1
  36. package/Marketplace/{chunk-FYB62QQV.js → chunk-LLHPMXKP.js} +1 -1
  37. package/Marketplace/{chunk-VQIT62HE.js → chunk-LS7AO6KP.js} +1 -1
  38. package/Marketplace/{chunk-LRBJ5RU5.js → chunk-LXXEN7OV.js} +1 -1
  39. package/Marketplace/{chunk-6RCPPNMX.js → chunk-MGLOTL2T.js} +1 -1
  40. package/Marketplace/{chunk-7IOOG3TG.js → chunk-MZWTCBAF.js} +4 -4
  41. package/Marketplace/{chunk-774TVUXT.js → chunk-NDBC2CS6.js} +1 -1
  42. package/Marketplace/{chunk-57MSCWQ4.js → chunk-NFGFM7TW.js} +1 -1
  43. package/Marketplace/{chunk-TKV7XWBT.js → chunk-O2YNPIYM.js} +1 -1
  44. package/Marketplace/{chunk-7TQWJCUW.js → chunk-OGJMVAEL.js} +1 -1
  45. package/Marketplace/{chunk-XANN3R5J.js → chunk-OO2CSDGF.js} +1 -1
  46. package/Marketplace/{chunk-OLVWSY6L.js → chunk-P2AADVEN.js} +1 -1
  47. package/Marketplace/{chunk-SXFLJBXI.js → chunk-P2IQLBGG.js} +1 -1
  48. package/Marketplace/{chunk-KUYNX5QT.js → chunk-PTNJ3YC5.js} +1 -1
  49. package/Marketplace/{chunk-4BWA3J6V.js → chunk-QREUIGWW.js} +1 -1
  50. package/Marketplace/{chunk-BPAZ4TES.js → chunk-RGY4FVTG.js} +1 -1
  51. package/Marketplace/{chunk-RU43F4UK.js → chunk-T27ABFCP.js} +1 -1
  52. package/Marketplace/{chunk-LS2KMKMD.js → chunk-TI67Q3JR.js} +1 -1
  53. package/Marketplace/{chunk-RNZC6DAM.js → chunk-TMKLT3K2.js} +1 -1
  54. package/Marketplace/{chunk-QUEDQBZU.js → chunk-TWOIWWMO.js} +1 -1
  55. package/Marketplace/{chunk-74WQHBVN.js → chunk-URGPZLCB.js} +1 -1
  56. package/Marketplace/{chunk-GVXBDVLX.js → chunk-USBIAIK6.js} +1 -1
  57. package/Marketplace/{chunk-AY25KXUA.js → chunk-UYFUJBC4.js} +1 -1
  58. package/Marketplace/{chunk-L74PANZ5.js → chunk-V3ZRQKJA.js} +1 -1
  59. package/Marketplace/{chunk-UQFILVPA.js → chunk-WGCIF2R4.js} +2 -2
  60. package/Marketplace/{chunk-7ES3PHES.js → chunk-X4B2FYY3.js} +1 -1
  61. package/Marketplace/{chunk-JX63Y4CW.js → chunk-X52QA4QU.js} +1 -1
  62. package/Marketplace/{chunk-5EDCBXCE.js → chunk-XLWWNO5M.js} +1 -1
  63. package/Marketplace/{chunk-2REDCSBO.js → chunk-XONEJSCE.js} +1 -1
  64. package/Marketplace/{chunk-R5WARQUS.js → chunk-Y4XF2TXJ.js} +1 -1
  65. package/Marketplace/{chunk-HZPILY4V.js → chunk-YEDXFYTD.js} +1 -1
  66. package/Marketplace/{chunk-LSWILW54.js → chunk-YF4XELSP.js} +1 -1
  67. package/Marketplace/{chunk-2WHJU6CS.js → chunk-YU2SDRUC.js} +1 -1
  68. package/Marketplace/{chunk-RT3SMV6M.js → chunk-ZYQD6SBV.js} +1 -1
  69. package/Marketplace/index.html +4 -4
  70. package/Marketplace/{main-KIV2XNXR.js → main-YKZPM7WW.js} +1 -1
  71. package/package.json +1 -1
  72. package/Marketplace/chunk-EMJTQYVO.js +0 -1
  73. package/Marketplace/chunk-OLANEXLB.js +0 -1
  74. package/Marketplace/chunk-RXQX7567.js +0 -1
@@ -1 +1 @@
1
- import{a as _}from"./chunk-67HPC5Y3.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import{a as R}from"./chunk-774TVUXT.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ue,b as ye}from"./chunk-WRJFUNM3.js";import"./chunk-JVNHFIYT.js";import"./chunk-ACIMXBIC.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{e as he}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as d}from"./chunk-RXQX7567.js";import{m as w,n as ge}from"./chunk-HJXYT6MI.js";import{A as fe}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as pe,H as de,J as ce,f as ae,g as F,j as le,k as P,m as me,n as se}from"./chunk-FXQKRJWU.js";import{$c as k,Gb as T,Gc as p,Hb as Z,Hc as j,Ic as J,Kc as y,Lc as g,Mb as h,Mc as C,Oa as V,Rc as re,Wc as oe,Yb as m,Z as Q,ac as $,ad as B,dc as H,ea as z,ec as ee,gc as te,hc as ie,ic as r,ja as q,jc as a,ka as X,kc as v,nc as ne,oa as Y,pb as G,rb as l,rd as U,tc as b,uc as u,xb as f,xc as K}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-order"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),a()()(),v(4,"router-outlet")),i&2&&(l(3),m("Tabs",t.reportTabs))},dependencies:[ue,pe],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]})}}return n})();var S=class{};var I=(()=>{class n{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(s=>{i(s)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}static{this.\u0275fac=function(i){return new(i||n)(Y(he))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var O=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(O||{});var De=()=>["/menu/log/order"],Ee=(n,c,e,i,t)=>({responseCode:n,From:c,to:e,actionType:i,ChannelID:t});function Oe(n,c){if(n&1&&(r(0,"th",6)(1,"div",7)(2,"h4"),p(3),a(),r(4,"small",8),p(5),a()()()),n&2){let e=c.$implicit,i=u();l(3),j(e),l(),$(i.getTextBgColor(e)),l(),j(i.getHeaderStatusDesc(e))}}function Re(n,c){if(n&1&&(r(0,"a",12),p(1),k(2,"number"),a()),n&2){let e=u().$implicit,i=u().$implicit,t=u();m("routerLink",re(5,De))("queryParams",oe(6,Ee,e.Key,t.fromQueryParam,t.toQueryParam,t.type,i.ChannelID)),l(),J(" ",B(2,3,e.Value)," ")}}function Le(n,c){n&1&&(r(0,"span",13),p(1,"-"),a())}function xe(n,c){if(n&1&&(r(0,"td",11),h(1,Re,3,12,"a",12)(2,Le,2,0,"span",13),a()),n&2){let e=c.$implicit;l(),H(e.Value?1:2)}}function Me(n,c){if(n&1&&(r(0,"tr")(1,"td")(2,"a",9),v(3,"img",10),a()(),r(4,"td")(5,"div")(6,"a",9),p(7),a()(),r(8,"div"),p(9),a()(),te(10,xe,3,1,"td",11,ee),a()),n&2){let e=c.$implicit,i=u();l(2),K("href",e.Url,G),l(),m("src",i.getChannelLogo(e.Type),G),l(3),K("href",e.Url,G),l(),j(e.Name),l(2),j(e.Url),l(),ie(e.list)}}function ke(n,c){if(n&1&&(r(0,"td",11)(1,"div",17),p(2),k(3,"number"),a()()),n&2){let e=c.$implicit;l(2),J(" ",B(3,1,e.total)," ")}}function Be(n,c){if(n&1&&(r(0,"tfoot")(1,"tr")(2,"td",14)(3,"div",15),p(4,"Total"),a()(),h(5,ke,4,3,"td",16),a()()),n&2){let e=u();l(5),m("ngForOf",e.logsCalculation())}}var D=(()=>{class n{constructor(){this.header=V(),this.result=V(),this.orderedHeader=U(()=>this.header().sort((e,i)=>e-i)),this.logsOrdered=U(()=>{let e=this.result();return e=e.map(i=>(this.orderedHeader().forEach(t=>{i.list.findIndex(o=>o.Key===t)===-1&&i.list.push({Key:t,Value:0}),i.list.sort((o,A)=>o.Key-A.Key)}),i)),e}),this.logsCalculation=U(()=>{let e=this.concatStatusCode(),i=[];return this.orderedHeader().forEach(t=>{let o=e.filter(A=>A.Key===t).reduce((A,we)=>A+we.Value,0);i.push({status:t,total:o})}),i}),this.type=null,this.headerStatus=O,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}getHeaderStatusDesc(e){let i=null;switch(e){case O.BAD_REQUEST:i="BAD REQUEST";break;case O.CONFLICT:i="CONFLICT";break;case O.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case O.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case O.OK:i="bg-success";break;case O.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return d.getChannelLogoByTypeId(e)}concatStatusCode(){return this.logsOrdered().map(e=>e.list).reduce((e,i)=>[...e,...i],[])}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-table-report"]],inputs:{header:[1,"header"],result:[1,"result"],from:"from",to:"to",type:"type"},standalone:!1,decls:10,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"h3","fw-bold","ms-1"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(r(0,"table",0)(1,"thead",1)(2,"tr"),v(3,"th",2),r(4,"th",3),p(5,"Channel"),a(),h(6,Oe,6,4,"th",4),a()(),r(7,"tbody"),h(8,Me,12,5,"tr",5),a(),h(9,Be,6,1,"tfoot"),a()),i&2&&(l(6),m("ngForOf",t.orderedHeader()),l(2),m("ngForOf",t.logsOrdered()),l(),H(t.logsCalculation().length>0?9:-1))},dependencies:[ae,de,me],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]})}}return n})();function Ne(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",0)}}var ve=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-sales-order"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ne,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function We(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Te=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,We,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ae(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",3)}}var _e=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S;let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-delivery"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div",1)(3,"label",2),p(4,"From/To"),a(),r(5,"div",3)(6,"datepicker",4),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",5),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",6),h(11,Ae,3,5,"div",7),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function je(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",4)}}var Se=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Completed";let t=new Date;this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-payment"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,je,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ge(n,c){n&1&&ne(0)}function Ue(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=c.ngIf,i=u();l(2),m("result",e.Body)("header",e.Header)("from",i.filter==null?null:i.filter.From)("to",i.filter==null?null:i.filter.To)}}var be=(()=>{class n{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new S}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=d.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(z(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(Q())}onFilter(){this.updatePageTitle(),this.initData()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-all"]],standalone:!1,decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ge,1,0,"ng-container",6),k(12,"async"),h(13,Ue,3,4,"div",7),k(14,"async"),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",B(12,6,t.pageLoader$)),l(2),m("ngIf",B(14,8,t.reportData$)))},dependencies:[F,w,_,D,le],encapsulation:2})}}return n})();function Ve(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Fe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-convert-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ve,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function He(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Pe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-void-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,He,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();var Ke=[{path:"",component:Ce,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",component:ve,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Fe,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:Te,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:_e,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:Se,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Pe,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:be,canActivate:[R],data:{title:"All Report"}}]}],Gt=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Z({type:n})}static{this.\u0275inj=X({imports:[se,ye,fe,ge,_,ce.forChild(Ke)]})}}return n})();export{Gt as OrderModule};
1
+ import{a as _}from"./chunk-67HPC5Y3.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import{a as R}from"./chunk-NDBC2CS6.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ue,b as ye}from"./chunk-WRJFUNM3.js";import"./chunk-JVNHFIYT.js";import"./chunk-ACIMXBIC.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{e as he}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as d}from"./chunk-EUYQST7Q.js";import{m as w,n as ge}from"./chunk-HJXYT6MI.js";import{A as fe}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as pe,H as de,J as ce,f as ae,g as F,j as le,k as P,m as me,n as se}from"./chunk-FXQKRJWU.js";import{$c as k,Gb as T,Gc as p,Hb as Z,Hc as j,Ic as J,Kc as y,Lc as g,Mb as h,Mc as C,Oa as V,Rc as re,Wc as oe,Yb as m,Z as Q,ac as $,ad as B,dc as H,ea as z,ec as ee,gc as te,hc as ie,ic as r,ja as q,jc as a,ka as X,kc as v,nc as ne,oa as Y,pb as G,rb as l,rd as U,tc as b,uc as u,xb as f,xc as K}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-order"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),a()()(),v(4,"router-outlet")),i&2&&(l(3),m("Tabs",t.reportTabs))},dependencies:[ue,pe],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]})}}return n})();var S=class{};var I=(()=>{class n{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(s=>{i(s)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}static{this.\u0275fac=function(i){return new(i||n)(Y(he))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var O=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(O||{});var De=()=>["/menu/log/order"],Ee=(n,c,e,i,t)=>({responseCode:n,From:c,to:e,actionType:i,ChannelID:t});function Oe(n,c){if(n&1&&(r(0,"th",6)(1,"div",7)(2,"h4"),p(3),a(),r(4,"small",8),p(5),a()()()),n&2){let e=c.$implicit,i=u();l(3),j(e),l(),$(i.getTextBgColor(e)),l(),j(i.getHeaderStatusDesc(e))}}function Re(n,c){if(n&1&&(r(0,"a",12),p(1),k(2,"number"),a()),n&2){let e=u().$implicit,i=u().$implicit,t=u();m("routerLink",re(5,De))("queryParams",oe(6,Ee,e.Key,t.fromQueryParam,t.toQueryParam,t.type,i.ChannelID)),l(),J(" ",B(2,3,e.Value)," ")}}function Le(n,c){n&1&&(r(0,"span",13),p(1,"-"),a())}function xe(n,c){if(n&1&&(r(0,"td",11),h(1,Re,3,12,"a",12)(2,Le,2,0,"span",13),a()),n&2){let e=c.$implicit;l(),H(e.Value?1:2)}}function Me(n,c){if(n&1&&(r(0,"tr")(1,"td")(2,"a",9),v(3,"img",10),a()(),r(4,"td")(5,"div")(6,"a",9),p(7),a()(),r(8,"div"),p(9),a()(),te(10,xe,3,1,"td",11,ee),a()),n&2){let e=c.$implicit,i=u();l(2),K("href",e.Url,G),l(),m("src",i.getChannelLogo(e.Type),G),l(3),K("href",e.Url,G),l(),j(e.Name),l(2),j(e.Url),l(),ie(e.list)}}function ke(n,c){if(n&1&&(r(0,"td",11)(1,"div",17),p(2),k(3,"number"),a()()),n&2){let e=c.$implicit;l(2),J(" ",B(3,1,e.total)," ")}}function Be(n,c){if(n&1&&(r(0,"tfoot")(1,"tr")(2,"td",14)(3,"div",15),p(4,"Total"),a()(),h(5,ke,4,3,"td",16),a()()),n&2){let e=u();l(5),m("ngForOf",e.logsCalculation())}}var D=(()=>{class n{constructor(){this.header=V(),this.result=V(),this.orderedHeader=U(()=>this.header().sort((e,i)=>e-i)),this.logsOrdered=U(()=>{let e=this.result();return e=e.map(i=>(this.orderedHeader().forEach(t=>{i.list.findIndex(o=>o.Key===t)===-1&&i.list.push({Key:t,Value:0}),i.list.sort((o,A)=>o.Key-A.Key)}),i)),e}),this.logsCalculation=U(()=>{let e=this.concatStatusCode(),i=[];return this.orderedHeader().forEach(t=>{let o=e.filter(A=>A.Key===t).reduce((A,we)=>A+we.Value,0);i.push({status:t,total:o})}),i}),this.type=null,this.headerStatus=O,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}getHeaderStatusDesc(e){let i=null;switch(e){case O.BAD_REQUEST:i="BAD REQUEST";break;case O.CONFLICT:i="CONFLICT";break;case O.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case O.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case O.OK:i="bg-success";break;case O.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return d.getChannelLogoByTypeId(e)}concatStatusCode(){return this.logsOrdered().map(e=>e.list).reduce((e,i)=>[...e,...i],[])}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-table-report"]],inputs:{header:[1,"header"],result:[1,"result"],from:"from",to:"to",type:"type"},standalone:!1,decls:10,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"h3","fw-bold","ms-1"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(r(0,"table",0)(1,"thead",1)(2,"tr"),v(3,"th",2),r(4,"th",3),p(5,"Channel"),a(),h(6,Oe,6,4,"th",4),a()(),r(7,"tbody"),h(8,Me,12,5,"tr",5),a(),h(9,Be,6,1,"tfoot"),a()),i&2&&(l(6),m("ngForOf",t.orderedHeader()),l(2),m("ngForOf",t.logsOrdered()),l(),H(t.logsCalculation().length>0?9:-1))},dependencies:[ae,de,me],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]})}}return n})();function Ne(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",0)}}var ve=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-sales-order"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ne,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function We(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Te=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,We,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ae(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",3)}}var _e=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S;let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-delivery"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div",1)(3,"label",2),p(4,"From/To"),a(),r(5,"div",3)(6,"datepicker",4),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",5),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",6),h(11,Ae,3,5,"div",7),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function je(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",4)}}var Se=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Completed";let t=new Date;this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-payment"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,je,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ge(n,c){n&1&&ne(0)}function Ue(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=c.ngIf,i=u();l(2),m("result",e.Body)("header",e.Header)("from",i.filter==null?null:i.filter.From)("to",i.filter==null?null:i.filter.To)}}var be=(()=>{class n{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new S}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=d.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(z(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(Q())}onFilter(){this.updatePageTitle(),this.initData()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-all"]],standalone:!1,decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ge,1,0,"ng-container",6),k(12,"async"),h(13,Ue,3,4,"div",7),k(14,"async"),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",B(12,6,t.pageLoader$)),l(2),m("ngIf",B(14,8,t.reportData$)))},dependencies:[F,w,_,D,le],encapsulation:2})}}return n})();function Ve(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Fe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-convert-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ve,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function He(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Pe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-void-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,He,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();var Ke=[{path:"",component:Ce,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",component:ve,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Fe,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:Te,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:_e,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:Se,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Pe,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:be,canActivate:[R],data:{title:"All Report"}}]}],Gt=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Z({type:n})}static{this.\u0275inj=X({imports:[se,ye,fe,ge,_,ce.forChild(Ke)]})}}return n})();export{Gt as OrderModule};
@@ -1 +1 @@
1
- import{c as ht}from"./chunk-KSHWHTCH.js";import"./chunk-HVCIQI7B.js";import"./chunk-EHUVS2VB.js";import{b as ut}from"./chunk-YTCIQBSO.js";import"./chunk-W3JTS22H.js";import"./chunk-6OMSPZZC.js";import{a as Z}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{a as st,b as at,d as lt,e as ct}from"./chunk-PYXL7UF7.js";import{i as rt}from"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as et,e as it}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{b as h,c as tt}from"./chunk-RXQX7567.js";import{m as dt,n as gt}from"./chunk-HJXYT6MI.js";import{A as Y,h as Q,m as X}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as nt,c as ot}from"./chunk-ERXVXBTU.js";import{r as mt,s as pt}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{J as y,f as J,g as G,j as q,n as L}from"./chunk-FXQKRJWU.js";import{$c as C,Fc as P,Gb as V,Gc as a,Hb as S,Hc as u,Ic as W,Kc as w,Lc as D,Mb as g,Mc as R,Nc as $,Oc as A,Pc as H,Sc as z,Yb as l,Z as M,aa as F,ad as x,cd as U,ea as k,ic as o,jc as r,ka as f,kc as j,lc as T,mc as N,oc as O,pb as K,q as B,rb as s,tc as I,uc as c,v,xb as _,ya as b,za as E}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ct=e=>[e];function xt(e,m){if(e&1&&(o(0,"span",15),j(1,"img",16),r(),o(2,"span"),a(3),r()),e&2){let t=m.item;s(),l("src",t.Img,K)("alt",t.Name),s(2),W(" ",t.Name," ")}}function Lt(e,m){if(e&1){let t=O();T(0),$(1),C(2,"async"),o(3,"a",17),I("click",function(){b(t);let n=H(1),p=c();return E(p.submitLogistics(n))}),a(4,"Submit"),r(),N()}if(e&2){let t=c();s(),A(x(2,0,t.logisticServices$))}}function yt(e,m){}function vt(e,m){if(e&1){let t=O();o(0,"ng-select",20),R("ngModelChange",function(n){b(t);let p=c(2).$implicit;return D(p.ProductSKU,n)||(p.ProductSKU=n),E(n)}),r()}if(e&2){let t=c().ngIf,i=c().$implicit;w("ngModel",i.ProductSKU),l("items",t)}}function Mt(e,m){if(e&1&&(o(0,"span"),a(1),r()),e&2){let t=c(2).$implicit;s(),u(t.ProductSKU||"-")}}function bt(e,m){if(e&1&&(T(0),g(1,yt,0,0,"ng-template",19)(2,vt,1,2,"ng-template",null,0,U)(4,Mt,2,1,"ng-template",null,1,U),N()),e&2){let t=P(3),i=P(5),n=c(2);s(),l("ngxPermissionsOnly",z(3,Ct,n.logisticEditRole))("ngxPermissionsOnlyThen",t)("ngxPermissionsOnlyElse",i)}}function Et(e,m){if(e&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td"),a(4),r(),o(5,"td"),a(6),r(),o(7,"td"),g(8,bt,6,5,"ng-container",18),C(9,"async"),r()()),e&2){let t=m.$implicit,i=c();s(2),u(t.Name),s(2),u(t.Service),s(2),u(t.TypeString),s(2),l("ngIf",x(9,4,i.logisticOptions$))}}var _t=(()=>{class e{constructor(t,i,n){this.http=t,this.toastr=i,this.authService=n,this.filter={ChannelID:""},this.logisticEditRole=Z.LogisticUpdate,this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let t=[h.WooCommerce,h.Lazada,h.Shopify,h.Plugo,h.Tokopedia];this.channelOptions=this.channelOptions.map(i=>(t.forEach(n=>{i.TypeID===n&&(i.disabled=!0)}),i))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(t=>{this.filter=t.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(M(1))}submitLogistics(t){this.clonedLogisticServices$.pipe(v(i=>t.map(n=>(i.findIndex(d=>d.Name===n.Name&&d.ProductSKU==n.ProductSKU)==-1&&(n.IsChange=!0),n))),F(i=>this.http.post("/api/Logistic/Submit",i))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(v(t=>t.map(i=>(i.ProductSKU=tt.IsEmpty(i.ProductSKU)?null:i.ProductSKU,i))),k(t=>{let i=JSON.parse(JSON.stringify(t));this.clonedLogisticServices$=B(i)}),M(1))}iniTitle(){let t=this.channelOptions.find(i=>i.ID==this.filter.ChannelID);this.channelName=t?t.Name:null}static{this.\u0275fac=function(i){return new(i||e)(_(it),_(et),_(rt))}}static{this.\u0275cmp=V({type:e,selectors:[["app-logistic"]],standalone:!1,decls:28,vars:9,consts:[["thenBlock",""],["elseBlock",""],["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngxPermissionsOnly"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[4,"ngIf"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(i,n){i&1&&(o(0,"mainpanel",2),I("onSubmit",function(){return n.getLogisticService()}),o(1,"filters")(2,"div")(3,"label",3),a(4,"Select a Channel"),r(),o(5,"ng-select",4),R("ngModelChange",function(d){return D(n.filter.ChannelID,d)||(n.filter.ChannelID=d),d}),g(6,xt,4,3,"ng-template",5),r()()(),o(7,"actions"),g(8,Lt,5,3,"ng-container",6),r(),o(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"table",11)(15,"thead",12)(16,"tr",13)(17,"th"),a(18,"Logistic"),r(),o(19,"th"),a(20,"Service"),r(),o(21,"th"),a(22,"Type"),r(),o(23,"th"),a(24,"Logistic Service"),r()()(),o(25,"tbody"),g(26,Et,10,6,"tr",14),C(27,"async"),r()()()()()()()()),i&2&&(l("headerTitle","Logistic Courier - "+n.channelName)("hideSearchDropdown",!1),s(5),l("clearable",!1)("items",n.channelOptions),w("ngModel",n.filter.ChannelID),s(3),l("ngxPermissionsOnly",n.logisticEditRole),s(18),l("ngForOf",x(27,7,n.logisticServices$)))},dependencies:[J,G,Q,X,dt,lt,st,at,mt,nt,q],encapsulation:2})}}return e})();var Tt=[{path:"",component:_t}],St=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y.forChild(Tt)]})}}return e})();var oe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y,St,Y,gt,ct,ut,ht,pt,ot]})}}return e})();export{oe as LogisticModule};
1
+ import{c as ht}from"./chunk-KSHWHTCH.js";import"./chunk-HVCIQI7B.js";import"./chunk-EHUVS2VB.js";import{b as ut}from"./chunk-YTCIQBSO.js";import"./chunk-W3JTS22H.js";import"./chunk-6OMSPZZC.js";import{a as Z}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{a as st,b as at,d as lt,e as ct}from"./chunk-PYXL7UF7.js";import{i as rt}from"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as et,e as it}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{b as h,c as tt}from"./chunk-EUYQST7Q.js";import{m as dt,n as gt}from"./chunk-HJXYT6MI.js";import{A as Y,h as Q,m as X}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as nt,c as ot}from"./chunk-ERXVXBTU.js";import{r as mt,s as pt}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{J as y,f as J,g as G,j as q,n as L}from"./chunk-FXQKRJWU.js";import{$c as C,Fc as P,Gb as V,Gc as a,Hb as S,Hc as u,Ic as W,Kc as w,Lc as D,Mb as g,Mc as R,Nc as $,Oc as A,Pc as H,Sc as z,Yb as l,Z as M,aa as F,ad as x,cd as U,ea as k,ic as o,jc as r,ka as f,kc as j,lc as T,mc as N,oc as O,pb as K,q as B,rb as s,tc as I,uc as c,v,xb as _,ya as b,za as E}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ct=e=>[e];function xt(e,m){if(e&1&&(o(0,"span",15),j(1,"img",16),r(),o(2,"span"),a(3),r()),e&2){let t=m.item;s(),l("src",t.Img,K)("alt",t.Name),s(2),W(" ",t.Name," ")}}function Lt(e,m){if(e&1){let t=O();T(0),$(1),C(2,"async"),o(3,"a",17),I("click",function(){b(t);let n=H(1),p=c();return E(p.submitLogistics(n))}),a(4,"Submit"),r(),N()}if(e&2){let t=c();s(),A(x(2,0,t.logisticServices$))}}function yt(e,m){}function vt(e,m){if(e&1){let t=O();o(0,"ng-select",20),R("ngModelChange",function(n){b(t);let p=c(2).$implicit;return D(p.ProductSKU,n)||(p.ProductSKU=n),E(n)}),r()}if(e&2){let t=c().ngIf,i=c().$implicit;w("ngModel",i.ProductSKU),l("items",t)}}function Mt(e,m){if(e&1&&(o(0,"span"),a(1),r()),e&2){let t=c(2).$implicit;s(),u(t.ProductSKU||"-")}}function bt(e,m){if(e&1&&(T(0),g(1,yt,0,0,"ng-template",19)(2,vt,1,2,"ng-template",null,0,U)(4,Mt,2,1,"ng-template",null,1,U),N()),e&2){let t=P(3),i=P(5),n=c(2);s(),l("ngxPermissionsOnly",z(3,Ct,n.logisticEditRole))("ngxPermissionsOnlyThen",t)("ngxPermissionsOnlyElse",i)}}function Et(e,m){if(e&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td"),a(4),r(),o(5,"td"),a(6),r(),o(7,"td"),g(8,bt,6,5,"ng-container",18),C(9,"async"),r()()),e&2){let t=m.$implicit,i=c();s(2),u(t.Name),s(2),u(t.Service),s(2),u(t.TypeString),s(2),l("ngIf",x(9,4,i.logisticOptions$))}}var _t=(()=>{class e{constructor(t,i,n){this.http=t,this.toastr=i,this.authService=n,this.filter={ChannelID:""},this.logisticEditRole=Z.LogisticUpdate,this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let t=[h.WooCommerce,h.Lazada,h.Shopify,h.Plugo,h.Tokopedia];this.channelOptions=this.channelOptions.map(i=>(t.forEach(n=>{i.TypeID===n&&(i.disabled=!0)}),i))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(t=>{this.filter=t.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(M(1))}submitLogistics(t){this.clonedLogisticServices$.pipe(v(i=>t.map(n=>(i.findIndex(d=>d.Name===n.Name&&d.ProductSKU==n.ProductSKU)==-1&&(n.IsChange=!0),n))),F(i=>this.http.post("/api/Logistic/Submit",i))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(v(t=>t.map(i=>(i.ProductSKU=tt.IsEmpty(i.ProductSKU)?null:i.ProductSKU,i))),k(t=>{let i=JSON.parse(JSON.stringify(t));this.clonedLogisticServices$=B(i)}),M(1))}iniTitle(){let t=this.channelOptions.find(i=>i.ID==this.filter.ChannelID);this.channelName=t?t.Name:null}static{this.\u0275fac=function(i){return new(i||e)(_(it),_(et),_(rt))}}static{this.\u0275cmp=V({type:e,selectors:[["app-logistic"]],standalone:!1,decls:28,vars:9,consts:[["thenBlock",""],["elseBlock",""],["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngxPermissionsOnly"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[4,"ngIf"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(i,n){i&1&&(o(0,"mainpanel",2),I("onSubmit",function(){return n.getLogisticService()}),o(1,"filters")(2,"div")(3,"label",3),a(4,"Select a Channel"),r(),o(5,"ng-select",4),R("ngModelChange",function(d){return D(n.filter.ChannelID,d)||(n.filter.ChannelID=d),d}),g(6,xt,4,3,"ng-template",5),r()()(),o(7,"actions"),g(8,Lt,5,3,"ng-container",6),r(),o(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"table",11)(15,"thead",12)(16,"tr",13)(17,"th"),a(18,"Logistic"),r(),o(19,"th"),a(20,"Service"),r(),o(21,"th"),a(22,"Type"),r(),o(23,"th"),a(24,"Logistic Service"),r()()(),o(25,"tbody"),g(26,Et,10,6,"tr",14),C(27,"async"),r()()()()()()()()),i&2&&(l("headerTitle","Logistic Courier - "+n.channelName)("hideSearchDropdown",!1),s(5),l("clearable",!1)("items",n.channelOptions),w("ngModel",n.filter.ChannelID),s(3),l("ngxPermissionsOnly",n.logisticEditRole),s(18),l("ngForOf",x(27,7,n.logisticServices$)))},dependencies:[J,G,Q,X,dt,lt,st,at,mt,nt,q],encapsulation:2})}}return e})();var Tt=[{path:"",component:_t}],St=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y.forChild(Tt)]})}}return e})();var oe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y,St,Y,gt,ct,ut,ht,pt,ot]})}}return e})();export{oe as LogisticModule};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-774TVUXT.js";import{a as C}from"./chunk-IITU3NV6.js";import{a as h,b as y}from"./chunk-WRJFUNM3.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-RXQX7567.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as v,J as o,n}from"./chunk-FXQKRJWU.js";import{Gb as l,Hb as s,Qc as f,Yb as u,ic as c,jc as d,ka as m,kc as i,rb as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-inventory"]],features:[f([C])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,b){t&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(p(3),u("Tabs",b.inventoryTabs))},dependencies:[n,y,h,o,v],encapsulation:2})}}return e})();var g=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-5X2M3HM4.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-AY25KXUA.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-RT3SMV6M.js").then(e=>e.ChannelSummaryComponent)},canActivate:[r],data:{title:"Different Inventory"}}]}],E=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=m({imports:[n,o.forChild(g)]})}}return e})();export{E as InventoryRoutingModule};
1
+ import{a as r}from"./chunk-NDBC2CS6.js";import{a as C}from"./chunk-IITU3NV6.js";import{a as h,b as y}from"./chunk-WRJFUNM3.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as v,J as o,n}from"./chunk-FXQKRJWU.js";import{Gb as l,Hb as s,Qc as f,Yb as u,ic as c,jc as d,ka as m,kc as i,rb as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-inventory"]],features:[f([C])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,b){t&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(p(3),u("Tabs",b.inventoryTabs))},dependencies:[n,y,h,o,v],encapsulation:2})}}return e})();var g=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-CRD4OUSG.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-UYFUJBC4.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-ZYQD6SBV.js").then(e=>e.ChannelSummaryComponent)},canActivate:[r],data:{title:"Different Inventory"}}]}],E=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=m({imports:[n,o.forChild(g)]})}}return e})();export{E as InventoryRoutingModule};
@@ -1 +1 @@
1
- import{a as Q}from"./chunk-CO5XZENC.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import{a as J}from"./chunk-C7YK5TDP.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import{a as z}from"./chunk-GHFADTRR.js";import{a as q}from"./chunk-LDL3A7NM.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as y}from"./chunk-CGOB6Y3X.js";import{e as H}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-RXQX7567.js";import{m as Z,n as j}from"./chunk-HJXYT6MI.js";import{A as G,h as W,m as $}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as N,J as O,j as A,m as R,n as F}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as b,Gc as a,Hc as g,Kc as K,Lc as P,Mb as k,Mc as T,Nc as B,Ra as D,Yb as s,Z as V,ad as v,dc as U,ec as I,gc as E,hc as L,ic as e,jc as t,kc as c,oc as x,pa as C,pb as M,rb as l,tc as _,uc as S,ya as m,za as u}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function X(o,h){if(o&1){let i=x();e(0,"img",21),_("click",function(r){m(i);let n=S().$implicit,d=S();return u(d.onZoomImage(r,n==null?null:n.ImageUrl))}),t()}if(o&2){let i=S().$implicit;s("src",i==null?null:i.ThumbnailUrl,M)}}function Y(o,h){o&1&&c(0,"img",17)}function ee(o,h){if(o&1&&(e(0,"tr")(1,"td")(2,"div",15),k(3,X,1,1,"img",16)(4,Y,1,0,"img",17),t()(),e(5,"td"),a(6),t(),e(7,"td"),a(8),t(),e(9,"td")(10,"div",18),c(11,"app-channel-logo",19),e(12,"span"),a(13),t()()(),e(14,"td",20),a(15),w(16,"number"),t()()),o&2){let i=h.$implicit;l(3),U(i.ImageUrl?3:4),l(3),g(i.Name),l(2),g(i.SKU),l(3),s("typeId",i.TypeID),l(2),g(i.ChannelName),l(2),g(v(16,6,i.Count))}}var xe=(()=>{class o{constructor(){this.httpService=C(H),this.biggerPictureService=C(J),this.filter=D({PageNumber:1,RowCount:20,ListChannelID:[]}),this.rowCountApi=y.GetMultilistingSKUCount,this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(y.GetMultiListingSKU,this.filter()).pipe(V(1))}onZoomImage(i,p){this.biggerPictureService.openBiggerPicture(i,p)}static{this.\u0275fac=function(p){return new(p||o)}}static{this.\u0275cmp=b({type:o,selectors:[["app-duplicate-sku-v2"]],decls:33,vars:8,consts:[["headerTitle","Duplicate SKU","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/duplicate-sku",1,"d-flex","align-items-center","gap-2","btn","btn-outline-secondary","btn-lg"],[1,"fa-solid","fa-credit-card"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[2,"width","200px"],[2,"width","250px"],[1,"text-end",2,"width","50px"],[3,"next","previous","filter","totaldata","rowCountApi"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"d-flex","align-items-center"],[3,"typeId"],[1,"text-end"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"]],template:function(p,r){if(p&1){let n=x();B(0),w(1,"async"),e(2,"mainpanel",0),_("onSubmit",function(){return m(n),u(r.initMultipleListingSKU())}),e(3,"actions")(4,"a",1),c(5,"i",2),e(6,"span"),a(7,"Card View"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),T("ngModelChange",function(f){return m(n),P(r.filter().ListChannelID,f)||(r.filter().ListChannelID=f),u(f)}),t()()(),e(13,"content")(14,"div",5)(15,"div",6)(16,"div",7)(17,"table",8)(18,"thead",9)(19,"tr"),c(20,"th",10),e(21,"th"),a(22,"Product"),t(),e(23,"th",11),a(24,"SKU"),t(),e(25,"th",12),a(26,"Channel"),t(),e(27,"th",13),a(28,"Count"),t()()(),e(29,"tbody"),E(30,ee,17,8,"tr",null,I),t()(),e(32,"app-custom-paginator",14),_("next",function(){return m(n),u(r.initMultipleListingSKU())})("previous",function(){return m(n),u(r.initMultipleListingSKU())}),t()()()()()()}if(p&2){let n=v(1,6,r.multipleListingSKU$);l(2),s("hideSearchBox",!0),l(10),s("multiple",!0),K("ngModel",r.filter().ListChannelID),l(18),L(n==null?null:n.Data),l(2),s("filter",r.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("rowCountApi",r.rowCountApi)}},dependencies:[F,A,R,j,Z,q,O,N,z,Q,G,W,$],encapsulation:2})}}return o})();export{xe as DuplicateSkuV2Component};
1
+ import{a as Q}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import{a as J}from"./chunk-63ANFYRV.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import{a as z}from"./chunk-5EIQGYTB.js";import{a as q}from"./chunk-LDL3A7NM.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as y}from"./chunk-CGOB6Y3X.js";import{e as H}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import{m as Z,n as j}from"./chunk-HJXYT6MI.js";import{A as G,h as W,m as $}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as N,J as O,j as A,m as R,n as F}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as b,Gc as a,Hc as g,Kc as K,Lc as P,Mb as k,Mc as T,Nc as B,Ra as D,Yb as s,Z as V,ad as v,dc as U,ec as I,gc as E,hc as L,ic as e,jc as t,kc as c,oc as x,pa as C,pb as M,rb as l,tc as _,uc as S,ya as m,za as u}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function X(o,h){if(o&1){let i=x();e(0,"img",21),_("click",function(r){m(i);let n=S().$implicit,d=S();return u(d.onZoomImage(r,n==null?null:n.ImageUrl))}),t()}if(o&2){let i=S().$implicit;s("src",i==null?null:i.ThumbnailUrl,M)}}function Y(o,h){o&1&&c(0,"img",17)}function ee(o,h){if(o&1&&(e(0,"tr")(1,"td")(2,"div",15),k(3,X,1,1,"img",16)(4,Y,1,0,"img",17),t()(),e(5,"td"),a(6),t(),e(7,"td"),a(8),t(),e(9,"td")(10,"div",18),c(11,"app-channel-logo",19),e(12,"span"),a(13),t()()(),e(14,"td",20),a(15),w(16,"number"),t()()),o&2){let i=h.$implicit;l(3),U(i.ImageUrl?3:4),l(3),g(i.Name),l(2),g(i.SKU),l(3),s("typeId",i.TypeID),l(2),g(i.ChannelName),l(2),g(v(16,6,i.Count))}}var xe=(()=>{class o{constructor(){this.httpService=C(H),this.biggerPictureService=C(J),this.filter=D({PageNumber:1,RowCount:20,ListChannelID:[]}),this.rowCountApi=y.GetMultilistingSKUCount,this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(y.GetMultiListingSKU,this.filter()).pipe(V(1))}onZoomImage(i,p){this.biggerPictureService.openBiggerPicture(i,p)}static{this.\u0275fac=function(p){return new(p||o)}}static{this.\u0275cmp=b({type:o,selectors:[["app-duplicate-sku-v2"]],decls:33,vars:8,consts:[["headerTitle","Duplicate SKU","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/duplicate-sku",1,"d-flex","align-items-center","gap-2","btn","btn-outline-secondary","btn-lg"],[1,"fa-solid","fa-credit-card"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[2,"width","200px"],[2,"width","250px"],[1,"text-end",2,"width","50px"],[3,"next","previous","filter","totaldata","rowCountApi"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"d-flex","align-items-center"],[3,"typeId"],[1,"text-end"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"]],template:function(p,r){if(p&1){let n=x();B(0),w(1,"async"),e(2,"mainpanel",0),_("onSubmit",function(){return m(n),u(r.initMultipleListingSKU())}),e(3,"actions")(4,"a",1),c(5,"i",2),e(6,"span"),a(7,"Card View"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),T("ngModelChange",function(f){return m(n),P(r.filter().ListChannelID,f)||(r.filter().ListChannelID=f),u(f)}),t()()(),e(13,"content")(14,"div",5)(15,"div",6)(16,"div",7)(17,"table",8)(18,"thead",9)(19,"tr"),c(20,"th",10),e(21,"th"),a(22,"Product"),t(),e(23,"th",11),a(24,"SKU"),t(),e(25,"th",12),a(26,"Channel"),t(),e(27,"th",13),a(28,"Count"),t()()(),e(29,"tbody"),E(30,ee,17,8,"tr",null,I),t()(),e(32,"app-custom-paginator",14),_("next",function(){return m(n),u(r.initMultipleListingSKU())})("previous",function(){return m(n),u(r.initMultipleListingSKU())}),t()()()()()()}if(p&2){let n=v(1,6,r.multipleListingSKU$);l(2),s("hideSearchBox",!0),l(10),s("multiple",!0),K("ngModel",r.filter().ListChannelID),l(18),L(n==null?null:n.Data),l(2),s("filter",r.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("rowCountApi",r.rowCountApi)}},dependencies:[F,A,R,j,Z,q,O,N,z,Q,G,W,$],encapsulation:2})}}return o})();export{xe as DuplicateSkuV2Component};
@@ -1 +1 @@
1
- import{a as z,b as B}from"./chunk-FGRPTNDB.js";import{a as W,b as A,c as U}from"./chunk-3PPLPXAX.js";import{b as j}from"./chunk-OXWPLJEW.js";import{na as P}from"./chunk-RC5PUUVM.js";import{i as I}from"./chunk-OLVWSY6L.js";import{A as E,a as k,h as D,m as N}from"./chunk-5PS6ZS3N.js";import{n as F}from"./chunk-FXQKRJWU.js";import{Gb as T,Gc as x,Hc as S,Kb as v,Kc as w,Lc as V,Mb as h,Mc as y,Oa as m,Qc as L,Ra as b,Yb as s,dc as O,ic as p,jc as C,kc as g,oc as f,pa as M,pb as _,rb as d,tc as u,uc as l,ya as a,za as r}from"./chunk-OJMQBH6T.js";function G(t,c){if(t&1&&(p(0,"div",6),g(1,"img",7),p(2,"div"),x(3),C()()),t&2){let e=c.$implicit;d(),s("src",e.logo,_),d(2),S(e.Name)}}function R(t,c){if(t&1){let e=f();p(0,"p-multiselect",4,0),u("click",function(){a(e);let n=l();return r(n.onClickSelect())}),y("ngModelChange",function(n){a(e);let o=l();return V(o.selectedChannels,n)||(o.selectedChannels=n),r(n)}),u("ngModelChange",function(n){a(e);let o=l();return r(o.onChannelChange(n))}),h(2,G,4,2,"ng-template",5),C()}if(t&2){let e=l();s("options",e.options())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),s("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())}}function q(t,c){if(t&1&&(p(0,"div",6),g(1,"img",7),p(2,"div"),x(3),C()()),t&2){let e=c.$implicit;d(),s("src",e.logo,_),d(2),S(e.Name)}}function H(t,c){if(t&1){let e=f();p(0,"p-select",8,1),u("click",function(){a(e);let n=l();return r(n.onClickSelect())}),y("ngModelChange",function(n){a(e);let o=l();return V(o.selectedChannels,n)||(o.selectedChannels=n),r(n)}),u("ngModelChange",function(n){a(e);let o=l();return r(o.onChannelChange(n))}),h(2,q,4,2,"ng-template",5),C()}if(t&2){let e=l();s("options",e.options())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),s("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var re=(()=>{class t extends U{constructor(){super(),this.authService=M(I),this.multiple=m(!1),this.clearable=m(!0),this.placeholder=m("Select Channels"),this.options=b(this.authService.getChannels()),this.maxSelectedLabels=m(6),this.onChange=e=>{}}onChannelChange(e){this.onChange(e)}onClickSelect(){this.initTopPosition(),setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],maxSelectedLabels:[1,"maxSelectedLabels"]},features:[L([{provide:k,multi:!0,useExisting:t}]),v],decls:2,vars:1,consts:[["multiSelect",""],["select",""],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["pTemplate","item"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"]],template:function(i,n){i&1&&h(0,R,3,6,"p-multiselect",2)(1,H,3,6,"p-select",3),i&2&&O(n.multiple()?0:1)},dependencies:[F,B,z,P,j,E,D,N,A,W],encapsulation:2})}}return t})();export{re as a};
1
+ import{a as z,b as B}from"./chunk-FGRPTNDB.js";import{a as W,b as A,c as U}from"./chunk-3PPLPXAX.js";import{b as j}from"./chunk-OXWPLJEW.js";import{na as P}from"./chunk-RC5PUUVM.js";import{i as I}from"./chunk-P2AADVEN.js";import{A as E,a as k,h as D,m as N}from"./chunk-5PS6ZS3N.js";import{n as F}from"./chunk-FXQKRJWU.js";import{Gb as T,Gc as x,Hc as S,Kb as v,Kc as w,Lc as V,Mb as h,Mc as y,Oa as m,Qc as L,Ra as b,Yb as s,dc as O,ic as p,jc as C,kc as g,oc as f,pa as M,pb as _,rb as d,tc as u,uc as l,ya as a,za as r}from"./chunk-OJMQBH6T.js";function G(t,c){if(t&1&&(p(0,"div",6),g(1,"img",7),p(2,"div"),x(3),C()()),t&2){let e=c.$implicit;d(),s("src",e.logo,_),d(2),S(e.Name)}}function R(t,c){if(t&1){let e=f();p(0,"p-multiselect",4,0),u("click",function(){a(e);let n=l();return r(n.onClickSelect())}),y("ngModelChange",function(n){a(e);let o=l();return V(o.selectedChannels,n)||(o.selectedChannels=n),r(n)}),u("ngModelChange",function(n){a(e);let o=l();return r(o.onChannelChange(n))}),h(2,G,4,2,"ng-template",5),C()}if(t&2){let e=l();s("options",e.options())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),s("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())}}function q(t,c){if(t&1&&(p(0,"div",6),g(1,"img",7),p(2,"div"),x(3),C()()),t&2){let e=c.$implicit;d(),s("src",e.logo,_),d(2),S(e.Name)}}function H(t,c){if(t&1){let e=f();p(0,"p-select",8,1),u("click",function(){a(e);let n=l();return r(n.onClickSelect())}),y("ngModelChange",function(n){a(e);let o=l();return V(o.selectedChannels,n)||(o.selectedChannels=n),r(n)}),u("ngModelChange",function(n){a(e);let o=l();return r(o.onChannelChange(n))}),h(2,q,4,2,"ng-template",5),C()}if(t&2){let e=l();s("options",e.options())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),s("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var re=(()=>{class t extends U{constructor(){super(),this.authService=M(I),this.multiple=m(!1),this.clearable=m(!0),this.placeholder=m("Select Channels"),this.options=b(this.authService.getChannels()),this.maxSelectedLabels=m(6),this.onChange=e=>{}}onChannelChange(e){this.onChange(e)}onClickSelect(){this.initTopPosition(),setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],maxSelectedLabels:[1,"maxSelectedLabels"]},features:[L([{provide:k,multi:!0,useExisting:t}]),v],decls:2,vars:1,consts:[["multiSelect",""],["select",""],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["pTemplate","item"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"]],template:function(i,n){i&1&&h(0,R,3,6,"p-multiselect",2)(1,H,3,6,"p-select",3),i&2&&O(n.multiple()?0:1)},dependencies:[F,B,z,P,j,E,D,N,A,W],encapsulation:2})}}return t})();export{re as a};
@@ -1 +1 @@
1
- import{a as ge}from"./chunk-LEM7ESKJ.js";import"./chunk-IITU3NV6.js";import{a as de}from"./chunk-VEYUDPOA.js";import{a as me}from"./chunk-RGAWEFPQ.js";import{a as w}from"./chunk-XHAXYWZ7.js";import{c as ue,d as O,e as V}from"./chunk-TKV7XWBT.js";import"./chunk-YTCIQBSO.js";import"./chunk-PGP3WHIS.js";import"./chunk-VFATXJRG.js";import"./chunk-LYPHZP72.js";import"./chunk-RHHHL4OR.js";import{a as he}from"./chunk-7ES3PHES.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ne}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-C7YK5TDP.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-5ZR5WIHG.js";import"./chunk-ACIMXBIC.js";import{i as M}from"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as R}from"./chunk-CGOB6Y3X.js";import{b as ie,e as ae}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as f}from"./chunk-RXQX7567.js";import{d as le,l as se,m as ce,n as pe}from"./chunk-HJXYT6MI.js";import{A as te,c as X,h as Y,m as Z,o as ee}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as oe,c as re}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{g as Q,j as K,n as q}from"./chunk-FXQKRJWU.js";import{$c as I,G as j,Gb as G,Gc as S,Kc as E,Lc as x,Mb as g,Mc as T,Qc as $,Ra as P,Sc as J,Yb as h,ad as v,ea as A,ic as l,ja as H,jc as p,kc as W,lc as F,mc as N,nc as z,oc as L,pa as u,rb as c,tc as C,uc as m,xb as d,ya as y,za as b}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as k,b as B}from"./chunk-66YHNWRR.js";var U=(()=>{class r{constructor(){this.authService=u(M),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(e,i){let t=Object.assign([],this.channelOptions),n=[],a;return e.forEach(o=>{a=t.find(s=>s.ID==o?.parent?.id),a&&(a=B(k({},a),{Name:`${o?.parent?.label} - ${o?.label}`,LocationID:o?.id}),n.push(a))}),i.forEach(o=>{a=t.find(s=>s.ID==o.id),a&&n.push(a)}),n}generateFilterLocation(e,i){let t=[],n=[],a=[];return e.length>0?(t=e.map(o=>o.id),n=e.filter(o=>f.IsNotEmpty(o?.parent?.id)).map(o=>o?.parent?.id).filter((o,s,D)=>D.indexOf(o)===s)):(t=[],n=[]),a=i.map(o=>o.id),a=a.concat(n).filter((o,s,D)=>D.indexOf(o)===s),{locationIds:t,channelIds:a}}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=H({token:r,factory:r.\u0275fac})}}return r})();var fe=r=>[r];function _e(r,_){if(r&1){let e=L();l(0,"button",16),C("click",function(){y(e);let t=m(2).ngIf,n=m();return b(n.onUpdateItems(t))}),W(1,"i",17),S(2," Update "),p()}}function Se(r,_){if(r&1&&(F(0),g(1,_e,3,0,"button",15),N()),r&2){let e=m().ngIf,i=m();c(),h("ngIf",i.productService.hasSelectionVariant(e))}}function Ie(r,_){if(r&1&&(l(0,"actions")(1,"div",13),g(2,Se,2,1,"ng-container",14),p()()),r&2){let e=m();c(2),h("ngxPermissionsOnly",J(1,fe,e.inventoryUpdateRole))}}function ve(r,_){r&1&&z(0)}function ye(r,_){if(r&1){let e=L();F(0),l(1,"app-table",18),C("onToggle",function(t){y(e);let n=m();return b(n.onShowDifferenceStock(t))})("onSubmit",function(t){y(e);let n=m();return b(n.updateStockByVariant(t))}),p(),N()}if(r&2){let e=_.ngIf,i=m();c(),h("data",e)("channel",i.channels())("showProductToggle",!0)("hiddenIPOSInventory",i.searchFilter.HiddenIPOSInventory)}}var at=(()=>{class r{constructor(e,i,t,n,a,o){this.http=e,this.toastr=i,this.dialog=t,this.productService=n,this.authService=a,this.mainPanelService=o,this.paginationService=u(O),this.multiChannelService=u(U),this.updateResHandling=u(V),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=P([]),this.selectedChannels=P([]),this.channels=P([]),this.inventoryUpdateRole=ne.InventoryUpdate,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(A(e=>{e.Filter={PageNumber:e.Filter.PageNumber,filterModel:w.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory},this.searchFilter=e.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(e=[]){let i=e.filter(n=>f.isValidGUID(n.id)==!1),t=e.filter(n=>f.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(t)}onSearch(e){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let t=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=t.channelIds,this.searchFilter.ListLocationID=t.locationIds,this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}updateStock(e,i){if(e.length>0){let t=[];e.forEach(o=>{o.Channel?.forEach(s=>{t.push({ChannelItemID:s?.ChannelItemID,ChannelVariationID:s?.ChannelVariationID,Inventory:o.Inventory,LocationID:s?.LocationID})})});let a={ListChannelID:i.filter(o=>o.selected).map(o=>o.ID),List:t};this.http.post(R.UpdateInventoryChannel,a).subscribe(o=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+a.List.length+" variants in "+a.ListChannelID.length+" channels","Success")})}}updateStockByVariant(e){let i=e.InventoryMultiwarehouse[0]?.LocationID,t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:e.Inventory,VariantID:e.ID,SKU:e?.Sku,LocationID:i};this.http.post(R.UpdateUpdateQuantityByItem,t).subscribe(n=>{this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock(n)})}handlingUpdateStock(e){if(e){let i=e?.Response?.Fail_list,t=e?.Response?.Success_list;this.updateResHandling.responseHandling(t,i,"Stock")}else this.toastr.error(e?.Exception,"Error")}onShowDifferenceStock(e){e?this.searchFilter.filterModel=w.DIFFERENCE:this.searchFilter.filterModel=w.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e),t=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(me,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(t))},width:"400px"}).afterClosed().pipe(j(n=>f.IsNotEmpty(n))).subscribe(n=>{this.updateStock(i,n)})}static{this.\u0275fac=function(i){return new(i||r)(d(ae),d(ie),d(le),d(he),d(M),d(se))}}static{this.\u0275cmp=G({type:r,selectors:[["app-multi-channel-comparison"]],features:[$([O,U,V])],decls:26,vars:21,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,t){i&1&&(l(0,"mainpanel",0),C("onSubmit",function(a){return t.onSearch(a)}),g(1,Ie,3,3,"actions",1),I(2,"async"),l(3,"filters"),g(4,ve,1,0,"ng-container",1),I(5,"async"),l(6,"div")(7,"label",2),S(8,"Channel"),p(),l(9,"multiwarehouse-tree-select",3),C("onChannelChange",function(a){return t.onChannelChange(a)}),p()(),l(10,"div",4)(11,"label",5),S(12,"PageNumber"),p(),l(13,"input",6),T("ngModelChange",function(a){return x(t.searchFilter.PageNumber,a)||(t.searchFilter.PageNumber=a),a}),p()(),l(14,"div",4)(15,"label",7),S(16,"Page Size"),p(),l(17,"input",8),T("ngModelChange",function(a){return x(t.searchFilter.RowCount,a)||(t.searchFilter.RowCount=a),a}),p()()(),l(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),g(22,ye,2,4,"ng-container",1),I(23,"async"),l(24,"infinite-paginator",12),I(25,"async"),C("onNextPage",function(){return t.paginationService.onNextPage(t.searchFilter)})("onLastPage",function(){return t.paginationService.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.paginationService.getRowCount(t.searchFilter)}),p()()()()()()),i&2&&(h("hideSearchBox",!1),c(),h("ngIf",v(2,13,t.paginationService.data$)),c(3),h("ngIf",v(5,15,t.loader$)),c(5),h("multiple",!0),c(4),E("ngModel",t.searchFilter.PageNumber),c(4),E("ngModel",t.searchFilter.RowCount),c(5),h("ngIf",v(23,17,t.paginationService.data$)),c(2),h("totalData",t.paginationService.totalData())("hideCount",t.paginationService.hideCount())("rowCount",v(25,19,t.paginationService.totalRowCount$))("pageNumber",t.paginationService.pageNumber())("disableNextButton",t.paginationService.disableNextButton())("goToLastPage",t.paginationService.isLastPage()))},dependencies:[q,Q,K,pe,ce,de,te,X,ee,Y,Z,ue,ge,re,oe],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return r})();export{at as MultiChannelComparison};
1
+ import{a as ge}from"./chunk-2BV7ZXRB.js";import"./chunk-IITU3NV6.js";import{a as de}from"./chunk-2DLU2LJJ.js";import{a as me}from"./chunk-RGAWEFPQ.js";import{a as w}from"./chunk-XHAXYWZ7.js";import{c as ue,d as O,e as V}from"./chunk-O2YNPIYM.js";import"./chunk-YTCIQBSO.js";import"./chunk-PGP3WHIS.js";import"./chunk-VFATXJRG.js";import"./chunk-LYPHZP72.js";import"./chunk-RHHHL4OR.js";import{a as he}from"./chunk-X4B2FYY3.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ne}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-63ANFYRV.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-GZS2MOSK.js";import"./chunk-ACIMXBIC.js";import{i as M}from"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as R}from"./chunk-CGOB6Y3X.js";import{b as ie,e as ae}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as f}from"./chunk-EUYQST7Q.js";import{d as le,l as se,m as ce,n as pe}from"./chunk-HJXYT6MI.js";import{A as te,c as X,h as Y,m as Z,o as ee}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as oe,c as re}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{g as Q,j as K,n as q}from"./chunk-FXQKRJWU.js";import{$c as I,G as j,Gb as G,Gc as S,Kc as E,Lc as x,Mb as g,Mc as T,Qc as $,Ra as P,Sc as J,Yb as h,ad as v,ea as A,ic as l,ja as H,jc as p,kc as W,lc as F,mc as N,nc as z,oc as L,pa as u,rb as c,tc as C,uc as m,xb as d,ya as y,za as b}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as k,b as B}from"./chunk-66YHNWRR.js";var U=(()=>{class r{constructor(){this.authService=u(M),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(e,i){let t=Object.assign([],this.channelOptions),n=[],a;return e.forEach(o=>{a=t.find(s=>s.ID==o?.parent?.id),a&&(a=B(k({},a),{Name:`${o?.parent?.label} - ${o?.label}`,LocationID:o?.id}),n.push(a))}),i.forEach(o=>{a=t.find(s=>s.ID==o.id),a&&n.push(a)}),n}generateFilterLocation(e,i){let t=[],n=[],a=[];return e.length>0?(t=e.map(o=>o.id),n=e.filter(o=>f.IsNotEmpty(o?.parent?.id)).map(o=>o?.parent?.id).filter((o,s,D)=>D.indexOf(o)===s)):(t=[],n=[]),a=i.map(o=>o.id),a=a.concat(n).filter((o,s,D)=>D.indexOf(o)===s),{locationIds:t,channelIds:a}}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=H({token:r,factory:r.\u0275fac})}}return r})();var fe=r=>[r];function _e(r,_){if(r&1){let e=L();l(0,"button",16),C("click",function(){y(e);let t=m(2).ngIf,n=m();return b(n.onUpdateItems(t))}),W(1,"i",17),S(2," Update "),p()}}function Se(r,_){if(r&1&&(F(0),g(1,_e,3,0,"button",15),N()),r&2){let e=m().ngIf,i=m();c(),h("ngIf",i.productService.hasSelectionVariant(e))}}function Ie(r,_){if(r&1&&(l(0,"actions")(1,"div",13),g(2,Se,2,1,"ng-container",14),p()()),r&2){let e=m();c(2),h("ngxPermissionsOnly",J(1,fe,e.inventoryUpdateRole))}}function ve(r,_){r&1&&z(0)}function ye(r,_){if(r&1){let e=L();F(0),l(1,"app-table",18),C("onToggle",function(t){y(e);let n=m();return b(n.onShowDifferenceStock(t))})("onSubmit",function(t){y(e);let n=m();return b(n.updateStockByVariant(t))}),p(),N()}if(r&2){let e=_.ngIf,i=m();c(),h("data",e)("channel",i.channels())("showProductToggle",!0)("hiddenIPOSInventory",i.searchFilter.HiddenIPOSInventory)}}var at=(()=>{class r{constructor(e,i,t,n,a,o){this.http=e,this.toastr=i,this.dialog=t,this.productService=n,this.authService=a,this.mainPanelService=o,this.paginationService=u(O),this.multiChannelService=u(U),this.updateResHandling=u(V),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=P([]),this.selectedChannels=P([]),this.channels=P([]),this.inventoryUpdateRole=ne.InventoryUpdate,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(A(e=>{e.Filter={PageNumber:e.Filter.PageNumber,filterModel:w.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory},this.searchFilter=e.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(e=[]){let i=e.filter(n=>f.isValidGUID(n.id)==!1),t=e.filter(n=>f.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(t)}onSearch(e){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let t=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=t.channelIds,this.searchFilter.ListLocationID=t.locationIds,this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}updateStock(e,i){if(e.length>0){let t=[];e.forEach(o=>{o.Channel?.forEach(s=>{t.push({ChannelItemID:s?.ChannelItemID,ChannelVariationID:s?.ChannelVariationID,Inventory:o.Inventory,LocationID:s?.LocationID})})});let a={ListChannelID:i.filter(o=>o.selected).map(o=>o.ID),List:t};this.http.post(R.UpdateInventoryChannel,a).subscribe(o=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+a.List.length+" variants in "+a.ListChannelID.length+" channels","Success")})}}updateStockByVariant(e){let i=e.InventoryMultiwarehouse[0]?.LocationID,t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:e.Inventory,VariantID:e.ID,SKU:e?.Sku,LocationID:i};this.http.post(R.UpdateUpdateQuantityByItem,t).subscribe(n=>{this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock(n)})}handlingUpdateStock(e){if(e){let i=e?.Response?.Fail_list,t=e?.Response?.Success_list;this.updateResHandling.responseHandling(t,i,"Stock")}else this.toastr.error(e?.Exception,"Error")}onShowDifferenceStock(e){e?this.searchFilter.filterModel=w.DIFFERENCE:this.searchFilter.filterModel=w.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e),t=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(me,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(t))},width:"400px"}).afterClosed().pipe(j(n=>f.IsNotEmpty(n))).subscribe(n=>{this.updateStock(i,n)})}static{this.\u0275fac=function(i){return new(i||r)(d(ae),d(ie),d(le),d(he),d(M),d(se))}}static{this.\u0275cmp=G({type:r,selectors:[["app-multi-channel-comparison"]],features:[$([O,U,V])],decls:26,vars:21,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,t){i&1&&(l(0,"mainpanel",0),C("onSubmit",function(a){return t.onSearch(a)}),g(1,Ie,3,3,"actions",1),I(2,"async"),l(3,"filters"),g(4,ve,1,0,"ng-container",1),I(5,"async"),l(6,"div")(7,"label",2),S(8,"Channel"),p(),l(9,"multiwarehouse-tree-select",3),C("onChannelChange",function(a){return t.onChannelChange(a)}),p()(),l(10,"div",4)(11,"label",5),S(12,"PageNumber"),p(),l(13,"input",6),T("ngModelChange",function(a){return x(t.searchFilter.PageNumber,a)||(t.searchFilter.PageNumber=a),a}),p()(),l(14,"div",4)(15,"label",7),S(16,"Page Size"),p(),l(17,"input",8),T("ngModelChange",function(a){return x(t.searchFilter.RowCount,a)||(t.searchFilter.RowCount=a),a}),p()()(),l(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),g(22,ye,2,4,"ng-container",1),I(23,"async"),l(24,"infinite-paginator",12),I(25,"async"),C("onNextPage",function(){return t.paginationService.onNextPage(t.searchFilter)})("onLastPage",function(){return t.paginationService.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.paginationService.getRowCount(t.searchFilter)}),p()()()()()()),i&2&&(h("hideSearchBox",!1),c(),h("ngIf",v(2,13,t.paginationService.data$)),c(3),h("ngIf",v(5,15,t.loader$)),c(5),h("multiple",!0),c(4),E("ngModel",t.searchFilter.PageNumber),c(4),E("ngModel",t.searchFilter.RowCount),c(5),h("ngIf",v(23,17,t.paginationService.data$)),c(2),h("totalData",t.paginationService.totalData())("hideCount",t.paginationService.hideCount())("rowCount",v(25,19,t.paginationService.totalRowCount$))("pageNumber",t.paginationService.pageNumber())("disableNextButton",t.paginationService.disableNextButton())("goToLastPage",t.paginationService.isLastPage()))},dependencies:[q,Q,K,pe,ce,de,te,X,ee,Y,Z,ue,ge,re,oe],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return r})();export{at as MultiChannelComparison};
@@ -1 +1 @@
1
- import{a as m,b as l}from"./chunk-WRJFUNM3.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as i,J as u}from"./chunk-FXQKRJWU.js";import{Gb as r,Yb as p,ic as s,jc as a,kc as o,rb as n}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var c=(()=>{class t{constructor(){this.tabs=[{Title:"Users",Url:"/menu/users/users",Description:""},{Title:"Groups",Url:"/menu/users/groups",Description:""},{Title:"Setup",Url:"/menu/users/setup",Description:""}]}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=r({type:t,selectors:[["app-user-menu"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(e,f){e&1&&(s(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),a()()(),o(4,"router-outlet")),e&2&&(n(3),p("Tabs",f.tabs)("usePermissions",!0))},dependencies:[l,m,u,i],encapsulation:2})}}return t})(),T=[{path:"",component:c,children:[{path:"users",loadComponent(){return import("./chunk-EMJTQYVO.js").then(t=>t.UsersComponent)},data:{title:"Users"}},{path:"users/form",loadComponent(){return import("./chunk-CAK6MZUW.js").then(t=>t.UserFormComponent)},data:{title:"Users Form"}},{path:"users/info",loadComponent(){return import("./chunk-LRBJ5RU5.js").then(t=>t.UserInfoComponent)},data:{title:"Users Info"}},{path:"groups",loadComponent(){return import("./chunk-DXPLB6OB.js").then(t=>t.GroupsComponent)},data:{title:"Groups"}},{path:"setup",loadComponent(){return import("./chunk-HERZ7KEM.js").then(t=>t.SetupInfoComponent)},data:{title:"Setup Info"}},{path:"setup/form",loadComponent(){return import("./chunk-S3FZRSRP.js").then(t=>t.SetupFormComponent)},data:{title:"Setup Form"}},{path:"groups/form",loadComponent(){return import("./chunk-SLEJQAL7.js").then(t=>t.GroupsFormComponent)},data:{title:"Groups Form"}},{path:"groups/info",loadComponent(){return import("./chunk-UGYIOLBR.js").then(t=>t.GroupInfoComponent)},data:{title:"Groups Info"}},{path:"**",redirectTo:"users",pathMatch:"full"},{path:"",pathMatch:"full",redirectTo:"users"}]}];export{c as UserMenuComponent,T as userRoutes};
1
+ import{a as m,b as l}from"./chunk-WRJFUNM3.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as i,J as u}from"./chunk-FXQKRJWU.js";import{Gb as r,Yb as p,ic as s,jc as a,kc as o,rb as n}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var c=(()=>{class t{constructor(){this.tabs=[{Title:"Users",Url:"/menu/users/users",Description:""},{Title:"Groups",Url:"/menu/users/groups",Description:""},{Title:"Setup",Url:"/menu/users/setup",Description:""}]}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=r({type:t,selectors:[["app-user-menu"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(e,f){e&1&&(s(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),a()()(),o(4,"router-outlet")),e&2&&(n(3),p("Tabs",f.tabs)("usePermissions",!0))},dependencies:[l,m,u,i],encapsulation:2})}}return t})(),T=[{path:"",component:c,children:[{path:"users",loadComponent(){return import("./chunk-D2TELRO7.js").then(t=>t.UsersComponent)},data:{title:"Users"}},{path:"users/form",loadComponent(){return import("./chunk-EXSI44LD.js").then(t=>t.UserFormComponent)},data:{title:"Users Form"}},{path:"users/info",loadComponent(){return import("./chunk-LXXEN7OV.js").then(t=>t.UserInfoComponent)},data:{title:"Users Info"}},{path:"groups",loadComponent(){return import("./chunk-DXPLB6OB.js").then(t=>t.GroupsComponent)},data:{title:"Groups"}},{path:"setup",loadComponent(){return import("./chunk-HERZ7KEM.js").then(t=>t.SetupInfoComponent)},data:{title:"Setup Info"}},{path:"setup/form",loadComponent(){return import("./chunk-S3FZRSRP.js").then(t=>t.SetupFormComponent)},data:{title:"Setup Form"}},{path:"groups/form",loadComponent(){return import("./chunk-SLEJQAL7.js").then(t=>t.GroupsFormComponent)},data:{title:"Groups Form"}},{path:"groups/info",loadComponent(){return import("./chunk-UGYIOLBR.js").then(t=>t.GroupInfoComponent)},data:{title:"Groups Info"}},{path:"**",redirectTo:"users",pathMatch:"full"},{path:"",pathMatch:"full",redirectTo:"users"}]}];export{c as UserMenuComponent,T as userRoutes};
@@ -0,0 +1 @@
1
+ import{a as k}from"./chunk-PIBVGTHJ.js";import{a as Ve}from"./chunk-GH5FTODR.js";import{a as Y}from"./chunk-UMP6ZMEJ.js";import{a as Me,c as be}from"./chunk-3PPLPXAX.js";import{a as ke,b as Ee}from"./chunk-EPBVNII2.js";import{b as Te,c as De}from"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import{d as Ce,e as fe}from"./chunk-PYXL7UF7.js";import{a as ue}from"./chunk-Z3ITXK3D.js";import"./chunk-CGOB6Y3X.js";import{b as Z}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as de}from"./chunk-EUYQST7Q.js";import{b as xe,c as te,d as ye,j as Se,k as ve,m as Ue,n as we}from"./chunk-HJXYT6MI.js";import{A as H,b as me,h as q,m as j}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{a as _e,b as ge,c as he}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as ce,J as pe,j as $,n as z}from"./chunk-FXQKRJWU.js";import{$b as K,$c as F,G as se,Gb as B,Gc as g,Hc as Q,Ic as D,Kb as le,Kc as U,Lc as w,Mb as f,Mc as M,Nc as O,Oc as N,Pc as h,Qc as W,Ra as S,Rc as X,Sc as ee,Yb as _,Z as E,ad as A,dc as v,ea as J,ec as V,gc as P,hc as I,ic as o,jc as s,kc as L,lc as b,mc as T,oc as y,pa as x,pb as ae,q as oe,rb as a,rd as R,tc as C,uc as l,v as G,ya as c,za as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as ne,b as re}from"./chunk-66YHNWRR.js";var ie=function(i){return i.ERROR="https://resc.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg",i.UNAUTHORIZED="https://resc.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",i.EMPTY_LIST="https://resc.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg",i.REMOVE="https://resc.cloudinary.com/pos/image/upload/v1706156973/icons/globalerrorclear.svg",i}(ie||{});var Pe=()=>({display:"d-flex"});function Ae(i,m){if(i&1&&(o(0,"div",6),L(1,"img",9),o(2,"p",10),g(3," All users already migrated. "),s()()),i&2){let e=l();a(),_("src",e.emptyStateIcon,ae)}}function Re(i,m){if(i&1){let e=y();o(0,"div",14)(1,"p-checkBox",15),M("ngModelChange",function(t){let n=c(e).$implicit;return w(n.selected,t)||(n.selected=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(2),n=h(0);return p(t.onUserCheckChange(n))}),s(),o(2,"label",16),g(3),s()()}if(i&2){let e=m.$implicit;a(),K(X(7,Pe)),_("binary",!0)("id",e.ID),U("ngModel",e.selected),a(),_("for",e.ID),a(),D(" ",e.Name," ")}}function Ge(i,m){if(i&1){let e=y();o(0,"div",11)(1,"p-checkBox",12),M("ngModelChange",function(t){c(e);let n=l();return w(n.isCheckAll,t)||(n.isCheckAll=t),p(t)}),C("ngModelChange",function(t){c(e);let n=l(),d=h(0);return p(n.onCheckAllChange(t,d))}),s(),o(2,"label",13),g(3," Check All "),s()(),P(4,Re,4,8,"div",14,V)}if(i&2){let e=l(),r=h(0);a(),K(X(4,Pe)),_("binary",!0),U("ngModel",e.isCheckAll),a(3),I(r)}}var Ie=(()=>{class i extends be{constructor(){super(),this.dialogRef=x(xe),this.data=x(te),this.userService=x(k),this.dialogData=x(te),this.toastr=x(Z),this.userGroups=R(()=>this.dialogData.userGroups||[]),this.availableUsers=R(()=>{let e=new Map;return this.dialogData.availableUsers.forEach(r=>e.set(r.ID,r)),e}),this.migrateLoader$=this.userService.getUserMigrateLoader().pipe(G(e=>e.Data),G(e=>e.filter(t=>this.availableUsers().has(t.ID)===!1)),G(e=>e.map(t=>(t.selected=!0,t))),E(1)),this.isCheckAll=S(!0),this.selectedGroup=S(null),this.emptyStateIcon=ie.EMPTY_LIST,this.config=new Se,this.config.title="Migrate Users",this.config.customWidth="600px"}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}onUserCheckChange(e){let r=e.every(t=>t.selected);this.isCheckAll.set(r)}onCheckAllChange(e,r){this.isCheckAll.set(e),r.forEach(t=>t.selected=e)}onClose(){this.dialogRef.close(!1)}onSubmit(e){let r=e.filter(n=>n.selected);if(r.length===0){this.toastr.error("Please select at least one user","Error");return}if(de.IsEmpty(this.selectedGroup())){this.toastr.error("Please select a user group","Error");return}let t={userIds:r.map(n=>n.ID),groupId:this.selectedGroup()};this.userService.migrateUser(t).subscribe(()=>{this.dialogRef.close(!0),this.toastr.success("Users migrated successfully","Success")})}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-migrate-dialog"]],features:[W([k]),le],decls:15,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"row"],[1,"col","border-end"],[1,"modal-title","mb-8"],[1,"user-list-scroll","mt-5",2,"max-height","300x","overflow-y","auto","overflow-x","hidden","box-sizing","border-box"],[1,"d-flex","flex-column","align-items-center","mt-5"],[1,"col"],["optionLabel","Name","optionValue","ID","placeholder","Select a group","filterBy","Name","appendTo","body",1,"w-100",3,"click","ngModelChange","options","filter","ngModel"],["alt","No users found",2,"width","100px","height","100px",3,"src"],[1,"text-muted","mt-4","opacity-50",2,"margin-bottom","0px"],[1,"d-flex","w-100","align-items-center","mb-4"],["id","checkBoxAll",3,"ngModelChange","binary","ngModel"],["for","checkBoxAll",1,"ms-2"],[1,"d-flex","w-100","align-items-center","mb-3","ms-10"],[3,"ngModelChange","binary","id","ngModel"],[1,"ms-2",3,"for"]],template:function(r,t){if(r&1){let n=y();O(0),F(1,"async"),o(2,"modal-material",0),C("onClose",function(){return c(n),p(t.onClose())})("onCancel",function(){return c(n),p(t.onClose())})("onOk",function(){c(n);let u=h(0);return p(t.onSubmit(u))}),o(3,"div",1)(4,"div",2)(5,"div",3)(6,"h5",4),g(7,"Users from POS"),s(),o(8,"div",5),f(9,Ae,4,1,"div",6)(10,Ge,6,5),s()(),o(11,"div",7)(12,"h5",4),g(13,"Assign Group"),s(),o(14,"p-select",8),C("click",function(){return c(n),p(t.onClickSelect())}),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()()()()}if(r&2){let n=N(A(1,5,t.migrateLoader$));a(2),_("config",t.config),a(7),v((n==null?null:n.length)===0?9:10),a(5),_("options",t.userGroups())("filter",!0),U("ngModel",t.selectedGroup)}},dependencies:[z,$,ve,H,q,j,Te,Me],styles:[".user-list-scroll[_ngcontent-%COMP%]{max-height:160px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box}"]})}}return i})();var Le=i=>({ID:i});function Be(i,m){if(i&1){let e=y();o(0,"button",13),C("click",function(){c(e);let t=l(2),n=h(0);return p(t.onDeleteUser(n==null?null:n.Filter))}),L(1,"i",14),g(2),s()}if(i&2){let e,r=l(2);a(2),D(" Delete (",(e=r.selectedUsers())==null?null:e.length,") ")}}function We(i,m){if(i&1&&(b(0),f(1,Be,3,1,"button",12),T()),i&2){let e,r=l();a(),v(((e=r.selectedUsers())==null?null:e.length)>0?1:-1)}}function $e(i,m){if(i&1){let e=y();b(0),o(1,"button",15),C("click",function(){c(e);let t=l(),n=h(0),d=h(2);return p(t.onMigrateUser(n==null||n.Options==null?null:n.Options.Groups,d==null?null:d.Data))}),g(2," Migrate "),s(),T()}}function ze(i,m){i&1&&(b(0),o(1,"a",16),g(2," Invite "),s(),T())}function qe(i,m){if(i&1){let e=y();b(0),o(1,"th",17)(2,"div",18)(3,"input",19),C("change",function(t){c(e);let n=l(),d=h(2);return p(n.onCheckAllUser(t.target.checked,d==null?null:d.Data))}),s()()(),T()}}function je(i,m){if(i&1){let e=y();o(0,"div",18)(1,"input",23),M("ngModelChange",function(t){c(e);let n=l(2).$implicit;return w(n.checked,t)||(n.checked=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(3),n=h(2);return p(t.onSelectUser(n==null?null:n.Data))}),s()()}if(i&2){let e=l(2).$implicit;a(),U("ngModel",e.checked)}}function He(i,m){if(i&1&&(b(0),o(1,"td"),f(2,je,2,1,"div",18),s(),T()),i&2){let e,r=l().$implicit,t=l();a(2),v(r.Name!==((e=t.currentLoginUser())==null?null:e.username)?2:-1)}}function Ye(i,m){if(i&1&&(o(0,"a",20),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.UserID)),a(),D(" ",e.Name," ")}}function Ze(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.Name)}}function Je(i,m){if(i&1&&(o(0,"a",21),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.GroupID)),a(),D(" ",e.GroupName," ")}}function Ke(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.GroupName)}}function Qe(i,m){if(i&1&&L(0,"p-chip",24),i&2){let e=m.$implicit;_("label",e.Name)("image",e.Logo)("alt",e.Name)}}function Xe(i,m){if(i&1&&P(0,Qe,1,3,"p-chip",24,V),i&2){let e=l().$implicit;I(e.Channels)}}function et(i,m){i&1&&(o(0,"span"),g(1,"All Channels"),s())}function tt(i,m){if(i&1&&(o(0,"tr"),f(1,He,3,1,"ng-container",3),o(2,"td"),f(3,Ye,2,4,"a",20)(4,Ze,2,1,"span"),s(),o(5,"td"),f(6,Je,2,4,"a",21)(7,Ke,2,1,"span"),s(),o(8,"td")(9,"div",22),f(10,Xe,2,0)(11,et,2,0,"span"),s()()()),i&2){let e=m.$implicit,r=l();a(),_("ngxPermissionsOnly",r.userDeleteRole),a(2),v(r.hasUserEditRole()?3:4),a(3),v(r.hasUserEditRole()?6:7),a(4),v((e.Channels==null?null:e.Channels.length)>0?10:11)}}function it(i,m){if(i&1){let e=y();o(0,"app-mat-paginator-no-count",25),C("next",function(){c(e);let t=l(),n=h(0);return p(t.onNextPage(n==null?null:n.Filter))})("previous",function(){c(e);let t=l(),n=h(0);return p(t.onPrevPage(n==null?null:n.Filter))}),s()}if(i&2){l();let e=h(0),r=h(2);_("filter",e==null?null:e.Filter)("totaldata",r==null||r.Data==null?null:r.Data.length)("paginationTotal",r==null?null:r.Count)("hasClicked",!0)("alwaysShowNextButton",!0)}}var zt=(()=>{class i{constructor(){this.usersService=x(k),this.permissionService=x(_e),this.toastService=x(Z),this.dialog=x(ye),this.userInviteOptions=S([]),this.searchText=S(null),this.selectedGroup=S(null),this.userLoader$=this.usersService.getLoader().pipe(J(e=>{this.userInviteOptions.set(e.Options.Users),this.initUsers(e.Filter)}),E(1)),this.users$=oe({Count:0,Data:[]}),this.userAddRole=Y.UserInvite,this.userDeleteRole=Y.UserDelete,this.hasUserEditRole=S(!1),this.selectedUsers=S([]),this.currentLoginUser=R(()=>{let e=localStorage.getItem(ue.AUTHORIZATION);return e?JSON.parse(e):null}),this.permissionService.hasPermission(Y.UserEdit).then(e=>{this.hasUserEditRole.set(e)})}initUsers(e){let r=re(ne({},e),{Name:this.searchText(),GroupID:this.selectedGroup()});this.users$=this.usersService.getUsers(r).pipe(J(t=>this.filterUserInvtiteOptions(t.Data)),E(1))}filterUserInvtiteOptions(e){this.userInviteOptions.update(r=>r.filter(t=>e.findIndex(n=>n.UserID===t.ID)===-1))}onCheckAllUser(e,r){r.forEach(n=>{n.Name!==this.currentLoginUser()?.username&&(n.checked=e)});let t=r.filter(n=>n.checked);this.selectedUsers.set(t)}onSelectUser(e){let r=e.filter(t=>t.checked);this.selectedUsers.set(r)}onDeleteUser(e={PageNumber:1,PageSize:10}){let r=this.selectedUsers().map(n=>n.UserID);confirm("Are you sure you want to delete selected users?")&&this.usersService.deleteUsers(r).subscribe(()=>{this.selectedUsers.set([]),this.toastService.success("User deleted successfully","Success"),this.initUsers(e)})}onMigrateUser(e,r){this.dialog.open(Ie,{data:{userGroups:e,availableUsers:r}}).afterClosed().pipe(se(t=>t===!0)).subscribe(()=>{this.initUsers({PageNumber:1,PageSize:10})})}onNextPage(e){e.PageNumber+=1,this.initUsers(e)}onPrevPage(e){e.PageNumber-=1,this.initUsers(e)}onSuccessUpdateUser(e){e.PageNumber=1,this.initUsers(e)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-users"]],features:[W([k])],decls:33,vars:17,consts:[["headerTitle","Users","description","Manage your users and their permissions",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","ID","placeholder","Select Group",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","15%"],[3,"filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"],[3,"onSuccessUpdateUser","groups","users"],[1,"btn","btn-danger","me-3"],[1,"btn","btn-danger","me-3",3,"click"],[1,"fa","fa-trash","me-1"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-success"],[2,"width","5px"],[1,"d-flex"],["name","selectAll","type","checkbox",3,"change"],["routerLink","/menu/users/users/info",3,"queryParams"],["routerLink","/menu/users/groups/info",3,"queryParams"],[1,"lh-base"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"]],template:function(r,t){if(r&1){let n=y();O(0),F(1,"async"),O(2),F(3,"async"),o(4,"mainpanel",0),M("textChange",function(u){return c(n),w(t.searchText,u)||(t.searchText=u),p(u)}),C("onSubmit",function(){c(n);let u=h(0);return p(t.initUsers(u==null?null:u.Filter))}),o(5,"filters")(6,"div")(7,"label",1),g(8,"Group"),s(),o(9,"ng-select",2),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()(),o(10,"actions"),f(11,We,2,1,"ng-container",3)(12,$e,3,0,"ng-container",3)(13,ze,3,0,"ng-container",3),s(),o(14,"content")(15,"div",4)(16,"div",5)(17,"div",6)(18,"table",7)(19,"thead",8)(20,"tr"),f(21,qe,4,0,"ng-container",3),o(22,"th",9),g(23,"Login ID"),s(),o(24,"th",9),g(25,"Group"),s(),o(26,"th"),g(27,"Channel"),s()()(),o(28,"tbody"),P(29,tt,12,4,"tr",null,V),s()(),f(31,it,1,5,"app-mat-paginator-no-count",10),s()()()()(),o(32,"invite-group",11),C("onSuccessUpdateUser",function(){c(n);let u=h(0);return p(t.onSuccessUpdateUser(u==null?null:u.Filter))}),s()}if(r&2){let n=N(A(1,11,t.userLoader$));a(2);let d=N(A(3,14,t.users$));a(2),U("text",t.searchText),a(5),_("clearable",!0)("items",n==null||n.Options==null?null:n.Options.Groups),U("ngModel",t.selectedGroup),a(2),_("ngxPermissionsOnly",t.userDeleteRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(8),_("ngxPermissionsOnly",t.userDeleteRole),a(8),I(d==null?null:d.Data),a(2),v(n?31:-1),a(),_("groups",n==null||n.Options==null?null:n.Options.Groups)("users",t.userInviteOptions())}},dependencies:[z,$,we,Ue,pe,ce,Ve,he,ge,fe,Ce,H,me,q,j,De,Ee,ke],encapsulation:2})}}return i})();export{zt as UsersComponent};
@@ -1 +1 @@
1
- import{a as Y}from"./chunk-CO5XZENC.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import{e as J}from"./chunk-PYXL7UF7.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-CGOB6Y3X.js";import{b as j,e as F}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-RXQX7567.js";import{m as G,n as U}from"./chunk-HJXYT6MI.js";import{A as R,c as B,h as D,m as I}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as P,l as W,n as k}from"./chunk-FXQKRJWU.js";import{$c as S,Gb as x,Gc as i,Hc as E,Kc as C,Lc as _,Mb as M,Mc as b,Nc as T,Oc as V,Pc as v,Ra as h,Yb as f,Z as y,ad as w,dc as O,ic as e,jc as t,kc as A,oc as L,pa as u,rb as d,tc as g,uc as N,ya as m,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function z(n,q){if(n&1&&(e(0,"pre",21),i(1),S(2,"json"),t()),n&2){N();let l=v(25);d(),E(w(2,1,l))}}function K(n,q){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ce=(()=>{class n{constructor(){this.httpService=u(F),this.toastr=u(j),this.selectedChannel=h(null),this.orderNumber=h(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(H.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=x({type:n,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,r){if(p&1){let a=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return m(a),s(r.fetchLog())}),A(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),b("ngModelChange",function(o){return m(a),_(r.selectedChannel,o)||(r.selectedChannel=o),s(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),b("ngModelChange",function(o){return m(a),_(r.orderNumber,o)||(r.orderNumber=o),s(o)}),t()()()()(),T(25),S(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),g("click",function(){m(a);let o=v(25);return s(r.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,z,3,3,"pre",21)(39,K,2,0,"p",22),t()()()()()()()()()}if(p&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),C("ngModel",r.selectedChannel),d(8),C("ngModel",r.orderNumber),d();let a=V(w(26,6,r.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,P,W,U,G,J,R,B,D,I,Y],encapsulation:2})}}return n})();export{ce as OrderApiComponent};
1
+ import{a as Y}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import{e as J}from"./chunk-PYXL7UF7.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-CGOB6Y3X.js";import{b as j,e as F}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import{m as G,n as U}from"./chunk-HJXYT6MI.js";import{A as R,c as B,h as D,m as I}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as P,l as W,n as k}from"./chunk-FXQKRJWU.js";import{$c as S,Gb as x,Gc as i,Hc as E,Kc as C,Lc as _,Mb as M,Mc as b,Nc as T,Oc as V,Pc as v,Ra as h,Yb as f,Z as y,ad as w,dc as O,ic as e,jc as t,kc as A,oc as L,pa as u,rb as d,tc as g,uc as N,ya as m,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function z(n,q){if(n&1&&(e(0,"pre",21),i(1),S(2,"json"),t()),n&2){N();let l=v(25);d(),E(w(2,1,l))}}function K(n,q){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ce=(()=>{class n{constructor(){this.httpService=u(F),this.toastr=u(j),this.selectedChannel=h(null),this.orderNumber=h(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(H.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=x({type:n,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,r){if(p&1){let a=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return m(a),s(r.fetchLog())}),A(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),b("ngModelChange",function(o){return m(a),_(r.selectedChannel,o)||(r.selectedChannel=o),s(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),b("ngModelChange",function(o){return m(a),_(r.orderNumber,o)||(r.orderNumber=o),s(o)}),t()()()()(),T(25),S(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),g("click",function(){m(a);let o=v(25);return s(r.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,z,3,3,"pre",21)(39,K,2,0,"p",22),t()()()()()()()()()}if(p&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),C("ngModel",r.selectedChannel),d(8),C("ngModel",r.orderNumber),d();let a=V(w(26,6,r.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,P,W,U,G,J,R,B,D,I,Y],encapsulation:2})}}return n})();export{ce as OrderApiComponent};
@@ -1 +1 @@
1
- import{a as mt}from"./chunk-7KG3DC5J.js";import{b as lt}from"./chunk-5ZR5WIHG.js";import"./chunk-ACIMXBIC.js";import{a as nt,b as ot,d as at,e as rt}from"./chunk-PYXL7UF7.js";import{a as st}from"./chunk-LDL3A7NM.js";import{i as it}from"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{e as et}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as tt}from"./chunk-RXQX7567.js";import{m as ct,n as pt}from"./chunk-HJXYT6MI.js";import{A as Z,h as X,m as Y}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as K,J as Q,d as A,f as j,g as U,j as W,k as q,m as J,n as G}from"./chunk-FXQKRJWU.js";import{$c as s,Fc as R,Gb as L,Gc as l,Hc as N,Ic as y,Kc as $,Lc as O,Mb as d,Mc as V,Rc as B,Sc as k,Tc as H,Yb as c,Z as b,ad as u,bd as T,ca as D,cd as z,f as w,ic as n,jc as o,kc as v,lc as f,mc as g,ob as M,oc as P,pb as I,rb as a,tc as E,uc as m,v as _,xb as S,xc as F,ya as h,za as C}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var ft=(i,p)=>({"bg-gradient-danger":i,"bg-gradient-warning":p}),gt=()=>["/menu/products/status/notification/detail"],ut=i=>({ID:i});function _t(i,p){if(i&1&&(n(0,"span",15),v(1,"img",16),o(),l(2)),i&2){let t=p.item;a(),c("src",t.Img,I)("alt",t.Name),a(),y(" ",t.Name," ")}}function ht(i,p){if(i&1&&(f(0),l(1),s(2,"number"),n(3,"span"),l(4,"s"),o(),g()),i&2){let t=m().$implicit;a(),y(" ",T(2,1,t.DurationInSecond,"1.1-1")," ")}}function Ct(i,p){i&1&&l(0," - ")}function St(i,p){if(i&1&&(f(0),n(1,"tr",17)(2,"td")(3,"a",18),v(4,"img",19),n(5,"span"),l(6),o()()(),n(7,"td")(8,"b"),l(9),o(),v(10,"div",20),o(),n(11,"td"),d(12,ht,5,4,"ng-container",21)(13,Ct,1,0,"ng-template",null,0,z),o(),n(15,"td"),l(16),o(),n(17,"td"),l(18),s(19,"date"),o()(),g()),i&2){let t=p.$implicit,e=R(14);a(),c("ngClass",H(14,ft,t.Status==1,t.Status==0)),a(2),c("routerLink",B(17,gt))("queryParams",k(18,ut,t.ID)),a(),F("src",t.Img,I),a(2),N(t.Name),a(3),N(t.Label),a(),c("innerHTML",t.Message,M),a(2),c("ngIf",t.DurationInSecond)("ngIfElse",e),a(4),N(t.StatusLabel),a(2),y(" ",T(19,11,t.Created,"dd MMM yyyy HH:mm")," ")}}function vt(i,p){if(i&1){let t=P();f(0),n(1,"div",7)(2,"div",22)(3,"app-custom-paginator",23),s(4,"async"),s(5,"async"),E("total",function(){h(t);let r=m(2);return C(r.getRowCount())})("next",function(){h(t);let r=m(2);return C(r.getNotifications())})("previous",function(){h(t);let r=m(2);return C(r.getNotifications())}),o()()(),g()}if(i&2){let t=m().ngIf,e=m();a(3),c("filter",e.filter)("totaldata",t==null?null:t.length)("paginationTotal",u(4,4,e.rowCount$))("hasClicked",u(5,6,e.rowCount$))}}function Nt(i,p){if(i&1&&(f(0),d(1,vt,6,8,"ng-container",14),g()),i&2){let t=p.ngIf;a(),c("ngIf",t.length>0)}}var Ht=(()=>{class i{constructor(t,e,r){this.http=t,this.notificationService=e,this.authService=r,this.filter=new mt,this.destroy$=new w,this.channelOptions=r.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(D(this.destroy$)).subscribe(t=>{t.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(t=>{this.filter=t.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let t={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",t).pipe(_(e=>e.Data),_(e=>(e=this.setChannelLogoToNotifications(e),e=this.setTimeToSecond(e),e)),b(1))}setTimeToSecond(t){return t=t.map(e=>(e.DurationInSecond=parseInt(e.Duration)/1e3,e)),t}setChannelLogoToNotifications(t){return t=t.map(e=>(e.Img=tt.getChannelLogoByTypeId(e.TypeID),e)),t}getRowCount(){let t={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",t).pipe(_(e=>e.Count),b(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(e){return new(e||i)(S(et),S(lt),S(it))}}static{this.\u0275cmp=L({type:i,selectors:[["app-notification"]],decls:33,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Product Scan Job","hideSearchBox","true",3,"onSubmit"],["routerLink","/menu/products/status/notificationV2",1,"btn","btn-outline-secondary","btn-lg"],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,r){e&1&&(n(0,"mainpanel",1),E("onSubmit",function(){return r.onFilter()}),n(1,"actions")(2,"a",2),l(3," Scan Job V2 "),o()(),n(4,"filters")(5,"div")(6,"h6",3),l(7,"Channel"),o(),n(8,"ng-select",4),V("ngModelChange",function(x){return O(r.filter.ChannelID,x)||(r.filter.ChannelID=x),x}),d(9,_t,3,3,"ng-template",5),o()()(),n(10,"content")(11,"div",6)(12,"div",7)(13,"div",8)(14,"div",9)(15,"table",10)(16,"thead",11)(17,"tr",12)(18,"th"),l(19,"Channel"),o(),n(20,"th"),l(21,"Process"),o(),n(22,"th"),l(23,"Duration"),o(),n(24,"th"),l(25,"Status"),o(),n(26,"th"),l(27,"Created"),o()()(),n(28,"tbody"),d(29,St,20,20,"ng-container",13),s(30,"async"),o()()()()(),d(31,Nt,2,1,"ng-container",14),s(32,"async"),o()()()),e&2&&(a(8),c("clearable",!0)("items",r.channelOptions),$("ngModel",r.filter.ChannelID),a(21),c("ngForOf",u(30,5,r.notifications$)),a(2),c("ngIf",u(32,7,r.notifications$)))},dependencies:[G,A,j,U,W,J,q,Z,X,Y,pt,ct,st,rt,at,nt,ot,Q,K],encapsulation:2})}}return i})();export{Ht as NotificationComponent};
1
+ import{a as mt}from"./chunk-7KG3DC5J.js";import{b as lt}from"./chunk-GZS2MOSK.js";import"./chunk-ACIMXBIC.js";import{a as nt,b as ot,d as at,e as rt}from"./chunk-PYXL7UF7.js";import{a as st}from"./chunk-LDL3A7NM.js";import{i as it}from"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{e as et}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as tt}from"./chunk-EUYQST7Q.js";import{m as ct,n as pt}from"./chunk-HJXYT6MI.js";import{A as Z,h as X,m as Y}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as K,J as Q,d as A,f as j,g as U,j as W,k as q,m as J,n as G}from"./chunk-FXQKRJWU.js";import{$c as s,Fc as R,Gb as L,Gc as l,Hc as N,Ic as y,Kc as $,Lc as O,Mb as d,Mc as V,Rc as B,Sc as k,Tc as H,Yb as c,Z as b,ad as u,bd as T,ca as D,cd as z,f as w,ic as n,jc as o,kc as v,lc as f,mc as g,ob as M,oc as P,pb as I,rb as a,tc as E,uc as m,v as _,xb as S,xc as F,ya as h,za as C}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var ft=(i,p)=>({"bg-gradient-danger":i,"bg-gradient-warning":p}),gt=()=>["/menu/products/status/notification/detail"],ut=i=>({ID:i});function _t(i,p){if(i&1&&(n(0,"span",15),v(1,"img",16),o(),l(2)),i&2){let t=p.item;a(),c("src",t.Img,I)("alt",t.Name),a(),y(" ",t.Name," ")}}function ht(i,p){if(i&1&&(f(0),l(1),s(2,"number"),n(3,"span"),l(4,"s"),o(),g()),i&2){let t=m().$implicit;a(),y(" ",T(2,1,t.DurationInSecond,"1.1-1")," ")}}function Ct(i,p){i&1&&l(0," - ")}function St(i,p){if(i&1&&(f(0),n(1,"tr",17)(2,"td")(3,"a",18),v(4,"img",19),n(5,"span"),l(6),o()()(),n(7,"td")(8,"b"),l(9),o(),v(10,"div",20),o(),n(11,"td"),d(12,ht,5,4,"ng-container",21)(13,Ct,1,0,"ng-template",null,0,z),o(),n(15,"td"),l(16),o(),n(17,"td"),l(18),s(19,"date"),o()(),g()),i&2){let t=p.$implicit,e=R(14);a(),c("ngClass",H(14,ft,t.Status==1,t.Status==0)),a(2),c("routerLink",B(17,gt))("queryParams",k(18,ut,t.ID)),a(),F("src",t.Img,I),a(2),N(t.Name),a(3),N(t.Label),a(),c("innerHTML",t.Message,M),a(2),c("ngIf",t.DurationInSecond)("ngIfElse",e),a(4),N(t.StatusLabel),a(2),y(" ",T(19,11,t.Created,"dd MMM yyyy HH:mm")," ")}}function vt(i,p){if(i&1){let t=P();f(0),n(1,"div",7)(2,"div",22)(3,"app-custom-paginator",23),s(4,"async"),s(5,"async"),E("total",function(){h(t);let r=m(2);return C(r.getRowCount())})("next",function(){h(t);let r=m(2);return C(r.getNotifications())})("previous",function(){h(t);let r=m(2);return C(r.getNotifications())}),o()()(),g()}if(i&2){let t=m().ngIf,e=m();a(3),c("filter",e.filter)("totaldata",t==null?null:t.length)("paginationTotal",u(4,4,e.rowCount$))("hasClicked",u(5,6,e.rowCount$))}}function Nt(i,p){if(i&1&&(f(0),d(1,vt,6,8,"ng-container",14),g()),i&2){let t=p.ngIf;a(),c("ngIf",t.length>0)}}var Ht=(()=>{class i{constructor(t,e,r){this.http=t,this.notificationService=e,this.authService=r,this.filter=new mt,this.destroy$=new w,this.channelOptions=r.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(D(this.destroy$)).subscribe(t=>{t.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(t=>{this.filter=t.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let t={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",t).pipe(_(e=>e.Data),_(e=>(e=this.setChannelLogoToNotifications(e),e=this.setTimeToSecond(e),e)),b(1))}setTimeToSecond(t){return t=t.map(e=>(e.DurationInSecond=parseInt(e.Duration)/1e3,e)),t}setChannelLogoToNotifications(t){return t=t.map(e=>(e.Img=tt.getChannelLogoByTypeId(e.TypeID),e)),t}getRowCount(){let t={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",t).pipe(_(e=>e.Count),b(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(e){return new(e||i)(S(et),S(lt),S(it))}}static{this.\u0275cmp=L({type:i,selectors:[["app-notification"]],decls:33,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Product Scan Job","hideSearchBox","true",3,"onSubmit"],["routerLink","/menu/products/status/notificationV2",1,"btn","btn-outline-secondary","btn-lg"],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,r){e&1&&(n(0,"mainpanel",1),E("onSubmit",function(){return r.onFilter()}),n(1,"actions")(2,"a",2),l(3," Scan Job V2 "),o()(),n(4,"filters")(5,"div")(6,"h6",3),l(7,"Channel"),o(),n(8,"ng-select",4),V("ngModelChange",function(x){return O(r.filter.ChannelID,x)||(r.filter.ChannelID=x),x}),d(9,_t,3,3,"ng-template",5),o()()(),n(10,"content")(11,"div",6)(12,"div",7)(13,"div",8)(14,"div",9)(15,"table",10)(16,"thead",11)(17,"tr",12)(18,"th"),l(19,"Channel"),o(),n(20,"th"),l(21,"Process"),o(),n(22,"th"),l(23,"Duration"),o(),n(24,"th"),l(25,"Status"),o(),n(26,"th"),l(27,"Created"),o()()(),n(28,"tbody"),d(29,St,20,20,"ng-container",13),s(30,"async"),o()()()()(),d(31,Nt,2,1,"ng-container",14),s(32,"async"),o()()()),e&2&&(a(8),c("clearable",!0)("items",r.channelOptions),$("ngModel",r.filter.ChannelID),a(21),c("ngForOf",u(30,5,r.notifications$)),a(2),c("ngIf",u(32,7,r.notifications$)))},dependencies:[G,A,j,U,W,J,q,Z,X,Y,pt,ct,st,rt,at,nt,ot,Q,K],encapsulation:2})}}return i})();export{Ht as NotificationComponent};
@@ -0,0 +1 @@
1
+ var s=function(o){return o[o.Tokopedia=1]="Tokopedia",o[o.WooCommerce=2]="WooCommerce",o[o.None=3]="None",o[o.KalCare=4]="KalCare",o[o.Shopee=5]="Shopee",o[o.Tiktok=6]="Tiktok",o[o.Lazada=7]="Lazada",o[o.Shopify=8]="Shopify",o[o.Plugo=9]="Plugo",o[o.ShopifyV2=10]="ShopifyV2",o}(s||{});var i=function(o){return o.SHOOPE="https://resc.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",o.WOOCOMMERCE="https://resc.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp",o.TOKOPEDIA="https://resc.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",o.TIKTOK="https://resc.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png",o.LAZADA="https://resc.cloudinary.com/pos/image/upload/v1680681836/icons/marketplace_icons/Lazadanew.png",o.KALCARE="https://resc.cloudinary.com/pos/image/upload/v1654230268/icons/marketplace_icons/kalcare.png",o.SHOPIFY="https://resc.cloudinary.com/pos/image/upload/v1707987435/icons/marketplace_icons/shopify.png",o.PLUGO="https://resc.cloudinary.com/pos/image/upload/v1739236419/icons/marketplace_icons/plugo.ico",o.PLUGONEW="https://resc.cloudinary.com/pos/image/upload/v1739263497/icons/marketplace_icons/plugonew.ico",o}(i||{});var D=(()=>{class o{static{this.GuidEMpty="00000000-0000-0000-0000-000000000000"}static{this.MinDate="0001-01-01T00:00:00"}static IsNotEmpty(t){return t!=""&&t!=o.GuidEMpty&&t!=null&&t!=null}static IsEmpty(t){return t==""||t==null||t==null||t==o.GuidEMpty}static getChannelLogoByTypeId(t){let e;switch(t){case s.Tokopedia:e=i.TOKOPEDIA;break;case s.Shopee:e=i.SHOOPE;break;case s.WooCommerce:e=i.WOOCOMMERCE;break;case s.Lazada:e=i.LAZADA;break;case s.Tiktok:e=i.TIKTOK;break;case s.KalCare:e=i.KALCARE;break;case s.Shopify:e=i.SHOPIFY;break;case s.Plugo:e=i.PLUGO;break;case s.ShopifyV2:e=i.SHOPIFY;break}return e}static getChannelLogoByName(t=""){t=t.toLowerCase();let e;switch(t){case"tokopedia":e=i.TOKOPEDIA;break;case"shoppe":e=i.SHOOPE;break;case"woocommerce":e=i.WOOCOMMERCE;break;case"tiktok":e=i.TIKTOK;break;case"lazada":e=i.LAZADA;break;case"kalCare":e=i.KALCARE;break;case"plugo":e=i.PLUGO;break;case"shopifyv2":e=i.SHOPIFY;break}return e}static getChannelName(t){let e;switch(t){case s.Shopee:e="Shopee";break;case s.Tokopedia:e="Tokopedia";break;case s.Lazada:e="Lazada";break;case s.Tiktok:e="Tiktok";break;case s.WooCommerce:e="WooCommerce";break;case s.KalCare:e="KalCare";break;case s.Plugo:e="Plugo";break;case s.ShopifyV2:e="Shopify";break}return e}static assignChannelLogo(t){return t=t.map(e=>(e.logo=this.getChannelLogoByTypeId(e.TypeID),e)),t}static getCssChannelColor(t){let e;switch(t){case s.Shopee:e="#ee4d2d";break;case s.Tokopedia:e="var(--G500,#03AC0E)";break;case s.Lazada:e="#FF00B2";break;case s.Tiktok:e="black";break;case s.WooCommerce:e="#674399";break;case s.KalCare:e="rgb(128, 188, 0)";break;case s.Plugo:e="#F2A954";break}return e}static getDaysDiff(t,e){var a=e.getTime()-t.getTime(),r=a/(1e3*60*60*24);return r}static addDays(t,e){let a=new Date(Number(t));return a.setDate(t.getDate()-e),a}static isValidDate(t){return t instanceof Date&&!isNaN(t)}static getImageInfo(t){return new Promise((e,a)=>{let r=new Image;r.src=t,r.decode().then(()=>{e({img:t,height:r.height,width:r.width})}).catch(()=>{a(new Error(`Image load error for ${t}`))})})}static formatTitleFromDate(t,e){let a=null,r=new Date(t),c=new Date(e);return r.getDate()!=c.getDate()&&(a="dd"),r.getMonth()!=c.getMonth()&&(a="dd MMM"),r.getFullYear()!=c.getFullYear()&&(a="dd MMM yyyy"),a}static openDownloadFile(t,e){var a=window.URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download=e,r.click()}static compare(t,e,a){return(t<e?-1:1)*(a?1:-1)}static isDateExpired(t){let e=new Date,a=!1;return t.getTime()<e.getTime()&&(a=!0),a}static getLabelPathTree(t){let e=[],a=t;for(;a;)e.unshift(a.label),a=a.parent;return e.join(" / ")}static searchByIdWithParentDFS(t,e){let a=[...t],r;for(typeof e=="number"?r=JSON.stringify(e):r=e;a.length>0;){let c=a.pop();if(c.id===r)return c;if(c.children&&c.children.length>0)for(let n of c.children)n.parent=c,a.push(n)}return null}static getTimeDifference(t){let e=new Date(t),a=new Date,r=Math.abs(e.getTime()-a.getTime()),c=1e3,n=6e4,d=60*n,l=24*d,m=Math.floor(r/l),p=Math.floor(r%l/d),u=Math.floor(r%d/n),g=Math.floor(r%n/c);return{days:m,hours:p,minutes:u,seconds:g}}static convertToReadableDate(t){let{days:e,hours:a,minutes:r,seconds:c}=o.getTimeDifference(t),n="";return e>0&&a>0&&r>0&&(n=`${e} days, ${a} hours and ${r} minutes ago`),e>0&&a>0&&r==0&&(n=`${e} days and ${a} hours ago`),e>0&&a==0&&(n=`${e} days ago`),e==0&&a>0&&r>0&&(n=`${a} hours and ${r} minutes ago`),e==0&&a>0&&r==0&&(n=`${a} hours ago`),e==0&&a==0&&r>0&&(n=`${r} minutes ago`),e==0&&a==0&&r==0&&c>0&&(n=`${c} seconds ago`),n}static isValidGUID(t){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(t)}static convertTimestampToDate(t){if(!Number.isFinite(t))return new Date(t);let e=t<1e12?t*1e3:t;return new Date(e)}static parseJwt(t){var e=t.split(".")[1],a=e.replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(atob(a).split("").map(function(c){return"%"+("00"+c.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(r)}}return o})();export{i as a,s as b,D as c};
@@ -1,4 +1,4 @@
1
- import{a as B}from"./chunk-PIBVGTHJ.js";import{a as ke}from"./chunk-RHHHL4OR.js";import{a as Ge,b as Pe}from"./chunk-FGRPTNDB.js";import{a as Oe,b as Ve}from"./chunk-OXWPLJEW.js";import{a as Le,b as Qe}from"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import{a as Ne}from"./chunk-YFDFIBAG.js";import{T as Ee,fa as Ie,la as Re,ma as xe,na as k,oa as O}from"./chunk-RC5PUUVM.js";import{d as Se,e as we}from"./chunk-PYXL7UF7.js";import"./chunk-CGOB6Y3X.js";import{b as Te}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as D}from"./chunk-RXQX7567.js";import{m as De,n as Ue}from"./chunk-HJXYT6MI.js";import{A as Ce,c as ye,h as be,m as ve}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{r as Me,s as Fe}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{E as he,G as fe,H as ge,J as _e,d as x,g as pe,h as ce,i as me,j as ue,n as N}from"./chunk-FXQKRJWU.js";import{$c as se,Bc as _,Ca as V,Cc as y,Gb as U,Gc as c,Hb as X,Hc as S,Ic as re,Kb as Y,Kc as w,Lc as M,Mb as u,Mc as F,Nc as le,Qc as I,Ra as f,Rc as R,Sc as W,Xb as Z,Yb as l,Z as q,aa as A,ac as ee,ad as de,dc as te,ea as z,gc as ne,hc as ie,ic as a,ja as H,jc as r,ka as J,kc as ae,lc as L,mc as Q,nc as T,oc as G,pa as b,pb as K,rb as o,tc as P,uc as h,v as j,vc as oe,wc as E,ya as v,za as C,zc as g}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ae=["header"],ze=["title"],He=["subtitle"],Je=["content"],Ke=["footer"],Xe=["*",[["p-header"]],[["p-footer"]]],Ye=["*","p-header","p-footer"];function Ze(e,p){e&1&&T(0)}function et(e,p){if(e&1&&(a(0,"div",8),E(1,1),u(2,Ze,1,0,"ng-container",6),r()),e&2){let n=h();o(2),l("ngTemplateOutlet",n.headerTemplate||n._headerTemplate)}}function tt(e,p){if(e&1&&(L(0),c(1),Q()),e&2){let n=h(2);o(),S(n.header)}}function nt(e,p){e&1&&T(0)}function it(e,p){if(e&1&&(a(0,"div",9),u(1,tt,2,1,"ng-container",10)(2,nt,1,0,"ng-container",6),r()),e&2){let n=h();o(),l("ngIf",n.header&&!n._titleTemplate&&!n.titleTemplate),o(),l("ngTemplateOutlet",n.titleTemplate||n._titleTemplate)}}function at(e,p){if(e&1&&(L(0),c(1),Q()),e&2){let n=h(2);o(),S(n.subheader)}}function ot(e,p){e&1&&T(0)}function rt(e,p){if(e&1&&(a(0,"div",11),u(1,at,2,1,"ng-container",10)(2,ot,1,0,"ng-container",6),r()),e&2){let n=h();o(),l("ngIf",n.subheader&&!n._subtitleTemplate&&!n.subtitleTemplate),o(),l("ngTemplateOutlet",n.subtitleTemplate||n._subtitleTemplate)}}function lt(e,p){e&1&&T(0)}function st(e,p){e&1&&T(0)}function dt(e,p){if(e&1&&(a(0,"div",12),E(1,2),u(2,st,1,0,"ng-container",6),r()),e&2){let n=h();o(2),l("ngTemplateOutlet",n.footerTemplate||n._footerTemplate)}}var pt=({dt:e})=>`
1
+ import{a as B}from"./chunk-PIBVGTHJ.js";import{a as ke}from"./chunk-RHHHL4OR.js";import{a as Ge,b as Pe}from"./chunk-FGRPTNDB.js";import{a as Oe,b as Ve}from"./chunk-OXWPLJEW.js";import{a as Le,b as Qe}from"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import{a as Ne}from"./chunk-YFDFIBAG.js";import{T as Ee,fa as Ie,la as Re,ma as xe,na as k,oa as O}from"./chunk-RC5PUUVM.js";import{d as Se,e as we}from"./chunk-PYXL7UF7.js";import"./chunk-CGOB6Y3X.js";import{b as Te}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as D}from"./chunk-EUYQST7Q.js";import{m as De,n as Ue}from"./chunk-HJXYT6MI.js";import{A as Ce,c as ye,h as be,m as ve}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{r as Me,s as Fe}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{E as he,G as fe,H as ge,J as _e,d as x,g as pe,h as ce,i as me,j as ue,n as N}from"./chunk-FXQKRJWU.js";import{$c as se,Bc as _,Ca as V,Cc as y,Gb as U,Gc as c,Hb as X,Hc as S,Ic as re,Kb as Y,Kc as w,Lc as M,Mb as u,Mc as F,Nc as le,Qc as I,Ra as f,Rc as R,Sc as W,Xb as Z,Yb as l,Z as q,aa as A,ac as ee,ad as de,dc as te,ea as z,gc as ne,hc as ie,ic as a,ja as H,jc as r,ka as J,kc as ae,lc as L,mc as Q,nc as T,oc as G,pa as b,pb as K,rb as o,tc as P,uc as h,v as j,vc as oe,wc as E,ya as v,za as C,zc as g}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ae=["header"],ze=["title"],He=["subtitle"],Je=["content"],Ke=["footer"],Xe=["*",[["p-header"]],[["p-footer"]]],Ye=["*","p-header","p-footer"];function Ze(e,p){e&1&&T(0)}function et(e,p){if(e&1&&(a(0,"div",8),E(1,1),u(2,Ze,1,0,"ng-container",6),r()),e&2){let n=h();o(2),l("ngTemplateOutlet",n.headerTemplate||n._headerTemplate)}}function tt(e,p){if(e&1&&(L(0),c(1),Q()),e&2){let n=h(2);o(),S(n.header)}}function nt(e,p){e&1&&T(0)}function it(e,p){if(e&1&&(a(0,"div",9),u(1,tt,2,1,"ng-container",10)(2,nt,1,0,"ng-container",6),r()),e&2){let n=h();o(),l("ngIf",n.header&&!n._titleTemplate&&!n.titleTemplate),o(),l("ngTemplateOutlet",n.titleTemplate||n._titleTemplate)}}function at(e,p){if(e&1&&(L(0),c(1),Q()),e&2){let n=h(2);o(),S(n.subheader)}}function ot(e,p){e&1&&T(0)}function rt(e,p){if(e&1&&(a(0,"div",11),u(1,at,2,1,"ng-container",10)(2,ot,1,0,"ng-container",6),r()),e&2){let n=h();o(),l("ngIf",n.subheader&&!n._subtitleTemplate&&!n.subtitleTemplate),o(),l("ngTemplateOutlet",n.subtitleTemplate||n._subtitleTemplate)}}function lt(e,p){e&1&&T(0)}function st(e,p){e&1&&T(0)}function dt(e,p){if(e&1&&(a(0,"div",12),E(1,2),u(2,st,1,0,"ng-container",6),r()),e&2){let n=h();o(2),l("ngTemplateOutlet",n.footerTemplate||n._footerTemplate)}}var pt=({dt:e})=>`
2
2
  .p-card {
3
3
  background: ${e("card.background")};
4
4
  color: ${e("card.color")};