marketplacepos 3.15.0 → 3.15.1
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-L33MFTTM.js → chunk-2NRYBLX2.js} +1 -1
- package/Marketplace/{chunk-EI3KPHG7.js → chunk-3I25MNEJ.js} +2 -2
- package/Marketplace/{chunk-Q4FOBI47.js → chunk-4HOIRUEO.js} +1 -1
- package/Marketplace/{chunk-ZUTKRQCG.js → chunk-5NDG3SUM.js} +1 -1
- package/Marketplace/{chunk-B4RTU5A6.js → chunk-AMUX4WZH.js} +1 -1
- package/Marketplace/{chunk-6UPC6ZHH.js → chunk-B4SCNDB5.js} +1 -1
- package/Marketplace/{chunk-MS7TDJGD.js → chunk-BV6WKJBP.js} +1 -1
- package/Marketplace/{chunk-BIWUQMY6.js → chunk-G7GU37FJ.js} +1 -1
- package/Marketplace/{chunk-IQJZLNR7.js → chunk-GOR2LPT5.js} +1 -1
- package/Marketplace/{chunk-ZXDRQ5NO.js → chunk-IG2LDANH.js} +1 -1
- package/Marketplace/{chunk-WUOENHV6.js → chunk-JQZFTRSI.js} +1 -1
- package/Marketplace/{chunk-BCZNQVP7.js → chunk-JSPMPN5T.js} +4 -4
- package/Marketplace/{chunk-PHVJKT43.js → chunk-K4IJAE56.js} +1 -1
- package/Marketplace/{chunk-OKITFWXZ.js → chunk-OCG3HG72.js} +1 -1
- package/Marketplace/{chunk-PDMFRPES.js → chunk-OR4XOUSV.js} +1 -1
- package/Marketplace/{chunk-LIUFDNS2.js → chunk-PUC6ODUE.js} +3 -3
- package/Marketplace/{chunk-UYUDVWKN.js → chunk-PYCM3S43.js} +1 -1
- package/Marketplace/{chunk-TAUCMC6B.js → chunk-QITW54IW.js} +1 -1
- package/Marketplace/{chunk-ETN6PAVE.js → chunk-RER2OLD4.js} +1 -1
- package/Marketplace/{chunk-UYBM65IV.js → chunk-TLKDYQBN.js} +1 -1
- package/Marketplace/{chunk-UJNV7X2C.js → chunk-TRGFX3AD.js} +1 -1
- package/Marketplace/{chunk-MTGMHTUM.js → chunk-UJL2GLHS.js} +1 -1
- package/Marketplace/{chunk-EZZU5A4W.js → chunk-W5TR3NDM.js} +1 -1
- package/Marketplace/{chunk-K76GF3AP.js → chunk-WDY3SIUY.js} +1 -1
- package/Marketplace/{chunk-GMIPFSK2.js → chunk-WRS54BQ7.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-AHDSMQXN.js → main-XF2FUSJ6.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T,b as Pt,c as ae}from"./chunk-IAYFW5AU.js";import"./chunk-E3LCGTRI.js";import{a as re}from"./chunk-5BU6HQXL.js";import{a as Z}from"./chunk-7KG3DC5J.js";import{a as B}from"./chunk-4URWFKAM.js";import{b as oe}from"./chunk-RXDUUYMX.js";import"./chunk-GP6U42SV.js";import"./chunk-O5FN3DLG.js";import{a as zt,b as Ht}from"./chunk-RKRJ4JOF.js";import{f as rt}from"./chunk-L33MFTTM.js";import{f as Xt,g as te,h as ee,i as ne,j as ie}from"./chunk-DSDMENCN.js";import{a as R}from"./chunk-EEOWKNSQ.js";import"./chunk-IJAO5VS5.js";import{a as q,b as bt}from"./chunk-4BPLZVXV.js";import{a as z}from"./chunk-ONKOEBKR.js";import{b as le}from"./chunk-ZG6JXFSY.js";import"./chunk-ZQLDSEY5.js";import{a as Yt,b as Zt,c as qt}from"./chunk-2L5RCILV.js";import{a as X}from"./chunk-UJNV7X2C.js";import{a as Qt}from"./chunk-C62XLEFW.js";import"./chunk-M4JG6342.js";import"./chunk-6NTRXLMW.js";import{a as ot,b as xt,d as Y,e as Gt}from"./chunk-Y27IE54D.js";import{g as A}from"./chunk-TAUCMC6B.js";import{b as W,e as K}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{d as J,l as L,m as Jt}from"./chunk-UUNZHJ6W.js";import{t as vt,u as Kt}from"./chunk-CTKEWRX4.js";import{P as Wt}from"./chunk-GXHE2CDH.js";import{b as jt,c as it,h as $,l as G,y as $t}from"./chunk-QOA24ZLA.js";import{b as H,c as x}from"./chunk-2AMEIUWK.js";import{$a as s,$b as k,Ac as At,B as y,Cc as Ct,Dc as Lt,Ha as O,Hb as j,Ia as c,Ib as d,Ja as C,Jb as _t,Kb as w,Mb as D,Nb as E,Ob as N,Rb as Q,Sb as lt,Uc as ft,V as Ot,Vc as Rt,Wc as nt,X as Nt,Xc as St,Za as S,Zc as Bt,_b as F,aa as kt,ac as Ut,bc as et,c as Dt,ga as M,ha as Vt,lb as a,mb as l,nb as _,oa as m,ob as P,pa as u,pb as b,q as Et,rb as v,ub as f,vc as V,wb as p,wc as U,zc as gt}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var Se=()=>["/menu/products/download/by-url"],ce=(()=>{let r=class r{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),_(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),_(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),d(11,"Download Product By Url"),l()()()()()(),_(12,"router-outlet")),e&2&&(c(3),s("Tabs",i.productTabs),c(7),s("routerLink",Q(2,Se)))},dependencies:[zt,Rt,St]});let o=r;return o})();function xe(o,r){if(o&1){let n=v();a(0,"button",13),f("click",function(){m(n);let e=p(2);return u(e.onOpenScanDialog())}),_(1,"i",14),d(2," Scan Channel "),l()}}function ve(o,r){if(o&1&&(P(0),S(1,xe,3,0,"button",12),b()),o&2){let n=p();c(),s("ngIf",!n.productService.hasSelection(n.products))}}function Pe(o,r){if(o&1){let n=v();P(0),a(1,"button",15),f("click",function(){m(n);let e=p();return u(e.onScanMultipleProduct())}),_(2,"i",14),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Scan (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function be(o,r){if(o&1){let n=v();P(0),a(1,"button",16),f("click",function(){m(n);let e=p();return u(e.onUploadMultipleProduct())}),_(2,"i",17),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Upload (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function Ie(o,r){if(o&1){let n=v();a(0,"div",18)(1,"app-product-card",19),f("onUpload",function(){let e=m(n).$implicit,i=p();return u(i.onUploadToMultipleChannel(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanSingleProduct(e))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let i=m(n).$implicit;return u(i.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(),s("productId",n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null?null:n.Variants.length)>1?(n==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",(n==null?null:n.Channel.length)<t.channelOptions.length)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function we(o,r){o&1&&(P(0),a(1,"div",20),_(2,"app-empty-state"),l(),b())}function ye(o,r){if(o&1){let n=v();P(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),f("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()(),b()}if(o&2){let n=p();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var de=(()=>{let r=class r{constructor(t,e,i,h,g,I,at){this.http=t,this.toastr=e,this.dialog=i,this.productService=h,this.authService=g,this.uploadProductService=I,this.route=at,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(e=>{this.products=e.Data,this.rowCount=e.Total==null?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=x.GuidEMpty,this.dialog.open(T,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,e,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){this.dialog.open(Pt,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=x.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok]);this.dialog.open(T,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(h=>x.IsNotEmpty(h))).subscribe(h=>{this.searchFilter.ChannelID=h.ChannelID,this.searchFilter.ScanFull=h.ScanFull,this.searchFilter.UpdatedProduct=h.UpdatedProduct;let g=this.productService.selectedProduct(this.products),I=this.productService.getVariantCodesProducts(g);this.scanSingleProduct(I)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=x.GuidEMpty,this.dialog.open(T,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let h=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(h)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=x.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=x.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}};r.\u0275fac=function(e){return new(e||r)(C(K),C(W),C(J),C(R),C(A),C(rt),C(nt))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){if(e&1){let h=v();a(0,"mainpanel",1),f("onSubmit",function(I){return m(h),u(i.searchProduct(I))}),a(1,"actions"),S(2,ve,2,1,"ng-container",2)(3,Pe,4,1,"ng-container",2)(4,be,4,1,"ng-container",2),l(),a(5,"filters")(6,"div")(7,"label",3),d(8,"Category"),l(),a(9,"ng-select",4),f("ngModelChange",function(I){return m(h),u(i.searchFilter.Category=I)}),l()(),a(10,"div",5)(11,"mat-date-range-input",6)(12,"input",7),N("ngModelChange",function(I){return m(h),E(i.startDate,I)||(i.startDate=I),u(I)}),f("click",function(){m(h);let I=j(15);return u(I.open())}),l(),a(13,"input",8),N("ngModelChange",function(I){return m(h),E(i.endDate,I)||(i.endDate=I),u(I)}),f("click",function(){m(h);let I=j(15);return u(I.open())}),l()(),_(14,"mat-date-range-picker",null,0),l()(),a(16,"content")(17,"div",9)(18,"div",10),S(19,Ie,2,10,"div",11)(20,we,3,0,"ng-container",2),l(),S(21,ye,4,4,"ng-container",2),l()()()}if(e&2){let h=j(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",h),c(),D("ngModel",i.startDate),c(),D("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",i.products.length>0)}},dependencies:[V,U,it,$,G,L,Y,z,q,B,ee,Xt,te,ne],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=r;return o})();function Me(o,r){if(o&1){let n=v();P(0),a(1,"button",10),f("click",function(){m(n);let e=p();return u(e.onOpenScanDialog())}),_(2,"i",11),d(3," Scan Channel "),l(),b()}}function Oe(o,r){if(o&1){let n=v();P(0),a(1,"button",12),f("click",function(){m(n);let e=p();return u(e.onScanMultipleProduct())}),_(2,"i",11),d(3),l(),b()}if(o&2){let n=p();c(3),w(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Fe(o,r){if(o&1){let n=v();P(0),a(1,"button",13),f("click",function(){m(n);let e=p();return u(e.onUploadMultipleProduct())}),_(2,"i",14),d(3),l(),b()}if(o&2){let n=p();c(3),w(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function Te(o,r){if(o&1&&(a(0,"span",15),_(1,"img",16),l(),d(2)),o&2){let n=r.item;c(),s("src",n.Img,O)("alt",n.Name),c(),w(" ",n.Name," ")}}function De(o,r){if(o&1){let n=v();a(0,"div",17)(1,"label",18),d(2,"Item ID"),l(),a(3,"input",19),N("ngModelChange",function(e){m(n);let i=p();return E(i.searchFilter.Item_id,e)||(i.searchFilter.Item_id=e),u(e)}),l()()}if(o&2){let n=p();c(3),D("ngModel",n.searchFilter.Item_id)}}function Ee(o,r){if(o&1){let n=v();a(0,"div",20)(1,"app-product-card",21),f("onUpload",function(){let e=m(n).$implicit,i=p();return u(i.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onOpenVariantDetail(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let i=m(n).$implicit;return u(i.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(),s("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",n==null?null:n.hasScan)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function Ne(o,r){o&1&&(P(0),a(1,"div",22),_(2,"app-empty-state"),l(),b())}function ke(o,r){if(o&1){let n=v();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),f("total",function(){m(n);let e=p();return u(e.getRowCount())})("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()()}if(o&2){let n=p();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var me=(()=>{let r=class r{constructor(t,e,i,h,g,I,at,ht){this.http=t,this.dialog=e,this.toastr=i,this.productService=h,this.activateRouter=g,this.authService=I,this.route=at,this.uploadProductService=ht,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=x.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(x.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=x.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let e=this.products[t].Variants;this.dialog.open(Pt,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=x.GuidEMpty,this.dialog.open(T,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(y(e=>e)).subscribe(e=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(x.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(T,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let h=this.productService.getVariantCodesProduct(t);this.scanProducts(h)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=x.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(T,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let h=this.productService.selectedProduct(this.products),g=this.productService.getVariantCodesProducts(h);this.scanProducts(g)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${i?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${i?.Name} `,"Error"),this.searchFilter.ChannelID=x.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=x.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=x.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(C(K),C(J),C(W),C(R),C(ft),C(A),C(nt),C(rt))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:18,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(g){return i.searchProduct(g)}),a(1,"actions"),S(2,Me,4,0,"ng-container",1)(3,Oe,4,1,"ng-container",1)(4,Fe,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),d(8,"Channel"),l(),a(9,"ng-select",3),f("ngModelChange",function(g){return i.searchFilter.ListChannelID=g})("clear",function(){return i.onClearFilterChannel()}),S(10,Te,3,3,"ng-template",4),l()(),S(11,De,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),S(15,Ee,2,10,"div",8)(16,Ne,3,0,"ng-container",1),l(),S(17,ke,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),s("ngIf",i.searchFilter.ListChannelID!=null),c(4),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",i.products==null?null:i.products.length))},dependencies:[V,U,it,$,G,L,Y,ot,xt,z,q,B],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=r;return o})();function Ue(o,r){if(o&1){let n=v();a(0,"button",13),f("click",function(){m(n);let e=p(2);return u(e.uploadMultipleProduct())}),_(1,"i",14),d(2),l()}if(o&2){let n=p(2);c(2),w(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function Ae(o,r){if(o&1){let n=v();P(0),a(1,"td",29)(2,"input",30),N("ngModelChange",function(e){m(n);let i=p(2).$implicit;return E(i.selected,e)||(i.selected=e),u(e)}),f("ngModelChange",function(){m(n);let e=p(3).ngIf,i=p(3);return u(i.onSelectProduct(e))}),l()(),b()}if(o&2){let n=p(2).$implicit;c(),s("rowSpan",n==null?null:n.Variants.length),c(),D("ngModel",n.selected)}}function Le(o,r){if(o&1){let n=v();P(0),a(1,"img",35),f("click",function(e){m(n);let i=p(3).$implicit,h=p(4);return u(h.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),b()}if(o&2){let n=p(3).$implicit;c(),s("src",n==null?null:n.ImageUrl,O)}}function Re(o,r){o&1&&_(0,"img",36)}function Be(o,r){if(o&1&&(P(0),a(1,"td",29)(2,"div",31),S(3,Le,2,1,"ng-container",11)(4,Re,1,0,"ng-template",null,1,et),l()(),a(6,"td",32)(7,"h4",33)(8,"span",34),d(9),l()()(),b()),o&2){let n=j(5),t=p(2).$implicit;c(),s("rowSpan",t==null?null:t.Variants.length),c(2),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),s("rowSpan",t==null?null:t.Variants.length),c(2),s("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(),w(" ",t==null?null:t.Name," ")}}function je(o,r){if(o&1&&(a(0,"div")(1,"a",25),_(2,"img",37),l()()),o&2){let n=r.$implicit;c(),s("href",n.URL,O),c(),s("src",n.Img,O)("matTooltip",n.Name)}}function $e(o,r){if(o&1&&(a(0,"div"),_(1,"img",37),l()),o&2){let n=r.$implicit;c(),s("src",n.Img,O)("matTooltip",n.Name)}}function Ge(o,r){if(o&1&&(a(0,"tr"),S(1,Ae,3,2,"ng-container",12)(2,Be,10,6,"ng-container",12),a(3,"td"),d(4),l(),a(5,"td")(6,"span"),d(7),l(),a(8,"span",24)(9,"a",25),_(10,"i",26),l()()(),a(11,"td",27)(12,"div",28),S(13,je,3,3,"div",23),l()(),a(14,"td",27)(15,"div",28),S(16,$e,2,2,"div",23),l()()()),o&2){let n=r.$implicit,t=r.index,e=p(5);c(),s("ngIf",t==0),c(),s("ngIf",t==0),c(2),w(" ",n.Name," "),c(3),w(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function We(o,r){if(o&1&&(P(0),S(1,Ge,17,7,"tr",23),b()),o&2){let n=r.$implicit;c(),s("ngForOf",n.Variants)}}function Ke(o,r){if(o&1&&(a(0,"tbody"),S(1,We,2,1,"ng-container",23),l()),o&2){let n=r.ngIf;c(),s("ngForOf",n)}}function Je(o,r){if(o&1&&(P(0),a(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr"),_(5,"th",18),a(6,"th",19),d(7,"Product"),l(),a(8,"th",20),d(9,"Variant"),l(),a(10,"th",20),d(11,"SKU"),l(),a(12,"th",21),d(13,"Available In"),l(),a(14,"th",22),d(15,"Not Available In"),l()()(),S(16,Ke,2,1,"tbody",12),F(17,"async"),l()(),b()),o&2){let n=p(2);c(16),s("ngIf",k(17,1,n.data$))}}function ze(o,r){o&1&&(a(0,"div",38),_(1,"app-empty-state"),l())}function He(o,r){if(o&1){let n=v();a(0,"span",46),f("click",function(){m(n);let e=p(4);return u(e.getRowCount())}),a(1,"i",47),d(2,"?"),l()()}}function Ye(o,r){if(o&1&&(a(0,"span"),d(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(),_t(k(2,1,n==null?null:n.Count))}}function Ze(o,r){if(o&1){let n=v();a(0,"a",48),f("click",function(){m(n);let e=p(4);return u(e.onNextPage())}),_(1,"i",49),d(2," Next"),l()}}function qe(o,r){if(o&1){let n=v();a(0,"a",50),f("click",function(){m(n);let e=p(4);return u(e.onLastPage())}),_(1,"i",51),d(2," Last"),l()}}function Qe(o,r){if(o&1&&(P(0),a(1,"div",39)(2,"div",40)(3,"div",41),d(4),F(5,"number"),S(6,He,3,0,"span",42)(7,Ye,3,3,"span",12),F(8,"async"),d(9),l()(),a(10,"div",43),S(11,Ze,3,0,"a",44)(12,qe,3,0,"a",45),l()(),b()),o&2){let n=p().ngIf,t=p(2);c(4),w(" Showing 1 - ",k(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(),s("ngIf",!t.paginationService.hideCount&&k(8,8,t.rowCount$)),c(2),w(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Xe(o,r){if(o&1&&(P(0),S(1,Qe,13,10,"ng-container",12),b()),o&2){let n=r.ngIf;c(),s("ngIf",(n==null?null:n.length)>0)}}function tn(o,r){if(o&1){let n=v();a(0,"mainpanel",3),f("onSubmit",function(e){m(n);let i=p();return u(i.searchProduct(e))}),a(1,"actions"),S(2,Ue,3,1,"button",4),a(3,"button",5),f("click",function(){m(n);let e=p();return u(e.openScanDialog())}),_(4,"i",6),d(5," Scan Channel "),l(),a(6,"button",7),f("click",function(){m(n);let e=p();return u(e.openExportDialog())}),_(7,"i",8),a(8,"span"),d(9,"Export"),l()()(),a(10,"content")(11,"div",9)(12,"div",10),S(13,Je,18,3,"ng-container",11),F(14,"async"),S(15,ze,2,0,"ng-template",null,0,et),l(),S(17,Xe,2,1,"ng-container",12),F(18,"async"),l()()()}if(o&2){let n,t=j(16),e=p();s("hideSearchDropdown",!0),c(2),s("ngIf",e.hasSelectionProduct),c(11),s("ngIf",((n=k(14,5,e.data$))==null?null:n.length)>0)("ngIfElse",t),c(4),s("ngIf",k(18,7,e.data$))}}var ue=(()=>{let r=class r{constructor(t,e,i,h,g,I,at,ht,fe){this.http=t,this.dialog=e,this.toastr=i,this.route=h,this.productService=g,this.paginationService=I,this.biggerPictureService=at,this.authService=ht,this.uploadProductService=fe,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=ht.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(Nt(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Et(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e.Channel=e?.Variants[0]?.Available,e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=x.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(e=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=x.GuidEMpty,this.dialog.open(T,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.filterSearch.ChannelID=i.ChannelID,this.filterSearch.ScanFull=i.ScanFull,this.filterSearch.UpdatedProduct=i.UpdatedProduct,this.filterSearch.Async=i.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(oe,{data:{title:"Export Not In Channel",pageNumber:this.filterSearch.PageNumber,rowCount:this.filterSearch.RowCount,filterExport:this.filterSearch,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};r.\u0275fac=function(e){return new(e||r)(C(K),C(J),C(W),C(nt),C(R),C(re),C(Qt),C(A),C(rt))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["EMPTY",""],["elsePic",""],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","hideSearchDropdown"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,i){e&1&&(S(0,tn,19,9,"mainpanel",2),F(1,"async")),e&2&&s("ngIf",k(1,1,i.loader$))},dependencies:[V,U,jt,$,G,L,vt,B,gt,Ct],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let o=r;return o})();var en=o=>[o],nn=()=>[];function on(o,r){if(o&1){let n=v();a(0,"button",15),f("click",function(){m(n);let e=p();return u(e.openScanDialog())}),_(1,"i",16),d(2," Scan Channel "),l()}}function rn(o,r){if(o&1){let n=v();P(0),a(1,"button",17),f("click",function(){m(n);let e=p();return u(e.onDownloadAllProduct("SELECTED"))}),_(2,"i",18),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Download (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function an(o,r){if(o&1&&(a(0,"span",19),_(1,"img",20),l(),d(2)),o&2){let n=r.item;c(),s("src",n.Img,O)("alt",n.Name),c(),w(" ",n.Name," ")}}function ln(o,r){if(o&1){let n=v();a(0,"div",21)(1,"app-product-card",22),f("onCheckBoxChange",function(e){let i=m(n).index,h=p();return u(h.onSelectProduct(e,i))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onShowVariantDetail(e))})("onDownload",function(){let e=m(n).$implicit,i=p();return u(i.onDownloadProduct(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanChannel(e))}),l()()}if(o&2){let n=r.$implicit;c(),s("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?lt(10,en,n==null?null:n.Channel):Q(12,nn))("showCheckBox",!0)("scanButton",!0)}}function cn(o,r){o&1&&(P(0),a(1,"div",23),_(2,"app-empty-state"),l(),b())}function sn(o,r){if(o&1){let n=v();a(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),f("total",function(){m(n);let e=p();return u(e.getRowCount())})("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()()}if(o&2){let n=p();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var he=(()=>{let r=class r{constructor(t,e,i,h,g,I){this.http=t,this.dialog=e,this.productService=i,this.toastrService=h,this.activateRouter=g,this.authService=I,this.searchFilter=new Z,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(x.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?x.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=x.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(x.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=x.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=x.GuidEMpty,this.dialog.open(T,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(x.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(ae,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}};r.\u0275fac=function(e){return new(e||r)(C(K),C(J),C(R),C(W),C(ft),C(A))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:30,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(g){return i.onSearch(g)}),a(1,"actions"),S(2,on,3,0,"button",1)(3,rn,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),d(7,"Channel"),l(),a(8,"ng-select",4),N("ngModelChange",function(g){return E(i.searchFilter.ChannelID,g)||(i.searchFilter.ChannelID=g),g}),S(9,an,3,3,"ng-template",5),l()(),a(10,"div",6)(11,"label",7),d(12,"SKU Assigned"),l(),a(13,"mat-radio-group",8),N("ngModelChange",function(g){return E(i.searchFilter.HaveSku,g)||(i.searchFilter.HaveSku=g),g}),a(14,"mat-radio-button",9),d(15," All "),l(),a(16,"mat-radio-button",9),d(17," Yes "),l(),a(18,"mat-radio-button",9),d(19," No "),l()()(),a(20,"div",6)(21,"label",7),d(22,"Item ID"),l(),a(23,"input",10),N("ngModelChange",function(g){return E(i.searchFilter.Item_id,g)||(i.searchFilter.Item_id=g),g}),l()()(),a(24,"content")(25,"div",11)(26,"div",12),S(27,ln,2,13,"div",13)(28,cn,3,0,"ng-container",2),l(),S(29,sn,3,4,"div",14),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions),D("ngModel",i.searchFilter.ChannelID),c(5),D("ngModel",i.searchFilter.HaveSku),c(),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),D("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[V,U,it,$,G,L,Y,ot,Yt,Zt,z,q,B],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=r;return o})();function pn(o,r){if(o&1&&(a(0,"span",9),_(1,"img",10),l(),d(2)),o&2){let n=r.item,t=p();c(),s("src",t.getChannelLogo(n.TypeID),O),c(),w(" ",n.Name," ")}}function dn(o,r){if(o&1&&(a(0,"div",11),_(1,"app-duplicate-product-card",12),l()),o&2){let n=r.$implicit,t=r.index;c(),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function mn(o,r){o&1&&(P(0),a(1,"div",13),_(2,"app-empty-state"),l(),b())}function un(o,r){if(o&1){let n=v();P(0),a(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),f("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())})("total",function(){m(n);let e=p();return u(e.getRowCount())}),l()()(),b()}if(o&2){let n=p();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var _e=(()=>{let r=class r{constructor(t,e,i){this.httpService=t,this.productService=e,this.authService=i,this.searchFilter=new Z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=i.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(e=>{this.products=e.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=x.GuidEMpty}getChannelLogo(t){return x.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(C(K),C(R),C(A))},r.\u0275cmp=M({type:r,selectors:[["app-duplicate-sku"]],decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(g){return i.onSearch(g)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),d(5,"Channel"),l(),a(6,"ng-select",3),N("ngModelChange",function(g){return E(i.searchFilter.ListChannelID,g)||(i.searchFilter.ListChannelID=g),g}),f("clear",function(){return i.onClearFilter()}),S(7,pn,3,2,"ng-template",4),l()()()(),a(8,"content")(9,"div",5)(10,"div",6),S(11,dn,2,6,"div",7)(12,mn,3,0,"ng-container",8),l(),S(13,un,4,4,"ng-container",8),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions),D("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(),s("ngIf",(i.products==null?null:i.products.length)==0),c(),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[V,U,$,G,L,Y,ot,xt,bt,z,B]});let o=r;return o})();var hn=()=>["/menu/products/status/sold-in-channel"],ge=o=>({ID:o}),_n=()=>["/menu/products/status/not-in-pos"];function gn(o,r){if(o&1&&(P(0),d(1),b()),o&2){let n=p().$implicit;c(),w(" ",n.Count," ")}}function Cn(o,r){if(o&1){let n=v();a(0,"span",26),f("click",function(){m(n);let e=p().$implicit,i=p(2);return u(i.getLiveProductCount(e.ID,e))}),_(1,"i",27),l()}}function fn(o,r){if(o&1){let n=v();a(0,"tr")(1,"td"),_(2,"img",17),a(3,"span",18),d(4),l()(),a(5,"td",19),S(6,gn,2,1,"ng-container",6)(7,Cn,2,0,"ng-template",null,1,et),l(),a(9,"td",19)(10,"a",20),d(11),F(12,"number"),l()(),a(13,"td",19)(14,"a",20),d(15),F(16,"number"),l()(),a(17,"td"),d(18),F(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),f("click",function(){let e=m(n).$implicit,i=p(2);return u(i.onScanChannel(e))}),_(23,"i",23),d(24," Scan "),l(),a(25,"button",24),f("click",function(){let e=m(n).$implicit,i=p(2);return u(i.onClearCache(e.ID))}),_(26,"i",25),d(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=j(8),e=p(2);c(2),s("src",e.getChannelLogo(n.TypeID),O),c(2),_t(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",Q(18,hn))("queryParams",lt(19,ge,n.ID)),c(),w(" ",k(12,11,n.SoldInChannel)," "),c(3),s("routerLink",Q(21,_n))("queryParams",lt(22,ge,n.ID)),c(),w(" ",k(16,13,n.NotInPOS)," "),c(3),w("",n.LastSync?Ut(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"Never"," ")}}function Sn(o,r){if(o&1&&(P(0),a(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),d(6,"Channel"),l(),a(7,"th",11),d(8,"Live Product"),l(),a(9,"th",12),d(10,"Sold In Channel"),l(),a(11,"th",13),d(12,"Product Not in POS"),l(),a(13,"th",14),d(14,"Last Sync"),l(),_(15,"th",15),l()(),a(16,"tbody"),S(17,fn,28,24,"tr",16),F(18,"async"),l()()(),b()),o&2){let n,t=p();c(17),s("ngForOf",(n=k(18,1,t.channels$))==null?null:n.Data)}}function xn(o,r){o&1&&(a(0,"div",28),_(1,"app-empty-state"),l())}var Ce=(()=>{let r=class r{constructor(t,e,i,h){this.productService=t,this.toastr=e,this.dialog=i,this.authService=h,this.destroy$=new Dt,this.channelOptions=h.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(Ot(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(T,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(y(e=>x.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let i=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(y(h=>h)).subscribe(h=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(h,i,!e.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(Ot(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return x.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(C(R),C(W),C(J),C(A))},r.\u0275cmp=M({type:r,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["EMPTY",""],["QUESTION",""],["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,i){if(e&1&&(a(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),S(5,Sn,19,3,"ng-container",6),F(6,"async"),S(7,xn,2,0,"ng-template",null,0,et),l()()()()()),e&2){let h,g=j(8);s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((h=k(6,4,i.channels$))==null||h.Data==null?null:h.Data.length)>0)("ngIfElse",g)}},dependencies:[V,U,L,vt,St,B,gt,Ct,At]});let o=r;return o})();var vn=[{component:ce,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:de,canActivate:[X],data:{title:"Products in POS"}},{path:"sold-in-channel",component:me,canActivate:[X],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:ue,canActivate:[X],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:he,canActivate:[X],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:_e,canActivate:[X],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:Ce,canActivate:[X],data:{title:"Channel Statistic"}}]}],Di=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Vt({type:r}),r.\u0275inj=kt({imports:[Lt,$t,Jt,Kt,Gt,le,qt,Ht,bt,z,q,Bt.forChild(vn),ie,Wt]});let o=r;return o})();export{Di as StatusModule};
|
|
1
|
+
import{a as T,b as Pt,c as ae}from"./chunk-IAYFW5AU.js";import"./chunk-E3LCGTRI.js";import{a as re}from"./chunk-5BU6HQXL.js";import{a as Z}from"./chunk-7KG3DC5J.js";import{a as B}from"./chunk-4URWFKAM.js";import{b as oe}from"./chunk-RXDUUYMX.js";import"./chunk-GP6U42SV.js";import"./chunk-O5FN3DLG.js";import{a as zt,b as Ht}from"./chunk-RKRJ4JOF.js";import{f as rt}from"./chunk-2NRYBLX2.js";import{f as Xt,g as te,h as ee,i as ne,j as ie}from"./chunk-DSDMENCN.js";import{a as R}from"./chunk-EEOWKNSQ.js";import"./chunk-IJAO5VS5.js";import{a as q,b as bt}from"./chunk-4BPLZVXV.js";import{a as z}from"./chunk-ONKOEBKR.js";import{b as le}from"./chunk-ZG6JXFSY.js";import"./chunk-ZQLDSEY5.js";import{a as Yt,b as Zt,c as qt}from"./chunk-2L5RCILV.js";import{a as X}from"./chunk-TRGFX3AD.js";import{a as Qt}from"./chunk-C62XLEFW.js";import"./chunk-M4JG6342.js";import"./chunk-6NTRXLMW.js";import{a as ot,b as xt,d as Y,e as Gt}from"./chunk-Y27IE54D.js";import{g as A}from"./chunk-QITW54IW.js";import{b as W,e as K}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{d as J,l as L,m as Jt}from"./chunk-UUNZHJ6W.js";import{t as vt,u as Kt}from"./chunk-CTKEWRX4.js";import{P as Wt}from"./chunk-GXHE2CDH.js";import{b as jt,c as it,h as $,l as G,y as $t}from"./chunk-QOA24ZLA.js";import{b as H,c as x}from"./chunk-2AMEIUWK.js";import{$a as s,$b as k,Ac as At,B as y,Cc as Ct,Dc as Lt,Ha as O,Hb as j,Ia as c,Ib as d,Ja as C,Jb as _t,Kb as w,Mb as D,Nb as E,Ob as N,Rb as Q,Sb as lt,Uc as ft,V as Ot,Vc as Rt,Wc as nt,X as Nt,Xc as St,Za as S,Zc as Bt,_b as F,aa as kt,ac as Ut,bc as et,c as Dt,ga as M,ha as Vt,lb as a,mb as l,nb as _,oa as m,ob as P,pa as u,pb as b,q as Et,rb as v,ub as f,vc as V,wb as p,wc as U,zc as gt}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var Se=()=>["/menu/products/download/by-url"],ce=(()=>{let r=class r{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),_(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),_(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),d(11,"Download Product By Url"),l()()()()()(),_(12,"router-outlet")),e&2&&(c(3),s("Tabs",i.productTabs),c(7),s("routerLink",Q(2,Se)))},dependencies:[zt,Rt,St]});let o=r;return o})();function xe(o,r){if(o&1){let n=v();a(0,"button",13),f("click",function(){m(n);let e=p(2);return u(e.onOpenScanDialog())}),_(1,"i",14),d(2," Scan Channel "),l()}}function ve(o,r){if(o&1&&(P(0),S(1,xe,3,0,"button",12),b()),o&2){let n=p();c(),s("ngIf",!n.productService.hasSelection(n.products))}}function Pe(o,r){if(o&1){let n=v();P(0),a(1,"button",15),f("click",function(){m(n);let e=p();return u(e.onScanMultipleProduct())}),_(2,"i",14),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Scan (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function be(o,r){if(o&1){let n=v();P(0),a(1,"button",16),f("click",function(){m(n);let e=p();return u(e.onUploadMultipleProduct())}),_(2,"i",17),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Upload (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function Ie(o,r){if(o&1){let n=v();a(0,"div",18)(1,"app-product-card",19),f("onUpload",function(){let e=m(n).$implicit,i=p();return u(i.onUploadToMultipleChannel(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanSingleProduct(e))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let i=m(n).$implicit;return u(i.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(),s("productId",n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null?null:n.Variants.length)>1?(n==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",(n==null?null:n.Channel.length)<t.channelOptions.length)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function we(o,r){o&1&&(P(0),a(1,"div",20),_(2,"app-empty-state"),l(),b())}function ye(o,r){if(o&1){let n=v();P(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),f("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()(),b()}if(o&2){let n=p();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var de=(()=>{let r=class r{constructor(t,e,i,h,g,I,at){this.http=t,this.toastr=e,this.dialog=i,this.productService=h,this.authService=g,this.uploadProductService=I,this.route=at,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(e=>{this.products=e.Data,this.rowCount=e.Total==null?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=x.GuidEMpty,this.dialog.open(T,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,e,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){this.dialog.open(Pt,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=x.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok]);this.dialog.open(T,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(h=>x.IsNotEmpty(h))).subscribe(h=>{this.searchFilter.ChannelID=h.ChannelID,this.searchFilter.ScanFull=h.ScanFull,this.searchFilter.UpdatedProduct=h.UpdatedProduct;let g=this.productService.selectedProduct(this.products),I=this.productService.getVariantCodesProducts(g);this.scanSingleProduct(I)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=x.GuidEMpty,this.dialog.open(T,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let h=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(h)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=x.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=x.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}};r.\u0275fac=function(e){return new(e||r)(C(K),C(W),C(J),C(R),C(A),C(rt),C(nt))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){if(e&1){let h=v();a(0,"mainpanel",1),f("onSubmit",function(I){return m(h),u(i.searchProduct(I))}),a(1,"actions"),S(2,ve,2,1,"ng-container",2)(3,Pe,4,1,"ng-container",2)(4,be,4,1,"ng-container",2),l(),a(5,"filters")(6,"div")(7,"label",3),d(8,"Category"),l(),a(9,"ng-select",4),f("ngModelChange",function(I){return m(h),u(i.searchFilter.Category=I)}),l()(),a(10,"div",5)(11,"mat-date-range-input",6)(12,"input",7),N("ngModelChange",function(I){return m(h),E(i.startDate,I)||(i.startDate=I),u(I)}),f("click",function(){m(h);let I=j(15);return u(I.open())}),l(),a(13,"input",8),N("ngModelChange",function(I){return m(h),E(i.endDate,I)||(i.endDate=I),u(I)}),f("click",function(){m(h);let I=j(15);return u(I.open())}),l()(),_(14,"mat-date-range-picker",null,0),l()(),a(16,"content")(17,"div",9)(18,"div",10),S(19,Ie,2,10,"div",11)(20,we,3,0,"ng-container",2),l(),S(21,ye,4,4,"ng-container",2),l()()()}if(e&2){let h=j(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",h),c(),D("ngModel",i.startDate),c(),D("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",i.products.length>0)}},dependencies:[V,U,it,$,G,L,Y,z,q,B,ee,Xt,te,ne],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=r;return o})();function Me(o,r){if(o&1){let n=v();P(0),a(1,"button",10),f("click",function(){m(n);let e=p();return u(e.onOpenScanDialog())}),_(2,"i",11),d(3," Scan Channel "),l(),b()}}function Oe(o,r){if(o&1){let n=v();P(0),a(1,"button",12),f("click",function(){m(n);let e=p();return u(e.onScanMultipleProduct())}),_(2,"i",11),d(3),l(),b()}if(o&2){let n=p();c(3),w(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Fe(o,r){if(o&1){let n=v();P(0),a(1,"button",13),f("click",function(){m(n);let e=p();return u(e.onUploadMultipleProduct())}),_(2,"i",14),d(3),l(),b()}if(o&2){let n=p();c(3),w(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function Te(o,r){if(o&1&&(a(0,"span",15),_(1,"img",16),l(),d(2)),o&2){let n=r.item;c(),s("src",n.Img,O)("alt",n.Name),c(),w(" ",n.Name," ")}}function De(o,r){if(o&1){let n=v();a(0,"div",17)(1,"label",18),d(2,"Item ID"),l(),a(3,"input",19),N("ngModelChange",function(e){m(n);let i=p();return E(i.searchFilter.Item_id,e)||(i.searchFilter.Item_id=e),u(e)}),l()()}if(o&2){let n=p();c(3),D("ngModel",n.searchFilter.Item_id)}}function Ee(o,r){if(o&1){let n=v();a(0,"div",20)(1,"app-product-card",21),f("onUpload",function(){let e=m(n).$implicit,i=p();return u(i.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onOpenVariantDetail(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let i=m(n).$implicit;return u(i.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(),s("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",n==null?null:n.hasScan)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function Ne(o,r){o&1&&(P(0),a(1,"div",22),_(2,"app-empty-state"),l(),b())}function ke(o,r){if(o&1){let n=v();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),f("total",function(){m(n);let e=p();return u(e.getRowCount())})("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()()}if(o&2){let n=p();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var me=(()=>{let r=class r{constructor(t,e,i,h,g,I,at,ht){this.http=t,this.dialog=e,this.toastr=i,this.productService=h,this.activateRouter=g,this.authService=I,this.route=at,this.uploadProductService=ht,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=x.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(x.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=x.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[H.Tokopedia,H.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let e=this.products[t].Variants;this.dialog.open(Pt,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=x.GuidEMpty,this.dialog.open(T,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(y(e=>e)).subscribe(e=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(x.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(T,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let h=this.productService.getVariantCodesProduct(t);this.scanProducts(h)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=x.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(T,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let h=this.productService.selectedProduct(this.products),g=this.productService.getVariantCodesProducts(h);this.scanProducts(g)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${i?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${i?.Name} `,"Error"),this.searchFilter.ChannelID=x.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=x.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=x.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(C(K),C(J),C(W),C(R),C(ft),C(A),C(nt),C(rt))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:18,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(g){return i.searchProduct(g)}),a(1,"actions"),S(2,Me,4,0,"ng-container",1)(3,Oe,4,1,"ng-container",1)(4,Fe,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),d(8,"Channel"),l(),a(9,"ng-select",3),f("ngModelChange",function(g){return i.searchFilter.ListChannelID=g})("clear",function(){return i.onClearFilterChannel()}),S(10,Te,3,3,"ng-template",4),l()(),S(11,De,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),S(15,Ee,2,10,"div",8)(16,Ne,3,0,"ng-container",1),l(),S(17,ke,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),s("ngIf",i.searchFilter.ListChannelID!=null),c(4),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",i.products==null?null:i.products.length))},dependencies:[V,U,it,$,G,L,Y,ot,xt,z,q,B],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=r;return o})();function Ue(o,r){if(o&1){let n=v();a(0,"button",13),f("click",function(){m(n);let e=p(2);return u(e.uploadMultipleProduct())}),_(1,"i",14),d(2),l()}if(o&2){let n=p(2);c(2),w(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function Ae(o,r){if(o&1){let n=v();P(0),a(1,"td",29)(2,"input",30),N("ngModelChange",function(e){m(n);let i=p(2).$implicit;return E(i.selected,e)||(i.selected=e),u(e)}),f("ngModelChange",function(){m(n);let e=p(3).ngIf,i=p(3);return u(i.onSelectProduct(e))}),l()(),b()}if(o&2){let n=p(2).$implicit;c(),s("rowSpan",n==null?null:n.Variants.length),c(),D("ngModel",n.selected)}}function Le(o,r){if(o&1){let n=v();P(0),a(1,"img",35),f("click",function(e){m(n);let i=p(3).$implicit,h=p(4);return u(h.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),b()}if(o&2){let n=p(3).$implicit;c(),s("src",n==null?null:n.ImageUrl,O)}}function Re(o,r){o&1&&_(0,"img",36)}function Be(o,r){if(o&1&&(P(0),a(1,"td",29)(2,"div",31),S(3,Le,2,1,"ng-container",11)(4,Re,1,0,"ng-template",null,1,et),l()(),a(6,"td",32)(7,"h4",33)(8,"span",34),d(9),l()()(),b()),o&2){let n=j(5),t=p(2).$implicit;c(),s("rowSpan",t==null?null:t.Variants.length),c(2),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),s("rowSpan",t==null?null:t.Variants.length),c(2),s("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(),w(" ",t==null?null:t.Name," ")}}function je(o,r){if(o&1&&(a(0,"div")(1,"a",25),_(2,"img",37),l()()),o&2){let n=r.$implicit;c(),s("href",n.URL,O),c(),s("src",n.Img,O)("matTooltip",n.Name)}}function $e(o,r){if(o&1&&(a(0,"div"),_(1,"img",37),l()),o&2){let n=r.$implicit;c(),s("src",n.Img,O)("matTooltip",n.Name)}}function Ge(o,r){if(o&1&&(a(0,"tr"),S(1,Ae,3,2,"ng-container",12)(2,Be,10,6,"ng-container",12),a(3,"td"),d(4),l(),a(5,"td")(6,"span"),d(7),l(),a(8,"span",24)(9,"a",25),_(10,"i",26),l()()(),a(11,"td",27)(12,"div",28),S(13,je,3,3,"div",23),l()(),a(14,"td",27)(15,"div",28),S(16,$e,2,2,"div",23),l()()()),o&2){let n=r.$implicit,t=r.index,e=p(5);c(),s("ngIf",t==0),c(),s("ngIf",t==0),c(2),w(" ",n.Name," "),c(3),w(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function We(o,r){if(o&1&&(P(0),S(1,Ge,17,7,"tr",23),b()),o&2){let n=r.$implicit;c(),s("ngForOf",n.Variants)}}function Ke(o,r){if(o&1&&(a(0,"tbody"),S(1,We,2,1,"ng-container",23),l()),o&2){let n=r.ngIf;c(),s("ngForOf",n)}}function Je(o,r){if(o&1&&(P(0),a(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr"),_(5,"th",18),a(6,"th",19),d(7,"Product"),l(),a(8,"th",20),d(9,"Variant"),l(),a(10,"th",20),d(11,"SKU"),l(),a(12,"th",21),d(13,"Available In"),l(),a(14,"th",22),d(15,"Not Available In"),l()()(),S(16,Ke,2,1,"tbody",12),F(17,"async"),l()(),b()),o&2){let n=p(2);c(16),s("ngIf",k(17,1,n.data$))}}function ze(o,r){o&1&&(a(0,"div",38),_(1,"app-empty-state"),l())}function He(o,r){if(o&1){let n=v();a(0,"span",46),f("click",function(){m(n);let e=p(4);return u(e.getRowCount())}),a(1,"i",47),d(2,"?"),l()()}}function Ye(o,r){if(o&1&&(a(0,"span"),d(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(),_t(k(2,1,n==null?null:n.Count))}}function Ze(o,r){if(o&1){let n=v();a(0,"a",48),f("click",function(){m(n);let e=p(4);return u(e.onNextPage())}),_(1,"i",49),d(2," Next"),l()}}function qe(o,r){if(o&1){let n=v();a(0,"a",50),f("click",function(){m(n);let e=p(4);return u(e.onLastPage())}),_(1,"i",51),d(2," Last"),l()}}function Qe(o,r){if(o&1&&(P(0),a(1,"div",39)(2,"div",40)(3,"div",41),d(4),F(5,"number"),S(6,He,3,0,"span",42)(7,Ye,3,3,"span",12),F(8,"async"),d(9),l()(),a(10,"div",43),S(11,Ze,3,0,"a",44)(12,qe,3,0,"a",45),l()(),b()),o&2){let n=p().ngIf,t=p(2);c(4),w(" Showing 1 - ",k(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(),s("ngIf",!t.paginationService.hideCount&&k(8,8,t.rowCount$)),c(2),w(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Xe(o,r){if(o&1&&(P(0),S(1,Qe,13,10,"ng-container",12),b()),o&2){let n=r.ngIf;c(),s("ngIf",(n==null?null:n.length)>0)}}function tn(o,r){if(o&1){let n=v();a(0,"mainpanel",3),f("onSubmit",function(e){m(n);let i=p();return u(i.searchProduct(e))}),a(1,"actions"),S(2,Ue,3,1,"button",4),a(3,"button",5),f("click",function(){m(n);let e=p();return u(e.openScanDialog())}),_(4,"i",6),d(5," Scan Channel "),l(),a(6,"button",7),f("click",function(){m(n);let e=p();return u(e.openExportDialog())}),_(7,"i",8),a(8,"span"),d(9,"Export"),l()()(),a(10,"content")(11,"div",9)(12,"div",10),S(13,Je,18,3,"ng-container",11),F(14,"async"),S(15,ze,2,0,"ng-template",null,0,et),l(),S(17,Xe,2,1,"ng-container",12),F(18,"async"),l()()()}if(o&2){let n,t=j(16),e=p();s("hideSearchDropdown",!0),c(2),s("ngIf",e.hasSelectionProduct),c(11),s("ngIf",((n=k(14,5,e.data$))==null?null:n.length)>0)("ngIfElse",t),c(4),s("ngIf",k(18,7,e.data$))}}var ue=(()=>{let r=class r{constructor(t,e,i,h,g,I,at,ht,fe){this.http=t,this.dialog=e,this.toastr=i,this.route=h,this.productService=g,this.paginationService=I,this.biggerPictureService=at,this.authService=ht,this.uploadProductService=fe,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=ht.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(Nt(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Et(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e.Channel=e?.Variants[0]?.Available,e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=x.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(e=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=x.GuidEMpty,this.dialog.open(T,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.filterSearch.ChannelID=i.ChannelID,this.filterSearch.ScanFull=i.ScanFull,this.filterSearch.UpdatedProduct=i.UpdatedProduct,this.filterSearch.Async=i.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(oe,{data:{title:"Export Not In Channel",pageNumber:this.filterSearch.PageNumber,rowCount:this.filterSearch.RowCount,filterExport:this.filterSearch,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};r.\u0275fac=function(e){return new(e||r)(C(K),C(J),C(W),C(nt),C(R),C(re),C(Qt),C(A),C(rt))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["EMPTY",""],["elsePic",""],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","hideSearchDropdown"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,i){e&1&&(S(0,tn,19,9,"mainpanel",2),F(1,"async")),e&2&&s("ngIf",k(1,1,i.loader$))},dependencies:[V,U,jt,$,G,L,vt,B,gt,Ct],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let o=r;return o})();var en=o=>[o],nn=()=>[];function on(o,r){if(o&1){let n=v();a(0,"button",15),f("click",function(){m(n);let e=p();return u(e.openScanDialog())}),_(1,"i",16),d(2," Scan Channel "),l()}}function rn(o,r){if(o&1){let n=v();P(0),a(1,"button",17),f("click",function(){m(n);let e=p();return u(e.onDownloadAllProduct("SELECTED"))}),_(2,"i",18),d(3),l(),b()}if(o&2){let n,t=p();c(3),w(" Download (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function an(o,r){if(o&1&&(a(0,"span",19),_(1,"img",20),l(),d(2)),o&2){let n=r.item;c(),s("src",n.Img,O)("alt",n.Name),c(),w(" ",n.Name," ")}}function ln(o,r){if(o&1){let n=v();a(0,"div",21)(1,"app-product-card",22),f("onCheckBoxChange",function(e){let i=m(n).index,h=p();return u(h.onSelectProduct(e,i))})("onDescEvent",function(){let e=m(n).index,i=p();return u(i.onShowVariantDetail(e))})("onDownload",function(){let e=m(n).$implicit,i=p();return u(i.onDownloadProduct(e))})("onScan",function(){let e=m(n).$implicit,i=p();return u(i.onScanChannel(e))}),l()()}if(o&2){let n=r.$implicit;c(),s("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?lt(10,en,n==null?null:n.Channel):Q(12,nn))("showCheckBox",!0)("scanButton",!0)}}function cn(o,r){o&1&&(P(0),a(1,"div",23),_(2,"app-empty-state"),l(),b())}function sn(o,r){if(o&1){let n=v();a(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),f("total",function(){m(n);let e=p();return u(e.getRowCount())})("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())}),l()()()}if(o&2){let n=p();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var he=(()=>{let r=class r{constructor(t,e,i,h,g,I){this.http=t,this.dialog=e,this.productService=i,this.toastrService=h,this.activateRouter=g,this.authService=I,this.searchFilter=new Z,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(x.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?x.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=x.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(x.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=x.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=x.GuidEMpty,this.dialog.open(T,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>x.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(x.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(ae,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}};r.\u0275fac=function(e){return new(e||r)(C(K),C(J),C(R),C(W),C(ft),C(A))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:30,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(g){return i.onSearch(g)}),a(1,"actions"),S(2,on,3,0,"button",1)(3,rn,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),d(7,"Channel"),l(),a(8,"ng-select",4),N("ngModelChange",function(g){return E(i.searchFilter.ChannelID,g)||(i.searchFilter.ChannelID=g),g}),S(9,an,3,3,"ng-template",5),l()(),a(10,"div",6)(11,"label",7),d(12,"SKU Assigned"),l(),a(13,"mat-radio-group",8),N("ngModelChange",function(g){return E(i.searchFilter.HaveSku,g)||(i.searchFilter.HaveSku=g),g}),a(14,"mat-radio-button",9),d(15," All "),l(),a(16,"mat-radio-button",9),d(17," Yes "),l(),a(18,"mat-radio-button",9),d(19," No "),l()()(),a(20,"div",6)(21,"label",7),d(22,"Item ID"),l(),a(23,"input",10),N("ngModelChange",function(g){return E(i.searchFilter.Item_id,g)||(i.searchFilter.Item_id=g),g}),l()()(),a(24,"content")(25,"div",11)(26,"div",12),S(27,ln,2,13,"div",13)(28,cn,3,0,"ng-container",2),l(),S(29,sn,3,4,"div",14),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions),D("ngModel",i.searchFilter.ChannelID),c(5),D("ngModel",i.searchFilter.HaveSku),c(),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),D("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(),s("ngIf",i.products.length==0),c(),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[V,U,it,$,G,L,Y,ot,Yt,Zt,z,q,B],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=r;return o})();function pn(o,r){if(o&1&&(a(0,"span",9),_(1,"img",10),l(),d(2)),o&2){let n=r.item,t=p();c(),s("src",t.getChannelLogo(n.TypeID),O),c(),w(" ",n.Name," ")}}function dn(o,r){if(o&1&&(a(0,"div",11),_(1,"app-duplicate-product-card",12),l()),o&2){let n=r.$implicit,t=r.index;c(),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function mn(o,r){o&1&&(P(0),a(1,"div",13),_(2,"app-empty-state"),l(),b())}function un(o,r){if(o&1){let n=v();P(0),a(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),f("next",function(){m(n);let e=p();return u(e.getProducts())})("previous",function(){m(n);let e=p();return u(e.getProducts())})("total",function(){m(n);let e=p();return u(e.getRowCount())}),l()()(),b()}if(o&2){let n=p();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var _e=(()=>{let r=class r{constructor(t,e,i){this.httpService=t,this.productService=e,this.authService=i,this.searchFilter=new Z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=i.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(e=>{this.products=e.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=x.GuidEMpty}getChannelLogo(t){return x.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(C(K),C(R),C(A))},r.\u0275cmp=M({type:r,selectors:[["app-duplicate-sku"]],decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),f("onSubmit",function(g){return i.onSearch(g)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),d(5,"Channel"),l(),a(6,"ng-select",3),N("ngModelChange",function(g){return E(i.searchFilter.ListChannelID,g)||(i.searchFilter.ListChannelID=g),g}),f("clear",function(){return i.onClearFilter()}),S(7,pn,3,2,"ng-template",4),l()()()(),a(8,"content")(9,"div",5)(10,"div",6),S(11,dn,2,6,"div",7)(12,mn,3,0,"ng-container",8),l(),S(13,un,4,4,"ng-container",8),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions),D("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(),s("ngIf",(i.products==null?null:i.products.length)==0),c(),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[V,U,$,G,L,Y,ot,xt,bt,z,B]});let o=r;return o})();var hn=()=>["/menu/products/status/sold-in-channel"],ge=o=>({ID:o}),_n=()=>["/menu/products/status/not-in-pos"];function gn(o,r){if(o&1&&(P(0),d(1),b()),o&2){let n=p().$implicit;c(),w(" ",n.Count," ")}}function Cn(o,r){if(o&1){let n=v();a(0,"span",26),f("click",function(){m(n);let e=p().$implicit,i=p(2);return u(i.getLiveProductCount(e.ID,e))}),_(1,"i",27),l()}}function fn(o,r){if(o&1){let n=v();a(0,"tr")(1,"td"),_(2,"img",17),a(3,"span",18),d(4),l()(),a(5,"td",19),S(6,gn,2,1,"ng-container",6)(7,Cn,2,0,"ng-template",null,1,et),l(),a(9,"td",19)(10,"a",20),d(11),F(12,"number"),l()(),a(13,"td",19)(14,"a",20),d(15),F(16,"number"),l()(),a(17,"td"),d(18),F(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),f("click",function(){let e=m(n).$implicit,i=p(2);return u(i.onScanChannel(e))}),_(23,"i",23),d(24," Scan "),l(),a(25,"button",24),f("click",function(){let e=m(n).$implicit,i=p(2);return u(i.onClearCache(e.ID))}),_(26,"i",25),d(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=j(8),e=p(2);c(2),s("src",e.getChannelLogo(n.TypeID),O),c(2),_t(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",Q(18,hn))("queryParams",lt(19,ge,n.ID)),c(),w(" ",k(12,11,n.SoldInChannel)," "),c(3),s("routerLink",Q(21,_n))("queryParams",lt(22,ge,n.ID)),c(),w(" ",k(16,13,n.NotInPOS)," "),c(3),w("",n.LastSync?Ut(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"Never"," ")}}function Sn(o,r){if(o&1&&(P(0),a(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),d(6,"Channel"),l(),a(7,"th",11),d(8,"Live Product"),l(),a(9,"th",12),d(10,"Sold In Channel"),l(),a(11,"th",13),d(12,"Product Not in POS"),l(),a(13,"th",14),d(14,"Last Sync"),l(),_(15,"th",15),l()(),a(16,"tbody"),S(17,fn,28,24,"tr",16),F(18,"async"),l()()(),b()),o&2){let n,t=p();c(17),s("ngForOf",(n=k(18,1,t.channels$))==null?null:n.Data)}}function xn(o,r){o&1&&(a(0,"div",28),_(1,"app-empty-state"),l())}var Ce=(()=>{let r=class r{constructor(t,e,i,h){this.productService=t,this.toastr=e,this.dialog=i,this.authService=h,this.destroy$=new Dt,this.channelOptions=h.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(Ot(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(T,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(y(e=>x.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let i=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(y(h=>h)).subscribe(h=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(h,i,!e.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(Ot(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return x.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(C(R),C(W),C(J),C(A))},r.\u0275cmp=M({type:r,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["EMPTY",""],["QUESTION",""],["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,i){if(e&1&&(a(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),S(5,Sn,19,3,"ng-container",6),F(6,"async"),S(7,xn,2,0,"ng-template",null,0,et),l()()()()()),e&2){let h,g=j(8);s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((h=k(6,4,i.channels$))==null||h.Data==null?null:h.Data.length)>0)("ngIfElse",g)}},dependencies:[V,U,L,vt,St,B,gt,Ct,At]});let o=r;return o})();var vn=[{component:ce,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:de,canActivate:[X],data:{title:"Products in POS"}},{path:"sold-in-channel",component:me,canActivate:[X],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:ue,canActivate:[X],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:he,canActivate:[X],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:_e,canActivate:[X],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:Ce,canActivate:[X],data:{title:"Channel Statistic"}}]}],Di=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Vt({type:r}),r.\u0275inj=kt({imports:[Lt,$t,Jt,Kt,Gt,le,qt,Ht,bt,z,q,Bt.forChild(vn),ie,Wt]});let o=r;return o})();export{Di as StatusModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C,b as y}from"./chunk-RKRJ4JOF.js";import{a as i}from"./chunk-
|
|
1
|
+
import{a as C,b as y}from"./chunk-RKRJ4JOF.js";import{a as i}from"./chunk-TRGFX3AD.js";import"./chunk-QITW54IW.js";import"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import"./chunk-2AMEIUWK.js";import{$a as d,Dc as o,Ia as c,Qb as h,Vc as v,Zc as r,aa as p,ga as l,ha as s,lb as u,mb as f,nb as a}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var b=(()=>{let t=class t{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=l({type:t,selectors:[["app-inventory"]],standalone:!0,features:[h],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,M){n&1&&(u(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),f()()(),a(4,"router-outlet")),n&2&&(c(3),d("Tabs",M.inventoryTabs))},dependencies:[o,y,C,r,v],encapsulation:2});let e=t;return e})();var g=[{path:"",component:b,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-5NDG3SUM.js").then(e=>e.MultiChannelComparison)},canActivate:[i],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-AMUX4WZH.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[i],data:{title:"Inventory Comparison"}}]}],E=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=s({type:t}),t.\u0275inj=p({imports:[o,r.forChild(g)]});let e=t;return e})();export{E as InventoryRoutingModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ue}from"./chunk-VUL363BT.js";import"./chunk-6U6JR5K6.js";import{a as Mi}from"./chunk-BVIRHZTZ.js";import{a as be,b as we,c as Yi}from"./chunk-CHPESC5O.js";import{a as Se}from"./chunk-4URWFKAM.js";import{b as nn}from"./chunk-RXDUUYMX.js";import"./chunk-GP6U42SV.js";import"./chunk-O5FN3DLG.js";import{a as rn,b as on,c as ln,d as sn,e as pn,f as cn,g as dn}from"./chunk-KGSUB5OH.js";import"./chunk-XNGU3O4O.js";import{a as ji,b as Ui}from"./chunk-RKRJ4JOF.js";import{a as Be,b as mn,c as Ct,d as un,e as hn,f as _n,g as Rt,h as vt,i as De,k as b,l as gn,m as rt,n as Qt,o as Jt,p as Ht,q as fn,r as Cn,s as Xt,t as Wt,u as vn}from"./chunk-NEQN5BMS.js";import"./chunk-3TNPJNQS.js";import{a as yn,b as bn}from"./chunk-VHYFEAS2.js";import{a as xe,b as zi}from"./chunk-OXSGKWPW.js";import{f as Qi,g as Ji,h as Xi,i as en,j as tn}from"./chunk-DSDMENCN.js";import{a as Zi}from"./chunk-EEOWKNSQ.js";import"./chunk-IJAO5VS5.js";import{a as me}from"./chunk-AUMUHIAD.js";import{b as an}from"./chunk-ZG6JXFSY.js";import{b as qi}from"./chunk-ZQLDSEY5.js";import{a as Gi,b as Ki,c as $i}from"./chunk-2L5RCILV.js";import{a as Ae}from"./chunk-
|
|
1
|
+
import{a as ue}from"./chunk-VUL363BT.js";import"./chunk-6U6JR5K6.js";import{a as Mi}from"./chunk-BVIRHZTZ.js";import{a as be,b as we,c as Yi}from"./chunk-CHPESC5O.js";import{a as Se}from"./chunk-4URWFKAM.js";import{b as nn}from"./chunk-RXDUUYMX.js";import"./chunk-GP6U42SV.js";import"./chunk-O5FN3DLG.js";import{a as rn,b as on,c as ln,d as sn,e as pn,f as cn,g as dn}from"./chunk-KGSUB5OH.js";import"./chunk-XNGU3O4O.js";import{a as ji,b as Ui}from"./chunk-RKRJ4JOF.js";import{a as Be,b as mn,c as Ct,d as un,e as hn,f as _n,g as Rt,h as vt,i as De,k as b,l as gn,m as rt,n as Qt,o as Jt,p as Ht,q as fn,r as Cn,s as Xt,t as Wt,u as vn}from"./chunk-NEQN5BMS.js";import"./chunk-3TNPJNQS.js";import{a as yn,b as bn}from"./chunk-VHYFEAS2.js";import{a as xe,b as zi}from"./chunk-OXSGKWPW.js";import{f as Qi,g as Ji,h as Xi,i as en,j as tn}from"./chunk-DSDMENCN.js";import{a as Zi}from"./chunk-EEOWKNSQ.js";import"./chunk-IJAO5VS5.js";import{a as me}from"./chunk-AUMUHIAD.js";import{b as an}from"./chunk-ZG6JXFSY.js";import{b as qi}from"./chunk-ZQLDSEY5.js";import{a as Gi,b as Ki,c as $i}from"./chunk-2L5RCILV.js";import{a as Ae}from"./chunk-TRGFX3AD.js";import"./chunk-M4JG6342.js";import"./chunk-6NTRXLMW.js";import{a as ve,b as ye,c as Vi,d as de,e as Oi}from"./chunk-Y27IE54D.js";import{f as Pe,g as ce}from"./chunk-QITW54IW.js";import{b as nt,e as q}from"./chunk-AAFEUTPF.js";import"./chunk-KCDL7SWP.js";import{b as Ai,d as at,e as Bi,f as Ri,g as Hi,l as re,m as Wi}from"./chunk-UUNZHJ6W.js";import{t as Fi,u as Li}from"./chunk-CTKEWRX4.js";import{P as Ni}from"./chunk-GXHE2CDH.js";import{a as Ii,b as At,c as pe,h as ee,l as te,n as Ce,y as Bt}from"./chunk-QOA24ZLA.js";import{b as F,c as A}from"./chunk-2AMEIUWK.js";import{$ as He,$a as m,$b as z,Ab as wi,Ac as G,B as mi,Bb as Mt,Cb as Et,Cc as se,Db as Ke,Dc as Ee,Eb as $e,Ha as j,Hb as Y,Ia as s,Ib as c,Ja as x,Jb as y,Kb as k,Lb as xi,Mb as I,Nb as M,Oa as fi,Ob as E,Pa as Ci,Pb as Pt,Q as Ge,Qb as ge,Rb as le,Sb as ne,T as ui,Tb as J,Ua as vi,Uc as Ft,Vc as ki,Wa as tt,Wb as Si,X as Xe,Xb as Ti,Xc as fe,Ya as ht,Za as f,Zc as Lt,_ as hi,_a as B,_b as N,aa as We,ab as yi,ac as X,ad as Ei,bb as kt,bc as ae,bd as gt,ca as Ie,db as _e,ed as qe,fd as Pi,ga as L,gb as Zt,ha as Ye,hd as ft,ia as _i,jc as Di,kc as O,lb as r,lc as Me,mb as o,na as gi,nb as C,oa as h,ob as S,pa as _,pb as T,q as ie,qa as Fe,qb as Le,ra as qt,rb as D,rc as Vt,sa as et,tc as ze,ub as v,vc as $,w as di,wb as p,wc as U,xb as It,xc as Ot,ya as ut,yb as _t,yc as Nt,za as Q,zb as bi,zc as it}from"./chunk-HSFUKC7R.js";import{a as pi,b as ci}from"./chunk-GNOSNGXM.js";var wn=(()=>{let l=class l{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[Mi.downloadOrder]}]}ngOnInit(){}};l.\u0275fac=function(i){return new(i||l)},l.\u0275cmp=L({type:l,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(i,n){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),o()()(),C(4,"router-outlet")),i&2&&(s(3),m("Tabs",n.ObjectOrderTabs)("usePermissions",!0))},dependencies:[ji,ki]});let a=l;return a})();var xn=(()=>{let l=class l{constructor(){}convertToCSV(t,i){let n;if(typeof t=="string")n=t;else{var d=typeof t=="object"?t:JSON.parse(t);n=this.transformToCSVStringFormat(d)}this.downloadCSV(n,i)}transformToCSVStringFormat(t){if(!t||!t.length)return;let i=",",n=Object.keys(t[0]);return t.map(g=>n.map(u=>{let w=g[u]===null||g[u]===void 0?"":g[u];return w=w instanceof Date?w.toLocaleString():w.toString().replace(/"/g,'""'),w.search(/("|,|\n)/g)>=0&&(w=`"${w}"`),w}).join(i)).join(`
|
|
2
2
|
`)}downloadCSV(t,i){var n=new Blob([t],{type:"text/csv;charset=utf8;"}),d=document.createElement("a");d.setAttribute("href",window.URL.createObjectURL(n)),d.setAttribute("download",i),document.body.appendChild(d),d.click(),document.body.removeChild(d)}};l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=He({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var ot=(()=>{let l=class l{constructor(t,i){this.http=t,this.exportService=i}loadInitialPage(){return this.http.post("/api/ordersLoader/GetOrder",{})}getNewOrders(t){return this.http.post("/api/orders/GetNewOrder",t).pipe(ie(i=>i.Data))}getTotalNewOrders(t,i,n){let d={ListChannelID:t,From:i,To:n};return this.http.post("/api/orders/GetCountNewOrder",d).pipe(ie(g=>g.Count))}exportOrders(t,i){return this.http.post("api/Orders/ExportOrder",t).pipe(Xe(n=>{this.exportService.convertToCSV(n,i)}))}};l.\u0275fac=function(i){return new(i||l)(Ie(q),Ie(xn))},l.\u0275prov=He({token:l,factory:l.\u0275fac});let a=l;return a})();var Yt=(()=>{let l=class l{constructor(t,i){this.http=t,this.toastr=i}acceptTokopediaOrders(t){return this.http.post("/api/Orders/AcceptOrderTokopedia",t).pipe(Xe(i=>{this.tokopediaAcceptOrderHandler(i)}))}tokopediaAcceptOrderHandler(t){let i=t.filter(d=>d.Status==!1),n=t.filter(d=>d.Status==!0);if(i.length==0&&n.length>0){let d=`<ol>${this.generateSuccessMessage(n)}</ol>`;this.toastr.success(d,"Success",{enableHtml:!0})}else if(i.length>0&&n.length>0){let d=`<ol>
|
|
3
3
|
${this.generateSuccessMessage(n)}
|
|
4
4
|
${this.generateErrorMessage(i)}
|
|
@@ -15,8 +15,8 @@ import{a as ue}from"./chunk-VUL363BT.js";import"./chunk-6U6JR5K6.js";import{a as
|
|
|
15
15
|
${g}
|
|
16
16
|
}
|
|
17
17
|
`}}this.responsiveStyleElement.innerHTML=e}}destroyResponsiveStyleElement(){this.responsiveStyleElement&&(this.responsiveStyleElement.remove(),this.responsiveStyleElement=null)}bindDocumentClickListener(){this.documentClickListener||this.zone.runOutsideAngular(()=>{let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(e,"mousedown",t=>{this.isOutsideClicked(t)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(t),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.renderer.listen(this.window,"resize",this.onWindowResize.bind(this)))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new gn(this.containerViewChild?.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return b.hasClass(e.target,"p-datepicker-prev")||b.hasClass(e.target,"p-datepicker-prev-icon")||b.hasClass(e.target,"p-datepicker-next")||b.hasClass(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!b.isTouchDevice()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&&Ct.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}static \u0275fac=function(t){return new(t||a)(x(Vt),x(ut),x(fi),x(Di),x(Ci),x(hn),x(un))};static \u0275cmp=L({type:a,selectors:[["p-calendar"]],contentQueries:function(t,i,n){if(t&1&&Mt(n,Rt,4),t&2){let d;Ke(d=$e())&&(i.templates=d)}},viewQuery:function(t,i){if(t&1&&(Et(vr,5),Et(yr,5),Et(br,5)),t&2){let n;Ke(n=$e())&&(i.containerViewChild=n.first),Ke(n=$e())&&(i.inputfieldViewChild=n.first),Ke(n=$e())&&(i.content=n.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(t,i){t&2&&kt("p-inputwrapper-filled",i.filled)("p-inputwrapper-focus",i.focus)("p-calendar-clearable",i.showClear&&!i.disabled)},inputs:{iconDisplay:"iconDisplay",style:"style",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",name:"name",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",iconAriaLabel:"iconAriaLabel",disabled:[2,"disabled","disabled",O],dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:[2,"inline","inline",O],showOtherMonths:[2,"showOtherMonths","showOtherMonths",O],selectOtherMonths:[2,"selectOtherMonths","selectOtherMonths",O],showIcon:[2,"showIcon","showIcon",O],icon:"icon",appendTo:"appendTo",readonlyInput:[2,"readonlyInput","readonlyInput",O],shortYearCutoff:"shortYearCutoff",monthNavigator:[2,"monthNavigator","monthNavigator",O],yearNavigator:[2,"yearNavigator","yearNavigator",O],hourFormat:"hourFormat",timeOnly:[2,"timeOnly","timeOnly",O],stepYearPicker:[2,"stepYearPicker","stepYearPicker",Me],stepHour:[2,"stepHour","stepHour",Me],stepMinute:[2,"stepMinute","stepMinute",Me],stepSecond:[2,"stepSecond","stepSecond",Me],showSeconds:[2,"showSeconds","showSeconds",O],required:[2,"required","required",O],showOnFocus:[2,"showOnFocus","showOnFocus",O],showWeek:[2,"showWeek","showWeek",O],startWeekFromFirstDayOfYear:"startWeekFromFirstDayOfYear",showClear:[2,"showClear","showClear",O],dataType:"dataType",selectionMode:"selectionMode",maxDateCount:[2,"maxDateCount","maxDateCount",Me],showButtonBar:[2,"showButtonBar","showButtonBar",O],todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autofocus:[2,"autofocus","autofocus",O],autoZIndex:[2,"autoZIndex","autoZIndex",O],baseZIndex:[2,"baseZIndex","baseZIndex",Me],panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:[2,"keepInvalid","keepInvalid",O],hideOnDateTimeSelect:[2,"hideOnDateTimeSelect","hideOnDateTimeSelect",O],touchUI:[2,"touchUI","touchUI",O],timeSeparator:"timeSeparator",focusTrap:[2,"focusTrap","focusTrap",O],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:[2,"tabindex","tabindex",Me],variant:"variant",minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",yearRange:"yearRange",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",locale:"locale",view:"view",defaultDate:"defaultDate"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onClear:"onClear",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[Pt([pl]),ht],ngContentSelectors:xr,decls:4,vars:12,consts:[["container",""],["inputfield",""],["contentWrapper",""],[3,"ngClass","ngStyle"],[3,"ngIf"],[3,"class","ngStyle","ngClass","click",4,"ngIf"],["type","text","role","combobox","aria-autocomplete","none","aria-haspopup","dialog","autocomplete","off","pAutoFocus","",3,"focus","keydown","click","blur","input","value","readonly","ngStyle","placeholder","disabled","ngClass","autofocus"],[4,"ngIf"],["type","button","aria-haspopup","dialog","pButton","","pRipple","","class","p-datepicker-trigger p-button-icon-only","tabindex","0",3,"disabled","click",4,"ngIf"],[3,"styleClass","click",4,"ngIf"],["class","p-calendar-clear-icon",3,"click",4,"ngIf"],[3,"click","styleClass"],[1,"p-calendar-clear-icon",3,"click"],[4,"ngTemplateOutlet"],["type","button","aria-haspopup","dialog","pButton","","pRipple","","tabindex","0",1,"p-datepicker-trigger","p-button-icon-only",3,"click","disabled"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"ngClass","click",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"click","ngClass"],[3,"click","ngStyle","ngClass"],["class","p-timepicker",4,"ngIf"],["class","p-datepicker-buttonbar",4,"ngIf"],[1,"p-datepicker-group-container"],["class","p-datepicker-group",4,"ngFor","ngForOf"],["class","p-monthpicker",4,"ngIf"],["class","p-yearpicker",4,"ngIf"],[1,"p-datepicker-group"],[1,"p-datepicker-header"],["class","p-datepicker-prev p-link","type","button","pRipple","",3,"keydown","click",4,"ngIf"],[1,"p-datepicker-title"],["type","button","class","p-datepicker-month p-link",3,"disabled","click","keydown",4,"ngIf"],["type","button","class","p-datepicker-year p-link",3,"disabled","click","keydown",4,"ngIf"],["class","p-datepicker-decade",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-next","p-link",3,"keydown","click"],[3,"styleClass",4,"ngIf"],["class","p-datepicker-next-icon",4,"ngIf"],["class","p-datepicker-calendar-container",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-prev","p-link",3,"keydown","click"],["class","p-datepicker-prev-icon",4,"ngIf"],[3,"styleClass"],[1,"p-datepicker-prev-icon"],["type","button",1,"p-datepicker-month","p-link",3,"click","keydown","disabled"],["type","button",1,"p-datepicker-year","p-link",3,"click","keydown","disabled"],[1,"p-datepicker-decade"],[1,"p-datepicker-next-icon"],[1,"p-datepicker-calendar-container"],["role","grid",1,"p-datepicker-calendar"],["class","p-datepicker-weekheader p-disabled",4,"ngIf"],["scope","col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"p-datepicker-weekheader","p-disabled"],["scope","col"],["class","p-datepicker-weeknumber",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"p-datepicker-weeknumber"],[1,"p-disabled"],["draggable","false","pRipple","",3,"click","keydown","ngClass"],["class","p-hidden-accessible","aria-live","polite",4,"ngIf"],["aria-live","polite",1,"p-hidden-accessible"],[1,"p-monthpicker"],["class","p-monthpicker-month","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-monthpicker-month",3,"click","keydown","ngClass"],[1,"p-yearpicker"],["class","p-yearpicker-year","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-yearpicker-year",3,"click","keydown","ngClass"],[1,"p-timepicker"],[1,"p-hour-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave"],[1,"p-separator"],[1,"p-minute-picker"],["class","p-separator",4,"ngIf"],["class","p-second-picker",4,"ngIf"],["class","p-ampm-picker",4,"ngIf"],[1,"p-second-picker"],[1,"p-ampm-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","click","keydown.enter"],[1,"p-datepicker-buttonbar"],["type","button","pButton","","pRipple","",3,"keydown","click","label","ngClass"]],template:function(t,i){t&1&&(It(wr),r(0,"span",3,0),f(2,Ur,5,22,"ng-template",4)(3,sl,9,32,"div",5),o()),t&2&&(_e(i.styleClass),m("ngClass",Si(6,Sr,i.showIcon&&i.iconDisplay==="input",i.showIcon&&i.iconDisplay==="button",i.timeOnly,i.disabled,i.focus||i.overlayVisible))("ngStyle",i.style),s(2),m("ngIf",!i.inline),s(),m("ngIf",i.inline||i.overlayVisible))},dependencies:()=>[ze,$,U,Nt,Ot,Gt,Ht,ii,Xt,ni,Qt,Jt,ai,Wt],styles:[`@layer primeng{.p-calendar{position:relative;display:inline-flex;max-width:100%}.p-calendar .p-inputtext{flex:1 1 auto;width:1%;text-overflow:ellipsis}.p-calendar-w-btn .p-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}.p-calendar-w-btn .p-datepicker-trigger{border-top-left-radius:0;border-bottom-left-radius:0}.p-fluid .p-calendar{display:flex}.p-fluid .p-calendar .p-inputtext{width:1%}.p-calendar .p-datepicker{min-width:100%}.p-datepicker{width:auto;position:absolute;top:0;left:0}.p-datepicker-inline{display:inline-block;position:static;overflow-x:auto}.p-datepicker-header{display:flex;align-items:center;justify-content:space-between}.p-datepicker-header .p-datepicker-title{margin:0 auto}.p-datepicker-prev,.p-datepicker-next{cursor:pointer;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group{flex:1 1 auto}.p-datepicker-multiple-month .p-datepicker-group-container{display:flex}.p-datepicker table{width:100%;border-collapse:collapse}.p-datepicker td>span{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:0 auto;overflow:hidden;position:relative}.p-monthpicker-month{width:33.3%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-datepicker-buttonbar{display:flex;justify-content:space-between;align-items:center}.p-timepicker{display:flex;justify-content:center;align-items:center}.p-timepicker button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-timepicker>div{display:flex;align-items:center;flex-direction:column}.p-datepicker-touch-ui,.p-calendar .p-datepicker-touch-ui{position:fixed;top:50%;left:50%;min-width:80vw;transform:translate(-50%,-50%)}.p-yearpicker-year{width:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-calendar-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-datepicker-icon{pointer-events:none}.p-calendar-clearable{position:relative}}
|
|
18
|
-
`],encapsulation:2,data:{animation:[Ei("overlayAnimation",[Pi("visibleTouchUI",qe({transform:"translate(-50%,-50%)",opacity:1})),ft("void => visible",[qe({opacity:0,transform:"scaleY(0.8)"}),gt("{{showTransitionParams}}",qe({opacity:1,transform:"*"}))]),ft("visible => void",[gt("{{hideTransitionParams}}",qe({opacity:0}))]),ft("void => visibleTouchUI",[qe({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),gt("{{showTransitionParams}}")]),ft("visibleTouchUI => void",[gt("{{hideTransitionParams}}",qe({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0})}return a})(),Bn=(()=>{class a{static \u0275fac=function(t){return new(t||a)};static \u0275mod=Ye({type:a});static \u0275inj=We({imports:[Ee,ti,vt,fn,ii,Xt,ni,Qt,Jt,ai,vn,ti,vt]})}return a})();var dl=a=>({"full-width":a}),ml=()=>({standalone:!0}),Kt=(()=>{let l=class l{constructor(t){this.datePipe=t,this.fullWidth=!1,this.timeChange=new Q}ngOnInit(){}onTimeChange(t){let i=null;t&&(i=this.datePipe.transform(t,"HH:mm")),this.timeChange.emit(i),this.onTimePickerChange()}onShowCalendar(){let t=document.getElementById("dropdown-filter");if(t){var i=new bootstrap.Dropdown(t);i&&(i._config.autoClose="inside")}}onTimePickerChange(){let t=document.getElementById("dropdown-filter");if(t){var i=new bootstrap.Dropdown(t);i&&(i._config.autoClose="outside")}}};l.\u0275fac=function(i){return new(i||l)(x(G))},l.\u0275cmp=L({type:l,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:"fullWidth"},outputs:{timeChange:"timeChange"},standalone:!0,features:[ge],decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["pButton","","type","button","label","Close",3,"click"]],template:function(i,n){if(i&1){let d=D();r(0,"p-calendar",1,0),E("ngModelChange",function(u){return h(d),M(n.time,u)||(n.time=u),_(u)}),v("ngModelChange",function(u){return h(d),_(n.onTimeChange(u))})("onSelect",function(){return h(d),_(n.onShowCalendar())}),r(2,"p-footer")(3,"button",2),v("click",function(){return h(d),Y(1).hideOverlay(),_(n.onShowCalendar())}),o()()()}i&2&&(m("ngClass",ne(5,dl,n.fullWidth))("baseZIndex",1100),I("ngModel",n.time),m("timeOnly",!0)("ngModelOptions",le(7,ml)))},dependencies:[Ee,ze,Bn,li,Gt,_n,Bt,ee,te],styles:["p-calendar span.p-calendar.p-calendar-timeonly.custom-height{height:44px;width:55px} p-calendar.full-width span.p-calendar.p-calendar-timeonly.custom-height{height:44px;width:100%!important}"]});let a=l;return a})();var hl=(a,l)=>({"over-due-today":a,"over-due":l}),_l=a=>({"over-due":a});function gl(a,l){if(a&1){let e=D();S(0),r(1,"div",19)(2,"button",20),v("click",function(){h(e),p();let i=Y(11);return _(i.previous())}),c(3," Back "),o(),r(4,"button",21),v("click",function(){h(e);let i=p(),n=Y(11);return _(i.onNext(n))}),c(5," Next "),o(),r(6,"button",22),C(7,"b",23),o(),r(8,"ul",24)(9,"li",25)(10,"a",26),v("click",function(){h(e);let i=p();return _(i.exportOrders())}),c(11," Export "),o()()()(),T()}if(a&2){let e=p();s(4),m("disabled",e.checkDisabledNextFilter())}}function fl(a,l){if(a&1){let e=D();S(0),r(1,"button",27),v("click",function(){h(e);let i=p(),n=Y(11);return _(i.onNext(n))}),c(2," Next "),o(),T()}if(a&2){let e=p();s(),m("disabled",e.checkDisabledNextFilter())}}function Cl(a,l){if(a&1){let e=D();S(0),r(1,"button",28),v("click",function(){h(e);let i=p(),n=Y(11);return _(i.onNew(n))}),C(2,"i",29),c(3," New "),o(),T()}}function vl(a,l){a&1&&(C(0,"i",30),r(1,"span"),c(2,"Filter"),o())}function yl(a,l){if(a&1&&(r(0,"ng-option",40),C(1,"img",41),c(2),o()),a&2){let e=l.$implicit;m("value",e.ID),s(),m("src",e==null?null:e.Img,j),s(),k("",e.Name," ")}}function bl(a,l){if(a&1){let e=D();r(0,"div",36)(1,"div",32)(2,"h5"),c(3,"Type"),o(),r(4,"p",33),c(5,"Select Type want to download"),o()(),r(6,"div",32)(7,"div",42)(8,"div")(9,"mat-radio-group",43),E("ngModelChange",function(i){h(e);let n=p(2);return M(n.downloadType,i)||(n.downloadType=i),_(i)}),r(10,"mat-radio-button",44),c(11," Orders "),o(),r(12,"mat-radio-button",45),c(13," Disbursement
|
|
19
|
-
Payment : `,e.PaymentState,"")}}function Ol(a,l){if(a&1&&(r(0,"tr")(1,"td"),c(2),o(),r(3,"td"),c(4),o(),f(5,Il,3,4,"td",5),r(6,"td")(7,"span"),c(8),o(),c(9),o(),r(10,"td",
|
|
18
|
+
`],encapsulation:2,data:{animation:[Ei("overlayAnimation",[Pi("visibleTouchUI",qe({transform:"translate(-50%,-50%)",opacity:1})),ft("void => visible",[qe({opacity:0,transform:"scaleY(0.8)"}),gt("{{showTransitionParams}}",qe({opacity:1,transform:"*"}))]),ft("visible => void",[gt("{{hideTransitionParams}}",qe({opacity:0}))]),ft("void => visibleTouchUI",[qe({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),gt("{{showTransitionParams}}")]),ft("visibleTouchUI => void",[gt("{{hideTransitionParams}}",qe({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0})}return a})(),Bn=(()=>{class a{static \u0275fac=function(t){return new(t||a)};static \u0275mod=Ye({type:a});static \u0275inj=We({imports:[Ee,ti,vt,fn,ii,Xt,ni,Qt,Jt,ai,vn,ti,vt]})}return a})();var dl=a=>({"full-width":a}),ml=()=>({standalone:!0}),Kt=(()=>{let l=class l{constructor(t){this.datePipe=t,this.fullWidth=!1,this.timeChange=new Q}ngOnInit(){}onTimeChange(t){let i=null;t&&(i=this.datePipe.transform(t,"HH:mm")),this.timeChange.emit(i),this.onTimePickerChange()}onShowCalendar(){let t=document.getElementById("dropdown-filter");if(t){var i=new bootstrap.Dropdown(t);i&&(i._config.autoClose="inside")}}onTimePickerChange(){let t=document.getElementById("dropdown-filter");if(t){var i=new bootstrap.Dropdown(t);i&&(i._config.autoClose="outside")}}};l.\u0275fac=function(i){return new(i||l)(x(G))},l.\u0275cmp=L({type:l,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:"fullWidth"},outputs:{timeChange:"timeChange"},standalone:!0,features:[ge],decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["pButton","","type","button","label","Close",3,"click"]],template:function(i,n){if(i&1){let d=D();r(0,"p-calendar",1,0),E("ngModelChange",function(u){return h(d),M(n.time,u)||(n.time=u),_(u)}),v("ngModelChange",function(u){return h(d),_(n.onTimeChange(u))})("onSelect",function(){return h(d),_(n.onShowCalendar())}),r(2,"p-footer")(3,"button",2),v("click",function(){return h(d),Y(1).hideOverlay(),_(n.onShowCalendar())}),o()()()}i&2&&(m("ngClass",ne(5,dl,n.fullWidth))("baseZIndex",1100),I("ngModel",n.time),m("timeOnly",!0)("ngModelOptions",le(7,ml)))},dependencies:[Ee,ze,Bn,li,Gt,_n,Bt,ee,te],styles:["p-calendar span.p-calendar.p-calendar-timeonly.custom-height{height:44px;width:55px} p-calendar.full-width span.p-calendar.p-calendar-timeonly.custom-height{height:44px;width:100%!important}"]});let a=l;return a})();var hl=(a,l)=>({"over-due-today":a,"over-due":l}),_l=a=>({"over-due":a});function gl(a,l){if(a&1){let e=D();S(0),r(1,"div",19)(2,"button",20),v("click",function(){h(e),p();let i=Y(11);return _(i.previous())}),c(3," Back "),o(),r(4,"button",21),v("click",function(){h(e);let i=p(),n=Y(11);return _(i.onNext(n))}),c(5," Next "),o(),r(6,"button",22),C(7,"b",23),o(),r(8,"ul",24)(9,"li",25)(10,"a",26),v("click",function(){h(e);let i=p();return _(i.exportOrders())}),c(11," Export "),o()()()(),T()}if(a&2){let e=p();s(4),m("disabled",e.checkDisabledNextFilter())}}function fl(a,l){if(a&1){let e=D();S(0),r(1,"button",27),v("click",function(){h(e);let i=p(),n=Y(11);return _(i.onNext(n))}),c(2," Next "),o(),T()}if(a&2){let e=p();s(),m("disabled",e.checkDisabledNextFilter())}}function Cl(a,l){if(a&1){let e=D();S(0),r(1,"button",28),v("click",function(){h(e);let i=p(),n=Y(11);return _(i.onNew(n))}),C(2,"i",29),c(3," New "),o(),T()}}function vl(a,l){a&1&&(C(0,"i",30),r(1,"span"),c(2,"Filter"),o())}function yl(a,l){if(a&1&&(r(0,"ng-option",40),C(1,"img",41),c(2),o()),a&2){let e=l.$implicit;m("value",e.ID),s(),m("src",e==null?null:e.Img,j),s(),k("",e.Name," ")}}function bl(a,l){if(a&1){let e=D();r(0,"div",36)(1,"div",32)(2,"h5"),c(3,"Type"),o(),r(4,"p",33),c(5,"Select Type want to download"),o()(),r(6,"div",32)(7,"div",42)(8,"div")(9,"mat-radio-group",43),E("ngModelChange",function(i){h(e);let n=p(2);return M(n.downloadType,i)||(n.downloadType=i),_(i)}),r(10,"mat-radio-button",44),c(11," Orders "),o(),r(12,"mat-radio-button",45),c(13," Disbursement "),o()()()(),r(14,"div",46)(15,"div",47),C(16,"i",48),o(),r(17,"p",49),c(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),o()()()()}if(a&2){let e=p(2);s(9),I("ngModel",e.downloadType),s(),m("value",!1),s(2),m("value",!0)}}function wl(a,l){a&1&&(r(0,"p",33),c(1," Select Disbursement date of the channel you want to download (Max 1 Weeks) "),o())}function xl(a,l){a&1&&(r(0,"p",33),c(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),o())}function Sl(a,l){if(a&1){let e=D();S(0),r(1,"div",50)(2,"app-timepicker",51),E("timeChange",function(i){h(e);let n=p(2);return M(n.timeFrom,i)||(n.timeFrom=i),_(i)}),o(),r(3,"span",52),c(4,"-"),o(),r(5,"app-timepicker",51),E("timeChange",function(i){h(e);let n=p(2);return M(n.timeTo,i)||(n.timeTo=i),_(i)}),o()(),T()}if(a&2){let e=p(2);s(2),I("time",e.timeFrom),s(3),I("time",e.timeTo)}}function Tl(a,l){if(a&1){let e=D();r(0,"div",31)(1,"div",8)(2,"div",7)(3,"div",32)(4,"h5"),c(5,"Select a Channel"),o(),r(6,"p",33),c(7," Select Channel want to download order "),o()(),r(8,"div",32)(9,"ng-select",34),E("ngModelChange",function(i){h(e);let n=p();return M(n.channelID,i)||(n.channelID=i),_(i)}),v("ngModelChange",function(){h(e);let i=p();return _(i.onSelectChannel())}),f(10,yl,3,3,"ng-option",35),o()()(),f(11,bl,19,3,"div",36),N(12,"async"),r(13,"div",36)(14,"div",32)(15,"h5"),c(16,"Date Range"),o(),f(17,wl,2,0,"p",33)(18,xl,2,0,"p",33),o(),r(19,"div",32)(20,"div",8)(21,"mat-date-range-input",37)(22,"input",38),E("ngModelChange",function(i){h(e);let n=p();return M(n.startDate,i)||(n.startDate=i),_(i)}),v("click",function(){h(e);let i=Y(25);return _(i.open())}),o(),r(23,"input",39),E("ngModelChange",function(i){h(e);let n=p();return M(n.endDate,i)||(n.endDate=i),_(i)}),v("click",function(){h(e);let i=Y(25);return _(i.open())})("ngModelChange",function(){h(e);let i=p();return _(i.onFilterDateChange())}),o()(),C(24,"mat-date-range-picker",null,1),o(),f(26,Sl,6,2,"ng-container",5),o()()()()}if(a&2){let e,t=Y(25),i=p();s(9),m("clearable",!1),I("ngModel",i.channelID),s(),m("ngForOf",i.channelOptions),s(),Zt((e=z(12,9,i.channelDetail$))!=null&&e.ServiceFeeWriteOff?11:-1),s(6),Zt(i.downloadType()&&(i.currentChannel==null?null:i.currentChannel.TypeID)==i.channelType.Tokopedia?17:18),s(4),m("rangePicker",t),s(),I("ngModel",i.startDate),s(),I("ngModel",i.endDate),s(3),m("ngIf",i.showTimePicker)}}function Dl(a,l){a&1&&(C(0,"i",53),r(1,"span"),c(2,"Preview"),o())}function kl(a,l){if(a&1&&(r(0,"th",71),c(1),o()),a&2){let e=p(3);s(),k(" ",e.currentChannel?"Created Date":"Last Status Update"," ")}}function Il(a,l){if(a&1&&(r(0,"td"),c(1),N(2,"date"),o()),a&2){let e=p().$implicit;s(),k(" ",X(2,1,e.Date,"dd MMM yyyy HH:mm:ss")," ")}}function Ml(a,l){if(a&1&&(r(0,"span"),c(1),o()),a&2){let e=p().$implicit;s(),k(" ",e.ActionString," ")}}function El(a,l){if(a&1&&(r(0,"li"),c(1),o()),a&2){let e=l.$implicit;s(),k(" ",e," ")}}function Pl(a,l){if(a&1&&(r(0,"ul",76),f(1,El,2,1,"li",72),o()),a&2){let e=p().$implicit;s(),m("ngForOf",e.ActionString)}}function Vl(a,l){if(a&1&&(r(0,"span",77),C(1,"i",78),o()),a&2){let e=p().$implicit;wi("title","Delivery : ",e.DeliveryState,`
|
|
19
|
+
Payment : `,e.PaymentState,"")}}function Ol(a,l){if(a&1&&(r(0,"tr")(1,"td"),c(2),o(),r(3,"td"),c(4),o(),f(5,Il,3,4,"td",5),r(6,"td")(7,"span"),c(8),o(),c(9),o(),r(10,"td",73)(11,"span"),c(12),o(),c(13),o(),r(14,"td"),f(15,Ml,2,1,"span",5)(16,Pl,2,1,"ul",74),o(),r(17,"td"),f(18,Vl,2,3,"span",75),o()()),a&2){let e=l.$implicit,t=l.index,i=p(4);s(2),y(t+1),s(2),y(e.Number),s(),m("ngIf",(i.currentChannel==null?null:i.currentChannel.TypeID)!=i.channelType.Shopee&&(i.currentChannel==null?null:i.currentChannel.TypeID)!==i.channelType.Tiktok),s(3),k("",e.ChannelStatus," - "),s(),k("",e.ChannelStatusDescription," "),s(),m("ngClass",J(12,hl,(e==null?null:e.Action)==i.actionPreviewOrder.Update,(e==null?null:e.Action)==i.actionPreviewOrder.New))("matTooltip",e.POSStatus==91||e.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),s(2),k("",e.POSStatus," - "),s(),k("",e.POSStatusDescription," "),s(2),m("ngIf",e.ActionString.length==1),s(),m("ngIf",e.ActionString.length>1),s(2),m("ngIf",e.ChannelStatus!=99&&e.POSStatus!=99)}}function Nl(a,l){if(a&1&&(S(0),f(1,Ol,19,15,"tr",72),T()),a&2){let e=p(3);s(),m("ngForOf",e.displayedPreviewData)}}function Fl(a,l){a&1&&(r(0,"tr",79)(1,"td",80)(2,"div",81),C(3,"i",82),o(),r(4,"h4",83),c(5," There is no order to processed "),o()()())}function Ll(a,l){if(a&1){let e=D();r(0,"div",55)(1,"div",56)(2,"div",57)(3,"ul",58)(4,"li",59)(5,"button",60),v("click",function(){h(e);let i=p(2);return _(i.filterPreviewData(i.previewStatus.ALL))}),c(6),o()(),r(7,"li",59)(8,"button",61),v("click",function(){h(e);let i=p(2);return _(i.filterPreviewData(i.previewStatus.SYNC))}),c(9),o()(),r(10,"li",59)(11,"button",62),v("click",function(){h(e);let i=p(2);return _(i.filterPreviewData(i.previewStatus.WRONG))}),c(12),o()(),r(13,"li",59)(14,"button",63),v("click",function(){h(e);let i=p(2);return _(i.filterPreviewData(i.previewStatus.UNSYNC))}),c(15),o()()()(),r(16,"table",64)(17,"thead",65)(18,"tr"),C(19,"th",66),r(20,"th",67),c(21,"Number"),o(),f(22,kl,2,1,"th",68),r(23,"th",69),c(24,"Channel Status"),o(),r(25,"th",69),c(26,"POS Status"),o(),r(27,"th"),c(28,"Action"),o(),C(29,"th",66),o()(),r(30,"tbody"),f(31,Nl,2,1,"ng-container",70)(32,Fl,6,0,"ng-template",null,2,ae),o()()()()}if(a&2){let e=Y(33),t=p(2);s(5),m("ngClass",t.pillStatus=="all"?"btn-secondary text-white":"btn-outline-dark"),s(),k(" All (",t.allData,") "),s(2),m("ngClass",t.pillStatus=="sync"?"btn-success":"btn-outline-success"),s(),k(" Existing (",t.syncData,") "),s(2),m("ngClass",t.pillStatus=="wrong"?"btn-warning text-white":"btn-outline-warning"),s(),k(" Wrong Status (",t.wrongData,") "),s(2),m("ngClass",t.pillStatus=="unsync"?"btn-danger":"btn-outline-danger"),s(),k(" Missing (",t.unsyncData,") "),s(7),m("ngIf",(t.currentChannel==null?null:t.currentChannel.TypeID)!=t.channelType.Shopee&&(t.currentChannel==null?null:t.currentChannel.TypeID)!==t.channelType.Tiktok),s(9),m("ngIf",t.displayedPreviewData.length>0)("ngIfElse",e)}}function Al(a,l){if(a&1&&f(0,Ll,34,11,"div",54),a&2){let e=p();m("ngIf",e.currentState=="preview")}}function Bl(a,l){a&1&&(C(0,"i",84),r(1,"span"),c(2,"Finish"),o())}function Rl(a,l){if(a&1&&(r(0,"tr",86)(1,"td"),c(2),o(),r(3,"td"),c(4),o(),r(5,"td"),c(6),o(),r(7,"td"),c(8),o()()),a&2){let e=l.$implicit,t=l.index;m("ngClass",ne(5,_l,e.Exception)),s(2),y(t+1),s(2),y(e.Number),s(2),y(e.Status),s(2),y(e.Exception)}}function Hl(a,l){if(a&1&&(S(0),f(1,Rl,9,7,"tr",85),T()),a&2){let e=p(3);s(),m("ngForOf",e.downloadData)}}function Wl(a,l){a&1&&(r(0,"tr",79)(1,"td",80)(2,"div",81),C(3,"i",82),o(),r(4,"h4",83),c(5," There is no order to processed "),o()()())}function Yl(a,l){if(a&1&&(r(0,"div",55)(1,"div",56)(2,"table",64)(3,"thead",65)(4,"tr"),C(5,"th",66),r(6,"th"),c(7,"Order Number"),o(),r(8,"th"),c(9,"Status"),o(),r(10,"th"),c(11,"Exception"),o()()(),r(12,"tbody"),f(13,Hl,2,1,"ng-container",70)(14,Wl,6,0,"ng-template",null,3,ae),o()()()()),a&2){let e=Y(15),t=p(2);s(13),m("ngIf",(t.downloadData==null?null:t.downloadData.length)>0)("ngIfElse",e)}}function zl(a,l){if(a&1&&f(0,Yl,16,2,"div",54),a&2){let e=p();m("ngIf",e.currentState=="finish")}}function jl(a,l){a&1&&(r(0,"h6"),c(1,"1"),o())}function Ul(a,l){a&1&&(r(0,"h6"),c(1,"2"),o())}function Gl(a,l){a&1&&(r(0,"h6"),c(1,"3"),o())}var he=function(a){return a.ALL="all",a.SYNC="sync",a.WRONG="wrong",a.UNSYNC="unsync",a}(he||{}),Rn=(()=>{let l=class l{constructor(t,i,n,d,g,u,w){this.http=t,this.toastr=i,this.datePipe=n,this.url=d,this.productService=g,this.orderService=u,this.authService=w,this.pageTitle="Download to POS",this.pillStatus="all",this.displayedPreviewData=[],this.previewData=[],this.channelType=F,this.previewStatus=he,this.currentState="filter",this.wrongData=0,this.unsyncData=0,this.syncData=0,this.allData=0,this.actionPreviewOrder=ct,this.showTimePicker=!1,this.downloadType=vi(!1),this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initTimeFilter(),this.url.queryParams.subscribe(t=>{this.channelID=t.ChannelID,this.startDate=new Date(t.Date),this.endDate=new Date(t.Date)})}initTimeFilter(){this.timeFrom="00:00",this.timeTo="23:59"}onDownload(t){let i={ID:this.channelID,From:this.startDate,To:this.endDate,ListPreview:this.downloadedPreviewData,IsDisbursement:this.downloadType()};this.http.post("/api/Orders/Download",i).subscribe(n=>{this.downloadData=n.Body,this.onStepperNext(t)})}onPreview(t){if(!this.validateDatePreview())return;let i={ID:this.channelID,From:this.startDate,To:this.endDate,IsDisbursement:this.downloadType()};this.showTimePicker&&(i=ci(pi({},i),{TimeFrom:this.timeFrom+":00",TimeTo:this.timeTo+":00"})),this.http.post("/api/Orders/Preview",i).subscribe(n=>{if(n.length==0){this.toastrEmptyPreview();return}this.previewData=n,this.groupingPreviewData(),this.filterPreviewData(he.ALL),this.initLengthStatusData(),this.onStepperNext(t)})}toastrEmptyPreview(){let t=this.datePipe.transform(this.startDate,"dd MMM yyyy"),i=this.datePipe.transform(this.endDate,"dd MMM yyyy"),n=this.showTimePicker?this.timeFrom+":00":"",d=this.showTimePicker?this.timeTo+":00":"";this.toastr.info(`There is no orders from ${t} ${n} to ${i} ${d}!`,"No Orders!")}validateDatePreview(){let t=!0;return this.downloadType()==!0?A.getDaysDiff(this.startDate,this.endDate)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Failed"),t=!1):A.getDaysDiff(this.startDate,this.endDate)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Failed"),t=!1),t}onSelectChannel(){this.currentChannel=this.channelOptions.find(t=>t.ID==this.channelID),this.initGetChannelDetail()}initGetChannelDetail(){this.currentChannel.TypeID==F.Tokopedia?this.channelDetail$=this.http.post("/api/ChannelLoader/GetChannelView",{ID:this.currentChannel.ID}).pipe(ie(t=>t?.Model),Ge(1)):this.channelDetail$=null}setPageTitle(t){this.pageTitle=`
|
|
20
20
|
${t} (${this.getDateTitle()})
|
|
21
|
-
`}getDateTitle(){let t=A.formatTitleFromDate(new Date(this.startDate),new Date(this.endDate)),i=this.datePipe.transform(this.startDate,t),n=this.datePipe.transform(this.endDate,"dd MMM yyyy");return`${t==null?"":i+"-"} ${n}`}onNew(t){this.channelID=null,this.startDate=null,this.endDate=null,this.pageTitle="Download to POS",this.channelDetail$=null,t.reset()}groupingPreviewData(){let t=this.filterDataByStatus(he.UNSYNC),i=this.filterDataByStatus(he.WRONG),n=[];this.currentChannel.TypeID==F.Tokopedia&&(n=this.filterDataByStatus(he.SYNC)),this.downloadedPreviewData=[...n,...t,...i]}filterDataByStatus(t){let i=[];switch(t){case he.ALL:i=this.previewData;break;case he.SYNC:i=this.previewData.filter(n=>n.Action==ct.DoNothing);break;case he.WRONG:i=this.previewData.filter(n=>n.Action==ct.Update);break;case he.UNSYNC:i=this.previewData.filter(n=>n.Action==ct.New);break}return i}filterPreviewData(t){this.pillStatus=t,this.displayedPreviewData=this.filterDataByStatus(t)}initLengthStatusData(){this.wrongData=this.filterDataByStatus(he.WRONG).length,this.allData=this.previewData.length,this.syncData=this.filterDataByStatus(he.SYNC).length,this.unsyncData=this.filterDataByStatus(he.UNSYNC).length}getTypeID(){var t=this.channelOptions.find(i=>i.ID==this.channelID)?.TypeID;return t??0}onStepperChange(t){this.currentState=t.selectedStep.state}onStepperNext(t){t.selected.completed=!0,t.next()}onNext(t){switch(this.currentState){case"filter":this.onPreview(t);break;case"preview":this.onDownload(t);break}}stepChange(t){switch(t?.selectedStep?.state){case"filter":this.pageTitle="Download To POS",this.resetPreviewData();break;case"preview":let i=this.productService.findChannelById(this.channelID,this.channelOptions);this.setPageTitle(`Preview ${i?.Name}`);break;case"finish":this.setPageTitle("Download");break}}resetPreviewData(){this.displayedPreviewData=[],this.previewData=[],this.initLengthStatusData()}checkDisabledNextFilter(){let t=!A.isValidDate(this.startDate)||!A.isValidDate(this.endDate),i=A.IsEmpty(this.channelID);return t||i}exportOrders(){let t={ID:this.channelID,From:this.startDate,To:this.endDate},i=`Orders ${this.getDateTitle()}`;this.orderService.exportOrders(t,i).subscribe()}onFilterDateChange(){let t=1;this.startDate&&this.endDate&&(t=A.getDaysDiff(this.startDate,this.endDate)),this.showTimePicker=t==0}};l.\u0275fac=function(i){return new(i||l)(x(q),x(nt),x(G),x(Ft),x(Zi),x(ot),x(ce))},l.\u0275cmp=L({type:l,selectors:[["app-download"]],features:[Pt([{provide:rn,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:12,consts:[["stepper",""],["picker",""],["EMPTY",""],["EMPTY_DOWNLOAD",""],[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[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,"selectionChange","ngClass"],["state","filter",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","preview",3,"editable","completed"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","border-end-0",3,"click","disabled"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end",2,"min-width","85px !important"],[1,"dropdown-item"],[3,"click"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"fa-solid","fa-filter","me-3"],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download
|
|
21
|
+
`}getDateTitle(){let t=A.formatTitleFromDate(new Date(this.startDate),new Date(this.endDate)),i=this.datePipe.transform(this.startDate,t),n=this.datePipe.transform(this.endDate,"dd MMM yyyy");return`${t==null?"":i+"-"} ${n}`}onNew(t){this.channelID=null,this.startDate=null,this.endDate=null,this.pageTitle="Download to POS",this.channelDetail$=null,t.reset()}groupingPreviewData(){let t=this.filterDataByStatus(he.UNSYNC),i=this.filterDataByStatus(he.WRONG),n=[];this.currentChannel.TypeID==F.Tokopedia&&(n=this.filterDataByStatus(he.SYNC)),this.downloadedPreviewData=[...n,...t,...i]}filterDataByStatus(t){let i=[];switch(t){case he.ALL:i=this.previewData;break;case he.SYNC:i=this.previewData.filter(n=>n.Action==ct.DoNothing);break;case he.WRONG:i=this.previewData.filter(n=>n.Action==ct.Update);break;case he.UNSYNC:i=this.previewData.filter(n=>n.Action==ct.New);break}return i}filterPreviewData(t){this.pillStatus=t,this.displayedPreviewData=this.filterDataByStatus(t)}initLengthStatusData(){this.wrongData=this.filterDataByStatus(he.WRONG).length,this.allData=this.previewData.length,this.syncData=this.filterDataByStatus(he.SYNC).length,this.unsyncData=this.filterDataByStatus(he.UNSYNC).length}getTypeID(){var t=this.channelOptions.find(i=>i.ID==this.channelID)?.TypeID;return t??0}onStepperChange(t){this.currentState=t.selectedStep.state}onStepperNext(t){t.selected.completed=!0,t.next()}onNext(t){switch(this.currentState){case"filter":this.onPreview(t);break;case"preview":this.onDownload(t);break}}stepChange(t){switch(t?.selectedStep?.state){case"filter":this.pageTitle="Download To POS",this.resetPreviewData();break;case"preview":let i=this.productService.findChannelById(this.channelID,this.channelOptions);this.setPageTitle(`Preview ${i?.Name}`);break;case"finish":this.setPageTitle("Download");break}}resetPreviewData(){this.displayedPreviewData=[],this.previewData=[],this.initLengthStatusData()}checkDisabledNextFilter(){let t=!A.isValidDate(this.startDate)||!A.isValidDate(this.endDate),i=A.IsEmpty(this.channelID);return t||i}exportOrders(){let t={ID:this.channelID,From:this.startDate,To:this.endDate},i=`Orders ${this.getDateTitle()}`;this.orderService.exportOrders(t,i).subscribe()}onFilterDateChange(){let t=1;this.startDate&&this.endDate&&(t=A.getDaysDiff(this.startDate,this.endDate)),this.showTimePicker=t==0}};l.\u0275fac=function(i){return new(i||l)(x(q),x(nt),x(G),x(Ft),x(Zi),x(ot),x(ce))},l.\u0275cmp=L({type:l,selectors:[["app-download"]],features:[Pt([{provide:rn,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:12,consts:[["stepper",""],["picker",""],["EMPTY",""],["EMPTY_DOWNLOAD",""],[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[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,"selectionChange","ngClass"],["state","filter",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","preview",3,"editable","completed"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","border-end-0",3,"click","disabled"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end",2,"min-width","85px !important"],[1,"dropdown-item"],[3,"click"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"fa-solid","fa-filter","me-3"],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[3,"value"],[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,"mt-8"],[3,"timeChange","time"],[1,"mx-4"],[1,"fa-solid","fa-file","me-3"],["class","row pt-2",4,"ngIf"],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"nav","nav-pills"],[1,"nav-item","mx-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["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"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["width","15%"],[4,"ngFor","ngForOf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(i,n){if(i&1){let d=D();r(0,"mainpanel",4)(1,"actions"),f(2,gl,12,1,"ng-container",5)(3,fl,3,1,"ng-container",5)(4,Cl,4,0,"ng-container",5),o(),r(5,"content")(6,"div",6)(7,"div",7)(8,"div",8)(9,"div",9)(10,"mat-stepper",10,0),v("selectionChange",function(u){return h(d),_(n.stepChange(u))})("selectionChange",function(u){return h(d),_(n.onStepperChange(u))}),r(12,"mat-step",11),f(13,vl,3,0,"ng-template",12)(14,Tl,27,11,"ng-template",13),o(),r(15,"mat-step",14),f(16,Dl,3,0,"ng-template",12)(17,Al,1,1,"ng-template",13),o(),r(18,"mat-step",15),f(19,Bl,3,0,"ng-template",12)(20,zl,1,1,"ng-template",13),o(),f(21,jl,2,0,"ng-template",16)(22,Ul,2,0,"ng-template",17)(23,Gl,2,0,"ng-template",18),o()()()()()()()}if(i&2){let d=Y(11);m("headerTitle",n.pageTitle)("description",n.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),m("ngIf",n.currentState=="preview"),s(),m("ngIf",n.currentState=="filter"),s(),m("ngIf",n.currentState=="finish"),s(6),bi("ngClass","last-edited-step-"+d.selectedIndex),s(2),m("editable",n.currentState!="finish")("completed",!1),s(3),m("editable",n.currentState!="finish")("completed",!1)}},dependencies:[ze,$,U,pe,ee,te,re,de,Vi,Xi,Qi,Ji,en,pn,on,cn,ln,sn,Fi,Kt,Gi,Ki,it,G],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}
|
|
22
22
|
`],encapsulation:2});let a=l;return a})();var Kl=[{path:"",component:wn,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:Dn,canActivate:[Ae],data:{title:"New Order"}},{path:"detail",component:kn,canActivate:[Ae],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Mn,canActivate:[Ae],data:{title:"Ready To Ship"}},{path:"Shipped",component:En,canActivate:[Ae],data:{title:"Shipped"}},{path:"Delivered",component:Pn,canActivate:[Ae],data:{title:"Delivered"}},{path:"All",component:Vn,canActivate:[Ae],data:{title:"All Order"}},{path:"Cancelled",component:On,canActivate:[Ae],data:{title:"Cancelled"}},{path:"Download",component:Rn,canActivate:[Ae],data:{title:"Download"}}]}],Hn=(()=>{let l=class l{};l.\u0275fac=function(i){return new(i||l)},l.\u0275mod=Ye({type:l}),l.\u0275inj=We({imports:[Ee,Lt.forChild(Kl)]});let a=l;return a})();var nd=(()=>{let l=class l{};l.\u0275fac=function(i){return new(i||l)},l.\u0275mod=Ye({type:l}),l.\u0275inj=We({providers:[ot,Yt,jt],imports:[Ee,Bt,Hn,Ui,Wi,an,Lt,Oi,tn,Ni,me,dn,Li,zi,bn,Hi,qi,Yi,ue,Ut,Kt,$i]});let a=l;return a})();export{nd as OrdersModule};
|