marketplacepos 5.51.0 → 5.51.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-53B6D5OR.js → chunk-26E54WQH.js} +1 -1
- package/Marketplace/{chunk-AZEH7PMO.js → chunk-3KECTTUV.js} +1 -1
- package/Marketplace/{chunk-WEJBY3OB.js → chunk-4XA7JWTB.js} +1 -1
- package/Marketplace/{chunk-BLOGT3TL.js → chunk-575TS45M.js} +1 -1
- package/Marketplace/{chunk-ZMSM2NR7.js → chunk-75RVMUFO.js} +1 -1
- package/Marketplace/{chunk-36OIR6DM.js → chunk-AMQMYSQR.js} +1 -1
- package/Marketplace/{chunk-7E6JD2PT.js → chunk-APQWBZOM.js} +1 -1
- package/Marketplace/{chunk-EYYKWIXP.js → chunk-AVSAALDJ.js} +1 -1
- package/Marketplace/{chunk-AF6XAQPY.js → chunk-AVTQG66S.js} +1 -1
- package/Marketplace/{chunk-T62YFSKW.js → chunk-BKVIOCLH.js} +1 -1
- package/Marketplace/{chunk-IXNEMOFX.js → chunk-BZ7QY7N3.js} +1 -1
- package/Marketplace/{chunk-GD5I7ADU.js → chunk-CHCAQ4NV.js} +1 -1
- package/Marketplace/{chunk-Q5IVQP3E.js → chunk-DCMOITWM.js} +1 -1
- package/Marketplace/{chunk-VBVBTC2P.js → chunk-DOQD3RMB.js} +1 -1
- package/Marketplace/{chunk-YF7CCYHF.js → chunk-DV3BDHBL.js} +1 -1
- package/Marketplace/{chunk-OPCGCQMZ.js → chunk-DVJ7VXWL.js} +1 -1
- package/Marketplace/{chunk-XSOP2OTT.js → chunk-DW7R34MP.js} +1 -1
- package/Marketplace/{chunk-J4RDYEJC.js → chunk-EXKAFEQL.js} +1 -1
- package/Marketplace/{chunk-HT2MSA66.js → chunk-FQM4RKLX.js} +1 -1
- package/Marketplace/{chunk-EGJMTFNO.js → chunk-GYQHWDWX.js} +1 -1
- package/Marketplace/{chunk-SASGSPGQ.js → chunk-HO6XCGRR.js} +1 -1
- package/Marketplace/{chunk-HZTKN5RX.js → chunk-HPQDUJXF.js} +1 -1
- package/Marketplace/{chunk-E6W25RW5.js → chunk-ICY32GYN.js} +1 -1
- package/Marketplace/{chunk-ILFUI3MT.js → chunk-ILFG3IYB.js} +1 -1
- package/Marketplace/{chunk-4JCS7WPV.js → chunk-IUJ6UX3L.js} +1 -1
- package/Marketplace/{chunk-62YNPW6Q.js → chunk-J4552BMI.js} +1 -1
- package/Marketplace/{chunk-M5JNIPMS.js → chunk-JUN3HVEV.js} +1 -1
- package/Marketplace/{chunk-BKCKASH3.js → chunk-KHGTW7IV.js} +1 -1
- package/Marketplace/{chunk-364CDNZV.js → chunk-KVLHLMO4.js} +1 -1
- package/Marketplace/{chunk-5YQUGH5Z.js → chunk-LB276KSA.js} +1 -1
- package/Marketplace/{chunk-3Q6QZGLZ.js → chunk-MG7B4OWR.js} +1 -1
- package/Marketplace/{chunk-T3CN3WQD.js → chunk-MRWGPCR7.js} +1 -1
- package/Marketplace/{chunk-2PMJPSC4.js → chunk-N6VPSXF7.js} +2 -2
- package/Marketplace/{chunk-K2CHDL7K.js → chunk-NEB6AMMM.js} +1 -1
- package/Marketplace/{chunk-4ITXH35D.js → chunk-NKN7T3C3.js} +1 -1
- package/Marketplace/{chunk-C64L25TP.js → chunk-NMOQXVWS.js} +1 -1
- package/Marketplace/{chunk-7RIUHK6K.js → chunk-NUF326RW.js} +1 -1
- package/Marketplace/{chunk-SLQ42VND.js → chunk-NX3QFU4A.js} +1 -1
- package/Marketplace/{chunk-LWUMLKSO.js → chunk-OEUA6IL2.js} +1 -1
- package/Marketplace/{chunk-OJI34QN5.js → chunk-PGQYHHH3.js} +1 -1
- package/Marketplace/{chunk-6DGG765N.js → chunk-Q3Z7EEVP.js} +1 -1
- package/Marketplace/{chunk-ZMMMNVOU.js → chunk-QJ7SMXW4.js} +1 -1
- package/Marketplace/{chunk-LOVYZLSU.js → chunk-QLFVXMNJ.js} +1 -1
- package/Marketplace/{chunk-TLTFNFAB.js → chunk-QPELTSKE.js} +1 -1
- package/Marketplace/{chunk-ZXFWQ6VJ.js → chunk-QUIZLT5F.js} +1 -1
- package/Marketplace/{chunk-LCN52IJT.js → chunk-REDQ2L7Y.js} +1 -1
- package/Marketplace/{chunk-7QDKBMEA.js → chunk-SLCKHYT3.js} +1 -1
- package/Marketplace/{chunk-XAL6YLNQ.js → chunk-U4ARIHUF.js} +1 -1
- package/Marketplace/{chunk-A4X7F4MN.js → chunk-UHWLUO2C.js} +1 -1
- package/Marketplace/{chunk-R3BRUX7Z.js → chunk-UJAA73LE.js} +1 -1
- package/Marketplace/{chunk-EX4C4ZW4.js → chunk-UOFJCKS5.js} +1 -1
- package/Marketplace/{chunk-6IZWIEUD.js → chunk-VRD2D2BP.js} +1 -1
- package/Marketplace/{chunk-WH76SMZT.js → chunk-WZQRKTBN.js} +1 -1
- package/Marketplace/{chunk-BVW7WI5I.js → chunk-YFR3EI3B.js} +1 -1
- package/Marketplace/{chunk-OMY5ASFA.js → chunk-YMOSVDG5.js} +1 -1
- package/Marketplace/{chunk-25Q56ATV.js → chunk-YSYA7XCF.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-SOO5LINL.js → main-I5THR2C3.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as bt}from"./chunk-IQGRGC3E.js";import{c as Mt,d as Ft}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as Pt}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import{a as ft,b as St}from"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as Ot}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as wt}from"./chunk-7KG3DC5J.js";import{a as xt}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as vt}from"./chunk-27DIE2YS.js";import{a as yt}from"./chunk-LCN52IJT.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as _t}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as mt,b as ht,c as ut,i as Ct,j as gt}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as pt}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as U}from"./chunk-ZSUWHVKX.js";import{h as at}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-AGBJEXIM.js";import{a as nt,b as it,c as ot}from"./chunk-NB2H6KA7.js";import{c as f}from"./chunk-UPRDDI4K.js";import{A as dt,c as lt,h as st,m as ct}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as X,e as tt}from"./chunk-D6JH2KV4.js";import{b as et}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as Z,w as Q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as q,G as L,Hb as I,Ia as x,Nb as G,Nc as g,Oc as R,Pc as $,Rc as y,Sc as w,Tc as F,Uc as j,ac as M,ad as b,cc as O,dc as H,ea as W,ec as J,fc as N,gc as V,hc as u,ic as a,id as z,jc as s,jd as Y,kc as T,ob as l,oc as E,pc as k,ra as _,rc as P,wc as S,ya as m,yc as C,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Tt=o=>({"bg-gradient-warning":o});function Dt(o,c){if(o&1&&(a(0,"tr",5)(1,"td"),g(2),s(),a(3,"td",6),g(4),s()()),o&2){let n=c.$implicit;u("matTooltip",n.duplicateMessage),l(2),R(n==null?null:n.Name),l(),u("ngClass",b(4,Tt,n.isDuplicate)),l(),R(n!=null&&n.ChannelVariationSKU?n==null?null:n.ChannelVariationSKU:"Not Assigned")}}var It=(()=>{let c=class c{constructor(){this.data=_(ht),this.dialogRef=_(mt),this.variants=x([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,e={},i=[],d=t.filter(p=>f.IsEmpty(p.ChannelVariationSKU));t.filter(p=>f.IsNotEmpty(p.ChannelVariationSKU)).forEach((p,r,K)=>{e[p.ChannelVariationSKU]=K.filter(v=>v.ChannelVariationSKU===p.ChannelVariationSKU)}),Object.keys(e).forEach(p=>{e[p].length>1&&(e[p]=e[p].map((r,K,v)=>{let B=`SKU ${r.ChannelVariationSKU} is duplicated with variant`;return v.forEach((D,Nt)=>{D.Name!==r.Name&&(B+=` ${v.length>2?D.Name+(Nt!==v.length-1?",":""):D.Name}`)}),r.duplicateMessage=B,r.isDuplicate=!0,r})),i.push(...e[p])}),i.push(...d),this.variants.set(i)}initModalConfig(){this.modalConfig=new Ct,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-modal-variants"]],decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,i){e&1&&(a(0,"modal-material",0),S("onCancel",function(){return i.dialogRef.close()}),a(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),g(6,"Variant"),s(),a(7,"th",4),g(8,"SKU"),s()()(),a(9,"tbody"),N(10,Dt,5,6,"tr",5,H),s()()()()),e&2&&(u("config",i.modalConfig),l(10),V(i.variants()))},dependencies:[gt,pt,Z],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]});let o=c;return o})();var A=o=>[o],Et=()=>[];function kt(o,c){if(o&1){let n=P();a(0,"button",16),S("click",function(){m(n);let e=C(2);return h(e.openScanDialog())}),T(1,"i",17),g(2," Scan Channel "),s()}}function Rt(o,c){if(o&1&&(E(0),M(1,kt,3,0,"button",15),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?-1:1)}}function Ut(o,c){if(o&1){let n=P();a(0,"button",19),S("click",function(){m(n);let e=C(2);return h(e.onDownloadAllProduct("SELECTED"))}),T(1,"i",20),g(2),s()}if(o&2){let n,t=C(2);l(2),$(" Download (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function At(o,c){if(o&1&&(E(0),M(1,Ut,3,1,"button",18),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?1:-1)}}function Kt(o,c){if(o&1){let n=P();a(0,"div",12)(1,"app-product-card",21),S("onCheckBoxChange",function(e){let i=m(n).$index,d=C();return h(d.onSelectProduct(e,i))})("onDescEvent",function(){let e=m(n).$index,i=C();return h(i.onShowVariantDetail(e))})("onDownload",function(){let e=m(n).$implicit,i=C();return h(i.onDownloadProduct(e))})("onScan",function(){let e=m(n).$implicit,i=C();return h(i.onScanChannel(e))}),s()()}if(o&2){let n=c.$implicit,t=C();l(),u("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?b(10,A,n==null?null:n.Channel):q(12,Et))("showCheckBox",t.hasDownloadRole())("scanButton",!0)}}function Bt(o,c){o&1&&(a(0,"div",13),T(1,"app-empty-state"),s())}function Lt(o,c){if(o&1){let n=P();a(0,"div",14)(1,"div",22)(2,"app-custom-paginator",23),S("total",function(){m(n);let e=C();return h(e.getRowCount())})("next",function(){m(n);let e=C();return h(e.getProducts())})("previous",function(){m(n);let e=C();return h(e.getProducts())}),s()()()}if(o&2){let n=C();l(2),u("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var Me=(()=>{let c=class c{constructor(){this.http=_(tt),this.dialog=_(ut),this.productService=_(yt),this.toastrService=_(X),this.activateRouter=_(et),this.authService=_(at),this.placeholderService=_(Mt),this.permissionService=_(nt),this.searchFilter=new wt,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=U.ProductScan,this.downloadProductRole=U.ProductDownload,this.hasDownloadRole=x(!0),this.searchPlaceholder=x("Search ..."),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(t=>{this.hasDownloadRole.set(t)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.loader$=this.productService.loader(t).pipe(W(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts(),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}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?f.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(),this.initSearchPlaceholder()}onClearChannelFilter(){this.searchFilter.ChannelID=f.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(f.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=f.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(Pt,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(L(i=>f.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(f.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(It,{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),SearchType:this.searchFilter.SearchType,NumberFilterComparator:this.searchFilter.NumberFilterComparator};this.http.post(rt.GetNotInPosRowCount,t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-not-in-pos"]],decls:34,vars:21,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[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"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded"],["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"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){if(e&1){let d=P();j(0),z(1,"async"),a(2,"mainpanel",0),S("onSubmit",function(r){return m(d),h(i.onSearch(r))}),a(3,"actions"),G(4,Rt,2,1,"ng-container",1)(5,At,2,1,"ng-container",1),s(),a(6,"filters")(7,"div",2)(8,"label",3),g(9,"Channel"),s(),a(10,"app-channel-options-v2",4),F("ngModelChange",function(r){return m(d),w(i.searchFilter.ChannelID,r)||(i.searchFilter.ChannelID=r),h(r)}),s()(),a(11,"div",2)(12,"label",5),g(13,"SKU Assigned"),s(),a(14,"mat-radio-group",6),F("ngModelChange",function(r){return m(d),w(i.searchFilter.HaveSku,r)||(i.searchFilter.HaveSku=r),h(r)}),a(15,"mat-radio-button",7),g(16," All "),s(),a(17,"mat-radio-button",7),g(18," Yes "),s(),a(19,"mat-radio-button",7),g(20," No "),s()()(),a(21,"div",2)(22,"label",5),g(23,"Item ID"),s(),a(24,"input",8),F("ngModelChange",function(r){return m(d),w(i.searchFilter.Item_id,r)||(i.searchFilter.Item_id=r),h(r)}),s()(),a(25,"div")(26,"filter-query-type",9),F("numberFilterComparatorChange",function(r){return m(d),w(i.searchFilter.NumberFilterComparator,r)||(i.searchFilter.NumberFilterComparator=r),h(r)})("searchTypeChange",function(r){return m(d),w(i.searchFilter.SearchType,r)||(i.searchFilter.SearchType=r),h(r)}),s()()(),a(27,"content")(28,"div",10)(29,"div",11),N(30,Kt,2,13,"div",12,J),M(32,Bt,2,0,"div",13),s(),M(33,Lt,3,4,"div",14),s()()()}if(e&2){let d=Y(1,15,i.loader$);l(2),u("searchBoxPlaceHolder",i.searchPlaceholder()),l(2),u("ngxPermissionsOnly",b(17,A,i.scanProductRole)),l(),u("ngxPermissionsOnly",b(19,A,i.downloadProductRole)),l(5),y("ngModel",i.searchFilter.ChannelID),l(4),y("ngModel",i.searchFilter.HaveSku),l(),u("value",0),l(2),u("value",1),l(2),u("value",2),l(5),y("ngModel",i.searchFilter.Item_id),l(2),u("numberFilterComparatorOptions",d==null||d.Options==null?null:d.Options.SearchComparatorTypeOptions),y("numberFilterComparator",i.searchFilter.NumberFilterComparator),u("searchTypeOptions",d==null||d.Options==null?null:d.Options.SearchSKUOnlyOrSKUNameOptions),y("searchType",i.searchFilter.SearchType),l(4),V(i.products),l(2),O(i.products.length==0?32:-1),l(),O((i.products==null?null:i.products.length)>0?33:-1)}},dependencies:[_t,ot,it,Ot,dt,lt,st,ct,ft,St,Ft,bt,vt,xt,Q],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=c;return o})();export{Me as NotInPosComponent};
|
|
1
|
+
import{a as bt}from"./chunk-IQGRGC3E.js";import{c as Mt,d as Ft}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as Pt}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import{a as ft,b as St}from"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as Ot}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as wt}from"./chunk-7KG3DC5J.js";import{a as xt}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as vt}from"./chunk-27DIE2YS.js";import{a as yt}from"./chunk-REDQ2L7Y.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-KHGTW7IV.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as _t}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as mt,b as ht,c as ut,i as Ct,j as gt}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as pt}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as U}from"./chunk-ZSUWHVKX.js";import{h as at}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-AGBJEXIM.js";import{a as nt,b as it,c as ot}from"./chunk-NB2H6KA7.js";import{c as f}from"./chunk-UPRDDI4K.js";import{A as dt,c as lt,h as st,m as ct}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as X,e as tt}from"./chunk-D6JH2KV4.js";import{b as et}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as Z,w as Q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as q,G as L,Hb as I,Ia as x,Nb as G,Nc as g,Oc as R,Pc as $,Rc as y,Sc as w,Tc as F,Uc as j,ac as M,ad as b,cc as O,dc as H,ea as W,ec as J,fc as N,gc as V,hc as u,ic as a,id as z,jc as s,jd as Y,kc as T,ob as l,oc as E,pc as k,ra as _,rc as P,wc as S,ya as m,yc as C,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Tt=o=>({"bg-gradient-warning":o});function Dt(o,c){if(o&1&&(a(0,"tr",5)(1,"td"),g(2),s(),a(3,"td",6),g(4),s()()),o&2){let n=c.$implicit;u("matTooltip",n.duplicateMessage),l(2),R(n==null?null:n.Name),l(),u("ngClass",b(4,Tt,n.isDuplicate)),l(),R(n!=null&&n.ChannelVariationSKU?n==null?null:n.ChannelVariationSKU:"Not Assigned")}}var It=(()=>{let c=class c{constructor(){this.data=_(ht),this.dialogRef=_(mt),this.variants=x([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,e={},i=[],d=t.filter(p=>f.IsEmpty(p.ChannelVariationSKU));t.filter(p=>f.IsNotEmpty(p.ChannelVariationSKU)).forEach((p,r,K)=>{e[p.ChannelVariationSKU]=K.filter(v=>v.ChannelVariationSKU===p.ChannelVariationSKU)}),Object.keys(e).forEach(p=>{e[p].length>1&&(e[p]=e[p].map((r,K,v)=>{let B=`SKU ${r.ChannelVariationSKU} is duplicated with variant`;return v.forEach((D,Nt)=>{D.Name!==r.Name&&(B+=` ${v.length>2?D.Name+(Nt!==v.length-1?",":""):D.Name}`)}),r.duplicateMessage=B,r.isDuplicate=!0,r})),i.push(...e[p])}),i.push(...d),this.variants.set(i)}initModalConfig(){this.modalConfig=new Ct,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-modal-variants"]],decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,i){e&1&&(a(0,"modal-material",0),S("onCancel",function(){return i.dialogRef.close()}),a(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),g(6,"Variant"),s(),a(7,"th",4),g(8,"SKU"),s()()(),a(9,"tbody"),N(10,Dt,5,6,"tr",5,H),s()()()()),e&2&&(u("config",i.modalConfig),l(10),V(i.variants()))},dependencies:[gt,pt,Z],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]});let o=c;return o})();var A=o=>[o],Et=()=>[];function kt(o,c){if(o&1){let n=P();a(0,"button",16),S("click",function(){m(n);let e=C(2);return h(e.openScanDialog())}),T(1,"i",17),g(2," Scan Channel "),s()}}function Rt(o,c){if(o&1&&(E(0),M(1,kt,3,0,"button",15),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?-1:1)}}function Ut(o,c){if(o&1){let n=P();a(0,"button",19),S("click",function(){m(n);let e=C(2);return h(e.onDownloadAllProduct("SELECTED"))}),T(1,"i",20),g(2),s()}if(o&2){let n,t=C(2);l(2),$(" Download (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function At(o,c){if(o&1&&(E(0),M(1,Ut,3,1,"button",18),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?1:-1)}}function Kt(o,c){if(o&1){let n=P();a(0,"div",12)(1,"app-product-card",21),S("onCheckBoxChange",function(e){let i=m(n).$index,d=C();return h(d.onSelectProduct(e,i))})("onDescEvent",function(){let e=m(n).$index,i=C();return h(i.onShowVariantDetail(e))})("onDownload",function(){let e=m(n).$implicit,i=C();return h(i.onDownloadProduct(e))})("onScan",function(){let e=m(n).$implicit,i=C();return h(i.onScanChannel(e))}),s()()}if(o&2){let n=c.$implicit,t=C();l(),u("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?b(10,A,n==null?null:n.Channel):q(12,Et))("showCheckBox",t.hasDownloadRole())("scanButton",!0)}}function Bt(o,c){o&1&&(a(0,"div",13),T(1,"app-empty-state"),s())}function Lt(o,c){if(o&1){let n=P();a(0,"div",14)(1,"div",22)(2,"app-custom-paginator",23),S("total",function(){m(n);let e=C();return h(e.getRowCount())})("next",function(){m(n);let e=C();return h(e.getProducts())})("previous",function(){m(n);let e=C();return h(e.getProducts())}),s()()()}if(o&2){let n=C();l(2),u("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var Me=(()=>{let c=class c{constructor(){this.http=_(tt),this.dialog=_(ut),this.productService=_(yt),this.toastrService=_(X),this.activateRouter=_(et),this.authService=_(at),this.placeholderService=_(Mt),this.permissionService=_(nt),this.searchFilter=new wt,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=U.ProductScan,this.downloadProductRole=U.ProductDownload,this.hasDownloadRole=x(!0),this.searchPlaceholder=x("Search ..."),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(t=>{this.hasDownloadRole.set(t)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.loader$=this.productService.loader(t).pipe(W(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts(),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}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?f.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(),this.initSearchPlaceholder()}onClearChannelFilter(){this.searchFilter.ChannelID=f.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(f.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=f.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(Pt,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(L(i=>f.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(f.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(It,{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),SearchType:this.searchFilter.SearchType,NumberFilterComparator:this.searchFilter.NumberFilterComparator};this.http.post(rt.GetNotInPosRowCount,t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-not-in-pos"]],decls:34,vars:21,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[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"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded"],["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"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){if(e&1){let d=P();j(0),z(1,"async"),a(2,"mainpanel",0),S("onSubmit",function(r){return m(d),h(i.onSearch(r))}),a(3,"actions"),G(4,Rt,2,1,"ng-container",1)(5,At,2,1,"ng-container",1),s(),a(6,"filters")(7,"div",2)(8,"label",3),g(9,"Channel"),s(),a(10,"app-channel-options-v2",4),F("ngModelChange",function(r){return m(d),w(i.searchFilter.ChannelID,r)||(i.searchFilter.ChannelID=r),h(r)}),s()(),a(11,"div",2)(12,"label",5),g(13,"SKU Assigned"),s(),a(14,"mat-radio-group",6),F("ngModelChange",function(r){return m(d),w(i.searchFilter.HaveSku,r)||(i.searchFilter.HaveSku=r),h(r)}),a(15,"mat-radio-button",7),g(16," All "),s(),a(17,"mat-radio-button",7),g(18," Yes "),s(),a(19,"mat-radio-button",7),g(20," No "),s()()(),a(21,"div",2)(22,"label",5),g(23,"Item ID"),s(),a(24,"input",8),F("ngModelChange",function(r){return m(d),w(i.searchFilter.Item_id,r)||(i.searchFilter.Item_id=r),h(r)}),s()(),a(25,"div")(26,"filter-query-type",9),F("numberFilterComparatorChange",function(r){return m(d),w(i.searchFilter.NumberFilterComparator,r)||(i.searchFilter.NumberFilterComparator=r),h(r)})("searchTypeChange",function(r){return m(d),w(i.searchFilter.SearchType,r)||(i.searchFilter.SearchType=r),h(r)}),s()()(),a(27,"content")(28,"div",10)(29,"div",11),N(30,Kt,2,13,"div",12,J),M(32,Bt,2,0,"div",13),s(),M(33,Lt,3,4,"div",14),s()()()}if(e&2){let d=Y(1,15,i.loader$);l(2),u("searchBoxPlaceHolder",i.searchPlaceholder()),l(2),u("ngxPermissionsOnly",b(17,A,i.scanProductRole)),l(),u("ngxPermissionsOnly",b(19,A,i.downloadProductRole)),l(5),y("ngModel",i.searchFilter.ChannelID),l(4),y("ngModel",i.searchFilter.HaveSku),l(),u("value",0),l(2),u("value",1),l(2),u("value",2),l(5),y("ngModel",i.searchFilter.Item_id),l(2),u("numberFilterComparatorOptions",d==null||d.Options==null?null:d.Options.SearchComparatorTypeOptions),y("numberFilterComparator",i.searchFilter.NumberFilterComparator),u("searchTypeOptions",d==null||d.Options==null?null:d.Options.SearchSKUOnlyOrSKUNameOptions),y("searchType",i.searchFilter.SearchType),l(4),V(i.products),l(2),O(i.products.length==0?32:-1),l(),O((i.products==null?null:i.products.length)>0?33:-1)}},dependencies:[_t,ot,it,Ot,dt,lt,st,ct,ft,St,Ft,bt,vt,xt,Q],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=c;return o})();export{Me as NotInPosComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ne,b as Fe}from"./chunk-RIIIECQH.js";import{a as Pe}from"./chunk-JWDQVXQP.js";import{a as Ee,b as Ve}from"./chunk-K5WSFDNA.js";import{a as De}from"./chunk-VBVBTC2P.js";import{a as j}from"./chunk-L6CRWJ2O.js";import{a as Ae}from"./chunk-PV4OJSZI.js";import"./chunk-FSOZOROI.js";import"./chunk-VYI7JYH5.js";import"./chunk-BZWZ64N5.js";import{a as Me}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as Le}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as Te}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ke}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as Se,c as we,e as ve,f as ye,g as xe}from"./chunk-IA7NJXJD.js";import{a as be}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as _e}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as x}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as d,c as A}from"./chunk-UPRDDI4K.js";import{A as z,b as ge,c as fe,h as W,m as R,o as Ce}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as M,e as O}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as ue,B as he,w as me,y as de}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Cc as te,Dc as ie,Ec as ne,G,Hb as N,Ia as B,Mc as oe,Nc as m,Oc as P,Pc as E,Rc as S,Sc as w,Tc as v,Uc as re,Vc as ae,Wc as F,Z as J,_c as le,aa as X,ac as k,ad as pe,cc as T,dc as Z,fc as $,gc as ee,hc as y,ic as o,id as V,jc as r,jd as I,kc as _,kd as se,ma as D,mb as Y,ob as c,pd as ce,ra as C,rc as L,v as K,wc as b,ya as h,yc as f,za as g}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Q,b as q}from"./chunk-66YHNWRR.js";var Ie=(()=>{let l=class l{constructor(){this.http=C(O),this.toastr=C(M)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(K(p=>(p&&(p.Number=e),p)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case d.Tokopedia:let u=window.open("about:blank","_blank");u.document.write(e.File),u.document.close();break;case d.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case d.Shopee:var i=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),p=new Blob([i],{type:"octet/stream"});A.openDownloadFile(p,`${e?.Number}.pdf`);break;case d.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var Oe=(()=>{let l=class l{constructor(){this.dialogRef=C(Se),this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"h2",1),m(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),m(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),v("ngModelChange",function(u){return w(i.tandaiSudahDicetak,u)||(i.tandaiSudahDicetak=u),u}),r(),o(10,"span",7),m(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),m(14,"Cancel"),r(),o(15,"button",10),b("click",function(){return i.onPrint()}),m(16,"Cetak Pesanan"),r()()()),t&2&&(c(9),S("ngModel",i.tandaiSudahDicetak))},dependencies:[z,W,R,xe,ye,ve],encapsulation:2});let a=l;return a})();var U=(()=>{let l=class l{constructor(){this.httpService=C(O),this.shippingLabelService=C(Ie),this.toastrService=C(M),this.dialog=C(we)}printShippingLabel(e){switch(e?.MarketType){case d.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Shopee));break;case d.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tiktok));break;case d.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(G(t=>A.IsNotEmpty(t)),X(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tokopedia));break;case d.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Lazada));break;case d.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(p=>({OrderNumber:p.Number,ShopID:p.ShopID})),i="";switch(e[0]?.MarketType){case d.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case d.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case d.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(p=>{var u=Uint8Array.from(atob(p.File),We=>We.charCodeAt(0)),s=new Blob([u],{type:"octet/stream"});A.openDownloadFile(s,`${p?.Name}.pdf`)})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac});let a=l;return a})();var ze=["contextMenu"],Be=a=>({"td-cell-hover":a});function je(a,l){if(a&1){let n=L();o(0,"button",20),b("click",function(){h(n);let t=f(),i=F(0);return g(t.onDowloadShippingLabel(i))}),_(1,"i",21),o(2,"span"),m(3,"Download Shipping Label"),r()()}}function He(a,l){if(a&1){let n=L();o(0,"input",47),v("ngModelChange",function(t){h(n);let i=f().$implicit;return w(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){h(n);let t=f(3),i=F(0);return g(t.onSelectOrders(i))}),r()}if(a&2){let n=f().$implicit,e=f(2);S("ngModel",n.selected),y("disabled",e.selectedChannelType()!=null&&e.selectedChannelType()!=n.MarketType)}}function Ue(a,l){if(a&1&&_(0,"variants-dropdown",39),a&2){let n=f().$implicit;y("variants",n==null?null:n.Variants)}}function Qe(a,l){if(a&1&&_(0,"variant-with-image",40),a&2){let n=f().$implicit;y("variant",n==null?null:n.Variants[0])}}function qe(a,l){if(a&1&&(o(0,"span"),m(1),r()),a&2){let n=f().$implicit;c(),E("(",n.LogisticService==null?null:n.LogisticService.Option,")")}}function Ke(a,l){if(a&1){let n=L();o(0,"button",48),b("click",function(){h(n);let t=f().$implicit,i=f(2);return g(i.onPrintShippingLabel(t))}),_(1,"i",49),r()}}function Ge(a,l){if(a&1){let n=L();o(0,"tr")(1,"td"),k(2,He,1,2,"input",31),r(),o(3,"td")(4,"div",32),_(5,"img",33),V(6,"channelImage"),o(7,"div",34)(8,"div"),m(9),r(),o(10,"small",35)(11,"span"),m(12),r()()()()(),o(13,"td")(14,"div",36)(15,"div"),_(16,"order-link",37),r(),o(17,"small"),m(18),V(19,"date"),r(),_(20,"br"),o(21,"small"),_(22,"i",38),m(23),r()()(),o(24,"td"),k(25,Ue,1,1,"variants-dropdown",39)(26,Qe,1,1,"variant-with-image",40),r(),o(27,"td",41),m(28),V(29,"number"),r(),o(30,"td",42),b("mouseenter",function(t){let i=h(n).$implicit,p=f(2);return g(p.onMouseEnter(t,i))}),o(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),m(35),r(),k(36,qe,2,1,"span"),r(),o(37,"small"),m(38),r()()()(),o(39,"td",45),k(40,Ke,2,0,"button",46),r()()}if(a&2){let n=l.$implicit,e=f(2);c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?2:-1),c(3),y("src",I(6,16,n==null?null:n.MarketType),Y)("alt",n==null||n.Variants[0]==null?null:n.Variants[0].Name),c(4),P(n.Outlet),c(3),P(n.ChannelName),c(4),y("order",n),c(2),E(" ",se(19,18,n==null?null:n.Created,"dd/MM/yyyy HH:mm:ss")," "),c(5),E(" ",n.Customer," "),c(),oe(pe(23,Be,(n.Variants==null?null:n.Variants.length)>1)),c(),T((n.Variants==null?null:n.Variants.length)>1?25:26),c(3),P(I(29,21,n.Amount)),c(7),P(n.LogisticService!=null&&n.LogisticService.Name?n.LogisticService==null?null:n.LogisticService.Name:"-"),c(),T(n.LogisticService!=null&&n.LogisticService.Option&&(n.LogisticService==null?null:n.LogisticService.Option)!="Default"?36:-1),c(2),E(" ",n.ReferenceNumber?n.ReferenceNumber:"-"," "),c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?40:-1)}}function Je(a,l){if(a&1){let n=L();o(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),_(4,"th",25),o(5,"th",26),m(6,"Outlet"),r(),o(7,"th",26),m(8,"Number"),r(),o(9,"th"),m(10,"Items"),r(),o(11,"th",27),m(12,"Amount"),r(),o(13,"th",28),m(14,"Shipping"),r(),_(15,"th",29),r()(),o(16,"tbody"),$(17,Ge,41,25,"tr",null,Z),r()(),o(19,"app-custom-paginator",30),b("next",function(){h(n);let t=f();return g(t.initAwaitingCollection())})("previous",function(){h(n);let t=f();return g(t.initAwaitingCollection())}),r()()}if(a&2){let n=f(),e=F(0);c(17),ee(e),c(2),y("filter",n.filter())("totaldata",e==null?null:e.length)}}function Xe(a,l){a&1&&(o(0,"div",18),_(1,"app-empty-state"),r())}var Jt=(()=>{let l=class l{constructor(){this.printShippingService=C(U),this.orderService=C(j),this.toastr=C(M),this.fulfillmentService=C(Ne),this.channelType=d,this.selectedOrders=B([]),this.selectedChannelType=ce(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=B({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>q(Q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(J(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&te(ze,5),t&2){let p;ie(p=ne())&&(i.contextMenuEl=p.first)}},features:[le([j,U])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let p=L();re(0),V(1,"async"),o(2,"mainpanel",1),b("onSubmit",function(){return h(p),g(i.initAwaitingCollection())}),v("textChange",function(s){return h(p),w(i.filter().Number,s)||(i.filter().Number=s),g(s)}),o(3,"actions"),k(4,je,4,0,"button",2),o(5,"a",3),_(6,"i",4),o(7,"span"),m(8,"Order Fulfillment Display"),r()()(),o(9,"filters")(10,"div")(11,"label",5),m(12,"Channel"),r(),o(13,"app-channel-options-v2",6),v("ngModelChange",function(s){return h(p),w(i.filter().ListChannelID,s)||(i.filter().ListChannelID=s),g(s)}),r()(),o(14,"div",7)(15,"label",5),m(16,"From/To"),r(),o(17,"div",8)(18,"datepicker",9),v("dateChange",function(s){return h(p),w(i.filter().From,s)||(i.filter().From=s),g(s)}),r()(),o(19,"div")(20,"datepicker",10),v("dateChange",function(s){return h(p),w(i.filter().To,s)||(i.filter().To=s),g(s)}),r()()(),o(21,"div",7)(22,"label",11),m(23,"Page Number"),r(),o(24,"input",12),v("ngModelChange",function(s){return h(p),w(i.filter().PageNumber,s)||(i.filter().PageNumber=s),g(s)}),r()(),o(25,"div",7)(26,"label",11),m(27,"Page Size"),r(),o(28,"input",13),v("ngModelChange",function(s){return h(p),w(i.filter().PageSize,s)||(i.filter().PageSize=s),g(s)}),r()()(),o(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),k(33,Je,20,2,"div",17)(34,Xe,2,0,"div",18),r()()()()(),o(35,"app-context-menu",19,0),b("onSelectItem",function(s){return h(p),g(i.onSelectContextItem(s))}),r()}if(t&2){let p=ae(I(1,10,i.awaitingCollections$));c(2),S("text",i.filter().Number),c(2),T(i.selectedOrders().length>0?4:-1),c(9),y("multiple",!0),S("ngModel",i.filter().ListChannelID),c(5),S("date",i.filter().From),c(2),S("date",i.filter().To),c(4),S("ngModel",i.filter().PageNumber),c(4),S("ngModel",i.filter().PageSize),c(5),T((p==null?null:p.length)>0?33:34),c(2),y("items",i.contextMenuItems)}},dependencies:[he,ke,Te,Le,z,fe,Ce,ge,W,R,Ee,Ve,Ae,be,_e,De,Fe,Me,me,ue,de,Pe],encapsulation:2});let a=l;return a})();export{Jt as AwaitingCollectionComponent};
|
|
1
|
+
import{a as Ne,b as Fe}from"./chunk-RIIIECQH.js";import{a as Pe}from"./chunk-JWDQVXQP.js";import{a as Ee,b as Ve}from"./chunk-K5WSFDNA.js";import{a as De}from"./chunk-DOQD3RMB.js";import{a as j}from"./chunk-L6CRWJ2O.js";import{a as Ae}from"./chunk-PV4OJSZI.js";import"./chunk-FSOZOROI.js";import"./chunk-VYI7JYH5.js";import"./chunk-BZWZ64N5.js";import{a as Me}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as Le}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as Te}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ke}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as Se,c as we,e as ve,f as ye,g as xe}from"./chunk-IA7NJXJD.js";import{a as be}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as _e}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as x}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as d,c as A}from"./chunk-UPRDDI4K.js";import{A as z,b as ge,c as fe,h as W,m as R,o as Ce}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as M,e as O}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as ue,B as he,w as me,y as de}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Cc as te,Dc as ie,Ec as ne,G,Hb as N,Ia as B,Mc as oe,Nc as m,Oc as P,Pc as E,Rc as S,Sc as w,Tc as v,Uc as re,Vc as ae,Wc as F,Z as J,_c as le,aa as X,ac as k,ad as pe,cc as T,dc as Z,fc as $,gc as ee,hc as y,ic as o,id as V,jc as r,jd as I,kc as _,kd as se,ma as D,mb as Y,ob as c,pd as ce,ra as C,rc as L,v as K,wc as b,ya as h,yc as f,za as g}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Q,b as q}from"./chunk-66YHNWRR.js";var Ie=(()=>{let l=class l{constructor(){this.http=C(O),this.toastr=C(M)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(K(p=>(p&&(p.Number=e),p)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case d.Tokopedia:let u=window.open("about:blank","_blank");u.document.write(e.File),u.document.close();break;case d.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case d.Shopee:var i=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),p=new Blob([i],{type:"octet/stream"});A.openDownloadFile(p,`${e?.Number}.pdf`);break;case d.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var Oe=(()=>{let l=class l{constructor(){this.dialogRef=C(Se),this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"h2",1),m(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),m(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),v("ngModelChange",function(u){return w(i.tandaiSudahDicetak,u)||(i.tandaiSudahDicetak=u),u}),r(),o(10,"span",7),m(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),m(14,"Cancel"),r(),o(15,"button",10),b("click",function(){return i.onPrint()}),m(16,"Cetak Pesanan"),r()()()),t&2&&(c(9),S("ngModel",i.tandaiSudahDicetak))},dependencies:[z,W,R,xe,ye,ve],encapsulation:2});let a=l;return a})();var U=(()=>{let l=class l{constructor(){this.httpService=C(O),this.shippingLabelService=C(Ie),this.toastrService=C(M),this.dialog=C(we)}printShippingLabel(e){switch(e?.MarketType){case d.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Shopee));break;case d.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tiktok));break;case d.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(G(t=>A.IsNotEmpty(t)),X(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tokopedia));break;case d.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Lazada));break;case d.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(p=>({OrderNumber:p.Number,ShopID:p.ShopID})),i="";switch(e[0]?.MarketType){case d.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case d.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case d.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(p=>{var u=Uint8Array.from(atob(p.File),We=>We.charCodeAt(0)),s=new Blob([u],{type:"octet/stream"});A.openDownloadFile(s,`${p?.Name}.pdf`)})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac});let a=l;return a})();var ze=["contextMenu"],Be=a=>({"td-cell-hover":a});function je(a,l){if(a&1){let n=L();o(0,"button",20),b("click",function(){h(n);let t=f(),i=F(0);return g(t.onDowloadShippingLabel(i))}),_(1,"i",21),o(2,"span"),m(3,"Download Shipping Label"),r()()}}function He(a,l){if(a&1){let n=L();o(0,"input",47),v("ngModelChange",function(t){h(n);let i=f().$implicit;return w(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){h(n);let t=f(3),i=F(0);return g(t.onSelectOrders(i))}),r()}if(a&2){let n=f().$implicit,e=f(2);S("ngModel",n.selected),y("disabled",e.selectedChannelType()!=null&&e.selectedChannelType()!=n.MarketType)}}function Ue(a,l){if(a&1&&_(0,"variants-dropdown",39),a&2){let n=f().$implicit;y("variants",n==null?null:n.Variants)}}function Qe(a,l){if(a&1&&_(0,"variant-with-image",40),a&2){let n=f().$implicit;y("variant",n==null?null:n.Variants[0])}}function qe(a,l){if(a&1&&(o(0,"span"),m(1),r()),a&2){let n=f().$implicit;c(),E("(",n.LogisticService==null?null:n.LogisticService.Option,")")}}function Ke(a,l){if(a&1){let n=L();o(0,"button",48),b("click",function(){h(n);let t=f().$implicit,i=f(2);return g(i.onPrintShippingLabel(t))}),_(1,"i",49),r()}}function Ge(a,l){if(a&1){let n=L();o(0,"tr")(1,"td"),k(2,He,1,2,"input",31),r(),o(3,"td")(4,"div",32),_(5,"img",33),V(6,"channelImage"),o(7,"div",34)(8,"div"),m(9),r(),o(10,"small",35)(11,"span"),m(12),r()()()()(),o(13,"td")(14,"div",36)(15,"div"),_(16,"order-link",37),r(),o(17,"small"),m(18),V(19,"date"),r(),_(20,"br"),o(21,"small"),_(22,"i",38),m(23),r()()(),o(24,"td"),k(25,Ue,1,1,"variants-dropdown",39)(26,Qe,1,1,"variant-with-image",40),r(),o(27,"td",41),m(28),V(29,"number"),r(),o(30,"td",42),b("mouseenter",function(t){let i=h(n).$implicit,p=f(2);return g(p.onMouseEnter(t,i))}),o(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),m(35),r(),k(36,qe,2,1,"span"),r(),o(37,"small"),m(38),r()()()(),o(39,"td",45),k(40,Ke,2,0,"button",46),r()()}if(a&2){let n=l.$implicit,e=f(2);c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?2:-1),c(3),y("src",I(6,16,n==null?null:n.MarketType),Y)("alt",n==null||n.Variants[0]==null?null:n.Variants[0].Name),c(4),P(n.Outlet),c(3),P(n.ChannelName),c(4),y("order",n),c(2),E(" ",se(19,18,n==null?null:n.Created,"dd/MM/yyyy HH:mm:ss")," "),c(5),E(" ",n.Customer," "),c(),oe(pe(23,Be,(n.Variants==null?null:n.Variants.length)>1)),c(),T((n.Variants==null?null:n.Variants.length)>1?25:26),c(3),P(I(29,21,n.Amount)),c(7),P(n.LogisticService!=null&&n.LogisticService.Name?n.LogisticService==null?null:n.LogisticService.Name:"-"),c(),T(n.LogisticService!=null&&n.LogisticService.Option&&(n.LogisticService==null?null:n.LogisticService.Option)!="Default"?36:-1),c(2),E(" ",n.ReferenceNumber?n.ReferenceNumber:"-"," "),c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?40:-1)}}function Je(a,l){if(a&1){let n=L();o(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),_(4,"th",25),o(5,"th",26),m(6,"Outlet"),r(),o(7,"th",26),m(8,"Number"),r(),o(9,"th"),m(10,"Items"),r(),o(11,"th",27),m(12,"Amount"),r(),o(13,"th",28),m(14,"Shipping"),r(),_(15,"th",29),r()(),o(16,"tbody"),$(17,Ge,41,25,"tr",null,Z),r()(),o(19,"app-custom-paginator",30),b("next",function(){h(n);let t=f();return g(t.initAwaitingCollection())})("previous",function(){h(n);let t=f();return g(t.initAwaitingCollection())}),r()()}if(a&2){let n=f(),e=F(0);c(17),ee(e),c(2),y("filter",n.filter())("totaldata",e==null?null:e.length)}}function Xe(a,l){a&1&&(o(0,"div",18),_(1,"app-empty-state"),r())}var Jt=(()=>{let l=class l{constructor(){this.printShippingService=C(U),this.orderService=C(j),this.toastr=C(M),this.fulfillmentService=C(Ne),this.channelType=d,this.selectedOrders=B([]),this.selectedChannelType=ce(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=B({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>q(Q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(J(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&te(ze,5),t&2){let p;ie(p=ne())&&(i.contextMenuEl=p.first)}},features:[le([j,U])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let p=L();re(0),V(1,"async"),o(2,"mainpanel",1),b("onSubmit",function(){return h(p),g(i.initAwaitingCollection())}),v("textChange",function(s){return h(p),w(i.filter().Number,s)||(i.filter().Number=s),g(s)}),o(3,"actions"),k(4,je,4,0,"button",2),o(5,"a",3),_(6,"i",4),o(7,"span"),m(8,"Order Fulfillment Display"),r()()(),o(9,"filters")(10,"div")(11,"label",5),m(12,"Channel"),r(),o(13,"app-channel-options-v2",6),v("ngModelChange",function(s){return h(p),w(i.filter().ListChannelID,s)||(i.filter().ListChannelID=s),g(s)}),r()(),o(14,"div",7)(15,"label",5),m(16,"From/To"),r(),o(17,"div",8)(18,"datepicker",9),v("dateChange",function(s){return h(p),w(i.filter().From,s)||(i.filter().From=s),g(s)}),r()(),o(19,"div")(20,"datepicker",10),v("dateChange",function(s){return h(p),w(i.filter().To,s)||(i.filter().To=s),g(s)}),r()()(),o(21,"div",7)(22,"label",11),m(23,"Page Number"),r(),o(24,"input",12),v("ngModelChange",function(s){return h(p),w(i.filter().PageNumber,s)||(i.filter().PageNumber=s),g(s)}),r()(),o(25,"div",7)(26,"label",11),m(27,"Page Size"),r(),o(28,"input",13),v("ngModelChange",function(s){return h(p),w(i.filter().PageSize,s)||(i.filter().PageSize=s),g(s)}),r()()(),o(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),k(33,Je,20,2,"div",17)(34,Xe,2,0,"div",18),r()()()()(),o(35,"app-context-menu",19,0),b("onSelectItem",function(s){return h(p),g(i.onSelectContextItem(s))}),r()}if(t&2){let p=ae(I(1,10,i.awaitingCollections$));c(2),S("text",i.filter().Number),c(2),T(i.selectedOrders().length>0?4:-1),c(9),y("multiple",!0),S("ngModel",i.filter().ListChannelID),c(5),S("date",i.filter().From),c(2),S("date",i.filter().To),c(4),S("ngModel",i.filter().PageNumber),c(4),S("ngModel",i.filter().PageSize),c(5),T((p==null?null:p.length)>0?33:34),c(2),y("items",i.contextMenuItems)}},dependencies:[he,ke,Te,Le,z,fe,Ce,ge,W,R,Ee,Ve,Ae,be,_e,De,Fe,Me,me,ue,de,Pe],encapsulation:2});let a=l;return a})();export{Jt as AwaitingCollectionComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ve,b as xe}from"./chunk-RIIIECQH.js";import{a as ge}from"./chunk-JWDQVXQP.js";import{a as Ce,b as Se}from"./chunk-K5WSFDNA.js";import{a as be}from"./chunk-VBVBTC2P.js";import{a as N}from"./chunk-L6CRWJ2O.js";import{a as ye}from"./chunk-PV4OJSZI.js";import"./chunk-FSOZOROI.js";import"./chunk-VYI7JYH5.js";import"./chunk-BZWZ64N5.js";import{a as fe}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as he}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as _e}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ue}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as ce}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as pe}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as ne}from"./chunk-UPRDDI4K.js";import{A as me,b as re,c as le,h as ae,m as se,o as de}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as oe}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as te,B as ie,w as $,y as ee}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as K,Cc as H,Dc as Q,Ec as j,Hb as D,Ia as P,Mc as q,Nc as d,Oc as w,Pc as M,Rc as C,Sc as S,Tc as y,Uc as U,Vc as G,Wc as F,Z as I,_c as J,ac as v,ad as X,cc as x,dc as B,ea as k,fc as A,gc as z,hc as f,ic as t,id as V,jc as n,jd as O,kc as h,kd as Y,mb as W,ob as a,pd as Z,ra as E,rc as T,wc as g,ya as p,yc as u,za as c}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as R,b as L}from"./chunk-66YHNWRR.js";var Te=["contextMenu"],we=()=>[],Me=l=>({"td-cell-hover":l});function Ve(l,m){if(l&1){let e=T();t(0,"button",20),g("click",function(){p(e);let r=u();return c(r.setMultipleFulfillment())}),d(1," Set Fulfillment "),n()}}function Re(l,m){if(l&1&&h(0,"variants-dropdown",38),l&2){let e=u().$implicit;f("variants",e==null?null:e.Variants)}}function Ee(l,m){if(l&1&&h(0,"variant-with-image",39),l&2){let e=u().$implicit;f("variant",e==null?null:e.Variants[0])}}function Oe(l,m){if(l&1&&(t(0,"span"),d(1),n()),l&2){let e=u().$implicit;a(),M("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Pe(l,m){if(l&1){let e=T();t(0,"div",41)(1,"button",45),g("click",function(){p(e);let r=u().$implicit,o=u(2);return c(o.refreshShippingAndRefNumber(r))}),h(2,"i",46),n()()}}function Fe(l,m){if(l&1){let e=T();t(0,"button",47),g("click",function(){p(e);let r=u().$implicit,o=u(2);return c(o.onSetFulfillment(r))}),d(1," Set Fulfillment "),n()}}function Ne(l,m){if(l&1){let e=T();t(0,"tr")(1,"td")(2,"input",30),y("ngModelChange",function(r){let o=p(e).$implicit;return S(o.selected,r)||(o.selected=r),c(r)}),g("ngModelChange",function(){p(e);let r=u(2),o=F(0);return c(r.onSelectOrder(o))}),n()(),t(3,"td")(4,"div",31),h(5,"img",32),V(6,"channelImage"),t(7,"div",33)(8,"div"),d(9),n(),t(10,"small",34)(11,"span"),d(12),n()()()()(),t(13,"td")(14,"div",35)(15,"div"),h(16,"order-link",36),n(),t(17,"small"),d(18),V(19,"date"),n(),h(20,"br"),t(21,"small"),h(22,"i",37),d(23),n()()(),t(24,"td"),v(25,Re,1,1,"variants-dropdown",38)(26,Ee,1,1,"variant-with-image",39),n(),t(27,"td",40),d(28),V(29,"number"),n(),t(30,"td",41)(31,"div",42)(32,"div",35)(33,"div",43)(34,"span"),d(35),n(),v(36,Oe,2,1,"span"),n(),t(37,"small"),d(38),n()(),v(39,Pe,3,0,"div",41),n()(),t(40,"td",41),v(41,Fe,2,0,"button",44),n()()}if(l&2){let e=m.$implicit,i=u(2);a(2),C("ngModel",e.selected),f("disabled",i.selectedChannelType()!=null&&i.selectedChannelType()!=e.MarketType),a(3),f("src",O(6,18,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(4),w(e.Outlet),a(3),w(e.ChannelName),a(4),f("order",e),a(2),M(" ",Y(19,20,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(5),M(" ",e.Customer," "),a(),q(X(25,Me,(e.Variants==null?null:e.Variants.length)>1)),a(),x((e.Variants==null?null:e.Variants.length)>1?25:26),a(3),w(O(29,23,e.Amount)),a(7),w(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),x(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),a(2),M(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),a(),x(!(e.LogisticService!=null&&e.LogisticService.Name)||!e.ReferenceNumber?39:-1),a(2),x((e==null?null:e.MarketType)!=i.channelType.WooCommerce?41:-1)}}function Le(l,m){if(l&1){let e=T();t(0,"div",17)(1,"table",21)(2,"thead",22)(3,"tr",23),h(4,"th",24),t(5,"th",25),d(6,"Outlet"),n(),t(7,"th",25),d(8,"Number"),n(),t(9,"th"),d(10,"Items"),n(),t(11,"th",26),d(12,"Amount"),n(),t(13,"th",27),d(14,"Shipping"),n(),h(15,"th",28),n()(),t(16,"tbody"),A(17,Ne,42,27,"tr",null,B),n()(),t(19,"app-custom-paginator",29),g("next",function(){p(e);let r=u();return c(r.initReadyToShip())})("previous",function(){p(e);let r=u();return c(r.initReadyToShip())}),n()()}if(l&2){let e=u(),i=F(0);a(17),z(i),a(2),f("filter",e.filter())("totaldata",i==null?null:i.length)}}function Ie(l,m){l&1&&(t(0,"div",18),h(1,"app-empty-state"),n())}var st=(()=>{let m=class m{constructor(){this.toastr=E(oe),this.orderService=E(N),this.fulfillmentService=E(ve),this.channelType=ne,this.selectedOrders=P([]),this.selectedChannelType=Z(()=>{let i=null;return this.selectedOrders().length>0&&(i=this.selectedOrders()[0].MarketType),i}),this.filter=P({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:i=>{this.initFromDate(i)},error:i=>{console.error("Error fetching default date:",i),this.initFromDate(null)}})}initFromDate(i){this.filter.update(r=>L(R({},r),{From:i})),this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.orderService.getReadyToShipOrders(this.filter()).pipe(k(()=>{this.selectedOrders.set([])}),I(1))}onFilterChange(i){this.filter.update(r=>R(R({},r),i))}onSetFulfillment(i){this.fulfillmentService.setFulfillmentOrder(i).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}refreshShippingAndRefNumber(i){this.orderService.refreshShippingCourier(i.ShopID,i.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initReadyToShip()})}setMultipleFulfillment(){this.fulfillmentService.setFulfillmentMultipleOrders(this.selectedOrders()).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}onSelectOrder(i){let r=i.filter(o=>o.selected);this.selectedOrders.set(r)}onMouseHover(i,r){(!r.LogisticService?.Name||!r.ReferenceNumber)&&this.contextMenuEl.show(i,r)}onSelectContextItem(i){i.item?.id==="refresh"&&this.refreshShippingAndRefNumber(i.data)}};m.\u0275fac=function(r){return new(r||m)},m.\u0275cmp=D({type:m,selectors:[["app-ready-to-ship"]],viewQuery:function(r,o){if(r&1&&H(Te,5),r&2){let _;Q(_=j())&&(o.contextMenuEl=_.first)}},features:[J([N])],decls:37,vars:14,consts:[["contextMenu",""],["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],[2,"width","150px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem"],["matTooltip","Retrieve shipping courier and reference number",1,"btn","btn-icon-only",3,"click"],[1,"fa-solid","fa-arrows-rotate","fs-6"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem",3,"click"]],template:function(r,o){if(r&1){let _=T();U(0),V(1,"async"),t(2,"mainpanel",1),g("onSubmit",function(){return p(_),c(o.initReadyToShip())}),y("textChange",function(s){return p(_),S(o.filter().Number,s)||(o.filter().Number=s),c(s)}),t(3,"actions"),v(4,Ve,2,0,"button",2),t(5,"a",3),h(6,"i",4),t(7,"span"),d(8,"Order Fulfillment Display"),n()()(),t(9,"filters")(10,"div")(11,"label",5),d(12,"Channel"),n(),t(13,"app-channel-options-v2",6),y("ngModelChange",function(s){return p(_),S(o.filter().ListChannelID,s)||(o.filter().ListChannelID=s),c(s)}),n()(),t(14,"div",7)(15,"label",5),d(16,"From/To"),n(),t(17,"div",8)(18,"datepicker",9),y("dateChange",function(s){return p(_),S(o.filter().From,s)||(o.filter().From=s),c(s)}),n()(),t(19,"div")(20,"datepicker",10),y("dateChange",function(s){return p(_),S(o.filter().To,s)||(o.filter().To=s),c(s)}),n()()(),t(21,"div",7)(22,"label",11),d(23,"Page Number"),n(),t(24,"input",12),y("ngModelChange",function(s){return p(_),S(o.filter().PageNumber,s)||(o.filter().PageNumber=s),c(s)}),n()(),t(25,"div",7)(26,"label",11),d(27,"Page Size"),n(),t(28,"input",13),y("ngModelChange",function(s){return p(_),S(o.filter().PageSize,s)||(o.filter().PageSize=s),c(s)}),n()()(),t(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),v(33,Le,20,2,"div",17)(34,Ie,2,0,"div",18),n()()()()(),t(35,"app-context-menu",19,0),g("onSelectItem",function(s){return p(_),c(o.onSelectContextItem(s))}),n()}if(r&2){let _=G(O(1,10,o.readyToShip$)||K(13,we));a(2),C("text",o.filter().Number),a(2),x(o.selectedOrders().length>0?4:-1),a(9),f("multiple",!0),C("ngModel",o.filter().ListChannelID),a(5),C("date",o.filter().From),a(2),C("date",o.filter().To),a(4),C("ngModel",o.filter().PageNumber),a(4),C("ngModel",o.filter().PageSize),a(5),x(_.length>0?33:34),a(2),f("items",o.contextMenuItems)}},dependencies:[ie,ue,_e,he,me,le,de,re,ae,se,Ce,Se,ye,be,ce,pe,xe,fe,$,te,ee,ge],styles:[".actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .12s ease-in-out}tr[_ngcontent-%COMP%]:hover .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], div[_ngcontent-%COMP%]:hover.actions-cell .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}"]});let l=m;return l})();export{st as ReadyToShipComponent};
|
|
1
|
+
import{a as ve,b as xe}from"./chunk-RIIIECQH.js";import{a as ge}from"./chunk-JWDQVXQP.js";import{a as Ce,b as Se}from"./chunk-K5WSFDNA.js";import{a as be}from"./chunk-DOQD3RMB.js";import{a as N}from"./chunk-L6CRWJ2O.js";import{a as ye}from"./chunk-PV4OJSZI.js";import"./chunk-FSOZOROI.js";import"./chunk-VYI7JYH5.js";import"./chunk-BZWZ64N5.js";import{a as fe}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as he}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as _e}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ue}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as ce}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as pe}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as ne}from"./chunk-UPRDDI4K.js";import{A as me,b as re,c as le,h as ae,m as se,o as de}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as oe}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as te,B as ie,w as $,y as ee}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as K,Cc as H,Dc as Q,Ec as j,Hb as D,Ia as P,Mc as q,Nc as d,Oc as w,Pc as M,Rc as C,Sc as S,Tc as y,Uc as U,Vc as G,Wc as F,Z as I,_c as J,ac as v,ad as X,cc as x,dc as B,ea as k,fc as A,gc as z,hc as f,ic as t,id as V,jc as n,jd as O,kc as h,kd as Y,mb as W,ob as a,pd as Z,ra as E,rc as T,wc as g,ya as p,yc as u,za as c}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as R,b as L}from"./chunk-66YHNWRR.js";var Te=["contextMenu"],we=()=>[],Me=l=>({"td-cell-hover":l});function Ve(l,m){if(l&1){let e=T();t(0,"button",20),g("click",function(){p(e);let r=u();return c(r.setMultipleFulfillment())}),d(1," Set Fulfillment "),n()}}function Re(l,m){if(l&1&&h(0,"variants-dropdown",38),l&2){let e=u().$implicit;f("variants",e==null?null:e.Variants)}}function Ee(l,m){if(l&1&&h(0,"variant-with-image",39),l&2){let e=u().$implicit;f("variant",e==null?null:e.Variants[0])}}function Oe(l,m){if(l&1&&(t(0,"span"),d(1),n()),l&2){let e=u().$implicit;a(),M("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Pe(l,m){if(l&1){let e=T();t(0,"div",41)(1,"button",45),g("click",function(){p(e);let r=u().$implicit,o=u(2);return c(o.refreshShippingAndRefNumber(r))}),h(2,"i",46),n()()}}function Fe(l,m){if(l&1){let e=T();t(0,"button",47),g("click",function(){p(e);let r=u().$implicit,o=u(2);return c(o.onSetFulfillment(r))}),d(1," Set Fulfillment "),n()}}function Ne(l,m){if(l&1){let e=T();t(0,"tr")(1,"td")(2,"input",30),y("ngModelChange",function(r){let o=p(e).$implicit;return S(o.selected,r)||(o.selected=r),c(r)}),g("ngModelChange",function(){p(e);let r=u(2),o=F(0);return c(r.onSelectOrder(o))}),n()(),t(3,"td")(4,"div",31),h(5,"img",32),V(6,"channelImage"),t(7,"div",33)(8,"div"),d(9),n(),t(10,"small",34)(11,"span"),d(12),n()()()()(),t(13,"td")(14,"div",35)(15,"div"),h(16,"order-link",36),n(),t(17,"small"),d(18),V(19,"date"),n(),h(20,"br"),t(21,"small"),h(22,"i",37),d(23),n()()(),t(24,"td"),v(25,Re,1,1,"variants-dropdown",38)(26,Ee,1,1,"variant-with-image",39),n(),t(27,"td",40),d(28),V(29,"number"),n(),t(30,"td",41)(31,"div",42)(32,"div",35)(33,"div",43)(34,"span"),d(35),n(),v(36,Oe,2,1,"span"),n(),t(37,"small"),d(38),n()(),v(39,Pe,3,0,"div",41),n()(),t(40,"td",41),v(41,Fe,2,0,"button",44),n()()}if(l&2){let e=m.$implicit,i=u(2);a(2),C("ngModel",e.selected),f("disabled",i.selectedChannelType()!=null&&i.selectedChannelType()!=e.MarketType),a(3),f("src",O(6,18,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(4),w(e.Outlet),a(3),w(e.ChannelName),a(4),f("order",e),a(2),M(" ",Y(19,20,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(5),M(" ",e.Customer," "),a(),q(X(25,Me,(e.Variants==null?null:e.Variants.length)>1)),a(),x((e.Variants==null?null:e.Variants.length)>1?25:26),a(3),w(O(29,23,e.Amount)),a(7),w(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),x(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),a(2),M(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),a(),x(!(e.LogisticService!=null&&e.LogisticService.Name)||!e.ReferenceNumber?39:-1),a(2),x((e==null?null:e.MarketType)!=i.channelType.WooCommerce?41:-1)}}function Le(l,m){if(l&1){let e=T();t(0,"div",17)(1,"table",21)(2,"thead",22)(3,"tr",23),h(4,"th",24),t(5,"th",25),d(6,"Outlet"),n(),t(7,"th",25),d(8,"Number"),n(),t(9,"th"),d(10,"Items"),n(),t(11,"th",26),d(12,"Amount"),n(),t(13,"th",27),d(14,"Shipping"),n(),h(15,"th",28),n()(),t(16,"tbody"),A(17,Ne,42,27,"tr",null,B),n()(),t(19,"app-custom-paginator",29),g("next",function(){p(e);let r=u();return c(r.initReadyToShip())})("previous",function(){p(e);let r=u();return c(r.initReadyToShip())}),n()()}if(l&2){let e=u(),i=F(0);a(17),z(i),a(2),f("filter",e.filter())("totaldata",i==null?null:i.length)}}function Ie(l,m){l&1&&(t(0,"div",18),h(1,"app-empty-state"),n())}var st=(()=>{let m=class m{constructor(){this.toastr=E(oe),this.orderService=E(N),this.fulfillmentService=E(ve),this.channelType=ne,this.selectedOrders=P([]),this.selectedChannelType=Z(()=>{let i=null;return this.selectedOrders().length>0&&(i=this.selectedOrders()[0].MarketType),i}),this.filter=P({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:i=>{this.initFromDate(i)},error:i=>{console.error("Error fetching default date:",i),this.initFromDate(null)}})}initFromDate(i){this.filter.update(r=>L(R({},r),{From:i})),this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.orderService.getReadyToShipOrders(this.filter()).pipe(k(()=>{this.selectedOrders.set([])}),I(1))}onFilterChange(i){this.filter.update(r=>R(R({},r),i))}onSetFulfillment(i){this.fulfillmentService.setFulfillmentOrder(i).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}refreshShippingAndRefNumber(i){this.orderService.refreshShippingCourier(i.ShopID,i.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initReadyToShip()})}setMultipleFulfillment(){this.fulfillmentService.setFulfillmentMultipleOrders(this.selectedOrders()).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}onSelectOrder(i){let r=i.filter(o=>o.selected);this.selectedOrders.set(r)}onMouseHover(i,r){(!r.LogisticService?.Name||!r.ReferenceNumber)&&this.contextMenuEl.show(i,r)}onSelectContextItem(i){i.item?.id==="refresh"&&this.refreshShippingAndRefNumber(i.data)}};m.\u0275fac=function(r){return new(r||m)},m.\u0275cmp=D({type:m,selectors:[["app-ready-to-ship"]],viewQuery:function(r,o){if(r&1&&H(Te,5),r&2){let _;Q(_=j())&&(o.contextMenuEl=_.first)}},features:[J([N])],decls:37,vars:14,consts:[["contextMenu",""],["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],[2,"width","150px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem"],["matTooltip","Retrieve shipping courier and reference number",1,"btn","btn-icon-only",3,"click"],[1,"fa-solid","fa-arrows-rotate","fs-6"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem",3,"click"]],template:function(r,o){if(r&1){let _=T();U(0),V(1,"async"),t(2,"mainpanel",1),g("onSubmit",function(){return p(_),c(o.initReadyToShip())}),y("textChange",function(s){return p(_),S(o.filter().Number,s)||(o.filter().Number=s),c(s)}),t(3,"actions"),v(4,Ve,2,0,"button",2),t(5,"a",3),h(6,"i",4),t(7,"span"),d(8,"Order Fulfillment Display"),n()()(),t(9,"filters")(10,"div")(11,"label",5),d(12,"Channel"),n(),t(13,"app-channel-options-v2",6),y("ngModelChange",function(s){return p(_),S(o.filter().ListChannelID,s)||(o.filter().ListChannelID=s),c(s)}),n()(),t(14,"div",7)(15,"label",5),d(16,"From/To"),n(),t(17,"div",8)(18,"datepicker",9),y("dateChange",function(s){return p(_),S(o.filter().From,s)||(o.filter().From=s),c(s)}),n()(),t(19,"div")(20,"datepicker",10),y("dateChange",function(s){return p(_),S(o.filter().To,s)||(o.filter().To=s),c(s)}),n()()(),t(21,"div",7)(22,"label",11),d(23,"Page Number"),n(),t(24,"input",12),y("ngModelChange",function(s){return p(_),S(o.filter().PageNumber,s)||(o.filter().PageNumber=s),c(s)}),n()(),t(25,"div",7)(26,"label",11),d(27,"Page Size"),n(),t(28,"input",13),y("ngModelChange",function(s){return p(_),S(o.filter().PageSize,s)||(o.filter().PageSize=s),c(s)}),n()()(),t(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),v(33,Le,20,2,"div",17)(34,Ie,2,0,"div",18),n()()()()(),t(35,"app-context-menu",19,0),g("onSelectItem",function(s){return p(_),c(o.onSelectContextItem(s))}),n()}if(r&2){let _=G(O(1,10,o.readyToShip$)||K(13,we));a(2),C("text",o.filter().Number),a(2),x(o.selectedOrders().length>0?4:-1),a(9),f("multiple",!0),C("ngModel",o.filter().ListChannelID),a(5),C("date",o.filter().From),a(2),C("date",o.filter().To),a(4),C("ngModel",o.filter().PageNumber),a(4),C("ngModel",o.filter().PageSize),a(5),x(_.length>0?33:34),a(2),f("items",o.contextMenuItems)}},dependencies:[ie,ue,_e,he,me,le,de,re,ae,se,Ce,Se,ye,be,ce,pe,xe,fe,$,te,ee,ge],styles:[".actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .12s ease-in-out}tr[_ngcontent-%COMP%]:hover .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], div[_ngcontent-%COMP%]:hover.actions-cell .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}"]});let l=m;return l})();export{st as ReadyToShipComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-WZQRKTBN.js";import{a as l,b as u}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as d,g as s}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,hc as p,ic as m,jc as c,kc as n,ob as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var f=(()=>{let e=class e{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=i({type:e,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,h){o&1&&(m(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),c()()(),n(4,"router-outlet")),o&2&&(a(3),p("Tabs",h.tabs))},dependencies:[u,l,s,d],encapsulation:2});let t=e;return t})();var I=[{path:"",component:f,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-SLCKHYT3.js").then(t=>t.OrderApiComponent)},canActivate:[r],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-575TS45M.js").then(t=>t.ProductApiComponent)},canActivate:[r],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-ILFG3IYB.js").then(t=>t.EscrowApiComponent)},canActivate:[r],data:{title:"Escrow API"}}]}];export{I as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as _}from"./chunk-
|
|
1
|
+
import{f as _}from"./chunk-J4552BMI.js";import{c as a}from"./chunk-UPRDDI4K.js";import{e as k,g as C}from"./chunk-UB3ZV5NW.js";import{Hb as v,Nc as u,Pc as p,ac as I,bd as D,cc as g,hc as s,ic as c,jc as m,ma as h,mb as b,ob as l,pd as f,ra as o,ud as x,yc as d}from"./chunk-OHGMB7HJ.js";var y=(()=>{let e=class e{constructor(){this.localDataService=o(_),this.baseUrl=this.localDataService.getHostName()}getBaseUrl(n){let r="";return a.IsNotEmpty(n.ID)?r=`https://${this.baseUrl}/menu/Orders/Orders/Customer_Invoice/Info?ID=${n.ID}`:r="/menu/Order/detail",r}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var U=(t,e)=>({Number:t,Outlet:e});function L(t,e){if(t&1&&(c(0,"a",0),u(1),m()),t&2){let i,n=d();s("href",n.baseUrl(),b),l(),p(" ",(i=n.order())==null?null:i.Number," ")}}function S(t,e){if(t&1&&(c(0,"a",1),u(1),m()),t&2){let i,n,r=d();s("routerLink",r.baseUrl())("queryParams",D(3,U,(i=r.order())==null?null:i.Number,(i=r.order())==null?null:i.Outlet)),l(),p(" ",(n=r.order())==null?null:n.Number," ")}}var z=(()=>{let e=class e{constructor(){this.order=x(),this.generateLinkService=o(y),this.baseUrl=f(()=>this.generateLinkService.getBaseUrl(this.order())),this.hasOrderID=f(()=>a.IsNotEmpty(this.order()?.ID))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=v({type:e,selectors:[["order-link"]],inputs:{order:[1,"order"]},decls:2,vars:1,consts:[["target","_blank",3,"href"],["target","_blank",3,"routerLink","queryParams"]],template:function(r,N){r&1&&I(0,L,2,2,"a",0)(1,S,2,6,"a",1),r&2&&g(N.hasOrderID()?0:1)},dependencies:[C,k],encapsulation:2});let t=e;return t})();export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Se}from"./chunk-MSSRROS6.js";import{a as V}from"./chunk-ISMIPSYN.js";import"./chunk-7T5DBPDP.js";import"./chunk-OH5T7D7O.js";import"./chunk-DE3FRI5N.js";import{a as Ce,b as ge}from"./chunk-R3BRUX7Z.js";import"./chunk-FH2KAM6J.js";import{c as fe,d as O,e as R}from"./chunk-C67KF7MG.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as me,d as ue}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as he}from"./chunk-BZWZ64N5.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-DLHIDOS3.js";import{a as de}from"./chunk-LCN52IJT.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as ce,b as pe}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as se}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ne}from"./chunk-ZSUWHVKX.js";import{h as N}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as E}from"./chunk-AGBJEXIM.js";import{b as ee,c as te}from"./chunk-NB2H6KA7.js";import{c as _}from"./chunk-UPRDDI4K.js";import{A as le,c as ie,h as oe,m as re,o as ae}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Z,e as $}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as Y,w as X}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as k,Hb as A,Ia as y,Nb as G,Nc as v,Rc as b,Sc as I,Tc as T,Uc as K,_c as Q,ac as F,ad as J,cc as M,ea as H,hc as f,ic as s,id as w,jc as d,jd as P,kc as j,ma as W,ob as C,oc as z,pc as q,ra as c,rc as D,wc as S,ya as p,yc as g,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as B,b as U}from"./chunk-66YHNWRR.js";var x=(()=>{let l=class l{constructor(){this.authService=c(N),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(n,r){let e=Object.assign([],this.channelOptions),i=[],o;return n.forEach(t=>{o=e.find(u=>u.ID==t?.parent?.id),o&&(o=U(B({},o),{Name:`${t?.parent?.label} - ${t?.label}`,LocationID:t?.id}),i.push(o))}),r.forEach(t=>{o=e.find(u=>u.ID==t.id),o&&i.push(o)}),i}generateFilterLocation(n,r){let e=[],i=[],o=[];return n.length>0?(e=n.map(t=>t.id),i=n.filter(t=>_.IsNotEmpty(t?.parent?.id)).map(t=>t?.parent?.id).filter((t,u,L)=>L.indexOf(t)===u)):(e=[],i=[]),o=r.map(t=>t.id),o=o.concat(i).filter((t,u,L)=>L.indexOf(t)===u),{locationIds:e,channelIds:o}}};l.\u0275fac=function(r){return new(r||l)},l.\u0275prov=W({token:l,factory:l.\u0275fac});let a=l;return a})();var ye=a=>[a];function ve(a,l){if(a&1){let m=D();s(0,"button",17),S("click",function(){p(m);let r=g(2),e=g();return h(e.onUpdateItems(r))}),j(1,"i",18),v(2," Update "),d()}}function be(a,l){if(a&1&&(z(0),F(1,ve,3,0,"button",16),q()),a&2){let m=g(),n=g();C(),M(n.productService.hasSelectionVariant(m)?1:-1)}}function Ie(a,l){if(a&1&&(s(0,"actions")(1,"div",14),G(2,be,2,1,"ng-container",15),d()()),a&2){let m=g();C(2),f("ngxPermissionsOnly",J(1,ye,m.inventoryUpdateRole))}}function we(a,l){if(a&1){let m=D();s(0,"app-table",19),S("onToggle",function(r){p(m);let e=g();return h(e.onShowDifferenceStock(r))})("onSubmit",function(r){p(m);let e=g();return h(e.updateStockByVariant(r))}),d()}if(a&2){let m=g();f("data",l)("channel",m.channels())("showProductToggle",!0)("hiddenIPOSInventory",m.searchFilter.HiddenIPOSInventory)}}var st=(()=>{let l=class l{constructor(){this.http=c($),this.toastr=c(Z),this.dialog=c(se),this.productService=c(de),this.authService=c(N),this.mainPanelService=c(ce),this.placeholderService=c(me),this.paginationService=c(O),this.multiChannelService=c(x),this.updateResHandling=c(R),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=y([]),this.selectedChannels=y([]),this.channels=y([]),this.inventoryUpdateRole=ne.InventoryUpdate,this.searchPlaceholder=y("Search ..."),this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(H(n=>{n.Filter={PageNumber:n.Filter.PageNumber,filterModel:V.ALL,RowCount:n.Filter.PageSize,HiddenIPOSInventory:n.Filter.HiddenIPOSInventory,SearchType:n.Filter.SearchType,NumberFilterComparator:n.Filter.NumberFilterComparator},this.searchFilter=n.Filter,this.initSearchPlaceholder(),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}onChannelChange(n=[]){let r=n.filter(i=>_.isValidGUID(i.id)==!1),e=n.filter(i=>_.isValidGUID(i.id));this.selectedLocations.set(r),this.selectedChannels.set(e)}onSearch(n){let r=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(r);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=n,this.initSearchPlaceholder(),this.paginationService.reloadPagination(this.searchFilter)}updateStock(n,r){if(n.length>0){let e=[];n.forEach(t=>{t.Channel?.forEach(u=>{e.push({ChannelItemID:u?.ChannelItemID,ChannelVariationID:u?.ChannelVariationID,Inventory:t.Inventory,LocationID:u?.LocationID})})});let o={ListChannelID:r.filter(t=>t.selected).map(t=>t.ID),List:e};this.http.post(E.UpdateInventoryChannel,o).subscribe(t=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success")})}}updateStockByVariant(n){let r=n.InventoryMultiwarehouse[0]?.LocationID,e={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:n.Inventory,VariantID:n.ID,SKU:n?.Sku,LocationID:r};this.http.post(E.UpdateUpdateQuantityByItem,e).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock(i)})}handlingUpdateStock(n){if(n){let r=n?.Response?.Fail_list,e=n?.Response?.Success_list;this.updateResHandling.responseHandling(e,r,"Stock")}else this.toastr.error(n?.Exception,"Error")}onShowDifferenceStock(n){n?this.searchFilter.filterModel=V.DIFFERENCE:this.searchFilter.filterModel=V.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(n){let r=this.productService.selectedVariantProduct(n),e=this.channelOptions.filter(i=>this.channels()?.find(o=>o.ID===i.ID));this.dialog.open(Ce,{data:{selectedItems:r,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(k(i=>_.IsNotEmpty(i))).subscribe(i=>{this.updateStock(r,i)})}};l.\u0275fac=function(r){return new(r||l)},l.\u0275cmp=A({type:l,selectors:[["app-multi-channel-comparison"]],features:[Q([O,x,R])],decls:28,vars:25,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"mb-5"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(r,e){if(r&1){let i=D();s(0,"mainpanel",0),S("onSubmit",function(t){return p(i),h(e.onSearch(t))}),F(1,Ie,3,3,"actions"),w(2,"async"),s(3,"filters"),K(4),w(5,"async"),s(6,"div",1)(7,"label",2),v(8,"Channel"),d(),s(9,"multiwarehouse-tree-select",3),S("onChannelChange",function(t){return p(i),h(e.onChannelChange(t))}),d()(),s(10,"div",1)(11,"filter-query-type",4),T("numberFilterComparatorChange",function(t){return p(i),I(e.searchFilter.NumberFilterComparator,t)||(e.searchFilter.NumberFilterComparator=t),h(t)})("searchTypeChange",function(t){return p(i),I(e.searchFilter.SearchType,t)||(e.searchFilter.SearchType=t),h(t)}),d()(),s(12,"div",1)(13,"label",5),v(14,"PageNumber"),d(),s(15,"input",6),T("ngModelChange",function(t){return p(i),I(e.searchFilter.PageNumber,t)||(e.searchFilter.PageNumber=t),h(t)}),d()(),s(16,"div")(17,"label",7),v(18,"Page Size"),d(),s(19,"input",8),T("ngModelChange",function(t){return p(i),I(e.searchFilter.RowCount,t)||(e.searchFilter.RowCount=t),h(t)}),d()()(),s(20,"content")(21,"div",9)(22,"div",10)(23,"div",11),F(24,we,1,4,"app-table",12),w(25,"async"),s(26,"infinite-paginator",13),w(27,"async"),S("onNextPage",function(){return p(i),h(e.paginationService.onNextPage(e.searchFilter))})("onLastPage",function(){return p(i),h(e.paginationService.onLastPage(e.searchFilter))})("onGetRowCount",function(){return p(i),h(e.paginationService.getRowCount(e.searchFilter))}),d()()()()()()}if(r&2){let i,o;f("hideSearchBox",!1)("searchBoxPlaceHolder",e.searchPlaceholder()),C(),M((i=P(2,17,e.paginationService.data$))?1:-1,i);let t=P(5,19,e.loader$);C(8),f("multiple",!0),C(2),f("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions),b("numberFilterComparator",e.searchFilter.NumberFilterComparator),f("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions),b("searchType",e.searchFilter.SearchType),C(4),b("ngModel",e.searchFilter.PageNumber),C(4),b("ngModel",e.searchFilter.RowCount),C(5),M((o=P(25,21,e.paginationService.data$))?24:-1,o),C(2),f("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",P(27,23,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage())}},dependencies:[Y,pe,ge,le,ie,ae,oe,re,fe,Se,te,ee,he,ue,X],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let a=l;return a})();export{st as MultiChannelComparison};
|
|
1
|
+
import{a as Se}from"./chunk-MSSRROS6.js";import{a as V}from"./chunk-ISMIPSYN.js";import"./chunk-7T5DBPDP.js";import"./chunk-OH5T7D7O.js";import"./chunk-DE3FRI5N.js";import{a as Ce,b as ge}from"./chunk-UJAA73LE.js";import"./chunk-FH2KAM6J.js";import{c as fe,d as O,e as R}from"./chunk-C67KF7MG.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as me,d as ue}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as he}from"./chunk-BZWZ64N5.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-DLHIDOS3.js";import{a as de}from"./chunk-REDQ2L7Y.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-KHGTW7IV.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as ce,b as pe}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as se}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ne}from"./chunk-ZSUWHVKX.js";import{h as N}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as E}from"./chunk-AGBJEXIM.js";import{b as ee,c as te}from"./chunk-NB2H6KA7.js";import{c as _}from"./chunk-UPRDDI4K.js";import{A as le,c as ie,h as oe,m as re,o as ae}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Z,e as $}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as Y,w as X}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as k,Hb as A,Ia as y,Nb as G,Nc as v,Rc as b,Sc as I,Tc as T,Uc as K,_c as Q,ac as F,ad as J,cc as M,ea as H,hc as f,ic as s,id as w,jc as d,jd as P,kc as j,ma as W,ob as C,oc as z,pc as q,ra as c,rc as D,wc as S,ya as p,yc as g,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as B,b as U}from"./chunk-66YHNWRR.js";var x=(()=>{let l=class l{constructor(){this.authService=c(N),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(n,r){let e=Object.assign([],this.channelOptions),i=[],o;return n.forEach(t=>{o=e.find(u=>u.ID==t?.parent?.id),o&&(o=U(B({},o),{Name:`${t?.parent?.label} - ${t?.label}`,LocationID:t?.id}),i.push(o))}),r.forEach(t=>{o=e.find(u=>u.ID==t.id),o&&i.push(o)}),i}generateFilterLocation(n,r){let e=[],i=[],o=[];return n.length>0?(e=n.map(t=>t.id),i=n.filter(t=>_.IsNotEmpty(t?.parent?.id)).map(t=>t?.parent?.id).filter((t,u,L)=>L.indexOf(t)===u)):(e=[],i=[]),o=r.map(t=>t.id),o=o.concat(i).filter((t,u,L)=>L.indexOf(t)===u),{locationIds:e,channelIds:o}}};l.\u0275fac=function(r){return new(r||l)},l.\u0275prov=W({token:l,factory:l.\u0275fac});let a=l;return a})();var ye=a=>[a];function ve(a,l){if(a&1){let m=D();s(0,"button",17),S("click",function(){p(m);let r=g(2),e=g();return h(e.onUpdateItems(r))}),j(1,"i",18),v(2," Update "),d()}}function be(a,l){if(a&1&&(z(0),F(1,ve,3,0,"button",16),q()),a&2){let m=g(),n=g();C(),M(n.productService.hasSelectionVariant(m)?1:-1)}}function Ie(a,l){if(a&1&&(s(0,"actions")(1,"div",14),G(2,be,2,1,"ng-container",15),d()()),a&2){let m=g();C(2),f("ngxPermissionsOnly",J(1,ye,m.inventoryUpdateRole))}}function we(a,l){if(a&1){let m=D();s(0,"app-table",19),S("onToggle",function(r){p(m);let e=g();return h(e.onShowDifferenceStock(r))})("onSubmit",function(r){p(m);let e=g();return h(e.updateStockByVariant(r))}),d()}if(a&2){let m=g();f("data",l)("channel",m.channels())("showProductToggle",!0)("hiddenIPOSInventory",m.searchFilter.HiddenIPOSInventory)}}var st=(()=>{let l=class l{constructor(){this.http=c($),this.toastr=c(Z),this.dialog=c(se),this.productService=c(de),this.authService=c(N),this.mainPanelService=c(ce),this.placeholderService=c(me),this.paginationService=c(O),this.multiChannelService=c(x),this.updateResHandling=c(R),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=y([]),this.selectedChannels=y([]),this.channels=y([]),this.inventoryUpdateRole=ne.InventoryUpdate,this.searchPlaceholder=y("Search ..."),this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(H(n=>{n.Filter={PageNumber:n.Filter.PageNumber,filterModel:V.ALL,RowCount:n.Filter.PageSize,HiddenIPOSInventory:n.Filter.HiddenIPOSInventory,SearchType:n.Filter.SearchType,NumberFilterComparator:n.Filter.NumberFilterComparator},this.searchFilter=n.Filter,this.initSearchPlaceholder(),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}onChannelChange(n=[]){let r=n.filter(i=>_.isValidGUID(i.id)==!1),e=n.filter(i=>_.isValidGUID(i.id));this.selectedLocations.set(r),this.selectedChannels.set(e)}onSearch(n){let r=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(r);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=n,this.initSearchPlaceholder(),this.paginationService.reloadPagination(this.searchFilter)}updateStock(n,r){if(n.length>0){let e=[];n.forEach(t=>{t.Channel?.forEach(u=>{e.push({ChannelItemID:u?.ChannelItemID,ChannelVariationID:u?.ChannelVariationID,Inventory:t.Inventory,LocationID:u?.LocationID})})});let o={ListChannelID:r.filter(t=>t.selected).map(t=>t.ID),List:e};this.http.post(E.UpdateInventoryChannel,o).subscribe(t=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success")})}}updateStockByVariant(n){let r=n.InventoryMultiwarehouse[0]?.LocationID,e={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:n.Inventory,VariantID:n.ID,SKU:n?.Sku,LocationID:r};this.http.post(E.UpdateUpdateQuantityByItem,e).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock(i)})}handlingUpdateStock(n){if(n){let r=n?.Response?.Fail_list,e=n?.Response?.Success_list;this.updateResHandling.responseHandling(e,r,"Stock")}else this.toastr.error(n?.Exception,"Error")}onShowDifferenceStock(n){n?this.searchFilter.filterModel=V.DIFFERENCE:this.searchFilter.filterModel=V.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(n){let r=this.productService.selectedVariantProduct(n),e=this.channelOptions.filter(i=>this.channels()?.find(o=>o.ID===i.ID));this.dialog.open(Ce,{data:{selectedItems:r,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(k(i=>_.IsNotEmpty(i))).subscribe(i=>{this.updateStock(r,i)})}};l.\u0275fac=function(r){return new(r||l)},l.\u0275cmp=A({type:l,selectors:[["app-multi-channel-comparison"]],features:[Q([O,x,R])],decls:28,vars:25,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"mb-5"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(r,e){if(r&1){let i=D();s(0,"mainpanel",0),S("onSubmit",function(t){return p(i),h(e.onSearch(t))}),F(1,Ie,3,3,"actions"),w(2,"async"),s(3,"filters"),K(4),w(5,"async"),s(6,"div",1)(7,"label",2),v(8,"Channel"),d(),s(9,"multiwarehouse-tree-select",3),S("onChannelChange",function(t){return p(i),h(e.onChannelChange(t))}),d()(),s(10,"div",1)(11,"filter-query-type",4),T("numberFilterComparatorChange",function(t){return p(i),I(e.searchFilter.NumberFilterComparator,t)||(e.searchFilter.NumberFilterComparator=t),h(t)})("searchTypeChange",function(t){return p(i),I(e.searchFilter.SearchType,t)||(e.searchFilter.SearchType=t),h(t)}),d()(),s(12,"div",1)(13,"label",5),v(14,"PageNumber"),d(),s(15,"input",6),T("ngModelChange",function(t){return p(i),I(e.searchFilter.PageNumber,t)||(e.searchFilter.PageNumber=t),h(t)}),d()(),s(16,"div")(17,"label",7),v(18,"Page Size"),d(),s(19,"input",8),T("ngModelChange",function(t){return p(i),I(e.searchFilter.RowCount,t)||(e.searchFilter.RowCount=t),h(t)}),d()()(),s(20,"content")(21,"div",9)(22,"div",10)(23,"div",11),F(24,we,1,4,"app-table",12),w(25,"async"),s(26,"infinite-paginator",13),w(27,"async"),S("onNextPage",function(){return p(i),h(e.paginationService.onNextPage(e.searchFilter))})("onLastPage",function(){return p(i),h(e.paginationService.onLastPage(e.searchFilter))})("onGetRowCount",function(){return p(i),h(e.paginationService.getRowCount(e.searchFilter))}),d()()()()()()}if(r&2){let i,o;f("hideSearchBox",!1)("searchBoxPlaceHolder",e.searchPlaceholder()),C(),M((i=P(2,17,e.paginationService.data$))?1:-1,i);let t=P(5,19,e.loader$);C(8),f("multiple",!0),C(2),f("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions),b("numberFilterComparator",e.searchFilter.NumberFilterComparator),f("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions),b("searchType",e.searchFilter.SearchType),C(4),b("ngModel",e.searchFilter.PageNumber),C(4),b("ngModel",e.searchFilter.RowCount),C(5),M((o=P(25,21,e.paginationService.data$))?24:-1,o),C(2),f("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",P(27,23,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage())}},dependencies:[Y,pe,ge,le,ie,ae,oe,re,fe,Se,te,ee,he,ue,X],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let a=l;return a})();export{st as MultiChannelComparison};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as w}from"./chunk-
|
|
1
|
+
import{b as w}from"./chunk-KHGTW7IV.js";import"./chunk-A6QXXKPR.js";import{b as k}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{b as T,e as P,g as R}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as g,B as M,w as y,y as I}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as E,Nc as i,Oc as l,Pc as D,aa as C,ac as m,cc as p,hc as _,ic as t,id as v,jc as e,jd as b,kd as x,ob as d,ra as u,v as h,yc as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function B(a,o){if(a&1&&(t(0,"div",9)(1,"div",12)(2,"div",6)(3,"h5"),i(4,"Perflog"),e()(),t(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),i(9),e()()()()()()),a&2){let n=f();d(9),l(n.Perflog)}}function L(a,o){if(a&1&&(t(0,"div",15)(1,"div",12)(2,"div",6)(3,"h5"),i(4,"StackTrace"),e()(),t(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),i(9),e()()()()()()),a&2){let n=f();d(9),l(n==null?null:n.StackTrace)}}function N(a,o){if(a&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),i(3,"Back"),e()(),t(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),i(11,"General"),e()(),t(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),i(17,"Created Date"),e(),t(18,"div")(19,"span"),i(20),v(21,"date"),e()()()(),t(22,"div",9)(23,"div",10)(24,"label"),i(25,"Status"),e(),t(26,"div")(27,"span"),i(28),e()()()()(),t(29,"div",11)(30,"div",9)(31,"div",10)(32,"label"),i(33,"Duration"),e(),t(34,"div")(35,"span"),i(36),v(37,"number"),e()()()(),t(38,"div",9)(39,"div",10)(40,"label"),i(41,"Label"),e(),t(42,"div")(43,"span"),i(44),e()()()()()()()()(),t(45,"div",3)(46,"div",9)(47,"div",12)(48,"div",6)(49,"h5"),i(50,"Message"),e()(),t(51,"div",7)(52,"div",13)(53,"div",14)(54,"pre"),i(55),e()()()()()(),m(56,B,10,1,"div",9),m(57,L,10,1,"div",15),e()()()()),a&2){let n=o;_("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),d(20),l(x(21,10,n.Created,"dd MMM yyyy HH:mm:ss")),d(8),l(n.StatusLabel),d(8),D("",x(37,13,n.DurationInSecond,"1.1-1")," s"),d(8),l(n.Label),d(11),l(n.Message),d(),p(n!=null&&n.Perflog?56:-1),d(),p(n!=null&&n.StackTrace?57:-1)}}var Q=(()=>{let o=class o{constructor(){this.activatedRoute=u(T),this.notificationService=u(w)}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(C(s=>{let r=s.ID;return this.notificationService.getNotificationDetail(r).pipe(h(c=>(c.DurationInSecond=parseInt(c.Duration)/1e3,c)))}))}};o.\u0275fac=function(r){return new(r||o)},o.\u0275cmp=E({type:o,selectors:[["app-detail"]],decls:2,vars:3,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],[1,"col-sm-12"]],template:function(r,c){if(r&1&&(m(0,N,58,16,"mainpanel",0),v(1,"async")),r&2){let S;p((S=b(1,1,c.notification$))?0:-1,S)}},dependencies:[M,k,R,P,y,g,I],encapsulation:2});let a=o;return a})();export{Q as DetailComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as pe}from"./chunk-JWDQVXQP.js";import{a as de,b as me}from"./chunk-K5WSFDNA.js";import{a as ce}from"./chunk-
|
|
1
|
+
import{a as pe}from"./chunk-JWDQVXQP.js";import{a as de,b as me}from"./chunk-K5WSFDNA.js";import{a as ce}from"./chunk-DOQD3RMB.js";import{a as P}from"./chunk-L6CRWJ2O.js";import{a as se}from"./chunk-PV4OJSZI.js";import{a as le}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as oe}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as ae}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as re}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as ne}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as Q,B as X,w as J,y as K}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as U,Hb as D,Ia as F,Mc as z,Nc as l,Oc as w,Pc as x,Rc as f,Sc as S,Tc as C,Uc as A,Vc as R,Wc as H,_c as j,ac as b,ad as q,cc as V,dc as I,fc as B,gc as k,hc as g,ic as t,id as y,jc as i,jd as E,kc as _,kd as G,mb as W,ob as r,ra as O,rc as M,wc as T,ya as s,yc as h,za as c}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as L,b as N}from"./chunk-66YHNWRR.js";var ue=()=>[],_e=a=>({"td-cell-hover":a});function ge(a,p){if(a&1&&_(0,"variants-dropdown",31),a&2){let e=h().$implicit;g("variants",e==null?null:e.Variants)}}function he(a,p){if(a&1&&_(0,"variant-with-image",32),a&2){let e=h().$implicit;g("variant",e==null?null:e.Variants[0])}}function fe(a,p){if(a&1&&(t(0,"span"),l(1),i()),a&2){let e=h().$implicit;r(),x("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Se(a,p){if(a&1&&(t(0,"tr")(1,"td")(2,"div",24),_(3,"img",25),y(4,"channelImage"),t(5,"div",26)(6,"div"),l(7),i(),t(8,"small",27)(9,"span"),l(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div"),_(14,"order-link",29),i(),t(15,"small"),l(16),y(17,"date"),i(),_(18,"br"),t(19,"small"),_(20,"i",30),l(21),i()()(),t(22,"td"),b(23,ge,1,1,"variants-dropdown",31)(24,he,1,1,"variant-with-image",32),i(),t(25,"td",33),l(26),y(27,"number"),i(),t(28,"td")(29,"div",28)(30,"div",34)(31,"span"),l(32),i(),b(33,fe,2,1,"span"),i(),t(34,"small"),l(35),i()()()()),a&2){let e=p.$implicit;r(3),g("src",E(4,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),r(4),w(e.Outlet),r(3),w(e.ChannelName),r(4),g("order",e),r(2),x(" ",G(17,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),r(5),x(" ",e.Customer," "),r(),z(q(21,_e,(e.Variants==null?null:e.Variants.length)>1)),r(),V((e.Variants==null?null:e.Variants.length)>1?23:24),r(3),w(E(27,19,e.Amount)),r(6),w(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),r(),V(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?33:-1),r(2),x(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function Ce(a,p){if(a&1){let e=M();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",20),l(7,"Number"),i(),t(8,"th"),l(9,"Items"),i(),t(10,"th",21),l(11,"Amount"),i(),t(12,"th",22),l(13,"Shipping"),i()()(),t(14,"tbody"),B(15,Se,36,23,"tr",null,I),i()(),t(17,"app-custom-paginator",23),T("next",function(){s(e);let m=h();return c(m.initShippedOrders())})("previous",function(){s(e);let m=h();return c(m.initShippedOrders())}),i()()}if(a&2){let e=h(),d=H(0);r(15),k(d),r(2),g("filter",e.filter())("totaldata",d==null?null:d.length)}}function ve(a,p){a&1&&(t(0,"div",16),_(1,"app-empty-state"),i())}var Re=(()=>{let p=class p{constructor(){this.orderService=O(P),this.filter=F({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:d=>{this.initFromDate(d)},error:d=>{console.error("Error fetching default date:",d),this.initFromDate(null)}})}initFromDate(d){this.filter.update(m=>N(L({},m),{From:d})),this.initShippedOrders()}initShippedOrders(){this.shippedOrders$=this.orderService.getShippedOrders(this.filter())}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=D({type:p,selectors:[["app-shipped"]],features:[j([P])],decls:34,vars:12,consts:[["headerTitle","Shipped","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],["rowCountApi","/api/orders/shippedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-end","gap-2"]],template:function(m,o){if(m&1){let u=M();A(0),y(1,"async"),t(2,"mainpanel",0),T("onSubmit",function(){return s(u),c(o.initShippedOrders())}),C("textChange",function(n){return s(u),S(o.filter().Number,n)||(o.filter().Number=n),c(n)}),t(3,"actions")(4,"a",1),_(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"Channel"),i(),t(12,"app-channel-options-v2",4),C("ngModelChange",function(n){return s(u),S(o.filter().ListChannelID,n)||(o.filter().ListChannelID=n),c(n)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),C("dateChange",function(n){return s(u),S(o.filter().From,n)||(o.filter().From=n),c(n)}),i()(),t(18,"div")(19,"datepicker",8),C("dateChange",function(n){return s(u),S(o.filter().To,n)||(o.filter().To=n),c(n)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),C("ngModelChange",function(n){return s(u),S(o.filter().PageNumber,n)||(o.filter().PageNumber=n),c(n)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),C("ngModelChange",function(n){return s(u),S(o.filter().PageSize,n)||(o.filter().PageSize=n),c(n)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),b(32,Ce,18,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(m&2){let u=R(E(1,8,o.shippedOrders$)||U(11,ue));r(2),f("text",o.filter().Number),r(10),g("multiple",!0),f("ngModel",o.filter().ListChannelID),r(5),f("date",o.filter().From),r(2),f("date",o.filter().To),r(4),f("ngModel",o.filter().PageNumber),r(4),f("ngModel",o.filter().PageSize),r(5),V(u.length>0?32:33)}},dependencies:[X,re,ae,oe,te,Y,ee,Z,$,de,me,se,ne,ie,ce,le,J,Q,K,pe],encapsulation:2});let a=p;return a})();export{Re as ShippedComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-WZQRKTBN.js";import{a as d,b as v}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as m}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as a,hc as l,ic as c,jc as p,kc as r,ob as i}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var s=(()=>{let n=class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/void-invoice"},{Title:"All",Url:"/menu/sync-log/all"}]}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=a({type:n,selectors:[["app-order"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,y){o&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),r(3,"nav-tab",2),p()()(),r(4,"router-outlet")),o&2&&(i(3),l("Tabs",y.reportTabs))},dependencies:[v,d,m],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]});let t=n;return t})();var O=[{path:"",component:s,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",loadComponent(){return import("./chunk-RZXE2MFY.js").then(t=>t.SalesOrderComponent)},canActivate:[e],data:{title:"Sync Order"}},{path:"convert-to-invoice",loadComponent(){return import("./chunk-PCOAEOIL.js").then(t=>t.ConvertInvoiceComponent)},canActivate:[e],data:{title:"Sync Convert to Invoice"}},{path:"invoice",loadComponent(){return import("./chunk-MHIYVGFS.js").then(t=>t.InvoiceComponent)},canActivate:[e],data:{title:"Sync Invoice"}},{path:"delivery",loadComponent(){return import("./chunk-2ZKHC4YC.js").then(t=>t.DeliveryComponent)},canActivate:[e],data:{title:"Sync Delivery"}},{path:"payment",loadComponent(){return import("./chunk-2Y3L7QOV.js").then(t=>t.PaymentComponent)},canActivate:[e],data:{title:"Sync Payment"}},{path:"void-invoice",loadComponent(){return import("./chunk-Z4RYN6X5.js").then(t=>t.VoidInvoiceComponent)},canActivate:[e],data:{title:"Sync void invoice"}},{path:"all",loadComponent(){return import("./chunk-YZQDWPFY.js").then(t=>t.AllComponent)},canActivate:[e],data:{title:"All Report"}}]}];export{O as routes};
|