marketplacepos 5.41.2 → 5.43.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-24DT5FN2.js +1 -0
- package/Marketplace/chunk-2DJWDXTZ.js +4 -0
- package/Marketplace/{chunk-IARG7PLL.js → chunk-2EL3WEWS.js} +1 -1
- package/Marketplace/chunk-3Y6LJS2H.js +1 -0
- package/Marketplace/chunk-6BFXOKCB.js +1 -0
- package/Marketplace/chunk-6DZKFXDF.js +1 -0
- package/Marketplace/{chunk-H6WIS2HR.js → chunk-6LULIB2P.js} +1 -1
- package/Marketplace/chunk-6QGSDBR7.js +1 -0
- package/Marketplace/{chunk-XGYBJAFE.js → chunk-736E275F.js} +1 -1
- package/Marketplace/{chunk-MCJRJUAO.js → chunk-ABQG3LB5.js} +1 -1
- package/Marketplace/{chunk-6RSAOZUV.js → chunk-ARZ2S6YD.js} +1 -1
- package/Marketplace/{chunk-EL2JACEW.js → chunk-AVVPZ3NI.js} +1 -1
- package/Marketplace/{chunk-FUWROOE4.js → chunk-AZ2FLWCK.js} +3 -2
- package/Marketplace/chunk-BAYW2AHI.js +1 -0
- package/Marketplace/{chunk-4JG3ZRYP.js → chunk-BCM6WRZR.js} +1 -1
- package/Marketplace/{chunk-HPGFBOM4.js → chunk-CFC5CQ3V.js} +1 -1
- package/Marketplace/{chunk-Z3KD73SP.js → chunk-CLDURV35.js} +2 -2
- package/Marketplace/{chunk-REL734JM.js → chunk-CRZOIZUQ.js} +1 -1
- package/Marketplace/{chunk-TQIIWFRF.js → chunk-D66XCOBY.js} +1 -1
- package/Marketplace/{chunk-SD7M7HOB.js → chunk-DIUEZVRG.js} +1 -1
- package/Marketplace/{chunk-SRJREA2O.js → chunk-DLSU35PZ.js} +1 -1
- package/Marketplace/{chunk-DS4AAABV.js → chunk-DMW4DWIM.js} +1 -1
- package/Marketplace/chunk-ECN3QRMT.js +1 -0
- package/Marketplace/chunk-F4HFUSVI.js +1 -0
- package/Marketplace/chunk-G4OF4YLE.js +2 -0
- package/Marketplace/{chunk-BM4KX73T.js → chunk-GMGCY3OL.js} +1 -1
- package/Marketplace/{chunk-5JYR3YJW.js → chunk-I5IZPTXZ.js} +1 -1
- package/Marketplace/{chunk-6UEHSA6E.js → chunk-IR5OMZTZ.js} +1 -1
- package/Marketplace/{chunk-Q6V3IOGL.js → chunk-ITTTKW6F.js} +1 -1
- package/Marketplace/{chunk-CEQA4PTY.js → chunk-IUWXRFDI.js} +1 -1
- package/Marketplace/{chunk-PEA6KVUS.js → chunk-JRXB6762.js} +1 -1
- package/Marketplace/{chunk-5B4KSPFM.js → chunk-K654EZ3I.js} +1 -1
- package/Marketplace/{chunk-WTAJSWM2.js → chunk-KC3C62UO.js} +2 -2
- package/Marketplace/{chunk-RHRJXX4W.js → chunk-KR2UT3GA.js} +1 -1
- package/Marketplace/{chunk-P5FCWMYK.js → chunk-MKOJVMRR.js} +1 -1
- package/Marketplace/{chunk-MP43HA4R.js → chunk-MMT3VFZZ.js} +1 -1
- package/Marketplace/{chunk-4YOHPIVG.js → chunk-NB5XHM62.js} +1 -1
- package/Marketplace/chunk-O6U5QCHJ.js +1 -0
- package/Marketplace/chunk-OJWFYXZX.js +1 -0
- package/Marketplace/{chunk-FFAZ3Q3F.js → chunk-OTFACGUB.js} +1 -1
- package/Marketplace/{chunk-CMZW5QAE.js → chunk-PB2SJSML.js} +1 -1
- package/Marketplace/{chunk-C7QA2BEN.js → chunk-PZ4PSWYM.js} +1 -1
- package/Marketplace/{chunk-YP2IPJ2O.js → chunk-QACWANJT.js} +1 -1
- package/Marketplace/{chunk-EVLYO3HX.js → chunk-QUXUEWEF.js} +1 -1
- package/Marketplace/chunk-R22TUWCL.js +15 -0
- package/Marketplace/{chunk-ZLNGASME.js → chunk-RCRPQNNW.js} +1 -1
- package/Marketplace/chunk-SACERVTF.js +1 -0
- package/Marketplace/{chunk-DG32XLYI.js → chunk-SDKAJBVB.js} +1 -1
- package/Marketplace/chunk-SMCI6XBO.js +1 -0
- package/Marketplace/chunk-SNDG7727.js +1 -0
- package/Marketplace/{chunk-S3YMF63V.js → chunk-T2IGESWD.js} +1 -1
- package/Marketplace/{chunk-KOKHDU4I.js → chunk-T3Z5OMIZ.js} +1 -1
- package/Marketplace/chunk-TGN4NMQY.js +1 -0
- package/Marketplace/{chunk-PBGDP6XV.js → chunk-UBB6E4VL.js} +1 -1
- package/Marketplace/chunk-UDIAPGRB.js +1 -0
- package/Marketplace/chunk-UEWZXE4O.js +1 -0
- package/Marketplace/chunk-WXQDF2MX.js +1 -0
- package/Marketplace/chunk-X5DJBQUZ.js +1 -0
- package/Marketplace/{chunk-BBVWQJ7M.js → chunk-XENOOCI4.js} +1 -1
- package/Marketplace/{chunk-4DV4IT7R.js → chunk-YR3PNRLA.js} +1 -1
- package/Marketplace/{chunk-R5TTZPDX.js → chunk-ZDYYX736.js} +1 -1
- package/Marketplace/chunk-ZFDUVL4I.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-SPNULRF2.js → main-OO7ZEZW4.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-4HZR3O3W.js +0 -1
- package/Marketplace/chunk-5ZX2OVBB.js +0 -1
- package/Marketplace/chunk-6SBCWEJJ.js +0 -1
- package/Marketplace/chunk-7H5ILTTK.js +0 -1
- package/Marketplace/chunk-H4PA2O6O.js +0 -1
- package/Marketplace/chunk-IIMHYIRJ.js +0 -1
- package/Marketplace/chunk-K6YEZYU4.js +0 -5
- package/Marketplace/chunk-KJHSB4A2.js +0 -1
- package/Marketplace/chunk-KTIKLSOU.js +0 -1
- package/Marketplace/chunk-KTXS7IPU.js +0 -1
- package/Marketplace/chunk-LOPJ3O56.js +0 -1
- package/Marketplace/chunk-MGVYUYPC.js +0 -15
- package/Marketplace/chunk-T4K3CJ2R.js +0 -1
- package/Marketplace/chunk-TQ4ZLZ7C.js +0 -1
- package/Marketplace/chunk-UDQBFSOV.js +0 -1
- package/Marketplace/chunk-UYW53K3I.js +0 -1
- package/Marketplace/chunk-WX5S3HCU.js +0 -1
- package/Marketplace/chunk-ZGZ74AJR.js +0 -1
- package/Marketplace/chunk-ZIUDNFYT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as ae}from"./chunk-KX5AWR75.js";import{a as oe}from"./chunk-E2CS7ZMC.js";import{a as le,b as re}from"./chunk-ZR5IXNXB.js";import"./chunk-LSXUXG54.js";import"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import"./chunk-SIYMMMKQ.js";import"./chunk-WHZ44BAL.js";import"./chunk-SDUUFQUI.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import{a as Y,b as Z,d as ee,e as te}from"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import{i as X}from"./chunk-
|
|
1
|
+
import{b as ae}from"./chunk-KX5AWR75.js";import{a as oe}from"./chunk-E2CS7ZMC.js";import{a as le,b as re}from"./chunk-ZR5IXNXB.js";import"./chunk-LSXUXG54.js";import"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import"./chunk-SIYMMMKQ.js";import"./chunk-WHZ44BAL.js";import"./chunk-SDUUFQUI.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import{a as Y,b as Z,d as ee,e as te}from"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import{i as X}from"./chunk-PZ4PSWYM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-PB2SJSML.js";import{e as Q}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import{c as K}from"./chunk-PW42BQIY.js";import{m as ne,n as ie}from"./chunk-6X2OBNJQ.js";import{h as H,m as U,z as G}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{j as V,k as J,l as W,n as k}from"./chunk-MTUIRWOB.js";import{$c as m,Gb as P,Gc as p,Hc as C,Ic as y,Kc as j,Lc as O,Mb as u,Mc as q,Qc as z,Yb as d,Z as M,aa as D,ad as c,bd as A,dc as R,ec as B,g as L,gc as T,hc as $,ic as i,ja as w,jc as a,kc as f,oc as F,pa as g,pb as S,rb as l,tc as v,uc as x,v as I,ya as E,za as N}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import{a as _}from"./chunk-66YHNWRR.js";var b=(()=>{class n{constructor(){this.httpService=g(Q),this._pageination=new L({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(D(e=>this.getLogs$(e).pipe()))}getLogs$(e){return this.httpService.post("/api/Channel/GetChannelLogPaged",e)}onPaginationChange(e){let t=this._pageination.value;t.PageNumber=e.pageIndex+1,this._pageination.next(t)}onFilter(e){let t=this._pageination.value;t.PageNumber=1,t=_(_({},t),e),this._pageination.next(t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=w({token:n,factory:n.\u0275fac})}}return n})();function me(n,h){if(n&1&&(i(0,"span",10),f(1,"img",11),a(),p(2)),n&2){let e=h.item;l(),d("src",e.Img,S)("alt",e.Name),l(),y(" ",e.Name," ")}}function se(n,h){if(n&1&&(i(0,"tr")(1,"td"),f(2,"img",17),i(3,"span"),p(4),a()(),i(5,"td")(6,"span",18),p(7),m(8,"json"),a()(),i(9,"td"),p(10),m(11,"json"),a(),i(12,"td"),p(13),m(14,"date"),a()()),n&2){let e=h.$implicit;l(2),d("src",e.Img,S),l(2),y(" ",e.ChannelName," "),l(3),C(c(8,5,e.Request)),l(3),C(c(11,7,e.Response)),l(3),C(A(14,9,e.Created,"dd-MM-yyyy hh:mm:ss"))}}function ce(n,h){if(n&1){let e=F();i(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),p(5,"Channel"),a(),i(6,"th"),p(7,"Request"),a(),i(8,"th"),p(9,"Response"),a(),i(10,"th",15),p(11,"Created"),a()()(),i(12,"tbody"),T(13,se,15,12,"tr",null,B),m(15,"async"),a()(),i(16,"mat-paginator",16),m(17,"async"),m(18,"async"),m(19,"async"),m(20,"async"),v("page",function(r){E(e);let o=x();return N(o.channelLogService.onPaginationChange(r))}),a()()}if(n&2){let e,t,r,o,s=x();l(13),$((e=c(15,3,s.channelLogs$))==null?null:e.Data),l(3),d("length",(t=c(17,5,s.channelLogs$))==null?null:t.Count)("pageSize",(r=c(18,7,s.filter$))==null?null:r.RowCount)("pageIndex",(o=c(19,9,s.filter$))!=null&&o.PageNumber?0:((o=c(20,11,s.filter$))==null?null:o.PageNumber)-1)}}function de(n,h){n&1&&(i(0,"div",9),f(1,"app-empty-state"),a())}var Oe=(()=>{class n{constructor(){this.channelLogService=g(b),this.authService=g(X),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(I(e=>(e.Data?e.Data=e.Data.map(t=>(t.Response=t.Response?JSON.parse(t.Response):"",t.Request=t.Request?JSON.parse(t.Request):"",t.Img=K.getChannelLogoByTypeId(t.TypeID),t)):e.Data=[],e)),M(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-channel-log"]],features:[z([b])],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"],[1,""]],template:function(t,r){if(t&1&&(i(0,"mainpanel",0),v("onSubmit",function(){return r.onSubmitFilter()}),i(1,"filters")(2,"div",1)(3,"div")(4,"label",2),p(5,"Channel"),a(),i(6,"ng-select",3),q("ngModelChange",function(s){return O(r.channelID,s)||(r.channelID=s),s}),u(7,me,3,3,"ng-template",4),a()()()(),i(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,ce,21,13,"div",8),m(13,"async"),u(14,de,2,0,"div",9),a()()()()()),t&2){let o;d("hideSearchBox",!0),l(6),d("clearable",!0)("items",r.channelOptions),j("ngModel",r.channelID),l(6),R(((o=c(13,5,r.channelLogs$))==null||o.Data==null?null:o.Data.length)>0?12:14)}},dependencies:[k,V,W,J,ie,ne,oe,re,le,ae,te,ee,Y,Z,G,H,U],encapsulation:2})}}return n})();export{Oe as ChannelLogComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as de,b as se,c as ce}from"./chunk-2BUABOHG.js";import{a as ue}from"./chunk-MKOJVMRR.js";import{a as pe}from"./chunk-G4OF4YLE.js";import"./chunk-2DJWDXTZ.js";import{a as me}from"./chunk-ABQG3LB5.js";import{a as ae}from"./chunk-E2CS7ZMC.js";import"./chunk-R76V3PTN.js";import{a as le}from"./chunk-5EQNOCXP.js";import"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import"./chunk-WHZ44BAL.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import"./chunk-PZ4PSWYM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as ie}from"./chunk-PB2SJSML.js";import{e as te}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import"./chunk-PW42BQIY.js";import{m as oe,n as re}from"./chunk-6X2OBNJQ.js";import{c as X,h as Y,m as Z,o as $,z as ee}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import{s as ne}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{j as q,k as J,m as K,n as Q}from"./chunk-MTUIRWOB.js";import{$c as w,Gb as I,Gc as a,Hc as v,Ic as z,Kc as C,Lc as _,Mb as x,Mc as f,Nc as A,Oc as j,Pc as H,Qc as R,Ra as N,Sc as U,Yb as c,Z as L,ac as F,ad as E,bd as G,dc as b,ec as D,gc as B,hc as k,ic as t,ja as O,jc as i,kc as S,oc as V,pa as y,pb as W,rb as l,tc as M,uc as u,v as T,ya as d,za as s}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var P=(()=>{class n{constructor(){this.httpService=y(te)}getCompletedOrders(e){return this.httpService.post(ie.GetCompleted,e).pipe(T(m=>m?.Data||[]))}static{this.\u0275fac=function(m){return new(m||n)}}static{this.\u0275prov=O({token:n,factory:n.\u0275fac})}}return n})();var _e=n=>({"td-cell-hover":n});function fe(n,g){if(n&1&&S(0,"variants-dropdown",27),n&2){let e=u().$implicit;c("variants",e==null?null:e.Variants)}}function ge(n,g){if(n&1&&S(0,"variant-with-image",28),n&2){let e=u().$implicit;c("variant",e==null?null:e.Variants[0])}}function he(n,g){if(n&1&&(t(0,"span"),a(1),i()),n&2){let e=u().$implicit;l(),v(e.LogisticService==null?null:e.LogisticService.Option)}}function Se(n,g){if(n&1&&(t(0,"tr")(1,"td"),a(2),i(),t(3,"td")(4,"div",23)(5,"div",24)(6,"div"),S(7,"img",25),w(8,"channelImage"),i(),t(9,"div"),S(10,"order-link",26),i()(),t(11,"small"),a(12),w(13,"date"),i()()(),t(14,"td"),a(15),i(),t(16,"td"),x(17,fe,1,1,"variants-dropdown",27)(18,ge,1,1,"variant-with-image",28),i(),t(19,"td",29),a(20),w(21,"number"),i(),t(22,"td")(23,"span"),a(24),i(),x(25,he,2,1,"span"),i()()),n&2){let e=g.$implicit;l(2),v(e.Outlet),l(5),c("src",E(8,12,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(3),c("order",e),l(2),z(" ",G(13,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),v(e.Customer),l(),F(U(19,_e,(e.Variants==null?null:e.Variants.length)>1)),l(),b((e.Variants==null?null:e.Variants.length)>1?17:18),l(3),v(E(21,17,e.Amount)),l(4),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1)}}function ve(n,g){if(n&1){let e=V();t(0,"div",13)(1,"table",15)(2,"thead",16)(3,"tr",17)(4,"th",18),a(5,"Outlet"),i(),t(6,"th",19),a(7,"Number"),i(),t(8,"th",19),a(9,"Customer"),i(),t(10,"th"),a(11,"Items"),i(),t(12,"th",20),a(13,"Amount"),i(),t(14,"th",21),a(15,"Shipping"),i()()(),t(16,"tbody"),B(17,Se,26,21,"tr",null,D),i()(),t(19,"app-custom-paginator",22),M("next",function(){d(e);let o=u();return s(o.initCompletedOrders())})("previous",function(){d(e);let o=u();return s(o.initCompletedOrders())}),i()()}if(n&2){let e=u(),m=H(0);l(17),k(m),l(2),c("filter",e.filter())("totaldata",m==null?null:m.length)}}function we(n,g){n&1&&(t(0,"div",14),S(1,"app-empty-state"),i())}var Ke=(()=>{class n{constructor(){this.completedService=y(P),this.filter=N({PageNumber:1,PageSize:100,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.completedService.getCompletedOrders(this.filter()).pipe(L(1))}static{this.\u0275fac=function(m){return new(m||n)}}static{this.\u0275cmp=I({type:n,selectors:[["app-completed"]],features:[R([P])],decls:29,vars:11,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(m,o){if(m&1){let p=V();A(0),w(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return d(p),s(o.initCompletedOrders())}),f("textChange",function(r){return d(p),_(o.filter().Number,r)||(o.filter().Number=r),s(r)}),t(3,"filters")(4,"div")(5,"label",1),a(6,"From/To"),i(),t(7,"channel-select-options",2),f("ngModelChange",function(r){return d(p),_(o.filter().ListChannelID,r)||(o.filter().ListChannelID=r),s(r)}),i()(),t(8,"div",3)(9,"label",1),a(10,"From/To"),i(),t(11,"div",4)(12,"datepicker",5),f("dateChange",function(r){return d(p),_(o.filter().From,r)||(o.filter().From=r),s(r)}),i()(),t(13,"div")(14,"datepicker",6),f("dateChange",function(r){return d(p),_(o.filter().To,r)||(o.filter().To=r),s(r)}),i()()(),t(15,"div",3)(16,"label",7),a(17,"Page Number"),i(),t(18,"input",8),f("ngModelChange",function(r){return d(p),_(o.filter().PageNumber,r)||(o.filter().PageNumber=r),s(r)}),i()(),t(19,"div",3)(20,"label",7),a(21,"Page Size"),i(),t(22,"input",9),f("ngModelChange",function(r){return d(p),_(o.filter().PageSize,r)||(o.filter().PageSize=r),s(r)}),i()()(),t(23,"content")(24,"div",10)(25,"div",11)(26,"div",12),x(27,ve,20,2,"div",13)(28,we,2,0,"div",14),i()()()()()}if(m&2){let p=j(E(1,8,o.completedOrders$));l(2),C("text",o.filter().Number),l(5),c("multiple",!0),C("ngModel",o.filter().ListChannelID),l(5),C("date",o.filter().From),l(2),C("date",o.filter().To),l(4),C("ngModel",o.filter().PageNumber),l(4),C("ngModel",o.filter().PageSize),l(5),b((p==null?null:p.length)>0?27:28)}},dependencies:[Q,q,K,J,re,oe,ae,le,ee,X,$,Y,Z,de,se,ce,pe,me,ne,ue],encapsulation:2})}}return n})();export{Ke as CompletedComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-I5IZPTXZ.js";import"./chunk-PZ4PSWYM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-PB2SJSML.js";import"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{b as u}from"./chunk-TNKPTRB3.js";import"./chunk-PW42BQIY.js";import{n as c}from"./chunk-6X2OBNJQ.js";import{z as s}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{F as a,J as n,n as i}from"./chunk-MTUIRWOB.js";import{Gb as p,Hb as r,ka as e,kc as d}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class t{constructor(){}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=p({type:t,selectors:[["app-report"]],standalone:!1,decls:1,vars:0,template:function(o,C){o&1&&d(0,"router-outlet")},dependencies:[a],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]})}}return t})();var R=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-6DZKFXDF.js").then(t=>t.OrderModule),canActivate:[l]}]}],h=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=r({type:t})}static{this.\u0275inj=e({imports:[i,n.forChild(R)]})}}return t})();var S=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=r({type:t})}static{this.\u0275inj=e({imports:[i,u,h,s,c,n]})}}return t})();export{S as ReportModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as j}from"./chunk-IKPRRD5D.js";import{a as z}from"./chunk-G4OF4YLE.js";import"./chunk-2DJWDXTZ.js";import"./chunk-R76V3PTN.js";import{a as H,b as q}from"./chunk-ZR5IXNXB.js";import"./chunk-LSXUXG54.js";import"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import"./chunk-SIYMMMKQ.js";import"./chunk-WHZ44BAL.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import"./chunk-ACIMXBIC.js";import"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import{m as J,n as O}from"./chunk-6X2OBNJQ.js";import{c as W,h as R,m as k,z as N}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{H as T,J as B,f as w,j as E,k as A,m as F,n as D}from"./chunk-MTUIRWOB.js";import{$c as p,Gb as b,Gc as a,Ic as f,Kc as g,Lc as u,Mb as I,Mc as y,Rc as M,Sc as P,Yb as d,Z as h,ac as L,ad as c,bd as S,ic as n,jc as o,rb as r,tc as C,v,xb as _}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var G=()=>["/menu/log/inventory/detail"],K=l=>({ID:l});function Q(l,V){if(l&1&&(n(0,"tr")(1,"td")(2,"a",18),a(3),p(4,"date"),o()(),n(5,"td"),a(6),p(7,"number"),o(),n(8,"td")(9,"span",19),a(10),o()()()),l&2){let t=V.$implicit;r(2),d("routerLink",M(13,G))("queryParams",P(14,K,t._id)),r(),f(" ",S(4,7,t==null?null:t._source["@timestamp"],"dd MMM yyyy HH:mm:ss")," "),r(3),f("",S(7,10,t.DurationInSecond,"1.1-1")," s"),r(3),L((t==null?null:t.respCode)===200||(t==null?null:t.respCode)===202?"bg-success":"bg-warning"),r(),f(" ",t==null?null:t.respCode," ")}}var me=(()=>{class l{constructor(t){this.inventoryAsyncServiceLog=t,this.filters={PageNumber:1,RowCount:100,From:null,To:null,StatusCode:"",JobID:""}}ngOnInit(){this.initInventoryLog()}initInventoryLog(){let t=this.inventoryAsyncServiceLog.getInventoryAsyncLog(this.filters).pipe(h(1));this.inventoryLog$=t.pipe(v(m=>m?.hits)),this.totalPagination$=t.pipe(v(m=>m?.total.value))}onPaginationChange(t){this.filters.PageNumber=t.pageIndex+1,this.initInventoryLog()}onSubmitFilter(){this.initInventoryLog()}static{this.\u0275fac=function(m){return new(m||l)(_(j))}}static{this.\u0275cmp=b({type:l,selectors:[["app-inventory-async-log"]],decls:42,vars:17,consts:[["headerTitle","Order Inventory Sync Job",3,"onSubmit","hideSearchBox"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-success"],["container",""],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"mt-5"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","JobID",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(m,e){m&1&&(n(0,"mainpanel",0),C("onSubmit",function(){return e.onSubmitFilter()}),n(1,"actions")(2,"a",1),a(3," Channel Inventory Sync "),o()(),n(4,"filters")(5,"div",2)(6,"div")(7,"label",3),a(8,"From/To"),o(),n(9,"div",4)(10,"datepicker",5),y("dateChange",function(i){return u(e.filters.From,i)||(e.filters.From=i),i}),o()(),n(11,"div")(12,"datepicker",6),y("dateChange",function(i){return u(e.filters.To,i)||(e.filters.To=i),i}),o()()(),n(13,"div",7)(14,"label"),a(15,"Response Code"),o(),n(16,"input",8),y("ngModelChange",function(i){return u(e.filters.StatusCode,i)||(e.filters.StatusCode=i),i}),o()(),n(17,"div",7)(18,"label"),a(19,"JobID"),o(),n(20,"input",9),y("ngModelChange",function(i){return u(e.filters.JobID,i)||(e.filters.JobID=i),i}),o()()()(),n(21,"content")(22,"div",10)(23,"div",11)(24,"div",12)(25,"div",13)(26,"table",14)(27,"thead")(28,"tr",15)(29,"th"),a(30,"Created"),o(),n(31,"th"),a(32,"Duration"),o(),n(33,"th"),a(34,"Response code"),o()()(),n(35,"tbody"),I(36,Q,11,16,"tr",16),p(37,"async"),o()(),n(38,"mat-paginator",17),p(39,"async"),p(40,"async"),p(41,"async"),C("page",function(i){return e.onPaginationChange(i)}),o()()()()()()()),m&2&&(d("hideSearchBox",!0),r(10),g("date",e.filters.From),r(2),g("date",e.filters.To),r(4),g("ngModel",e.filters.StatusCode),r(4),g("ngModel",e.filters.JobID),r(16),d("ngForOf",c(37,9,e.inventoryLog$)),r(2),d("length",c(39,11,e.totalPagination$))("pageSize",e.filters.RowCount>c(40,13,e.totalPagination$)?c(41,15,e.totalPagination$):e.filters.RowCount)("pageIndex",(e.filters==null?null:e.filters.PageNumber)==0?0:(e.filters==null?null:e.filters.PageNumber)-1))},dependencies:[N,W,R,k,D,w,E,F,A,O,J,q,H,z,B,T],encapsulation:2})}}return l})();export{me as InventoryAsyncLogComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as le}from"./chunk-MKOJVMRR.js";import{a as oe}from"./chunk-G4OF4YLE.js";import"./chunk-2DJWDXTZ.js";import{a as re}from"./chunk-ABQG3LB5.js";import{a as ee,b as te}from"./chunk-KX5AWR75.js";import{a as ne}from"./chunk-E2CS7ZMC.js";import"./chunk-R76V3PTN.js";import{a as ie}from"./chunk-5EQNOCXP.js";import"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import"./chunk-WHZ44BAL.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import"./chunk-PZ4PSWYM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as X}from"./chunk-PB2SJSML.js";import{e as Q}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import"./chunk-PW42BQIY.js";import{m as Z,n as $}from"./chunk-6X2OBNJQ.js";import{c as G,h as U,m as q,o as J,z as K}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import{s as Y}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{j as z,k as j,m as H,n as R}from"./chunk-MTUIRWOB.js";import{$c as S,Gb as O,Gc as m,Hc as _,Kc as c,Lc as u,Mb as W,Mc as C,Nc as k,Oc as D,Pc as F,Ra as V,Yb as g,Z as T,ad as M,bd as A,dc as I,ec as L,gc as N,hc as B,ic as e,ja as P,jc as t,kc as y,oc as v,pa as h,rb as a,tc as x,uc as w,v as E,ya as p,za as s}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var ae=(()=>{class r{constructor(){this.httpService=h(Q)}getCancelledOrders(o){return this.httpService.post(X.GetCancelled,o).pipe(E(l=>l.Data))}static{this.\u0275fac=function(l){return new(l||r)}}static{this.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();function de(r,b){if(r&1&&(e(0,"tr")(1,"td"),m(2),t(),e(3,"td"),y(4,"order-link",24),t(),e(5,"td"),m(6),t(),e(7,"td"),m(8),S(9,"number"),t(),e(10,"td"),m(11),S(12,"date"),t(),e(13,"td"),y(14,"app-channel-logo",25),t()()),r&2){let o=b.$implicit;a(2),_(o.Outlet),a(2),g("order",o),a(2),_(o.Customer),a(2),_(M(9,6,o.Amount)),a(3),_(A(12,8,o.Created,"dd MMM yyyy HH:mm")),a(3),g("typeId",o==null?null:o.TypeID)}}function pe(r,b){if(r&1){let o=v();e(0,"div",13)(1,"table",15)(2,"thead",16)(3,"tr",17)(4,"th",18),m(5,"Outlet"),t(),e(6,"th",19),m(7,"Order number"),t(),e(8,"th"),m(9,"Customer"),t(),e(10,"th",20),m(11,"Amount"),t(),e(12,"th",21),m(13," Created On "),t(),e(14,"th",22),m(15,"Channel"),t()()(),e(16,"tbody"),N(17,de,15,11,"tr",null,L),t()(),e(19,"app-custom-paginator",23),x("next",function(){p(o);let i=w();return s(i.initCancelledOrders())})("previous",function(){p(o);let i=w();return s(i.initCancelledOrders())}),t()()}if(r&2){let o=w(),l=F(0);a(17),B(l),a(2),g("filter",o.filter())("totaldata",l==null?null:l.length)("paginationTotal",l==null?null:l.length)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}function se(r,b){r&1&&(e(0,"div",14),y(1,"app-empty-state"),t())}var De=(()=>{class r{constructor(){this.cancelledService=h(ae),this.filter=V({PageNumber:1,PageSize:100,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initCancelledOrders()}initCancelledOrders(){this.cancelledOrders$=this.cancelledService.getCancelledOrders(this.filter()).pipe(T(1))}static{this.\u0275fac=function(l){return new(l||r)}}static{this.\u0275cmp=O({type:r,selectors:[["app-cancelled"]],decls:29,vars:11,consts:[["headerTitle","Cancelled","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"],[3,"order"],[3,"typeId"]],template:function(l,i){if(l&1){let d=v();k(0),S(1,"async"),e(2,"mainpanel",0),x("onSubmit",function(){return p(d),s(i.initCancelledOrders())}),C("textChange",function(n){return p(d),u(i.filter().Number,n)||(i.filter().Number=n),s(n)}),e(3,"filters")(4,"div")(5,"label",1),m(6,"From/To"),t(),e(7,"channel-select-options",2),C("ngModelChange",function(n){return p(d),u(i.filter().ListChannelID,n)||(i.filter().ListChannelID=n),s(n)}),t()(),e(8,"div",3)(9,"label",1),m(10,"From/To"),t(),e(11,"div",4)(12,"datepicker",5),C("dateChange",function(n){return p(d),u(i.filter().From,n)||(i.filter().From=n),s(n)}),t()(),e(13,"div")(14,"datepicker",6),C("dateChange",function(n){return p(d),u(i.filter().To,n)||(i.filter().To=n),s(n)}),t()()(),e(15,"div",3)(16,"label",7),m(17,"Page Number"),t(),e(18,"input",8),C("ngModelChange",function(n){return p(d),u(i.filter().PageNumber,n)||(i.filter().PageNumber=n),s(n)}),t()(),e(19,"div",3)(20,"label",7),m(21,"Page Size"),t(),e(22,"input",9),C("ngModelChange",function(n){return p(d),u(i.filter().PageSize,n)||(i.filter().PageSize=n),s(n)}),t()()(),e(23,"content")(24,"div",10)(25,"div",11)(26,"div",12),W(27,pe,20,5,"div",13)(28,se,2,0,"div",14),t()()()()()}if(l&2){let d=D(M(1,8,i.cancelledOrders$));a(2),c("text",i.filter().Number),a(5),g("multiple",!0),c("ngModel",i.filter().ListChannelID),a(5),c("date",i.filter().From),a(2),c("date",i.filter().To),a(4),c("ngModel",i.filter().PageNumber),a(4),c("ngModel",i.filter().PageSize),a(5),I((d==null?null:d.length)>0?27:28)}},dependencies:[R,z,H,j,$,Z,ne,ie,K,G,J,U,q,oe,re,Y,le,te,ee],encapsulation:2})}}return r})();export{De as CancelledComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ht}from"./chunk-ZIOAOUAM.js";import"./chunk-SIYMMMKQ.js";import{b as ut}from"./chunk-UPYS4A4M.js";import"./chunk-OKAPL3YZ.js";import{a as Z}from"./chunk-5DIRXS7I.js";import{a as st,b as at,d as lt,e as ct}from"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-SXLKJLAE.js";import{i as rt}from"./chunk-
|
|
1
|
+
import{c as ht}from"./chunk-ZIOAOUAM.js";import"./chunk-SIYMMMKQ.js";import{b as ut}from"./chunk-UPYS4A4M.js";import"./chunk-OKAPL3YZ.js";import{a as Z}from"./chunk-5DIRXS7I.js";import{a as st,b as at,d as lt,e as ct}from"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-SXLKJLAE.js";import{i as rt}from"./chunk-PZ4PSWYM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-PB2SJSML.js";import{b as et,e as it}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import{b as h,c as tt}from"./chunk-PW42BQIY.js";import{m as dt,n as gt}from"./chunk-6X2OBNJQ.js";import{h as Q,m as X,z as Y}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{b as nt,c as ot}from"./chunk-UJYSVGLV.js";import{r as mt,s as pt}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{J as y,f as J,g as G,j as q,n as L}from"./chunk-MTUIRWOB.js";import{$c as C,Fc as P,Gb as V,Gc as a,Hb as S,Hc as u,Ic as W,Kc as w,Lc as D,Mb as g,Mc as R,Nc as $,Oc as A,Pc as H,Sc as z,Yb as l,Z as M,aa as F,ad as x,cd as U,ea as k,ic as o,jc as r,ka as f,kc as j,lc as T,mc as N,oc as O,pb as K,q as B,rb as s,tc as I,uc as c,v,xb as _,ya as b,za as E}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ct=e=>[e];function xt(e,m){if(e&1&&(o(0,"span",15),j(1,"img",16),r(),o(2,"span"),a(3),r()),e&2){let t=m.item;s(),l("src",t.Img,K)("alt",t.Name),s(2),W(" ",t.Name," ")}}function Lt(e,m){if(e&1){let t=O();T(0),$(1),C(2,"async"),o(3,"a",17),I("click",function(){b(t);let n=H(1),p=c();return E(p.submitLogistics(n))}),a(4,"Submit"),r(),N()}if(e&2){let t=c();s(),A(x(2,0,t.logisticServices$))}}function yt(e,m){}function vt(e,m){if(e&1){let t=O();o(0,"ng-select",20),R("ngModelChange",function(n){b(t);let p=c(2).$implicit;return D(p.ProductSKU,n)||(p.ProductSKU=n),E(n)}),r()}if(e&2){let t=c().ngIf,i=c().$implicit;w("ngModel",i.ProductSKU),l("items",t)}}function Mt(e,m){if(e&1&&(o(0,"span"),a(1),r()),e&2){let t=c(2).$implicit;s(),u(t.ProductSKU||"-")}}function bt(e,m){if(e&1&&(T(0),g(1,yt,0,0,"ng-template",19)(2,vt,1,2,"ng-template",null,0,U)(4,Mt,2,1,"ng-template",null,1,U),N()),e&2){let t=P(3),i=P(5),n=c(2);s(),l("ngxPermissionsOnly",z(3,Ct,n.logisticEditRole))("ngxPermissionsOnlyThen",t)("ngxPermissionsOnlyElse",i)}}function Et(e,m){if(e&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td"),a(4),r(),o(5,"td"),a(6),r(),o(7,"td"),g(8,bt,6,5,"ng-container",18),C(9,"async"),r()()),e&2){let t=m.$implicit,i=c();s(2),u(t.Name),s(2),u(t.Service),s(2),u(t.TypeString),s(2),l("ngIf",x(9,4,i.logisticOptions$))}}var _t=(()=>{class e{constructor(t,i,n){this.http=t,this.toastr=i,this.authService=n,this.filter={ChannelID:""},this.logisticEditRole=Z.LogisticUpdate,this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let t=[h.WooCommerce,h.Lazada,h.Shopify,h.Plugo,h.Tokopedia];this.channelOptions=this.channelOptions.map(i=>(t.forEach(n=>{i.TypeID===n&&(i.disabled=!0)}),i))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(t=>{this.filter=t.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(M(1))}submitLogistics(t){this.clonedLogisticServices$.pipe(v(i=>t.map(n=>(i.findIndex(d=>d.Name===n.Name&&d.ProductSKU==n.ProductSKU)==-1&&(n.IsChange=!0),n))),F(i=>this.http.post("/api/Logistic/Submit",i))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(v(t=>t.map(i=>(i.ProductSKU=tt.IsEmpty(i.ProductSKU)?null:i.ProductSKU,i))),k(t=>{let i=JSON.parse(JSON.stringify(t));this.clonedLogisticServices$=B(i)}),M(1))}iniTitle(){let t=this.channelOptions.find(i=>i.ID==this.filter.ChannelID);this.channelName=t?t.Name:null}static{this.\u0275fac=function(i){return new(i||e)(_(it),_(et),_(rt))}}static{this.\u0275cmp=V({type:e,selectors:[["app-logistic"]],standalone:!1,decls:28,vars:9,consts:[["thenBlock",""],["elseBlock",""],["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngxPermissionsOnly"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[4,"ngIf"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(i,n){i&1&&(o(0,"mainpanel",2),I("onSubmit",function(){return n.getLogisticService()}),o(1,"filters")(2,"div")(3,"label",3),a(4,"Select a Channel"),r(),o(5,"ng-select",4),R("ngModelChange",function(d){return D(n.filter.ChannelID,d)||(n.filter.ChannelID=d),d}),g(6,xt,4,3,"ng-template",5),r()()(),o(7,"actions"),g(8,Lt,5,3,"ng-container",6),r(),o(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"table",11)(15,"thead",12)(16,"tr",13)(17,"th"),a(18,"Logistic"),r(),o(19,"th"),a(20,"Service"),r(),o(21,"th"),a(22,"Type"),r(),o(23,"th"),a(24,"Logistic Service"),r()()(),o(25,"tbody"),g(26,Et,10,6,"tr",14),C(27,"async"),r()()()()()()()()),i&2&&(l("headerTitle","Logistic Courier - "+n.channelName)("hideSearchDropdown",!1),s(5),l("clearable",!1)("items",n.channelOptions),w("ngModel",n.filter.ChannelID),s(3),l("ngxPermissionsOnly",n.logisticEditRole),s(18),l("ngForOf",x(27,7,n.logisticServices$)))},dependencies:[J,G,Q,X,dt,lt,st,at,mt,nt,q],encapsulation:2})}}return e})();var Tt=[{path:"",component:_t}],St=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y.forChild(Tt)]})}}return e})();var oe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y,St,Y,gt,ct,ut,ht,pt,ot]})}}return e})();export{oe as LogisticModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-PB2SJSML.js";import{e as p}from"./chunk-4M63ID5T.js";import{ja as o,pa as i}from"./chunk-JS55A2RS.js";var G=(()=>{class e{constructor(){this.httpService=i(p)}getGroupsLoader(){return this.httpService.get(r.GetGroupsLoader)}getGroups(t){return this.httpService.post(r.GetGroups,t)}getGroupsForm(t){return this.httpService.post(r.GetGroupFormLoader,{ID:t})}submitGroup(t){return this.httpService.post(r.SubmitGroup,t)}deleteGroups(t){return this.httpService.post(r.DeleteGroups,{ListID:t})}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275prov=o({token:e,factory:e.\u0275fac})}}return e})();export{G as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as D}from"./chunk-CRZOIZUQ.js";import{a as fe}from"./chunk-ZNDU44GH.js";import"./chunk-F4GMWHYJ.js";import{a as U}from"./chunk-5DIRXS7I.js";import"./chunk-VRI3CYGG.js";import"./chunk-AVEGIEYT.js";import{a as re}from"./chunk-Z3ITXK3D.js";import{a as pe}from"./chunk-ACIMXBIC.js";import"./chunk-PB2SJSML.js";import{b as ae}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{c as oe}from"./chunk-PW42BQIY.js";import{m as me,n as ue}from"./chunk-6X2OBNJQ.js";import{z as ie}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{b as le,c as se}from"./chunk-UJYSVGLV.js";import{r as de,s as ce}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{E as Y,G as ee,H as te,J as ne,d as K,g as Q,j as W,m as X,n as P}from"./chunk-MTUIRWOB.js";import{$c as _,Gb as x,Gc as s,Hc as h,Ic as z,Jb as L,Mb as m,Nc as q,Oc as $,Pc as C,Qc as j,Sc as I,Tc as J,Yb as p,Z as V,aa as w,ac as S,ad as y,dc as T,ec as k,gc as A,hc as H,ic as a,jc as l,kc as u,lc as g,mc as v,ob as F,oc as B,pa as b,rb as r,rd as Z,tc as G,uc as c,v as M,ya as R,za as N}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import{a as E,b as O}from"./chunk-66YHNWRR.js";var ge=(()=>{class t{transform(e){return typeof e=="number"&&(e=e.toString()),e!=null?e.replace(/\n/g,"<br />"):e}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275pipe=L({name:"newlines",type:t,pure:!0})}}return t})();var Ce=t=>({disabled:t}),_e=(t,d)=>({labelFilledInput:t,labelEmptyInput:d});function ye(t,d){if(t&1&&(a(0,"p"),s(1),_(2,"number"),l()),t&2){let e=c();r(),h(e.inputValueType()==="number"?y(2,1,e.inputValue):e.inputValue)}}function xe(t,d){if(t&1&&(u(0,"p",3),_(1,"newlines")),t&2){let e=c();p("innerHTML",y(1,1,e.inputValue),F)}}function Ie(t,d){if(t&1&&(g(0),s(1),v()),t&2){let e=c();r(),z(" ",e.labelValue," ")}}var ve=(()=>{class t{constructor(){this.inputValue="",this.labelValue="",this.inputType="input",this.labelVisible=!0,this.disabled=!1,this.class="mb-6",this.tooltip="",this.isInputFilled=!1,this.isNotEmpty=pe.IsNotEmpty}inputValueType(){return typeof this.inputValue}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["lib-info-page-input"]],inputs:{inputValue:"inputValue",labelValue:"labelValue",inputType:"inputType",labelVisible:"labelVisible",disabled:"disabled",class:"class",tooltip:"tooltip"},decls:5,vars:14,consts:[["matTooltipPosition","above",3,"ngClass","matTooltip"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(o,n){o&1&&(a(0,"div",0),m(1,ye,3,3,"p",1)(2,xe,2,3,"p",2),a(3,"label"),m(4,Ie,2,1,"ng-container",1),l()()),o&2&&(S(n.class),p("ngClass",I(9,Ce,n.disabled))("matTooltip",n.tooltip),r(),p("ngIf",n.isNotEmpty(n.inputValue)&&n.inputType=="input"),r(),p("ngIf",n.isNotEmpty(n.inputValue)&&n.inputType=="textarea"),r(),S(J(11,_e,n.isNotEmpty(n.inputValue),!n.isNotEmpty(n.inputValue))),r(),p("ngIf",n.labelVisible))},dependencies:[P,K,Q,X,ge,ce,de],styles:["div[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;margin-bottom:1rem;border-radius:.25rem!important}p[_ngcontent-%COMP%]{margin-top:18px;margin-bottom:18px;padding-left:.75rem!important;font-size:.875rem}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}.labelEmptyInput[_ngcontent-%COMP%]{margin-top:18px;margin-bottom:18px;padding-left:.75rem!important;font-size:.875rem;color:#ccc}.disabled[_ngcontent-%COMP%]{background-color:#e9ecef;opacity:1}"]})}}return t})();var Pe=t=>({ID:t});function Me(t,d){if(t&1){let e=B();a(0,"button",24),G("click",function(){R(e);let n=c(2),i=C(0);return N(n.onDeleteUser(i==null||i.selectedUser==null?null:i.selectedUser.ID))}),u(1,"i",25),s(2," Delete "),l()}}function Se(t,d){if(t&1&&(g(0),m(1,Me,3,0,"button",23),v()),t&2){let e,o=c(),n=C(0);r(),T((n==null||n.selectedUser==null?null:n.selectedUser.Name)!==((e=o.currentLoginUser())==null?null:e.username)?1:-1)}}function Te(t,d){if(t&1&&(g(0),a(1,"a",26),u(2,"i",27),s(3," Edit "),l(),v()),t&2){c();let e=C(0);r(),p("queryParams",I(1,Pe,e==null||e.selectedUser==null?null:e.selectedUser.ID))}}function Ue(t,d){t&1&&(a(0,"div",20),s(1," All channels assigned to this user "),l())}function De(t,d){if(t&1&&u(0,"p-chip",28),t&2){let e=d.$implicit;p("label",e.Name)("image",e.logo)("alt",e.Name)}}function Ee(t,d){if(t&1&&A(0,De,1,3,"p-chip",28,k),t&2){c();let e=C(0);H(e==null?null:e.selectedChannels)}}var ot=(()=>{class t{constructor(){this.userService=b(D),this.activatedRoute=b(Y),this.toastService=b(ae),this.router=b(ee),this.userLoader$=this.activatedRoute.queryParams.pipe(w(e=>{let o=e.ID||null;return this.userService.getUserFormLoader(o).pipe(V(1),M(n=>(n.Options.Channels=oe.assignChannelLogo(n.Options.Channels),n)))}),M(e=>{let o=e.Options.Users.find(f=>f.ID===e.Form?.ID),n=e.Options.Groups.find(f=>f.ID===e.Form?.GroupID),i=e.Options.Channels.filter(f=>e.UserChannels?.includes(f.ID));return O(E({},e),{selectedUser:o||null,selectedGroup:n||null,selectedChannels:i||[],DownloadOrderDaysRange:e.Form?.DownloadOrderDaysRange||"0"})})),this.userEditRole=U.UserEdit,this.userDeleteRole=U.UserDelete,this.currentLoginUser=Z(()=>{let e=localStorage.getItem(re.AUTHORIZATION);return e?JSON.parse(e):null})}onDeleteUser(e){confirm("Are you sure you want to delete this user?")&&this.userService.deleteUsers([e]).subscribe({next:()=>{this.router.navigate(["/menu/users/users"]),this.toastService.success("User deleted successfully","Success")}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["app-user-info"]],features:[j([D])],decls:50,vars:12,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","group","aria-label","User Actions",1,"btn-group"],[4,"ngxPermissionsOnly"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row","mt-8"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8","pb-4"],[1,"row"],[1,"col-6"],[1,"info-label-group"],["id","myTab","role","tablist",1,"nav","nav-tabs"],["role","presentation",1,"nav-item"],["id","channel-tab","data-bs-toggle","tab","data-bs-target","#channel-tab-pane","type","button","role","tab","aria-controls","channel-tab-pane","aria-selected","true",1,"nav-link","active"],["id","restriction-tab","data-bs-toggle","tab","data-bs-target","#restriction-tab-pane","type","button","role","tab","aria-controls","restriction-tab-pane","aria-selected","false",1,"nav-link"],[1,"card","rounded-0","border-top-0"],[1,"card-body","pb-4"],["id","myTabContent",1,"tab-content"],["id","channel-tab-pane","role","tabpanel","aria-labelledby","channel-tab","tabindex","0",1,"tab-pane","fade","show","active"],[1,"text-center","fs-5","opacity-50"],["id","restriction-tab-pane","role","tabpanel","aria-labelledby","restriction-tab-pane","tabindex","1",1,"tab-pane","fade"],["tooltip","How many days of past orders this user can download.","labelValue","Download Order Days Range","inputType","input",3,"inputValue"],[1,"btn","btn-outline-secondary"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-trash","me-1"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-outline-secondary",3,"queryParams"],[1,"fa","fa-edit","me-1"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"]],template:function(o,n){if(o&1&&(q(0),_(1,"async"),a(2,"mainpanel",0)(3,"actions")(4,"div",1),m(5,Se,2,1,"ng-container",2)(6,Te,4,3,"ng-container",2),l()(),a(7,"content")(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"h3"),s(14,"User Information"),l()(),a(15,"div",8)(16,"div",9)(17,"div",10)(18,"div",11)(19,"label"),s(20,"Selected User"),l(),a(21,"div")(22,"span"),s(23),l()()()(),a(24,"div",10)(25,"div",11)(26,"label"),s(27,"Selected Group"),l(),a(28,"div")(29,"span"),s(30),l()()()()()()()()(),a(31,"div",9)(32,"div",5)(33,"ul",12)(34,"li",13)(35,"button",14),s(36," Channels Filter "),l()(),a(37,"li",13)(38,"button",15),s(39," Restriction "),l()()(),a(40,"div",16)(41,"div",17)(42,"div",18)(43,"div",19),m(44,Ue,2,0,"div",20)(45,Ee,2,0),l(),a(46,"div",21)(47,"div",9)(48,"div",10),u(49,"lib-info-page-input",22),l()()()()()()()()()()()),o&2){let i=$(y(1,9,n.userLoader$));r(2),p("headerTitle",(i==null||i.selectedUser==null?null:i.selectedUser.Name)+" Info")("hideSearchBox",!0)("hideSearchDropdown",!0),r(3),p("ngxPermissionsOnly",n.userDeleteRole),r(),p("ngxPermissionsOnly",n.userEditRole),r(17),h(i==null||i.selectedUser==null?null:i.selectedUser.LoginID),r(7),h(i==null||i.selectedGroup==null?null:i.selectedGroup.Name),r(14),T((i==null||i.selectedChannels==null?null:i.selectedChannels.length)===0?44:45),r(5),p("inputValue",i==null?null:i.DownloadOrderDaysRange)}},dependencies:[P,W,ue,me,ie,ne,te,fe,se,le,ve],styles:[".nav-tabs[_ngcontent-%COMP%] .nav-link.active[_ngcontent-%COMP%]:hover, .nav-tabs[_ngcontent-%COMP%] .nav-link.active[_ngcontent-%COMP%]:focus, .nav-tabs[_ngcontent-%COMP%] .nav-item.show[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover, .nav-tabs[_ngcontent-%COMP%] .nav-item.show[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:focus{background-color:#fff!important;border-color:#dee2e6 #dee2e6 #fff}"]})}}return t})();export{ot as UserInfoComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
1
|
+
import{a as g}from"./chunk-PB2SJSML.js";import{b as l,e as h}from"./chunk-4M63ID5T.js";import{ja as c,oa as o}from"./chunk-JS55A2RS.js";var S=(()=>{class n{constructor(r,t){this.toastrService=r,this.http=t}refreshInventory(r){let t=r.map(e=>e.Channel.map(a=>(a.VariantID=e.ID,a))).reduce((e,s)=>(e=e.concat(s),e),[]).map(e=>({ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID,VariantID:e.VariantID,ChannelVariationID:e.ChannelVariationID}));return this.http.post(g.RefreshInventory,t)}showToastrUpdateInventory(r,t,e){let s=t.length>0,a=e.length>0;if(!a&&s&&this.toastrService.success(`${this.generateSuccessMessage(t.length)}`,"Success",{enableHtml:!0}),a&&s){let i=`<li>${this.generateSuccessMessage(t.length)}</li>`,u=this.generateErrorMessage(r,e),m=`<ol>${i} ${u}</ol>`;this.toastrService.warning(m,"Warning",{enableHtml:!0})}if(a&&!s){let i=`<ol>${this.generateErrorMessage(r,e)}</ol>`;this.toastrService.error(i,"Error",{enableHtml:!0})}}generateSuccessMessage(r){return`
|
|
2
2
|
<div>
|
|
3
3
|
<span class="fw-bold">Successfully</span> updated ${r} variants in 1 channels
|
|
4
4
|
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as k}from"./chunk-CRZOIZUQ.js";import{a as Ve}from"./chunk-GHBGGQNM.js";import{a as Te,b as De}from"./chunk-ZNDU44GH.js";import{b as ke,c as Ee}from"./chunk-5XI7HWS5.js";import{a as be}from"./chunk-O6U5QCHJ.js";import{a as we}from"./chunk-5QAURMZF.js";import"./chunk-NZA4BEER.js";import"./chunk-JV4MMNGD.js";import"./chunk-GZXQUJKX.js";import"./chunk-ALKC77XL.js";import"./chunk-NTW6FBP5.js";import"./chunk-LR4UZ2OS.js";import"./chunk-F4GMWHYJ.js";import{a as Y}from"./chunk-5DIRXS7I.js";import"./chunk-KXS76PRS.js";import"./chunk-OZ7LWNOK.js";import"./chunk-VRI3CYGG.js";import"./chunk-AVEGIEYT.js";import{d as he,e as fe}from"./chunk-SYENQYR7.js";import{a as ue}from"./chunk-Z3ITXK3D.js";import"./chunk-PB2SJSML.js";import{b as Z}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{c as de}from"./chunk-PW42BQIY.js";import{b as xe,c as te,d as ye,j as Se,k as Ue,m as ve,n as Me}from"./chunk-6X2OBNJQ.js";import{b as me,h as z,m as j,z as H}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{a as _e,b as ge,c as Ce}from"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{H as ce,J as pe,j as $,n as q}from"./chunk-MTUIRWOB.js";import{$b as K,$c as A,G as se,Gb as B,Gc as g,Hc as Q,Ic as D,Kb as le,Kc as v,Lc as M,Mb as x,Mc as w,Nc as O,Oc as N,Pc as C,Qc as W,Ra as S,Rc as X,Sc as ee,Yb as _,Z as E,ad as F,dc as U,ea as J,ec as V,gc as P,hc as I,ic as o,jc as s,kc as L,lc as b,mc as T,oc as y,pa as f,pb as ae,q as oe,rb as a,rd as R,tc as h,uc as l,v as G,ya as c,za as p}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import{a as ne,b as re}from"./chunk-66YHNWRR.js";var ie=function(i){return i.ERROR="https://res.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg",i.UNAUTHORIZED="https://res.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",i.EMPTY_LIST="https://res.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg",i.REMOVE="https://res.cloudinary.com/pos/image/upload/v1706156973/icons/globalerrorclear.svg",i}(ie||{});var Pe=()=>({display:"d-flex"});function Fe(i,m){if(i&1&&(o(0,"div",6),L(1,"img",9),o(2,"p",10),g(3," All users already migrated. "),s()()),i&2){let e=l();a(),_("src",e.emptyStateIcon,ae)}}function Re(i,m){if(i&1){let e=y();o(0,"div",14)(1,"p-checkBox",15),w("ngModelChange",function(t){let n=c(e).$implicit;return M(n.selected,t)||(n.selected=t),p(t)}),h("ngModelChange",function(){c(e);let t=l(2),n=C(0);return p(t.onUserCheckChange(n))}),s(),o(2,"label",16),g(3),s()()}if(i&2){let e=m.$implicit;a(),K(X(7,Pe)),_("binary",!0)("id",e.ID),v("ngModel",e.selected),a(),_("for",e.ID),a(),D(" ",e.Name," ")}}function Ge(i,m){if(i&1){let e=y();o(0,"div",11)(1,"p-checkBox",12),w("ngModelChange",function(t){c(e);let n=l();return M(n.isCheckAll,t)||(n.isCheckAll=t),p(t)}),h("ngModelChange",function(t){c(e);let n=l(),d=C(0);return p(n.onCheckAllChange(t,d))}),s(),o(2,"label",13),g(3," Check All "),s()(),P(4,Re,4,8,"div",14,V)}if(i&2){let e=l(),r=C(0);a(),K(X(4,Pe)),_("binary",!0),v("ngModel",e.isCheckAll),a(3),I(r)}}var Ie=(()=>{class i extends be{constructor(){super(),this.dialogRef=f(xe),this.data=f(te),this.userService=f(k),this.dialogData=f(te),this.toastr=f(Z),this.userGroups=R(()=>this.dialogData.userGroups||[]),this.availableUsers=R(()=>{let e=new Map;return this.dialogData.availableUsers.forEach(r=>e.set(r.ID,r)),e}),this.migrateLoader$=this.userService.getUserMigrateLoader().pipe(G(e=>e.Data),G(e=>e.filter(t=>this.availableUsers().has(t.ID)===!1)),G(e=>e.map(t=>(t.selected=!0,t))),E(1)),this.isCheckAll=S(!0),this.selectedGroup=S(null),this.emptyStateIcon=ie.EMPTY_LIST,this.config=new Se,this.config.title="Migrate Users",this.config.customWidth="600px"}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}onUserCheckChange(e){let r=e.every(t=>t.selected);this.isCheckAll.set(r)}onCheckAllChange(e,r){this.isCheckAll.set(e),r.forEach(t=>t.selected=e)}onClose(){this.dialogRef.close(!1)}onSubmit(e){let r=e.filter(n=>n.selected);if(r.length===0){this.toastr.error("Please select at least one user","Error");return}if(de.IsEmpty(this.selectedGroup())){this.toastr.error("Please select a user group","Error");return}let t={userIds:r.map(n=>n.ID),groupId:this.selectedGroup()};this.userService.migrateUser(t).subscribe(()=>{this.dialogRef.close(!0),this.toastr.success("Users migrated successfully","Success")})}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-migrate-dialog"]],features:[W([k]),le],decls:15,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"row"],[1,"col","border-end"],[1,"modal-title","mb-8"],[1,"mt-5"],[1,"d-flex","flex-column","align-items-center","mt-5"],[1,"col"],["optionLabel","Name","optionValue","ID","placeholder","Select a Channel","filterBy","Name","appendTo","body",1,"w-100",3,"click","ngModelChange","options","filter","ngModel"],["alt","No users found",2,"width","100px","height","100px",3,"src"],[1,"text-muted","mt-4","opacity-50",2,"margin-bottom","0px"],[1,"d-flex","w-100","align-items-center","mb-4"],["id","checkBoxAll",3,"ngModelChange","binary","ngModel"],["for","checkBoxAll",1,"ms-2"],[1,"d-flex","w-100","align-items-center","mb-3","ms-10"],[3,"ngModelChange","binary","id","ngModel"],[1,"ms-2",3,"for"]],template:function(r,t){if(r&1){let n=y();O(0),A(1,"async"),o(2,"modal-material",0),h("onClose",function(){return c(n),p(t.onClose())})("onCancel",function(){return c(n),p(t.onClose())})("onOk",function(){c(n);let u=C(0);return p(t.onSubmit(u))}),o(3,"div",1)(4,"div",2)(5,"div",3)(6,"h5",4),g(7,"Users from POS"),s(),o(8,"div",5),x(9,Fe,4,1,"div",6)(10,Ge,6,5),s()(),o(11,"div",7)(12,"h5",4),g(13,"Assign Group"),s(),o(14,"p-select",8),h("click",function(){return c(n),p(t.onClickSelect())}),w("ngModelChange",function(u){return c(n),M(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()()()()}if(r&2){let n=N(F(1,5,t.migrateLoader$));a(2),_("config",t.config),a(7),U((n==null?null:n.length)===0?9:10),a(5),_("options",t.userGroups())("filter",!0),v("ngModel",t.selectedGroup)}},dependencies:[q,$,Ue,H,z,j,ke,we],encapsulation:2})}}return i})();var Le=i=>({ID:i});function Be(i,m){if(i&1){let e=y();o(0,"button",13),h("click",function(){c(e);let t=l(2),n=C(0);return p(t.onDeleteUser(n==null?null:n.Filter))}),L(1,"i",14),g(2),s()}if(i&2){let e,r=l(2);a(2),D(" Delete (",(e=r.selectedUsers())==null?null:e.length,") ")}}function We(i,m){if(i&1&&(b(0),x(1,Be,3,1,"button",12),T()),i&2){let e,r=l();a(),U(((e=r.selectedUsers())==null?null:e.length)>0?1:-1)}}function $e(i,m){if(i&1){let e=y();b(0),o(1,"button",15),h("click",function(){c(e);let t=l(),n=C(0),d=C(2);return p(t.onMigrateUser(n==null||n.Options==null?null:n.Options.Groups,d==null?null:d.Data))}),g(2," Migrate "),s(),T()}}function qe(i,m){i&1&&(b(0),o(1,"a",16),g(2," Invite "),s(),T())}function ze(i,m){if(i&1){let e=y();b(0),o(1,"th",17)(2,"div",18)(3,"input",19),h("change",function(t){c(e);let n=l(),d=C(2);return p(n.onCheckAllUser(t.target.checked,d==null?null:d.Data))}),s()()(),T()}}function je(i,m){if(i&1){let e=y();o(0,"div",18)(1,"input",24),w("ngModelChange",function(t){c(e);let n=l(2).$implicit;return M(n.checked,t)||(n.checked=t),p(t)}),h("ngModelChange",function(){c(e);let t=l(3),n=C(2);return p(t.onSelectUser(n==null?null:n.Data))}),s()()}if(i&2){let e=l(2).$implicit;a(),v("ngModel",e.checked)}}function He(i,m){if(i&1&&(b(0),o(1,"td"),x(2,je,2,1,"div",18),s(),T()),i&2){let e,r=l().$implicit,t=l();a(2),U(r.Name!==((e=t.currentLoginUser())==null?null:e.username)?2:-1)}}function Ye(i,m){if(i&1&&(o(0,"a",20),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.UserID)),a(),D(" ",e.Name," ")}}function Ze(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.Name)}}function Je(i,m){if(i&1&&(o(0,"a",21),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.GroupID)),a(),D(" ",e.GroupName," ")}}function Ke(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.GroupName)}}function Qe(i,m){if(i&1&&L(0,"p-chip",23),i&2){let e=m.$implicit;_("label",e.Name)("image",e.Logo)("alt",e.Name)}}function Xe(i,m){if(i&1&&(o(0,"tr"),x(1,He,3,1,"ng-container",3),o(2,"td"),x(3,Ye,2,4,"a",20)(4,Ze,2,1,"span"),s(),o(5,"td"),x(6,Je,2,4,"a",21)(7,Ke,2,1,"span"),s(),o(8,"td")(9,"div",22),P(10,Qe,1,3,"p-chip",23,V),s()()()),i&2){let e=m.$implicit,r=l();a(),_("ngxPermissionsOnly",r.userDeleteRole),a(2),U(r.hasUserEditRole()?3:4),a(3),U(r.hasUserEditRole()?6:7),a(4),I(e.Channels)}}function et(i,m){if(i&1){let e=y();o(0,"app-mat-paginator-no-count",25),h("next",function(){c(e);let t=l(),n=C(0);return p(t.onNextPage(n==null?null:n.Filter))})("previous",function(){c(e);let t=l(),n=C(0);return p(t.onPrevPage(n==null?null:n.Filter))}),s()}if(i&2){l();let e=C(0),r=C(2);_("filter",e==null?null:e.Filter)("totaldata",r==null||r.Data==null?null:r.Data.length)("paginationTotal",r==null?null:r.Count)("hasClicked",!0)}}var Wt=(()=>{class i{constructor(){this.usersService=f(k),this.permissionService=f(_e),this.toastService=f(Z),this.dialog=f(ye),this.userInviteOptions=S([]),this.searchText=S(null),this.selectedGroup=S(null),this.userLoader$=this.usersService.getLoader().pipe(J(e=>{this.userInviteOptions.set(e.Options.Users),this.initUsers(e.Filter)}),E(1)),this.users$=oe({Count:0,Data:[]}),this.userAddRole=Y.UserAdd,this.userDeleteRole=Y.UserDelete,this.hasUserEditRole=S(!1),this.selectedUsers=S([]),this.currentLoginUser=R(()=>{let e=localStorage.getItem(ue.AUTHORIZATION);return e?JSON.parse(e):null}),this.permissionService.hasPermission(Y.UserEdit).then(e=>{this.hasUserEditRole.set(e)})}initUsers(e){let r=re(ne({},e),{Name:this.searchText(),GroupID:this.selectedGroup()});this.users$=this.usersService.getUsers(r).pipe(J(t=>this.filterUserInvtiteOptions(t.Data)),E(1))}filterUserInvtiteOptions(e){this.userInviteOptions.update(r=>r.filter(t=>e.findIndex(n=>n.UserID===t.ID)===-1))}onCheckAllUser(e,r){r.forEach(n=>{n.Name!==this.currentLoginUser()?.username&&(n.checked=e)});let t=r.filter(n=>n.checked);this.selectedUsers.set(t)}onSelectUser(e){let r=e.filter(t=>t.checked);this.selectedUsers.set(r)}onDeleteUser(e={PageNumber:1,PageSize:10}){let r=this.selectedUsers().map(n=>n.UserID);confirm("Are you sure you want to delete selected users?")&&this.usersService.deleteUsers(r).subscribe(()=>{this.selectedUsers.set([]),this.toastService.success("User deleted successfully","Success"),this.initUsers(e)})}onMigrateUser(e,r){this.dialog.open(Ie,{data:{userGroups:e,availableUsers:r}}).afterClosed().pipe(se(t=>t===!0)).subscribe(()=>{this.initUsers({PageNumber:1,PageSize:10})})}onNextPage(e){e.PageNumber+=1,this.initUsers(e)}onPrevPage(e){e.PageNumber-=1,this.initUsers(e)}onSuccessUpdateUser(e){e.PageNumber=1,this.initUsers(e)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-users"]],features:[W([k])],decls:33,vars:17,consts:[["headerTitle","Users","description","Manage your users and their permissions",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","ID","placeholder","Select Group",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","15%"],[3,"filter","totaldata","paginationTotal","hasClicked"],[3,"onSuccessUpdateUser","groups","users"],[1,"btn","btn-danger","me-3"],[1,"btn","btn-danger","me-3",3,"click"],[1,"fa","fa-trash","me-1"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-success"],[2,"width","5px"],[1,"d-flex"],["name","selectAll","type","checkbox",3,"change"],["routerLink","/menu/users/users/info",3,"queryParams"],["routerLink","/menu/users/groups/info",3,"queryParams"],[1,"lh-base"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(r,t){if(r&1){let n=y();O(0),A(1,"async"),O(2),A(3,"async"),o(4,"mainpanel",0),w("textChange",function(u){return c(n),M(t.searchText,u)||(t.searchText=u),p(u)}),h("onSubmit",function(){c(n);let u=C(0);return p(t.initUsers(u==null?null:u.Filter))}),o(5,"filters")(6,"div")(7,"label",1),g(8,"Group"),s(),o(9,"ng-select",2),w("ngModelChange",function(u){return c(n),M(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()(),o(10,"actions"),x(11,We,2,1,"ng-container",3)(12,$e,3,0,"ng-container",3)(13,qe,3,0,"ng-container",3),s(),o(14,"content")(15,"div",4)(16,"div",5)(17,"div",6)(18,"table",7)(19,"thead",8)(20,"tr"),x(21,ze,4,0,"ng-container",3),o(22,"th",9),g(23,"Login ID"),s(),o(24,"th",9),g(25,"Group"),s(),o(26,"th"),g(27,"Channel Filter"),s()()(),o(28,"tbody"),P(29,Xe,12,3,"tr",null,V),s()(),x(31,et,1,4,"app-mat-paginator-no-count",10),s()()()()(),o(32,"invite-group",11),h("onSuccessUpdateUser",function(){c(n);let u=C(0);return p(t.onSuccessUpdateUser(u==null?null:u.Filter))}),s()}if(r&2){let n=N(F(1,11,t.userLoader$));a(2);let d=N(F(3,14,t.users$));a(2),v("text",t.searchText),a(5),_("clearable",!0)("items",n==null||n.Options==null?null:n.Options.Groups),v("ngModel",t.selectedGroup),a(2),_("ngxPermissionsOnly",t.userDeleteRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(8),_("ngxPermissionsOnly",t.userDeleteRole),a(8),I(d==null?null:d.Data),a(2),U(n?31:-1),a(),_("groups",n==null||n.Options==null?null:n.Options.Groups)("users",t.userInviteOptions())}},dependencies:[q,$,Me,ve,pe,ce,Ve,Ce,ge,fe,he,H,me,z,j,Ee,De,Te],encapsulation:2})}}return i})();export{Wt as UsersComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as f}from"./chunk-PW42BQIY.js";import{b as E,c as I,j as K,k as T}from"./chunk-6X2OBNJQ.js";import{r as x}from"./chunk-HFKKITEW.js";import{d as V}from"./chunk-MTUIRWOB.js";import{Gb as b,Gc as m,Hc as h,Ra as _,Sc as S,Yb as p,ec as O,gc as v,hc as P,ic as o,jc as l,rb as d,tc as y,xb as g}from"./chunk-JS55A2RS.js";var N=i=>({"bg-gradient-warning":i});function D(i,U){if(i&1&&(o(0,"tr",5)(1,"td"),m(2),l(),o(3,"td",6),m(4),l()()),i&2){let t=U.$implicit;p("matTooltip",t.duplicateMessage),d(2),h(t==null?null:t.Name),d(),p("ngClass",S(4,N,t.isDuplicate)),d(),h(t!=null&&t.ChannelVariationSKU?t==null?null:t.ChannelVariationSKU:"Not Assigned")}}var z=(()=>{class i{constructor(t,e){this.data=t,this.dialogRef=e,this.variants=_([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,e={},a=[],C=t.filter(n=>f.IsEmpty(n.ChannelVariationSKU));t.filter(n=>f.IsNotEmpty(n.ChannelVariationSKU)).forEach((n,r,M)=>{e[n.ChannelVariationSKU]=M.filter(s=>s.ChannelVariationSKU===n.ChannelVariationSKU)}),Object.keys(e).forEach(n=>{e[n].length>1&&(e[n]=e[n].map((r,M,s)=>{let u=`SKU ${r.ChannelVariationSKU} is duplicated with variant`;return s.forEach((c,k)=>{c.Name!==r.Name&&(u+=` ${s.length>2?c.Name+(k!==s.length-1?",":""):c.Name}`)}),r.duplicateMessage=u,r.isDuplicate=!0,r})),a.push(...e[n])}),a.push(...C),this.variants.set(a)}initModalConfig(){this.modalConfig=new K,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||i)(g(I),g(E))}}static{this.\u0275cmp=b({type:i,selectors:[["app-modal-variants"]],standalone:!1,decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,a){e&1&&(o(0,"modal-material",0),y("onCancel",function(){return a.dialogRef.close()}),o(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),m(6,"Variant"),l(),o(7,"th",4),m(8,"SKU"),l()()(),o(9,"tbody"),v(10,D,5,6,"tr",5,O),l()()()()),e&2&&(p("config",a.modalConfig),d(10),P(a.variants()))},dependencies:[V,x,T],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}"]})}}return i})();export{z as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Ie,b as Ve,c as Re}from"./chunk-2BUABOHG.js";import{a as Ne}from"./chunk-MKOJVMRR.js";import{a as Ee}from"./chunk-G4OF4YLE.js";import"./chunk-2DJWDXTZ.js";import{a as Fe}from"./chunk-ABQG3LB5.js";import{a as Pe}from"./chunk-E2CS7ZMC.js";import"./chunk-R76V3PTN.js";import{a as Me}from"./chunk-5EQNOCXP.js";import"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import"./chunk-WHZ44BAL.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import{c as $,d as ee,e as te}from"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import"./chunk-PZ4PSWYM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as M}from"./chunk-PB2SJSML.js";import{b as ve,e as U}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import{b as y,c as H}from"./chunk-PW42BQIY.js";import{b as ie,c as ne,d as be,e as oe,f as re,g as we,h as ae,m as De,n as Oe}from"./chunk-6X2OBNJQ.js";import{c as ye,h as B,m as z,o as ke,z as V}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import{r as Te,s as xe}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{j as Se,k as j,m as Ce,n as O}from"./chunk-MTUIRWOB.js";import{$c as x,G as pe,Gb as b,Gc as a,Hc as C,Ic as Q,Kc as k,Lc as v,Mb as E,Mc as T,Na as q,Nc as ue,Oa as J,Oc as he,Pc as ge,Qc as fe,Ra as S,Rc as _e,Sc as Y,Yb as u,Z as ce,aa as le,ac as K,ad as X,bd as I,dc as P,ec as N,gc as L,hc as A,ic as o,ja as F,jc as r,kc as w,oc as D,pa as c,pb as de,rb as p,rd as Z,tc as d,uc as h,v as W,ya as f,za as _}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import{a as G,b as me}from"./chunk-66YHNWRR.js";var Le=i=>({"text-muted":i});function qe(i,g){if(i&1){let e=D();o(0,"div",10),d("click",function(){f(e);let n=h();return _(n.onSelectDelivery("DROP_OFF"))}),o(1,"div",11),w(2,"i",12),o(3,"h3",13),a(4,"Drop off"),r()(),o(5,"p",14),a(6," You can drop off your package at the nearest shipping counter in your city. "),r()()}if(i&2){let e=h();K(Y(2,Le,e.selectedDelivery()==="PICK_UP"))}}function Je(i,g){if(i&1){let e=D();o(0,"div",10),d("click",function(){f(e);let n=h();return _(n.onSelectDelivery("PICK_UP"))}),o(1,"div",11),w(2,"i",15),o(3,"h3",13),a(4,"Pick up"),r()(),o(5,"p",14),a(6," The courier will collect the package from your address. "),r()()}if(i&2){let e=h();K(Y(2,Le,e.selectedDelivery()==="DROP_OFF"))}}var Ae=(()=>{class i{constructor(){this.data=c(ne),this.dialogRef=c(ie),this.selectedDelivery=S("DROP_OFF"),this.showPickup=S(!0),this.showDropOff=S(!0),this.initOptionsCondition()}onSelectDelivery(e){this.selectedDelivery.set(e)}initOptionsCondition(){switch(this.data.channelType){case y.Shopee:break;case y.Tiktok:this.showPickup.set(this.data.options?.Form?.information?.can_pickup),this.showDropOff.set(this.data.options?.Form?.information?.can_drop_off);break}}onConfirm(){this.dialogRef.close(this.selectedDelivery())}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=b({type:i,selectors:[["app-delivery-dialog"]],decls:16,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-8"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"ms-2"],[1,"text-secondary-emphasis"],[1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[1,"pb-0"],[1,"d-flex","align-items-center","justify-content-center","gap-12"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"class"],[1,"d-flex","justify-content-center",2,"margin-top","1.5rem"],[1,"btn","btn-success",2,"width","70px",3,"click"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"click"],[1,"text-center"],[1,"fa-solid","fa-cart-shopping-fast","fa-4x"],[1,"mt-4"],[1,"text-center","mt-4","lh-sm"],[1,"fa-solid","fa-hand-holding-box","fa-4x"]],template:function(t,n){t&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),a(4,"Delivery Order"),r(),o(5,"div",3),a(6,"Your selected order(s) will be set to"),r()(),o(7,"div")(8,"i",4),d("click",function(){return n.onClose()}),r()()()(),o(9,"mat-dialog-content",5)(10,"div",6),E(11,qe,7,4,"div",7)(12,Je,7,4,"div",7),r(),o(13,"div",8)(14,"button",9),d("click",function(){return n.onConfirm()}),a(15," OK "),r()()()),t&2&&(p(11),P(n.showPickup()?11:-1),p(),P(n.showDropOff()?12:-1))},dependencies:[O,ae,oe,re],styles:[".delivery-option[_ngcontent-%COMP%]{width:14rem;height:12rem;border:1px solid #656565}.delivery-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.delivery-option.text-muted[_ngcontent-%COMP%]{opacity:.7;border-color:#bebebe}"]})}}return i})();function Xe(i,g){if(i&1&&(o(0,"ng-option",3),a(1),r()),i&2){let e=g.$implicit;u("value",e==null?null:e.address_id)("matTooltip",e==null?null:e.address),p(),C(e==null?null:e.address)}}function Ze(i,g){if(i&1&&(o(0,"ng-option",6)(1,"span",7),a(2),x(3,"date"),r(),o(4,"span"),a(5),r()()),i&2){let e=g.$implicit;u("value",e==null?null:e.pickup_time_id),p(2),C(I(3,3,e==null?null:e.date,"d MMMM")),p(3),C(e==null?null:e.time_text)}}var Be=(()=>{class i{constructor(){this.shippingOptions=J(),this.onFormChanges=q(),this.addressList=Z(()=>this.shippingOptions()?.response?.pickup?.address_list||[]),this.selectedShipping=S(null),this.timeOptions=S(this.convertTimestampToDate(this.addressList()[0]?.time_slot_list||[])),this.pickupTime=S(null)}onAddressChange(e){let t=this.addressList().find(n=>n.address_id===e);this.timeOptions.set(this.convertTimestampToDate(t?.time_slot_list||[])),this.pickupTime.set(null)}onValueChanges(){this.onFormChanges.emit({address_id:this.selectedShipping(),pickup_time_id:this.pickupTime()})}convertTimestampToDate(e){return e.map(t=>{let n=new Date(t.date*1e3);return me(G({},t),{date:n})})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=b({type:i,selectors:[["shopee-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:12,vars:4,consts:[[1,"mb-6"],["for","address",1,"mb-2","text-muted"],["id","address","placeholder","Select Address to Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value","matTooltip"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Date Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"]],template:function(t,n){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Address"),r(),o(3,"ng-select",2),T("ngModelChange",function(s){return v(n.selectedShipping,s)||(n.selectedShipping=s),s}),d("ngModelChange",function(s){return n.onAddressChange(s),n.onValueChanges()}),L(4,Xe,2,3,"ng-option",3,N),r()(),o(6,"div",0)(7,"label",4),a(8,"Date"),r(),o(9,"ng-select",5),T("ngModelChange",function(s){return v(n.pickupTime,s)||(n.pickupTime=s),s}),d("ngModelChange",function(){return n.onValueChanges()}),L(10,Ze,6,6,"ng-option",6,N),r()()),t&2&&(p(3),u("clearable",!1),k("ngModel",n.selectedShipping),p(),A(n.addressList()),p(5),u("clearable",!1),k("ngModel",n.pickupTime),p(),A(n.timeOptions()))},dependencies:[O,j,te,ee,$,V,B,z,xe,Te],encapsulation:2})}}return i})();function $e(i,g){if(i&1&&(o(0,"ng-option",3)(1,"span",4),a(2),x(3,"date"),r(),o(4,"span"),a(5),x(6,"date"),r(),o(7,"span",5),a(8,"-"),r(),o(9,"span"),a(10),x(11,"date"),r()()),i&2){let e=g.$implicit,t=g.$index;u("value",t),p(2),C(I(3,4,e==null?null:e.start_date,"d MMMM")),p(3),C(I(6,7,e==null?null:e.start_date,"HH:mm")),p(5),C(I(11,10,e==null?null:e.end_date,"HH:mm"))}}var ze=(()=>{class i{constructor(){this.shippingOptions=J(),this.onFormChanges=q(),this.timeOptions=Z(()=>this.shippingOptions()?.Options?.pickup_slots),this.selectedTimeIndex=S(null)}onValueChanges(){let e=this.timeOptions()[this.selectedTimeIndex()];this.onFormChanges.emit({start_time:e?.start_time,end_time:e?.end_time})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=b({type:i,selectors:[["tiktok-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:6,vars:2,consts:[[1,"mb-6"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Time Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"],[1,"mx-1"]],template:function(t,n){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Time"),r(),o(3,"ng-select",2),T("ngModelChange",function(s){return v(n.selectedTimeIndex,s)||(n.selectedTimeIndex=s),s}),d("ngModelChange",function(){return n.onValueChanges()}),L(4,$e,12,13,"ng-option",3,N),r()()),t&2&&(p(3),u("clearable",!1),k("ngModel",n.selectedTimeIndex),p(),A(n.timeOptions()))},dependencies:[O,j,te,ee,$,V,B,z],encapsulation:2})}}return i})();function et(i,g){if(i&1){let e=D();o(0,"shopee-pickup",10),d("onFormChanges",function(n){f(e);let l=h();return _(l.onFormChanges(n))}),r()}if(i&2){let e=h();u("shippingOptions",e.dialogData.shippingOptions)}}function tt(i,g){if(i&1){let e=D();o(0,"tiktok-pickup",10),d("onFormChanges",function(n){f(e);let l=h();return _(l.onFormChanges(n))}),r()}if(i&2){let e=h();u("shippingOptions",e.dialogData.shippingOptions)}}var He=(()=>{class i{constructor(){this.dialogRef=c(ie),this.dialogData=c(ne),this.shippingOptions=S(this.dialogData.shippingOptions),this.channelType=S(this.dialogData.channelType),this.order=S(this.dialogData.order),this.channelTypeEnum=y,this.pickupData=S(null)}onFormChanges(e){this.pickupData.set(e)}onClose(){this.dialogRef.close()}onSave(){let e=this.generatePickupData();this.dialogRef.close(e)}generatePickupData(){switch(this.channelType()){case y.Shopee:return{OrderNumber:this.order().Number,ShopID:this.order().ShopID,pickup:this.pickupData()};case y.Tiktok:return{handover_method:"PICKUP",PackageID:this.shippingOptions().Form?.information?.PackageID,ShopID:this.order().ShopID,pickup_slot:this.pickupData()}}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=b({type:i,selectors:[["app-pickup-dialog"]],decls:21,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-6"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"lh-base","mt-6"],[1,"text-muted","fs-6"],["role","button",1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[2,"padding-bottom","10px"],[3,"shippingOptions"],[1,"d-flex","justify-content-end","align-items-center","w-100","pe-8","mb-4"],[1,"btn","btn-outline-secondary","me-4",2,"width","70px",3,"click"],[1,"btn","btn-success",2,"width","70px",3,"click"],[3,"onFormChanges","shippingOptions"]],template:function(t,n){if(t&1&&(o(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),a(4,"Set Pickup"),r(),o(5,"div",2)(6,"div",3),a(7,"Shipping Method"),r(),o(8,"div",3),a(9),r()()(),o(10,"div")(11,"i",4),d("click",function(){return n.onClose()}),r()()()(),o(12,"mat-dialog-content",5),E(13,et,1,1,"shopee-pickup",6)(14,tt,1,1,"tiktok-pickup",6),r(),o(15,"mat-dialog-actions")(16,"div",7)(17,"button",8),d("click",function(){return n.onClose()}),a(18," Cancel "),r(),o(19,"button",9),d("click",function(){return n.onSave()}),a(20," Ok "),r()()()),t&2){let l,s;p(9),Q(" ",!((l=n.order())==null||l.LogisticService==null)&&l.LogisticService.Name?(l=n.order())==null||l.LogisticService==null?null:l.LogisticService.Name:"-"," "),p(4),P((s=n.channelType())===n.channelTypeEnum.Shopee?13:s===n.channelTypeEnum.Tiktok?14:-1)}},dependencies:[O,ae,oe,we,re,V,Be,ze],styles:['ng-select.shipping-timepicker .ng-arrow{border:none!important;width:0;height:0} ng-select.shipping-timepicker .ng-arrow-wrapper{width:28px;display:flex;align-items:center;justify-content:center} ng-select.shipping-timepicker .ng-arrow-wrapper:after{content:"\\f107";font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-style:normal;font-weight:400!important;font-size:16px;line-height:1;display:inline-block;color:#6b7280;pointer-events:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto}.label-opacity[_ngcontent-%COMP%]{opacity:.7}']})}}return i})();var se=(()=>{class i{constructor(){this.httpService=c(U)}getReadyToShipOrders(e){return this.httpService.post(M.GetToShip,e).pipe(W(t=>t?.Data))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=F({token:i,factory:i.\u0275fac})}}return i})();var Ue=(()=>{class i{constructor(){this.httpService=c(U)}getShippingOptions(e,t){return this.httpService.post(M.GetTiktokShippingOptions,{OrderNumber:e,ShopID:t}).pipe(W(n=>this.formatDatePickUpOptions(n)))}pickupOrder(e){return this.httpService.post(M.TiktokSelectShipping,e)}dropOffOrder(e,t){let n={handover_method:"DROP_OFF",PackageID:e,ShopID:t};return this.httpService.post(M.TiktokSelectShipping,n)}formatDatePickUpOptions(e){return e?.Options?.pickup_slots&&(e.Options.pickup_slots=e?.Options?.pickup_slots.map(t=>{let n=H.convertTimestampToDate(t.start_time),l=H.convertTimestampToDate(t.end_time);return t.start_date=n,t.end_date=l,t})),e}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=F({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ge=(()=>{class i{constructor(){this.httpService=c(U)}getShippingOptions(e,t){return this.httpService.post(M.GetShopeeShippingOptions,{OrderNumber:e,ShopID:t})}pickupOrder(e){return this.httpService.post(M.ShopeeSelectShipping,e)}dropOffOrder(e,t){let n={OrderNumber:e,ShopID:t,dropoff:{}};return this.httpService.post(M.ShopeeSelectShipping,n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=F({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ke=(()=>{class i{constructor(){this.shopeeShippingService=c(Ge),this.tiktokShippingService=c(Ue)}getShippingOptions(e,t,n){switch(n){case y.Shopee:return this.getShopeeShippingOptions(e,t);case y.Tiktok:return this.getTiktokShippingOptions(e,t)}}pickupOrder(e,t){switch(e.MarketType){case y.Shopee:return this.shopeeShippingService.pickupOrder(t);case y.Tiktok:return this.tiktokShippingService.pickupOrder(t)}}dropOffOrder(e,t){switch(e.MarketType){case y.Shopee:return this.shopeeShippingService.dropOffOrder(e.Number,e.ShopID);case y.Tiktok:let n=t?.Form?.information?.PackageID;return this.tiktokShippingService.dropOffOrder(n,e.ShopID)}}getShopeeShippingOptions(e,t){return this.shopeeShippingService.getShippingOptions(e,t)}getTiktokShippingOptions(e,t){return this.tiktokShippingService.getShippingOptions(e,t)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=F({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var it=()=>[],nt=i=>({"td-cell-hover":i});function ot(i,g){if(i&1&&w(0,"variants-dropdown",28),i&2){let e=h().$implicit;u("variants",e==null?null:e.Variants)}}function rt(i,g){if(i&1&&w(0,"variant-with-image",29),i&2){let e=h().$implicit;u("variant",e==null?null:e.Variants[0])}}function at(i,g){if(i&1&&(o(0,"span"),a(1),r()),i&2){let e=h().$implicit;p(),C(e.LogisticService==null?null:e.LogisticService.Option)}}function pt(i,g){if(i&1){let e=D();o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"div",24)(5,"div",25)(6,"div"),w(7,"img",26),x(8,"channelImage"),r(),o(9,"div"),w(10,"order-link",27),r()(),o(11,"small"),a(12),x(13,"date"),r()()(),o(14,"td"),a(15),r(),o(16,"td"),E(17,ot,1,1,"variants-dropdown",28)(18,rt,1,1,"variant-with-image",29),r(),o(19,"td",30),a(20),x(21,"number"),r(),o(22,"td")(23,"span"),a(24),r(),E(25,at,2,1,"span"),r(),o(26,"td",31)(27,"button",32),d("click",function(){let n=f(e).$implicit,l=h(2);return _(l.onSetFulfillment(n))}),a(28," Set Fulfillment "),r()()()}if(i&2){let e=g.$implicit;p(2),C(e.Outlet),p(5),u("src",X(8,12,e==null?null:e.MarketType),de)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(3),u("order",e),p(2),Q(" ",I(13,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(3),C(e.Customer),p(),K(Y(19,nt,(e.Variants==null?null:e.Variants.length)>1)),p(),P((e.Variants==null?null:e.Variants.length)>1?17:18),p(3),C(X(21,17,e.Amount)),p(4),C(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),P(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1)}}function lt(i,g){if(i&1){let e=D();o(0,"div",13)(1,"table",15)(2,"thead",16)(3,"tr",17)(4,"th",18),a(5,"Outlet"),r(),o(6,"th",19),a(7,"Number"),r(),o(8,"th",19),a(9,"Customer"),r(),o(10,"th"),a(11,"Items"),r(),o(12,"th",20),a(13,"Amount"),r(),o(14,"th",21),a(15,"Shipping"),r(),w(16,"th",22),r()(),o(17,"tbody"),L(18,pt,29,21,"tr",null,N),r()(),o(20,"app-custom-paginator",23),d("next",function(){f(e);let n=h();return _(n.initReadyToShip())})("previous",function(){f(e);let n=h();return _(n.initReadyToShip())}),r()()}if(i&2){let e=h(),t=ge(0);p(18),A(t),p(2),u("filter",e.filter())("totaldata",t==null?null:t.length)}}function st(i,g){i&1&&(o(0,"div",14),w(1,"app-empty-state"),r())}var Ii=(()=>{class i{constructor(){this.readyToShipService=c(se),this.dialog=c(be),this.pickupService=c(Ke),this.toastr=c(ve),this.filter=S({PageNumber:1,PageSize:100,ListChannelID:[],From:new Date,To:new Date,Number:null})}ngOnInit(){this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.readyToShipService.getReadyToShipOrders(this.filter()).pipe(ce(1))}onFilterChange(e){this.filter.update(t=>G(G({},t),e))}onSetFulfillment(e){this.pickupService.getShippingOptions(e.Number,e.ShopID,e.MarketType).pipe(le(t=>this.dialog.open(Ae,{height:"400px",width:"530px",data:{options:t,channelType:e.MarketType}}).afterClosed().pipe(pe(n=>H.IsNotEmpty(n)),W(n=>({type:n,order:e,options:t}))))).subscribe(t=>{t.type=="PICK_UP"?this.onSelectPickup(t.order,t.options):this.onSelectDropOff(t.order,t.options)})}onSelectPickup(e,t){this.dialog.open(He,{width:"530px",data:{order:e,shippingOptions:t,channelType:e.MarketType},disableClose:!0}).afterClosed().pipe(pe(n=>H.IsNotEmpty(n)),le(n=>this.pickupService.pickupOrder(e,n))).subscribe(()=>{this.toastr.success("Pickup order created successfully","Success"),this.initReadyToShip()})}onSelectDropOff(e,t){this.pickupService.dropOffOrder(e,t).subscribe(()=>{this.toastr.success("Drop-off order created successfully","Success"),this.initReadyToShip()})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=b({type:i,selectors:[["app-ready-to-ship"]],features:[fe([se])],decls:29,vars:12,consts:[["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","160px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem",3,"click"]],template:function(t,n){if(t&1){let l=D();ue(0),x(1,"async"),o(2,"mainpanel",0),d("onSubmit",function(){return f(l),_(n.initReadyToShip())}),T("textChange",function(m){return f(l),v(n.filter().Number,m)||(n.filter().Number=m),_(m)}),o(3,"filters")(4,"div")(5,"label",1),a(6,"From/To"),r(),o(7,"channel-select-options",2),T("ngModelChange",function(m){return f(l),v(n.filter().ListChannelID,m)||(n.filter().ListChannelID=m),_(m)}),r()(),o(8,"div",3)(9,"label",1),a(10,"From/To"),r(),o(11,"div",4)(12,"datepicker",5),T("dateChange",function(m){return f(l),v(n.filter().From,m)||(n.filter().From=m),_(m)}),r()(),o(13,"div")(14,"datepicker",6),T("dateChange",function(m){return f(l),v(n.filter().To,m)||(n.filter().To=m),_(m)}),r()()(),o(15,"div",3)(16,"label",7),a(17,"Page Number"),r(),o(18,"input",8),T("ngModelChange",function(m){return f(l),v(n.filter().PageNumber,m)||(n.filter().PageNumber=m),_(m)}),r()(),o(19,"div",3)(20,"label",7),a(21,"Page Size"),r(),o(22,"input",9),T("ngModelChange",function(m){return f(l),v(n.filter().PageSize,m)||(n.filter().PageSize=m),_(m)}),r()()(),o(23,"content")(24,"div",10)(25,"div",11)(26,"div",12),E(27,lt,21,2,"div",13)(28,st,2,0,"div",14),r()()()()()}if(t&2){let l=he(X(1,8,n.readyToShip$)||_e(11,it));p(2),k("text",n.filter().Number),p(5),u("multiple",!0),k("ngModel",n.filter().ListChannelID),p(5),k("date",n.filter().From),p(2),k("date",n.filter().To),p(4),k("ngModel",n.filter().PageNumber),p(4),k("ngModel",n.filter().PageSize),p(5),P(l.length>0?27:28)}},dependencies:[O,Se,Ce,j,Oe,De,Pe,Me,V,ye,ke,B,z,Ie,Ve,Re,Ee,Fe,Ne],styles:[".actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .12s ease-in-out}tr[_ngcontent-%COMP%]:hover .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}"]})}}return i})();export{Ii as ReadyToShipComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Le}from"./chunk-OJWFYXZX.js";import{a as Be}from"./chunk-ABQG3LB5.js";import{a as L}from"./chunk-XHAXYWZ7.js";import{a as Me}from"./chunk-YPVYJUXS.js";import"./chunk-6MPSYC77.js";import{a as Ne,b as ke,c as Oe,d as W}from"./chunk-GOS4RIF2.js";import{a as De}from"./chunk-JRWFZQ5K.js";import{a as Ee}from"./chunk-7KG3DC5J.js";import"./chunk-ZIOAOUAM.js";import{b as Ve}from"./chunk-GPC4DECX.js";import"./chunk-SIYMMMKQ.js";import"./chunk-WHZ44BAL.js";import"./chunk-UPYS4A4M.js";import{a as Fe}from"./chunk-JOBWFOGC.js";import"./chunk-PO7JVKK3.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import{a as Te}from"./chunk-SH7KN2AS.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import{a as he}from"./chunk-5DIRXS7I.js";import"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import{i as Se}from"./chunk-PZ4PSWYM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-PB2SJSML.js";import{b as ge,e as Ce}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import{c as O}from"./chunk-PW42BQIY.js";import{d as we,m as ve,n as ye}from"./chunk-6X2OBNJQ.js";import{b as me,h as de,m as _e,z as ue}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{a as fe,b as xe,c as Pe}from"./chunk-UJYSVGLV.js";import{r as Ie,s as be}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{d as re,f as ae,g as le,j as ce,m as se,n as pe}from"./chunk-MTUIRWOB.js";import{$c as f,Fc as U,G as B,Gb as Z,Gc as m,Hc as Y,Ic as y,Kc as D,Lc as M,Mb as g,Mc as N,Nc as ee,Oc as te,Pc as A,Qc as ne,Ra as X,Sc as k,Tc as ie,Yb as p,Z as R,ad as I,bd as oe,cd as j,dc as q,ea as J,ec as F,gc as T,hc as V,ic as o,jc as a,kc as P,lc as w,mc as v,oc as S,p as K,pa as $,pb as E,rb as r,tc as C,uc as s,v as H,xb as x,xc as Q,ya as _,za as u}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import{a as G,b as z}from"./chunk-66YHNWRR.js";var Re=n=>[n],$e=n=>({"text-decoration-line-through":n}),Ue=n=>({"border-bottom":n}),Ae=(n,c)=>({"bg-gradient-warning":n,"border pointer cell-hover":c});function je(n,c){if(n&1){let e=S();w(0),o(1,"div")(2,"label",21),m(3,"Channel"),a(),o(4,"channel-select-options",22),N("ngModelChange",function(t){_(e);let l=s();return M(l.searchFilter.ListChannelID,t)||(l.searchFilter.ListChannelID=t),u(t)}),a()(),o(5,"div",23)(6,"label",24),m(7,"Filter by"),a(),o(8,"lib-radio-options",25),N("modelChange",function(t){_(e);let l=s();return M(l.searchFilter.filterModel,t)||(l.searchFilter.filterModel=t),u(t)}),a()(),v()}if(n&2){let e=s();r(4),p("multiple",!0),D("ngModel",e.searchFilter.ListChannelID),r(4),D("model",e.searchFilter.filterModel),p("options",e.filterTypeOptions)}}function We(n,c){if(n&1){let e=S();o(0,"button",27),C("click",function(){_(e);let t=s().ngIf,l=s();return u(l.onUpdateItems(t))}),P(1,"i",28),m(2," Update "),a()}}function Ge(n,c){if(n&1&&(w(0),o(1,"div",4),g(2,We,3,0,"button",26),a(),v()),n&2){let e=c.ngIf,i=s();r(2),p("ngIf",i.productService.hasSelectionVariant(e))}}function ze(n,c){if(n&1&&(o(0,"th",15)(1,"div",29),P(2,"img",30),o(3,"div",31),m(4),f(5,"stringLimit"),a()()()),n&2){let e=c.$implicit;r(),p("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),p("src",e==null?null:e.Img,E),r(2),y(" ",oe(5,3,e.Name,20)," ")}}function Ke(n,c){if(n&1){let e=S();o(0,"th")(1,"input",32),N("ngModelChange",function(t){_(e);let l=s();return M(l.checkboxState,t)||(l.checkboxState=t),u(t)}),C("ngModelChange",function(){_(e);let t=s();return u(t.onSelectAllData())}),a()()}if(n&2){let e=s();r(),D("ngModel",e.checkboxState)}}function He(n,c){n&1&&(o(0,"th",33)(1,"span"),m(2,"Expected"),a(),o(3,"span",34),m(4,"(POS)"),a()(),o(5,"th",33),m(6,"Channel"),a())}function Je(n,c){if(n&1){let e=S();o(0,"img",47),C("click",function(t){_(e);let l=s(3).$implicit,d=s(2);return u(d.onZoomImage(t,l==null?null:l.ImageUrl))}),a()}if(n&2){let e=s(3).$implicit;Q("src",e==null?null:e.ImageUrl,E)}}function Xe(n,c){n&1&&P(0,"img",48)}function Ze(n,c){if(n&1&&(o(0,"small",46),m(1),a()),n&2){let e=s(3).$implicit;r(),y("(",e==null?null:e.Category,")")}}function qe(n,c){if(n&1&&(w(0),o(1,"td",42),g(2,Je,1,1,"img",43)(3,Xe,1,0,"ng-template",null,0,j),a(),o(5,"td",44)(6,"h5",45),m(7),a(),g(8,Ze,2,1,"small",46),a(),v()),n&2){let e=U(4),i=s().$index,t=s().$implicit,l=s().ngIf;r(),p("rowSpan",t==null?null:t.Variants.length)("ngClass",k(7,Ue,i+1==l.length)),r(),p("ngIf",t==null?null:t.ImageUrl)("ngIfElse",e),r(3),p("rowSpan",t==null?null:t.Variants.length),r(2),Y(t==null?null:t.Name),r(),q(t!=null&&t.Category?8:-1)}}function Qe(n,c){if(n&1){let e=S();o(0,"td",49)(1,"input",32),N("ngModelChange",function(t){_(e);let l=s().$implicit;return M(l.selected,t)||(l.selected=t),u(t)}),a()()}if(n&2){let e=s().$implicit;r(),D("ngModel",e.selected)}}function Ye(n,c){if(n&1){let e=S();w(0),o(1,"td",51),m(2),f(3,"number"),a(),o(4,"td",52),C("click",function(){let t=_(e).$implicit,l=s(2).$implicit,d=s().$implicit,h=s(2),b=A(0);return u(h.openTableDialog(l,d,t,b))}),o(5,"div",53)(6,"div",54),m(7),f(8,"number"),a(),o(9,"a",55),C("click",function(t){return _(e),u(t==null?null:t.stopPropagation())}),P(10,"i",40),a()()(),v()}if(n&2){let e=c.$implicit;s(5);let i=A(0);r(2),y(" ",I(3,4,e.PriceExpected)," "),r(2),p("ngClass",ie(8,Ae,e.Price!=e.PriceExpected,i)),r(3),y(" ",I(8,6,e.Price)," "),r(2),p("href",e.Url,E)}}function et(n,c){n&1&&(o(0,"td",56),m(1," X "),a(),o(2,"td",56),m(3," X "),a())}function tt(n,c){if(n&1&&(w(0),g(1,Ye,11,11,"ng-container",50)(2,et,4,0,"ng-template",null,1,j),v()),n&2){let e=c.$implicit,i=U(3),t=s().$implicit,l=s(3);r(),p("ngIf",l.getItemFromChannel(t,e.ID))("ngIfElse",i)}}function nt(n,c){if(n&1&&(o(0,"tr"),g(1,qe,9,9,"ng-container",3),o(2,"td",35),m(3),a(),o(4,"td",36)(5,"div",37)(6,"div",38),m(7),a(),o(8,"div",31)(9,"a",39),P(10,"i",40),a()()()(),g(11,Qe,2,1,"ng-template",19)(12,tt,4,2,"ng-container",41),a()),n&2){let e=c.$implicit,i=c.$index,t=s(3);r(),p("ngIf",i==0),r(2),y(" ",e==null?null:e.Model," "),r(),p("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),r(2),p("ngClass",k(8,$e,e.Discontinued)),r(),y(" ",e==null?null:e.Code," "),r(2),p("href",t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),E),r(2),p("ngxPermissionsOnly",k(10,Re,t.rolePriceEdit)),r(),p("ngForOf",t.channels())}}function it(n,c){if(n&1&&(o(0,"tbody"),T(1,nt,13,12,"tr",null,F),a()),n&2){let e=c.$implicit;r(),V(e.Variants)}}function ot(n,c){if(n&1&&(w(0),T(1,it,3,0,"tbody",null,F),v()),n&2){let e=c.ngIf;r(),V(e)}}var Ut=(()=>{class n{constructor(e,i,t,l,d,h,b){this.http=e,this.toastr=i,this.dialog=t,this.productService=l,this.authService=d,this.biggerPictureService=h,this.paginationService=b,this.infinitePagination=$(W),this.permissionService=$(fe),this.searchFilter=new Ee,this.checkboxState=!1,this.rolePriceEdit=he.PriceUpdate,this.hasRolePriceEdit=K(this.permissionService.hasPermission(this.rolePriceEdit)),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=X([]),this.filterTypeOptions=[{Key:L.ALL,Value:"All"},{Key:L.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let e=this.searchFilter.ListChannelID,i=[];O.IsEmpty(e)||e?.length==0?i=this.channelOptions:i=this.channelOptions.filter(t=>e.findIndex(l=>l==t.ID)>-1),this.channels.update(()=>i)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(R(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(J(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=L.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),R(1))}onSelectAllData(){this.data$=this.data$.pipe(H(e=>(e.map(i=>(i.Variants&&(i.Variants=i.Variants.map(t=>(t.selected=this.checkboxState,t))),i)),e)))}onFilter(e){this.searchFilter.text=e;let i=z(G({},this.searchFilter),{text:e,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(i)}updatePrice(e){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let t=i.map(h=>h.ID),d={ListChannelID:this.channelOptions.filter(h=>h.selected).map(h=>h.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",d).subscribe({next:h=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+d.ListID.length+" items in "+d.ListChannelID.length+" channels","Success")},error:h=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,i){return e.Channel.find(t=>t.ChannelID==i)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e);this.dialog.open(Me,{data:{title:"Updating Price",selectedItems:i,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(B(t=>O.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(e)})}openTableDialog(e,i,t,l){if(l){let d=JSON.parse(JSON.stringify(e));this.dialog.open(Ne,{data:{Name:i.Name,Variant:d,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(B(b=>O.IsNotEmpty(b))).subscribe(b=>{this.updateProductPrice(b,t)})}}updateProductPrice(e,i){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(l=>{i.Price=t.Price;let d=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${d.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(Ve,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}static{this.\u0275fac=function(i){return new(i||n)(x(Ce),x(ge),x(we),x(Fe),x(Se),x(Te),x(De))}}static{this.\u0275cmp=Z({type:n,selectors:[["app-custom-channel-price"]],features:[ne([W])],decls:40,vars:26,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(i,t){if(i&1){let l=S();ee(0),f(1,"async"),o(2,"mainpanel",2),C("onSubmit",function(h){return _(l),u(t.onFilter(h))}),o(3,"filters"),g(4,je,9,4,"ng-container",3),f(5,"async"),a(),o(6,"actions")(7,"div",4),g(8,Ge,3,1,"ng-container",3),f(9,"async"),o(10,"button",5),C("click",function(){return _(l),u(t.openExportDialog())}),P(11,"i",6),o(12,"span"),m(13,"Export"),a()()()(),o(14,"content")(15,"div",7)(16,"div",8)(17,"div",9)(18,"div",10)(19,"table",11)(20,"thead",12)(21,"tr",13),P(22,"th",14),T(23,ze,6,6,"th",15,F),a(),o(25,"tr")(26,"th",16)(27,"span"),m(28," Product "),a()(),o(29,"th",17),m(30,"Variant"),a(),o(31,"th",18),m(32,"SKU"),a(),g(33,Ke,2,1,"ng-template",19),T(34,He,7,0,null,null,F),a()(),g(36,ot,3,0,"ng-container",3),f(37,"async"),a(),o(38,"infinite-paginator",20),f(39,"async"),C("onNextPage",function(){return _(l),u(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){return _(l),u(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){return _(l),u(t.infinitePagination.getRowCount(t.searchFilter))}),a()()()()()()()}i&2&&(te(I(1,13,t.hasRolePriceEdit)),r(2),p("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),r(2),p("ngIf",I(5,16,t.loader$)),r(4),p("ngIf",I(9,18,t.data$)),r(15),V(t.channels()),r(10),p("ngxPermissionsOnly",k(24,Re,t.rolePriceEdit)),r(),V(t.channels()),r(2),p("ngIf",I(37,20,t.data$)),r(2),p("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",I(39,22,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[pe,re,ae,le,ce,se,ye,ve,ue,me,de,_e,Oe,Le,be,Ie,ke,Pe,xe,Be],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]})}}return n})();export{Ut as CustomChannelPriceComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y}from"./chunk-
|
|
1
|
+
import{a as Y}from"./chunk-ABQG3LB5.js";import{e as J}from"./chunk-SYENQYR7.js";import"./chunk-PZ4PSWYM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-PB2SJSML.js";import{b as j,e as F}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-PW42BQIY.js";import{m as G,n as U}from"./chunk-6X2OBNJQ.js";import{c as B,h as D,m as I,z as R}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{j as P,l as W,n as k}from"./chunk-MTUIRWOB.js";import{$c as S,Gb as x,Gc as i,Hc as E,Kc as C,Lc as b,Mb as M,Mc as _,Nc as T,Oc as V,Pc as v,Ra as h,Yb as f,Z as y,ad as w,dc as O,ic as e,jc as t,kc as A,oc as L,pa as u,rb as d,tc as g,uc as N,ya as s,za as m}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function z(n,q){if(n&1&&(e(0,"pre",21),i(1),S(2,"json"),t()),n&2){N();let l=v(25);d(),E(w(2,1,l))}}function K(n,q){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ce=(()=>{class n{constructor(){this.httpService=u(F),this.toastr=u(j),this.selectedChannel=h(null),this.orderNumber=h(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(H.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=x({type:n,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",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","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,r){if(p&1){let a=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return s(a),m(r.fetchLog())}),A(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"channel-select-options",10),_("ngModelChange",function(o){return s(a),b(r.selectedChannel,o)||(r.selectedChannel=o),m(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(o){return s(a),b(r.orderNumber,o)||(r.orderNumber=o),m(o)}),t()()()()(),T(25),S(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(){s(a);let o=v(25);return m(r.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,z,3,3,"pre",21)(39,K,2,0,"p",22),t()()()()()()()()()}if(p&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),C("ngModel",r.selectedChannel),d(8),C("ngModel",r.orderNumber),d();let a=V(w(26,6,r.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,P,W,U,G,J,R,B,D,I,Y],encapsulation:2})}}return n})();export{ce as OrderApiComponent};
|