marketplacepos 5.46.4 → 5.46.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +43 -43
- package/Marketplace/{chunk-T4OUIM2Z.js → chunk-22ARBR7W.js} +1 -1
- package/Marketplace/{chunk-QTTNQJAK.js → chunk-2BV7ZXRB.js} +1 -1
- package/Marketplace/{chunk-EEZKQOJW.js → chunk-2DLU2LJJ.js} +1 -1
- package/Marketplace/{chunk-PQQSREEC.js → chunk-3PPLPXAX.js} +2 -2
- package/Marketplace/{chunk-7ZMHGW2W.js → chunk-4HOZLG47.js} +1 -1
- package/Marketplace/{chunk-HGGI2V4H.js → chunk-5BHSTOJT.js} +1 -1
- package/Marketplace/chunk-5DTUHJSS.js +1 -0
- package/Marketplace/{chunk-GHFADTRR.js → chunk-5EIQGYTB.js} +1 -1
- package/Marketplace/{chunk-5G2U27IM.js → chunk-5KUKIH4H.js} +1 -1
- package/Marketplace/chunk-5Z5Y537T.js +1 -0
- package/Marketplace/{chunk-C7YK5TDP.js → chunk-63ANFYRV.js} +1 -1
- package/Marketplace/{chunk-DGIH7HSJ.js → chunk-7TI3OR34.js} +1 -1
- package/Marketplace/{chunk-5BCJEYHC.js → chunk-7WY57PVD.js} +1 -1
- package/Marketplace/{chunk-FY73EXB5.js → chunk-7Y7SPMGZ.js} +1 -1
- package/Marketplace/{chunk-KVOROMP7.js → chunk-AWNZSJSP.js} +1 -1
- package/Marketplace/{chunk-5KMDUD2M.js → chunk-B2ZWLW3F.js} +1 -1
- package/Marketplace/chunk-CBQUB3KW.js +1 -0
- package/Marketplace/{chunk-HS64MICX.js → chunk-CRD4OUSG.js} +1 -1
- package/Marketplace/{chunk-W4MTON2T.js → chunk-CT73GC7O.js} +1 -1
- package/Marketplace/chunk-D2TELRO7.js +1 -0
- package/Marketplace/{chunk-GQXYHXWJ.js → chunk-DXPLB6OB.js} +1 -1
- package/Marketplace/chunk-EFB55SZR.js +1 -0
- package/Marketplace/{chunk-BG4CT2T7.js → chunk-ELZBUFG5.js} +1 -1
- package/Marketplace/chunk-EUYQST7Q.js +1 -0
- package/Marketplace/{chunk-WIMLQM6B.js → chunk-EXSI44LD.js} +2 -2
- package/Marketplace/{chunk-PHLSX23M.js → chunk-F2XHUFJC.js} +2 -2
- package/Marketplace/chunk-F3GLNINI.js +1 -0
- package/Marketplace/{chunk-34DHFHCG.js → chunk-FHNST4Y7.js} +1 -1
- package/Marketplace/{chunk-P35PCOWA.js → chunk-FKQ7ZVGD.js} +1 -1
- package/Marketplace/{chunk-6K6XBSWF.js → chunk-FOT5AJYX.js} +2 -2
- package/Marketplace/{chunk-BIHR6KWH.js → chunk-GSVFDIM6.js} +1 -1
- package/Marketplace/{chunk-UWC2EVFY.js → chunk-GZS2MOSK.js} +1 -1
- package/Marketplace/{chunk-WY37QAZ4.js → chunk-JAWWMIGP.js} +1 -1
- package/Marketplace/{chunk-6DYFCRDG.js → chunk-JUJFPAAU.js} +1 -1
- package/Marketplace/{chunk-ZMF3NFLA.js → chunk-JZDOMET2.js} +1 -1
- package/Marketplace/chunk-KTB223SK.js +1 -0
- package/Marketplace/{chunk-IJVKHW3C.js → chunk-KWHVCPX2.js} +1 -1
- package/Marketplace/{chunk-ZKROHCYD.js → chunk-LLHPMXKP.js} +1 -1
- package/Marketplace/{chunk-YJKAX7P2.js → chunk-LS7AO6KP.js} +1 -1
- package/Marketplace/{chunk-SBLG2UP7.js → chunk-LXXEN7OV.js} +1 -1
- package/Marketplace/{chunk-UBA54WUZ.js → chunk-MGLOTL2T.js} +1 -1
- package/Marketplace/{chunk-F4X5RWKY.js → chunk-MZWTCBAF.js} +8 -8
- package/Marketplace/{chunk-5RAWBW2Q.js → chunk-NDBC2CS6.js} +1 -1
- package/Marketplace/{chunk-57MSCWQ4.js → chunk-NFGFM7TW.js} +1 -1
- package/Marketplace/{chunk-TKV7XWBT.js → chunk-O2YNPIYM.js} +1 -1
- package/Marketplace/{chunk-SWV5QK47.js → chunk-OGJMVAEL.js} +1 -1
- package/Marketplace/{chunk-KEQ7PUNM.js → chunk-OO2CSDGF.js} +1 -1
- package/Marketplace/{chunk-BVPWV5YO.js → chunk-P2AADVEN.js} +1 -1
- package/Marketplace/{chunk-NRUVGW2I.js → chunk-P2IQLBGG.js} +1 -1
- package/Marketplace/{chunk-2O4IEGGR.js → chunk-PGP3WHIS.js} +3 -3
- package/Marketplace/{chunk-NABJFAKJ.js → chunk-PTNJ3YC5.js} +1 -1
- package/Marketplace/chunk-QREUIGWW.js +1 -0
- package/Marketplace/{chunk-BPAZ4TES.js → chunk-RGY4FVTG.js} +1 -1
- package/Marketplace/{chunk-RU43F4UK.js → chunk-T27ABFCP.js} +1 -1
- package/Marketplace/{chunk-2GS6DJ33.js → chunk-TI67Q3JR.js} +1 -1
- package/Marketplace/chunk-TMKLT3K2.js +1 -0
- package/Marketplace/{chunk-AR6PLQ6X.js → chunk-TWOIWWMO.js} +1 -1
- package/Marketplace/{chunk-CJ4F7QUO.js → chunk-UGYIOLBR.js} +1 -1
- package/Marketplace/{chunk-NTWV33QC.js → chunk-URGPZLCB.js} +1 -1
- package/Marketplace/{chunk-FF4PEO2O.js → chunk-USBIAIK6.js} +1 -1
- package/Marketplace/{chunk-32YMOC74.js → chunk-UYFUJBC4.js} +1 -1
- package/Marketplace/{chunk-XSJBP4EN.js → chunk-V3ZRQKJA.js} +1 -1
- package/Marketplace/{chunk-PNF6K247.js → chunk-WGCIF2R4.js} +2 -2
- package/Marketplace/{chunk-NLJHQ4MQ.js → chunk-X4B2FYY3.js} +1 -1
- package/Marketplace/chunk-X52QA4QU.js +1 -0
- package/Marketplace/chunk-XLWWNO5M.js +1 -0
- package/Marketplace/{chunk-2REDCSBO.js → chunk-XONEJSCE.js} +1 -1
- package/Marketplace/{chunk-B3HL4DNT.js → chunk-Y4XF2TXJ.js} +1 -1
- package/Marketplace/{chunk-TEJITT3W.js → chunk-YEDXFYTD.js} +1 -1
- package/Marketplace/chunk-YF4XELSP.js +1 -0
- package/Marketplace/{chunk-2WHJU6CS.js → chunk-YU2SDRUC.js} +1 -1
- package/Marketplace/{chunk-GCOS7VK3.js → chunk-ZYQD6SBV.js} +10 -10
- package/Marketplace/index.html +4 -4
- package/Marketplace/{main-QTIXFWWZ.js → main-YKZPM7WW.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-4L5TB6FG.js +0 -1
- package/Marketplace/chunk-5JBIRETU.js +0 -1
- package/Marketplace/chunk-A44LN77B.js +0 -1
- package/Marketplace/chunk-CZBE6NFO.js +0 -1
- package/Marketplace/chunk-DLZRRLED.js +0 -1
- package/Marketplace/chunk-DZJWZ52D.js +0 -1
- package/Marketplace/chunk-HGDEIMTN.js +0 -1
- package/Marketplace/chunk-LRKVYKNL.js +0 -1
- package/Marketplace/chunk-OLANEXLB.js +0 -1
- package/Marketplace/chunk-QNX7E4P2.js +0 -1
- package/Marketplace/chunk-RI627B2Z.js +0 -1
- package/Marketplace/chunk-RXQX7567.js +0 -1
- package/Marketplace/chunk-TFM5EMU4.js +0 -1
- package/Marketplace/chunk-TYSVSEYQ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as me,b as de,c as pe}from"./chunk-
|
|
1
|
+
import{a as me,b as de,c as pe}from"./chunk-T27ABFCP.js";import{a as ue}from"./chunk-FHNST4Y7.js";import{a as T}from"./chunk-LLHPMXKP.js";import{a as se}from"./chunk-67HPC5Y3.js";import{a as le}from"./chunk-KTB223SK.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as ae}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-63ANFYRV.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-ACIMXBIC.js";import{a as oe}from"./chunk-LDL3A7NM.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import{m as ne,n as re}from"./chunk-HJXYT6MI.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as te,s as ie}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as G,k as J,m as K,n as Q}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as I,Gc as a,Hc as S,Ic as b,Kc as _,Lc as f,Mb as x,Mc as g,Nc as A,Oc as R,Pc as H,Qc as j,Ra as F,Sc as U,Yb as u,Z as O,ac as D,ad as E,bd as q,dc as y,ec as B,gc as k,hc as z,ic as t,jc as i,kc as c,oc as V,pa as N,pb as W,rb as l,tc as M,uc as C,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var ce=r=>({"td-cell-hover":r});function Ce(r,h){if(r&1&&c(0,"variants-dropdown",31),r&2){let e=C().$implicit;u("variants",e==null?null:e.Variants)}}function _e(r,h){if(r&1&&c(0,"variant-with-image",32),r&2){let e=C().$implicit;u("variant",e==null?null:e.Variants[0])}}function fe(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=C().$implicit;l(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ge(r,h){if(r&1&&(t(0,"tr")(1,"td")(2,"div",24),c(3,"img",25),w(4,"channelImage"),t(5,"div",26)(6,"div"),a(7),i(),t(8,"small",27)(9,"span"),a(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div",29)(14,"div"),c(15,"order-link",30),i()(),t(16,"small"),a(17),w(18,"date"),i()()(),t(19,"td"),a(20),i(),t(21,"td"),x(22,Ce,1,1,"variants-dropdown",31)(23,_e,1,1,"variant-with-image",32),i(),t(24,"td",33),a(25),w(26,"number"),i(),t(27,"td")(28,"div",28)(29,"div",29)(30,"span"),a(31),i(),x(32,fe,2,1,"span"),i(),t(33,"small"),a(34),i()()()()),r&2){let e=h.$implicit;l(3),u("src",E(4,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),S(e.Outlet),l(3),S(e.ChannelName),l(5),u("order",e),l(2),b(" ",q(18,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),S(e.Customer),l(),D(U(21,ce,(e.Variants==null?null:e.Variants.length)>1)),l(),y((e.Variants==null?null:e.Variants.length)>1?22:23),l(3),S(E(26,19,e.Amount)),l(6),S(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?32:-1),l(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function he(r,h){if(r&1){let e=V();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",20),a(7,"Number"),i(),t(8,"th",20),a(9,"Customer"),i(),t(10,"th"),a(11,"Items"),i(),t(12,"th",21),a(13,"Amount"),i(),t(14,"th",22),a(15,"Shipping"),i()()(),t(16,"tbody"),k(17,ge,35,23,"tr",null,B),i()(),t(19,"app-custom-paginator",23),M("next",function(){p(e);let n=C();return s(n.initCompletedOrders())})("previous",function(){p(e);let n=C();return s(n.initCompletedOrders())}),i()()}if(r&2){let e=C(),m=H(0);l(17),z(m),l(2),u("filter",e.filter())("totaldata",m==null?null:m.length)}}function ve(r,h){r&1&&(t(0,"div",16),c(1,"app-empty-state"),i())}var He=(()=>{class r{constructor(){this.orderService=N(T),this.filter=F({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(m=>L(P({},m),{From:e})),this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.orderService.getCompletedOrders(this.filter()).pipe(O(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=I({type:r,selectors:[["app-completed"]],features:[j([T])],decls:34,vars:11,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","100px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(m,n){if(m&1){let d=V();A(0),w(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initCompletedOrders())}),g("textChange",function(o){return p(d),f(n.filter().Number,o)||(n.filter().Number=o),s(o)}),t(3,"actions")(4,"a",1),c(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"app-channel-options-v2",4),g("ngModelChange",function(o){return p(d),f(n.filter().ListChannelID,o)||(n.filter().ListChannelID=o),s(o)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),g("dateChange",function(o){return p(d),f(n.filter().From,o)||(n.filter().From=o),s(o)}),i()(),t(18,"div")(19,"datepicker",8),g("dateChange",function(o){return p(d),f(n.filter().To,o)||(n.filter().To=o),s(o)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),g("ngModelChange",function(o){return p(d),f(n.filter().PageNumber,o)||(n.filter().PageNumber=o),s(o)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),g("ngModelChange",function(o){return p(d),f(n.filter().PageSize,o)||(n.filter().PageSize=o),s(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,he,20,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(m&2){let d=R(E(1,8,n.completedOrders$));l(2),_("text",n.filter().Number),l(10),u("multiple",!0),_("ngModel",n.filter().ListChannelID),l(5),_("date",n.filter().From),l(2),_("date",n.filter().To),l(4),_("ngModel",n.filter().PageNumber),l(4),_("ngModel",n.filter().PageSize),l(5),y((d==null?null:d.length)>0?32:33)}},dependencies:[Q,G,K,J,re,ne,le,oe,ee,X,$,Y,Z,me,de,pe,se,ie,te,ue,ae],encapsulation:2})}}return r})();export{He as CompletedComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Te}from"./chunk-EHBCYQSG.js";import{a as Ie,b as ye}from"./chunk-GRYGUILI.js";import"./chunk-HVCIQI7B.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import{a as E}from"./chunk-XHAXYWZ7.js";import{a as Fe,b as be,c as Ve,d as B,e as U}from"./chunk-O2YNPIYM.js";import{a as Se,b as we}from"./chunk-YTCIQBSO.js";import"./chunk-RHHHL4OR.js";import{a as fe}from"./chunk-X4B2FYY3.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ce}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{a as ve}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import{a as Pe}from"./chunk-63ANFYRV.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-GZS2MOSK.js";import"./chunk-ACIMXBIC.js";import{i as ge}from"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as _e,e as pe}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as se}from"./chunk-EUYQST7Q.js";import{d as he,l as Ce,m as ue,n as xe}from"./chunk-HJXYT6MI.js";import{A as le,b as ne,c as ie,h as oe,m as ae,o as re}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as me,c as de}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{d as Q,g as X,j as Y,m as D,n as ee,q as te}from"./chunk-FXQKRJWU.js";import{$c as v,Fc as q,G as W,Gb as j,Gc as d,Hc as L,Ic as b,Kc as w,Lc as I,Mb as h,Mc as y,Qc as K,Sc as V,Yb as m,Z as A,ad as F,bd as J,cd as Z,dc as P,ea as $,ec as k,gc as N,hc as R,ic as r,jc as c,kc as S,lc as z,mc as G,oc as u,pa as M,pb as T,rb as l,tc as C,uc as a,xb as f,xc as H,ya as _,za as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var O=i=>[i],ke=i=>({"text-decoration-line-through":i}),Ne=i=>({"bg-gradient-warning":i});function Re(i,s){if(i&1){let e=u();r(0,"button",14),C("click",function(){_(e);let t=a().ngIf,o=a(2);return p(o.updateStock(t))}),S(1,"i",15),d(2," Update "),c()}}function Le(i,s){if(i&1){let e=u();r(0,"actions")(1,"div",10),h(2,Re,3,0,"button",11),r(3,"button",12),C("click",function(){_(e);let t=a(2);return p(t.openExportDialog())}),S(4,"i",13),r(5,"span"),d(6,"Export"),c()()()()}if(i&2){let e=s.ngIf,n=a(2);l(2),m("ngIf",n.productService.hasSelectionVariant(e))}}function Be(i,s){if(i&1){let e=u();r(0,"th")(1,"input",30),C("change",function(t){_(e);let o=a().ngIf,g=a(2);return p(g.onSelectAllSKU(t.target.checked,o))}),c()()}}function Ue(i,s){if(i&1){let e=u();r(0,"input",47),y("ngModelChange",function(t){_(e);let o=a(4).$implicit;return I(o.selected,t)||(o.selected=t),p(t)}),C("ngModelChange",function(){_(e);let t=a(4).$implicit,o=a(3);return p(o.onCheckboxStateProduct(t))}),c()}if(i&2){let e=a(4).$implicit;w("ngModel",e.selected)}}function Oe(i,s){if(i&1&&h(0,Ue,1,1,"ng-template",24),i&2){let e=a(6);m("ngxPermissionsOnly",V(1,O,e.rolePriceEdit))}}function We(i,s){if(i&1){let e=u();z(0),r(1,"img",48),C("click",function(t){_(e);let o=a(3).$implicit,g=a(3);return p(g.onZoomImage(t,o==null?null:o.ImageUrl))}),c(),G()}if(i&2){let e=a(3).$implicit;l(),H("src",e.ThumbnailUrl,T)}}function Ae(i,s){i&1&&S(0,"img",49)}function $e(i,s){if(i&1&&(r(0,"small",46),d(1),c()),i&2){let e=a(3).$implicit;l(),b("(",e.Category,")")}}function je(i,s){if(i&1&&(r(0,"td",42)(1,"div",33),h(2,Oe,1,3,null,24),r(3,"div"),h(4,We,2,1,"ng-container",43)(5,Ae,1,0,"ng-template",null,0,Z),c()()(),r(7,"td",44)(8,"span",45),d(9),c(),h(10,$e,2,1,"small",46),c()),i&2){let e=q(6),n=a(2).$implicit;m("rowSpan",n.Variants.length),l(2),P((n.Variants==null?null:n.Variants.length)>1?2:-1),l(2),m("ngIf",n.ThumbnailUrl)("ngIfElse",e),l(3),m("rowSpan",n.Variants.length),l(2),L(n.Name),l(),P(n.Category?10:-1)}}function ze(i,s){if(i&1){let e=u();r(0,"input",52),y("ngModelChange",function(t){_(e);let o=a(2).$implicit;return I(o.selected,t)||(o.selected=t),p(t)}),c()}if(i&2){let e=a(2).$implicit;w("ngModel",e.selected)}}function Ge(i,s){if(i&1&&(r(0,"td",50),h(1,ze,1,1,"input",51),c()),i&2){let e=a().$implicit;l(),P(e.UnitPrice>=0?1:-1)}}function He(i,s){i&1&&(r(0,"div",34),d(1," Not Found "),c())}function qe(i,s){if(i&1&&(r(0,"div"),d(1),v(2,"number"),c()),i&2){let e=a().$implicit;l(),b(" ",F(2,1,e.UnitPrice)," ")}}function Ke(i,s){if(i&1&&(r(0,"div",35)(1,"a",38),S(2,"i",53),c()()),i&2){let e=a().$implicit,n=a(4);l(),m("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),T)}}function Je(i,s){if(i&1){let e=u();r(0,"div",54),C("click",function(){_(e);let t=a().$implicit,o=a().$implicit,g=a(2).ngIf,x=a();return p(x.openTableDialog(t,o,g))}),d(1),v(2,"number"),c()}if(i&2){let e=a().$implicit;l(),b(" ",F(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function Ze(i,s){if(i&1){let e=u();r(0,"tr",31),h(1,je,11,7),r(2,"td",22),d(3),c(),r(4,"td",25)(5,"span",32),d(6),c()(),h(7,Ge,2,1,"ng-template",24),r(8,"td",25)(9,"div",33),h(10,He,2,0,"div",34)(11,qe,3,3,"div")(12,Ke,3,1,"div",35),c()(),r(13,"td",36)(14,"div",33),h(15,Je,3,3,"div",37),r(16,"div",35)(17,"a",38),S(18,"i",39),c()(),r(19,"div",35)(20,"div",40),C("click",function(){let t=_(e).$implicit,o=a(4);return p(o.refreshPrice(t))}),S(21,"i",41),c()()()()()}if(i&2){let e=s.$implicit,n=s.$index,t=a(4);l(),P(n==0?1:-1),l(2),L(e.Model),l(2),m("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",V(12,ke,e.Discontinued)),l(),b(" ",e.Code," "),l(),m("ngxPermissionsOnly",V(14,O,t.rolePriceEdit)),l(3),P((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),l(),m("ngClass",V(16,Ne,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),l(2),P(e.Channel.length>0?15:-1),l(2),m("href",e.Channel[0]==null?null:e.Channel[0].Url,T)}}function Qe(i,s){if(i&1&&N(0,Ze,22,18,"tr",31,k),i&2){let e=s.$implicit;R(e.Variants)}}function Xe(i,s){if(i&1){let e=u();r(0,"content")(1,"div",16)(2,"div",17)(3,"table",18)(4,"thead",19)(5,"tr")(6,"th",20),d(7," Product "),r(8,"div")(9,"mat-slide-toggle",21),y("ngModelChange",function(t){_(e);let o=a(2);return I(o.toggleDifferentInventory,t)||(o.toggleDifferentInventory=t),p(t)}),C("toggleChange",function(){_(e);let t=a(2);return p(t.onToggleDifferentInventory())}),r(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),r(12,"th",22),d(13,"Variant"),c(),r(14,"th",23),d(15,"SKU"),c(),h(16,Be,2,0,"ng-template",24),r(17,"th",25),d(18,"POS"),c(),r(19,"th",25)(20,"div",26),C("click",function(){_(e);let t=a(2);return p(t.openModalFilter())}),S(21,"img",27),r(22,"span",28),d(23),v(24,"stringLimit"),c()()()()(),r(25,"tbody"),N(26,Qe,2,0,null,null,k),c()(),r(28,"infinite-paginator",29),v(29,"async"),C("onNextPage",function(){_(e);let t=a(2);return p(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=a(2);return p(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=a(2);return p(t.infinitePagination.getRowCount(t.searchFilter))}),c()()()()}if(i&2){let e=s.ngIf,n=a(2);l(9),w("ngModel",n.toggleDifferentInventory),l(7),m("ngxPermissionsOnly",V(16,O,n.rolePriceEdit)),l(4),m("matTooltip",(n.selectedChannel==null||n.selectedChannel.Name==null?null:n.selectedChannel.Name.length)>=20?n.selectedChannel==null?null:n.selectedChannel.Name:""),l(),m("src",n.selectedChannel==null?null:n.selectedChannel.Img,T),l(2),b(" ",J(24,11,n.selectedChannel==null?null:n.selectedChannel.Name,20)," "),l(3),R(e),l(2),m("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",F(29,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function Ye(i,s){if(i&1){let e=u();r(0,"mainpanel",2),y("textChange",function(t){_(e);let o=a();return I(o.searchFilter.text,t)||(o.searchFilter.text=t),p(t)}),C("onSubmit",function(){_(e);let t=a();return p(t.onSearch())}),r(1,"filters")(2,"div",3)(3,"label",4),d(4,"Channel"),c(),r(5,"app-channel-options-v2",5),y("ngModelChange",function(t){_(e);let o=a();return I(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),p(t)}),c()(),r(6,"div",6)(7,"label",7),d(8,"Page Number"),c(),r(9,"input",8),y("ngModelChange",function(t){_(e);let o=a();return I(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),p(t)}),c()(),r(10,"div",6)(11,"label",7),d(12,"Page Size"),c(),r(13,"input",8),y("ngModelChange",function(t){_(e);let o=a();return I(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),p(t)}),c()()(),h(14,Le,7,1,"actions",9),v(15,"async"),h(16,Xe,30,18,"content",9),v(17,"async"),c()}if(i&2){let e=a();m("headerTitle",e.pageTitle),w("text",e.searchFilter.text),l(5),w("ngModel",e.searchFilter.ChannelID),l(4),w("ngModel",e.searchFilter.PageNumber),l(4),w("ngModel",e.searchFilter.RowCount),l(),m("ngIf",F(15,7,e.data$)),l(2),m("ngIf",F(17,9,e.data$))}}var Rt=(()=>{class i{constructor(e,n,t,o,g,x,De,Ee,Me){this.http=e,this.toastr=n,this.dialog=t,this.productService=o,this.biggerPictureService=g,this.authService=x,this.mainPanelService=De,this.exportService=Ee,this.decimalPipe=Me,this.infinitePagination=M(B),this.updateResHandling=M(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=ce.PriceUpdate,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.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe(A(1)),this.channelOptions=x.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe($(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=E.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=E.ALL:this.searchFilter.filterModel=E.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let t=this.productService.selectedVariantProduct(e).map(g=>({ID:g.ID,ChannelID:g.Channel[0].ChannelID,Code:g.Code,Price:g.UnitPrice})),o={ListChannelID:[this.searchFilter.ChannelID],ListPrice:t};this.http.post("/api/Price/UpdateChannel",o).subscribe(g=>{this.onSearch(),this.handlingUpdateStock(g.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,t=e.success_list;this.updateResHandling.responseHandling(t,n,"Price")}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(t=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,t){let o=JSON.parse(JSON.stringify(e));this.dialog.open(Fe,{data:{Name:n.Name,Variant:o,ChannelID:o?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:o?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(W(x=>se.IsNotEmpty(x))).subscribe(x=>{this.updateItemAfterDialog(x,e)})}updateItemAfterDialog(e,n){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(o=>{let g=this.productService.findChannelById(t.ID,this.channelOptions),x=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${g.Name} to ${x}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=t.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=e,o)),t))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(ye,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(f(pe),f(_e),f(he),f(fe),f(Pe),f(ge),f(Ce),f(Ie),f(D))}}static{this.\u0275cmp=j({type:i,selectors:[["app-price-single-channel"]],features:[K([B,Te,te("https://resc.cloudinary.com/"),D,U])],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,t){n&1&&(h(0,Ye,18,11,"mainpanel",1),v(1,"async")),n&2&&m("ngIf",F(1,1,t.loader$))},dependencies:[ee,Q,X,Y,D,xe,ue,le,ie,re,ne,oe,ae,be,Ve,de,me,we,Se,ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0})}}return i})();export{Rt as PriceSingleChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t,c as v}from"./chunk-
|
|
1
|
+
import{b as t,c as v}from"./chunk-EUYQST7Q.js";import{n as y}from"./chunk-FXQKRJWU.js";import{$b as C,Gb as p,Gc as N,Hc as k,Mb as r,Oa as o,Tc as w,Yb as d,dc as f,ic as s,jc as m,kc as g,pb as l,rb as h,uc as u}from"./chunk-OJMQBH6T.js";var L=(e,c)=>({width:e,height:c});function T(e,c){if(e&1&&(s(0,"span",2),N(1),m()),e&2){let n=u();h(),k(n.channelName)}}var D=(()=>{class e{set typeId(n){this.channelLogo=v.getChannelLogoByTypeId(n),this.initChannelName(n)}constructor(){this.showChannelName=o(!0),this.width=o(20),this.height=o(20)}initChannelName(n){switch(n){case t.Tokopedia:this.channelName="Tokopedia";break;case t.Tiktok:this.channelName="Tiktok";break;case t.WooCommerce:this.channelName="WooCommerce";break;case t.Shopee:this.channelName="Shopee";break;case t.Lazada:this.channelName="Lazada";break;case t.KalCare:this.channelName="Kalcare";break;case t.ShopifyV2:this.channelName="Shopify";break}}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=p({type:e,selectors:[["app-channel-logo"]],inputs:{showChannelName:[1,"showChannelName"],width:[1,"width"],height:[1,"height"],typeId:"typeId"},decls:3,vars:7,consts:[[1,"d-flex","align-items-center"],[1,"me-2",3,"src"],[1,"fw-normal"]],template:function(a,i){a&1&&(s(0,"div",0),g(1,"img",1),r(2,T,2,1,"span",2),m()),a&2&&(h(),C(w(4,L,i.width()+"px",i.height()+"px")),d("src",i.channelLogo,l),h(),f(i.showChannelName()?2:-1))},dependencies:[y],encapsulation:2})}}return e})();export{D as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-NDBC2CS6.js";import{b as u}from"./chunk-WRJFUNM3.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import{n as c}from"./chunk-HJXYT6MI.js";import{A as s}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as a,J as n,n as i}from"./chunk-FXQKRJWU.js";import{Gb as p,Hb as r,ka as e,kc as d}from"./chunk-OJMQBH6T.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-7WY57PVD.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 xe,b as ve}from"./chunk-V3ZRQKJA.js";import{a as ge,b as Ce,c as Se}from"./chunk-T27ABFCP.js";import{a as be}from"./chunk-FHNST4Y7.js";import{a as F}from"./chunk-LLHPMXKP.js";import{a as ye}from"./chunk-67HPC5Y3.js";import"./chunk-XPCRS7AL.js";import"./chunk-MX5SR3SR.js";import{a as he}from"./chunk-KTB223SK.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as fe}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-63ANFYRV.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-ACIMXBIC.js";import"./chunk-PYXL7UF7.js";import{a as _e}from"./chunk-LDL3A7NM.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as de}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{b as se}from"./chunk-EUYQST7Q.js";import{m as ce,n as ue}from"./chunk-HJXYT6MI.js";import{A as ae,b as ie,c as ne,h as oe,m as re,o as le}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as me,s as pe}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as Z,k as $,m as ee,n as te}from"./chunk-FXQKRJWU.js";import{$c as w,Ac as H,Bc as Q,Cc as j,Gb as W,Gc as d,Hc as T,Ic as R,Kc as g,Lc as C,Mb as b,Mc as S,Nc as q,Oc as U,Pc as P,Qc as G,Ra as O,Rc as J,Sc as K,Yb as h,Z as L,ac as D,ad as E,bd as X,dc as x,ea as I,ec as B,gc as A,hc as z,ic as i,jc as n,kc as u,oc as v,pa as V,pb as k,rb as l,rd as Y,tc as f,uc as c,ya as m,za as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as M,b as N}from"./chunk-66YHNWRR.js";var Te=["contextMenu"],we=()=>[],Me=r=>({"td-cell-hover":r});function Ve(r,_){if(r&1){let e=v();i(0,"button",20),f("click",function(){m(e);let t=c();return p(t.setMultipleFulfillment())}),d(1," Set Fulfillment "),n()}}function Re(r,_){if(r&1&&u(0,"variants-dropdown",37),r&2){let e=c().$implicit;h("variants",e==null?null:e.Variants)}}function Ee(r,_){if(r&1&&u(0,"variant-with-image",38),r&2){let e=c().$implicit;h("variant",e==null?null:e.Variants[0])}}function Oe(r,_){if(r&1&&(i(0,"span"),d(1),n()),r&2){let e=c().$implicit;l(),R("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Pe(r,_){if(r&1){let e=v();i(0,"div",40)(1,"button",44),f("click",function(){m(e);let t=c().$implicit,s=c(2);return p(s.refreshShippingAndRefNumber(t))}),u(2,"i",45),n()()}}function Fe(r,_){if(r&1){let e=v();i(0,"button",46),f("click",function(){m(e);let t=c().$implicit,s=c(2);return p(s.onSetFulfillment(t))}),d(1," Set Fulfillment "),n()}}function Ne(r,_){if(r&1){let e=v();i(0,"tr")(1,"td")(2,"input",30),S("ngModelChange",function(t){let s=m(e).$implicit;return C(s.selected,t)||(s.selected=t),p(t)}),f("ngModelChange",function(){m(e);let t=c(2),s=P(0);return p(t.onSelectOrder(s))}),n()(),i(3,"td")(4,"div",31),u(5,"img",32),w(6,"channelImage"),i(7,"div",33)(8,"div"),d(9),n(),i(10,"small",34)(11,"span"),d(12),n()()()()(),i(13,"td")(14,"div",35)(15,"div"),u(16,"order-link",36),n(),i(17,"small"),d(18),w(19,"date"),n()()(),i(20,"td"),d(21),n(),i(22,"td"),b(23,Re,1,1,"variants-dropdown",37)(24,Ee,1,1,"variant-with-image",38),n(),i(25,"td",39),d(26),w(27,"number"),n(),i(28,"td",40)(29,"div",41)(30,"div",35)(31,"div",42)(32,"span"),d(33),n(),b(34,Oe,2,1,"span"),n(),i(35,"small"),d(36),n()(),b(37,Pe,3,0,"div",40),n()(),i(38,"td",40),b(39,Fe,2,0,"button",43),n()()}if(r&2){let e=_.$implicit,o=c(2);l(2),g("ngModel",e.selected),h("disabled",o.selectedChannelType()!=null&&o.selectedChannelType()!=e.MarketType),l(3),h("src",E(6,18,e==null?null:e.MarketType),k)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),T(e.Outlet),l(3),T(e.ChannelName),l(4),h("order",e),l(2),R(" ",X(19,20,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),T(e.Customer),l(),D(K(25,Me,(e.Variants==null?null:e.Variants.length)>1)),l(),x((e.Variants==null?null:e.Variants.length)>1?23:24),l(3),T(E(27,23,e.Amount)),l(7),T(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),x(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?34:-1),l(2),R(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),l(),x(!(e.LogisticService!=null&&e.LogisticService.Name)||!e.ReferenceNumber?37:-1),l(2),x((e==null?null:e.MarketType)!=o.channelType.WooCommerce?39:-1)}}function Le(r,_){if(r&1){let e=v();i(0,"div",17)(1,"table",21)(2,"thead",22)(3,"tr",23),u(4,"th",24),i(5,"th",25),d(6,"Outlet"),n(),i(7,"th",25),d(8,"Number"),n(),i(9,"th",25),d(10,"Customer"),n(),i(11,"th"),d(12,"Items"),n(),i(13,"th",26),d(14,"Amount"),n(),i(15,"th",27),d(16,"Shipping"),n(),u(17,"th",28),n()(),i(18,"tbody"),A(19,Ne,40,27,"tr",null,B),n()(),i(21,"app-custom-paginator",29),f("next",function(){m(e);let t=c();return p(t.initReadyToShip())})("previous",function(){m(e);let t=c();return p(t.initReadyToShip())}),n()()}if(r&2){let e=c(),o=P(0);l(19),z(o),l(2),h("filter",e.filter())("totaldata",o==null?null:o.length)}}function Ie(r,_){r&1&&(i(0,"div",18),u(1,"app-empty-state"),n())}var dt=(()=>{class r{constructor(){this.toastr=V(de),this.orderService=V(F),this.fulfillmentService=V(xe),this.channelType=se,this.selectedOrders=O([]),this.selectedChannelType=Y(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(o=>N(M({},o),{From:e})),this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.orderService.getReadyToShipOrders(this.filter()).pipe(I(()=>{this.selectedOrders.set([])}),L(1))}onFilterChange(e){this.filter.update(o=>M(M({},o),e))}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initReadyToShip()})}setMultipleFulfillment(){this.fulfillmentService.setFulfillmentMultipleOrders(this.selectedOrders()).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}onSelectOrder(e){let o=e.filter(t=>t.selected);this.selectedOrders.set(o)}onMouseHover(e,o){(!o.LogisticService?.Name||!o.ReferenceNumber)&&this.contextMenuEl.show(e,o)}onSelectContextItem(e){e.item?.id==="refresh"&&this.refreshShippingAndRefNumber(e.data)}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=W({type:r,selectors:[["app-ready-to-ship"]],viewQuery:function(o,t){if(o&1&&H(Te,5),o&2){let s;Q(s=j())&&(t.contextMenuEl=s.first)}},features:[G([F])],decls:37,vars:14,consts:[["contextMenu",""],["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","100px"],[2,"width","150px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[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"],["matTooltip","Retrieve shipping courier and reference number",1,"btn","btn-icon-only",3,"click"],[1,"fa-solid","fa-arrows-rotate","fs-6"],[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(o,t){if(o&1){let s=v();q(0),w(1,"async"),i(2,"mainpanel",1),f("onSubmit",function(){return m(s),p(t.initReadyToShip())}),S("textChange",function(a){return m(s),C(t.filter().Number,a)||(t.filter().Number=a),p(a)}),i(3,"actions"),b(4,Ve,2,0,"button",2),i(5,"a",3),u(6,"i",4),i(7,"span"),d(8,"Order Fulfillment Display"),n()()(),i(9,"filters")(10,"div")(11,"label",5),d(12,"Channel"),n(),i(13,"app-channel-options-v2",6),S("ngModelChange",function(a){return m(s),C(t.filter().ListChannelID,a)||(t.filter().ListChannelID=a),p(a)}),n()(),i(14,"div",7)(15,"label",5),d(16,"From/To"),n(),i(17,"div",8)(18,"datepicker",9),S("dateChange",function(a){return m(s),C(t.filter().From,a)||(t.filter().From=a),p(a)}),n()(),i(19,"div")(20,"datepicker",10),S("dateChange",function(a){return m(s),C(t.filter().To,a)||(t.filter().To=a),p(a)}),n()()(),i(21,"div",7)(22,"label",11),d(23,"Page Number"),n(),i(24,"input",12),S("ngModelChange",function(a){return m(s),C(t.filter().PageNumber,a)||(t.filter().PageNumber=a),p(a)}),n()(),i(25,"div",7)(26,"label",11),d(27,"Page Size"),n(),i(28,"input",13),S("ngModelChange",function(a){return m(s),C(t.filter().PageSize,a)||(t.filter().PageSize=a),p(a)}),n()()(),i(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),b(33,Le,22,2,"div",17)(34,Ie,2,0,"div",18),n()()()()(),i(35,"app-context-menu",19,0),f("onSelectItem",function(a){return m(s),p(t.onSelectContextItem(a))}),n()}if(o&2){let s=U(E(1,10,t.readyToShip$)||J(13,we));l(2),g("text",t.filter().Number),l(2),x(t.selectedOrders().length>0?4:-1),l(9),h("multiple",!0),g("ngModel",t.filter().ListChannelID),l(5),g("date",t.filter().From),l(2),g("date",t.filter().To),l(4),g("ngModel",t.filter().PageNumber),l(4),g("ngModel",t.filter().PageSize),l(5),x(s.length>0?33:34),l(2),h("items",t.contextMenuItems)}},dependencies:[te,Z,ee,$,ue,ce,he,_e,ae,ne,le,ie,oe,re,ge,Ce,Se,ye,be,pe,me,ve,fe],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%], div[_ngcontent-%COMP%]:hover.actions-cell .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 r})();export{dt as ReadyToShipComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as mt}from"./chunk-
|
|
1
|
+
import{c as mt}from"./chunk-EUYQST7Q.js";import{ja as dt}from"./chunk-OJMQBH6T.js";import{a as We,b as ut,i as at}from"./chunk-66YHNWRR.js";function L(){}var Ge=e=>e;function pt(e,t){for(let n in t)e[n]=t[n];return e}function Mt(e){return e()}function Y(e){e.forEach(Mt)}function Ye(e){return typeof e=="function"}function oe(e,t){return e!=e?t==t:e!==t}function Ot(e){return Object.keys(e).length===0}function Rt(e,...t){if(e==null)return L;let n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function me(e,t,n){e.$$.on_destroy.push(Rt(t,n))}function Ce(e){return e&&Ye(e.destroy)?e.destroy:L}var Qe=()=>globalThis.performance.now(),xe=e=>requestAnimationFrame(e),he=new Set;function Et(e){he.forEach(t=>{t.c(e)||(he.delete(t),t.f())}),he.size!==0&&xe(Et)}function et(e){let t;return he.size===0&&xe(Et),{promise:new Promise(n=>{he.add(t={c:e,f:n})}),abort(){he.delete(t)}}}function ge(e,t){e.appendChild(t)}function P(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode.removeChild(e)}function C(e){return document.createElement(e)}function At(e){return document.createTextNode(e)}function Ee(){return At("")}function N(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function I(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function E(e,t,n,i){n===null?e.style.removeProperty(t):e.style.setProperty(t,n)}function R(e,t,n){e.classList[n?"add":"remove"](t)}function Nt(e,t,n=!1){let i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}var pe,tt=0,Ze={};function $t(e,t,n,i,o,r,s,c=0){let l=16.666/i,f=`{
|
|
2
2
|
`;for(let a=0;a<=1;a+=l){let p=t+(n-t)*r(a);f+=a*100+`%{${s(p,1-p)}}
|
|
3
3
|
`}let d=f+`100% {${s(n,1-n)}}
|
|
4
4
|
}`,u=`_bp_${Math.round(Math.random()*1e9)}_${c}`;if(!Ze[u]){if(!pe){let a=C("style");document.head.appendChild(a),pe=a.sheet}Ze[u]=!0,pe.insertRule(`@keyframes ${u} ${d}`,pe.cssRules.length)}let h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${u} ${i}ms linear ${o}ms 1 both`,tt+=1,u}function qe(e,t){e.style.animation=(e.style.animation||"").split(", ").filter(t?n=>n.indexOf(t)<0:n=>n.indexOf("_bp")===-1).join(", "),t&&!--tt&&Yt()}function Yt(){xe(()=>{if(tt)return;let e=pe.cssRules.length;for(;e--;)pe.deleteRule(e);Ze={}})}var nt;function Ie(e){nt=e}var ze=[],ht=[],Oe=[],gt=[],Xt=Promise.resolve(),je=!1;function Wt(){je||(je=!0,Xt.then(Ct))}function ee(e){Oe.push(e)}var Fe=new Set,Le=0;function Ct(){let e=nt;do{for(;Le<ze.length;){let t=ze[Le];Le++,Ie(t),Ft(t.$$)}for(Ie(null),ze.length=0,Le=0;ht.length;)ht.pop()();for(let t=0;t<Oe.length;t+=1){let n=Oe[t];Fe.has(n)||(Fe.add(n),n())}Oe.length=0}while(ze.length);for(;gt.length;)gt.pop()();je=!1,Fe.clear(),Ie(e)}function Ft(e){if(e.fragment!==null){e.update(),Y(e.before_update);let t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ee)}}var Te;function Dt(){return Te||(Te=Promise.resolve(),Te.then(()=>{Te=null})),Te}function Ae(e,t,n){e.dispatchEvent(Nt(`${t?"intro":"outro"}${n}`))}var Re=new Set,U;function te(){U={r:0,c:[],p:U}}function ne(){U.r||Y(U.c),U=U.p}function v(e,t){e&&e.i&&(Re.delete(e),e.i(t))}function $(e,t,n,i){if(e&&e.o){if(Re.has(e))return;Re.add(e),U.c.push(()=>{Re.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}var Pt={duration:0};function St(e,t,n){let i=t(e,n),o=!1,r,s,c=0;function l(){r&&qe(e,r)}function f(){let{delay:u=0,duration:h=300,easing:a=Ge,tick:p=L,css:g}=i||Pt;g&&(r=$t(e,0,1,h,u,a,g,c++)),p(0,1);let k=Qe()+u,H=k+h;s&&s.abort(),o=!0,ee(()=>Ae(e,!0,"start")),s=et(X=>{if(o){if(X>=H)return p(1,0),Ae(e,!0,"end"),l(),o=!1;if(X>=k){let y=a((X-k)/h);p(y,1-y)}}return o})}let d=!1;return{start(){d||(d=!0,qe(e),Ye(i)?(i=i(),Dt().then(f)):f())},invalidate(){d=!1},end(){o&&(l(),o=!1)}}}function _e(e,t,n){let i=t(e,n),o=!0,r,s=U;s.r+=1;function c(){let{delay:l=0,duration:f=300,easing:d=Ge,tick:u=L,css:h}=i||Pt;h&&(r=$t(e,1,0,f,l,d,h));let a=Qe()+l,p=a+f;ee(()=>Ae(e,!1,"start")),et(g=>{if(o){if(g>=p)return u(0,1),Ae(e,!1,"end"),--s.r||Y(s.c),!1;if(g>=a){let k=d((g-a)/f);u(1-k,k)}}return o})}return Ye(i)?Dt().then(()=>{i=i(),c()}):c(),{end(l){l&&i.tick&&i.tick(1,0),o&&(r&&qe(e,r),o=!1)}}}function ke(e){e&&e.c()}function re(e,t,n,i){let{fragment:o,on_mount:r,on_destroy:s,after_update:c}=e.$$;o&&o.m(t,n),i||ee(()=>{let l=r.map(Mt).filter(Ye);s?s.push(...l):Y(l),e.$$.on_mount=[]}),c.forEach(ee)}function se(e,t){let n=e.$$;n.fragment!==null&&(Y(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Bt(e,t){e.$$.dirty[0]===-1&&(ze.push(e),Wt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function De(e,t,n,i,o,r,s,c=[-1]){let l=nt;Ie(e);let f=e.$$={fragment:null,ctx:null,props:r,update:L,not_equal:o,bound:{},on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:{},dirty:c,skip_bound:!1,root:t.target||l.$$.root};s&&s(f.root);let d=!1;f.ctx=n?n(e,t.props||{},(u,h,...a)=>{let p=a.length?a[0]:h;return f.ctx&&o(f.ctx[u],f.ctx[u]=p)&&(!f.skip_bound&&f.bound[u]&&f.bound[u](p),d&&Bt(e,u)),h}):[],f.update(),d=!0,Y(f.before_update),f.fragment=i?i(f.ctx):!1,t.target&&(f.fragment&&f.fragment.c(),re(e,t.target,t.anchor,t.customElement),Ct()),Ie(l)}var ie=class{$destroy(){se(this,1),this.$destroy=L}$on(t,n){let i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{let o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!Ot(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}};function it(e){let t=e-1;return t*t*t+1}function V(e,{delay:t=0,duration:n=400,easing:i=it,x:o=0,y:r=0,opacity:s=0}={}){let c=getComputedStyle(e),l=+c.opacity,f=c.transform==="none"?"":c.transform,d=l*(1-s);return{delay:t,duration:n,easing:i,css:(u,h)=>`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as d}from"./chunk-WN5DZGA4.js";import{c}from"./chunk-
|
|
1
|
+
import{b as d}from"./chunk-WN5DZGA4.js";import{c}from"./chunk-EUYQST7Q.js";import{ja as h,pa as f}from"./chunk-OJMQBH6T.js";var w=(()=>{class a{constructor(){this.toastrService=f(d)}showToastrUploadMultiple(l,e){let s=[],i=[],o=null,r=this.getResponseList(l);if(l.filter(t=>c.IsNotEmpty(t)).forEach(t=>{typeof t?.Response=="string"?i=[...i,r.length>1?this.setHtmlli(t.Response):this.setHtmlli(t.Response,!1)]:(t?.Response?.Success_list.forEach(n=>{s=[...s,r.length>1?this.setHtmlli(e?e(n,t.Channel):`
|
|
2
2
|
<div>
|
|
3
3
|
Product ${n.Name} was <div class="d-inline fw-bold">successfully</div> uploaded to ${t.Channel}
|
|
4
4
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _}from"./chunk-67HPC5Y3.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import{a as R}from"./chunk-5RAWBW2Q.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ue,b as ye}from"./chunk-WRJFUNM3.js";import"./chunk-JVNHFIYT.js";import"./chunk-ACIMXBIC.js";import"./chunk-BVPWV5YO.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{e as he}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as d}from"./chunk-RXQX7567.js";import{m as w,n as ge}from"./chunk-HJXYT6MI.js";import{A as fe}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as pe,H as de,J as ce,f as ae,g as F,j as le,k as P,m as me,n as se}from"./chunk-FXQKRJWU.js";import{$c as k,Gb as T,Gc as p,Hb as Z,Hc as j,Ic as J,Kc as y,Lc as g,Mb as h,Mc as C,Oa as V,Rc as re,Wc as oe,Yb as m,Z as Q,ac as $,ad as B,dc as H,ea as z,ec as ee,gc as te,hc as ie,ic as r,ja as q,jc as a,ka as X,kc as v,nc as ne,oa as Y,pb as G,rb as l,rd as U,tc as b,uc as u,xb as f,xc as K}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-order"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),a()()(),v(4,"router-outlet")),i&2&&(l(3),m("Tabs",t.reportTabs))},dependencies:[ue,pe],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]})}}return n})();var S=class{};var I=(()=>{class n{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(s=>{i(s)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}static{this.\u0275fac=function(i){return new(i||n)(Y(he))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var O=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(O||{});var De=()=>["/menu/log/order"],Ee=(n,c,e,i,t)=>({responseCode:n,From:c,to:e,actionType:i,ChannelID:t});function Oe(n,c){if(n&1&&(r(0,"th",6)(1,"div",7)(2,"h4"),p(3),a(),r(4,"small",8),p(5),a()()()),n&2){let e=c.$implicit,i=u();l(3),j(e),l(),$(i.getTextBgColor(e)),l(),j(i.getHeaderStatusDesc(e))}}function Re(n,c){if(n&1&&(r(0,"a",12),p(1),k(2,"number"),a()),n&2){let e=u().$implicit,i=u().$implicit,t=u();m("routerLink",re(5,De))("queryParams",oe(6,Ee,e.Key,t.fromQueryParam,t.toQueryParam,t.type,i.ChannelID)),l(),J(" ",B(2,3,e.Value)," ")}}function Le(n,c){n&1&&(r(0,"span",13),p(1,"-"),a())}function xe(n,c){if(n&1&&(r(0,"td",11),h(1,Re,3,12,"a",12)(2,Le,2,0,"span",13),a()),n&2){let e=c.$implicit;l(),H(e.Value?1:2)}}function Me(n,c){if(n&1&&(r(0,"tr")(1,"td")(2,"a",9),v(3,"img",10),a()(),r(4,"td")(5,"div")(6,"a",9),p(7),a()(),r(8,"div"),p(9),a()(),te(10,xe,3,1,"td",11,ee),a()),n&2){let e=c.$implicit,i=u();l(2),K("href",e.Url,G),l(),m("src",i.getChannelLogo(e.Type),G),l(3),K("href",e.Url,G),l(),j(e.Name),l(2),j(e.Url),l(),ie(e.list)}}function ke(n,c){if(n&1&&(r(0,"td",11)(1,"div",17),p(2),k(3,"number"),a()()),n&2){let e=c.$implicit;l(2),J(" ",B(3,1,e.total)," ")}}function Be(n,c){if(n&1&&(r(0,"tfoot")(1,"tr")(2,"td",14)(3,"div",15),p(4,"Total"),a()(),h(5,ke,4,3,"td",16),a()()),n&2){let e=u();l(5),m("ngForOf",e.logsCalculation())}}var D=(()=>{class n{constructor(){this.header=V(),this.result=V(),this.orderedHeader=U(()=>this.header().sort((e,i)=>e-i)),this.logsOrdered=U(()=>{let e=this.result();return e=e.map(i=>(this.orderedHeader().forEach(t=>{i.list.findIndex(o=>o.Key===t)===-1&&i.list.push({Key:t,Value:0}),i.list.sort((o,A)=>o.Key-A.Key)}),i)),e}),this.logsCalculation=U(()=>{let e=this.concatStatusCode(),i=[];return this.orderedHeader().forEach(t=>{let o=e.filter(A=>A.Key===t).reduce((A,we)=>A+we.Value,0);i.push({status:t,total:o})}),i}),this.type=null,this.headerStatus=O,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}getHeaderStatusDesc(e){let i=null;switch(e){case O.BAD_REQUEST:i="BAD REQUEST";break;case O.CONFLICT:i="CONFLICT";break;case O.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case O.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case O.OK:i="bg-success";break;case O.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return d.getChannelLogoByTypeId(e)}concatStatusCode(){return this.logsOrdered().map(e=>e.list).reduce((e,i)=>[...e,...i],[])}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-table-report"]],inputs:{header:[1,"header"],result:[1,"result"],from:"from",to:"to",type:"type"},standalone:!1,decls:10,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"h3","fw-bold","ms-1"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(r(0,"table",0)(1,"thead",1)(2,"tr"),v(3,"th",2),r(4,"th",3),p(5,"Channel"),a(),h(6,Oe,6,4,"th",4),a()(),r(7,"tbody"),h(8,Me,12,5,"tr",5),a(),h(9,Be,6,1,"tfoot"),a()),i&2&&(l(6),m("ngForOf",t.orderedHeader()),l(2),m("ngForOf",t.logsOrdered()),l(),H(t.logsCalculation().length>0?9:-1))},dependencies:[ae,de,me],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]})}}return n})();function Ne(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",0)}}var ve=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-sales-order"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ne,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function We(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Te=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,We,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ae(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",3)}}var _e=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S;let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-delivery"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div",1)(3,"label",2),p(4,"From/To"),a(),r(5,"div",3)(6,"datepicker",4),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",5),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",6),h(11,Ae,3,5,"div",7),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function je(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",4)}}var Se=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Completed";let t=new Date;this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-payment"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,je,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ge(n,c){n&1&&ne(0)}function Ue(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=c.ngIf,i=u();l(2),m("result",e.Body)("header",e.Header)("from",i.filter==null?null:i.filter.From)("to",i.filter==null?null:i.filter.To)}}var be=(()=>{class n{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new S}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=d.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(z(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(Q())}onFilter(){this.updatePageTitle(),this.initData()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-all"]],standalone:!1,decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ge,1,0,"ng-container",6),k(12,"async"),h(13,Ue,3,4,"div",7),k(14,"async"),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",B(12,6,t.pageLoader$)),l(2),m("ngIf",B(14,8,t.reportData$)))},dependencies:[F,w,_,D,le],encapsulation:2})}}return n})();function Ve(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Fe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-convert-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ve,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function He(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Pe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-void-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,He,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();var Ke=[{path:"",component:Ce,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",component:ve,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Fe,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:Te,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:_e,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:Se,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Pe,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:be,canActivate:[R],data:{title:"All Report"}}]}],Gt=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Z({type:n})}static{this.\u0275inj=X({imports:[se,ye,fe,ge,_,ce.forChild(Ke)]})}}return n})();export{Gt as OrderModule};
|
|
1
|
+
import{a as _}from"./chunk-67HPC5Y3.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import{a as R}from"./chunk-NDBC2CS6.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ue,b as ye}from"./chunk-WRJFUNM3.js";import"./chunk-JVNHFIYT.js";import"./chunk-ACIMXBIC.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{e as he}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as d}from"./chunk-EUYQST7Q.js";import{m as w,n as ge}from"./chunk-HJXYT6MI.js";import{A as fe}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as pe,H as de,J as ce,f as ae,g as F,j as le,k as P,m as me,n as se}from"./chunk-FXQKRJWU.js";import{$c as k,Gb as T,Gc as p,Hb as Z,Hc as j,Ic as J,Kc as y,Lc as g,Mb as h,Mc as C,Oa as V,Rc as re,Wc as oe,Yb as m,Z as Q,ac as $,ad as B,dc as H,ea as z,ec as ee,gc as te,hc as ie,ic as r,ja as q,jc as a,ka as X,kc as v,nc as ne,oa as Y,pb as G,rb as l,rd as U,tc as b,uc as u,xb as f,xc as K}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-order"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),a()()(),v(4,"router-outlet")),i&2&&(l(3),m("Tabs",t.reportTabs))},dependencies:[ue,pe],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]})}}return n})();var S=class{};var I=(()=>{class n{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(s=>{i(s)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}static{this.\u0275fac=function(i){return new(i||n)(Y(he))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var O=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(O||{});var De=()=>["/menu/log/order"],Ee=(n,c,e,i,t)=>({responseCode:n,From:c,to:e,actionType:i,ChannelID:t});function Oe(n,c){if(n&1&&(r(0,"th",6)(1,"div",7)(2,"h4"),p(3),a(),r(4,"small",8),p(5),a()()()),n&2){let e=c.$implicit,i=u();l(3),j(e),l(),$(i.getTextBgColor(e)),l(),j(i.getHeaderStatusDesc(e))}}function Re(n,c){if(n&1&&(r(0,"a",12),p(1),k(2,"number"),a()),n&2){let e=u().$implicit,i=u().$implicit,t=u();m("routerLink",re(5,De))("queryParams",oe(6,Ee,e.Key,t.fromQueryParam,t.toQueryParam,t.type,i.ChannelID)),l(),J(" ",B(2,3,e.Value)," ")}}function Le(n,c){n&1&&(r(0,"span",13),p(1,"-"),a())}function xe(n,c){if(n&1&&(r(0,"td",11),h(1,Re,3,12,"a",12)(2,Le,2,0,"span",13),a()),n&2){let e=c.$implicit;l(),H(e.Value?1:2)}}function Me(n,c){if(n&1&&(r(0,"tr")(1,"td")(2,"a",9),v(3,"img",10),a()(),r(4,"td")(5,"div")(6,"a",9),p(7),a()(),r(8,"div"),p(9),a()(),te(10,xe,3,1,"td",11,ee),a()),n&2){let e=c.$implicit,i=u();l(2),K("href",e.Url,G),l(),m("src",i.getChannelLogo(e.Type),G),l(3),K("href",e.Url,G),l(),j(e.Name),l(2),j(e.Url),l(),ie(e.list)}}function ke(n,c){if(n&1&&(r(0,"td",11)(1,"div",17),p(2),k(3,"number"),a()()),n&2){let e=c.$implicit;l(2),J(" ",B(3,1,e.total)," ")}}function Be(n,c){if(n&1&&(r(0,"tfoot")(1,"tr")(2,"td",14)(3,"div",15),p(4,"Total"),a()(),h(5,ke,4,3,"td",16),a()()),n&2){let e=u();l(5),m("ngForOf",e.logsCalculation())}}var D=(()=>{class n{constructor(){this.header=V(),this.result=V(),this.orderedHeader=U(()=>this.header().sort((e,i)=>e-i)),this.logsOrdered=U(()=>{let e=this.result();return e=e.map(i=>(this.orderedHeader().forEach(t=>{i.list.findIndex(o=>o.Key===t)===-1&&i.list.push({Key:t,Value:0}),i.list.sort((o,A)=>o.Key-A.Key)}),i)),e}),this.logsCalculation=U(()=>{let e=this.concatStatusCode(),i=[];return this.orderedHeader().forEach(t=>{let o=e.filter(A=>A.Key===t).reduce((A,we)=>A+we.Value,0);i.push({status:t,total:o})}),i}),this.type=null,this.headerStatus=O,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}getHeaderStatusDesc(e){let i=null;switch(e){case O.BAD_REQUEST:i="BAD REQUEST";break;case O.CONFLICT:i="CONFLICT";break;case O.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case O.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case O.OK:i="bg-success";break;case O.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return d.getChannelLogoByTypeId(e)}concatStatusCode(){return this.logsOrdered().map(e=>e.list).reduce((e,i)=>[...e,...i],[])}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-table-report"]],inputs:{header:[1,"header"],result:[1,"result"],from:"from",to:"to",type:"type"},standalone:!1,decls:10,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"h3","fw-bold","ms-1"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(r(0,"table",0)(1,"thead",1)(2,"tr"),v(3,"th",2),r(4,"th",3),p(5,"Channel"),a(),h(6,Oe,6,4,"th",4),a()(),r(7,"tbody"),h(8,Me,12,5,"tr",5),a(),h(9,Be,6,1,"tfoot"),a()),i&2&&(l(6),m("ngForOf",t.orderedHeader()),l(2),m("ngForOf",t.logsOrdered()),l(),H(t.logsCalculation().length>0?9:-1))},dependencies:[ae,de,me],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]})}}return n})();function Ne(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",0)}}var ve=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-sales-order"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ne,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function We(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Te=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,We,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ae(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",3)}}var _e=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S;let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-delivery"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div",1)(3,"label",2),p(4,"From/To"),a(),r(5,"div",3)(6,"datepicker",4),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",5),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",6),h(11,Ae,3,5,"div",7),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function je(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",4)}}var Se=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Completed";let t=new Date;this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-payment"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,je,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ge(n,c){n&1&&ne(0)}function Ue(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=c.ngIf,i=u();l(2),m("result",e.Body)("header",e.Header)("from",i.filter==null?null:i.filter.From)("to",i.filter==null?null:i.filter.To)}}var be=(()=>{class n{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new S}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=d.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(z(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(Q())}onFilter(){this.updatePageTitle(),this.initData()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-all"]],standalone:!1,decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ge,1,0,"ng-container",6),k(12,"async"),h(13,Ue,3,4,"div",7),k(14,"async"),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",B(12,6,t.pageLoader$)),l(2),m("ngIf",B(14,8,t.reportData$)))},dependencies:[F,w,_,D,le],encapsulation:2})}}return n})();function Ve(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Fe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-convert-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ve,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function He(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Pe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-void-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,He,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();var Ke=[{path:"",component:Ce,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",component:ve,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Fe,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:Te,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:_e,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:Se,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Pe,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:be,canActivate:[R],data:{title:"All Report"}}]}],Gt=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Z({type:n})}static{this.\u0275inj=X({imports:[se,ye,fe,ge,_,ce.forChild(Ke)]})}}return n})();export{Gt as OrderModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ht}from"./chunk-KSHWHTCH.js";import"./chunk-HVCIQI7B.js";import"./chunk-EHUVS2VB.js";import{b as ut}from"./chunk-YTCIQBSO.js";import"./chunk-W3JTS22H.js";import"./chunk-6OMSPZZC.js";import{a as Z}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{i as rt}from"./chunk-
|
|
1
|
+
import{c as ht}from"./chunk-KSHWHTCH.js";import"./chunk-HVCIQI7B.js";import"./chunk-EHUVS2VB.js";import{b as ut}from"./chunk-YTCIQBSO.js";import"./chunk-W3JTS22H.js";import"./chunk-6OMSPZZC.js";import{a as Z}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{a as st,b as at,d as lt,e as ct}from"./chunk-PYXL7UF7.js";import{i as rt}from"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as et,e as it}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{b as h,c as tt}from"./chunk-EUYQST7Q.js";import{m as dt,n as gt}from"./chunk-HJXYT6MI.js";import{A as Y,h as Q,m as X}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as nt,c as ot}from"./chunk-ERXVXBTU.js";import{r as mt,s as pt}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{J as y,f as J,g as G,j as q,n as L}from"./chunk-FXQKRJWU.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-OJMQBH6T.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-NDBC2CS6.js";import{a as C}from"./chunk-IITU3NV6.js";import{a as h,b as y}from"./chunk-WRJFUNM3.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as v,J as o,n}from"./chunk-FXQKRJWU.js";import{Gb as l,Hb as s,Qc as f,Yb as u,ic as c,jc as d,ka as m,kc as i,rb as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-inventory"]],features:[f([C])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,b){t&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(p(3),u("Tabs",b.inventoryTabs))},dependencies:[n,y,h,o,v],encapsulation:2})}}return e})();var g=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-CRD4OUSG.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-UYFUJBC4.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-ZYQD6SBV.js").then(e=>e.ChannelSummaryComponent)},canActivate:[r],data:{title:"Different Inventory"}}]}],E=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=m({imports:[n,o.forChild(g)]})}}return e})();export{E as InventoryRoutingModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-
|
|
1
|
+
import{a as Q}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import{a as J}from"./chunk-63ANFYRV.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import{a as z}from"./chunk-5EIQGYTB.js";import{a as q}from"./chunk-LDL3A7NM.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as y}from"./chunk-CGOB6Y3X.js";import{e as H}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import{m as Z,n as j}from"./chunk-HJXYT6MI.js";import{A as G,h as W,m as $}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as N,J as O,j as A,m as R,n as F}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as b,Gc as a,Hc as g,Kc as K,Lc as P,Mb as k,Mc as T,Nc as B,Ra as D,Yb as s,Z as V,ad as v,dc as U,ec as I,gc as E,hc as L,ic as e,jc as t,kc as c,oc as x,pa as C,pb as M,rb as l,tc as _,uc as S,ya as m,za as u}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function X(o,h){if(o&1){let i=x();e(0,"img",21),_("click",function(r){m(i);let n=S().$implicit,d=S();return u(d.onZoomImage(r,n==null?null:n.ImageUrl))}),t()}if(o&2){let i=S().$implicit;s("src",i==null?null:i.ThumbnailUrl,M)}}function Y(o,h){o&1&&c(0,"img",17)}function ee(o,h){if(o&1&&(e(0,"tr")(1,"td")(2,"div",15),k(3,X,1,1,"img",16)(4,Y,1,0,"img",17),t()(),e(5,"td"),a(6),t(),e(7,"td"),a(8),t(),e(9,"td")(10,"div",18),c(11,"app-channel-logo",19),e(12,"span"),a(13),t()()(),e(14,"td",20),a(15),w(16,"number"),t()()),o&2){let i=h.$implicit;l(3),U(i.ImageUrl?3:4),l(3),g(i.Name),l(2),g(i.SKU),l(3),s("typeId",i.TypeID),l(2),g(i.ChannelName),l(2),g(v(16,6,i.Count))}}var xe=(()=>{class o{constructor(){this.httpService=C(H),this.biggerPictureService=C(J),this.filter=D({PageNumber:1,RowCount:20,ListChannelID:[]}),this.rowCountApi=y.GetMultilistingSKUCount,this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(y.GetMultiListingSKU,this.filter()).pipe(V(1))}onZoomImage(i,p){this.biggerPictureService.openBiggerPicture(i,p)}static{this.\u0275fac=function(p){return new(p||o)}}static{this.\u0275cmp=b({type:o,selectors:[["app-duplicate-sku-v2"]],decls:33,vars:8,consts:[["headerTitle","Duplicate SKU","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/duplicate-sku",1,"d-flex","align-items-center","gap-2","btn","btn-outline-secondary","btn-lg"],[1,"fa-solid","fa-credit-card"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[2,"width","200px"],[2,"width","250px"],[1,"text-end",2,"width","50px"],[3,"next","previous","filter","totaldata","rowCountApi"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"d-flex","align-items-center"],[3,"typeId"],[1,"text-end"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"]],template:function(p,r){if(p&1){let n=x();B(0),w(1,"async"),e(2,"mainpanel",0),_("onSubmit",function(){return m(n),u(r.initMultipleListingSKU())}),e(3,"actions")(4,"a",1),c(5,"i",2),e(6,"span"),a(7,"Card View"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),T("ngModelChange",function(f){return m(n),P(r.filter().ListChannelID,f)||(r.filter().ListChannelID=f),u(f)}),t()()(),e(13,"content")(14,"div",5)(15,"div",6)(16,"div",7)(17,"table",8)(18,"thead",9)(19,"tr"),c(20,"th",10),e(21,"th"),a(22,"Product"),t(),e(23,"th",11),a(24,"SKU"),t(),e(25,"th",12),a(26,"Channel"),t(),e(27,"th",13),a(28,"Count"),t()()(),e(29,"tbody"),E(30,ee,17,8,"tr",null,I),t()(),e(32,"app-custom-paginator",14),_("next",function(){return m(n),u(r.initMultipleListingSKU())})("previous",function(){return m(n),u(r.initMultipleListingSKU())}),t()()()()()()}if(p&2){let n=v(1,6,r.multipleListingSKU$);l(2),s("hideSearchBox",!0),l(10),s("multiple",!0),K("ngModel",r.filter().ListChannelID),l(18),L(n==null?null:n.Data),l(2),s("filter",r.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("rowCountApi",r.rowCountApi)}},dependencies:[F,A,R,j,Z,q,O,N,z,Q,G,W,$],encapsulation:2})}}return o})();export{xe as DuplicateSkuV2Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as z,b as B}from"./chunk-FGRPTNDB.js";import{a as W,b as A,c as U}from"./chunk-3PPLPXAX.js";import{b as j}from"./chunk-OXWPLJEW.js";import{na as P}from"./chunk-RC5PUUVM.js";import{i as I}from"./chunk-P2AADVEN.js";import{A as E,a as k,h as D,m as N}from"./chunk-5PS6ZS3N.js";import{n as F}from"./chunk-FXQKRJWU.js";import{Gb as T,Gc as x,Hc as S,Kb as v,Kc as w,Lc as V,Mb as h,Mc as y,Oa as m,Qc as L,Ra as b,Yb as s,dc as O,ic as p,jc as C,kc as g,oc as f,pa as M,pb as _,rb as d,tc as u,uc as l,ya as a,za as r}from"./chunk-OJMQBH6T.js";function G(t,c){if(t&1&&(p(0,"div",6),g(1,"img",7),p(2,"div"),x(3),C()()),t&2){let e=c.$implicit;d(),s("src",e.logo,_),d(2),S(e.Name)}}function R(t,c){if(t&1){let e=f();p(0,"p-multiselect",4,0),u("click",function(){a(e);let n=l();return r(n.onClickSelect())}),y("ngModelChange",function(n){a(e);let o=l();return V(o.selectedChannels,n)||(o.selectedChannels=n),r(n)}),u("ngModelChange",function(n){a(e);let o=l();return r(o.onChannelChange(n))}),h(2,G,4,2,"ng-template",5),C()}if(t&2){let e=l();s("options",e.options())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),s("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())}}function q(t,c){if(t&1&&(p(0,"div",6),g(1,"img",7),p(2,"div"),x(3),C()()),t&2){let e=c.$implicit;d(),s("src",e.logo,_),d(2),S(e.Name)}}function H(t,c){if(t&1){let e=f();p(0,"p-select",8,1),u("click",function(){a(e);let n=l();return r(n.onClickSelect())}),y("ngModelChange",function(n){a(e);let o=l();return V(o.selectedChannels,n)||(o.selectedChannels=n),r(n)}),u("ngModelChange",function(n){a(e);let o=l();return r(o.onChannelChange(n))}),h(2,q,4,2,"ng-template",5),C()}if(t&2){let e=l();s("options",e.options())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),s("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var re=(()=>{class t extends U{constructor(){super(),this.authService=M(I),this.multiple=m(!1),this.clearable=m(!0),this.placeholder=m("Select Channels"),this.options=b(this.authService.getChannels()),this.maxSelectedLabels=m(6),this.onChange=e=>{}}onChannelChange(e){this.onChange(e)}onClickSelect(){this.initTopPosition(),setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],maxSelectedLabels:[1,"maxSelectedLabels"]},features:[L([{provide:k,multi:!0,useExisting:t}]),v],decls:2,vars:1,consts:[["multiSelect",""],["select",""],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["pTemplate","item"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"]],template:function(i,n){i&1&&h(0,R,3,6,"p-multiselect",2)(1,H,3,6,"p-select",3),i&2&&O(n.multiple()?0:1)},dependencies:[F,B,z,P,j,E,D,N,A,W],encapsulation:2})}}return t})();export{re as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ge}from"./chunk-QTTNQJAK.js";import"./chunk-IITU3NV6.js";import{a as de}from"./chunk-EEZKQOJW.js";import{a as me}from"./chunk-RGAWEFPQ.js";import{a as w}from"./chunk-XHAXYWZ7.js";import{c as ue,d as O,e as V}from"./chunk-TKV7XWBT.js";import"./chunk-YTCIQBSO.js";import"./chunk-2O4IEGGR.js";import"./chunk-VFATXJRG.js";import"./chunk-LYPHZP72.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-4YRBARG2.js";import"./chunk-5CKVZBHM.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-RHHHL4OR.js";import{a as he}from"./chunk-NLJHQ4MQ.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ne}from"./chunk-UMP6ZMEJ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-JVNHFIYT.js";import"./chunk-C7YK5TDP.js";import"./chunk-UWC2EVFY.js";import"./chunk-ACIMXBIC.js";import{i as M}from"./chunk-BVPWV5YO.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as R}from"./chunk-CGOB6Y3X.js";import{b as ie,e as ae}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as f}from"./chunk-RXQX7567.js";import{d as le,l as se,m as ce,n as pe}from"./chunk-HJXYT6MI.js";import{A as te,c as X,h as Y,m as Z,o as ee}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as oe,c as re}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{g as Q,j as K,n as q}from"./chunk-FXQKRJWU.js";import{$c as I,G as j,Gb as G,Gc as S,Kc as E,Lc as x,Mb as g,Mc as T,Qc as $,Ra as P,Sc as J,Yb as h,ad as v,ea as A,ic as l,ja as H,jc as p,kc as W,lc as F,mc as N,nc as z,oc as L,pa as u,rb as c,tc as C,uc as m,xb as d,ya as y,za as b}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as k,b as B}from"./chunk-66YHNWRR.js";var U=(()=>{class r{constructor(){this.authService=u(M),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(e,i){let t=Object.assign([],this.channelOptions),n=[],a;return e.forEach(o=>{a=t.find(s=>s.ID==o?.parent?.id),a&&(a=B(k({},a),{Name:`${o?.parent?.label} - ${o?.label}`,LocationID:o?.id}),n.push(a))}),i.forEach(o=>{a=t.find(s=>s.ID==o.id),a&&n.push(a)}),n}generateFilterLocation(e,i){let t=[],n=[],a=[];return e.length>0?(t=e.map(o=>o.id),n=e.filter(o=>f.IsNotEmpty(o?.parent?.id)).map(o=>o?.parent?.id).filter((o,s,D)=>D.indexOf(o)===s)):(t=[],n=[]),a=i.map(o=>o.id),a=a.concat(n).filter((o,s,D)=>D.indexOf(o)===s),{locationIds:t,channelIds:a}}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=H({token:r,factory:r.\u0275fac})}}return r})();var fe=r=>[r];function _e(r,_){if(r&1){let e=L();l(0,"button",16),C("click",function(){y(e);let t=m(2).ngIf,n=m();return b(n.onUpdateItems(t))}),W(1,"i",17),S(2," Update "),p()}}function Se(r,_){if(r&1&&(F(0),g(1,_e,3,0,"button",15),N()),r&2){let e=m().ngIf,i=m();c(),h("ngIf",i.productService.hasSelectionVariant(e))}}function Ie(r,_){if(r&1&&(l(0,"actions")(1,"div",13),g(2,Se,2,1,"ng-container",14),p()()),r&2){let e=m();c(2),h("ngxPermissionsOnly",J(1,fe,e.inventoryUpdateRole))}}function ve(r,_){r&1&&z(0)}function ye(r,_){if(r&1){let e=L();F(0),l(1,"app-table",18),C("onToggle",function(t){y(e);let n=m();return b(n.onShowDifferenceStock(t))})("onSubmit",function(t){y(e);let n=m();return b(n.updateStockByVariant(t))}),p(),N()}if(r&2){let e=_.ngIf,i=m();c(),h("data",e)("channel",i.channels())("showProductToggle",!0)("hiddenIPOSInventory",i.searchFilter.HiddenIPOSInventory)}}var at=(()=>{class r{constructor(e,i,t,n,a,o){this.http=e,this.toastr=i,this.dialog=t,this.productService=n,this.authService=a,this.mainPanelService=o,this.paginationService=u(O),this.multiChannelService=u(U),this.updateResHandling=u(V),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=P([]),this.selectedChannels=P([]),this.channels=P([]),this.inventoryUpdateRole=ne.InventoryUpdate,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(A(e=>{e.Filter={PageNumber:e.Filter.PageNumber,filterModel:w.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory},this.searchFilter=e.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(e=[]){let i=e.filter(n=>f.isValidGUID(n.id)==!1),t=e.filter(n=>f.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(t)}onSearch(e){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let t=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=t.channelIds,this.searchFilter.ListLocationID=t.locationIds,this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}updateStock(e,i){if(e.length>0){let t=[];e.forEach(o=>{o.Channel?.forEach(s=>{t.push({ChannelItemID:s?.ChannelItemID,ChannelVariationID:s?.ChannelVariationID,Inventory:o.Inventory,LocationID:s?.LocationID})})});let a={ListChannelID:i.filter(o=>o.selected).map(o=>o.ID),List:t};this.http.post(R.UpdateInventoryChannel,a).subscribe(o=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+a.List.length+" variants in "+a.ListChannelID.length+" channels","Success")})}}updateStockByVariant(e){let i=e.InventoryMultiwarehouse[0]?.LocationID,t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:e.Inventory,VariantID:e.ID,SKU:e?.Sku,LocationID:i};this.http.post(R.UpdateUpdateQuantityByItem,t).subscribe(n=>{this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock(n)})}handlingUpdateStock(e){if(e){let i=e?.Response?.Fail_list,t=e?.Response?.Success_list;this.updateResHandling.responseHandling(t,i,"Stock")}else this.toastr.error(e?.Exception,"Error")}onShowDifferenceStock(e){e?this.searchFilter.filterModel=w.DIFFERENCE:this.searchFilter.filterModel=w.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e),t=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(me,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(t))},width:"400px"}).afterClosed().pipe(j(n=>f.IsNotEmpty(n))).subscribe(n=>{this.updateStock(i,n)})}static{this.\u0275fac=function(i){return new(i||r)(d(ae),d(ie),d(le),d(he),d(M),d(se))}}static{this.\u0275cmp=G({type:r,selectors:[["app-multi-channel-comparison"]],features:[$([O,U,V])],decls:26,vars:21,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,t){i&1&&(l(0,"mainpanel",0),C("onSubmit",function(a){return t.onSearch(a)}),g(1,Ie,3,3,"actions",1),I(2,"async"),l(3,"filters"),g(4,ve,1,0,"ng-container",1),I(5,"async"),l(6,"div")(7,"label",2),S(8,"Channel"),p(),l(9,"multiwarehouse-tree-select",3),C("onChannelChange",function(a){return t.onChannelChange(a)}),p()(),l(10,"div",4)(11,"label",5),S(12,"PageNumber"),p(),l(13,"input",6),T("ngModelChange",function(a){return x(t.searchFilter.PageNumber,a)||(t.searchFilter.PageNumber=a),a}),p()(),l(14,"div",4)(15,"label",7),S(16,"Page Size"),p(),l(17,"input",8),T("ngModelChange",function(a){return x(t.searchFilter.RowCount,a)||(t.searchFilter.RowCount=a),a}),p()()(),l(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),g(22,ye,2,4,"ng-container",1),I(23,"async"),l(24,"infinite-paginator",12),I(25,"async"),C("onNextPage",function(){return t.paginationService.onNextPage(t.searchFilter)})("onLastPage",function(){return t.paginationService.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.paginationService.getRowCount(t.searchFilter)}),p()()()()()()),i&2&&(h("hideSearchBox",!1),c(),h("ngIf",v(2,13,t.paginationService.data$)),c(3),h("ngIf",v(5,15,t.loader$)),c(5),h("multiple",!0),c(4),E("ngModel",t.searchFilter.PageNumber),c(4),E("ngModel",t.searchFilter.RowCount),c(5),h("ngIf",v(23,17,t.paginationService.data$)),c(2),h("totalData",t.paginationService.totalData())("hideCount",t.paginationService.hideCount())("rowCount",v(25,19,t.paginationService.totalRowCount$))("pageNumber",t.paginationService.pageNumber())("disableNextButton",t.paginationService.disableNextButton())("goToLastPage",t.paginationService.isLastPage()))},dependencies:[q,Q,K,pe,ce,de,te,X,ee,Y,Z,ue,ge,re,oe],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return r})();export{at as MultiChannelComparison};
|
|
1
|
+
import{a as ge}from"./chunk-2BV7ZXRB.js";import"./chunk-IITU3NV6.js";import{a as de}from"./chunk-2DLU2LJJ.js";import{a as me}from"./chunk-RGAWEFPQ.js";import{a as w}from"./chunk-XHAXYWZ7.js";import{c as ue,d as O,e as V}from"./chunk-O2YNPIYM.js";import"./chunk-YTCIQBSO.js";import"./chunk-PGP3WHIS.js";import"./chunk-VFATXJRG.js";import"./chunk-LYPHZP72.js";import"./chunk-RHHHL4OR.js";import{a as he}from"./chunk-X4B2FYY3.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ne}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-63ANFYRV.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-GZS2MOSK.js";import"./chunk-ACIMXBIC.js";import{i as M}from"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as R}from"./chunk-CGOB6Y3X.js";import{b as ie,e as ae}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as f}from"./chunk-EUYQST7Q.js";import{d as le,l as se,m as ce,n as pe}from"./chunk-HJXYT6MI.js";import{A as te,c as X,h as Y,m as Z,o as ee}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as oe,c as re}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{g as Q,j as K,n as q}from"./chunk-FXQKRJWU.js";import{$c as I,G as j,Gb as G,Gc as S,Kc as E,Lc as x,Mb as g,Mc as T,Qc as $,Ra as P,Sc as J,Yb as h,ad as v,ea as A,ic as l,ja as H,jc as p,kc as W,lc as F,mc as N,nc as z,oc as L,pa as u,rb as c,tc as C,uc as m,xb as d,ya as y,za as b}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as k,b as B}from"./chunk-66YHNWRR.js";var U=(()=>{class r{constructor(){this.authService=u(M),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(e,i){let t=Object.assign([],this.channelOptions),n=[],a;return e.forEach(o=>{a=t.find(s=>s.ID==o?.parent?.id),a&&(a=B(k({},a),{Name:`${o?.parent?.label} - ${o?.label}`,LocationID:o?.id}),n.push(a))}),i.forEach(o=>{a=t.find(s=>s.ID==o.id),a&&n.push(a)}),n}generateFilterLocation(e,i){let t=[],n=[],a=[];return e.length>0?(t=e.map(o=>o.id),n=e.filter(o=>f.IsNotEmpty(o?.parent?.id)).map(o=>o?.parent?.id).filter((o,s,D)=>D.indexOf(o)===s)):(t=[],n=[]),a=i.map(o=>o.id),a=a.concat(n).filter((o,s,D)=>D.indexOf(o)===s),{locationIds:t,channelIds:a}}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=H({token:r,factory:r.\u0275fac})}}return r})();var fe=r=>[r];function _e(r,_){if(r&1){let e=L();l(0,"button",16),C("click",function(){y(e);let t=m(2).ngIf,n=m();return b(n.onUpdateItems(t))}),W(1,"i",17),S(2," Update "),p()}}function Se(r,_){if(r&1&&(F(0),g(1,_e,3,0,"button",15),N()),r&2){let e=m().ngIf,i=m();c(),h("ngIf",i.productService.hasSelectionVariant(e))}}function Ie(r,_){if(r&1&&(l(0,"actions")(1,"div",13),g(2,Se,2,1,"ng-container",14),p()()),r&2){let e=m();c(2),h("ngxPermissionsOnly",J(1,fe,e.inventoryUpdateRole))}}function ve(r,_){r&1&&z(0)}function ye(r,_){if(r&1){let e=L();F(0),l(1,"app-table",18),C("onToggle",function(t){y(e);let n=m();return b(n.onShowDifferenceStock(t))})("onSubmit",function(t){y(e);let n=m();return b(n.updateStockByVariant(t))}),p(),N()}if(r&2){let e=_.ngIf,i=m();c(),h("data",e)("channel",i.channels())("showProductToggle",!0)("hiddenIPOSInventory",i.searchFilter.HiddenIPOSInventory)}}var at=(()=>{class r{constructor(e,i,t,n,a,o){this.http=e,this.toastr=i,this.dialog=t,this.productService=n,this.authService=a,this.mainPanelService=o,this.paginationService=u(O),this.multiChannelService=u(U),this.updateResHandling=u(V),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=P([]),this.selectedChannels=P([]),this.channels=P([]),this.inventoryUpdateRole=ne.InventoryUpdate,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(A(e=>{e.Filter={PageNumber:e.Filter.PageNumber,filterModel:w.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory},this.searchFilter=e.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(e=[]){let i=e.filter(n=>f.isValidGUID(n.id)==!1),t=e.filter(n=>f.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(t)}onSearch(e){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let t=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=t.channelIds,this.searchFilter.ListLocationID=t.locationIds,this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}updateStock(e,i){if(e.length>0){let t=[];e.forEach(o=>{o.Channel?.forEach(s=>{t.push({ChannelItemID:s?.ChannelItemID,ChannelVariationID:s?.ChannelVariationID,Inventory:o.Inventory,LocationID:s?.LocationID})})});let a={ListChannelID:i.filter(o=>o.selected).map(o=>o.ID),List:t};this.http.post(R.UpdateInventoryChannel,a).subscribe(o=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+a.List.length+" variants in "+a.ListChannelID.length+" channels","Success")})}}updateStockByVariant(e){let i=e.InventoryMultiwarehouse[0]?.LocationID,t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:e.Inventory,VariantID:e.ID,SKU:e?.Sku,LocationID:i};this.http.post(R.UpdateUpdateQuantityByItem,t).subscribe(n=>{this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock(n)})}handlingUpdateStock(e){if(e){let i=e?.Response?.Fail_list,t=e?.Response?.Success_list;this.updateResHandling.responseHandling(t,i,"Stock")}else this.toastr.error(e?.Exception,"Error")}onShowDifferenceStock(e){e?this.searchFilter.filterModel=w.DIFFERENCE:this.searchFilter.filterModel=w.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e),t=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(me,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(t))},width:"400px"}).afterClosed().pipe(j(n=>f.IsNotEmpty(n))).subscribe(n=>{this.updateStock(i,n)})}static{this.\u0275fac=function(i){return new(i||r)(d(ae),d(ie),d(le),d(he),d(M),d(se))}}static{this.\u0275cmp=G({type:r,selectors:[["app-multi-channel-comparison"]],features:[$([O,U,V])],decls:26,vars:21,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,t){i&1&&(l(0,"mainpanel",0),C("onSubmit",function(a){return t.onSearch(a)}),g(1,Ie,3,3,"actions",1),I(2,"async"),l(3,"filters"),g(4,ve,1,0,"ng-container",1),I(5,"async"),l(6,"div")(7,"label",2),S(8,"Channel"),p(),l(9,"multiwarehouse-tree-select",3),C("onChannelChange",function(a){return t.onChannelChange(a)}),p()(),l(10,"div",4)(11,"label",5),S(12,"PageNumber"),p(),l(13,"input",6),T("ngModelChange",function(a){return x(t.searchFilter.PageNumber,a)||(t.searchFilter.PageNumber=a),a}),p()(),l(14,"div",4)(15,"label",7),S(16,"Page Size"),p(),l(17,"input",8),T("ngModelChange",function(a){return x(t.searchFilter.RowCount,a)||(t.searchFilter.RowCount=a),a}),p()()(),l(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),g(22,ye,2,4,"ng-container",1),I(23,"async"),l(24,"infinite-paginator",12),I(25,"async"),C("onNextPage",function(){return t.paginationService.onNextPage(t.searchFilter)})("onLastPage",function(){return t.paginationService.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.paginationService.getRowCount(t.searchFilter)}),p()()()()()()),i&2&&(h("hideSearchBox",!1),c(),h("ngIf",v(2,13,t.paginationService.data$)),c(3),h("ngIf",v(5,15,t.loader$)),c(5),h("multiple",!0),c(4),E("ngModel",t.searchFilter.PageNumber),c(4),E("ngModel",t.searchFilter.RowCount),c(5),h("ngIf",v(23,17,t.paginationService.data$)),c(2),h("totalData",t.paginationService.totalData())("hideCount",t.paginationService.hideCount())("rowCount",v(25,19,t.paginationService.totalRowCount$))("pageNumber",t.paginationService.pageNumber())("disableNextButton",t.paginationService.disableNextButton())("goToLastPage",t.paginationService.isLastPage()))},dependencies:[q,Q,K,pe,ce,de,te,X,ee,Y,Z,ue,ge,re,oe],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return r})();export{at as MultiChannelComparison};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m,b as l}from"./chunk-WRJFUNM3.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as i,J as u}from"./chunk-FXQKRJWU.js";import{Gb as r,Yb as p,ic as s,jc as a,kc as o,rb as n}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var c=(()=>{class t{constructor(){this.tabs=[{Title:"Users",Url:"/menu/users/users",Description:""},{Title:"Groups",Url:"/menu/users/groups",Description:""},{Title:"Setup",Url:"/menu/users/setup",Description:""}]}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=r({type:t,selectors:[["app-user-menu"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(e,f){e&1&&(s(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),a()()(),o(4,"router-outlet")),e&2&&(n(3),p("Tabs",f.tabs)("usePermissions",!0))},dependencies:[l,m,u,i],encapsulation:2})}}return t})(),T=[{path:"",component:c,children:[{path:"users",loadComponent(){return import("./chunk-
|
|
1
|
+
import{a as m,b as l}from"./chunk-WRJFUNM3.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as i,J as u}from"./chunk-FXQKRJWU.js";import{Gb as r,Yb as p,ic as s,jc as a,kc as o,rb as n}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var c=(()=>{class t{constructor(){this.tabs=[{Title:"Users",Url:"/menu/users/users",Description:""},{Title:"Groups",Url:"/menu/users/groups",Description:""},{Title:"Setup",Url:"/menu/users/setup",Description:""}]}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=r({type:t,selectors:[["app-user-menu"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(e,f){e&1&&(s(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),a()()(),o(4,"router-outlet")),e&2&&(n(3),p("Tabs",f.tabs)("usePermissions",!0))},dependencies:[l,m,u,i],encapsulation:2})}}return t})(),T=[{path:"",component:c,children:[{path:"users",loadComponent(){return import("./chunk-D2TELRO7.js").then(t=>t.UsersComponent)},data:{title:"Users"}},{path:"users/form",loadComponent(){return import("./chunk-EXSI44LD.js").then(t=>t.UserFormComponent)},data:{title:"Users Form"}},{path:"users/info",loadComponent(){return import("./chunk-LXXEN7OV.js").then(t=>t.UserInfoComponent)},data:{title:"Users Info"}},{path:"groups",loadComponent(){return import("./chunk-DXPLB6OB.js").then(t=>t.GroupsComponent)},data:{title:"Groups"}},{path:"setup",loadComponent(){return import("./chunk-HERZ7KEM.js").then(t=>t.SetupInfoComponent)},data:{title:"Setup Info"}},{path:"setup/form",loadComponent(){return import("./chunk-S3FZRSRP.js").then(t=>t.SetupFormComponent)},data:{title:"Setup Form"}},{path:"groups/form",loadComponent(){return import("./chunk-SLEJQAL7.js").then(t=>t.GroupsFormComponent)},data:{title:"Groups Form"}},{path:"groups/info",loadComponent(){return import("./chunk-UGYIOLBR.js").then(t=>t.GroupInfoComponent)},data:{title:"Groups Info"}},{path:"**",redirectTo:"users",pathMatch:"full"},{path:"",pathMatch:"full",redirectTo:"users"}]}];export{c as UserMenuComponent,T as userRoutes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as k}from"./chunk-PIBVGTHJ.js";import{a as Ve}from"./chunk-GH5FTODR.js";import{a as Y}from"./chunk-UMP6ZMEJ.js";import{a as Me,c as be}from"./chunk-3PPLPXAX.js";import{a as ke,b as Ee}from"./chunk-EPBVNII2.js";import{b as Te,c as De}from"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import{d as Ce,e as fe}from"./chunk-PYXL7UF7.js";import{a as ue}from"./chunk-Z3ITXK3D.js";import"./chunk-CGOB6Y3X.js";import{b as Z}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as de}from"./chunk-EUYQST7Q.js";import{b as xe,c as te,d as ye,j as Se,k as ve,m as Ue,n as we}from"./chunk-HJXYT6MI.js";import{A as H,b as me,h as q,m as j}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{a as _e,b as ge,c as he}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as ce,J as pe,j as $,n as z}from"./chunk-FXQKRJWU.js";import{$b as K,$c as F,G as se,Gb as B,Gc as g,Hc as Q,Ic as D,Kb as le,Kc as U,Lc as w,Mb as f,Mc as M,Nc as O,Oc as N,Pc as h,Qc as W,Ra as S,Rc as X,Sc as ee,Yb as _,Z as E,ad as A,dc as v,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 x,pb as ae,q as oe,rb as a,rd as R,tc as C,uc as l,v as G,ya as c,za as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as ne,b as re}from"./chunk-66YHNWRR.js";var ie=function(i){return i.ERROR="https://resc.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg",i.UNAUTHORIZED="https://resc.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",i.EMPTY_LIST="https://resc.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg",i.REMOVE="https://resc.cloudinary.com/pos/image/upload/v1706156973/icons/globalerrorclear.svg",i}(ie||{});var Pe=()=>({display:"d-flex"});function Ae(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),M("ngModelChange",function(t){let n=c(e).$implicit;return w(n.selected,t)||(n.selected=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(2),n=h(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),U("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),M("ngModelChange",function(t){c(e);let n=l();return w(n.isCheckAll,t)||(n.isCheckAll=t),p(t)}),C("ngModelChange",function(t){c(e);let n=l(),d=h(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=h(0);a(),K(X(4,Pe)),_("binary",!0),U("ngModel",e.isCheckAll),a(3),I(r)}}var Ie=(()=>{class i extends be{constructor(){super(),this.dialogRef=x(xe),this.data=x(te),this.userService=x(k),this.dialogData=x(te),this.toastr=x(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,"user-list-scroll","mt-5",2,"max-height","300x","overflow-y","auto","overflow-x","hidden","box-sizing","border-box"],[1,"d-flex","flex-column","align-items-center","mt-5"],[1,"col"],["optionLabel","Name","optionValue","ID","placeholder","Select a group","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),F(1,"async"),o(2,"modal-material",0),C("onClose",function(){return c(n),p(t.onClose())})("onCancel",function(){return c(n),p(t.onClose())})("onOk",function(){c(n);let u=h(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),f(9,Ae,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),C("click",function(){return c(n),p(t.onClickSelect())}),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()()()()}if(r&2){let n=N(A(1,5,t.migrateLoader$));a(2),_("config",t.config),a(7),v((n==null?null:n.length)===0?9:10),a(5),_("options",t.userGroups())("filter",!0),U("ngModel",t.selectedGroup)}},dependencies:[z,$,ve,H,q,j,Te,Me],styles:[".user-list-scroll[_ngcontent-%COMP%]{max-height:160px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box}"]})}}return i})();var Le=i=>({ID:i});function Be(i,m){if(i&1){let e=y();o(0,"button",13),C("click",function(){c(e);let t=l(2),n=h(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),f(1,Be,3,1,"button",12),T()),i&2){let e,r=l();a(),v(((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),C("click",function(){c(e);let t=l(),n=h(0),d=h(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 ze(i,m){i&1&&(b(0),o(1,"a",16),g(2," Invite "),s(),T())}function qe(i,m){if(i&1){let e=y();b(0),o(1,"th",17)(2,"div",18)(3,"input",19),C("change",function(t){c(e);let n=l(),d=h(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",23),M("ngModelChange",function(t){c(e);let n=l(2).$implicit;return w(n.checked,t)||(n.checked=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(3),n=h(2);return p(t.onSelectUser(n==null?null:n.Data))}),s()()}if(i&2){let e=l(2).$implicit;a(),U("ngModel",e.checked)}}function He(i,m){if(i&1&&(b(0),o(1,"td"),f(2,je,2,1,"div",18),s(),T()),i&2){let e,r=l().$implicit,t=l();a(2),v(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",24),i&2){let e=m.$implicit;_("label",e.Name)("image",e.Logo)("alt",e.Name)}}function Xe(i,m){if(i&1&&P(0,Qe,1,3,"p-chip",24,V),i&2){let e=l().$implicit;I(e.Channels)}}function et(i,m){i&1&&(o(0,"span"),g(1,"All Channels"),s())}function tt(i,m){if(i&1&&(o(0,"tr"),f(1,He,3,1,"ng-container",3),o(2,"td"),f(3,Ye,2,4,"a",20)(4,Ze,2,1,"span"),s(),o(5,"td"),f(6,Je,2,4,"a",21)(7,Ke,2,1,"span"),s(),o(8,"td")(9,"div",22),f(10,Xe,2,0)(11,et,2,0,"span"),s()()()),i&2){let e=m.$implicit,r=l();a(),_("ngxPermissionsOnly",r.userDeleteRole),a(2),v(r.hasUserEditRole()?3:4),a(3),v(r.hasUserEditRole()?6:7),a(4),v((e.Channels==null?null:e.Channels.length)>0?10:11)}}function it(i,m){if(i&1){let e=y();o(0,"app-mat-paginator-no-count",25),C("next",function(){c(e);let t=l(),n=h(0);return p(t.onNextPage(n==null?null:n.Filter))})("previous",function(){c(e);let t=l(),n=h(0);return p(t.onPrevPage(n==null?null:n.Filter))}),s()}if(i&2){l();let e=h(0),r=h(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)("alwaysShowNextButton",!0)}}var zt=(()=>{class i{constructor(){this.usersService=x(k),this.permissionService=x(_e),this.toastService=x(Z),this.dialog=x(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.UserInvite,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","alwaysShowNextButton"],[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"],["type","checkbox",3,"ngModelChange","ngModel"],[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"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"]],template:function(r,t){if(r&1){let n=y();O(0),F(1,"async"),O(2),F(3,"async"),o(4,"mainpanel",0),M("textChange",function(u){return c(n),w(t.searchText,u)||(t.searchText=u),p(u)}),C("onSubmit",function(){c(n);let u=h(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),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()(),o(10,"actions"),f(11,We,2,1,"ng-container",3)(12,$e,3,0,"ng-container",3)(13,ze,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"),f(21,qe,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"),s()()(),o(28,"tbody"),P(29,tt,12,4,"tr",null,V),s()(),f(31,it,1,5,"app-mat-paginator-no-count",10),s()()()()(),o(32,"invite-group",11),C("onSuccessUpdateUser",function(){c(n);let u=h(0);return p(t.onSuccessUpdateUser(u==null?null:u.Filter))}),s()}if(r&2){let n=N(A(1,11,t.userLoader$));a(2);let d=N(A(3,14,t.users$));a(2),U("text",t.searchText),a(5),_("clearable",!0)("items",n==null||n.Options==null?null:n.Options.Groups),U("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),v(n?31:-1),a(),_("groups",n==null||n.Options==null?null:n.Options.Groups)("users",t.userInviteOptions())}},dependencies:[z,$,we,Ue,pe,ce,Ve,he,ge,fe,Ce,H,me,q,j,De,Ee,ke],encapsulation:2})}}return i})();export{zt as UsersComponent};
|