marketplacepos 5.51.0 → 5.51.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/Marketplace/{chunk-53B6D5OR.js → chunk-26E54WQH.js} +1 -1
  2. package/Marketplace/{chunk-AZEH7PMO.js → chunk-3KECTTUV.js} +1 -1
  3. package/Marketplace/{chunk-WEJBY3OB.js → chunk-4XA7JWTB.js} +1 -1
  4. package/Marketplace/{chunk-BLOGT3TL.js → chunk-575TS45M.js} +1 -1
  5. package/Marketplace/{chunk-ZMSM2NR7.js → chunk-75RVMUFO.js} +1 -1
  6. package/Marketplace/{chunk-36OIR6DM.js → chunk-AMQMYSQR.js} +1 -1
  7. package/Marketplace/{chunk-7E6JD2PT.js → chunk-APQWBZOM.js} +1 -1
  8. package/Marketplace/{chunk-EYYKWIXP.js → chunk-AVSAALDJ.js} +1 -1
  9. package/Marketplace/{chunk-AF6XAQPY.js → chunk-AVTQG66S.js} +1 -1
  10. package/Marketplace/{chunk-T62YFSKW.js → chunk-BKVIOCLH.js} +1 -1
  11. package/Marketplace/{chunk-IXNEMOFX.js → chunk-BZ7QY7N3.js} +1 -1
  12. package/Marketplace/{chunk-GD5I7ADU.js → chunk-CHCAQ4NV.js} +1 -1
  13. package/Marketplace/{chunk-Q5IVQP3E.js → chunk-DCMOITWM.js} +1 -1
  14. package/Marketplace/{chunk-VBVBTC2P.js → chunk-DOQD3RMB.js} +1 -1
  15. package/Marketplace/{chunk-YF7CCYHF.js → chunk-DV3BDHBL.js} +1 -1
  16. package/Marketplace/{chunk-OPCGCQMZ.js → chunk-DVJ7VXWL.js} +1 -1
  17. package/Marketplace/{chunk-XSOP2OTT.js → chunk-DW7R34MP.js} +1 -1
  18. package/Marketplace/{chunk-J4RDYEJC.js → chunk-EXKAFEQL.js} +1 -1
  19. package/Marketplace/{chunk-HT2MSA66.js → chunk-FQM4RKLX.js} +1 -1
  20. package/Marketplace/{chunk-EGJMTFNO.js → chunk-GYQHWDWX.js} +1 -1
  21. package/Marketplace/{chunk-SASGSPGQ.js → chunk-HO6XCGRR.js} +1 -1
  22. package/Marketplace/{chunk-HZTKN5RX.js → chunk-HPQDUJXF.js} +1 -1
  23. package/Marketplace/{chunk-E6W25RW5.js → chunk-ICY32GYN.js} +1 -1
  24. package/Marketplace/{chunk-ILFUI3MT.js → chunk-ILFG3IYB.js} +1 -1
  25. package/Marketplace/{chunk-4JCS7WPV.js → chunk-IUJ6UX3L.js} +1 -1
  26. package/Marketplace/{chunk-62YNPW6Q.js → chunk-J4552BMI.js} +1 -1
  27. package/Marketplace/{chunk-M5JNIPMS.js → chunk-JUN3HVEV.js} +1 -1
  28. package/Marketplace/{chunk-BKCKASH3.js → chunk-KHGTW7IV.js} +1 -1
  29. package/Marketplace/{chunk-364CDNZV.js → chunk-KVLHLMO4.js} +1 -1
  30. package/Marketplace/{chunk-5YQUGH5Z.js → chunk-LB276KSA.js} +1 -1
  31. package/Marketplace/{chunk-3Q6QZGLZ.js → chunk-MG7B4OWR.js} +1 -1
  32. package/Marketplace/{chunk-T3CN3WQD.js → chunk-MRWGPCR7.js} +1 -1
  33. package/Marketplace/{chunk-2PMJPSC4.js → chunk-N6VPSXF7.js} +2 -2
  34. package/Marketplace/{chunk-K2CHDL7K.js → chunk-NEB6AMMM.js} +1 -1
  35. package/Marketplace/{chunk-4ITXH35D.js → chunk-NKN7T3C3.js} +1 -1
  36. package/Marketplace/{chunk-C64L25TP.js → chunk-NMOQXVWS.js} +1 -1
  37. package/Marketplace/{chunk-7RIUHK6K.js → chunk-NUF326RW.js} +1 -1
  38. package/Marketplace/{chunk-SLQ42VND.js → chunk-NX3QFU4A.js} +1 -1
  39. package/Marketplace/{chunk-LWUMLKSO.js → chunk-OEUA6IL2.js} +1 -1
  40. package/Marketplace/{chunk-OJI34QN5.js → chunk-PGQYHHH3.js} +1 -1
  41. package/Marketplace/{chunk-6DGG765N.js → chunk-Q3Z7EEVP.js} +1 -1
  42. package/Marketplace/{chunk-ZMMMNVOU.js → chunk-QJ7SMXW4.js} +1 -1
  43. package/Marketplace/{chunk-LOVYZLSU.js → chunk-QLFVXMNJ.js} +1 -1
  44. package/Marketplace/{chunk-TLTFNFAB.js → chunk-QPELTSKE.js} +1 -1
  45. package/Marketplace/{chunk-ZXFWQ6VJ.js → chunk-QUIZLT5F.js} +1 -1
  46. package/Marketplace/{chunk-LCN52IJT.js → chunk-REDQ2L7Y.js} +1 -1
  47. package/Marketplace/{chunk-7QDKBMEA.js → chunk-SLCKHYT3.js} +1 -1
  48. package/Marketplace/{chunk-XAL6YLNQ.js → chunk-U4ARIHUF.js} +1 -1
  49. package/Marketplace/{chunk-A4X7F4MN.js → chunk-UHWLUO2C.js} +1 -1
  50. package/Marketplace/{chunk-R3BRUX7Z.js → chunk-UJAA73LE.js} +1 -1
  51. package/Marketplace/{chunk-EX4C4ZW4.js → chunk-UOFJCKS5.js} +1 -1
  52. package/Marketplace/{chunk-6IZWIEUD.js → chunk-VRD2D2BP.js} +1 -1
  53. package/Marketplace/{chunk-WH76SMZT.js → chunk-WZQRKTBN.js} +1 -1
  54. package/Marketplace/{chunk-BVW7WI5I.js → chunk-YFR3EI3B.js} +1 -1
  55. package/Marketplace/{chunk-OMY5ASFA.js → chunk-YMOSVDG5.js} +1 -1
  56. package/Marketplace/{chunk-25Q56ATV.js → chunk-YSYA7XCF.js} +1 -1
  57. package/Marketplace/index.html +2 -2
  58. package/Marketplace/{main-SOO5LINL.js → main-I5THR2C3.js} +1 -1
  59. package/package.json +1 -1
@@ -1 +1 @@
1
- import{a as N}from"./chunk-ISMIPSYN.js";import{a as Te}from"./chunk-A6SP65CH.js";import{a as Fe,b as ve,c as be,d as L,e as W}from"./chunk-C67KF7MG.js";import{a as we}from"./chunk-TYSM3R5E.js";import{a as Pe,b as ye}from"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as xe,d as Se}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as he}from"./chunk-BZWZ64N5.js";import{a as fe}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as ue}from"./chunk-DLHIDOS3.js";import{a as ge}from"./chunk-LCN52IJT.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as me,b as Ce}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as pe}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ae}from"./chunk-ZSUWHVKX.js";import{h as oe}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as ne,c as ie}from"./chunk-NB2H6KA7.js";import{c as Y}from"./chunk-UPRDDI4K.js";import{A as de,b as re,c as le,h as ce,m as se,o as _e}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as ee,e as te}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as E,B as Q,G as X,q as J,w as Z}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as A,Hb as q,Ia as H,Nb as M,Nc as p,Oc as B,Pc as T,Rc as P,Sc as y,Tc as w,Xc as G,Z as $,_c as K,ac as h,ad as V,cc as g,dc as k,ea as z,fc as O,gc as R,hc as C,ic as a,id as v,jc as l,jd as b,kc as F,kd as j,mb as D,ob as c,ra as u,rc as S,wc as x,ya as _,yc as r,za as d}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var U=o=>[o],Ve=o=>({"text-decoration-line-through":o}),Ie=o=>({"bg-gradient-warning":o});function De(o,s){if(o&1){let e=S();a(0,"button",13),x("click",function(){_(e);let t=r(),i=r(2);return d(i.updateStock(t))}),F(1,"i",14),p(2," Update "),l()}}function Ee(o,s){if(o&1){let e=S();a(0,"div",8),h(1,De,3,0,"button",10),a(2,"button",11),x("click",function(){_(e);let t=r(2);return d(t.openExportDialog())}),F(3,"i",12),a(4,"span"),p(5,"Export"),l()()()}if(o&2){let e=r(2);c(),g(e.productService.hasSelectionVariant(s)?1:-1)}}function Me(o,s){if(o&1){let e=S();a(0,"th")(1,"input",28),x("change",function(t){_(e);let i=r(),m=r(2);return d(m.onSelectAllSKU(t.target.checked,i))}),l()()}}function Ne(o,s){if(o&1){let e=S();a(0,"input",46),w("ngModelChange",function(t){_(e);let i=r(4).$implicit;return y(i.selected,t)||(i.selected=t),d(t)}),x("ngModelChange",function(){_(e);let t=r(4).$implicit,i=r(3);return d(i.onCheckboxStateProduct(t))}),l()}if(o&2){let e=r(4).$implicit;P("ngModel",e.selected)}}function ke(o,s){if(o&1&&M(0,Ne,1,1,"ng-template",22),o&2){let e=r(6);C("ngxPermissionsOnly",V(1,U,e.rolePriceEdit))}}function Oe(o,s){if(o&1){let e=S();a(0,"img",47),x("click",function(t){_(e);let i=r(3).$implicit,m=r(3);return d(m.onZoomImage(t,i==null?null:i.ImageUrl))}),l()}if(o&2){let e=r(3).$implicit;C("src",G(e.ThumbnailUrl),D)}}function Re(o,s){o&1&&F(0,"img",42)}function Be(o,s){if(o&1&&(a(0,"small",45),p(1),l()),o&2){let e=r(3).$implicit;c(),T("(",e.Category,")")}}function Le(o,s){if(o&1&&(a(0,"td",40)(1,"div",31),h(2,ke,1,3,null,22),a(3,"div"),h(4,Oe,1,2,"img",41)(5,Re,1,0,"img",42),l()()(),a(6,"td",43)(7,"span",44),p(8),l(),h(9,Be,2,1,"small",45),l()),o&2){let e=r(2).$implicit;C("rowSpan",e.Variants.length),c(2),g((e.Variants==null?null:e.Variants.length)>1?2:-1),c(2),g(e.ThumbnailUrl?4:5),c(2),C("rowSpan",e.Variants.length),c(2),B(e.Name),c(),g(e.Category?9:-1)}}function We(o,s){if(o&1){let e=S();a(0,"input",50),w("ngModelChange",function(t){_(e);let i=r(2).$implicit;return y(i.selected,t)||(i.selected=t),d(t)}),l()}if(o&2){let e=r(2).$implicit;P("ngModel",e.selected)}}function Ue(o,s){if(o&1&&(a(0,"td",48),h(1,We,1,1,"input",49),l()),o&2){let e=r().$implicit;c(),g(e.UnitPrice>=0?1:-1)}}function Ae(o,s){o&1&&(a(0,"div",32),p(1," Not Found "),l())}function $e(o,s){if(o&1&&(a(0,"div"),p(1),v(2,"number"),l()),o&2){let e=r().$implicit;c(),T(" ",b(2,1,e.UnitPrice)," ")}}function ze(o,s){if(o&1&&(a(0,"div",33)(1,"a",36),F(2,"i",51),l()()),o&2){let e=r().$implicit,n=r(4);c(),C("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),D)}}function He(o,s){if(o&1){let e=S();a(0,"div",52),x("click",function(){_(e);let t=r().$implicit,i=r().$implicit,m=r(2),f=r();return d(f.openTableDialog(t,i,m))}),p(1),v(2,"number"),l()}if(o&2){let e=r().$implicit;c(),T(" ",b(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function qe(o,s){if(o&1){let e=S();a(0,"tr",29),h(1,Le,10,6),a(2,"td",20),p(3),l(),a(4,"td",23)(5,"span",30),p(6),l()(),M(7,Ue,2,1,"ng-template",22),a(8,"td",23)(9,"div",31),h(10,Ae,2,0,"div",32),h(11,$e,3,3,"div"),h(12,ze,3,1,"div",33),l()(),a(13,"td",34)(14,"div",31),h(15,He,3,3,"div",35),a(16,"div",33)(17,"a",36),F(18,"i",37),l()(),a(19,"div",33)(20,"div",38),x("click",function(){let t=_(e).$implicit,i=r(4);return d(i.refreshPrice(t))}),F(21,"i",39),l()()()()()}if(o&2){let e=s.$implicit,n=s.$index,t=r(4);c(),g(n==0?1:-1),c(2),B(e.Model),c(2),C("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",V(12,Ve,e.Discontinued)),c(),T(" ",e.Code," "),c(),C("ngxPermissionsOnly",V(14,U,t.rolePriceEdit)),c(3),g((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),c(),g((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),c(),g((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),c(),C("ngClass",V(16,Ie,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),c(2),g(e.Channel.length>0?15:-1),c(2),C("href",e.Channel[0]==null?null:e.Channel[0].Url,D)}}function Ge(o,s){if(o&1&&O(0,qe,22,18,"tr",29,k),o&2){let e=s.$implicit;R(e.Variants)}}function Ke(o,s){if(o&1){let e=S();a(0,"div",9)(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr")(5,"th",18),p(6," Product "),a(7,"div")(8,"mat-slide-toggle",19),w("ngModelChange",function(t){_(e);let i=r(2);return y(i.toggleDifferentInventory,t)||(i.toggleDifferentInventory=t),d(t)}),x("toggleChange",function(){_(e);let t=r(2);return d(t.onToggleDifferentInventory())}),a(9,"small",6),p(10,"FILTER DIFFERENT PRICE"),l()()()(),a(11,"th",20),p(12,"Variant"),l(),a(13,"th",21),p(14,"SKU"),l(),M(15,Me,2,0,"ng-template",22),a(16,"th",23),p(17,"POS"),l(),a(18,"th",23)(19,"div",24),x("click",function(){_(e);let t=r(2);return d(t.openModalFilter())}),F(20,"img",25),a(21,"span",26),p(22),v(23,"stringLimit"),l()()()()(),a(24,"tbody"),O(25,Ge,2,0,null,null,k),l()(),a(27,"infinite-paginator",27),v(28,"async"),x("onNextPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=r(2);return d(t.infinitePagination.getRowCount(t.searchFilter))}),l()()()}if(o&2){let e=r(2);c(8),P("ngModel",e.toggleDifferentInventory),c(7),C("ngxPermissionsOnly",V(16,U,e.rolePriceEdit)),c(4),C("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),c(),C("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),c(2),T(" ",j(23,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),c(3),R(s),c(2),C("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",b(28,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function je(o,s){if(o&1){let e=S();a(0,"mainpanel",1),w("textChange",function(t){_(e);let i=r();return y(i.searchFilter.text,t)||(i.searchFilter.text=t),d(t)}),x("onSubmit",function(){_(e);let t=r();return d(t.onSearch())}),a(1,"filters")(2,"div",2)(3,"label",3),p(4,"Channel"),l(),a(5,"app-channel-options-v2",4),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.ChannelID,t)||(i.searchFilter.ChannelID=t),d(t)}),l()(),a(6,"div",2)(7,"filter-query-type",5),w("numberFilterComparatorChange",function(t){_(e);let i=r();return y(i.searchFilter.NumberFilterComparator,t)||(i.searchFilter.NumberFilterComparator=t),d(t)})("searchTypeChange",function(t){_(e);let i=r();return y(i.searchFilter.SearchType,t)||(i.searchFilter.SearchType=t),d(t)}),l()(),a(8,"div",2)(9,"label",6),p(10,"Page Number"),l(),a(11,"input",7),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),d(t)}),l()(),a(12,"div")(13,"label",6),p(14,"Page Size"),l(),a(15,"input",7),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),d(t)}),l()()(),a(16,"actions"),h(17,Ee,6,1,"div",8),v(18,"async"),l(),a(19,"content"),h(20,Ke,29,18,"div",9),v(21,"async"),l()()}if(o&2){let e,n,t=s,i=r();C("headerTitle",i.pageTitle),P("text",i.searchFilter.text),C("searchBoxPlaceHolder",i.searchPlaceholder()),c(5),P("ngModel",i.searchFilter.ChannelID),c(2),C("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions),P("numberFilterComparator",i.searchFilter.NumberFilterComparator),C("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions),P("searchType",i.searchFilter.SearchType),c(4),P("ngModel",i.searchFilter.PageNumber),c(4),P("ngModel",i.searchFilter.RowCount),c(2),g((e=b(18,12,i.data$))?17:-1,e),c(3),g((n=b(21,14,i.data$))?20:-1,n)}}var Et=(()=>{let s=class s{constructor(){this.http=u(te),this.toastr=u(ee),this.dialog=u(pe),this.productService=u(ge),this.biggerPictureService=u(ue),this.authService=u(oe),this.mainPanelService=u(me),this.decimalPipe=u(E),this.placeholderService=u(xe),this.infinitePagination=u(L),this.updateResHandling=u(W),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=ae.PriceUpdate,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.searchPlaceholder=H("Search ...");let n=this.authService;this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=n.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(z(n=>{this.searchFilter=n.Filter,this.searchFilter.filterModel=N.ALL,this.initSearchPlaceholder(),this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=N.ALL:this.searchFilter.filterModel=N.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(n){n.Variants=n.Variants.map(t=>(t.selected=n.selected,t))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(n){let i=this.productService.selectedVariantProduct(n).map(f=>({ID:f.ID,ChannelID:f.Channel[0].ChannelID,Code:f.Code,Price:f.UnitPrice})),m={ListChannelID:[this.searchFilter.ChannelID],ListPrice:i};this.http.post("/api/Price/UpdateChannel",m).subscribe(f=>{this.onSearch(),this.handlingUpdateStock(f.Response)})}handlingUpdateStock(n){if(n.success_list?.length>0||n.failure_list?.length>0){let t=n.failure_list,i=n.success_list;this.updateResHandling.responseHandling(i,t,"Price")}else this.toastr.error(n[0]?.Exception,"Error")}refreshPrice(n){let t={ChannelItemID:n?.Channel[0].ChannelItemID,ChannelVariationID:n?.Channel[0]?.ChannelVariationID,ChannelID:n?.Channel[0]?.ChannelID,VariantID:n.ID};this.http.post("/api/Price/RefreshPriceChannel",t).subscribe(i=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel(),this.initSearchPlaceholder()}openTableDialog(n,t,i){let m=JSON.parse(JSON.stringify(n));this.dialog.open(Fe,{data:{Name:t.Name,Variant:m,ChannelID:m?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:m?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(I=>Y.IsNotEmpty(I))).subscribe(I=>{this.updateItemAfterDialog(I,n)})}updateItemAfterDialog(n,t){let i={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,Price:parseFloat(n.Price),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Price/UpdatePriceByID",i).subscribe(m=>{let f=this.productService.findChannelById(i.ID,this.channelOptions),I=i.Price?this.decimalPipe.transform(i.Price):i.Price;this.toastr.success(`Successfully updated ${n.ItemName} (${n.VarName}) price in ${f.Name} to ${I}`,"Success"),t.Channel[0]&&(t.Channel[0].Price=i.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(n=>n.ID==this.searchFilter.ChannelID)}onSelectAllSKU(n,t){t=t.map(i=>(i.Variants=i.Variants.map(m=>(m.selected=n,m)),i))}onZoomImage(n,t){this.biggerPictureService.openBiggerPicture(n,t)}openExportDialog(){this.dialog.open(we,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=q({type:s,selectors:[["app-price-single-channel"]],features:[K([L,Te,X("https://resc.cloudinary.com/"),E,W])],decls:2,vars:3,consts:[[1,"single-price",3,"headerTitle","text","searchBoxPlaceHolder"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text","searchBoxPlaceHolder"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"d-flex"],[1,"container-fluid","mt-5"],[1,"btn","btn-success"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(t,i){if(t&1&&(h(0,je,22,16,"mainpanel",0),v(1,"async")),t&2){let m;g((m=b(1,1,i.loader$))?0:-1,m)}},dependencies:[Q,J,Ce,de,le,_e,re,ce,se,be,ie,ne,ye,Pe,fe,he,Se,Z,E,ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let o=s;return o})();export{Et as PriceSingleChannelComponent};
1
+ import{a as N}from"./chunk-ISMIPSYN.js";import{a as Te}from"./chunk-A6SP65CH.js";import{a as Fe,b as ve,c as be,d as L,e as W}from"./chunk-C67KF7MG.js";import{a as we}from"./chunk-TYSM3R5E.js";import{a as Pe,b as ye}from"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as xe,d as Se}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as he}from"./chunk-BZWZ64N5.js";import{a as fe}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as ue}from"./chunk-DLHIDOS3.js";import{a as ge}from"./chunk-REDQ2L7Y.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-KHGTW7IV.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as me,b as Ce}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as pe}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ae}from"./chunk-ZSUWHVKX.js";import{h as oe}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as ne,c as ie}from"./chunk-NB2H6KA7.js";import{c as Y}from"./chunk-UPRDDI4K.js";import{A as de,b as re,c as le,h as ce,m as se,o as _e}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as ee,e as te}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as E,B as Q,G as X,q as J,w as Z}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as A,Hb as q,Ia as H,Nb as M,Nc as p,Oc as B,Pc as T,Rc as P,Sc as y,Tc as w,Xc as G,Z as $,_c as K,ac as h,ad as V,cc as g,dc as k,ea as z,fc as O,gc as R,hc as C,ic as a,id as v,jc as l,jd as b,kc as F,kd as j,mb as D,ob as c,ra as u,rc as S,wc as x,ya as _,yc as r,za as d}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var U=o=>[o],Ve=o=>({"text-decoration-line-through":o}),Ie=o=>({"bg-gradient-warning":o});function De(o,s){if(o&1){let e=S();a(0,"button",13),x("click",function(){_(e);let t=r(),i=r(2);return d(i.updateStock(t))}),F(1,"i",14),p(2," Update "),l()}}function Ee(o,s){if(o&1){let e=S();a(0,"div",8),h(1,De,3,0,"button",10),a(2,"button",11),x("click",function(){_(e);let t=r(2);return d(t.openExportDialog())}),F(3,"i",12),a(4,"span"),p(5,"Export"),l()()()}if(o&2){let e=r(2);c(),g(e.productService.hasSelectionVariant(s)?1:-1)}}function Me(o,s){if(o&1){let e=S();a(0,"th")(1,"input",28),x("change",function(t){_(e);let i=r(),m=r(2);return d(m.onSelectAllSKU(t.target.checked,i))}),l()()}}function Ne(o,s){if(o&1){let e=S();a(0,"input",46),w("ngModelChange",function(t){_(e);let i=r(4).$implicit;return y(i.selected,t)||(i.selected=t),d(t)}),x("ngModelChange",function(){_(e);let t=r(4).$implicit,i=r(3);return d(i.onCheckboxStateProduct(t))}),l()}if(o&2){let e=r(4).$implicit;P("ngModel",e.selected)}}function ke(o,s){if(o&1&&M(0,Ne,1,1,"ng-template",22),o&2){let e=r(6);C("ngxPermissionsOnly",V(1,U,e.rolePriceEdit))}}function Oe(o,s){if(o&1){let e=S();a(0,"img",47),x("click",function(t){_(e);let i=r(3).$implicit,m=r(3);return d(m.onZoomImage(t,i==null?null:i.ImageUrl))}),l()}if(o&2){let e=r(3).$implicit;C("src",G(e.ThumbnailUrl),D)}}function Re(o,s){o&1&&F(0,"img",42)}function Be(o,s){if(o&1&&(a(0,"small",45),p(1),l()),o&2){let e=r(3).$implicit;c(),T("(",e.Category,")")}}function Le(o,s){if(o&1&&(a(0,"td",40)(1,"div",31),h(2,ke,1,3,null,22),a(3,"div"),h(4,Oe,1,2,"img",41)(5,Re,1,0,"img",42),l()()(),a(6,"td",43)(7,"span",44),p(8),l(),h(9,Be,2,1,"small",45),l()),o&2){let e=r(2).$implicit;C("rowSpan",e.Variants.length),c(2),g((e.Variants==null?null:e.Variants.length)>1?2:-1),c(2),g(e.ThumbnailUrl?4:5),c(2),C("rowSpan",e.Variants.length),c(2),B(e.Name),c(),g(e.Category?9:-1)}}function We(o,s){if(o&1){let e=S();a(0,"input",50),w("ngModelChange",function(t){_(e);let i=r(2).$implicit;return y(i.selected,t)||(i.selected=t),d(t)}),l()}if(o&2){let e=r(2).$implicit;P("ngModel",e.selected)}}function Ue(o,s){if(o&1&&(a(0,"td",48),h(1,We,1,1,"input",49),l()),o&2){let e=r().$implicit;c(),g(e.UnitPrice>=0?1:-1)}}function Ae(o,s){o&1&&(a(0,"div",32),p(1," Not Found "),l())}function $e(o,s){if(o&1&&(a(0,"div"),p(1),v(2,"number"),l()),o&2){let e=r().$implicit;c(),T(" ",b(2,1,e.UnitPrice)," ")}}function ze(o,s){if(o&1&&(a(0,"div",33)(1,"a",36),F(2,"i",51),l()()),o&2){let e=r().$implicit,n=r(4);c(),C("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),D)}}function He(o,s){if(o&1){let e=S();a(0,"div",52),x("click",function(){_(e);let t=r().$implicit,i=r().$implicit,m=r(2),f=r();return d(f.openTableDialog(t,i,m))}),p(1),v(2,"number"),l()}if(o&2){let e=r().$implicit;c(),T(" ",b(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function qe(o,s){if(o&1){let e=S();a(0,"tr",29),h(1,Le,10,6),a(2,"td",20),p(3),l(),a(4,"td",23)(5,"span",30),p(6),l()(),M(7,Ue,2,1,"ng-template",22),a(8,"td",23)(9,"div",31),h(10,Ae,2,0,"div",32),h(11,$e,3,3,"div"),h(12,ze,3,1,"div",33),l()(),a(13,"td",34)(14,"div",31),h(15,He,3,3,"div",35),a(16,"div",33)(17,"a",36),F(18,"i",37),l()(),a(19,"div",33)(20,"div",38),x("click",function(){let t=_(e).$implicit,i=r(4);return d(i.refreshPrice(t))}),F(21,"i",39),l()()()()()}if(o&2){let e=s.$implicit,n=s.$index,t=r(4);c(),g(n==0?1:-1),c(2),B(e.Model),c(2),C("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",V(12,Ve,e.Discontinued)),c(),T(" ",e.Code," "),c(),C("ngxPermissionsOnly",V(14,U,t.rolePriceEdit)),c(3),g((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),c(),g((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),c(),g((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),c(),C("ngClass",V(16,Ie,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),c(2),g(e.Channel.length>0?15:-1),c(2),C("href",e.Channel[0]==null?null:e.Channel[0].Url,D)}}function Ge(o,s){if(o&1&&O(0,qe,22,18,"tr",29,k),o&2){let e=s.$implicit;R(e.Variants)}}function Ke(o,s){if(o&1){let e=S();a(0,"div",9)(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr")(5,"th",18),p(6," Product "),a(7,"div")(8,"mat-slide-toggle",19),w("ngModelChange",function(t){_(e);let i=r(2);return y(i.toggleDifferentInventory,t)||(i.toggleDifferentInventory=t),d(t)}),x("toggleChange",function(){_(e);let t=r(2);return d(t.onToggleDifferentInventory())}),a(9,"small",6),p(10,"FILTER DIFFERENT PRICE"),l()()()(),a(11,"th",20),p(12,"Variant"),l(),a(13,"th",21),p(14,"SKU"),l(),M(15,Me,2,0,"ng-template",22),a(16,"th",23),p(17,"POS"),l(),a(18,"th",23)(19,"div",24),x("click",function(){_(e);let t=r(2);return d(t.openModalFilter())}),F(20,"img",25),a(21,"span",26),p(22),v(23,"stringLimit"),l()()()()(),a(24,"tbody"),O(25,Ge,2,0,null,null,k),l()(),a(27,"infinite-paginator",27),v(28,"async"),x("onNextPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=r(2);return d(t.infinitePagination.getRowCount(t.searchFilter))}),l()()()}if(o&2){let e=r(2);c(8),P("ngModel",e.toggleDifferentInventory),c(7),C("ngxPermissionsOnly",V(16,U,e.rolePriceEdit)),c(4),C("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),c(),C("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),c(2),T(" ",j(23,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),c(3),R(s),c(2),C("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",b(28,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function je(o,s){if(o&1){let e=S();a(0,"mainpanel",1),w("textChange",function(t){_(e);let i=r();return y(i.searchFilter.text,t)||(i.searchFilter.text=t),d(t)}),x("onSubmit",function(){_(e);let t=r();return d(t.onSearch())}),a(1,"filters")(2,"div",2)(3,"label",3),p(4,"Channel"),l(),a(5,"app-channel-options-v2",4),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.ChannelID,t)||(i.searchFilter.ChannelID=t),d(t)}),l()(),a(6,"div",2)(7,"filter-query-type",5),w("numberFilterComparatorChange",function(t){_(e);let i=r();return y(i.searchFilter.NumberFilterComparator,t)||(i.searchFilter.NumberFilterComparator=t),d(t)})("searchTypeChange",function(t){_(e);let i=r();return y(i.searchFilter.SearchType,t)||(i.searchFilter.SearchType=t),d(t)}),l()(),a(8,"div",2)(9,"label",6),p(10,"Page Number"),l(),a(11,"input",7),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),d(t)}),l()(),a(12,"div")(13,"label",6),p(14,"Page Size"),l(),a(15,"input",7),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),d(t)}),l()()(),a(16,"actions"),h(17,Ee,6,1,"div",8),v(18,"async"),l(),a(19,"content"),h(20,Ke,29,18,"div",9),v(21,"async"),l()()}if(o&2){let e,n,t=s,i=r();C("headerTitle",i.pageTitle),P("text",i.searchFilter.text),C("searchBoxPlaceHolder",i.searchPlaceholder()),c(5),P("ngModel",i.searchFilter.ChannelID),c(2),C("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions),P("numberFilterComparator",i.searchFilter.NumberFilterComparator),C("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions),P("searchType",i.searchFilter.SearchType),c(4),P("ngModel",i.searchFilter.PageNumber),c(4),P("ngModel",i.searchFilter.RowCount),c(2),g((e=b(18,12,i.data$))?17:-1,e),c(3),g((n=b(21,14,i.data$))?20:-1,n)}}var Et=(()=>{let s=class s{constructor(){this.http=u(te),this.toastr=u(ee),this.dialog=u(pe),this.productService=u(ge),this.biggerPictureService=u(ue),this.authService=u(oe),this.mainPanelService=u(me),this.decimalPipe=u(E),this.placeholderService=u(xe),this.infinitePagination=u(L),this.updateResHandling=u(W),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=ae.PriceUpdate,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.searchPlaceholder=H("Search ...");let n=this.authService;this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=n.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(z(n=>{this.searchFilter=n.Filter,this.searchFilter.filterModel=N.ALL,this.initSearchPlaceholder(),this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=N.ALL:this.searchFilter.filterModel=N.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(n){n.Variants=n.Variants.map(t=>(t.selected=n.selected,t))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(n){let i=this.productService.selectedVariantProduct(n).map(f=>({ID:f.ID,ChannelID:f.Channel[0].ChannelID,Code:f.Code,Price:f.UnitPrice})),m={ListChannelID:[this.searchFilter.ChannelID],ListPrice:i};this.http.post("/api/Price/UpdateChannel",m).subscribe(f=>{this.onSearch(),this.handlingUpdateStock(f.Response)})}handlingUpdateStock(n){if(n.success_list?.length>0||n.failure_list?.length>0){let t=n.failure_list,i=n.success_list;this.updateResHandling.responseHandling(i,t,"Price")}else this.toastr.error(n[0]?.Exception,"Error")}refreshPrice(n){let t={ChannelItemID:n?.Channel[0].ChannelItemID,ChannelVariationID:n?.Channel[0]?.ChannelVariationID,ChannelID:n?.Channel[0]?.ChannelID,VariantID:n.ID};this.http.post("/api/Price/RefreshPriceChannel",t).subscribe(i=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel(),this.initSearchPlaceholder()}openTableDialog(n,t,i){let m=JSON.parse(JSON.stringify(n));this.dialog.open(Fe,{data:{Name:t.Name,Variant:m,ChannelID:m?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:m?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(I=>Y.IsNotEmpty(I))).subscribe(I=>{this.updateItemAfterDialog(I,n)})}updateItemAfterDialog(n,t){let i={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,Price:parseFloat(n.Price),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Price/UpdatePriceByID",i).subscribe(m=>{let f=this.productService.findChannelById(i.ID,this.channelOptions),I=i.Price?this.decimalPipe.transform(i.Price):i.Price;this.toastr.success(`Successfully updated ${n.ItemName} (${n.VarName}) price in ${f.Name} to ${I}`,"Success"),t.Channel[0]&&(t.Channel[0].Price=i.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(n=>n.ID==this.searchFilter.ChannelID)}onSelectAllSKU(n,t){t=t.map(i=>(i.Variants=i.Variants.map(m=>(m.selected=n,m)),i))}onZoomImage(n,t){this.biggerPictureService.openBiggerPicture(n,t)}openExportDialog(){this.dialog.open(we,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=q({type:s,selectors:[["app-price-single-channel"]],features:[K([L,Te,X("https://resc.cloudinary.com/"),E,W])],decls:2,vars:3,consts:[[1,"single-price",3,"headerTitle","text","searchBoxPlaceHolder"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text","searchBoxPlaceHolder"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"d-flex"],[1,"container-fluid","mt-5"],[1,"btn","btn-success"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(t,i){if(t&1&&(h(0,je,22,16,"mainpanel",0),v(1,"async")),t&2){let m;g((m=b(1,1,i.loader$))?0:-1,m)}},dependencies:[Q,J,Ce,de,le,_e,re,ce,se,be,ie,ne,ye,Pe,fe,he,Se,Z,E,ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let o=s;return o})();export{Et as PriceSingleChannelComponent};
@@ -1 +1 @@
1
- import{a as w}from"./chunk-WH76SMZT.js";import{a as C,b as D}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as h,e as y}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as u,Nc as f,Pc as v,ad as b,ec as m,fc as s,gc as c,hc as l,ic as n,jc as o,kc as i,ob as r}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var k=e=>[e];function x(e,t){if(e&1&&(n(0,"a",8),f(1),o()),e&2){let d=t.$implicit;l("routerLink",b(2,k,d.url)),r(),v(" ",d.title)}}var T=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=u({type:t,selectors:[["app-download"]],decls:13,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[1,"dropdown-item",3,"routerLink"]],template:function(a,p){a&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),o()(),n(4,"div")(5,"div",3)(6,"a",4),i(7,"i",5),o(),n(8,"div",6)(9,"div",7),s(10,x,2,4,"a",8,m),o()()()()(),i(12,"router-outlet")),a&2&&(r(3),l("Tabs",p.tabs),r(7),c(p.moreMenu))},dependencies:[D,C,y,h],encapsulation:2});let e=t;return e})();var F=[{path:"",component:T,children:[{path:"by-url",loadComponent(){return import("./chunk-6DGG765N.js").then(e=>e.ByUrlComponent)},data:{title:"Download Product By Url"},canActivate:[w]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}];export{F as routes};
1
+ import{a as w}from"./chunk-WZQRKTBN.js";import{a as C,b as D}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as h,e as y}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as u,Nc as f,Pc as v,ad as b,ec as m,fc as s,gc as c,hc as l,ic as n,jc as o,kc as i,ob as r}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var k=e=>[e];function x(e,t){if(e&1&&(n(0,"a",8),f(1),o()),e&2){let d=t.$implicit;l("routerLink",b(2,k,d.url)),r(),v(" ",d.title)}}var T=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=u({type:t,selectors:[["app-download"]],decls:13,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[1,"dropdown-item",3,"routerLink"]],template:function(a,p){a&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),o()(),n(4,"div")(5,"div",3)(6,"a",4),i(7,"i",5),o(),n(8,"div",6)(9,"div",7),s(10,x,2,4,"a",8,m),o()()()()(),i(12,"router-outlet")),a&2&&(r(3),l("Tabs",p.tabs),r(7),c(p.moreMenu))},dependencies:[D,C,y,h],encapsulation:2});let e=t;return e})();var F=[{path:"",component:T,children:[{path:"by-url",loadComponent(){return import("./chunk-Q3Z7EEVP.js").then(e=>e.ByUrlComponent)},data:{title:"Download Product By Url"},canActivate:[w]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}];export{F as routes};
@@ -1 +1 @@
1
- import{b as M}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as w}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as N}from"./chunk-D6JH2KV4.js";import{b as T}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{w as y,y as g,z as C}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as f,Nc as n,Oc as p,ac as E,cc as I,hc as x,ic as t,id as s,jc as i,jd as h,kc as D,kd as b,ma as S,ob as o,ra as c,v as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var O=(()=>{let r=class r{constructor(){this.httpService=c(N)}getExceptionDetail(m){return this.httpService.post("/api/Orders/GetDetailException",{ID:m}).pipe(u(a=>a?.hits[0]?._source))}};r.\u0275fac=function(d){return new(d||r)},r.\u0275prov=S({token:r,factory:r.\u0275fac,providedIn:"root"});let l=r;return l})();function B(l,r){if(l&1&&(t(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),n(6,"General"),i()(),t(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),n(12,"Date"),i(),t(13,"div")(14,"span"),n(15),s(16,"date"),i()()()(),t(17,"div",8)(18,"div",9)(19,"label"),n(20,"Number"),i(),t(21,"div")(22,"span"),n(23),i()()()(),t(24,"div",8)(25,"div",9)(26,"label"),n(27,"Channel Name"),i(),t(28,"div")(29,"span"),n(30),i()()()(),t(31,"div",8)(32,"div",9)(33,"label"),n(34,"ShopID"),i(),t(35,"div")(36,"span"),n(37),i()()()(),t(38,"div",8)(39,"div",9)(40,"label"),n(41,"Channel ID"),i(),t(42,"div")(43,"span"),n(44),i()()()()()()()()(),t(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),n(50,"Request"),i()(),t(51,"div",6)(52,"pre"),n(53),s(54,"json"),i()()()(),t(55,"div",8)(56,"div",11)(57,"div",5)(58,"h5"),n(59,"Stack Trace"),i()(),t(60,"div",6),D(61,"pre",12),i()(),t(62,"div",13)(63,"div",5)(64,"h5"),n(65,"Exception Message"),i()(),t(66,"div",6)(67,"pre"),n(68),s(69,"json"),i()()()()()()),l&2){let e=r;o(15),p(b(16,8,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),o(8),p(e==null||e.error==null?null:e.error.number),o(7),p(e==null?null:e.channelName),o(7),p(e==null?null:e.shopId),o(7),p(e==null?null:e.message),o(9),p(h(54,11,e==null||e.error==null?null:e.error.request)),o(8),x("textContent",e==null||e.error==null?null:e.error.stackTrace),o(7),p(h(69,13,e==null||e.error==null?null:e.error.response))}}var K=(()=>{let r=class r{constructor(){this.activatedRoute=c(T),this.exceptionService=c(O),this.authService=c(w),this.invoiceNumber="",this.channelName="",this.logo=null,this.channelOptions=this.authService.getChannels()}ngOnInit(){let m=this.activatedRoute.snapshot.queryParams;this.exceptionDetail$=this.exceptionService.getExceptionDetail(m?.ID).pipe(u(d=>{let a=d;return{"@timestamp":a["@timestamp"]||a["@timestamp_received"],error:{number:a?.error?.number,stackTrace:a?.error?.stackTrace,request:JSON.parse(a?.error?.request),response:JSON.parse(a?.error?.response)},channelName:a?.channelId!=null?this.channelOptions.find(v=>v.ID===a?.channelId)?.Name:a?.shopId,shopId:a?.shopId,message:a?.message}}))}};r.\u0275fac=function(d){return new(d||r)},r.\u0275cmp=f({type:r,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"card","mb-2"],[3,"textContent"],[1,"card","mt-7"]],template:function(d,a){if(d&1&&(t(0,"mainpanel",0)(1,"content"),E(2,B,70,15,"div",1),s(3,"async"),i()()),d&2){let v;x("headerTitle","Order #"+a.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),I((v=h(3,4,a.exceptionDetail$))?2:-1,v)}},dependencies:[M,y,C,g],encapsulation:2});let l=r;return l})();export{K as ExceptionDetailComponent};
1
+ import{b as M}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as w}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as N}from"./chunk-D6JH2KV4.js";import{b as T}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{w as y,y as g,z as C}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as f,Nc as n,Oc as p,ac as E,cc as I,hc as x,ic as t,id as s,jc as i,jd as h,kc as D,kd as b,ma as S,ob as o,ra as c,v as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var O=(()=>{let r=class r{constructor(){this.httpService=c(N)}getExceptionDetail(m){return this.httpService.post("/api/Orders/GetDetailException",{ID:m}).pipe(u(a=>a?.hits[0]?._source))}};r.\u0275fac=function(d){return new(d||r)},r.\u0275prov=S({token:r,factory:r.\u0275fac,providedIn:"root"});let l=r;return l})();function B(l,r){if(l&1&&(t(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),n(6,"General"),i()(),t(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),n(12,"Date"),i(),t(13,"div")(14,"span"),n(15),s(16,"date"),i()()()(),t(17,"div",8)(18,"div",9)(19,"label"),n(20,"Number"),i(),t(21,"div")(22,"span"),n(23),i()()()(),t(24,"div",8)(25,"div",9)(26,"label"),n(27,"Channel Name"),i(),t(28,"div")(29,"span"),n(30),i()()()(),t(31,"div",8)(32,"div",9)(33,"label"),n(34,"ShopID"),i(),t(35,"div")(36,"span"),n(37),i()()()(),t(38,"div",8)(39,"div",9)(40,"label"),n(41,"Channel ID"),i(),t(42,"div")(43,"span"),n(44),i()()()()()()()()(),t(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),n(50,"Request"),i()(),t(51,"div",6)(52,"pre"),n(53),s(54,"json"),i()()()(),t(55,"div",8)(56,"div",11)(57,"div",5)(58,"h5"),n(59,"Stack Trace"),i()(),t(60,"div",6),D(61,"pre",12),i()(),t(62,"div",13)(63,"div",5)(64,"h5"),n(65,"Exception Message"),i()(),t(66,"div",6)(67,"pre"),n(68),s(69,"json"),i()()()()()()),l&2){let e=r;o(15),p(b(16,8,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),o(8),p(e==null||e.error==null?null:e.error.number),o(7),p(e==null?null:e.channelName),o(7),p(e==null?null:e.shopId),o(7),p(e==null?null:e.message),o(9),p(h(54,11,e==null||e.error==null?null:e.error.request)),o(8),x("textContent",e==null||e.error==null?null:e.error.stackTrace),o(7),p(h(69,13,e==null||e.error==null?null:e.error.response))}}var K=(()=>{let r=class r{constructor(){this.activatedRoute=c(T),this.exceptionService=c(O),this.authService=c(w),this.invoiceNumber="",this.channelName="",this.logo=null,this.channelOptions=this.authService.getChannels()}ngOnInit(){let m=this.activatedRoute.snapshot.queryParams;this.exceptionDetail$=this.exceptionService.getExceptionDetail(m?.ID).pipe(u(d=>{let a=d;return{"@timestamp":a["@timestamp"]||a["@timestamp_received"],error:{number:a?.error?.number,stackTrace:a?.error?.stackTrace,request:JSON.parse(a?.error?.request),response:JSON.parse(a?.error?.response)},channelName:a?.channelId!=null?this.channelOptions.find(v=>v.ID===a?.channelId)?.Name:a?.shopId,shopId:a?.shopId,message:a?.message}}))}};r.\u0275fac=function(d){return new(d||r)},r.\u0275cmp=f({type:r,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"card","mb-2"],[3,"textContent"],[1,"card","mt-7"]],template:function(d,a){if(d&1&&(t(0,"mainpanel",0)(1,"content"),E(2,B,70,15,"div",1),s(3,"async"),i()()),d&2){let v;x("headerTitle","Order #"+a.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),I((v=h(3,4,a.exceptionDetail$))?2:-1,v)}},dependencies:[M,y,C,g],encapsulation:2});let l=r;return l})();export{K as ExceptionDetailComponent};
@@ -1,2 +1,2 @@
1
- import{a as _e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as c}from"./chunk-WH76SMZT.js";import{b as fe}from"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import{a as he}from"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as be}from"./chunk-UEXWQT5J.js";import{c as ue}from"./chunk-IZZY74PN.js";import{B as ae,H as oe,I as A,l as Y,m as ee,q as te,u as ie,v as ne}from"./chunk-O3BS4AC6.js";import{a as o}from"./chunk-ZSUWHVKX.js";import{b as Z,h as ge}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{a as me,b as ce,c as pe}from"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as re,d as se,e as le,f as de,g as I}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as X,q as K,w as Q,y as W}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Da as N,Fd as P,Hb as M,Ib as _,Jb as j,Kc as y,Mc as E,Nb as S,Nc as g,Oc as w,Pc as x,Ra as U,ac as v,bc as G,cc as C,ec as H,fc as q,gc as J,hc as u,ic as r,id as T,jc as m,jd as D,kc as f,mb as V,na as b,ob as d,ra as s,ub as F,v as L,wc as z,yc as p,zb as $}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{i as k}from"./chunk-66YHNWRR.js";var O=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[o.DashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[o.ProductView]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[o.InventoryView]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[o.PriceView]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/order",Roles:[o.OrderView]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[o.ChannelView]},{Icon:"fa-solid fa-user",Title:"Users",Url:"/menu/users",Roles:[o.UserView]},{Icon:"fas fa-clipboard-list",Title:"Sync Logs",Url:"/menu/sync-log",Roles:[o.Report]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[o.LogisticView]},{Icon:"fas fa-file-alt",Title:"Developer",Url:"/menu/log",Roles:[o.DevView]},{Icon:"fa-solid fa-file-brackets-curly",Title:"JSON Api",Url:"/menu/json-api",Roles:[o.JsonApiView]}]}get getMenu(){return this.menus}};var ve="mat-badge-content",we=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],decls:0,vars:0,template:function(i,a){},styles:[`.mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color, var(--mat-sys-error));color:var(--mat-badge-text-color, var(--mat-sys-on-error));font-family:var(--mat-badge-text-font, var(--mat-sys-label-small-font));font-weight:var(--mat-badge-text-weight, var(--mat-sys-label-small-weight));border-radius:var(--mat-badge-container-shape, var(--mat-sys-corner-full))}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}@media(forced-colors: active){.mat-badge-content{outline:solid 1px;border-radius:0}}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-error) 38%, transparent));color:var(--mat-badge-disabled-state-text-color, var(--mat-sys-on-error))}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, 6px);min-height:var(--mat-badge-small-size-container-size, 6px);line-height:var(--mat-badge-small-size-line-height, 6px);padding:var(--mat-badge-small-size-container-padding, 0);font-size:var(--mat-badge-small-size-text-size, 0);margin:var(--mat-badge-small-size-container-offset, -6px 0)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset, -6px)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, 16px);min-height:var(--mat-badge-container-size, 16px);line-height:var(--mat-badge-line-height, 16px);padding:var(--mat-badge-container-padding, 0 4px);font-size:var(--mat-badge-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-container-offset, -12px 0)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset, -12px)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, 16px);min-height:var(--mat-badge-large-size-container-size, 16px);line-height:var(--mat-badge-large-size-line-height, 16px);padding:var(--mat-badge-large-size-container-padding, 0 4px);font-size:var(--mat-badge-large-size-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-large-size-container-offset, -12px 0)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset, -12px)}
2
- `],encapsulation:2,changeDetection:0})}return e})(),Ce=(()=>{class e{_ngZone=s(F);_elementRef=s(U);_ariaDescriber=s(ae);_renderer=s($);_animationsDisabled=oe();_idGenerator=s(ne);get color(){return this._color}set color(t){this._setColor(t),this._color=t}_color="primary";overlap=!0;disabled;position="above after";get content(){return this._content}set content(t){this._updateRenderedContent(t)}_content;get description(){return this._description}set description(t){this._updateDescription(t)}_description;size="medium";hidden;_badgeElement;_inlineBadgeDescription;_isInitialized=!1;_interactivityChecker=s(te);_document=s(N);constructor(){let t=s(Y);t.load(we),t.load(ee)}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let t=this._renderer.createElement("span"),i="mat-badge-active";return t.setAttribute("id",this._idGenerator.getId("mat-badge-content-")),t.setAttribute("aria-hidden","true"),t.classList.add(ve),this._animationsDisabled&&t.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(t),typeof requestAnimationFrame=="function"&&!this._animationsDisabled?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add(i)})}):t.classList.add(i),t}_updateRenderedContent(t){let i=`${t??""}`.trim();this._isInitialized&&i&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=i),this._content=i}_updateDescription(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!t||this._isHostInteractive())&&this._removeInlineDescription(),this._description=t,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,t):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(t){let i=this._elementRef.nativeElement.classList;i.remove(`mat-badge-${this._color}`),t&&i.add(`mat-badge-${t}`)}_clearExistingBadges(){let t=this._elementRef.nativeElement.querySelectorAll(`:scope > .${ve}`);for(let i of Array.from(t))i!==this._badgeElement&&i.remove()}static \u0275fac=function(i){return new(i||e)};static \u0275dir=j({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(i,a){i&2&&y("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",P],disabled:[2,"matBadgeDisabled","disabled",P],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",P]}})}return e})(),xe=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=_({type:e});static \u0275inj=b({imports:[ie,A,A]})}return e})();function Oe(e,n){if(e&1&&(r(0,"p",21),g(1),m()),e&2){let t=p(3).$implicit;d(),x(" ",t.Title," ")}}function ke(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(3).$implicit;d(),w(t.Title)}}function Se(e,n){if(e&1&&(r(0,"a",18),f(1,"i"),v(2,Oe,2,1,"p",21)(3,ke,2,1,"p"),m()),e&2){let t=p(2).$implicit;u("href",t.Url,V),d(),E(t.Icon),d(),C(t.Badge?2:3)}}function ze(e,n){if(e&1&&S(0,Se,4,4,"a",20),e&2){let t=p().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Ee(e,n){if(e&1&&(r(0,"p",21),g(1),m()),e&2){let t=p(4).$implicit;d(),x(" ",t.Title," ")}}function Te(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(4).$implicit;d(),w(t.Title)}}function De(e,n){if(e&1&&(v(0,Ee,2,1,"p",21),T(1,"async"),G(2,Te,2,1,"p")),e&2){let t=p(4);C(D(1,1,t.notifications$)!=0?0:2)}}function Ae(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(3).$implicit;d(),w(t.Title)}}function Ie(e,n){if(e&1&&(r(0,"a",19),f(1,"i"),v(2,De,3,3)(3,Ae,2,1,"p"),m()),e&2){let t=p(2).$implicit,i=p();u("matTooltip",i.isCollapseSidebar?t.Title:"")("routerLink",t.Url),d(),E(t.Icon),d(),C(t.Badge?2:3)}}function Be(e,n){if(e&1&&S(0,Ie,4,5,"a",22),e&2){let t=p().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Re(e,n){if(e&1&&(r(0,"li",16),v(1,ze,1,1,"a",18)(2,Be,1,1,"a",19),m()),e&2){let t=n.$implicit;d(),C(t.ExternalLink?1:2)}}var Me=(()=>{let n=class n{constructor(){this.toggleSidebarService=s(he),this.notificationService=s(fe),this.decodeTokenService=s(Z),this.authService=s(ge),this.Menu={};let i=this.decodeTokenService;this.isCollapseSidebar=!1,this.token=i.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new O().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(L(i=>i.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(i){if(i){let a,l=i.split(" ");return l.length==1?a=l[0].substring(0,2):a=l.shift().charAt(0)+l.pop().charAt(0),a}}};n.\u0275fac=function(a){return new(a||n)},n.\u0275cmp=M({type:n,selectors:[["app-menu"]],standalone:!1,decls:29,vars:8,consts:[[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],["routerLink","/menu/profile",1,"dropdown-item","h5",2,"cursor","pointer"],["aria-hidden","true",1,"fa-user","fas"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active"],[1,"main-panel"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"]],template:function(a,l){a&1&&(r(0,"div",0),T(1,"async"),r(2,"div",1)(3,"button",2),z("click",function(){return l.onCallapseSidebar()}),f(4,"i",3),m(),r(5,"div",4)(6,"div",5)(7,"a",6),g(8),m(),r(9,"div",7)(10,"div",8),g(11),m(),f(12,"div",9),r(13,"a",10),f(14,"i",11),g(15,"\xA0 "),r(16,"span"),g(17,"My Profile"),m()(),r(18,"a",12),z("click",function(){return l.onLogout()}),f(19,"i",13),g(20,"\xA0 "),r(21,"span"),g(22," Log Out"),m()()()()(),r(23,"div",14)(24,"ul",15),q(25,Re,3,1,"li",16,H),m()()(),r(27,"div",17),f(28,"router-outlet"),m()()),a&2&&(y("nav-open",D(1,6,l.toggleState$)),d(2),u("ngClass",l.isCollapseSidebar?"collapses":""),d(2),u("ngClass",l.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),d(4),x(" ",l.storeName," "),d(3),x(" ",l.token==null?null:l.token.LID," "),d(14),J(l.Menu))},dependencies:[K,re,le,de,ue,Ce,ce,Q],styles:["@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let e=n;return e})();var h=(e,n)=>k(null,null,function*(){let t=s(me),i=s(se),a=e.data?.roles||[],l=e.data?.redirectUrl||"/";return a.length===0||(yield Le(t,a))?!0:(i.navigate([l]),!1)});function Le(e,n){return k(this,null,function*(){let t=n.map(a=>e.hasPermission(a));return(yield Promise.all(t)).some(a=>a)})}var Ne=[{path:"",component:Me,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"profile",loadChildren:()=>import("./chunk-IXURR6VG.js").then(e=>e.routes),canActivate:[c],data:{title:"My Profile"}},{path:"dashboard",loadChildren:()=>import("./chunk-IQX2CRL5.js").then(e=>e.routes),canActivate:[c,h,_e],data:{title:"Dashboard",roles:[o.DashboardView],redirectUrl:"/menu/products"}},{path:"products",loadChildren:()=>import("./chunk-SLQ42VND.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Products",roles:[o.ProductView],redirectUrl:"/menu/inventory"}},{path:"inventory",loadChildren:()=>import("./chunk-XAL6YLNQ.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Inventory",roles:[o.InventoryView],redirectUrl:"/menu/price"}},{path:"price",loadChildren:()=>import("./chunk-OJI34QN5.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Price",roles:[o.PriceView],redirectUrl:"/menu/Order"}},{path:"order",loadChildren:()=>import("./chunk-E6W25RW5.js").then(e=>e.routes),canActivate:[c],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-J4RDYEJC.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Report",roles:[o.Report],redirectUrl:"/menu/Logistic"}},{path:"Logistic",loadComponent(){return import("./chunk-6IZWIEUD.js").then(e=>e.LogisticComponent)},canActivate:[c,h],data:{title:"Logistic",roles:[o.LogisticView],redirectUrl:"/menu/channel"}},{path:"channel",loadChildren:()=>import("./chunk-TLTFNFAB.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Marketplace",roles:[o.ChannelView],redirectUrl:"/menu/log"}},{path:"log",loadChildren:()=>import("./chunk-OMY5ASFA.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Orders",roles:[o.DevView]}},{path:"users",loadChildren:()=>import("./chunk-CIVDQKQZ.js").then(e=>e.userRoutes),canActivate:[c,h],data:{title:"Users",roles:[o.UserView],redirectUrl:"/menu/dashboard"}},{path:"json-api",loadChildren:()=>import("./chunk-Q5IVQP3E.js").then(e=>e.routes),canActivate:[c],data:{title:"Json API"}}]}],ye=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=_({type:n}),n.\u0275inj=b({imports:[I.forChild(Ne),I]});let e=n;return e})();var Tt=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=_({type:n}),n.\u0275inj=b({providers:[W],imports:[X,ye,be,xe,pe.forChild()]});let e=n;return e})();export{Tt as MenuModule};
1
+ import{a as _e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as c}from"./chunk-WZQRKTBN.js";import{b as fe}from"./chunk-KHGTW7IV.js";import"./chunk-A6QXXKPR.js";import{a as he}from"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as be}from"./chunk-UEXWQT5J.js";import{c as ue}from"./chunk-IZZY74PN.js";import{B as ae,H as oe,I as A,l as Y,m as ee,q as te,u as ie,v as ne}from"./chunk-O3BS4AC6.js";import{a as o}from"./chunk-ZSUWHVKX.js";import{b as Z,h as ge}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{a as me,b as ce,c as pe}from"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as re,d as se,e as le,f as de,g as I}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as X,q as K,w as Q,y as W}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Da as N,Fd as P,Hb as M,Ib as _,Jb as j,Kc as y,Mc as E,Nb as S,Nc as g,Oc as w,Pc as x,Ra as U,ac as v,bc as G,cc as C,ec as H,fc as q,gc as J,hc as u,ic as r,id as T,jc as m,jd as D,kc as f,mb as V,na as b,ob as d,ra as s,ub as F,v as L,wc as z,yc as p,zb as $}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{i as k}from"./chunk-66YHNWRR.js";var O=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[o.DashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[o.ProductView]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[o.InventoryView]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[o.PriceView]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/order",Roles:[o.OrderView]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[o.ChannelView]},{Icon:"fa-solid fa-user",Title:"Users",Url:"/menu/users",Roles:[o.UserView]},{Icon:"fas fa-clipboard-list",Title:"Sync Logs",Url:"/menu/sync-log",Roles:[o.Report]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[o.LogisticView]},{Icon:"fas fa-file-alt",Title:"Developer",Url:"/menu/log",Roles:[o.DevView]},{Icon:"fa-solid fa-file-brackets-curly",Title:"JSON Api",Url:"/menu/json-api",Roles:[o.JsonApiView]}]}get getMenu(){return this.menus}};var ve="mat-badge-content",we=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],decls:0,vars:0,template:function(i,a){},styles:[`.mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color, var(--mat-sys-error));color:var(--mat-badge-text-color, var(--mat-sys-on-error));font-family:var(--mat-badge-text-font, var(--mat-sys-label-small-font));font-weight:var(--mat-badge-text-weight, var(--mat-sys-label-small-weight));border-radius:var(--mat-badge-container-shape, var(--mat-sys-corner-full))}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}@media(forced-colors: active){.mat-badge-content{outline:solid 1px;border-radius:0}}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-error) 38%, transparent));color:var(--mat-badge-disabled-state-text-color, var(--mat-sys-on-error))}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, 6px);min-height:var(--mat-badge-small-size-container-size, 6px);line-height:var(--mat-badge-small-size-line-height, 6px);padding:var(--mat-badge-small-size-container-padding, 0);font-size:var(--mat-badge-small-size-text-size, 0);margin:var(--mat-badge-small-size-container-offset, -6px 0)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset, -6px)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, 16px);min-height:var(--mat-badge-container-size, 16px);line-height:var(--mat-badge-line-height, 16px);padding:var(--mat-badge-container-padding, 0 4px);font-size:var(--mat-badge-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-container-offset, -12px 0)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset, -12px)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, 16px);min-height:var(--mat-badge-large-size-container-size, 16px);line-height:var(--mat-badge-large-size-line-height, 16px);padding:var(--mat-badge-large-size-container-padding, 0 4px);font-size:var(--mat-badge-large-size-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-large-size-container-offset, -12px 0)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset, -12px)}
2
+ `],encapsulation:2,changeDetection:0})}return e})(),Ce=(()=>{class e{_ngZone=s(F);_elementRef=s(U);_ariaDescriber=s(ae);_renderer=s($);_animationsDisabled=oe();_idGenerator=s(ne);get color(){return this._color}set color(t){this._setColor(t),this._color=t}_color="primary";overlap=!0;disabled;position="above after";get content(){return this._content}set content(t){this._updateRenderedContent(t)}_content;get description(){return this._description}set description(t){this._updateDescription(t)}_description;size="medium";hidden;_badgeElement;_inlineBadgeDescription;_isInitialized=!1;_interactivityChecker=s(te);_document=s(N);constructor(){let t=s(Y);t.load(we),t.load(ee)}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let t=this._renderer.createElement("span"),i="mat-badge-active";return t.setAttribute("id",this._idGenerator.getId("mat-badge-content-")),t.setAttribute("aria-hidden","true"),t.classList.add(ve),this._animationsDisabled&&t.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(t),typeof requestAnimationFrame=="function"&&!this._animationsDisabled?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add(i)})}):t.classList.add(i),t}_updateRenderedContent(t){let i=`${t??""}`.trim();this._isInitialized&&i&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=i),this._content=i}_updateDescription(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!t||this._isHostInteractive())&&this._removeInlineDescription(),this._description=t,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,t):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(t){let i=this._elementRef.nativeElement.classList;i.remove(`mat-badge-${this._color}`),t&&i.add(`mat-badge-${t}`)}_clearExistingBadges(){let t=this._elementRef.nativeElement.querySelectorAll(`:scope > .${ve}`);for(let i of Array.from(t))i!==this._badgeElement&&i.remove()}static \u0275fac=function(i){return new(i||e)};static \u0275dir=j({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(i,a){i&2&&y("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",P],disabled:[2,"matBadgeDisabled","disabled",P],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",P]}})}return e})(),xe=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=_({type:e});static \u0275inj=b({imports:[ie,A,A]})}return e})();function Oe(e,n){if(e&1&&(r(0,"p",21),g(1),m()),e&2){let t=p(3).$implicit;d(),x(" ",t.Title," ")}}function ke(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(3).$implicit;d(),w(t.Title)}}function Se(e,n){if(e&1&&(r(0,"a",18),f(1,"i"),v(2,Oe,2,1,"p",21)(3,ke,2,1,"p"),m()),e&2){let t=p(2).$implicit;u("href",t.Url,V),d(),E(t.Icon),d(),C(t.Badge?2:3)}}function ze(e,n){if(e&1&&S(0,Se,4,4,"a",20),e&2){let t=p().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Ee(e,n){if(e&1&&(r(0,"p",21),g(1),m()),e&2){let t=p(4).$implicit;d(),x(" ",t.Title," ")}}function Te(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(4).$implicit;d(),w(t.Title)}}function De(e,n){if(e&1&&(v(0,Ee,2,1,"p",21),T(1,"async"),G(2,Te,2,1,"p")),e&2){let t=p(4);C(D(1,1,t.notifications$)!=0?0:2)}}function Ae(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(3).$implicit;d(),w(t.Title)}}function Ie(e,n){if(e&1&&(r(0,"a",19),f(1,"i"),v(2,De,3,3)(3,Ae,2,1,"p"),m()),e&2){let t=p(2).$implicit,i=p();u("matTooltip",i.isCollapseSidebar?t.Title:"")("routerLink",t.Url),d(),E(t.Icon),d(),C(t.Badge?2:3)}}function Be(e,n){if(e&1&&S(0,Ie,4,5,"a",22),e&2){let t=p().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Re(e,n){if(e&1&&(r(0,"li",16),v(1,ze,1,1,"a",18)(2,Be,1,1,"a",19),m()),e&2){let t=n.$implicit;d(),C(t.ExternalLink?1:2)}}var Me=(()=>{let n=class n{constructor(){this.toggleSidebarService=s(he),this.notificationService=s(fe),this.decodeTokenService=s(Z),this.authService=s(ge),this.Menu={};let i=this.decodeTokenService;this.isCollapseSidebar=!1,this.token=i.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new O().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(L(i=>i.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(i){if(i){let a,l=i.split(" ");return l.length==1?a=l[0].substring(0,2):a=l.shift().charAt(0)+l.pop().charAt(0),a}}};n.\u0275fac=function(a){return new(a||n)},n.\u0275cmp=M({type:n,selectors:[["app-menu"]],standalone:!1,decls:29,vars:8,consts:[[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],["routerLink","/menu/profile",1,"dropdown-item","h5",2,"cursor","pointer"],["aria-hidden","true",1,"fa-user","fas"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active"],[1,"main-panel"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"]],template:function(a,l){a&1&&(r(0,"div",0),T(1,"async"),r(2,"div",1)(3,"button",2),z("click",function(){return l.onCallapseSidebar()}),f(4,"i",3),m(),r(5,"div",4)(6,"div",5)(7,"a",6),g(8),m(),r(9,"div",7)(10,"div",8),g(11),m(),f(12,"div",9),r(13,"a",10),f(14,"i",11),g(15,"\xA0 "),r(16,"span"),g(17,"My Profile"),m()(),r(18,"a",12),z("click",function(){return l.onLogout()}),f(19,"i",13),g(20,"\xA0 "),r(21,"span"),g(22," Log Out"),m()()()()(),r(23,"div",14)(24,"ul",15),q(25,Re,3,1,"li",16,H),m()()(),r(27,"div",17),f(28,"router-outlet"),m()()),a&2&&(y("nav-open",D(1,6,l.toggleState$)),d(2),u("ngClass",l.isCollapseSidebar?"collapses":""),d(2),u("ngClass",l.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),d(4),x(" ",l.storeName," "),d(3),x(" ",l.token==null?null:l.token.LID," "),d(14),J(l.Menu))},dependencies:[K,re,le,de,ue,Ce,ce,Q],styles:["@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let e=n;return e})();var h=(e,n)=>k(null,null,function*(){let t=s(me),i=s(se),a=e.data?.roles||[],l=e.data?.redirectUrl||"/";return a.length===0||(yield Le(t,a))?!0:(i.navigate([l]),!1)});function Le(e,n){return k(this,null,function*(){let t=n.map(a=>e.hasPermission(a));return(yield Promise.all(t)).some(a=>a)})}var Ne=[{path:"",component:Me,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"profile",loadChildren:()=>import("./chunk-IXURR6VG.js").then(e=>e.routes),canActivate:[c],data:{title:"My Profile"}},{path:"dashboard",loadChildren:()=>import("./chunk-IQX2CRL5.js").then(e=>e.routes),canActivate:[c,h,_e],data:{title:"Dashboard",roles:[o.DashboardView],redirectUrl:"/menu/products"}},{path:"products",loadChildren:()=>import("./chunk-NX3QFU4A.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Products",roles:[o.ProductView],redirectUrl:"/menu/inventory"}},{path:"inventory",loadChildren:()=>import("./chunk-U4ARIHUF.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Inventory",roles:[o.InventoryView],redirectUrl:"/menu/price"}},{path:"price",loadChildren:()=>import("./chunk-PGQYHHH3.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Price",roles:[o.PriceView],redirectUrl:"/menu/Order"}},{path:"order",loadChildren:()=>import("./chunk-ICY32GYN.js").then(e=>e.routes),canActivate:[c],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-EXKAFEQL.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Report",roles:[o.Report],redirectUrl:"/menu/Logistic"}},{path:"Logistic",loadComponent(){return import("./chunk-VRD2D2BP.js").then(e=>e.LogisticComponent)},canActivate:[c,h],data:{title:"Logistic",roles:[o.LogisticView],redirectUrl:"/menu/channel"}},{path:"channel",loadChildren:()=>import("./chunk-QPELTSKE.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Marketplace",roles:[o.ChannelView],redirectUrl:"/menu/log"}},{path:"log",loadChildren:()=>import("./chunk-YMOSVDG5.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Orders",roles:[o.DevView]}},{path:"users",loadChildren:()=>import("./chunk-CIVDQKQZ.js").then(e=>e.userRoutes),canActivate:[c,h],data:{title:"Users",roles:[o.UserView],redirectUrl:"/menu/dashboard"}},{path:"json-api",loadChildren:()=>import("./chunk-DCMOITWM.js").then(e=>e.routes),canActivate:[c],data:{title:"Json API"}}]}],ye=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=_({type:n}),n.\u0275inj=b({imports:[I.forChild(Ne),I]});let e=n;return e})();var Tt=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=_({type:n}),n.\u0275inj=b({providers:[W],imports:[X,ye,be,xe,pe.forChild()]});let e=n;return e})();export{Tt as MenuModule};
@@ -1,4 +1,4 @@
1
- import{a as Pt,b as _t,d as Ci}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import{a as si}from"./chunk-FSOZOROI.js";import{b as bt}from"./chunk-VYI7JYH5.js";import{a as pi}from"./chunk-OH5T7D7O.js";import{a as bi}from"./chunk-TQROQOXU.js";import{a as wi}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import{a as _i,b as yi}from"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as gi,b as fi}from"./chunk-JU4ZP3HI.js";import{a as li}from"./chunk-3T5VLB63.js";import{d as ft,e as Bt}from"./chunk-STOW2RQN.js";import{a as di}from"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import{a as We,b as hi,c as mi}from"./chunk-KOUB5HRK.js";import{a as Qe}from"./chunk-QETZ5VDX.js";import{a as gt,d as ci,e as ui}from"./chunk-WIRXMAIF.js";import{b as Ke}from"./chunk-S22I47XG.js";import{a as K}from"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import{a as M,e as F,f as ri}from"./chunk-C4MTEDSW.js";import{b as Y,c as pe,d as Ae,e as A,f as ue}from"./chunk-JMRRXRKO.js";import{b as ai}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{G as ei,U as ht,V as qe,ea as ti,fa as Ft,ga as Lt,ia as ii,la as ie,ma as q,ua as ce}from"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ni}from"./chunk-ZSUWHVKX.js";import{h as Yt}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Zt,c as Xt}from"./chunk-NB2H6KA7.js";import{c as Dt}from"./chunk-UPRDDI4K.js";import{A as we,a as Ie,b as oi,g as mt,h as Ne,m as He}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Wt,e as Jt}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as qt,B as ne,D as Oe,q as Ve,s as pt,t as Le,u as ut,v as be,w as jt}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as Mt,Aa as S,Ab as ke,Bc as v,Ca as tt,Cc as ae,Dc as b,Ec as _,Fd as T,Gd as Z,Hb as I,Ia as it,Ib as le,Ic as lt,Jb as Rt,Jc as Re,K as kt,Lb as E,Lc as ze,Mb as se,Mc as C,Nb as p,Nc as V,Oc as $e,Pa as x,Pc as te,Rc as Me,Sc as De,Tc as Fe,Z as et,_b as D,_c as oe,ac as me,ad as G,bd as Se,cc as ge,dc as Ut,dd as st,ea as Ue,ed as dt,f as Pe,fc as at,fd as je,gc as rt,gd as $t,hc as l,ic as h,id as Te,jc as m,jd as ve,kc as B,la as xe,lc as U,ld as ye,ma as ee,mb as nt,mc as $,na as re,nc as L,ob as s,oc as O,pa as de,pc as N,pd as ct,qc as k,ra as z,rc as H,sc as X,tb as R,ub as ot,ud as fe,v as Gt,wc as P,ya as y,yc as c,za as w}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Be,b as Ge}from"./chunk-66YHNWRR.js";var Ti=`
1
+ import{a as Pt,b as _t,d as Ci}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import{a as si}from"./chunk-FSOZOROI.js";import{b as bt}from"./chunk-VYI7JYH5.js";import{a as pi}from"./chunk-OH5T7D7O.js";import{a as bi}from"./chunk-TQROQOXU.js";import{a as wi}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import{a as _i,b as yi}from"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as gi,b as fi}from"./chunk-JU4ZP3HI.js";import{a as li}from"./chunk-3T5VLB63.js";import{d as ft,e as Bt}from"./chunk-STOW2RQN.js";import{a as di}from"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import{a as We,b as hi,c as mi}from"./chunk-KOUB5HRK.js";import{a as Qe}from"./chunk-QETZ5VDX.js";import{a as gt,d as ci,e as ui}from"./chunk-WIRXMAIF.js";import{b as Ke}from"./chunk-S22I47XG.js";import{a as K}from"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import{a as M,e as F,f as ri}from"./chunk-C4MTEDSW.js";import{b as Y,c as pe,d as Ae,e as A,f as ue}from"./chunk-JMRRXRKO.js";import{b as ai}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{G as ei,U as ht,V as qe,ea as ti,fa as Ft,ga as Lt,ia as ii,la as ie,ma as q,ua as ce}from"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ni}from"./chunk-ZSUWHVKX.js";import{h as Yt}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Zt,c as Xt}from"./chunk-NB2H6KA7.js";import{c as Dt}from"./chunk-UPRDDI4K.js";import{A as we,a as Ie,b as oi,g as mt,h as Ne,m as He}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Wt,e as Jt}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as qt,B as ne,D as Oe,q as Ve,s as pt,t as Le,u as ut,v as be,w as jt}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as Mt,Aa as S,Ab as ke,Bc as v,Ca as tt,Cc as ae,Dc as b,Ec as _,Fd as T,Gd as Z,Hb as I,Ia as it,Ib as le,Ic as lt,Jb as Rt,Jc as Re,K as kt,Lb as E,Lc as ze,Mb as se,Mc as C,Nb as p,Nc as V,Oc as $e,Pa as x,Pc as te,Rc as Me,Sc as De,Tc as Fe,Z as et,_b as D,_c as oe,ac as me,ad as G,bd as Se,cc as ge,dc as Ut,dd as st,ea as Ue,ed as dt,f as Pe,fc as at,fd as je,gc as rt,gd as $t,hc as l,ic as h,id as Te,jc as m,jd as ve,kc as B,la as xe,lc as U,ld as ye,ma as ee,mb as nt,mc as $,na as re,nc as L,ob as s,oc as O,pa as de,pc as N,pd as ct,qc as k,ra as z,rc as H,sc as X,tb as R,ub as ot,ud as fe,v as Gt,wc as P,ya as y,yc as c,za as w}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Be,b as Ge}from"./chunk-66YHNWRR.js";var Ti=`
2
2
  .p-datatable {
3
3
  position: relative;
4
4
  display: block;
@@ -1 +1 @@
1
- import{a as b,b as ct}from"./chunk-4GV67OQR.js";import"./chunk-BKR7YPEW.js";import{a as lt}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as rt}from"./chunk-ZZYFVEJO.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as at}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as ot,h as it,m as nt}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{e as tt,g as et}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as X,B as Z,q as Y,w as G,y as Q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as j,Hb as M,Ia as w,Mc as $,Nc as n,Oc as x,Pc as C,Qc as O,Rc as H,Sc as J,Tc as W,Uc as q,Z as P,_c as A,ac as f,ad as z,bd as K,cc as _,cd as U,dc as L,ec as k,fc as I,gc as N,hc as m,ic as e,id as v,jc as i,jd as D,kc as B,kd as V,mb as T,ob as l,ra as F,rc as R,v as E,wc as y,ya as p,yc as S,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var st=(t,o)=>({"bg-gradient-danger":t,"bg-gradient-warning":o}),dt=()=>["/menu/products/status/notificationV2/detailV2"],mt=t=>({ID:t}),pt=(t,o,a)=>({"text-warning":t,"text-success":o,"text-danger":a});function ut(t,o){t&1&&(e(0,"div"),n(1," Scan in progress. You will be notified once it is complete. "),i())}function ft(t,o){if(t&1&&(e(0,"div"),n(1),v(2,"number"),i()),t&2){let a=o.$implicit;l(),O(" ",a.Key,": ",D(2,2,a.Value)," ")}}function _t(t,o){if(t&1&&(e(0,"div",19)(1,"div",18),n(2,"Status Product:"),i(),I(3,ft,3,4,"div",null,L),i()),t&2){let a=S(2).$implicit;l(3),N(a.ParsedStatus)}}function St(t,o){if(t&1&&(e(0,"div",18),n(1),i(),e(2,"div"),n(3),i(),f(4,_t,5,0,"div",19)),t&2){let a=S().$implicit;l(),C(" ",a.ProcessLabel," "),l(2),x(a.ProcessDescription),l(),_(a!=null&&a.ParsedStatus&&(a==null||a.ParsedStatus==null?null:a.ParsedStatus.length)>0?4:-1)}}function Ct(t,o){if(t&1&&(n(0),v(1,"number"),e(2,"span"),n(3,"s"),i()),t&2){let a=S().$implicit;C(" ",V(1,1,a.DurationInSecond,"1.1-1")," ")}}function vt(t,o){t&1&&n(0," - ")}function xt(t,o){t&1&&n(0," In Progress ")}function gt(t,o){t&1&&n(0," Completed ")}function ht(t,o){t&1&&n(0," Failed ")}function It(t,o){if(t&1&&(e(0,"tr",12)(1,"td")(2,"a",15),n(3),i()(),e(4,"td")(5,"div",16),B(6,"img",17),e(7,"span"),n(8),i()()(),e(9,"td"),f(10,ut,2,0,"div")(11,St,5,3),i(),e(12,"td"),f(13,Ct,4,4)(14,vt,1,0),i(),e(15,"td")(16,"div",18),f(17,xt,1,0)(18,gt,1,0)(19,ht,1,0),i()(),e(20,"td",19)(21,"div"),n(22),i(),e(23,"div"),n(24),v(25,"date"),i()()()),t&2){let a,r=o.$implicit,c=S();m("ngClass",K(16,st,r.Status==1,r.Status==0)),l(2),m("routerLink",j(19,dt))("queryParams",z(20,mt,r.ID)),l(),C(" ",r.ID," "),l(3),m("src",r.Img,T),l(2),x(r.ChannelName),l(2),_(r.StateID==c.scanState.InProgress?10:11),l(3),_(r.DurationInSecond?13:14),l(3),$(U(22,pt,r.StateID==c.scanState.InProgress,r.StateID==c.scanState.Completed,r.StateID==c.scanState.Failed)),l(),_((a=r.StateID)===c.scanState.InProgress?17:a===c.scanState.Completed?18:a===c.scanState.Failed?19:-1),l(5),x(r.LoginID),l(2),C(" ",V(25,13,r.Created,"dd MMM yyyy HH:mm")," ")}}var Ot=(()=>{let o=class o{constructor(){this.notificationService=F(b),this.filter=w({RowCount:20,PageNumber:1,ChannelID:null}),this.scanState=ct,this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotificationList(this.filter()).pipe(E(r=>(r.Data=r.Data.map(c=>(c.StatusProduct&&(c.ParsedStatus=JSON.parse(c.StatusProduct)),c)),r)),P(1))}onFilter(){this.initNotifications()}};o.\u0275fac=function(c){return new(c||o)},o.\u0275cmp=M({type:o,selectors:[["app-notificationV2"]],features:[A([b])],decls:37,vars:8,consts:[["headerTitle","Notification",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/notification",1,"btn","btn-outline-secondary","btn-lg"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","260px"],[3,"ngClass"],[1,"col-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","gap-3"],[1,"channelLogo-md",3,"src","alt"],[1,"fw-bold"],[1,"lh-base"]],template:function(c,d){if(c&1){let s=R();q(0),v(1,"async"),e(2,"mainpanel",0),y("onSubmit",function(){return p(s),u(d.onFilter())}),e(3,"actions")(4,"a",1),n(5," Scan Job "),i()(),e(6,"filters")(7,"div")(8,"label",2),n(9,"Channel"),i(),e(10,"app-channel-options-v2",3),W("ngModelChange",function(h){return p(s),J(d.filter().ChannelID,h)||(d.filter().ChannelID=h),u(h)}),i()()(),e(11,"content")(12,"div",4)(13,"div",5)(14,"div",6)(15,"div",7)(16,"table",8)(17,"thead",9)(18,"tr",10)(19,"th",11),n(20,"Job ID"),i(),e(21,"th"),n(22,"Channel"),i(),e(23,"th"),n(24,"Process"),i(),e(25,"th"),n(26,"Duration"),i(),e(27,"th"),n(28,"Status"),i(),e(29,"th"),n(30,"Creator"),i()()(),e(31,"tbody"),I(32,It,26,26,"tr",12,k),i()()()()(),e(34,"div",5)(35,"div",13)(36,"app-custom-paginator",14),y("next",function(){return p(s),u(d.initNotifications())})("previous",function(){return p(s),u(d.initNotifications())}),i()()()()()()}if(c&2){let s=D(1,6,d.notifications$);l(2),m("hideSearchBox",!0),l(8),H("ngModel",d.filter().ChannelID),l(22),N(s==null?null:s.Data),l(4),m("filter",d.filter())("totaldata",s==null||s.Data==null?null:s.Data.length)("paginationTotal",s==null?null:s.Count)("hasClicked",!0)}},dependencies:[Z,Y,ot,it,nt,at,rt,et,tt,lt,G,X,Q],encapsulation:2});let t=o;return t})();export{Ot as NotificationV2Component};
1
+ import{a as b,b as ct}from"./chunk-4GV67OQR.js";import"./chunk-BKR7YPEW.js";import{a as lt}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as rt}from"./chunk-ZZYFVEJO.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as at}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as ot,h as it,m as nt}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{e as tt,g as et}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as X,B as Z,q as Y,w as G,y as Q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as j,Hb as M,Ia as w,Mc as $,Nc as n,Oc as x,Pc as C,Qc as O,Rc as H,Sc as J,Tc as W,Uc as q,Z as P,_c as A,ac as f,ad as z,bd as K,cc as _,cd as U,dc as L,ec as k,fc as I,gc as N,hc as m,ic as e,id as v,jc as i,jd as D,kc as B,kd as V,mb as T,ob as l,ra as F,rc as R,v as E,wc as y,ya as p,yc as S,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var st=(t,o)=>({"bg-gradient-danger":t,"bg-gradient-warning":o}),dt=()=>["/menu/products/status/notificationV2/detailV2"],mt=t=>({ID:t}),pt=(t,o,a)=>({"text-warning":t,"text-success":o,"text-danger":a});function ut(t,o){t&1&&(e(0,"div"),n(1," Scan in progress. You will be notified once it is complete. "),i())}function ft(t,o){if(t&1&&(e(0,"div"),n(1),v(2,"number"),i()),t&2){let a=o.$implicit;l(),O(" ",a.Key,": ",D(2,2,a.Value)," ")}}function _t(t,o){if(t&1&&(e(0,"div",19)(1,"div",18),n(2,"Status Product:"),i(),I(3,ft,3,4,"div",null,L),i()),t&2){let a=S(2).$implicit;l(3),N(a.ParsedStatus)}}function St(t,o){if(t&1&&(e(0,"div",18),n(1),i(),e(2,"div"),n(3),i(),f(4,_t,5,0,"div",19)),t&2){let a=S().$implicit;l(),C(" ",a.ProcessLabel," "),l(2),x(a.ProcessDescription),l(),_(a!=null&&a.ParsedStatus&&(a==null||a.ParsedStatus==null?null:a.ParsedStatus.length)>0?4:-1)}}function Ct(t,o){if(t&1&&(n(0),v(1,"number"),e(2,"span"),n(3,"s"),i()),t&2){let a=S().$implicit;C(" ",V(1,1,a.DurationInSecond,"1.1-1")," ")}}function vt(t,o){t&1&&n(0," - ")}function xt(t,o){t&1&&n(0," In Progress ")}function gt(t,o){t&1&&n(0," Completed ")}function ht(t,o){t&1&&n(0," Failed ")}function It(t,o){if(t&1&&(e(0,"tr",12)(1,"td")(2,"a",15),n(3),i()(),e(4,"td")(5,"div",16),B(6,"img",17),e(7,"span"),n(8),i()()(),e(9,"td"),f(10,ut,2,0,"div")(11,St,5,3),i(),e(12,"td"),f(13,Ct,4,4)(14,vt,1,0),i(),e(15,"td")(16,"div",18),f(17,xt,1,0)(18,gt,1,0)(19,ht,1,0),i()(),e(20,"td",19)(21,"div"),n(22),i(),e(23,"div"),n(24),v(25,"date"),i()()()),t&2){let a,r=o.$implicit,c=S();m("ngClass",K(16,st,r.Status==1,r.Status==0)),l(2),m("routerLink",j(19,dt))("queryParams",z(20,mt,r.ID)),l(),C(" ",r.ID," "),l(3),m("src",r.Img,T),l(2),x(r.ChannelName),l(2),_(r.StateID==c.scanState.InProgress?10:11),l(3),_(r.DurationInSecond?13:14),l(3),$(U(22,pt,r.StateID==c.scanState.InProgress,r.StateID==c.scanState.Completed,r.StateID==c.scanState.Failed)),l(),_((a=r.StateID)===c.scanState.InProgress?17:a===c.scanState.Completed?18:a===c.scanState.Failed?19:-1),l(5),x(r.LoginID),l(2),C(" ",V(25,13,r.Created,"dd MMM yyyy HH:mm")," ")}}var Ot=(()=>{let o=class o{constructor(){this.notificationService=F(b),this.filter=w({RowCount:20,PageNumber:1,ChannelID:null}),this.scanState=ct,this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotificationList(this.filter()).pipe(E(r=>(r.Data=r.Data.map(c=>(c.StatusProduct&&(c.ParsedStatus=JSON.parse(c.StatusProduct)),c)),r)),P(1))}onFilter(){this.initNotifications()}};o.\u0275fac=function(c){return new(c||o)},o.\u0275cmp=M({type:o,selectors:[["app-notificationV2"]],features:[A([b])],decls:37,vars:8,consts:[["headerTitle","Notification",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/notification",1,"btn","btn-outline-secondary","btn-lg"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","260px"],[3,"ngClass"],[1,"col-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","gap-3"],[1,"channelLogo-md",3,"src","alt"],[1,"fw-bold"],[1,"lh-base"]],template:function(c,d){if(c&1){let s=R();q(0),v(1,"async"),e(2,"mainpanel",0),y("onSubmit",function(){return p(s),u(d.onFilter())}),e(3,"actions")(4,"a",1),n(5," Scan Job "),i()(),e(6,"filters")(7,"div")(8,"label",2),n(9,"Channel"),i(),e(10,"app-channel-options-v2",3),W("ngModelChange",function(h){return p(s),J(d.filter().ChannelID,h)||(d.filter().ChannelID=h),u(h)}),i()()(),e(11,"content")(12,"div",4)(13,"div",5)(14,"div",6)(15,"div",7)(16,"table",8)(17,"thead",9)(18,"tr",10)(19,"th",11),n(20,"Job ID"),i(),e(21,"th"),n(22,"Channel"),i(),e(23,"th"),n(24,"Process"),i(),e(25,"th"),n(26,"Duration"),i(),e(27,"th"),n(28,"Status"),i(),e(29,"th"),n(30,"Creator"),i()()(),e(31,"tbody"),I(32,It,26,26,"tr",12,k),i()()()()(),e(34,"div",5)(35,"div",13)(36,"app-custom-paginator",14),y("next",function(){return p(s),u(d.initNotifications())})("previous",function(){return p(s),u(d.initNotifications())}),i()()()()()()}if(c&2){let s=D(1,6,d.notifications$);l(2),m("hideSearchBox",!0),l(8),H("ngModel",d.filter().ChannelID),l(22),N(s==null?null:s.Data),l(4),m("filter",d.filter())("totaldata",s==null||s.Data==null?null:s.Data.length)("paginationTotal",s==null?null:s.Count)("hasClicked",!0)}},dependencies:[Z,Y,ot,it,nt,at,rt,et,tt,lt,G,X,Q],encapsulation:2});let t=o;return t})();export{Ot as NotificationV2Component};
@@ -1 +1 @@
1
- import{a as Z}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import{a as et}from"./chunk-27DIE2YS.js";import{a as tt}from"./chunk-LCN52IJT.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as X}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as W}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as Q}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as K}from"./chunk-ZSUWHVKX.js";import{h as J}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Y,c as G}from"./chunk-NB2H6KA7.js";import{c as T}from"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as H}from"./chunk-D6JH2KV4.js";import{e as z}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as U,w as q,y as R}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as D,G as P,Hb as O,Nb as L,Nc as c,Oc as N,Pc as _,ac as w,ad as g,bc as $,ca as b,cc as I,ec as B,f as E,fc as A,gc as F,hc as u,ic as o,id as h,jc as r,jd as S,kc as m,kd as j,mb as k,ob as s,oc as M,pc as V,ra as C,rc as y,wc as v,ya as f,yc as p,za as x}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var it=()=>["/menu/products/status/sold-in-channel"],nt=e=>({ID:e}),ot=()=>["/menu/products/status/not-in-pos"],rt=e=>[e];function at(e,a){if(e&1&&c(0),e&2){let i=p().$implicit;_(" ",i.Count," ")}}function ct(e,a){if(e&1){let i=y();o(0,"span",23),v("click",function(){f(i);let t=p().$implicit,l=p(2);return x(l.getLiveProductCount(t.ID,t))}),m(1,"i",24),r()}}function lt(e,a){if(e&1){let i=y();M(0),o(1,"button",25),v("click",function(){f(i);let t=p().$implicit,l=p(2);return x(l.onScanChannel(t))}),m(2,"i",26),c(3," Scan "),r(),V()}}function st(e,a){if(e&1){let i=y();o(0,"tr")(1,"td"),m(2,"img",14),o(3,"span",15),c(4),r()(),o(5,"td",16),w(6,at,1,1)(7,ct,2,0,"span",17),r(),o(8,"td",16)(9,"a",18),c(10),h(11,"number"),r()(),o(12,"td",16)(13,"a",18),c(14),h(15,"number"),r()(),o(16,"td"),c(17),h(18,"date"),r(),o(19,"td")(20,"div",19),L(21,lt,4,0,"ng-container",20),o(22,"button",21),v("click",function(){let t=f(i).$implicit,l=p(2);return x(l.onClearCache(t.ID))}),m(23,"i",22),c(24," Clear "),r()()()()}if(e&2){let i=a.$implicit,n=p(2);s(2),u("src",n.getChannelLogo(i.TypeID),k),s(2),N(i.Name),s(2),I(i.Count!==void 0?6:7),s(3),u("routerLink",D(18,it))("queryParams",g(19,nt,i.ID)),s(),_(" ",S(11,11,i.SoldInChannel)," "),s(3),u("routerLink",D(21,ot))("queryParams",g(22,nt,i.ID)),s(),_(" ",S(15,13,i.NotInPOS)," "),s(3),_(" ",i.LastSync?j(18,15,i.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),s(4),u("ngxPermissionsOnly",g(24,rt,n.scanProductRole))}}function pt(e,a){if(e&1&&(o(0,"div",4)(1,"table",6)(2,"thead",7)(3,"tr",8)(4,"th"),c(5,"Channel"),r(),o(6,"th",9),c(7," Live Product "),r(),o(8,"th",10),c(9," Sold In Channel "),r(),o(10,"th",11),c(11," Product Not in POS "),r(),o(12,"th",12),c(13,"Last Sync"),r(),m(14,"th",13),r()(),o(15,"tbody"),A(16,st,25,26,"tr",null,B),h(18,"async"),r()()()),e&2){let i,n=p();s(16),F((i=S(18,0,n.channels$))==null?null:i.Data)}}function dt(e,a){e&1&&(o(0,"div",5),m(1,"app-empty-state"),r())}var kt=(()=>{let a=class a{constructor(){this.productService=C(tt),this.toastr=C(H),this.dialog=C(W),this.authService=C(J),this.scanProductRole=K.ProductScan;let n=this.authService;this.destroy$=new E,this.channelOptions=n.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(n,t){this.productService.getTotalProductLive(n).pipe(b(this.destroy$)).subscribe(l=>{t.Count=l.Count})}onScanChannel(n){this.dialog.open(Z,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:n.ID},disabledChannelOption:!0}}).afterClosed().pipe(P(t=>T.IsNotEmpty(t))).subscribe(t=>{this.scanAllProduct(n.ID,t)})}scanAllProduct(n,t){let l=this.productService.findChannelById(n,this.channelOptions);this.productService.scanAll(t.ChannelID,t.ScanFull,t.UpdatedProduct,t.Async).pipe(P(d=>d)).subscribe(d=>{t.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(d,l,!t.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(n){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(n).pipe(b(this.destroy$)).subscribe(l=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(n){return T.getChannelLogoByTypeId(n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=O({type:a,selectors:[["app-channel-statistic"]],decls:8,vars:5,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngxPermissionsOnly"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"]],template:function(t,l){if(t&1&&(o(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),w(5,pt,19,2,"div",4),h(6,"async"),$(7,dt,2,0,"div",5),r()()()()()),t&2){let d;u("hideSearchBox",!0)("hideSearchDropdown",!0),s(5),I(((d=S(6,3,l.channels$))==null||d.Data==null?null:d.Data.length)>0?5:7)}},dependencies:[X,Q,z,G,Y,et,q,U,R],encapsulation:2});let e=a;return e})();export{kt as ChannelStatisticComponent};
1
+ import{a as Z}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import{a as et}from"./chunk-27DIE2YS.js";import{a as tt}from"./chunk-REDQ2L7Y.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-KHGTW7IV.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as X}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as W}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as Q}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as K}from"./chunk-ZSUWHVKX.js";import{h as J}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Y,c as G}from"./chunk-NB2H6KA7.js";import{c as T}from"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as H}from"./chunk-D6JH2KV4.js";import{e as z}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as U,w as q,y as R}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as D,G as P,Hb as O,Nb as L,Nc as c,Oc as N,Pc as _,ac as w,ad as g,bc as $,ca as b,cc as I,ec as B,f as E,fc as A,gc as F,hc as u,ic as o,id as h,jc as r,jd as S,kc as m,kd as j,mb as k,ob as s,oc as M,pc as V,ra as C,rc as y,wc as v,ya as f,yc as p,za as x}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var it=()=>["/menu/products/status/sold-in-channel"],nt=e=>({ID:e}),ot=()=>["/menu/products/status/not-in-pos"],rt=e=>[e];function at(e,a){if(e&1&&c(0),e&2){let i=p().$implicit;_(" ",i.Count," ")}}function ct(e,a){if(e&1){let i=y();o(0,"span",23),v("click",function(){f(i);let t=p().$implicit,l=p(2);return x(l.getLiveProductCount(t.ID,t))}),m(1,"i",24),r()}}function lt(e,a){if(e&1){let i=y();M(0),o(1,"button",25),v("click",function(){f(i);let t=p().$implicit,l=p(2);return x(l.onScanChannel(t))}),m(2,"i",26),c(3," Scan "),r(),V()}}function st(e,a){if(e&1){let i=y();o(0,"tr")(1,"td"),m(2,"img",14),o(3,"span",15),c(4),r()(),o(5,"td",16),w(6,at,1,1)(7,ct,2,0,"span",17),r(),o(8,"td",16)(9,"a",18),c(10),h(11,"number"),r()(),o(12,"td",16)(13,"a",18),c(14),h(15,"number"),r()(),o(16,"td"),c(17),h(18,"date"),r(),o(19,"td")(20,"div",19),L(21,lt,4,0,"ng-container",20),o(22,"button",21),v("click",function(){let t=f(i).$implicit,l=p(2);return x(l.onClearCache(t.ID))}),m(23,"i",22),c(24," Clear "),r()()()()}if(e&2){let i=a.$implicit,n=p(2);s(2),u("src",n.getChannelLogo(i.TypeID),k),s(2),N(i.Name),s(2),I(i.Count!==void 0?6:7),s(3),u("routerLink",D(18,it))("queryParams",g(19,nt,i.ID)),s(),_(" ",S(11,11,i.SoldInChannel)," "),s(3),u("routerLink",D(21,ot))("queryParams",g(22,nt,i.ID)),s(),_(" ",S(15,13,i.NotInPOS)," "),s(3),_(" ",i.LastSync?j(18,15,i.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),s(4),u("ngxPermissionsOnly",g(24,rt,n.scanProductRole))}}function pt(e,a){if(e&1&&(o(0,"div",4)(1,"table",6)(2,"thead",7)(3,"tr",8)(4,"th"),c(5,"Channel"),r(),o(6,"th",9),c(7," Live Product "),r(),o(8,"th",10),c(9," Sold In Channel "),r(),o(10,"th",11),c(11," Product Not in POS "),r(),o(12,"th",12),c(13,"Last Sync"),r(),m(14,"th",13),r()(),o(15,"tbody"),A(16,st,25,26,"tr",null,B),h(18,"async"),r()()()),e&2){let i,n=p();s(16),F((i=S(18,0,n.channels$))==null?null:i.Data)}}function dt(e,a){e&1&&(o(0,"div",5),m(1,"app-empty-state"),r())}var kt=(()=>{let a=class a{constructor(){this.productService=C(tt),this.toastr=C(H),this.dialog=C(W),this.authService=C(J),this.scanProductRole=K.ProductScan;let n=this.authService;this.destroy$=new E,this.channelOptions=n.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(n,t){this.productService.getTotalProductLive(n).pipe(b(this.destroy$)).subscribe(l=>{t.Count=l.Count})}onScanChannel(n){this.dialog.open(Z,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:n.ID},disabledChannelOption:!0}}).afterClosed().pipe(P(t=>T.IsNotEmpty(t))).subscribe(t=>{this.scanAllProduct(n.ID,t)})}scanAllProduct(n,t){let l=this.productService.findChannelById(n,this.channelOptions);this.productService.scanAll(t.ChannelID,t.ScanFull,t.UpdatedProduct,t.Async).pipe(P(d=>d)).subscribe(d=>{t.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(d,l,!t.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(n){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(n).pipe(b(this.destroy$)).subscribe(l=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(n){return T.getChannelLogoByTypeId(n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=O({type:a,selectors:[["app-channel-statistic"]],decls:8,vars:5,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngxPermissionsOnly"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"]],template:function(t,l){if(t&1&&(o(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),w(5,pt,19,2,"div",4),h(6,"async"),$(7,dt,2,0,"div",5),r()()()()()),t&2){let d;u("hideSearchBox",!0)("hideSearchDropdown",!0),s(5),I(((d=S(6,3,l.channels$))==null||d.Data==null?null:d.Data.length)>0?5:7)}},dependencies:[X,Q,z,G,Y,et,q,U,R],encapsulation:2});let e=a;return e})();export{kt as ChannelStatisticComponent};
@@ -1 +1 @@
1
- import{a as ne}from"./chunk-ZSUWHVKX.js";import{a as K,h as te}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{a as ee}from"./chunk-NB2H6KA7.js";import{a as _,c as J}from"./chunk-UPRDDI4K.js";import{A as ge,c as ie,h as oe,i as re,k as ae,m as se,n as de,t as le,u as ce,v as me,w as pe}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as X}from"./chunk-D6JH2KV4.js";import{d as Z}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as Y,w as $}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Ab as x,Cc as U,Dc as F,Ec as R,Hb as E,Ic as S,Mc as j,Nc as l,Oc as N,Pc as B,Qc as z,Rc as M,Sc as O,Tc as P,Z as A,ac as u,bd as q,cc as f,ec as L,fc as k,gc as T,hc as w,ic as o,id as G,jc as r,jd as H,kc as m,lc as v,ma as D,mb as h,mc as y,nc as W,ob as d,rc as I,sc as V,ud as Q,wc as b,ya as p,yc as c,za as g}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function xe(n,a){if(n&1&&(v(0,"swiper-slide")(1,"div")(2,"a",1),W(3,"img",2),y()(),v(4,"a",3),l(5),y(),v(6,"p",4),l(7),y()()),n&2){let i=a.$implicit;d(2),V("href",i.href,h),d(),V("src",i.imgSrc,h),d(),V("href",i.href,h),d(),N(i.title),d(2),N(i.description)}}var fe=(()=>{let a=class a{constructor(){this.newsList=Q([])}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=E({type:a,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["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(e,s){e&1&&(v(0,"swiper-container",0),k(1,xe,8,5,"swiper-slide",null,L),y()),e&2&&(d(),T(s.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let n=a;return n})();var _e=(()=>{let a=class a{constructor(){}getBrowserName(){let t=window.navigator.userAgent.toLowerCase();switch(!0){case(t.indexOf("edge")>-1||t.indexOf("edg")>-1):return"edge";case t.indexOf("opr")>-1:return"opera";case t.indexOf("chrome")>-1:return"chrome";case t.indexOf("trident")>-1:return"ie";case t.indexOf("firefox")>-1:return"firefox";case t.indexOf("safari")>-1:return"safari";default:return"other"}}};a.\u0275fac=function(e){return new(e||a)},a.\u0275prov=D({token:a,factory:a.\u0275fac,providedIn:"root"});let n=a;return n})();var Ce=["subdomainEl"],we=(n,a)=>({"rounded-end":n,"border-end-0":a});function ve(n,a){if(n&1&&(o(0,"div",33),m(1,"img",34),r()),n&2){let i=a.$implicit;d(),w("src",i.img,h)("title",i.title)("alt",i.title)}}function ye(n,a){if(n&1){let i=I();o(0,"div",15)(1,"h3",16),l(2,"DealPOS Omnichannel"),r(),o(3,"small",17),l(4," Multichannel Inventory Management Software "),r()(),o(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),m(10,"i",22),r()(),o(11,"input",23,0),P("ngModelChange",function(e){p(i);let s=c();return O(s.subdomain,e)||(s.subdomain=e),g(e)}),r(),o(13,"div")(14,"select",24),P("ngModelChange",function(e){p(i);let s=c();return O(s.domain,e)||(s.domain=e),g(e)}),o(15,"option",25),l(16," .dealpos.co.id "),r(),o(17,"option",26),l(18,".dealpos.net"),r(),o(19,"option",27),l(20,".dealpos.com"),r(),o(21,"option",28),l(22,".dealpos.app"),r()()()(),o(23,"div",29)(24,"button",30),b("click",function(){p(i);let e=c();return g(e.onNextState())}),l(25," Next "),r()(),o(26,"div",31)(27,"div",32),k(28,ve,2,3,"div",33,L),r()()()()}if(n&2){let i=c();d(11),M("ngModel",i.subdomain),d(3),M("ngModel",i.domain),d(14),T(i.channels)}}function Se(n,a){n&1&&(o(0,"p"),l(1,"Username is required"),r())}function Me(n,a){if(n&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),u(3,Se,2,0,"p"),r()()),n&2){c();let i=S(14);d(3),f(i.errors.required?3:-1)}}function Oe(n,a){if(n&1){let i=I();o(0,"i",57),b("click",function(){p(i);let e=c(3);return g(e.hideShowPassword())}),r()}if(n&2){let i=c(3);j("fa "+i.passwordIcon)}}function Pe(n,a){if(n&1&&(o(0,"span",47),u(1,Oe,1,2,"i",56),r()),n&2){let i=c(2);d(),f(i.password?1:-1)}}function Ee(n,a){n&1&&(o(0,"p"),l(1,"Password is required"),r())}function Le(n,a){if(n&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),u(3,Ee,2,0,"p"),r()()),n&2){c();let i=S(21);d(3),f(i.errors.required?3:-1)}}function ke(n,a){if(n&1){let i=I();o(0,"div",35)(1,"h3",36),l(2,"Sign in"),r(),o(3,"h3",37),l(4," to "),o(5,"h6",38),l(6),r(),o(7,"i",39),b("click",function(){p(i);let e=c();return g(e.onEditDomain())}),r()()(),o(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),m(12,"i",42),r()(),o(13,"input",43,1),P("ngModelChange",function(e){p(i);let s=c();return O(s.username,e)||(s.username=e),g(e)}),r()(),u(15,Me,4,1,"div",44),o(16,"div",20)(17,"div",21)(18,"span"),m(19,"i",45),r()(),o(20,"input",46,2),P("ngModelChange",function(e){p(i);let s=c();return O(s.password,e)||(s.password=e),g(e)}),r(),u(22,Pe,2,1,"span",47),r(),u(23,Le,4,1,"div",44),o(24,"div",48)(25,"button",49),b("click",function(){p(i);let e=c();return g(e.onLogin())}),l(26," Log in "),r()(),o(27,"div",50),m(28,"hr"),o(29,"span",51),l(30,"or"),r(),m(31,"hr"),r(),o(32,"div")(33,"button",52),b("click",function(e){p(i);let s=c();return g(s.onLoginByGoogle(e))}),m(34,"i",53),l(35," Sign In with Google "),r()()()}if(n&2){let i=S(14),t=S(21),e=c();d(6),z(" (",e.subdomain,"",e.domain,") "),d(7),M("ngModel",e.username),d(2),f(i.invalid&&(i.dirty||i.touched)?15:-1),d(5),w("type",e.passwordType)("ngClass",q(9,we,e.browser=="edge",e.browser!="edge")),M("ngModel",e.password),d(2),f(e.browser!="edge"?22:-1),d(),f(t.invalid&&(t.dirty||t.touched)?23:-1)}}var Ke=(()=>{let a=class a{constructor(t,e,s,C,he){this._router=t,this.toastr=e,this.checkBrowser=s,this.authService=C,this.ngxPermission=he,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:_.SHOOPE},{title:"Tokopedia",img:_.TOKOPEDIA},{title:"Tiktok",img:_.TIKTOK},{title:"Woocommerce",img:_.WOOCOMMERCE},{title:"Lazada",img:_.LAZADA},{title:"Shopify",img:_.SHOPIFY},{title:"Plugo",img:_.PLUGONEW}],this.version=K.version,this.news$=C.getNews().pipe(A(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let t=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=t}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let t=JSON.parse(localStorage.getItem("Authorization"));if(t){this.username=t?.username,this.subdomain=t?.Host?.split(".")[0];let e=t?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(J.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let t=this.subdomain.indexOf(".dealpos");t!=-1&&(this.subdomain=this.subdomain.substring(0,t))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let t={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(t).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(t){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(t,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(t){this.ngxPermission.hasPermission([ne.DashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):t?.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")}};a.\u0275fac=function(e){return new(e||a)(x(Z),x(X),x(_e),x(te),x(ee))},a.\u0275cmp=E({type:a,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&U(Ce,5),e&2){let C;F(C=R())&&(s.subdomainEl=C.first)}},decls:18,vars:6,consts:[["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"],[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"],[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"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[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"],[1,"input-group-text","border-start-0","rounded-end"],[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"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(e,s){e&1&&(o(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),l(4,"New Features"),r(),m(5,"POS-news-swiper",7),G(6,"async"),r(),o(7,"div",8),u(8,ye,30,2)(9,ke,36,12),r()(),o(10,"div",9)(11,"span",10),l(12,"powered by :"),r(),m(13,"a",11),r(),o(14,"div",12)(15,"a",13),l(16),m(17,"i",14),r()()()),e&2&&(d(5),w("newsList",H(6,4,s.news$)),d(3),f(s.loginState=="FORM_DOMAIN"?8:9),d(7),w("href",s.changelogUrl,h),d(),B("version ",s.version))},dependencies:[fe,ge,de,ce,me,ie,le,oe,re,pe,se,ae,Y,$],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}"]});let n=a;return n})();export{Ke as LoginComponent};
1
+ import{a as ne}from"./chunk-ZSUWHVKX.js";import{a as K,h as te}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{a as ee}from"./chunk-NB2H6KA7.js";import{a as _,c as J}from"./chunk-UPRDDI4K.js";import{A as ge,c as ie,h as oe,i as re,k as ae,m as se,n as de,t as le,u as ce,v as me,w as pe}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as X}from"./chunk-D6JH2KV4.js";import{d as Z}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as Y,w as $}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Ab as x,Cc as U,Dc as F,Ec as R,Hb as E,Ic as S,Mc as j,Nc as l,Oc as N,Pc as B,Qc as z,Rc as M,Sc as O,Tc as P,Z as A,ac as u,bd as q,cc as f,ec as L,fc as k,gc as T,hc as w,ic as o,id as G,jc as r,jd as H,kc as m,lc as v,ma as D,mb as h,mc as y,nc as W,ob as d,rc as I,sc as V,ud as Q,wc as b,ya as p,yc as c,za as g}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function xe(n,a){if(n&1&&(v(0,"swiper-slide")(1,"div")(2,"a",1),W(3,"img",2),y()(),v(4,"a",3),l(5),y(),v(6,"p",4),l(7),y()()),n&2){let i=a.$implicit;d(2),V("href",i.href,h),d(),V("src",i.imgSrc,h),d(),V("href",i.href,h),d(),N(i.title),d(2),N(i.description)}}var fe=(()=>{let a=class a{constructor(){this.newsList=Q([])}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=E({type:a,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["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(e,s){e&1&&(v(0,"swiper-container",0),k(1,xe,8,5,"swiper-slide",null,L),y()),e&2&&(d(),T(s.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let n=a;return n})();var _e=(()=>{let a=class a{constructor(){}getBrowserName(){let t=window.navigator.userAgent.toLowerCase();switch(!0){case(t.indexOf("edge")>-1||t.indexOf("edg")>-1):return"edge";case t.indexOf("opr")>-1:return"opera";case t.indexOf("chrome")>-1:return"chrome";case t.indexOf("trident")>-1:return"ie";case t.indexOf("firefox")>-1:return"firefox";case t.indexOf("safari")>-1:return"safari";default:return"other"}}};a.\u0275fac=function(e){return new(e||a)},a.\u0275prov=D({token:a,factory:a.\u0275fac,providedIn:"root"});let n=a;return n})();var Ce=["subdomainEl"],we=(n,a)=>({"rounded-end":n,"border-end-0":a});function ve(n,a){if(n&1&&(o(0,"div",33),m(1,"img",34),r()),n&2){let i=a.$implicit;d(),w("src",i.img,h)("title",i.title)("alt",i.title)}}function ye(n,a){if(n&1){let i=I();o(0,"div",15)(1,"h3",16),l(2,"DealPOS Omnichannel"),r(),o(3,"small",17),l(4," Multichannel Inventory Management Software "),r()(),o(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),m(10,"i",22),r()(),o(11,"input",23,0),P("ngModelChange",function(e){p(i);let s=c();return O(s.subdomain,e)||(s.subdomain=e),g(e)}),r(),o(13,"div")(14,"select",24),P("ngModelChange",function(e){p(i);let s=c();return O(s.domain,e)||(s.domain=e),g(e)}),o(15,"option",25),l(16," .dealpos.co.id "),r(),o(17,"option",26),l(18,".dealpos.net"),r(),o(19,"option",27),l(20,".dealpos.com"),r(),o(21,"option",28),l(22,".dealpos.app"),r()()()(),o(23,"div",29)(24,"button",30),b("click",function(){p(i);let e=c();return g(e.onNextState())}),l(25," Next "),r()(),o(26,"div",31)(27,"div",32),k(28,ve,2,3,"div",33,L),r()()()()}if(n&2){let i=c();d(11),M("ngModel",i.subdomain),d(3),M("ngModel",i.domain),d(14),T(i.channels)}}function Se(n,a){n&1&&(o(0,"p"),l(1,"Username is required"),r())}function Me(n,a){if(n&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),u(3,Se,2,0,"p"),r()()),n&2){c();let i=S(14);d(3),f(i.errors.required?3:-1)}}function Oe(n,a){if(n&1){let i=I();o(0,"i",57),b("click",function(){p(i);let e=c(3);return g(e.hideShowPassword())}),r()}if(n&2){let i=c(3);j("fa "+i.passwordIcon)}}function Pe(n,a){if(n&1&&(o(0,"span",47),u(1,Oe,1,2,"i",56),r()),n&2){let i=c(2);d(),f(i.password?1:-1)}}function Ee(n,a){n&1&&(o(0,"p"),l(1,"Password is required"),r())}function Le(n,a){if(n&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),u(3,Ee,2,0,"p"),r()()),n&2){c();let i=S(21);d(3),f(i.errors.required?3:-1)}}function ke(n,a){if(n&1){let i=I();o(0,"div",35)(1,"h3",36),l(2,"Sign in"),r(),o(3,"h3",37),l(4," to "),o(5,"h6",38),l(6),r(),o(7,"i",39),b("click",function(){p(i);let e=c();return g(e.onEditDomain())}),r()()(),o(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),m(12,"i",42),r()(),o(13,"input",43,1),P("ngModelChange",function(e){p(i);let s=c();return O(s.username,e)||(s.username=e),g(e)}),r()(),u(15,Me,4,1,"div",44),o(16,"div",20)(17,"div",21)(18,"span"),m(19,"i",45),r()(),o(20,"input",46,2),P("ngModelChange",function(e){p(i);let s=c();return O(s.password,e)||(s.password=e),g(e)}),r(),u(22,Pe,2,1,"span",47),r(),u(23,Le,4,1,"div",44),o(24,"div",48)(25,"button",49),b("click",function(){p(i);let e=c();return g(e.onLogin())}),l(26," Log in "),r()(),o(27,"div",50),m(28,"hr"),o(29,"span",51),l(30,"or"),r(),m(31,"hr"),r(),o(32,"div")(33,"button",52),b("click",function(e){p(i);let s=c();return g(s.onLoginByGoogle(e))}),m(34,"i",53),l(35," Sign In with Google "),r()()()}if(n&2){let i=S(14),t=S(21),e=c();d(6),z(" (",e.subdomain,"",e.domain,") "),d(7),M("ngModel",e.username),d(2),f(i.invalid&&(i.dirty||i.touched)?15:-1),d(5),w("type",e.passwordType)("ngClass",q(9,we,e.browser=="edge",e.browser!="edge")),M("ngModel",e.password),d(2),f(e.browser!="edge"?22:-1),d(),f(t.invalid&&(t.dirty||t.touched)?23:-1)}}var Ke=(()=>{let a=class a{constructor(t,e,s,C,he){this._router=t,this.toastr=e,this.checkBrowser=s,this.authService=C,this.ngxPermission=he,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:_.SHOOPE},{title:"Tokopedia",img:_.TOKOPEDIA},{title:"Tiktok",img:_.TIKTOK},{title:"Woocommerce",img:_.WOOCOMMERCE},{title:"Lazada",img:_.LAZADA},{title:"Shopify",img:_.SHOPIFY},{title:"Plugo",img:_.PLUGONEW}],this.version=K.version,this.news$=C.getNews().pipe(A(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let t=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=t}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let t=JSON.parse(localStorage.getItem("Authorization"));if(t){this.username=t?.username,this.subdomain=t?.Host?.split(".")[0];let e=t?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(J.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let t=this.subdomain.indexOf(".dealpos");t!=-1&&(this.subdomain=this.subdomain.substring(0,t))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let t={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(t).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(t){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(t,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(t){this.ngxPermission.hasPermission([ne.DashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):t?.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")}};a.\u0275fac=function(e){return new(e||a)(x(Z),x(X),x(_e),x(te),x(ee))},a.\u0275cmp=E({type:a,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&U(Ce,5),e&2){let C;F(C=R())&&(s.subdomainEl=C.first)}},decls:18,vars:6,consts:[["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"],[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"],[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"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[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"],[1,"input-group-text","border-start-0","rounded-end"],[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"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(e,s){e&1&&(o(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),l(4,"New Features"),r(),m(5,"POS-news-swiper",7),G(6,"async"),r(),o(7,"div",8),u(8,ye,30,2)(9,ke,36,12),r()(),o(10,"div",9)(11,"span",10),l(12,"powered by :"),r(),m(13,"a",11),r(),o(14,"div",12)(15,"a",13),l(16),m(17,"i",14),r()()()),e&2&&(d(5),w("newsList",H(6,4,s.news$)),d(3),f(s.loginState=="FORM_DOMAIN"?8:9),d(7),w("href",s.changelogUrl,h),d(),B("version ",s.version))},dependencies:[fe,ge,de,ce,me,ie,le,oe,re,pe,se,ae,Y,$],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}"]});let n=a;return n})();export{Ke as LoginComponent};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as o}from"./chunk-WH76SMZT.js";import"./chunk-IA7NJXJD.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as p}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,kc as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var d=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=i({type:n,selectors:[["app-products"]],decls:1,vars:0,template:function(r,l){r&1&&a(0,"router-outlet")},dependencies:[p],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let t=n;return t})();var f=[{path:"",component:d,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-BVW7WI5I.js").then(t=>t.routes),canActivate:[o,e]},{path:"download",loadChildren:()=>import("./chunk-3Q6QZGLZ.js").then(t=>t.routes),canActivate:[o,e]},{path:"upload",loadComponent:()=>import("./chunk-HT2MSA66.js").then(t=>t.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[o,e]}]}];export{f as routes};
1
+ import{a as e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as o}from"./chunk-WZQRKTBN.js";import"./chunk-IA7NJXJD.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as p}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,kc as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var d=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=i({type:n,selectors:[["app-products"]],decls:1,vars:0,template:function(r,l){r&1&&a(0,"router-outlet")},dependencies:[p],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let t=n;return t})();var f=[{path:"",component:d,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-YFR3EI3B.js").then(t=>t.routes),canActivate:[o,e]},{path:"download",loadChildren:()=>import("./chunk-MG7B4OWR.js").then(t=>t.routes),canActivate:[o,e]},{path:"upload",loadComponent:()=>import("./chunk-FQM4RKLX.js").then(t=>t.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[o,e]}]}];export{f as routes};
@@ -1 +1 @@
1
- import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-7RIUHK6K.js").then(t=>t.LoginComponent)},data:{title:"Dealpos x Marketplace"}},{path:"shopee",loadComponent(){return import("./chunk-ITY2KKS5.js").then(t=>t.ShopeeAuthorizedComponent)},data:{title:"Success"}},{path:"tiktok",loadComponent(){return import("./chunk-BTJN72MC.js").then(t=>t.TiktokComponent)},data:{title:"Success"}},{path:"lazada",loadComponent(){return import("./chunk-HBWX22FY.js").then(t=>t.LazadaComponent)},data:{title:"Success"}}];export{o as routes};
1
+ import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-NUF326RW.js").then(t=>t.LoginComponent)},data:{title:"Dealpos x Marketplace"}},{path:"shopee",loadComponent(){return import("./chunk-ITY2KKS5.js").then(t=>t.ShopeeAuthorizedComponent)},data:{title:"Success"}},{path:"tiktok",loadComponent(){return import("./chunk-BTJN72MC.js").then(t=>t.TiktokComponent)},data:{title:"Success"}},{path:"lazada",loadComponent(){return import("./chunk-HBWX22FY.js").then(t=>t.LazadaComponent)},data:{title:"Success"}}];export{o as routes};
@@ -1 +1 @@
1
- import{a}from"./chunk-WH76SMZT.js";import{a as d,b as u}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c,g as s}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as r,hc as p,ic as l,jc as m,kc as o,ob as i}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var h=(()=>{let t=class t{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"}]}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=r({type:t,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,f){n&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),m()()(),o(4,"router-outlet")),n&2&&(i(3),p("Tabs",f.priceTabs))},dependencies:[u,d,s,c],encapsulation:2});let e=t;return e})();var x=[{path:"",component:h,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-LOVYZLSU.js").then(e=>e.PricePosChannelComponent)},canActivate:[a],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-5YQUGH5Z.js").then(e=>e.PriceSingleChannelComponent)},canActivate:[a],data:{title:"Price Single Channel Comparison"}}]}];export{x as routes};
1
+ import{a}from"./chunk-WZQRKTBN.js";import{a as d,b as u}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c,g as s}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as r,hc as p,ic as l,jc as m,kc as o,ob as i}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var h=(()=>{let t=class t{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"}]}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=r({type:t,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,f){n&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),m()()(),o(4,"router-outlet")),n&2&&(i(3),p("Tabs",f.priceTabs))},dependencies:[u,d,s,c],encapsulation:2});let e=t;return e})();var x=[{path:"",component:h,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-QLFVXMNJ.js").then(e=>e.PricePosChannelComponent)},canActivate:[a],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-LB276KSA.js").then(e=>e.PriceSingleChannelComponent)},canActivate:[a],data:{title:"Price Single Channel Comparison"}}]}];export{x as routes};
@@ -1,4 +1,4 @@
1
- import{a as j,b as G,c as z,d as q,e as J,f as K}from"./chunk-3WGAMHZW.js";import{b as $}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JHSG3KRS.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as R}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as W,c as F,h as A,m as H}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as P}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{u as O}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as b,Ic as y,Nb as S,Nc as p,Oc as U,Rc as k,Sc as B,Tc as M,_c as L,ac as C,ad as V,cc as x,ec as w,fc as v,gc as E,hc as m,ic as i,jc as o,kc as d,lb as I,ma as T,ob as s,ra as g,rc as _,tb as N,ud as D,wc as h,ya as u,yc as c,za as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var X=(()=>{let t=class t{constructor(){this.httpService=g(P)}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var te=e=>({"background-color":e});function ne(e,t){if(e&1&&(i(0,"th"),p(1),o()),e&2){let a=t.$implicit;s(),U(a.column)}}function ie(e,t){if(e&1&&(i(0,"td"),d(1,"span",4),o()),e&2){let a=t.$implicit,n=c().$implicit;s(),m("innerHTML",n[a.prop],I)}}function oe(e,t){if(e&1&&(i(0,"tr",3),v(1,ie,2,1,"td",null,w),o()),e&2){let a=t.$implicit,n=c();m("ngStyle",V(1,te,a.Status>200?"#F4D6D5":"#DEE9C9")),s(),E(n.configs())}}var Y=(()=>{let t=class t{constructor(){this.configs=D([]),this.data=D([]),this.status=D(void 0),this.eventClose=new N}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=b({type:t,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"ngStyle"],[3,"innerHTML"]],template:function(r,l){r&1&&(i(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),v(4,ne,2,1,"th",null,w),o()(),i(6,"tbody"),v(7,oe,3,3,"tr",3,w),o()()()),r&2&&(s(4),E(l.configs()),s(3),E(l.data()))},dependencies:[O],encapsulation:2});let e=t;return e})();function re(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onNewStepperState(l))}),d(1,"i",18),p(2," New "),o()}}function ae(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a),c();let r=y(11);return f(r.previous())}),p(1," Back "),o()}}function le(e,t){if(e&1){let a=_();i(0,"button",19),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onStepperNext(l))}),p(1," Next "),o()}}function pe(e,t){if(e&1){let a=_();i(0,"button",20),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onSubmit(l))}),p(1,"Download"),o()}if(e&2){let a=c();m("disabled",!a.urls)}}function se(e,t){e&1&&(d(0,"i",21),i(1,"span"),p(2,"Instruction"),o())}function ce(e,t){e&1&&(i(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),p(4,"Note"),o()(),i(5,"div",26)(6,"ol",27)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),o(),i(9,"li"),p(10," Copy Product URL from "),i(11,"a",28),p(12,"https://seller.tokopedia.com/ "),o(),p(13," and paste in this form "),o(),i(14,"li"),p(15," Use New Line when you want to input several product URLs "),o()()()()())}function me(e,t){e&1&&(d(0,"i",29),i(1,"span"),p(2,"Download"),o())}function de(e,t){if(e&1){let a=_();i(0,"div",22)(1,"textarea",30),M("ngModelChange",function(r){u(a);let l=c();return B(l.urls,r)||(l.urls=r),f(r)}),o()()}if(e&2){let a=c();s(),m("placeholder",a.urlPlaceholder),k("ngModel",a.urls)}}function ue(e,t){e&1&&(d(0,"i",31),i(1,"span"),p(2,"Finish"),o())}function fe(e,t){if(e&1&&(i(0,"div",22),d(1,"app-response-api-list",32),o()),e&2){let a=c();s(),m("data",a.downloadResponses)("configs",a.configs)}}function _e(e,t){e&1&&(i(0,"h6"),p(1,"1"),o())}function he(e,t){e&1&&(i(0,"h6"),p(1,"2"),o())}function ge(e,t){e&1&&(i(0,"h6"),p(1,"3"),o())}var Ae=(()=>{let t=class t{constructor(){this.downloadService=g(X),this.authService=g(R),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
1
+ import{a as j,b as G,c as z,d as q,e as J,f as K}from"./chunk-3WGAMHZW.js";import{b as $}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JHSG3KRS.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as R}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as W,c as F,h as A,m as H}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as P}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{u as O}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as b,Ic as y,Nb as S,Nc as p,Oc as U,Rc as k,Sc as B,Tc as M,_c as L,ac as C,ad as V,cc as x,ec as w,fc as v,gc as E,hc as m,ic as i,jc as o,kc as d,lb as I,ma as T,ob as s,ra as g,rc as _,tb as N,ud as D,wc as h,ya as u,yc as c,za as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var X=(()=>{let t=class t{constructor(){this.httpService=g(P)}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var te=e=>({"background-color":e});function ne(e,t){if(e&1&&(i(0,"th"),p(1),o()),e&2){let a=t.$implicit;s(),U(a.column)}}function ie(e,t){if(e&1&&(i(0,"td"),d(1,"span",4),o()),e&2){let a=t.$implicit,n=c().$implicit;s(),m("innerHTML",n[a.prop],I)}}function oe(e,t){if(e&1&&(i(0,"tr",3),v(1,ie,2,1,"td",null,w),o()),e&2){let a=t.$implicit,n=c();m("ngStyle",V(1,te,a.Status>200?"#F4D6D5":"#DEE9C9")),s(),E(n.configs())}}var Y=(()=>{let t=class t{constructor(){this.configs=D([]),this.data=D([]),this.status=D(void 0),this.eventClose=new N}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=b({type:t,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"ngStyle"],[3,"innerHTML"]],template:function(r,l){r&1&&(i(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),v(4,ne,2,1,"th",null,w),o()(),i(6,"tbody"),v(7,oe,3,3,"tr",3,w),o()()()),r&2&&(s(4),E(l.configs()),s(3),E(l.data()))},dependencies:[O],encapsulation:2});let e=t;return e})();function re(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onNewStepperState(l))}),d(1,"i",18),p(2," New "),o()}}function ae(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a),c();let r=y(11);return f(r.previous())}),p(1," Back "),o()}}function le(e,t){if(e&1){let a=_();i(0,"button",19),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onStepperNext(l))}),p(1," Next "),o()}}function pe(e,t){if(e&1){let a=_();i(0,"button",20),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onSubmit(l))}),p(1,"Download"),o()}if(e&2){let a=c();m("disabled",!a.urls)}}function se(e,t){e&1&&(d(0,"i",21),i(1,"span"),p(2,"Instruction"),o())}function ce(e,t){e&1&&(i(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),p(4,"Note"),o()(),i(5,"div",26)(6,"ol",27)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),o(),i(9,"li"),p(10," Copy Product URL from "),i(11,"a",28),p(12,"https://seller.tokopedia.com/ "),o(),p(13," and paste in this form "),o(),i(14,"li"),p(15," Use New Line when you want to input several product URLs "),o()()()()())}function me(e,t){e&1&&(d(0,"i",29),i(1,"span"),p(2,"Download"),o())}function de(e,t){if(e&1){let a=_();i(0,"div",22)(1,"textarea",30),M("ngModelChange",function(r){u(a);let l=c();return B(l.urls,r)||(l.urls=r),f(r)}),o()()}if(e&2){let a=c();s(),m("placeholder",a.urlPlaceholder),k("ngModel",a.urls)}}function ue(e,t){e&1&&(d(0,"i",31),i(1,"span"),p(2,"Finish"),o())}function fe(e,t){if(e&1&&(i(0,"div",22),d(1,"app-response-api-list",32),o()),e&2){let a=c();s(),m("data",a.downloadResponses)("configs",a.configs)}}function _e(e,t){e&1&&(i(0,"h6"),p(1,"1"),o())}function he(e,t){e&1&&(i(0,"h6"),p(1,"2"),o())}function ge(e,t){e&1&&(i(0,"h6"),p(1,"3"),o())}var Ae=(()=>{let t=class t{constructor(){this.downloadService=g(X),this.authService=g(R),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
2
2
  https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(n){this.stepperState=n.selectedStep.state}onSubmit(n){let r=this.urls.split(/\r?\n/);this.downloadService.download(r).subscribe(l=>{this.downloadResponses=l,this.mappingLinkToProduct(),this.onStepperNext(n)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(n=>(n.Name=n?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${n.ID}" target="_blank">
3
3
  ${n?.Name}
4
4
  </a>`:"-",n))}onNewStepperState(n){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",n.reset(),this.onStepperNext(n)}onStepperNext(n){n.selected.completed=!0,n.next()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=b({type:t,selectors:[["app-by-url"]],features:[L([{provide:j,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(r,l){if(r&1){let Z=_();i(0,"mainpanel",1)(1,"actions"),C(2,re,3,0,"button",2),C(3,ae,2,0,"button",2),C(4,le,2,0,"button",3),C(5,pe,2,1,"button",4),o(),i(6,"content")(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,0),h("selectionChange",function(ee){return u(Z),f(l.onStepperChange(ee))}),i(12,"mat-step",9),S(13,se,3,0,"ng-template",10)(14,ce,16,0,"ng-template",11),o(),i(15,"mat-step",12),S(16,me,3,0,"ng-template",10)(17,de,2,2,"ng-template",11),o(),i(18,"mat-step",13),S(19,ue,3,0,"ng-template",10)(20,fe,2,2,"ng-template",11),o(),S(21,_e,2,0,"ng-template",14)(22,he,2,0,"ng-template",15)(23,ge,2,0,"ng-template",16),o()()()()()()}r&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),x(l.stepperState=="FINISH"?2:-1),s(),x(l.stepperState=="DOWNLOAD"?3:-1),s(),x(l.stepperState=="GUIDE"?4:-1),s(),x(l.stepperState=="DOWNLOAD"?5:-1),s(5),m("selectedIndex",1),s(2),m("editable",l.stepperState!="FINISH")("completed",!0),s(3),m("editable",l.stepperState!="FINISH")("completed",!1))},dependencies:[$,K,J,G,q,W,F,A,H,Y,z],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}