marketplacepos 5.50.3 → 5.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-FS3VTRY2.js → chunk-25Q56ATV.js} +1 -1
- package/Marketplace/{chunk-MZWP4SZF.js → chunk-2PMJPSC4.js} +2 -2
- package/Marketplace/{chunk-CGDIULPW.js → chunk-364CDNZV.js} +1 -1
- package/Marketplace/{chunk-7E4ZSLPD.js → chunk-36OIR6DM.js} +1 -1
- package/Marketplace/{chunk-JEJHGIUU.js → chunk-3Q6QZGLZ.js} +1 -1
- package/Marketplace/{chunk-HMDHDMIC.js → chunk-4ITXH35D.js} +1 -1
- package/Marketplace/{chunk-YDNXBOLU.js → chunk-4JCS7WPV.js} +1 -1
- package/Marketplace/{chunk-ZM7ND6FE.js → chunk-53B6D5OR.js} +1 -1
- package/Marketplace/{chunk-3YUIOGNI.js → chunk-5YQUGH5Z.js} +1 -1
- package/Marketplace/{chunk-2OKZEOBU.js → chunk-62YNPW6Q.js} +1 -1
- package/Marketplace/{chunk-QZMWXAUJ.js → chunk-6DGG765N.js} +1 -1
- package/Marketplace/{chunk-YCKLOFMA.js → chunk-6IZWIEUD.js} +1 -1
- package/Marketplace/{chunk-NGQFZI6A.js → chunk-7E6JD2PT.js} +1 -1
- package/Marketplace/{chunk-CQBHWYUO.js → chunk-7QDKBMEA.js} +1 -1
- package/Marketplace/{chunk-6MUVEZMQ.js → chunk-7RIUHK6K.js} +1 -1
- package/Marketplace/{chunk-XYRET5HT.js → chunk-A4X7F4MN.js} +1 -1
- package/Marketplace/{chunk-HAZ7U3MT.js → chunk-AF6XAQPY.js} +1 -1
- package/Marketplace/{chunk-DIDUSCV7.js → chunk-AZEH7PMO.js} +1 -1
- package/Marketplace/{chunk-JLDXWNDU.js → chunk-BKCKASH3.js} +1 -1
- package/Marketplace/{chunk-7VJ22OLT.js → chunk-BLOGT3TL.js} +1 -1
- package/Marketplace/{chunk-QJU2YGUH.js → chunk-BVW7WI5I.js} +1 -1
- package/Marketplace/{chunk-VA7NXG7X.js → chunk-C64L25TP.js} +1 -1
- package/Marketplace/{chunk-HHDJUCIT.js → chunk-E6W25RW5.js} +1 -1
- package/Marketplace/{chunk-53ZGHR7J.js → chunk-EGJMTFNO.js} +1 -1
- package/Marketplace/{chunk-N4MYHIMN.js → chunk-EX4C4ZW4.js} +1 -1
- package/Marketplace/{chunk-KKQ32Z72.js → chunk-EYYKWIXP.js} +1 -1
- package/Marketplace/{chunk-KDJVMFOK.js → chunk-GD5I7ADU.js} +1 -1
- package/Marketplace/{chunk-ZLJBRQ5V.js → chunk-HT2MSA66.js} +1 -1
- package/Marketplace/{chunk-KNE2UYQ2.js → chunk-HZTKN5RX.js} +1 -1
- package/Marketplace/{chunk-PHVEBMTE.js → chunk-ILFUI3MT.js} +1 -1
- package/Marketplace/{chunk-XYZI7ZXN.js → chunk-IXNEMOFX.js} +1 -1
- package/Marketplace/chunk-J4RDYEJC.js +1 -0
- package/Marketplace/{chunk-TOPYLZOF.js → chunk-K2CHDL7K.js} +1 -1
- package/Marketplace/{chunk-FPJTI4LM.js → chunk-LCN52IJT.js} +1 -1
- package/Marketplace/{chunk-JG7M73IA.js → chunk-LOVYZLSU.js} +1 -1
- package/Marketplace/{chunk-QJH7APJQ.js → chunk-LWUMLKSO.js} +1 -1
- package/Marketplace/{chunk-YEU5TPRD.js → chunk-M5JNIPMS.js} +1 -1
- package/Marketplace/{chunk-FDVRSAF3.js → chunk-OJI34QN5.js} +1 -1
- package/Marketplace/{chunk-UMJVPGHV.js → chunk-OMY5ASFA.js} +1 -1
- package/Marketplace/{chunk-QWEMPIP7.js → chunk-OPCGCQMZ.js} +1 -1
- package/Marketplace/{chunk-UWKDFRVX.js → chunk-Q5IVQP3E.js} +1 -1
- package/Marketplace/{chunk-CBULW22C.js → chunk-R3BRUX7Z.js} +1 -1
- package/Marketplace/{chunk-XCGXT3P7.js → chunk-SASGSPGQ.js} +1 -1
- package/Marketplace/{chunk-X2WAAZ7G.js → chunk-SLQ42VND.js} +1 -1
- package/Marketplace/chunk-T3CN3WQD.js +1 -0
- package/Marketplace/{chunk-PFP5WMC3.js → chunk-T62YFSKW.js} +1 -1
- package/Marketplace/{chunk-FO75JP2L.js → chunk-TLTFNFAB.js} +1 -1
- package/Marketplace/{chunk-FBXKHJ2G.js → chunk-VBVBTC2P.js} +1 -1
- package/Marketplace/chunk-WEJBY3OB.js +1 -0
- package/Marketplace/{chunk-MYJZFEAZ.js → chunk-WH76SMZT.js} +1 -1
- package/Marketplace/{chunk-2FB6QJKT.js → chunk-XAL6YLNQ.js} +1 -1
- package/Marketplace/{chunk-YQPAS2RI.js → chunk-XSOP2OTT.js} +1 -1
- package/Marketplace/{chunk-RRRPWDKB.js → chunk-YF7CCYHF.js} +1 -1
- package/Marketplace/{chunk-XMU7MXAM.js → chunk-ZMMMNVOU.js} +1 -1
- package/Marketplace/{chunk-EV6TBBSW.js → chunk-ZMSM2NR7.js} +1 -1
- package/Marketplace/{chunk-3PUUKJCQ.js → chunk-ZXFWQ6VJ.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-7TBLEURN.js → main-SOO5LINL.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-CFJAZJYY.js +0 -1
- package/Marketplace/chunk-KMNWLBEP.js +0 -1
- package/Marketplace/chunk-S2ZFBPPJ.js +0 -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-3PUUKJCQ.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-FPJTI4LM.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-JLDXWNDU.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-2OKZEOBU.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-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,4 +1,4 @@
|
|
|
1
|
-
import{a as nt}from"./chunk-X2CTSYKS.js";import{a as ee}from"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-NB2H6KA7.js";import{b as we,c as te}from"./chunk-UPRDDI4K.js";import{b as Qe}from"./chunk-RQUCYFCB.js";import{a as Ge,b as fe,c as Ze,d as Je,e as ge,f as Xe,g as me,h as Ye,i as J,j as ye,k as x}from"./chunk-RXLMJGUY.js";import{e as et}from"./chunk-D6JH2KV4.js";import{d as tt}from"./chunk-UB3ZV5NW.js";import{D as qe,E as Ve}from"./chunk-CGSMHTKB.js";import{Da as Ue,F as Ne,G as Fe,Ib as z,Ma as ze,O as le,S as Le,T as $e,Wa as K,Z as ue,aa as O,ba as de,c as m,ea as he,f as je,ga as We,ha as He,j as Oe,k as Be,ma as D,n as G,na as H,o as Q,p as B,pa as P,q as Z,qa as g,ra as M,ub as U,v as _,va as pe,w as Me,xa as Ke,zd as L}from"./chunk-OHGMB7HJ.js";import{b as w}from"./chunk-WFMAM73Y.js";import{a as ce,i as k}from"./chunk-66YHNWRR.js";var ot={production:!0,version:"5.50.3",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var it=(()=>{let o=class o{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let r=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return typeof r=="string"&&(r=[r]),r||[]}ParseToken(e){try{let n=e.split(".")[0].replace("-","+").replace("_","/"),i=JSON.parse(window.atob(n)),l=e.split(".")[1].replace("-","+").replace("_","/"),c=JSON.parse(window.atob(l));return c.header=i,c}catch{return!1}}};o.\u0275fac=function(r){return new(r||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();var Tt="firebase",Ct="11.10.0";J(Tt,Ct,"app");var q=new We("ANGULARFIRE2_VERSION");var st=(t,o)=>{let s=o?[o]:Ye(),e=[];return s.forEach(r=>{r.container.getProvider(t).instances.forEach(i=>{e.includes(i)||e.push(i)})}),e},Ae=(function(t){return t[t.SILENT=0]="SILENT",t[t.WARN=1]="WARN",t[t.VERBOSE=2]="VERBOSE",t})(Ae||{}),Mr=L()&&typeof Zone<"u"?Ae.WARN:Ae.SILENT;var re=class{zone;delegate;constructor(o,s=Be){this.zone=o,this.delegate=s}now(){return this.delegate.now()}schedule(o,s,e){let r=this.zone,n=function(i){r?r.runGuarded(()=>{o.apply(this,[i])}):o.apply(this,[i])};return this.delegate.schedule(n,s,e)}},ve=(()=>{class t{outsideAngular;insideAngular;constructor(){let s=M(U);this.outsideAngular=s.runOutsideAngular(()=>new re(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=s.run(()=>new re(typeof Zone>"u"?void 0:Zone.current,Oe))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Pt="firebase",xt="11.10.0";x.registerVersion(Pt,xt,"app-compat");var Rt=["ngOnDestroy"],ct=(t,o,s,e={})=>new Proxy(t,{get:(r,n)=>s.runOutsideAngular(()=>{if(t[n])return e?.spy?.get&&e.spy.get(n,t[n]),t[n];if(Rt.indexOf(n)>-1)return()=>{};let i=o.toPromise().then(a=>{let l=a?.[n];return typeof l=="function"?l.bind(a):l?.then?l.then(c=>s.run(()=>c)):s.run(()=>l)});return new Proxy(()=>{},{get:(a,l)=>i[l],apply:(a,l,c)=>i.then(u=>{let f=u?.(...c);return e?.spy?.apply&&e.spy.apply(n,c,f),f})})})});var ne=class{constructor(o){return o}},oe=new P("angularfire2.app.options"),ie=new P("angularfire2.app.name");function ke(t,o,s){let e=typeof s=="string"&&s||"[DEFAULT]",r=typeof s=="object"&&s||{};r.name=r.name||e;let i=x.apps.filter(a=>a&&a.name===r.name)[0]||o.runOutsideAngular(()=>x.initializeApp(t,r));try{if(JSON.stringify(t)!==JSON.stringify(i.options)){let a=!!module.hot;_t("error",`${i.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ne(i)}var _t=(t,...o)=>{L()&&typeof console<"u"&&console[t](...o)},jt={provide:ne,useFactory:ke,deps:[oe,U,[new ze,ie]]},zr=(()=>{class t{static initializeApp(s,e){return{ngModule:t,providers:[{provide:oe,useValue:s},{provide:ie,useValue:e}]}}constructor(s){x.registerVersion("angularfire",q.full,"core"),x.registerVersion("angularfire",q.full,"app-compat"),x.registerVersion("angular",He.full,s.toString())}static \u0275fac=function(e){return new(e||t)(g(K))};static \u0275mod=z({type:t});static \u0275inj=H({providers:[jt]})}return t})();function lt(t,o,s,e,r){let[,n,i]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===t)||[];if(n)return Ot(r,i)||(at("error",`${o} was already initialized on the ${s} Firebase App with different settings.${Bt?" You may need to reload as Firebase is not HMR aware.":""}`),at("warn",{is:r,was:i})),n;{let a=e();return globalThis.\u0275AngularfireInstanceCache.push([t,a,r]),a}}function Ot(t,o){try{return t.toString()===o.toString()}catch{return t===o}}var Bt=typeof module<"u"&&!!module.hot,at=(t,...o)=>{L()&&typeof console<"u"&&console[t](...o)};globalThis.\u0275AngularfireInstanceCache||=[];var Mt=new Map,Nt={activated:!1,tokenObservers:[]},Ft={initialized:!1,enabled:!1};function R(t){return Mt.get(t)||Object.assign({},Nt)}function pt(){return Ft}var Lt="https://content-firebaseappcheck.googleapis.com/v1";var $t="exchangeDebugToken",ut={OFFSET_DURATION:300*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:960*1e3},nn=1440*60*1e3;var Ee=class{constructor(o,s,e,r,n){if(this.operation=o,this.retryPolicy=s,this.getWaitDuration=e,this.lowerBound=r,this.upperBound=n,this.pending=null,this.nextErrorWaitInterval=r,r>n)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(o){return k(this,null,function*(){this.stop();try{this.pending=new fe,this.pending.promise.catch(s=>{}),yield Wt(this.getNextRun(o)),this.pending.resolve(),yield this.pending.promise,this.pending=new fe,this.pending.promise.catch(s=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(s){this.retryPolicy(s)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(o){if(o)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let s=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),s}}};function Wt(t){return new Promise(o=>{setTimeout(o,t)})}var Ht={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},N=new Je("appCheck","AppCheck",Ht);function ft(t){if(!R(t).activated)throw N.create("use-before-activation",{appName:t.name})}function gt(e,r){return k(this,arguments,function*({url:t,body:o},s){let n={"Content-Type":"application/json"},i=s.getImmediate({optional:!0});if(i){let h=yield i.getHeartbeatsHeader();h&&(n["X-Firebase-Client"]=h)}let a={method:"POST",body:JSON.stringify(o),headers:n},l;try{l=yield fetch(t,a)}catch(h){throw N.create("fetch-network-error",{originalErrorMessage:h?.message})}if(l.status!==200)throw N.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(h){throw N.create("fetch-parse-error",{originalErrorMessage:h?.message})}let u=c.ttl.match(/^([\d.]+)(s)$/);if(!u||!u[2]||isNaN(Number(u[1])))throw N.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let f=Number(u[1])*1e3,d=Date.now();return{token:c.token,expireTimeMillis:d+f,issuedAtTimeMillis:d}})}function mt(t,o){let{projectId:s,appId:e,apiKey:r}=t.options;return{url:`${Lt}/projects/${s}/apps/${e}:${$t}?key=${r}`,body:{debug_token:o}}}var Kt="firebase-app-check-database",Ut=1,Ie="firebase-app-check-store";var se=null;function zt(){return se||(se=new Promise((t,o)=>{try{let s=indexedDB.open(Kt,Ut);s.onsuccess=e=>{t(e.target.result)},s.onerror=e=>{var r;o(N.create("storage-open",{originalErrorMessage:(r=e.target.error)===null||r===void 0?void 0:r.message}))},s.onupgradeneeded=e=>{let r=e.target.result;switch(e.oldVersion){case 0:r.createObjectStore(Ie,{keyPath:"compositeKey"})}}}catch(s){o(N.create("storage-open",{originalErrorMessage:s?.message}))}}),se)}function qt(t,o){return Vt(Gt(t),o)}function Vt(t,o){return k(this,null,function*(){let e=(yield zt()).transaction(Ie,"readwrite"),n=e.objectStore(Ie).put({compositeKey:t,value:o});return new Promise((i,a)=>{n.onsuccess=l=>{i()},e.onerror=l=>{var c;a(N.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Gt(t){return`${t.options.appId}-${t.name}`}var X=new Xe("@firebase/app-check");function be(t,o){return Ze()?qt(t,o).catch(s=>{X.warn(`Failed to write token to IndexedDB. Error: ${s}`)}):Promise.resolve()}function yt(){return pt().enabled}function wt(){return k(this,null,function*(){let t=pt();if(t.enabled&&t.token)return t.token.promise;throw Error(`
|
|
1
|
+
import{a as nt}from"./chunk-X2CTSYKS.js";import{a as ee}from"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-NB2H6KA7.js";import{b as we,c as te}from"./chunk-UPRDDI4K.js";import{b as Qe}from"./chunk-RQUCYFCB.js";import{a as Ge,b as fe,c as Ze,d as Je,e as ge,f as Xe,g as me,h as Ye,i as J,j as ye,k as x}from"./chunk-RXLMJGUY.js";import{e as et}from"./chunk-D6JH2KV4.js";import{d as tt}from"./chunk-UB3ZV5NW.js";import{D as qe,E as Ve}from"./chunk-CGSMHTKB.js";import{Da as Ue,F as Ne,G as Fe,Ib as z,Ma as ze,O as le,S as Le,T as $e,Wa as K,Z as ue,aa as O,ba as de,c as m,ea as he,f as je,ga as We,ha as He,j as Oe,k as Be,ma as D,n as G,na as H,o as Q,p as B,pa as P,q as Z,qa as g,ra as M,ub as U,v as _,va as pe,w as Me,xa as Ke,zd as L}from"./chunk-OHGMB7HJ.js";import{b as w}from"./chunk-WFMAM73Y.js";import{a as ce,i as k}from"./chunk-66YHNWRR.js";var ot={production:!0,version:"5.51.0",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var it=(()=>{let o=class o{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let r=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return typeof r=="string"&&(r=[r]),r||[]}ParseToken(e){try{let n=e.split(".")[0].replace("-","+").replace("_","/"),i=JSON.parse(window.atob(n)),l=e.split(".")[1].replace("-","+").replace("_","/"),c=JSON.parse(window.atob(l));return c.header=i,c}catch{return!1}}};o.\u0275fac=function(r){return new(r||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();var Tt="firebase",Ct="11.10.0";J(Tt,Ct,"app");var q=new We("ANGULARFIRE2_VERSION");var st=(t,o)=>{let s=o?[o]:Ye(),e=[];return s.forEach(r=>{r.container.getProvider(t).instances.forEach(i=>{e.includes(i)||e.push(i)})}),e},Ae=(function(t){return t[t.SILENT=0]="SILENT",t[t.WARN=1]="WARN",t[t.VERBOSE=2]="VERBOSE",t})(Ae||{}),Mr=L()&&typeof Zone<"u"?Ae.WARN:Ae.SILENT;var re=class{zone;delegate;constructor(o,s=Be){this.zone=o,this.delegate=s}now(){return this.delegate.now()}schedule(o,s,e){let r=this.zone,n=function(i){r?r.runGuarded(()=>{o.apply(this,[i])}):o.apply(this,[i])};return this.delegate.schedule(n,s,e)}},ve=(()=>{class t{outsideAngular;insideAngular;constructor(){let s=M(U);this.outsideAngular=s.runOutsideAngular(()=>new re(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=s.run(()=>new re(typeof Zone>"u"?void 0:Zone.current,Oe))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Pt="firebase",xt="11.10.0";x.registerVersion(Pt,xt,"app-compat");var Rt=["ngOnDestroy"],ct=(t,o,s,e={})=>new Proxy(t,{get:(r,n)=>s.runOutsideAngular(()=>{if(t[n])return e?.spy?.get&&e.spy.get(n,t[n]),t[n];if(Rt.indexOf(n)>-1)return()=>{};let i=o.toPromise().then(a=>{let l=a?.[n];return typeof l=="function"?l.bind(a):l?.then?l.then(c=>s.run(()=>c)):s.run(()=>l)});return new Proxy(()=>{},{get:(a,l)=>i[l],apply:(a,l,c)=>i.then(u=>{let f=u?.(...c);return e?.spy?.apply&&e.spy.apply(n,c,f),f})})})});var ne=class{constructor(o){return o}},oe=new P("angularfire2.app.options"),ie=new P("angularfire2.app.name");function ke(t,o,s){let e=typeof s=="string"&&s||"[DEFAULT]",r=typeof s=="object"&&s||{};r.name=r.name||e;let i=x.apps.filter(a=>a&&a.name===r.name)[0]||o.runOutsideAngular(()=>x.initializeApp(t,r));try{if(JSON.stringify(t)!==JSON.stringify(i.options)){let a=!!module.hot;_t("error",`${i.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ne(i)}var _t=(t,...o)=>{L()&&typeof console<"u"&&console[t](...o)},jt={provide:ne,useFactory:ke,deps:[oe,U,[new ze,ie]]},zr=(()=>{class t{static initializeApp(s,e){return{ngModule:t,providers:[{provide:oe,useValue:s},{provide:ie,useValue:e}]}}constructor(s){x.registerVersion("angularfire",q.full,"core"),x.registerVersion("angularfire",q.full,"app-compat"),x.registerVersion("angular",He.full,s.toString())}static \u0275fac=function(e){return new(e||t)(g(K))};static \u0275mod=z({type:t});static \u0275inj=H({providers:[jt]})}return t})();function lt(t,o,s,e,r){let[,n,i]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===t)||[];if(n)return Ot(r,i)||(at("error",`${o} was already initialized on the ${s} Firebase App with different settings.${Bt?" You may need to reload as Firebase is not HMR aware.":""}`),at("warn",{is:r,was:i})),n;{let a=e();return globalThis.\u0275AngularfireInstanceCache.push([t,a,r]),a}}function Ot(t,o){try{return t.toString()===o.toString()}catch{return t===o}}var Bt=typeof module<"u"&&!!module.hot,at=(t,...o)=>{L()&&typeof console<"u"&&console[t](...o)};globalThis.\u0275AngularfireInstanceCache||=[];var Mt=new Map,Nt={activated:!1,tokenObservers:[]},Ft={initialized:!1,enabled:!1};function R(t){return Mt.get(t)||Object.assign({},Nt)}function pt(){return Ft}var Lt="https://content-firebaseappcheck.googleapis.com/v1";var $t="exchangeDebugToken",ut={OFFSET_DURATION:300*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:960*1e3},nn=1440*60*1e3;var Ee=class{constructor(o,s,e,r,n){if(this.operation=o,this.retryPolicy=s,this.getWaitDuration=e,this.lowerBound=r,this.upperBound=n,this.pending=null,this.nextErrorWaitInterval=r,r>n)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(o){return k(this,null,function*(){this.stop();try{this.pending=new fe,this.pending.promise.catch(s=>{}),yield Wt(this.getNextRun(o)),this.pending.resolve(),yield this.pending.promise,this.pending=new fe,this.pending.promise.catch(s=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(s){this.retryPolicy(s)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(o){if(o)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let s=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),s}}};function Wt(t){return new Promise(o=>{setTimeout(o,t)})}var Ht={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},N=new Je("appCheck","AppCheck",Ht);function ft(t){if(!R(t).activated)throw N.create("use-before-activation",{appName:t.name})}function gt(e,r){return k(this,arguments,function*({url:t,body:o},s){let n={"Content-Type":"application/json"},i=s.getImmediate({optional:!0});if(i){let h=yield i.getHeartbeatsHeader();h&&(n["X-Firebase-Client"]=h)}let a={method:"POST",body:JSON.stringify(o),headers:n},l;try{l=yield fetch(t,a)}catch(h){throw N.create("fetch-network-error",{originalErrorMessage:h?.message})}if(l.status!==200)throw N.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(h){throw N.create("fetch-parse-error",{originalErrorMessage:h?.message})}let u=c.ttl.match(/^([\d.]+)(s)$/);if(!u||!u[2]||isNaN(Number(u[1])))throw N.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let f=Number(u[1])*1e3,d=Date.now();return{token:c.token,expireTimeMillis:d+f,issuedAtTimeMillis:d}})}function mt(t,o){let{projectId:s,appId:e,apiKey:r}=t.options;return{url:`${Lt}/projects/${s}/apps/${e}:${$t}?key=${r}`,body:{debug_token:o}}}var Kt="firebase-app-check-database",Ut=1,Ie="firebase-app-check-store";var se=null;function zt(){return se||(se=new Promise((t,o)=>{try{let s=indexedDB.open(Kt,Ut);s.onsuccess=e=>{t(e.target.result)},s.onerror=e=>{var r;o(N.create("storage-open",{originalErrorMessage:(r=e.target.error)===null||r===void 0?void 0:r.message}))},s.onupgradeneeded=e=>{let r=e.target.result;switch(e.oldVersion){case 0:r.createObjectStore(Ie,{keyPath:"compositeKey"})}}}catch(s){o(N.create("storage-open",{originalErrorMessage:s?.message}))}}),se)}function qt(t,o){return Vt(Gt(t),o)}function Vt(t,o){return k(this,null,function*(){let e=(yield zt()).transaction(Ie,"readwrite"),n=e.objectStore(Ie).put({compositeKey:t,value:o});return new Promise((i,a)=>{n.onsuccess=l=>{i()},e.onerror=l=>{var c;a(N.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Gt(t){return`${t.options.appId}-${t.name}`}var X=new Xe("@firebase/app-check");function be(t,o){return Ze()?qt(t,o).catch(s=>{X.warn(`Failed to write token to IndexedDB. Error: ${s}`)}):Promise.resolve()}function yt(){return pt().enabled}function wt(){return k(this,null,function*(){let t=pt();if(t.enabled&&t.token)return t.token.promise;throw Error(`
|
|
2
2
|
Can't get debug token in production mode.
|
|
3
3
|
`)})}var Zt={error:"UNKNOWN_ERROR"};function Jt(t){return Ge.encodeString(JSON.stringify(t),!1)}function Te(t,o=!1,s=!1){return k(this,null,function*(){let e=t.app;ft(e);let r=R(e),n=r.token,i;if(n&&!Y(n)&&(r.token=void 0,n=void 0),!n){let c=yield r.cachedTokenPromise;c&&(Y(c)?n=c:yield be(e,void 0))}if(!o&&n&&Y(n))return{token:n.token};let a=!1;if(yt())try{r.exchangeTokenPromise||(r.exchangeTokenPromise=gt(mt(e,yield wt()),t.heartbeatServiceProvider).finally(()=>{r.exchangeTokenPromise=void 0}),a=!0);let c=yield r.exchangeTokenPromise;return yield be(e,c),r.token=c,{token:c.token}}catch(c){return c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?X.warn(c.message):s&&X.error(c),Se(c)}try{r.exchangeTokenPromise||(r.exchangeTokenPromise=r.provider.getToken().finally(()=>{r.exchangeTokenPromise=void 0}),a=!0),n=yield R(e).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?X.warn(c.message):s&&X.error(c),i=c}let l;return n?i?Y(n)?l={token:n.token,internalError:i}:l=Se(i):(l={token:n.token},r.token=n,yield be(e,n)):l=Se(i),a&&er(e,l),l})}function Xt(t){return k(this,null,function*(){let o=t.app;ft(o);let{provider:s}=R(o);if(yt()){let e=yield wt(),{token:r}=yield gt(mt(o,e),t.heartbeatServiceProvider);return{token:r}}else{let{token:e}=yield s.getToken();return{token:e}}})}function Yt(t,o,s,e){let{app:r}=t,n=R(r),i={next:s,error:e,type:o};if(n.tokenObservers=[...n.tokenObservers,i],n.token&&Y(n.token)){let a=n.token;Promise.resolve().then(()=>{s({token:a.token}),dt(t)}).catch(()=>{})}n.cachedTokenPromise.then(()=>dt(t))}function At(t,o){let s=R(t),e=s.tokenObservers.filter(r=>r.next!==o);e.length===0&&s.tokenRefresher&&s.tokenRefresher.isRunning()&&s.tokenRefresher.stop(),s.tokenObservers=e}function dt(t){let{app:o}=t,s=R(o),e=s.tokenRefresher;e||(e=Qt(t),s.tokenRefresher=e),!e.isRunning()&&s.isTokenAutoRefreshEnabled&&e.start()}function Qt(t){let{app:o}=t;return new Ee(()=>k(null,null,function*(){let s=R(o),e;if(s.token?e=yield Te(t,!0):e=yield Te(t),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let s=R(o);if(s.token){let e=s.token.issuedAtTimeMillis+(s.token.expireTimeMillis-s.token.issuedAtTimeMillis)*.5+3e5,r=s.token.expireTimeMillis-300*1e3;return e=Math.min(e,r),Math.max(0,e-Date.now())}else return 0},ut.RETRIAL_MIN_WAIT,ut.RETRIAL_MAX_WAIT)}function er(t,o){let s=R(t).tokenObservers;for(let e of s)try{e.type==="EXTERNAL"&&o.error!=null?e.error(o.error):e.next(o)}catch{}}function Y(t){return t.expireTimeMillis-Date.now()>0}function Se(t){return{token:Jt(Zt),error:t}}var Ce=class{constructor(o,s){this.app=o,this.heartbeatServiceProvider=s}_delete(){let{tokenObservers:o}=R(this.app);for(let s of o)At(this.app,s.next);return Promise.resolve()}};function tr(t,o){return new Ce(t,o)}function rr(t){return{getToken:o=>Te(t,o),getLimitedUseToken:()=>Xt(t),addTokenListener:o=>Yt(t,"INTERNAL",o),removeTokenListener:o=>At(t.app,o)}}var nr="@firebase/app-check",or="0.10.1";var ir="app-check",ht="app-check-internal";function sr(){me(new ge(ir,t=>{let o=t.getProvider("app").getImmediate(),s=t.getProvider("heartbeat");return tr(o,s)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,o,s)=>{t.getProvider(ht).initialize()})),me(new ge(ht,t=>{let o=t.getProvider("app-check").getImmediate();return rr(o)},"PUBLIC").setInstantiationMode("EXPLICIT")),J(nr,or)}sr();var ar="app-check";var ae=class{constructor(){return st(ar)}};var cr=["localhost","0.0.0.0","127.0.0.1"],An=typeof window<"u"&&cr.includes(window.location.hostname);var ur=new P("angularfire2.auth.use-emulator"),dr=new P("angularfire2.auth.settings"),hr=new P("angularfire2.auth.tenant-id"),pr=new P("angularfire2.auth.langugage-code"),fr=new P("angularfire2.auth.use-device-language"),gr=new P("angularfire.auth.persistence"),mr=(t,o,s,e,r,n,i,a)=>lt(`${t.name}.auth`,"AngularFireAuth",t.name,()=>{let l=o.runOutsideAngular(()=>t.auth());if(s&&l.useEmulator(...s),e&&(l.tenantId=e),l.languageCode=r,n&&l.useDeviceLanguage(),i)for(let[c,u]of Object.entries(i))l.settings[c]=u;return a&&l.setPersistence(a),l},[s,e,r,n,i,a]),De=(()=>{class t{injector=M(pe);authState;idToken;user;idTokenResult;credential;constructor(s,e,r,n,i,a,l,c,u,f,d,h){let p=new je,y=Z(void 0).pipe(G(i.outsideAngular),O(()=>n.runOutsideAngular(()=>import("./chunk-XRLXIT7I.js"))),_(()=>ke(s,n,e)),_(T=>mr(T,n,a,c,u,f,l,d)),ue({bufferSize:1,refCount:!1}));if(Ve(r))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=Z(null);else{y.pipe($e()).subscribe();let T=y.pipe(O(I=>I.getRedirectResult().then(j=>j,()=>null)),Qe(this.injector),ue({bufferSize:1,refCount:!1})),W=y.pipe(O(I=>new m(j=>({unsubscribe:n.runOutsideAngular(()=>I.onAuthStateChanged(F=>j.next(F),F=>j.error(F),()=>j.complete()))})))),V=y.pipe(O(I=>new m(j=>({unsubscribe:n.runOutsideAngular(()=>I.onIdTokenChanged(F=>j.next(F),F=>j.error(F),()=>j.complete()))}))));this.authState=T.pipe(de(W),Q(i.outsideAngular),G(i.insideAngular)),this.user=T.pipe(de(V),Q(i.outsideAngular),G(i.insideAngular)),this.idToken=this.user.pipe(O(I=>I?B(I.getIdToken()):Z(null))),this.idTokenResult=this.user.pipe(O(I=>I?B(I.getIdTokenResult()):Z(null))),this.credential=Ne(T,p,this.authState.pipe(Fe(I=>!I))).pipe(_(I=>I?.user?I:null),Q(i.outsideAngular),G(i.insideAngular))}return ct(this,y,n,{spy:{apply:(T,W,V)=>{(T.startsWith("signIn")||T.startsWith("createUser"))&&V.then(I=>p.next(I))}}})}static \u0275fac=function(e){return new(e||t)(g(oe),g(ie,8),g(K),g(U),g(ve),g(ur,8),g(dr,8),g(hr,8),g(pr,8),g(fr,8),g(gr,8),g(ae,8))};static \u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"any"})}return t})(),Bn=(()=>{class t{constructor(){x.registerVersion("angularfire",q.full,"auth-compat")}static \u0275fac=function(e){return new(e||t)};static \u0275mod=z({type:t});static \u0275inj=H({providers:[De]})}return t})();var b=(function(t){return t.readonly="readonly",t.readwrite="readwrite",t})(b||{}),vt=new P(null),kt=new P("Indexed DB"),wr=new P("Server Indexed DB");function Ar(t,o){return t.objectStoreNames.contains(o)}function C(t,o,s){if(!t){s("You need to use the openDatabase function to create a database before you query it!");return}Ar(t,o)||s(`objectStore does not exists: ${o}`)}function S(t,o){let s=t.transaction(o.storeName,o.dbMode);return s.onerror=o.error,s.onabort=o.abort,s}function E(t,o,s,e){return{storeName:o,dbMode:t,error:r=>{s(r)},abort:r=>{s(r)}}}var xe=[];function A(t,o,s,e){return new Promise((r,n)=>{t||n("IndexedDB not available");let i=t.open(o,s),a;i.onsuccess=()=>{a=i.result,xe.push(a),r(a)},i.onerror=()=>{n(`IndexedDB error: ${i.error}`)},typeof e=="function"&&(i.onupgradeneeded=l=>{e(l,a)})})}function Pe(t,o,s,e,r){return k(this,null,function*(){return new Promise((n,i)=>{if(!t)return;let a=t.open(o,s);a.onupgradeneeded=l=>k(null,null,function*(){let c=l.target.result,u=e.map(d=>k(null,null,function*(){if(!c.objectStoreNames.contains(d.store)){let h=c.createObjectStore(d.store,d.storeConfig);for(let p of d.storeSchema)h.createIndex(p.name,p.keypath,p.options)}}));yield Promise.all(u);let f=r&&r();if(f){let d=Object.keys(f).map(h=>parseInt(h,10)).filter(h=>h>l.oldVersion).sort((h,p)=>h-p);for(let h of d)f[h](c,a.transaction)}c.close(),n()}),a.onsuccess=l=>{l.target.result.close(),n()},a.onerror=l=>{i(l)}})})}function vr(t,o,s){if(!t||!o||!s)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new m(e=>{try{let r=o+1,n=indexedDB.open(t,r);n.onupgradeneeded=i=>{let a=i.target.result;a.deleteObjectStore(s),a.close(),console.log("onupgradeneeded"),e.next(),e.complete()},n.onerror=i=>e.error(i)}catch(r){e.error(r)}})}function kr(t){return new Promise((o,s)=>{if(!t){s(new Error("No database to close"));return}try{t.close(),o()}catch(e){s(`Error closing database: ${e}`)}})}function v(){return function(t,o,s){let e=s.value;return s.value=function(...r){let n=e.apply(this,r);return n instanceof m?n.pipe(Le(()=>k(this,null,function*(){let i=xe.map(a=>k(this,null,function*(){yield kr(a)}));yield Promise.all(i),xe.length=0}))):n},s}}var _e=(()=>{let o=class o{constructor(e,r){this.dbConfigs=e,this.indexedDB=r,this.defaultDatabaseName=null,Object.values(this.dbConfigs).forEach((n,i,a)=>this.instanciateConfig(n,a.length===1))}instanciateConfig(e,r){return k(this,null,function*(){if(!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if((e.isDefault??!1)&&this.defaultDatabaseName)throw new Error("NgxIndexedDB: Only one database can be set as default");((e.isDefault??!1)&&!this.defaultDatabaseName||r)&&(this.defaultDatabaseName=e.name,this.selectedDb=e.name),yield Pe(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),A(this.indexedDB,e.name).then(n=>{n.version!==e.version&&(L()&&(console.warn(`
|
|
4
4
|
Your DB Config doesn't match the most recent version of the DB with name ${e.name}, please update it
|
|
@@ -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-
|
|
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
|
|
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%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ae,b as ce,d as pe}from"./chunk-BZWZ64N5.js";import{b as se}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{c as le}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ie}from"./chunk-ZSUWHVKX.js";import{h as te}from"./chunk-
|
|
1
|
+
import{a as ae,b as ce,d as pe}from"./chunk-BZWZ64N5.js";import{b as se}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{c as le}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ie}from"./chunk-ZSUWHVKX.js";import{h as te}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Z,c as ee}from"./chunk-NB2H6KA7.js";import{b as g,c as Q}from"./chunk-UPRDDI4K.js";import{A as re,h as ne,m as oe}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as X,e as Y}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{w as q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as B,Ic as E,Nb as u,Nc as c,Oc as h,Pc as H,Rc as T,Sc as O,Tc as P,Uc as z,Vc as J,Wc as j,Z as x,aa as I,ac as k,ad as G,cc as F,ea as D,ec as R,fc as K,gc as V,hc as m,ic as o,id as S,jc as l,jd as f,kc as W,ld as N,mb as U,ob as a,oc as $,pc as A,q as M,ra as _,rc as v,v as C,wc as b,ya as L,yc as p,za as y}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var me=t=>[t];function de(t,s){if(t&1&&(o(0,"span",14),W(1,"img",15),l(),o(2,"span"),c(3),l()),t&2){let r=s.item;a(),m("src",r.Img,U)("alt",r.Name),a(2),H(" ",r.Name," ")}}function ge(t,s){if(t&1){let r=v();$(0),z(1),S(2,"async"),o(3,"a",16),b("click",function(){L(r);let e=j(1),n=p();return y(n.submitLogistics(e))}),c(4,"Submit"),l(),A()}if(t&2){let r=p();a(),J(f(2,0,r.logisticServices$))}}function he(t,s){}function _e(t,s){if(t&1){let r=v();o(0,"ng-select",18),P("ngModelChange",function(e){L(r);let n=p(2).$implicit;return O(n.ProductSKU,e)||(n.ProductSKU=e),y(e)}),l()}if(t&2){let r=p(),i=p().$implicit;T("ngModel",i.ProductSKU),m("items",r)}}function ue(t,s){if(t&1&&(o(0,"span"),c(1),l()),t&2){let r=p(2).$implicit;a(),h(r.ProductSKU||"-")}}function Se(t,s){if(t&1&&u(0,he,0,0,"ng-template",17)(1,_e,1,2,"ng-template",null,0,N)(3,ue,2,1,"ng-template",null,1,N),t&2){let r=E(2),i=E(4),e=p(2);m("ngxPermissionsOnly",G(3,me,e.logisticEditRole))("ngxPermissionsOnlyThen",r)("ngxPermissionsOnlyElse",i)}}function fe(t,s){if(t&1&&(o(0,"tr")(1,"td"),c(2),l(),o(3,"td"),c(4),l(),o(5,"td"),c(6),l(),o(7,"td"),k(8,Se,5,5),S(9,"async"),l()()),t&2){let r,i=s.$implicit,e=p();a(2),h(i.Name),a(2),h(i.Service),a(2),h(i.TypeString),a(2),F((r=f(9,4,e.logisticOptions$))?8:-1,r)}}var Re=(()=>{let s=class s{constructor(){this.http=_(Y),this.toastr=_(X),this.authService=_(te),this.filter={ChannelID:""},this.logisticEditRole=ie.LogisticUpdate,this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let i=[g.WooCommerce,g.Lazada,g.Shopify,g.Plugo,g.Tokopedia];this.channelOptions=this.channelOptions.map(e=>(i.forEach(n=>{e.TypeID===n&&(e.disabled=!0)}),e))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(i=>{this.filter=i.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(x(1))}submitLogistics(i){this.clonedLogisticServices$.pipe(C(e=>i.map(n=>(e.findIndex(d=>d.Name===n.Name&&d.ProductSKU==n.ProductSKU)==-1&&(n.IsChange=!0),n))),I(e=>this.http.post("/api/Logistic/Submit",e))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(C(i=>i.map(e=>(e.ProductSKU=Q.IsEmpty(e.ProductSKU)?null:e.ProductSKU,e))),D(i=>{let e=JSON.parse(JSON.stringify(i));this.clonedLogisticServices$=M(e)}),x(1))}iniTitle(){let i=this.channelOptions.find(e=>e.ID==this.filter.ChannelID);this.channelName=i?i.Name:null}};s.\u0275fac=function(e){return new(e||s)},s.\u0275cmp=B({type:s,selectors:[["app-logistic"]],decls:29,vars:8,consts:[["thenBlock",""],["elseBlock",""],["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngxPermissionsOnly"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(e,n){e&1&&(o(0,"mainpanel",2),b("onSubmit",function(){return n.getLogisticService()}),o(1,"filters")(2,"div")(3,"label",3),c(4,"Select a Channel"),l(),o(5,"ng-select",4),P("ngModelChange",function(d){return O(n.filter.ChannelID,d)||(n.filter.ChannelID=d),d}),u(6,de,4,3,"ng-template",5),l()()(),o(7,"actions"),u(8,ge,5,3,"ng-container",6),l(),o(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"table",11)(15,"thead",12)(16,"tr",13)(17,"th"),c(18,"Logistic"),l(),o(19,"th"),c(20,"Service"),l(),o(21,"th"),c(22,"Type"),l(),o(23,"th"),c(24,"Logistic Service"),l()()(),o(25,"tbody"),K(26,fe,10,6,"tr",null,R),S(28,"async"),l()()()()()()()()),e&2&&(m("headerTitle","Logistic Courier - "+n.channelName)("hideSearchDropdown",!1),a(5),m("clearable",!1)("items",n.channelOptions),T("ngModel",n.filter.ChannelID),a(3),m("ngxPermissionsOnly",n.logisticEditRole),a(18),V(f(28,6,n.logisticServices$)))},dependencies:[se,pe,re,ne,oe,ae,ce,ee,Z,le,q],encapsulation:2});let t=s;return t})();export{Re as LogisticComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-YKKHSYDW.js";import{a as J}from"./chunk-
|
|
1
|
+
import{a as Q}from"./chunk-YKKHSYDW.js";import{a as J}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as q}from"./chunk-ZZYFVEJO.js";import{a as z}from"./chunk-DLHIDOS3.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 j}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{a as b}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as Z,h as G,m as H}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as O}from"./chunk-D6JH2KV4.js";import{e as W,g as $}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as R,B as F,w as N}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as U,Ia as D,Nc as a,Oc as g,Rc as T,Sc as P,Tc as B,Uc as A,Z as V,ac as I,cc as k,dc as E,fc as L,gc as K,hc as s,ic as e,id as v,jc as t,jd as y,kc as c,mb as M,ob as l,ra as x,rc as w,wc as h,ya as u,yc as S,za as d}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function X(r,p){if(r&1){let o=w();e(0,"img",21),h("click",function(m){u(o);let i=S().$implicit,n=S();return d(n.onZoomImage(m,i==null?null:i.ImageUrl))}),t()}if(r&2){let o=S().$implicit;s("src",o==null?null:o.ThumbnailUrl,M)}}function Y(r,p){r&1&&c(0,"img",17)}function ee(r,p){if(r&1&&(e(0,"tr")(1,"td")(2,"div",15),I(3,X,1,1,"img",16)(4,Y,1,0,"img",17),t()(),e(5,"td"),a(6),t(),e(7,"td"),a(8),t(),e(9,"td")(10,"div",18),c(11,"app-channel-logo",19),e(12,"span"),a(13),t()()(),e(14,"td",20),a(15),v(16,"number"),t()()),r&2){let o=p.$implicit;l(3),k(o.ImageUrl?3:4),l(3),g(o.Name),l(2),g(o.SKU),l(3),s("typeId",o.TypeID),l(2),g(o.ChannelName),l(2),g(y(16,6,o.Count))}}var Ce=(()=>{let p=class p{constructor(){this.httpService=x(O),this.biggerPictureService=x(z),this.filter=D({PageNumber:1,RowCount:20,ListChannelID:[]}),this.rowCountApi=b.GetMultilistingSKUCount,this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(b.GetMultiListingSKU,this.filter()).pipe(V(1))}onZoomImage(_,m){this.biggerPictureService.openBiggerPicture(_,m)}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=U({type:p,selectors:[["app-duplicate-sku-v2"]],decls:33,vars:8,consts:[["headerTitle","Duplicate SKU","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/duplicate-sku",1,"d-flex","align-items-center","gap-2","btn","btn-outline-secondary","btn-lg"],[1,"fa-solid","fa-credit-card"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[2,"width","200px"],[2,"width","250px"],[1,"text-end",2,"width","50px"],[3,"next","previous","filter","totaldata","rowCountApi"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"d-flex","align-items-center"],[3,"typeId"],[1,"text-end"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"]],template:function(m,i){if(m&1){let n=w();A(0),v(1,"async"),e(2,"mainpanel",0),h("onSubmit",function(){return u(n),d(i.initMultipleListingSKU())}),e(3,"actions")(4,"a",1),c(5,"i",2),e(6,"span"),a(7,"Card View"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),B("ngModelChange",function(C){return u(n),P(i.filter().ListChannelID,C)||(i.filter().ListChannelID=C),d(C)}),t()()(),e(13,"content")(14,"div",5)(15,"div",6)(16,"div",7)(17,"table",8)(18,"thead",9)(19,"tr"),c(20,"th",10),e(21,"th"),a(22,"Product"),t(),e(23,"th",11),a(24,"SKU"),t(),e(25,"th",12),a(26,"Channel"),t(),e(27,"th",13),a(28,"Count"),t()()(),e(29,"tbody"),L(30,ee,17,8,"tr",null,E),t()(),e(32,"app-custom-paginator",14),h("next",function(){return u(n),d(i.initMultipleListingSKU())})("previous",function(){return u(n),d(i.initMultipleListingSKU())}),t()()()()()()}if(m&2){let n=y(1,6,i.multipleListingSKU$);l(2),s("hideSearchBox",!0),l(10),s("multiple",!0),T("ngModel",i.filter().ListChannelID),l(18),K(n==null?null:n.Data),l(2),s("filter",i.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("rowCountApi",i.rowCountApi)}},dependencies:[F,j,q,$,W,Q,J,Z,G,H,N,R],encapsulation:2});let r=p;return r})();export{Ce as DuplicateSkuV2Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as U}from"./chunk-BZWZ64N5.js";import{a as Y}from"./chunk-
|
|
1
|
+
import{e as U}from"./chunk-BZWZ64N5.js";import{a as Y}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.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 G}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{a as R}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as J,c as j,h as F,m as H}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as B,e as I}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as k,w as P,z as W}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as M,Ia as g,Nc as i,Oc as T,Rc as b,Sc as v,Tc as _,Uc as V,Vc as D,Wc as S,Z as x,ac as N,cc as O,hc as f,ic as e,id as w,jc as t,jd as y,kc as L,ob as a,ra as h,rc as E,wc as C,ya as m,yc as A,za as c}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function z(o,l){if(o&1&&(e(0,"pre",21),i(1),w(2,"json"),t()),o&2){A();let q=S(25);a(),T(y(2,1,q))}}function K(o,l){o&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var me=(()=>{let l=class l{constructor(){this.httpService=h(I),this.toastr=h(B),this.selectedChannel=g(null),this.orderNumber=g(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(R.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(x(1))}copyToClipboard(p){if(!p)return;let s=typeof p=="string"?p:JSON.stringify(p,null,2);navigator.clipboard.writeText(s),this.toastr.success("Copied to clipboard!","Success")}};l.\u0275fac=function(s){return new(s||l)},l.\u0275cmp=M({type:l,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(s,n){if(s&1){let d=E();e(0,"mainpanel",0)(1,"actions")(2,"button",1),C("click",function(){return m(d),c(n.fetchLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),_("ngModelChange",function(r){return m(d),v(n.selectedChannel,r)||(n.selectedChannel=r),c(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(r){return m(d),v(n.orderNumber,r)||(n.orderNumber=r),c(r)}),t()()()()(),V(25),w(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),C("click",function(){m(d);let r=S(25);return c(n.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),N(38,z,3,3,"pre",21)(39,K,2,0,"p",22),t()()()()()()()()()}if(s&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),a(16),b("ngModel",n.selectedChannel),a(8),b("ngModel",n.orderNumber),a();let d=D(y(26,6,n.orderLog$));a(8),f("disabled",!d),a(5),O(d?38:39)}},dependencies:[k,G,U,J,j,F,H,Y,P,W],encapsulation:2});let o=l;return o})();export{me as OrderApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ne}from"./chunk-ZSUWHVKX.js";import{a as K,h as te}from"./chunk-2OKZEOBU.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-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,4 +1,4 @@
|
|
|
1
|
-
import{a as de}from"./chunk-L6CRWJ2O.js";import{a as Xe,b as et,c as tt}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import"./chunk-VYI7JYH5.js";import"./chunk-OH5T7D7O.js";import{a as He,b as Ke,c as Qe,e as Ze,f as qe,g as Je}from"./chunk-3WGAMHZW.js";import{a as We,b as Be,c as Le}from"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{c as Fe,d as Oe,e as Re}from"./chunk-BZWZ64N5.js";import{a as $e}from"./chunk-FPJTI4LM.js";import"./chunk-3T5VLB63.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-JLDXWNDU.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Ne}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as re}from"./chunk-UEXWQT5J.js";import"./chunk-JHSG3KRS.js";import{f as ze,g as Ue,h as Ge,i as je,j as Ye}from"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-TBVMCNS2.js";import{e as Ae}from"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.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{ka as Pe}from"./chunk-JTKEMQZT.js";import{c as Ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as ie}from"./chunk-2OKZEOBU.js";import{a as Me}from"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as te}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as ee,c as x}from"./chunk-UPRDDI4K.js";import{A as ae,b as Ee,c as ke,h as ne,m as oe,x as Ve}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as xe,e as Te}from"./chunk-D6JH2KV4.js";import{g as be}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as V,q as O,w as X,y as $}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as ve,Cc as fe,Dc as ge,Ec as _e,Hb as k,Ia as g,Ic as N,Nb as Y,Nc as s,Oc as F,Pc as D,Rc as b,Sc as M,Tc as P,Xc as Ce,Z as G,Zc as we,_c as Z,aa as ce,ac as w,ad as q,bd as Se,cc as v,ea as j,ec as R,fc as W,gc as B,hc as h,ic as o,id as L,jc as a,jd as H,kc as S,kd as ye,m as me,ma as ue,mb as he,ob as l,qd as J,ra as y,rc as T,tb as A,td as De,ud as I,v as Q,wc as C,ya as c,yc as _,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as se,b as pe}from"./chunk-66YHNWRR.js";var rt=e=>({"over-due":e});function lt(e,r){if(e&1&&(o(0,"tr",6)(1,"td"),s(2),a(),o(3,"td"),s(4),a(),o(5,"td"),s(6),a(),o(7,"td"),s(8),a()()),e&2){let d=r.$implicit,t=r.$index;h("ngClass",q(5,rt,d.Exception)),l(2),F(t+1),l(2),F(d.Number),l(2),F(d.Status),l(2),F(d.Exception)}}function dt(e,r){if(e&1&&W(0,lt,9,7,"tr",6,R),e&2){let d,t=_();B((d=t.downloadResult())==null?null:d.Body)}}function st(e,r){e&1&&(o(0,"tr",5)(1,"td",7)(2,"div",8),S(3,"i",9),a(),o(4,"h4",10),s(5," There is no order to processed "),a()()())}var it=(()=>{let r=class r{constructor(){this.downloadResult=I()}ngOnInit(){}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:15,vars:1,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[1,"text-center"],[3,"ngClass"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(o(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),S(5,"th",4),o(6,"th"),s(7,"Order Number"),a(),o(8,"th"),s(9,"Status"),a(),o(10,"th"),s(11,"Exception"),a()()(),o(12,"tbody"),w(13,dt,2,0)(14,st,6,0,"tr",5),a()()()()),n&2){let p;l(13),v(((p=i.downloadResult())==null||p.Body==null?null:p.Body.length)>0?13:14)}},dependencies:[V,O],encapsulation:2});let e=r;return e})();var mt=e=>({"full-width":e}),ct=()=>({standalone:!0}),nt=(()=>{let r=class r{constructor(){this.datePipe=y($),this.fullWidth=I(!1),this.timeChange=new A}ngOnInit(){}onTimeChange(t){let n=null;t&&(n=this.datePipe.transform(t,"HH:mm")),this.timeChange.emit(n),this.onTimePickerChange()}onShowCalendar(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="inside")}}onTimePickerChange(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="outside")}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["size","small","label","Close",3,"click"]],template:function(n,i){if(n&1){let p=T();o(0,"p-datepicker",1,0),P("ngModelChange",function(m){return c(p),M(i.time,m)||(i.time=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onTimeChange(m))})("onSelect",function(){return c(p),u(i.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),C("click",function(){return c(p),N(1).hideOverlay(),u(i.onShowCalendar())}),a()()()}n&2&&(h("ngClass",q(5,mt,i.fullWidth()))("baseZIndex",1100),b("ngModel",i.time),h("timeOnly",!0)("ngModelOptions",ve(7,ct)))},dependencies:[V,O,ae,ne,oe,tt,et,Xe,Pe],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"]});let e=r;return e})();var z=(()=>{let r=class r{constructor(){this.httpService=y(Te),this.toastr=y(xe),this.datePipe=y($)}gerChannelDetailById(t){return this.httpService.post(te.GetChannelDetail,{ID:t})}getOrderPreview(t){return this.httpService.post(te.GetOrderPreviewV2,t)}getDownloadOrder(t){return this.httpService.post(te.GetDownloadOrderV2,t)}onPreviewOrder(t){return this.validateDatePreview(t)?this.getOrderPreview(t).pipe(j(n=>{n.Data?.length===0&&this.toastrEmptyPreview(t)})):me}toastrEmptyPreview(t){let n=this.datePipe.transform(t.From,"dd MMM yyyy"),i=this.datePipe.transform(t.To,"dd MMM yyyy"),p=t.TimeFrom?t.TimeFrom:"",f=t.TimeTo?t.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${p} to ${i} ${f}!`,"No Orders!")}validateDatePreview(t){let n=!0;return t.downloadType==!0?x.getDaysDiff(t?.From,t?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):x.getDaysDiff(t?.From,t?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(t,n){let i=x.formatTitleFromDate(new Date(t),new Date(n)),p=this.datePipe.transform(t,i),f=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":p+"-"} ${f}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=ue({token:r,factory:r.\u0275fac});let e=r;return e})();function ut(e,r){if(e&1&&(o(0,"ng-option",7),S(1,"img",17),s(2),a()),e&2){let d=r.$implicit;h("value",d.ID),l(),h("src",d==null?null:d.Img,he),l(),D("",d.Name," ")}}function ht(e,r){if(e&1){let d=T();o(0,"div",8)(1,"div",4)(2,"h5"),s(3,"Type"),a(),o(4,"p",5),s(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),P("ngModelChange",function(n){c(d);let i=_();return M(i.downloadType,n)||(i.downloadType=n),u(n)}),C("ngModelChange",function(){c(d);let n=_();return u(n.onDownloadTypeChange())}),o(10,"mat-radio-button",20),s(11," Orders "),a(),o(12,"mat-radio-button",21),s(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),S(16,"i",24),a(),o(17,"p",25),s(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(e&2){let d=_();l(9),b("ngModel",d.downloadType),l(),h("value",!1),l(2),h("value",!0)}}function ft(e,r){e&1&&(o(0,"p",5),s(1," Select Disbursement date "),o(2,"span",26),s(3,"(payment date / order complete date)"),a(),s(4," of the channel you want to download (Max 1 Week). "),a())}function gt(e,r){e&1&&(o(0,"p",5),s(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function _t(e,r){if(e&1){let d=T();o(0,"div",16)(1,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.startTime,n)||(i.startTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onStartTimeChange())}),a(),o(2,"span",28),s(3,"-"),a(),o(4,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.endTime,n)||(i.endTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onEndTimeChange())}),a()()}if(e&2){let d=_();l(),b("time",d.startTime),l(3),b("time",d.endTime)}}var ot=(()=>{let r=class r{constructor(){this.reset=I(!1),this.authService=y(ie),this.tokenService=y(Me),this.downloadService=y(z),this.downloadType=g(!1),this.selectedChannelId=g(null),this.channelOptions=g(this.authService.getChannels()),this.channelType=ee,this.selectedChannel=g(null),this.showTimePicker=g(!1),this.startDate=g(null),this.endDate=g(null),this.startTime=g("00:00"),this.endTime=g("23:59"),this.minDate=g(new Date),this.maxDate=g(new Date),this.filterData=new A,this._onRememberMeChange=De({alias:"onRememberMeChange"}),this.rememberMe=g(!1),J(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let t=this.tokenService?.getTokenValue(),n=t?.DownloadRange?JSON.parse(t?.DownloadRange):0;if(n<=0)this.minDate.set(null),this.maxDate.set(null);else{let i=new Date,p=x.addDays(i,n-1);this.minDate.set(p)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(t=>t.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(Q(t=>t?.Model),G(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let t=1;this.startDate()&&this.endDate()&&(t=x.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>t==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(t){this._onRememberMeChange.emit(t)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[Z([z,Ae()])],decls:32,vars:13,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"row","mt-6"],[1,"col-12","d-flex","align-items-center"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker","min","max"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel","maxlength"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"col-6","d-flex","align-items-center","gap-2","mt-10"],["type","checkbox",2,"width","16px","height","16px",3,"ngModelChange","ngModel"],[1,"ms-2"],[1,"mt-8","d-flex","align-items-center"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let p=T();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),s(5,"Select a Channel"),a(),o(6,"p",5),s(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),P("ngModelChange",function(m){return c(p),M(i.selectedChannelId,m)||(i.selectedChannelId=m),u(m)}),C("ngModelChange",function(){return c(p),u(i.onSelectChannel())}),W(10,ut,3,3,"ng-option",7,R),a()()(),w(12,ht,19,3,"div",8),L(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),s(17,"Date Range"),a(),w(18,ft,5,0,"p",5)(19,gt,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),P("ngModelChange",function(m){return c(p),M(i.startDate,m)||(i.startDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())}),a(),o(24,"input",12),P("ngModelChange",function(m){return c(p),M(i.endDate,m)||(i.endDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())})("ngModelChange",function(){return c(p),u(i.onFilterDateChange())}),a()(),S(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),P("ngModelChange",function(m){return c(p),M(i.rememberMe,m)||(i.rememberMe=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onChangeRememberMe(m))}),a(),o(29,"h5",15),s(30,"Save Date"),a()(),w(31,_t,5,2,"div",16),a()()()()}if(n&2){let p,f,m=N(26);l(9),h("clearable",!1),b("ngModel",i.selectedChannelId),l(),B(i.channelOptions()),l(2),v((p=H(13,11,i.channelDetail$))!=null&&p.ServiceFeeWriteOff&&((p=i.selectedChannel())==null?null:p.TypeID)==i.channelType.Tokopedia?12:-1),l(6),v(i.downloadType()&&((f=i.selectedChannel())==null?null:f.TypeID)==i.channelType.Tokopedia?18:19),l(4),h("rangePicker",m)("min",i.minDate())("max",i.maxDate()),l(),b("ngModel",i.startDate),l(),b("ngModel",i.endDate),l(4),b("ngModel",i.rememberMe),l(3),v(i.showTimePicker()?31:-1)}},dependencies:[V,Re,Oe,Fe,Le,We,Be,ae,ke,Ee,ne,Ve,oe,nt,je,ze,Ye,Ue,Ge,X],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]});let e=r;return e})();var E=(function(e){return e.ALL="all",e.SYNC="sync",e.WRONG="wrong",e.UNSYNC="unsync",e})(E||{});var U=(function(e){return e[e.DoNothing=0]="DoNothing",e[e.New=1]="New",e[e.Update=2]="Update",e})(U||{});var Ct=(e,r)=>({"over-due-today":e,"over-due":r});function wt(e,r){if(e&1&&(o(0,"th",17),s(1),a()),e&2){let d=_();l(),D(" ",d.selectedChannel()?"Created Date":"Last Status Update"," ")}}function vt(e,r){if(e&1&&(o(0,"td"),s(1),L(2,"date"),a()),e&2){let d=_().$implicit;l(),D(" ",ye(2,1,d.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function St(e,r){if(e&1&&(o(0,"span"),s(1),a()),e&2){let d=_().$implicit;l(),D(" ",d.ActionString," ")}}function yt(e,r){if(e&1&&(o(0,"li"),s(1),a()),e&2){let d=r.$implicit;l(),D(" ",d," ")}}function Dt(e,r){if(e&1&&(o(0,"ul",21),W(1,yt,2,1,"li",null,R),a()),e&2){let d=_().$implicit;l(),B(d.ActionString)}}function xt(e,r){if(e&1&&(o(0,"span",22),S(1,"i",23),a()),e&2){let d=_().$implicit;h("title",we("Delivery : ",d.DeliveryState,`
|
|
1
|
+
import{a as de}from"./chunk-L6CRWJ2O.js";import{a as Xe,b as et,c as tt}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import"./chunk-VYI7JYH5.js";import"./chunk-OH5T7D7O.js";import{a as He,b as Ke,c as Qe,e as Ze,f as qe,g as Je}from"./chunk-3WGAMHZW.js";import{a as We,b as Be,c as Le}from"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{c as Fe,d as Oe,e as Re}from"./chunk-BZWZ64N5.js";import{a as $e}from"./chunk-LCN52IJT.js";import"./chunk-3T5VLB63.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-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Ne}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as re}from"./chunk-UEXWQT5J.js";import"./chunk-JHSG3KRS.js";import{f as ze,g as Ue,h as Ge,i as je,j as Ye}from"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-TBVMCNS2.js";import{e as Ae}from"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.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{ka as Pe}from"./chunk-JTKEMQZT.js";import{c as Ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as ie}from"./chunk-62YNPW6Q.js";import{a as Me}from"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as te}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as ee,c as x}from"./chunk-UPRDDI4K.js";import{A as ae,b as Ee,c as ke,h as ne,m as oe,x as Ve}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as xe,e as Te}from"./chunk-D6JH2KV4.js";import{g as be}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as V,q as O,w as X,y as $}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as ve,Cc as fe,Dc as ge,Ec as _e,Hb as k,Ia as g,Ic as N,Nb as Y,Nc as s,Oc as F,Pc as D,Rc as b,Sc as M,Tc as P,Xc as Ce,Z as G,Zc as we,_c as Z,aa as ce,ac as w,ad as q,bd as Se,cc as v,ea as j,ec as R,fc as W,gc as B,hc as h,ic as o,id as L,jc as a,jd as H,kc as S,kd as ye,m as me,ma as ue,mb as he,ob as l,qd as J,ra as y,rc as T,tb as A,td as De,ud as I,v as Q,wc as C,ya as c,yc as _,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as se,b as pe}from"./chunk-66YHNWRR.js";var rt=e=>({"over-due":e});function lt(e,r){if(e&1&&(o(0,"tr",6)(1,"td"),s(2),a(),o(3,"td"),s(4),a(),o(5,"td"),s(6),a(),o(7,"td"),s(8),a()()),e&2){let d=r.$implicit,t=r.$index;h("ngClass",q(5,rt,d.Exception)),l(2),F(t+1),l(2),F(d.Number),l(2),F(d.Status),l(2),F(d.Exception)}}function dt(e,r){if(e&1&&W(0,lt,9,7,"tr",6,R),e&2){let d,t=_();B((d=t.downloadResult())==null?null:d.Body)}}function st(e,r){e&1&&(o(0,"tr",5)(1,"td",7)(2,"div",8),S(3,"i",9),a(),o(4,"h4",10),s(5," There is no order to processed "),a()()())}var it=(()=>{let r=class r{constructor(){this.downloadResult=I()}ngOnInit(){}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:15,vars:1,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[1,"text-center"],[3,"ngClass"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(o(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),S(5,"th",4),o(6,"th"),s(7,"Order Number"),a(),o(8,"th"),s(9,"Status"),a(),o(10,"th"),s(11,"Exception"),a()()(),o(12,"tbody"),w(13,dt,2,0)(14,st,6,0,"tr",5),a()()()()),n&2){let p;l(13),v(((p=i.downloadResult())==null||p.Body==null?null:p.Body.length)>0?13:14)}},dependencies:[V,O],encapsulation:2});let e=r;return e})();var mt=e=>({"full-width":e}),ct=()=>({standalone:!0}),nt=(()=>{let r=class r{constructor(){this.datePipe=y($),this.fullWidth=I(!1),this.timeChange=new A}ngOnInit(){}onTimeChange(t){let n=null;t&&(n=this.datePipe.transform(t,"HH:mm")),this.timeChange.emit(n),this.onTimePickerChange()}onShowCalendar(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="inside")}}onTimePickerChange(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="outside")}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["size","small","label","Close",3,"click"]],template:function(n,i){if(n&1){let p=T();o(0,"p-datepicker",1,0),P("ngModelChange",function(m){return c(p),M(i.time,m)||(i.time=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onTimeChange(m))})("onSelect",function(){return c(p),u(i.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),C("click",function(){return c(p),N(1).hideOverlay(),u(i.onShowCalendar())}),a()()()}n&2&&(h("ngClass",q(5,mt,i.fullWidth()))("baseZIndex",1100),b("ngModel",i.time),h("timeOnly",!0)("ngModelOptions",ve(7,ct)))},dependencies:[V,O,ae,ne,oe,tt,et,Xe,Pe],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"]});let e=r;return e})();var z=(()=>{let r=class r{constructor(){this.httpService=y(Te),this.toastr=y(xe),this.datePipe=y($)}gerChannelDetailById(t){return this.httpService.post(te.GetChannelDetail,{ID:t})}getOrderPreview(t){return this.httpService.post(te.GetOrderPreviewV2,t)}getDownloadOrder(t){return this.httpService.post(te.GetDownloadOrderV2,t)}onPreviewOrder(t){return this.validateDatePreview(t)?this.getOrderPreview(t).pipe(j(n=>{n.Data?.length===0&&this.toastrEmptyPreview(t)})):me}toastrEmptyPreview(t){let n=this.datePipe.transform(t.From,"dd MMM yyyy"),i=this.datePipe.transform(t.To,"dd MMM yyyy"),p=t.TimeFrom?t.TimeFrom:"",f=t.TimeTo?t.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${p} to ${i} ${f}!`,"No Orders!")}validateDatePreview(t){let n=!0;return t.downloadType==!0?x.getDaysDiff(t?.From,t?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):x.getDaysDiff(t?.From,t?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(t,n){let i=x.formatTitleFromDate(new Date(t),new Date(n)),p=this.datePipe.transform(t,i),f=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":p+"-"} ${f}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=ue({token:r,factory:r.\u0275fac});let e=r;return e})();function ut(e,r){if(e&1&&(o(0,"ng-option",7),S(1,"img",17),s(2),a()),e&2){let d=r.$implicit;h("value",d.ID),l(),h("src",d==null?null:d.Img,he),l(),D("",d.Name," ")}}function ht(e,r){if(e&1){let d=T();o(0,"div",8)(1,"div",4)(2,"h5"),s(3,"Type"),a(),o(4,"p",5),s(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),P("ngModelChange",function(n){c(d);let i=_();return M(i.downloadType,n)||(i.downloadType=n),u(n)}),C("ngModelChange",function(){c(d);let n=_();return u(n.onDownloadTypeChange())}),o(10,"mat-radio-button",20),s(11," Orders "),a(),o(12,"mat-radio-button",21),s(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),S(16,"i",24),a(),o(17,"p",25),s(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(e&2){let d=_();l(9),b("ngModel",d.downloadType),l(),h("value",!1),l(2),h("value",!0)}}function ft(e,r){e&1&&(o(0,"p",5),s(1," Select Disbursement date "),o(2,"span",26),s(3,"(payment date / order complete date)"),a(),s(4," of the channel you want to download (Max 1 Week). "),a())}function gt(e,r){e&1&&(o(0,"p",5),s(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function _t(e,r){if(e&1){let d=T();o(0,"div",16)(1,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.startTime,n)||(i.startTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onStartTimeChange())}),a(),o(2,"span",28),s(3,"-"),a(),o(4,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.endTime,n)||(i.endTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onEndTimeChange())}),a()()}if(e&2){let d=_();l(),b("time",d.startTime),l(3),b("time",d.endTime)}}var ot=(()=>{let r=class r{constructor(){this.reset=I(!1),this.authService=y(ie),this.tokenService=y(Me),this.downloadService=y(z),this.downloadType=g(!1),this.selectedChannelId=g(null),this.channelOptions=g(this.authService.getChannels()),this.channelType=ee,this.selectedChannel=g(null),this.showTimePicker=g(!1),this.startDate=g(null),this.endDate=g(null),this.startTime=g("00:00"),this.endTime=g("23:59"),this.minDate=g(new Date),this.maxDate=g(new Date),this.filterData=new A,this._onRememberMeChange=De({alias:"onRememberMeChange"}),this.rememberMe=g(!1),J(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let t=this.tokenService?.getTokenValue(),n=t?.DownloadRange?JSON.parse(t?.DownloadRange):0;if(n<=0)this.minDate.set(null),this.maxDate.set(null);else{let i=new Date,p=x.addDays(i,n-1);this.minDate.set(p)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(t=>t.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(Q(t=>t?.Model),G(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let t=1;this.startDate()&&this.endDate()&&(t=x.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>t==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(t){this._onRememberMeChange.emit(t)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[Z([z,Ae()])],decls:32,vars:13,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"row","mt-6"],[1,"col-12","d-flex","align-items-center"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker","min","max"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel","maxlength"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"col-6","d-flex","align-items-center","gap-2","mt-10"],["type","checkbox",2,"width","16px","height","16px",3,"ngModelChange","ngModel"],[1,"ms-2"],[1,"mt-8","d-flex","align-items-center"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let p=T();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),s(5,"Select a Channel"),a(),o(6,"p",5),s(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),P("ngModelChange",function(m){return c(p),M(i.selectedChannelId,m)||(i.selectedChannelId=m),u(m)}),C("ngModelChange",function(){return c(p),u(i.onSelectChannel())}),W(10,ut,3,3,"ng-option",7,R),a()()(),w(12,ht,19,3,"div",8),L(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),s(17,"Date Range"),a(),w(18,ft,5,0,"p",5)(19,gt,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),P("ngModelChange",function(m){return c(p),M(i.startDate,m)||(i.startDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())}),a(),o(24,"input",12),P("ngModelChange",function(m){return c(p),M(i.endDate,m)||(i.endDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())})("ngModelChange",function(){return c(p),u(i.onFilterDateChange())}),a()(),S(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),P("ngModelChange",function(m){return c(p),M(i.rememberMe,m)||(i.rememberMe=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onChangeRememberMe(m))}),a(),o(29,"h5",15),s(30,"Save Date"),a()(),w(31,_t,5,2,"div",16),a()()()()}if(n&2){let p,f,m=N(26);l(9),h("clearable",!1),b("ngModel",i.selectedChannelId),l(),B(i.channelOptions()),l(2),v((p=H(13,11,i.channelDetail$))!=null&&p.ServiceFeeWriteOff&&((p=i.selectedChannel())==null?null:p.TypeID)==i.channelType.Tokopedia?12:-1),l(6),v(i.downloadType()&&((f=i.selectedChannel())==null?null:f.TypeID)==i.channelType.Tokopedia?18:19),l(4),h("rangePicker",m)("min",i.minDate())("max",i.maxDate()),l(),b("ngModel",i.startDate),l(),b("ngModel",i.endDate),l(4),b("ngModel",i.rememberMe),l(3),v(i.showTimePicker()?31:-1)}},dependencies:[V,Re,Oe,Fe,Le,We,Be,ae,ke,Ee,ne,Ve,oe,nt,je,ze,Ye,Ue,Ge,X],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]});let e=r;return e})();var E=(function(e){return e.ALL="all",e.SYNC="sync",e.WRONG="wrong",e.UNSYNC="unsync",e})(E||{});var U=(function(e){return e[e.DoNothing=0]="DoNothing",e[e.New=1]="New",e[e.Update=2]="Update",e})(U||{});var Ct=(e,r)=>({"over-due-today":e,"over-due":r});function wt(e,r){if(e&1&&(o(0,"th",17),s(1),a()),e&2){let d=_();l(),D(" ",d.selectedChannel()?"Created Date":"Last Status Update"," ")}}function vt(e,r){if(e&1&&(o(0,"td"),s(1),L(2,"date"),a()),e&2){let d=_().$implicit;l(),D(" ",ye(2,1,d.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function St(e,r){if(e&1&&(o(0,"span"),s(1),a()),e&2){let d=_().$implicit;l(),D(" ",d.ActionString," ")}}function yt(e,r){if(e&1&&(o(0,"li"),s(1),a()),e&2){let d=r.$implicit;l(),D(" ",d," ")}}function Dt(e,r){if(e&1&&(o(0,"ul",21),W(1,yt,2,1,"li",null,R),a()),e&2){let d=_().$implicit;l(),B(d.ActionString)}}function xt(e,r){if(e&1&&(o(0,"span",22),S(1,"i",23),a()),e&2){let d=_().$implicit;h("title",we("Delivery : ",d.DeliveryState,`
|
|
2
2
|
Payment : `,d.PaymentState))}}function Tt(e,r){if(e&1&&(o(0,"tr")(1,"td"),s(2),a(),o(3,"td"),s(4),a(),w(5,vt,3,4,"td"),o(6,"td")(7,"span"),s(8),a(),s(9),a(),o(10,"td",20)(11,"span"),s(12),a(),s(13),a(),o(14,"td"),w(15,St,2,1,"span"),w(16,Dt,3,0,"ul",21),a(),o(17,"td"),w(18,xt,2,3,"span",22),a()()),e&2){let d,t=r.$implicit,n=r.$index,i=_(2);l(2),F(n+1),l(2),F(t.Number),l(),v(((d=i.selectedChannel())==null?null:d.TypeID)!=i.channelType.Shopee&&((d=i.selectedChannel())==null?null:d.TypeID)!==i.channelType.Tiktok?5:-1),l(3),D("",t.ChannelStatus," - "),l(),D("",t.ChannelStatusDescription," "),l(),h("ngClass",Se(12,Ct,(t==null?null:t.Action)==i.actionPreviewOrder.Update,(t==null?null:t.Action)==i.actionPreviewOrder.New))("matTooltip",t.POSStatus==91||t.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),l(2),D("",t.POSStatus," - "),l(),D("",t.POSStatusDescription," "),l(2),v(t.ActionString.length==1?15:-1),l(),v(t.ActionString.length>1?16:-1),l(2),v(t.ChannelStatus!=99&&t.POSStatus!=99?18:-1)}}function bt(e,r){if(e&1&&W(0,Tt,19,15,"tr",null,R),e&2){let d=_();B(d.displayPreviewData())}}function Mt(e,r){e&1&&(o(0,"tr",19)(1,"td",24)(2,"div",25),S(3,"i",26),a(),o(4,"h4",27),s(5," There is no order to processed "),a()()())}var at=(()=>{let r=class r{constructor(){this.orderPreview=I(),this.selectedChannel=I(),this.channelType=ee,this.allData=g(0),this.syncData=g(0),this.wrongData=g(0),this.unsyncData=g(0),this.pillStatus=g(E.ALL),this.actionPreviewOrder=U,this.previewStatus=E,this.displayPreviewData=g([]),this.exportOrders=new A,J(()=>{this.orderPreview()&&(this.filterPreviewData(E.ALL),this.initLengthStatusData())},{allowSignalWrites:!0})}filterPreviewData(t){this.pillStatus.update(()=>t),this.displayPreviewData.update(()=>this.filterDataByStatus(t))}initLengthStatusData(){this.wrongData.update(()=>this.filterDataByStatus(E.WRONG).length),this.syncData.update(()=>this.filterDataByStatus(E.SYNC).length),this.allData.update(()=>this.orderPreview().length),this.unsyncData.update(()=>this.filterDataByStatus(E.UNSYNC).length)}filterDataByStatus(t){let n=[];switch(t){case E.ALL:n=this.orderPreview();break;case E.SYNC:n=this.orderPreview().filter(i=>i.Action==U.DoNothing);break;case E.WRONG:n=this.orderPreview().filter(i=>i.Action==U.Update);break;case E.UNSYNC:n=this.orderPreview().filter(i=>i.Action==U.New);break}return n}onExportOrders(){this.exportOrders.emit()}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["preview-step"]],inputs:{orderPreview:[1,"orderPreview"],selectedChannel:[1,"selectedChannel"]},outputs:{exportOrders:"onExportOrders"},decls:40,vars:10,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%"],["width","10%"],[1,"text-center"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div")(5,"ul",4)(6,"li",5)(7,"button",6),C("click",function(){return i.filterPreviewData(i.previewStatus.ALL)}),s(8),a()(),o(9,"li",7)(10,"button",8),C("click",function(){return i.filterPreviewData(i.previewStatus.SYNC)}),s(11),a()(),o(12,"li",7)(13,"button",9),C("click",function(){return i.filterPreviewData(i.previewStatus.WRONG)}),s(14),a()(),o(15,"li",7)(16,"button",10),C("click",function(){return i.filterPreviewData(i.previewStatus.UNSYNC)}),s(17),a()()()(),o(18,"div")(19,"button",11),C("click",function(){return i.onExportOrders()}),S(20,"i",12),o(21,"span"),s(22,"Export"),a()()()()(),o(23,"table",13)(24,"thead",14)(25,"tr"),S(26,"th",15),o(27,"th",16),s(28,"Number"),a(),w(29,wt,2,1,"th",17),o(30,"th",18),s(31,"Channel Status"),a(),o(32,"th",18),s(33,"POS Status"),a(),o(34,"th"),s(35,"Action"),a(),S(36,"th",15),a()(),o(37,"tbody"),w(38,bt,2,0)(39,Mt,6,0,"tr",19),a()()()()),n&2){let p,f;l(7),h("ngClass",i.pillStatus()=="all"?"btn-secondary text-white":"btn-outline-dark"),l(),D(" All (",i.allData(),") "),l(2),h("ngClass",i.pillStatus()=="sync"?"btn-success":"btn-outline-success"),l(),D(" Existing (",i.syncData(),") "),l(2),h("ngClass",i.pillStatus()=="wrong"?"btn-warning text-white":"btn-outline-warning"),l(),D(" Wrong Status (",i.wrongData(),") "),l(2),h("ngClass",i.pillStatus()=="unsync"?"btn-danger":"btn-outline-danger"),l(),D(" Missing (",i.unsyncData(),") "),l(12),v(((p=i.selectedChannel())==null?null:p.TypeID)!=i.channelType.Shopee&&((p=i.selectedChannel())==null?null:p.TypeID)!==i.channelType.Tiktok?29:-1),l(9),v(((f=i.displayPreviewData())==null?null:f.length)>0?38:39)}},dependencies:[V,O,re,Ie,$],encapsulation:2});let e=r;return e})();var Pt=["stepper"];function Et(e,r){if(e&1){let d=T();o(0,"div",2)(1,"button",20),C("click",function(){c(d);let n=_();return u(n.onStepperBack())}),s(2," Back "),a(),o(3,"button",21),C("click",function(){c(d);let n=_();return u(n.onNextStep())}),s(4," Next "),a()()}if(e&2){let d=_();l(3),h("disabled",d.disabledNextFilter())}}function kt(e,r){if(e&1){let d=T();o(0,"button",22),C("click",function(){c(d);let n=_();return u(n.onNextStep())}),s(1," Next "),a()}if(e&2){let d=_();h("disabled",d.disabledNextFilter())}}function Vt(e,r){if(e&1){let d=T();o(0,"button",23),C("click",function(){c(d);let n=_();return u(n.onNewDownload())}),S(1,"i",24),s(2," New "),a()}}function It(e,r){e&1&&(S(0,"i",25),o(1,"span"),s(2,"Filter"),a())}function Nt(e,r){e&1&&(S(0,"i",26),o(1,"span"),s(2,"Preview"),a())}function Ft(e,r){if(e&1){let d=T();o(0,"preview-step",27),C("onExportOrders",function(){c(d);let n=_();return u(n.onExportOrders())}),a()}e&2&&h("orderPreview",r)}function Ot(e,r){e&1&&(S(0,"i",28),o(1,"span"),s(2,"Finish"),a())}function Rt(e,r){e&1&&S(0,"complete-step",16),e&2&&h("downloadResult",r)}function Wt(e,r){e&1&&(o(0,"h6"),s(1,"1"),a())}function Bt(e,r){e&1&&(o(0,"h6"),s(1,"2"),a())}function Lt(e,r){e&1&&(o(0,"h6"),s(1,"3"),a())}var pn=(()=>{let r=class r{constructor(){this.downloadService=y(z),this.orderService=y(de),this.productService=y($e),this.authService=y(ie),this.stepperSelectedIndex=g(0),this.disabledNextFilter=g(!0),this.isResetFilter=g(!1),this.pageTitle=g("Download to POS"),this.cacheKey=g(x.GuidEMpty),this.rememberMe=g(!1)}onFilterChange(t){this.filter=t,this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>x.IsEmpty(this.filter?.channelId)||!x.isValidDate(this.filter.startDate)||!x.isValidDate(this.filter.endDate))}onNextStep(){switch(this.stepper.selectedIndex){case 0:this.onPreview();let t=this.productService.findChannelById(this.filter.channelId,this.authService.getChannels());this.setPageTitle(`Preview ${t?.Name}`);break;case 1:this.onDownload(),this.setPageTitle("Download");break}}onStepperNext(){this.stepper.selected.completed=!0,this.stepper.next()}onPreview(){let t={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,IsDisbursement:this.filter.downloadType};x.IsNotEmpty(this.filter.startTime)&&(t=pe(se({},t),{TimeFrom:this.filter.startTime+":00",TimeTo:this.filter.endTime+":00"})),this.orderPreview$=this.downloadService.onPreviewOrder(t).pipe(j(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext())}),Q(n=>n.Data),G(1))}onExportOrders(){let t={ID:this.filter.channelId,From:this.filter.startDate?this.filter.startDate:null,To:this.filter.endDate?this.filter.endDate:null},n=`Orders ${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)}`;this.orderService.exportOrders(t,n).subscribe()}onDownload(){let t={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,ListPreview:[],IsDisbursement:this.filter.downloadType,CacheKey:this.cacheKey()};this.downloadPreview$=this.orderPreview$.pipe(ce(n=>(t.ListPreview=n,this.downloadService.getDownloadOrder(t))),j(()=>{this.onStepperNext()}),G(1))}setPageTitle(t){this.pageTitle.update(()=>`
|
|
3
3
|
${t} (${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)})
|
|
4
4
|
`)}onStepperBack(){this.stepper.previous(),this.pageTitle.update(()=>"Download to POS")}onNewDownload(){this.isResetFilter.update(()=>!this.rememberMe()),this.stepper.reset(),this.stepperSelectedIndex.update(()=>0),this.orderPreview$=null,this.downloadPreview$=null,this.pageTitle.update(()=>"Download to POS")}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["app-download-v2"]],viewQuery:function(n,i){if(n&1&&fe(Pt,5),n&2){let p;ge(p=_e())&&(i.stepper=p.first)}},features:[Z([z,de,{provide:He,useValue:{displayDefaultIndicatorType:!1}}])],decls:26,vars:21,consts:[["stepper",""],[3,"hideSearchBox","hideSearchDropdown","headerTitle","description"],[1,"btn-group","me-3"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"disabled"],[1,"btn","btn-outline-secondary","btn-fill","d-flex","align-items-center","gap-2"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectedIndexChange","ngClass","selectedIndex"],["state","filter",3,"completed","editable"],["matStepLabel",""],[1,"w-100",3,"onFilterChange","onRememberMeChange","reset"],["state","preview",3,"editable","completed"],[3,"orderPreview"],["state","finish"],[3,"downloadResult"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill","d-flex","align-items-center","gap-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt"],[1,"fa-solid","fa-filter","me-3"],[1,"fa-solid","fa-file","me-3"],[3,"onExportOrders","orderPreview"],[1,"fa-solid","fa-flag","me-3"]],template:function(n,i){if(n&1){let p=T();o(0,"mainpanel",1)(1,"actions"),w(2,Et,5,1,"div",2),w(3,kt,2,1,"button",3),w(4,Vt,3,0,"button",4),a(),o(5,"content")(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"mat-stepper",9,0),P("selectedIndexChange",function(m){return c(p),M(i.stepperSelectedIndex,m)||(i.stepperSelectedIndex=m),u(m)}),o(12,"mat-step",10),Y(13,It,3,0,"ng-template",11),o(14,"filter-step",12),C("onFilterChange",function(m){return c(p),u(i.onFilterChange(m))})("onRememberMeChange",function(m){return c(p),u(i.rememberMe.set(m))}),a()(),o(15,"mat-step",13),Y(16,Nt,3,0,"ng-template",11),w(17,Ft,1,1,"preview-step",14),L(18,"async"),a(),o(19,"mat-step",15),Y(20,Ot,3,0,"ng-template",11),w(21,Rt,1,1,"complete-step",16),L(22,"async"),a(),Y(23,Wt,2,0,"ng-template",17)(24,Bt,2,0,"ng-template",18)(25,Lt,2,0,"ng-template",19),a()()()()()()()}if(n&2){let p,f,m=N(11);h("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",i.pageTitle())("description",i.pageTitle()),l(2),v(i.stepperSelectedIndex()==1?2:-1),l(),v(i.stepperSelectedIndex()==0?3:-1),l(),v(i.stepperSelectedIndex()==2?4:-1),l(6),h("ngClass",Ce("last-edited-step-"+m.selectedIndex)),b("selectedIndex",i.stepperSelectedIndex),l(2),h("completed",!1)("editable",i.stepperSelectedIndex()!=2),l(2),h("reset",i.isResetFilter()),l(),h("editable",i.stepperSelectedIndex()!=2)("completed",!1),l(2),v((p=H(18,17,i.orderPreview$))?17:-1,p),l(4),v((f=H(22,19,i.downloadPreview$))?21:-1,f)}},dependencies:[V,O,it,ot,at,Je,Ze,Ke,qe,Qe,Ne,be,re,X],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
|