marketplacepos 5.50.2 → 5.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +26 -26
- package/Marketplace/{chunk-BGJEGBP5.js → chunk-25Q56ATV.js} +1 -1
- package/Marketplace/{chunk-4NT5VNJW.js → chunk-2PMJPSC4.js} +2 -2
- package/Marketplace/{chunk-VFZ76Z6T.js → chunk-364CDNZV.js} +1 -1
- package/Marketplace/{chunk-JUWHPFPW.js → chunk-36OIR6DM.js} +1 -1
- package/Marketplace/{chunk-TLCH5ENB.js → chunk-3Q6QZGLZ.js} +1 -1
- package/Marketplace/{chunk-B5BQZD66.js → chunk-4ITXH35D.js} +1 -1
- package/Marketplace/{chunk-EDGT4W2Q.js → chunk-4JCS7WPV.js} +1 -1
- package/Marketplace/{chunk-RNJHJCHP.js → chunk-53B6D5OR.js} +1 -1
- package/Marketplace/chunk-5NWJOQN5.js +1 -0
- package/Marketplace/{chunk-LQUMSCFQ.js → chunk-5YQUGH5Z.js} +1 -1
- package/Marketplace/{chunk-7K6U3ABQ.js → chunk-62YNPW6Q.js} +1 -1
- package/Marketplace/{chunk-YBRWFONB.js → chunk-6DGG765N.js} +1 -1
- package/Marketplace/{chunk-7AJN7ECH.js → chunk-6IZWIEUD.js} +1 -1
- package/Marketplace/{chunk-SS4PLPBF.js → chunk-7E6JD2PT.js} +1 -1
- package/Marketplace/{chunk-5NJAMQES.js → chunk-7QDKBMEA.js} +1 -1
- package/Marketplace/{chunk-TH27YE6R.js → chunk-7RIUHK6K.js} +1 -1
- package/Marketplace/{chunk-ELAPYSP6.js → chunk-A4X7F4MN.js} +1 -1
- package/Marketplace/{chunk-ZLNNQRTE.js → chunk-AF6XAQPY.js} +1 -1
- package/Marketplace/{chunk-7XA3VQEB.js → chunk-AZEH7PMO.js} +1 -1
- package/Marketplace/{chunk-GD6ZN56B.js → chunk-BKCKASH3.js} +1 -1
- package/Marketplace/{chunk-3TK5BYAY.js → chunk-BLOGT3TL.js} +1 -1
- package/Marketplace/{chunk-ZD5PSX3I.js → chunk-BVW7WI5I.js} +1 -1
- package/Marketplace/{chunk-QSW7O4GN.js → chunk-C64L25TP.js} +1 -1
- package/Marketplace/chunk-E6W25RW5.js +1 -0
- package/Marketplace/{chunk-DYTXOFIM.js → chunk-EGJMTFNO.js} +1 -1
- package/Marketplace/{chunk-YYKWI27U.js → chunk-EX4C4ZW4.js} +1 -1
- package/Marketplace/{chunk-PRM7MTFP.js → chunk-EYYKWIXP.js} +1 -1
- package/Marketplace/{chunk-U7FIZHGC.js → chunk-GD5I7ADU.js} +1 -1
- package/Marketplace/{chunk-2UKRRVAM.js → chunk-HT2MSA66.js} +1 -1
- package/Marketplace/{chunk-G3KVHCET.js → chunk-HZTKN5RX.js} +1 -1
- package/Marketplace/{chunk-OWLZQ5WE.js → chunk-ILFUI3MT.js} +1 -1
- package/Marketplace/{chunk-F24YPKYG.js → chunk-IXNEMOFX.js} +1 -1
- package/Marketplace/chunk-J4RDYEJC.js +1 -0
- package/Marketplace/{chunk-QB7PXKAO.js → chunk-K2CHDL7K.js} +1 -1
- package/Marketplace/{chunk-WCX3T6LK.js → chunk-LCN52IJT.js} +1 -1
- package/Marketplace/{chunk-GRVGKVD6.js → chunk-LOVYZLSU.js} +1 -1
- package/Marketplace/{chunk-CHGAMAQX.js → chunk-LWUMLKSO.js} +1 -1
- package/Marketplace/{chunk-EU324R5S.js → chunk-M5JNIPMS.js} +1 -1
- package/Marketplace/{chunk-OUYOKQ57.js → chunk-OJI34QN5.js} +1 -1
- package/Marketplace/{chunk-FUBZ75C7.js → chunk-OMY5ASFA.js} +1 -1
- package/Marketplace/{chunk-KA2HPWPG.js → chunk-OPCGCQMZ.js} +1 -1
- package/Marketplace/{chunk-A4UF2QH6.js → chunk-Q5IVQP3E.js} +1 -1
- package/Marketplace/{chunk-XF4A775R.js → chunk-R3BRUX7Z.js} +1 -1
- package/Marketplace/{chunk-PQM7IB5J.js → chunk-SASGSPGQ.js} +1 -1
- package/Marketplace/{chunk-XCJ5XRFI.js → chunk-SLQ42VND.js} +1 -1
- package/Marketplace/chunk-T3CN3WQD.js +1 -0
- package/Marketplace/{chunk-TG7XOXCH.js → chunk-T62YFSKW.js} +1 -1
- package/Marketplace/{chunk-KUPGF23P.js → chunk-TLTFNFAB.js} +1 -1
- package/Marketplace/{chunk-TVFILHVN.js → chunk-VBVBTC2P.js} +1 -1
- package/Marketplace/chunk-WEJBY3OB.js +1 -0
- package/Marketplace/{chunk-TUJBAZ5Q.js → chunk-WH76SMZT.js} +1 -1
- package/Marketplace/{chunk-2DZHA445.js → chunk-XAL6YLNQ.js} +1 -1
- package/Marketplace/{chunk-6LXQMIYX.js → chunk-XSOP2OTT.js} +1 -1
- package/Marketplace/{chunk-EKYPWTJN.js → chunk-YF7CCYHF.js} +1 -1
- package/Marketplace/{chunk-YQKEWN54.js → chunk-ZMMMNVOU.js} +1 -1
- package/Marketplace/{chunk-WXXGLR46.js → chunk-ZMSM2NR7.js} +1 -1
- package/Marketplace/{chunk-WG34QKGX.js → chunk-ZXFWQ6VJ.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-G6GGJLGW.js → main-SOO5LINL.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-42GDFAAQ.js +0 -1
- package/Marketplace/chunk-CZICXKFA.js +0 -1
- package/Marketplace/chunk-DQXBBV26.js +0 -1
- package/Marketplace/chunk-UQ7PDZO3.js +0 -1
- /package/Marketplace/{chunk-FDGH6XKK.js → chunk-CIVDQKQZ.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as J}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as I}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as H,c as R,h as j,m as F}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as W}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B,w as k,z as P}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as x,Ia as h,Nc as i,Oc as V,Rc as f,Sc as C,Tc as b,Uc as O,Vc as D,Wc as _,Z as S,ac as M,cc as N,hc as g,ic as e,id as v,jc as t,jd as y,kc as L,ob as d,ra as E,rc as T,wc as w,ya as p,yc as A,za as m}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function Y(r,l){if(r&1&&(e(0,"pre",21),i(1),v(2,"json"),t()),r&2){A();let U=_(25);d(),V(y(2,1,U))}}function q(r,l){r&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ae=(()=>{let l=class l{constructor(){this.httpService=E(W),this.selectedChannel=h(null),this.orderNumber=h(null)}initEscrowLog(){this.escrowLog$=this.httpService.post(I.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(S(1))}copyToClipboard(c){if(!c)return;let s=typeof c=="string"?c:JSON.stringify(c,null,2);navigator.clipboard.writeText(s),alert("Copied to clipboard!")}};l.\u0275fac=function(s){return new(s||l)},l.\u0275cmp=x({type:l,selectors:[["app-escrow-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(s,n){if(s&1){let a=T();e(0,"mainpanel",0)(1,"actions")(2,"button",1),w("click",function(){return p(a),m(n.initEscrowLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),b("ngModelChange",function(o){return p(a),C(n.selectedChannel,o)||(n.selectedChannel=o),m(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),b("ngModelChange",function(o){return p(a),C(n.orderNumber,o)||(n.orderNumber=o),m(o)}),t()()()()(),O(25),v(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),w("click",function(){p(a);let o=_(25);return m(n.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,Y,3,3,"pre",21)(39,q,2,0,"p",22),t()()()()()()()()()}if(s&2){g("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),f("ngModel",n.selectedChannel),d(8),f("ngModel",n.orderNumber),d();let a=D(y(26,6,n.escrowLog$));d(8),g("disabled",!a),d(5),N(a?38:39)}},dependencies:[B,H,R,j,F,J,G,k,P],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}"]});let r=l;return r})();export{ae as EscrowApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ne,b as Fe}from"./chunk-RIIIECQH.js";import{a as Pe}from"./chunk-JWDQVXQP.js";import{a as Ee,b as Ve}from"./chunk-K5WSFDNA.js";import{a as De}from"./chunk-TVFILHVN.js";import{a as j}from"./chunk-L6CRWJ2O.js";import{a as Ae}from"./chunk-PV4OJSZI.js";import"./chunk-FSOZOROI.js";import"./chunk-VYI7JYH5.js";import"./chunk-BZWZ64N5.js";import{a as Me}from"./chunk-WG34QKGX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as Le}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as Te}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ke}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as Se,c as we,e as ve,f as ye,g as xe}from"./chunk-IA7NJXJD.js";import{a as be}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as _e}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as x}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as d,c as A}from"./chunk-UPRDDI4K.js";import{A as z,b as ge,c as fe,h as W,m as R,o as Ce}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as M,e as O}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as ue,B as he,w as me,y as de}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Cc as te,Dc as ie,Ec as ne,G,Hb as N,Ia as B,Mc as oe,Nc as m,Oc as P,Pc as E,Rc as S,Sc as w,Tc as v,Uc as re,Vc as ae,Wc as F,Z as J,_c as le,aa as X,ac as k,ad as pe,cc as T,dc as Z,fc as $,gc as ee,hc as y,ic as o,id as V,jc as r,jd as I,kc as _,kd as se,ma as D,mb as Y,ob as c,pd as ce,ra as C,rc as L,v as K,wc as b,ya as h,yc as f,za as g}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Q,b as q}from"./chunk-66YHNWRR.js";var Ie=(()=>{let l=class l{constructor(){this.http=C(O),this.toastr=C(M)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(K(p=>(p&&(p.Number=e),p)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case d.Tokopedia:let u=window.open("about:blank","_blank");u.document.write(e.File),u.document.close();break;case d.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case d.Shopee:var i=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),p=new Blob([i],{type:"octet/stream"});A.openDownloadFile(p,`${e?.Number}.pdf`);break;case d.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var Oe=(()=>{let l=class l{constructor(){this.dialogRef=C(Se),this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"h2",1),m(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),m(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),v("ngModelChange",function(u){return w(i.tandaiSudahDicetak,u)||(i.tandaiSudahDicetak=u),u}),r(),o(10,"span",7),m(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),m(14,"Cancel"),r(),o(15,"button",10),b("click",function(){return i.onPrint()}),m(16,"Cetak Pesanan"),r()()()),t&2&&(c(9),S("ngModel",i.tandaiSudahDicetak))},dependencies:[z,W,R,xe,ye,ve],encapsulation:2});let a=l;return a})();var U=(()=>{let l=class l{constructor(){this.httpService=C(O),this.shippingLabelService=C(Ie),this.toastrService=C(M),this.dialog=C(we)}printShippingLabel(e){switch(e?.MarketType){case d.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Shopee));break;case d.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tiktok));break;case d.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(G(t=>A.IsNotEmpty(t)),X(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tokopedia));break;case d.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Lazada));break;case d.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(p=>({OrderNumber:p.Number,ShopID:p.ShopID})),i="";switch(e[0]?.MarketType){case d.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case d.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case d.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(p=>{var u=Uint8Array.from(atob(p.File),We=>We.charCodeAt(0)),s=new Blob([u],{type:"octet/stream"});A.openDownloadFile(s,`${p?.Name}.pdf`)})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac});let a=l;return a})();var ze=["contextMenu"],Be=a=>({"td-cell-hover":a});function je(a,l){if(a&1){let n=L();o(0,"button",20),b("click",function(){h(n);let t=f(),i=F(0);return g(t.onDowloadShippingLabel(i))}),_(1,"i",21),o(2,"span"),m(3,"Download Shipping Label"),r()()}}function He(a,l){if(a&1){let n=L();o(0,"input",47),v("ngModelChange",function(t){h(n);let i=f().$implicit;return w(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){h(n);let t=f(3),i=F(0);return g(t.onSelectOrders(i))}),r()}if(a&2){let n=f().$implicit,e=f(2);S("ngModel",n.selected),y("disabled",e.selectedChannelType()!=null&&e.selectedChannelType()!=n.MarketType)}}function Ue(a,l){if(a&1&&_(0,"variants-dropdown",39),a&2){let n=f().$implicit;y("variants",n==null?null:n.Variants)}}function Qe(a,l){if(a&1&&_(0,"variant-with-image",40),a&2){let n=f().$implicit;y("variant",n==null?null:n.Variants[0])}}function qe(a,l){if(a&1&&(o(0,"span"),m(1),r()),a&2){let n=f().$implicit;c(),E("(",n.LogisticService==null?null:n.LogisticService.Option,")")}}function Ke(a,l){if(a&1){let n=L();o(0,"button",48),b("click",function(){h(n);let t=f().$implicit,i=f(2);return g(i.onPrintShippingLabel(t))}),_(1,"i",49),r()}}function Ge(a,l){if(a&1){let n=L();o(0,"tr")(1,"td"),k(2,He,1,2,"input",31),r(),o(3,"td")(4,"div",32),_(5,"img",33),V(6,"channelImage"),o(7,"div",34)(8,"div"),m(9),r(),o(10,"small",35)(11,"span"),m(12),r()()()()(),o(13,"td")(14,"div",36)(15,"div"),_(16,"order-link",37),r(),o(17,"small"),m(18),V(19,"date"),r(),_(20,"br"),o(21,"small"),_(22,"i",38),m(23),r()()(),o(24,"td"),k(25,Ue,1,1,"variants-dropdown",39)(26,Qe,1,1,"variant-with-image",40),r(),o(27,"td",41),m(28),V(29,"number"),r(),o(30,"td",42),b("mouseenter",function(t){let i=h(n).$implicit,p=f(2);return g(p.onMouseEnter(t,i))}),o(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),m(35),r(),k(36,qe,2,1,"span"),r(),o(37,"small"),m(38),r()()()(),o(39,"td",45),k(40,Ke,2,0,"button",46),r()()}if(a&2){let n=l.$implicit,e=f(2);c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?2:-1),c(3),y("src",I(6,16,n==null?null:n.MarketType),Y)("alt",n==null||n.Variants[0]==null?null:n.Variants[0].Name),c(4),P(n.Outlet),c(3),P(n.ChannelName),c(4),y("order",n),c(2),E(" ",se(19,18,n==null?null:n.Created,"dd/MM/yyyy HH:mm:ss")," "),c(5),E(" ",n.Customer," "),c(),oe(pe(23,Be,(n.Variants==null?null:n.Variants.length)>1)),c(),T((n.Variants==null?null:n.Variants.length)>1?25:26),c(3),P(I(29,21,n.Amount)),c(7),P(n.LogisticService!=null&&n.LogisticService.Name?n.LogisticService==null?null:n.LogisticService.Name:"-"),c(),T(n.LogisticService!=null&&n.LogisticService.Option&&(n.LogisticService==null?null:n.LogisticService.Option)!="Default"?36:-1),c(2),E(" ",n.ReferenceNumber?n.ReferenceNumber:"-"," "),c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?40:-1)}}function Je(a,l){if(a&1){let n=L();o(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),_(4,"th",25),o(5,"th",26),m(6,"Outlet"),r(),o(7,"th",26),m(8,"Number"),r(),o(9,"th"),m(10,"Items"),r(),o(11,"th",27),m(12,"Amount"),r(),o(13,"th",28),m(14,"Shipping"),r(),_(15,"th",29),r()(),o(16,"tbody"),$(17,Ge,41,25,"tr",null,Z),r()(),o(19,"app-custom-paginator",30),b("next",function(){h(n);let t=f();return g(t.initAwaitingCollection())})("previous",function(){h(n);let t=f();return g(t.initAwaitingCollection())}),r()()}if(a&2){let n=f(),e=F(0);c(17),ee(e),c(2),y("filter",n.filter())("totaldata",e==null?null:e.length)}}function Xe(a,l){a&1&&(o(0,"div",18),_(1,"app-empty-state"),r())}var Jt=(()=>{let l=class l{constructor(){this.printShippingService=C(U),this.orderService=C(j),this.toastr=C(M),this.fulfillmentService=C(Ne),this.channelType=d,this.selectedOrders=B([]),this.selectedChannelType=ce(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=B({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>q(Q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(J(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&te(ze,5),t&2){let p;ie(p=ne())&&(i.contextMenuEl=p.first)}},features:[le([j,U])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let p=L();re(0),V(1,"async"),o(2,"mainpanel",1),b("onSubmit",function(){return h(p),g(i.initAwaitingCollection())}),v("textChange",function(s){return h(p),w(i.filter().Number,s)||(i.filter().Number=s),g(s)}),o(3,"actions"),k(4,je,4,0,"button",2),o(5,"a",3),_(6,"i",4),o(7,"span"),m(8,"Order Fulfillment Display"),r()()(),o(9,"filters")(10,"div")(11,"label",5),m(12,"Channel"),r(),o(13,"app-channel-options-v2",6),v("ngModelChange",function(s){return h(p),w(i.filter().ListChannelID,s)||(i.filter().ListChannelID=s),g(s)}),r()(),o(14,"div",7)(15,"label",5),m(16,"From/To"),r(),o(17,"div",8)(18,"datepicker",9),v("dateChange",function(s){return h(p),w(i.filter().From,s)||(i.filter().From=s),g(s)}),r()(),o(19,"div")(20,"datepicker",10),v("dateChange",function(s){return h(p),w(i.filter().To,s)||(i.filter().To=s),g(s)}),r()()(),o(21,"div",7)(22,"label",11),m(23,"Page Number"),r(),o(24,"input",12),v("ngModelChange",function(s){return h(p),w(i.filter().PageNumber,s)||(i.filter().PageNumber=s),g(s)}),r()(),o(25,"div",7)(26,"label",11),m(27,"Page Size"),r(),o(28,"input",13),v("ngModelChange",function(s){return h(p),w(i.filter().PageSize,s)||(i.filter().PageSize=s),g(s)}),r()()(),o(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),k(33,Je,20,2,"div",17)(34,Xe,2,0,"div",18),r()()()()(),o(35,"app-context-menu",19,0),b("onSelectItem",function(s){return h(p),g(i.onSelectContextItem(s))}),r()}if(t&2){let p=ae(I(1,10,i.awaitingCollections$));c(2),S("text",i.filter().Number),c(2),T(i.selectedOrders().length>0?4:-1),c(9),y("multiple",!0),S("ngModel",i.filter().ListChannelID),c(5),S("date",i.filter().From),c(2),S("date",i.filter().To),c(4),S("ngModel",i.filter().PageNumber),c(4),S("ngModel",i.filter().PageSize),c(5),T((p==null?null:p.length)>0?33:34),c(2),y("items",i.contextMenuItems)}},dependencies:[he,ke,Te,Le,z,fe,Ce,ge,W,R,Ee,Ve,Ae,be,_e,De,Fe,Me,me,ue,de,Pe],encapsulation:2});let a=l;return a})();export{Jt as AwaitingCollectionComponent};
|
|
1
|
+
import{a as Ne,b as Fe}from"./chunk-RIIIECQH.js";import{a as Pe}from"./chunk-JWDQVXQP.js";import{a as Ee,b as Ve}from"./chunk-K5WSFDNA.js";import{a as De}from"./chunk-VBVBTC2P.js";import{a as j}from"./chunk-L6CRWJ2O.js";import{a as Ae}from"./chunk-PV4OJSZI.js";import"./chunk-FSOZOROI.js";import"./chunk-VYI7JYH5.js";import"./chunk-BZWZ64N5.js";import{a as Me}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as Le}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as Te}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ke}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as Se,c as we,e as ve,f as ye,g as xe}from"./chunk-IA7NJXJD.js";import{a as be}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as _e}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as x}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as d,c as A}from"./chunk-UPRDDI4K.js";import{A as z,b as ge,c as fe,h as W,m as R,o as Ce}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as M,e as O}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as ue,B as he,w as me,y as de}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Cc as te,Dc as ie,Ec as ne,G,Hb as N,Ia as B,Mc as oe,Nc as m,Oc as P,Pc as E,Rc as S,Sc as w,Tc as v,Uc as re,Vc as ae,Wc as F,Z as J,_c as le,aa as X,ac as k,ad as pe,cc as T,dc as Z,fc as $,gc as ee,hc as y,ic as o,id as V,jc as r,jd as I,kc as _,kd as se,ma as D,mb as Y,ob as c,pd as ce,ra as C,rc as L,v as K,wc as b,ya as h,yc as f,za as g}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Q,b as q}from"./chunk-66YHNWRR.js";var Ie=(()=>{let l=class l{constructor(){this.http=C(O),this.toastr=C(M)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(K(p=>(p&&(p.Number=e),p)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case d.Tokopedia:let u=window.open("about:blank","_blank");u.document.write(e.File),u.document.close();break;case d.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case d.Shopee:var i=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),p=new Blob([i],{type:"octet/stream"});A.openDownloadFile(p,`${e?.Number}.pdf`);break;case d.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var Oe=(()=>{let l=class l{constructor(){this.dialogRef=C(Se),this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"h2",1),m(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),m(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),v("ngModelChange",function(u){return w(i.tandaiSudahDicetak,u)||(i.tandaiSudahDicetak=u),u}),r(),o(10,"span",7),m(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),m(14,"Cancel"),r(),o(15,"button",10),b("click",function(){return i.onPrint()}),m(16,"Cetak Pesanan"),r()()()),t&2&&(c(9),S("ngModel",i.tandaiSudahDicetak))},dependencies:[z,W,R,xe,ye,ve],encapsulation:2});let a=l;return a})();var U=(()=>{let l=class l{constructor(){this.httpService=C(O),this.shippingLabelService=C(Ie),this.toastrService=C(M),this.dialog=C(we)}printShippingLabel(e){switch(e?.MarketType){case d.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Shopee));break;case d.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tiktok));break;case d.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(G(t=>A.IsNotEmpty(t)),X(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tokopedia));break;case d.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Lazada));break;case d.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(p=>({OrderNumber:p.Number,ShopID:p.ShopID})),i="";switch(e[0]?.MarketType){case d.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case d.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case d.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(p=>{var u=Uint8Array.from(atob(p.File),We=>We.charCodeAt(0)),s=new Blob([u],{type:"octet/stream"});A.openDownloadFile(s,`${p?.Name}.pdf`)})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac});let a=l;return a})();var ze=["contextMenu"],Be=a=>({"td-cell-hover":a});function je(a,l){if(a&1){let n=L();o(0,"button",20),b("click",function(){h(n);let t=f(),i=F(0);return g(t.onDowloadShippingLabel(i))}),_(1,"i",21),o(2,"span"),m(3,"Download Shipping Label"),r()()}}function He(a,l){if(a&1){let n=L();o(0,"input",47),v("ngModelChange",function(t){h(n);let i=f().$implicit;return w(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){h(n);let t=f(3),i=F(0);return g(t.onSelectOrders(i))}),r()}if(a&2){let n=f().$implicit,e=f(2);S("ngModel",n.selected),y("disabled",e.selectedChannelType()!=null&&e.selectedChannelType()!=n.MarketType)}}function Ue(a,l){if(a&1&&_(0,"variants-dropdown",39),a&2){let n=f().$implicit;y("variants",n==null?null:n.Variants)}}function Qe(a,l){if(a&1&&_(0,"variant-with-image",40),a&2){let n=f().$implicit;y("variant",n==null?null:n.Variants[0])}}function qe(a,l){if(a&1&&(o(0,"span"),m(1),r()),a&2){let n=f().$implicit;c(),E("(",n.LogisticService==null?null:n.LogisticService.Option,")")}}function Ke(a,l){if(a&1){let n=L();o(0,"button",48),b("click",function(){h(n);let t=f().$implicit,i=f(2);return g(i.onPrintShippingLabel(t))}),_(1,"i",49),r()}}function Ge(a,l){if(a&1){let n=L();o(0,"tr")(1,"td"),k(2,He,1,2,"input",31),r(),o(3,"td")(4,"div",32),_(5,"img",33),V(6,"channelImage"),o(7,"div",34)(8,"div"),m(9),r(),o(10,"small",35)(11,"span"),m(12),r()()()()(),o(13,"td")(14,"div",36)(15,"div"),_(16,"order-link",37),r(),o(17,"small"),m(18),V(19,"date"),r(),_(20,"br"),o(21,"small"),_(22,"i",38),m(23),r()()(),o(24,"td"),k(25,Ue,1,1,"variants-dropdown",39)(26,Qe,1,1,"variant-with-image",40),r(),o(27,"td",41),m(28),V(29,"number"),r(),o(30,"td",42),b("mouseenter",function(t){let i=h(n).$implicit,p=f(2);return g(p.onMouseEnter(t,i))}),o(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),m(35),r(),k(36,qe,2,1,"span"),r(),o(37,"small"),m(38),r()()()(),o(39,"td",45),k(40,Ke,2,0,"button",46),r()()}if(a&2){let n=l.$implicit,e=f(2);c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?2:-1),c(3),y("src",I(6,16,n==null?null:n.MarketType),Y)("alt",n==null||n.Variants[0]==null?null:n.Variants[0].Name),c(4),P(n.Outlet),c(3),P(n.ChannelName),c(4),y("order",n),c(2),E(" ",se(19,18,n==null?null:n.Created,"dd/MM/yyyy HH:mm:ss")," "),c(5),E(" ",n.Customer," "),c(),oe(pe(23,Be,(n.Variants==null?null:n.Variants.length)>1)),c(),T((n.Variants==null?null:n.Variants.length)>1?25:26),c(3),P(I(29,21,n.Amount)),c(7),P(n.LogisticService!=null&&n.LogisticService.Name?n.LogisticService==null?null:n.LogisticService.Name:"-"),c(),T(n.LogisticService!=null&&n.LogisticService.Option&&(n.LogisticService==null?null:n.LogisticService.Option)!="Default"?36:-1),c(2),E(" ",n.ReferenceNumber?n.ReferenceNumber:"-"," "),c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?40:-1)}}function Je(a,l){if(a&1){let n=L();o(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),_(4,"th",25),o(5,"th",26),m(6,"Outlet"),r(),o(7,"th",26),m(8,"Number"),r(),o(9,"th"),m(10,"Items"),r(),o(11,"th",27),m(12,"Amount"),r(),o(13,"th",28),m(14,"Shipping"),r(),_(15,"th",29),r()(),o(16,"tbody"),$(17,Ge,41,25,"tr",null,Z),r()(),o(19,"app-custom-paginator",30),b("next",function(){h(n);let t=f();return g(t.initAwaitingCollection())})("previous",function(){h(n);let t=f();return g(t.initAwaitingCollection())}),r()()}if(a&2){let n=f(),e=F(0);c(17),ee(e),c(2),y("filter",n.filter())("totaldata",e==null?null:e.length)}}function Xe(a,l){a&1&&(o(0,"div",18),_(1,"app-empty-state"),r())}var Jt=(()=>{let l=class l{constructor(){this.printShippingService=C(U),this.orderService=C(j),this.toastr=C(M),this.fulfillmentService=C(Ne),this.channelType=d,this.selectedOrders=B([]),this.selectedChannelType=ce(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=B({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>q(Q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(J(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&te(ze,5),t&2){let p;ie(p=ne())&&(i.contextMenuEl=p.first)}},features:[le([j,U])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let p=L();re(0),V(1,"async"),o(2,"mainpanel",1),b("onSubmit",function(){return h(p),g(i.initAwaitingCollection())}),v("textChange",function(s){return h(p),w(i.filter().Number,s)||(i.filter().Number=s),g(s)}),o(3,"actions"),k(4,je,4,0,"button",2),o(5,"a",3),_(6,"i",4),o(7,"span"),m(8,"Order Fulfillment Display"),r()()(),o(9,"filters")(10,"div")(11,"label",5),m(12,"Channel"),r(),o(13,"app-channel-options-v2",6),v("ngModelChange",function(s){return h(p),w(i.filter().ListChannelID,s)||(i.filter().ListChannelID=s),g(s)}),r()(),o(14,"div",7)(15,"label",5),m(16,"From/To"),r(),o(17,"div",8)(18,"datepicker",9),v("dateChange",function(s){return h(p),w(i.filter().From,s)||(i.filter().From=s),g(s)}),r()(),o(19,"div")(20,"datepicker",10),v("dateChange",function(s){return h(p),w(i.filter().To,s)||(i.filter().To=s),g(s)}),r()()(),o(21,"div",7)(22,"label",11),m(23,"Page Number"),r(),o(24,"input",12),v("ngModelChange",function(s){return h(p),w(i.filter().PageNumber,s)||(i.filter().PageNumber=s),g(s)}),r()(),o(25,"div",7)(26,"label",11),m(27,"Page Size"),r(),o(28,"input",13),v("ngModelChange",function(s){return h(p),w(i.filter().PageSize,s)||(i.filter().PageSize=s),g(s)}),r()()(),o(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),k(33,Je,20,2,"div",17)(34,Xe,2,0,"div",18),r()()()()(),o(35,"app-context-menu",19,0),b("onSelectItem",function(s){return h(p),g(i.onSelectContextItem(s))}),r()}if(t&2){let p=ae(I(1,10,i.awaitingCollections$));c(2),S("text",i.filter().Number),c(2),T(i.selectedOrders().length>0?4:-1),c(9),y("multiple",!0),S("ngModel",i.filter().ListChannelID),c(5),S("date",i.filter().From),c(2),S("date",i.filter().To),c(4),S("ngModel",i.filter().PageNumber),c(4),S("ngModel",i.filter().PageSize),c(5),T((p==null?null:p.length)>0?33:34),c(2),y("items",i.contextMenuItems)}},dependencies:[he,ke,Te,Le,z,fe,Ce,ge,W,R,Ee,Ve,Ae,be,_e,De,Fe,Me,me,ue,de,Pe],encapsulation:2});let a=l;return a})();export{Jt as AwaitingCollectionComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-WH76SMZT.js";import{a as d,b as v}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as m}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as a,hc as l,ic as c,jc as p,kc as r,ob as i}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var s=(()=>{let n=class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/void-invoice"},{Title:"All",Url:"/menu/sync-log/all"}]}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=a({type:n,selectors:[["app-order"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,y){o&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),r(3,"nav-tab",2),p()()(),r(4,"router-outlet")),o&2&&(i(3),l("Tabs",y.reportTabs))},dependencies:[v,d,m],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]});let t=n;return t})();var O=[{path:"",component:s,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",loadComponent(){return import("./chunk-RZXE2MFY.js").then(t=>t.SalesOrderComponent)},canActivate:[e],data:{title:"Sync Order"}},{path:"convert-to-invoice",loadComponent(){return import("./chunk-PCOAEOIL.js").then(t=>t.ConvertInvoiceComponent)},canActivate:[e],data:{title:"Sync Convert to Invoice"}},{path:"invoice",loadComponent(){return import("./chunk-MHIYVGFS.js").then(t=>t.InvoiceComponent)},canActivate:[e],data:{title:"Sync Invoice"}},{path:"delivery",loadComponent(){return import("./chunk-2ZKHC4YC.js").then(t=>t.DeliveryComponent)},canActivate:[e],data:{title:"Sync Delivery"}},{path:"payment",loadComponent(){return import("./chunk-2Y3L7QOV.js").then(t=>t.PaymentComponent)},canActivate:[e],data:{title:"Sync Payment"}},{path:"void-invoice",loadComponent(){return import("./chunk-Z4RYN6X5.js").then(t=>t.VoidInvoiceComponent)},canActivate:[e],data:{title:"Sync void invoice"}},{path:"all",loadComponent(){return import("./chunk-YZQDWPFY.js").then(t=>t.AllComponent)},canActivate:[e],data:{title:"All Report"}}]}];export{O as routes};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Pt,b as _t,d as Ci}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import{a as si}from"./chunk-FSOZOROI.js";import{b as bt}from"./chunk-VYI7JYH5.js";import{a as pi}from"./chunk-OH5T7D7O.js";import{a as bi}from"./chunk-TQROQOXU.js";import{a as wi}from"./chunk-
|
|
1
|
+
import{a as Pt,b as _t,d as Ci}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import{a as si}from"./chunk-FSOZOROI.js";import{b as bt}from"./chunk-VYI7JYH5.js";import{a as pi}from"./chunk-OH5T7D7O.js";import{a as bi}from"./chunk-TQROQOXU.js";import{a as wi}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import{a as _i,b as yi}from"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as gi,b as fi}from"./chunk-JU4ZP3HI.js";import{a as li}from"./chunk-3T5VLB63.js";import{d as ft,e as Bt}from"./chunk-STOW2RQN.js";import{a as di}from"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import{a as We,b as hi,c as mi}from"./chunk-KOUB5HRK.js";import{a as Qe}from"./chunk-QETZ5VDX.js";import{a as gt,d as ci,e as ui}from"./chunk-WIRXMAIF.js";import{b as Ke}from"./chunk-S22I47XG.js";import{a as K}from"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import{a as M,e as F,f as ri}from"./chunk-C4MTEDSW.js";import{b as Y,c as pe,d as Ae,e as A,f as ue}from"./chunk-JMRRXRKO.js";import{b as ai}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{G as ei,U as ht,V as qe,ea as ti,fa as Ft,ga as Lt,ia as ii,la as ie,ma as q,ua as ce}from"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ni}from"./chunk-ZSUWHVKX.js";import{h as Yt}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Zt,c as Xt}from"./chunk-NB2H6KA7.js";import{c as Dt}from"./chunk-UPRDDI4K.js";import{A as we,a as Ie,b as oi,g as mt,h as Ne,m as He}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Wt,e as Jt}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as qt,B as ne,D as Oe,q as Ve,s as pt,t as Le,u as ut,v as be,w as jt}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as Mt,Aa as S,Ab as ke,Bc as v,Ca as tt,Cc as ae,Dc as b,Ec as _,Fd as T,Gd as Z,Hb as I,Ia as it,Ib as le,Ic as lt,Jb as Rt,Jc as Re,K as kt,Lb as E,Lc as ze,Mb as se,Mc as C,Nb as p,Nc as V,Oc as $e,Pa as x,Pc as te,Rc as Me,Sc as De,Tc as Fe,Z as et,_b as D,_c as oe,ac as me,ad as G,bd as Se,cc as ge,dc as Ut,dd as st,ea as Ue,ed as dt,f as Pe,fc as at,fd as je,gc as rt,gd as $t,hc as l,ic as h,id as Te,jc as m,jd as ve,kc as B,la as xe,lc as U,ld as ye,ma as ee,mb as nt,mc as $,na as re,nc as L,ob as s,oc as O,pa as de,pc as N,pd as ct,qc as k,ra as z,rc as H,sc as X,tb as R,ub as ot,ud as fe,v as Gt,wc as P,ya as y,yc as c,za as w}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Be,b as Ge}from"./chunk-66YHNWRR.js";var Ti=`
|
|
2
2
|
.p-datatable {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: block;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as P,b as v}from"./chunk-
|
|
1
|
+
import{a as P,b as v}from"./chunk-BKCKASH3.js";import{h as I}from"./chunk-62YNPW6Q.js";import{a as f}from"./chunk-AGBJEXIM.js";import{c as i}from"./chunk-UPRDDI4K.js";import{b as m,e as g}from"./chunk-D6JH2KV4.js";import{J as h,ea as l,ma as C,qa as u,r as c,ra as S}from"./chunk-OHGMB7HJ.js";var R=(()=>{let o=class o{constructor(t,e,n){this.httpService=t,this.toastrService=e,this.notificationService=n,this.authService=S(I),this.scanChannelToastr=S(P),this.channelOptions=this.authService.getChannels()}loader(t=i.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:t})}LoadInPOS(t=i.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(f.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(f.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(d=>d.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=i.IsNotEmpty(t.LastUpdate)?i.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
|
${i.IsNotEmpty(r)?"since "+r:""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le,b as se}from"./chunk-XF4A775R.js";import"./chunk-FH2KAM6J.js";import{a as ce}from"./chunk-A6SP65CH.js";import{c as pe,d as M,e as V}from"./chunk-C67KF7MG.js";import{a as ae}from"./chunk-TYSM3R5E.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{a as te,b as ie,c as ne,d as oe}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as $}from"./chunk-BZWZ64N5.js";import{a as re}from"./chunk-WG34QKGX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-DLHIDOS3.js";import{a as ee}from"./chunk-WCX3T6LK.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as Y,b as Z}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as X}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-ZSUWHVKX.js";import{h as q}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as D}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as G}from"./chunk-UPRDDI4K.js";import{A as Q,c as J,h as K,m as j,o as z}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as k,e as x}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as W,B as H,w as U}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as E,Hb as L,Ia as b,Nc as g,Rc as P,Sc as f,Tc as _,Uc as B,Z as O,_c as A,ac as T,cc as I,ea as R,hc as u,ic as a,id as S,jc as p,jd as y,kc as v,ob as h,ra as c,rc as N,wc as C,ya as l,yc as w,za as s}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function he(m,d){if(m&1){let F=N();a(0,"button",16),C("click",function(){l(F);let n=w(),e=w();return s(e.onUpdateItems(n))}),v(1,"i",17),g(2," Update "),p()}}function de(m,d){if(m&1&&(a(0,"div"),T(1,he,3,0,"button",15),p()),m&2){let F=w();h(),I(F.productService.hasSelectionVariant(d)?1:-1)}}var qe=(()=>{let d=class d{constructor(){this.http=c(x),this.toastr=c(k),this.dialog=c(X),this.productService=c(ee),this.authService=c(q),this.placeholderService=c(ne),this.infinitePagination=c(M),this.updateResHandling=c(V),this.mainPanelService=c(Y),this.channelOptions=b([]),this.searchFilter=b({PageNumber:1,RowCount:50,filterModel:1,text:"",ListChannelID:[],SearchType:te.NameOnly,NumberFilterComparator:ie.Contains}),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(O()),this.searchPlaceholder=b("Search ...")}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(R(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1,SearchType:t.Filter.SearchType,NumberFilterComparator:t.Filter.NumberFilterComparator},this.initSearchPlaceholder(),this.searchFilter.set(t.Filter),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter().SearchType,this.searchFilter().NumberFilterComparator))}onShowDifferencePrice(t){let n=1;t&&(n=3),this.searchFilter.update(e=>(e.filterModel=n,e)),this.infinitePagination.reloadPagination(this.searchFilter())}onSearch(t){this.searchFilter.update(n=>(n.text=t,n)),this.infinitePagination.reloadPagination(this.searchFilter()),this.filterSelectedChannels(),this.initSearchPlaceholder()}onUpdateItems(t){let n=JSON.parse(JSON.stringify(this.channelOptions())),e=this.productService.selectedVariantProduct(t);this.dialog.open(le,{data:{title:"Updating Price",selectedItems:e,channels:n},width:"400px"}).afterClosed().pipe(E(r=>G.IsNotEmpty(r))).subscribe(r=>{this.channelOptions.set(r),this.updatePrice(t)})}filterSelectedChannels(){let n=this.authService.getChannels().filter(e=>this.searchFilter().ListChannelID?.indexOf(e.ID)!==-1);this.channelOptions.set(n)}updatePrice(t){let n=this.productService.selectedVariantProduct(t);if(n.length>0){let e=n.map(i=>({ID:i.ID,Code:i.Code,Price:i.UnitPrice})),o={ListChannelID:this.getSelectedChannels().map(i=>i.ID),ListPrice:e};this.http.post(D.UpdateChannelPrice,o).subscribe(i=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(i),this.resetSelectedChannels()})}}updatePriceByVariant(t){let n={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post(D.UpdatePriceById,n).subscribe(e=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(e)})}handlingUpdatePrice(t){let n=t?.Response?.success_list,e=t?.Response?.failure_list,r=this.getSelectedChannels();n?.length>0||e?.length>0?this.updateResHandling.responseHandling(n,e,"Price",r):this.toastr.error(t[0]?.Exception,"Error")}openExportDialog(){this.dialog.open(ae,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter().PageNumber,rowCount:this.searchFilter().RowCount,filterExport:this.searchFilter(),getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}resetSelectedChannels(){this.channelOptions.update(t=>(t.forEach(n=>{n.selected=!1}),t))}getSelectedChannels(){return this.channelOptions().filter(t=>t.selected)}};d.\u0275fac=function(n){return new(n||d)},d.\u0275cmp=L({type:d,selectors:[["app-price-pos-channel"]],features:[A([M,W,ce,V])],decls:34,vars:28,consts:[["headerTitle","Price Comparison","textButton","Search",3,"onSubmit","searchBoxPlaceHolder"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(n,e){if(n&1){let r=N();B(0),S(1,"async"),a(2,"mainpanel",0),C("onSubmit",function(i){return l(r),s(e.onSearch(i))}),a(3,"actions")(4,"div",1),T(5,de,2,1,"div"),S(6,"async"),a(7,"button",2),C("click",function(){return l(r),s(e.openExportDialog())}),v(8,"i",3),a(9,"span"),g(10,"Export"),p()()()(),a(11,"filters")(12,"div",4)(13,"label",5),g(14,"Channel"),p(),a(15,"app-channel-options-v2",6),_("ngModelChange",function(i){return l(r),f(e.searchFilter().ListChannelID,i)||(e.searchFilter().ListChannelID=i),s(i)}),p()(),a(16,"div",4)(17,"filter-query-type",7),_("numberFilterComparatorChange",function(i){return l(r),f(e.searchFilter().NumberFilterComparator,i)||(e.searchFilter().NumberFilterComparator=i),s(i)})("searchTypeChange",function(i){return l(r),f(e.searchFilter().SearchType,i)||(e.searchFilter().SearchType=i),s(i)}),p()(),a(18,"div",4)(19,"label",8),g(20,"Page Number"),p(),a(21,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().PageNumber,i)||(e.searchFilter().PageNumber=i),s(i)}),p()(),a(22,"div")(23,"label",8),g(24,"Page Size"),p(),a(25,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().RowCount,i)||(e.searchFilter().RowCount=i),s(i)}),p()()(),a(26,"content")(27,"div",10)(28,"div",11)(29,"div",12)(30,"app-table",13),S(31,"async"),C("onToggle",function(i){return l(r),s(e.onShowDifferencePrice(i))})("onSubmit",function(i){return l(r),s(e.updatePriceByVariant(i))}),p(),a(32,"infinite-paginator",14),S(33,"async"),C("onNextPage",function(){return l(r),s(e.infinitePagination.onNextPage(e.searchFilter()))})("onLastPage",function(){return l(r),s(e.infinitePagination.onLastPage(e.searchFilter()))})("onGetRowCount",function(){return l(r),s(e.infinitePagination.getRowCount(e.searchFilter()))}),p()()()()()()}if(n&2){let r,o=y(1,20,e.loader$);h(2),u("searchBoxPlaceHolder",e.searchPlaceholder()),h(3),I((r=y(6,22,e.data$))?5:-1,r),h(10),u("multiple",!0),P("ngModel",e.searchFilter().ListChannelID),h(2),u("numberFilterComparatorOptions",o==null||o.Options==null?null:o.Options.SearchComparatorTypeOptions),P("numberFilterComparator",e.searchFilter().NumberFilterComparator),u("searchTypeOptions",o==null||o.Options==null?null:o.Options.SearchSKUOnlyOrSKUNameOptions),P("searchType",e.searchFilter().SearchType),h(4),P("ngModel",e.searchFilter().PageNumber),h(4),P("ngModel",e.searchFilter().RowCount),h(5),u("showProductToggle",!0)("data",y(31,24,e.data$))("channel",e.channelOptions())("hiddenIPOSInventory",!1),h(2),u("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",y(33,26,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}},dependencies:[H,Q,J,z,K,j,pe,Z,se,re,$,oe,U],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let m=d;return m})();export{qe as PricePosChannelComponent};
|
|
1
|
+
import{a as le,b as se}from"./chunk-R3BRUX7Z.js";import"./chunk-FH2KAM6J.js";import{a as ce}from"./chunk-A6SP65CH.js";import{c as pe,d as M,e as V}from"./chunk-C67KF7MG.js";import{a as ae}from"./chunk-TYSM3R5E.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{a as te,b as ie,c as ne,d as oe}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as $}from"./chunk-BZWZ64N5.js";import{a as re}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-DLHIDOS3.js";import{a as ee}from"./chunk-LCN52IJT.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as Y,b as Z}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as X}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-ZSUWHVKX.js";import{h as q}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as D}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as G}from"./chunk-UPRDDI4K.js";import{A as Q,c as J,h as K,m as j,o as z}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as k,e as x}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as W,B as H,w as U}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as E,Hb as L,Ia as b,Nc as g,Rc as P,Sc as f,Tc as _,Uc as B,Z as O,_c as A,ac as T,cc as I,ea as R,hc as u,ic as a,id as S,jc as p,jd as y,kc as v,ob as h,ra as c,rc as N,wc as C,ya as l,yc as w,za as s}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function he(m,d){if(m&1){let F=N();a(0,"button",16),C("click",function(){l(F);let n=w(),e=w();return s(e.onUpdateItems(n))}),v(1,"i",17),g(2," Update "),p()}}function de(m,d){if(m&1&&(a(0,"div"),T(1,he,3,0,"button",15),p()),m&2){let F=w();h(),I(F.productService.hasSelectionVariant(d)?1:-1)}}var qe=(()=>{let d=class d{constructor(){this.http=c(x),this.toastr=c(k),this.dialog=c(X),this.productService=c(ee),this.authService=c(q),this.placeholderService=c(ne),this.infinitePagination=c(M),this.updateResHandling=c(V),this.mainPanelService=c(Y),this.channelOptions=b([]),this.searchFilter=b({PageNumber:1,RowCount:50,filterModel:1,text:"",ListChannelID:[],SearchType:te.NameOnly,NumberFilterComparator:ie.Contains}),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(O()),this.searchPlaceholder=b("Search ...")}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(R(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1,SearchType:t.Filter.SearchType,NumberFilterComparator:t.Filter.NumberFilterComparator},this.initSearchPlaceholder(),this.searchFilter.set(t.Filter),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter().SearchType,this.searchFilter().NumberFilterComparator))}onShowDifferencePrice(t){let n=1;t&&(n=3),this.searchFilter.update(e=>(e.filterModel=n,e)),this.infinitePagination.reloadPagination(this.searchFilter())}onSearch(t){this.searchFilter.update(n=>(n.text=t,n)),this.infinitePagination.reloadPagination(this.searchFilter()),this.filterSelectedChannels(),this.initSearchPlaceholder()}onUpdateItems(t){let n=JSON.parse(JSON.stringify(this.channelOptions())),e=this.productService.selectedVariantProduct(t);this.dialog.open(le,{data:{title:"Updating Price",selectedItems:e,channels:n},width:"400px"}).afterClosed().pipe(E(r=>G.IsNotEmpty(r))).subscribe(r=>{this.channelOptions.set(r),this.updatePrice(t)})}filterSelectedChannels(){let n=this.authService.getChannels().filter(e=>this.searchFilter().ListChannelID?.indexOf(e.ID)!==-1);this.channelOptions.set(n)}updatePrice(t){let n=this.productService.selectedVariantProduct(t);if(n.length>0){let e=n.map(i=>({ID:i.ID,Code:i.Code,Price:i.UnitPrice})),o={ListChannelID:this.getSelectedChannels().map(i=>i.ID),ListPrice:e};this.http.post(D.UpdateChannelPrice,o).subscribe(i=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(i),this.resetSelectedChannels()})}}updatePriceByVariant(t){let n={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post(D.UpdatePriceById,n).subscribe(e=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(e)})}handlingUpdatePrice(t){let n=t?.Response?.success_list,e=t?.Response?.failure_list,r=this.getSelectedChannels();n?.length>0||e?.length>0?this.updateResHandling.responseHandling(n,e,"Price",r):this.toastr.error(t[0]?.Exception,"Error")}openExportDialog(){this.dialog.open(ae,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter().PageNumber,rowCount:this.searchFilter().RowCount,filterExport:this.searchFilter(),getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}resetSelectedChannels(){this.channelOptions.update(t=>(t.forEach(n=>{n.selected=!1}),t))}getSelectedChannels(){return this.channelOptions().filter(t=>t.selected)}};d.\u0275fac=function(n){return new(n||d)},d.\u0275cmp=L({type:d,selectors:[["app-price-pos-channel"]],features:[A([M,W,ce,V])],decls:34,vars:28,consts:[["headerTitle","Price Comparison","textButton","Search",3,"onSubmit","searchBoxPlaceHolder"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(n,e){if(n&1){let r=N();B(0),S(1,"async"),a(2,"mainpanel",0),C("onSubmit",function(i){return l(r),s(e.onSearch(i))}),a(3,"actions")(4,"div",1),T(5,de,2,1,"div"),S(6,"async"),a(7,"button",2),C("click",function(){return l(r),s(e.openExportDialog())}),v(8,"i",3),a(9,"span"),g(10,"Export"),p()()()(),a(11,"filters")(12,"div",4)(13,"label",5),g(14,"Channel"),p(),a(15,"app-channel-options-v2",6),_("ngModelChange",function(i){return l(r),f(e.searchFilter().ListChannelID,i)||(e.searchFilter().ListChannelID=i),s(i)}),p()(),a(16,"div",4)(17,"filter-query-type",7),_("numberFilterComparatorChange",function(i){return l(r),f(e.searchFilter().NumberFilterComparator,i)||(e.searchFilter().NumberFilterComparator=i),s(i)})("searchTypeChange",function(i){return l(r),f(e.searchFilter().SearchType,i)||(e.searchFilter().SearchType=i),s(i)}),p()(),a(18,"div",4)(19,"label",8),g(20,"Page Number"),p(),a(21,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().PageNumber,i)||(e.searchFilter().PageNumber=i),s(i)}),p()(),a(22,"div")(23,"label",8),g(24,"Page Size"),p(),a(25,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().RowCount,i)||(e.searchFilter().RowCount=i),s(i)}),p()()(),a(26,"content")(27,"div",10)(28,"div",11)(29,"div",12)(30,"app-table",13),S(31,"async"),C("onToggle",function(i){return l(r),s(e.onShowDifferencePrice(i))})("onSubmit",function(i){return l(r),s(e.updatePriceByVariant(i))}),p(),a(32,"infinite-paginator",14),S(33,"async"),C("onNextPage",function(){return l(r),s(e.infinitePagination.onNextPage(e.searchFilter()))})("onLastPage",function(){return l(r),s(e.infinitePagination.onLastPage(e.searchFilter()))})("onGetRowCount",function(){return l(r),s(e.infinitePagination.getRowCount(e.searchFilter()))}),p()()()()()()}if(n&2){let r,o=y(1,20,e.loader$);h(2),u("searchBoxPlaceHolder",e.searchPlaceholder()),h(3),I((r=y(6,22,e.data$))?5:-1,r),h(10),u("multiple",!0),P("ngModel",e.searchFilter().ListChannelID),h(2),u("numberFilterComparatorOptions",o==null||o.Options==null?null:o.Options.SearchComparatorTypeOptions),P("numberFilterComparator",e.searchFilter().NumberFilterComparator),u("searchTypeOptions",o==null||o.Options==null?null:o.Options.SearchSKUOnlyOrSKUNameOptions),P("searchType",e.searchFilter().SearchType),h(4),P("ngModel",e.searchFilter().PageNumber),h(4),P("ngModel",e.searchFilter().RowCount),h(5),u("showProductToggle",!0)("data",y(31,24,e.data$))("channel",e.channelOptions())("hiddenIPOSInventory",!1),h(2),u("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",y(33,26,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}},dependencies:[H,Q,J,z,K,j,pe,Z,se,re,$,oe,U],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let m=d;return m})();export{qe as PricePosChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-
|
|
1
|
+
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-7RIUHK6K.js").then(t=>t.LoginComponent)},data:{title:"Dealpos x Marketplace"}},{path:"shopee",loadComponent(){return import("./chunk-ITY2KKS5.js").then(t=>t.ShopeeAuthorizedComponent)},data:{title:"Success"}},{path:"tiktok",loadComponent(){return import("./chunk-BTJN72MC.js").then(t=>t.TiktokComponent)},data:{title:"Success"}},{path:"lazada",loadComponent(){return import("./chunk-HBWX22FY.js").then(t=>t.LazadaComponent)},data:{title:"Success"}}];export{o as routes};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as qe}from"./chunk-MSSRROS6.js";import{a as J}from"./chunk-ISMIPSYN.js";import"./chunk-7T5DBPDP.js";import"./chunk-OH5T7D7O.js";import"./chunk-DE3FRI5N.js";import{a as E}from"./chunk-A6SP65CH.js";import{a as je,b as ze,c as Ge,d as Y,e as ee}from"./chunk-C67KF7MG.js";import{a as Re,b as Ne,c as Le}from"./chunk-FMZLGD5H.js";import{a as Qe}from"./chunk-TYSM3R5E.js";import{a as $e,b as He}from"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as Ue,d as We}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as Oe}from"./chunk-BZWZ64N5.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as Ae}from"./chunk-DLHIDOS3.js";import{a as Be}from"./chunk-WCX3T6LK.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as Ee,b as ke}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as Te,b as Pe,c as De,i as Me,j as Ve}from"./chunk-IA7NJXJD.js";import{a as Fe}from"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as Ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as X}from"./chunk-ZSUWHVKX.js";import{h as xe}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as Z}from"./chunk-AGBJEXIM.js";import{a as ue,b as he,c as ge}from"./chunk-NB2H6KA7.js";import{c as y}from"./chunk-UPRDDI4K.js";import{A as be,b as fe,c as Se,h as ye,m as ve,o as we}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as pe,e as me}from"./chunk-D6JH2KV4.js";import{e as _e,g as Ce}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as de,B as Q,q as ce,w as $,y as H}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as se,G as j,Hb as O,Ia as M,Mc as ie,Nb as B,Nc as m,Oc as L,Pc as I,Rc as F,Sc as T,Tc as P,Uc as oe,Vc as ae,Wc as le,Xc as re,Z as R,_c as W,ac as u,ad as D,cc as h,dc as G,ea as z,fc as q,gc as K,hc as g,ic as a,id as f,jc as r,jd as b,kc as v,kd as V,mb as N,ob as s,oc as A,pc as U,ra as S,rc as w,v as k,wc as x,ya as _,yc as l,za as C}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as ne}from"./chunk-66YHNWRR.js";var Ye=()=>["/menu/order/download"];function Je(i,c){if(i&1&&(a(0,"li",4)(1,"div"),m(2," The last time you manually download your order is on "),a(3,"span",8),m(4),f(5,"date"),r()(),a(6,"div",9),m(7),r()()),i&2){l();let e=le(0);s(4),I(" ",V(5,2,e==null?null:e.OrderDownloadLatestOn,"dd MMM yyyy HH:mm")," "),s(3),I("(",e==null?null:e.calculatedDate,")")}}function et(i,c){i&1&&(a(0,"li",4),m(1," The last time you manually download your order is on (-) "),r())}var Ke=(()=>{let c=class c{constructor(){this.dialogRef=S(Te),this.data=S(Pe),this.modalConfig=new Me,this.inventoryService=S(E),this.lastDownloadInfo$=this.inventoryService.getLastInfoDownloadInventory(this.data.channelId).pipe(k(n=>{let t=n.OrderDownloadLatestOn!=y.MinDate,o=null,p=null;return t&&(o=new Date(n.OrderDownloadLatestOn),p=y.convertToReadableDate(o)),{OrderDownloadLatestOn:o,calculatedDate:p}}),R(1)),this.selectedProducts=M(this.data.selectedProducts||[]),this.modalConfig.title="Manual Inventory Sync",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}onUpdate(){this.dialogRef.close(!0)}onCancel(){this.dialogRef.close(!1)}};c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=O({type:c,selectors:[["app-dialog-update-product-info"]],features:[W([E])],decls:16,vars:8,consts:[[3,"onCancel","config"],["content",""],[1,"container"],[1,"mt-8"],[1,"lh-base"],["footer",""],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","routerLink"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","keyup.F2"],[1,"fw-bold","me-1"],[1,"fw-bold"]],template:function(t,o){if(t&1){let p=w();oe(0),f(1,"async"),a(2,"modal-material",0),x("onCancel",function(){return _(p),C(o.onCancel())}),a(3,"div",1)(4,"div",2)(5,"h4"),m(6),r(),a(7,"div",3)(8,"ul"),u(9,Je,8,5,"li",4)(10,et,2,0,"li",4),r()()()(),a(11,"div",5)(12,"a",6),x("click",function(){return _(p),C(o.onCancel())}),m(13," Download "),r(),a(14,"button",7),x("click",function(){return _(p),C(o.onUpdate())})("keyup.F2",function(){return _(p),C(o.onUpdate())}),m(15," Update Anyway "),r()()()}if(t&2){let p=ae(b(1,4,o.lastDownloadInfo$));s(2),g("config",o.modalConfig),s(4),I("",o.selectedProducts().length," Product(s) will be updated."),s(3),h(p!=null&&p.OrderDownloadLatestOn?9:10),s(3),g("routerLink",se(7,Ye))}},dependencies:[Ve,Q,Ce,_e,$,H],encapsulation:2});let i=c;return i})();var te=i=>[i],tt=i=>({"text-decoration-line-through":i}),nt=i=>({"me-10":i}),it=i=>({"bg-gradient-warning":i}),ot=i=>({cursor:i});function at(i,c){if(i&1){let e=w();a(0,"button",37),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onScanInventory(t))}),v(1,"i",38),m(2,"Refresh "),r()}}function lt(i,c){if(i&1){let e=w();a(0,"div",35)(1,"button",39),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onOpenDialogUpdateStockInfo(t))}),v(2,"i",40),m(3," Update "),r(),v(4,"button",41),a(5,"ul",42)(6,"a",43),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(7,"i",44),a(8,"span"),m(9,"Export"),r()()()()}}function rt(i,c){if(i&1){let e=w();a(0,"button",45),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(1,"i",44),a(2,"span"),m(3,"Export"),r()()}}function st(i,c){if(i&1&&(a(0,"div"),u(1,at,3,0,"button",34),u(2,lt,10,0,"div",35)(3,rt,4,0,"button",36),r()),i&2){let e=c,n=l(2);s(),h(n.productService.hasSelectionVariant(e)?1:-1),s(),h(n.productService.hasSelectionVariant(e)?2:3)}}function ct(i,c){i&1&&(a(0,"div",18)(1,"span"),m(2," showing only different stock, please press next to populate more data "),r()())}function dt(i,c){if(i&1){let e=w();a(0,"th")(1,"input",46),P("ngModelChange",function(t){_(e);let o=l(3);return T(o.checkboxState,t)||(o.checkboxState=t),C(t)}),x("ngModelChange",function(){let t=_(e),o=l(3);return C(o.onCheckboxStateChange(t))}),r()()}if(i&2){let e=l(3);s(),F("ngModel",e.checkboxState)}}function pt(i,c){if(i&1&&(A(0),u(1,dt,2,1,"th"),f(2,"async"),U()),i&2){let e,n=l(2);s(),h((e=b(2,1,n.products$))?1:-1,e)}}function mt(i,c){i&1&&(a(0,"th",31),m(1," Reserved "),r())}function _t(i,c){if(i&1){let e=w();a(0,"input",63),P("ngModelChange",function(t){_(e);let o=l(4).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),x("ngModelChange",function(){_(e);let t=l(4).$implicit,o=l(2);return C(o.onCheckboxStateProduct(t))}),r()}if(i&2){let e=l(4).$implicit;F("ngModel",e.selected)}}function Ct(i,c){if(i&1&&(A(0),a(1,"div",61),u(2,_t,1,1,"input",62),r(),U()),i&2){let e=l(3).$implicit;s(),g("ngClass",D(2,nt,e.Variants.length<=1)),s(),h(e.Variants.length>1?2:-1)}}function ut(i,c){if(i&1){let e=w();a(0,"img",64),x("click",function(t){_(e);let o=l(3).$implicit,p=l(2);return C(p.onZoomImage(t,o==null?null:o.ImageUrl))}),r()}if(i&2){let e=l(3).$implicit;g("src",re(e==null?null:e.ThumbnailUrl),N)}}function ht(i,c){i&1&&v(0,"img",58)}function gt(i,c){if(i&1&&(v(0,"br"),a(1,"div",65),v(2,"i",66),a(3,"small"),m(4),r()()),i&2){let e=l(3).$implicit;s(4),I("(",e==null?null:e.Category,")")}}function xt(i,c){if(i&1&&(a(0,"td",56)(1,"div",12),B(2,Ct,3,4,"ng-container",25),a(3,"div"),u(4,ut,1,2,"img",57)(5,ht,1,0,"img",58),r()()(),a(6,"td",59)(7,"span",60),m(8),r(),u(9,gt,5,1),r()),i&2){let e=l(2).$implicit,n=l(2);g("rowSpan",e==null?null:e.Variants.length),s(2),g("ngxPermissionsOnly",D(6,te,n.inventoryUpdateRole)),s(2),h(e!=null&&e.ThumbnailUrl?4:5),s(2),g("rowSpan",e==null?null:e.Variants.length),s(2),L(e==null?null:e.Name),s(),h(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function ft(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(3).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(3).$implicit;F("ngModel",e.selected)}}function St(i,c){if(i&1&&u(0,ft,1,1,"input",68),i&2){let e=l(2).$implicit;h((e==null?null:e.Inventory)<=1e5?0:-1)}}function yt(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(2).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(2).$implicit;F("ngModel",e.selected)}}function vt(i,c){if(i&1&&(A(0),a(1,"td",67),u(2,St,1,1)(3,yt,1,1,"input",68),r(),U()),i&2){let e=l().$implicit;s(2),h((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function wt(i,c){i&1&&(a(0,"div",51),m(1," Not Found "),r())}function bt(i,c){if(i&1&&(a(0,"div")(1,"span",69),m(2),f(3,"number"),r(),m(4," => "),a(5,"span",70),m(6),f(7,"number"),r()()),i&2){let e=l().$implicit;s(2),I(" ",b(3,2,e==null||e.I==null?null:e.I.Available)),s(4),L(b(7,4,e==null?null:e.Inventory))}}function It(i,c){if(i&1&&(m(0),f(1,"number")),i&2){let e=l().$implicit;I(" ",b(1,1,e==null?null:e.Inventory)," ")}}function Ft(i,c){if(i&1&&(a(0,"div",52)(1,"a",71),v(2,"i",72),r()()),i&2){let e=l().$implicit,n=l(3);s(),g("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),N)}}function Tt(i,c){if(i&1){let e=w();a(0,"span",76),x("click",function(){_(e);let t=l(2).$implicit,o=l().$implicit,p=l(2);return C(p.openTableDialog(o,t))}),m(1),f(2,"number"),r()}if(i&2){let e=l(2).$implicit,n=l(3);ie(D(5,ot,n.hasInventoryEdit())),s(),I(" ",b(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function Pt(i,c){if(i&1){let e=w();a(0,"td",53)(1,"div",50)(2,"div"),u(3,Tt,3,7,"span",73),f(4,"async"),r(),a(5,"div",52)(6,"a",71),v(7,"i",72),r()(),a(8,"div",52)(9,"span",74),x("click",function(){_(e);let t=l().$implicit,o=l(3);return C(o.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),v(10,"i",75),r()()()()}if(i&2){let e,n=l().$implicit,t=l(3);g("ngClass",D(5,it,(n==null?null:n.Inventory)!=(n==null||n.Channel[0]==null?null:n.Channel[0].Inventory))),s(3),h((e=b(4,3,t.products$))?3:-1,e),s(3),g("href",n==null||n.Channel[0]==null?null:n.Channel[0].Url,N)}}function Dt(i,c){if(i&1&&(a(0,"span",77),m(1),f(2,"number"),r()),i&2){let e=l(2).$implicit;s(),I(" (",b(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function Mt(i,c){i&1&&m(0," - ")}function Vt(i,c){if(i&1&&(a(0,"td",48),u(1,Dt,3,3,"span",77)(2,Mt,1,0),r()),i&2){let e=l().$implicit;s(),h(!(e==null||e.Channel[0]==null)&&e.Channel[0].InventoryReserved?1:2)}}function Et(i,c){i&1&&m(0," - ")}function kt(i,c){if(i&1&&(a(0,"span",55),f(1,"date"),m(2),f(3,"date"),r()),i&2){let e=l().$implicit;g("matTooltip",V(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),I(" ",V(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Rt(i,c){if(i&1&&(a(0,"tr"),u(1,xt,10,8),a(2,"td",47),m(3),r(),a(4,"td",48)(5,"span",49),m(6),r()(),B(7,vt,4,1,"ng-container",25),a(8,"td")(9,"div",50),u(10,wt,2,0,"div",51),u(11,bt,8,6,"div"),u(12,It,2,3),u(13,Ft,3,1,"div",52),r()(),u(14,Pt,11,7,"td",53),u(15,Vt,3,1,"td",48),a(16,"td",54),u(17,Et,1,0)(18,kt,4,8,"span",55),r()()),i&2){let e=c.$implicit,n=c.$index,t=l(3);s(),h(n==0?1:-1),s(2),L(e==null?null:e.Model),s(2),g("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",D(13,tt,e.Discontinued)),s(),L(e==null?null:e.Code),s(),g("ngxPermissionsOnly",D(15,te,t.inventoryUpdateRole)),s(3),h((e==null?null:e.I)==null?10:-1),s(),h((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),h((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),h((e==null?null:e.I)!=null?13:-1),s(),h(e!=null&&e.Channel?14:-1),s(),h(t.isShowReservedColumn?15:-1),s(2),h((e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==t.minDate?17:18)}}function Nt(i,c){if(i&1&&(a(0,"tbody"),q(1,Rt,19,17,"tr",null,G),r()),i&2){let e=c.$implicit;s(),K(e.Variants)}}function Lt(i,c){if(i&1){let e=w();a(0,"mainpanel",1),x("onSubmit",function(t){_(e);let o=l();return C(o.onSearch(t))}),a(1,"actions")(2,"div",2),u(3,st,4,2,"div"),f(4,"async"),r()(),a(5,"filters")(6,"div",3)(7,"label",4),m(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",5),x("onChannelChange",function(t){_(e);let o=l();return C(o.onChannelChange(t))}),r()(),a(10,"div",3)(11,"filter-query-type",6),P("numberFilterComparatorChange",function(t){_(e);let o=l();return T(o.searchFilter.NumberFilterComparator,t)||(o.searchFilter.NumberFilterComparator=t),C(t)})("searchTypeChange",function(t){_(e);let o=l();return T(o.searchFilter.SearchType,t)||(o.searchFilter.SearchType=t),C(t)}),r()(),a(12,"div",3)(13,"label",7),m(14,"PageNumber"),r(),a(15,"input",8),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),C(t)}),r()(),a(16,"div",3)(17,"label",9),m(18,"Page Size"),r(),a(19,"input",10),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),C(t)}),r()(),a(20,"div")(21,"label",11),m(22,"Quantity From - To"),r(),a(23,"div",12)(24,"input",13),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityFrom,t)||(o.searchFilter.QuantityFrom=t),C(t)}),r(),m(25," - "),a(26,"input",14),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityTo,t)||(o.searchFilter.QuantityTo=t),C(t)}),r()()()(),a(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,ct,3,0,"div",18),a(32,"table",19),x("matSortChange",function(t){_(e);let o=l();return C(o.onSortVariant(t))}),a(33,"thead",20)(34,"tr")(35,"th",21),m(36," Product "),v(37,"br"),a(38,"mat-slide-toggle",22),x("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,C(t.onShowDifferenceStock())}),a(39,"small",11),m(40,"FILTER DIFFERENT INVENTORY"),r()()(),a(41,"th",23),m(42,"Variant"),r(),a(43,"th",24),m(44,"SKU"),r(),B(45,pt,3,3,"ng-container",25),a(46,"th",26),m(47," POS "),r(),a(48,"th",27)(49,"div",28),x("click",function(){_(e);let t=l();return C(t.openModalFilter())}),v(50,"img",29),a(51,"span",30),m(52),f(53,"stringLimit"),r()()(),u(54,mt,2,0,"th",31),a(55,"th",32),m(56,"Last Sync"),r()()(),q(57,Nt,3,0,"tbody",null,G),f(59,"async"),r(),a(60,"infinite-paginator",33),f(61,"async"),x("onNextPage",function(){_(e);let t=l();return C(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return C(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return C(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(i&2){let e,n,t,o,p=c,d=l();g("hideSearchBox",!1)("searchBoxPlaceHolder",d.searchPlaceholder()),s(3),h((e=b(4,24,d.products$))?3:-1,e),s(6),g("ngModel",(d.searchFilter==null?null:d.searchFilter.LocationID)||(d.searchFilter==null?null:d.searchFilter.ChannelID)),s(2),g("numberFilterComparatorOptions",p==null||p.Options==null?null:p.Options.SearchComparatorTypeOptions),F("numberFilterComparator",d.searchFilter.NumberFilterComparator),g("searchTypeOptions",p==null||p.Options==null?null:p.Options.SearchSKUOnlyOrSKUNameOptions),F("searchType",d.searchFilter.SearchType),s(4),F("ngModel",d.searchFilter.PageNumber),s(4),F("ngModel",d.searchFilter.RowCount),s(5),F("ngModel",d.searchFilter.QuantityFrom),s(2),F("ngModel",d.searchFilter.QuantityTo),s(5),h((d.searchFilter==null?null:d.searchFilter.filterModel)==3?31:-1),s(14),g("ngxPermissionsOnly",D(33,te,d.inventoryUpdateRole)),s(4),g("matTooltip",((n=d.channelIdentity())==null||n.label==null?null:n.label.length)>13?(n=d.channelIdentity())==null?null:n.label:""),s(),g("src",(t=d.channelIdentity())==null?null:t.img,N),s(2),I(" ",V(53,26,(o=d.channelIdentity())==null?null:o.label,13)," "),s(2),h(d.isShowReservedColumn?54:-1),s(3),K(b(59,29,d.products$)),s(3),g("totalData",d.infinitePagination.totalData())("hideCount",d.infinitePagination.hideCount())("rowCount",b(61,31,d.infinitePagination.totalRowCount$))("pageNumber",d.infinitePagination.pageNumber())("disableNextButton",d.infinitePagination.disableNextButton())("goToLastPage",d.infinitePagination.isLastPage())}}var Ln=(()=>{let c=class c{constructor(){this.http=S(me),this.toastr=S(pe),this.dialog=S(De),this.productService=S(Be),this.authService=S(xe),this.biggerPictureService=S(Ae),this.mainPanelService=S(Ee),this.placeholderService=S(Ue),this.infinitePagination=S(Y),this.ngxPermissionsService=S(ue),this.updateResHandling=S(ee),this.inventoryService=S(E),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=y.MinDate,this.isShowReservedColumn=!0,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.guidEmpty=y.GuidEMpty,this.selectedChannel=M(null),this.channelIdentity=M({img:null,label:null}),this.inventoryUpdateRole=X.InventoryUpdate,this.hasInventoryEdit=M(!0),this.searchPlaceholder=M("Search ...")}ngOnInit(){this.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(z(n=>{this.checkShowReservedColumn(n)}),k(n=>(n=this.calculateAvailableStock(n),n)),R(1)),this.products$=this.sourceObs$}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(R(1),z(n=>{this.searchFilter={RowCount:n.Filter?.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter?.ChannelID,LocationID:n.Filter?.LocationID,NumberFilterComparator:n.Filter?.NumberFilterComparator,SearchType:n.Filter?.SearchType},this.initReloadData(),this.initSearchPlaceholder(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}initRoles(){this.ngxPermissionsService.hasPermission(X.InventoryUpdate).then(n=>this.hasInventoryEdit.set(n))}calculateAvailableStock(n){return n.map(o=>(o.totalAvailable=o.Variants.reduce((p,d)=>(p+=d.I?.Available||0,p),0),o))}checkShowReservedColumn(n){let t=0,o;n.forEach(p=>{o=p.Variants.find(d=>y.IsNotEmpty(d?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),y.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());y.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=y.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=y.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
|
|
1
|
+
import{a as qe}from"./chunk-MSSRROS6.js";import{a as J}from"./chunk-ISMIPSYN.js";import"./chunk-7T5DBPDP.js";import"./chunk-OH5T7D7O.js";import"./chunk-DE3FRI5N.js";import{a as E}from"./chunk-A6SP65CH.js";import{a as je,b as ze,c as Ge,d as Y,e as ee}from"./chunk-C67KF7MG.js";import{a as Re,b as Ne,c as Le}from"./chunk-FMZLGD5H.js";import{a as Qe}from"./chunk-TYSM3R5E.js";import{a as $e,b as He}from"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as Ue,d as We}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as Oe}from"./chunk-BZWZ64N5.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as Ae}from"./chunk-DLHIDOS3.js";import{a as Be}from"./chunk-LCN52IJT.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as Ee,b as ke}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as Te,b as Pe,c as De,i as Me,j as Ve}from"./chunk-IA7NJXJD.js";import{a as Fe}from"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as Ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as X}from"./chunk-ZSUWHVKX.js";import{h as xe}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as Z}from"./chunk-AGBJEXIM.js";import{a as ue,b as he,c as ge}from"./chunk-NB2H6KA7.js";import{c as y}from"./chunk-UPRDDI4K.js";import{A as be,b as fe,c as Se,h as ye,m as ve,o as we}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as pe,e as me}from"./chunk-D6JH2KV4.js";import{e as _e,g as Ce}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as de,B as Q,q as ce,w as $,y as H}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as se,G as j,Hb as O,Ia as M,Mc as ie,Nb as B,Nc as m,Oc as L,Pc as I,Rc as F,Sc as T,Tc as P,Uc as oe,Vc as ae,Wc as le,Xc as re,Z as R,_c as W,ac as u,ad as D,cc as h,dc as G,ea as z,fc as q,gc as K,hc as g,ic as a,id as f,jc as r,jd as b,kc as v,kd as V,mb as N,ob as s,oc as A,pc as U,ra as S,rc as w,v as k,wc as x,ya as _,yc as l,za as C}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as ne}from"./chunk-66YHNWRR.js";var Ye=()=>["/menu/order/download"];function Je(i,c){if(i&1&&(a(0,"li",4)(1,"div"),m(2," The last time you manually download your order is on "),a(3,"span",8),m(4),f(5,"date"),r()(),a(6,"div",9),m(7),r()()),i&2){l();let e=le(0);s(4),I(" ",V(5,2,e==null?null:e.OrderDownloadLatestOn,"dd MMM yyyy HH:mm")," "),s(3),I("(",e==null?null:e.calculatedDate,")")}}function et(i,c){i&1&&(a(0,"li",4),m(1," The last time you manually download your order is on (-) "),r())}var Ke=(()=>{let c=class c{constructor(){this.dialogRef=S(Te),this.data=S(Pe),this.modalConfig=new Me,this.inventoryService=S(E),this.lastDownloadInfo$=this.inventoryService.getLastInfoDownloadInventory(this.data.channelId).pipe(k(n=>{let t=n.OrderDownloadLatestOn!=y.MinDate,o=null,p=null;return t&&(o=new Date(n.OrderDownloadLatestOn),p=y.convertToReadableDate(o)),{OrderDownloadLatestOn:o,calculatedDate:p}}),R(1)),this.selectedProducts=M(this.data.selectedProducts||[]),this.modalConfig.title="Manual Inventory Sync",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}onUpdate(){this.dialogRef.close(!0)}onCancel(){this.dialogRef.close(!1)}};c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=O({type:c,selectors:[["app-dialog-update-product-info"]],features:[W([E])],decls:16,vars:8,consts:[[3,"onCancel","config"],["content",""],[1,"container"],[1,"mt-8"],[1,"lh-base"],["footer",""],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","routerLink"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","keyup.F2"],[1,"fw-bold","me-1"],[1,"fw-bold"]],template:function(t,o){if(t&1){let p=w();oe(0),f(1,"async"),a(2,"modal-material",0),x("onCancel",function(){return _(p),C(o.onCancel())}),a(3,"div",1)(4,"div",2)(5,"h4"),m(6),r(),a(7,"div",3)(8,"ul"),u(9,Je,8,5,"li",4)(10,et,2,0,"li",4),r()()()(),a(11,"div",5)(12,"a",6),x("click",function(){return _(p),C(o.onCancel())}),m(13," Download "),r(),a(14,"button",7),x("click",function(){return _(p),C(o.onUpdate())})("keyup.F2",function(){return _(p),C(o.onUpdate())}),m(15," Update Anyway "),r()()()}if(t&2){let p=ae(b(1,4,o.lastDownloadInfo$));s(2),g("config",o.modalConfig),s(4),I("",o.selectedProducts().length," Product(s) will be updated."),s(3),h(p!=null&&p.OrderDownloadLatestOn?9:10),s(3),g("routerLink",se(7,Ye))}},dependencies:[Ve,Q,Ce,_e,$,H],encapsulation:2});let i=c;return i})();var te=i=>[i],tt=i=>({"text-decoration-line-through":i}),nt=i=>({"me-10":i}),it=i=>({"bg-gradient-warning":i}),ot=i=>({cursor:i});function at(i,c){if(i&1){let e=w();a(0,"button",37),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onScanInventory(t))}),v(1,"i",38),m(2,"Refresh "),r()}}function lt(i,c){if(i&1){let e=w();a(0,"div",35)(1,"button",39),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onOpenDialogUpdateStockInfo(t))}),v(2,"i",40),m(3," Update "),r(),v(4,"button",41),a(5,"ul",42)(6,"a",43),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(7,"i",44),a(8,"span"),m(9,"Export"),r()()()()}}function rt(i,c){if(i&1){let e=w();a(0,"button",45),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(1,"i",44),a(2,"span"),m(3,"Export"),r()()}}function st(i,c){if(i&1&&(a(0,"div"),u(1,at,3,0,"button",34),u(2,lt,10,0,"div",35)(3,rt,4,0,"button",36),r()),i&2){let e=c,n=l(2);s(),h(n.productService.hasSelectionVariant(e)?1:-1),s(),h(n.productService.hasSelectionVariant(e)?2:3)}}function ct(i,c){i&1&&(a(0,"div",18)(1,"span"),m(2," showing only different stock, please press next to populate more data "),r()())}function dt(i,c){if(i&1){let e=w();a(0,"th")(1,"input",46),P("ngModelChange",function(t){_(e);let o=l(3);return T(o.checkboxState,t)||(o.checkboxState=t),C(t)}),x("ngModelChange",function(){let t=_(e),o=l(3);return C(o.onCheckboxStateChange(t))}),r()()}if(i&2){let e=l(3);s(),F("ngModel",e.checkboxState)}}function pt(i,c){if(i&1&&(A(0),u(1,dt,2,1,"th"),f(2,"async"),U()),i&2){let e,n=l(2);s(),h((e=b(2,1,n.products$))?1:-1,e)}}function mt(i,c){i&1&&(a(0,"th",31),m(1," Reserved "),r())}function _t(i,c){if(i&1){let e=w();a(0,"input",63),P("ngModelChange",function(t){_(e);let o=l(4).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),x("ngModelChange",function(){_(e);let t=l(4).$implicit,o=l(2);return C(o.onCheckboxStateProduct(t))}),r()}if(i&2){let e=l(4).$implicit;F("ngModel",e.selected)}}function Ct(i,c){if(i&1&&(A(0),a(1,"div",61),u(2,_t,1,1,"input",62),r(),U()),i&2){let e=l(3).$implicit;s(),g("ngClass",D(2,nt,e.Variants.length<=1)),s(),h(e.Variants.length>1?2:-1)}}function ut(i,c){if(i&1){let e=w();a(0,"img",64),x("click",function(t){_(e);let o=l(3).$implicit,p=l(2);return C(p.onZoomImage(t,o==null?null:o.ImageUrl))}),r()}if(i&2){let e=l(3).$implicit;g("src",re(e==null?null:e.ThumbnailUrl),N)}}function ht(i,c){i&1&&v(0,"img",58)}function gt(i,c){if(i&1&&(v(0,"br"),a(1,"div",65),v(2,"i",66),a(3,"small"),m(4),r()()),i&2){let e=l(3).$implicit;s(4),I("(",e==null?null:e.Category,")")}}function xt(i,c){if(i&1&&(a(0,"td",56)(1,"div",12),B(2,Ct,3,4,"ng-container",25),a(3,"div"),u(4,ut,1,2,"img",57)(5,ht,1,0,"img",58),r()()(),a(6,"td",59)(7,"span",60),m(8),r(),u(9,gt,5,1),r()),i&2){let e=l(2).$implicit,n=l(2);g("rowSpan",e==null?null:e.Variants.length),s(2),g("ngxPermissionsOnly",D(6,te,n.inventoryUpdateRole)),s(2),h(e!=null&&e.ThumbnailUrl?4:5),s(2),g("rowSpan",e==null?null:e.Variants.length),s(2),L(e==null?null:e.Name),s(),h(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function ft(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(3).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(3).$implicit;F("ngModel",e.selected)}}function St(i,c){if(i&1&&u(0,ft,1,1,"input",68),i&2){let e=l(2).$implicit;h((e==null?null:e.Inventory)<=1e5?0:-1)}}function yt(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(2).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(2).$implicit;F("ngModel",e.selected)}}function vt(i,c){if(i&1&&(A(0),a(1,"td",67),u(2,St,1,1)(3,yt,1,1,"input",68),r(),U()),i&2){let e=l().$implicit;s(2),h((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function wt(i,c){i&1&&(a(0,"div",51),m(1," Not Found "),r())}function bt(i,c){if(i&1&&(a(0,"div")(1,"span",69),m(2),f(3,"number"),r(),m(4," => "),a(5,"span",70),m(6),f(7,"number"),r()()),i&2){let e=l().$implicit;s(2),I(" ",b(3,2,e==null||e.I==null?null:e.I.Available)),s(4),L(b(7,4,e==null?null:e.Inventory))}}function It(i,c){if(i&1&&(m(0),f(1,"number")),i&2){let e=l().$implicit;I(" ",b(1,1,e==null?null:e.Inventory)," ")}}function Ft(i,c){if(i&1&&(a(0,"div",52)(1,"a",71),v(2,"i",72),r()()),i&2){let e=l().$implicit,n=l(3);s(),g("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),N)}}function Tt(i,c){if(i&1){let e=w();a(0,"span",76),x("click",function(){_(e);let t=l(2).$implicit,o=l().$implicit,p=l(2);return C(p.openTableDialog(o,t))}),m(1),f(2,"number"),r()}if(i&2){let e=l(2).$implicit,n=l(3);ie(D(5,ot,n.hasInventoryEdit())),s(),I(" ",b(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function Pt(i,c){if(i&1){let e=w();a(0,"td",53)(1,"div",50)(2,"div"),u(3,Tt,3,7,"span",73),f(4,"async"),r(),a(5,"div",52)(6,"a",71),v(7,"i",72),r()(),a(8,"div",52)(9,"span",74),x("click",function(){_(e);let t=l().$implicit,o=l(3);return C(o.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),v(10,"i",75),r()()()()}if(i&2){let e,n=l().$implicit,t=l(3);g("ngClass",D(5,it,(n==null?null:n.Inventory)!=(n==null||n.Channel[0]==null?null:n.Channel[0].Inventory))),s(3),h((e=b(4,3,t.products$))?3:-1,e),s(3),g("href",n==null||n.Channel[0]==null?null:n.Channel[0].Url,N)}}function Dt(i,c){if(i&1&&(a(0,"span",77),m(1),f(2,"number"),r()),i&2){let e=l(2).$implicit;s(),I(" (",b(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function Mt(i,c){i&1&&m(0," - ")}function Vt(i,c){if(i&1&&(a(0,"td",48),u(1,Dt,3,3,"span",77)(2,Mt,1,0),r()),i&2){let e=l().$implicit;s(),h(!(e==null||e.Channel[0]==null)&&e.Channel[0].InventoryReserved?1:2)}}function Et(i,c){i&1&&m(0," - ")}function kt(i,c){if(i&1&&(a(0,"span",55),f(1,"date"),m(2),f(3,"date"),r()),i&2){let e=l().$implicit;g("matTooltip",V(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),I(" ",V(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Rt(i,c){if(i&1&&(a(0,"tr"),u(1,xt,10,8),a(2,"td",47),m(3),r(),a(4,"td",48)(5,"span",49),m(6),r()(),B(7,vt,4,1,"ng-container",25),a(8,"td")(9,"div",50),u(10,wt,2,0,"div",51),u(11,bt,8,6,"div"),u(12,It,2,3),u(13,Ft,3,1,"div",52),r()(),u(14,Pt,11,7,"td",53),u(15,Vt,3,1,"td",48),a(16,"td",54),u(17,Et,1,0)(18,kt,4,8,"span",55),r()()),i&2){let e=c.$implicit,n=c.$index,t=l(3);s(),h(n==0?1:-1),s(2),L(e==null?null:e.Model),s(2),g("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",D(13,tt,e.Discontinued)),s(),L(e==null?null:e.Code),s(),g("ngxPermissionsOnly",D(15,te,t.inventoryUpdateRole)),s(3),h((e==null?null:e.I)==null?10:-1),s(),h((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),h((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),h((e==null?null:e.I)!=null?13:-1),s(),h(e!=null&&e.Channel?14:-1),s(),h(t.isShowReservedColumn?15:-1),s(2),h((e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==t.minDate?17:18)}}function Nt(i,c){if(i&1&&(a(0,"tbody"),q(1,Rt,19,17,"tr",null,G),r()),i&2){let e=c.$implicit;s(),K(e.Variants)}}function Lt(i,c){if(i&1){let e=w();a(0,"mainpanel",1),x("onSubmit",function(t){_(e);let o=l();return C(o.onSearch(t))}),a(1,"actions")(2,"div",2),u(3,st,4,2,"div"),f(4,"async"),r()(),a(5,"filters")(6,"div",3)(7,"label",4),m(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",5),x("onChannelChange",function(t){_(e);let o=l();return C(o.onChannelChange(t))}),r()(),a(10,"div",3)(11,"filter-query-type",6),P("numberFilterComparatorChange",function(t){_(e);let o=l();return T(o.searchFilter.NumberFilterComparator,t)||(o.searchFilter.NumberFilterComparator=t),C(t)})("searchTypeChange",function(t){_(e);let o=l();return T(o.searchFilter.SearchType,t)||(o.searchFilter.SearchType=t),C(t)}),r()(),a(12,"div",3)(13,"label",7),m(14,"PageNumber"),r(),a(15,"input",8),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),C(t)}),r()(),a(16,"div",3)(17,"label",9),m(18,"Page Size"),r(),a(19,"input",10),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),C(t)}),r()(),a(20,"div")(21,"label",11),m(22,"Quantity From - To"),r(),a(23,"div",12)(24,"input",13),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityFrom,t)||(o.searchFilter.QuantityFrom=t),C(t)}),r(),m(25," - "),a(26,"input",14),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityTo,t)||(o.searchFilter.QuantityTo=t),C(t)}),r()()()(),a(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,ct,3,0,"div",18),a(32,"table",19),x("matSortChange",function(t){_(e);let o=l();return C(o.onSortVariant(t))}),a(33,"thead",20)(34,"tr")(35,"th",21),m(36," Product "),v(37,"br"),a(38,"mat-slide-toggle",22),x("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,C(t.onShowDifferenceStock())}),a(39,"small",11),m(40,"FILTER DIFFERENT INVENTORY"),r()()(),a(41,"th",23),m(42,"Variant"),r(),a(43,"th",24),m(44,"SKU"),r(),B(45,pt,3,3,"ng-container",25),a(46,"th",26),m(47," POS "),r(),a(48,"th",27)(49,"div",28),x("click",function(){_(e);let t=l();return C(t.openModalFilter())}),v(50,"img",29),a(51,"span",30),m(52),f(53,"stringLimit"),r()()(),u(54,mt,2,0,"th",31),a(55,"th",32),m(56,"Last Sync"),r()()(),q(57,Nt,3,0,"tbody",null,G),f(59,"async"),r(),a(60,"infinite-paginator",33),f(61,"async"),x("onNextPage",function(){_(e);let t=l();return C(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return C(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return C(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(i&2){let e,n,t,o,p=c,d=l();g("hideSearchBox",!1)("searchBoxPlaceHolder",d.searchPlaceholder()),s(3),h((e=b(4,24,d.products$))?3:-1,e),s(6),g("ngModel",(d.searchFilter==null?null:d.searchFilter.LocationID)||(d.searchFilter==null?null:d.searchFilter.ChannelID)),s(2),g("numberFilterComparatorOptions",p==null||p.Options==null?null:p.Options.SearchComparatorTypeOptions),F("numberFilterComparator",d.searchFilter.NumberFilterComparator),g("searchTypeOptions",p==null||p.Options==null?null:p.Options.SearchSKUOnlyOrSKUNameOptions),F("searchType",d.searchFilter.SearchType),s(4),F("ngModel",d.searchFilter.PageNumber),s(4),F("ngModel",d.searchFilter.RowCount),s(5),F("ngModel",d.searchFilter.QuantityFrom),s(2),F("ngModel",d.searchFilter.QuantityTo),s(5),h((d.searchFilter==null?null:d.searchFilter.filterModel)==3?31:-1),s(14),g("ngxPermissionsOnly",D(33,te,d.inventoryUpdateRole)),s(4),g("matTooltip",((n=d.channelIdentity())==null||n.label==null?null:n.label.length)>13?(n=d.channelIdentity())==null?null:n.label:""),s(),g("src",(t=d.channelIdentity())==null?null:t.img,N),s(2),I(" ",V(53,26,(o=d.channelIdentity())==null?null:o.label,13)," "),s(2),h(d.isShowReservedColumn?54:-1),s(3),K(b(59,29,d.products$)),s(3),g("totalData",d.infinitePagination.totalData())("hideCount",d.infinitePagination.hideCount())("rowCount",b(61,31,d.infinitePagination.totalRowCount$))("pageNumber",d.infinitePagination.pageNumber())("disableNextButton",d.infinitePagination.disableNextButton())("goToLastPage",d.infinitePagination.isLastPage())}}var Ln=(()=>{let c=class c{constructor(){this.http=S(me),this.toastr=S(pe),this.dialog=S(De),this.productService=S(Be),this.authService=S(xe),this.biggerPictureService=S(Ae),this.mainPanelService=S(Ee),this.placeholderService=S(Ue),this.infinitePagination=S(Y),this.ngxPermissionsService=S(ue),this.updateResHandling=S(ee),this.inventoryService=S(E),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=y.MinDate,this.isShowReservedColumn=!0,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.guidEmpty=y.GuidEMpty,this.selectedChannel=M(null),this.channelIdentity=M({img:null,label:null}),this.inventoryUpdateRole=X.InventoryUpdate,this.hasInventoryEdit=M(!0),this.searchPlaceholder=M("Search ...")}ngOnInit(){this.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(z(n=>{this.checkShowReservedColumn(n)}),k(n=>(n=this.calculateAvailableStock(n),n)),R(1)),this.products$=this.sourceObs$}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(R(1),z(n=>{this.searchFilter={RowCount:n.Filter?.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter?.ChannelID,LocationID:n.Filter?.LocationID,NumberFilterComparator:n.Filter?.NumberFilterComparator,SearchType:n.Filter?.SearchType},this.initReloadData(),this.initSearchPlaceholder(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}initRoles(){this.ngxPermissionsService.hasPermission(X.InventoryUpdate).then(n=>this.hasInventoryEdit.set(n))}calculateAvailableStock(n){return n.map(o=>(o.totalAvailable=o.Variants.reduce((p,d)=>(p+=d.I?.Available||0,p),0),o))}checkShowReservedColumn(n){let t=0,o;n.forEach(p=>{o=p.Variants.find(d=>y.IsNotEmpty(d?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),y.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());y.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=y.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=y.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
|
|
2
2
|
Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(n){this.searchFilter.text=n,this.setChannelFilter(),this.initReloadData(),this.initSearchPlaceholder()}openModalFilter(){this.mainPanelService.openModalFilter()}onOpenDialogUpdateStockInfo(n){let t=this.productService.selectedVariantProduct(n);this.dialog.open(Ke,{data:{channelId:t[0]?.Channel[0]?.ChannelID,selectedProducts:t}}).afterClosed().pipe(j(o=>o===!0)).subscribe(()=>{this.updateStock(t)})}updateStock(n){if(n.length>0){let t=this.searchFilter.LocationID,o=n.map(d=>ne({ChannelItemID:d?.Channel[0]?.ChannelItemID,ChannelVariationID:d?.Channel[0]?.ChannelVariationID,Inventory:d.Inventory},y.IsNotEmpty(t)&&{LocationID:t})),p={ListChannelID:[this.searchFilter.ChannelID],List:o};this.http.post(Z.UpdateInventoryChannel,p).subscribe(d=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(d)})}}handlingUpdateStock(n){if(n[0]?.Response){let t=n[0]?.Response?.Fail_list,o=n[0]?.Response?.Success_list;this.updateResHandling.responseHandling(o,t,"Stock")}else this.toastr.error(n[0]?.Exception,"Error")}refreshInventory(n,t,o,p){let d={ChannelItemID:n,ChannelVariationID:t,ChannelID:o,VariantID:p};this.http.post("/api/Inventory/RefreshInventoryChannel",d).subscribe(Ot=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(n){n.Variants=n.Variants.map(t=>(t.Inventory>=0&&(t.selected=n.selected),t))}onCheckboxStateChange(n){n=n.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=this.checkboxState,o)),t))}openTableDialog(n,t){this.hasInventoryEdit()&&this.dialog.open(je,{data:{Name:n.Name,Variant:t,ChannelID:t?.Channel[0]?.ChannelID,Table:"inventory",ChannelItemID:n.ChannelItemID}}).afterClosed().pipe(j(p=>y.IsNotEmpty(p))).subscribe(p=>{this.updateItemAfterDialog(p)})}updateItemAfterDialog(n){let t=n.InventoryMultiwarehouse[0]?.LocationID,o={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:n?.Inventory,VariantID:n.ID,SKU:n?.Sku,LocationID:t};this.http.post(Z.UpdateUpdateQuantityByItem,o).subscribe(p=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([p])})}onScanInventory(n){let t=this.productService.selectedVariantProduct(n);this.inventoryService.refreshInventory(t).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(Qe,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=J.DIFFERENCE:this.searchFilter.filterModel=J.ALL,this.initReloadData()}onZoomImage(n,t){this.biggerPictureService.openBiggerPicture(n,t)}onSortVariant(n){if(n.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(k(t=>t.map(o=>(o.Variants=o.Variants.sort((p,d)=>y.compare(p.I?.Available,d.I?.Available,n.direction==="asc")),o)).sort((o,p)=>y.compare(o.totalAvailable,p.totalAvailable,n.direction==="asc"))))}};c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=O({type:c,selectors:[["app-single-channel-comparison"]],features:[W([Y,E,ee])],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"hideSearchBox","searchBoxPlaceHolder"],["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"d-flex"],[1,"mb-5"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],[4,"ngxPermissionsOnly"],["scope","col","mat-sort-header","Available","arrowPosition","before",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[1,"text-center"],["matTooltipShowDelay","500",3,"matTooltip"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[3,"ngClass"],["type","checkbox",1,"me-3",3,"ngModel"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["title","Stock Available"],["title","Inventory below minimum inventory"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[3,"class"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[3,"click"],[1,"text-danger"]],template:function(t,o){if(t&1&&(u(0,Lt,62,35,"mainpanel",0),f(1,"async")),t&2){let p;h((p=b(1,1,o.loader$))?0:-1,p)}},dependencies:[Q,ce,ke,Oe,be,Se,we,fe,ye,ve,Ge,ge,he,He,$e,Fe,Ie,Le,Re,Ne,qe,We,$,de,H,ze],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});let i=c;return i})();export{Ln as SingleChannelComparisonComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-WH76SMZT.js";import{a as d,b as u}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c,g as s}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as r,hc as p,ic as l,jc as m,kc as o,ob as i}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var h=(()=>{let t=class t{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"}]}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=r({type:t,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,f){n&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),m()()(),o(4,"router-outlet")),n&2&&(i(3),p("Tabs",f.priceTabs))},dependencies:[u,d,s,c],encapsulation:2});let e=t;return e})();var x=[{path:"",component:h,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-LOVYZLSU.js").then(e=>e.PricePosChannelComponent)},canActivate:[a],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-5YQUGH5Z.js").then(e=>e.PriceSingleChannelComponent)},canActivate:[a],data:{title:"Price Single Channel Comparison"}}]}];export{x as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-WH76SMZT.js";import{a as d,b as h}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as m}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,hc as l,ic as p,jc as c,kc as a,ob as r}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var u=(()=>{let n=class n{constructor(){this.ObjectlogTabs=[{Title:"Channel Push Log Exception",Url:"/menu/log/exception"},{Title:"Channel Push Log",Url:"/menu/log/rawlog"},{Title:"POS Sync Order Log",Url:"/menu/log/order"},{Title:"Inventory Sync ",Url:"/menu/log/inventory"},{Title:"Authorization Log ",Url:"/menu/log/authorization-log"},{Title:"Flush Cache ",Url:"/menu/log/flush-cache"}]}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=i({type:n,selectors:[["app-logs"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,s){o&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),c()()(),a(4,"router-outlet")),o&2&&(r(3),l("Tabs",s.ObjectlogTabs))},dependencies:[h,d,m],encapsulation:2});let t=n;return t})();var b=[{path:"",component:u,children:[{path:"",redirectTo:"exception",pathMatch:"full"},{path:"order",loadComponent(){return import("./chunk-25Q56ATV.js").then(t=>t.OrderComponent)},canActivate:[e],data:{title:"Order Log"}},{path:"inventory/sync-inventory",loadComponent(){return import("./chunk-AZEH7PMO.js").then(t=>t.InventoryLogComponent)},canActivate:[e],data:{title:"Product Inventory Sync"}},{path:"rawlog",loadComponent(){return import("./chunk-SASGSPGQ.js").then(t=>t.RawLogComponent)},canActivate:[e],data:{title:"Raw Log"}},{path:"rawlog/detail",loadComponent(){return import("./chunk-HWMXSD34.js").then(t=>t.RawDetailComponent)},canActivate:[e],data:{title:"Raw Log Detail"}},{path:"inventory/sync-inventory/detail",loadComponent(){return import("./chunk-MAT6VW43.js").then(t=>t.InventoryDetailComponent)},canActivate:[e],data:{title:"Product Inventory Sync Detail"}},{path:"order/detail",loadComponent(){return import("./chunk-DMENVSHH.js").then(t=>t.OrderdetailComponent)},canActivate:[e],data:{title:"Order Details"}},{path:"order/detail-user",loadComponent(){return import("./chunk-WD3ADLM3.js").then(t=>t.OrderdetailUserComponent)},canActivate:[e],data:{title:"Order User Details"}},{path:"exception",loadComponent(){return import("./chunk-WEJBY3OB.js").then(t=>t.ExceptionLogComponent)},canActivate:[e],data:{title:"Exception Log"}},{path:"exception/detail",loadComponent(){return import("./chunk-T3CN3WQD.js").then(t=>t.ExceptionDetailComponent)},canActivate:[e],data:{title:"Exception Log Detail"}},{path:"inventory",loadComponent:()=>import("./chunk-PKYMYIGB.js").then(t=>t.InventoryAsyncLogComponent),canActivate:[e],data:{title:"Product Inventory Sync"}},{path:"inventory/detail",loadComponent:()=>import("./chunk-Z3YSNML6.js").then(t=>t.InventoryAsyncDetailComponent),canActivate:[e],data:{title:"Product Inventory Sync Detail"}},{path:"authorization-log",loadComponent(){return import("./chunk-EX4C4ZW4.js").then(t=>t.ChannelLogComponent)},canActivate:[e],data:{title:"Authorization Log"}},{path:"flush-cache",loadComponent(){return import("./chunk-CIWFLDCI.js").then(t=>t.FlushCacheComponent)},canActivate:[e],data:{title:"Flush Cache"}}]}];export{b as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as w}from"./chunk-
|
|
1
|
+
import{b as w}from"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import{b as k}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{b as T,e as P,g as R}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as g,B as M,w as y,y as I}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as E,Nc as i,Oc as l,Pc as D,aa as C,ac as m,cc as p,hc as _,ic as t,id as v,jc as e,jd as b,kd as x,ob as d,ra as u,v as h,yc as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function B(a,o){if(a&1&&(t(0,"div",9)(1,"div",12)(2,"div",6)(3,"h5"),i(4,"Perflog"),e()(),t(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),i(9),e()()()()()()),a&2){let n=f();d(9),l(n.Perflog)}}function L(a,o){if(a&1&&(t(0,"div",15)(1,"div",12)(2,"div",6)(3,"h5"),i(4,"StackTrace"),e()(),t(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),i(9),e()()()()()()),a&2){let n=f();d(9),l(n==null?null:n.StackTrace)}}function N(a,o){if(a&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),i(3,"Back"),e()(),t(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),i(11,"General"),e()(),t(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),i(17,"Created Date"),e(),t(18,"div")(19,"span"),i(20),v(21,"date"),e()()()(),t(22,"div",9)(23,"div",10)(24,"label"),i(25,"Status"),e(),t(26,"div")(27,"span"),i(28),e()()()()(),t(29,"div",11)(30,"div",9)(31,"div",10)(32,"label"),i(33,"Duration"),e(),t(34,"div")(35,"span"),i(36),v(37,"number"),e()()()(),t(38,"div",9)(39,"div",10)(40,"label"),i(41,"Label"),e(),t(42,"div")(43,"span"),i(44),e()()()()()()()()(),t(45,"div",3)(46,"div",9)(47,"div",12)(48,"div",6)(49,"h5"),i(50,"Message"),e()(),t(51,"div",7)(52,"div",13)(53,"div",14)(54,"pre"),i(55),e()()()()()(),m(56,B,10,1,"div",9),m(57,L,10,1,"div",15),e()()()()),a&2){let n=o;_("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),d(20),l(x(21,10,n.Created,"dd MMM yyyy HH:mm:ss")),d(8),l(n.StatusLabel),d(8),D("",x(37,13,n.DurationInSecond,"1.1-1")," s"),d(8),l(n.Label),d(11),l(n.Message),d(),p(n!=null&&n.Perflog?56:-1),d(),p(n!=null&&n.StackTrace?57:-1)}}var Q=(()=>{let o=class o{constructor(){this.activatedRoute=u(T),this.notificationService=u(w)}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(C(s=>{let r=s.ID;return this.notificationService.getNotificationDetail(r).pipe(h(c=>(c.DurationInSecond=parseInt(c.Duration)/1e3,c)))}))}};o.\u0275fac=function(r){return new(r||o)},o.\u0275cmp=E({type:o,selectors:[["app-detail"]],decls:2,vars:3,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],[1,"col-sm-12"]],template:function(r,c){if(r&1&&(m(0,N,58,16,"mainpanel",0),v(1,"async")),r&2){let S;p((S=b(1,1,c.notification$))?0:-1,S)}},dependencies:[M,k,R,P,y,g,I],encapsulation:2});let a=o;return a})();export{Q as DetailComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-WH76SMZT.js";import{a as l,b as u}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as d,g as s}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,hc as p,ic as m,jc as c,kc as n,ob as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var f=(()=>{let e=class e{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=i({type:e,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,h){o&1&&(m(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),c()()(),n(4,"router-outlet")),o&2&&(a(3),p("Tabs",h.tabs))},dependencies:[u,l,s,d],encapsulation:2});let t=e;return t})();var I=[{path:"",component:f,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-7QDKBMEA.js").then(t=>t.OrderApiComponent)},canActivate:[r],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-BLOGT3TL.js").then(t=>t.ProductApiComponent)},canActivate:[r],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-ILFUI3MT.js").then(t=>t.EscrowApiComponent)},canActivate:[r],data:{title:"Escrow API"}}]}];export{I as routes};
|