marketplacepos 6.31.0 → 6.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-TWWHVZXS.js → chunk-22QP7S5J.js} +1 -1
- package/Marketplace/{chunk-H6XSK7GB.js → chunk-2KROZQ4D.js} +1 -1
- package/Marketplace/{chunk-DEC32FB2.js → chunk-3BDOVOJK.js} +1 -1
- package/Marketplace/{chunk-AEACJ7IT.js → chunk-3QT2H53Z.js} +1 -1
- package/Marketplace/{chunk-MV6SQJHJ.js → chunk-5537ZUHH.js} +1 -1
- package/Marketplace/{chunk-QJ4D3KFN.js → chunk-554MWL3L.js} +1 -1
- package/Marketplace/{chunk-TTNG3MHW.js → chunk-5WPF5DKJ.js} +1 -1
- package/Marketplace/{chunk-N2HFKC4A.js → chunk-7APQJYJP.js} +1 -1
- package/Marketplace/{chunk-Z445HYT7.js → chunk-A4EJUFDL.js} +1 -1
- package/Marketplace/{chunk-ATZHWHIP.js → chunk-AJRBAIPX.js} +1 -1
- package/Marketplace/{chunk-BXBABE4R.js → chunk-BCQVOTVW.js} +1 -1
- package/Marketplace/{chunk-LAIRVUNP.js → chunk-BIWJR4K3.js} +1 -1
- package/Marketplace/{chunk-IPMCCZZW.js → chunk-BU67S7V2.js} +1 -1
- package/Marketplace/{chunk-S5FQJLG5.js → chunk-C6PRKEPS.js} +1 -1
- package/Marketplace/{chunk-HD5N3GUK.js → chunk-D25XSVUX.js} +1 -1
- package/Marketplace/{chunk-R2KLMLVT.js → chunk-DBVTYI3K.js} +1 -1
- package/Marketplace/{chunk-5SV6WZXH.js → chunk-DMVD52LV.js} +1 -1
- package/Marketplace/{chunk-PXM25OET.js → chunk-DQUTVCG3.js} +1 -1
- package/Marketplace/{chunk-33TDKUXQ.js → chunk-DTLBDZUC.js} +1 -1
- package/Marketplace/{chunk-UJFPQVWX.js → chunk-EH3RWIIG.js} +1 -1
- package/Marketplace/{chunk-BMX7EBGZ.js → chunk-ESKY4PXQ.js} +1 -1
- package/Marketplace/{chunk-BRMEWMES.js → chunk-FIJK23CR.js} +1 -1
- package/Marketplace/{chunk-N77Q2Q3K.js → chunk-FQIMOLGJ.js} +1 -1
- package/Marketplace/{chunk-ZKMREYB7.js → chunk-GNKRJIFK.js} +1 -1
- package/Marketplace/{chunk-E2UCWDAO.js → chunk-GQ6WZGTN.js} +1 -1
- package/Marketplace/{chunk-FFU3JAIJ.js → chunk-GYY62BI2.js} +1 -1
- package/Marketplace/{chunk-42YIIYI7.js → chunk-I4AQC46M.js} +1 -1
- package/Marketplace/{chunk-ULBNBY4R.js → chunk-IFR4WMPF.js} +1 -1
- package/Marketplace/{chunk-FYUBZFJK.js → chunk-KLTUFAU7.js} +1 -1
- package/Marketplace/{chunk-VDNUDZOQ.js → chunk-KYK5EKWR.js} +1 -1
- package/Marketplace/{chunk-6T2JNOIL.js → chunk-LJMZHFUM.js} +2 -2
- package/Marketplace/{chunk-SSK4EUDM.js → chunk-LPJDWFPW.js} +1 -1
- package/Marketplace/{chunk-7P7PKIQT.js → chunk-M7V2QLJX.js} +1 -1
- package/Marketplace/{chunk-46ZRW5ZA.js → chunk-MF5ORGSY.js} +1 -1
- package/Marketplace/{chunk-UR7KQQE3.js → chunk-N5HZLFUR.js} +1 -1
- package/Marketplace/{chunk-UZQ5WKV4.js → chunk-NCRNBMR5.js} +1 -1
- package/Marketplace/{chunk-MYDVMG67.js → chunk-ODYXAAZO.js} +1 -1
- package/Marketplace/{chunk-OESZXCMJ.js → chunk-PP34U6DC.js} +1 -1
- package/Marketplace/{chunk-F5RRHQJJ.js → chunk-PPB6VLND.js} +1 -1
- package/Marketplace/{chunk-KI4TY5N5.js → chunk-Q5FSDQA4.js} +1 -1
- package/Marketplace/{chunk-TYR2ZFLG.js → chunk-Q7PLXKW6.js} +1 -1
- package/Marketplace/{chunk-II7DLNVF.js → chunk-QIPXU2UF.js} +1 -1
- package/Marketplace/{chunk-ZWW4JHZV.js → chunk-R6FPN3JX.js} +1 -1
- package/Marketplace/{chunk-GJAJLHPZ.js → chunk-RQMOW4O2.js} +1 -1
- package/Marketplace/{chunk-NWPQV6XP.js → chunk-S2BI374Y.js} +1 -1
- package/Marketplace/{chunk-TW6YICUO.js → chunk-SNBMOPZH.js} +1 -1
- package/Marketplace/{chunk-JOQC5TET.js → chunk-SV7I3X7E.js} +1 -1
- package/Marketplace/{chunk-OH43UVFL.js → chunk-UAZVPBL5.js} +1 -1
- package/Marketplace/{chunk-M63VP7TS.js → chunk-UFAON54A.js} +1 -1
- package/Marketplace/{chunk-LFRV2RDU.js → chunk-USKDTPOF.js} +1 -1
- package/Marketplace/{chunk-HZKA6DGO.js → chunk-WBITIBZJ.js} +1 -1
- package/Marketplace/{chunk-7LJVTZAG.js → chunk-WFGABKAC.js} +1 -1
- package/Marketplace/{chunk-JMO7SQDX.js → chunk-WM6WUK23.js} +1 -1
- package/Marketplace/{chunk-3I7S5TZI.js → chunk-XHYTA6VL.js} +1 -1
- package/Marketplace/{chunk-YGVY3X52.js → chunk-XL3AJY23.js} +1 -1
- package/Marketplace/{chunk-EBCT2DN2.js → chunk-XMLM6DEN.js} +1 -1
- package/Marketplace/{chunk-O6RJOU3C.js → chunk-Y7Q735S7.js} +1 -1
- package/Marketplace/{chunk-Q5H2PXZY.js → chunk-ZQBMFV5K.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-W5NHRKAQ.js → main-EIK3T2GI.js} +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as fe,b as be,c as Ce,d as ve,e as we,f as Le,g as Re,h as Ne,j as Ve}from"./chunk-WZDFB7PP.js";import"./chunk-FJYX7L63.js";import{a as De,b as Pe}from"./chunk-I4XJB7OG.js";import"./chunk-MHV46BJA.js";import{b as ze}from"./chunk-D2THPOQ7.js";import{a as Te}from"./chunk-WXQUJZQY.js";import{a as Me}from"./chunk-
|
|
1
|
+
import{a as fe,b as be,c as Ce,d as ve,e as we,f as Le,g as Re,h as Ne,j as Ve}from"./chunk-WZDFB7PP.js";import"./chunk-FJYX7L63.js";import{a as De,b as Pe}from"./chunk-I4XJB7OG.js";import"./chunk-MHV46BJA.js";import{b as ze}from"./chunk-D2THPOQ7.js";import{a as Te}from"./chunk-WXQUJZQY.js";import{a as Me}from"./chunk-BU67S7V2.js";import"./chunk-6GSJBXEE.js";import"./chunk-2C6XBRGE.js";import"./chunk-RUHYZ275.js";import{a as ke}from"./chunk-3BV4FPZE.js";import{a as Ee}from"./chunk-GIPWMAZL.js";import"./chunk-QDKVYF6D.js";import"./chunk-VAYLCOBC.js";import{a as xe}from"./chunk-6PI5PUIQ.js";import{c as Se,g as Ie}from"./chunk-6VOSRCWX.js";import{d as ye}from"./chunk-XSXHGAXP.js";import{a as _e}from"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-ACIMXBIC.js";import"./chunk-67AXBZYF.js";import"./chunk-5QG5PZ7U.js";import{f as ge}from"./chunk-KYK2ZFUZ.js";import{b as me}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import{ra as W,sa as Q}from"./chunk-SPNVH2ST.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{a as ce}from"./chunk-ZSUWHVKX.js";import{h as de}from"./chunk-KYK5EKWR.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import{b as ae,c as se}from"./chunk-7R55YTL6.js";import{c as G}from"./chunk-NNVT5X6O.js";import{b as pe,h as he,m as ue,z as R}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{b as le,e as re}from"./chunk-45DFJJAO.js";import"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{D as ne,F as oe,z as ie}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as U,Eb as O,Fb as X,Ga as k,I as V,Kb as T,Lc as C,Oc as d,Pc as te,Qc as g,Sc as H,Tc as K,Uc as A,V as z,aa as F,ad as $,bc as P,bd as E,dc as L,ec as Z,gc as Y,hc as ee,ia as B,ic as h,ja as J,jc as o,kb as D,kc as l,kd as v,lc as _,ld as w,mb as a,na as S,od as M,pc as x,qc as I,sc as y,t as j,ua as u,va as m,xc as b,zc as s}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Be=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=X({type:i});static \u0275inj=J({imports:[oe,Le,Ie,Se,fe,be,Ce,we,ve,ze,_e,ye,Te,ke,Q,R,ge,Q]})}return i})();var q=(()=>{class i{constructor(){this.httpSerivice=S(re),this.toastrHandlingService=S(Ee),this.toastr=S(le)}getChannelSummary$(e=[]){return this.httpSerivice.post("api/inventory/InventorySummary",{ListChannelID:e}).pipe(j(n=>n.Data.map((t,r)=>(t.id=r,t.Img=G.getChannelLogoByTypeId(t.Type),t.Groups=this.groupingProductByOutlet(t.Products),t.LocationNames=this.groupingLocationName(t.Groups),t))))}groupingProductByOutlet(e){let n=null;return G.IsNotEmpty(e[0].Outlet)&&(n=e.reduce((t,r)=>{let p=r.Outlet;return t[p]||(t[p]=[]),t[p].push(r),t},{})),n}groupingLocationName(e){let n=[];return e&&(n=Object.keys(e).map(t=>t)),n}refreshInventory(e,n){let t={ChannelItemID:e.ChannelItemID,ChannelVariationID:e.ChannelVariationID,ChannelID:n,VariantID:e.POSVariantID};return this.httpSerivice.post("/api/Inventory/RefreshInventoryChannel",t).pipe(F(()=>{this.toastr.success("Inventory refreshed successfully","Success")}))}updateChannelInventory(e){let n=this.mappingPayloadUpdateInventory(e);return this.httpSerivice.post("/api/Inventory/UpdateChannel",n).pipe(F(t=>{this.toastrHandlingService.showToastrUploadMultiple(t,this.customizeToastrMessage)}))}customizeToastrMessage(e,n){return`
|
|
2
2
|
<div>
|
|
3
3
|
Product ${e.Name} was <div class="d-inline fw-bold">successfully</div> updated to ${n}
|
|
4
4
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-C6PRKEPS.js";import{a as m}from"./chunk-J3PHESB2.js";import"./chunk-RDXDKWLL.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-KYK5EKWR.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import"./chunk-45DFJJAO.js";import{c as i}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as a,ic as l,jc as p,kc as c,lc as o,mb as r}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var g=(()=>{class n{constructor(){this.channelTabs=[{Title:"Channel",Url:"/menu/channel/marketplace"},{Title:"POS",Url:"/menu/channel/pos"}]}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=a({type:n,selectors:[["app-channels"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,u){e&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),c()()(),o(4,"router-outlet")),e&2&&(r(3),l("Tabs",u.channelTabs))},dependencies:[m,i],styles:[".form-label-group[_ngcontent-%COMP%]{position:relative;margin-bottom:1rem}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{width:auto;position:absolute;top:1.125rem;left:.75rem;display:block;margin-bottom:0;line-height:1.5;color:#ccc;pointer-events:none;cursor:text;border:1px solid transparent;border-radius:.25rem;transition:all .1s ease-in-out;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]{padding:.75rem;color:#343434;resize:both;font-size:.875rem;border-radius:.25rem;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{top:.9375rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus ~ label[_ngcontent-%COMP%]{top:1rem;left:.78125rem}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] .ng-select-container{min-height:3.625rem;border-color:#c8d3df;box-shadow:none}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:inline-block;top:-.625rem;background-color:#fff;font-size:.75rem!important;color:#9da2a6;padding:0 .25rem;z-index:1002;left:.5rem}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{padding-left:.25rem!important}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{top:18px!important}.form-label-group.radio[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;border-radius:.25rem!important;border:solid 1px #c8d3df}.form-label-group.radio[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem!important;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group.empty[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:none}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::placeholder{color:transparent}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%]{color:#3f8aec}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{padding-left:.25rem;color:#ccc!important;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-has-value .ng-value{padding-left:.25rem;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-value-container{overflow:initial!important}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{top:auto!important;padding-left:.875rem!important;font-size:.875rem}"]})}}return n})();var b=[{path:"",component:g,children:[{path:"",redirectTo:"marketplace",pathMatch:"full"},{path:"marketplace",loadComponent(){return import("./chunk-AQG3WSR3.js").then(n=>n.MarketplaceComponent)},canActivate:[t],data:{title:"List"}},{path:"marketplace/form",loadComponent(){return import("./chunk-PDDRD4EU.js").then(n=>n.MarketplaceFormComponent)},canActivate:[t],data:{title:"Add new Channel"}},{path:"marketplace/view",loadComponent(){return import("./chunk-FKR5LVJP.js").then(n=>n.MarketplaceViewComponent)},canActivate:[t],data:{title:"Marketplace View"}},{path:"marketplace/add",loadComponent(){return import("./chunk-47X3WRYV.js").then(n=>n.MarketplaceAddComponent)},canActivate:[t],data:{title:"Marketplace Add"}},{path:"pos",loadComponent(){return import("./chunk-MEJ26HC4.js").then(n=>n.PosComponent)},canActivate:[t],data:{title:"POS"}},{path:"pos/edit",loadComponent(){return import("./chunk-47GECTL6.js").then(n=>n.EditComponent)},canActivate:[t],data:{title:"POS Edit"}}]}];export{b as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as q}from"./chunk-HI5QPKQM.js";import{a as z}from"./chunk-
|
|
1
|
+
import{a as q}from"./chunk-HI5QPKQM.js";import{a as z}from"./chunk-BU67S7V2.js";import"./chunk-6GSJBXEE.js";import"./chunk-2C6XBRGE.js";import"./chunk-RUHYZ275.js";import"./chunk-3BV4FPZE.js";import{a as j}from"./chunk-TWRFL73R.js";import{a as Z}from"./chunk-7ES2Z445.js";import"./chunk-QDKVYF6D.js";import"./chunk-VAYLCOBC.js";import"./chunk-6PI5PUIQ.js";import"./chunk-6VOSRCWX.js";import"./chunk-XSXHGAXP.js";import"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-ACIMXBIC.js";import"./chunk-67AXBZYF.js";import"./chunk-5QG5PZ7U.js";import"./chunk-KYK2ZFUZ.js";import{b as H}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-SPNVH2ST.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-KYK5EKWR.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import{a as y}from"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import{h as W,m as $,z as G}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{e as R}from"./chunk-45DFJJAO.js";import{e as F,g as O}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{D as N,z as A}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as M,Ga as V,Oc as a,Pc as g,Sc as K,Tc as T,Uc as P,V as D,Vc as B,bc as k,dc as U,ec as I,gc as E,hc as L,ic as d,jc as e,kb as b,kc as t,kd as w,lc as c,ld as v,mb as l,na as f,sc as x,ua as m,va as u,xc as S,zc as _}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function J(o,h){if(o&1){let i=x();e(0,"img",21),S("click",function(r){m(i);let n=_().$implicit,s=_();return u(s.onZoomImage(r,n==null?null:n.ImageUrl))}),t()}if(o&2){let i=_().$implicit;d("src",i==null?null:i.ThumbnailUrl,b)}}function Q(o,h){o&1&&c(0,"img",17)}function X(o,h){if(o&1&&(e(0,"tr")(1,"td")(2,"div",15),k(3,J,1,1,"img",16)(4,Q,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),d("typeId",i.TypeID),l(2),g(i.ChannelName),l(2),g(v(16,6,i.Count))}}var he=(()=>{class o{constructor(){this.httpService=f(R),this.biggerPictureService=f(Z),this.filter=V({PageNumber:1,RowCount:20,ListChannelID:[]}),this.rowCountApi=y.GetMultilistingSKUCount,this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(y.GetMultiListingSKU,this.filter()).pipe(D(1))}onZoomImage(i,p){this.biggerPictureService.openBiggerPicture(i,p)}static{this.\u0275fac=function(p){return new(p||o)}}static{this.\u0275cmp=M({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),S("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),P("ngModelChange",function(C){return m(n),T(r.filter().ListChannelID,C)||(r.filter().ListChannelID=C),u(C)}),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,X,17,8,"tr",null,I),t()(),e(32,"app-custom-paginator",14),S("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),d("hideSearchBox",!0),l(10),d("multiple",!0),K("ngModel",r.filter().ListChannelID),l(18),L(n==null?null:n.Data),l(2),d("filter",r.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("rowCountApi",r.rowCountApi)}},dependencies:[H,j,O,F,q,z,G,W,$,A,N],encapsulation:2,changeDetection:0})}}return o})();export{he as DuplicateSkuV2Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-OL7LL2JK.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-
|
|
1
|
+
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-OL7LL2JK.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-BIWJR4K3.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-MF5ORGSY.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-RQMOW4O2.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-AJRBAIPX.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-DBVTYI3K.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-ESKY4PXQ.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-EH3RWIIG.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-Q7PLXKW6.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"log/detail",loadComponent(){return import("./chunk-G2XGQFY4.js").then(t=>t.DownloadOrderDetailComponent)},title:"Download Log Detail"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-C6PRKEPS.js";import{a as y}from"./chunk-J3PHESB2.js";import"./chunk-RDXDKWLL.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-KYK5EKWR.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import"./chunk-45DFJJAO.js";import{c as b,e as h}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as p,Oc as s,Qc as f,bd as v,fc as u,gc as m,hc as c,ic as l,jc as t,kc as n,lc as i,mb as r}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var g=e=>[e];function S(e,D){if(e&1&&(t(0,"a",8),s(1),n()),e&2){let o=D.$implicit;l("routerLink",v(2,g,o.url)),r(),f(" ",o.title)}}var C=(()=>{class e{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=p({type:e,selectors:[["app-download"]],decls:13,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[1,"dropdown-item",3,"routerLink"]],template:function(a,d){a&1&&(t(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),n()(),t(4,"div")(5,"div",3)(6,"a",4),i(7,"i",5),n(),t(8,"div",6)(9,"div",7),m(10,S,2,4,"a",8,u),n()()()()(),i(12,"router-outlet")),a&2&&(r(3),l("Tabs",d.tabs),r(7),c(d.moreMenu))},dependencies:[y,h,b],encapsulation:2,changeDetection:0})}}return e})();var _=[{path:"",component:C,children:[{path:"by-url",loadComponent(){return import("./chunk-PPB6VLND.js").then(e=>e.ByUrlComponent)},data:{title:"Download Product By Url"},canActivate:[w]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}];export{_ as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Te}from"./chunk-LZ4OSFKB.js";import{a as D}from"./chunk-ISMIPSYN.js";import{a as Fe,b as we,c as be,d as B,e as L}from"./chunk-IBZCREPJ.js";import{a as fe}from"./chunk-IPMCCZZW.js";import"./chunk-6GSJBXEE.js";import"./chunk-2C6XBRGE.js";import"./chunk-RUHYZ275.js";import"./chunk-3BV4FPZE.js";import{a as ye}from"./chunk-MU7RI22T.js";import{a as Pe,b as ve}from"./chunk-Y5RUW5VE.js";import{c as xe,d as Se}from"./chunk-52BVJZIG.js";import"./chunk-VINT75RU.js";import{a as ue}from"./chunk-7ES2Z445.js";import"./chunk-CHCLLSOR.js";import"./chunk-72AE6737.js";import"./chunk-SBLTWRFW.js";import{a as ge}from"./chunk-SSK4EUDM.js";import"./chunk-QDKVYF6D.js";import"./chunk-VAYLCOBC.js";import"./chunk-6PI5PUIQ.js";import"./chunk-6VOSRCWX.js";import"./chunk-XSXHGAXP.js";import"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-MYDVMG67.js";import"./chunk-ACIMXBIC.js";import"./chunk-67AXBZYF.js";import"./chunk-5QG5PZ7U.js";import"./chunk-KYK2ZFUZ.js";import{e as he}from"./chunk-KXLYQDZR.js";import{a as me,b as Ce}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import{c as pe}from"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-SPNVH2ST.js";import"./chunk-BXA5YUTN.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{a as ae}from"./chunk-ZSUWHVKX.js";import{h as oe}from"./chunk-VDNUDZOQ.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import{b as ne,c as ie}from"./chunk-7R55YTL6.js";import{c as Y}from"./chunk-NNVT5X6O.js";import{b as re,c as le,h as ce,m as se,o as _e,z as de}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{b as ee,e as te}from"./chunk-45DFJJAO.js";import"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{D as I,K as X,z as Q}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as J,E as q,Eb as W,Ga as S,Kb as T,Lc as k,Oc as m,Pc as O,Qc as w,Sc as R,Tc as $,Uc as U,V as G,Yc as j,aa as K,bc as g,bd as V,dc as u,ec as E,gc as M,hc as N,ic as p,jc as a,kb as b,kc as l,kd as v,lc as P,ld as F,mb as c,md as Z,na as x,sc as f,ua as _,va as d,xc as C,zc as r}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as z,b as H}from"./chunk-66YHNWRR.js";var A=i=>[i];function Ve(i,s){if(i&1){let e=f();a(0,"button",13),C("click",function(){_(e);let t=r(),n=r(2);return d(n.updateStock(t))}),P(1,"i",14),m(2," Update "),l()}}function Ie(i,s){if(i&1){let e=f();a(0,"div",8),g(1,Ve,3,0,"button",10),a(2,"button",11),C("click",function(){_(e);let t=r(2);return d(t.openExportDialog())}),P(3,"i",12),a(4,"span"),m(5,"Export"),l()()()}if(i&2){let e=r(2);c(),u(e.productService.hasSelectionVariant(s)?1:-1)}}function De(i,s){if(i&1){let e=f();a(0,"th")(1,"input",28),C("change",function(t){_(e);let n=r(),h=r(2);return d(h.onSelectAllSKU(t.target.checked,n))}),l()()}}function Ee(i,s){if(i&1){let e=f();a(0,"input",45),U("ngModelChange",function(t){_(e);let n=r(4).$implicit;return $(n.selected,t)||(n.selected=t),d(t)}),C("ngModelChange",function(){_(e);let t=r(4).$implicit,n=r(3);return d(n.onCheckboxStateProduct(t))}),l()}if(i&2){let e=r(4).$implicit;R("ngModel",e.selected)}}function Me(i,s){if(i&1&&T(0,Ee,1,1,"ng-template",22),i&2){let e=r(6);p("ngxPermissionsOnly",V(1,A,e.rolePriceEdit))}}function Ne(i,s){if(i&1){let e=f();a(0,"img",46),C("click",function(t){_(e);let n=r(3).$implicit,h=r(3);return d(h.onZoomImage(t,n==null?null:n.ImageUrl))}),l()}if(i&2){let e=r(3).$implicit;p("src",j(e.ThumbnailUrl),b)}}function ke(i,s){i&1&&P(0,"img",41)}function Oe(i,s){if(i&1&&(a(0,"small",44),m(1),l()),i&2){let e=r(3).$implicit;c(),w("(",e.Category,")")}}function Re(i,s){if(i&1&&(a(0,"td",39)(1,"div",31),g(2,Me,1,3,null,22),a(3,"div"),g(4,Ne,1,2,"img",40)(5,ke,1,0,"img",41),l()()(),a(6,"td",42)(7,"span",43),m(8),l(),g(9,Oe,2,1,"small",44),l()),i&2){let e=r(2).$implicit;p("rowSpan",e.Variants.length),c(2),u((e.Variants==null?null:e.Variants.length)>1?2:-1),c(2),u(e.ThumbnailUrl?4:5),c(2),p("rowSpan",e.Variants.length),c(2),O(e.Name),c(),u(e.Category?9:-1)}}function $e(i,s){if(i&1){let e=f();a(0,"input",49),U("ngModelChange",function(t){_(e);let n=r(2).$implicit;return $(n.selected,t)||(n.selected=t),d(t)}),l()}if(i&2){let e=r(2).$implicit;R("ngModel",e.selected)}}function Ue(i,s){if(i&1&&(a(0,"td",47),g(1,$e,1,1,"input",48),l()),i&2){let e=r().$implicit;c(),u(e.UnitPrice>=0?1:-1)}}function Be(i,s){i&1&&(a(0,"div",32),m(1," Not Found "),l())}function Le(i,s){if(i&1&&(a(0,"div"),m(1),v(2,"number"),l()),i&2){let e=r().$implicit;c(),w(" ",F(2,1,e.UnitPrice)," ")}}function Ae(i,s){if(i&1&&(a(0,"div",33)(1,"a",35),P(2,"i",50),l()()),i&2){let e=r().$implicit,o=r(4);c(),p("href",o.hostName()+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),b)}}function ze(i,s){if(i&1){let e=f();a(0,"div",51),C("click",function(){_(e);let t=r().$implicit,n=r().$implicit,h=r(2),y=r();return d(y.openTableDialog(t,n,h))}),m(1),v(2,"number"),l()}if(i&2){let e=r().$implicit;c(),w(" ",F(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function He(i,s){if(i&1){let e=f();a(0,"tr",29),g(1,Re,10,6),a(2,"td",20),m(3),l(),a(4,"td",23)(5,"span",30),m(6),l()(),T(7,Ue,2,1,"ng-template",22),a(8,"td",23)(9,"div",31),g(10,Be,2,0,"div",32),g(11,Le,3,3,"div"),g(12,Ae,3,1,"div",33),l()(),a(13,"td",23)(14,"div",31),g(15,ze,3,3,"div",34),a(16,"div",33)(17,"a",35),P(18,"i",36),l()(),a(19,"div",33)(20,"div",37),C("click",function(){let t=_(e).$implicit,n=r(4);return d(n.refreshPrice(t))}),P(21,"i",38),l()()()()()}if(i&2){let e=s.$implicit,o=s.$index,t=r(4);c(),u(o==0?1:-1),c(2),O(e.Model),c(2),k("text-decoration-line-through",e.Discontinued),p("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),c(),w(" ",e.Code," "),c(),p("ngxPermissionsOnly",V(14,A,t.rolePriceEdit)),c(3),u((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),c(),u((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),c(),u((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),c(),k("bg-gradient-warning",e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price)),c(2),u(e.Channel.length>0?15:-1),c(2),p("href",e.Channel[0]==null?null:e.Channel[0].Url,b)}}function qe(i,s){if(i&1&&M(0,He,22,16,"tr",29,E),i&2){let e=s.$implicit;N(e.Variants)}}function Ge(i,s){if(i&1){let e=f();a(0,"div",9)(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr")(5,"th",18),m(6," Product "),a(7,"div")(8,"mat-slide-toggle",19),C("ngModelChange",function(t){_(e);let n=r(2);return d(n.toggleDifferentInventory.set(t))})("toggleChange",function(){_(e);let t=r(2);return d(t.onToggleDifferentInventory())}),a(9,"small",6),m(10,"FILTER DIFFERENT PRICE"),l()()()(),a(11,"th",20),m(12,"Variant"),l(),a(13,"th",21),m(14,"SKU"),l(),T(15,De,2,0,"ng-template",22),a(16,"th",23),m(17,"POS"),l(),a(18,"th",23)(19,"div",24),C("click",function(){_(e);let t=r(2);return d(t.openModalFilter())}),P(20,"img",25),a(21,"span",26),m(22),v(23,"stringLimit"),l()()()()(),a(24,"tbody"),M(25,qe,2,0,null,null,E),l()(),a(27,"infinite-paginator",27),v(28,"async"),C("onNextPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onNextPage(t.searchFilter()))})("onLastPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onLastPage(t.searchFilter()))})("onGetRowCount",function(){_(e);let t=r(2);return d(t.infinitePagination.getRowCount(t.searchFilter()))}),l()()()}if(i&2){let e,o,t,n=r(2);c(8),p("ngModel",n.toggleDifferentInventory()),c(7),p("ngxPermissionsOnly",V(16,A,n.rolePriceEdit)),c(4),p("matTooltip",((e=n.selectedChannel())==null||e.Name==null?null:e.Name.length)>=20?(e=n.selectedChannel())==null?null:e.Name:""),c(),p("src",(o=n.selectedChannel())==null?null:o.Img,b),c(2),w(" ",Z(23,11,(t=n.selectedChannel())==null?null:t.Name,20)," "),c(3),N(s),c(2),p("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",F(28,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function Ke(i,s){if(i&1){let e=f();a(0,"mainpanel",1),C("textChange",function(t){_(e);let n=r();return d(n.updateFilter("text",t))})("onSubmit",function(){_(e);let t=r();return d(t.onSearch())}),a(1,"filters")(2,"div",2)(3,"label",3),m(4,"Channel"),l(),a(5,"app-channel-options-v2",4),C("ngModelChange",function(t){_(e);let n=r();return d(n.updateFilter("ChannelID",t))}),l()(),a(6,"div",2)(7,"filter-query-type",5),C("numberFilterComparatorChange",function(t){_(e);let n=r();return d(n.updateFilter("NumberFilterComparator",t))})("searchTypeChange",function(t){_(e);let n=r();return d(n.updateFilter("SearchType",t))}),l()(),a(8,"div",2)(9,"label",6),m(10,"Page Number"),l(),a(11,"input",7),C("ngModelChange",function(t){_(e);let n=r();return d(n.updateFilter("PageNumber",t))}),l()(),a(12,"div")(13,"label",6),m(14,"Page Size"),l(),a(15,"input",7),C("ngModelChange",function(t){_(e);let n=r();return d(n.updateFilter("RowCount",t))}),l()()(),a(16,"actions"),g(17,Ie,6,1,"div",8),v(18,"async"),l(),a(19,"content"),g(20,Ge,29,18,"div",9),v(21,"async"),l()()}if(i&2){let e,o,t=s,n=r();p("headerTitle",n.pageTitle())("text",n.searchFilter().text)("searchBoxPlaceHolder",n.searchPlaceholder()),c(5),p("ngModel",n.searchFilter().ChannelID),c(2),p("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions)("numberFilterComparator",n.searchFilter().NumberFilterComparator)("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions)("searchType",n.searchFilter().SearchType),c(4),p("ngModel",n.searchFilter().PageNumber),c(4),p("ngModel",n.searchFilter().RowCount),c(2),u((e=F(18,12,n.data$))?17:-1,e),c(3),u((o=F(21,14,n.data$))?20:-1,o)}}var Tt=(()=>{class i{constructor(){this.http=x(te),this.toastr=x(ee),this.dialog=x(pe),this.productService=x(ge),this.biggerPictureService=x(ue),this.authService=x(oe),this.mainPanelService=x(me),this.decimalPipe=x(I),this.placeholderService=x(xe),this.infinitePagination=x(B),this.updateResHandling=x(L),this.pageTitle=S("Price Single Channel Comparison"),this.toggleDifferentInventory=S(!1),this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.searchFilter=S({}),this.hostName=S(""),this.rolePriceEdit=ae.PriceUpdate,this.channelOptions=S([]),this.selectedChannel=S(null),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.searchPlaceholder=S("Search ...");let e=this.authService;this.hostName.set(this.authService.getDomain()),this.data$=this.infinitePagination.data$.pipe(G(1)),this.channelOptions.set(e.getChannels())}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(K(e=>{this.searchFilter.set(e.Filter),this.searchFilter.update(o=>(o.filterModel=D.ALL,o)),this.initSearchPlaceholder(),this.infinitePagination.reloadPagination(this.searchFilter()),this.initSelectedChannel()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter().SearchType,this.searchFilter().NumberFilterComparator))}onToggleDifferentInventory(){this.toggleDifferentInventory()?this.searchFilter.update(e=>(e.filterModel=D.ALL,e)):this.searchFilter.update(e=>(e.filterModel=D.DIFFERENCE,e)),this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(o=>(o.selected=e.selected,o))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let t=this.productService.selectedVariantProduct(e).map(h=>({ID:h.ID,ChannelID:h.Channel[0].ChannelID,Code:h.Code,Price:h.UnitPrice})),n={ListChannelID:[this.searchFilter().ChannelID],ListPrice:t};this.http.post("/api/Price/UpdateChannel",n).subscribe(h=>{this.onSearch(),this.handlingUpdateStock(h.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let o=e.failure_list,t=e.success_list;this.updateResHandling.responseHandling(t,o,"Price")}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let o={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",o).subscribe(t=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter()),this.initSelectedChannel(),this.initSearchPlaceholder()}openTableDialog(e,o,t){let n=JSON.parse(JSON.stringify(e));this.dialog.open(Fe,{data:{Name:o.Name,Variant:n,ChannelID:n?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:n?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(q(y=>Y.IsNotEmpty(y))).subscribe(y=>{this.updateItemAfterDialog(y,e)})}updateItemAfterDialog(e,o){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(n=>{let h=this.productService.findChannelById(t.ID,this.channelOptions()),y=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${h.Name} to ${y}`,"Success"),this.infinitePagination.reloadPagination(this.searchFilter())})}initSelectedChannel(){this.selectedChannel.set(this.channelOptions().find(e=>e.ID==this.searchFilter().ChannelID))}onSelectAllSKU(e,o){o=o.map(t=>(t.Variants=t.Variants.map(n=>(n.selected=e,n)),t))}onZoomImage(e,o){this.biggerPictureService.openBiggerPicture(e,o)}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()}updateFilter(e,o){this.searchFilter.update(t=>H(z({},t),{[e]:o}))}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=W({type:i,selectors:[["app-price-single-channel"]],features:[J([B,Te,X("https://resc.cloudinary.com/"),I,L])],decls:2,vars:3,consts:[[1,"single-price",3,"headerTitle","text","searchBoxPlaceHolder"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text","searchBoxPlaceHolder"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"d-flex"],[1,"container-fluid","mt-5"],[1,"btn","btn-success"],[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,"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"],[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"],[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"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"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,"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"],[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(o,t){if(o&1&&(g(0,Ke,22,16,"mainpanel",0),v(1,"async")),o&2){let n;u((n=F(1,1,t.loader$))?0:-1,n)}},dependencies:[Ce,de,le,_e,re,ce,se,be,ie,ne,ve,Pe,fe,he,Se,we,Q,I],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}"]})}}return i})();export{Tt as PriceSingleChannelComponent};
|
|
1
|
+
import{a as Te}from"./chunk-LZ4OSFKB.js";import{a as D}from"./chunk-ISMIPSYN.js";import{a as Fe,b as we,c as be,d as B,e as L}from"./chunk-IBZCREPJ.js";import{a as fe}from"./chunk-BU67S7V2.js";import"./chunk-6GSJBXEE.js";import"./chunk-2C6XBRGE.js";import"./chunk-RUHYZ275.js";import"./chunk-3BV4FPZE.js";import{a as ye}from"./chunk-MU7RI22T.js";import{a as Pe,b as ve}from"./chunk-Y5RUW5VE.js";import{c as xe,d as Se}from"./chunk-52BVJZIG.js";import"./chunk-VINT75RU.js";import{a as ue}from"./chunk-7ES2Z445.js";import"./chunk-CHCLLSOR.js";import"./chunk-72AE6737.js";import"./chunk-SBLTWRFW.js";import{a as ge}from"./chunk-LPJDWFPW.js";import"./chunk-QDKVYF6D.js";import"./chunk-VAYLCOBC.js";import"./chunk-6PI5PUIQ.js";import"./chunk-6VOSRCWX.js";import"./chunk-XSXHGAXP.js";import"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-ODYXAAZO.js";import"./chunk-ACIMXBIC.js";import"./chunk-67AXBZYF.js";import"./chunk-5QG5PZ7U.js";import"./chunk-KYK2ZFUZ.js";import{e as he}from"./chunk-KXLYQDZR.js";import{a as me,b as Ce}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import{c as pe}from"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-SPNVH2ST.js";import"./chunk-BXA5YUTN.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{a as ae}from"./chunk-ZSUWHVKX.js";import{h as oe}from"./chunk-KYK5EKWR.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import{b as ne,c as ie}from"./chunk-7R55YTL6.js";import{c as Y}from"./chunk-NNVT5X6O.js";import{b as re,c as le,h as ce,m as se,o as _e,z as de}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{b as ee,e as te}from"./chunk-45DFJJAO.js";import"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{D as I,K as X,z as Q}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as J,E as q,Eb as W,Ga as S,Kb as T,Lc as k,Oc as m,Pc as O,Qc as w,Sc as R,Tc as $,Uc as U,V as G,Yc as j,aa as K,bc as g,bd as V,dc as u,ec as E,gc as M,hc as N,ic as p,jc as a,kb as b,kc as l,kd as v,lc as P,ld as F,mb as c,md as Z,na as x,sc as f,ua as _,va as d,xc as C,zc as r}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as z,b as H}from"./chunk-66YHNWRR.js";var A=i=>[i];function Ve(i,s){if(i&1){let e=f();a(0,"button",13),C("click",function(){_(e);let t=r(),n=r(2);return d(n.updateStock(t))}),P(1,"i",14),m(2," Update "),l()}}function Ie(i,s){if(i&1){let e=f();a(0,"div",8),g(1,Ve,3,0,"button",10),a(2,"button",11),C("click",function(){_(e);let t=r(2);return d(t.openExportDialog())}),P(3,"i",12),a(4,"span"),m(5,"Export"),l()()()}if(i&2){let e=r(2);c(),u(e.productService.hasSelectionVariant(s)?1:-1)}}function De(i,s){if(i&1){let e=f();a(0,"th")(1,"input",28),C("change",function(t){_(e);let n=r(),h=r(2);return d(h.onSelectAllSKU(t.target.checked,n))}),l()()}}function Ee(i,s){if(i&1){let e=f();a(0,"input",45),U("ngModelChange",function(t){_(e);let n=r(4).$implicit;return $(n.selected,t)||(n.selected=t),d(t)}),C("ngModelChange",function(){_(e);let t=r(4).$implicit,n=r(3);return d(n.onCheckboxStateProduct(t))}),l()}if(i&2){let e=r(4).$implicit;R("ngModel",e.selected)}}function Me(i,s){if(i&1&&T(0,Ee,1,1,"ng-template",22),i&2){let e=r(6);p("ngxPermissionsOnly",V(1,A,e.rolePriceEdit))}}function Ne(i,s){if(i&1){let e=f();a(0,"img",46),C("click",function(t){_(e);let n=r(3).$implicit,h=r(3);return d(h.onZoomImage(t,n==null?null:n.ImageUrl))}),l()}if(i&2){let e=r(3).$implicit;p("src",j(e.ThumbnailUrl),b)}}function ke(i,s){i&1&&P(0,"img",41)}function Oe(i,s){if(i&1&&(a(0,"small",44),m(1),l()),i&2){let e=r(3).$implicit;c(),w("(",e.Category,")")}}function Re(i,s){if(i&1&&(a(0,"td",39)(1,"div",31),g(2,Me,1,3,null,22),a(3,"div"),g(4,Ne,1,2,"img",40)(5,ke,1,0,"img",41),l()()(),a(6,"td",42)(7,"span",43),m(8),l(),g(9,Oe,2,1,"small",44),l()),i&2){let e=r(2).$implicit;p("rowSpan",e.Variants.length),c(2),u((e.Variants==null?null:e.Variants.length)>1?2:-1),c(2),u(e.ThumbnailUrl?4:5),c(2),p("rowSpan",e.Variants.length),c(2),O(e.Name),c(),u(e.Category?9:-1)}}function $e(i,s){if(i&1){let e=f();a(0,"input",49),U("ngModelChange",function(t){_(e);let n=r(2).$implicit;return $(n.selected,t)||(n.selected=t),d(t)}),l()}if(i&2){let e=r(2).$implicit;R("ngModel",e.selected)}}function Ue(i,s){if(i&1&&(a(0,"td",47),g(1,$e,1,1,"input",48),l()),i&2){let e=r().$implicit;c(),u(e.UnitPrice>=0?1:-1)}}function Be(i,s){i&1&&(a(0,"div",32),m(1," Not Found "),l())}function Le(i,s){if(i&1&&(a(0,"div"),m(1),v(2,"number"),l()),i&2){let e=r().$implicit;c(),w(" ",F(2,1,e.UnitPrice)," ")}}function Ae(i,s){if(i&1&&(a(0,"div",33)(1,"a",35),P(2,"i",50),l()()),i&2){let e=r().$implicit,o=r(4);c(),p("href",o.hostName()+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),b)}}function ze(i,s){if(i&1){let e=f();a(0,"div",51),C("click",function(){_(e);let t=r().$implicit,n=r().$implicit,h=r(2),y=r();return d(y.openTableDialog(t,n,h))}),m(1),v(2,"number"),l()}if(i&2){let e=r().$implicit;c(),w(" ",F(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function He(i,s){if(i&1){let e=f();a(0,"tr",29),g(1,Re,10,6),a(2,"td",20),m(3),l(),a(4,"td",23)(5,"span",30),m(6),l()(),T(7,Ue,2,1,"ng-template",22),a(8,"td",23)(9,"div",31),g(10,Be,2,0,"div",32),g(11,Le,3,3,"div"),g(12,Ae,3,1,"div",33),l()(),a(13,"td",23)(14,"div",31),g(15,ze,3,3,"div",34),a(16,"div",33)(17,"a",35),P(18,"i",36),l()(),a(19,"div",33)(20,"div",37),C("click",function(){let t=_(e).$implicit,n=r(4);return d(n.refreshPrice(t))}),P(21,"i",38),l()()()()()}if(i&2){let e=s.$implicit,o=s.$index,t=r(4);c(),u(o==0?1:-1),c(2),O(e.Model),c(2),k("text-decoration-line-through",e.Discontinued),p("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),c(),w(" ",e.Code," "),c(),p("ngxPermissionsOnly",V(14,A,t.rolePriceEdit)),c(3),u((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),c(),u((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),c(),u((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),c(),k("bg-gradient-warning",e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price)),c(2),u(e.Channel.length>0?15:-1),c(2),p("href",e.Channel[0]==null?null:e.Channel[0].Url,b)}}function qe(i,s){if(i&1&&M(0,He,22,16,"tr",29,E),i&2){let e=s.$implicit;N(e.Variants)}}function Ge(i,s){if(i&1){let e=f();a(0,"div",9)(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr")(5,"th",18),m(6," Product "),a(7,"div")(8,"mat-slide-toggle",19),C("ngModelChange",function(t){_(e);let n=r(2);return d(n.toggleDifferentInventory.set(t))})("toggleChange",function(){_(e);let t=r(2);return d(t.onToggleDifferentInventory())}),a(9,"small",6),m(10,"FILTER DIFFERENT PRICE"),l()()()(),a(11,"th",20),m(12,"Variant"),l(),a(13,"th",21),m(14,"SKU"),l(),T(15,De,2,0,"ng-template",22),a(16,"th",23),m(17,"POS"),l(),a(18,"th",23)(19,"div",24),C("click",function(){_(e);let t=r(2);return d(t.openModalFilter())}),P(20,"img",25),a(21,"span",26),m(22),v(23,"stringLimit"),l()()()()(),a(24,"tbody"),M(25,qe,2,0,null,null,E),l()(),a(27,"infinite-paginator",27),v(28,"async"),C("onNextPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onNextPage(t.searchFilter()))})("onLastPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onLastPage(t.searchFilter()))})("onGetRowCount",function(){_(e);let t=r(2);return d(t.infinitePagination.getRowCount(t.searchFilter()))}),l()()()}if(i&2){let e,o,t,n=r(2);c(8),p("ngModel",n.toggleDifferentInventory()),c(7),p("ngxPermissionsOnly",V(16,A,n.rolePriceEdit)),c(4),p("matTooltip",((e=n.selectedChannel())==null||e.Name==null?null:e.Name.length)>=20?(e=n.selectedChannel())==null?null:e.Name:""),c(),p("src",(o=n.selectedChannel())==null?null:o.Img,b),c(2),w(" ",Z(23,11,(t=n.selectedChannel())==null?null:t.Name,20)," "),c(3),N(s),c(2),p("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",F(28,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function Ke(i,s){if(i&1){let e=f();a(0,"mainpanel",1),C("textChange",function(t){_(e);let n=r();return d(n.updateFilter("text",t))})("onSubmit",function(){_(e);let t=r();return d(t.onSearch())}),a(1,"filters")(2,"div",2)(3,"label",3),m(4,"Channel"),l(),a(5,"app-channel-options-v2",4),C("ngModelChange",function(t){_(e);let n=r();return d(n.updateFilter("ChannelID",t))}),l()(),a(6,"div",2)(7,"filter-query-type",5),C("numberFilterComparatorChange",function(t){_(e);let n=r();return d(n.updateFilter("NumberFilterComparator",t))})("searchTypeChange",function(t){_(e);let n=r();return d(n.updateFilter("SearchType",t))}),l()(),a(8,"div",2)(9,"label",6),m(10,"Page Number"),l(),a(11,"input",7),C("ngModelChange",function(t){_(e);let n=r();return d(n.updateFilter("PageNumber",t))}),l()(),a(12,"div")(13,"label",6),m(14,"Page Size"),l(),a(15,"input",7),C("ngModelChange",function(t){_(e);let n=r();return d(n.updateFilter("RowCount",t))}),l()()(),a(16,"actions"),g(17,Ie,6,1,"div",8),v(18,"async"),l(),a(19,"content"),g(20,Ge,29,18,"div",9),v(21,"async"),l()()}if(i&2){let e,o,t=s,n=r();p("headerTitle",n.pageTitle())("text",n.searchFilter().text)("searchBoxPlaceHolder",n.searchPlaceholder()),c(5),p("ngModel",n.searchFilter().ChannelID),c(2),p("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions)("numberFilterComparator",n.searchFilter().NumberFilterComparator)("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions)("searchType",n.searchFilter().SearchType),c(4),p("ngModel",n.searchFilter().PageNumber),c(4),p("ngModel",n.searchFilter().RowCount),c(2),u((e=F(18,12,n.data$))?17:-1,e),c(3),u((o=F(21,14,n.data$))?20:-1,o)}}var Tt=(()=>{class i{constructor(){this.http=x(te),this.toastr=x(ee),this.dialog=x(pe),this.productService=x(ge),this.biggerPictureService=x(ue),this.authService=x(oe),this.mainPanelService=x(me),this.decimalPipe=x(I),this.placeholderService=x(xe),this.infinitePagination=x(B),this.updateResHandling=x(L),this.pageTitle=S("Price Single Channel Comparison"),this.toggleDifferentInventory=S(!1),this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.searchFilter=S({}),this.hostName=S(""),this.rolePriceEdit=ae.PriceUpdate,this.channelOptions=S([]),this.selectedChannel=S(null),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.searchPlaceholder=S("Search ...");let e=this.authService;this.hostName.set(this.authService.getDomain()),this.data$=this.infinitePagination.data$.pipe(G(1)),this.channelOptions.set(e.getChannels())}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(K(e=>{this.searchFilter.set(e.Filter),this.searchFilter.update(o=>(o.filterModel=D.ALL,o)),this.initSearchPlaceholder(),this.infinitePagination.reloadPagination(this.searchFilter()),this.initSelectedChannel()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter().SearchType,this.searchFilter().NumberFilterComparator))}onToggleDifferentInventory(){this.toggleDifferentInventory()?this.searchFilter.update(e=>(e.filterModel=D.ALL,e)):this.searchFilter.update(e=>(e.filterModel=D.DIFFERENCE,e)),this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(o=>(o.selected=e.selected,o))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let t=this.productService.selectedVariantProduct(e).map(h=>({ID:h.ID,ChannelID:h.Channel[0].ChannelID,Code:h.Code,Price:h.UnitPrice})),n={ListChannelID:[this.searchFilter().ChannelID],ListPrice:t};this.http.post("/api/Price/UpdateChannel",n).subscribe(h=>{this.onSearch(),this.handlingUpdateStock(h.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let o=e.failure_list,t=e.success_list;this.updateResHandling.responseHandling(t,o,"Price")}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let o={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",o).subscribe(t=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter()),this.initSelectedChannel(),this.initSearchPlaceholder()}openTableDialog(e,o,t){let n=JSON.parse(JSON.stringify(e));this.dialog.open(Fe,{data:{Name:o.Name,Variant:n,ChannelID:n?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:n?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(q(y=>Y.IsNotEmpty(y))).subscribe(y=>{this.updateItemAfterDialog(y,e)})}updateItemAfterDialog(e,o){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(n=>{let h=this.productService.findChannelById(t.ID,this.channelOptions()),y=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${h.Name} to ${y}`,"Success"),this.infinitePagination.reloadPagination(this.searchFilter())})}initSelectedChannel(){this.selectedChannel.set(this.channelOptions().find(e=>e.ID==this.searchFilter().ChannelID))}onSelectAllSKU(e,o){o=o.map(t=>(t.Variants=t.Variants.map(n=>(n.selected=e,n)),t))}onZoomImage(e,o){this.biggerPictureService.openBiggerPicture(e,o)}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()}updateFilter(e,o){this.searchFilter.update(t=>H(z({},t),{[e]:o}))}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=W({type:i,selectors:[["app-price-single-channel"]],features:[J([B,Te,X("https://resc.cloudinary.com/"),I,L])],decls:2,vars:3,consts:[[1,"single-price",3,"headerTitle","text","searchBoxPlaceHolder"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text","searchBoxPlaceHolder"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"d-flex"],[1,"container-fluid","mt-5"],[1,"btn","btn-success"],[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,"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"],[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"],[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"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"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,"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"],[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(o,t){if(o&1&&(g(0,Ke,22,16,"mainpanel",0),v(1,"async")),o&2){let n;u((n=F(1,1,t.loader$))?0:-1,n)}},dependencies:[Ce,de,le,_e,re,ce,se,be,ie,ne,ve,Pe,fe,he,Se,we,Q,I],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}"]})}}return i})();export{Tt as PriceSingleChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as we}from"./chunk-SEB36UUD.js";import{a as Ie,b as Me}from"./chunk-IBZCREPJ.js";import{a as ye,b as Se}from"./chunk-Y5RUW5VE.js";import{a as ve}from"./chunk-7ES2Z445.js";import{a as he,b as ue,c as Ce,g as xe,i as fe,j as be}from"./chunk-NIRJAWTX.js";import{a as ge}from"./chunk-RDXDKWLL.js";import{b as Te}from"./chunk-A32JPG5P.js";import{a as ae}from"./chunk-JY726AM5.js";import{b as pe}from"./chunk-47Z3CNAW.js";import{a as E}from"./chunk-ZSUWHVKX.js";import{h as de}from"./chunk-VDNUDZOQ.js";import{a as le,b as re,c as ce}from"./chunk-7R55YTL6.js";import{c as Z}from"./chunk-NNVT5X6O.js";import{b as se,h as me,m as _e,z as V}from"./chunk-BUBQQEYA.js";import{D as oe,y as ie}from"./chunk-4NAKX6WQ.js";import{Ca as B,E as G,Eb as D,Ga as b,Jc as A,Kb as T,Lc as L,Nc as Y,Oc as m,Pc as M,Qc as F,Sc as j,Tc as z,Uc as W,Yc as J,_ as K,bc as p,bd as k,cd as Q,d as q,dc as g,ec as I,fc as X,gc as y,hc as S,ic as s,jc as l,kb as v,kc as d,kd as O,lc as w,ld as H,mb as r,md as ee,na as f,od as te,rc as R,sc as x,sd as ne,ua as h,va as u,wd as P,xc as C,zc as a}from"./chunk-ZPV56E2J.js";import{a as U,b as $}from"./chunk-66YHNWRR.js";function ke(t,c){if(t&1){let e=x();l(0,"span")(1,"mat-checkbox",4),C("change",function(n){h(e);let o=a();return u(o.onSelectAll(n==null?null:n.checked))}),l(2,"h5",5),m(3,"Select All"),d()()()}}function Ee(t,c){if(t&1){let e=x();l(0,"li")(1,"mat-checkbox",6),C("change",function(n){let o=h(e).$implicit,_=a();return u(_.onChannelChange(o,n.checked))}),l(2,"div",7),w(3,"img",8),l(4,"h5",9),m(5),d()()()()}if(t&2){let e=c.$implicit;r(),s("checked",e.selected),r(2),s("src",e.Img,v),r(2),M(e.Name)}}var mt=(()=>{class t{constructor(){this.data=f(ue),this.dialogRef=f(he),this.channels=b([]),this.getSelectedChannel=ne(()=>this.channels().filter(e=>e.selected)),this.selectedItems=this.data.selectedItems,this.channels.set(this.data.channels)}ngOnInit(){this.initModalConfig()}initModalConfig(){let e=this.data.title?this.data.title:"Updating Inventory";this.modalConfig=new fe,this.modalConfig.title=e}onSelectAll(e){this.channels.update(i=>i.map(n=>$(U({},n),{selected:e})))}onOk(){this.dialogRef.close(this.channels())}onClose(){this.dialogRef.close()}onChannelChange(e,i){this.channels.update(n=>n.map(o=>o.ID===e.ID?$(U({},o),{selected:i}):o))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-modal-update-channels"]],decls:7,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet",2,"margin-bottom","0px !important","overflow","hidden"],["color","primary",1,"me-6",3,"change"],[1,"fw-light"],["color","primary",3,"change","checked"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(i,n){i&1&&(l(0,"modal-material",0),C("onOk",function(){return n.onOk()})("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()}),l(1,"div",1)(2,"div",2),p(3,ke,4,0,"span"),l(4,"ul",3),y(5,Ee,6,3,"li",null,I),d()()()()),i&2&&(s("dynamicValidated",n.getSelectedChannel().length>0)("config",n.modalConfig),r(3),g(n.channels().length>1?3:-1),r(2),S(n.channels()))},dependencies:[be,we,V],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"],changeDetection:0})}}return t})();var N=t=>[t],De=(t,c)=>({"bg-gradient-warning":t,"cell-hover pointer":c});function Oe(t,c){if(t&1){let e=x();l(0,"mat-slide-toggle",10),C("toggleChange",function(){h(e);let n=a();return u(n.onToggle())}),l(1,"small",11),m(2),d()()}if(t&2){let e=a();s("checked",e.toggleStatus()),r(2),F(" ",e.productToggleTitle()?e.productToggleTitle():"FILTER DIFFERENT INVENTORY"," ")}}function Ve(t,c){if(t&1){let e=x();l(0,"th")(1,"input",13),C("change",function(n){h(e);let o=a(2);return o.checkboxState.set(n.target.checked),u(o.onCheckboxStateChange())}),d()()}if(t&2){let e=a(2);r(),s("checked",e.checkboxState())}}function Ne(t,c){if(t&1&&(T(0,Ve,2,1,"ng-template",12),l(1,"th",8),m(2,"POS"),d()),t&2){let e=a();s("ngxPermissionsOnly",k(1,N,e.rolePriceEdit))}}function Ue(t,c){if(t&1&&(l(0,"th",9)(1,"div",14)(2,"div",15),w(3,"img",16),l(4,"div",17),m(5),O(6,"stringLimit"),d()()()()),t&2){let e=c.$implicit;r(2),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),s("src",e==null?null:e.Img,v),r(2),F(" ",ee(6,3,e.Name,20)," ")}}function $e(t,c){t&1&&R(0)}function Be(t,c){if(t&1&&T(0,$e,1,0,"ng-container",28),t&2){a(2);let e=A(5);s("ngTemplateOutlet",e)}}function Re(t,c){if(t&1&&T(0,Be,1,1,"ng-template",12),t&2){let e=a(4);s("ngxPermissionsOnly",k(1,N,e.roleInventoryUpdate))}}function Ae(t,c){t&1&&R(0)}function Le(t,c){if(t&1&&T(0,Ae,1,0,"ng-container",28),t&2){a(2);let e=A(5);s("ngTemplateOutlet",e)}}function je(t,c){if(t&1&&T(0,Le,1,1,"ng-template",12),t&2){let e=a(4);s("ngxPermissionsOnly",k(1,N,e.rolePriceEdit))}}function ze(t,c){if(t&1){let e=x();l(0,"div")(1,"input",29),W("ngModelChange",function(n){h(e);let o=a(4).$implicit;return z(o.selected,n)||(o.selected=n),u(n)}),C("ngModelChange",function(){h(e);let n=a(4).$implicit,o=a();return u(o.onCheckboxStateProduct(n.ID))}),d()()}if(t&2){let e=a(4).$implicit;r(),j("ngModel",e.selected),s("disabled",!(e!=null&&e.Category))}}function We(t,c){if(t&1&&p(0,ze,2,2,"div"),t&2){let e=a(3).$implicit;g((e==null||e.Variants==null?null:e.Variants.length)>1?0:-1)}}function He(t,c){if(t&1){let e=x();l(0,"img",30),C("click",function(n){h(e);let o=a(3).$implicit,_=a();return u(_.onZoomImage(n,o==null?null:o.ImageUrl))}),d()}if(t&2){let e=a(3).$implicit;s("src",J(e==null?null:e.ThumbnailUrl),v)}}function Ze(t,c){t&1&&w(0,"img",25)}function qe(t,c){if(t&1&&(l(0,"td",22)(1,"div",23),p(2,Re,1,3,null,12)(3,je,1,3,null,12),T(4,We,1,1,"ng-template",null,0,te),l(6,"div"),p(7,He,1,2,"img",24)(8,Ze,1,0,"img",25),d()()(),l(9,"td",26)(10,"div"),m(11),d(),l(12,"small",27),m(13),d()()),t&2){let e=a(2).$implicit,i=a();s("rowSpan",e==null?null:e.Variants.length),r(2),g(i.table()=="inventory"?2:3),r(5),g(e!=null&&e.ThumbnailUrl?7:8),r(2),s("rowSpan",e==null?null:e.Variants.length),r(2),M(e==null?null:e.Name),r(),L("text-danger",!(e!=null&&e.Category)),r(),F("(",e!=null&&e.Category?e==null?null:e.Category:"Not Found In POS",")")}}function Ge(t,c){if(t&1&&(l(0,"a",21),w(1,"i",31),d()),t&2){let e=a().$implicit,i=a(2);s("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),v)}}function Ke(t,c){if(t&1){let e=x();l(0,"input",34),W("ngModelChange",function(n){h(e);let o=a(3).$implicit;return z(o.selected,n)||(o.selected=n),u(n)}),d()}if(t&2){let e=a(3).$implicit,i=a().$implicit;j("ngModel",e.selected),s("disabled",!(i!=null&&i.Category))}}function Xe(t,c){if(t&1&&(l(0,"td",32),p(1,Ke,1,2,"input",33),d()),t&2){let e=a(2).$implicit,i=a(2);r(),g(i.printPOS(e)>=0||i.table()=="price"?1:-1)}}function Ye(t,c){if(t&1&&(T(0,Xe,2,1,"ng-template",12),l(1,"td",19),m(2),O(3,"number"),d()),t&2){let e=a().$implicit,i=a(2);s("ngxPermissionsOnly",k(4,N,i.rolePriceEdit)),r(2),M(H(3,2,i.printPOS(e)))}}function Je(t,c){if(t&1){let e=x();l(0,"td",37),C("click",function(){h(e);let n=a().$implicit,o=a().$implicit,_=a().$implicit,Fe=a();return u(Fe.onUpdateData(_.Name,o,n.ID,_.ChannelItemID))}),l(1,"div",38)(2,"div",39),m(3),O(4,"number"),d(),l(5,"a",40),C("click",function(n){return h(e),u(n==null?null:n.stopPropagation())}),w(6,"i",31),d()()()}if(t&2){let e=c,i=a(2).$implicit,n=a(2);Y(Q(6,De,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table()=="price"||n.hasInventoryEdit()&&n.table()=="inventory")),r(3),F(" ",H(4,4,n.printItem(e))," "),r(2),s("href",e.Url,v)}}function Qe(t,c){t&1&&(l(0,"td",36)(1,"div",38)(2,"span"),m(3,"X"),d()()())}function et(t,c){if(t&1&&p(0,Je,7,9,"td",35)(1,Qe,4,0,"td",36),t&2){let e,i=c.$implicit,n=a().$implicit,o=a(2);g((e=o.getItemFromChannel(n,i))?0:1,e)}}function tt(t,c){if(t&1&&(l(0,"tr"),p(1,qe,14,8),l(2,"td",18),m(3),d(),l(4,"td",19)(5,"div",20)(6,"div"),m(7),d(),l(8,"div",17),p(9,Ge,2,1,"a",21),d()()(),p(10,Ye,4,6),y(11,et,2,1,null,null,I),d()),t&2){let e=c.$implicit,i=c.$index,n=a().$implicit,o=a();r(),g(i==0?1:-1),r(2),M(e==null?null:e.Model),r(2),s("matTooltip",e.Discontinued?o.discontinuedVariantMsg:""),r(),L("text-decoration-line-through",e.Discontinued),r(),F(" ",e.Code," "),r(2),g(n.Category?9:-1),r(),g(o.hiddenIPOSInventory()==!1?10:-1),r(),S(o.channel())}}function nt(t,c){if(t&1&&(l(0,"tbody"),y(1,tt,13,8,"tr",null,I),d()),t&2){let e=c.$implicit;r(),S(e.Variants)}}var Bt=(()=>{class t{constructor(){this.dialog=f(Ce),this.biggerPictureService=f(ve),this.authService=f(de),this.permissionsService=f(le),this.table=P(void 0),this.channel=P(void 0),this.showProductToggle=P(!1),this.productToggleTitle=P(void 0),this.hiddenIPOSInventory=P(!1),this.toggleStatus=b(!1),this.stockHeader=b(void 0),this.checkboxState=b(!1),this.rolePriceEdit=E.PriceUpdate,this.roleInventoryUpdate=E.InventoryUpdate,this.hasPriceEdit=b(!1),this.hasInventoryEdit=b(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new B,this.destroy$=new q,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles();let e=this.table();e=="inventory"?this.stockHeader.set("Stock"):e=="price"&&this.stockHeader.set("Price")}initRoles(){this.permissionsService.hasPermission(E.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e)),this.permissionsService.hasPermission(E.PriceUpdate).then(e=>this.hasPriceEdit.set(e))}onCheckboxStateProduct(e){let i=this.data.filter(n=>n.ID==e);i.length>0&&(i=i.map(n=>(n.Variants=n.Variants.map(o=>(o.selected=n.selected,o)),n)))}onCheckboxStateChange(){this.data=this.data.map(e=>(e.Variants=e.Variants.map(i=>(i.selected=this.checkboxState(),i)),e))}getItemFromChannel(e,i){return e.Channel.find(o=>Z.IsNotEmpty(i.LocationID)?o.LocationID==i.LocationID:o.ChannelID==i.ID)}printItem(e){let i=this.table();if(i=="inventory")return e.Inventory;if(i=="price")return e.Price}onUpdateData(e,i,n,o){let _=this.table();this.hasPriceEdit()&&_=="price"&&this.onOpenDialogUpdate(e,i,n,o),this.hasInventoryEdit()&&_=="inventory"&&this.onOpenDialogUpdate(e,i,n,o)}onOpenDialogUpdate(e,i,n,o){this.dialog.open(Ie,{data:{Name:e,Variant:i,ChannelID:n,Table:this.table(),ChannelItemID:o}}).afterClosed().pipe(G(_=>Z.IsNotEmpty(_)),K(this.destroy$)).subscribe(_=>{this.onSubmit.emit(_)})}printPOS(e){let i=this.table();return i=="inventory"?e.Inventory?e.Inventory:0:i=="price"?e.UnitPrice:null}onToggle(){this.toggleStatus.update(e=>!e),this.toggle.emit(this.toggleStatus())}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-table"]],inputs:{data:"data",table:[1,"table"],channel:[1,"channel"],showProductToggle:[1,"showProductToggle"],productToggleTitle:[1,"productToggleTitle"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:18,vars:2,consts:[["checkbox_update",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px",3,"checked"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],["scope","col"],[2,"width","200px",3,"toggleChange","checked"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"change","checked"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[1,"border","rounded","w-img","cursor-pointer",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"class"],[1,"table-white","text-center",2,"color","red"],[1,"p-0",3,"click"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"]],template:function(i,n){i&1&&(l(0,"div",1)(1,"table",2)(2,"thead",3)(3,"tr")(4,"th",4)(5,"div",5)(6,"div"),m(7,"Product"),d(),p(8,Oe,3,2,"mat-slide-toggle",6),d()(),l(9,"th",7),m(10,"Variant"),d(),l(11,"th",8),m(12,"SKU"),d(),p(13,Ne,3,3),y(14,Ue,7,6,"th",9,X),d()(),y(16,nt,3,0,"tbody",null,I),d()()),i&2&&(r(8),g(n.showProductToggle()?8:-1),r(5),g(n.hiddenIPOSInventory()==!1?13:-1),r(),S(n.channel()),r(2),S(n.data))},dependencies:[V,se,me,_e,Se,ye,xe,ae,Te,ce,re,ge,pe,ie,Me,oe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"],changeDetection:0})}}return t})();export{mt as a,Bt as b};
|
|
1
|
+
import{a as we}from"./chunk-SEB36UUD.js";import{a as Ie,b as Me}from"./chunk-IBZCREPJ.js";import{a as ye,b as Se}from"./chunk-Y5RUW5VE.js";import{a as ve}from"./chunk-7ES2Z445.js";import{a as he,b as ue,c as Ce,g as xe,i as fe,j as be}from"./chunk-NIRJAWTX.js";import{a as ge}from"./chunk-RDXDKWLL.js";import{b as Te}from"./chunk-A32JPG5P.js";import{a as ae}from"./chunk-JY726AM5.js";import{b as pe}from"./chunk-47Z3CNAW.js";import{a as E}from"./chunk-ZSUWHVKX.js";import{h as de}from"./chunk-KYK5EKWR.js";import{a as le,b as re,c as ce}from"./chunk-7R55YTL6.js";import{c as Z}from"./chunk-NNVT5X6O.js";import{b as se,h as me,m as _e,z as V}from"./chunk-BUBQQEYA.js";import{D as oe,y as ie}from"./chunk-4NAKX6WQ.js";import{Ca as B,E as G,Eb as D,Ga as b,Jc as A,Kb as T,Lc as L,Nc as Y,Oc as m,Pc as M,Qc as F,Sc as j,Tc as z,Uc as W,Yc as J,_ as K,bc as p,bd as k,cd as Q,d as q,dc as g,ec as I,fc as X,gc as y,hc as S,ic as s,jc as l,kb as v,kc as d,kd as O,lc as w,ld as H,mb as r,md as ee,na as f,od as te,rc as R,sc as x,sd as ne,ua as h,va as u,wd as P,xc as C,zc as a}from"./chunk-ZPV56E2J.js";import{a as U,b as $}from"./chunk-66YHNWRR.js";function ke(t,c){if(t&1){let e=x();l(0,"span")(1,"mat-checkbox",4),C("change",function(n){h(e);let o=a();return u(o.onSelectAll(n==null?null:n.checked))}),l(2,"h5",5),m(3,"Select All"),d()()()}}function Ee(t,c){if(t&1){let e=x();l(0,"li")(1,"mat-checkbox",6),C("change",function(n){let o=h(e).$implicit,_=a();return u(_.onChannelChange(o,n.checked))}),l(2,"div",7),w(3,"img",8),l(4,"h5",9),m(5),d()()()()}if(t&2){let e=c.$implicit;r(),s("checked",e.selected),r(2),s("src",e.Img,v),r(2),M(e.Name)}}var mt=(()=>{class t{constructor(){this.data=f(ue),this.dialogRef=f(he),this.channels=b([]),this.getSelectedChannel=ne(()=>this.channels().filter(e=>e.selected)),this.selectedItems=this.data.selectedItems,this.channels.set(this.data.channels)}ngOnInit(){this.initModalConfig()}initModalConfig(){let e=this.data.title?this.data.title:"Updating Inventory";this.modalConfig=new fe,this.modalConfig.title=e}onSelectAll(e){this.channels.update(i=>i.map(n=>$(U({},n),{selected:e})))}onOk(){this.dialogRef.close(this.channels())}onClose(){this.dialogRef.close()}onChannelChange(e,i){this.channels.update(n=>n.map(o=>o.ID===e.ID?$(U({},o),{selected:i}):o))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-modal-update-channels"]],decls:7,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet",2,"margin-bottom","0px !important","overflow","hidden"],["color","primary",1,"me-6",3,"change"],[1,"fw-light"],["color","primary",3,"change","checked"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(i,n){i&1&&(l(0,"modal-material",0),C("onOk",function(){return n.onOk()})("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()}),l(1,"div",1)(2,"div",2),p(3,ke,4,0,"span"),l(4,"ul",3),y(5,Ee,6,3,"li",null,I),d()()()()),i&2&&(s("dynamicValidated",n.getSelectedChannel().length>0)("config",n.modalConfig),r(3),g(n.channels().length>1?3:-1),r(2),S(n.channels()))},dependencies:[be,we,V],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"],changeDetection:0})}}return t})();var N=t=>[t],De=(t,c)=>({"bg-gradient-warning":t,"cell-hover pointer":c});function Oe(t,c){if(t&1){let e=x();l(0,"mat-slide-toggle",10),C("toggleChange",function(){h(e);let n=a();return u(n.onToggle())}),l(1,"small",11),m(2),d()()}if(t&2){let e=a();s("checked",e.toggleStatus()),r(2),F(" ",e.productToggleTitle()?e.productToggleTitle():"FILTER DIFFERENT INVENTORY"," ")}}function Ve(t,c){if(t&1){let e=x();l(0,"th")(1,"input",13),C("change",function(n){h(e);let o=a(2);return o.checkboxState.set(n.target.checked),u(o.onCheckboxStateChange())}),d()()}if(t&2){let e=a(2);r(),s("checked",e.checkboxState())}}function Ne(t,c){if(t&1&&(T(0,Ve,2,1,"ng-template",12),l(1,"th",8),m(2,"POS"),d()),t&2){let e=a();s("ngxPermissionsOnly",k(1,N,e.rolePriceEdit))}}function Ue(t,c){if(t&1&&(l(0,"th",9)(1,"div",14)(2,"div",15),w(3,"img",16),l(4,"div",17),m(5),O(6,"stringLimit"),d()()()()),t&2){let e=c.$implicit;r(2),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),s("src",e==null?null:e.Img,v),r(2),F(" ",ee(6,3,e.Name,20)," ")}}function $e(t,c){t&1&&R(0)}function Be(t,c){if(t&1&&T(0,$e,1,0,"ng-container",28),t&2){a(2);let e=A(5);s("ngTemplateOutlet",e)}}function Re(t,c){if(t&1&&T(0,Be,1,1,"ng-template",12),t&2){let e=a(4);s("ngxPermissionsOnly",k(1,N,e.roleInventoryUpdate))}}function Ae(t,c){t&1&&R(0)}function Le(t,c){if(t&1&&T(0,Ae,1,0,"ng-container",28),t&2){a(2);let e=A(5);s("ngTemplateOutlet",e)}}function je(t,c){if(t&1&&T(0,Le,1,1,"ng-template",12),t&2){let e=a(4);s("ngxPermissionsOnly",k(1,N,e.rolePriceEdit))}}function ze(t,c){if(t&1){let e=x();l(0,"div")(1,"input",29),W("ngModelChange",function(n){h(e);let o=a(4).$implicit;return z(o.selected,n)||(o.selected=n),u(n)}),C("ngModelChange",function(){h(e);let n=a(4).$implicit,o=a();return u(o.onCheckboxStateProduct(n.ID))}),d()()}if(t&2){let e=a(4).$implicit;r(),j("ngModel",e.selected),s("disabled",!(e!=null&&e.Category))}}function We(t,c){if(t&1&&p(0,ze,2,2,"div"),t&2){let e=a(3).$implicit;g((e==null||e.Variants==null?null:e.Variants.length)>1?0:-1)}}function He(t,c){if(t&1){let e=x();l(0,"img",30),C("click",function(n){h(e);let o=a(3).$implicit,_=a();return u(_.onZoomImage(n,o==null?null:o.ImageUrl))}),d()}if(t&2){let e=a(3).$implicit;s("src",J(e==null?null:e.ThumbnailUrl),v)}}function Ze(t,c){t&1&&w(0,"img",25)}function qe(t,c){if(t&1&&(l(0,"td",22)(1,"div",23),p(2,Re,1,3,null,12)(3,je,1,3,null,12),T(4,We,1,1,"ng-template",null,0,te),l(6,"div"),p(7,He,1,2,"img",24)(8,Ze,1,0,"img",25),d()()(),l(9,"td",26)(10,"div"),m(11),d(),l(12,"small",27),m(13),d()()),t&2){let e=a(2).$implicit,i=a();s("rowSpan",e==null?null:e.Variants.length),r(2),g(i.table()=="inventory"?2:3),r(5),g(e!=null&&e.ThumbnailUrl?7:8),r(2),s("rowSpan",e==null?null:e.Variants.length),r(2),M(e==null?null:e.Name),r(),L("text-danger",!(e!=null&&e.Category)),r(),F("(",e!=null&&e.Category?e==null?null:e.Category:"Not Found In POS",")")}}function Ge(t,c){if(t&1&&(l(0,"a",21),w(1,"i",31),d()),t&2){let e=a().$implicit,i=a(2);s("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),v)}}function Ke(t,c){if(t&1){let e=x();l(0,"input",34),W("ngModelChange",function(n){h(e);let o=a(3).$implicit;return z(o.selected,n)||(o.selected=n),u(n)}),d()}if(t&2){let e=a(3).$implicit,i=a().$implicit;j("ngModel",e.selected),s("disabled",!(i!=null&&i.Category))}}function Xe(t,c){if(t&1&&(l(0,"td",32),p(1,Ke,1,2,"input",33),d()),t&2){let e=a(2).$implicit,i=a(2);r(),g(i.printPOS(e)>=0||i.table()=="price"?1:-1)}}function Ye(t,c){if(t&1&&(T(0,Xe,2,1,"ng-template",12),l(1,"td",19),m(2),O(3,"number"),d()),t&2){let e=a().$implicit,i=a(2);s("ngxPermissionsOnly",k(4,N,i.rolePriceEdit)),r(2),M(H(3,2,i.printPOS(e)))}}function Je(t,c){if(t&1){let e=x();l(0,"td",37),C("click",function(){h(e);let n=a().$implicit,o=a().$implicit,_=a().$implicit,Fe=a();return u(Fe.onUpdateData(_.Name,o,n.ID,_.ChannelItemID))}),l(1,"div",38)(2,"div",39),m(3),O(4,"number"),d(),l(5,"a",40),C("click",function(n){return h(e),u(n==null?null:n.stopPropagation())}),w(6,"i",31),d()()()}if(t&2){let e=c,i=a(2).$implicit,n=a(2);Y(Q(6,De,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table()=="price"||n.hasInventoryEdit()&&n.table()=="inventory")),r(3),F(" ",H(4,4,n.printItem(e))," "),r(2),s("href",e.Url,v)}}function Qe(t,c){t&1&&(l(0,"td",36)(1,"div",38)(2,"span"),m(3,"X"),d()()())}function et(t,c){if(t&1&&p(0,Je,7,9,"td",35)(1,Qe,4,0,"td",36),t&2){let e,i=c.$implicit,n=a().$implicit,o=a(2);g((e=o.getItemFromChannel(n,i))?0:1,e)}}function tt(t,c){if(t&1&&(l(0,"tr"),p(1,qe,14,8),l(2,"td",18),m(3),d(),l(4,"td",19)(5,"div",20)(6,"div"),m(7),d(),l(8,"div",17),p(9,Ge,2,1,"a",21),d()()(),p(10,Ye,4,6),y(11,et,2,1,null,null,I),d()),t&2){let e=c.$implicit,i=c.$index,n=a().$implicit,o=a();r(),g(i==0?1:-1),r(2),M(e==null?null:e.Model),r(2),s("matTooltip",e.Discontinued?o.discontinuedVariantMsg:""),r(),L("text-decoration-line-through",e.Discontinued),r(),F(" ",e.Code," "),r(2),g(n.Category?9:-1),r(),g(o.hiddenIPOSInventory()==!1?10:-1),r(),S(o.channel())}}function nt(t,c){if(t&1&&(l(0,"tbody"),y(1,tt,13,8,"tr",null,I),d()),t&2){let e=c.$implicit;r(),S(e.Variants)}}var Bt=(()=>{class t{constructor(){this.dialog=f(Ce),this.biggerPictureService=f(ve),this.authService=f(de),this.permissionsService=f(le),this.table=P(void 0),this.channel=P(void 0),this.showProductToggle=P(!1),this.productToggleTitle=P(void 0),this.hiddenIPOSInventory=P(!1),this.toggleStatus=b(!1),this.stockHeader=b(void 0),this.checkboxState=b(!1),this.rolePriceEdit=E.PriceUpdate,this.roleInventoryUpdate=E.InventoryUpdate,this.hasPriceEdit=b(!1),this.hasInventoryEdit=b(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new B,this.destroy$=new q,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles();let e=this.table();e=="inventory"?this.stockHeader.set("Stock"):e=="price"&&this.stockHeader.set("Price")}initRoles(){this.permissionsService.hasPermission(E.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e)),this.permissionsService.hasPermission(E.PriceUpdate).then(e=>this.hasPriceEdit.set(e))}onCheckboxStateProduct(e){let i=this.data.filter(n=>n.ID==e);i.length>0&&(i=i.map(n=>(n.Variants=n.Variants.map(o=>(o.selected=n.selected,o)),n)))}onCheckboxStateChange(){this.data=this.data.map(e=>(e.Variants=e.Variants.map(i=>(i.selected=this.checkboxState(),i)),e))}getItemFromChannel(e,i){return e.Channel.find(o=>Z.IsNotEmpty(i.LocationID)?o.LocationID==i.LocationID:o.ChannelID==i.ID)}printItem(e){let i=this.table();if(i=="inventory")return e.Inventory;if(i=="price")return e.Price}onUpdateData(e,i,n,o){let _=this.table();this.hasPriceEdit()&&_=="price"&&this.onOpenDialogUpdate(e,i,n,o),this.hasInventoryEdit()&&_=="inventory"&&this.onOpenDialogUpdate(e,i,n,o)}onOpenDialogUpdate(e,i,n,o){this.dialog.open(Ie,{data:{Name:e,Variant:i,ChannelID:n,Table:this.table(),ChannelItemID:o}}).afterClosed().pipe(G(_=>Z.IsNotEmpty(_)),K(this.destroy$)).subscribe(_=>{this.onSubmit.emit(_)})}printPOS(e){let i=this.table();return i=="inventory"?e.Inventory?e.Inventory:0:i=="price"?e.UnitPrice:null}onToggle(){this.toggleStatus.update(e=>!e),this.toggle.emit(this.toggleStatus())}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-table"]],inputs:{data:"data",table:[1,"table"],channel:[1,"channel"],showProductToggle:[1,"showProductToggle"],productToggleTitle:[1,"productToggleTitle"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:18,vars:2,consts:[["checkbox_update",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px",3,"checked"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],["scope","col"],[2,"width","200px",3,"toggleChange","checked"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"change","checked"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[1,"border","rounded","w-img","cursor-pointer",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"class"],[1,"table-white","text-center",2,"color","red"],[1,"p-0",3,"click"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"]],template:function(i,n){i&1&&(l(0,"div",1)(1,"table",2)(2,"thead",3)(3,"tr")(4,"th",4)(5,"div",5)(6,"div"),m(7,"Product"),d(),p(8,Oe,3,2,"mat-slide-toggle",6),d()(),l(9,"th",7),m(10,"Variant"),d(),l(11,"th",8),m(12,"SKU"),d(),p(13,Ne,3,3),y(14,Ue,7,6,"th",9,X),d()(),y(16,nt,3,0,"tbody",null,I),d()()),i&2&&(r(8),g(n.showProductToggle()?8:-1),r(5),g(n.hiddenIPOSInventory()==!1?13:-1),r(),S(n.channel()),r(2),S(n.data))},dependencies:[V,se,me,_e,Se,ye,xe,ae,Te,ce,re,ge,pe,ie,Me,oe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"],changeDetection:0})}}return t})();export{mt as a,Bt as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as O}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{h as N}from"./chunk-
|
|
1
|
+
import{b as O}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{h as N}from"./chunk-KYK5EKWR.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{e as C}from"./chunk-45DFJJAO.js";import{b as T}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as b,C as y,z as g}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as S,Ga as x,Oc as r,Pc as d,bc as f,dc as E,ia as v,ic as u,jc as t,kc as i,kd as s,lc as D,ld as h,mb as o,md as I,na as p,t as m}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var M=(()=>{class a{constructor(){this.httpService=p(C)}getExceptionDetail(e){return this.httpService.post("/api/Orders/GetDetailException",{ID:e}).pipe(m(n=>n?.hits[0]?._source))}static{this.\u0275fac=function(l){return new(l||a)}}static{this.\u0275prov=v({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();function B(a,w){if(a&1&&(t(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),r(6,"General"),i()(),t(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),r(12,"Date"),i(),t(13,"div")(14,"span"),r(15),s(16,"date"),i()()()(),t(17,"div",8)(18,"div",9)(19,"label"),r(20,"Number"),i(),t(21,"div")(22,"span"),r(23),i()()()(),t(24,"div",8)(25,"div",9)(26,"label"),r(27,"Channel Name"),i(),t(28,"div")(29,"span"),r(30),i()()()(),t(31,"div",8)(32,"div",9)(33,"label"),r(34,"ShopID"),i(),t(35,"div")(36,"span"),r(37),i()()()(),t(38,"div",8)(39,"div",9)(40,"label"),r(41,"Channel ID"),i(),t(42,"div")(43,"span"),r(44),i()()()()()()()()(),t(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),r(50,"Request"),i()(),t(51,"div",6)(52,"pre"),r(53),s(54,"json"),i()()()(),t(55,"div",8)(56,"div",11)(57,"div",5)(58,"h5"),r(59,"Stack Trace"),i()(),t(60,"div",6),D(61,"pre",12),i()(),t(62,"div",13)(63,"div",5)(64,"h5"),r(65,"Exception Message"),i()(),t(66,"div",6)(67,"pre"),r(68),s(69,"json"),i()()()()()()),a&2){let e=w;o(15),d(I(16,8,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),o(8),d(e==null||e.error==null?null:e.error.number),o(7),d(e==null?null:e.channelName),o(7),d(e==null?null:e.shopId),o(7),d(e==null?null:e.message),o(9),d(h(54,11,e==null||e.error==null?null:e.error.request)),o(8),u("textContent",e==null||e.error==null?null:e.error.stackTrace),o(7),d(h(69,13,e==null||e.error==null?null:e.error.response))}}var K=(()=>{class a{constructor(){this.activatedRoute=p(T),this.exceptionService=p(M),this.authService=p(N),this.invoiceNumber="",this.channelName="",this.logo=null,this.channelOptions=x(this.authService.getChannels()),this.headerTitle="Order"}parseJsonSafe(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}ngOnInit(){let e=this.activatedRoute.snapshot.queryParams;this.exceptionDetail$=this.exceptionService.getExceptionDetail(e?.ID).pipe(m(l=>{let n=l;return n?.error?.number?this.headerTitle="Order #"+n.error.number:this.headerTitle="Order",{"@timestamp":n["@timestamp"]||n["@timestamp_received"],error:{number:n?.error?.number,stackTrace:n?.error?.stackTrace,request:this.parseJsonSafe(n?.error?.request),response:this.parseJsonSafe(n?.error?.response)},channelName:n?.channelId!=null?this.channelOptions().find(c=>c.ID===n?.channelId)?.Name:n?.shopId,shopId:n?.shopId,message:n?.message}}))}static{this.\u0275fac=function(l){return new(l||a)}}static{this.\u0275cmp=S({type:a,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"card","mb-2"],[3,"textContent"],[1,"card","mt-7"]],template:function(l,n){if(l&1&&(t(0,"mainpanel",0)(1,"content"),f(2,B,70,15,"div",1),s(3,"async"),i()()),l&2){let c;u("headerTitle",n.headerTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),E((c=h(3,4,n.exceptionDetail$))?2:-1,c)}},dependencies:[O,g,y,b],encapsulation:2,changeDetection:0})}}return a})();export{K as ExceptionDetailComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-
|
|
1
|
+
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-QIPXU2UF.js").then(t=>t.LoginComponent)},data:{title:"Dealpos x Marketplace"}},{path:"shopee",loadComponent(){return import("./chunk-VVPKQD3A.js").then(t=>t.ShopeeAuthorizedComponent)},data:{title:"Success"}},{path:"tiktok",loadComponent(){return import("./chunk-L2H7TFVM.js").then(t=>t.TiktokComponent)},data:{title:"Success"}},{path:"lazada",loadComponent(){return import("./chunk-YJPGX6PH.js").then(t=>t.LazadaComponent)},data:{title:"Success"}},{path:"shopify",loadComponent(){return import("./chunk-Z35LIB3M.js").then(t=>t.ShopifyAuthorizedComponent)},data:{title:"Success"}}];export{o as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le,b as ae,c as me}from"./chunk-CUFGJCZX.js";import{a as pe}from"./chunk-
|
|
1
|
+
import{a as le,b as ae,c as me}from"./chunk-CUFGJCZX.js";import{a as pe}from"./chunk-GNKRJIFK.js";import{a as T}from"./chunk-HHZM6PB4.js";import{a as de}from"./chunk-J5PTSESV.js";import{a as oe}from"./chunk-BU67S7V2.js";import"./chunk-6GSJBXEE.js";import"./chunk-2C6XBRGE.js";import"./chunk-RUHYZ275.js";import"./chunk-3BV4FPZE.js";import{a as re}from"./chunk-TWRFL73R.js";import"./chunk-7ES2Z445.js";import{a as ne}from"./chunk-KMCVYMXQ.js";import"./chunk-QDKVYF6D.js";import"./chunk-VAYLCOBC.js";import"./chunk-6PI5PUIQ.js";import"./chunk-6VOSRCWX.js";import"./chunk-XSXHGAXP.js";import"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-ACIMXBIC.js";import"./chunk-67AXBZYF.js";import"./chunk-5QG5PZ7U.js";import"./chunk-KYK2ZFUZ.js";import{b as ie}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import{a as te}from"./chunk-RDXDKWLL.js";import"./chunk-2GINYFUG.js";import"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-SPNVH2ST.js";import"./chunk-BXA5YUTN.js";import{b as ee}from"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-KYK5EKWR.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import{c as Q,h as X,m as Y,o as Z,z as $}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import"./chunk-45DFJJAO.js";import"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as J,D as K,z as G}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as j,Eb as W,Ga as D,Nc as z,Oc as a,Pc as S,Qc as w,Sc as g,Tc as _,Uc as f,V as N,Vc as A,Wc as R,Xc as H,bc as y,bd as U,dc as b,ec as I,gc as B,hc as k,ic as u,jc as t,kb as F,kc as i,kd as x,lc as c,ld as V,mb as l,md as q,na as O,sc as E,ua as p,va as s,xc as M,zc as C}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var se=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 ue(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 Ce(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=C().$implicit;l(),w("(",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),x(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"),c(14,"order-link",29),i(),t(15,"small"),a(16),x(17,"date"),i(),c(18,"br"),t(19,"small"),c(20,"i",30),a(21),i()()(),t(22,"td"),y(23,ce,1,1,"variants-dropdown",31)(24,ue,1,1,"variant-with-image",32),i(),t(25,"td",33),a(26),x(27,"number"),i(),t(28,"td")(29,"div",28)(30,"div",34)(31,"span"),a(32),i(),y(33,Ce,2,1,"span"),i(),t(34,"small"),a(35),i()()()()),r&2){let e=h.$implicit;l(3),u("src",V(4,14,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),S(e.Outlet),l(3),S(e.ChannelName),l(4),u("order",e),l(2),w(" ",q(17,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(5),w(" ",e.Customer," "),l(),z(U(21,se,(e.Variants==null?null:e.Variants.length)>1)),l(),b((e.Variants==null?null:e.Variants.length)>1?23:24),l(3),S(V(27,19,e.Amount)),l(6),S(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?33:-1),l(2),w(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function _e(r,h){if(r&1){let e=E();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"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",22),a(13,"Shipping"),i()()(),t(14,"tbody"),B(15,ge,36,23,"tr",null,I),i()(),t(17,"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(15),k(m),l(2),u("filter",e.filter())("totaldata",m==null?null:m.length)}}function fe(r,h){r&1&&(t(0,"div",16),c(1,"app-empty-state"),i())}var ze=(()=>{class r{constructor(){this.orderService=O(T),this.filter=D({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(N(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=W({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","80px"],["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"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-end","gap-2"]],template:function(m,n){if(m&1){let d=E();A(0),x(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initCompletedOrders())}),f("textChange",function(o){return p(d),_(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),f("ngModelChange",function(o){return p(d),_(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),f("dateChange",function(o){return p(d),_(n.filter().From,o)||(n.filter().From=o),s(o)}),i()(),t(18,"div")(19,"datepicker",8),f("dateChange",function(o){return p(d),_(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),f("ngModelChange",function(o){return p(d),_(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),f("ngModelChange",function(o){return p(d),_(n.filter().PageSize,o)||(n.filter().PageSize=o),s(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,_e,18,2,"div",15)(33,fe,2,0,"div",16),i()()()()()}if(m&2){let d=R(V(1,8,n.completedOrders$));l(2),g("text",n.filter().Number),l(10),u("multiple",!0),g("ngModel",n.filter().ListChannelID),l(5),g("date",n.filter().From),l(2),g("date",n.filter().To),l(4),g("ngModel",n.filter().PageNumber),l(4),g("ngModel",n.filter().PageSize),l(5),b((d==null?null:d.length)>0?32:33)}},dependencies:[ie,ne,re,$,Q,Z,X,Y,ae,me,de,te,ee,pe,oe,le,G,J,K],encapsulation:2,changeDetection:0})}}return r})();export{ze as CompletedComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-C6PRKEPS.js";import{a as d}from"./chunk-J3PHESB2.js";import"./chunk-RDXDKWLL.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-KYK5EKWR.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import"./chunk-45DFJJAO.js";import{c as m}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as i,Ga as a,ic as l,jc as p,kc as c,lc as o,mb as r}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var h=(()=>{class t{constructor(){this.ObjectlogTabs=a([{Title:"Channel Push Log Exception",Url:"/menu/log/exception"},{Title:"Channel Push Log",Url:"/menu/log/rawlog"},{Title:"POS Sync Order Log",Url:"/menu/log/order"},{Title:"Inventory Sync ",Url:"/menu/log/inventory"},{Title:"Authorization Log ",Url:"/menu/log/authorization-log"},{Title:"Flush Cache ",Url:"/menu/log/flush-cache"}])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=i({type:t,selectors:[["app-logs"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,s){n&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),c()()(),o(4,"router-outlet")),n&2&&(r(3),l("Tabs",s.ObjectlogTabs()))},dependencies:[d,m],encapsulation:2,changeDetection:0})}}return t})();var T=[{path:"",component:h,children:[{path:"",redirectTo:"exception",pathMatch:"full"},{path:"order",loadComponent(){return import("./chunk-USKDTPOF.js").then(t=>t.OrderComponent)},canActivate:[e],data:{title:"Order Log"}},{path:"inventory/sync-inventory",loadComponent(){return import("./chunk-FQIMOLGJ.js").then(t=>t.InventoryLogComponent)},canActivate:[e],data:{title:"Product Inventory Sync"}},{path:"rawlog",loadComponent(){return import("./chunk-IFR4WMPF.js").then(t=>t.RawLogComponent)},canActivate:[e],data:{title:"Raw Log"}},{path:"rawlog/detail",loadComponent(){return import("./chunk-DBH7LDYB.js").then(t=>t.RawDetailComponent)},canActivate:[e],data:{title:"Raw Log Detail"}},{path:"inventory/sync-inventory/detail",loadComponent(){return import("./chunk-266EEWSE.js").then(t=>t.InventoryDetailComponent)},canActivate:[e],data:{title:"Product Inventory Sync Detail"}},{path:"order/detail",loadComponent(){return import("./chunk-UGJ5XNLS.js").then(t=>t.OrderdetailComponent)},canActivate:[e],data:{title:"Order Details"}},{path:"order/detail-user",loadComponent(){return import("./chunk-5J6UA4BV.js").then(t=>t.OrderdetailUserComponent)},canActivate:[e],data:{title:"Order User Details"}},{path:"exception",loadComponent(){return import("./chunk-DQUTVCG3.js").then(t=>t.ExceptionLogComponent)},canActivate:[e],data:{title:"Exception Log"}},{path:"exception/detail",loadComponent(){return import("./chunk-7APQJYJP.js").then(t=>t.ExceptionDetailComponent)},canActivate:[e],data:{title:"Exception Log Detail"}},{path:"inventory",loadComponent:()=>import("./chunk-2HR6ZBIJ.js").then(t=>t.InventoryAsyncLogComponent),canActivate:[e],data:{title:"Product Inventory Sync"}},{path:"inventory/detail",loadComponent:()=>import("./chunk-MM2TEPZZ.js").then(t=>t.InventoryAsyncDetailComponent),canActivate:[e],data:{title:"Product Inventory Sync Detail"}},{path:"authorization-log",loadComponent(){return import("./chunk-NCRNBMR5.js").then(t=>t.ChannelLogComponent)},canActivate:[e],data:{title:"Authorization Log"}},{path:"flush-cache",loadComponent(){return import("./chunk-4TF3XWRL.js").then(t=>t.FlushCacheComponent)},canActivate:[e],data:{title:"Flush Cache"}}]}];export{T as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ge,b as Ce}from"./chunk-RWB2N7TQ.js";import{a as pe,b as ce,c as ue}from"./chunk-CUFGJCZX.js";import{a as he}from"./chunk-ZKMREYB7.js";import{a as O}from"./chunk-HHZM6PB4.js";import{a as _e}from"./chunk-J5PTSESV.js";import"./chunk-FJYX7L63.js";import"./chunk-D2THPOQ7.js";import{a as me}from"./chunk-IPMCCZZW.js";import"./chunk-6GSJBXEE.js";import"./chunk-2C6XBRGE.js";import"./chunk-RUHYZ275.js";import"./chunk-3BV4FPZE.js";import{a as de}from"./chunk-TWRFL73R.js";import"./chunk-7ES2Z445.js";import{a as se}from"./chunk-KMCVYMXQ.js";import"./chunk-QDKVYF6D.js";import"./chunk-VAYLCOBC.js";import"./chunk-6PI5PUIQ.js";import"./chunk-6VOSRCWX.js";import"./chunk-XSXHGAXP.js";import"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-ACIMXBIC.js";import"./chunk-67AXBZYF.js";import"./chunk-5QG5PZ7U.js";import"./chunk-KYK2ZFUZ.js";import"./chunk-KXLYQDZR.js";import{b as ae}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import{a as le}from"./chunk-RDXDKWLL.js";import"./chunk-2GINYFUG.js";import"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-SPNVH2ST.js";import"./chunk-BXA5YUTN.js";import{b as re}from"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-VDNUDZOQ.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import{b as X}from"./chunk-NNVT5X6O.js";import{b as Z,c as ee,h as te,m as ie,o as ne,z as oe}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{b as Y}from"./chunk-45DFJJAO.js";import"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as J,D as K}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as j,Dc as D,Eb as P,Ec as L,Fc as A,Ga as T,Nc as z,Oc as s,Pc as v,Qc as b,Sc as B,Tc as H,Uc as W,Vc as $,Wc as Q,Xc as R,bc as f,bd as q,dc as S,ec as N,gc as k,hc as I,ic as p,jc as t,kb as F,kc as n,kd as w,lc as h,ld as E,mb as l,md as U,na as x,sc as y,sd as G,ua as d,va as m,xc as _,zc as c}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as M,b as V}from"./chunk-66YHNWRR.js";var fe=["contextMenu"],Se=r=>({"td-cell-hover":r});function ye(r,g){if(r&1){let e=y();t(0,"button",20),_("click",function(){d(e);let i=c();return m(i.setMultipleFulfillment())}),s(1," Set Fulfillment "),n()}}function ve(r,g){if(r&1&&h(0,"variants-dropdown",38),r&2){let e=c().$implicit;p("variants",e==null?null:e.Variants)}}function be(r,g){if(r&1&&h(0,"variant-with-image",39),r&2){let e=c().$implicit;p("variant",e==null?null:e.Variants[0])}}function xe(r,g){if(r&1&&(t(0,"span"),s(1),n()),r&2){let e=c().$implicit;l(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Te(r,g){if(r&1){let e=y();t(0,"div",41)(1,"button",45),_("click",function(){d(e);let i=c().$implicit,a=c(2);return m(a.refreshShippingAndRefNumber(i))}),h(2,"i",46),n()()}}function we(r,g){if(r&1){let e=y();t(0,"button",47),_("click",function(){d(e);let i=c().$implicit,a=c(2);return m(a.onSetFulfillment(i))}),s(1," Set Fulfillment "),n()}}function Me(r,g){if(r&1){let e=y();t(0,"tr")(1,"td")(2,"input",30),W("ngModelChange",function(i){let a=d(e).$implicit;return H(a.selected,i)||(a.selected=i),m(i)}),_("ngModelChange",function(){d(e);let i=c(2),a=R(0);return m(i.onSelectOrder(a))}),n()(),t(3,"td")(4,"div",31),h(5,"img",32),w(6,"channelImage"),t(7,"div",33)(8,"div"),s(9),n(),t(10,"small",34)(11,"span"),s(12),n()()()()(),t(13,"td")(14,"div",35)(15,"div"),h(16,"order-link",36),n(),t(17,"small"),s(18),w(19,"date"),n(),h(20,"br"),t(21,"small"),h(22,"i",37),s(23),n()()(),t(24,"td"),f(25,ve,1,1,"variants-dropdown",38)(26,be,1,1,"variant-with-image",39),n(),t(27,"td",40),s(28),w(29,"number"),n(),t(30,"td",41)(31,"div",42)(32,"div",35)(33,"div",43)(34,"span"),s(35),n(),f(36,xe,2,1,"span"),n(),t(37,"small"),s(38),n()(),f(39,Te,3,0,"div",41),n()(),t(40,"td",41),f(41,we,2,0,"button",44),n()()}if(r&2){let e=g.$implicit,o=c(2);l(2),B("ngModel",e.selected),p("disabled",o.selectedChannelType()!=null&&o.selectedChannelType()!=e.MarketType),l(3),p("src",E(6,18,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),v(e.Outlet),l(3),v(e.ChannelName),l(4),p("order",e),l(2),b(" ",U(19,20,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(5),b(" ",e.Customer," "),l(),z(q(25,Se,(e.Variants==null?null:e.Variants.length)>1)),l(),S((e.Variants==null?null:e.Variants.length)>1?25:26),l(3),v(E(29,23,e.Amount)),l(7),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),S(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),l(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),l(),S(!(e.LogisticService!=null&&e.LogisticService.Name)||!e.ReferenceNumber?39:-1),l(2),S((e==null?null:e.MarketType)!=o.channelType.WooCommerce?41:-1)}}function Ve(r,g){if(r&1){let e=y();t(0,"div",17)(1,"table",21)(2,"thead",22)(3,"tr",23),h(4,"th",24),t(5,"th",25),s(6,"Outlet"),n(),t(7,"th",25),s(8,"Number"),n(),t(9,"th"),s(10,"Items"),n(),t(11,"th",26),s(12,"Amount"),n(),t(13,"th",27),s(14,"Shipping"),n(),h(15,"th",28),n()(),t(16,"tbody"),k(17,Me,42,27,"tr",null,N),n()(),t(19,"app-custom-paginator",29),_("next",function(){d(e);let i=c();return m(i.initReadyToShip())})("previous",function(){d(e);let i=c();return m(i.initReadyToShip())}),n()()}if(r&2){let e=c(),o=R(0);l(17),I(o),l(2),p("filter",e.filter())("totaldata",o==null?null:o.length)}}function Re(r,g){r&1&&(t(0,"div",18),h(1,"app-empty-state"),n())}var et=(()=>{class r{constructor(){this.toastr=x(Y),this.orderService=x(O),this.fulfillmentService=x(ge),this.channelType=X,this.selectedOrders=T([]),this.selectedChannelType=G(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.readyToShip=T([]),this.filter=T({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=>V(M({},o),{From:e})),this.initReadyToShip()}initReadyToShip(){this.orderService.getReadyToShipOrders(this.filter()).subscribe(e=>{this.readyToShip.set(e),this.selectedOrders.set([])})}onFilterPropertyChange(e,o){this.filter.update(i=>V(M({},i),{[e]:o}))}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(i=>i.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=P({type:r,selectors:[["app-ready-to-ship"]],viewQuery:function(o,i){if(o&1&&D(fe,5),o&2){let a;L(a=A())&&(i.contextMenuEl=a.first)}},features:[j([O])],decls:36,vars:11,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","80px"],[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"],[1,"fa-solid","fa-user"],[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,i){if(o&1){let a=y();$(0),t(1,"mainpanel",1),_("onSubmit",function(){return d(a),m(i.initReadyToShip())})("textChange",function(u){return d(a),m(i.onFilterPropertyChange("Number",u))}),t(2,"actions"),f(3,ye,2,0,"button",2),t(4,"a",3),h(5,"i",4),t(6,"span"),s(7,"Order Fulfillment Display"),n()()(),t(8,"filters")(9,"div")(10,"label",5),s(11,"Channel"),n(),t(12,"app-channel-options-v2",6),_("ngModelChange",function(u){return d(a),m(i.onFilterPropertyChange("ListChannelID",u))}),n()(),t(13,"div",7)(14,"label",5),s(15,"From/To"),n(),t(16,"div",8)(17,"datepicker",9),_("dateChange",function(u){return d(a),m(i.onFilterPropertyChange("From",u))}),n()(),t(18,"div")(19,"datepicker",10),_("dateChange",function(u){return d(a),m(i.onFilterPropertyChange("To",u))}),n()()(),t(20,"div",7)(21,"label",11),s(22,"Page Number"),n(),t(23,"input",12),_("ngModelChange",function(u){return d(a),m(i.onFilterPropertyChange("PageNumber",+u))}),n()(),t(24,"div",7)(25,"label",11),s(26,"Page Size"),n(),t(27,"input",13),_("ngModelChange",function(u){return d(a),m(i.onFilterPropertyChange("PageSize",+u))}),n()()(),t(28,"content")(29,"div",14)(30,"div",15)(31,"div",16),f(32,Ve,20,2,"div",17)(33,Re,2,0,"div",18),n()()()()(),t(34,"app-context-menu",19,0),_("onSelectItem",function(u){return d(a),m(i.onSelectContextItem(u))}),n()}if(o&2){let a=Q(i.readyToShip());l(),p("text",i.filter().Number),l(2),S(i.selectedOrders().length>0?3:-1),l(9),p("multiple",!0)("ngModel",i.filter().ListChannelID),l(5),p("date",i.filter().From),l(2),p("date",i.filter().To),l(4),p("ngModel",i.filter().PageNumber),l(4),p("ngModel",i.filter().PageSize),l(5),S(a.length>0?32:33),l(2),p("items",i.contextMenuItems)}},dependencies:[ae,se,de,oe,ee,ne,Z,te,ie,ce,ue,_e,he,le,re,Ce,me,pe,J,K],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}"],changeDetection:0})}}return r})();export{et as ReadyToShipComponent};
|
|
1
|
+
import{a as ge,b as Ce}from"./chunk-RWB2N7TQ.js";import{a as pe,b as ce,c as ue}from"./chunk-CUFGJCZX.js";import{a as he}from"./chunk-GNKRJIFK.js";import{a as O}from"./chunk-HHZM6PB4.js";import{a as _e}from"./chunk-J5PTSESV.js";import"./chunk-FJYX7L63.js";import"./chunk-D2THPOQ7.js";import{a as me}from"./chunk-BU67S7V2.js";import"./chunk-6GSJBXEE.js";import"./chunk-2C6XBRGE.js";import"./chunk-RUHYZ275.js";import"./chunk-3BV4FPZE.js";import{a as de}from"./chunk-TWRFL73R.js";import"./chunk-7ES2Z445.js";import{a as se}from"./chunk-KMCVYMXQ.js";import"./chunk-QDKVYF6D.js";import"./chunk-VAYLCOBC.js";import"./chunk-6PI5PUIQ.js";import"./chunk-6VOSRCWX.js";import"./chunk-XSXHGAXP.js";import"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-ACIMXBIC.js";import"./chunk-67AXBZYF.js";import"./chunk-5QG5PZ7U.js";import"./chunk-KYK2ZFUZ.js";import"./chunk-KXLYQDZR.js";import{b as ae}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import{a as le}from"./chunk-RDXDKWLL.js";import"./chunk-2GINYFUG.js";import"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-SPNVH2ST.js";import"./chunk-BXA5YUTN.js";import{b as re}from"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-KYK5EKWR.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import{b as X}from"./chunk-NNVT5X6O.js";import{b as Z,c as ee,h as te,m as ie,o as ne,z as oe}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{b as Y}from"./chunk-45DFJJAO.js";import"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as J,D as K}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as j,Dc as D,Eb as P,Ec as L,Fc as A,Ga as T,Nc as z,Oc as s,Pc as v,Qc as b,Sc as B,Tc as H,Uc as W,Vc as $,Wc as Q,Xc as R,bc as f,bd as q,dc as S,ec as N,gc as k,hc as I,ic as p,jc as t,kb as F,kc as n,kd as w,lc as h,ld as E,mb as l,md as U,na as x,sc as y,sd as G,ua as d,va as m,xc as _,zc as c}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as M,b as V}from"./chunk-66YHNWRR.js";var fe=["contextMenu"],Se=r=>({"td-cell-hover":r});function ye(r,g){if(r&1){let e=y();t(0,"button",20),_("click",function(){d(e);let i=c();return m(i.setMultipleFulfillment())}),s(1," Set Fulfillment "),n()}}function ve(r,g){if(r&1&&h(0,"variants-dropdown",38),r&2){let e=c().$implicit;p("variants",e==null?null:e.Variants)}}function be(r,g){if(r&1&&h(0,"variant-with-image",39),r&2){let e=c().$implicit;p("variant",e==null?null:e.Variants[0])}}function xe(r,g){if(r&1&&(t(0,"span"),s(1),n()),r&2){let e=c().$implicit;l(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Te(r,g){if(r&1){let e=y();t(0,"div",41)(1,"button",45),_("click",function(){d(e);let i=c().$implicit,a=c(2);return m(a.refreshShippingAndRefNumber(i))}),h(2,"i",46),n()()}}function we(r,g){if(r&1){let e=y();t(0,"button",47),_("click",function(){d(e);let i=c().$implicit,a=c(2);return m(a.onSetFulfillment(i))}),s(1," Set Fulfillment "),n()}}function Me(r,g){if(r&1){let e=y();t(0,"tr")(1,"td")(2,"input",30),W("ngModelChange",function(i){let a=d(e).$implicit;return H(a.selected,i)||(a.selected=i),m(i)}),_("ngModelChange",function(){d(e);let i=c(2),a=R(0);return m(i.onSelectOrder(a))}),n()(),t(3,"td")(4,"div",31),h(5,"img",32),w(6,"channelImage"),t(7,"div",33)(8,"div"),s(9),n(),t(10,"small",34)(11,"span"),s(12),n()()()()(),t(13,"td")(14,"div",35)(15,"div"),h(16,"order-link",36),n(),t(17,"small"),s(18),w(19,"date"),n(),h(20,"br"),t(21,"small"),h(22,"i",37),s(23),n()()(),t(24,"td"),f(25,ve,1,1,"variants-dropdown",38)(26,be,1,1,"variant-with-image",39),n(),t(27,"td",40),s(28),w(29,"number"),n(),t(30,"td",41)(31,"div",42)(32,"div",35)(33,"div",43)(34,"span"),s(35),n(),f(36,xe,2,1,"span"),n(),t(37,"small"),s(38),n()(),f(39,Te,3,0,"div",41),n()(),t(40,"td",41),f(41,we,2,0,"button",44),n()()}if(r&2){let e=g.$implicit,o=c(2);l(2),B("ngModel",e.selected),p("disabled",o.selectedChannelType()!=null&&o.selectedChannelType()!=e.MarketType),l(3),p("src",E(6,18,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),v(e.Outlet),l(3),v(e.ChannelName),l(4),p("order",e),l(2),b(" ",U(19,20,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(5),b(" ",e.Customer," "),l(),z(q(25,Se,(e.Variants==null?null:e.Variants.length)>1)),l(),S((e.Variants==null?null:e.Variants.length)>1?25:26),l(3),v(E(29,23,e.Amount)),l(7),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),S(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),l(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),l(),S(!(e.LogisticService!=null&&e.LogisticService.Name)||!e.ReferenceNumber?39:-1),l(2),S((e==null?null:e.MarketType)!=o.channelType.WooCommerce?41:-1)}}function Ve(r,g){if(r&1){let e=y();t(0,"div",17)(1,"table",21)(2,"thead",22)(3,"tr",23),h(4,"th",24),t(5,"th",25),s(6,"Outlet"),n(),t(7,"th",25),s(8,"Number"),n(),t(9,"th"),s(10,"Items"),n(),t(11,"th",26),s(12,"Amount"),n(),t(13,"th",27),s(14,"Shipping"),n(),h(15,"th",28),n()(),t(16,"tbody"),k(17,Me,42,27,"tr",null,N),n()(),t(19,"app-custom-paginator",29),_("next",function(){d(e);let i=c();return m(i.initReadyToShip())})("previous",function(){d(e);let i=c();return m(i.initReadyToShip())}),n()()}if(r&2){let e=c(),o=R(0);l(17),I(o),l(2),p("filter",e.filter())("totaldata",o==null?null:o.length)}}function Re(r,g){r&1&&(t(0,"div",18),h(1,"app-empty-state"),n())}var et=(()=>{class r{constructor(){this.toastr=x(Y),this.orderService=x(O),this.fulfillmentService=x(ge),this.channelType=X,this.selectedOrders=T([]),this.selectedChannelType=G(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.readyToShip=T([]),this.filter=T({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=>V(M({},o),{From:e})),this.initReadyToShip()}initReadyToShip(){this.orderService.getReadyToShipOrders(this.filter()).subscribe(e=>{this.readyToShip.set(e),this.selectedOrders.set([])})}onFilterPropertyChange(e,o){this.filter.update(i=>V(M({},i),{[e]:o}))}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(i=>i.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=P({type:r,selectors:[["app-ready-to-ship"]],viewQuery:function(o,i){if(o&1&&D(fe,5),o&2){let a;L(a=A())&&(i.contextMenuEl=a.first)}},features:[j([O])],decls:36,vars:11,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","80px"],[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"],[1,"fa-solid","fa-user"],[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,i){if(o&1){let a=y();$(0),t(1,"mainpanel",1),_("onSubmit",function(){return d(a),m(i.initReadyToShip())})("textChange",function(u){return d(a),m(i.onFilterPropertyChange("Number",u))}),t(2,"actions"),f(3,ye,2,0,"button",2),t(4,"a",3),h(5,"i",4),t(6,"span"),s(7,"Order Fulfillment Display"),n()()(),t(8,"filters")(9,"div")(10,"label",5),s(11,"Channel"),n(),t(12,"app-channel-options-v2",6),_("ngModelChange",function(u){return d(a),m(i.onFilterPropertyChange("ListChannelID",u))}),n()(),t(13,"div",7)(14,"label",5),s(15,"From/To"),n(),t(16,"div",8)(17,"datepicker",9),_("dateChange",function(u){return d(a),m(i.onFilterPropertyChange("From",u))}),n()(),t(18,"div")(19,"datepicker",10),_("dateChange",function(u){return d(a),m(i.onFilterPropertyChange("To",u))}),n()()(),t(20,"div",7)(21,"label",11),s(22,"Page Number"),n(),t(23,"input",12),_("ngModelChange",function(u){return d(a),m(i.onFilterPropertyChange("PageNumber",+u))}),n()(),t(24,"div",7)(25,"label",11),s(26,"Page Size"),n(),t(27,"input",13),_("ngModelChange",function(u){return d(a),m(i.onFilterPropertyChange("PageSize",+u))}),n()()(),t(28,"content")(29,"div",14)(30,"div",15)(31,"div",16),f(32,Ve,20,2,"div",17)(33,Re,2,0,"div",18),n()()()()(),t(34,"app-context-menu",19,0),_("onSelectItem",function(u){return d(a),m(i.onSelectContextItem(u))}),n()}if(o&2){let a=Q(i.readyToShip());l(),p("text",i.filter().Number),l(2),S(i.selectedOrders().length>0?3:-1),l(9),p("multiple",!0)("ngModel",i.filter().ListChannelID),l(5),p("date",i.filter().From),l(2),p("date",i.filter().To),l(4),p("ngModel",i.filter().PageNumber),l(4),p("ngModel",i.filter().PageSize),l(5),S(a.length>0?32:33),l(2),p("items",i.contextMenuItems)}},dependencies:[ae,se,de,oe,ee,ne,Z,te,ie,ce,ue,_e,he,le,re,Ce,me,pe,J,K],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}"],changeDetection:0})}}return r})();export{et as ReadyToShipComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as J,b as K}from"./chunk-6GSJBXEE.js";import{b as R}from"./chunk-2C6XBRGE.js";import{a as q,b as H}from"./chunk-3BV4FPZE.js";import{a as z}from"./chunk-QDKVYF6D.js";import{b as U,c as j}from"./chunk-VAYLCOBC.js";import{a as B}from"./chunk-ACIMXBIC.js";import{ra as F}from"./chunk-SPNVH2ST.js";import{h as E}from"./chunk-
|
|
1
|
+
import{a as J,b as K}from"./chunk-6GSJBXEE.js";import{b as R}from"./chunk-2C6XBRGE.js";import{a as q,b as H}from"./chunk-3BV4FPZE.js";import{a as z}from"./chunk-QDKVYF6D.js";import{b as U,c as j}from"./chunk-VAYLCOBC.js";import{a as B}from"./chunk-ACIMXBIC.js";import{ra as F}from"./chunk-SPNVH2ST.js";import{h as E}from"./chunk-KYK5EKWR.js";import{b as N}from"./chunk-NNVT5X6O.js";import{a as W,h as P,m as G,z as A}from"./chunk-BUBQQEYA.js";import{$c as L,Eb as T,Ga as y,Jb as v,Kb as M,Oc as _,Pc as g,Sc as f,Tc as x,Uc as S,bc as D,dc as I,ic as r,jc as p,kb as V,kc as m,lc as b,mb as d,na as O,od as k,sc as C,ua as a,va as s,wd as h,xc as u,zc as o}from"./chunk-ZPV56E2J.js";function Q(l,c){if(l&1){let e=C();p(0,"div",7)(1,"p-checkbox",8),S("ngModelChange",function(t){let n=a(e).$implicit;return x(n.selected,t)||(n.selected=t),s(t)}),u("ngModelChange",function(t){let n=a(e).$implicit,w=o(2);return s(w.onGroupSelect(t,n))}),m(),b(2,"img",9),p(3,"span"),_(4),m()()}if(l&2){let e=c.$implicit;d(),r("binary",!0),f("ngModel",e.selected),d(),r("src",e.img,V),d(2),g(e.label)}}function X(l,c){if(l&1&&(p(0,"div"),_(1),m()),l&2){let e=c.$implicit;d(),g(e.Name)}}function Y(l,c){if(l&1){let e=C();p(0,"p-multiselect",5,0),u("click",function(){a(e);let t=o();return s(t.onClickSelect())}),S("ngModelChange",function(t){a(e);let n=o();return x(n.selectedChannels,t)||(n.selectedChannels=t),s(t)}),u("ngModelChange",function(t){a(e);let n=o();return s(n.onChannelChange(t))})("onClear",function(){a(e);let t=o();return s(t.onClearSelectedChannel())}),M(2,Q,5,4,"ng-template",null,1,k)(4,X,2,1,"ng-template",6),m()}if(l&2){let e=o();r("options",e.multiselectOptions())("placeholder",e.placeholder()),f("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())("group",!0)}}function Z(l,c){if(l&1&&(p(0,"div",11),b(1,"img",12),p(2,"div"),_(3),m()()),l&2){let e=c.$implicit;d(),r("src",e.logo,V),d(2),g(e.Name)}}function $(l,c){if(l&1){let e=C();p(0,"p-select",10,2),u("click",function(){a(e);let t=o();return s(t.onClickSelect())}),S("ngModelChange",function(t){a(e);let n=o();return x(n.selectedChannels,t)||(n.selectedChannels=t),s(t)}),u("ngModelChange",function(t){a(e);let n=o();return s(n.onChannelChange(t))}),M(2,Z,4,2,"ng-template",6),m()}if(l&2){let e=o();r("options",e.options())("placeholder",e.placeholder()),f("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var fe=(()=>{class l extends z{constructor(){super(),this.authService=O(E),this.multiple=h(!1),this.clearable=h(!0),this.placeholder=h("Select Channels"),this.options=y(this.authService.getChannels()),this.maxSelectedLabels=h(6),this.multiselectOptions=y([]),this.onChange=e=>{},this.initMultiSelectOptions()}initMultiSelectOptions(){let e=this.authService.getChannels(),i=[];e.forEach(t=>{let n=i.find(w=>w.value===t.TypeID);n?n.items.push(t):(n={label:N[t.TypeID],selected:!1,img:t.Img,value:t.TypeID,items:[t]},i.push(n))}),this.multiselectOptions.set(i)}onGroupSelect(e,i){this.selectedChannels=this.selectedChannels?this.selectedChannels:[];let t=i.items.map(n=>n.ID);e?this.selectedChannels=[...this.selectedChannels,...t.filter(n=>!this.selectedChannels.includes(n))]:this.selectedChannels=this.selectedChannels.filter(n=>!t.includes(n)),this.onChange(this.selectedChannels)}onChannelChange(e){this.multiple()?e=e||[]:e=e||B.GuidEmpty,this.checkSelectedGroup(),this.onChange(e)}checkSelectedGroup(){this.multiselectOptions.update(e=>(e.forEach(i=>{let t=i.items.map(n=>n.ID);i.selected=t.every(n=>this.selectedChannels.includes(n))}),e))}onClearSelectedChannel(){this.multiselectOptions.update(e=>(e.forEach(i=>{i.selected=!1}),e)),this.onChange([])}onClickSelect(){this.initTopPosition(),setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||l)}}static{this.\u0275cmp=T({type:l,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],maxSelectedLabels:[1,"maxSelectedLabels"]},features:[L([{provide:W,multi:!0,useExisting:l}]),v],decls:2,vars:1,consts:[["multiSelect",""],["group",""],["select",""],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","onClear","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["pTemplate","item"],[1,"flex","items-center"],[1,"me-3",3,"ngModelChange","binary","ngModel"],[1,"me-2",2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"]],template:function(i,t){i&1&&D(0,Y,5,7,"p-multiselect",3)(1,$,3,6,"p-select",4),i&2&&I(t.multiple()?0:1)},dependencies:[K,J,F,R,A,P,G,j,U,H,q],styles:["li.p-multiselect-option{margin-left:30px}"],changeDetection:0})}}return l})();export{fe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as u}from"./chunk-
|
|
1
|
+
import{h as u}from"./chunk-KYK5EKWR.js";import{a as p}from"./chunk-7R55YTL6.js";import{b as c}from"./chunk-45DFJJAO.js";import{d as l}from"./chunk-OF426VSL.js";import{ia as a,ma as t}from"./chunk-ZPV56E2J.js";var S=(()=>{class e{constructor(o,i,r,s){this.toastr=o,this.authService=i,this.router=r,this.permissionService=s}canActivate(o,i){let r=JSON.parse(window.localStorage.getItem("user")),s=new Date,n=!1;if(r!=null){let h=new Date(r?.Token?.expiredAt);s<h?n=!0:(this.authService.logout(),this.onTokenExpired())}else this.router.navigate([""]),this.onTokenExpired();return n}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired")}static{this.\u0275fac=function(i){return new(i||e)(t(c),t(u),t(l),t(p))}}static{this.\u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{S as a};
|