marketplacepos 5.48.1 → 5.48.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-ZRTEGBXK.js → chunk-2IASUYTM.js} +1 -1
- package/Marketplace/{chunk-D3VVBQYY.js → chunk-3JYZF65T.js} +1 -1
- package/Marketplace/{chunk-SJT5OMJM.js → chunk-3K2EKA5O.js} +1 -1
- package/Marketplace/{chunk-KB3CRZC5.js → chunk-5CHTDUME.js} +1 -1
- package/Marketplace/{chunk-BYTWGXP7.js → chunk-5KYN6Y7M.js} +1 -1
- package/Marketplace/{chunk-MRT6ZM2A.js → chunk-5X2L45XK.js} +1 -1
- package/Marketplace/{chunk-AAUBUT4Y.js → chunk-6OIMOM7S.js} +1 -1
- package/Marketplace/{chunk-IX6JJ6BJ.js → chunk-7DT7FQ2T.js} +1 -1
- package/Marketplace/{chunk-IWFUFVCC.js → chunk-7SB4C4PT.js} +1 -1
- package/Marketplace/{chunk-3LTTPECO.js → chunk-ADKAX3OO.js} +1 -1
- package/Marketplace/{chunk-6Z2CE7TK.js → chunk-AEVLZ7NS.js} +1 -1
- package/Marketplace/{chunk-HUECAZ5I.js → chunk-ALPG22RQ.js} +1 -1
- package/Marketplace/{chunk-PUUZQ4N5.js → chunk-B6F5PDL5.js} +1 -1
- package/Marketplace/{chunk-IYDRCUIT.js → chunk-C6JHPCLF.js} +1 -1
- package/Marketplace/{chunk-CG7UNGPF.js → chunk-CAZ7U2IL.js} +1 -1
- package/Marketplace/{chunk-SGTGXMFX.js → chunk-CBU473N2.js} +1 -1
- package/Marketplace/{chunk-QSBCJIQ3.js → chunk-CLQGGKN6.js} +1 -1
- package/Marketplace/{chunk-JKRH5WGR.js → chunk-DH5CXAEM.js} +1 -1
- package/Marketplace/{chunk-RASTACH2.js → chunk-FCFCTT5A.js} +1 -1
- package/Marketplace/{chunk-I3Q5TAIL.js → chunk-FRZCC6KZ.js} +1 -1
- package/Marketplace/{chunk-Q7MU7DBD.js → chunk-GVI6GJHY.js} +1 -1
- package/Marketplace/{chunk-TOATNIRC.js → chunk-GX6JPDQ5.js} +1 -1
- package/Marketplace/{chunk-XLNRT52E.js → chunk-H7GV5SNI.js} +1 -1
- package/Marketplace/{chunk-ZEF5FMYQ.js → chunk-HKHNRMPT.js} +1 -1
- package/Marketplace/{chunk-Q4AWQ7IC.js → chunk-I723PUUO.js} +1 -1
- package/Marketplace/{chunk-7WHUYSBD.js → chunk-IDH7MCR3.js} +1 -1
- package/Marketplace/{chunk-3TPMCGA5.js → chunk-J6BQDYXO.js} +1 -1
- package/Marketplace/{chunk-TLPRODFI.js → chunk-KSVJCX2D.js} +1 -1
- package/Marketplace/{chunk-IODYBTLK.js → chunk-KZSTYKIP.js} +1 -1
- package/Marketplace/{chunk-IU36PH6K.js → chunk-LABF6W37.js} +1 -1
- package/Marketplace/{chunk-NSBKRFO7.js → chunk-M65Z55OS.js} +1 -1
- package/Marketplace/{chunk-6ZE3KI6C.js → chunk-MKADKY44.js} +1 -1
- package/Marketplace/{chunk-ZVTFMONF.js → chunk-PLLHTY6O.js} +1 -1
- package/Marketplace/{chunk-RDS3OGH2.js → chunk-PZKN5FIT.js} +1 -1
- package/Marketplace/{chunk-WIYPRMVW.js → chunk-QCV5XC3U.js} +2 -2
- package/Marketplace/{chunk-64EV3KZS.js → chunk-RCBY7EIY.js} +1 -1
- package/Marketplace/{chunk-RXZ43ZSY.js → chunk-SZVL42NR.js} +1 -1
- package/Marketplace/{chunk-SFZDUON5.js → chunk-TIIGDXIJ.js} +2 -2
- package/Marketplace/{chunk-BJH4EGMC.js → chunk-UBTALPOC.js} +1 -1
- package/Marketplace/{chunk-XF2QZL6C.js → chunk-UCEZJNIL.js} +1 -1
- package/Marketplace/{chunk-327AAICB.js → chunk-VYQD3A3M.js} +1 -1
- package/Marketplace/{chunk-5G3OIF3V.js → chunk-WRK3ZHRX.js} +1 -1
- package/Marketplace/{chunk-GTIJJRTW.js → chunk-X6COQADC.js} +1 -1
- package/Marketplace/{chunk-X5X4R6MJ.js → chunk-XDBH7EGC.js} +1 -1
- package/Marketplace/{chunk-UIZJMH4U.js → chunk-XK4RP5MQ.js} +1 -1
- package/Marketplace/{chunk-GF6B54DH.js → chunk-Y77WYZ6Y.js} +1 -1
- package/Marketplace/{chunk-AFCA7VVG.js → chunk-ZUL6ZHSW.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-T7D6R6TU.js → main-YJKBQ3LW.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Fe,b as Ie}from"./chunk-L76NLJD7.js";import{a as Ee,b as Ve,c as Ae}from"./chunk-ILW6ZFFV.js";import{a as Ne}from"./chunk-IODYBTLK.js";import{a as j}from"./chunk-Q7MU7DBD.js";import{a as De}from"./chunk-S7CKRTJV.js";import"./chunk-EYT2YJGK.js";import"./chunk-RNWHARPK.js";import{a as Le}from"./chunk-7JQEF4XX.js";import"./chunk-AFIF6VRM.js";import"./chunk-ZW2TMVZP.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import"./chunk-6KWG6O5L.js";import{a as Pe}from"./chunk-BYTWGXP7.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as Me}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-Q4AWQ7IC.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as x}from"./chunk-AGBJEXIM.js";import{b as P,e as z}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as d,c as V}from"./chunk-JBEKD57G.js";import{b as Se,d as we,f as ve,g as ye,h as xe,m as ke,n as Te}from"./chunk-EDEZ3JLR.js";import{A as R,b as ge,c as fe,h as O,m as W,o as Ce}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as _e,w as be}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as ce,j as de,l as ue,m as he}from"./chunk-LNJUGHOX.js";import{$b as k,$c as pe,Bc as te,Cc as ie,Dc as ne,G,Gb as D,Ha as B,Lc as oe,Mc as c,Nc as L,Oc as N,Qc as S,Rc as w,Sc as v,Tc as re,Uc as ae,Vc as F,Z as J,Zc as le,aa as X,bc as T,cc as Z,ec as $,fc as ee,gc as y,hc as o,hd as E,ic as r,id as I,jc as _,jd as se,lb as Y,ma as A,nb as m,od as me,qc as M,ra as C,v as K,vc as b,xa as h,xc as f,ya as g}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as Q,b as q}from"./chunk-66YHNWRR.js";var Oe=(()=>{let l=class l{constructor(){this.http=C(z),this.toastr=C(P)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(K(p=>(p&&(p.Number=e),p)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case d.Tokopedia:let u=window.open("about:blank","_blank");u.document.write(e.File),u.document.close();break;case d.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case d.Shopee:var i=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),p=new Blob([i],{type:"octet/stream"});V.openDownloadFile(p,`${e?.Number}.pdf`);break;case d.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=A({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var We=(()=>{let l=class l{constructor(){this.dialogRef=C(Se),this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=D({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"h2",1),c(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),c(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),v("ngModelChange",function(u){return w(i.tandaiSudahDicetak,u)||(i.tandaiSudahDicetak=u),u}),r(),o(10,"span",7),c(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),c(14,"Cancel"),r(),o(15,"button",10),b("click",function(){return i.onPrint()}),c(16,"Cetak Pesanan"),r()()()),t&2&&(m(9),S("ngModel",i.tandaiSudahDicetak))},dependencies:[R,O,W,xe,ye,ve],encapsulation:2});let a=l;return a})();var U=(()=>{let l=class l{constructor(){this.httpService=C(z),this.shippingLabelService=C(Oe),this.toastrService=C(P),this.dialog=C(we)}printShippingLabel(e){switch(e?.MarketType){case d.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Shopee));break;case d.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tiktok));break;case d.Tokopedia:this.dialog.open(We).afterClosed().pipe(G(t=>V.IsNotEmpty(t)),X(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tokopedia));break;case d.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Lazada));break;case d.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(p=>({OrderNumber:p.Number,ShopID:p.ShopID})),i="";switch(e[0]?.MarketType){case d.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case d.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case d.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(p=>{var u=Uint8Array.from(atob(p.File),Re=>Re.charCodeAt(0)),s=new Blob([u],{type:"octet/stream"});V.openDownloadFile(s,`${p?.Name}.pdf`)})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=A({token:l,factory:l.\u0275fac});let a=l;return a})();var Be=["contextMenu"],je=a=>({"td-cell-hover":a});function He(a,l){if(a&1){let n=M();o(0,"button",20),b("click",function(){h(n);let t=f(),i=F(0);return g(t.onDowloadShippingLabel(i))}),_(1,"i",21),o(2,"span"),c(3,"Download Shipping Label"),r()()}}function Ue(a,l){if(a&1){let n=M();o(0,"input",45),v("ngModelChange",function(t){h(n);let i=f().$implicit;return w(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){h(n);let t=f(3),i=F(0);return g(t.onSelectOrders(i))}),r()}if(a&2){let n=f().$implicit,e=f(2);S("ngModel",n.selected),y("disabled",e.selectedChannelType()!=null&&e.selectedChannelType()!=n.MarketType)}}function Qe(a,l){if(a&1&&_(0,"variants-dropdown",38),a&2){let n=f().$implicit;y("variants",n==null?null:n.Variants)}}function qe(a,l){if(a&1&&_(0,"variant-with-image",39),a&2){let n=f().$implicit;y("variant",n==null?null:n.Variants[0])}}function Ke(a,l){if(a&1&&(o(0,"span"),c(1),r()),a&2){let n=f().$implicit;m(),N("(",n.LogisticService==null?null:n.LogisticService.Option,")")}}function Ge(a,l){if(a&1){let n=M();o(0,"button",46),b("click",function(){h(n);let t=f().$implicit,i=f(2);return g(i.onPrintShippingLabel(t))}),_(1,"i",47),r()}}function Je(a,l){if(a&1){let n=M();o(0,"tr")(1,"td"),k(2,Ue,1,2,"input",30),r(),o(3,"td")(4,"div",31),_(5,"img",32),E(6,"channelImage"),o(7,"div",33)(8,"div"),c(9),r(),o(10,"small",34)(11,"span"),c(12),r()()()()(),o(13,"td")(14,"div",35)(15,"div",36)(16,"div"),_(17,"order-link",37),r()(),o(18,"small"),c(19),E(20,"date"),r()()(),o(21,"td"),c(22),r(),o(23,"td"),k(24,Qe,1,1,"variants-dropdown",38)(25,qe,1,1,"variant-with-image",39),r(),o(26,"td",40),c(27),E(28,"number"),r(),o(29,"td",41),b("mouseenter",function(t){let i=h(n).$implicit,p=f(2);return g(p.onMouseEnter(t,i))}),o(30,"div",42)(31,"div",35)(32,"div",36)(33,"span"),c(34),r(),k(35,Ke,2,1,"span"),r(),o(36,"small"),c(37),r()()()(),o(38,"td",43),k(39,Ge,2,0,"button",44),r()()}if(a&2){let n=l.$implicit,e=f(2);m(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?2:-1),m(3),y("src",I(6,16,n==null?null:n.MarketType),Y)("alt",n==null||n.Variants[0]==null?null:n.Variants[0].Name),m(4),L(n.Outlet),m(3),L(n.ChannelName),m(5),y("order",n),m(2),N(" ",se(20,18,n==null?null:n.Created,"dd/MM/yyyy HH:mm:ss")," "),m(3),L(n.Customer),m(),oe(pe(23,je,(n.Variants==null?null:n.Variants.length)>1)),m(),T((n.Variants==null?null:n.Variants.length)>1?24:25),m(3),L(I(28,21,n.Amount)),m(7),L(n.LogisticService!=null&&n.LogisticService.Name?n.LogisticService==null?null:n.LogisticService.Name:"-"),m(),T(n.LogisticService!=null&&n.LogisticService.Option&&(n.LogisticService==null?null:n.LogisticService.Option)!="Default"?35:-1),m(2),N(" ",n.ReferenceNumber?n.ReferenceNumber:"-"," "),m(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?39:-1)}}function Xe(a,l){if(a&1){let n=M();o(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),_(4,"th",25),o(5,"th",26),c(6,"Outlet"),r(),o(7,"th",26),c(8,"Number"),r(),o(9,"th",26),c(10,"Customer"),r(),o(11,"th"),c(12,"Items"),r(),o(13,"th",27),c(14,"Amount"),r(),o(15,"th",26),c(16,"Shipping"),r(),_(17,"th",28),r()(),o(18,"tbody"),$(19,Je,40,25,"tr",null,Z),r()(),o(21,"app-custom-paginator",29),b("next",function(){h(n);let t=f();return g(t.initAwaitingCollection())})("previous",function(){h(n);let t=f();return g(t.initAwaitingCollection())}),r()()}if(a&2){let n=f(),e=F(0);m(19),ee(e),m(2),y("filter",n.filter())("totaldata",e==null?null:e.length)}}function Ye(a,l){a&1&&(o(0,"div",18),_(1,"app-empty-state"),r())}var Yt=(()=>{let l=class l{constructor(){this.printShippingService=C(U),this.orderService=C(j),this.toastr=C(P),this.fulfillmentService=C(Fe),this.channelType=d,this.selectedOrders=B([]),this.selectedChannelType=me(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=B({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>q(Q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(J(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=D({type:l,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&te(Be,5),t&2){let p;ie(p=ne())&&(i.contextMenuEl=p.first)}},features:[le([j,U])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","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 p=M();re(0),E(1,"async"),o(2,"mainpanel",1),b("onSubmit",function(){return h(p),g(i.initAwaitingCollection())}),v("textChange",function(s){return h(p),w(i.filter().Number,s)||(i.filter().Number=s),g(s)}),o(3,"actions"),k(4,He,4,0,"button",2),o(5,"a",3),_(6,"i",4),o(7,"span"),c(8,"Order Fulfillment Display"),r()()(),o(9,"filters")(10,"div")(11,"label",5),c(12,"Channel"),r(),o(13,"app-channel-options-v2",6),v("ngModelChange",function(s){return h(p),w(i.filter().ListChannelID,s)||(i.filter().ListChannelID=s),g(s)}),r()(),o(14,"div",7)(15,"label",5),c(16,"From/To"),r(),o(17,"div",8)(18,"datepicker",9),v("dateChange",function(s){return h(p),w(i.filter().From,s)||(i.filter().From=s),g(s)}),r()(),o(19,"div")(20,"datepicker",10),v("dateChange",function(s){return h(p),w(i.filter().To,s)||(i.filter().To=s),g(s)}),r()()(),o(21,"div",7)(22,"label",11),c(23,"Page Number"),r(),o(24,"input",12),v("ngModelChange",function(s){return h(p),w(i.filter().PageNumber,s)||(i.filter().PageNumber=s),g(s)}),r()(),o(25,"div",7)(26,"label",11),c(27,"Page Size"),r(),o(28,"input",13),v("ngModelChange",function(s){return h(p),w(i.filter().PageSize,s)||(i.filter().PageSize=s),g(s)}),r()()(),o(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),k(33,Xe,22,2,"div",17)(34,Ye,2,0,"div",18),r()()()()(),o(35,"app-context-menu",19,0),b("onSelectItem",function(s){return h(p),g(i.onSelectContextItem(s))}),r()}if(t&2){let p=ae(I(1,10,i.awaitingCollections$));m(2),S("text",i.filter().Number),m(2),T(i.selectedOrders().length>0?4:-1),m(9),y("multiple",!0),S("ngModel",i.filter().ListChannelID),m(5),S("date",i.filter().From),m(2),S("date",i.filter().To),m(4),S("ngModel",i.filter().PageNumber),m(4),S("ngModel",i.filter().PageSize),m(5),T((p==null?null:p.length)>0?33:34),m(2),y("items",i.contextMenuItems)}},dependencies:[he,Te,ke,Le,Me,R,fe,Ce,ge,O,W,Ve,Ae,De,be,_e,Ne,Ie,Pe,ce,ue,de,Ee],encapsulation:2});let a=l;return a})();export{Yt as AwaitingCollectionComponent};
|
|
1
|
+
import{a as Fe,b as Ie}from"./chunk-L76NLJD7.js";import{a as Ee,b as Ve,c as Ae}from"./chunk-ILW6ZFFV.js";import{a as Ne}from"./chunk-KZSTYKIP.js";import{a as j}from"./chunk-GVI6GJHY.js";import{a as De}from"./chunk-S7CKRTJV.js";import"./chunk-EYT2YJGK.js";import"./chunk-RNWHARPK.js";import{a as Le}from"./chunk-7JQEF4XX.js";import"./chunk-AFIF6VRM.js";import"./chunk-ZW2TMVZP.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import"./chunk-6KWG6O5L.js";import{a as Pe}from"./chunk-5KYN6Y7M.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as Me}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as x}from"./chunk-AGBJEXIM.js";import{b as P,e as z}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as d,c as V}from"./chunk-JBEKD57G.js";import{b as Se,d as we,f as ve,g as ye,h as xe,m as ke,n as Te}from"./chunk-EDEZ3JLR.js";import{A as R,b as ge,c as fe,h as O,m as W,o as Ce}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as _e,w as be}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as ce,j as de,l as ue,m as he}from"./chunk-LNJUGHOX.js";import{$b as k,$c as pe,Bc as te,Cc as ie,Dc as ne,G,Gb as D,Ha as B,Lc as oe,Mc as c,Nc as L,Oc as N,Qc as S,Rc as w,Sc as v,Tc as re,Uc as ae,Vc as F,Z as J,Zc as le,aa as X,bc as T,cc as Z,ec as $,fc as ee,gc as y,hc as o,hd as E,ic as r,id as I,jc as _,jd as se,lb as Y,ma as A,nb as m,od as me,qc as M,ra as C,v as K,vc as b,xa as h,xc as f,ya as g}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as Q,b as q}from"./chunk-66YHNWRR.js";var Oe=(()=>{let l=class l{constructor(){this.http=C(z),this.toastr=C(P)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(K(p=>(p&&(p.Number=e),p)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case d.Tokopedia:let u=window.open("about:blank","_blank");u.document.write(e.File),u.document.close();break;case d.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case d.Shopee:var i=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),p=new Blob([i],{type:"octet/stream"});V.openDownloadFile(p,`${e?.Number}.pdf`);break;case d.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=A({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var We=(()=>{let l=class l{constructor(){this.dialogRef=C(Se),this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=D({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"h2",1),c(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),c(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),v("ngModelChange",function(u){return w(i.tandaiSudahDicetak,u)||(i.tandaiSudahDicetak=u),u}),r(),o(10,"span",7),c(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),c(14,"Cancel"),r(),o(15,"button",10),b("click",function(){return i.onPrint()}),c(16,"Cetak Pesanan"),r()()()),t&2&&(m(9),S("ngModel",i.tandaiSudahDicetak))},dependencies:[R,O,W,xe,ye,ve],encapsulation:2});let a=l;return a})();var U=(()=>{let l=class l{constructor(){this.httpService=C(z),this.shippingLabelService=C(Oe),this.toastrService=C(P),this.dialog=C(we)}printShippingLabel(e){switch(e?.MarketType){case d.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Shopee));break;case d.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tiktok));break;case d.Tokopedia:this.dialog.open(We).afterClosed().pipe(G(t=>V.IsNotEmpty(t)),X(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tokopedia));break;case d.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Lazada));break;case d.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(p=>({OrderNumber:p.Number,ShopID:p.ShopID})),i="";switch(e[0]?.MarketType){case d.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case d.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case d.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(p=>{var u=Uint8Array.from(atob(p.File),Re=>Re.charCodeAt(0)),s=new Blob([u],{type:"octet/stream"});V.openDownloadFile(s,`${p?.Name}.pdf`)})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=A({token:l,factory:l.\u0275fac});let a=l;return a})();var Be=["contextMenu"],je=a=>({"td-cell-hover":a});function He(a,l){if(a&1){let n=M();o(0,"button",20),b("click",function(){h(n);let t=f(),i=F(0);return g(t.onDowloadShippingLabel(i))}),_(1,"i",21),o(2,"span"),c(3,"Download Shipping Label"),r()()}}function Ue(a,l){if(a&1){let n=M();o(0,"input",45),v("ngModelChange",function(t){h(n);let i=f().$implicit;return w(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){h(n);let t=f(3),i=F(0);return g(t.onSelectOrders(i))}),r()}if(a&2){let n=f().$implicit,e=f(2);S("ngModel",n.selected),y("disabled",e.selectedChannelType()!=null&&e.selectedChannelType()!=n.MarketType)}}function Qe(a,l){if(a&1&&_(0,"variants-dropdown",38),a&2){let n=f().$implicit;y("variants",n==null?null:n.Variants)}}function qe(a,l){if(a&1&&_(0,"variant-with-image",39),a&2){let n=f().$implicit;y("variant",n==null?null:n.Variants[0])}}function Ke(a,l){if(a&1&&(o(0,"span"),c(1),r()),a&2){let n=f().$implicit;m(),N("(",n.LogisticService==null?null:n.LogisticService.Option,")")}}function Ge(a,l){if(a&1){let n=M();o(0,"button",46),b("click",function(){h(n);let t=f().$implicit,i=f(2);return g(i.onPrintShippingLabel(t))}),_(1,"i",47),r()}}function Je(a,l){if(a&1){let n=M();o(0,"tr")(1,"td"),k(2,Ue,1,2,"input",30),r(),o(3,"td")(4,"div",31),_(5,"img",32),E(6,"channelImage"),o(7,"div",33)(8,"div"),c(9),r(),o(10,"small",34)(11,"span"),c(12),r()()()()(),o(13,"td")(14,"div",35)(15,"div",36)(16,"div"),_(17,"order-link",37),r()(),o(18,"small"),c(19),E(20,"date"),r()()(),o(21,"td"),c(22),r(),o(23,"td"),k(24,Qe,1,1,"variants-dropdown",38)(25,qe,1,1,"variant-with-image",39),r(),o(26,"td",40),c(27),E(28,"number"),r(),o(29,"td",41),b("mouseenter",function(t){let i=h(n).$implicit,p=f(2);return g(p.onMouseEnter(t,i))}),o(30,"div",42)(31,"div",35)(32,"div",36)(33,"span"),c(34),r(),k(35,Ke,2,1,"span"),r(),o(36,"small"),c(37),r()()()(),o(38,"td",43),k(39,Ge,2,0,"button",44),r()()}if(a&2){let n=l.$implicit,e=f(2);m(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?2:-1),m(3),y("src",I(6,16,n==null?null:n.MarketType),Y)("alt",n==null||n.Variants[0]==null?null:n.Variants[0].Name),m(4),L(n.Outlet),m(3),L(n.ChannelName),m(5),y("order",n),m(2),N(" ",se(20,18,n==null?null:n.Created,"dd/MM/yyyy HH:mm:ss")," "),m(3),L(n.Customer),m(),oe(pe(23,je,(n.Variants==null?null:n.Variants.length)>1)),m(),T((n.Variants==null?null:n.Variants.length)>1?24:25),m(3),L(I(28,21,n.Amount)),m(7),L(n.LogisticService!=null&&n.LogisticService.Name?n.LogisticService==null?null:n.LogisticService.Name:"-"),m(),T(n.LogisticService!=null&&n.LogisticService.Option&&(n.LogisticService==null?null:n.LogisticService.Option)!="Default"?35:-1),m(2),N(" ",n.ReferenceNumber?n.ReferenceNumber:"-"," "),m(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?39:-1)}}function Xe(a,l){if(a&1){let n=M();o(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),_(4,"th",25),o(5,"th",26),c(6,"Outlet"),r(),o(7,"th",26),c(8,"Number"),r(),o(9,"th",26),c(10,"Customer"),r(),o(11,"th"),c(12,"Items"),r(),o(13,"th",27),c(14,"Amount"),r(),o(15,"th",26),c(16,"Shipping"),r(),_(17,"th",28),r()(),o(18,"tbody"),$(19,Je,40,25,"tr",null,Z),r()(),o(21,"app-custom-paginator",29),b("next",function(){h(n);let t=f();return g(t.initAwaitingCollection())})("previous",function(){h(n);let t=f();return g(t.initAwaitingCollection())}),r()()}if(a&2){let n=f(),e=F(0);m(19),ee(e),m(2),y("filter",n.filter())("totaldata",e==null?null:e.length)}}function Ye(a,l){a&1&&(o(0,"div",18),_(1,"app-empty-state"),r())}var Yt=(()=>{let l=class l{constructor(){this.printShippingService=C(U),this.orderService=C(j),this.toastr=C(P),this.fulfillmentService=C(Fe),this.channelType=d,this.selectedOrders=B([]),this.selectedChannelType=me(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=B({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>q(Q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(J(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=D({type:l,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&te(Be,5),t&2){let p;ie(p=ne())&&(i.contextMenuEl=p.first)}},features:[le([j,U])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","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 p=M();re(0),E(1,"async"),o(2,"mainpanel",1),b("onSubmit",function(){return h(p),g(i.initAwaitingCollection())}),v("textChange",function(s){return h(p),w(i.filter().Number,s)||(i.filter().Number=s),g(s)}),o(3,"actions"),k(4,He,4,0,"button",2),o(5,"a",3),_(6,"i",4),o(7,"span"),c(8,"Order Fulfillment Display"),r()()(),o(9,"filters")(10,"div")(11,"label",5),c(12,"Channel"),r(),o(13,"app-channel-options-v2",6),v("ngModelChange",function(s){return h(p),w(i.filter().ListChannelID,s)||(i.filter().ListChannelID=s),g(s)}),r()(),o(14,"div",7)(15,"label",5),c(16,"From/To"),r(),o(17,"div",8)(18,"datepicker",9),v("dateChange",function(s){return h(p),w(i.filter().From,s)||(i.filter().From=s),g(s)}),r()(),o(19,"div")(20,"datepicker",10),v("dateChange",function(s){return h(p),w(i.filter().To,s)||(i.filter().To=s),g(s)}),r()()(),o(21,"div",7)(22,"label",11),c(23,"Page Number"),r(),o(24,"input",12),v("ngModelChange",function(s){return h(p),w(i.filter().PageNumber,s)||(i.filter().PageNumber=s),g(s)}),r()(),o(25,"div",7)(26,"label",11),c(27,"Page Size"),r(),o(28,"input",13),v("ngModelChange",function(s){return h(p),w(i.filter().PageSize,s)||(i.filter().PageSize=s),g(s)}),r()()(),o(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),k(33,Xe,22,2,"div",17)(34,Ye,2,0,"div",18),r()()()()(),o(35,"app-context-menu",19,0),b("onSelectItem",function(s){return h(p),g(i.onSelectContextItem(s))}),r()}if(t&2){let p=ae(I(1,10,i.awaitingCollections$));m(2),S("text",i.filter().Number),m(2),T(i.selectedOrders().length>0?4:-1),m(9),y("multiple",!0),S("ngModel",i.filter().ListChannelID),m(5),S("date",i.filter().From),m(2),S("date",i.filter().To),m(4),S("ngModel",i.filter().PageNumber),m(4),S("ngModel",i.filter().PageSize),m(5),T((p==null?null:p.length)>0?33:34),m(2),y("items",i.contextMenuItems)}},dependencies:[he,Te,ke,Le,Me,R,fe,Ce,ge,O,W,Ve,Ae,De,be,_e,Ne,Ie,Pe,ce,ue,de,Ee],encapsulation:2});let a=l;return a})();export{Yt as AwaitingCollectionComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as de,b as me,c as se}from"./chunk-ILW6ZFFV.js";import{a as ue}from"./chunk-
|
|
1
|
+
import{a as de,b as me,c as se}from"./chunk-ILW6ZFFV.js";import{a as ue}from"./chunk-KZSTYKIP.js";import{a as P}from"./chunk-GVI6GJHY.js";import{a as ce}from"./chunk-S7CKRTJV.js";import{a as le}from"./chunk-7JQEF4XX.js";import"./chunk-AFIF6VRM.js";import"./chunk-ZW2TMVZP.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import{a as pe}from"./chunk-5KYN6Y7M.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as oe}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as re,n as ae}from"./chunk-EDEZ3JLR.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as ie,w as ne}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as J,j as K,l as Q,m as X}from"./chunk-LNJUGHOX.js";import{$b as y,$c as q,Gb as D,Ha as F,Lc as z,Mc as l,Nc as w,Oc as E,Qc as f,Rc as S,Sc as C,Tc as A,Uc as R,Vc as H,Zc as j,_c as U,bc as b,cc as I,ec as B,fc as k,gc as h,hc as t,hd as x,ic as i,id as V,jc as _,jd as G,lb as W,nb as r,qc as M,ra as O,vc as T,xa as s,xc as g,ya as c}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as L,b as N}from"./chunk-66YHNWRR.js";var he=()=>[],_e=a=>({"td-cell-hover":a});function ge(a,p){if(a&1&&_(0,"variants-dropdown",31),a&2){let e=g().$implicit;h("variants",e==null?null:e.Variants)}}function fe(a,p){if(a&1&&_(0,"variant-with-image",32),a&2){let e=g().$implicit;h("variant",e==null?null:e.Variants[0])}}function Se(a,p){if(a&1&&(t(0,"span"),l(1),i()),a&2){let e=g().$implicit;r(),E("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Ce(a,p){if(a&1&&(t(0,"tr")(1,"td")(2,"div",24),_(3,"img",25),x(4,"channelImage"),t(5,"div",26)(6,"div"),l(7),i(),t(8,"small",27)(9,"span"),l(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div",29)(14,"div"),_(15,"order-link",30),i()(),t(16,"small"),l(17),x(18,"date"),i()()(),t(19,"td"),l(20),i(),t(21,"td"),y(22,ge,1,1,"variants-dropdown",31)(23,fe,1,1,"variant-with-image",32),i(),t(24,"td",33),l(25),x(26,"number"),i(),t(27,"td")(28,"div",28)(29,"div",29)(30,"span"),l(31),i(),y(32,Se,2,1,"span"),i(),t(33,"small"),l(34),i()()()()),a&2){let e=p.$implicit;r(3),h("src",V(4,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),r(4),w(e.Outlet),r(3),w(e.ChannelName),r(5),h("order",e),r(2),E(" ",G(18,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),r(3),w(e.Customer),r(),z(q(21,_e,(e.Variants==null?null:e.Variants.length)>1)),r(),b((e.Variants==null?null:e.Variants.length)>1?22:23),r(3),w(V(26,19,e.Amount)),r(6),w(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),r(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?32:-1),r(2),E(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function ve(a,p){if(a&1){let e=M();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",20),l(7,"Number"),i(),t(8,"th",20),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",21),l(13,"Amount"),i(),t(14,"th",22),l(15,"Shipping"),i()()(),t(16,"tbody"),B(17,Ce,35,23,"tr",null,I),i()(),t(19,"app-custom-paginator",23),T("next",function(){s(e);let m=g();return c(m.initShippedOrders())})("previous",function(){s(e);let m=g();return c(m.initShippedOrders())}),i()()}if(a&2){let e=g(),d=H(0);r(17),k(d),r(2),h("filter",e.filter())("totaldata",d==null?null:d.length)}}function we(a,p){a&1&&(t(0,"div",16),_(1,"app-empty-state"),i())}var je=(()=>{let p=class p{constructor(){this.orderService=O(P),this.filter=F({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:d=>{this.initFromDate(d)},error:d=>{console.error("Error fetching default date:",d),this.initFromDate(null)}})}initFromDate(d){this.filter.update(m=>N(L({},m),{From:d})),this.initShippedOrders()}initShippedOrders(){this.shippedOrders$=this.orderService.getShippedOrders(this.filter())}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=D({type:p,selectors:[["app-shipped"]],features:[j([P])],decls:34,vars:12,consts:[["headerTitle","Shipped","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","100px"],["rowCountApi","/api/orders/shippedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(m,o){if(m&1){let u=M();A(0),x(1,"async"),t(2,"mainpanel",0),T("onSubmit",function(){return s(u),c(o.initShippedOrders())}),C("textChange",function(n){return s(u),S(o.filter().Number,n)||(o.filter().Number=n),c(n)}),t(3,"actions")(4,"a",1),_(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"Channel"),i(),t(12,"app-channel-options-v2",4),C("ngModelChange",function(n){return s(u),S(o.filter().ListChannelID,n)||(o.filter().ListChannelID=n),c(n)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),C("dateChange",function(n){return s(u),S(o.filter().From,n)||(o.filter().From=n),c(n)}),i()(),t(18,"div")(19,"datepicker",8),C("dateChange",function(n){return s(u),S(o.filter().To,n)||(o.filter().To=n),c(n)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),C("ngModelChange",function(n){return s(u),S(o.filter().PageNumber,n)||(o.filter().PageNumber=n),c(n)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),C("ngModelChange",function(n){return s(u),S(o.filter().PageSize,n)||(o.filter().PageSize=n),c(n)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,ve,20,2,"div",15)(33,we,2,0,"div",16),i()()()()()}if(m&2){let u=R(V(1,8,o.shippedOrders$)||U(11,he));r(2),f("text",o.filter().Number),r(10),h("multiple",!0),f("ngModel",o.filter().ListChannelID),r(5),f("date",o.filter().From),r(2),f("date",o.filter().To),r(4),f("ngModel",o.filter().PageNumber),r(4),f("ngModel",o.filter().PageSize),r(5),b(u.length>0?32:33)}},dependencies:[X,ae,re,le,oe,te,Y,ee,Z,$,me,se,ce,ne,ie,ue,pe,J,Q,K,de],encapsulation:2});let a=p;return a})();export{je as ShippedComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as fe,b as be}from"./chunk-S5R6MCNP.js";import{a as xe,b as he}from"./chunk-DXYMG6QK.js";import{b as ue}from"./chunk-QFSA7CU4.js";import{a as ge}from"./chunk-4YCSITNV.js";import{a as M}from"./chunk-ZSUWHVKX.js";import{a as Ce}from"./chunk-6OJQRHIZ.js";import{i as _e}from"./chunk-Q4AWQ7IC.js";import{c as R}from"./chunk-JBEKD57G.js";import{d as me,h as pe}from"./chunk-EDEZ3JLR.js";import{A as le,b as ne,h as ie,m as oe}from"./chunk-L3W6SG2T.js";import{a as re,b as ae,c as ce}from"./chunk-ZETUYNFJ.js";import{v as se,w as de}from"./chunk-STYL7ETF.js";import{c as J,h as Q,l as ee,m as te}from"./chunk-LNJUGHOX.js";import{$b as p,$c as T,G as A,Gb as Z,Ha as $,Hc as W,Mb as h,Mc as m,Nc as V,Oc as v,Qc as k,Rc as O,Sc as D,Wc as K,ad as X,bc as g,ca as H,cc as E,dc as q,ec as F,f as z,fc as I,gc as s,hc as c,hd as N,ic as _,id as j,jc as P,jd as Y,kd as G,lb as w,nb as a,pc as L,qc as f,ra as S,sb as B,td as y,vc as b,xa as u,xc as o,ya as C}from"./chunk-ZYJ6LAJ3.js";var U=t=>[t],Te=t=>({"text-decoration-line-through":t}),ve=t=>({"text-danger":t}),ye=(t,r)=>({"bg-gradient-warning":t,"cell-hover pointer":r});function Se(t,r){if(t&1){let e=f();c(0,"mat-slide-toggle",10),b("toggleChange",function(){u(e);let n=o();return n.toggleStatus=!n.toggleStatus,C(n.onToggle())}),c(1,"small",11),m(2),_()()}if(t&2){let e=o();a(2),v(" ",e.productToggleTitle?e.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function we(t,r){if(t&1){let e=f();c(0,"th")(1,"input",13),D("ngModelChange",function(n){u(e);let l=o(2);return O(l.checkboxState,n)||(l.checkboxState=n),C(n)}),b("ngModelChange",function(){u(e);let n=o(2);return C(n.onCheckboxStateChange())}),_()()}if(t&2){let e=o(2);a(),k("ngModel",e.checkboxState)}}function Fe(t,r){if(t&1&&(h(0,we,2,1,"ng-template",12),c(1,"th",8),m(2,"POS"),_()),t&2){let e=o();s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function Ie(t,r){if(t&1&&(c(0,"th",9)(1,"div",14)(2,"div",15),P(3,"img",16),c(4,"div",17),m(5),N(6,"stringLimit"),_()()()()),t&2){let e=r.$implicit;a(2),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),a(),s("src",e==null?null:e.Img,w),a(2),v(" ",Y(6,3,e.Name,20)," ")}}function Pe(t,r){t&1&&L(0)}function Me(t,r){if(t&1&&h(0,Pe,1,0,"ng-container",29),t&2){o(2);let e=W(5);s("ngTemplateOutlet",e)}}function Ee(t,r){if(t&1&&h(0,Me,1,1,"ng-template",12),t&2){let e=o(4);s("ngxPermissionsOnly",T(1,U,e.roleInventoryUpdate))}}function Ve(t,r){t&1&&L(0)}function ke(t,r){if(t&1&&h(0,Ve,1,0,"ng-container",29),t&2){o(2);let e=W(5);s("ngTemplateOutlet",e)}}function Oe(t,r){if(t&1&&h(0,ke,1,1,"ng-template",12),t&2){let e=o(4);s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function De(t,r){if(t&1){let e=f();c(0,"div")(1,"input",30),D("ngModelChange",function(n){u(e);let l=o(4).$implicit;return O(l.selected,n)||(l.selected=n),C(n)}),b("ngModelChange",function(){u(e);let n=o(4).$implicit,l=o();return C(l.onCheckboxStateProduct(n.ID))}),_()()}if(t&2){let e=o(4).$implicit;a(),k("ngModel",e.selected),s("disabled",!(e!=null&&e.Category))}}function Ne(t,r){if(t&1&&p(0,De,2,2,"div"),t&2){let e=o(3).$implicit;g((e==null||e.Variants==null?null:e.Variants.length)>1?0:-1)}}function Ue(t,r){if(t&1){let e=f();c(0,"img",31),b("click",function(n){u(e);let l=o(3).$implicit,d=o();return C(d.onZoomImage(n,l==null?null:l.ImageUrl))}),_()}if(t&2){let e=o(3).$implicit;s("src",K(e==null?null:e.ThumbnailUrl),w)}}function $e(t,r){t&1&&P(0,"img",26)}function Be(t,r){if(t&1&&(c(0,"td",23)(1,"div",24),p(2,Ee,1,3,null,12)(3,Oe,1,3,null,12),h(4,Ne,1,1,"ng-template",null,0,G),c(6,"div"),p(7,Ue,1,2,"img",25)(8,$e,1,0,"img",26),_()()(),c(9,"td",27)(10,"div"),m(11),_(),c(12,"small",28),m(13),_()()),t&2){let e=o(2).$implicit,i=o();s("rowSpan",e==null?null:e.Variants.length),a(2),g(i.table()=="inventory"?2:3),a(5),g(e!=null&&e.ThumbnailUrl?7:8),a(2),s("rowSpan",e==null?null:e.Variants.length),a(2),V(e==null?null:e.Name),a(),s("ngClass",T(7,ve,!(e!=null&&e.Category))),a(),v("(",e!=null&&e.Category?e==null?null:e.Category:"Not Found In POS",")")}}function Le(t,r){if(t&1&&(c(0,"a",22),P(1,"i",32),_()),t&2){let e=o().$implicit,i=o(2);s("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),w)}}function We(t,r){if(t&1){let e=f();c(0,"input",35),D("ngModelChange",function(n){u(e);let l=o(3).$implicit;return O(l.selected,n)||(l.selected=n),C(n)}),_()}if(t&2){let e=o(3).$implicit,i=o().$implicit;k("ngModel",e.selected),s("disabled",!(i!=null&&i.Category))}}function je(t,r){if(t&1&&(c(0,"td",33),p(1,We,1,2,"input",34),_()),t&2){let e=o(2).$implicit,i=o(2);a(),g(i.printPOS(e)>=0||i.table()=="price"?1:-1)}}function Re(t,r){if(t&1&&(h(0,je,2,1,"ng-template",12),c(1,"td",19),m(2),N(3,"number"),_()),t&2){let e=o().$implicit,i=o(2);s("ngxPermissionsOnly",T(4,U,i.rolePriceEdit)),a(2),V(j(3,2,i.printPOS(e)))}}function ze(t,r){if(t&1){let e=f();c(0,"td",38),b("click",function(){u(e);let n=o().$implicit,l=o().$implicit,d=o().$implicit,x=o();return C(x.onUpdateData(d.Name,l,n.ID,d.ChannelItemID))}),c(1,"div",39)(2,"div",40),m(3),N(4,"number"),_(),c(5,"a",41),b("click",function(n){return u(e),C(n==null?null:n.stopPropagation())}),P(6,"i",32),_()()()}if(t&2){let e=r,i=o(2).$implicit,n=o(2);s("ngClass",X(5,ye,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table()=="price"||n.hasInventoryEdit()&&n.table()=="inventory")),a(3),v(" ",j(4,3,n.printItem(e))," "),a(2),s("href",e.Url,w)}}function Ae(t,r){t&1&&(c(0,"td",37)(1,"div",39)(2,"span"),m(3,"X"),_()()())}function He(t,r){if(t&1&&p(0,ze,7,8,"td",36)(1,Ae,4,0,"td",37),t&2){let e,i=r.$implicit,n=o().$implicit,l=o(2);g((e=l.getItemFromChannel(n,i))?0:1,e)}}function Ze(t,r){if(t&1&&(c(0,"tr"),p(1,Be,14,9),c(2,"td",18),m(3),_(),c(4,"td",19)(5,"div",20)(6,"div",21),m(7),_(),c(8,"div",17),p(9,Le,2,1,"a",22),_()()(),p(10,Re,4,6),F(11,He,2,1,null,null,E),_()),t&2){let e=r.$implicit,i=r.$index,n=o().$implicit,l=o();a(),g(i==0?1:-1),a(2),V(e==null?null:e.Model),a(2),s("matTooltip",e.Discontinued?l.discontinuedVariantMsg:""),a(),s("ngClass",T(7,Te,e.Discontinued)),a(),v(" ",e.Code," "),a(2),g(n.Category?9:-1),a(),g(l.hiddenIPOSInventory()==!1?10:-1),a(),I(l.channel())}}function qe(t,r){if(t&1&&(c(0,"tbody"),F(1,Ze,13,9,"tr",null,E),_()),t&2){let e=r.$implicit;a(),I(e.Variants)}}var ft=(()=>{let r=class r{constructor(){this.dialog=S(me),this.biggerPictureService=S(Ce),this.authService=S(_e),this.permissionsService=S(re),this.table=y(void 0),this.channel=y(void 0),this.showProductToggle=y(!1),this.multiwarehouse=y(!1),this.hiddenIPOSInventory=y(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=M.PriceUpdate,this.roleInventoryUpdate=M.InventoryUpdate,this.hasPriceEdit=$(!1),this.hasInventoryEdit=$(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new B,this.destroy$=new z,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles();let i=this.table();i=="inventory"?this.stockHeader="Stock":i=="price"&&(this.stockHeader="Price")}initRoles(){this.permissionsService.hasPermission(M.InventoryUpdate).then(i=>this.hasInventoryEdit.set(i)),this.permissionsService.hasPermission(M.PriceUpdate).then(i=>this.hasPriceEdit.set(i))}onCheckboxStateProduct(i){let n=this.data.filter(l=>l.ID==i);n.length>0&&(n=n.map(l=>(l.Variants=l.Variants.map(d=>(d.selected=l.selected,d)),l)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(n=>(n.selected=this.checkboxState,n)),i))}getItemFromChannel(i,n){return i.Channel.find(d=>R.IsNotEmpty(n.LocationID)?d.LocationID==n.LocationID:d.ChannelID==n.ID)}printItem(i){let n=this.table();if(n=="inventory")return i.Inventory;if(n=="price")return i.Price}onUpdateData(i,n,l,d){let x=this.table();this.hasPriceEdit()&&x=="price"&&this.onOpenDialogUpdate(i,n,l,d),this.hasInventoryEdit()&&x=="inventory"&&this.onOpenDialogUpdate(i,n,l,d)}onOpenDialogUpdate(i,n,l,d){this.dialog.open(fe,{data:{Name:i,Variant:n,ChannelID:l,Table:this.table(),ChannelItemID:d}}).afterClosed().pipe(A(x=>R.IsNotEmpty(x)),H(this.destroy$)).subscribe(x=>{this.onSubmit.emit(x)})}printPOS(i){let n=this.table();return n=="inventory"?i.Inventory?i.Inventory:0:n=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,n){this.biggerPictureService.openBiggerPicture(i,n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=Z({type:r,selectors:[["app-table"]],inputs:{data:"data",table:[1,"table"],channel:[1,"channel"],showProductToggle:[1,"showProductToggle"],productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:18,vars:2,consts:[["checkbox_update",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],["scope","col"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[1,"border","rounded","w-img","cursor-pointer",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"ngClass"],[1,"table-white","text-center",2,"color","red"],[1,"p-0",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"]],template:function(n,l){n&1&&(c(0,"div",1)(1,"table",2)(2,"thead",3)(3,"tr")(4,"th",4)(5,"div",5)(6,"div"),m(7,"Product"),_(),p(8,Se,3,1,"mat-slide-toggle",6),_()(),c(9,"th",7),m(10,"Variant"),_(),c(11,"th",8),m(12,"SKU"),_(),p(13,Fe,3,3),F(14,Ie,7,6,"th",9,q),_()(),F(16,qe,3,0,"tbody",null,E),_()()),n&2&&(a(8),g(l.showProductToggle()?8:-1),a(5),g(l.hiddenIPOSInventory()==!1?13:-1),a(),I(l.channel()),a(2),I(l.data))},dependencies:[te,J,Q,le,ne,ie,oe,he,xe,pe,ge,ue,ce,ae,de,se,ee,be],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]});let t=r;return t})();export{ft as a};
|
|
1
|
+
import{a as fe,b as be}from"./chunk-S5R6MCNP.js";import{a as xe,b as he}from"./chunk-DXYMG6QK.js";import{b as ue}from"./chunk-QFSA7CU4.js";import{a as ge}from"./chunk-4YCSITNV.js";import{a as M}from"./chunk-ZSUWHVKX.js";import{a as Ce}from"./chunk-6OJQRHIZ.js";import{i as _e}from"./chunk-I723PUUO.js";import{c as R}from"./chunk-JBEKD57G.js";import{d as me,h as pe}from"./chunk-EDEZ3JLR.js";import{A as le,b as ne,h as ie,m as oe}from"./chunk-L3W6SG2T.js";import{a as re,b as ae,c as ce}from"./chunk-ZETUYNFJ.js";import{v as se,w as de}from"./chunk-STYL7ETF.js";import{c as J,h as Q,l as ee,m as te}from"./chunk-LNJUGHOX.js";import{$b as p,$c as T,G as A,Gb as Z,Ha as $,Hc as W,Mb as h,Mc as m,Nc as V,Oc as v,Qc as k,Rc as O,Sc as D,Wc as K,ad as X,bc as g,ca as H,cc as E,dc as q,ec as F,f as z,fc as I,gc as s,hc as c,hd as N,ic as _,id as j,jc as P,jd as Y,kd as G,lb as w,nb as a,pc as L,qc as f,ra as S,sb as B,td as y,vc as b,xa as u,xc as o,ya as C}from"./chunk-ZYJ6LAJ3.js";var U=t=>[t],Te=t=>({"text-decoration-line-through":t}),ve=t=>({"text-danger":t}),ye=(t,r)=>({"bg-gradient-warning":t,"cell-hover pointer":r});function Se(t,r){if(t&1){let e=f();c(0,"mat-slide-toggle",10),b("toggleChange",function(){u(e);let n=o();return n.toggleStatus=!n.toggleStatus,C(n.onToggle())}),c(1,"small",11),m(2),_()()}if(t&2){let e=o();a(2),v(" ",e.productToggleTitle?e.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function we(t,r){if(t&1){let e=f();c(0,"th")(1,"input",13),D("ngModelChange",function(n){u(e);let l=o(2);return O(l.checkboxState,n)||(l.checkboxState=n),C(n)}),b("ngModelChange",function(){u(e);let n=o(2);return C(n.onCheckboxStateChange())}),_()()}if(t&2){let e=o(2);a(),k("ngModel",e.checkboxState)}}function Fe(t,r){if(t&1&&(h(0,we,2,1,"ng-template",12),c(1,"th",8),m(2,"POS"),_()),t&2){let e=o();s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function Ie(t,r){if(t&1&&(c(0,"th",9)(1,"div",14)(2,"div",15),P(3,"img",16),c(4,"div",17),m(5),N(6,"stringLimit"),_()()()()),t&2){let e=r.$implicit;a(2),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),a(),s("src",e==null?null:e.Img,w),a(2),v(" ",Y(6,3,e.Name,20)," ")}}function Pe(t,r){t&1&&L(0)}function Me(t,r){if(t&1&&h(0,Pe,1,0,"ng-container",29),t&2){o(2);let e=W(5);s("ngTemplateOutlet",e)}}function Ee(t,r){if(t&1&&h(0,Me,1,1,"ng-template",12),t&2){let e=o(4);s("ngxPermissionsOnly",T(1,U,e.roleInventoryUpdate))}}function Ve(t,r){t&1&&L(0)}function ke(t,r){if(t&1&&h(0,Ve,1,0,"ng-container",29),t&2){o(2);let e=W(5);s("ngTemplateOutlet",e)}}function Oe(t,r){if(t&1&&h(0,ke,1,1,"ng-template",12),t&2){let e=o(4);s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function De(t,r){if(t&1){let e=f();c(0,"div")(1,"input",30),D("ngModelChange",function(n){u(e);let l=o(4).$implicit;return O(l.selected,n)||(l.selected=n),C(n)}),b("ngModelChange",function(){u(e);let n=o(4).$implicit,l=o();return C(l.onCheckboxStateProduct(n.ID))}),_()()}if(t&2){let e=o(4).$implicit;a(),k("ngModel",e.selected),s("disabled",!(e!=null&&e.Category))}}function Ne(t,r){if(t&1&&p(0,De,2,2,"div"),t&2){let e=o(3).$implicit;g((e==null||e.Variants==null?null:e.Variants.length)>1?0:-1)}}function Ue(t,r){if(t&1){let e=f();c(0,"img",31),b("click",function(n){u(e);let l=o(3).$implicit,d=o();return C(d.onZoomImage(n,l==null?null:l.ImageUrl))}),_()}if(t&2){let e=o(3).$implicit;s("src",K(e==null?null:e.ThumbnailUrl),w)}}function $e(t,r){t&1&&P(0,"img",26)}function Be(t,r){if(t&1&&(c(0,"td",23)(1,"div",24),p(2,Ee,1,3,null,12)(3,Oe,1,3,null,12),h(4,Ne,1,1,"ng-template",null,0,G),c(6,"div"),p(7,Ue,1,2,"img",25)(8,$e,1,0,"img",26),_()()(),c(9,"td",27)(10,"div"),m(11),_(),c(12,"small",28),m(13),_()()),t&2){let e=o(2).$implicit,i=o();s("rowSpan",e==null?null:e.Variants.length),a(2),g(i.table()=="inventory"?2:3),a(5),g(e!=null&&e.ThumbnailUrl?7:8),a(2),s("rowSpan",e==null?null:e.Variants.length),a(2),V(e==null?null:e.Name),a(),s("ngClass",T(7,ve,!(e!=null&&e.Category))),a(),v("(",e!=null&&e.Category?e==null?null:e.Category:"Not Found In POS",")")}}function Le(t,r){if(t&1&&(c(0,"a",22),P(1,"i",32),_()),t&2){let e=o().$implicit,i=o(2);s("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),w)}}function We(t,r){if(t&1){let e=f();c(0,"input",35),D("ngModelChange",function(n){u(e);let l=o(3).$implicit;return O(l.selected,n)||(l.selected=n),C(n)}),_()}if(t&2){let e=o(3).$implicit,i=o().$implicit;k("ngModel",e.selected),s("disabled",!(i!=null&&i.Category))}}function je(t,r){if(t&1&&(c(0,"td",33),p(1,We,1,2,"input",34),_()),t&2){let e=o(2).$implicit,i=o(2);a(),g(i.printPOS(e)>=0||i.table()=="price"?1:-1)}}function Re(t,r){if(t&1&&(h(0,je,2,1,"ng-template",12),c(1,"td",19),m(2),N(3,"number"),_()),t&2){let e=o().$implicit,i=o(2);s("ngxPermissionsOnly",T(4,U,i.rolePriceEdit)),a(2),V(j(3,2,i.printPOS(e)))}}function ze(t,r){if(t&1){let e=f();c(0,"td",38),b("click",function(){u(e);let n=o().$implicit,l=o().$implicit,d=o().$implicit,x=o();return C(x.onUpdateData(d.Name,l,n.ID,d.ChannelItemID))}),c(1,"div",39)(2,"div",40),m(3),N(4,"number"),_(),c(5,"a",41),b("click",function(n){return u(e),C(n==null?null:n.stopPropagation())}),P(6,"i",32),_()()()}if(t&2){let e=r,i=o(2).$implicit,n=o(2);s("ngClass",X(5,ye,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table()=="price"||n.hasInventoryEdit()&&n.table()=="inventory")),a(3),v(" ",j(4,3,n.printItem(e))," "),a(2),s("href",e.Url,w)}}function Ae(t,r){t&1&&(c(0,"td",37)(1,"div",39)(2,"span"),m(3,"X"),_()()())}function He(t,r){if(t&1&&p(0,ze,7,8,"td",36)(1,Ae,4,0,"td",37),t&2){let e,i=r.$implicit,n=o().$implicit,l=o(2);g((e=l.getItemFromChannel(n,i))?0:1,e)}}function Ze(t,r){if(t&1&&(c(0,"tr"),p(1,Be,14,9),c(2,"td",18),m(3),_(),c(4,"td",19)(5,"div",20)(6,"div",21),m(7),_(),c(8,"div",17),p(9,Le,2,1,"a",22),_()()(),p(10,Re,4,6),F(11,He,2,1,null,null,E),_()),t&2){let e=r.$implicit,i=r.$index,n=o().$implicit,l=o();a(),g(i==0?1:-1),a(2),V(e==null?null:e.Model),a(2),s("matTooltip",e.Discontinued?l.discontinuedVariantMsg:""),a(),s("ngClass",T(7,Te,e.Discontinued)),a(),v(" ",e.Code," "),a(2),g(n.Category?9:-1),a(),g(l.hiddenIPOSInventory()==!1?10:-1),a(),I(l.channel())}}function qe(t,r){if(t&1&&(c(0,"tbody"),F(1,Ze,13,9,"tr",null,E),_()),t&2){let e=r.$implicit;a(),I(e.Variants)}}var ft=(()=>{let r=class r{constructor(){this.dialog=S(me),this.biggerPictureService=S(Ce),this.authService=S(_e),this.permissionsService=S(re),this.table=y(void 0),this.channel=y(void 0),this.showProductToggle=y(!1),this.multiwarehouse=y(!1),this.hiddenIPOSInventory=y(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=M.PriceUpdate,this.roleInventoryUpdate=M.InventoryUpdate,this.hasPriceEdit=$(!1),this.hasInventoryEdit=$(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new B,this.destroy$=new z,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles();let i=this.table();i=="inventory"?this.stockHeader="Stock":i=="price"&&(this.stockHeader="Price")}initRoles(){this.permissionsService.hasPermission(M.InventoryUpdate).then(i=>this.hasInventoryEdit.set(i)),this.permissionsService.hasPermission(M.PriceUpdate).then(i=>this.hasPriceEdit.set(i))}onCheckboxStateProduct(i){let n=this.data.filter(l=>l.ID==i);n.length>0&&(n=n.map(l=>(l.Variants=l.Variants.map(d=>(d.selected=l.selected,d)),l)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(n=>(n.selected=this.checkboxState,n)),i))}getItemFromChannel(i,n){return i.Channel.find(d=>R.IsNotEmpty(n.LocationID)?d.LocationID==n.LocationID:d.ChannelID==n.ID)}printItem(i){let n=this.table();if(n=="inventory")return i.Inventory;if(n=="price")return i.Price}onUpdateData(i,n,l,d){let x=this.table();this.hasPriceEdit()&&x=="price"&&this.onOpenDialogUpdate(i,n,l,d),this.hasInventoryEdit()&&x=="inventory"&&this.onOpenDialogUpdate(i,n,l,d)}onOpenDialogUpdate(i,n,l,d){this.dialog.open(fe,{data:{Name:i,Variant:n,ChannelID:l,Table:this.table(),ChannelItemID:d}}).afterClosed().pipe(A(x=>R.IsNotEmpty(x)),H(this.destroy$)).subscribe(x=>{this.onSubmit.emit(x)})}printPOS(i){let n=this.table();return n=="inventory"?i.Inventory?i.Inventory:0:n=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,n){this.biggerPictureService.openBiggerPicture(i,n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=Z({type:r,selectors:[["app-table"]],inputs:{data:"data",table:[1,"table"],channel:[1,"channel"],showProductToggle:[1,"showProductToggle"],productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:18,vars:2,consts:[["checkbox_update",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],["scope","col"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[1,"border","rounded","w-img","cursor-pointer",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"ngClass"],[1,"table-white","text-center",2,"color","red"],[1,"p-0",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"]],template:function(n,l){n&1&&(c(0,"div",1)(1,"table",2)(2,"thead",3)(3,"tr")(4,"th",4)(5,"div",5)(6,"div"),m(7,"Product"),_(),p(8,Se,3,1,"mat-slide-toggle",6),_()(),c(9,"th",7),m(10,"Variant"),_(),c(11,"th",8),m(12,"SKU"),_(),p(13,Fe,3,3),F(14,Ie,7,6,"th",9,q),_()(),F(16,qe,3,0,"tbody",null,E),_()()),n&2&&(a(8),g(l.showProductToggle()?8:-1),a(5),g(l.hiddenIPOSInventory()==!1?13:-1),a(),I(l.channel()),a(2),I(l.data))},dependencies:[te,J,Q,le,ne,ie,oe,he,xe,pe,ge,ue,ce,ae,de,se,ee,be],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]});let t=r;return t})();export{ft as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ie,b as re,c as ae,d as le,e as pe,f as se,g as me}from"./chunk-R2XT5M5F.js";import{b as oe}from"./chunk-2F4DTZCZ.js";import{a as Y}from"./chunk-
|
|
1
|
+
import{a as ie,b as re,c as ae,d as le,e as pe,f as se,g as me}from"./chunk-R2XT5M5F.js";import{b as oe}from"./chunk-2F4DTZCZ.js";import{a as Y}from"./chunk-UCEZJNIL.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import{a as Z,b as ee}from"./chunk-A7PUMY67.js";import"./chunk-N5AE5WMQ.js";import{i as X}from"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import{e as Q}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as te,n as ne}from"./chunk-EDEZ3JLR.js";import{A as J,c as z,h as K,m as q}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as j,G as $,I as G,g as H,m as W}from"./chunk-LNJUGHOX.js";import{$b as x,$c as T,Gb as h,Hb as L,Hc as D,Mb as v,Mc as p,Nc as R,Oc as O,Qc as P,Rc as F,Sc as V,Zc as A,bc as w,dc as g,ec as S,fc as C,gc as m,hc as i,ic as o,jc as c,kb as N,ma as M,na as U,nb as s,qc as _,ra as y,sb as B,td as E,vc as b,xa as u,xc as d,ya as f}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var he=e=>[e];function ge(e,t){if(e&1&&(i(0,"a",8),p(1),o()),e&2){let a=t.$implicit;m("routerLink",T(2,he,a.url)),s(),O(" ",a.title)}}var ce=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=h({type:t,selectors:[["app-download"]],standalone:!1,decls:13,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[1,"dropdown-item",3,"routerLink"]],template:function(r,l){r&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),c(3,"nav-tab",2),o()(),i(4,"div")(5,"div",3)(6,"a",4),c(7,"i",5),o(),i(8,"div",6)(9,"div",7),S(10,ge,2,4,"a",8,g),o()()()()(),c(12,"router-outlet")),r&2&&(s(3),m("Tabs",l.tabs),s(7),C(l.moreMenu))},dependencies:[Z,j,$],encapsulation:2});let e=t;return e})();var k=(()=>{let t=class t{constructor(){this.httpService=y(Q)}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=M({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Se=e=>({"background-color":e});function Ce(e,t){if(e&1&&(i(0,"th"),p(1),o()),e&2){let a=t.$implicit;s(),R(a.column)}}function be(e,t){if(e&1&&(i(0,"td"),c(1,"span",4),o()),e&2){let a=t.$implicit,n=d().$implicit;s(),m("innerHTML",n[a.prop],N)}}function ye(e,t){if(e&1&&(i(0,"tr",3),S(1,be,2,1,"td",null,g),o()),e&2){let a=t.$implicit,n=d();m("ngStyle",T(1,Se,a.Status>200?"#F4D6D5":"#DEE9C9")),s(),C(n.configs())}}var de=(()=>{let t=class t{constructor(){this.configs=E([]),this.data=E([]),this.status=E(void 0),this.eventClose=new B}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=h({type:t,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},standalone:!1,decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"ngStyle"],[3,"innerHTML"]],template:function(r,l){r&1&&(i(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),S(4,Ce,2,1,"th",null,g),o()(),i(6,"tbody"),S(7,ye,3,3,"tr",3,g),o()()()),r&2&&(s(4),C(l.configs()),s(3),C(l.data()))},dependencies:[H],encapsulation:2});let e=t;return e})();function xe(e,t){if(e&1){let a=_();i(0,"button",17),b("click",function(){u(a);let r=d(),l=D(11);return f(r.onNewStepperState(l))}),c(1,"i",18),p(2," New "),o()}}function we(e,t){if(e&1){let a=_();i(0,"button",17),b("click",function(){u(a),d();let r=D(11);return f(r.previous())}),p(1," Back "),o()}}function De(e,t){if(e&1){let a=_();i(0,"button",19),b("click",function(){u(a);let r=d(),l=D(11);return f(r.onStepperNext(l))}),p(1," Next "),o()}}function Te(e,t){if(e&1){let a=_();i(0,"button",20),b("click",function(){u(a);let r=d(),l=D(11);return f(r.onSubmit(l))}),p(1,"Download"),o()}if(e&2){let a=d();m("disabled",!a.urls)}}function Ee(e,t){e&1&&(c(0,"i",21),i(1,"span"),p(2,"Instruction"),o())}function Ie(e,t){e&1&&(i(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),p(4,"Note"),o()(),i(5,"div",26)(6,"ol",27)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),o(),i(9,"li"),p(10," Copy Product URL from "),i(11,"a",28),p(12,"https://seller.tokopedia.com/ "),o(),p(13," and paste in this form "),o(),i(14,"li"),p(15," Use New Line when you want to input several product URLs "),o()()()()())}function ke(e,t){e&1&&(c(0,"i",29),i(1,"span"),p(2,"Download"),o())}function Me(e,t){if(e&1){let a=_();i(0,"div",22)(1,"textarea",30),V("ngModelChange",function(r){u(a);let l=d();return F(l.urls,r)||(l.urls=r),f(r)}),o()()}if(e&2){let a=d();s(),m("placeholder",a.urlPlaceholder),P("ngModel",a.urls)}}function Ue(e,t){e&1&&(c(0,"i",31),i(1,"span"),p(2,"Finish"),o())}function Ne(e,t){if(e&1&&(i(0,"div",22),c(1,"app-response-api-list",32),o()),e&2){let a=d();s(),m("data",a.downloadResponses)("configs",a.configs)}}function Be(e,t){e&1&&(i(0,"h6"),p(1,"1"),o())}function Le(e,t){e&1&&(i(0,"h6"),p(1,"2"),o())}function Re(e,t){e&1&&(i(0,"h6"),p(1,"3"),o())}var ue=(()=>{let t=class t{constructor(){this.downloadService=y(k),this.authService=y(X),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
|
|
2
2
|
https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(n){this.stepperState=n.selectedStep.state}onSubmit(n){let r=this.urls.split(/\r?\n/);this.downloadService.download(r).subscribe(l=>{this.downloadResponses=l,this.mappingLinkToProduct(),this.onStepperNext(n)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(n=>(n.Name=n?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${n.ID}" target="_blank">
|
|
3
3
|
${n?.Name}
|
|
4
4
|
</a>`:"-",n))}onNewStepperState(n){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",n.reset(),this.onStepperNext(n)}onStepperNext(n){n.selected.completed=!0,n.next()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=h({type:t,selectors:[["app-by-url"]],standalone:!1,features:[A([{provide:ie,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(r,l){if(r&1){let fe=_();i(0,"mainpanel",1)(1,"actions"),x(2,xe,3,0,"button",2),x(3,we,2,0,"button",2),x(4,De,2,0,"button",3),x(5,Te,2,1,"button",4),o(),i(6,"content")(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,0),b("selectionChange",function(_e){return u(fe),f(l.onStepperChange(_e))}),i(12,"mat-step",9),v(13,Ee,3,0,"ng-template",10)(14,Ie,16,0,"ng-template",11),o(),i(15,"mat-step",12),v(16,ke,3,0,"ng-template",10)(17,Me,2,2,"ng-template",11),o(),i(18,"mat-step",13),v(19,Ue,3,0,"ng-template",10)(20,Ne,2,2,"ng-template",11),o(),v(21,Be,2,0,"ng-template",14)(22,Le,2,0,"ng-template",15)(23,Re,2,0,"ng-template",16),o()()()()()()}r&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),w(l.stepperState=="FINISH"?2:-1),s(),w(l.stepperState=="DOWNLOAD"?3:-1),s(),w(l.stepperState=="GUIDE"?4:-1),s(),w(l.stepperState=="DOWNLOAD"?5:-1),s(5),m("selectedIndex",1),s(2),m("editable",l.stepperState!="FINISH")("completed",!0),s(3),m("editable",l.stepperState!="FINISH")("completed",!1))},dependencies:[z,K,q,te,pe,re,se,ae,le,de],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-UCEZJNIL.js";import{a as C,b as v}from"./chunk-A7PUMY67.js";import"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as h,I as o,m as f}from"./chunk-LNJUGHOX.js";import{Gb as l,Hb as c,gc as s,hc as d,ic as u,jc as i,na as p,nb as m}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var b=(()=>{let e=class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"}]}};e.\u0275fac=function(n){return new(n||e)},e.\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(n,g){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),u()()(),i(4,"router-outlet")),n&2&&(m(3),s("Tabs",g.priceTabs))},dependencies:[v,C,o,h],encapsulation:2});let t=e;return t})();var M=[{path:"",component:b,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-GX6JPDQ5.js").then(t=>t.PricePosChannelComponent)},canActivate:[r],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-5CHTDUME.js").then(t=>t.PriceSingleChannelComponent)},canActivate:[r],data:{title:"Price Single Channel Comparison"}}]}],F=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=c({type:e}),e.\u0275inj=p({imports:[f,o.forChild(M)]});let t=e;return t})();export{F as PriceRoutingModule};
|