marketplacepos 26.24.4 → 26.26.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/{chunk-U2TALYQB.js → chunk-2NXHDVMU.js} +1 -1
- package/Marketplace/{chunk-XZHD5LHY.js → chunk-6MGWOV5M.js} +1 -1
- package/Marketplace/{chunk-7TF65SS4.js → chunk-6U2AKSU5.js} +1 -1
- package/Marketplace/{chunk-7FEHLUC2.js → chunk-6WM2SWBG.js} +1 -1
- package/Marketplace/{chunk-MHLIS6X5.js → chunk-6XB4CMAT.js} +1 -1
- package/Marketplace/{chunk-33DEFQXO.js → chunk-76L5J5VS.js} +1 -1
- package/Marketplace/{chunk-C5VFTOER.js → chunk-7EKMHOIS.js} +1 -1
- package/Marketplace/{chunk-4IQELTZB.js → chunk-7LJVQ3PR.js} +1 -1
- package/Marketplace/{chunk-55QYSDLS.js → chunk-7LMLPKX5.js} +1 -1
- package/Marketplace/{chunk-C27KH5ST.js → chunk-7OE6AKRK.js} +1 -1
- package/Marketplace/{chunk-ZPJ725MO.js → chunk-A3ITOAAM.js} +1 -1
- package/Marketplace/{chunk-355ZRA2N.js → chunk-AASW6PZJ.js} +1 -1
- package/Marketplace/{chunk-UZLFH2TF.js → chunk-AQHIJCBA.js} +1 -1
- package/Marketplace/{chunk-6ZLRW3NS.js → chunk-BDQ4CBXC.js} +1 -1
- package/Marketplace/chunk-BHYA4FRV.js +2 -0
- package/Marketplace/{chunk-IIWWEKEM.js → chunk-C6KJCWU4.js} +1 -1
- package/Marketplace/{chunk-KG5SGFZO.js → chunk-CZ3VFAB5.js} +1 -1
- package/Marketplace/{chunk-HJMJ4TMO.js → chunk-DCLGPLVP.js} +1 -1
- package/Marketplace/{chunk-6BZAYZ4P.js → chunk-DI6ZCRNT.js} +1 -1
- package/Marketplace/{chunk-UQJH2WH3.js → chunk-E3YNHJ5K.js} +1 -1
- package/Marketplace/{chunk-L7GSAN64.js → chunk-EI3WKQQL.js} +1 -1
- package/Marketplace/{chunk-KVFHWHHC.js → chunk-GAVLRG4D.js} +1 -1
- package/Marketplace/{chunk-S4KJJ6VH.js → chunk-GTLOGZP3.js} +1 -1
- package/Marketplace/{chunk-B65CRC5C.js → chunk-HHC6VK4C.js} +1 -1
- package/Marketplace/{chunk-ZYT33HWZ.js → chunk-IFJOFBGT.js} +1 -1
- package/Marketplace/{chunk-MAOX5MJS.js → chunk-IKVUTHAO.js} +1 -1
- package/Marketplace/{chunk-MYSHRBAF.js → chunk-K7GKYS4V.js} +1 -1
- package/Marketplace/{chunk-YLXQRRKE.js → chunk-KEWMW42S.js} +1 -1
- package/Marketplace/{chunk-S56SEQG7.js → chunk-L2ATCDBD.js} +1 -1
- package/Marketplace/{chunk-AP2WKJF5.js → chunk-L4NWLKSB.js} +1 -1
- package/Marketplace/{chunk-2E2N4HZT.js → chunk-L7RL5FTD.js} +1 -1
- package/Marketplace/{chunk-CLGJKM25.js → chunk-LA2MZPCY.js} +1 -1
- package/Marketplace/{chunk-CMSDLPXW.js → chunk-LWDLX2VL.js} +1 -1
- package/Marketplace/{chunk-V6WVLJMC.js → chunk-MBHSOG7Q.js} +1 -1
- package/Marketplace/{chunk-F2L5QOS2.js → chunk-MEMVRZYW.js} +1 -1
- package/Marketplace/{chunk-UGJCSBFQ.js → chunk-MPCSCQVK.js} +1 -1
- package/Marketplace/{chunk-HFIMWJYY.js → chunk-NG4GMTOZ.js} +1 -1
- package/Marketplace/{chunk-QARPNBJI.js → chunk-O5ZDGFSS.js} +1 -1
- package/Marketplace/{chunk-7XUS2YSG.js → chunk-OE5B6FJP.js} +1 -1
- package/Marketplace/{chunk-D337CH6N.js → chunk-OPQ5F4KL.js} +1 -1
- package/Marketplace/{chunk-XZTNAMM6.js → chunk-OUDWTRBQ.js} +1 -1
- package/Marketplace/{chunk-OCHB6FAJ.js → chunk-PV5EGEIY.js} +1 -1
- package/Marketplace/{chunk-PVWBD5NJ.js → chunk-SSNJVWLC.js} +1 -1
- package/Marketplace/{chunk-FXO46KNS.js → chunk-T3GJY3UG.js} +1 -1
- package/Marketplace/{chunk-J2VLBGD7.js → chunk-T7W7AYMK.js} +1 -1
- package/Marketplace/{chunk-TGPEP62D.js → chunk-T7Z7B6EJ.js} +1 -1
- package/Marketplace/{chunk-2AV7YP3Y.js → chunk-TCNDVA6S.js} +1 -1
- package/Marketplace/chunk-TRH3SOK7.js +13 -0
- package/Marketplace/{chunk-FVHO5LYX.js → chunk-TSBDKSW3.js} +1 -1
- package/Marketplace/{chunk-R4OFIKEK.js → chunk-TVDWPMIH.js} +1 -1
- package/Marketplace/{chunk-FO5O6NAZ.js → chunk-UBYGOWJM.js} +1 -1
- package/Marketplace/{chunk-ZCFMQXNM.js → chunk-UGSYT3NP.js} +2 -2
- package/Marketplace/{chunk-MNXAQRA5.js → chunk-UWD2FHXK.js} +1 -1
- package/Marketplace/{chunk-QKI4XWHA.js → chunk-VKLH6F7O.js} +1 -1
- package/Marketplace/{chunk-ADZRLATP.js → chunk-WA4G7HII.js} +1 -1
- package/Marketplace/{chunk-P4RRNZAO.js → chunk-WIJXVRR7.js} +1 -1
- package/Marketplace/{chunk-4DY46VSB.js → chunk-XXDAYWFJ.js} +1 -1
- package/Marketplace/{chunk-TI7VACJV.js → chunk-Y3C4XFNC.js} +1 -1
- package/Marketplace/{chunk-TUPMDQZE.js → chunk-Z5X6KXNK.js} +1 -1
- package/Marketplace/{chunk-TZYQY7DN.js → chunk-ZFJRIOOO.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-BAHGDX2A.js → main-DISUIUIE.js} +2 -2
- package/package.json +1 -1
- package/Marketplace/chunk-A3DBC337.js +0 -2
- package/Marketplace/chunk-G6GWLK6Z.js +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-KEWMW42S.js";import{a as s}from"./chunk-N5UVIRO3.js";import"./chunk-MWUZF6ZW.js";import"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-ZFJRIOOO.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import"./chunk-M5YUVUTR.js";import{c as m,g as c}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Eb as i,ic as r,jc as p,kc as l,lc as o,mb as a}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var u=(()=>{class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Multi Channel Row Comparison",Url:"/menu/price/update"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=i({type:e,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,C){t&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),l()()(),o(4,"router-outlet")),t&2&&(a(3),r("Tabs",C.priceTabs))},dependencies:[s,c,m],encapsulation:2,changeDetection:0})}}return e})();var S=[{path:"",component:u,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-IFJOFBGT.js").then(e=>e.PricePosChannelComponent)},canActivate:[n],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-CZ3VFAB5.js").then(e=>e.PriceSingleChannelComponent)},canActivate:[n],data:{title:"Price Single Channel Comparison"}},{path:"update",loadComponent(){return import("./chunk-7EKMHOIS.js").then(e=>e.PriceUpdateComponent)},canActivate:[n],data:{title:"Multi Channel Row Comparison"}}]}];export{S as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F,b as pt}from"./chunk-3GTUQUIQ.js";import{a as dt}from"./chunk-
|
|
1
|
+
import{a as F,b as pt}from"./chunk-3GTUQUIQ.js";import{a as dt}from"./chunk-7LJVQ3PR.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import"./chunk-5CH6HZVM.js";import{a as st}from"./chunk-ZA4X34GE.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-BKR7YPEW.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{b as ct}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-2VWSIT3Y.js";import"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-ZFJRIOOO.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import{A as rt,h as ot,m as lt}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import"./chunk-M5YUVUTR.js";import{e as nt,g as at}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as et,D as it,r as Z,z as tt}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as Y,Eb as $,Ga as E,Nc as D,Oc as a,Pc as f,Qc as h,Rc as q,Sc as J,Tc as j,Uc as z,V as L,Vc as w,Wc as K,Xc as U,ad as G,bc as C,bd as Q,cd as S,dc as v,dd as X,ec as O,fc as A,gc as I,hc as y,ic as u,jc as e,kb as R,kc as i,kd as x,lc as H,ld as P,mb as l,md as T,na as B,sc as W,t as k,ua as p,va as m,xc as _,zc as g}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as V,b as N}from"./chunk-66YHNWRR.js";var mt=(t,c)=>({"btn-warning text-white":t,"btn-outline-warning":c}),ut=(t,c)=>({"btn-success":t,"btn-outline-success":c}),_t=(t,c)=>({"btn-danger":t,"btn-outline-danger":c}),ft=(t,c)=>({"btn-secondary text-white":t,"btn-outline-dark":c}),St=(t,c)=>({"bg-gradient-danger":t,"bg-gradient-warning":c}),Ct=()=>["/menu/products/status/notificationV2/detailV2"],vt=t=>({ID:t}),gt=(t,c,o)=>({"text-warning":t,"text-success":c,"text-danger":o});function ht(t,c){t&1&&(e(0,"div"),a(1," Scan in progress. You will be notified once it is complete. "),i())}function xt(t,c){if(t&1&&(e(0,"div"),a(1),x(2,"number"),i()),t&2){let o=c.$implicit;l(),q(" ",o.Key,": ",P(2,2,o.Value)," ")}}function bt(t,c){if(t&1&&(e(0,"div",22)(1,"div",21),a(2,"Status Product:"),i(),I(3,xt,3,4,"div",null,O),i()),t&2){let o=g(2).$implicit;l(3),y(o.ParsedStatus)}}function Vt(t,c){if(t&1&&(e(0,"div",21),a(1),i(),e(2,"div",23)(3,"div",21),a(4,"Product Type"),i(),e(5,"div"),a(6,":"),i(),e(7,"div"),a(8),i()(),e(9,"div",23)(10,"div",21),a(11,"Scan Type"),i(),e(12,"div"),a(13,":"),i(),e(14,"div"),a(15),i()(),e(16,"div",23)(17,"div",21),a(18,"Result"),i(),e(19,"div"),a(20,":"),i(),e(21,"div"),a(22),i()(),C(23,bt,5,0,"div",22)),t&2){let o=g().$implicit;l(),h(" ",o.ProcessLabel," "),l(7),f(o.ProductTypeDesc),l(7),f(o.ScanTypeDesc),l(7),f(o.ProcessDescription),l(),v(o!=null&&o.ParsedStatus&&(o==null||o.ParsedStatus==null?null:o.ParsedStatus.length)>0?23:-1)}}function Nt(t,c){if(t&1&&(a(0),x(1,"number"),e(2,"span"),a(3,"s"),i()),t&2){let o=g().$implicit;h(" ",T(1,1,o.DurationInSecond,"1.1-1")," ")}}function Et(t,c){t&1&&a(0," - ")}function It(t,c){t&1&&a(0," In Progress ")}function yt(t,c){t&1&&a(0," Completed ")}function Dt(t,c){t&1&&a(0," Failed ")}function wt(t,c){if(t&1&&(e(0,"tr")(1,"td")(2,"a",18),a(3),i()(),e(4,"td")(5,"div",19),H(6,"img",20),e(7,"span"),a(8),i()()(),e(9,"td"),C(10,ht,2,0,"div")(11,Vt,24,5),i(),e(12,"td"),C(13,Nt,4,4)(14,Et,1,0),i(),e(15,"td")(16,"div",21),C(17,It,1,0)(18,yt,1,0)(19,Dt,1,0),i()(),e(20,"td",22)(21,"div"),a(22),i(),e(23,"div"),a(24),x(25,"date"),i()()()),t&2){let o,r=c.$implicit,n=g();D(S(17,St,r.Status==1,r.Status==0)),l(2),u("routerLink",G(20,Ct))("queryParams",Q(21,vt,r.ID)),l(),h(" ",r.ID," "),l(3),u("src",r.Img,R),l(2),f(r.ChannelName),l(2),v(r.StateID==n.scanState.InProgress?10:11),l(3),v(r.DurationInSecond?13:14),l(3),D(X(23,gt,r.StateID==n.scanState.InProgress,r.StateID==n.scanState.Completed,r.StateID==n.scanState.Failed)),l(),v((o=r.StateID)===n.scanState.InProgress?17:o===n.scanState.Completed?18:o===n.scanState.Failed?19:-1),l(5),f(r.LoginID),l(2),h(" ",T(25,14,r.Created,"dd MMM yyyy HH:mm")," ")}}var zt=(()=>{class t{constructor(){this.notificationService=B(F),this.filter=E({RowCount:20,PageNumber:1,ChannelID:null,StateID:null}),this.scanState=pt,this.pillState=E(null),this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotificationList(this.filter()).pipe(k(o=>(o.Data=o.Data.map(r=>(r.StatusProduct&&(r.ParsedStatus=JSON.parse(r.StatusProduct)),r)),o)),L(1))}onFilter(){this.filter.update(o=>N(V({},o),{PageNumber:1})),this.initNotifications()}selectTab(o){this.pillState.set(o),this.filter.update(r=>N(V({},r),{StateID:o,PageNumber:1})),this.initNotifications()}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=$({type:t,selectors:[["app-notificationV2"]],features:[Y([F])],decls:48,vars:25,consts:[["headerTitle","Notification (V2)",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"nav","nav-pills","mb-3","mt-3"],[1,"nav-item","me-2"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","260px"],[3,"class"],[1,"col-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","gap-3"],[1,"channelLogo-md",3,"src","alt"],[1,"fw-bold"],[1,"lh-base"],[1,"d-flex","gap-2"]],template:function(r,n){if(r&1){let s=W();w(0),x(1,"async"),e(2,"mainpanel",0),_("onSubmit",function(){return p(s),m(n.onFilter())}),e(3,"filters")(4,"div")(5,"label",1),a(6,"Channel"),i(),w(7),e(8,"app-channel-options-v2",2),z("ngModelChange",function(b){p(s);let M=U(7);return j(M.ChannelID,b)||(M.ChannelID=b),m(b)}),i()()(),e(9,"content")(10,"div",3)(11,"div",4)(12,"div",5)(13,"div",6)(14,"ul",7)(15,"li",8)(16,"button",9),_("click",function(){return p(s),m(n.selectTab(n.scanState.InProgress))}),a(17," In Progress "),i()(),e(18,"li",8)(19,"button",9),_("click",function(){return p(s),m(n.selectTab(n.scanState.Completed))}),a(20," Completed "),i()(),e(21,"li",8)(22,"button",9),_("click",function(){return p(s),m(n.selectTab(n.scanState.Failed))}),a(23," Failed "),i()(),e(24,"li",10)(25,"button",9),_("click",function(){return p(s),m(n.selectTab(null))}),a(26," All "),i()()(),e(27,"table",11)(28,"thead",12)(29,"tr",13)(30,"th",14),a(31,"Job ID"),i(),e(32,"th"),a(33,"Channel"),i(),e(34,"th"),a(35,"Process"),i(),e(36,"th"),a(37,"Duration"),i(),e(38,"th"),a(39,"Status"),i(),e(40,"th"),a(41,"Creator"),i()()(),e(42,"tbody"),I(43,wt,26,27,"tr",15,A),i()()()()(),e(45,"div",4)(46,"div",16)(47,"app-custom-paginator",17),_("next",function(){return p(s),m(n.initNotifications())})("previous",function(){return p(s),m(n.initNotifications())}),i()()()()()()}if(r&2){let s=P(1,10,n.notifications$);l(2),u("hideSearchBox",!0),l(5);let d=K(n.filter());l(),J("ngModel",d.ChannelID),l(8),u("ngClass",S(13,mt,n.pillState()===n.scanState.InProgress,n.pillState()!==n.scanState.InProgress)),l(3),u("ngClass",S(16,ut,n.pillState()===n.scanState.Completed,n.pillState()!==n.scanState.Completed)),l(3),u("ngClass",S(19,_t,n.pillState()===n.scanState.Failed,n.pillState()!==n.scanState.Failed)),l(3),u("ngClass",S(22,ft,n.pillState()===null,n.pillState()!==null)),l(18),y(s==null?null:s.Data),l(4),u("filter",n.filter())("totaldata",s==null||s.Data==null?null:s.Data.length)("paginationTotal",s==null?null:s.Count)("hasClicked",!0)}},dependencies:[rt,ot,lt,ct,st,at,nt,dt,Z,tt,et,it],encapsulation:2,changeDetection:0})}}return t})();export{zt as NotificationV2Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as oe}from"./chunk-4IQELTZB.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as ee}from"./chunk-7KG3DC5J.js";import{a as ie}from"./chunk-ZA4X34GE.js";import{a as te}from"./chunk-IFFI5CMD.js";import{a as ne}from"./chunk-OJ4GCASY.js";import{a as Y}from"./chunk-C27KH5ST.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-TUPMDQZE.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{b as X}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import{a as Q}from"./chunk-MWUZF6ZW.js";import"./chunk-2VWSIT3Y.js";import{b as J}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-TZYQY7DN.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import{c as y}from"./chunk-NNVT5X6O.js";import{A as T,h as A,m as K}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{e as H}from"./chunk-M5YUVUTR.js";import{e as q}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{D as G,L as W}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Eb as D,Ga as x,Lc as L,Oc as m,Pc as E,Qc as F,Rc as O,Sc as B,Tc as U,Uc as j,Vc as Z,Wc as $,Xb as I,Xc as z,bc as u,dc as g,ec as V,fc as P,gc as b,hc as S,ic as p,jc as a,kb as k,kc as r,kd as N,lc as s,ld as R,mb as o,na as v,sc as M,ua as C,va as _,wd as f,xc as w,zc as c}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function le(n,l){if(n&1){let e=M();a(0,"img",15),w("click",function(i){C(e);let d=c();return _(d.onZoomImage(i))}),r()}if(n&2){let e=c();p("ngSrc",e.image)("fill",!0)}}function de(n,l){n&1&&s(0,"img",7),n&2&&p("fill",!0)}function ce(n,l){if(n&1&&(a(0,"div",10),s(1,"i",16),a(2,"span"),m(3),r()()),n&2){let e=c();o(3),E(e.code)}}function pe(n,l){if(n&1&&(a(0,"div",11),m(1),N(2,"number"),r()),n&2){let e=c();o(),F("",R(2,1,e.totalChannel())," Listing")}}function me(n,l){if(n&1&&(a(0,"div",23),m(1),N(2,"number"),r()),n&2){c();let e=z(7);o(),F(" (",R(2,1,e)," Listing) ")}}function se(n,l){if(n&1&&(a(0,"div",27)(1,"div",28),m(2),r(),a(3,"div")(4,"a",29),s(5,"i",30),r()()()),n&2){let e=l.$implicit,t=l.$index,i=c().$implicit;L("border-bottom",t!==(i==null?null:i.Variants.length)-1),o(2),O(" ",e.ProductName," - ",e.Name," "),o(2),p("href",e.URL,k)}}function ue(n,l){if(n&1&&(a(0,"div",17)(1,"h2",18)(2,"button",19)(3,"div",20),s(4,"img",21),a(5,"span",22),m(6),r(),Z(7),u(8,me,3,3,"div",23),r()()(),a(9,"div",24)(10,"div",25),b(11,se,6,5,"div",26,V),r()()()),n&2){let e,t=l.$implicit,i=l.$index,d=c();L("border-bottom-0",d.channels().length-1==i),o(),p("id","heading"+i+d.id()),o(),I("data-bs-target","#collapse"+i+d.id())("aria-controls","#collapse"+i+d.id()),o(2),p("src",d.getChannelLogo(t.TypeID),k),o(),p("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t==null?null:t.ChannelName:""),o(),E(t==null?null:t.ChannelName),o();let h=$(t==null||t.Variants==null?null:t.Variants.length);o(),g(h>1&&((e=d.channels())==null?null:e.length)>1?8:-1),o(),p("id","collapse"+i+d.id()),I("aria-labelledby","heading"+i+d.id()),o(2),S(t==null?null:t.Variants)}}var ae=(()=>{class n{constructor(){this.biggerPictureService=v(te),this.totalChannel=f(0),this.imageForZoom=f(void 0),this.title=f(void 0),this.channels=f(void 0),this.id=f(void 0)}getChannelLogo(e){return y.getChannelLogoByTypeId(e)}onZoomImage(e){this.biggerPictureService.openBiggerPicture(e,this.imageForZoom())}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=D({type:n,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",code:"code",totalChannel:[1,"totalChannel"],imageForZoom:[1,"imageForZoom"],title:[1,"title"],channels:[1,"channels"],id:[1,"id"]},decls:17,vars:4,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],[1,"description"],[1,"fs-5"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],[1,"accordion-item","border-start-0","border-end-0",3,"border-bottom-0"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"fs-4","ms-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"border-bottom"],[1,"d-flex","justify-content-between","align-items-center","py-4"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),u(6,le,1,2,"img",6)(7,de,1,1,"img",7),r()()(),a(8,"div",8)(9,"h4",9),m(10),r(),u(11,ce,4,1,"div",10),u(12,pe,3,3,"div",11),r()()(),a(13,"div",12)(14,"div",13),b(15,ue,13,12,"div",14,P),r()()()),t&2&&(o(6),g(i.image?6:7),o(4),F(" ",i.title()," "),o(),g(i.code?11:-1),o(),g(i.totalChannel()?12:-1),o(3),S(i.channels()))},dependencies:[T,Q,J,W,G],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`],changeDetection:0})}}return n})();function ge(n,l){if(n&1&&(a(0,"div",8),s(1,"app-duplicate-product-card",11),r()),n&2){let e=l.$implicit,t=l.$index;o(),p("imageForZoom",e.ImageUrl)("title",e.Name)("code",e.Code)("id",t)("image",e.ThumbnailURL)("channels",e.Channels)("totalChannel",e.Total)}}function he(n,l){n&1&&(a(0,"div",9),s(1,"app-empty-state"),r())}function Ce(n,l){if(n&1){let e=M();a(0,"div",10)(1,"div",12)(2,"app-custom-paginator",13),w("next",function(){C(e);let i=c();return _(i.getProducts())})("previous",function(){C(e);let i=c();return _(i.getProducts())})("total",function(){C(e);let i=c();return _(i.getRowCount())}),r()()()}if(n&2){let e,t=c();o(2),p("filter",t.searchFilter)("totaldata",(e=t.products())==null?null:e.length)("paginationTotal",t.rowCount())("hasClicked",t.hasClickedRowCount())}}var Ge=(()=>{class n{constructor(){this.httpService=v(H),this.productService=v(Y),this.searchFilter=x(new ee),this.products=x([]),this.rowCount=x(0),this.hasClickedRowCount=x(!1),this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter.set(e.Filter),this.searchFilter.update(t=>(t.PageSize=e.Filter.RowCount,t)),this.getProducts()})}getProducts(){let e={ListChannelID:this.searchFilter().ListChannelID,RowCount:this.searchFilter().RowCount,PageNumber:this.searchFilter().PageNumber,text:this.searchFilter().text};this.httpService.post("/api/product/GetDuplicateInChannel",e).subscribe(t=>{this.products.set(t.Data)})}onSearch(e){this.searchFilter.update(t=>(t.text=e,t)),this.hasClickedRowCount.set(!1),this.getProducts()}onClearFilter(){this.searchFilter.update(e=>(e.ChannelID=y.GuidEMpty,e))}getChannelLogo(e){return y.getChannelLogoByTypeId(e)}getRowCount(){let e={text:this.searchFilter().text,ChannelID:this.searchFilter().ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",e).subscribe(t=>{this.hasClickedRowCount.set(!0),this.rowCount.set(t.Total)})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=D({type:n,selectors:[["app-duplicate-sku"]],decls:19,vars:4,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[3,"imageForZoom","title","code","id","image","channels","totalChannel"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(t,i){if(t&1&&(a(0,"mainpanel",0),w("onSubmit",function(h){return i.onSearch(h)}),a(1,"actions")(2,"a",1),s(3,"i",2),a(4,"span"),m(5,"Table View"),r()()(),a(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),m(10,"Channel"),r(),a(11,"app-channel-options-v2",5),j("ngModelChange",function(h){return U(i.searchFilter().ListChannelID,h)||(i.searchFilter().ListChannelID=h),h}),r()()()(),a(12,"content")(13,"div",6)(14,"div",7),b(15,ge,2,7,"div",8,P),u(17,he,2,0,"div",9),r(),u(18,Ce,3,4,"div",10),r()()()),t&2){let d;o(11),p("multiple",!0),B("ngModel",i.searchFilter().ListChannelID),o(4),S(i.products()),o(2),g(i.products().length==0?17:-1),o(),g(((d=i.products())==null?null:d.length)>0?18:-1)}},dependencies:[X,q,oe,T,A,K,ae,ne,ie],encapsulation:2,changeDetection:0})}}return n})();export{Ge as DuplicateSkuComponent};
|
|
1
|
+
import{a as oe}from"./chunk-7LJVQ3PR.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as ee}from"./chunk-7KG3DC5J.js";import{a as ie}from"./chunk-ZA4X34GE.js";import{a as te}from"./chunk-IFFI5CMD.js";import{a as ne}from"./chunk-OJ4GCASY.js";import{a as Y}from"./chunk-7OE6AKRK.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-Z5X6KXNK.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{b as X}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import{a as Q}from"./chunk-MWUZF6ZW.js";import"./chunk-2VWSIT3Y.js";import{b as J}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-ZFJRIOOO.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import{c as y}from"./chunk-NNVT5X6O.js";import{A as T,h as A,m as K}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{e as H}from"./chunk-M5YUVUTR.js";import{e as q}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{D as G,L as W}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Eb as D,Ga as x,Lc as L,Oc as m,Pc as E,Qc as F,Rc as O,Sc as B,Tc as U,Uc as j,Vc as Z,Wc as $,Xb as I,Xc as z,bc as u,dc as g,ec as V,fc as P,gc as b,hc as S,ic as p,jc as a,kb as k,kc as r,kd as N,lc as s,ld as R,mb as o,na as v,sc as M,ua as C,va as _,wd as f,xc as w,zc as c}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function le(n,l){if(n&1){let e=M();a(0,"img",15),w("click",function(i){C(e);let d=c();return _(d.onZoomImage(i))}),r()}if(n&2){let e=c();p("ngSrc",e.image)("fill",!0)}}function de(n,l){n&1&&s(0,"img",7),n&2&&p("fill",!0)}function ce(n,l){if(n&1&&(a(0,"div",10),s(1,"i",16),a(2,"span"),m(3),r()()),n&2){let e=c();o(3),E(e.code)}}function pe(n,l){if(n&1&&(a(0,"div",11),m(1),N(2,"number"),r()),n&2){let e=c();o(),F("",R(2,1,e.totalChannel())," Listing")}}function me(n,l){if(n&1&&(a(0,"div",23),m(1),N(2,"number"),r()),n&2){c();let e=z(7);o(),F(" (",R(2,1,e)," Listing) ")}}function se(n,l){if(n&1&&(a(0,"div",27)(1,"div",28),m(2),r(),a(3,"div")(4,"a",29),s(5,"i",30),r()()()),n&2){let e=l.$implicit,t=l.$index,i=c().$implicit;L("border-bottom",t!==(i==null?null:i.Variants.length)-1),o(2),O(" ",e.ProductName," - ",e.Name," "),o(2),p("href",e.URL,k)}}function ue(n,l){if(n&1&&(a(0,"div",17)(1,"h2",18)(2,"button",19)(3,"div",20),s(4,"img",21),a(5,"span",22),m(6),r(),Z(7),u(8,me,3,3,"div",23),r()()(),a(9,"div",24)(10,"div",25),b(11,se,6,5,"div",26,V),r()()()),n&2){let e,t=l.$implicit,i=l.$index,d=c();L("border-bottom-0",d.channels().length-1==i),o(),p("id","heading"+i+d.id()),o(),I("data-bs-target","#collapse"+i+d.id())("aria-controls","#collapse"+i+d.id()),o(2),p("src",d.getChannelLogo(t.TypeID),k),o(),p("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t==null?null:t.ChannelName:""),o(),E(t==null?null:t.ChannelName),o();let h=$(t==null||t.Variants==null?null:t.Variants.length);o(),g(h>1&&((e=d.channels())==null?null:e.length)>1?8:-1),o(),p("id","collapse"+i+d.id()),I("aria-labelledby","heading"+i+d.id()),o(2),S(t==null?null:t.Variants)}}var ae=(()=>{class n{constructor(){this.biggerPictureService=v(te),this.totalChannel=f(0),this.imageForZoom=f(void 0),this.title=f(void 0),this.channels=f(void 0),this.id=f(void 0)}getChannelLogo(e){return y.getChannelLogoByTypeId(e)}onZoomImage(e){this.biggerPictureService.openBiggerPicture(e,this.imageForZoom())}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=D({type:n,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",code:"code",totalChannel:[1,"totalChannel"],imageForZoom:[1,"imageForZoom"],title:[1,"title"],channels:[1,"channels"],id:[1,"id"]},decls:17,vars:4,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],[1,"description"],[1,"fs-5"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],[1,"accordion-item","border-start-0","border-end-0",3,"border-bottom-0"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"fs-4","ms-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"border-bottom"],[1,"d-flex","justify-content-between","align-items-center","py-4"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),u(6,le,1,2,"img",6)(7,de,1,1,"img",7),r()()(),a(8,"div",8)(9,"h4",9),m(10),r(),u(11,ce,4,1,"div",10),u(12,pe,3,3,"div",11),r()()(),a(13,"div",12)(14,"div",13),b(15,ue,13,12,"div",14,P),r()()()),t&2&&(o(6),g(i.image?6:7),o(4),F(" ",i.title()," "),o(),g(i.code?11:-1),o(),g(i.totalChannel()?12:-1),o(3),S(i.channels()))},dependencies:[T,Q,J,W,G],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`],changeDetection:0})}}return n})();function ge(n,l){if(n&1&&(a(0,"div",8),s(1,"app-duplicate-product-card",11),r()),n&2){let e=l.$implicit,t=l.$index;o(),p("imageForZoom",e.ImageUrl)("title",e.Name)("code",e.Code)("id",t)("image",e.ThumbnailURL)("channels",e.Channels)("totalChannel",e.Total)}}function he(n,l){n&1&&(a(0,"div",9),s(1,"app-empty-state"),r())}function Ce(n,l){if(n&1){let e=M();a(0,"div",10)(1,"div",12)(2,"app-custom-paginator",13),w("next",function(){C(e);let i=c();return _(i.getProducts())})("previous",function(){C(e);let i=c();return _(i.getProducts())})("total",function(){C(e);let i=c();return _(i.getRowCount())}),r()()()}if(n&2){let e,t=c();o(2),p("filter",t.searchFilter)("totaldata",(e=t.products())==null?null:e.length)("paginationTotal",t.rowCount())("hasClicked",t.hasClickedRowCount())}}var Ge=(()=>{class n{constructor(){this.httpService=v(H),this.productService=v(Y),this.searchFilter=x(new ee),this.products=x([]),this.rowCount=x(0),this.hasClickedRowCount=x(!1),this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter.set(e.Filter),this.searchFilter.update(t=>(t.PageSize=e.Filter.RowCount,t)),this.getProducts()})}getProducts(){let e={ListChannelID:this.searchFilter().ListChannelID,RowCount:this.searchFilter().RowCount,PageNumber:this.searchFilter().PageNumber,text:this.searchFilter().text};this.httpService.post("/api/product/GetDuplicateInChannel",e).subscribe(t=>{this.products.set(t.Data)})}onSearch(e){this.searchFilter.update(t=>(t.text=e,t)),this.hasClickedRowCount.set(!1),this.getProducts()}onClearFilter(){this.searchFilter.update(e=>(e.ChannelID=y.GuidEMpty,e))}getChannelLogo(e){return y.getChannelLogoByTypeId(e)}getRowCount(){let e={text:this.searchFilter().text,ChannelID:this.searchFilter().ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",e).subscribe(t=>{this.hasClickedRowCount.set(!0),this.rowCount.set(t.Total)})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=D({type:n,selectors:[["app-duplicate-sku"]],decls:19,vars:4,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[3,"imageForZoom","title","code","id","image","channels","totalChannel"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(t,i){if(t&1&&(a(0,"mainpanel",0),w("onSubmit",function(h){return i.onSearch(h)}),a(1,"actions")(2,"a",1),s(3,"i",2),a(4,"span"),m(5,"Table View"),r()()(),a(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),m(10,"Channel"),r(),a(11,"app-channel-options-v2",5),j("ngModelChange",function(h){return U(i.searchFilter().ListChannelID,h)||(i.searchFilter().ListChannelID=h),h}),r()()()(),a(12,"content")(13,"div",6)(14,"div",7),b(15,ge,2,7,"div",8,P),u(17,he,2,0,"div",9),r(),u(18,Ce,3,4,"div",10),r()()()),t&2){let d;o(11),p("multiple",!0),B("ngModel",i.searchFilter().ListChannelID),o(4),S(i.products()),o(2),g(i.products().length==0?17:-1),o(),g(((d=i.products())==null?null:d.length)>0?18:-1)}},dependencies:[X,q,oe,T,A,K,ae,ne,ie],encapsulation:2,changeDetection:0})}}return n})();export{Ge as DuplicateSkuComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ne,b as Fe}from"./chunk-Y7VFQ376.js";import{a as Pe,b as De,c as Ae}from"./chunk-CKU644YK.js";import{a as Ve}from"./chunk-ZPJ725MO.js";import{a as B}from"./chunk-HDI4BETR.js";import{a as Ee}from"./chunk-4MYXPN55.js";import{a as Me,b as Le}from"./chunk-ES53NVZX.js";import"./chunk-LCIOJHJ4.js";import"./chunk-FDYHLFQ3.js";import{a as Te}from"./chunk-4IQELTZB.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as ke}from"./chunk-ZA4X34GE.js";import"./chunk-IFFI5CMD.js";import{a as ye}from"./chunk-OJ4GCASY.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import"./chunk-TRTDBHQI.js";import{b as xe}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import{a as _e,c as be,e as Se,f as we,g as ve}from"./chunk-M65GNQVQ.js";import{a as Ce}from"./chunk-MWUZF6ZW.js";import"./chunk-GF2RVIIT.js";import"./chunk-ITKXL7DT.js";import"./chunk-4AL6NJY5.js";import"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-F7RHG53H.js";import"./chunk-X22WXNSF.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import"./chunk-2VWSIT3Y.js";import"./chunk-2PONPJQD.js";import{b as fe}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-TZYQY7DN.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import{a as S}from"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import{b as c,c as E}from"./chunk-NNVT5X6O.js";import{A as z,b as ue,c as he,h as W,m as R,o as ge}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{b as M,e as O}from"./chunk-M5YUVUTR.js";import"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as me,D as de,z as ce}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as ae,Dc as ee,E as K,Eb as N,Ec as te,Fc as ie,Ga as L,Nc as ne,Oc as s,Pc as P,Qc as D,Sc as w,Tc as v,Uc as x,V as G,Vc as oe,Wc as re,Xc as F,Y as J,bc as y,bd as le,dc as k,ec as Y,gc as Z,hc as $,ia as V,ic as _,jc as n,kb as X,kc as r,kd as A,lc as f,ld as I,mb as p,md as pe,na as g,sc as T,sd as se,t as q,ua as d,va as u,xc as C,zc as h}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as U,b as Q}from"./chunk-66YHNWRR.js";var Ie=(()=>{class o{constructor(){this.http=g(O),this.toastr=g(M)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(S.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.ShopeePrintShippingLabel,i).pipe(q(a=>(a&&(a.Number=e),a)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case c.Tokopedia:let m=window.open("about:blank","_blank");m.document.write(e.File),m.document.close();break;case c.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 c.Shopee:var i=Uint8Array.from(atob(e.File),l=>l.charCodeAt(0)),a=new Blob([i],{type:"octet/stream"});E.openDownloadFile(a,`${e?.Number}.pdf`);break;case c.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=V({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Oe=(()=>{class o{constructor(){this.dialogRef=g(_e),this.tandaiSudahDicetak=L(!1)}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak()?1:0)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=N({type:o,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(n(0,"div",0)(1,"h2",1),s(2,"Cetak label pesanan"),r(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),s(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),n(8,"div",5)(9,"mat-checkbox",6),C("ngModelChange",function(m){return i.tandaiSudahDicetak.set(m)}),r(),n(10,"span",7),s(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),C("click",function(){return i.onCancel()}),s(14,"Cancel"),r(),n(15,"button",10),C("click",function(){return i.onPrint()}),s(16,"Cetak Pesanan"),r()()()),t&2&&(p(9),_("ngModel",i.tandaiSudahDicetak()))},dependencies:[z,W,R,ve,we,Se,Le,Me],encapsulation:2,changeDetection:0})}}return o})();var H=(()=>{class o{constructor(){this.httpService=g(O),this.shippingLabelService=g(Ie),this.toastrService=g(M),this.dialog=g(be)}printShippingLabel(e){switch(e?.MarketType){case c.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Shopee));break;case c.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Tiktok));break;case c.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(K(t=>E.IsNotEmpty(t)),J(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Tokopedia));break;case c.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Lazada));break;case c.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(a=>({OrderNumber:a.Number,ShopID:a.ShopID})),i="";switch(e[0]?.MarketType){case c.Shopee:i=S.ShopeePrintMultipleShippingLabel;break;case c.Tiktok:i=S.TiktokPrintMultipleShippingLabel;break;case c.Lazada:i=S.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(a=>{var m=Uint8Array.from(atob(a.File),We=>We.charCodeAt(0)),l=new Blob([m],{type:"octet/stream"});E.openDownloadFile(l,`${a?.Name}.pdf`)})}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=V({token:o,factory:o.\u0275fac})}}return o})();var ze=["contextMenu"],Be=o=>({"td-cell-hover":o});function je(o,b){if(o&1){let e=T();n(0,"button",20),C("click",function(){d(e);let i=h(),a=F(0);return u(i.onDowloadShippingLabel(a))}),f(1,"i",21),n(2,"span"),s(3,"Download Shipping Label"),r()()}}function He(o,b){if(o&1){let e=T();n(0,"input",47),x("ngModelChange",function(i){d(e);let a=h().$implicit;return v(a.selected,i)||(a.selected=i),u(i)}),C("ngModelChange",function(){d(e);let i=h(3),a=F(0);return u(i.onSelectOrders(a))}),r()}if(o&2){let e=h().$implicit,t=h(2);w("ngModel",e.selected),_("disabled",t.selectedChannelType()!=null&&t.selectedChannelType()!=e.MarketType)}}function Ue(o,b){if(o&1&&f(0,"variants-dropdown",39),o&2){let e=h().$implicit;_("variants",e==null?null:e.Variants)}}function Qe(o,b){if(o&1&&f(0,"variant-with-image",40),o&2){let e=h().$implicit;_("variant",e==null?null:e.Variants[0])}}function qe(o,b){if(o&1&&(n(0,"span"),s(1),r()),o&2){let e=h().$implicit;p(),D("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Ke(o,b){if(o&1){let e=T();n(0,"button",48),C("click",function(){d(e);let i=h().$implicit,a=h(2);return u(a.onPrintShippingLabel(i))}),f(1,"i",49),r()}}function Ge(o,b){if(o&1){let e=T();n(0,"tr")(1,"td"),y(2,He,1,2,"input",31),r(),n(3,"td")(4,"div",32),f(5,"img",33),A(6,"channelImage"),n(7,"div",34)(8,"div"),s(9),r(),n(10,"small",35)(11,"span"),s(12),r()()()()(),n(13,"td")(14,"div",36)(15,"div"),f(16,"order-link",37),r(),n(17,"small"),s(18),A(19,"date"),r(),f(20,"br"),n(21,"small"),f(22,"i",38),s(23),r()()(),n(24,"td"),y(25,Ue,1,1,"variants-dropdown",39)(26,Qe,1,1,"variant-with-image",40),r(),n(27,"td",41),s(28),A(29,"number"),r(),n(30,"td",42),C("mouseenter",function(i){let a=d(e).$implicit,m=h(2);return u(m.onMouseEnter(i,a))}),n(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),s(35),r(),y(36,qe,2,1,"span"),r(),n(37,"small"),s(38),r()()()(),n(39,"td",45),y(40,Ke,2,0,"button",46),r()()}if(o&2){let e=b.$implicit,t=h(2);p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?2:-1),p(3),_("src",I(6,16,e==null?null:e.MarketType),X)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(4),P(e.Outlet),p(3),P(e.ChannelName),p(4),_("order",e),p(2),D(" ",pe(19,18,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(5),D(" ",e.Customer," "),p(),ne(le(23,Be,(e.Variants==null?null:e.Variants.length)>1)),p(),k((e.Variants==null?null:e.Variants.length)>1?25:26),p(3),P(I(29,21,e.Amount)),p(7),P(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),k(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),p(2),D(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?40:-1)}}function Je(o,b){if(o&1){let e=T();n(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),f(4,"th",25),n(5,"th",26),s(6,"Outlet"),r(),n(7,"th",26),s(8,"Number"),r(),n(9,"th"),s(10,"Items"),r(),n(11,"th",27),s(12,"Amount"),r(),n(13,"th",28),s(14,"Shipping"),r(),f(15,"th",29),r()(),n(16,"tbody"),Z(17,Ge,41,25,"tr",null,Y),r()(),n(19,"app-custom-paginator",30),C("next",function(){d(e);let i=h();return u(i.initAwaitingCollection())})("previous",function(){d(e);let i=h();return u(i.initAwaitingCollection())}),r()()}if(o&2){let e=h(),t=F(0);p(17),$(t),p(2),_("filter",e.filter())("totaldata",t==null?null:t.length)}}function Xe(o,b){o&1&&(n(0,"div",18),f(1,"app-empty-state"),r())}var Zt=(()=>{class o{constructor(){this.printShippingService=g(H),this.orderService=g(B),this.toastr=g(M),this.fulfillmentService=g(Ne),this.channelType=c,this.selectedOrders=L([]),this.selectedChannelType=se(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=L({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(U({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(G(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=N({type:o,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&ee(ze,5),t&2){let a;te(a=ie())&&(i.contextMenuEl=a.first)}},features:[ae([B,H])],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 a=T();oe(0),A(1,"async"),n(2,"mainpanel",1),C("onSubmit",function(){return d(a),u(i.initAwaitingCollection())}),x("textChange",function(l){return d(a),v(i.filter().Number,l)||(i.filter().Number=l),u(l)}),n(3,"actions"),y(4,je,4,0,"button",2),n(5,"a",3),f(6,"i",4),n(7,"span"),s(8,"Order Fulfillment Display"),r()()(),n(9,"filters")(10,"div")(11,"label",5),s(12,"Channel"),r(),n(13,"app-channel-options-v2",6),x("ngModelChange",function(l){return d(a),v(i.filter().ListChannelID,l)||(i.filter().ListChannelID=l),u(l)}),r()(),n(14,"div",7)(15,"label",5),s(16,"From/To"),r(),n(17,"div",8)(18,"datepicker",9),x("dateChange",function(l){return d(a),v(i.filter().From,l)||(i.filter().From=l),u(l)}),r()(),n(19,"div")(20,"datepicker",10),x("dateChange",function(l){return d(a),v(i.filter().To,l)||(i.filter().To=l),u(l)}),r()()(),n(21,"div",7)(22,"label",11),s(23,"Page Number"),r(),n(24,"input",12),x("ngModelChange",function(l){return d(a),v(i.filter().PageNumber,l)||(i.filter().PageNumber=l),u(l)}),r()(),n(25,"div",7)(26,"label",11),s(27,"Page Size"),r(),n(28,"input",13),x("ngModelChange",function(l){return d(a),v(i.filter().PageSize,l)||(i.filter().PageSize=l),u(l)}),r()()(),n(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),y(33,Je,20,2,"div",17)(34,Xe,2,0,"div",18),r()()()()(),n(35,"app-context-menu",19,0),C("onSelectItem",function(l){return d(a),u(i.onSelectContextItem(l))}),r()}if(t&2){let a=re(I(1,10,i.awaitingCollections$));p(2),w("text",i.filter().Number),p(2),k(i.selectedOrders().length>0?4:-1),p(9),_("multiple",!0),w("ngModel",i.filter().ListChannelID),p(5),w("date",i.filter().From),p(2),w("date",i.filter().To),p(4),w("ngModel",i.filter().PageNumber),p(4),w("ngModel",i.filter().PageSize),p(5),k((a==null?null:a.length)>0?33:34),p(2),_("items",i.contextMenuItems)}},dependencies:[xe,ye,ke,z,he,ge,ue,W,R,De,Ae,Ee,Ce,fe,Ve,Fe,Te,Pe,ce,me,de],encapsulation:2,changeDetection:0})}}return o})();export{Zt as AwaitingCollectionComponent};
|
|
1
|
+
import{a as Ne,b as Fe}from"./chunk-Y7VFQ376.js";import{a as Pe,b as De,c as Ae}from"./chunk-CKU644YK.js";import{a as Ve}from"./chunk-A3ITOAAM.js";import{a as B}from"./chunk-HDI4BETR.js";import{a as Ee}from"./chunk-4MYXPN55.js";import{a as Me,b as Le}from"./chunk-ES53NVZX.js";import"./chunk-LCIOJHJ4.js";import"./chunk-FDYHLFQ3.js";import{a as Te}from"./chunk-7LJVQ3PR.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as ke}from"./chunk-ZA4X34GE.js";import"./chunk-IFFI5CMD.js";import{a as ye}from"./chunk-OJ4GCASY.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import"./chunk-TRTDBHQI.js";import{b as xe}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import{a as _e,c as be,e as Se,f as we,g as ve}from"./chunk-M65GNQVQ.js";import{a as Ce}from"./chunk-MWUZF6ZW.js";import"./chunk-GF2RVIIT.js";import"./chunk-ITKXL7DT.js";import"./chunk-4AL6NJY5.js";import"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-F7RHG53H.js";import"./chunk-X22WXNSF.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import"./chunk-2VWSIT3Y.js";import"./chunk-2PONPJQD.js";import{b as fe}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-ZFJRIOOO.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import{a as S}from"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import{b as c,c as E}from"./chunk-NNVT5X6O.js";import{A as z,b as ue,c as he,h as W,m as R,o as ge}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{b as M,e as O}from"./chunk-M5YUVUTR.js";import"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as me,D as de,z as ce}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as ae,Dc as ee,E as K,Eb as N,Ec as te,Fc as ie,Ga as L,Nc as ne,Oc as s,Pc as P,Qc as D,Sc as w,Tc as v,Uc as x,V as G,Vc as oe,Wc as re,Xc as F,Y as J,bc as y,bd as le,dc as k,ec as Y,gc as Z,hc as $,ia as V,ic as _,jc as n,kb as X,kc as r,kd as A,lc as f,ld as I,mb as p,md as pe,na as g,sc as T,sd as se,t as q,ua as d,va as u,xc as C,zc as h}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as U,b as Q}from"./chunk-66YHNWRR.js";var Ie=(()=>{class o{constructor(){this.http=g(O),this.toastr=g(M)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(S.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.ShopeePrintShippingLabel,i).pipe(q(a=>(a&&(a.Number=e),a)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case c.Tokopedia:let m=window.open("about:blank","_blank");m.document.write(e.File),m.document.close();break;case c.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 c.Shopee:var i=Uint8Array.from(atob(e.File),l=>l.charCodeAt(0)),a=new Blob([i],{type:"octet/stream"});E.openDownloadFile(a,`${e?.Number}.pdf`);break;case c.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=V({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Oe=(()=>{class o{constructor(){this.dialogRef=g(_e),this.tandaiSudahDicetak=L(!1)}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak()?1:0)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=N({type:o,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(n(0,"div",0)(1,"h2",1),s(2,"Cetak label pesanan"),r(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),s(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),n(8,"div",5)(9,"mat-checkbox",6),C("ngModelChange",function(m){return i.tandaiSudahDicetak.set(m)}),r(),n(10,"span",7),s(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),C("click",function(){return i.onCancel()}),s(14,"Cancel"),r(),n(15,"button",10),C("click",function(){return i.onPrint()}),s(16,"Cetak Pesanan"),r()()()),t&2&&(p(9),_("ngModel",i.tandaiSudahDicetak()))},dependencies:[z,W,R,ve,we,Se,Le,Me],encapsulation:2,changeDetection:0})}}return o})();var H=(()=>{class o{constructor(){this.httpService=g(O),this.shippingLabelService=g(Ie),this.toastrService=g(M),this.dialog=g(be)}printShippingLabel(e){switch(e?.MarketType){case c.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Shopee));break;case c.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Tiktok));break;case c.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(K(t=>E.IsNotEmpty(t)),J(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Tokopedia));break;case c.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Lazada));break;case c.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(a=>({OrderNumber:a.Number,ShopID:a.ShopID})),i="";switch(e[0]?.MarketType){case c.Shopee:i=S.ShopeePrintMultipleShippingLabel;break;case c.Tiktok:i=S.TiktokPrintMultipleShippingLabel;break;case c.Lazada:i=S.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(a=>{var m=Uint8Array.from(atob(a.File),We=>We.charCodeAt(0)),l=new Blob([m],{type:"octet/stream"});E.openDownloadFile(l,`${a?.Name}.pdf`)})}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=V({token:o,factory:o.\u0275fac})}}return o})();var ze=["contextMenu"],Be=o=>({"td-cell-hover":o});function je(o,b){if(o&1){let e=T();n(0,"button",20),C("click",function(){d(e);let i=h(),a=F(0);return u(i.onDowloadShippingLabel(a))}),f(1,"i",21),n(2,"span"),s(3,"Download Shipping Label"),r()()}}function He(o,b){if(o&1){let e=T();n(0,"input",47),x("ngModelChange",function(i){d(e);let a=h().$implicit;return v(a.selected,i)||(a.selected=i),u(i)}),C("ngModelChange",function(){d(e);let i=h(3),a=F(0);return u(i.onSelectOrders(a))}),r()}if(o&2){let e=h().$implicit,t=h(2);w("ngModel",e.selected),_("disabled",t.selectedChannelType()!=null&&t.selectedChannelType()!=e.MarketType)}}function Ue(o,b){if(o&1&&f(0,"variants-dropdown",39),o&2){let e=h().$implicit;_("variants",e==null?null:e.Variants)}}function Qe(o,b){if(o&1&&f(0,"variant-with-image",40),o&2){let e=h().$implicit;_("variant",e==null?null:e.Variants[0])}}function qe(o,b){if(o&1&&(n(0,"span"),s(1),r()),o&2){let e=h().$implicit;p(),D("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Ke(o,b){if(o&1){let e=T();n(0,"button",48),C("click",function(){d(e);let i=h().$implicit,a=h(2);return u(a.onPrintShippingLabel(i))}),f(1,"i",49),r()}}function Ge(o,b){if(o&1){let e=T();n(0,"tr")(1,"td"),y(2,He,1,2,"input",31),r(),n(3,"td")(4,"div",32),f(5,"img",33),A(6,"channelImage"),n(7,"div",34)(8,"div"),s(9),r(),n(10,"small",35)(11,"span"),s(12),r()()()()(),n(13,"td")(14,"div",36)(15,"div"),f(16,"order-link",37),r(),n(17,"small"),s(18),A(19,"date"),r(),f(20,"br"),n(21,"small"),f(22,"i",38),s(23),r()()(),n(24,"td"),y(25,Ue,1,1,"variants-dropdown",39)(26,Qe,1,1,"variant-with-image",40),r(),n(27,"td",41),s(28),A(29,"number"),r(),n(30,"td",42),C("mouseenter",function(i){let a=d(e).$implicit,m=h(2);return u(m.onMouseEnter(i,a))}),n(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),s(35),r(),y(36,qe,2,1,"span"),r(),n(37,"small"),s(38),r()()()(),n(39,"td",45),y(40,Ke,2,0,"button",46),r()()}if(o&2){let e=b.$implicit,t=h(2);p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?2:-1),p(3),_("src",I(6,16,e==null?null:e.MarketType),X)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(4),P(e.Outlet),p(3),P(e.ChannelName),p(4),_("order",e),p(2),D(" ",pe(19,18,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(5),D(" ",e.Customer," "),p(),ne(le(23,Be,(e.Variants==null?null:e.Variants.length)>1)),p(),k((e.Variants==null?null:e.Variants.length)>1?25:26),p(3),P(I(29,21,e.Amount)),p(7),P(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),k(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),p(2),D(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?40:-1)}}function Je(o,b){if(o&1){let e=T();n(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),f(4,"th",25),n(5,"th",26),s(6,"Outlet"),r(),n(7,"th",26),s(8,"Number"),r(),n(9,"th"),s(10,"Items"),r(),n(11,"th",27),s(12,"Amount"),r(),n(13,"th",28),s(14,"Shipping"),r(),f(15,"th",29),r()(),n(16,"tbody"),Z(17,Ge,41,25,"tr",null,Y),r()(),n(19,"app-custom-paginator",30),C("next",function(){d(e);let i=h();return u(i.initAwaitingCollection())})("previous",function(){d(e);let i=h();return u(i.initAwaitingCollection())}),r()()}if(o&2){let e=h(),t=F(0);p(17),$(t),p(2),_("filter",e.filter())("totaldata",t==null?null:t.length)}}function Xe(o,b){o&1&&(n(0,"div",18),f(1,"app-empty-state"),r())}var Zt=(()=>{class o{constructor(){this.printShippingService=g(H),this.orderService=g(B),this.toastr=g(M),this.fulfillmentService=g(Ne),this.channelType=c,this.selectedOrders=L([]),this.selectedChannelType=se(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=L({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(U({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(G(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=N({type:o,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&ee(ze,5),t&2){let a;te(a=ie())&&(i.contextMenuEl=a.first)}},features:[ae([B,H])],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 a=T();oe(0),A(1,"async"),n(2,"mainpanel",1),C("onSubmit",function(){return d(a),u(i.initAwaitingCollection())}),x("textChange",function(l){return d(a),v(i.filter().Number,l)||(i.filter().Number=l),u(l)}),n(3,"actions"),y(4,je,4,0,"button",2),n(5,"a",3),f(6,"i",4),n(7,"span"),s(8,"Order Fulfillment Display"),r()()(),n(9,"filters")(10,"div")(11,"label",5),s(12,"Channel"),r(),n(13,"app-channel-options-v2",6),x("ngModelChange",function(l){return d(a),v(i.filter().ListChannelID,l)||(i.filter().ListChannelID=l),u(l)}),r()(),n(14,"div",7)(15,"label",5),s(16,"From/To"),r(),n(17,"div",8)(18,"datepicker",9),x("dateChange",function(l){return d(a),v(i.filter().From,l)||(i.filter().From=l),u(l)}),r()(),n(19,"div")(20,"datepicker",10),x("dateChange",function(l){return d(a),v(i.filter().To,l)||(i.filter().To=l),u(l)}),r()()(),n(21,"div",7)(22,"label",11),s(23,"Page Number"),r(),n(24,"input",12),x("ngModelChange",function(l){return d(a),v(i.filter().PageNumber,l)||(i.filter().PageNumber=l),u(l)}),r()(),n(25,"div",7)(26,"label",11),s(27,"Page Size"),r(),n(28,"input",13),x("ngModelChange",function(l){return d(a),v(i.filter().PageSize,l)||(i.filter().PageSize=l),u(l)}),r()()(),n(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),y(33,Je,20,2,"div",17)(34,Xe,2,0,"div",18),r()()()()(),n(35,"app-context-menu",19,0),C("onSelectItem",function(l){return d(a),u(i.onSelectContextItem(l))}),r()}if(t&2){let a=re(I(1,10,i.awaitingCollections$));p(2),w("text",i.filter().Number),p(2),k(i.selectedOrders().length>0?4:-1),p(9),_("multiple",!0),w("ngModel",i.filter().ListChannelID),p(5),w("date",i.filter().From),p(2),w("date",i.filter().To),p(4),w("ngModel",i.filter().PageNumber),p(4),w("ngModel",i.filter().PageSize),p(5),k((a==null?null:a.length)>0?33:34),p(2),_("items",i.contextMenuItems)}},dependencies:[xe,ye,ke,z,he,ge,ue,W,R,De,Ae,Ee,Ce,fe,Ve,Fe,Te,Pe,ce,me,de],encapsulation:2,changeDetection:0})}}return o})();export{Zt as AwaitingCollectionComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Nt}from"./chunk-4IQELTZB.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as bt}from"./chunk-2Y5AHQAF.js";import{a as xt}from"./chunk-7KG3DC5J.js";import{a as Mt}from"./chunk-ZA4X34GE.js";import{c as Ot,d as It}from"./chunk-45IJOZB6.js";import"./chunk-4YZPQBFT.js";import"./chunk-IFFI5CMD.js";import{a as wt}from"./chunk-H4YR34LY.js";import"./chunk-PNER6GWE.js";import{a as St,b as Pt}from"./chunk-K6KO37S2.js";import"./chunk-DBO3A6IW.js";import"./chunk-CJTVOKLJ.js";import{a as vt}from"./chunk-OJ4GCASY.js";import{a as yt}from"./chunk-C27KH5ST.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-BKR7YPEW.js";import"./chunk-TUPMDQZE.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import"./chunk-TRTDBHQI.js";import{b as ft}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import{a as ht,b as ut,c as gt,i as Ct,j as _t}from"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-F7RHG53H.js";import"./chunk-X22WXNSF.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import"./chunk-2VWSIT3Y.js";import"./chunk-2PONPJQD.js";import{b as mt}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{a as K}from"./chunk-ZSUWHVKX.js";import{h as lt}from"./chunk-TZYQY7DN.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import{a as at}from"./chunk-5XPG2TEC.js";import{a as ot,b as it,c as rt}from"./chunk-I4MUFYEG.js";import{c as _}from"./chunk-NNVT5X6O.js";import{A as pt,c as st,h as ct,m as dt}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{b as tt,e as et}from"./chunk-M5YUVUTR.js";import{b as nt}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{z as X}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{E as L,Eb as I,Ga as f,Kb as G,Lc as j,Oc as g,Pc as R,Qc as q,Sc as x,Tc as b,Uc as N,Vc as U,Wc as z,Xc as v,aa as W,ad as Y,bc as D,bd as A,dc as V,ec as H,gc as T,hc as F,ic as h,jc as l,kc as c,kd as Z,lc as k,ld as Q,mb as s,na as C,pc as $,qc as J,sc as O,ua as p,va as m,xc as y,zc as u}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as P,b as w}from"./chunk-66YHNWRR.js";function Et(a,S){if(a&1&&(l(0,"tr",5)(1,"td"),g(2),c(),l(3,"td"),g(4),c()()),a&2){let t=S.$implicit;h("matTooltip",t.duplicateMessage),s(2),R(t==null?null:t.Name),s(),j("bg-gradient-warning",t.isDuplicate),s(),R(t!=null&&t.ChannelVariationSKU?t==null?null:t.ChannelVariationSKU:"Not Assigned")}}var Dt=(()=>{class a{constructor(){this.data=C(ut),this.dialogRef=C(ht),this.variants=f([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,e={},n=[],i=t.filter(r=>_.IsEmpty(r.ChannelVariationSKU));t.filter(r=>_.IsNotEmpty(r.ChannelVariationSKU)).forEach((r,o,d)=>{e[r.ChannelVariationSKU]=d.filter(M=>M.ChannelVariationSKU===r.ChannelVariationSKU)}),Object.keys(e).forEach(r=>{e[r].length>1&&(e[r]=e[r].map((o,d,M)=>{let B=`SKU ${o.ChannelVariationSKU} is duplicated with variant`;return M.forEach((E,Tt)=>{E.Name!==o.Name&&(B+=` ${M.length>2?E.Name+(Tt!==M.length-1?",":""):E.Name}`)}),o.duplicateMessage=B,o.isDuplicate=!0,o})),n.push(...e[r])}),n.push(...i),this.variants.set(n)}initModalConfig(){this.modalConfig=new Ct,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}static{this.\u0275fac=function(e){return new(e||a)}}static{this.\u0275cmp=I({type:a,selectors:[["app-modal-variants"]],decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,n){e&1&&(l(0,"modal-material",0),y("onCancel",function(){return n.dialogRef.close()}),l(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),g(6,"Variant"),c(),l(7,"th",4),g(8,"SKU"),c()()(),l(9,"tbody"),T(10,Et,5,5,"tr",5,H),c()()()()),e&2&&(h("config",n.modalConfig),s(10),F(n.variants()))},dependencies:[_t,mt],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"],changeDetection:0})}}return a})();var Vt=a=>[a],kt=()=>[],Rt=(a,S)=>S.ID;function Ut(a,S){if(a&1){let t=O();l(0,"button",16),y("click",function(){p(t);let n=u(2);return m(n.onDownloadAllProduct("SELECTED"))}),k(1,"i",17),g(2),c()}if(a&2){let t,e=u(2);s(2),q(" Download (",(t=e.productService.selectedProduct(e.products()))==null?null:t.length,") ")}}function At(a,S){if(a&1&&($(0),D(1,Ut,3,1,"button",15),J()),a&2){let t=u();s(),V(t.productService.hasSelection(t.products())?1:-1)}}function Kt(a,S){if(a&1){let t=O();l(0,"div",12)(1,"app-product-card",18),y("onCheckBoxChange",function(n){let i=p(t).$index,r=u();return m(r.onSelectProduct(n,i))})("onDescEvent",function(){let n=p(t).$index,i=u();return m(i.onShowVariantDetail(n))})("onDownload",function(){let n=p(t).$implicit,i=u();return m(i.onDownloadProduct(n))})("onScan",function(){let n=p(t).$implicit,i=u();return m(i.onScanChannel(n))}),c()()}if(a&2){let t=S.$implicit,e=u();s(),h("showRedirectIcon",!1)("title",t==null?null:t.Name)("image",t==null?null:t.Image)("imageForZoom",t==null?null:t.Image)("code",t==null?null:t.SKU)("description",(t==null||t.Variant==null?null:t.Variant.length)>0?(t==null||t.Variant==null?null:t.Variant.length)+" Variants":null)("downloadButton",!0)("channels",t!=null&&t.Channel?A(10,Vt,t==null?null:t.Channel):Y(12,kt))("showCheckBox",e.hasDownloadRole())("scanButton",!0)}}function Bt(a,S){a&1&&(l(0,"div",13),k(1,"app-empty-state"),c())}function Lt(a,S){if(a&1){let t=O();l(0,"div",14)(1,"div",19)(2,"app-custom-paginator",20),y("total",function(){p(t);let n=u();return m(n.getRowCount())})("next",function(){p(t);let n=u();return m(n.getProducts())})("previous",function(){p(t);let n=u();return m(n.getProducts())}),c()()()}if(a&2){let t,e=u();s(2),h("filter",e.searchFilter())("totaldata",(t=e.products())==null?null:t.length)("paginationTotal",e.rowCount())("hasClicked",e.hasClickRowCount())}}var Oe=(()=>{class a{constructor(){this.http=C(et),this.dialog=C(gt),this.productService=C(yt),this.toastrService=C(tt),this.activateRouter=C(nt),this.authService=C(lt),this.placeholderService=C(Ot),this.permissionService=C(ot),this.channelOptions=f([]),this.searchFilter=f(new xt),this.products=f([]),this.hasClickRowCount=f(!1),this.rowCount=f(0),this.scanProductRole=K.ProductScan,this.downloadProductRole=K.ProductDownload,this.hasDownloadRole=f(!0),this.searchPlaceholder=f("Search ..."),this.channelOptions.set(this.authService.getChannels()),this.permissionService.hasPermission(this.downloadProductRole).then(t=>{this.hasDownloadRole.set(t)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.loader$=this.productService.loader(t).pipe(W(e=>{this.searchFilter.set(e.Filter),this.searchFilter.update(n=>w(P({},n),{PageSize:e.Filter.RowCount})),this.getProducts(),this.initSearchPlaceholder()}))}initSearchPlaceholder(){let t=this.searchFilter();this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(t.SearchType,t.NumberFilterComparator))}getProducts(){let t=this.searchFilter();this.http.post("/api/product/GetProductChannelNotPOS",t).subscribe(e=>{this.products.set(e.Data),this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t=this.channelOptions(),e=this.products().map(n=>{let i=t.find(r=>r.ID==n.ChannelID);return n.Channel=i?JSON.parse(JSON.stringify(i)):null,n.Channel&&(n.Channel.Url=n.Url),n});this.products.set(e)}setSkuProduct(){let t=this.products().map(e=>(e?.Variant?.length==0?e.SKU=_.IsNotEmpty(e?.ChannelItemSKU)?e?.ChannelItemSKU:"SKU not assigned":e.SKU=e?.Variant[0]?.ChannelVariationSKU?e?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",e));this.products.set(t)}onSearch(t){this.searchFilter.update(e=>w(P({},e),{text:t})),this.hasClickRowCount.set(!1),this.getProducts(),this.initSearchPlaceholder()}onClearChannelFilter(){this.searchFilter.update(t=>w(P({},t),{ChannelID:_.GuidEMpty}))}onScanAll(){let t=this.searchFilter(),e=this.productService.findChannelById(t.ChannelID,this.channelOptions());this.productService.scanAll(t.ChannelID,t.ScanFull,t.UpdatedProduct,t.Async).subscribe(n=>{t.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(_.GuidEMpty),this.productService.successToastrScanAllProduct(n,e,!t.UpdatedProduct)),this.searchFilter.update(i=>w(P({},i),{ChannelID:_.GuidEMpty}))})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter()));t.ChannelID=_.GuidEMpty,this.dialog.open(wt,{data:{filter:t,channelOptions:this.channelOptions()},width:"600px"}).afterClosed().pipe(L(n=>_.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.update(i=>w(P({},i),{ChannelID:n.ChannelID,UpdatedProduct:n.UpdatedProduct,ScanFull:n.ScanFull,Async:n.Async})),this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products():e=this.productService.selectedProduct(this.products()),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){let n=this.products().map((i,r)=>r===e?w(P({},i),{selected:t}):i);this.products.set(n)}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(n=>{n.Status?(this.initPageLoader(_.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products()[t],n=e.Variant;n.length>0&&this.dialog.open(Dt,{data:{title:e.Name,variants:n},width:"30%"})}getRowCount(){let t=this.searchFilter(),e={ChannelID:t.ChannelID,text:t.text,HaveSku:parseInt(t.HaveSku),SearchType:t.SearchType,NumberFilterComparator:t.NumberFilterComparator};this.http.post(at.GetNotInPosRowCount,e).subscribe(n=>{this.hasClickRowCount.set(!0),this.rowCount.set(n.Count)})}static{this.\u0275fac=function(e){return new(e||a)}}static{this.\u0275cmp=I({type:a,selectors:[["app-not-in-pos"]],decls:34,vars:19,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,n){if(e&1){let i=O();U(0),Z(1,"async"),l(2,"mainpanel",0),y("onSubmit",function(o){return p(i),m(n.onSearch(o))}),l(3,"actions"),G(4,At,2,1,"ng-container",1),c(),l(5,"filters")(6,"div",2)(7,"label",3),g(8,"Channel"),c(),U(9),l(10,"app-channel-options-v2",4),N("ngModelChange",function(o){p(i);let d=v(9);return b(d.ChannelID,o)||(d.ChannelID=o),m(o)}),c()(),l(11,"div",2)(12,"label",5),g(13,"SKU Assigned"),c(),l(14,"mat-radio-group",6),N("ngModelChange",function(o){p(i);let d=v(9);return b(d.HaveSku,o)||(d.HaveSku=o),m(o)}),l(15,"mat-radio-button",7),g(16," All "),c(),l(17,"mat-radio-button",7),g(18," Yes "),c(),l(19,"mat-radio-button",7),g(20," No "),c()()(),l(21,"div",2)(22,"label",5),g(23,"Item ID"),c(),l(24,"input",8),N("ngModelChange",function(o){p(i);let d=v(9);return b(d.Item_id,o)||(d.Item_id=o),m(o)}),c()(),l(25,"div")(26,"filter-query-type",9),N("numberFilterComparatorChange",function(o){p(i);let d=v(9);return b(d.NumberFilterComparator,o)||(d.NumberFilterComparator=o),m(o)})("searchTypeChange",function(o){p(i);let d=v(9);return b(d.SearchType,o)||(d.SearchType=o),m(o)}),c()()(),l(27,"content")(28,"div",10)(29,"div",11),T(30,Kt,2,13,"div",12,Rt),D(32,Bt,2,0,"div",13),c(),D(33,Lt,3,4,"div",14),c()()()}if(e&2){let i,r=Q(1,14,n.loader$);s(2),h("searchBoxPlaceHolder",n.searchPlaceholder()),s(2),h("ngxPermissionsOnly",A(17,Vt,n.downloadProductRole)),s(5);let o=z(n.searchFilter());s(),x("ngModel",o.ChannelID),s(4),x("ngModel",o.HaveSku),s(),h("value",0),s(2),h("value",1),s(2),h("value",2),s(5),x("ngModel",o.Item_id),s(2),h("numberFilterComparatorOptions",r==null||r.Options==null?null:r.Options.SearchComparatorTypeOptions),x("numberFilterComparator",o.NumberFilterComparator),h("searchTypeOptions",r==null||r.Options==null?null:r.Options.SearchSKUOnlyOrSKUNameOptions),x("searchType",o.SearchType),s(4),F(n.products()),s(2),V(n.products().length==0?32:-1),s(),V(((i=n.products())==null?null:i.length)>0?33:-1)}},dependencies:[ft,rt,it,Nt,pt,st,ct,dt,St,Pt,It,bt,vt,Mt,X],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media(min-width:1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"],changeDetection:0})}}return a})();export{Oe as NotInPosComponent};
|
|
1
|
+
import{a as Nt}from"./chunk-7LJVQ3PR.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as bt}from"./chunk-2Y5AHQAF.js";import{a as xt}from"./chunk-7KG3DC5J.js";import{a as Mt}from"./chunk-ZA4X34GE.js";import{c as Ot,d as It}from"./chunk-45IJOZB6.js";import"./chunk-4YZPQBFT.js";import"./chunk-IFFI5CMD.js";import{a as wt}from"./chunk-H4YR34LY.js";import"./chunk-PNER6GWE.js";import{a as St,b as Pt}from"./chunk-K6KO37S2.js";import"./chunk-DBO3A6IW.js";import"./chunk-CJTVOKLJ.js";import{a as vt}from"./chunk-OJ4GCASY.js";import{a as yt}from"./chunk-7OE6AKRK.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-BKR7YPEW.js";import"./chunk-Z5X6KXNK.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import"./chunk-TRTDBHQI.js";import{b as ft}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import{a as ht,b as ut,c as gt,i as Ct,j as _t}from"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-F7RHG53H.js";import"./chunk-X22WXNSF.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import"./chunk-2VWSIT3Y.js";import"./chunk-2PONPJQD.js";import{b as mt}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{a as K}from"./chunk-ZSUWHVKX.js";import{h as lt}from"./chunk-ZFJRIOOO.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import{a as at}from"./chunk-5XPG2TEC.js";import{a as ot,b as it,c as rt}from"./chunk-I4MUFYEG.js";import{c as _}from"./chunk-NNVT5X6O.js";import{A as pt,c as st,h as ct,m as dt}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{b as tt,e as et}from"./chunk-M5YUVUTR.js";import{b as nt}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{z as X}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{E as L,Eb as I,Ga as f,Kb as G,Lc as j,Oc as g,Pc as R,Qc as q,Sc as x,Tc as b,Uc as N,Vc as U,Wc as z,Xc as v,aa as W,ad as Y,bc as D,bd as A,dc as V,ec as H,gc as T,hc as F,ic as h,jc as l,kc as c,kd as Z,lc as k,ld as Q,mb as s,na as C,pc as $,qc as J,sc as O,ua as p,va as m,xc as y,zc as u}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as P,b as w}from"./chunk-66YHNWRR.js";function Et(a,S){if(a&1&&(l(0,"tr",5)(1,"td"),g(2),c(),l(3,"td"),g(4),c()()),a&2){let t=S.$implicit;h("matTooltip",t.duplicateMessage),s(2),R(t==null?null:t.Name),s(),j("bg-gradient-warning",t.isDuplicate),s(),R(t!=null&&t.ChannelVariationSKU?t==null?null:t.ChannelVariationSKU:"Not Assigned")}}var Dt=(()=>{class a{constructor(){this.data=C(ut),this.dialogRef=C(ht),this.variants=f([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,e={},n=[],i=t.filter(r=>_.IsEmpty(r.ChannelVariationSKU));t.filter(r=>_.IsNotEmpty(r.ChannelVariationSKU)).forEach((r,o,d)=>{e[r.ChannelVariationSKU]=d.filter(M=>M.ChannelVariationSKU===r.ChannelVariationSKU)}),Object.keys(e).forEach(r=>{e[r].length>1&&(e[r]=e[r].map((o,d,M)=>{let B=`SKU ${o.ChannelVariationSKU} is duplicated with variant`;return M.forEach((E,Tt)=>{E.Name!==o.Name&&(B+=` ${M.length>2?E.Name+(Tt!==M.length-1?",":""):E.Name}`)}),o.duplicateMessage=B,o.isDuplicate=!0,o})),n.push(...e[r])}),n.push(...i),this.variants.set(n)}initModalConfig(){this.modalConfig=new Ct,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}static{this.\u0275fac=function(e){return new(e||a)}}static{this.\u0275cmp=I({type:a,selectors:[["app-modal-variants"]],decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,n){e&1&&(l(0,"modal-material",0),y("onCancel",function(){return n.dialogRef.close()}),l(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),g(6,"Variant"),c(),l(7,"th",4),g(8,"SKU"),c()()(),l(9,"tbody"),T(10,Et,5,5,"tr",5,H),c()()()()),e&2&&(h("config",n.modalConfig),s(10),F(n.variants()))},dependencies:[_t,mt],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"],changeDetection:0})}}return a})();var Vt=a=>[a],kt=()=>[],Rt=(a,S)=>S.ID;function Ut(a,S){if(a&1){let t=O();l(0,"button",16),y("click",function(){p(t);let n=u(2);return m(n.onDownloadAllProduct("SELECTED"))}),k(1,"i",17),g(2),c()}if(a&2){let t,e=u(2);s(2),q(" Download (",(t=e.productService.selectedProduct(e.products()))==null?null:t.length,") ")}}function At(a,S){if(a&1&&($(0),D(1,Ut,3,1,"button",15),J()),a&2){let t=u();s(),V(t.productService.hasSelection(t.products())?1:-1)}}function Kt(a,S){if(a&1){let t=O();l(0,"div",12)(1,"app-product-card",18),y("onCheckBoxChange",function(n){let i=p(t).$index,r=u();return m(r.onSelectProduct(n,i))})("onDescEvent",function(){let n=p(t).$index,i=u();return m(i.onShowVariantDetail(n))})("onDownload",function(){let n=p(t).$implicit,i=u();return m(i.onDownloadProduct(n))})("onScan",function(){let n=p(t).$implicit,i=u();return m(i.onScanChannel(n))}),c()()}if(a&2){let t=S.$implicit,e=u();s(),h("showRedirectIcon",!1)("title",t==null?null:t.Name)("image",t==null?null:t.Image)("imageForZoom",t==null?null:t.Image)("code",t==null?null:t.SKU)("description",(t==null||t.Variant==null?null:t.Variant.length)>0?(t==null||t.Variant==null?null:t.Variant.length)+" Variants":null)("downloadButton",!0)("channels",t!=null&&t.Channel?A(10,Vt,t==null?null:t.Channel):Y(12,kt))("showCheckBox",e.hasDownloadRole())("scanButton",!0)}}function Bt(a,S){a&1&&(l(0,"div",13),k(1,"app-empty-state"),c())}function Lt(a,S){if(a&1){let t=O();l(0,"div",14)(1,"div",19)(2,"app-custom-paginator",20),y("total",function(){p(t);let n=u();return m(n.getRowCount())})("next",function(){p(t);let n=u();return m(n.getProducts())})("previous",function(){p(t);let n=u();return m(n.getProducts())}),c()()()}if(a&2){let t,e=u();s(2),h("filter",e.searchFilter())("totaldata",(t=e.products())==null?null:t.length)("paginationTotal",e.rowCount())("hasClicked",e.hasClickRowCount())}}var Oe=(()=>{class a{constructor(){this.http=C(et),this.dialog=C(gt),this.productService=C(yt),this.toastrService=C(tt),this.activateRouter=C(nt),this.authService=C(lt),this.placeholderService=C(Ot),this.permissionService=C(ot),this.channelOptions=f([]),this.searchFilter=f(new xt),this.products=f([]),this.hasClickRowCount=f(!1),this.rowCount=f(0),this.scanProductRole=K.ProductScan,this.downloadProductRole=K.ProductDownload,this.hasDownloadRole=f(!0),this.searchPlaceholder=f("Search ..."),this.channelOptions.set(this.authService.getChannels()),this.permissionService.hasPermission(this.downloadProductRole).then(t=>{this.hasDownloadRole.set(t)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.loader$=this.productService.loader(t).pipe(W(e=>{this.searchFilter.set(e.Filter),this.searchFilter.update(n=>w(P({},n),{PageSize:e.Filter.RowCount})),this.getProducts(),this.initSearchPlaceholder()}))}initSearchPlaceholder(){let t=this.searchFilter();this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(t.SearchType,t.NumberFilterComparator))}getProducts(){let t=this.searchFilter();this.http.post("/api/product/GetProductChannelNotPOS",t).subscribe(e=>{this.products.set(e.Data),this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t=this.channelOptions(),e=this.products().map(n=>{let i=t.find(r=>r.ID==n.ChannelID);return n.Channel=i?JSON.parse(JSON.stringify(i)):null,n.Channel&&(n.Channel.Url=n.Url),n});this.products.set(e)}setSkuProduct(){let t=this.products().map(e=>(e?.Variant?.length==0?e.SKU=_.IsNotEmpty(e?.ChannelItemSKU)?e?.ChannelItemSKU:"SKU not assigned":e.SKU=e?.Variant[0]?.ChannelVariationSKU?e?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",e));this.products.set(t)}onSearch(t){this.searchFilter.update(e=>w(P({},e),{text:t})),this.hasClickRowCount.set(!1),this.getProducts(),this.initSearchPlaceholder()}onClearChannelFilter(){this.searchFilter.update(t=>w(P({},t),{ChannelID:_.GuidEMpty}))}onScanAll(){let t=this.searchFilter(),e=this.productService.findChannelById(t.ChannelID,this.channelOptions());this.productService.scanAll(t.ChannelID,t.ScanFull,t.UpdatedProduct,t.Async).subscribe(n=>{t.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(_.GuidEMpty),this.productService.successToastrScanAllProduct(n,e,!t.UpdatedProduct)),this.searchFilter.update(i=>w(P({},i),{ChannelID:_.GuidEMpty}))})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter()));t.ChannelID=_.GuidEMpty,this.dialog.open(wt,{data:{filter:t,channelOptions:this.channelOptions()},width:"600px"}).afterClosed().pipe(L(n=>_.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.update(i=>w(P({},i),{ChannelID:n.ChannelID,UpdatedProduct:n.UpdatedProduct,ScanFull:n.ScanFull,Async:n.Async})),this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products():e=this.productService.selectedProduct(this.products()),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){let n=this.products().map((i,r)=>r===e?w(P({},i),{selected:t}):i);this.products.set(n)}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(n=>{n.Status?(this.initPageLoader(_.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products()[t],n=e.Variant;n.length>0&&this.dialog.open(Dt,{data:{title:e.Name,variants:n},width:"30%"})}getRowCount(){let t=this.searchFilter(),e={ChannelID:t.ChannelID,text:t.text,HaveSku:parseInt(t.HaveSku),SearchType:t.SearchType,NumberFilterComparator:t.NumberFilterComparator};this.http.post(at.GetNotInPosRowCount,e).subscribe(n=>{this.hasClickRowCount.set(!0),this.rowCount.set(n.Count)})}static{this.\u0275fac=function(e){return new(e||a)}}static{this.\u0275cmp=I({type:a,selectors:[["app-not-in-pos"]],decls:34,vars:19,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,n){if(e&1){let i=O();U(0),Z(1,"async"),l(2,"mainpanel",0),y("onSubmit",function(o){return p(i),m(n.onSearch(o))}),l(3,"actions"),G(4,At,2,1,"ng-container",1),c(),l(5,"filters")(6,"div",2)(7,"label",3),g(8,"Channel"),c(),U(9),l(10,"app-channel-options-v2",4),N("ngModelChange",function(o){p(i);let d=v(9);return b(d.ChannelID,o)||(d.ChannelID=o),m(o)}),c()(),l(11,"div",2)(12,"label",5),g(13,"SKU Assigned"),c(),l(14,"mat-radio-group",6),N("ngModelChange",function(o){p(i);let d=v(9);return b(d.HaveSku,o)||(d.HaveSku=o),m(o)}),l(15,"mat-radio-button",7),g(16," All "),c(),l(17,"mat-radio-button",7),g(18," Yes "),c(),l(19,"mat-radio-button",7),g(20," No "),c()()(),l(21,"div",2)(22,"label",5),g(23,"Item ID"),c(),l(24,"input",8),N("ngModelChange",function(o){p(i);let d=v(9);return b(d.Item_id,o)||(d.Item_id=o),m(o)}),c()(),l(25,"div")(26,"filter-query-type",9),N("numberFilterComparatorChange",function(o){p(i);let d=v(9);return b(d.NumberFilterComparator,o)||(d.NumberFilterComparator=o),m(o)})("searchTypeChange",function(o){p(i);let d=v(9);return b(d.SearchType,o)||(d.SearchType=o),m(o)}),c()()(),l(27,"content")(28,"div",10)(29,"div",11),T(30,Kt,2,13,"div",12,Rt),D(32,Bt,2,0,"div",13),c(),D(33,Lt,3,4,"div",14),c()()()}if(e&2){let i,r=Q(1,14,n.loader$);s(2),h("searchBoxPlaceHolder",n.searchPlaceholder()),s(2),h("ngxPermissionsOnly",A(17,Vt,n.downloadProductRole)),s(5);let o=z(n.searchFilter());s(),x("ngModel",o.ChannelID),s(4),x("ngModel",o.HaveSku),s(),h("value",0),s(2),h("value",1),s(2),h("value",2),s(5),x("ngModel",o.Item_id),s(2),h("numberFilterComparatorOptions",r==null||r.Options==null?null:r.Options.SearchComparatorTypeOptions),x("numberFilterComparator",o.NumberFilterComparator),h("searchTypeOptions",r==null||r.Options==null?null:r.Options.SearchSKUOnlyOrSKUNameOptions),x("searchType",o.SearchType),s(4),F(n.products()),s(2),V(n.products().length==0?32:-1),s(),V(((i=n.products())==null?null:i.length)>0?33:-1)}},dependencies:[ft,rt,it,Nt,pt,st,ct,dt,St,Pt,It,bt,vt,Mt,X],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media(min-width:1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"],changeDetection:0})}}return a})();export{Oe as NotInPosComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-6SCWPWLK.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-
|
|
1
|
+
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-6SCWPWLK.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-OPQ5F4KL.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-6WM2SWBG.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-WIJXVRR7.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-HHC6VK4C.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-T3GJY3UG.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-DCLGPLVP.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-T7W7AYMK.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-MPCSCQVK.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"log/detail",loadComponent(){return import("./chunk-GLL2GK36.js").then(t=>t.DownloadOrderDetailComponent)},title:"Download Log Detail"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ot}from"./chunk-
|
|
1
|
+
import{a as Ot}from"./chunk-7LJVQ3PR.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import{a as yt,b as Tt}from"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as It}from"./chunk-CJTVOKLJ.js";import{a as wt}from"./chunk-OJ4GCASY.js";import"./chunk-RVHJIVQ5.js";import{a as ht}from"./chunk-MKENTZJA.js";import{a as Ct}from"./chunk-V3PUPGL5.js";import{c as gt,e as bt,g as vt}from"./chunk-2SCD4QZY.js";import{a as mt,d as _t,e as ft,i as xt}from"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import{a as U}from"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import{b as tt,c as ct,e as ie,f as dt}from"./chunk-N77J6LFN.js";import{e as ut}from"./chunk-TRTDBHQI.js";import{a as pt,b as st}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import{Aa as lt,V as Te,Y as te,Z as q,_ as H,aa as Oe,oa as it,ra as nt,sa as ue,ta as ot,v as de,w as P}from"./chunk-2VWSIT3Y.js";import"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{h as et}from"./chunk-ZFJRIOOO.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import{a as we}from"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import{A as G,a as at,c as rt,h as me,m as he}from"./chunk-P6BSXX22.js";import{c as Ye}from"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{e as ce}from"./chunk-M5YUVUTR.js";import"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{D as Xe,F as se,r as re,t as je,u as We,x as Ze,y as Je,z as pe}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as Ge,Ca as S,Cc as ze,Da as ke,Dc as Ne,Eb as D,Ec as C,Fb as Le,Fc as v,Ga as w,Hd as y,Ib as Be,Id as N,Ja as Ae,Jb as Fe,Jc as ve,Ka as Pe,Kb as h,Kc as Re,Mc as le,Na as De,Nc as b,Oc as f,Pc as X,Qc as A,Rc as qe,Sc as K,Tc as $,Uc as z,V as Se,Vc as He,Xb as I,aa as j,ad as Qe,bc as Z,bd as V,cd as ae,dc as J,dd as Ie,e as be,ec as Ue,gc as Ke,ha as Ve,hc as $e,ia as ne,ic as p,ja as Me,jc as c,kb as oe,kc as d,kd as L,la as Ee,lc as T,ld as B,mb as s,na as O,o as Q,od as F,pc as E,qc as k,rc as M,sc as x,sd as R,t as xe,ua as u,va as m,vd as Y,wa as W,wd as ee,xb as Ce,xc as g,zc as a}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var St=`
|
|
2
2
|
.p-autocomplete {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as J,b as K}from"./chunk-GK6WYUPQ.js";import{b as R}from"./chunk-WXZ5XRM6.js";import{a as q,b as H}from"./chunk-L2ENNT5V.js";import{a as z}from"./chunk-RVHJIVQ5.js";import{b as U,c as j}from"./chunk-MKENTZJA.js";import{a as B}from"./chunk-ACIMXBIC.js";import{ra as F}from"./chunk-2VWSIT3Y.js";import{h as E}from"./chunk-
|
|
1
|
+
import{a as J,b as K}from"./chunk-GK6WYUPQ.js";import{b as R}from"./chunk-WXZ5XRM6.js";import{a as q,b as H}from"./chunk-L2ENNT5V.js";import{a as z}from"./chunk-RVHJIVQ5.js";import{b as U,c as j}from"./chunk-MKENTZJA.js";import{a as B}from"./chunk-ACIMXBIC.js";import{ra as F}from"./chunk-2VWSIT3Y.js";import{h as E}from"./chunk-ZFJRIOOO.js";import{b as N}from"./chunk-NNVT5X6O.js";import{A,a as W,h as P,m as G}from"./chunk-P6BSXX22.js";import{$c as L,Eb as T,Ga as y,Jb as v,Kb as M,Oc as _,Pc as g,Sc as f,Tc as x,Uc as S,bc as D,dc as I,ic as r,jc as p,kb as V,kc as m,lc as b,mb as d,na as O,od as k,sc as C,ua as a,va as s,wd as h,xc as u,zc as o}from"./chunk-KCXC4XYC.js";function Q(l,c){if(l&1){let e=C();p(0,"div",7)(1,"p-checkbox",8),S("ngModelChange",function(t){let n=a(e).$implicit;return x(n.selected,t)||(n.selected=t),s(t)}),u("ngModelChange",function(t){let n=a(e).$implicit,w=o(2);return s(w.onGroupSelect(t,n))}),m(),b(2,"img",9),p(3,"span"),_(4),m()()}if(l&2){let e=c.$implicit;d(),r("binary",!0),f("ngModel",e.selected),d(),r("src",e.img,V),d(2),g(e.label)}}function X(l,c){if(l&1&&(p(0,"div"),_(1),m()),l&2){let e=c.$implicit;d(),g(e.Name)}}function Y(l,c){if(l&1){let e=C();p(0,"p-multiselect",5,0),u("click",function(){a(e);let t=o();return s(t.onClickSelect())}),S("ngModelChange",function(t){a(e);let n=o();return x(n.selectedChannels,t)||(n.selectedChannels=t),s(t)}),u("ngModelChange",function(t){a(e);let n=o();return s(n.onChannelChange(t))})("onClear",function(){a(e);let t=o();return s(t.onClearSelectedChannel())}),M(2,Q,5,4,"ng-template",null,1,k)(4,X,2,1,"ng-template",6),m()}if(l&2){let e=o();r("options",e.multiselectOptions())("placeholder",e.placeholder()),f("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())("group",!0)}}function Z(l,c){if(l&1&&(p(0,"div",11),b(1,"img",12),p(2,"div"),_(3),m()()),l&2){let e=c.$implicit;d(),r("src",e.logo,V),d(2),g(e.Name)}}function $(l,c){if(l&1){let e=C();p(0,"p-select",10,2),u("click",function(){a(e);let t=o();return s(t.onClickSelect())}),S("ngModelChange",function(t){a(e);let n=o();return x(n.selectedChannels,t)||(n.selectedChannels=t),s(t)}),u("ngModelChange",function(t){a(e);let n=o();return s(n.onChannelChange(t))}),M(2,Z,4,2,"ng-template",6),m()}if(l&2){let e=o();r("options",e.options())("placeholder",e.placeholder()),f("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var fe=(()=>{class l extends z{constructor(){super(),this.authService=O(E),this.multiple=h(!1),this.clearable=h(!0),this.placeholder=h("Select Channels"),this.options=y(this.authService.getChannels()),this.maxSelectedLabels=h(6),this.multiselectOptions=y([]),this.onChange=e=>{},this.initMultiSelectOptions()}initMultiSelectOptions(){let e=this.authService.getChannels(),i=[];e.forEach(t=>{let n=i.find(w=>w.value===t.TypeID);n?n.items.push(t):(n={label:N[t.TypeID],selected:!1,img:t.Img,value:t.TypeID,items:[t]},i.push(n))}),this.multiselectOptions.set(i)}onGroupSelect(e,i){this.selectedChannels=this.selectedChannels?this.selectedChannels:[];let t=i.items.map(n=>n.ID);e?this.selectedChannels=[...this.selectedChannels,...t.filter(n=>!this.selectedChannels.includes(n))]:this.selectedChannels=this.selectedChannels.filter(n=>!t.includes(n)),this.onChange(this.selectedChannels)}onChannelChange(e){this.multiple()?e=e||[]:e=e||B.GuidEmpty,this.checkSelectedGroup(),this.onChange(e)}checkSelectedGroup(){this.multiselectOptions.update(e=>(e.forEach(i=>{let t=i.items.map(n=>n.ID);i.selected=t.every(n=>this.selectedChannels.includes(n))}),e))}onClearSelectedChannel(){this.multiselectOptions.update(e=>(e.forEach(i=>{i.selected=!1}),e)),this.onChange([])}onClickSelect(){this.initTopPosition(),setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||l)}}static{this.\u0275cmp=T({type:l,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],maxSelectedLabels:[1,"maxSelectedLabels"]},features:[L([{provide:W,multi:!0,useExisting:l}]),v],decls:2,vars:1,consts:[["multiSelect",""],["group",""],["select",""],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","onClear","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["pTemplate","item"],[1,"flex","items-center"],[1,"me-3",3,"ngModelChange","binary","ngModel"],[1,"me-2",2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"]],template:function(i,t){i&1&&D(0,Y,5,7,"p-multiselect",3)(1,$,3,6,"p-select",4),i&2&&I(t.multiple()?0:1)},dependencies:[K,J,F,R,A,P,G,j,U,H,q],styles:["li.p-multiselect-option{margin-left:30px}"],changeDetection:0})}}return l})();export{fe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F}from"./chunk-
|
|
1
|
+
import{a as F}from"./chunk-7LJVQ3PR.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{e as j}from"./chunk-TRTDBHQI.js";import{b as O}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-2VWSIT3Y.js";import"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-ZFJRIOOO.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import{a as I}from"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import{A as B,c as P,h as R,m as $}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{b as V,e as D}from"./chunk-M5YUVUTR.js";import"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{C as L,z as A}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Eb as C,Ga as f,Oc as i,Pc as M,V as k,Vc as E,Wc as N,Xc as b,bc as _,dc as x,ic as m,jc as e,kc as t,kd as v,lc as T,ld as S,mb as c,na as h,sc as y,ua as d,va as s,xc as g,zc as w}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function J(n,H){if(n&1&&(e(0,"pre",21),i(1),v(2,"json"),t()),n&2){w();let r=b(25);c(),M(S(2,1,r))}}function G(n,H){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ae=(()=>{class n{constructor(){this.httpService=h(D),this.toastr=h(V),this.selectedShopId=f(null),this.trackingNumber=f(null)}fetchLog(){if(!this.selectedShopId()||!this.trackingNumber()){this.toastr.warning("Please select a channel and enter a tracking number","Warning");return}this.trackingLog$=this.httpService.get(`${I.GetTrackingNumber}?ChannelID=${this.selectedShopId()}&Number=${this.trackingNumber()}`).pipe(k(1))}copyToClipboard(r){if(!r)return;let l=typeof r=="string"?r:JSON.stringify(r,null,2);navigator.clipboard.writeText(l),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(l){return new(l||n)}}static{this.\u0275cmp=C({type:n,selectors:[["app-tracking-api"]],decls:40,vars:9,consts:[["headerTitle","Tracking 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","Enter tracking 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","trackingLogText"],[1,"text-center","my-12","text-muted"]],template:function(l,o){if(l&1){let a=y();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return d(a),s(o.fetchLog())}),T(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," Select Shopee channel for tracking number lookup. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),g("ngModelChange",function(p){return d(a),s(o.selectedShopId.set(p))}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Tracking Number"),t(),e(21,"p",8),i(22," Enter the tracking number to search. "),t()(),e(23,"div",9)(24,"input",12),g("ngModelChange",function(p){return d(a),s(o.trackingNumber.set(p))}),t()()()()(),E(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),g("click",function(){d(a);let p=b(25);return s(o.copyToClipboard(p))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),_(38,J,3,3,"pre",21)(39,G,2,0,"p",22),t()()()()()()()()()}if(l&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),c(16),m("ngModel",o.selectedShopId()),c(8),m("ngModel",o.trackingNumber()),c();let a=N(S(26,6,o.trackingLog$));c(8),m("disabled",!a),c(5),x(a?38:39)}},dependencies:[O,j,B,P,R,$,F,A,L],encapsulation:2,changeDetection:0})}}return n})();export{ae as TrackingApiComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as y,b as v}from"./chunk-
|
|
1
|
+
import{a as y,b as v}from"./chunk-Z5X6KXNK.js";import{h as P}from"./chunk-ZFJRIOOO.js";import{a as h}from"./chunk-5XPG2TEC.js";import{c as l}from"./chunk-NNVT5X6O.js";import{b as g,e as I}from"./chunk-M5YUVUTR.js";import{H as p,aa as o,ia as C,ma as d,na as f,p as u,t as m}from"./chunk-KCXC4XYC.js";var V=(()=>{class i{constructor(e,t,n){this.httpService=e,this.toastrService=t,this.notificationService=n,this.authService=f(P),this.scanChannelToastr=f(y)}loader(e=l.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:e})}LoadInPOS(e=l.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:e})}filterChannelByTypeId(e,t){return e.filter(n=>t.findIndex(r=>n.TypeID==r)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(e){let t={ID:e};return this.httpService.post("/api/product/TotalProductLive",t)}clearCacheChannel(e){let t={ID:e};return this.httpService.post("/api/Channel/ClearCacheChannel",t)}detachProduct(e){return this.httpService.post("/api/product/Detach",e)}uploadSingleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleChannel",n).pipe(o(r=>{this.showToastrSuccessUploadSingle(r,e[0])}),p(r=>(this.showToastErrorUploadSingle(r,e[0]),u(()=>new Error(r)))))}uploadMultipleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",n).pipe(o(r=>{this.showToastrUploadMultiple(r.Message)}),p(r=>(this.showToastrUploadMultiple(r.error?.Message),u(()=>new Error(r)))))}uploadNotInChannel(e,t){let n={Products:e,Channel:t};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",n).pipe(o(r=>{this.showToastrUploadMultiple(r)}),p(r=>(this.showToastrUploadMultiple(r.error?.Message),u(()=>new Error(r)))))}scanSingle(e,t){let n={ID:e,SKU:t};return this.httpService.post("/api/product/ScanSingle",n)}scanNotInChannel(e){let t={ID:e};return this.httpService.post("/api/product/ScanNotinChannel",t)}findAllSoldInChannel(e){return this.httpService.post(h.GetSoldInChannel,e)}getSoldInChannelDetail(e,t){let n={ID:e,ListChannelID:t};return this.httpService.post(`${h.GetSoldInChannelDetail}`,n).pipe(m(r=>r?.Variants))}scanAll(e,t,n,r=!1){let a={ID:e,ScanFull:t,UpdatedProduct:n,Async:r};return this.httpService.post("/api/product/ScanOptimized",a)}scanAsyncProductV2(e,t,n,r,a,s){let c={ID:e,ProductType:t,TimeRange:n,Async:!0,LastSyncUpdate:r,Update_time_from:a,Update_time_to:s};return this.httpService.post(h.ScanAsyncProductV2,c).pipe(o(S=>{this.notificationService.subscribeToJobGroup(S.JobID)}))}scanSyncProductV2(e,t,n,r,a){let s={ID:e,ProductType:t,TimeRange:n,Async:!1,Update_time_from:r,Update_time_to:a};return this.httpService.post(h.ScanSyncProductV2,s)}scanProductV2(e){let t=this.authService.getChannels(),n=this.findChannelById(e.ID,t);return e.Async?this.scanAsyncProductV2(e.ID,e.ProductType,e.TimeRange,e.LastSyncUpdate,e.Update_time_from,e.Update_time_to).pipe(o(r=>{this.scanChannelToastr.showToast({text:"Scan Job Started",detail:`JobID: ${r.JobID}`,severity:"info",data:{channelName:n.Name,channelTypeId:n.TypeID,jobId:r.JobID}})})):this.scanSyncProductV2(e.ID,e.ProductType,e.TimeRange,e.Update_time_from,e.Update_time_to).pipe(m(r=>r?.Message),o(r=>{this.successToastrScanAllProduct(r,n,!e.TimeRange)}))}scanCompareToPos(e){return this.httpService.post("/api/product/CompareMarketplaceToPOS",e)}getVariantCodesProduct(e){return(e.Variants||[]).map(r=>r.Code)}downloadMultipleProduct(e){let t=e.map(n=>({ChannelItemID:n.ChannelItemID,ChannelID:n.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",t).pipe(o(n=>{this.toastrService.success(`${n.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(e){let t={ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",t).pipe(o(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(e=[]){let t=[];return e.forEach(n=>{n.Variants.forEach(r=>{t=[...t,r.Code]})}),t}filterUnselectedChannel(e,t){let n=[];e.forEach(a=>{n=[...n,...a.Channel]});let r;if(!n||n.length==0)r=t;else{let a=[];r=t.filter(s=>(a=n.filter(c=>c.ChannelID==s.ID),a.length!==e.length))}return r}findChannelById(e,t){return t.find(n=>n.ID==e)}sortChannel(e=[]){return e.sort((t,n)=>t.TypeID<n.TypeID?1:t.TypeID===n.TypeID?0:-1)}hasSelection(e=[]){return this.selectedProduct(e).length>0}selectedProduct(e=[]){return e.filter(t=>t.selected)}hasSelectionVariant(e){return this.selectedVariantProduct(e).length>0}selectedVariantProduct(e){let t=[];return e.forEach(n=>{t=[...t,...n.Variants!=null?n.Variants.filter(r=>r.selected):""]}),t}getChannelProduct(e){let t=e.Channels||[],n=[];for(let r of t)n.filter(a=>a.ChannelID==r.ChannelID).length==0&&n.push(r);return this.sortChannel(n)}successToastrScanAllProduct(e,t,n){let r=typeof e.InChannel=="number"?e.InChannel:e?.InChannel?.Product?e?.InChannel?.Product:0,a=typeof e?.NotInPOS=="number"?e?.NotInPOS:e?.NotInPOS?.Product?e?.NotInPOS?.Product:0,s=l.IsNotEmpty(e.LastUpdate)?l.convertToReadableDate(e.LastUpdate):null;n?this.toastrService.success(`
|
|
2
2
|
${a+r} product updates in ${t?.Name} </br>
|
|
3
3
|
(${r} In Channel + ${a} Not In Pos)
|
|
4
4
|
${l.IsNotEmpty(s)?"</br>since "+s:""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as x}from"./chunk-
|
|
1
|
+
import{f as x}from"./chunk-ZFJRIOOO.js";import{c as o}from"./chunk-NNVT5X6O.js";import{e as k,g as C}from"./chunk-RRBAJSPM.js";import{Eb as v,Oc as u,Qc as p,bc as b,cd as I,dc as D,ia as h,ic as s,jc as c,kb as g,kc as m,mb as l,na as i,sd as f,wd as _,zc as d}from"./chunk-KCXC4XYC.js";var y=(()=>{class e{constructor(){this.localDataService=i(x),this.baseUrl=this.localDataService.getHostName()}getBaseUrl(r){let t="";return o.IsNotEmpty(r.ID)?t=`https://${this.baseUrl}/menu/Orders/Orders/Customer_Invoice/Info?ID=${r.ID}`:t="/menu/Order/detail",t}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var L=(e,a)=>({Number:e,Outlet:a});function N(e,a){if(e&1&&(c(0,"a",0),u(1),m()),e&2){let r,t=d();s("href",t.baseUrl(),g),l(),p(" ",(r=t.order())==null?null:r.Number," ")}}function S(e,a){if(e&1&&(c(0,"a",1),u(1),m()),e&2){let r,t,n=d();s("routerLink",n.baseUrl())("queryParams",I(3,L,(r=n.order())==null?null:r.Number,(r=n.order())==null?null:r.Outlet)),l(),p(" ",(t=n.order())==null?null:t.Number," ")}}var z=(()=>{class e{constructor(){this.order=_(),this.generateLinkService=i(y),this.baseUrl=f(()=>this.generateLinkService.getBaseUrl(this.order())),this.hasOrderID=f(()=>o.IsNotEmpty(this.order()?.ID))}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=v({type:e,selectors:[["order-link"]],inputs:{order:[1,"order"]},decls:2,vars:1,consts:[["target","_blank",3,"href"],["target","_blank",3,"routerLink","queryParams"]],template:function(t,n){t&1&&b(0,N,2,2,"a",0)(1,S,2,6,"a",1),t&2&&D(n.hasOrderID()?0:1)},dependencies:[C,k],encapsulation:2,changeDetection:0})}}return e})();export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as j}from"./chunk-
|
|
1
|
+
import{a as j}from"./chunk-7LJVQ3PR.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{b as O}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-2VWSIT3Y.js";import"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-ZFJRIOOO.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import{a as T}from"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import{A as R,c as L,h as N,m as U,p as K}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{e as D}from"./chunk-M5YUVUTR.js";import"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{C as B,z as I}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Eb as P,Ga as g,Oc as l,Pc as A,V as b,Vc as V,Wc as E,Xc as x,bc as _,dc as f,ic as s,jc as i,kc as t,kd as S,lc as k,ld as M,mb as d,na as w,sc as v,ua as c,va as p,xc as m,zc as h}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function F(n,y){if(n&1){let e=v();i(0,"input",30),m("ngModelChange",function(o){c(e);let r=h();return p(r.sku.set(o))}),t()}if(n&2){let e=h();s("ngModel",e.sku())}}function H(n,y){if(n&1){let e=v();i(0,"input",31),m("ngModelChange",function(o){c(e);let r=h();return p(r.itemId.set(o))}),t()}if(n&2){let e=h();s("ngModel",e.itemId())}}function J(n,y){if(n&1&&(i(0,"pre",28),l(1),S(2,"json"),t()),n&2){h();let e=x(35);d(),A(M(2,1,e))}}function $(n,y){n&1&&(i(0,"p",29),l(1," Your data will be shown here once it's available "),t())}var re=(()=>{class n{constructor(){this.httpService=w(D),this.selectedChannel=g(null),this.sku=g(null),this.itemId=g(null),this.searchBy=g("sku")}initProductLog(){let e={ChannelID:this.selectedChannel()};this.searchBy()==="sku"?e.SKU=this.sku():e.ItemID=this.itemId(),this.productLog$=this.httpService.post(T.GetProductApiLog,e).pipe(b(1))}copyToClipboard(e){if(!e)return;let a=typeof e=="string"?e:JSON.stringify(e,null,2);navigator.clipboard.writeText(a),alert("Copied to clipboard!")}static{this.\u0275fac=function(a){return new(a||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-product-api"]],decls:50,vars:14,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"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","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"]],template:function(a,o){if(a&1){let r=v();i(0,"mainpanel",0)(1,"actions")(2,"button",1),m("click",function(){return c(r),p(o.initProductLog())}),k(3,"i",2),l(4," Search "),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),l(12,"Channel"),t(),i(13,"p",8),l(14," View logs related to Product API Detail "),t()(),i(15,"div",9)(16,"app-channel-options-v2",10),m("ngModelChange",function(u){return c(r),p(o.selectedChannel.set(u))}),t()()(),i(17,"div",11)(18,"div",7)(19,"h6"),l(20,"Product Code / SKU"),t(),i(21,"p",8),l(22," Product SKU or Code from Channel Product "),t()(),i(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),m("ngModelChange",function(u){return c(r),p(o.searchBy.set(u))}),t(),i(27,"label",15),l(28,"Search by SKU"),t()(),i(29,"div",13)(30,"input",16),m("ngModelChange",function(u){return c(r),p(o.searchBy.set(u))}),t(),i(31,"label",17),l(32,"Search by ItemID"),t()()(),_(33,F,1,1,"input",18),_(34,H,1,1,"input",19),t()()()(),V(35),S(36,"async"),i(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),l(42,"Response"),t(),i(43,"button",24),m("click",function(){c(r);let u=x(35);return p(o.copyToClipboard(u))}),l(44," Copy "),t()(),i(45,"div",25)(46,"div",26)(47,"div",27),_(48,J,3,3,"pre",28)(49,$,2,0,"p",29),t()()()()()()()()()}if(a&2){s("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),s("ngModel",o.selectedChannel()),d(10),s("ngModel",o.searchBy())("value","sku"),d(4),s("ngModel",o.searchBy())("value","itemid"),d(3),f(o.searchBy()==="sku"?33:-1),d(),f(o.searchBy()==="itemid"?34:-1),d();let r=E(M(36,11,o.productLog$));d(8),s("disabled",!r),d(5),f(r?48:49)}},dependencies:[R,L,K,N,U,O,j,I,B],encapsulation:2,changeDetection:0})}}return n})();export{re as ProductApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-KEWMW42S.js";import{a as m}from"./chunk-N5UVIRO3.js";import"./chunk-MWUZF6ZW.js";import"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-ZFJRIOOO.js";import"./chunk-MVOOS53M.js";import"./chunk-QXRG5XYP.js";import"./chunk-5XPG2TEC.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import"./chunk-M5YUVUTR.js";import{c as i}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Eb as a,ic as l,jc as p,kc as c,lc as o,mb as r}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var g=(()=>{class n{constructor(){this.channelTabs=[{Title:"Channel",Url:"/menu/channel/marketplace"},{Title:"POS",Url:"/menu/channel/pos"}]}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=a({type:n,selectors:[["app-channels"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,u){e&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),c()()(),o(4,"router-outlet")),e&2&&(r(3),l("Tabs",u.channelTabs))},dependencies:[m,i],styles:[".form-label-group[_ngcontent-%COMP%]{position:relative;margin-bottom:1rem}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{width:auto;position:absolute;top:1.125rem;left:.75rem;display:block;margin-bottom:0;line-height:1.5;color:#ccc;pointer-events:none;cursor:text;border:1px solid transparent;border-radius:.25rem;transition:all .1s ease-in-out;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]{padding:.75rem;color:#343434;resize:both;font-size:.875rem;border-radius:.25rem;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{top:.9375rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus ~ label[_ngcontent-%COMP%]{top:1rem;left:.78125rem}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] .ng-select-container{min-height:3.625rem;border-color:#c8d3df;box-shadow:none}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:inline-block;top:-.625rem;background-color:#fff;font-size:.75rem!important;color:#9da2a6;padding:0 .25rem;z-index:1002;left:.5rem}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{padding-left:.25rem!important}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{top:18px!important}.form-label-group.radio[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;border-radius:.25rem!important;border:solid 1px #c8d3df}.form-label-group.radio[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem!important;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group.empty[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:none}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::placeholder{color:transparent}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%]{color:#3f8aec}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{padding-left:.25rem;color:#ccc!important;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-has-value .ng-value{padding-left:.25rem;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-value-container{overflow:initial!important}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{top:auto!important;padding-left:.875rem!important;font-size:.875rem}"]})}}return n})();var b=[{path:"",component:g,children:[{path:"",redirectTo:"marketplace",pathMatch:"full"},{path:"marketplace",loadComponent(){return import("./chunk-G3YBC4DU.js").then(n=>n.MarketplaceComponent)},canActivate:[t],data:{title:"List"}},{path:"marketplace/form",loadComponent(){return import("./chunk-5PZK3DVD.js").then(n=>n.MarketplaceFormComponent)},canActivate:[t],data:{title:"Add new Channel"}},{path:"marketplace/view",loadComponent(){return import("./chunk-BHYA4FRV.js").then(n=>n.MarketplaceViewComponent)},canActivate:[t],data:{title:"Marketplace View"}},{path:"marketplace/add",loadComponent(){return import("./chunk-57KM76KQ.js").then(n=>n.MarketplaceAddComponent)},canActivate:[t],data:{title:"Marketplace Add"}},{path:"pos",loadComponent(){return import("./chunk-5CFGYX3G.js").then(n=>n.PosComponent)},canActivate:[t],data:{title:"POS"}},{path:"pos/edit",loadComponent(){return import("./chunk-F3FRYUZS.js").then(n=>n.EditComponent)},canActivate:[t],data:{title:"POS Edit"}}]}];export{b as routes};
|