marketplacepos 5.46.5 → 5.46.6
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-OFEZTCJA.js → chunk-22ARBR7W.js} +1 -1
- package/Marketplace/{chunk-LEM7ESKJ.js → chunk-2BV7ZXRB.js} +1 -1
- package/Marketplace/{chunk-VEYUDPOA.js → chunk-2DLU2LJJ.js} +1 -1
- package/Marketplace/{chunk-6WE2RKUX.js → chunk-4HOZLG47.js} +1 -1
- package/Marketplace/{chunk-U23D2EPE.js → chunk-5BHSTOJT.js} +1 -1
- package/Marketplace/{chunk-HVA57ZPZ.js → chunk-5DTUHJSS.js} +1 -1
- package/Marketplace/{chunk-GHFADTRR.js → chunk-5EIQGYTB.js} +1 -1
- package/Marketplace/{chunk-WHV5AYGI.js → chunk-5KUKIH4H.js} +1 -1
- package/Marketplace/{chunk-BVV5R6HN.js → chunk-5Z5Y537T.js} +1 -1
- package/Marketplace/{chunk-C7YK5TDP.js → chunk-63ANFYRV.js} +1 -1
- package/Marketplace/{chunk-DGIH7HSJ.js → chunk-7TI3OR34.js} +1 -1
- package/Marketplace/{chunk-74AYYW2T.js → chunk-7WY57PVD.js} +1 -1
- package/Marketplace/{chunk-OG4QM5FO.js → chunk-7Y7SPMGZ.js} +1 -1
- package/Marketplace/{chunk-6NZJ2XKE.js → chunk-AWNZSJSP.js} +1 -1
- package/Marketplace/{chunk-7QKEL4DD.js → chunk-B2ZWLW3F.js} +1 -1
- package/Marketplace/{chunk-CO5XZENC.js → chunk-CBQUB3KW.js} +1 -1
- package/Marketplace/{chunk-5X2M3HM4.js → chunk-CRD4OUSG.js} +1 -1
- package/Marketplace/{chunk-KEW73FTY.js → chunk-CT73GC7O.js} +1 -1
- package/Marketplace/chunk-D2TELRO7.js +1 -0
- package/Marketplace/{chunk-6YBD22SK.js → chunk-EFB55SZR.js} +1 -1
- package/Marketplace/{chunk-UQL42ODX.js → chunk-ELZBUFG5.js} +1 -1
- package/Marketplace/chunk-EUYQST7Q.js +1 -0
- package/Marketplace/{chunk-CAK6MZUW.js → chunk-EXSI44LD.js} +1 -1
- package/Marketplace/{chunk-PHLSX23M.js → chunk-F2XHUFJC.js} +2 -2
- package/Marketplace/{chunk-MACYDQHW.js → chunk-F3GLNINI.js} +1 -1
- package/Marketplace/{chunk-DRVWJPA2.js → chunk-FHNST4Y7.js} +1 -1
- package/Marketplace/{chunk-XHBBUUIF.js → chunk-FKQ7ZVGD.js} +1 -1
- package/Marketplace/{chunk-WREH3C74.js → chunk-FOT5AJYX.js} +2 -2
- package/Marketplace/{chunk-RUXJCVKX.js → chunk-GSVFDIM6.js} +1 -1
- package/Marketplace/{chunk-5ZR5WIHG.js → chunk-GZS2MOSK.js} +1 -1
- package/Marketplace/{chunk-WY37QAZ4.js → chunk-JAWWMIGP.js} +1 -1
- package/Marketplace/{chunk-VIXNFSMT.js → chunk-JUJFPAAU.js} +1 -1
- package/Marketplace/{chunk-WBCI5HV5.js → chunk-JZDOMET2.js} +1 -1
- package/Marketplace/chunk-KTB223SK.js +1 -0
- package/Marketplace/{chunk-IJVKHW3C.js → chunk-KWHVCPX2.js} +1 -1
- package/Marketplace/{chunk-FYB62QQV.js → chunk-LLHPMXKP.js} +1 -1
- package/Marketplace/{chunk-VQIT62HE.js → chunk-LS7AO6KP.js} +1 -1
- package/Marketplace/{chunk-LRBJ5RU5.js → chunk-LXXEN7OV.js} +1 -1
- package/Marketplace/{chunk-6RCPPNMX.js → chunk-MGLOTL2T.js} +1 -1
- package/Marketplace/{chunk-7IOOG3TG.js → chunk-MZWTCBAF.js} +4 -4
- package/Marketplace/{chunk-774TVUXT.js → chunk-NDBC2CS6.js} +1 -1
- package/Marketplace/{chunk-57MSCWQ4.js → chunk-NFGFM7TW.js} +1 -1
- package/Marketplace/{chunk-TKV7XWBT.js → chunk-O2YNPIYM.js} +1 -1
- package/Marketplace/{chunk-7TQWJCUW.js → chunk-OGJMVAEL.js} +1 -1
- package/Marketplace/{chunk-XANN3R5J.js → chunk-OO2CSDGF.js} +1 -1
- package/Marketplace/{chunk-OLVWSY6L.js → chunk-P2AADVEN.js} +1 -1
- package/Marketplace/{chunk-SXFLJBXI.js → chunk-P2IQLBGG.js} +1 -1
- package/Marketplace/{chunk-KUYNX5QT.js → chunk-PTNJ3YC5.js} +1 -1
- package/Marketplace/{chunk-4BWA3J6V.js → chunk-QREUIGWW.js} +1 -1
- package/Marketplace/{chunk-BPAZ4TES.js → chunk-RGY4FVTG.js} +1 -1
- package/Marketplace/{chunk-RU43F4UK.js → chunk-T27ABFCP.js} +1 -1
- package/Marketplace/{chunk-LS2KMKMD.js → chunk-TI67Q3JR.js} +1 -1
- package/Marketplace/{chunk-RNZC6DAM.js → chunk-TMKLT3K2.js} +1 -1
- package/Marketplace/{chunk-QUEDQBZU.js → chunk-TWOIWWMO.js} +1 -1
- package/Marketplace/{chunk-74WQHBVN.js → chunk-URGPZLCB.js} +1 -1
- package/Marketplace/{chunk-GVXBDVLX.js → chunk-USBIAIK6.js} +1 -1
- package/Marketplace/{chunk-AY25KXUA.js → chunk-UYFUJBC4.js} +1 -1
- package/Marketplace/{chunk-L74PANZ5.js → chunk-V3ZRQKJA.js} +1 -1
- package/Marketplace/{chunk-UQFILVPA.js → chunk-WGCIF2R4.js} +2 -2
- package/Marketplace/{chunk-7ES3PHES.js → chunk-X4B2FYY3.js} +1 -1
- package/Marketplace/{chunk-JX63Y4CW.js → chunk-X52QA4QU.js} +1 -1
- package/Marketplace/{chunk-5EDCBXCE.js → chunk-XLWWNO5M.js} +1 -1
- package/Marketplace/{chunk-2REDCSBO.js → chunk-XONEJSCE.js} +1 -1
- package/Marketplace/{chunk-R5WARQUS.js → chunk-Y4XF2TXJ.js} +1 -1
- package/Marketplace/{chunk-HZPILY4V.js → chunk-YEDXFYTD.js} +1 -1
- package/Marketplace/{chunk-LSWILW54.js → chunk-YF4XELSP.js} +1 -1
- package/Marketplace/{chunk-2WHJU6CS.js → chunk-YU2SDRUC.js} +1 -1
- package/Marketplace/{chunk-RT3SMV6M.js → chunk-ZYQD6SBV.js} +1 -1
- package/Marketplace/index.html +4 -4
- package/Marketplace/{main-KIV2XNXR.js → main-YKZPM7WW.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-EMJTQYVO.js +0 -1
- package/Marketplace/chunk-OLANEXLB.js +0 -1
- package/Marketplace/chunk-RXQX7567.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as I,b as P}from"./chunk-
|
|
1
|
+
import{a as I,b as P}from"./chunk-GZS2MOSK.js";import{i as g}from"./chunk-P2AADVEN.js";import{a as S}from"./chunk-CGOB6Y3X.js";import{b as C,e as m}from"./chunk-WN5DZGA4.js";import{c as o}from"./chunk-EUYQST7Q.js";import{J as h,ea as l,ja as f,oa as u,pa as d,r as c}from"./chunk-OJMQBH6T.js";var V=(()=>{class i{constructor(t,e,n){this.httpService=t,this.toastrService=e,this.notificationService=n,this.authService=d(g),this.scanChannelToastr=d(I),this.channelOptions=this.authService.getChannels()}loader(t=o.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:t})}LoadInPOS(t=o.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:t})}filterChannelByTypeId(t,e){return t.filter(n=>e.findIndex(a=>n.TypeID==a)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(t){let e={ID:t};return this.httpService.post("/api/product/TotalProductLive",e)}clearCacheChannel(t){let e={ID:t};return this.httpService.post("/api/Channel/ClearCacheChannel",e)}detachProduct(t){return this.httpService.post("/api/product/Detach",t)}uploadSingleProduct(t,e){let n={Channel:e,Products:t};return this.httpService.post("api/product/UploadMultipleChannel",n).pipe(l(a=>{this.showToastrSuccessUploadSingle(a,t[0])}),h(a=>(this.showToastErrorUploadSingle(a,t[0]),c(()=>new Error(a)))))}uploadMultipleProduct(t,e){let n={Channel:e,Products:t};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",n).pipe(l(a=>{this.showToastrUploadMultiple(a.Message)}),h(a=>(this.showToastrUploadMultiple(a.error?.Message),c(()=>new Error(a)))))}uploadNotInChannel(t,e){let n={Products:t,Channel:e};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",n).pipe(l(a=>{this.showToastrUploadMultiple(a)}),h(a=>(this.showToastrUploadMultiple(a.error?.Message),c(()=>new Error(a)))))}scanSingle(t,e){let n={ID:t,SKU:e};return this.httpService.post("/api/product/ScanSingle",n)}scanNotInChannel(t){let e={ID:t};return this.httpService.post("/api/product/ScanNotinChannel",e)}findAllSoldInChannel(t){return this.httpService.post("/api/product/GetSoldInChannel",t)}scanAll(t,e,n,a=!1){let s={ID:t,ScanFull:e,UpdatedProduct:n,Async:a};return this.httpService.post("/api/product/ScanOptimized",s)}scanAsyncProductV2(t,e,n){let a={ID:t,ScanFull:e,UpdatedProduct:n,Async:!0};return this.httpService.post(S.ScanAsyncProductV2,a).pipe(l(s=>{this.notificationService.subscribeToJobGroup(s.JobID)}))}scanSyncProductV2(t,e,n){let a={ID:t,ScanFull:e,UpdatedProduct:n,Async:!1};return this.httpService.post(S.ScanSyncProductV2,a)}scanProductV2(t,e,n,a=!1){let s=this.findChannelById(t,this.channelOptions);return a?this.scanAsyncProductV2(t,e,n).pipe(l(r=>{this.scanChannelToastr.showToast({text:"Scan Job Started",detail:`JobID: ${r.JobID}`,severity:"info",data:{channelName:s.Name,channelTypeId:s.TypeID,jobId:r.JobID}})})):this.scanSyncProductV2(t,e,n).pipe(l(r=>{this.successToastrScanAllProduct(r,s,!n)}))}scanCompareToPos(t){return this.httpService.post("/api/product/CompareMarketplaceToPOS",t)}getVariantCodesProduct(t){return(t.Variants||[]).map(a=>a.Code)}downloadMultipleProduct(t){let e=t.map(n=>({ChannelItemID:n.ChannelItemID,ChannelID:n.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",e).pipe(l(n=>{this.toastrService.success(`${n.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(t){let e={ChannelItemID:t.ChannelItemID,ChannelID:t.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",e).pipe(l(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(t=[]){let e=[];return t.forEach(n=>{n.Variants.forEach(a=>{e=[...e,a.Code]})}),e}filterUnselectedChannel(t,e){let n=[];t.forEach(s=>{n=[...n,...s.Channel]});let a;if(!n||n.length==0)a=e;else{let s=[];a=e.filter(r=>(s=n.filter(p=>p.ChannelID==r.ID),s.length!==t.length))}return a}findChannelById(t,e){return e.find(n=>n.ID==t)}sortChannel(t=[]){return t.sort((e,n)=>e.TypeID<n.TypeID?1:e.TypeID===n.TypeID?0:-1)}hasSelection(t=[]){return this.selectedProduct(t).length>0}selectedProduct(t=[]){return t.filter(e=>e.selected)}hasSelectionVariant(t){return this.selectedVariantProduct(t).length>0}selectedVariantProduct(t){let e=[];return t.forEach(n=>{e=[...e,...n.Variants!=null?n.Variants.filter(a=>a.selected):""]}),e}getChannelProduct(t){let e=t.Variants||[],n=[];for(let a of e)if(a.Channel!=null)for(let s of a.Channel)n.filter(r=>r.ChannelID==s.ChannelID).length==0&&n.push(s);return this.sortChannel(n)}successToastrScanAllProduct(t,e,n){let a=t.InChannel?t?.InChannel?.Product:0,s=t?.NotInPOS?.Product?t?.NotInPOS?.Product:0,r=o.IsNotEmpty(t.LastUpdate)?o.convertToReadableDate(t.LastUpdate):null;n?this.toastrService.success(`
|
|
2
2
|
${s+a} product updates in ${e.Name} </br>
|
|
3
3
|
(${a} In Channel + ${s} Not In Pos)
|
|
4
4
|
${o.IsNotEmpty(r)?"since "+r:""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ie,b as Oe}from"./chunk-L74PANZ5.js";import{a as Ae,b as Ve,c as De}from"./chunk-RU43F4UK.js";import{a as Fe}from"./chunk-DRVWJPA2.js";import{a as H}from"./chunk-FYB62QQV.js";import{a as Ne}from"./chunk-67HPC5Y3.js";import"./chunk-XPCRS7AL.js";import"./chunk-MX5SR3SR.js";import{a as Pe}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as Ee}from"./chunk-CO5XZENC.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-C7YK5TDP.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-ACIMXBIC.js";import"./chunk-PYXL7UF7.js";import{a as Me}from"./chunk-LDL3A7NM.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as x}from"./chunk-CGOB6Y3X.js";import{b as M,e as z}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{b as m,c as E}from"./chunk-RXQX7567.js";import{b as we,d as ve,f as xe,g as ye,h as ke,m as Te,n as Le}from"./chunk-HJXYT6MI.js";import{A as R,b as fe,c as _e,h as O,m as W,o as Ce}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as be,s as Se}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as ue,k as he,m as ge,n as I}from"./chunk-FXQKRJWU.js";import{$c as P,Ac as oe,Bc as re,Cc as ae,G as J,Gb as V,Gc as s,Hc as L,Ic as D,Kc as C,Lc as b,Mb as y,Mc as S,Nc as le,Oc as pe,Pc as N,Qc as se,Ra as j,Sc as me,Yb as v,Z as X,aa as Y,ac as ee,ad as F,bd as ce,dc as k,ec as te,gc as ie,hc as ne,ic as n,ja as A,jc as r,kc as g,oa as B,oc as T,pa as _,pb as Z,rb as p,rd as de,tc as f,uc as h,v as G,xb as $,ya as d,za as u}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as q,b as K}from"./chunk-66YHNWRR.js";var We=(()=>{class o{constructor(e,t){this.http=e,this.toastr=t}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(G(a=>(a&&(a.Number=e),a)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case m.Tokopedia:let c=window.open("about:blank","_blank");c.document.write(e.File),c.document.close();break;case m.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 m.Shopee:var i=Uint8Array.from(atob(e.File),l=>l.charCodeAt(0)),a=new Blob([i],{type:"octet/stream"});E.openDownloadFile(a,`${e?.Number}.pdf`);break;case m.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}static{this.\u0275fac=function(t){return new(t||o)(B(z),B(M))}}static{this.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Re=(()=>{class o{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}static{this.\u0275fac=function(t){return new(t||o)($(we))}}static{this.\u0275cmp=V({type:o,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&&(n(0,"div",0)(1,"h2",1),s(2,"Cetak label pesanan"),r(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),s(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),n(8,"div",5)(9,"mat-checkbox",6),S("ngModelChange",function(c){return b(i.tandaiSudahDicetak,c)||(i.tandaiSudahDicetak=c),c}),r(),n(10,"span",7),s(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),f("click",function(){return i.onCancel()}),s(14,"Cancel"),r(),n(15,"button",10),f("click",function(){return i.onPrint()}),s(16,"Cetak Pesanan"),r()()()),t&2&&(p(9),C("ngModel",i.tandaiSudahDicetak))},dependencies:[I,R,O,W,ke,ye,xe],encapsulation:2})}}return o})();var Q=(()=>{class o{constructor(){this.httpService=_(z),this.shippingLabelService=_(We),this.toastrService=_(M),this.dialog=_(ve)}printShippingLabel(e){switch(e?.MarketType){case m.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Shopee));break;case m.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Tiktok));break;case m.Tokopedia:this.dialog.open(Re).afterClosed().pipe(J(t=>E.IsNotEmpty(t)),Y(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Tokopedia));break;case m.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Lazada));break;case m.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(a=>({OrderNumber:a.Number,ShopID:a.ShopID})),i="";switch(e[0]?.MarketType){case m.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case m.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case m.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(a=>{var c=Uint8Array.from(atob(a.File),ze=>ze.charCodeAt(0)),l=new Blob([c],{type:"octet/stream"});E.openDownloadFile(l,`${a?.Name}.pdf`)})}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=A({token:o,factory:o.\u0275fac})}}return o})();var je=["contextMenu"],He=o=>({"td-cell-hover":o});function Ue(o,w){if(o&1){let e=T();n(0,"button",20),f("click",function(){d(e);let i=h(),a=N(0);return u(i.onDowloadShippingLabel(a))}),g(1,"i",21),n(2,"span"),s(3,"Download Shipping Label"),r()()}}function Qe(o,w){if(o&1){let e=T();n(0,"input",45),S("ngModelChange",function(i){d(e);let a=h().$implicit;return b(a.selected,i)||(a.selected=i),u(i)}),f("ngModelChange",function(){d(e);let i=h(3),a=N(0);return u(i.onSelectOrders(a))}),r()}if(o&2){let e=h().$implicit,t=h(2);C("ngModel",e.selected),v("disabled",t.selectedChannelType()!=null&&t.selectedChannelType()!=e.MarketType)}}function qe(o,w){if(o&1&&g(0,"variants-dropdown",38),o&2){let e=h().$implicit;v("variants",e==null?null:e.Variants)}}function Ke(o,w){if(o&1&&g(0,"variant-with-image",39),o&2){let e=h().$implicit;v("variant",e==null?null:e.Variants[0])}}function Ge(o,w){if(o&1&&(n(0,"span"),s(1),r()),o&2){let e=h().$implicit;p(),D("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Je(o,w){if(o&1){let e=T();n(0,"button",46),f("click",function(){d(e);let i=h().$implicit,a=h(2);return u(a.onPrintShippingLabel(i))}),g(1,"i",47),r()}}function Xe(o,w){if(o&1){let e=T();n(0,"tr")(1,"td"),y(2,Qe,1,2,"input",30),r(),n(3,"td")(4,"div",31),g(5,"img",32),P(6,"channelImage"),n(7,"div",33)(8,"div"),s(9),r(),n(10,"small",34)(11,"span"),s(12),r()()()()(),n(13,"td")(14,"div",35)(15,"div",36)(16,"div"),g(17,"order-link",37),r()(),n(18,"small"),s(19),P(20,"date"),r()()(),n(21,"td"),s(22),r(),n(23,"td"),y(24,qe,1,1,"variants-dropdown",38)(25,Ke,1,1,"variant-with-image",39),r(),n(26,"td",40),s(27),P(28,"number"),r(),n(29,"td",41),f("mouseenter",function(i){let a=d(e).$implicit,c=h(2);return u(c.onMouseEnter(i,a))}),n(30,"div",42)(31,"div",35)(32,"div",36)(33,"span"),s(34),r(),y(35,Ge,2,1,"span"),r(),n(36,"small"),s(37),r()()()(),n(38,"td",43),y(39,Je,2,0,"button",44),r()()}if(o&2){let e=w.$implicit,t=h(2);p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?2:-1),p(3),v("src",F(6,16,e==null?null:e.MarketType),Z)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(4),L(e.Outlet),p(3),L(e.ChannelName),p(5),v("order",e),p(2),D(" ",ce(20,18,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(3),L(e.Customer),p(),ee(me(23,He,(e.Variants==null?null:e.Variants.length)>1)),p(),k((e.Variants==null?null:e.Variants.length)>1?24:25),p(3),L(F(28,21,e.Amount)),p(7),L(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),k(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?35:-1),p(2),D(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?39:-1)}}function Ye(o,w){if(o&1){let e=T();n(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),g(4,"th",25),n(5,"th",26),s(6,"Outlet"),r(),n(7,"th",26),s(8,"Number"),r(),n(9,"th",26),s(10,"Customer"),r(),n(11,"th"),s(12,"Items"),r(),n(13,"th",27),s(14,"Amount"),r(),n(15,"th",26),s(16,"Shipping"),r(),g(17,"th",28),r()(),n(18,"tbody"),ie(19,Xe,40,25,"tr",null,te),r()(),n(21,"app-custom-paginator",29),f("next",function(){d(e);let i=h();return u(i.initAwaitingCollection())})("previous",function(){d(e);let i=h();return u(i.initAwaitingCollection())}),r()()}if(o&2){let e=h(),t=N(0);p(19),ne(t),p(2),v("filter",e.filter())("totaldata",t==null?null:t.length)}}function Ze(o,w){o&1&&(n(0,"div",18),g(1,"app-empty-state"),r())}var Jt=(()=>{class o{constructor(){this.printShippingService=_(Q),this.orderService=_(H),this.toastr=_(M),this.fulfillmentService=_(Ie),this.channelType=m,this.selectedOrders=j([]),this.selectedChannelType=de(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=j({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=>K(q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(X(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)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=V({type:o,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&oe(je,5),t&2){let a;re(a=ae())&&(i.contextMenuEl=a.first)}},features:[se([H,Q])],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","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"],[1,"d-flex","align-items-end","gap-2"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[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 a=T();le(0),P(1,"async"),n(2,"mainpanel",1),f("onSubmit",function(){return d(a),u(i.initAwaitingCollection())}),S("textChange",function(l){return d(a),b(i.filter().Number,l)||(i.filter().Number=l),u(l)}),n(3,"actions"),y(4,Ue,4,0,"button",2),n(5,"a",3),g(6,"i",4),n(7,"span"),s(8,"Order Fulfillment Display"),r()()(),n(9,"filters")(10,"div")(11,"label",5),s(12,"Channel"),r(),n(13,"app-channel-options-v2",6),S("ngModelChange",function(l){return d(a),b(i.filter().ListChannelID,l)||(i.filter().ListChannelID=l),u(l)}),r()(),n(14,"div",7)(15,"label",5),s(16,"From/To"),r(),n(17,"div",8)(18,"datepicker",9),S("dateChange",function(l){return d(a),b(i.filter().From,l)||(i.filter().From=l),u(l)}),r()(),n(19,"div")(20,"datepicker",10),S("dateChange",function(l){return d(a),b(i.filter().To,l)||(i.filter().To=l),u(l)}),r()()(),n(21,"div",7)(22,"label",11),s(23,"Page Number"),r(),n(24,"input",12),S("ngModelChange",function(l){return d(a),b(i.filter().PageNumber,l)||(i.filter().PageNumber=l),u(l)}),r()(),n(25,"div",7)(26,"label",11),s(27,"Page Size"),r(),n(28,"input",13),S("ngModelChange",function(l){return d(a),b(i.filter().PageSize,l)||(i.filter().PageSize=l),u(l)}),r()()(),n(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),y(33,Ye,22,2,"div",17)(34,Ze,2,0,"div",18),r()()()()(),n(35,"app-context-menu",19,0),f("onSelectItem",function(l){return d(a),u(i.onSelectContextItem(l))}),r()}if(t&2){let a=pe(F(1,10,i.awaitingCollections$));p(2),C("text",i.filter().Number),p(2),k(i.selectedOrders().length>0?4:-1),p(9),v("multiple",!0),C("ngModel",i.filter().ListChannelID),p(5),C("date",i.filter().From),p(2),C("date",i.filter().To),p(4),C("ngModel",i.filter().PageNumber),p(4),C("ngModel",i.filter().PageSize),p(5),k((a==null?null:a.length)>0?33:34),p(2),v("items",i.contextMenuItems)}},dependencies:[I,ue,ge,he,Le,Te,Pe,Me,R,_e,Ce,fe,O,W,Ae,Ve,De,Ne,Se,be,Fe,Oe,Ee],encapsulation:2})}}return o})();export{Jt as AwaitingCollectionComponent};
|
|
1
|
+
import{a as Ie,b as Oe}from"./chunk-V3ZRQKJA.js";import{a as Ae,b as Ve,c as De}from"./chunk-T27ABFCP.js";import{a as Fe}from"./chunk-FHNST4Y7.js";import{a as H}from"./chunk-LLHPMXKP.js";import{a as Ne}from"./chunk-67HPC5Y3.js";import"./chunk-XPCRS7AL.js";import"./chunk-MX5SR3SR.js";import{a as Pe}from"./chunk-KTB223SK.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as Ee}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-63ANFYRV.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-ACIMXBIC.js";import"./chunk-PYXL7UF7.js";import{a as Me}from"./chunk-LDL3A7NM.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as x}from"./chunk-CGOB6Y3X.js";import{b as M,e as z}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{b as m,c as E}from"./chunk-EUYQST7Q.js";import{b as we,d as ve,f as xe,g as ye,h as ke,m as Te,n as Le}from"./chunk-HJXYT6MI.js";import{A as R,b as fe,c as _e,h as O,m as W,o as Ce}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as be,s as Se}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as ue,k as he,m as ge,n as I}from"./chunk-FXQKRJWU.js";import{$c as P,Ac as oe,Bc as re,Cc as ae,G as J,Gb as V,Gc as s,Hc as L,Ic as D,Kc as C,Lc as b,Mb as y,Mc as S,Nc as le,Oc as pe,Pc as N,Qc as se,Ra as j,Sc as me,Yb as v,Z as X,aa as Y,ac as ee,ad as F,bd as ce,dc as k,ec as te,gc as ie,hc as ne,ic as n,ja as A,jc as r,kc as g,oa as B,oc as T,pa as _,pb as Z,rb as p,rd as de,tc as f,uc as h,v as G,xb as $,ya as d,za as u}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as q,b as K}from"./chunk-66YHNWRR.js";var We=(()=>{class o{constructor(e,t){this.http=e,this.toastr=t}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(G(a=>(a&&(a.Number=e),a)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case m.Tokopedia:let c=window.open("about:blank","_blank");c.document.write(e.File),c.document.close();break;case m.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 m.Shopee:var i=Uint8Array.from(atob(e.File),l=>l.charCodeAt(0)),a=new Blob([i],{type:"octet/stream"});E.openDownloadFile(a,`${e?.Number}.pdf`);break;case m.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}static{this.\u0275fac=function(t){return new(t||o)(B(z),B(M))}}static{this.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Re=(()=>{class o{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}static{this.\u0275fac=function(t){return new(t||o)($(we))}}static{this.\u0275cmp=V({type:o,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&&(n(0,"div",0)(1,"h2",1),s(2,"Cetak label pesanan"),r(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),s(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),n(8,"div",5)(9,"mat-checkbox",6),S("ngModelChange",function(c){return b(i.tandaiSudahDicetak,c)||(i.tandaiSudahDicetak=c),c}),r(),n(10,"span",7),s(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),f("click",function(){return i.onCancel()}),s(14,"Cancel"),r(),n(15,"button",10),f("click",function(){return i.onPrint()}),s(16,"Cetak Pesanan"),r()()()),t&2&&(p(9),C("ngModel",i.tandaiSudahDicetak))},dependencies:[I,R,O,W,ke,ye,xe],encapsulation:2})}}return o})();var Q=(()=>{class o{constructor(){this.httpService=_(z),this.shippingLabelService=_(We),this.toastrService=_(M),this.dialog=_(ve)}printShippingLabel(e){switch(e?.MarketType){case m.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Shopee));break;case m.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Tiktok));break;case m.Tokopedia:this.dialog.open(Re).afterClosed().pipe(J(t=>E.IsNotEmpty(t)),Y(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Tokopedia));break;case m.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Lazada));break;case m.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(a=>({OrderNumber:a.Number,ShopID:a.ShopID})),i="";switch(e[0]?.MarketType){case m.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case m.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case m.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(a=>{var c=Uint8Array.from(atob(a.File),ze=>ze.charCodeAt(0)),l=new Blob([c],{type:"octet/stream"});E.openDownloadFile(l,`${a?.Name}.pdf`)})}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=A({token:o,factory:o.\u0275fac})}}return o})();var je=["contextMenu"],He=o=>({"td-cell-hover":o});function Ue(o,w){if(o&1){let e=T();n(0,"button",20),f("click",function(){d(e);let i=h(),a=N(0);return u(i.onDowloadShippingLabel(a))}),g(1,"i",21),n(2,"span"),s(3,"Download Shipping Label"),r()()}}function Qe(o,w){if(o&1){let e=T();n(0,"input",45),S("ngModelChange",function(i){d(e);let a=h().$implicit;return b(a.selected,i)||(a.selected=i),u(i)}),f("ngModelChange",function(){d(e);let i=h(3),a=N(0);return u(i.onSelectOrders(a))}),r()}if(o&2){let e=h().$implicit,t=h(2);C("ngModel",e.selected),v("disabled",t.selectedChannelType()!=null&&t.selectedChannelType()!=e.MarketType)}}function qe(o,w){if(o&1&&g(0,"variants-dropdown",38),o&2){let e=h().$implicit;v("variants",e==null?null:e.Variants)}}function Ke(o,w){if(o&1&&g(0,"variant-with-image",39),o&2){let e=h().$implicit;v("variant",e==null?null:e.Variants[0])}}function Ge(o,w){if(o&1&&(n(0,"span"),s(1),r()),o&2){let e=h().$implicit;p(),D("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Je(o,w){if(o&1){let e=T();n(0,"button",46),f("click",function(){d(e);let i=h().$implicit,a=h(2);return u(a.onPrintShippingLabel(i))}),g(1,"i",47),r()}}function Xe(o,w){if(o&1){let e=T();n(0,"tr")(1,"td"),y(2,Qe,1,2,"input",30),r(),n(3,"td")(4,"div",31),g(5,"img",32),P(6,"channelImage"),n(7,"div",33)(8,"div"),s(9),r(),n(10,"small",34)(11,"span"),s(12),r()()()()(),n(13,"td")(14,"div",35)(15,"div",36)(16,"div"),g(17,"order-link",37),r()(),n(18,"small"),s(19),P(20,"date"),r()()(),n(21,"td"),s(22),r(),n(23,"td"),y(24,qe,1,1,"variants-dropdown",38)(25,Ke,1,1,"variant-with-image",39),r(),n(26,"td",40),s(27),P(28,"number"),r(),n(29,"td",41),f("mouseenter",function(i){let a=d(e).$implicit,c=h(2);return u(c.onMouseEnter(i,a))}),n(30,"div",42)(31,"div",35)(32,"div",36)(33,"span"),s(34),r(),y(35,Ge,2,1,"span"),r(),n(36,"small"),s(37),r()()()(),n(38,"td",43),y(39,Je,2,0,"button",44),r()()}if(o&2){let e=w.$implicit,t=h(2);p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?2:-1),p(3),v("src",F(6,16,e==null?null:e.MarketType),Z)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(4),L(e.Outlet),p(3),L(e.ChannelName),p(5),v("order",e),p(2),D(" ",ce(20,18,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(3),L(e.Customer),p(),ee(me(23,He,(e.Variants==null?null:e.Variants.length)>1)),p(),k((e.Variants==null?null:e.Variants.length)>1?24:25),p(3),L(F(28,21,e.Amount)),p(7),L(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),k(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?35:-1),p(2),D(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?39:-1)}}function Ye(o,w){if(o&1){let e=T();n(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),g(4,"th",25),n(5,"th",26),s(6,"Outlet"),r(),n(7,"th",26),s(8,"Number"),r(),n(9,"th",26),s(10,"Customer"),r(),n(11,"th"),s(12,"Items"),r(),n(13,"th",27),s(14,"Amount"),r(),n(15,"th",26),s(16,"Shipping"),r(),g(17,"th",28),r()(),n(18,"tbody"),ie(19,Xe,40,25,"tr",null,te),r()(),n(21,"app-custom-paginator",29),f("next",function(){d(e);let i=h();return u(i.initAwaitingCollection())})("previous",function(){d(e);let i=h();return u(i.initAwaitingCollection())}),r()()}if(o&2){let e=h(),t=N(0);p(19),ne(t),p(2),v("filter",e.filter())("totaldata",t==null?null:t.length)}}function Ze(o,w){o&1&&(n(0,"div",18),g(1,"app-empty-state"),r())}var Jt=(()=>{class o{constructor(){this.printShippingService=_(Q),this.orderService=_(H),this.toastr=_(M),this.fulfillmentService=_(Ie),this.channelType=m,this.selectedOrders=j([]),this.selectedChannelType=de(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=j({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=>K(q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(X(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)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=V({type:o,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&oe(je,5),t&2){let a;re(a=ae())&&(i.contextMenuEl=a.first)}},features:[se([H,Q])],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","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"],[1,"d-flex","align-items-end","gap-2"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[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 a=T();le(0),P(1,"async"),n(2,"mainpanel",1),f("onSubmit",function(){return d(a),u(i.initAwaitingCollection())}),S("textChange",function(l){return d(a),b(i.filter().Number,l)||(i.filter().Number=l),u(l)}),n(3,"actions"),y(4,Ue,4,0,"button",2),n(5,"a",3),g(6,"i",4),n(7,"span"),s(8,"Order Fulfillment Display"),r()()(),n(9,"filters")(10,"div")(11,"label",5),s(12,"Channel"),r(),n(13,"app-channel-options-v2",6),S("ngModelChange",function(l){return d(a),b(i.filter().ListChannelID,l)||(i.filter().ListChannelID=l),u(l)}),r()(),n(14,"div",7)(15,"label",5),s(16,"From/To"),r(),n(17,"div",8)(18,"datepicker",9),S("dateChange",function(l){return d(a),b(i.filter().From,l)||(i.filter().From=l),u(l)}),r()(),n(19,"div")(20,"datepicker",10),S("dateChange",function(l){return d(a),b(i.filter().To,l)||(i.filter().To=l),u(l)}),r()()(),n(21,"div",7)(22,"label",11),s(23,"Page Number"),r(),n(24,"input",12),S("ngModelChange",function(l){return d(a),b(i.filter().PageNumber,l)||(i.filter().PageNumber=l),u(l)}),r()(),n(25,"div",7)(26,"label",11),s(27,"Page Size"),r(),n(28,"input",13),S("ngModelChange",function(l){return d(a),b(i.filter().PageSize,l)||(i.filter().PageSize=l),u(l)}),r()()(),n(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),y(33,Ye,22,2,"div",17)(34,Ze,2,0,"div",18),r()()()()(),n(35,"app-context-menu",19,0),f("onSelectItem",function(l){return d(a),u(i.onSelectContextItem(l))}),r()}if(t&2){let a=pe(F(1,10,i.awaitingCollections$));p(2),C("text",i.filter().Number),p(2),k(i.selectedOrders().length>0?4:-1),p(9),v("multiple",!0),C("ngModel",i.filter().ListChannelID),p(5),C("date",i.filter().From),p(2),C("date",i.filter().To),p(4),C("ngModel",i.filter().PageNumber),p(4),C("ngModel",i.filter().PageSize),p(5),k((a==null?null:a.length)>0?33:34),p(2),v("items",i.contextMenuItems)}},dependencies:[I,ue,ge,he,Le,Te,Pe,Me,R,_e,Ce,fe,O,W,Ae,Ve,De,Ne,Se,be,Fe,Oe,Ee],encapsulation:2})}}return o})();export{Jt as AwaitingCollectionComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y}from"./chunk-
|
|
1
|
+
import{a as Y}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-CGOB6Y3X.js";import{e as F}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import{m as J,n as G}from"./chunk-HJXYT6MI.js";import{A as j,c as K,h as R,m as N,p as O}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{g as T,j as W,l as D,n as U}from"./chunk-FXQKRJWU.js";import{$c as P,Gb as I,Gc as a,Hc as V,Kc as h,Lc as g,Mb as S,Mc as f,Nc as E,Oc as L,Pc as M,Ra as C,Yb as m,Z as b,ad as v,dc as k,ic as n,jc as i,kc as A,oc as _,pa as B,rb as d,tc as x,uc as u,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function q(o,w){if(o&1){let t=_();n(0,"input",30),f("ngModelChange",function(e){p(t);let r=u();return g(r.sku,e)||(r.sku=e),s(e)}),i()}if(o&2){let t=u();h("ngModel",t.sku)}}function z(o,w){if(o&1){let t=_();n(0,"input",31),f("ngModelChange",function(e){p(t);let r=u();return g(r.itemId,e)||(r.itemId=e),s(e)}),i()}if(o&2){let t=u();h("ngModel",t.itemId)}}function Q(o,w){if(o&1&&(n(0,"pre",28),a(1),P(2,"json"),i()),o&2){u();let t=M(35);d(),V(v(2,1,t))}}function X(o,w){o&1&&(n(0,"p",29),a(1," Your data will be shown here once it's available "),i())}var me=(()=>{class o{constructor(){this.httpService=B(F),this.selectedChannel=C(null),this.sku=C(null),this.itemId=C(null),this.searchBy="sku"}initProductLog(){let t={ChannelID:this.selectedChannel()};this.searchBy==="sku"?t.SKU=this.sku():t.ItemID=this.itemId(),this.productLog$=this.httpService.post(H.GetProductApiLog,t).pipe(b(1))}copyToClipboard(t){if(!t)return;let c=typeof t=="string"?t:JSON.stringify(t,null,2);navigator.clipboard.writeText(c),alert("Copied to clipboard!")}static{this.\u0275fac=function(c){return new(c||o)}}static{this.\u0275cmp=I({type:o,selectors:[["app-product-api"]],decls:50,vars:14,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","style","height: 40px","class","form-control rounded-1","placeholder","Product Code / SKU",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","style","height: 40px","class","form-control rounded-1","placeholder","ItemID is Product id from seller center",3,"ngModel","ngModelChange",4,"ngIf"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"]],template:function(c,e){if(c&1){let r=_();n(0,"mainpanel",0)(1,"actions")(2,"button",1),x("click",function(){return p(r),s(e.initProductLog())}),A(3,"i",2),a(4," Search "),i()(),n(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),a(12,"Channel"),i(),n(13,"p",8),a(14," View logs related to Product API Detail "),i()(),n(15,"div",9)(16,"app-channel-options-v2",10),f("ngModelChange",function(l){return p(r),g(e.selectedChannel,l)||(e.selectedChannel=l),s(l)}),i()()(),n(17,"div",11)(18,"div",7)(19,"h6"),a(20,"Product Code / SKU"),i(),n(21,"p",8),a(22," Product SKU or Code from Channel Product "),i()(),n(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),f("ngModelChange",function(l){return p(r),g(e.searchBy,l)||(e.searchBy=l),s(l)}),i(),n(27,"label",15),a(28,"Search by SKU"),i()(),n(29,"div",13)(30,"input",16),f("ngModelChange",function(l){return p(r),g(e.searchBy,l)||(e.searchBy=l),s(l)}),i(),n(31,"label",17),a(32,"Search by ItemID"),i()()(),S(33,q,1,1,"input",18)(34,z,1,1,"input",19),i()()()(),E(35),P(36,"async"),n(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),a(42,"Response"),i(),n(43,"button",24),x("click",function(){p(r);let l=M(35);return s(e.copyToClipboard(l))}),a(44," Copy "),i()(),n(45,"div",25)(46,"div",26)(47,"div",27),S(48,Q,3,3,"pre",28)(49,X,2,0,"p",29),i()()()()()()()()()}if(c&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),h("ngModel",e.selectedChannel),d(10),h("ngModel",e.searchBy),m("value","sku"),d(4),h("ngModel",e.searchBy),m("value","itemid"),d(3),m("ngIf",e.searchBy==="sku"),d(),m("ngIf",e.searchBy==="itemid"),d();let r=L(v(36,11,e.productLog$));d(8),m("disabled",!r),d(5),k(r?48:49)}},dependencies:[U,T,W,D,j,K,O,R,N,G,J,Y],encapsulation:2})}}return o})();export{me as ProductApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D,b as W}from"./chunk-
|
|
1
|
+
import{a as D,b as W}from"./chunk-KWHVCPX2.js";import"./chunk-YERZ6W22.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import{m as Q,n as U}from"./chunk-HJXYT6MI.js";import"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{r as z}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{E as J,H as q,J as K,g as O,j,k as A,l as H,m as $,n as G}from"./chunk-FXQKRJWU.js";import{$c as m,Gb as k,Gc as n,Hc as c,Ic as v,Mb as u,Qc as R,Ra as C,Uc as V,Yb as s,Z as M,aa as w,ac as F,ad as f,bd as P,dc as S,ec as L,gc as B,hc as N,ic as i,jc as e,kc as y,lc as T,mc as h,oc as I,pa as x,rb as r,tc as E,uc as p,ya as g,za as b}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var X=(o,d,a)=>({"text-warning":o,"text-success":d,"text-danger":a});function Y(o,d){o&1&&n(0," In Progress ")}function Z(o,d){o&1&&n(0," Completed ")}function ee(o,d){o&1&&n(0," Failed ")}function te(o,d){if(o&1&&(i(0,"tr")(1,"th",28)(2,"span"),n(3),e()(),i(4,"td"),n(5),e()()),o&2){let a=d.$implicit;r(3),v(" ",a.Key," "),r(2),c(a.Value)}}function ie(o,d){if(o&1&&(i(0,"table",26)(1,"tbody"),B(2,te,6,2,"tr",null,L),e()()),o&2){let a=p().ngIf;r(2),N(a.ParsedStatus)}}function ne(o,d){if(o&1){let a=I();i(0,"div",14)(1,"div",15)(2,"div",16)(3,"h5"),n(4,"PerfLog"),e(),i(5,"div")(6,"button",17),E("click",function(){g(a);let l=p().ngIf,_=p();return b(_.copyPerfLogToClipboard(l))}),y(7,"i",18),e()()(),i(8,"div",29)(9,"div",30)(10,"div",31)(11,"pre"),n(12),m(13,"json"),e()()()()()()}if(o&2){let a=p().ngIf,t=p();r(6),s("matTooltip",t.copyToClipboardPerflog()),r(6),c(f(13,2,a.ParsedPerfLog))}}function oe(o,d){if(o&1&&(T(0),i(1,"div",32)(2,"div",15)(3,"div",7)(4,"h5"),n(5,"StackTrace"),e()(),i(6,"div",8)(7,"div",30)(8,"div",31)(9,"pre"),n(10),e()()()()()(),h()),o&2){let a=p().ngIf;r(10),c(a==null?null:a.Exception)}}function ae(o,d){if(o&1){let a=I();T(0),i(1,"mainpanel",1)(2,"actions")(3,"a",2),n(4,"Back"),e()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),n(12,"General"),e()(),i(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),n(18,"Created Date"),e(),i(19,"div")(20,"span"),n(21),m(22,"date"),e()()()(),i(23,"div",10)(24,"div",11)(25,"label"),n(26,"Duration"),e(),i(27,"div",12)(28,"span"),n(29),m(30,"number"),e()()()(),i(31,"div",10)(32,"div",11)(33,"label"),n(34,"Creator"),e(),i(35,"div")(36,"span"),n(37),e()()()(),i(38,"div",10)(39,"div",11)(40,"label"),n(41,"Status"),e(),i(42,"div"),u(43,Y,1,0)(44,Z,1,0)(45,ee,1,0),e()()()(),i(46,"div",13)(47,"div",14)(48,"div",11)(49,"label"),n(50,"Job ID"),e(),i(51,"div"),n(52),e()()(),i(53,"div",14)(54,"div",11)(55,"label"),n(56,"Label"),e(),i(57,"div")(58,"span"),n(59),e()()()()()()()()(),i(60,"div",4)(61,"div",14)(62,"div",15)(63,"div",16)(64,"h5"),n(65,"Message"),e(),i(66,"div")(67,"button",17),E("click",function(){let l=g(a).ngIf,_=p();return b(_.copyMessageToClipboard(l))}),y(68,"i",18),e()()(),i(69,"div",19)(70,"div",20)(71,"table",21)(72,"thead",22)(73,"tr")(74,"th",23),n(75," Count "),e(),i(76,"th",24),n(77," Found "),e(),i(78,"th",25),n(79," NotFound "),e()()(),i(80,"tbody")(81,"tr")(82,"td"),n(83),m(84,"number"),e(),i(85,"td"),n(86),m(87,"number"),e(),i(88,"td"),n(89),m(90,"number"),e()()()(),u(91,ie,4,0,"table",26),e()()()(),u(92,ne,14,4,"div",27)(93,oe,11,1,"ng-container",0),e()()()(),h()}if(o&2){let a,t=d.ngIf,l=p();r(),s("headerTitle","Notification "+t.ChannelName)("hideSearchBox",!0)("hideSearchDropdown",!0),r(20),c(P(22,18,t.Created,"dd MMM yyyy HH:mm:ss")),r(8),v("",P(30,21,t.DurationInSecond,"1.1-1")," s"),r(8),c(t.LoginID),r(5),F(V(30,X,t.StateID==l.scanState.InProgress,t.StateID==l.scanState.Completed,t.StateID==l.scanState.Failed)),r(),S((a=t.StateID)===l.scanState.InProgress?43:a===l.scanState.Completed?44:a===l.scanState.Failed?45:-1),r(9),v(" ",t.ID," "),r(7),c(t.ProcessLabel),r(8),s("matTooltip",l.copyToClipboardMessage()),r(16),c(f(84,24,t.OriginGetCount)),r(3),c(f(87,26,t.SkuFoundCount)),r(3),c(f(90,28,t.SkuNotFoundCount)),r(2),S(t.ParsedStatus?91:-1),r(),s("ngIf",t==null?null:t.PerfLog),r(),s("ngIf",t==null?null:t.Exception)}}var Ce=(()=>{class o{constructor(){this.notificationService=x(D),this.activatedRoute=x(J),this.scanState=W,this.copyToClipboardPerflog=C("Copy log to clipboard"),this.copyToClipboardMessage=C("Copy message to clipboard")}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(w(a=>{let t=a.ID;return this.notificationService.getNotificationDetail(t).pipe(M(1))}))}copyMessageToClipboard(a){let t=this.notificationService.createMessageCopyText(a);navigator.clipboard.writeText(t||"").then(()=>{this.copyToClipboardMessage.set("Message copied!"),setTimeout(()=>{this.copyToClipboardMessage.set("Copy message to clipboard")},5e3)})}copyPerfLogToClipboard(a){navigator.clipboard.writeText(a.PerfLog||"").then(()=>{this.copyToClipboardPerflog.set("PerfLog copied!"),setTimeout(()=>{this.copyToClipboardPerflog.set("Copy log to clipboard")},5e3)})}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=k({type:o,selectors:[["app-detail"]],features:[R([D])],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/notificationV2",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-3"],[1,"info-label-group"],[1,"text-center"],[1,"row","mt-4"],[1,"col-sm-6"],[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"btn","btn-icon-only",3,"click","matTooltip"],[1,"fa-solid","fa-copy","fs-3"],[1,"card-body","mb-5","mt-2"],[1,"col-sm-12","my-4"],[1,"table","table-bordered","table-sm"],[1,"thead-light"],["matTooltip","Total Product in Seller Center","matTooltipPosition","above"],["matTooltip","Total Product Found in Sold in Channel","matTooltipPosition","above"],["matTooltip","Total Product Found in Not in POS","matTooltipPosition","above"],[1,"table","table-bordered","mt-8","table-sm"],["class","col-sm-6",4,"ngIf"],[2,"width","138px","background-color","#f6f6f6"],[1,"card-body","border","mx-8","my-6","rounded-1"],[1,"col-sm-12","mt-2"],[1,"form-group"],[1,"col-sm-12"]],template:function(t,l){t&1&&(u(0,ae,94,34,"ng-container",0),m(1,"async")),t&2&&s("ngIf",f(1,1,l.notification$))},dependencies:[G,O,j,H,$,A,U,Q,K,q,z],encapsulation:2})}}return o})();export{Ce as DetailComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ie,b as oe}from"./chunk-PGP3WHIS.js";import{a as ee,b as te}from"./chunk-OXWPLJEW.js";import{na as Z}from"./chunk-RC5PUUVM.js";import{e as Q}from"./chunk-WN5DZGA4.js";import{b as g,c as r}from"./chunk-
|
|
1
|
+
import{a as ie,b as oe}from"./chunk-PGP3WHIS.js";import{a as ee,b as te}from"./chunk-OXWPLJEW.js";import{na as Z}from"./chunk-RC5PUUVM.js";import{e as Q}from"./chunk-WN5DZGA4.js";import{b as g,c as r}from"./chunk-EUYQST7Q.js";import{A as K,a as H,h as J,m as $}from"./chunk-5PS6ZS3N.js";import{r as X,s as Y}from"./chunk-MFQQEEHJ.js";import{i as R,j as U,n as q}from"./chunk-FXQKRJWU.js";import{$c as G,Fc as L,Gb as A,Gc as x,Ic as V,Ka as F,Kc as D,Lc as P,Mb as m,Mc as z,Qc as W,Ra as b,Yb as u,Z as S,aa as p,ad as j,cd as B,dc as M,ea as s,g as c,ia as k,ic as y,ja as I,jc as _,nc as w,oc as O,pa as f,q as l,rb as T,tc as E,uc as n,xa as N,ya as C,za as h}from"./chunk-OJMQBH6T.js";var ae=(()=>{class o{constructor(){this.httpService=f(Q),this.shopeeCategories=new c({data:[],isFirstLoad:!1}),this.tiktokCategories=new c({data:[],isFirstLoad:!1}),this.lazadaCategories=new c({data:[],isFirstLoad:!1}),this.tokopediaCategories=new c({data:[],isFirstLoad:!1}),this.wooCommerceCategories=new c({data:[],isFirstLoad:!1})}getCategories(e,i){switch(e){case g.Shopee:return this.shopeeCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getShopeeCategories(i)));case g.Tiktok:return this.tiktokCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getTiktokCategories(i)));case g.Lazada:return this.lazadaCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getLazadaCategories(i)));case g.Tokopedia:return this.tokopediaCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getTokopediaCategories(i)));case g.WooCommerce:return this.wooCommerceCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getWooCommerceCategories(i)));default:return l([])}}getShopeeCategories(e){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.shopeeCategories.next(a)}))}getTiktokCategories(e){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.tiktokCategories.next(a)}))}getLazadaCategories(e){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.lazadaCategories.next(a)}))}getTokopediaCategories(e){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.tokopediaCategories.next(a)}))}getWooCommerceCategories(e){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.wooCommerceCategories.next(a)}))}searchByIdWithParentDFS(e,i){let t=[...e];for(;t.length>0;){let a=t.pop();if(a.id===JSON.stringify(i))return a;if(a.children&&a.children.length>0)for(let v of a.children)v.parent=a,t.push(v)}return null}searchSelectAbleNode(e){let i=null;if(e.selectable)return e;let t=e.children?e.children:[];if(t.length==0)return e;for(let a of t){if(a.children.length==0&&a.selectable)return a;if(i=this.searchSelectAbleNode(a),i)return i}return i}generateCategoryLabel(e){let i="";return e?i=r.getLabelPathTree(e):i="Select a Category",i}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275prov=I({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function ne(o,d){o&1&&w(0)}function se(o,d){if(o&1&&(y(0,"p-floatLabel",1),m(1,ne,1,0,"ng-container",2),y(2,"label",3),x(3,"Category"),_()()),o&2){n();let e=L(3);T(),u("ngTemplateOutlet",e)}}function le(o,d){o&1&&w(0)}function ce(o,d){if(o&1&&m(0,le,1,0,"ng-container",2),o&2){n();let e=L(3);u("ngTemplateOutlet",e)}}function pe(o,d){if(o&1&&(y(0,"div",6),x(1),_()),o&2){let e=n(2);u("matTooltip",e.selectedCategoryLabel()),T(),V(" ",e.selectedCategoryLabel()," ")}}function ge(o,d){if(o&1){let e=O();y(0,"p-treeSelect",4),G(1,"async"),z("ngModelChange",function(t){C(e);let a=n();return P(a.selectedNode,t)||(a.selectedNode=t),h(t)}),E("click",function(){C(e);let t=n();return h(t.onClickSelect())})("onNodeSelect",function(t){C(e);let a=n();return h(a.onNodeSelect(t))})("onClear",function(){C(e);let t=n();return h(t.onNodeUnselect())}),m(2,pe,2,2,"ng-template",5),_()}if(o&2){let e=n();D("ngModel",e.selectedNode),u("filter",!0)("options",j(1,5,e.categories$))("showClear",e.showClear)("disabled",e.disabled)}}var Pe=(()=>{class o{constructor(){this.categoryService=f(ae),this.showClear=!1,this.showLabel=!1,this.disabled=!1,this.selectedCategory=new F,this.selectedCategoryLabel=b("Select a Category"),this.selectedNode=b(null),this.onChange=e=>{},this.onTouched=()=>{}}ngOnChanges(e){let i=e?.categoryId?.previousValue,t=e?.categoryId?.currentValue;r.IsEmpty(i)&&r.IsNotEmpty(t)&&this.initCategories(),r.IsEmpty(t)&&r.IsNotEmpty(i)&&this.generateCategoryLabel(null)}initCategories(){this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(s(e=>this.setDefaultCategory(e)),S(1))}setDefaultCategory(e){try{let i=this.categoryService.searchByIdWithParentDFS(e,this.categoryId);i&&(this.generateCategoryLabel(i),this.selectedNode.set(i))}catch(i){console.error(i)}}onClickSelect(){this.disabled==!1&&(this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(S(1)))}onNodeSelect(e){let i=this.categoryService.searchSelectAbleNode(e.node);this.selectedCategoryLabel.set(r.getLabelPathTree(i));let t=parseInt(i.id);this.onChange(t),this.selectedCategory.emit(t)}onNodeUnselect(){this.selectedCategoryLabel.set("Select a Category"),this.selectedCategory.emit(null)}generateCategoryLabel(e){e?this.selectedCategoryLabel.set(r.getLabelPathTree(e)):this.selectedCategoryLabel.set("Select a Category")}writeValue(e){r.IsNotEmpty(e)&&(this.categoryId=e,this.initCategories())}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275cmp=A({type:o,selectors:[["app-channel-category-select"]],inputs:{channelId:"channelId",channelType:"channelType",categoryId:"categoryId",showClear:"showClear",showLabel:"showLabel",disabled:"disabled"},outputs:{selectedCategory:"selectedCategory"},features:[W([{provide:H,useExisting:k(()=>o),multi:!0}]),N],decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","containerStyleClass","w-100","placeholder","Select a Category","id","selectCategory","inputId","selectCategory",3,"ngModelChange","click","onNodeSelect","onClear","ngModel","filter","options","showClear","disabled"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(i,t){i&1&&m(0,se,4,1,"p-floatLabel",1)(1,ce,1,1,"ng-container")(2,ge,3,7,"ng-template",null,0,B),i&2&&M(t.showLabel?0:1)},dependencies:[q,R,U,oe,ie,Z,Y,X,K,J,$,te,ee],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})}}return o})();export{ae as a,Pe as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-NDBC2CS6.js";import{a as h,b as C}from"./chunk-WRJFUNM3.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as f,J as n,n as o}from"./chunk-FXQKRJWU.js";import{Gb as l,Hb as c,Yb as s,ic as u,jc as d,ka as p,kc as i,rb as m}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var v=(()=>{class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,g){t&1&&(u(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(m(3),s("Tabs",g.priceTabs))},dependencies:[o,C,h,n,f],encapsulation:2})}}return e})();var b=[{path:"",component:v,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-F3GLNINI.js").then(e=>e.PricePosChannelComponent)},canActivate:[r],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-5DTUHJSS.js").then(e=>e.PriceSingleChannelComponent)},canActivate:[r],data:{title:"Price Single Channel Comparison"}}]}],D=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=c({type:e})}static{this.\u0275inj=p({imports:[o,n.forChild(b)]})}}return e})();export{D as PriceRoutingModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ie}from"./chunk-67HPC5Y3.js";import{a as $}from"./chunk-
|
|
1
|
+
import{a as ie}from"./chunk-67HPC5Y3.js";import{a as $}from"./chunk-KTB223SK.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import{a as ee,b as te}from"./chunk-ABYG6YZT.js";import"./chunk-RAQRGWCZ.js";import"./chunk-HVCIQI7B.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as ne}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-ACIMXBIC.js";import{i as Q}from"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{e as K}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as J}from"./chunk-EUYQST7Q.js";import{m as X,n as Z}from"./chunk-HJXYT6MI.js";import{A as Y,c as j,h as U,m as q,o as G}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as A,J as H,f as W,g as F,k as B,m as k,n as z}from"./chunk-FXQKRJWU.js";import{$c as v,Fc as x,Gb as L,Gc as a,Hc as _,Ic as D,Kc as u,Lc as c,Mb as S,Mc as h,Sc as I,Yb as g,ad as V,bd as N,cd as R,ic as t,jc as n,kc as y,lc as T,mc as P,oc as O,pb as M,rb as r,tc as b,uc as E,xb as C,ya as m,za as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var oe=l=>({ID:l});function re(l,w){if(l&1&&(t(0,"tr")(1,"td"),a(2),n(),t(3,"td"),y(4,"img",25),n(),t(5,"td"),a(6),n(),t(7,"td",26)(8,"a",27),a(9),v(10,"number"),n()(),t(11,"td"),a(12),n(),t(13,"td"),a(14),v(15,"date"),n()()),l&2){let e=w.$implicit;r(2),_(e._source.ChannelName),r(2),g("src",e.logo,M),r(2),_(e._source.DateRange),r(2),g("queryParams",I(12,oe,e._source.ID)),r(),D(" ",V(10,7,e._source.CountOrder)," "),r(3),_(e._source.UserLogin),r(2),D(" ",N(15,9,e._source["@timestamp_received"],"dd MMM yyyy HH:mm")," ")}}function ae(l,w){if(l&1){let e=O();T(0),t(1,"div",16)(2,"table",17)(3,"thead")(4,"tr",18)(5,"th",19),a(6,"Channel"),n(),t(7,"th",20),a(8,"Type"),n(),t(9,"th",21),a(10,"Download Date Range"),n(),t(11,"th",22),a(12,"Count"),n(),t(13,"th"),a(14,"User Login"),n(),t(15,"th"),a(16,"Created"),n()()(),t(17,"tbody"),S(18,re,16,14,"tr",23),n()(),t(19,"mat-paginator",24),b("page",function(i){m(e);let d=E();return p(d.onPaginationChange(i))}),n()(),P()}if(l&2){let e=E();r(18),g("ngForOf",e.downloadOrders),r(),g("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function le(l,w){l&1&&(t(0,"div",28),y(1,"app-empty-state"),n())}var De=(()=>{class l{constructor(e,s){this.http=e,this.authService=s,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(e=>{this.filter=e.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(e=>{this.downloadOrders=e.hits,this.setChannelLogo(),this.paginationTotal=e.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(e=>(e.logo=J.getChannelLogoByTypeId(e._source.TypeID),e))}onPaginationChange(e){this.filter.PageNumber=e.pageIndex+1,this.getDownloadOrders()}static{this.\u0275fac=function(s){return new(s||l)(C(K),C(Q))}}static{this.\u0275cmp=L({type:l,selectors:[["app-download-order-log"]],decls:28,vars:8,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"fw-bold","mb-1"],[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","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(s,i){if(s&1){let d=O();t(0,"mainpanel",1),b("onSubmit",function(){return m(d),p(i.getDownloadOrders())}),t(1,"filters")(2,"div")(3,"label",2),a(4,"Channel"),n(),t(5,"app-channel-options-v2",3),h("ngModelChange",function(o){return m(d),c(i.filter.ChannelID,o)||(i.filter.ChannelID=o),p(o)}),n()(),t(6,"div",4)(7,"label",5),a(8,"From/To"),n(),t(9,"div",6)(10,"datepicker",7),h("dateChange",function(o){return m(d),c(i.filter.From,o)||(i.filter.From=o),p(o)}),n()(),t(11,"div")(12,"datepicker",8),h("dateChange",function(o){return m(d),c(i.filter.To,o)||(i.filter.To=o),p(o)}),n()()(),t(13,"div",4)(14,"label",9),a(15,"Page Number"),n(),t(16,"input",10),h("ngModelChange",function(o){return m(d),c(i.filter.PageNumber,o)||(i.filter.PageNumber=o),p(o)}),n()(),t(17,"div",4)(18,"label",9),a(19,"Page Size"),n(),t(20,"input",11),h("ngModelChange",function(o){return m(d),c(i.filter.RowCount,o)||(i.filter.RowCount=o),p(o)}),n()()(),t(21,"content")(22,"div",12)(23,"div",13)(24,"div",14),S(25,ae,20,4,"ng-container",15)(26,le,2,0,"ng-template",null,0,R),n()()()()()}if(s&2){let d=x(27);g("hideSearchBox",!0),r(5),u("ngModel",i.filter.ChannelID),r(5),u("date",i.filter.From),r(2),u("date",i.filter.To),r(4),u("ngModel",i.filter.PageNumber),r(4),u("ngModel",i.filter.RowCount),r(5),g("ngIf",(i.downloadOrders==null?null:i.downloadOrders.length)>0)("ngIfElse",d)}},dependencies:[z,W,F,k,B,te,ee,Z,X,Y,j,G,U,q,ie,H,A,$,ne],encapsulation:2})}}return l})();export{De as DownloadOrderLogComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T}from"./chunk-UMP6ZMEJ.js";import{a as H}from"./chunk-C7YK5TDP.js";import{c as Z}from"./chunk-RXQX7567.js";import{A as N}from"./chunk-5PS6ZS3N.js";import{b as j,c as L}from"./chunk-ERXVXBTU.js";import{r as $,s as A}from"./chunk-MFQQEEHJ.js";import{d as U,f as F,g as M,n as z}from"./chunk-FXQKRJWU.js";import{Fc as S,Gb as B,Gc as u,Hc as k,Ic as D,Ka as b,Mb as d,Sc as h,Tc as V,Vc as R,Yb as _,cd as y,dc as w,ic as r,jc as c,kc as s,lc as p,mc as m,oc as x,pb as E,rb as o,tc as f,uc as a,xb as I,xc as O,ya as C,za as g}from"./chunk-OJMQBH6T.js";var W=(t,i,n,l)=>[t,i,n,l],v=t=>[t],q=(t,i)=>[t,i],J=t=>({"me-3":t}),K=t=>({"border-bottom pb-2":t});function G(t,i){if(t&1){let n=x();p(0),r(1,"img",19),f("click",function(e){C(n);let P=a();return g(P.openBiggerPicture(e))}),c(),m()}if(t&2){let n=a();o(),_("src",n.image,E)}}function Q(t,i){t&1&&s(0,"img",20)}function X(t,i){if(t&1&&(p(0),r(1,"span",24)(2,"a",25),s(3,"i",26),c()(),m()),t&2){let n=a(2);o(2),_("href",n.redirectUrl,E)}}function Y(t,i){if(t&1&&(r(0,"div",21),s(1,"i",22),r(2,"span"),u(3),c(),d(4,X,4,1,"ng-container",23),c()),t&2){let n=a();o(3),k(n.code),o(),_("ngIf",n.code!=="SKU not assigned"&&n.showRedirectIcon)}}function tt(t,i){if(t&1){let n=x();r(0,"div",27),f("click",function(){C(n);let e=a();return g(e.onEventDesc())}),s(1,"i",28),r(2,"span"),u(3),c()()}if(t&2){let n=a();o(3),k(n.description)}}function nt(t,i){if(t&1){let n=x();r(0,"div",30)(1,"input",31),f("change",function(e){C(n);let P=a(2);return g(P.onCheck(e.target.checked))}),c()()}}function et(t,i){if(t&1&&(p(0),d(1,nt,2,0,"div",29),m()),t&2){let n=a();o(),_("ngIf",n.showCheckBox)}}function it(t,i){if(t&1){let n=x();r(0,"button",34),f("click",function(){C(n);let e=a(3);return g(e.onDownload())}),s(1,"i",35),u(2,"Download "),c()}}function ot(t,i){if(t&1&&(p(0),d(1,it,3,0,"button",33),m()),t&2){let n=a(2);o(),_("ngIf",n.downloadButton)}}function at(t,i){}function rt(t,i){if(t&1){let n=x();r(0,"li")(1,"a",42),f("click",function(){C(n);let e=a(6);return g(e.onScan())}),s(2,"i",43),u(3,"Scan "),c()()}}function ct(t,i){if(t&1&&(p(0),d(1,rt,4,0,"li"),m()),t&2){let n=a(5);o(),w(n.scanButton?1:-1)}}function lt(t,i){if(t&1){let n=x();r(0,"li")(1,"a",44),f("click",function(){C(n);let e=a(6);return g(e.onDetach())}),s(2,"i",45),u(3,"Detach "),c()()}}function _t(t,i){if(t&1&&(p(0),d(1,lt,4,0,"li"),m()),t&2){let n=a(5);o(),w(n.detachButton?1:-1)}}function dt(t,i){if(t&1&&(p(0),r(1,"div",39),s(2,"button",40),r(3,"ul",41),d(4,ct,2,1,"ng-container",17)(5,_t,2,1,"ng-container",17),c()(),m()),t&2){let n=a(4);o(4),_("ngxPermissionsOnly",h(2,v,n.productScanRole)),o(),_("ngxPermissionsOnly",h(4,v,n.productDetachRole))}}function st(t,i){if(t&1){let n=x();r(0,"button",37),f("click",function(){C(n);let e=a(3);return g(e.onUpload())}),s(1,"i",38),u(2,"Upload "),c(),d(3,dt,6,6,"ng-container",17)}if(t&2){let n=a(3);o(3),_("ngxPermissionsOnly",V(1,q,n.productScanRole,n.productDetachRole))}}function pt(t,i){if(t&1){let n=x();r(0,"button",34),f("click",function(){C(n);let e=a(5);return g(e.onScan())}),s(1,"i",47),u(2," Scan "),c()}}function mt(t,i){if(t&1&&(p(0),d(1,pt,3,0,"button",46),m()),t&2){let n=a(4);o(),w(n.scanButton?1:-1)}}function ut(t,i){if(t&1){let n=x();r(0,"button",49),f("click",function(){C(n);let e=a(5);return g(e.onDetach())}),s(1,"i",45),u(2,"Detach "),c()}}function Ct(t,i){if(t&1&&(p(0),d(1,ut,3,0,"button",48),m()),t&2){let n=a(4);o(),w(n.detachButton?1:-1)}}function gt(t,i){if(t&1&&d(0,mt,2,1,"ng-container",17)(1,Ct,2,1,"ng-container",17),t&2){let n=a(3);_("ngxPermissionsOnly",h(2,v,n.productScanRole)),o(),_("ngxPermissionsOnly",h(4,v,n.productDetachRole))}}function xt(t,i){if(t&1&&(r(0,"div",32),d(1,at,0,0,"ng-template",36)(2,st,4,4,"ng-template",null,1,y)(4,gt,2,6,"ng-template",null,2,y),c()),t&2){let n=S(3),l=S(5),e=a(2);o(),_("ngxPermissionsOnly",h(3,v,e.productUploadRole))("ngxPermissionsOnlyThen",n)("ngxPermissionsOnlyElse",l)}}function ft(t,i){if(t&1){let n=x();r(0,"button",34),f("click",function(){C(n);let e=a(4);return g(e.onScan())}),s(1,"i",47),u(2," Scan "),c()}}function ht(t,i){if(t&1&&(p(0),d(1,ft,3,0,"button",46),m()),t&2){let n=a(3);o(),w(n.scanButton?1:-1)}}function wt(t,i){if(t&1){let n=x();r(0,"button",51),f("click",function(){C(n);let e=a(4);return g(e.onDetach())}),s(1,"i",45),u(2,"Detach "),c()}}function vt(t,i){if(t&1&&(p(0),d(1,wt,3,0,"button",50),m()),t&2){let n=a(3);o(),w(n.detachButton?1:-1)}}function Pt(t,i){if(t&1&&d(0,ht,2,1,"ng-container",17)(1,vt,2,1,"ng-container",17),t&2){let n=a(2);_("ngxPermissionsOnly",h(2,v,n.productScanRole)),o(),_("ngxPermissionsOnly",h(4,v,n.productDetachRole))}}function bt(t,i){if(t&1&&(p(0),r(1,"a",53),s(2,"img",54),c(),m()),t&2){let n=i.$implicit,l=i.index,e=a(4);o(),O("href",n.Url,E),o(),_("ngClass",h(4,J,l!=e.channels.length-1))("src",e.getChannelLogo(n),E)("matTooltip",n.Title?n.Title:n.Name)}}function Et(t,i){if(t&1&&(p(0),d(1,bt,3,6,"ng-container",52),m()),t&2){let n=a(3);o(),_("ngForOf",n.channels)}}function St(t,i){if(t&1&&(r(0,"li")(1,"div",58)(2,"div",59)(3,"a",53),s(4,"img",60),r(5,"span",61),u(6),c()()()()()),t&2){let n=i.$implicit,l=i.index,e=a(4);o(2),_("ngClass",h(4,K,l!=e.channels.length-1)),o(),_("href",n.Url,E),o(),_("src",e.getChannelLogo(n),E),o(2),k(n.Title)}}function yt(t,i){if(t&1&&(r(0,"div",55)(1,"button",56),u(2),c(),r(3,"ul",57),d(4,St,7,6,"li",52),c()()),t&2){let n=a(3);o(2),D(" ",n.channels.length," CHANNELS "),o(2),_("ngForOf",n.channels)}}function Tt(t,i){if(t&1&&(r(0,"div"),d(1,Et,2,1,"ng-container",10)(2,yt,5,2,"ng-template",null,3,y),c()),t&2){let n=S(3),l=a(2);o(),_("ngIf",l.channels.length<4)("ngIfElse",n)}}function kt(t,i){if(t&1&&(r(0,"div",18)(1,"div"),d(2,ot,2,1,"ng-container",17)(3,xt,6,5,"div",32)(4,Pt,2,6),c(),d(5,Tt,4,2,"div"),c()),t&2){let n=a();o(2),_("ngxPermissionsOnly",h(3,v,n.productDownloadRole)),o(),w(n.uploadButton?3:4),o(2),w(n.channels&&(n.channels==null?null:n.channels.length)>0?5:-1)}}var Ht=(()=>{class t{constructor(n){this.biggerPictureService=n,this.uploadButton=!1,this.scanButton=!1,this.showCheckBox=!1,this.downloadButton=!1,this.showFooter=!0,this.detachButton=!1,this.hasZoom=!0,this.showRedirectIcon=!0,this.productUploadRole=T.ProductUpload,this.productScanRole=T.ProductScan,this.productDownloadRole=T.ProductDownload,this.productDetachRole=T.ProductDetach,this.onUploadEvent=new b,this.onScanEvent=new b,this.checkBoxChange=new b,this.onDescEvent=new b,this.onDownloadEvent=new b,this.onDetachEvent=new b}ngAfterContentInit(){this.initRedirectUrl()}initRedirectUrl(){let n=localStorage.getItem("Authorization"),l=JSON.parse(n)?.Host;this.redirectUrl=`https://${l}/menu/Products/Catalog/Products/Info?ID=${this.productId}`}onUpload(){this.onUploadEvent.emit()}onScan(){this.onScanEvent.emit()}onCheck(n){this.checkBoxChange.emit(n)}onEventDesc(){this.onDescEvent.emit()}onDownload(){this.onDownloadEvent.emit()}onDetach(){this.onDetachEvent.emit()}getChannelLogo(n){return Z.getChannelLogoByTypeId(n.TypeID)}openBiggerPicture(n){this.biggerPictureService.openBiggerPicture(n,this.imageForZoom)}static{this.\u0275fac=function(l){return new(l||t)(I(H))}}static{this.\u0275cmp=B({type:t,selectors:[["app-product-card"]],inputs:{productId:"productId",uploadButton:"uploadButton",scanButton:"scanButton",showCheckBox:"showCheckBox",downloadButton:"downloadButton",showFooter:"showFooter",detachButton:"detachButton",image:"image",title:"title",code:"code",description:"description",channels:"channels",check:"check",imageForZoom:"imageForZoom",hasZoom:"hasZoom",showRedirectIcon:"showRedirectIcon"},outputs:{onUploadEvent:"onUpload",onScanEvent:"onScan",checkBoxChange:"onCheckBoxChange",onDescEvent:"onDescEvent",onDownloadEvent:"onDownload",onDetachEvent:"onDetach"},decls:18,vars:13,consts:[["elsePic",""],["thenBlock",""],["elseBlock",""],["DROPDOWN",""],[1,"card",2,"margin-bottom","0px"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],[1,"col-7","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle","cursor-pointer",3,"click","matTooltip"],["class","description cursor-pointer",4,"ngIf"],["class","description cursor-pointer",3,"click",4,"ngIf"],[1,"col-1","gx-0","d-flex","justify-content-center"],[1,"text-end"],[4,"ngxPermissionsOnly"],[1,"card-footer","d-flex","justify-content-between","py-5","bg-footer","align-items-center",2,"border-top","0.1px solid rgb(220 220 220)"],[1,"rounded","imgUpload","float-left",3,"click","src"],["src","https://res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description","cursor-pointer"],[1,"fa","fa-barcode","me-2"],[4,"ngIf"],[1,"ms-2"],["target","_blank",2,"color","#0976b4",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"description","cursor-pointer",3,"click"],[1,"fa","fa-tag","me-2"],["class","text-end gx-0",4,"ngIf"],[1,"text-end","gx-0"],["type","checkbox",3,"change"],["role","group","aria-label","Scan button with other button",1,"btn-group","btn-sm"],["class","fs-6 btn btn-light btn-sm me-3",3,"click",4,"ngIf"],[1,"fs-6","btn","btn-light","btn-sm","me-3",3,"click"],["aria-hidden","true",1,"fa","fa-download","me-1"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["type","button",1,"fs-6","btn","btn-light","btn-sm",3,"click"],["aria-hidden","true",1,"fa","fa-upload","me-1"],["role","group",1,"btn-group"],["type","button","data-bs-toggle","dropdown","aria-expanded","false",1,"fs-6","btn","btn-light","btn-sm","dropdown-toggle","ps-3"],[1,"dropdown-menu",2,"min-width","100px !important"],[1,"dropdown-item","cursor-pointer",3,"click"],[1,"fa","fa-spinner","me-2"],["matTooltip","Detaching a product with it's associated channel will stop inventory synchronization",1,"dropdown-item","cursor-pointer",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],[1,"fs-6","btn","btn-light","btn-sm","me-3"],[1,"fa","fa-spinner","me-1"],["matTooltip","Detaching a product with it's associated channel will stop inventory synchronization",1,"fs-6","btn","btn-light","btn-sm"],["matTooltip","Detaching a product with it's associated channel will stop inventory synchronization",1,"fs-6","btn","btn-light","btn-sm",3,"click"],[1,"fs-6","btn","btn-light","btn-sm"],[1,"fs-6","btn","btn-light","btn-sm",3,"click"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["alt","",1,"img-logo",3,"ngClass","src","matTooltip"],[1,"dropdown"],["type","button","id","dropdownMenuButton1","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","fs-6","btn-sm","btn-light","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item","py-2",2,"cursor","pointer"],[3,"ngClass"],[1,"img-logo",3,"src"],[1,"ms-4"]],template:function(l,e){if(l&1){let P=x();r(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"div",8)(5,"div",9),d(6,G,2,1,"ng-container",10)(7,Q,1,0,"ng-template",null,0,y),c()()(),r(9,"div",11)(10,"h4",12),f("click",function(){return C(P),g(e.onEventDesc())}),u(11),c(),d(12,Y,5,2,"div",13)(13,tt,4,1,"div",14),c(),r(14,"div",15)(15,"div",16),d(16,et,2,1,"ng-container",17),c()()()(),d(17,kt,6,5,"div",18),c()}if(l&2){let P=S(8);o(6),_("ngIf",e.image)("ngIfElse",P),o(4),_("matTooltip",(e.title==null?null:e.title.length)>25?e.title:""),o(),D(" ",e.title," "),o(),_("ngIf",e.code),o(),_("ngIf",e.description),o(3),_("ngxPermissionsOnly",R(8,W,e.productDownloadRole,e.productScanRole,e.productUploadRole,e.productDetachRole)),o(),w(e.showFooter?17:-1)}},dependencies:[z,U,F,M,N,A,$,L,j],styles:[".img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.bg-footer[_ngcontent-%COMP%]{background-color:#ededed69}.description[_ngcontent-%COMP%]{font-weight:300;margin-left:2px}.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down;cursor:pointer}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}"]})}}return t})();export{Ht as a};
|
|
1
|
+
import{a as T}from"./chunk-UMP6ZMEJ.js";import{a as H}from"./chunk-63ANFYRV.js";import{c as Z}from"./chunk-EUYQST7Q.js";import{A as N}from"./chunk-5PS6ZS3N.js";import{b as j,c as L}from"./chunk-ERXVXBTU.js";import{r as $,s as A}from"./chunk-MFQQEEHJ.js";import{d as U,f as F,g as M,n as z}from"./chunk-FXQKRJWU.js";import{Fc as S,Gb as B,Gc as u,Hc as k,Ic as D,Ka as b,Mb as d,Sc as h,Tc as V,Vc as R,Yb as _,cd as y,dc as w,ic as r,jc as c,kc as s,lc as p,mc as m,oc as x,pb as E,rb as o,tc as f,uc as a,xb as I,xc as O,ya as C,za as g}from"./chunk-OJMQBH6T.js";var W=(t,i,n,l)=>[t,i,n,l],v=t=>[t],q=(t,i)=>[t,i],J=t=>({"me-3":t}),K=t=>({"border-bottom pb-2":t});function G(t,i){if(t&1){let n=x();p(0),r(1,"img",19),f("click",function(e){C(n);let P=a();return g(P.openBiggerPicture(e))}),c(),m()}if(t&2){let n=a();o(),_("src",n.image,E)}}function Q(t,i){t&1&&s(0,"img",20)}function X(t,i){if(t&1&&(p(0),r(1,"span",24)(2,"a",25),s(3,"i",26),c()(),m()),t&2){let n=a(2);o(2),_("href",n.redirectUrl,E)}}function Y(t,i){if(t&1&&(r(0,"div",21),s(1,"i",22),r(2,"span"),u(3),c(),d(4,X,4,1,"ng-container",23),c()),t&2){let n=a();o(3),k(n.code),o(),_("ngIf",n.code!=="SKU not assigned"&&n.showRedirectIcon)}}function tt(t,i){if(t&1){let n=x();r(0,"div",27),f("click",function(){C(n);let e=a();return g(e.onEventDesc())}),s(1,"i",28),r(2,"span"),u(3),c()()}if(t&2){let n=a();o(3),k(n.description)}}function nt(t,i){if(t&1){let n=x();r(0,"div",30)(1,"input",31),f("change",function(e){C(n);let P=a(2);return g(P.onCheck(e.target.checked))}),c()()}}function et(t,i){if(t&1&&(p(0),d(1,nt,2,0,"div",29),m()),t&2){let n=a();o(),_("ngIf",n.showCheckBox)}}function it(t,i){if(t&1){let n=x();r(0,"button",34),f("click",function(){C(n);let e=a(3);return g(e.onDownload())}),s(1,"i",35),u(2,"Download "),c()}}function ot(t,i){if(t&1&&(p(0),d(1,it,3,0,"button",33),m()),t&2){let n=a(2);o(),_("ngIf",n.downloadButton)}}function at(t,i){}function rt(t,i){if(t&1){let n=x();r(0,"li")(1,"a",42),f("click",function(){C(n);let e=a(6);return g(e.onScan())}),s(2,"i",43),u(3,"Scan "),c()()}}function ct(t,i){if(t&1&&(p(0),d(1,rt,4,0,"li"),m()),t&2){let n=a(5);o(),w(n.scanButton?1:-1)}}function lt(t,i){if(t&1){let n=x();r(0,"li")(1,"a",44),f("click",function(){C(n);let e=a(6);return g(e.onDetach())}),s(2,"i",45),u(3,"Detach "),c()()}}function _t(t,i){if(t&1&&(p(0),d(1,lt,4,0,"li"),m()),t&2){let n=a(5);o(),w(n.detachButton?1:-1)}}function dt(t,i){if(t&1&&(p(0),r(1,"div",39),s(2,"button",40),r(3,"ul",41),d(4,ct,2,1,"ng-container",17)(5,_t,2,1,"ng-container",17),c()(),m()),t&2){let n=a(4);o(4),_("ngxPermissionsOnly",h(2,v,n.productScanRole)),o(),_("ngxPermissionsOnly",h(4,v,n.productDetachRole))}}function st(t,i){if(t&1){let n=x();r(0,"button",37),f("click",function(){C(n);let e=a(3);return g(e.onUpload())}),s(1,"i",38),u(2,"Upload "),c(),d(3,dt,6,6,"ng-container",17)}if(t&2){let n=a(3);o(3),_("ngxPermissionsOnly",V(1,q,n.productScanRole,n.productDetachRole))}}function pt(t,i){if(t&1){let n=x();r(0,"button",34),f("click",function(){C(n);let e=a(5);return g(e.onScan())}),s(1,"i",47),u(2," Scan "),c()}}function mt(t,i){if(t&1&&(p(0),d(1,pt,3,0,"button",46),m()),t&2){let n=a(4);o(),w(n.scanButton?1:-1)}}function ut(t,i){if(t&1){let n=x();r(0,"button",49),f("click",function(){C(n);let e=a(5);return g(e.onDetach())}),s(1,"i",45),u(2,"Detach "),c()}}function Ct(t,i){if(t&1&&(p(0),d(1,ut,3,0,"button",48),m()),t&2){let n=a(4);o(),w(n.detachButton?1:-1)}}function gt(t,i){if(t&1&&d(0,mt,2,1,"ng-container",17)(1,Ct,2,1,"ng-container",17),t&2){let n=a(3);_("ngxPermissionsOnly",h(2,v,n.productScanRole)),o(),_("ngxPermissionsOnly",h(4,v,n.productDetachRole))}}function xt(t,i){if(t&1&&(r(0,"div",32),d(1,at,0,0,"ng-template",36)(2,st,4,4,"ng-template",null,1,y)(4,gt,2,6,"ng-template",null,2,y),c()),t&2){let n=S(3),l=S(5),e=a(2);o(),_("ngxPermissionsOnly",h(3,v,e.productUploadRole))("ngxPermissionsOnlyThen",n)("ngxPermissionsOnlyElse",l)}}function ft(t,i){if(t&1){let n=x();r(0,"button",34),f("click",function(){C(n);let e=a(4);return g(e.onScan())}),s(1,"i",47),u(2," Scan "),c()}}function ht(t,i){if(t&1&&(p(0),d(1,ft,3,0,"button",46),m()),t&2){let n=a(3);o(),w(n.scanButton?1:-1)}}function wt(t,i){if(t&1){let n=x();r(0,"button",51),f("click",function(){C(n);let e=a(4);return g(e.onDetach())}),s(1,"i",45),u(2,"Detach "),c()}}function vt(t,i){if(t&1&&(p(0),d(1,wt,3,0,"button",50),m()),t&2){let n=a(3);o(),w(n.detachButton?1:-1)}}function Pt(t,i){if(t&1&&d(0,ht,2,1,"ng-container",17)(1,vt,2,1,"ng-container",17),t&2){let n=a(2);_("ngxPermissionsOnly",h(2,v,n.productScanRole)),o(),_("ngxPermissionsOnly",h(4,v,n.productDetachRole))}}function bt(t,i){if(t&1&&(p(0),r(1,"a",53),s(2,"img",54),c(),m()),t&2){let n=i.$implicit,l=i.index,e=a(4);o(),O("href",n.Url,E),o(),_("ngClass",h(4,J,l!=e.channels.length-1))("src",e.getChannelLogo(n),E)("matTooltip",n.Title?n.Title:n.Name)}}function Et(t,i){if(t&1&&(p(0),d(1,bt,3,6,"ng-container",52),m()),t&2){let n=a(3);o(),_("ngForOf",n.channels)}}function St(t,i){if(t&1&&(r(0,"li")(1,"div",58)(2,"div",59)(3,"a",53),s(4,"img",60),r(5,"span",61),u(6),c()()()()()),t&2){let n=i.$implicit,l=i.index,e=a(4);o(2),_("ngClass",h(4,K,l!=e.channels.length-1)),o(),_("href",n.Url,E),o(),_("src",e.getChannelLogo(n),E),o(2),k(n.Title)}}function yt(t,i){if(t&1&&(r(0,"div",55)(1,"button",56),u(2),c(),r(3,"ul",57),d(4,St,7,6,"li",52),c()()),t&2){let n=a(3);o(2),D(" ",n.channels.length," CHANNELS "),o(2),_("ngForOf",n.channels)}}function Tt(t,i){if(t&1&&(r(0,"div"),d(1,Et,2,1,"ng-container",10)(2,yt,5,2,"ng-template",null,3,y),c()),t&2){let n=S(3),l=a(2);o(),_("ngIf",l.channels.length<4)("ngIfElse",n)}}function kt(t,i){if(t&1&&(r(0,"div",18)(1,"div"),d(2,ot,2,1,"ng-container",17)(3,xt,6,5,"div",32)(4,Pt,2,6),c(),d(5,Tt,4,2,"div"),c()),t&2){let n=a();o(2),_("ngxPermissionsOnly",h(3,v,n.productDownloadRole)),o(),w(n.uploadButton?3:4),o(2),w(n.channels&&(n.channels==null?null:n.channels.length)>0?5:-1)}}var Ht=(()=>{class t{constructor(n){this.biggerPictureService=n,this.uploadButton=!1,this.scanButton=!1,this.showCheckBox=!1,this.downloadButton=!1,this.showFooter=!0,this.detachButton=!1,this.hasZoom=!0,this.showRedirectIcon=!0,this.productUploadRole=T.ProductUpload,this.productScanRole=T.ProductScan,this.productDownloadRole=T.ProductDownload,this.productDetachRole=T.ProductDetach,this.onUploadEvent=new b,this.onScanEvent=new b,this.checkBoxChange=new b,this.onDescEvent=new b,this.onDownloadEvent=new b,this.onDetachEvent=new b}ngAfterContentInit(){this.initRedirectUrl()}initRedirectUrl(){let n=localStorage.getItem("Authorization"),l=JSON.parse(n)?.Host;this.redirectUrl=`https://${l}/menu/Products/Catalog/Products/Info?ID=${this.productId}`}onUpload(){this.onUploadEvent.emit()}onScan(){this.onScanEvent.emit()}onCheck(n){this.checkBoxChange.emit(n)}onEventDesc(){this.onDescEvent.emit()}onDownload(){this.onDownloadEvent.emit()}onDetach(){this.onDetachEvent.emit()}getChannelLogo(n){return Z.getChannelLogoByTypeId(n.TypeID)}openBiggerPicture(n){this.biggerPictureService.openBiggerPicture(n,this.imageForZoom)}static{this.\u0275fac=function(l){return new(l||t)(I(H))}}static{this.\u0275cmp=B({type:t,selectors:[["app-product-card"]],inputs:{productId:"productId",uploadButton:"uploadButton",scanButton:"scanButton",showCheckBox:"showCheckBox",downloadButton:"downloadButton",showFooter:"showFooter",detachButton:"detachButton",image:"image",title:"title",code:"code",description:"description",channels:"channels",check:"check",imageForZoom:"imageForZoom",hasZoom:"hasZoom",showRedirectIcon:"showRedirectIcon"},outputs:{onUploadEvent:"onUpload",onScanEvent:"onScan",checkBoxChange:"onCheckBoxChange",onDescEvent:"onDescEvent",onDownloadEvent:"onDownload",onDetachEvent:"onDetach"},decls:18,vars:13,consts:[["elsePic",""],["thenBlock",""],["elseBlock",""],["DROPDOWN",""],[1,"card",2,"margin-bottom","0px"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],[1,"col-7","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle","cursor-pointer",3,"click","matTooltip"],["class","description cursor-pointer",4,"ngIf"],["class","description cursor-pointer",3,"click",4,"ngIf"],[1,"col-1","gx-0","d-flex","justify-content-center"],[1,"text-end"],[4,"ngxPermissionsOnly"],[1,"card-footer","d-flex","justify-content-between","py-5","bg-footer","align-items-center",2,"border-top","0.1px solid rgb(220 220 220)"],[1,"rounded","imgUpload","float-left",3,"click","src"],["src","https://resc.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description","cursor-pointer"],[1,"fa","fa-barcode","me-2"],[4,"ngIf"],[1,"ms-2"],["target","_blank",2,"color","#0976b4",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"description","cursor-pointer",3,"click"],[1,"fa","fa-tag","me-2"],["class","text-end gx-0",4,"ngIf"],[1,"text-end","gx-0"],["type","checkbox",3,"change"],["role","group","aria-label","Scan button with other button",1,"btn-group","btn-sm"],["class","fs-6 btn btn-light btn-sm me-3",3,"click",4,"ngIf"],[1,"fs-6","btn","btn-light","btn-sm","me-3",3,"click"],["aria-hidden","true",1,"fa","fa-download","me-1"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["type","button",1,"fs-6","btn","btn-light","btn-sm",3,"click"],["aria-hidden","true",1,"fa","fa-upload","me-1"],["role","group",1,"btn-group"],["type","button","data-bs-toggle","dropdown","aria-expanded","false",1,"fs-6","btn","btn-light","btn-sm","dropdown-toggle","ps-3"],[1,"dropdown-menu",2,"min-width","100px !important"],[1,"dropdown-item","cursor-pointer",3,"click"],[1,"fa","fa-spinner","me-2"],["matTooltip","Detaching a product with it's associated channel will stop inventory synchronization",1,"dropdown-item","cursor-pointer",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],[1,"fs-6","btn","btn-light","btn-sm","me-3"],[1,"fa","fa-spinner","me-1"],["matTooltip","Detaching a product with it's associated channel will stop inventory synchronization",1,"fs-6","btn","btn-light","btn-sm"],["matTooltip","Detaching a product with it's associated channel will stop inventory synchronization",1,"fs-6","btn","btn-light","btn-sm",3,"click"],[1,"fs-6","btn","btn-light","btn-sm"],[1,"fs-6","btn","btn-light","btn-sm",3,"click"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["alt","",1,"img-logo",3,"ngClass","src","matTooltip"],[1,"dropdown"],["type","button","id","dropdownMenuButton1","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","fs-6","btn-sm","btn-light","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item","py-2",2,"cursor","pointer"],[3,"ngClass"],[1,"img-logo",3,"src"],[1,"ms-4"]],template:function(l,e){if(l&1){let P=x();r(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"div",8)(5,"div",9),d(6,G,2,1,"ng-container",10)(7,Q,1,0,"ng-template",null,0,y),c()()(),r(9,"div",11)(10,"h4",12),f("click",function(){return C(P),g(e.onEventDesc())}),u(11),c(),d(12,Y,5,2,"div",13)(13,tt,4,1,"div",14),c(),r(14,"div",15)(15,"div",16),d(16,et,2,1,"ng-container",17),c()()()(),d(17,kt,6,5,"div",18),c()}if(l&2){let P=S(8);o(6),_("ngIf",e.image)("ngIfElse",P),o(4),_("matTooltip",(e.title==null?null:e.title.length)>25?e.title:""),o(),D(" ",e.title," "),o(),_("ngIf",e.code),o(),_("ngIf",e.description),o(3),_("ngxPermissionsOnly",R(8,W,e.productDownloadRole,e.productScanRole,e.productUploadRole,e.productDetachRole)),o(),w(e.showFooter?17:-1)}},dependencies:[z,U,F,M,N,A,$,L,j],styles:[".img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.bg-footer[_ngcontent-%COMP%]{background-color:#ededed69}.description[_ngcontent-%COMP%]{font-weight:300;margin-left:2px}.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down;cursor:pointer}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}"]})}}return t})();export{Ht as a};
|