marketplacepos 5.41.3 → 5.41.4

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 (55) hide show
  1. package/Marketplace/{chunk-PVUSCHKJ.js → chunk-3CZJUTLZ.js} +1 -1
  2. package/Marketplace/{chunk-CTN7GW4H.js → chunk-4S4G5UPJ.js} +1 -1
  3. package/Marketplace/{chunk-VWFLNITX.js → chunk-5FEQZAWX.js} +1 -1
  4. package/Marketplace/chunk-742J5UZZ.js +1 -0
  5. package/Marketplace/{chunk-4NRAXW65.js → chunk-7G53KEUW.js} +1 -1
  6. package/Marketplace/{chunk-X3LH2IJE.js → chunk-7P3SGW2P.js} +1 -1
  7. package/Marketplace/{chunk-4AMQ66FW.js → chunk-AIIRPK4M.js} +1 -1
  8. package/Marketplace/{chunk-GJOCO2OS.js → chunk-B54QGLED.js} +2 -2
  9. package/Marketplace/{chunk-REFJUWLL.js → chunk-BG6DO7RW.js} +1 -1
  10. package/Marketplace/{chunk-GSPHYK6J.js → chunk-DVE7IIN7.js} +1 -1
  11. package/Marketplace/{chunk-DRSUXHAY.js → chunk-E3HHEPKQ.js} +1 -1
  12. package/Marketplace/{chunk-GBXNTL4E.js → chunk-E6HA2AGS.js} +1 -1
  13. package/Marketplace/{chunk-5S6SIKR7.js → chunk-EYNCNJ3I.js} +1 -1
  14. package/Marketplace/{chunk-VAU6MFH7.js → chunk-FX6CFPPN.js} +1 -1
  15. package/Marketplace/{chunk-3E5FYRN4.js → chunk-G5CQLP7H.js} +1 -1
  16. package/Marketplace/{chunk-NMJGLMWI.js → chunk-GCJBQRHI.js} +1 -1
  17. package/Marketplace/chunk-HMB7FZD7.js +1 -0
  18. package/Marketplace/{chunk-6AKFGBPY.js → chunk-HNYOBOEW.js} +2 -2
  19. package/Marketplace/{chunk-PJ72KMDS.js → chunk-HUMGZRJQ.js} +1 -1
  20. package/Marketplace/{chunk-IEYFOHME.js → chunk-ICSMRW7O.js} +1 -1
  21. package/Marketplace/{chunk-BIQHA7UA.js → chunk-ITTRZMEX.js} +1 -1
  22. package/Marketplace/{chunk-DI4V7KMK.js → chunk-JTZJTXCN.js} +1 -1
  23. package/Marketplace/{chunk-4XMCJ7I5.js → chunk-K3FQGMAY.js} +1 -1
  24. package/Marketplace/{chunk-CMCNEAGC.js → chunk-KC2DJUBC.js} +1 -1
  25. package/Marketplace/{chunk-GSH5BYZ6.js → chunk-KOJ2R5XW.js} +1 -1
  26. package/Marketplace/{chunk-JDEKWXPV.js → chunk-L4JWBBBC.js} +1 -1
  27. package/Marketplace/{chunk-CHZLFJFI.js → chunk-LEMNVA5V.js} +2 -2
  28. package/Marketplace/{chunk-3PNMJUYQ.js → chunk-LFJIZAV2.js} +2 -2
  29. package/Marketplace/chunk-LJTMOYLO.js +1 -0
  30. package/Marketplace/{chunk-26DZ5AMC.js → chunk-O5SSMLCS.js} +1 -1
  31. package/Marketplace/{chunk-YR2WEZDG.js → chunk-OAS72QB2.js} +1 -1
  32. package/Marketplace/{chunk-RIYAYANU.js → chunk-OAVAVDIP.js} +1 -1
  33. package/Marketplace/chunk-PQ6Z7K5L.js +1 -0
  34. package/Marketplace/{chunk-DZ2EE5MV.js → chunk-PZTMYAA7.js} +1 -1
  35. package/Marketplace/{chunk-U5VX6JLT.js → chunk-QJFAPDI7.js} +1 -1
  36. package/Marketplace/{chunk-ZHUHOS5T.js → chunk-REYGC4GG.js} +1 -1
  37. package/Marketplace/{chunk-RBC7ADJF.js → chunk-S7LCZRSD.js} +1 -1
  38. package/Marketplace/{chunk-AWDLMHBL.js → chunk-SL4ID42P.js} +1 -1
  39. package/Marketplace/chunk-SZ6MQ6EW.js +1 -0
  40. package/Marketplace/{chunk-VJKFHBPN.js → chunk-TXPNZLOJ.js} +1 -1
  41. package/Marketplace/{chunk-AMXLXRQK.js → chunk-TZXF4K2V.js} +1 -1
  42. package/Marketplace/{chunk-5KMCSNS6.js → chunk-UUUVVJG4.js} +1 -1
  43. package/Marketplace/{chunk-CPAHXWMO.js → chunk-VDSO2BHA.js} +1 -1
  44. package/Marketplace/{chunk-HKYVBAMV.js → chunk-XFCMKJV6.js} +1 -1
  45. package/Marketplace/{chunk-Q2R4GEW5.js → chunk-Y7VC2AGS.js} +1 -1
  46. package/Marketplace/{chunk-7XREAR3H.js → chunk-YPM6IC2W.js} +1 -1
  47. package/Marketplace/chunk-Z46DDENN.js +1 -0
  48. package/Marketplace/index.html +2 -2
  49. package/Marketplace/{main-CCWBPZQH.js → main-5HHAD6NX.js} +1 -1
  50. package/package.json +1 -1
  51. package/Marketplace/chunk-2G6NLWKN.js +0 -1
  52. package/Marketplace/chunk-4RTZASVJ.js +0 -1
  53. package/Marketplace/chunk-CYZQNZDB.js +0 -1
  54. package/Marketplace/chunk-JFJCXZD3.js +0 -1
  55. package/Marketplace/chunk-KQOYVGBL.js +0 -1
@@ -1,2 +1,2 @@
1
- import{a as ke}from"./chunk-XM6GN4VF.js";import"./chunk-7477X7LJ.js";import{a as N}from"./chunk-DRSUXHAY.js";import{a as H}from"./chunk-XHAXYWZ7.js";import{a as Me,b as Pe,c as De,d as G}from"./chunk-4XMCJ7I5.js";import{a as ye,b as Ie,c as we}from"./chunk-RGR34QZ3.js";import{b as Ve}from"./chunk-IEYFOHME.js";import{a as Te,b as Ee}from"./chunk-YXFTLQ5M.js";import"./chunk-MATSRG2L.js";import"./chunk-V2OJQHE3.js";import"./chunk-6XFYITUD.js";import"./chunk-LPXBSHUI.js";import"./chunk-D54NUPYF.js";import{a as be}from"./chunk-EGTYAIU5.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-4G3QN54S.js";import"./chunk-3RK6DDJD.js";import"./chunk-CH2MLZU7.js";import"./chunk-ZZVNB72Q.js";import{a as Fe}from"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{e as he}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{l as ue}from"./chunk-CHZLFJFI.js";import{b as me,e as _e}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as xe,k as fe,l as Se,m as ve}from"./chunk-BIQHA7UA.js";import{r as Ce,s as ge}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as ae,c as le,h as re,m as se,o as ce,y as pe}from"./chunk-DPLEMBB4.js";import{c as f,f as de}from"./chunk-PXB4YEY3.js";import{d as J,g as ee,j as te,k as ne,m as ie,n as oe}from"./chunk-GPEVUTDI.js";import{$c as R,Dc as Q,Eb as Z,Ec as c,Fc as D,G as Y,Gc as E,Ic as b,Jc as F,Kb as h,Kc as T,Oc as X,Qa as W,Qc as k,Wb as d,Z as B,Zc as g,_c as v,ad as z,bc as y,cc as O,ea as $,ec as U,fc as j,gc as a,hc as r,ic as x,jc as M,kc as P,mc as S,ob as V,pa as K,qb as s,rc as C,sc as l,v as A,vc as q,wb as w,ya as m,za as _}from"./chunk-T5ONJF63.js";import{a as L}from"./chunk-K2H6WANG.js";var Le=i=>({"text-decoration-line-through":i}),Ae=i=>({"ms-10":i}),Be=i=>({"bg-gradient-warning":i});function $e(i,p){if(i&1){let e=S();a(0,"button",38),C("click",function(){m(e);let t=l().ngIf,n=l(2);return _(n.onScanInventory(t))}),x(1,"i",39),c(2,"Refresh "),r()}}function We(i,p){if(i&1){let e=S();a(0,"div",36)(1,"button",40),C("click",function(){m(e);let t=l().ngIf,n=l(2);return _(n.updateStock(t))}),x(2,"i",41),c(3," Update "),r(),x(4,"button",42),a(5,"ul",43)(6,"a",44),C("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),x(7,"i",45),a(8,"span"),c(9,"Export"),r()()()()}}function Oe(i,p){if(i&1){let e=S();a(0,"button",46),C("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),x(1,"i",45),a(2,"span"),c(3,"Export"),r()()}}function Ue(i,p){if(i&1&&(a(0,"div"),h(1,$e,3,0,"button",35)(2,We,10,0,"div",36)(3,Oe,4,0,"button",37),r()),i&2){let e=p.ngIf,o=l(2);s(),d("ngIf",o.productService.hasSelectionVariant(e)),s(),y(o.productService.hasSelectionVariant(e)?2:3)}}function je(i,p){i&1&&(a(0,"div",47)(1,"span"),c(2," showing only different stock, please press next to populate more data "),r()())}function Qe(i,p){if(i&1){let e=S();a(0,"th")(1,"input",48),T("ngModelChange",function(t){m(e);let n=l(2);return F(n.checkboxState,t)||(n.checkboxState=t),_(t)}),C("ngModelChange",function(){let t=m(e).ngIf,n=l(2);return _(n.onCheckboxStateChange(t))}),r()()}if(i&2){let e=l(2);s(),b("ngModel",e.checkboxState)}}function ze(i,p){i&1&&(a(0,"th",32),c(1," Reserved "),r())}function Ge(i,p){if(i&1){let e=S();a(0,"input",66),T("ngModelChange",function(t){m(e);let n=l(3).$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),C("ngModelChange",function(){m(e);let t=l(3).$implicit,n=l(2);return _(n.onCheckboxStateProduct(t))}),r()}if(i&2){let e=l(3).$implicit;b("ngModel",e.selected)}}function He(i,p){if(i&1){let e=S();a(0,"img",67),C("click",function(t){m(e);let n=l(3).$implicit,u=l(2);return _(u.onZoomImage(t,n==null?null:n.ImageUrl))}),r()}if(i&2){let e=l(3).$implicit;q("src",e==null?null:e.ThumbnailUrl,V)}}function Ye(i,p){i&1&&x(0,"img",63)}function Ke(i,p){if(i&1&&(x(0,"br"),a(1,"div",68),x(2,"i",69),a(3,"small"),c(4),r()()),i&2){let e=l(3).$implicit;s(4),E("(",e==null?null:e.Category,")")}}function Ze(i,p){if(i&1&&(a(0,"td",59)(1,"div",14),h(2,Ge,1,1,"input",60),a(3,"div",61),h(4,He,1,1,"img",62)(5,Ye,1,0,"img",63),r()()(),a(6,"td",64)(7,"span",65),c(8),r(),h(9,Ke,5,1),r()),i&2){let e=l(2).$implicit,o=l(2);d("rowSpan",e==null?null:e.Variants.length),s(2),y(e.Variants.length>1?2:-1),s(),d("ngClass",k(7,Ae,e.Variants.length<=1)),s(),y(e!=null&&e.ThumbnailUrl?4:5),s(2),d("rowSpan",e==null?null:e.Variants.length),s(2),D(e==null?null:e.Name),s(),y(e.CategoryID!==null&&e.CategoryID!=o.guidEmpty?9:-1)}}function qe(i,p){if(i&1){let e=S();a(0,"input",48),T("ngModelChange",function(t){m(e);let n=l(2).$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),r()}if(i&2){let e=l(2).$implicit;b("ngModel",e.selected)}}function Xe(i,p){if(i&1&&h(0,qe,1,1,"input",53),i&2){let e=l().$implicit;y((e==null?null:e.Inventory)<=1e5?0:-1)}}function Je(i,p){if(i&1){let e=S();a(0,"input",48),T("ngModelChange",function(t){m(e);let n=l().$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),r()}if(i&2){let e=l().$implicit;b("ngModel",e.selected)}}function et(i,p){i&1&&(a(0,"div",70),c(1," Not Found "),r())}function tt(i,p){if(i&1&&(a(0,"div")(1,"span",71),c(2),g(3,"number"),r(),c(4," => "),a(5,"span",72),c(6),g(7,"number"),r()()),i&2){let e=l().$implicit;s(2),E(" ",v(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),D(v(7,4,e==null?null:e.Inventory))}}function nt(i,p){if(i&1&&(c(0),g(1,"number")),i&2){let e=l().$implicit;E(" ",v(1,1,e==null?null:e.Inventory)," ")}}function it(i,p){if(i&1&&(M(0),a(1,"div",73)(2,"a",74),x(3,"i",75),r()(),P()),i&2){let e=l().$implicit,o=l(3);s(2),d("href",o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),V)}}function ot(i,p){if(i&1){let e=S();a(0,"span",80),C("click",function(){let t=m(e).ngIf,n=l(2).$implicit,u=l().$implicit,I=l(2);return _(I.openTableDialog(u,n,t))}),c(1),g(2,"number"),r()}if(i&2){let e=l(2).$implicit;s(),E(" ",v(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function at(i,p){if(i&1){let e=S();a(0,"td",76)(1,"div",54)(2,"div"),h(3,ot,3,3,"span",77),g(4,"async"),r(),a(5,"div",73)(6,"a",74),x(7,"i",75),r()(),a(8,"div",73)(9,"span",78),C("click",function(){m(e);let t=l().$implicit,n=l(3);return _(n.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),x(10,"i",79),r()()()()}if(i&2){let e=l().$implicit,o=l(3);d("ngClass",k(5,Be,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),d("ngIf",v(4,3,o.products$)),s(3),d("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,V)}}function lt(i,p){if(i&1&&(M(0),a(1,"span",81),c(2),g(3,"number"),r(),P()),i&2){let e=l(2).$implicit;s(2),E(" (",v(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function rt(i,p){i&1&&c(0," - ")}function st(i,p){if(i&1&&(M(0),a(1,"td",50),h(2,lt,4,3,"ng-container",58)(3,rt,1,0,"ng-template",null,1,z),r(),P()),i&2){let e=Q(4),o=l().$implicit;s(2),d("ngIf",o==null||o.Channel[0]==null?null:o.Channel[0].InventoryReserved)("ngIfElse",e)}}function ct(i,p){i&1&&(M(0),c(1," - "),P())}function pt(i,p){if(i&1&&(a(0,"span",82),g(1,"date"),c(2),g(3,"date"),r()),i&2){let e=l().$implicit;d("matTooltip",R(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),E(" ",R(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function mt(i,p){if(i&1&&(a(0,"tr"),h(1,Ze,10,9),a(2,"td",49),c(3),r(),a(4,"td",50)(5,"span",51),c(6),r()(),a(7,"td",52),h(8,Xe,1,1)(9,Je,1,1,"input",53),r(),a(10,"td")(11,"div",54),h(12,et,2,0,"div",55)(13,tt,8,6,"div")(14,nt,2,3)(15,it,4,1,"ng-container",5),r()(),h(16,at,11,7,"td",56)(17,st,5,2,"ng-container",5),a(18,"td",57),h(19,ct,2,0,"ng-container",58)(20,pt,4,8,"ng-template",null,0,z),r()()),i&2){let e=p.$implicit,o=p.$index,t=Q(21),n=l(3);s(),y(o==0?1:-1),s(2),D(e==null?null:e.Model),s(2),d("matTooltip",e.Discontinued?n.discontinuedVariantMsg:"")("ngClass",k(14,Le,e.Discontinued)),s(),D(e==null?null:e.Code),s(2),y((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),d("ngIf",(e==null?null:e.I)==null),s(),y((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),y((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),d("ngIf",(e==null?null:e.I)!=null),s(),d("ngIf",e==null?null:e.Channel),s(),d("ngIf",n.isShowReservedColumn),s(2),d("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==n.minDate)("ngIfElse",t)}}function _t(i,p){if(i&1&&(a(0,"tbody"),U(1,mt,22,16,"tr",null,O),r()),i&2){let e=p.$implicit;s(),j(e.Variants)}}function dt(i,p){if(i&1){let e=S();a(0,"mainpanel",3),C("onSubmit",function(t){m(e);let n=l();return _(n.onSearch(t))}),a(1,"actions")(2,"div",4),h(3,Ue,4,2,"div",5),g(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),c(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),C("onChannelChange",function(t){m(e);let n=l();return _(n.onChannelChange(t))}),r()(),a(10,"div",8)(11,"label",9),c(12,"PageNumber"),r(),a(13,"input",10),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.PageNumber,t)||(n.searchFilter.PageNumber=t),_(t)}),r()(),a(14,"div",8)(15,"label",11),c(16,"Page Size"),r(),a(17,"input",12),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.RowCount,t)||(n.searchFilter.RowCount=t),_(t)}),r()(),a(18,"div",8)(19,"label",13),c(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.QuantityFrom,t)||(n.searchFilter.QuantityFrom=t),_(t)}),r(),c(23," - "),a(24,"input",16),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.QuantityTo,t)||(n.searchFilter.QuantityTo=t),_(t)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),h(29,je,3,0,"div",20),a(30,"table",21),C("matSortChange",function(t){m(e);let n=l();return _(n.onSortVariant(t))}),a(31,"thead",22)(32,"tr")(33,"th",23),c(34," Product "),x(35,"br"),a(36,"mat-slide-toggle",24),C("toggleChange",function(){m(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,_(t.onShowDifferenceStock())}),a(37,"small",13),c(38,"FILTER DIFFERENT INVENTORY"),r()()(),a(39,"th",25),c(40,"Variant"),r(),a(41,"th",26),c(42,"SKU"),r(),h(43,Qe,2,1,"th",5),g(44,"async"),a(45,"th",27),c(46," POS "),r(),a(47,"th",28)(48,"div",29),C("click",function(){m(e);let t=l();return _(t.openModalFilter())}),x(49,"img",30),a(50,"span",31),c(51),g(52,"stringLimit"),r()()(),h(53,ze,2,0,"th",32),a(54,"th",33),c(55,"Last Sync"),r()()(),U(56,_t,3,0,"tbody",null,O),g(58,"async"),r(),a(59,"infinite-paginator",34),g(60,"async"),C("onNextPage",function(){m(e);let t=l();return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){m(e);let t=l();return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){m(e);let t=l();return _(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(i&2){let e,o,t,n=l();d("headerTitle","Inventory Comparison")("pageData",n.pageData)("hideSearchBox",!1),s(3),d("ngIf",v(4,21,n.products$)),s(6),d("ngModel",(n.searchFilter==null?null:n.searchFilter.LocationID)||(n.searchFilter==null?null:n.searchFilter.ChannelID)),s(4),b("ngModel",n.searchFilter.PageNumber),s(4),b("ngModel",n.searchFilter.RowCount),s(5),b("ngModel",n.searchFilter.QuantityFrom),s(2),b("ngModel",n.searchFilter.QuantityTo),s(5),d("ngIf",(n.searchFilter==null?null:n.searchFilter.filterModel)==3),s(14),d("ngIf",v(44,23,n.products$)),s(5),d("matTooltip",((e=n.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=n.channelIdentity())==null?null:e.label:""),s(),d("src",(o=n.channelIdentity())==null?null:o.img,V),s(2),E(" ",R(52,25,(t=n.channelIdentity())==null?null:t.label,13)," "),s(2),y(n.isShowReservedColumn?53:-1),s(3),j(v(58,28,n.products$)),s(3),d("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",v(60,30,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}var Zt=(()=>{class i{constructor(e,o,t,n,u,I,Re,Ne){this.http=e,this.toastr=o,this.dialog=t,this.productService=n,this.authService=u,this.biggerPictureService=I,this.inventoryService=Re,this.mainPanelService=Ne,this.infinitePagination=K(G),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=f.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=f.GuidEMpty,this.selectedChannel=W(null),this.channelIdentity=W({img:null,label:null}),this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe($(e=>{this.checkShowReservedColumn(e)}),A(e=>(e=this.calculateAvailableStock(e),e)),B(1)),this.products$=this.sourceObs$}calculateAvailableStock(e){return e.map(t=>(t.totalAvailable=t.Variants.reduce((n,u)=>(n+=u.I?.Available||0,n),0),t))}checkShowReservedColumn(e){let o=0,t;e.forEach(n=>{t=n.Variants.find(u=>f.IsNotEmpty(u?.Channel[0]?.InventoryReserved)),t&&(o+=1)}),this.isShowReservedColumn=o>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(B(1),$(e=>{this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID,LocationID:e.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!e.Filter.IsMarketplaceAppActive)}))}onChannelChange(e){let o=Object.assign({},e);this.selectedChannel.set(o),f.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let e=Object.assign({},this.selectedChannel());f.IsNotEmpty(e.parent)?(this.searchFilter.LocationID=e.id,this.searchFilter.ChannelID=e?.parent?.id,e.label=e?.parent?.label+" - "+e?.label,e.img=f.getChannelLogoByTypeId(e?.parent?.typeid)):(this.searchFilter.LocationID=null,e.img=f.getChannelLogoByTypeId(e?.typeid),this.searchFilter.ChannelID=e?.id,this.selectedChannel.set(e)),this.channelIdentity.update(()=>({img:e.img,label:e.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(e){e&&this.toastr.warning(`Automatic inventory sync disabled.
1
+ import{a as ke}from"./chunk-XM6GN4VF.js";import"./chunk-7477X7LJ.js";import{a as N}from"./chunk-E3HHEPKQ.js";import{a as H}from"./chunk-XHAXYWZ7.js";import{a as Me,b as Pe,c as De,d as G}from"./chunk-K3FQGMAY.js";import{a as ye,b as Ie,c as we}from"./chunk-RGR34QZ3.js";import{b as Ve}from"./chunk-ICSMRW7O.js";import{a as Te,b as Ee}from"./chunk-YXFTLQ5M.js";import"./chunk-MATSRG2L.js";import"./chunk-V2OJQHE3.js";import"./chunk-6XFYITUD.js";import"./chunk-LPXBSHUI.js";import"./chunk-D54NUPYF.js";import{a as be}from"./chunk-EGTYAIU5.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-4G3QN54S.js";import"./chunk-3RK6DDJD.js";import"./chunk-CH2MLZU7.js";import"./chunk-ZZVNB72Q.js";import{a as Fe}from"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{e as he}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{l as ue}from"./chunk-LEMNVA5V.js";import{b as me,e as _e}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as xe,l as fe,m as Se,n as ve}from"./chunk-ITTRZMEX.js";import{r as Ce,s as ge}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as ae,c as le,h as re,m as se,o as ce,y as pe}from"./chunk-DPLEMBB4.js";import{c as f,f as de}from"./chunk-PXB4YEY3.js";import{d as J,g as ee,j as te,k as ne,m as ie,n as oe}from"./chunk-GPEVUTDI.js";import{$c as R,Dc as Q,Eb as Z,Ec as c,Fc as D,G as Y,Gc as E,Ic as b,Jc as F,Kb as h,Kc as T,Oc as X,Qa as W,Qc as k,Wb as d,Z as B,Zc as g,_c as v,ad as z,bc as y,cc as O,ea as $,ec as U,fc as j,gc as a,hc as r,ic as x,jc as M,kc as P,mc as S,ob as V,pa as K,qb as s,rc as C,sc as l,v as A,vc as q,wb as w,ya as m,za as _}from"./chunk-T5ONJF63.js";import{a as L}from"./chunk-K2H6WANG.js";var Le=i=>({"text-decoration-line-through":i}),Ae=i=>({"ms-10":i}),Be=i=>({"bg-gradient-warning":i});function $e(i,p){if(i&1){let e=S();a(0,"button",38),C("click",function(){m(e);let t=l().ngIf,n=l(2);return _(n.onScanInventory(t))}),x(1,"i",39),c(2,"Refresh "),r()}}function We(i,p){if(i&1){let e=S();a(0,"div",36)(1,"button",40),C("click",function(){m(e);let t=l().ngIf,n=l(2);return _(n.updateStock(t))}),x(2,"i",41),c(3," Update "),r(),x(4,"button",42),a(5,"ul",43)(6,"a",44),C("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),x(7,"i",45),a(8,"span"),c(9,"Export"),r()()()()}}function Oe(i,p){if(i&1){let e=S();a(0,"button",46),C("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),x(1,"i",45),a(2,"span"),c(3,"Export"),r()()}}function Ue(i,p){if(i&1&&(a(0,"div"),h(1,$e,3,0,"button",35)(2,We,10,0,"div",36)(3,Oe,4,0,"button",37),r()),i&2){let e=p.ngIf,o=l(2);s(),d("ngIf",o.productService.hasSelectionVariant(e)),s(),y(o.productService.hasSelectionVariant(e)?2:3)}}function je(i,p){i&1&&(a(0,"div",47)(1,"span"),c(2," showing only different stock, please press next to populate more data "),r()())}function Qe(i,p){if(i&1){let e=S();a(0,"th")(1,"input",48),T("ngModelChange",function(t){m(e);let n=l(2);return F(n.checkboxState,t)||(n.checkboxState=t),_(t)}),C("ngModelChange",function(){let t=m(e).ngIf,n=l(2);return _(n.onCheckboxStateChange(t))}),r()()}if(i&2){let e=l(2);s(),b("ngModel",e.checkboxState)}}function ze(i,p){i&1&&(a(0,"th",32),c(1," Reserved "),r())}function Ge(i,p){if(i&1){let e=S();a(0,"input",66),T("ngModelChange",function(t){m(e);let n=l(3).$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),C("ngModelChange",function(){m(e);let t=l(3).$implicit,n=l(2);return _(n.onCheckboxStateProduct(t))}),r()}if(i&2){let e=l(3).$implicit;b("ngModel",e.selected)}}function He(i,p){if(i&1){let e=S();a(0,"img",67),C("click",function(t){m(e);let n=l(3).$implicit,u=l(2);return _(u.onZoomImage(t,n==null?null:n.ImageUrl))}),r()}if(i&2){let e=l(3).$implicit;q("src",e==null?null:e.ThumbnailUrl,V)}}function Ye(i,p){i&1&&x(0,"img",63)}function Ke(i,p){if(i&1&&(x(0,"br"),a(1,"div",68),x(2,"i",69),a(3,"small"),c(4),r()()),i&2){let e=l(3).$implicit;s(4),E("(",e==null?null:e.Category,")")}}function Ze(i,p){if(i&1&&(a(0,"td",59)(1,"div",14),h(2,Ge,1,1,"input",60),a(3,"div",61),h(4,He,1,1,"img",62)(5,Ye,1,0,"img",63),r()()(),a(6,"td",64)(7,"span",65),c(8),r(),h(9,Ke,5,1),r()),i&2){let e=l(2).$implicit,o=l(2);d("rowSpan",e==null?null:e.Variants.length),s(2),y(e.Variants.length>1?2:-1),s(),d("ngClass",k(7,Ae,e.Variants.length<=1)),s(),y(e!=null&&e.ThumbnailUrl?4:5),s(2),d("rowSpan",e==null?null:e.Variants.length),s(2),D(e==null?null:e.Name),s(),y(e.CategoryID!==null&&e.CategoryID!=o.guidEmpty?9:-1)}}function qe(i,p){if(i&1){let e=S();a(0,"input",48),T("ngModelChange",function(t){m(e);let n=l(2).$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),r()}if(i&2){let e=l(2).$implicit;b("ngModel",e.selected)}}function Xe(i,p){if(i&1&&h(0,qe,1,1,"input",53),i&2){let e=l().$implicit;y((e==null?null:e.Inventory)<=1e5?0:-1)}}function Je(i,p){if(i&1){let e=S();a(0,"input",48),T("ngModelChange",function(t){m(e);let n=l().$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),r()}if(i&2){let e=l().$implicit;b("ngModel",e.selected)}}function et(i,p){i&1&&(a(0,"div",70),c(1," Not Found "),r())}function tt(i,p){if(i&1&&(a(0,"div")(1,"span",71),c(2),g(3,"number"),r(),c(4," => "),a(5,"span",72),c(6),g(7,"number"),r()()),i&2){let e=l().$implicit;s(2),E(" ",v(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),D(v(7,4,e==null?null:e.Inventory))}}function nt(i,p){if(i&1&&(c(0),g(1,"number")),i&2){let e=l().$implicit;E(" ",v(1,1,e==null?null:e.Inventory)," ")}}function it(i,p){if(i&1&&(M(0),a(1,"div",73)(2,"a",74),x(3,"i",75),r()(),P()),i&2){let e=l().$implicit,o=l(3);s(2),d("href",o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),V)}}function ot(i,p){if(i&1){let e=S();a(0,"span",80),C("click",function(){let t=m(e).ngIf,n=l(2).$implicit,u=l().$implicit,I=l(2);return _(I.openTableDialog(u,n,t))}),c(1),g(2,"number"),r()}if(i&2){let e=l(2).$implicit;s(),E(" ",v(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function at(i,p){if(i&1){let e=S();a(0,"td",76)(1,"div",54)(2,"div"),h(3,ot,3,3,"span",77),g(4,"async"),r(),a(5,"div",73)(6,"a",74),x(7,"i",75),r()(),a(8,"div",73)(9,"span",78),C("click",function(){m(e);let t=l().$implicit,n=l(3);return _(n.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),x(10,"i",79),r()()()()}if(i&2){let e=l().$implicit,o=l(3);d("ngClass",k(5,Be,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),d("ngIf",v(4,3,o.products$)),s(3),d("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,V)}}function lt(i,p){if(i&1&&(M(0),a(1,"span",81),c(2),g(3,"number"),r(),P()),i&2){let e=l(2).$implicit;s(2),E(" (",v(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function rt(i,p){i&1&&c(0," - ")}function st(i,p){if(i&1&&(M(0),a(1,"td",50),h(2,lt,4,3,"ng-container",58)(3,rt,1,0,"ng-template",null,1,z),r(),P()),i&2){let e=Q(4),o=l().$implicit;s(2),d("ngIf",o==null||o.Channel[0]==null?null:o.Channel[0].InventoryReserved)("ngIfElse",e)}}function ct(i,p){i&1&&(M(0),c(1," - "),P())}function pt(i,p){if(i&1&&(a(0,"span",82),g(1,"date"),c(2),g(3,"date"),r()),i&2){let e=l().$implicit;d("matTooltip",R(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),E(" ",R(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function mt(i,p){if(i&1&&(a(0,"tr"),h(1,Ze,10,9),a(2,"td",49),c(3),r(),a(4,"td",50)(5,"span",51),c(6),r()(),a(7,"td",52),h(8,Xe,1,1)(9,Je,1,1,"input",53),r(),a(10,"td")(11,"div",54),h(12,et,2,0,"div",55)(13,tt,8,6,"div")(14,nt,2,3)(15,it,4,1,"ng-container",5),r()(),h(16,at,11,7,"td",56)(17,st,5,2,"ng-container",5),a(18,"td",57),h(19,ct,2,0,"ng-container",58)(20,pt,4,8,"ng-template",null,0,z),r()()),i&2){let e=p.$implicit,o=p.$index,t=Q(21),n=l(3);s(),y(o==0?1:-1),s(2),D(e==null?null:e.Model),s(2),d("matTooltip",e.Discontinued?n.discontinuedVariantMsg:"")("ngClass",k(14,Le,e.Discontinued)),s(),D(e==null?null:e.Code),s(2),y((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),d("ngIf",(e==null?null:e.I)==null),s(),y((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),y((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),d("ngIf",(e==null?null:e.I)!=null),s(),d("ngIf",e==null?null:e.Channel),s(),d("ngIf",n.isShowReservedColumn),s(2),d("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==n.minDate)("ngIfElse",t)}}function _t(i,p){if(i&1&&(a(0,"tbody"),U(1,mt,22,16,"tr",null,O),r()),i&2){let e=p.$implicit;s(),j(e.Variants)}}function dt(i,p){if(i&1){let e=S();a(0,"mainpanel",3),C("onSubmit",function(t){m(e);let n=l();return _(n.onSearch(t))}),a(1,"actions")(2,"div",4),h(3,Ue,4,2,"div",5),g(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),c(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),C("onChannelChange",function(t){m(e);let n=l();return _(n.onChannelChange(t))}),r()(),a(10,"div",8)(11,"label",9),c(12,"PageNumber"),r(),a(13,"input",10),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.PageNumber,t)||(n.searchFilter.PageNumber=t),_(t)}),r()(),a(14,"div",8)(15,"label",11),c(16,"Page Size"),r(),a(17,"input",12),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.RowCount,t)||(n.searchFilter.RowCount=t),_(t)}),r()(),a(18,"div",8)(19,"label",13),c(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.QuantityFrom,t)||(n.searchFilter.QuantityFrom=t),_(t)}),r(),c(23," - "),a(24,"input",16),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.QuantityTo,t)||(n.searchFilter.QuantityTo=t),_(t)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),h(29,je,3,0,"div",20),a(30,"table",21),C("matSortChange",function(t){m(e);let n=l();return _(n.onSortVariant(t))}),a(31,"thead",22)(32,"tr")(33,"th",23),c(34," Product "),x(35,"br"),a(36,"mat-slide-toggle",24),C("toggleChange",function(){m(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,_(t.onShowDifferenceStock())}),a(37,"small",13),c(38,"FILTER DIFFERENT INVENTORY"),r()()(),a(39,"th",25),c(40,"Variant"),r(),a(41,"th",26),c(42,"SKU"),r(),h(43,Qe,2,1,"th",5),g(44,"async"),a(45,"th",27),c(46," POS "),r(),a(47,"th",28)(48,"div",29),C("click",function(){m(e);let t=l();return _(t.openModalFilter())}),x(49,"img",30),a(50,"span",31),c(51),g(52,"stringLimit"),r()()(),h(53,ze,2,0,"th",32),a(54,"th",33),c(55,"Last Sync"),r()()(),U(56,_t,3,0,"tbody",null,O),g(58,"async"),r(),a(59,"infinite-paginator",34),g(60,"async"),C("onNextPage",function(){m(e);let t=l();return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){m(e);let t=l();return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){m(e);let t=l();return _(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(i&2){let e,o,t,n=l();d("headerTitle","Inventory Comparison")("pageData",n.pageData)("hideSearchBox",!1),s(3),d("ngIf",v(4,21,n.products$)),s(6),d("ngModel",(n.searchFilter==null?null:n.searchFilter.LocationID)||(n.searchFilter==null?null:n.searchFilter.ChannelID)),s(4),b("ngModel",n.searchFilter.PageNumber),s(4),b("ngModel",n.searchFilter.RowCount),s(5),b("ngModel",n.searchFilter.QuantityFrom),s(2),b("ngModel",n.searchFilter.QuantityTo),s(5),d("ngIf",(n.searchFilter==null?null:n.searchFilter.filterModel)==3),s(14),d("ngIf",v(44,23,n.products$)),s(5),d("matTooltip",((e=n.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=n.channelIdentity())==null?null:e.label:""),s(),d("src",(o=n.channelIdentity())==null?null:o.img,V),s(2),E(" ",R(52,25,(t=n.channelIdentity())==null?null:t.label,13)," "),s(2),y(n.isShowReservedColumn?53:-1),s(3),j(v(58,28,n.products$)),s(3),d("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",v(60,30,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}var Zt=(()=>{class i{constructor(e,o,t,n,u,I,Re,Ne){this.http=e,this.toastr=o,this.dialog=t,this.productService=n,this.authService=u,this.biggerPictureService=I,this.inventoryService=Re,this.mainPanelService=Ne,this.infinitePagination=K(G),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=f.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=f.GuidEMpty,this.selectedChannel=W(null),this.channelIdentity=W({img:null,label:null}),this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe($(e=>{this.checkShowReservedColumn(e)}),A(e=>(e=this.calculateAvailableStock(e),e)),B(1)),this.products$=this.sourceObs$}calculateAvailableStock(e){return e.map(t=>(t.totalAvailable=t.Variants.reduce((n,u)=>(n+=u.I?.Available||0,n),0),t))}checkShowReservedColumn(e){let o=0,t;e.forEach(n=>{t=n.Variants.find(u=>f.IsNotEmpty(u?.Channel[0]?.InventoryReserved)),t&&(o+=1)}),this.isShowReservedColumn=o>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(B(1),$(e=>{this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID,LocationID:e.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!e.Filter.IsMarketplaceAppActive)}))}onChannelChange(e){let o=Object.assign({},e);this.selectedChannel.set(o),f.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let e=Object.assign({},this.selectedChannel());f.IsNotEmpty(e.parent)?(this.searchFilter.LocationID=e.id,this.searchFilter.ChannelID=e?.parent?.id,e.label=e?.parent?.label+" - "+e?.label,e.img=f.getChannelLogoByTypeId(e?.parent?.typeid)):(this.searchFilter.LocationID=null,e.img=f.getChannelLogoByTypeId(e?.typeid),this.searchFilter.ChannelID=e?.id,this.selectedChannel.set(e)),this.channelIdentity.update(()=>({img:e.img,label:e.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(e){e&&this.toastr.warning(`Automatic inventory sync disabled.
2
2
  Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(e){this.searchFilter.text=e,this.setChannelFilter(),this.initReloadData()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let o=this.productService.selectedVariantProduct(e);if(o.length>0){let t=this.searchFilter.LocationID,n=o.map(I=>L({ID:I.ID,Code:I.Code,Inventory:I.Inventory},f.IsNotEmpty(t)&&{LocationID:t})),u={ListChannelID:[this.searchFilter.ChannelID],List:n};this.http.post("/api/Inventory/UpdateChannel",u).subscribe(I=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(I)})}}handlingUpdateStock(e){if(e[0]?.Response){let o=e[0]?.Response?.Fail_list,t=e[0]?.Response?.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",t,o)}else this.toastr.error(e[0]?.Exception,"Error")}refreshInventory(e,o,t,n){let u={ChannelItemID:e,ChannelVariationID:o,ChannelID:t,VariantID:n};this.http.post("/api/Inventory/RefreshInventoryChannel",u).subscribe(I=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(e){e.Variants=e.Variants.map(o=>(o.Inventory>=0&&(o.selected=e.selected),o))}onCheckboxStateChange(e){e=e.map(o=>(o.Variants=o.Variants.map(t=>(t.selected=this.checkboxState,t)),o))}openTableDialog(e,o,t){this.dialog.open(Me,{data:{Name:e.Name,Variant:o,ChannelID:o?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:e.ChannelItemID}}).afterClosed().pipe(Y(u=>f.IsNotEmpty(u))).subscribe(u=>{this.updateItemAfterDialog(u)})}updateItemAfterDialog(e){let o=this.searchFilter.LocationID,t=L({ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku},f.IsNotEmpty(o)&&{LocationID:o});this.http.post("/api/Inventory/UpdateQuantityByItem",t).subscribe(n=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([n])})}onScanInventory(e){let o=this.productService.selectedVariantProduct(e);this.inventoryService.refreshInventory(o).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(Ve,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=H.DIFFERENCE:this.searchFilter.filterModel=H.ALL,this.initReloadData()}onZoomImage(e,o){this.biggerPictureService.openBiggerPicture(e,o)}onSortVariant(e){if(e.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(A(o=>o.map(t=>(t.Variants=t.Variants.sort((n,u)=>f.compare(n.I?.Available,u.I?.Available,e.direction==="asc")),t)).sort((t,n)=>f.compare(t.totalAvailable,n.totalAvailable,e.direction==="asc"))))}static{this.\u0275fac=function(o){return new(o||i)(w(_e),w(me),w(xe),w(be),w(ue),w(Fe),w(N),w(fe))}}static{this.\u0275cmp=Z({type:i,selectors:[["app-single-channel-comparison"]],features:[X([G,N])],decls:2,vars:3,consts:[["SYNCDATE",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],["matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col","mat-sort-header","Available","arrowPosition","before",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["class","btn btn-outline-dark me-3","matTooltip","Fetch the latest stock directly from the channel",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"align-middle"],["type","checkbox",3,"ngModel"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"width","0%",3,"rowSpan"],["type","checkbox",1,"me-3",3,"ngModel"],[3,"ngClass"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Stock Available"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-end",3,"ngClass"],["class","cursor",3,"click",4,"ngIf"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[1,"cursor",3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(o,t){o&1&&(h(0,dt,61,32,"mainpanel",2),g(1,"async")),o&2&&d("ngIf",v(1,1,t.loader$))},dependencies:[oe,J,ee,te,ie,ne,ve,Se,he,pe,le,ce,ae,re,se,Pe,De,de,Ee,Te,ge,Ce,we,ye,Ie,ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]})}}return i})();export{Zt as SingleChannelComparisonComponent};
@@ -1 +1 @@
1
- import{a as H}from"./chunk-NMJGLMWI.js";import"./chunk-6IAGGRZN.js";import{j}from"./chunk-CHZLFJFI.js";import{e as N}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{l as I,m as F}from"./chunk-BIQHA7UA.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as O,h as R,m as U,y as K}from"./chunk-DPLEMBB4.js";import"./chunk-PXB4YEY3.js";import{j as D,l as B,n as W}from"./chunk-GPEVUTDI.js";import{Eb as b,Ec as i,Fc as T,Ic as C,Jc as g,Kb as x,Kc as _,Lc as k,Mc as V,Nc as S,Qa as u,Wb as h,Z as y,Zc as v,_c as w,bc as M,gc as e,hc as t,ic as A,mc as L,pa as P,qb as a,rc as f,sc as E,ya as c,za as s}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";function G(n,J){if(n&1&&(e(0,"pre",21),i(1),v(2,"json"),t()),n&2){E();let l=S(25);a(),T(w(2,1,l))}}function Y(n,J){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ae=(()=>{class n{constructor(){this.httpService=P(N),this.selectedChannel=u(null),this.sku=u(null)}initProductLog(){this.productLog$=this.httpService.post(j.GetProductApiLog,{ChannelID:this.selectedChannel(),SKU:this.sku()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),alert("Copied to clipboard!")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=b({type:n,selectors:[["app-product-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Product 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","Product Code / SKU",1,"form-control",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","productLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,o){if(p&1){let d=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),f("click",function(){return c(d),s(o.initProductLog())}),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 Product API Detail "),t()(),e(15,"div",9)(16,"channel-select-options",10),_("ngModelChange",function(r){return c(d),g(o.selectedChannel,r)||(o.selectedChannel=r),s(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Product Code / SKU"),t(),e(21,"p",8),i(22," Product SKU or Code from Channel Product "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(r){return c(d),g(o.sku,r)||(o.sku=r),s(r)}),t()()()()(),k(25),v(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),f("click",function(){c(d);let r=S(25);return s(o.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,G,3,3,"pre",21)(39,Y,2,0,"p",22),t()()()()()()()()()}if(p&2){h("hideSearchBox",!0)("hideSearchDropdown",!0),a(16),C("ngModel",o.selectedChannel),a(8),C("ngModel",o.sku),a();let d=V(w(26,6,o.productLog$));a(8),h("disabled",!d),a(5),M(d?38:39)}},dependencies:[W,D,B,K,O,R,U,F,I,H],encapsulation:2})}}return n})();export{ae as ProductApiComponent};
1
+ import{a as H}from"./chunk-GCJBQRHI.js";import"./chunk-6IAGGRZN.js";import{j}from"./chunk-LEMNVA5V.js";import{e as N}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{m as I,n as F}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as O,h as R,m as U,y as K}from"./chunk-DPLEMBB4.js";import"./chunk-PXB4YEY3.js";import{j as D,l as B,n as W}from"./chunk-GPEVUTDI.js";import{Eb as b,Ec as i,Fc as T,Ic as C,Jc as g,Kb as x,Kc as _,Lc as k,Mc as V,Nc as S,Qa as u,Wb as h,Z as y,Zc as v,_c as w,bc as M,gc as e,hc as t,ic as A,mc as L,pa as P,qb as a,rc as f,sc as E,ya as c,za as s}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";function G(n,J){if(n&1&&(e(0,"pre",21),i(1),v(2,"json"),t()),n&2){E();let l=S(25);a(),T(w(2,1,l))}}function Y(n,J){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ae=(()=>{class n{constructor(){this.httpService=P(N),this.selectedChannel=u(null),this.sku=u(null)}initProductLog(){this.productLog$=this.httpService.post(j.GetProductApiLog,{ChannelID:this.selectedChannel(),SKU:this.sku()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),alert("Copied to clipboard!")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=b({type:n,selectors:[["app-product-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Product 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","Product Code / SKU",1,"form-control",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","productLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,o){if(p&1){let d=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),f("click",function(){return c(d),s(o.initProductLog())}),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 Product API Detail "),t()(),e(15,"div",9)(16,"channel-select-options",10),_("ngModelChange",function(r){return c(d),g(o.selectedChannel,r)||(o.selectedChannel=r),s(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Product Code / SKU"),t(),e(21,"p",8),i(22," Product SKU or Code from Channel Product "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(r){return c(d),g(o.sku,r)||(o.sku=r),s(r)}),t()()()()(),k(25),v(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),f("click",function(){c(d);let r=S(25);return s(o.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,G,3,3,"pre",21)(39,Y,2,0,"p",22),t()()()()()()()()()}if(p&2){h("hideSearchBox",!0)("hideSearchDropdown",!0),a(16),C("ngModel",o.selectedChannel),a(8),C("ngModel",o.sku),a();let d=V(w(26,6,o.productLog$));a(8),h("disabled",!d),a(5),M(d?38:39)}},dependencies:[W,D,B,K,O,R,U,F,I,H],encapsulation:2})}}return n})();export{ae as ProductApiComponent};
@@ -1 +1 @@
1
- import{b as ae,e as re}from"./chunk-BUFEIJAI.js";import{b as M,c as W,h as me,i as _,j as S}from"./chunk-BIQHA7UA.js";import{c as T,e as K,h as R,i as Z,j as x,l as N,m as U,n as $,p as ee,r as te,v as ne,w as oe}from"./chunk-DPLEMBB4.js";import{b as ie,c as le}from"./chunk-PXB4YEY3.js";import{d as F,f as Q,g as X}from"./chunk-GPEVUTDI.js";import{Dc as A,Eb as y,Ec as r,Fc as P,Gc as Y,Ic as b,Jc as w,Kb as f,Kc as D,Qc as k,Rc as J,Wb as p,bc as h,gc as o,hc as l,ic as V,mc as I,ob as z,qb as a,rc as v,sc as L,wb as C,ya as c,za as g}from"./chunk-T5ONJF63.js";function pe(t,u){if(t&1&&(o(0,"tr")(1,"td")(2,"a",11),V(3,"img",12),o(4,"span"),r(5),l()()(),o(6,"td"),r(7),l(),o(8,"td"),r(9),l()()),t&2){let n=u.$implicit;a(2),p("href","/menu/channel/marketplace/view?ID="+n.Key.ID,z),a(),p("src",n.Logo,z),a(2),P(n.Key.Name),a(2),P(n.Value.Out),a(2),P(n.Value.Tg)}}var We=(()=>{class t{constructor(n,i){this.dialogRef=n,this.data=i,this.generateChannelName(),this.channels=this.setChannelLogo(i.channels)}ngOnInit(){this.modalConfig=new _,this.modalConfig.title="Channel - New Order Configuration is not Unique!",this.modalConfig.headerType=me.Warning,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideClose=!0}setChannelLogo(n){return n.map(i=>(i.Logo=le.getChannelLogoByTypeId(i.Key.TypeID),i))}generateChannelName(){this.channelNames="";let n=this.data.channels;n.forEach((i,e)=>{this.channelNames+=`${i.Key} ${e!=n.length-1?" + ":""}`})}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-channel-warning"]],standalone:!1,decls:24,vars:2,consts:[[3,"onCancel","onClose","config"],["content","",1,"pt-2","px-4"],[1,"row"],[1,"col-12"],[1,"lh-base","fs-5"],[1,"mb-4"],[1,"table","table-bordered"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"fs-5","mt-4"],["href","https://support.dealpos.com/en/articles/8281096-setup-multiple-channel-marketplace-to-one-warehouse-outlet","target","_blank"],["target","_blank",3,"href"],[1,"me-3",2,"width","24px",3,"src"]],template:function(i,e){i&1&&(o(0,"modal-material",0),v("onCancel",function(){return e.onClose()})("onClose",function(){return e.onClose()}),o(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),r(5,"When your order configuration is not unique, your Dashboard Sales Report will be invalid. You can use either Outlet or Order Tag to differentiate Channel Order. "),l(),o(6,"h5",5),r(7,"Your duplicate Channels are"),l(),o(8,"table",6)(9,"thead")(10,"tr",7)(11,"th"),r(12,"Channel"),l(),o(13,"th"),r(14,"Outlet"),l(),o(15,"th"),r(16,"Tag"),l()()(),o(17,"tbody"),f(18,pe,10,5,"tr",8),l()(),o(19,"p",9),r(20," Please refer to this "),o(21,"a",10),r(22,"article"),l(),r(23," for more information "),l()()()()()),i&2&&(p("config",e.modalConfig),a(18),p("ngForOf",e.channels))},dependencies:[Q,S],encapsulation:2})}}return t})();var Ke=(()=>{class t{constructor(n,i,e){this.dialogRef=n,this.httpService=i,this.toastr=e,this.modalConfig=new _,this.modalConfig.title="Write Off Reason"}onSubmit(){let n={Name:this.reason};this.subscription=this.httpService.post("/api/channel/AddWriteoffOption",n).subscribe(i=>{this.toastr.success(i.Message,"Success"),this.dialogRef.close(n)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)(C(M),C(re),C(ae))}}static{this.\u0275cmp=y({type:t,selectors:[["app-dialog-writeOff-reason"]],standalone:!1,decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(i,e){if(i&1){let m=I();o(0,"modal-material",1),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(){return c(m),g(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(s){return c(m),w(e.reason,s)||(e.reason=s),g(s)}),l(),o(5,"label",5),r(6,"Reason"),l()()()()}i&2&&(p("dynamicValidated",e.reason)("config",e.modalConfig),a(3),b("ngModel",e.reason))},dependencies:[T,R,U,S],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]})}}return t})();var ue=t=>({invalid:t});function fe(t,u){t&1&&(o(0,"small"),r(1," URL is required "),l())}function ce(t,u){if(t&1&&(o(0,"div",13),f(1,fe,2,0,"small",14),l()),t&2){L();let n=A(10);a(),p("ngIf",n.errors.required)}}function ge(t,u){t&1&&(o(0,"small"),r(1," Email is required "),l())}function Ce(t,u){t&1&&(o(0,"small"),r(1," Email is not valid "),l())}function he(t,u){if(t&1&&(o(0,"div",13),f(1,ge,2,0,"small",14)(2,Ce,2,0,"small",14),l()),t&2){L();let n=A(16);a(),p("ngIf",n.errors.required),a(),p("ngIf",n.errors.pattern)}}var Be=(()=>{class t{constructor(n){this.dialogRef=n}ngOnInit(){this.formData={URL:"",Email:""},this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title="Fill data for Customer Support"}onSubmit(n){n!="Enter"&&this.dialogRef.close(this.formData)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||t)(C(M))}}static{this.\u0275cmp=y({type:t,selectors:[["app-contact-support"]],standalone:!1,decls:18,vars:9,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(i,e){if(i&1){let m=I();o(0,"modal-material",2),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(s){return c(m),g(e.onSubmit(s))}),o(1,"div",3)(2,"div",4)(3,"label",5),r(4,"Tokopedia URL"),l(),o(5,"div",6)(6,"div",7)(7,"span",8),r(8,"https://tokopedia.com/"),l()(),o(9,"input",9,0),D("ngModelChange",function(s){return c(m),w(e.formData.URL,s)||(e.formData.URL=s),g(s)}),l()(),f(11,ce,2,1,"div",10),o(12,"label",11),r(13,"Requester's Email"),l(),o(14,"div",6)(15,"input",12,1),D("ngModelChange",function(s){return c(m),w(e.formData.Email,s)||(e.formData.Email=s),g(s)}),l()(),f(17,he,3,2,"div",10),l()()()}if(i&2){let m=A(10),d=A(16);p("dynamicValidated",!m.invalid&&!d.invalid)("config",e.modalConfig),a(7),p("ngClass",k(7,ue,m.invalid&&(m.dirty||m.touched))),a(2),b("ngModel",e.formData.URL),a(2),p("ngIf",m.invalid&&(m.dirty||m.touched)),a(4),b("ngModel",e.formData.Email),a(2),p("ngIf",d.invalid&&(d.dirty||d.touched))}},dependencies:[F,X,T,R,ne,oe,U,S],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]})}}return t})();var Je=(()=>{class t{constructor(n,i){this.dialogRef=n,this.data=i}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-dialog-tokopedia"]],standalone:!1,decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(i,e){if(i&1){let m=I();o(0,"modal-material",1),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(){return c(m),g(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(s){return c(m),w(e.shopID,s)||(e.shopID=s),g(s)}),l(),o(5,"label",5),r(6,"Shop ID"),l()()()()}i&2&&(p("dynamicValidated",e.shopID)("config",e.modalConfig),a(3),b("ngModel",e.shopID))},dependencies:[T,R,U,S],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]})}}return t})();var _e=t=>({"input-group":t}),ye=(t,u)=>({"is-invalid":t,"input-shopify rounded-start":u}),se=t=>({"is-invalid":t});function ve(t,u){t&1&&(o(0,"label",3),r(1,"Shopify URL"),l())}function Me(t,u){t&1&&(o(0,"label",3),r(1,"URL"),l())}function Se(t,u){t&1&&(o(0,"span",6),r(1,"myshopify.com"),l())}function Te(t,u){if(t&1&&(o(0,"div"),r(1),l()),t&2){let n=L(2);a(),Y("",n.data==null?null:n.data.title," url is required")}}function Re(t,u){if(t&1&&(o(0,"div",7),f(1,Te,2,1,"div"),l()),t&2){let n,i=L();a(),h(!(i.formGroup==null||(n=i.formGroup.get("URL"))==null)&&n.getError("required")?1:-1)}}function be(t,u){t&1&&r(0," API Key ")}function we(t,u){t&1&&r(0," Consumer Key ")}function De(t,u){t&1&&(r(0," ("),o(1,"a",11),r(2,"help center article"),l(),r(3,") "))}function Ee(t,u){t&1&&(o(0,"div",7),r(1,"API Key is required"),l())}function Oe(t,u){t&1&&r(0," Admin API Access Token ")}function Ge(t,u){t&1&&r(0," Consumer Secret ")}function Ve(t,u){t&1&&(o(0,"div",7),r(1,"Consumer Secret is required"),l())}var et=(()=>{class t{constructor(n,i){this.dialogRef=n,this.data=i,this.modalConfig=new _,this.urlCtrl=new N(null),this.channelType=ie}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let n=[K.required];this.formGroup=new x({URL:new N(null,n),ConsumerKey:new N(null,[K.required]),ConsumerSecret:new N(null,[K.required])})}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let n=this.formGroup?.get("URL")?.getError("pattern"),i=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||n&&i&&e){let d=this.formGroup.value;this.data?.channelType==this.channelType.Shopify&&(d.URL=`${d.URL}.myshopify.com`),this.dialogRef.close(d)}}static{this.\u0275fac=function(i){return new(i||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-register-channel"]],standalone:!1,decls:23,vars:27,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation",3,"ngClass"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded",3,"placeholder","ngClass"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-secondary"],[1,"invalid-feedback"],[1,"mb-8","has-validation"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(i,e){if(i&1&&(o(0,"modal-material",0),v("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),o(1,"div",1)(2,"form",2),f(3,ve,2,0,"label",3),o(4,"div",4),f(5,Me,2,0,"label",3),V(6,"input",5),f(7,Se,2,0,"span",6)(8,Re,2,1,"div",7),l(),o(9,"div",8)(10,"label",3)(11,"span"),f(12,be,1,0)(13,we,1,0),l(),f(14,De,4,0),l(),V(15,"input",9),f(16,Ee,2,0,"div",7),l(),o(17,"div",8)(18,"label",3),f(19,Oe,1,0)(20,Ge,1,0),l(),V(21,"input",10),f(22,Ve,2,0,"div",7),l()()()()),i&2){let m,d,s,E,O,G;p("config",e.modalConfig),a(2),p("formGroup",e.formGroup),a(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),a(),p("ngClass",k(18,_e,(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),a(),h((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),a(),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"https://mydomain.com/")("ngClass",J(20,ye,(e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.invalid)&&((e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.dirty)||(e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),a(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),a(),h(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.invalid&&(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.dirty||!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.touched)?8:-1),a(4),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?12:13),a(2),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?14:-1),a(),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]")("ngClass",k(23,se,(e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.invalid)&&((e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.dirty)||(e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.touched)))),a(),h(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.getError("required")&&(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.dirty||!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.touched)?16:-1),a(3),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?19:20),a(2),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************")("ngClass",k(25,se,(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.invalid)&&((e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.dirty)||(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.touched)))),a(),h(!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.getError("required")&&(!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.dirty||!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.touched)?22:-1)}},dependencies:[F,$,T,R,Z,S,ee,te],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"]})}}return t})();export{We as a,Ke as b,Be as c,Je as d,et as e};
1
+ import{b as ae,e as re}from"./chunk-BUFEIJAI.js";import{b as M,c as W,i as me,j as _,k as S}from"./chunk-ITTRZMEX.js";import{c as T,e as K,h as R,i as Z,j as x,l as N,m as U,n as $,p as ee,r as te,v as ne,w as oe}from"./chunk-DPLEMBB4.js";import{b as ie,c as le}from"./chunk-PXB4YEY3.js";import{d as F,f as Q,g as X}from"./chunk-GPEVUTDI.js";import{Dc as A,Eb as y,Ec as r,Fc as P,Gc as Y,Ic as b,Jc as w,Kb as f,Kc as D,Qc as k,Rc as J,Wb as p,bc as h,gc as o,hc as l,ic as V,mc as I,ob as z,qb as a,rc as v,sc as L,wb as C,ya as c,za as g}from"./chunk-T5ONJF63.js";function pe(t,u){if(t&1&&(o(0,"tr")(1,"td")(2,"a",11),V(3,"img",12),o(4,"span"),r(5),l()()(),o(6,"td"),r(7),l(),o(8,"td"),r(9),l()()),t&2){let n=u.$implicit;a(2),p("href","/menu/channel/marketplace/view?ID="+n.Key.ID,z),a(),p("src",n.Logo,z),a(2),P(n.Key.Name),a(2),P(n.Value.Out),a(2),P(n.Value.Tg)}}var We=(()=>{class t{constructor(n,i){this.dialogRef=n,this.data=i,this.generateChannelName(),this.channels=this.setChannelLogo(i.channels)}ngOnInit(){this.modalConfig=new _,this.modalConfig.title="Channel - New Order Configuration is not Unique!",this.modalConfig.headerType=me.Warning,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideClose=!0}setChannelLogo(n){return n.map(i=>(i.Logo=le.getChannelLogoByTypeId(i.Key.TypeID),i))}generateChannelName(){this.channelNames="";let n=this.data.channels;n.forEach((i,e)=>{this.channelNames+=`${i.Key} ${e!=n.length-1?" + ":""}`})}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-channel-warning"]],standalone:!1,decls:24,vars:2,consts:[[3,"onCancel","onClose","config"],["content","",1,"pt-2","px-4"],[1,"row"],[1,"col-12"],[1,"lh-base","fs-5"],[1,"mb-4"],[1,"table","table-bordered"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"fs-5","mt-4"],["href","https://support.dealpos.com/en/articles/8281096-setup-multiple-channel-marketplace-to-one-warehouse-outlet","target","_blank"],["target","_blank",3,"href"],[1,"me-3",2,"width","24px",3,"src"]],template:function(i,e){i&1&&(o(0,"modal-material",0),v("onCancel",function(){return e.onClose()})("onClose",function(){return e.onClose()}),o(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),r(5,"When your order configuration is not unique, your Dashboard Sales Report will be invalid. You can use either Outlet or Order Tag to differentiate Channel Order. "),l(),o(6,"h5",5),r(7,"Your duplicate Channels are"),l(),o(8,"table",6)(9,"thead")(10,"tr",7)(11,"th"),r(12,"Channel"),l(),o(13,"th"),r(14,"Outlet"),l(),o(15,"th"),r(16,"Tag"),l()()(),o(17,"tbody"),f(18,pe,10,5,"tr",8),l()(),o(19,"p",9),r(20," Please refer to this "),o(21,"a",10),r(22,"article"),l(),r(23," for more information "),l()()()()()),i&2&&(p("config",e.modalConfig),a(18),p("ngForOf",e.channels))},dependencies:[Q,S],encapsulation:2})}}return t})();var Ke=(()=>{class t{constructor(n,i,e){this.dialogRef=n,this.httpService=i,this.toastr=e,this.modalConfig=new _,this.modalConfig.title="Write Off Reason"}onSubmit(){let n={Name:this.reason};this.subscription=this.httpService.post("/api/channel/AddWriteoffOption",n).subscribe(i=>{this.toastr.success(i.Message,"Success"),this.dialogRef.close(n)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)(C(M),C(re),C(ae))}}static{this.\u0275cmp=y({type:t,selectors:[["app-dialog-writeOff-reason"]],standalone:!1,decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(i,e){if(i&1){let m=I();o(0,"modal-material",1),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(){return c(m),g(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(s){return c(m),w(e.reason,s)||(e.reason=s),g(s)}),l(),o(5,"label",5),r(6,"Reason"),l()()()()}i&2&&(p("dynamicValidated",e.reason)("config",e.modalConfig),a(3),b("ngModel",e.reason))},dependencies:[T,R,U,S],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]})}}return t})();var ue=t=>({invalid:t});function fe(t,u){t&1&&(o(0,"small"),r(1," URL is required "),l())}function ce(t,u){if(t&1&&(o(0,"div",13),f(1,fe,2,0,"small",14),l()),t&2){L();let n=A(10);a(),p("ngIf",n.errors.required)}}function ge(t,u){t&1&&(o(0,"small"),r(1," Email is required "),l())}function Ce(t,u){t&1&&(o(0,"small"),r(1," Email is not valid "),l())}function he(t,u){if(t&1&&(o(0,"div",13),f(1,ge,2,0,"small",14)(2,Ce,2,0,"small",14),l()),t&2){L();let n=A(16);a(),p("ngIf",n.errors.required),a(),p("ngIf",n.errors.pattern)}}var Be=(()=>{class t{constructor(n){this.dialogRef=n}ngOnInit(){this.formData={URL:"",Email:""},this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title="Fill data for Customer Support"}onSubmit(n){n!="Enter"&&this.dialogRef.close(this.formData)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||t)(C(M))}}static{this.\u0275cmp=y({type:t,selectors:[["app-contact-support"]],standalone:!1,decls:18,vars:9,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(i,e){if(i&1){let m=I();o(0,"modal-material",2),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(s){return c(m),g(e.onSubmit(s))}),o(1,"div",3)(2,"div",4)(3,"label",5),r(4,"Tokopedia URL"),l(),o(5,"div",6)(6,"div",7)(7,"span",8),r(8,"https://tokopedia.com/"),l()(),o(9,"input",9,0),D("ngModelChange",function(s){return c(m),w(e.formData.URL,s)||(e.formData.URL=s),g(s)}),l()(),f(11,ce,2,1,"div",10),o(12,"label",11),r(13,"Requester's Email"),l(),o(14,"div",6)(15,"input",12,1),D("ngModelChange",function(s){return c(m),w(e.formData.Email,s)||(e.formData.Email=s),g(s)}),l()(),f(17,he,3,2,"div",10),l()()()}if(i&2){let m=A(10),d=A(16);p("dynamicValidated",!m.invalid&&!d.invalid)("config",e.modalConfig),a(7),p("ngClass",k(7,ue,m.invalid&&(m.dirty||m.touched))),a(2),b("ngModel",e.formData.URL),a(2),p("ngIf",m.invalid&&(m.dirty||m.touched)),a(4),b("ngModel",e.formData.Email),a(2),p("ngIf",d.invalid&&(d.dirty||d.touched))}},dependencies:[F,X,T,R,ne,oe,U,S],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]})}}return t})();var Je=(()=>{class t{constructor(n,i){this.dialogRef=n,this.data=i}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-dialog-tokopedia"]],standalone:!1,decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(i,e){if(i&1){let m=I();o(0,"modal-material",1),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(){return c(m),g(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(s){return c(m),w(e.shopID,s)||(e.shopID=s),g(s)}),l(),o(5,"label",5),r(6,"Shop ID"),l()()()()}i&2&&(p("dynamicValidated",e.shopID)("config",e.modalConfig),a(3),b("ngModel",e.shopID))},dependencies:[T,R,U,S],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]})}}return t})();var _e=t=>({"input-group":t}),ye=(t,u)=>({"is-invalid":t,"input-shopify rounded-start":u}),se=t=>({"is-invalid":t});function ve(t,u){t&1&&(o(0,"label",3),r(1,"Shopify URL"),l())}function Me(t,u){t&1&&(o(0,"label",3),r(1,"URL"),l())}function Se(t,u){t&1&&(o(0,"span",6),r(1,"myshopify.com"),l())}function Te(t,u){if(t&1&&(o(0,"div"),r(1),l()),t&2){let n=L(2);a(),Y("",n.data==null?null:n.data.title," url is required")}}function Re(t,u){if(t&1&&(o(0,"div",7),f(1,Te,2,1,"div"),l()),t&2){let n,i=L();a(),h(!(i.formGroup==null||(n=i.formGroup.get("URL"))==null)&&n.getError("required")?1:-1)}}function be(t,u){t&1&&r(0," API Key ")}function we(t,u){t&1&&r(0," Consumer Key ")}function De(t,u){t&1&&(r(0," ("),o(1,"a",11),r(2,"help center article"),l(),r(3,") "))}function Ee(t,u){t&1&&(o(0,"div",7),r(1,"API Key is required"),l())}function Oe(t,u){t&1&&r(0," Admin API Access Token ")}function Ge(t,u){t&1&&r(0," Consumer Secret ")}function Ve(t,u){t&1&&(o(0,"div",7),r(1,"Consumer Secret is required"),l())}var et=(()=>{class t{constructor(n,i){this.dialogRef=n,this.data=i,this.modalConfig=new _,this.urlCtrl=new N(null),this.channelType=ie}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let n=[K.required];this.formGroup=new x({URL:new N(null,n),ConsumerKey:new N(null,[K.required]),ConsumerSecret:new N(null,[K.required])})}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let n=this.formGroup?.get("URL")?.getError("pattern"),i=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||n&&i&&e){let d=this.formGroup.value;this.data?.channelType==this.channelType.Shopify&&(d.URL=`${d.URL}.myshopify.com`),this.dialogRef.close(d)}}static{this.\u0275fac=function(i){return new(i||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-register-channel"]],standalone:!1,decls:23,vars:27,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation",3,"ngClass"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded",3,"placeholder","ngClass"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-secondary"],[1,"invalid-feedback"],[1,"mb-8","has-validation"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(i,e){if(i&1&&(o(0,"modal-material",0),v("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),o(1,"div",1)(2,"form",2),f(3,ve,2,0,"label",3),o(4,"div",4),f(5,Me,2,0,"label",3),V(6,"input",5),f(7,Se,2,0,"span",6)(8,Re,2,1,"div",7),l(),o(9,"div",8)(10,"label",3)(11,"span"),f(12,be,1,0)(13,we,1,0),l(),f(14,De,4,0),l(),V(15,"input",9),f(16,Ee,2,0,"div",7),l(),o(17,"div",8)(18,"label",3),f(19,Oe,1,0)(20,Ge,1,0),l(),V(21,"input",10),f(22,Ve,2,0,"div",7),l()()()()),i&2){let m,d,s,E,O,G;p("config",e.modalConfig),a(2),p("formGroup",e.formGroup),a(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),a(),p("ngClass",k(18,_e,(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),a(),h((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),a(),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"https://mydomain.com/")("ngClass",J(20,ye,(e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.invalid)&&((e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.dirty)||(e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),a(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),a(),h(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.invalid&&(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.dirty||!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.touched)?8:-1),a(4),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?12:13),a(2),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?14:-1),a(),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]")("ngClass",k(23,se,(e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.invalid)&&((e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.dirty)||(e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.touched)))),a(),h(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.getError("required")&&(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.dirty||!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.touched)?16:-1),a(3),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?19:20),a(2),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************")("ngClass",k(25,se,(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.invalid)&&((e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.dirty)||(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.touched)))),a(),h(!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.getError("required")&&(!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.dirty||!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.touched)?22:-1)}},dependencies:[F,$,T,R,Z,S,ee,te],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"]})}}return t})();export{We as a,Ke as b,Be as c,Je as d,et as e};
@@ -1 +1 @@
1
- import{e as _e}from"./chunk-6IAGGRZN.js";import{a as pe,b as me,l as xe}from"./chunk-CHZLFJFI.js";import{b as ue,e as y}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{c as ee,h as te,i as ne,k as ie,m as oe,n as re,s as ae,t as se,u as de,v as ce,y as le}from"./chunk-DPLEMBB4.js";import{a as v,c as ge,d as fe,f as he}from"./chunk-PXB4YEY3.js";import{E as P,G as C,J as D,d as $,f as z,g as J,j as X,n as Z}from"./chunk-GPEVUTDI.js";import{Ac as q,Dc as O,Eb as _,Ec as a,Fb as A,Fc as b,Gc as H,Hc as B,Ic as E,Jc as I,Kb as f,Kc as L,Rc as Y,Wb as p,Z as R,Zc as G,_b as F,_c as Q,ad as K,gc as n,hc as r,ic as c,ja as V,jc as S,ka as T,kc as k,mc as N,ob as w,qb as s,rc as u,sc as m,wb as l,ya as h,yc as U,za as x,zc as W}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var be=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=V({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Ie(t,g){if(t&1&&(n(0,"swiper-slide")(1,"div")(2,"a",2),c(3,"img",3),r()(),n(4,"a",4),a(5),r(),n(6,"p",5),a(7),r()()),t&2){let e=g.$implicit;s(2),p("href",e.href,w),s(),p("src",e.imgSrc,w),s(),p("href",e.href,w),s(),b(e.title),s(2),b(e.description)}}var Ce=(()=>{class t{constructor(){this.newsList=[]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},standalone:!1,decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(i,o){i&1&&(n(0,"swiper-container",0),f(1,Ie,8,5,"swiper-slide",1),r()),i&2&&(s(),p("ngForOf",o.newsList))},dependencies:[z],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]})}}return t})();var Te=["subdomainEl"],Ae=(t,g)=>({"rounded-end":t,"border-end-0":g});function Ne(t,g){if(t&1&&(S(0),n(1,"div",36),c(2,"img",37),r(),k()),t&2){let e=g.$implicit;s(2),p("src",e.img,w)("title",e.title)("alt",e.title)}}function ze(t,g){if(t&1){let e=N();S(0),n(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),n(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),n(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),c(11,"i",24),r()(),n(12,"input",25,1),L("ngModelChange",function(o){h(e);let d=m();return I(d.subdomain,o)||(d.subdomain=o),x(o)}),r(),n(14,"div")(15,"select",26),L("ngModelChange",function(o){h(e);let d=m();return I(d.domain,o)||(d.domain=o),x(o)}),n(16,"option",27),a(17,".dealpos.co.id"),r(),n(18,"option",28),a(19,".dealpos.net"),r(),n(20,"option",29),a(21,".dealpos.com"),r(),n(22,"option",30),a(23,".dealpos.app"),r()()()(),n(24,"div",31)(25,"button",32),u("click",function(){h(e);let o=m();return x(o.onNextState())}),a(26," Next "),r()(),n(27,"div",33)(28,"div",34),f(29,Ne,3,3,"ng-container",35),r()()()(),k()}if(t&2){let e=m();s(12),E("ngModel",e.subdomain),s(3),E("ngModel",e.domain),s(14),p("ngForOf",e.channels)}}function De(t,g){t&1&&(n(0,"p"),a(1," Username is required "),r())}function je(t,g){if(t&1&&(S(0),n(1,"div",57),c(2,"div",58),n(3,"div",59),f(4,De,2,0,"p",47),r()(),k()),t&2){m();let e=O(14);s(4),p("ngIf",e.errors.required)}}function Re(t,g){if(t&1){let e=N();n(0,"i",62),u("click",function(){h(e);let o=m(3);return x(o.hideShowPassword())}),r()}if(t&2){let e=m(3);F("fa "+e.passwordIcon)}}function Ve(t,g){if(t&1&&(n(0,"span",60),f(1,Re,1,2,"i",61),r()),t&2){let e=m(2);s(),p("ngIf",e.password)}}function Fe(t,g){t&1&&(n(0,"p"),a(1," Password is required "),r())}function Ue(t,g){if(t&1&&(S(0),n(1,"div",57),c(2,"div",58),n(3,"div",59),f(4,Fe,2,0,"p",47),r()(),k()),t&2){m();let e=O(21);s(4),p("ngIf",e.errors.required)}}function We(t,g){if(t&1){let e=N();n(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),n(3,"h3",40),a(4," to "),n(5,"h6",41),a(6),r(),n(7,"i",42),u("click",function(){h(e);let o=m();return x(o.onEditDomain())}),r()()(),n(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),c(12,"i",45),r()(),n(13,"input",46,2),L("ngModelChange",function(o){h(e);let d=m();return I(d.username,o)||(d.username=o),x(o)}),r()(),f(15,je,5,1,"ng-container",47),n(16,"div",22)(17,"div",23)(18,"span"),c(19,"i",48),r()(),n(20,"input",49,3),L("ngModelChange",function(o){h(e);let d=m();return I(d.password,o)||(d.password=o),x(o)}),r(),f(22,Ve,2,1,"span",50),r(),f(23,Ue,5,1,"ng-container",47),n(24,"div",51)(25,"button",52),u("click",function(){h(e);let o=m();return x(o.onLogin())}),a(26," Log in "),r()(),n(27,"div",53),c(28,"hr"),n(29,"span",54),a(30,"or"),r(),c(31,"hr"),r(),n(32,"div")(33,"button",55),u("click",function(o){h(e);let d=m();return x(d.onLoginByGoogle(o))}),c(34,"i",56),a(35," Sign In with Google "),r()()()}if(t&2){let e=O(14),i=O(21),o=m();s(6),B(" (",o.subdomain,"",o.domain,") "),s(7),E("ngModel",o.username),s(2),p("ngIf",e.invalid&&(e.dirty||e.touched)),s(5),p("type",o.passwordType)("ngClass",Y(9,Ae,o.browser=="edge",o.browser!="edge")),E("ngModel",o.password),s(2),p("ngIf",o.browser!="edge"),s(),p("ngIf",i.invalid&&(i.dirty||i.touched))}}var ve=(()=>{class t{constructor(e,i,o,d,Se){this._router=e,this.toastr=i,this.checkBrowser=o,this.authService=d,this.ngxPermission=Se,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:v.SHOOPE},{title:"Tokopedia",img:v.TOKOPEDIA},{title:"Tiktok",img:v.TIKTOK},{title:"Woocommerce",img:v.WOOCOMMERCE},{title:"Lazada",img:v.LAZADA},{title:"Shopify",img:v.SHOPIFY},{title:"Plugo",img:v.PLUGONEW}],this.version=me.version,this.news$=d.getNews().pipe(R(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username=e?.username,this.subdomain=e?.Host?.split(".")[0];let i=e?.Host?.split("dealpos");this.domain=`.dealpos${i[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ge.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");e!=-1&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let e={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(e).subscribe(i=>{this.onSuccessLogin(i)})}onLoginByGoogle(e){let i=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(e,i).subscribe(o=>{this.onSuccessLogin(o)})}onSuccessLogin(e){this.ngxPermission.hasPermission([pe.dashboardView]).then(i=>{i?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(i){return new(i||t)(l(C),l(ue),l(be),l(xe),l(fe))}}static{this.\u0275cmp=_({type:t,selectors:[["app-login"]],viewQuery:function(i,o){if(i&1&&U(Te,5),i&2){let d;W(d=q())&&(o.subdomainEl=d.first)}},standalone:!1,decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(i,o){if(i&1&&(n(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),c(5,"POS-news-swiper",8),G(6,"async"),r(),n(7,"div",9),f(8,ze,30,3,"ng-container",10)(9,We,36,12,"ng-template",null,0,K),r()(),n(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),c(14,"a",13),r(),n(15,"div",14)(16,"a",15),a(17),c(18,"i",16),r()()()),i&2){let d=O(10);s(5),p("newsList",Q(6,5,o.news$)),s(3),p("ngIf",o.loginState=="FORM_DOMAIN")("ngIfElse",d),s(8),p("href",o.changelogUrl,w),s(),H("version ",o.version,"")}},dependencies:[$,z,J,re,se,de,ee,ae,te,ne,ce,oe,ie,Ce,X],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]})}}return t})();var Me=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(o=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["shopee-authorized"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),n(13,"div"),a(14," Your shopID is "),n(15,"span",8),a(16),r()(),n(17,"button",9),u("click",function(){return o.addShopee()}),c(18,"i",10),a(19," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]})}}return t})();var Oe=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){let e={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["app-tiktok"]],standalone:!1,decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),r()(),n(17,"div"),a(18," Your State is "),n(19,"span",8),a(20),r()(),n(21,"button",9),u("click",function(){return o.addChannelTiktok()}),c(22,"i",10),a(23," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.code),s(4),b(o.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]})}}return t})();var Pe=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){let e={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["app-lazada"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),r()(),n(17,"button",9),u("click",function(){return o.addChannelLazada()}),c(18,"i",10),a(19," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.code))},encapsulation:2})}}return t})();var qe=[{path:"",component:ve,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Me,data:{title:"Success"}},{path:"tiktok",component:Oe,data:{title:"Success"}},{path:"lazada",component:Pe,data:{title:"Success"}}],ye=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=A({type:t})}static{this.\u0275inj=T({imports:[D.forChild(qe),D]})}}return t})();var Pt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=A({type:t})}static{this.\u0275inj=T({imports:[Z,le,ye,_e,he]})}}return t})();export{Pt as LoginModule};
1
+ import{e as _e}from"./chunk-6IAGGRZN.js";import{a as pe,b as me,l as xe}from"./chunk-LEMNVA5V.js";import{b as ue,e as y}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{c as ee,h as te,i as ne,k as ie,m as oe,n as re,s as ae,t as se,u as de,v as ce,y as le}from"./chunk-DPLEMBB4.js";import{a as v,c as ge,d as fe,f as he}from"./chunk-PXB4YEY3.js";import{E as P,G as C,J as D,d as $,f as z,g as J,j as X,n as Z}from"./chunk-GPEVUTDI.js";import{Ac as q,Dc as O,Eb as _,Ec as a,Fb as A,Fc as b,Gc as H,Hc as B,Ic as E,Jc as I,Kb as f,Kc as L,Rc as Y,Wb as p,Z as R,Zc as G,_b as F,_c as Q,ad as K,gc as n,hc as r,ic as c,ja as V,jc as S,ka as T,kc as k,mc as N,ob as w,qb as s,rc as u,sc as m,wb as l,ya as h,yc as U,za as x,zc as W}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var be=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=V({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Ie(t,g){if(t&1&&(n(0,"swiper-slide")(1,"div")(2,"a",2),c(3,"img",3),r()(),n(4,"a",4),a(5),r(),n(6,"p",5),a(7),r()()),t&2){let e=g.$implicit;s(2),p("href",e.href,w),s(),p("src",e.imgSrc,w),s(),p("href",e.href,w),s(),b(e.title),s(2),b(e.description)}}var Ce=(()=>{class t{constructor(){this.newsList=[]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},standalone:!1,decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(i,o){i&1&&(n(0,"swiper-container",0),f(1,Ie,8,5,"swiper-slide",1),r()),i&2&&(s(),p("ngForOf",o.newsList))},dependencies:[z],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]})}}return t})();var Te=["subdomainEl"],Ae=(t,g)=>({"rounded-end":t,"border-end-0":g});function Ne(t,g){if(t&1&&(S(0),n(1,"div",36),c(2,"img",37),r(),k()),t&2){let e=g.$implicit;s(2),p("src",e.img,w)("title",e.title)("alt",e.title)}}function ze(t,g){if(t&1){let e=N();S(0),n(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),n(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),n(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),c(11,"i",24),r()(),n(12,"input",25,1),L("ngModelChange",function(o){h(e);let d=m();return I(d.subdomain,o)||(d.subdomain=o),x(o)}),r(),n(14,"div")(15,"select",26),L("ngModelChange",function(o){h(e);let d=m();return I(d.domain,o)||(d.domain=o),x(o)}),n(16,"option",27),a(17,".dealpos.co.id"),r(),n(18,"option",28),a(19,".dealpos.net"),r(),n(20,"option",29),a(21,".dealpos.com"),r(),n(22,"option",30),a(23,".dealpos.app"),r()()()(),n(24,"div",31)(25,"button",32),u("click",function(){h(e);let o=m();return x(o.onNextState())}),a(26," Next "),r()(),n(27,"div",33)(28,"div",34),f(29,Ne,3,3,"ng-container",35),r()()()(),k()}if(t&2){let e=m();s(12),E("ngModel",e.subdomain),s(3),E("ngModel",e.domain),s(14),p("ngForOf",e.channels)}}function De(t,g){t&1&&(n(0,"p"),a(1," Username is required "),r())}function je(t,g){if(t&1&&(S(0),n(1,"div",57),c(2,"div",58),n(3,"div",59),f(4,De,2,0,"p",47),r()(),k()),t&2){m();let e=O(14);s(4),p("ngIf",e.errors.required)}}function Re(t,g){if(t&1){let e=N();n(0,"i",62),u("click",function(){h(e);let o=m(3);return x(o.hideShowPassword())}),r()}if(t&2){let e=m(3);F("fa "+e.passwordIcon)}}function Ve(t,g){if(t&1&&(n(0,"span",60),f(1,Re,1,2,"i",61),r()),t&2){let e=m(2);s(),p("ngIf",e.password)}}function Fe(t,g){t&1&&(n(0,"p"),a(1," Password is required "),r())}function Ue(t,g){if(t&1&&(S(0),n(1,"div",57),c(2,"div",58),n(3,"div",59),f(4,Fe,2,0,"p",47),r()(),k()),t&2){m();let e=O(21);s(4),p("ngIf",e.errors.required)}}function We(t,g){if(t&1){let e=N();n(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),n(3,"h3",40),a(4," to "),n(5,"h6",41),a(6),r(),n(7,"i",42),u("click",function(){h(e);let o=m();return x(o.onEditDomain())}),r()()(),n(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),c(12,"i",45),r()(),n(13,"input",46,2),L("ngModelChange",function(o){h(e);let d=m();return I(d.username,o)||(d.username=o),x(o)}),r()(),f(15,je,5,1,"ng-container",47),n(16,"div",22)(17,"div",23)(18,"span"),c(19,"i",48),r()(),n(20,"input",49,3),L("ngModelChange",function(o){h(e);let d=m();return I(d.password,o)||(d.password=o),x(o)}),r(),f(22,Ve,2,1,"span",50),r(),f(23,Ue,5,1,"ng-container",47),n(24,"div",51)(25,"button",52),u("click",function(){h(e);let o=m();return x(o.onLogin())}),a(26," Log in "),r()(),n(27,"div",53),c(28,"hr"),n(29,"span",54),a(30,"or"),r(),c(31,"hr"),r(),n(32,"div")(33,"button",55),u("click",function(o){h(e);let d=m();return x(d.onLoginByGoogle(o))}),c(34,"i",56),a(35," Sign In with Google "),r()()()}if(t&2){let e=O(14),i=O(21),o=m();s(6),B(" (",o.subdomain,"",o.domain,") "),s(7),E("ngModel",o.username),s(2),p("ngIf",e.invalid&&(e.dirty||e.touched)),s(5),p("type",o.passwordType)("ngClass",Y(9,Ae,o.browser=="edge",o.browser!="edge")),E("ngModel",o.password),s(2),p("ngIf",o.browser!="edge"),s(),p("ngIf",i.invalid&&(i.dirty||i.touched))}}var ve=(()=>{class t{constructor(e,i,o,d,Se){this._router=e,this.toastr=i,this.checkBrowser=o,this.authService=d,this.ngxPermission=Se,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:v.SHOOPE},{title:"Tokopedia",img:v.TOKOPEDIA},{title:"Tiktok",img:v.TIKTOK},{title:"Woocommerce",img:v.WOOCOMMERCE},{title:"Lazada",img:v.LAZADA},{title:"Shopify",img:v.SHOPIFY},{title:"Plugo",img:v.PLUGONEW}],this.version=me.version,this.news$=d.getNews().pipe(R(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username=e?.username,this.subdomain=e?.Host?.split(".")[0];let i=e?.Host?.split("dealpos");this.domain=`.dealpos${i[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ge.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");e!=-1&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let e={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(e).subscribe(i=>{this.onSuccessLogin(i)})}onLoginByGoogle(e){let i=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(e,i).subscribe(o=>{this.onSuccessLogin(o)})}onSuccessLogin(e){this.ngxPermission.hasPermission([pe.dashboardView]).then(i=>{i?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(i){return new(i||t)(l(C),l(ue),l(be),l(xe),l(fe))}}static{this.\u0275cmp=_({type:t,selectors:[["app-login"]],viewQuery:function(i,o){if(i&1&&U(Te,5),i&2){let d;W(d=q())&&(o.subdomainEl=d.first)}},standalone:!1,decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(i,o){if(i&1&&(n(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),c(5,"POS-news-swiper",8),G(6,"async"),r(),n(7,"div",9),f(8,ze,30,3,"ng-container",10)(9,We,36,12,"ng-template",null,0,K),r()(),n(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),c(14,"a",13),r(),n(15,"div",14)(16,"a",15),a(17),c(18,"i",16),r()()()),i&2){let d=O(10);s(5),p("newsList",Q(6,5,o.news$)),s(3),p("ngIf",o.loginState=="FORM_DOMAIN")("ngIfElse",d),s(8),p("href",o.changelogUrl,w),s(),H("version ",o.version,"")}},dependencies:[$,z,J,re,se,de,ee,ae,te,ne,ce,oe,ie,Ce,X],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]})}}return t})();var Me=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(o=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["shopee-authorized"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),n(13,"div"),a(14," Your shopID is "),n(15,"span",8),a(16),r()(),n(17,"button",9),u("click",function(){return o.addShopee()}),c(18,"i",10),a(19," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]})}}return t})();var Oe=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){let e={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["app-tiktok"]],standalone:!1,decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),r()(),n(17,"div"),a(18," Your State is "),n(19,"span",8),a(20),r()(),n(21,"button",9),u("click",function(){return o.addChannelTiktok()}),c(22,"i",10),a(23," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.code),s(4),b(o.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]})}}return t})();var Pe=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){let e={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["app-lazada"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),r()(),n(17,"button",9),u("click",function(){return o.addChannelLazada()}),c(18,"i",10),a(19," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.code))},encapsulation:2})}}return t})();var qe=[{path:"",component:ve,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Me,data:{title:"Success"}},{path:"tiktok",component:Oe,data:{title:"Success"}},{path:"lazada",component:Pe,data:{title:"Success"}}],ye=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=A({type:t})}static{this.\u0275inj=T({imports:[D.forChild(qe),D]})}}return t})();var Pt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=A({type:t})}static{this.\u0275inj=T({imports:[Z,le,ye,_e,he]})}}return t})();export{Pt as LoginModule};
@@ -1 +1 @@
1
- import{l as d}from"./chunk-CHZLFJFI.js";import{b as u}from"./chunk-BUFEIJAI.js";import{G as h}from"./chunk-GPEVUTDI.js";import{ja as c,oa as s}from"./chunk-T5ONJF63.js";import{i as n}from"./chunk-K2H6WANG.js";var A=(()=>{class i{constructor(t,e,r){this.toastr=t,this.authService=e,this.router=r}canActivate(t,e){return n(this,null,function*(){let r=JSON.parse(window.localStorage.getItem("user")),a=new Date,o=!1;if(r!=null){let l=new Date(r?.Token?.expiredAt);a<l?o=yield this.checkDashboardAccess(t):(this.authService.logout(),this.onTokenExpired())}else this.router.navigate([""]),this.onTokenExpired();return o})}checkDashboardAccess(t){return n(this,null,function*(){let e=!0;if(t?.url[0]?.path=="dashboard"){let a=yield this.authService.redirectUrl();a.includes("dashboard")||this.router.navigate([a])}return e})}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired")}static{this.\u0275fac=function(e){return new(e||i)(s(u),s(d),s(h))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{A as a};
1
+ import{l as d}from"./chunk-LEMNVA5V.js";import{b as u}from"./chunk-BUFEIJAI.js";import{G as h}from"./chunk-GPEVUTDI.js";import{ja as c,oa as s}from"./chunk-T5ONJF63.js";import{i as n}from"./chunk-K2H6WANG.js";var A=(()=>{class i{constructor(t,e,r){this.toastr=t,this.authService=e,this.router=r}canActivate(t,e){return n(this,null,function*(){let r=JSON.parse(window.localStorage.getItem("user")),a=new Date,o=!1;if(r!=null){let l=new Date(r?.Token?.expiredAt);a<l?o=yield this.checkDashboardAccess(t):(this.authService.logout(),this.onTokenExpired())}else this.router.navigate([""]),this.onTokenExpired();return o})}checkDashboardAccess(t){return n(this,null,function*(){let e=!0;if(t?.url[0]?.path=="dashboard"){let a=yield this.authService.redirectUrl();a.includes("dashboard")||this.router.navigate([a])}return e})}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired")}static{this.\u0275fac=function(e){return new(e||i)(s(u),s(d),s(h))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{A as a};
@@ -0,0 +1 @@
1
+ import{a as j}from"./chunk-GBABJLPQ.js";import{a as z}from"./chunk-KVP6OL4J.js";import"./chunk-77IUCPIQ.js";import"./chunk-7GQIIDFF.js";import"./chunk-VETHPEVU.js";import"./chunk-75BDXSG3.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import{a as H,b as q}from"./chunk-7FUVW73P.js";import"./chunk-M3SJUKTG.js";import"./chunk-CH2MLZU7.js";import"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-KHWTOD6H.js";import{m as J,n as O}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as W,h as R,m as k,y as N}from"./chunk-DPLEMBB4.js";import{H as T,J as B,f as w,j as E,k as A,m as F,n as D}from"./chunk-GPEVUTDI.js";import{$c as S,Eb as b,Ec as a,Gc as f,Ic as g,Jc as u,Kb as I,Kc as y,Pc as M,Qc as P,Wb as d,Z as h,Zc as p,_b as L,_c as c,gc as n,hc as o,qb as r,rc as C,v,wb as _}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var G=()=>["/menu/log/inventory/detail"],K=l=>({ID:l});function Q(l,V){if(l&1&&(n(0,"tr")(1,"td")(2,"a",18),a(3),p(4,"date"),o()(),n(5,"td"),a(6),p(7,"number"),o(),n(8,"td")(9,"span",19),a(10),o()()()),l&2){let t=V.$implicit;r(2),d("routerLink",M(13,G))("queryParams",P(14,K,t._id)),r(),f(" ",S(4,7,t==null?null:t._source["@timestamp"],"dd MMM yyyy HH:mm:ss")," "),r(3),f("",S(7,10,t.DurationInSecond,"1.1-1")," s"),r(3),L((t==null?null:t.respCode)===200||(t==null?null:t.respCode)===202?"bg-success":"bg-warning"),r(),f(" ",t==null?null:t.respCode," ")}}var me=(()=>{class l{constructor(t){this.inventoryAsyncServiceLog=t,this.filters={PageNumber:1,RowCount:100,From:null,To:null,StatusCode:"",JobID:""}}ngOnInit(){this.initInventoryLog()}initInventoryLog(){let t=this.inventoryAsyncServiceLog.getInventoryAsyncLog(this.filters).pipe(h(1));this.inventoryLog$=t.pipe(v(m=>m?.hits)),this.totalPagination$=t.pipe(v(m=>m?.total.value))}onPaginationChange(t){this.filters.PageNumber=t.pageIndex+1,this.initInventoryLog()}onSubmitFilter(){this.initInventoryLog()}static{this.\u0275fac=function(m){return new(m||l)(_(j))}}static{this.\u0275cmp=b({type:l,selectors:[["app-inventory-async-log"]],decls:42,vars:17,consts:[["headerTitle","Order Inventory Sync Job",3,"onSubmit","hideSearchBox"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-success"],["container",""],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"mt-5"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","JobID",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(m,e){m&1&&(n(0,"mainpanel",0),C("onSubmit",function(){return e.onSubmitFilter()}),n(1,"actions")(2,"a",1),a(3," Channel Inventory Sync "),o()(),n(4,"filters")(5,"div",2)(6,"div")(7,"label",3),a(8,"From/To"),o(),n(9,"div",4)(10,"datepicker",5),y("dateChange",function(i){return u(e.filters.From,i)||(e.filters.From=i),i}),o()(),n(11,"div")(12,"datepicker",6),y("dateChange",function(i){return u(e.filters.To,i)||(e.filters.To=i),i}),o()()(),n(13,"div",7)(14,"label"),a(15,"Response Code"),o(),n(16,"input",8),y("ngModelChange",function(i){return u(e.filters.StatusCode,i)||(e.filters.StatusCode=i),i}),o()(),n(17,"div",7)(18,"label"),a(19,"JobID"),o(),n(20,"input",9),y("ngModelChange",function(i){return u(e.filters.JobID,i)||(e.filters.JobID=i),i}),o()()()(),n(21,"content")(22,"div",10)(23,"div",11)(24,"div",12)(25,"div",13)(26,"table",14)(27,"thead")(28,"tr",15)(29,"th"),a(30,"Created"),o(),n(31,"th"),a(32,"Duration"),o(),n(33,"th"),a(34,"Response code"),o()()(),n(35,"tbody"),I(36,Q,11,16,"tr",16),p(37,"async"),o()(),n(38,"mat-paginator",17),p(39,"async"),p(40,"async"),p(41,"async"),C("page",function(i){return e.onPaginationChange(i)}),o()()()()()()()),m&2&&(d("hideSearchBox",!0),r(10),g("date",e.filters.From),r(2),g("date",e.filters.To),r(4),g("ngModel",e.filters.StatusCode),r(4),g("ngModel",e.filters.JobID),r(16),d("ngForOf",c(37,9,e.inventoryLog$)),r(2),d("length",c(39,11,e.totalPagination$))("pageSize",e.filters.RowCount>c(40,13,e.totalPagination$)?c(41,15,e.totalPagination$):e.filters.RowCount)("pageIndex",(e.filters==null?null:e.filters.PageNumber)==0?0:(e.filters==null?null:e.filters.PageNumber)-1))},dependencies:[N,W,R,k,D,w,E,F,A,O,J,q,H,z,B,T],encapsulation:2})}}return l})();export{me as InventoryAsyncLogComponent};