marketplacepos 3.16.2 → 3.16.4

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.
Files changed (28) hide show
  1. package/Marketplace/{chunk-FNOXM2SS.js → chunk-44ILHEAX.js} +1 -1
  2. package/Marketplace/{chunk-PTMDFQOD.js → chunk-5WPUUMMO.js} +1 -1
  3. package/Marketplace/{chunk-56HMEZKJ.js → chunk-7KOJ3DFL.js} +1 -1
  4. package/Marketplace/{chunk-TD7KGWBY.js → chunk-B6YCFV4S.js} +1 -1
  5. package/Marketplace/{chunk-HDICR5JJ.js → chunk-BNZ3QXNI.js} +1 -1
  6. package/Marketplace/{chunk-ZHLEQV6S.js → chunk-BWVM6BFT.js} +1 -1
  7. package/Marketplace/{chunk-5HK5RDLE.js → chunk-CLF7PUXF.js} +1 -1
  8. package/Marketplace/{chunk-DJN3BFQ5.js → chunk-DPNIWGU4.js} +1 -1
  9. package/Marketplace/{chunk-5DUVNRSI.js → chunk-FIKLTG2J.js} +1 -1
  10. package/Marketplace/{chunk-P2RYEYAK.js → chunk-FXRODXJT.js} +1 -1
  11. package/Marketplace/{chunk-RRRAZVNG.js → chunk-HZAWDUWT.js} +1 -1
  12. package/Marketplace/{chunk-GCTFQCQL.js → chunk-K5ONTCUO.js} +1 -1
  13. package/Marketplace/{chunk-FU3SO6X2.js → chunk-KWJMZUFP.js} +1 -1
  14. package/Marketplace/{chunk-442UTXWT.js → chunk-MJY3XQ7R.js} +1 -1
  15. package/Marketplace/{chunk-7MV36WHX.js → chunk-OSUCZSOM.js} +1 -1
  16. package/Marketplace/{chunk-7KMBT32T.js → chunk-PED3UNE6.js} +1 -1
  17. package/Marketplace/{chunk-WKKTLYA4.js → chunk-PHFMXSJW.js} +1 -1
  18. package/Marketplace/{chunk-OUZSNKTY.js → chunk-Q2SEJTHF.js} +1 -1
  19. package/Marketplace/{chunk-L7OZWIEI.js → chunk-QRSQP67K.js} +1 -1
  20. package/Marketplace/{chunk-ILLBE7MA.js → chunk-SJZYEO7J.js} +1 -1
  21. package/Marketplace/{chunk-57IKCVRG.js → chunk-SUKXIUAB.js} +1 -1
  22. package/Marketplace/{chunk-YNH3VQZY.js → chunk-TF2NEU67.js} +1 -1
  23. package/Marketplace/{chunk-UDLUDP5I.js → chunk-TS376PJ5.js} +1 -1
  24. package/Marketplace/{chunk-MAFA6A4E.js → chunk-WIURRHOQ.js} +1 -1
  25. package/Marketplace/{chunk-SLBTXHYH.js → chunk-Z4BGJOTF.js} +1 -1
  26. package/Marketplace/index.html +2 -2
  27. package/Marketplace/{main-B7T4QEWM.js → main-S6TN6MGA.js} +1 -1
  28. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import{a as E}from"./chunk-UUI7T7NV.js";import{g as j}from"./chunk-ZHLEQV6S.js";import{b as S,e as n}from"./chunk-SUL6ZUGT.js";import{b as s,c as g}from"./chunk-T4MH7AFK.js";import{$ as l,B as I,E as u,Ua as U,Wc as w,d as P,da as c,n as d,q as A,w as C}from"./chunk-IH2NT4RC.js";var D=(()=>{let r=class r{constructor(){this.httpService=c(n)}getAttributes(o,t){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/shopee/AddProduct",o).pipe(u(e=>d(null)))}generateAttribute(o){return o.map(t=>({attribute_id:t.attribute_id,attribute_value_list:t.attribute_value_list.map(e=>({value_id:e.value_id,name:e.name}))})),o}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var R=(()=>{let r=class r{constructor(){this.httpService=c(n)}getCategories(o){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/tiktok/AddProduct",o).pipe(u(e=>d(null)))}generateAttribute(o){let t;return o.map(e=>(e.type=="PRODUCT_PROPERTY"?t={id:e.id,name:e.name,type:e.type,values:e.values}:t={id:e.id,name:e.values[0].id,type:e.type},t))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var H=(()=>{let r=class r{constructor(){this.httpService=c(n)}getAttributes(o,t){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/lazada/AddProduct",o).pipe(u(e=>d(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var T=(()=>{let r=class r{constructor(){this.httpService=c(n)}getAttributes(o,t){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/woo/AddProduct",o).pipe(u(e=>d(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var y=class{};var b=class{};var F=(()=>{let r=class r{constructor(){this.httpService=c(n)}getCategories(o){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/tokopedia/AddProduct",o).pipe(u(e=>d(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var x=(()=>{let r=class r{constructor(){this.toastrService=c(S)}showToastrUploadMultiple(o){let t=[],e=[],a=this.getResponseList(o);if(o.filter(p=>g.IsNotEmpty(p)).forEach(p=>{typeof p?.Response=="string"?e=[...e,a.length>1?this.setHtmlli(p.Response):this.setHtmlli(p.Response,!1)]:(p?.Response?.Success_list.forEach(f=>{t=[...t,a.length>1?this.setHtmlli(`
1
+ import{a as E}from"./chunk-UUI7T7NV.js";import{g as j}from"./chunk-BWVM6BFT.js";import{b as S,e as n}from"./chunk-SUL6ZUGT.js";import{b as s,c as g}from"./chunk-T4MH7AFK.js";import{$ as l,B as I,E as u,Ua as U,Wc as w,d as P,da as c,n as d,q as A,w as C}from"./chunk-IH2NT4RC.js";var D=(()=>{let r=class r{constructor(){this.httpService=c(n)}getAttributes(o,t){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/shopee/AddProduct",o).pipe(u(e=>d(null)))}generateAttribute(o){return o.map(t=>({attribute_id:t.attribute_id,attribute_value_list:t.attribute_value_list.map(e=>({value_id:e.value_id,name:e.name}))})),o}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var R=(()=>{let r=class r{constructor(){this.httpService=c(n)}getCategories(o){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/tiktok/AddProduct",o).pipe(u(e=>d(null)))}generateAttribute(o){let t;return o.map(e=>(e.type=="PRODUCT_PROPERTY"?t={id:e.id,name:e.name,type:e.type,values:e.values}:t={id:e.id,name:e.values[0].id,type:e.type},t))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var H=(()=>{let r=class r{constructor(){this.httpService=c(n)}getAttributes(o,t){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/lazada/AddProduct",o).pipe(u(e=>d(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var T=(()=>{let r=class r{constructor(){this.httpService=c(n)}getAttributes(o,t){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/woo/AddProduct",o).pipe(u(e=>d(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var y=class{};var b=class{};var F=(()=>{let r=class r{constructor(){this.httpService=c(n)}getCategories(o){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/tokopedia/AddProduct",o).pipe(u(e=>d(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var x=(()=>{let r=class r{constructor(){this.toastrService=c(S)}showToastrUploadMultiple(o){let t=[],e=[],a=this.getResponseList(o);if(o.filter(p=>g.IsNotEmpty(p)).forEach(p=>{typeof p?.Response=="string"?e=[...e,a.length>1?this.setHtmlli(p.Response):this.setHtmlli(p.Response,!1)]:(p?.Response?.Success_list.forEach(f=>{t=[...t,a.length>1?this.setHtmlli(`
2
2
  <div>
3
3
  Product ${f.Name} was <div class="d-inline fw-bold">successfully</div> uploaded to ${p.Channel}
4
4
  </div>
@@ -1,2 +1,2 @@
1
- import{a as R}from"./chunk-CZYGGOZL.js";import{a as Q}from"./chunk-XHAXYWZ7.js";import{a as Ve,b as De,c as $}from"./chunk-WWRX4VCC.js";import"./chunk-BVIRHZTZ.js";import{b as Ee}from"./chunk-YXUEYLE5.js";import{a as Me}from"./chunk-T3POIC5F.js";import{a as Pe,b as Fe}from"./chunk-V6PMZ6DL.js";import{a as be}from"./chunk-UUI7T7NV.js";import"./chunk-OURZMROU.js";import{a as Te}from"./chunk-PW6QZKJS.js";import"./chunk-X54LLODL.js";import{a as ge,b as Ce,d as he,e as xe}from"./chunk-DDUQ3IZU.js";import{g as ue}from"./chunk-ZHLEQV6S.js";import{b as ce,e as _e}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{d as ve,l as ye,m as Ie,n as we}from"./chunk-SG42JTLJ.js";import{t as fe,u as Se}from"./chunk-BZ7SMYI7.js";import"./chunk-DRY23ALE.js";import{A as me,b as ae,c as le,h as re,m as se,o as pe}from"./chunk-VFLG2BDB.js";import{c as D,f as de}from"./chunk-T4MH7AFK.js";import{$a as c,$b as S,Ac as ne,B as z,Cc as ie,Dc as oe,Ha as F,Hb as O,Ia as s,Ib as m,Ja as T,Jb as V,Kb as P,Mb as I,Nb as w,Ob as b,Pb as Z,Q as G,Qb as q,Sb as k,X as B,Za as u,_b as C,ac as N,bc as U,da as H,ga as Y,gb as y,hb as L,jb as A,kb as W,lb as a,mb as r,nb as x,oa as _,ob as M,pa as d,pb as E,rb as v,tc as X,ub as f,vc as J,wb as l,wc as ee,zb as K,zc as te}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var Re=n=>({"text-decoration-line-through":n}),Be=n=>({"ms-10":n}),Le=n=>({"bg-gradient-warning":n});function Ae(n,p){if(n&1){let e=v();a(0,"button",39),f("click",function(){_(e);let t=l().ngIf,o=l(2);return d(o.updateStock(t))}),x(1,"i",40),m(2," Update "),r()}}function We(n,p){if(n&1){let e=v();a(0,"div"),u(1,Ae,3,0,"button",36),a(2,"button",37),f("click",function(){_(e);let t=l(2);return d(t.openExportDialog())}),x(3,"i",38),a(4,"span"),m(5,"Export"),r()()()}if(n&2){let e=p.ngIf,i=l(2);s(),c("ngIf",i.productService.hasSelectionVariant(e))}}function Oe(n,p){if(n&1&&(a(0,"span",41),x(1,"img",42),r(),m(2)),n&2){let e=p.item;s(),c("src",e==null?null:e.Img,F),s(),P(" ",e.Name," ")}}function Ue(n,p){n&1&&(a(0,"div",43)(1,"span"),m(2," showing only different stock, please press next to populate more data "),r()())}function $e(n,p){if(n&1){let e=v();a(0,"th")(1,"input",44),b("ngModelChange",function(t){_(e);let o=l(2);return w(o.checkboxState,t)||(o.checkboxState=t),d(t)}),f("ngModelChange",function(){let t=_(e).ngIf,o=l(2);return d(o.onCheckboxStateChange(t))}),r()()}if(n&2){let e=l(2);s(),I("ngModel",e.checkboxState)}}function Qe(n,p){n&1&&(a(0,"th",33),m(1," Reserved "),r())}function je(n,p){}function ze(n,p){if(n&1){let e=v();a(0,"input",63),b("ngModelChange",function(t){_(e);let o=l(3).$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),f("ngModelChange",function(){_(e);let t=l(3).$implicit,o=l(2);return d(o.onCheckboxStateProduct(t))}),r()}if(n&2){let e=l(3).$implicit;I("ngModel",e.selected)}}function Ge(n,p){if(n&1){let e=v();a(0,"img",64),f("click",function(t){_(e);let o=l(3).$implicit,h=l(2);return d(h.onZoomImage(t,o==null?null:o.ImageUrl))}),r()}if(n&2){let e=l(3).$implicit;K("src",e==null?null:e.ThumbnailUrl,F)}}function He(n,p){n&1&&x(0,"img",60)}function Ye(n,p){if(n&1&&(x(0,"br"),a(1,"div",65),x(2,"i",66),a(3,"small"),m(4),r()()),n&2){let e=l(3).$implicit;s(4),P("(",e==null?null:e.Category,")")}}function Ke(n,p){if(n&1&&(a(0,"td",56)(1,"div",15),u(2,ze,1,1,"input",57),a(3,"div",58),u(4,Ge,1,1,"img",59)(5,He,1,0,"img",60),r()()(),a(6,"td",61)(7,"span",62),m(8),r(),u(9,Ye,5,1),r()),n&2){let e=l(2).$implicit,i=l(2);c("rowSpan",e==null?null:e.Variants.length),s(2),y(e.Variants.length>1?2:-1),s(),c("ngClass",k(7,Be,e.Variants.length<=1)),s(),y(e!=null&&e.ThumbnailUrl?4:5),s(2),c("rowSpan",e==null?null:e.Variants.length),s(2),V(e==null?null:e.Name),s(),y(e.CategoryID!==null&&e.CategoryID!=i.guidEmpty?9:-1)}}function Ze(n,p){if(n&1){let e=v();a(0,"input",44),b("ngModelChange",function(t){_(e);let o=l(2).$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),r()}if(n&2){let e=l(2).$implicit;I("ngModel",e.selected)}}function qe(n,p){if(n&1&&u(0,Ze,1,1,"input",50),n&2){let e=l().$implicit;y((e==null?null:e.Inventory)<=1e5?0:-1)}}function Xe(n,p){if(n&1){let e=v();a(0,"input",44),b("ngModelChange",function(t){_(e);let o=l().$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),r()}if(n&2){let e=l().$implicit;I("ngModel",e.selected)}}function Je(n,p){n&1&&(a(0,"div",67),m(1," Not Found "),r())}function et(n,p){if(n&1&&(a(0,"div")(1,"span",68),m(2),C(3,"number"),r(),m(4," => "),a(5,"span",69),m(6),C(7,"number"),r()()),n&2){let e=l().$implicit;s(2),P(" ",S(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),V(S(7,4,e==null?null:e.Inventory))}}function tt(n,p){if(n&1&&(m(0),C(1,"number")),n&2){let e=l().$implicit;P(" ",S(1,1,e==null?null:e.Inventory)," ")}}function nt(n,p){if(n&1&&(M(0),a(1,"div",70)(2,"a",71),x(3,"i",72),r()(),E()),n&2){let e=l().$implicit,i=l(3);s(2),c("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),F)}}function it(n,p){if(n&1){let e=v();a(0,"span",77),f("click",function(){let t=_(e).ngIf,o=l(2).$implicit,h=l().$implicit,g=l(2);return d(g.openTableDialog(h,o,t))}),m(1),C(2,"number"),r()}if(n&2){let e=l(2).$implicit;s(),P(" ",S(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function ot(n,p){if(n&1){let e=v();a(0,"td",73)(1,"div",51)(2,"div"),u(3,it,3,3,"span",74),C(4,"async"),r(),a(5,"div",70)(6,"a",71),x(7,"i",72),r()(),a(8,"div",70)(9,"span",75),f("click",function(){_(e);let t=l().$implicit,o=l(3);return d(o.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),x(10,"i",76),r()()()()}if(n&2){let e=l().$implicit,i=l(3);c("ngClass",k(5,Le,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),c("ngIf",S(4,3,i.products$)),s(3),c("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,F)}}function at(n,p){if(n&1&&(M(0),a(1,"span",78),m(2),C(3,"number"),r(),E()),n&2){let e=l(2).$implicit;s(2),P(" (",S(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function lt(n,p){n&1&&m(0," - ")}function rt(n,p){if(n&1&&(M(0),a(1,"td",47),u(2,at,4,3,"ng-container",55)(3,lt,1,0,"ng-template",null,1,U),r(),E()),n&2){let e=O(4),i=l().$implicit;s(2),c("ngIf",i==null||i.Channel[0]==null?null:i.Channel[0].InventoryReserved)("ngIfElse",e)}}function st(n,p){n&1&&(M(0),m(1," - "),E())}function pt(n,p){if(n&1&&(a(0,"span",79),C(1,"date"),m(2),C(3,"date"),r()),n&2){let e=l().$implicit;c("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),P(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function mt(n,p){if(n&1&&(a(0,"tr"),u(1,Ke,10,9),a(2,"td",46),m(3),r(),a(4,"td",47)(5,"span",48),m(6),r()(),a(7,"td",49),u(8,qe,1,1)(9,Xe,1,1,"input",50),r(),a(10,"td")(11,"div",51),u(12,Je,2,0,"div",52)(13,et,8,6,"div")(14,tt,2,3)(15,nt,4,1,"ng-container",5),r()(),u(16,ot,11,7,"td",53)(17,rt,5,2,"ng-container",5),a(18,"td",54),u(19,st,2,0,"ng-container",55)(20,pt,4,8,"ng-template",null,0,U),r()()),n&2){let e=p.$implicit,i=p.index,t=O(21),o=l(3);s(),y(i==0?1:-1),s(2),V(e==null?null:e.Model),s(2),c("matTooltip",e.Discontinued?o.discontinuedVariantMsg:"")("ngClass",k(14,Re,e.Discontinued)),s(),V(e==null?null:e.Code),s(2),y((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),c("ngIf",(e==null?null:e.I)==null),s(),y((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),y((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),c("ngIf",(e==null?null:e.I)!=null),s(),c("ngIf",e==null?null:e.Channel),s(),c("ngIf",o.isShowReservedColumn),s(2),c("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==o.minDate)("ngIfElse",t)}}function ct(n,p){if(n&1&&(a(0,"tbody"),A(1,je,0,0,null,null,L),u(3,mt,22,16,"tr",45),r()),n&2){let e=p.$implicit;s(),W(e.Variants),s(2),c("ngForOf",e.Variants)}}function _t(n,p){if(n&1){let e=v();a(0,"mainpanel",3),f("onSubmit",function(t){_(e);let o=l();return d(o.onSearch(t))}),a(1,"actions")(2,"div",4),u(3,We,6,1,"div",5),C(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),m(8,"Channel"),r(),a(9,"ng-select",7),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),d(t)}),u(10,Oe,3,2,"ng-template",8),r()(),a(11,"div",9)(12,"label",10),m(13,"PageNumber"),r(),a(14,"input",11),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),d(t)}),r()(),a(15,"div",9)(16,"label",12),m(17,"Page Size"),r(),a(18,"input",13),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),d(t)}),r()(),a(19,"div",9)(20,"label",14),m(21,"Quantity From - To"),r(),a(22,"div",15)(23,"input",16),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.QuantityFrom,t)||(o.searchFilter.QuantityFrom=t),d(t)}),r(),m(24," - "),a(25,"input",17),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.QuantityTo,t)||(o.searchFilter.QuantityTo=t),d(t)}),r()()()(),a(26,"content")(27,"div",18)(28,"div",19)(29,"div",20),u(30,Ue,3,0,"div",21),a(31,"table",22)(32,"thead",23)(33,"tr")(34,"th",24),m(35," Product "),x(36,"br"),a(37,"mat-slide-toggle",25),f("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,d(t.onShowDifferenceStock())}),a(38,"small",14),m(39,"FILTER DIFFERENT INVENTORY"),r()()(),a(40,"th",26),m(41,"Variant"),r(),a(42,"th",27),m(43,"SKU"),r(),u(44,$e,2,1,"th",5),C(45,"async"),a(46,"th",28),m(47,"POS"),r(),a(48,"th",29)(49,"div",30),f("click",function(){_(e);let t=l();return d(t.openModalFilter())}),x(50,"img",31),a(51,"span",32),m(52),C(53,"stringLimit"),r()()(),u(54,Qe,2,0,"th",33),a(55,"th",34),m(56,"Last Sync"),r()()(),A(57,ct,4,1,"tbody",null,L),C(59,"async"),r(),a(60,"infinite-paginator",35),C(61,"async"),f("onNextPage",function(){_(e);let t=l();return d(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return d(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return d(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(n&2){let e=l();c("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),s(3),c("ngIf",S(4,23,e.products$)),s(6),c("clearable",!1)("items",e.channelOptions),I("ngModel",e.searchFilter.ChannelID),s(5),I("ngModel",e.searchFilter.PageNumber),s(4),I("ngModel",e.searchFilter.RowCount),s(5),I("ngModel",e.searchFilter.QuantityFrom),s(2),I("ngModel",e.searchFilter.QuantityTo),s(5),c("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),s(14),c("ngIf",S(45,25,e.products$)),s(5),c("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),s(),c("src",e.selectedChannel==null?null:e.selectedChannel.Img,F),s(2),P(" ",N(53,27,e.selectedChannel==null?null:e.selectedChannel.Name,13)," "),s(2),y(e.isShowReservedColumn?54:-1),s(3),W(S(59,30,e.products$)),s(3),c("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",S(61,32,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}var Ht=(()=>{let p=class p{constructor(i,t,o,h,g,j,ke,Ne){this.http=i,this.toastr=t,this.dialog=o,this.productService=h,this.authService=g,this.biggerPictureService=j,this.inventoryService=ke,this.mainPanelService=Ne,this.infinitePagination=H($),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=D.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=D.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.infinitePagination.data$.pipe(B(i=>{this.checkShowReservedColumn(i)}),G())}checkShowReservedColumn(i){let t=0,o;i.forEach(h=>{o=h.Variants.find(g=>D.IsNotEmpty(g?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(B(i=>{this.searchFilter={RowCount:i.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:i.Filter.ChannelID},this.initSelectedChannel(),this.infinitePagination.reloadPagination(this.searchFilter),this.showToastrMarketplaceInactive(!i.Filter.IsMarketplaceAppActive)}))}showToastrMarketplaceInactive(i){i&&this.toastr.warning(`Automatic inventory sync disabled.
1
+ import{a as R}from"./chunk-CZYGGOZL.js";import{a as Q}from"./chunk-XHAXYWZ7.js";import{a as Ve,b as De,c as $}from"./chunk-WWRX4VCC.js";import"./chunk-BVIRHZTZ.js";import{b as Ee}from"./chunk-YXUEYLE5.js";import{a as Me}from"./chunk-T3POIC5F.js";import{a as Pe,b as Fe}from"./chunk-V6PMZ6DL.js";import{a as be}from"./chunk-UUI7T7NV.js";import"./chunk-OURZMROU.js";import{a as Te}from"./chunk-PW6QZKJS.js";import"./chunk-X54LLODL.js";import{a as ge,b as Ce,d as he,e as xe}from"./chunk-DDUQ3IZU.js";import{g as ue}from"./chunk-BWVM6BFT.js";import{b as ce,e as _e}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{d as ve,l as ye,m as Ie,n as we}from"./chunk-SG42JTLJ.js";import{t as fe,u as Se}from"./chunk-BZ7SMYI7.js";import"./chunk-DRY23ALE.js";import{A as me,b as ae,c as le,h as re,m as se,o as pe}from"./chunk-VFLG2BDB.js";import{c as D,f as de}from"./chunk-T4MH7AFK.js";import{$a as c,$b as S,Ac as ne,B as z,Cc as ie,Dc as oe,Ha as F,Hb as O,Ia as s,Ib as m,Ja as T,Jb as V,Kb as P,Mb as I,Nb as w,Ob as b,Pb as Z,Q as G,Qb as q,Sb as k,X as B,Za as u,_b as C,ac as N,bc as U,da as H,ga as Y,gb as y,hb as L,jb as A,kb as W,lb as a,mb as r,nb as x,oa as _,ob as M,pa as d,pb as E,rb as v,tc as X,ub as f,vc as J,wb as l,wc as ee,zb as K,zc as te}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var Re=n=>({"text-decoration-line-through":n}),Be=n=>({"ms-10":n}),Le=n=>({"bg-gradient-warning":n});function Ae(n,p){if(n&1){let e=v();a(0,"button",39),f("click",function(){_(e);let t=l().ngIf,o=l(2);return d(o.updateStock(t))}),x(1,"i",40),m(2," Update "),r()}}function We(n,p){if(n&1){let e=v();a(0,"div"),u(1,Ae,3,0,"button",36),a(2,"button",37),f("click",function(){_(e);let t=l(2);return d(t.openExportDialog())}),x(3,"i",38),a(4,"span"),m(5,"Export"),r()()()}if(n&2){let e=p.ngIf,i=l(2);s(),c("ngIf",i.productService.hasSelectionVariant(e))}}function Oe(n,p){if(n&1&&(a(0,"span",41),x(1,"img",42),r(),m(2)),n&2){let e=p.item;s(),c("src",e==null?null:e.Img,F),s(),P(" ",e.Name," ")}}function Ue(n,p){n&1&&(a(0,"div",43)(1,"span"),m(2," showing only different stock, please press next to populate more data "),r()())}function $e(n,p){if(n&1){let e=v();a(0,"th")(1,"input",44),b("ngModelChange",function(t){_(e);let o=l(2);return w(o.checkboxState,t)||(o.checkboxState=t),d(t)}),f("ngModelChange",function(){let t=_(e).ngIf,o=l(2);return d(o.onCheckboxStateChange(t))}),r()()}if(n&2){let e=l(2);s(),I("ngModel",e.checkboxState)}}function Qe(n,p){n&1&&(a(0,"th",33),m(1," Reserved "),r())}function je(n,p){}function ze(n,p){if(n&1){let e=v();a(0,"input",63),b("ngModelChange",function(t){_(e);let o=l(3).$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),f("ngModelChange",function(){_(e);let t=l(3).$implicit,o=l(2);return d(o.onCheckboxStateProduct(t))}),r()}if(n&2){let e=l(3).$implicit;I("ngModel",e.selected)}}function Ge(n,p){if(n&1){let e=v();a(0,"img",64),f("click",function(t){_(e);let o=l(3).$implicit,h=l(2);return d(h.onZoomImage(t,o==null?null:o.ImageUrl))}),r()}if(n&2){let e=l(3).$implicit;K("src",e==null?null:e.ThumbnailUrl,F)}}function He(n,p){n&1&&x(0,"img",60)}function Ye(n,p){if(n&1&&(x(0,"br"),a(1,"div",65),x(2,"i",66),a(3,"small"),m(4),r()()),n&2){let e=l(3).$implicit;s(4),P("(",e==null?null:e.Category,")")}}function Ke(n,p){if(n&1&&(a(0,"td",56)(1,"div",15),u(2,ze,1,1,"input",57),a(3,"div",58),u(4,Ge,1,1,"img",59)(5,He,1,0,"img",60),r()()(),a(6,"td",61)(7,"span",62),m(8),r(),u(9,Ye,5,1),r()),n&2){let e=l(2).$implicit,i=l(2);c("rowSpan",e==null?null:e.Variants.length),s(2),y(e.Variants.length>1?2:-1),s(),c("ngClass",k(7,Be,e.Variants.length<=1)),s(),y(e!=null&&e.ThumbnailUrl?4:5),s(2),c("rowSpan",e==null?null:e.Variants.length),s(2),V(e==null?null:e.Name),s(),y(e.CategoryID!==null&&e.CategoryID!=i.guidEmpty?9:-1)}}function Ze(n,p){if(n&1){let e=v();a(0,"input",44),b("ngModelChange",function(t){_(e);let o=l(2).$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),r()}if(n&2){let e=l(2).$implicit;I("ngModel",e.selected)}}function qe(n,p){if(n&1&&u(0,Ze,1,1,"input",50),n&2){let e=l().$implicit;y((e==null?null:e.Inventory)<=1e5?0:-1)}}function Xe(n,p){if(n&1){let e=v();a(0,"input",44),b("ngModelChange",function(t){_(e);let o=l().$implicit;return w(o.selected,t)||(o.selected=t),d(t)}),r()}if(n&2){let e=l().$implicit;I("ngModel",e.selected)}}function Je(n,p){n&1&&(a(0,"div",67),m(1," Not Found "),r())}function et(n,p){if(n&1&&(a(0,"div")(1,"span",68),m(2),C(3,"number"),r(),m(4," => "),a(5,"span",69),m(6),C(7,"number"),r()()),n&2){let e=l().$implicit;s(2),P(" ",S(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),V(S(7,4,e==null?null:e.Inventory))}}function tt(n,p){if(n&1&&(m(0),C(1,"number")),n&2){let e=l().$implicit;P(" ",S(1,1,e==null?null:e.Inventory)," ")}}function nt(n,p){if(n&1&&(M(0),a(1,"div",70)(2,"a",71),x(3,"i",72),r()(),E()),n&2){let e=l().$implicit,i=l(3);s(2),c("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),F)}}function it(n,p){if(n&1){let e=v();a(0,"span",77),f("click",function(){let t=_(e).ngIf,o=l(2).$implicit,h=l().$implicit,g=l(2);return d(g.openTableDialog(h,o,t))}),m(1),C(2,"number"),r()}if(n&2){let e=l(2).$implicit;s(),P(" ",S(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function ot(n,p){if(n&1){let e=v();a(0,"td",73)(1,"div",51)(2,"div"),u(3,it,3,3,"span",74),C(4,"async"),r(),a(5,"div",70)(6,"a",71),x(7,"i",72),r()(),a(8,"div",70)(9,"span",75),f("click",function(){_(e);let t=l().$implicit,o=l(3);return d(o.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),x(10,"i",76),r()()()()}if(n&2){let e=l().$implicit,i=l(3);c("ngClass",k(5,Le,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),c("ngIf",S(4,3,i.products$)),s(3),c("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,F)}}function at(n,p){if(n&1&&(M(0),a(1,"span",78),m(2),C(3,"number"),r(),E()),n&2){let e=l(2).$implicit;s(2),P(" (",S(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function lt(n,p){n&1&&m(0," - ")}function rt(n,p){if(n&1&&(M(0),a(1,"td",47),u(2,at,4,3,"ng-container",55)(3,lt,1,0,"ng-template",null,1,U),r(),E()),n&2){let e=O(4),i=l().$implicit;s(2),c("ngIf",i==null||i.Channel[0]==null?null:i.Channel[0].InventoryReserved)("ngIfElse",e)}}function st(n,p){n&1&&(M(0),m(1," - "),E())}function pt(n,p){if(n&1&&(a(0,"span",79),C(1,"date"),m(2),C(3,"date"),r()),n&2){let e=l().$implicit;c("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),P(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function mt(n,p){if(n&1&&(a(0,"tr"),u(1,Ke,10,9),a(2,"td",46),m(3),r(),a(4,"td",47)(5,"span",48),m(6),r()(),a(7,"td",49),u(8,qe,1,1)(9,Xe,1,1,"input",50),r(),a(10,"td")(11,"div",51),u(12,Je,2,0,"div",52)(13,et,8,6,"div")(14,tt,2,3)(15,nt,4,1,"ng-container",5),r()(),u(16,ot,11,7,"td",53)(17,rt,5,2,"ng-container",5),a(18,"td",54),u(19,st,2,0,"ng-container",55)(20,pt,4,8,"ng-template",null,0,U),r()()),n&2){let e=p.$implicit,i=p.index,t=O(21),o=l(3);s(),y(i==0?1:-1),s(2),V(e==null?null:e.Model),s(2),c("matTooltip",e.Discontinued?o.discontinuedVariantMsg:"")("ngClass",k(14,Re,e.Discontinued)),s(),V(e==null?null:e.Code),s(2),y((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),c("ngIf",(e==null?null:e.I)==null),s(),y((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),y((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),c("ngIf",(e==null?null:e.I)!=null),s(),c("ngIf",e==null?null:e.Channel),s(),c("ngIf",o.isShowReservedColumn),s(2),c("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==o.minDate)("ngIfElse",t)}}function ct(n,p){if(n&1&&(a(0,"tbody"),A(1,je,0,0,null,null,L),u(3,mt,22,16,"tr",45),r()),n&2){let e=p.$implicit;s(),W(e.Variants),s(2),c("ngForOf",e.Variants)}}function _t(n,p){if(n&1){let e=v();a(0,"mainpanel",3),f("onSubmit",function(t){_(e);let o=l();return d(o.onSearch(t))}),a(1,"actions")(2,"div",4),u(3,We,6,1,"div",5),C(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),m(8,"Channel"),r(),a(9,"ng-select",7),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),d(t)}),u(10,Oe,3,2,"ng-template",8),r()(),a(11,"div",9)(12,"label",10),m(13,"PageNumber"),r(),a(14,"input",11),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),d(t)}),r()(),a(15,"div",9)(16,"label",12),m(17,"Page Size"),r(),a(18,"input",13),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),d(t)}),r()(),a(19,"div",9)(20,"label",14),m(21,"Quantity From - To"),r(),a(22,"div",15)(23,"input",16),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.QuantityFrom,t)||(o.searchFilter.QuantityFrom=t),d(t)}),r(),m(24," - "),a(25,"input",17),b("ngModelChange",function(t){_(e);let o=l();return w(o.searchFilter.QuantityTo,t)||(o.searchFilter.QuantityTo=t),d(t)}),r()()()(),a(26,"content")(27,"div",18)(28,"div",19)(29,"div",20),u(30,Ue,3,0,"div",21),a(31,"table",22)(32,"thead",23)(33,"tr")(34,"th",24),m(35," Product "),x(36,"br"),a(37,"mat-slide-toggle",25),f("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,d(t.onShowDifferenceStock())}),a(38,"small",14),m(39,"FILTER DIFFERENT INVENTORY"),r()()(),a(40,"th",26),m(41,"Variant"),r(),a(42,"th",27),m(43,"SKU"),r(),u(44,$e,2,1,"th",5),C(45,"async"),a(46,"th",28),m(47,"POS"),r(),a(48,"th",29)(49,"div",30),f("click",function(){_(e);let t=l();return d(t.openModalFilter())}),x(50,"img",31),a(51,"span",32),m(52),C(53,"stringLimit"),r()()(),u(54,Qe,2,0,"th",33),a(55,"th",34),m(56,"Last Sync"),r()()(),A(57,ct,4,1,"tbody",null,L),C(59,"async"),r(),a(60,"infinite-paginator",35),C(61,"async"),f("onNextPage",function(){_(e);let t=l();return d(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return d(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return d(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(n&2){let e=l();c("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),s(3),c("ngIf",S(4,23,e.products$)),s(6),c("clearable",!1)("items",e.channelOptions),I("ngModel",e.searchFilter.ChannelID),s(5),I("ngModel",e.searchFilter.PageNumber),s(4),I("ngModel",e.searchFilter.RowCount),s(5),I("ngModel",e.searchFilter.QuantityFrom),s(2),I("ngModel",e.searchFilter.QuantityTo),s(5),c("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),s(14),c("ngIf",S(45,25,e.products$)),s(5),c("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),s(),c("src",e.selectedChannel==null?null:e.selectedChannel.Img,F),s(2),P(" ",N(53,27,e.selectedChannel==null?null:e.selectedChannel.Name,13)," "),s(2),y(e.isShowReservedColumn?54:-1),s(3),W(S(59,30,e.products$)),s(3),c("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",S(61,32,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}var Ht=(()=>{let p=class p{constructor(i,t,o,h,g,j,ke,Ne){this.http=i,this.toastr=t,this.dialog=o,this.productService=h,this.authService=g,this.biggerPictureService=j,this.inventoryService=ke,this.mainPanelService=Ne,this.infinitePagination=H($),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=D.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=D.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.infinitePagination.data$.pipe(B(i=>{this.checkShowReservedColumn(i)}),G())}checkShowReservedColumn(i){let t=0,o;i.forEach(h=>{o=h.Variants.find(g=>D.IsNotEmpty(g?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(B(i=>{this.searchFilter={RowCount:i.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:i.Filter.ChannelID},this.initSelectedChannel(),this.infinitePagination.reloadPagination(this.searchFilter),this.showToastrMarketplaceInactive(!i.Filter.IsMarketplaceAppActive)}))}showToastrMarketplaceInactive(i){i&&this.toastr.warning(`Automatic inventory sync disabled.
2
2
  Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(i=>i.ID==this.searchFilter.ChannelID)}onSearch(i){this.searchFilter.text=i,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(i){let t=this.productService.selectedVariantProduct(i);if(t.length>0){let o=t.map(g=>({ID:g.ID,Code:g.Code,Inventory:g.Inventory})),h={ListChannelID:[this.searchFilter.ChannelID],List:o};this.http.post("/api/Inventory/UpdateChannel",h).subscribe(g=>{this.searchFilter.PageNumber=1,this.infinitePagination.reloadPagination(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(g)})}}handlingUpdateStock(i){if(i[0]?.StatusProduct){let t=i[0].StatusProduct.Fail_list,o=i[0].StatusProduct.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",o,t)}else this.toastr.error(i[0]?.Exception,"Error")}refreshInventory(i,t,o,h){let g={ChannelItemID:i,ChannelVariationID:t,ChannelID:o,VariantID:h};this.http.post("/api/Inventory/RefreshInventoryChannel",g).subscribe(j=>{this.toastr.success("Successfully updated","Success"),this.infinitePagination.reloadPagination(this.searchFilter)})}onCheckboxStateProduct(i){i.Variants=i.Variants.map(t=>(t.Inventory>=0&&(t.selected=i.selected),t))}onCheckboxStateChange(i){i=i.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=this.checkboxState,o)),t))}openTableDialog(i,t,o){this.dialog.open(Ve,{data:{Name:i.Name,Variant:t,ChannelID:t?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:i.ChannelItemID}}).afterClosed().pipe(z(g=>D.IsNotEmpty(g))).subscribe(g=>{this.updateItemAfterDialog(g,o)})}updateItemAfterDialog(i,t){let o={ID:i.ChannelID,ChannelItemID:i.ChannelItemID,ChannelVariantID:i.ChannelVariationID,NewQuantity:parseFloat(i.Inventory),VariantID:i.ID,SKU:i.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",o).subscribe(h=>{this.searchFilter.PageNumber=1,this.infinitePagination.reloadPagination(this.searchFilter),this.handlingUpdateStock([h])})}openExportDialog(){this.dialog.open(Ee,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=Q.DIFFERENCE:this.searchFilter.filterModel=Q.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}onZoomImage(i,t){this.biggerPictureService.openBiggerPicture(i,t)}};p.\u0275fac=function(t){return new(t||p)(T(_e),T(ce),T(ve),T(be),T(ue),T(Te),T(R),T(ye))},p.\u0275cmp=Y({type:p,selectors:[["app-single-channel-comparison"]],standalone:!0,features:[Z([$,R]),q],decls:2,vars:3,consts:[["SYNCDATE",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","ng-select",1,"fw-bold"],["id","ng-select","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-3",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"me-2"],[2,"width","18px",3,"src"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],[4,"ngFor","ngForOf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"align-middle"],["type","checkbox",3,"ngModel"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"width","0%",3,"rowSpan"],["type","checkbox",1,"me-3",3,"ngModel"],[3,"ngClass"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Stock Available"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-end",3,"ngClass"],["class","cursor",3,"click",4,"ngIf"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[1,"cursor",3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(t,o){t&1&&(u(0,_t,62,34,"mainpanel",2),C(1,"async")),t&2&&c("ngIf",S(1,1,o.loader$))},dependencies:[oe,X,J,ee,te,ie,ne,we,Ie,xe,he,ge,Ce,me,le,pe,ae,re,se,Me,De,de,Fe,Pe,Se,fe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});let n=p;return n})();export{Ht as SingleChannelComparisonComponent};
@@ -1 +1 @@
1
- import"./chunk-3OCV5XYQ.js";import{a as Ue}from"./chunk-SLBTXHYH.js";import"./chunk-VS2ZOTGT.js";import{a as Ke}from"./chunk-6U6JR5K6.js";import{a as E}from"./chunk-BVIRHZTZ.js";import"./chunk-XGEX66UB.js";import"./chunk-HXV4FH6L.js";import{b as Je}from"./chunk-HPCPVA6F.js";import{c as Ze}from"./chunk-OURZMROU.js";import{b as Ye}from"./chunk-CHZBEIYE.js";import{c as qe}from"./chunk-KSTCUPYX.js";import{a as f}from"./chunk-L7OZWIEI.js";import{g as Qe}from"./chunk-X54LLODL.js";import{a as Be,d as Re,e as $}from"./chunk-DDUQ3IZU.js";import{a as Pe,b as ze,g as Le}from"./chunk-ZHLEQV6S.js";import"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{a as Ve,g as He,j as J,n as Ge}from"./chunk-SG42JTLJ.js";import{t as We,u as F}from"./chunk-BZ7SMYI7.js";import{F as je,K as Z,u as $e,x as Fe}from"./chunk-DRY23ALE.js";import{A as U,B as ke,h as Ee,m as De}from"./chunk-VFLG2BDB.js";import{e as Ne,f as Ae}from"./chunk-T4MH7AFK.js";import{$a as d,$b as Q,Ac as Ie,B as ee,Cb as fe,Da as le,Db as ue,Dc as M,Eb as _e,H as te,Ha as se,Hb as L,Ia as r,Ib as p,Ja as g,Jb as y,K as ie,Kb as w,Oa as de,Pa as ce,Qb as B,V as ne,Vc as Te,Xc as Oe,Ya as me,Yc as we,Za as h,Zc as Y,_b as q,aa as u,ab as pe,bb as z,bc as R,c as H,da as x,db as G,ga as v,gb as ge,gc as be,ha as _,ia as ae,kc as V,la as oe,lb as l,mb as s,nb as b,oa as I,ob as N,pa as T,pb as A,pc as Ce,q as k,rb as he,rc as ve,tc as ye,ub as O,vc as Me,wb as c,wc as Se,ya as re,za as P,zc as xe}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var j=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[E.dashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/Order",Roles:[E.orderView]},{Icon:"fas fa-clipboard-list",Title:"Sync Log",Url:"/menu/sync-log",Roles:[E.orderView]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[E.channelView]},{Icon:"fas fa-file-alt",Title:"Logs",Url:"/menu/log",Roles:[]},{Icon:"fas fa-bell",Title:"Notification",Url:"/menu/notification",Badge:!0,Roles:[]},{Icon:"fa-solid fa-wand-magic-sparkles",Title:"What`s New",Url:`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${Pe.version}`,ExternalLink:!0,CustomColor:"#ff2323",Badge:!0,Roles:[]}]}get getMenu(){return this.menus}};var rt=0,Xe="mat-badge-content",W=new Set,lt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-component"]],standalone:!0,features:[B],decls:0,vars:0,template:function(n,a){},styles:[".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color);color:var(--mat-badge-text-color);font-family:var(--mat-badge-text-font);font-weight:var(--mat-badge-text-weight);border-radius:var(--mat-badge-container-shape)}.cdk-high-contrast-active .mat-badge-content{outline:solid 1px;border-radius:0}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color)}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, unset);min-height:var(--mat-badge-small-size-container-size, unset);line-height:var(--mat-badge-legacy-small-size-container-size, var(--mat-badge-small-size-container-size));padding:var(--mat-badge-small-size-container-padding);font-size:var(--mat-badge-small-size-text-size);margin:var(--mat-badge-small-size-container-offset)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, unset);min-height:var(--mat-badge-container-size, unset);line-height:var(--mat-badge-legacy-container-size, var(--mat-badge-container-size));padding:var(--mat-badge-container-padding);font-size:var(--mat-badge-text-size);margin:var(--mat-badge-container-offset)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, unset);min-height:var(--mat-badge-large-size-container-size, unset);line-height:var(--mat-badge-legacy-large-size-container-size, var(--mat-badge-large-size-container-size));padding:var(--mat-badge-large-size-container-padding);font-size:var(--mat-badge-large-size-text-size);margin:var(--mat-badge-large-size-container-offset)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset)}"],encapsulation:2,changeDetection:0});let t=e;return t})(),et=(()=>{let e=class e{get color(){return this._color}set color(i){this._setColor(i),this._color=i}get content(){return this._content}set content(i){this._updateRenderedContent(i)}get description(){return this._description}set description(i){this._updateDescription(i)}constructor(i,n,a,m,S){this._ngZone=i,this._elementRef=n,this._ariaDescriber=a,this._renderer=m,this._animationMode=S,this._color="primary",this.overlap=!0,this.position="above after",this.size="medium",this._id=rt++,this._isInitialized=!1,this._interactivityChecker=x(Fe),this._document=x(ve);let C=x(be);if(!W.has(C)){W.add(C);let X=Ce(lt,{environmentInjector:x(oe)});C.onDestroy(()=>{W.delete(C),W.size===0&&X.destroy()})}}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let i=this._renderer.createElement("span"),n="mat-badge-active";return i.setAttribute("id",`mat-badge-content-${this._id}`),i.setAttribute("aria-hidden","true"),i.classList.add(Xe),this._animationMode==="NoopAnimations"&&i.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(i),typeof requestAnimationFrame=="function"&&this._animationMode!=="NoopAnimations"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{i.classList.add(n)})}):i.classList.add(n),i}_updateRenderedContent(i){let n=`${i??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(i){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!i||this._isHostInteractive())&&this._removeInlineDescription(),this._description=i,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,i):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(i){let n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),i&&n.add(`mat-badge-${i}`)}_clearExistingBadges(){let i=this._elementRef.nativeElement.querySelectorAll(`:scope > .${Xe}`);for(let n of Array.from(i))n!==this._badgeElement&&n.remove()}};e.\u0275fac=function(n){return new(n||e)(g(ce),g(re),g($e),g(de),g(le,8))},e.\u0275dir=ae({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,a){n&2&&z("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",V],disabled:[2,"matBadgeDisabled","disabled",V],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",V]},standalone:!0,features:[me]});let t=e;return t})(),tt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[je,Z,Z]});let t=e;return t})();function dt(t,e){if(t&1&&(N(0),l(1,"p",23),p(2),s(),A()),t&2){let o=c(3).$implicit;r(2),w(" ",o.Title," ")}}function ct(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function mt(t,e){if(t&1&&(l(0,"a",22),b(1,"i"),h(2,dt,3,1,"ng-container",20)(3,ct,2,1,"ng-template",null,1,R),s()),t&2){let o=L(4),i=c(2).$implicit;d("href",i.Url,se),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function pt(t,e){if(t&1&&(N(0),h(1,mt,5,5,"a",21),A()),t&2){let o=c().$implicit;r(),d("ngxPermissionsOnly",o.Roles)}}function gt(t,e){if(t&1&&(l(0,"p",23),p(1),s()),t&2){let o=c(4).$implicit;r(),w(" ",o.Title," ")}}function ht(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(4).$implicit;r(),y(o.Title)}}function ft(t,e){if(t&1&&(N(0),h(1,gt,2,1,"p",23),q(2,"async"),h(3,ht,2,1,"p"),A()),t&2){let o=c(4);r(),ge(Q(2,1,o.notifications$)!=0?1:3)}}function ut(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function _t(t,e){if(t&1&&(l(0,"a",25),b(1,"i"),h(2,ft,4,3,"ng-container",20)(3,ut,2,1,"ng-template",null,2,R),s()),t&2){let o=L(4),i=c(2).$implicit,n=c();d("matTooltip",n.isCollapseSidebar?i.Title:"")("routerLink",i.Url),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function bt(t,e){if(t&1&&h(0,_t,5,6,"a",24),t&2){let o=c().$implicit;d("ngxPermissionsOnly",o.Roles)}}function Ct(t,e){if(t&1&&(l(0,"li",19),h(1,pt,2,1,"ng-container",20)(2,bt,1,1,"ng-template",null,0,R),s()),t&2){let o=e.$implicit,i=L(3);r(),d("ngIf",o.ExternalLink)("ngIfElse",i)}}var it=(()=>{let e=class e{constructor(i,n,a,m){this.toggleSidebarService=i,this.notificationService=n,this.decodeTokenService=a,this.authService=m,this.Menu={},this.isCollapseSidebar=!1,this.token=a.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new j().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(k(i=>i.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(i){if(i){let n,a=i.split(" ");return a.length==1?n=a[0].substring(0,2):n=a.shift().charAt(0)+a.pop().charAt(0),n}}};e.\u0275fac=function(n){return new(n||e)(g(Ve),g(Ue),g(ze),g(Le))},e.\u0275cmp=v({type:e,selectors:[["app-menu"]],decls:23,vars:9,consts:[["DEFAULT_ROUTE",""],["NO_BADGE",""],["WITHOUT_BADGE",""],[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",4,"ngFor","ngForOf"],[1,"main-panel"],["routerLinkActive","active"],[4,"ngIf","ngIfElse"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(n,a){n&1&&(l(0,"div",3),q(1,"async"),l(2,"div",4)(3,"button",5),O("click",function(){return a.onCallapseSidebar()}),b(4,"i",6),s(),l(5,"div",7)(6,"div",8)(7,"a",9),p(8),s(),l(9,"div",10)(10,"div",11),p(11),s(),b(12,"div",12),l(13,"a",13),O("click",function(){return a.onLogout()}),b(14,"i",14),p(15,"\xA0 "),l(16,"span"),p(17," Log Out"),s()()()()(),l(18,"div",15)(19,"ul",16),h(20,Ct,4,2,"li",17),s()()(),l(21,"div",18),b(22,"router-outlet"),s()()),n&2&&(z("nav-open",Q(1,7,a.toggleState$)),r(2),d("ngClass",a.isCollapseSidebar?"collapses":""),r(2),d("ngClass",a.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),r(4),w(" ",a.storeName," "),r(3),w(" ",a.token==null?null:a.token.LID," "),r(9),d("ngForOf",a.Menu))},dependencies:[ye,Me,Se,Te,Oe,we,We,et,Ne,xe],styles:["@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let t=e;return t})();var vt=[{path:"",component:it,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",loadChildren:()=>import("./chunk-AN57DTS4.js").then(t=>t.DashboardModule),canActivate:[f],data:{title:"Dashboard"}},{path:"products",loadChildren:()=>import("./chunk-7KMBT32T.js").then(t=>t.ProductModule),canActivate:[f],data:{title:"Products"}},{path:"inventory",loadChildren:()=>import("./chunk-HDICR5JJ.js").then(t=>t.InventoryRoutingModule),canActivate:[f],data:{title:"Inventory"}},{path:"price",loadChildren:()=>import("./chunk-DJN3BFQ5.js").then(t=>t.PriceRoutingModule),canActivate:[f],data:{title:"Price"}},{path:"Order",loadChildren:()=>import("./chunk-FU3SO6X2.js").then(t=>t.OrdersModule),canActivate:[f],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-56HMEZKJ.js").then(t=>t.ReportModule),canActivate:[f],data:{title:"Report"}},{path:"Logistic",loadChildren:()=>import("./chunk-ILLBE7MA.js").then(t=>t.LogisticModule),canActivate:[f],data:{title:"Logistic"}},{path:"channel",loadChildren:()=>import("./chunk-5DUVNRSI.js").then(t=>t.ChannelsModule),canActivate:[f],data:{title:"Marketplace"}},{path:"log",loadChildren:()=>import("./chunk-TD7KGWBY.js").then(t=>t.LogsModule),canActivate:[f],data:{title:"Orders"}},{path:"notification",loadChildren:()=>import("./chunk-442UTXWT.js").then(t=>t.NotificationModule),canActivate:[f],data:{title:"Push Notification"}}]}],nt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[Y.forChild(vt),Y]});let t=e;return t})();var Mt=["selectId"];function St(t,e){if(t&1&&(l(0,"span",3),p(1),s()),t&2){let o=e.item,i=c();d("title",o[i.bindLabel]),r(),y(o[i.bindLabel])}}var at=(()=>{let e=class e{set items(i){this.ngSelectInfiniteScroll.data=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}get selected(){return this._selected}set selected(i){this._selected=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}constructor(){this.placeholder="",this.bindValue="",this.bindLabel="",this.width="100%",this.clearable=!0,this.parent="body",this.disabled=!1,this.optionTitle=!1,this._selected="",this.ngSelectInfiniteScroll=new K,this.selectedChange=new P,this.selectedLabel=new P,this.onOpen=new P}onOpenSelect(){this.onOpen.emit()}onSelectChange(i){i?(this.selectedChange.emit(i[this.bindValue]),this.selectedLabel.emit(i[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-select-infinite"]],viewQuery:function(n,a){if(n&1&&fe(Mt,7),n&2){let m;ue(m=_e())&&(a.ngSelectElement=m.first)}},inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",optionTitle:"optionTitle",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel",onOpen:"onOpen"},standalone:!0,features:[B],decls:3,vars:12,consts:[["selectId",""],[3,"clear","scrollToEnd","open","change","appendTo","disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable"],["ng-option-tmp",""],[3,"title"]],template:function(n,a){if(n&1){let m=he();l(0,"ng-select",1,0),O("clear",function(){return I(m),T(a.ngSelectInfiniteScroll.onClear())})("scrollToEnd",function(){return I(m),T(a.ngSelectInfiniteScroll.onScrollToEnd())})("open",function(){return I(m),T(a.onOpenSelect())})("change",function(C){return I(m),T(a.onSelectChange(C))}),h(2,St,2,2,"ng-template",2),s()}n&2&&(pe("width",a.width),d("appendTo",a.parent)("disabled",a.disabled)("virtualScroll",!0)("typeahead",a.ngSelectInfiniteScroll.input$)("items",a.ngSelectInfiniteScroll.bufferData)("bindLabel",a.bindLabel)("bindValue",a.bindValue)("placeholder",a.placeholder)("ngModel",a.selected)("clearable",a.clearable))},dependencies:[M,$,Re,Be,U,Ee,De]});let t=e;return t})(),K=class{constructor(){this._dataBuffer=[],this._data=[],this._input$=new H,this._destroy$=new H,this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(te(200),ie(),k(e=>(e&&(e=e.toLowerCase()),this.filterData(e))),ee(e=>e!==void 0),ne(this._destroy$)).subscribe(e=>{this._dataBuffer=e.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(e){let o=-1,i;return this._data.filter(a=>(i=JSON.stringify(a).toLowerCase(),o=i.indexOf(e),o!==-1||e==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(e){this._data=e||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(e,o){if(Ke.IsNotEmpty(e)){let i=this._data.filter(n=>n[o].toString().toLowerCase().indexOf(e)!==-1);this._dataBuffer=i.slice(0,this._bufferSize)}}set bufferSize(e){this._bufferSize=e}onScrollToEnd(){this.fetchMore()}fetchMore(){let e=this._dataBuffer.length,o=this._data.slice(e,this._bufferSize+e);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(o)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var ot=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[M,U,He,qe,Ze,Qe,Ye,Je,F,J,at,$,ke]});let t=e;return t})();var _n=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({providers:[Ie],imports:[M,nt,Ge,F,ot,tt,Ae.forChild()]});let t=e;return t})();export{_n as MenuModule};
1
+ import"./chunk-3OCV5XYQ.js";import{a as Ue}from"./chunk-Z4BGJOTF.js";import"./chunk-VS2ZOTGT.js";import{a as Ke}from"./chunk-6U6JR5K6.js";import{a as E}from"./chunk-BVIRHZTZ.js";import"./chunk-XGEX66UB.js";import"./chunk-HXV4FH6L.js";import{b as Je}from"./chunk-HPCPVA6F.js";import{c as Ze}from"./chunk-OURZMROU.js";import{b as Ye}from"./chunk-CHZBEIYE.js";import{c as qe}from"./chunk-KSTCUPYX.js";import{a as f}from"./chunk-QRSQP67K.js";import{g as Qe}from"./chunk-X54LLODL.js";import{a as Be,d as Re,e as $}from"./chunk-DDUQ3IZU.js";import{a as Pe,b as ze,g as Le}from"./chunk-BWVM6BFT.js";import"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{a as Ve,g as He,j as J,n as Ge}from"./chunk-SG42JTLJ.js";import{t as We,u as F}from"./chunk-BZ7SMYI7.js";import{F as je,K as Z,u as $e,x as Fe}from"./chunk-DRY23ALE.js";import{A as U,B as ke,h as Ee,m as De}from"./chunk-VFLG2BDB.js";import{e as Ne,f as Ae}from"./chunk-T4MH7AFK.js";import{$a as d,$b as Q,Ac as Ie,B as ee,Cb as fe,Da as le,Db as ue,Dc as M,Eb as _e,H as te,Ha as se,Hb as L,Ia as r,Ib as p,Ja as g,Jb as y,K as ie,Kb as w,Oa as de,Pa as ce,Qb as B,V as ne,Vc as Te,Xc as Oe,Ya as me,Yc as we,Za as h,Zc as Y,_b as q,aa as u,ab as pe,bb as z,bc as R,c as H,da as x,db as G,ga as v,gb as ge,gc as be,ha as _,ia as ae,kc as V,la as oe,lb as l,mb as s,nb as b,oa as I,ob as N,pa as T,pb as A,pc as Ce,q as k,rb as he,rc as ve,tc as ye,ub as O,vc as Me,wb as c,wc as Se,ya as re,za as P,zc as xe}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var j=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[E.dashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/Order",Roles:[E.orderView]},{Icon:"fas fa-clipboard-list",Title:"Sync Log",Url:"/menu/sync-log",Roles:[E.orderView]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[E.channelView]},{Icon:"fas fa-file-alt",Title:"Logs",Url:"/menu/log",Roles:[]},{Icon:"fas fa-bell",Title:"Notification",Url:"/menu/notification",Badge:!0,Roles:[]},{Icon:"fa-solid fa-wand-magic-sparkles",Title:"What`s New",Url:`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${Pe.version}`,ExternalLink:!0,CustomColor:"#ff2323",Badge:!0,Roles:[]}]}get getMenu(){return this.menus}};var rt=0,Xe="mat-badge-content",W=new Set,lt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-component"]],standalone:!0,features:[B],decls:0,vars:0,template:function(n,a){},styles:[".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color);color:var(--mat-badge-text-color);font-family:var(--mat-badge-text-font);font-weight:var(--mat-badge-text-weight);border-radius:var(--mat-badge-container-shape)}.cdk-high-contrast-active .mat-badge-content{outline:solid 1px;border-radius:0}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color)}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, unset);min-height:var(--mat-badge-small-size-container-size, unset);line-height:var(--mat-badge-legacy-small-size-container-size, var(--mat-badge-small-size-container-size));padding:var(--mat-badge-small-size-container-padding);font-size:var(--mat-badge-small-size-text-size);margin:var(--mat-badge-small-size-container-offset)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, unset);min-height:var(--mat-badge-container-size, unset);line-height:var(--mat-badge-legacy-container-size, var(--mat-badge-container-size));padding:var(--mat-badge-container-padding);font-size:var(--mat-badge-text-size);margin:var(--mat-badge-container-offset)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, unset);min-height:var(--mat-badge-large-size-container-size, unset);line-height:var(--mat-badge-legacy-large-size-container-size, var(--mat-badge-large-size-container-size));padding:var(--mat-badge-large-size-container-padding);font-size:var(--mat-badge-large-size-text-size);margin:var(--mat-badge-large-size-container-offset)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset)}"],encapsulation:2,changeDetection:0});let t=e;return t})(),et=(()=>{let e=class e{get color(){return this._color}set color(i){this._setColor(i),this._color=i}get content(){return this._content}set content(i){this._updateRenderedContent(i)}get description(){return this._description}set description(i){this._updateDescription(i)}constructor(i,n,a,m,S){this._ngZone=i,this._elementRef=n,this._ariaDescriber=a,this._renderer=m,this._animationMode=S,this._color="primary",this.overlap=!0,this.position="above after",this.size="medium",this._id=rt++,this._isInitialized=!1,this._interactivityChecker=x(Fe),this._document=x(ve);let C=x(be);if(!W.has(C)){W.add(C);let X=Ce(lt,{environmentInjector:x(oe)});C.onDestroy(()=>{W.delete(C),W.size===0&&X.destroy()})}}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let i=this._renderer.createElement("span"),n="mat-badge-active";return i.setAttribute("id",`mat-badge-content-${this._id}`),i.setAttribute("aria-hidden","true"),i.classList.add(Xe),this._animationMode==="NoopAnimations"&&i.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(i),typeof requestAnimationFrame=="function"&&this._animationMode!=="NoopAnimations"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{i.classList.add(n)})}):i.classList.add(n),i}_updateRenderedContent(i){let n=`${i??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(i){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!i||this._isHostInteractive())&&this._removeInlineDescription(),this._description=i,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,i):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(i){let n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),i&&n.add(`mat-badge-${i}`)}_clearExistingBadges(){let i=this._elementRef.nativeElement.querySelectorAll(`:scope > .${Xe}`);for(let n of Array.from(i))n!==this._badgeElement&&n.remove()}};e.\u0275fac=function(n){return new(n||e)(g(ce),g(re),g($e),g(de),g(le,8))},e.\u0275dir=ae({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,a){n&2&&z("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",V],disabled:[2,"matBadgeDisabled","disabled",V],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",V]},standalone:!0,features:[me]});let t=e;return t})(),tt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[je,Z,Z]});let t=e;return t})();function dt(t,e){if(t&1&&(N(0),l(1,"p",23),p(2),s(),A()),t&2){let o=c(3).$implicit;r(2),w(" ",o.Title," ")}}function ct(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function mt(t,e){if(t&1&&(l(0,"a",22),b(1,"i"),h(2,dt,3,1,"ng-container",20)(3,ct,2,1,"ng-template",null,1,R),s()),t&2){let o=L(4),i=c(2).$implicit;d("href",i.Url,se),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function pt(t,e){if(t&1&&(N(0),h(1,mt,5,5,"a",21),A()),t&2){let o=c().$implicit;r(),d("ngxPermissionsOnly",o.Roles)}}function gt(t,e){if(t&1&&(l(0,"p",23),p(1),s()),t&2){let o=c(4).$implicit;r(),w(" ",o.Title," ")}}function ht(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(4).$implicit;r(),y(o.Title)}}function ft(t,e){if(t&1&&(N(0),h(1,gt,2,1,"p",23),q(2,"async"),h(3,ht,2,1,"p"),A()),t&2){let o=c(4);r(),ge(Q(2,1,o.notifications$)!=0?1:3)}}function ut(t,e){if(t&1&&(l(0,"p"),p(1),s()),t&2){let o=c(3).$implicit;r(),y(o.Title)}}function _t(t,e){if(t&1&&(l(0,"a",25),b(1,"i"),h(2,ft,4,3,"ng-container",20)(3,ut,2,1,"ng-template",null,2,R),s()),t&2){let o=L(4),i=c(2).$implicit,n=c();d("matTooltip",n.isCollapseSidebar?i.Title:"")("routerLink",i.Url),r(),G(i.Icon),r(),d("ngIf",i.Badge)("ngIfElse",o)}}function bt(t,e){if(t&1&&h(0,_t,5,6,"a",24),t&2){let o=c().$implicit;d("ngxPermissionsOnly",o.Roles)}}function Ct(t,e){if(t&1&&(l(0,"li",19),h(1,pt,2,1,"ng-container",20)(2,bt,1,1,"ng-template",null,0,R),s()),t&2){let o=e.$implicit,i=L(3);r(),d("ngIf",o.ExternalLink)("ngIfElse",i)}}var it=(()=>{let e=class e{constructor(i,n,a,m){this.toggleSidebarService=i,this.notificationService=n,this.decodeTokenService=a,this.authService=m,this.Menu={},this.isCollapseSidebar=!1,this.token=a.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new j().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(k(i=>i.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(i){if(i){let n,a=i.split(" ");return a.length==1?n=a[0].substring(0,2):n=a.shift().charAt(0)+a.pop().charAt(0),n}}};e.\u0275fac=function(n){return new(n||e)(g(Ve),g(Ue),g(ze),g(Le))},e.\u0275cmp=v({type:e,selectors:[["app-menu"]],decls:23,vars:9,consts:[["DEFAULT_ROUTE",""],["NO_BADGE",""],["WITHOUT_BADGE",""],[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",4,"ngFor","ngForOf"],[1,"main-panel"],["routerLinkActive","active"],[4,"ngIf","ngIfElse"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(n,a){n&1&&(l(0,"div",3),q(1,"async"),l(2,"div",4)(3,"button",5),O("click",function(){return a.onCallapseSidebar()}),b(4,"i",6),s(),l(5,"div",7)(6,"div",8)(7,"a",9),p(8),s(),l(9,"div",10)(10,"div",11),p(11),s(),b(12,"div",12),l(13,"a",13),O("click",function(){return a.onLogout()}),b(14,"i",14),p(15,"\xA0 "),l(16,"span"),p(17," Log Out"),s()()()()(),l(18,"div",15)(19,"ul",16),h(20,Ct,4,2,"li",17),s()()(),l(21,"div",18),b(22,"router-outlet"),s()()),n&2&&(z("nav-open",Q(1,7,a.toggleState$)),r(2),d("ngClass",a.isCollapseSidebar?"collapses":""),r(2),d("ngClass",a.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),r(4),w(" ",a.storeName," "),r(3),w(" ",a.token==null?null:a.token.LID," "),r(9),d("ngForOf",a.Menu))},dependencies:[ye,Me,Se,Te,Oe,we,We,et,Ne,xe],styles:["@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let t=e;return t})();var vt=[{path:"",component:it,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",loadChildren:()=>import("./chunk-AN57DTS4.js").then(t=>t.DashboardModule),canActivate:[f],data:{title:"Dashboard"}},{path:"products",loadChildren:()=>import("./chunk-PED3UNE6.js").then(t=>t.ProductModule),canActivate:[f],data:{title:"Products"}},{path:"inventory",loadChildren:()=>import("./chunk-BNZ3QXNI.js").then(t=>t.InventoryRoutingModule),canActivate:[f],data:{title:"Inventory"}},{path:"price",loadChildren:()=>import("./chunk-DPNIWGU4.js").then(t=>t.PriceRoutingModule),canActivate:[f],data:{title:"Price"}},{path:"Order",loadChildren:()=>import("./chunk-KWJMZUFP.js").then(t=>t.OrdersModule),canActivate:[f],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-7KOJ3DFL.js").then(t=>t.ReportModule),canActivate:[f],data:{title:"Report"}},{path:"Logistic",loadChildren:()=>import("./chunk-SJZYEO7J.js").then(t=>t.LogisticModule),canActivate:[f],data:{title:"Logistic"}},{path:"channel",loadChildren:()=>import("./chunk-FIKLTG2J.js").then(t=>t.ChannelsModule),canActivate:[f],data:{title:"Marketplace"}},{path:"log",loadChildren:()=>import("./chunk-B6YCFV4S.js").then(t=>t.LogsModule),canActivate:[f],data:{title:"Orders"}},{path:"notification",loadChildren:()=>import("./chunk-MJY3XQ7R.js").then(t=>t.NotificationModule),canActivate:[f],data:{title:"Push Notification"}}]}],nt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[Y.forChild(vt),Y]});let t=e;return t})();var Mt=["selectId"];function St(t,e){if(t&1&&(l(0,"span",3),p(1),s()),t&2){let o=e.item,i=c();d("title",o[i.bindLabel]),r(),y(o[i.bindLabel])}}var at=(()=>{let e=class e{set items(i){this.ngSelectInfiniteScroll.data=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}get selected(){return this._selected}set selected(i){this._selected=i,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}constructor(){this.placeholder="",this.bindValue="",this.bindLabel="",this.width="100%",this.clearable=!0,this.parent="body",this.disabled=!1,this.optionTitle=!1,this._selected="",this.ngSelectInfiniteScroll=new K,this.selectedChange=new P,this.selectedLabel=new P,this.onOpen=new P}onOpenSelect(){this.onOpen.emit()}onSelectChange(i){i?(this.selectedChange.emit(i[this.bindValue]),this.selectedLabel.emit(i[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=v({type:e,selectors:[["ng-select-infinite"]],viewQuery:function(n,a){if(n&1&&fe(Mt,7),n&2){let m;ue(m=_e())&&(a.ngSelectElement=m.first)}},inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",optionTitle:"optionTitle",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel",onOpen:"onOpen"},standalone:!0,features:[B],decls:3,vars:12,consts:[["selectId",""],[3,"clear","scrollToEnd","open","change","appendTo","disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable"],["ng-option-tmp",""],[3,"title"]],template:function(n,a){if(n&1){let m=he();l(0,"ng-select",1,0),O("clear",function(){return I(m),T(a.ngSelectInfiniteScroll.onClear())})("scrollToEnd",function(){return I(m),T(a.ngSelectInfiniteScroll.onScrollToEnd())})("open",function(){return I(m),T(a.onOpenSelect())})("change",function(C){return I(m),T(a.onSelectChange(C))}),h(2,St,2,2,"ng-template",2),s()}n&2&&(pe("width",a.width),d("appendTo",a.parent)("disabled",a.disabled)("virtualScroll",!0)("typeahead",a.ngSelectInfiniteScroll.input$)("items",a.ngSelectInfiniteScroll.bufferData)("bindLabel",a.bindLabel)("bindValue",a.bindValue)("placeholder",a.placeholder)("ngModel",a.selected)("clearable",a.clearable))},dependencies:[M,$,Re,Be,U,Ee,De]});let t=e;return t})(),K=class{constructor(){this._dataBuffer=[],this._data=[],this._input$=new H,this._destroy$=new H,this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(te(200),ie(),k(e=>(e&&(e=e.toLowerCase()),this.filterData(e))),ee(e=>e!==void 0),ne(this._destroy$)).subscribe(e=>{this._dataBuffer=e.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(e){let o=-1,i;return this._data.filter(a=>(i=JSON.stringify(a).toLowerCase(),o=i.indexOf(e),o!==-1||e==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(e){this._data=e||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(e,o){if(Ke.IsNotEmpty(e)){let i=this._data.filter(n=>n[o].toString().toLowerCase().indexOf(e)!==-1);this._dataBuffer=i.slice(0,this._bufferSize)}}set bufferSize(e){this._bufferSize=e}onScrollToEnd(){this.fetchMore()}fetchMore(){let e=this._dataBuffer.length,o=this._data.slice(e,this._bufferSize+e);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(o)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var ot=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({imports:[M,U,He,qe,Ze,Qe,Ye,Je,F,J,at,$,ke]});let t=e;return t})();var _n=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=_({type:e}),e.\u0275inj=u({providers:[Ie],imports:[M,nt,Ge,F,ot,tt,Ae.forChild()]});let t=e;return t})();export{_n as MenuModule};
@@ -1,4 +1,4 @@
1
- import{a as ue}from"./chunk-FQ72DFEO.js";import"./chunk-6U6JR5K6.js";import{a as Mi}from"./chunk-BVIRHZTZ.js";import{a as be,b as xe,c as Yi}from"./chunk-TC5L2L6N.js";import{a as Se}from"./chunk-43L7CBSZ.js";import{b as nn}from"./chunk-YXUEYLE5.js";import"./chunk-T3POIC5F.js";import"./chunk-V6PMZ6DL.js";import{a as rn,b as on,c as ln,d as sn,e as pn,f as cn,g as dn}from"./chunk-B42KSOUB.js";import"./chunk-K66EVMAU.js";import{a as ji,b as Ui}from"./chunk-OKB4Q376.js";import{a as Be,b as mn,c as Ct,d as un,e as hn,f as _n,g as Rt,h as vt,i as De,k as b,l as gn,m as rt,n as Qt,o as Jt,p as Ht,q as fn,r as Cn,s as Xt,t as Wt,u as vn}from"./chunk-F4FACWQU.js";import"./chunk-INOCIPFW.js";import{a as yn,b as bn}from"./chunk-HPCPVA6F.js";import{a as we,b as zi}from"./chunk-3HQCLIMJ.js";import{f as Qi,g as Ji,h as Xi,i as en,j as tn}from"./chunk-ITTQVZJZ.js";import{a as Zi}from"./chunk-UUI7T7NV.js";import"./chunk-OURZMROU.js";import{a as me}from"./chunk-AKI6ACKF.js";import{b as an}from"./chunk-AXDEQQNM.js";import{b as qi}from"./chunk-CHZBEIYE.js";import{a as Gi,b as Ki,c as $i}from"./chunk-KSTCUPYX.js";import{a as Ae}from"./chunk-L7OZWIEI.js";import"./chunk-A3ZMDUMP.js";import"./chunk-X54LLODL.js";import{a as ve,b as ye,c as Vi,d as de,e as Oi}from"./chunk-DDUQ3IZU.js";import{f as Pe,g as ce}from"./chunk-ZHLEQV6S.js";import{b as nt,e as q}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{b as Ai,d as at,e as Bi,f as Ri,g as Hi,m as re,n as Wi}from"./chunk-SG42JTLJ.js";import{t as Fi,u as Li}from"./chunk-BZ7SMYI7.js";import{P as Ni}from"./chunk-DRY23ALE.js";import{A as Bt,a as Ii,b as At,c as pe,h as ee,m as te,o as Ce}from"./chunk-VFLG2BDB.js";import{b as F,c as A}from"./chunk-T4MH7AFK.js";import{$ as He,$a as m,$b as z,Ab as xi,Ac as G,B as mi,Bb as Mt,Cb as Et,Cc as se,Db as Ke,Dc as Ee,Eb as $e,Ha as j,Hb as Y,Ia as s,Ib as c,Ja as w,Jb as y,Kb as k,Lb as wi,Mb as I,Nb as M,Oa as fi,Ob as E,Pa as Ci,Pb as Pt,Q as Ge,Qb as ge,Rb as le,Sb as ne,T as ui,Tb as J,Ua as vi,Uc as Ft,Vc as ki,Wa as tt,Wb as Si,X as Xe,Xb as Ti,Xc as fe,Ya as ht,Za as f,Zc as Lt,_ as hi,_a as B,_b as N,aa as We,ab as yi,ac as X,ad as Ei,bb as kt,bc as ae,bd as gt,ca as Ie,db as _e,ed as qe,fd as Pi,ga as L,gb as Zt,ha as Ye,hd as ft,ia as _i,jc as Di,kc as O,lb as r,lc as Me,mb as o,na as gi,nb as C,oa as h,ob as S,pa as _,pb as T,q as ie,qa as Fe,qb as Le,ra as qt,rb as D,rc as Vt,sa as et,tc as ze,ub as v,vc as $,w as di,wb as p,wc as U,xb as It,xc as Ot,ya as ut,yb as _t,yc as Nt,za as Q,zb as bi,zc as it}from"./chunk-IH2NT4RC.js";import{a as pi,b as ci}from"./chunk-GNOSNGXM.js";var xn=(()=>{let l=class l{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[Mi.downloadOrder]}]}ngOnInit(){}};l.\u0275fac=function(i){return new(i||l)},l.\u0275cmp=L({type:l,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(i,n){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),o()()(),C(4,"router-outlet")),i&2&&(s(3),m("Tabs",n.ObjectOrderTabs)("usePermissions",!0))},dependencies:[ji,ki]});let a=l;return a})();var wn=(()=>{let l=class l{constructor(){}convertToCSV(t,i){let n;if(typeof t=="string")n=t;else{var d=typeof t=="object"?t:JSON.parse(t);n=this.transformToCSVStringFormat(d)}this.downloadCSV(n,i)}transformToCSVStringFormat(t){if(!t||!t.length)return;let i=",",n=Object.keys(t[0]);return t.map(g=>n.map(u=>{let x=g[u]===null||g[u]===void 0?"":g[u];return x=x instanceof Date?x.toLocaleString():x.toString().replace(/"/g,'""'),x.search(/("|,|\n)/g)>=0&&(x=`"${x}"`),x}).join(i)).join(`
1
+ import{a as ue}from"./chunk-FQ72DFEO.js";import"./chunk-6U6JR5K6.js";import{a as Mi}from"./chunk-BVIRHZTZ.js";import{a as be,b as xe,c as Yi}from"./chunk-TC5L2L6N.js";import{a as Se}from"./chunk-43L7CBSZ.js";import{b as nn}from"./chunk-YXUEYLE5.js";import"./chunk-T3POIC5F.js";import"./chunk-V6PMZ6DL.js";import{a as rn,b as on,c as ln,d as sn,e as pn,f as cn,g as dn}from"./chunk-B42KSOUB.js";import"./chunk-K66EVMAU.js";import{a as ji,b as Ui}from"./chunk-OKB4Q376.js";import{a as Be,b as mn,c as Ct,d as un,e as hn,f as _n,g as Rt,h as vt,i as De,k as b,l as gn,m as rt,n as Qt,o as Jt,p as Ht,q as fn,r as Cn,s as Xt,t as Wt,u as vn}from"./chunk-F4FACWQU.js";import"./chunk-INOCIPFW.js";import{a as yn,b as bn}from"./chunk-HPCPVA6F.js";import{a as we,b as zi}from"./chunk-3HQCLIMJ.js";import{f as Qi,g as Ji,h as Xi,i as en,j as tn}from"./chunk-ITTQVZJZ.js";import{a as Zi}from"./chunk-UUI7T7NV.js";import"./chunk-OURZMROU.js";import{a as me}from"./chunk-AKI6ACKF.js";import{b as an}from"./chunk-AXDEQQNM.js";import{b as qi}from"./chunk-CHZBEIYE.js";import{a as Gi,b as Ki,c as $i}from"./chunk-KSTCUPYX.js";import{a as Ae}from"./chunk-QRSQP67K.js";import"./chunk-A3ZMDUMP.js";import"./chunk-X54LLODL.js";import{a as ve,b as ye,c as Vi,d as de,e as Oi}from"./chunk-DDUQ3IZU.js";import{f as Pe,g as ce}from"./chunk-BWVM6BFT.js";import{b as nt,e as q}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{b as Ai,d as at,e as Bi,f as Ri,g as Hi,m as re,n as Wi}from"./chunk-SG42JTLJ.js";import{t as Fi,u as Li}from"./chunk-BZ7SMYI7.js";import{P as Ni}from"./chunk-DRY23ALE.js";import{A as Bt,a as Ii,b as At,c as pe,h as ee,m as te,o as Ce}from"./chunk-VFLG2BDB.js";import{b as F,c as A}from"./chunk-T4MH7AFK.js";import{$ as He,$a as m,$b as z,Ab as xi,Ac as G,B as mi,Bb as Mt,Cb as Et,Cc as se,Db as Ke,Dc as Ee,Eb as $e,Ha as j,Hb as Y,Ia as s,Ib as c,Ja as w,Jb as y,Kb as k,Lb as wi,Mb as I,Nb as M,Oa as fi,Ob as E,Pa as Ci,Pb as Pt,Q as Ge,Qb as ge,Rb as le,Sb as ne,T as ui,Tb as J,Ua as vi,Uc as Ft,Vc as ki,Wa as tt,Wb as Si,X as Xe,Xb as Ti,Xc as fe,Ya as ht,Za as f,Zc as Lt,_ as hi,_a as B,_b as N,aa as We,ab as yi,ac as X,ad as Ei,bb as kt,bc as ae,bd as gt,ca as Ie,db as _e,ed as qe,fd as Pi,ga as L,gb as Zt,ha as Ye,hd as ft,ia as _i,jc as Di,kc as O,lb as r,lc as Me,mb as o,na as gi,nb as C,oa as h,ob as S,pa as _,pb as T,q as ie,qa as Fe,qb as Le,ra as qt,rb as D,rc as Vt,sa as et,tc as ze,ub as v,vc as $,w as di,wb as p,wc as U,xb as It,xc as Ot,ya as ut,yb as _t,yc as Nt,za as Q,zb as bi,zc as it}from"./chunk-IH2NT4RC.js";import{a as pi,b as ci}from"./chunk-GNOSNGXM.js";var xn=(()=>{let l=class l{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[Mi.downloadOrder]}]}ngOnInit(){}};l.\u0275fac=function(i){return new(i||l)},l.\u0275cmp=L({type:l,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(i,n){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),o()()(),C(4,"router-outlet")),i&2&&(s(3),m("Tabs",n.ObjectOrderTabs)("usePermissions",!0))},dependencies:[ji,ki]});let a=l;return a})();var wn=(()=>{let l=class l{constructor(){}convertToCSV(t,i){let n;if(typeof t=="string")n=t;else{var d=typeof t=="object"?t:JSON.parse(t);n=this.transformToCSVStringFormat(d)}this.downloadCSV(n,i)}transformToCSVStringFormat(t){if(!t||!t.length)return;let i=",",n=Object.keys(t[0]);return t.map(g=>n.map(u=>{let x=g[u]===null||g[u]===void 0?"":g[u];return x=x instanceof Date?x.toLocaleString():x.toString().replace(/"/g,'""'),x.search(/("|,|\n)/g)>=0&&(x=`"${x}"`),x}).join(i)).join(`
2
2
  `)}downloadCSV(t,i){var n=new Blob([t],{type:"text/csv;charset=utf8;"}),d=document.createElement("a");d.setAttribute("href",window.URL.createObjectURL(n)),d.setAttribute("download",i),document.body.appendChild(d),d.click(),document.body.removeChild(d)}};l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=He({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var ot=(()=>{let l=class l{constructor(t,i){this.http=t,this.exportService=i}loadInitialPage(){return this.http.post("/api/ordersLoader/GetOrder",{})}getNewOrders(t){return this.http.post("/api/orders/GetNewOrder",t).pipe(ie(i=>i.Data))}getTotalNewOrders(t,i,n){let d={ListChannelID:t,From:i,To:n};return this.http.post("/api/orders/GetCountNewOrder",d).pipe(ie(g=>g.Count))}exportOrders(t,i){return this.http.post("api/Orders/ExportOrder",t).pipe(Xe(n=>{this.exportService.convertToCSV(n,i)}))}};l.\u0275fac=function(i){return new(i||l)(Ie(q),Ie(wn))},l.\u0275prov=He({token:l,factory:l.\u0275fac});let a=l;return a})();var Yt=(()=>{let l=class l{constructor(t,i){this.http=t,this.toastr=i}acceptTokopediaOrders(t){return this.http.post("/api/Orders/AcceptOrderTokopedia",t).pipe(Xe(i=>{this.tokopediaAcceptOrderHandler(i)}))}tokopediaAcceptOrderHandler(t){let i=t.filter(d=>d.Status==!1),n=t.filter(d=>d.Status==!0);if(i.length==0&&n.length>0){let d=`<ol>${this.generateSuccessMessage(n)}</ol>`;this.toastr.success(d,"Success",{enableHtml:!0})}else if(i.length>0&&n.length>0){let d=`<ol>
3
3
  ${this.generateSuccessMessage(n)}
4
4
  ${this.generateErrorMessage(i)}
@@ -1 +1 @@
1
- import{a as B}from"./chunk-SLBTXHYH.js";import{a as vt}from"./chunk-7KG3DC5J.js";import{a as $}from"./chunk-6JF7HXB4.js";import{a as st,b as ft,d as ut,e as gt}from"./chunk-DDUQ3IZU.js";import{g as dt}from"./chunk-ZHLEQV6S.js";import{e as pt}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{m as k,n as ht}from"./chunk-SG42JTLJ.js";import"./chunk-BZ7SMYI7.js";import"./chunk-DRY23ALE.js";import{A as mt,h as rt,m as lt}from"./chunk-VFLG2BDB.js";import{c as ct}from"./chunk-T4MH7AFK.js";import{$a as p,$b as _,Ac as M,Cc as P,Dc as L,Ga as W,Ha as H,Hb as K,Ia as m,Ib as l,Ja as v,Jb as d,Kb as x,Mb as Q,Nb as X,Ob as Y,Q as j,Rb as Z,Sb as tt,T as q,Tb as et,Uc as at,V as U,Xc as F,Za as u,Zc as R,_b as s,aa as I,ac as S,bc as it,c as z,ga as y,ha as b,lb as r,mb as o,nb as D,oa as N,ob as g,pa as E,pb as h,q as C,rb as G,tc as nt,ub as V,vc as ot,wb as f,wc as T,zb as J,zc as w}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var Et=(t,e)=>({"bg-gradient-danger":t,"bg-gradient-warning":e}),Dt=()=>["/menu/notification/detail"],Tt=t=>({ID:t});function wt(t,e){if(t&1&&(r(0,"span",14),D(1,"img",15),o(),l(2)),t&2){let n=e.item;m(),p("src",n.Img,H)("alt",n.Name),m(),x(" ",n.Name," ")}}function Mt(t,e){if(t&1&&(g(0),l(1),s(2,"number"),r(3,"span"),l(4,"s"),o(),h()),t&2){let n=f().$implicit;m(),x(" ",S(2,1,n.DurationInSecond,"1.1-1")," ")}}function Pt(t,e){t&1&&l(0," - ")}function Lt(t,e){if(t&1&&(g(0),r(1,"tr",16)(2,"td")(3,"a",17),D(4,"img",18),r(5,"span"),l(6),o()()(),r(7,"td")(8,"b"),l(9),o(),D(10,"div",19),o(),r(11,"td"),u(12,Mt,5,4,"ng-container",20)(13,Pt,1,0,"ng-template",null,0,it),o(),r(15,"td"),l(16),o(),r(17,"td"),l(18),s(19,"date"),o()(),h()),t&2){let n=e.$implicit,a=K(14);m(),p("ngClass",et(14,Et,n.Status==1,n.Status==0)),m(2),p("routerLink",Z(17,Dt))("queryParams",tt(18,Tt,n.ID)),m(),J("src",n.Img,H),m(2),d(n.Name),m(3),d(n.Label),m(),p("innerHTML",n.Message,W),m(2),p("ngIf",n.DurationInSecond)("ngIfElse",a),m(4),d(n.StatusLabel),m(2),d(S(19,11,n.Created,"dd MMM yyyy HH:mm"))}}function Ft(t,e){if(t&1){let n=G();g(0),r(1,"div",6)(2,"div",21)(3,"app-custom-paginator",22),s(4,"async"),s(5,"async"),V("total",function(){N(n);let i=f(2);return E(i.getRowCount())})("next",function(){N(n);let i=f(2);return E(i.getNotifications())})("previous",function(){N(n);let i=f(2);return E(i.getNotifications())}),o()()(),h()}if(t&2){let n=f().ngIf,a=f();m(3),p("filter",a.filter)("totaldata",n==null?null:n.length)("paginationTotal",_(4,4,a.rowCount$))("hasClicked",_(5,6,a.rowCount$))}}function Rt(t,e){if(t&1&&(g(0),u(1,Ft,6,8,"ng-container",13),h()),t&2){let n=e.ngIf;m(),p("ngIf",n.length>0)}}var _t=(()=>{let e=class e{constructor(a,i,c){this.http=a,this.notificationService=i,this.authService=c,this.filter=new vt,this.destroy$=new z,this.channelOptions=c.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(U(this.destroy$)).subscribe(a=>{a.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(a=>{this.filter=a.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let a={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",a).pipe(C(i=>i.Data),C(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),j(1))}setTimeToSecond(a){return a=a.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),a}setChannelLogoToNotifications(a){return a=a.map(i=>(i.Img=ct.getChannelLogoByTypeId(i.TypeID),i)),a}getRowCount(){let a={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",a).pipe(C(i=>i.Count),j(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(v(pt),v(B),v(dt))},e.\u0275cmp=y({type:e,selectors:[["app-notification"]],decls:30,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(i,c){i&1&&(r(0,"mainpanel",1),V("onSubmit",function(){return c.onFilter()}),r(1,"filters")(2,"div")(3,"h6",2),l(4,"Channel"),o(),r(5,"ng-select",3),Y("ngModelChange",function(O){return X(c.filter.ChannelID,O)||(c.filter.ChannelID=O),O}),u(6,wt,3,3,"ng-template",4),o()()(),r(7,"content")(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11)(15,"th"),l(16,"Channel"),o(),r(17,"th"),l(18,"Process"),o(),r(19,"th"),l(20,"Duration"),o(),r(21,"th"),l(22,"Status"),o(),r(23,"th"),l(24,"Created"),o()()(),r(25,"tbody"),u(26,Lt,20,20,"ng-container",12),s(27,"async"),o()()()()(),u(28,Rt,2,1,"ng-container",13),s(29,"async"),o()()()),i&2&&(m(5),p("clearable",!0)("items",c.channelOptions),Q("ngModel",c.filter.ChannelID),m(21),p("ngForOf",_(27,5,c.notifications$)),m(2),p("ngIf",_(29,7,c.notifications$)))},dependencies:[nt,ot,T,ut,st,ft,rt,lt,k,F,$,w,P,M]});let t=e;return t})();function Bt(t,e){if(t&1&&(r(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),l(4,"Perflog"),o()(),r(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),l(9),o()()()()()()),t&2){let n=f().ngIf;m(9),d(n.Perflog)}}function kt(t,e){if(t&1&&(g(0),r(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),l(5,"StackTrace"),o()(),r(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),l(10),o()()()()()(),h()),t&2){let n=f().ngIf;m(10),d(n==null?null:n.StackTrace)}}function $t(t,e){if(t&1&&(g(0),r(1,"mainpanel",1)(2,"actions")(3,"a",2),l(4,"Back"),o()(),r(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),l(12,"General"),o()(),r(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),l(18,"Created Date"),o(),r(19,"div")(20,"span"),l(21),s(22,"date"),o()()()(),r(23,"div",10)(24,"div",11)(25,"label"),l(26,"Status"),o(),r(27,"div")(28,"span"),l(29),o()()()()(),r(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),l(34,"Duration"),o(),r(35,"div")(36,"span"),l(37),s(38,"number"),o()()()(),r(39,"div",10)(40,"div",11)(41,"label"),l(42,"Label"),o(),r(43,"div")(44,"span"),l(45),o()()()()()()()()(),r(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),l(51,"Message"),o()(),r(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),l(56),o()()()()()(),u(57,Bt,10,1,"div",16)(58,kt,11,1,"ng-container",0),o()()()(),h()),t&2){let n=e.ngIf;m(),p("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),m(20),d(S(22,10,n.Created,"dd MMM yyyy HH:mm:ss")),m(8),d(n.StatusLabel),m(8),x("",S(38,13,n.DurationInSecond,"1.1-1")," s"),m(8),d(n.Label),m(11),d(n.Message),m(),p("ngIf",n==null?null:n.Perflog),m(),p("ngIf",n==null?null:n.StackTrace)}}var Ct=(()=>{let e=class e{constructor(a,i){this.activatedRoute=a,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(q(a=>{let i=a.ID;return this.notificationService.getNotificationDetail(i).pipe(C(c=>(c.DurationInSecond=parseInt(c.Duration)/1e3,c)))}))}};e.\u0275fac=function(i){return new(i||e)(v(at),v(B))},e.\u0275cmp=y({type:e,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,c){i&1&&(u(0,$t,59,16,"ng-container",0),s(1,"async")),i&2&&p("ngIf",_(1,1,c.notification$))},dependencies:[T,k,F,w,P,M]});let t=e;return t})();var Ot=[{path:"",component:_t},{path:"detail",component:Ct}],St=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=b({type:e}),e.\u0275inj=I({imports:[L,R.forChild(Ot)]});let t=e;return t})();var se=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=b({type:e}),e.\u0275inj=I({imports:[L,St,gt,mt,ht,R,$]});let t=e;return t})();export{se as NotificationModule};
1
+ import{a as B}from"./chunk-Z4BGJOTF.js";import{a as vt}from"./chunk-7KG3DC5J.js";import{a as $}from"./chunk-6JF7HXB4.js";import{a as st,b as ft,d as ut,e as gt}from"./chunk-DDUQ3IZU.js";import{g as dt}from"./chunk-BWVM6BFT.js";import{e as pt}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{m as k,n as ht}from"./chunk-SG42JTLJ.js";import"./chunk-BZ7SMYI7.js";import"./chunk-DRY23ALE.js";import{A as mt,h as rt,m as lt}from"./chunk-VFLG2BDB.js";import{c as ct}from"./chunk-T4MH7AFK.js";import{$a as p,$b as _,Ac as M,Cc as P,Dc as L,Ga as W,Ha as H,Hb as K,Ia as m,Ib as l,Ja as v,Jb as d,Kb as x,Mb as Q,Nb as X,Ob as Y,Q as j,Rb as Z,Sb as tt,T as q,Tb as et,Uc as at,V as U,Xc as F,Za as u,Zc as R,_b as s,aa as I,ac as S,bc as it,c as z,ga as y,ha as b,lb as r,mb as o,nb as D,oa as N,ob as g,pa as E,pb as h,q as C,rb as G,tc as nt,ub as V,vc as ot,wb as f,wc as T,zb as J,zc as w}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var Et=(t,e)=>({"bg-gradient-danger":t,"bg-gradient-warning":e}),Dt=()=>["/menu/notification/detail"],Tt=t=>({ID:t});function wt(t,e){if(t&1&&(r(0,"span",14),D(1,"img",15),o(),l(2)),t&2){let n=e.item;m(),p("src",n.Img,H)("alt",n.Name),m(),x(" ",n.Name," ")}}function Mt(t,e){if(t&1&&(g(0),l(1),s(2,"number"),r(3,"span"),l(4,"s"),o(),h()),t&2){let n=f().$implicit;m(),x(" ",S(2,1,n.DurationInSecond,"1.1-1")," ")}}function Pt(t,e){t&1&&l(0," - ")}function Lt(t,e){if(t&1&&(g(0),r(1,"tr",16)(2,"td")(3,"a",17),D(4,"img",18),r(5,"span"),l(6),o()()(),r(7,"td")(8,"b"),l(9),o(),D(10,"div",19),o(),r(11,"td"),u(12,Mt,5,4,"ng-container",20)(13,Pt,1,0,"ng-template",null,0,it),o(),r(15,"td"),l(16),o(),r(17,"td"),l(18),s(19,"date"),o()(),h()),t&2){let n=e.$implicit,a=K(14);m(),p("ngClass",et(14,Et,n.Status==1,n.Status==0)),m(2),p("routerLink",Z(17,Dt))("queryParams",tt(18,Tt,n.ID)),m(),J("src",n.Img,H),m(2),d(n.Name),m(3),d(n.Label),m(),p("innerHTML",n.Message,W),m(2),p("ngIf",n.DurationInSecond)("ngIfElse",a),m(4),d(n.StatusLabel),m(2),d(S(19,11,n.Created,"dd MMM yyyy HH:mm"))}}function Ft(t,e){if(t&1){let n=G();g(0),r(1,"div",6)(2,"div",21)(3,"app-custom-paginator",22),s(4,"async"),s(5,"async"),V("total",function(){N(n);let i=f(2);return E(i.getRowCount())})("next",function(){N(n);let i=f(2);return E(i.getNotifications())})("previous",function(){N(n);let i=f(2);return E(i.getNotifications())}),o()()(),h()}if(t&2){let n=f().ngIf,a=f();m(3),p("filter",a.filter)("totaldata",n==null?null:n.length)("paginationTotal",_(4,4,a.rowCount$))("hasClicked",_(5,6,a.rowCount$))}}function Rt(t,e){if(t&1&&(g(0),u(1,Ft,6,8,"ng-container",13),h()),t&2){let n=e.ngIf;m(),p("ngIf",n.length>0)}}var _t=(()=>{let e=class e{constructor(a,i,c){this.http=a,this.notificationService=i,this.authService=c,this.filter=new vt,this.destroy$=new z,this.channelOptions=c.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(U(this.destroy$)).subscribe(a=>{a.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(a=>{this.filter=a.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let a={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",a).pipe(C(i=>i.Data),C(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),j(1))}setTimeToSecond(a){return a=a.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),a}setChannelLogoToNotifications(a){return a=a.map(i=>(i.Img=ct.getChannelLogoByTypeId(i.TypeID),i)),a}getRowCount(){let a={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",a).pipe(C(i=>i.Count),j(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(v(pt),v(B),v(dt))},e.\u0275cmp=y({type:e,selectors:[["app-notification"]],decls:30,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(i,c){i&1&&(r(0,"mainpanel",1),V("onSubmit",function(){return c.onFilter()}),r(1,"filters")(2,"div")(3,"h6",2),l(4,"Channel"),o(),r(5,"ng-select",3),Y("ngModelChange",function(O){return X(c.filter.ChannelID,O)||(c.filter.ChannelID=O),O}),u(6,wt,3,3,"ng-template",4),o()()(),r(7,"content")(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11)(15,"th"),l(16,"Channel"),o(),r(17,"th"),l(18,"Process"),o(),r(19,"th"),l(20,"Duration"),o(),r(21,"th"),l(22,"Status"),o(),r(23,"th"),l(24,"Created"),o()()(),r(25,"tbody"),u(26,Lt,20,20,"ng-container",12),s(27,"async"),o()()()()(),u(28,Rt,2,1,"ng-container",13),s(29,"async"),o()()()),i&2&&(m(5),p("clearable",!0)("items",c.channelOptions),Q("ngModel",c.filter.ChannelID),m(21),p("ngForOf",_(27,5,c.notifications$)),m(2),p("ngIf",_(29,7,c.notifications$)))},dependencies:[nt,ot,T,ut,st,ft,rt,lt,k,F,$,w,P,M]});let t=e;return t})();function Bt(t,e){if(t&1&&(r(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),l(4,"Perflog"),o()(),r(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),l(9),o()()()()()()),t&2){let n=f().ngIf;m(9),d(n.Perflog)}}function kt(t,e){if(t&1&&(g(0),r(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),l(5,"StackTrace"),o()(),r(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),l(10),o()()()()()(),h()),t&2){let n=f().ngIf;m(10),d(n==null?null:n.StackTrace)}}function $t(t,e){if(t&1&&(g(0),r(1,"mainpanel",1)(2,"actions")(3,"a",2),l(4,"Back"),o()(),r(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),l(12,"General"),o()(),r(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),l(18,"Created Date"),o(),r(19,"div")(20,"span"),l(21),s(22,"date"),o()()()(),r(23,"div",10)(24,"div",11)(25,"label"),l(26,"Status"),o(),r(27,"div")(28,"span"),l(29),o()()()()(),r(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),l(34,"Duration"),o(),r(35,"div")(36,"span"),l(37),s(38,"number"),o()()()(),r(39,"div",10)(40,"div",11)(41,"label"),l(42,"Label"),o(),r(43,"div")(44,"span"),l(45),o()()()()()()()()(),r(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),l(51,"Message"),o()(),r(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),l(56),o()()()()()(),u(57,Bt,10,1,"div",16)(58,kt,11,1,"ng-container",0),o()()()(),h()),t&2){let n=e.ngIf;m(),p("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),m(20),d(S(22,10,n.Created,"dd MMM yyyy HH:mm:ss")),m(8),d(n.StatusLabel),m(8),x("",S(38,13,n.DurationInSecond,"1.1-1")," s"),m(8),d(n.Label),m(11),d(n.Message),m(),p("ngIf",n==null?null:n.Perflog),m(),p("ngIf",n==null?null:n.StackTrace)}}var Ct=(()=>{let e=class e{constructor(a,i){this.activatedRoute=a,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(q(a=>{let i=a.ID;return this.notificationService.getNotificationDetail(i).pipe(C(c=>(c.DurationInSecond=parseInt(c.Duration)/1e3,c)))}))}};e.\u0275fac=function(i){return new(i||e)(v(at),v(B))},e.\u0275cmp=y({type:e,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,c){i&1&&(u(0,$t,59,16,"ng-container",0),s(1,"async")),i&2&&p("ngIf",_(1,1,c.notification$))},dependencies:[T,k,F,w,P,M]});let t=e;return t})();var Ot=[{path:"",component:_t},{path:"detail",component:Ct}],St=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=b({type:e}),e.\u0275inj=I({imports:[L,R.forChild(Ot)]});let t=e;return t})();var se=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=b({type:e}),e.\u0275inj=I({imports:[L,St,gt,mt,ht,R,$]});let t=e;return t})();export{se as NotificationModule};
@@ -1 +1 @@
1
- import"./chunk-WKKTLYA4.js";import{a as Oe}from"./chunk-VS2ZOTGT.js";import{a as K}from"./chunk-XHAXYWZ7.js";import{a as De,b as Ve,c as X}from"./chunk-WWRX4VCC.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Me}from"./chunk-EVDAHZS7.js";import{a as Ie}from"./chunk-7KG3DC5J.js";import{b as Ee}from"./chunk-YXUEYLE5.js";import{a as Te}from"./chunk-T3POIC5F.js";import"./chunk-V6PMZ6DL.js";import"./chunk-HPCPVA6F.js";import{a as we}from"./chunk-UUI7T7NV.js";import"./chunk-OURZMROU.js";import{a as Se,b as ve,c as ye}from"./chunk-KSTCUPYX.js";import{a as Fe}from"./chunk-PW6QZKJS.js";import"./chunk-X54LLODL.js";import{g as fe}from"./chunk-ZHLEQV6S.js";import{b as ue,e as ge}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{d as xe,m as Pe,n as be}from"./chunk-SG42JTLJ.js";import{t as j,u as W}from"./chunk-BZ7SMYI7.js";import"./chunk-DRY23ALE.js";import{A,b as de,h as L,m as U}from"./chunk-VFLG2BDB.js";import{c as J,e as he,f as Ce}from"./chunk-T4MH7AFK.js";import{$a as s,$b as w,B as G,Cc as pe,Dc as $,Ha as T,Hb as z,Ia as l,Ib as p,Ja as P,Jb as oe,Kb as x,Mb as V,Nb as N,Ob as k,Pb as re,Q as q,Qb as B,Sb as F,Tb as ae,X as Y,Za as g,_b as S,ac as le,bc as H,cb as te,da as Q,ga as D,gb as ne,hb as E,jb as M,kb as O,lb as a,mb as c,nb as b,oa as C,ob as v,pa as f,pb as y,q as Z,rb as I,tc as ce,ub as h,vc as R,wb as m,wc as se,za as ee,zb as ie,zc as me}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var Ae=(t,r)=>({color:t,"font-weight":r});function je(t,r){if(t&1&&(a(0,"mat-radio-button",2),p(1),c()),t&2){let i=r.$implicit,o=r.index,e=m();te(ae(7,Ae,e.model==i.Key&&e.activeBold?"#0976b4":"",e.model==i.Key&&e.activeBold?"700":"")),s("disabled",e.exception==i.Value)("matTooltip",e.title.length>0?e.title[o]:"")("value",i.Key)("name",e.name),l(),x("",i.Value," ")}}var Ne=(()=>{let r=class r{constructor(){this.disabled=!1,this.modelChange=new ee,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold=""}change(o){this.modelChange.emit(o)}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=D({type:r,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},standalone:!0,features:[B],decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(e,n){e&1&&(a(0,"mat-radio-group",0),h("ngModelChange",function(_){return n.change(_)}),g(1,je,2,10,"mat-radio-button",1),c()),e&2&&(s("disabled",n.disabled)("ngModel",n.model),l(),s("ngForOf",n.options))},dependencies:[$,R,ye,Se,ve,A,L,U,W,j],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px;--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]});let t=r;return t})();var ke=t=>[t],We=t=>({"text-decoration-line-through":t}),Ke=t=>({"border-bottom":t}),Ge=t=>({"bg-gradient-warning":t});function ze(t,r){if(t&1){let i=I();v(0),a(1,"div",21)(2,"h6",22),p(3,"Filter by"),c(),a(4,"lib-radio-options",23),k("modelChange",function(e){C(i);let n=m();return N(n.filterType,e)||(n.filterType=e),f(e)}),c()(),y()}if(t&2){let i=m();l(4),V("model",i.filterType),s("options",i.filterTypeOptions)}}function He(t,r){if(t&1){let i=I();a(0,"button",25),h("click",function(){C(i);let e=m().ngIf,n=m();return f(n.onUpdateItems(e))}),b(1,"i",26),p(2," Update "),c()}}function Je(t,r){if(t&1&&(v(0),a(1,"div",4),g(2,He,3,0,"button",24),c(),y()),t&2){let i=r.ngIf,o=m();l(2),s("ngIf",o.productService.hasSelectionVariant(i))}}function Xe(t,r){if(t&1&&(a(0,"th",15)(1,"div",27),b(2,"img",28),a(3,"div",29),p(4),S(5,"stringLimit"),c()()()),t&2){let i=r.$implicit;l(),s("matTooltip",(i.Name==null?null:i.Name.length)>20?i.Name:""),l(),s("src",i==null?null:i.Img,T),l(2),x(" ",le(5,3,i.Name,20)," ")}}function Ze(t,r){if(t&1){let i=I();a(0,"th")(1,"input",30),k("ngModelChange",function(e){C(i);let n=m();return N(n.checkboxState,e)||(n.checkboxState=e),f(e)}),h("ngModelChange",function(){C(i);let e=m();return f(e.onSelectAllData())}),c()()}if(t&2){let i=m();l(),V("ngModel",i.checkboxState)}}function qe(t,r){t&1&&(a(0,"th",31)(1,"span"),p(2,"Expected"),c(),a(3,"span",32),p(4,"(POS)"),c()(),a(5,"th",31),p(6,"Channel"),c())}function Ye(t,r){if(t&1){let i=I();a(0,"img",45),h("click",function(e){C(i);let n=m(3).$implicit,d=m(2);return f(d.onZoomImage(e,n==null?null:n.ImageUrl))}),c()}if(t&2){let i=m(3).$implicit;ie("src",i==null?null:i.ImageUrl,T)}}function Qe(t,r){t&1&&b(0,"img",46)}function et(t,r){if(t&1&&(a(0,"small",44),p(1),c()),t&2){let i=m(3).$implicit;l(),x("(",i==null?null:i.Category,")")}}function tt(t,r){if(t&1&&(v(0),a(1,"td",40),g(2,Ye,1,1,"img",41)(3,Qe,1,0,"ng-template",null,0,H),c(),a(5,"td",42)(6,"h5",43),p(7),c(),g(8,et,2,1,"small",44),c(),y()),t&2){let i=z(4),o=m().$index,e=m().$implicit,n=m().ngIf;l(),s("rowSpan",e==null?null:e.Variants.length)("ngClass",F(7,Ke,o+1==n.length)),l(),s("ngIf",e==null?null:e.ImageUrl)("ngIfElse",i),l(3),s("rowSpan",e==null?null:e.Variants.length),l(2),oe(e==null?null:e.Name),l(),ne(e!=null&&e.Category?8:-1)}}function nt(t,r){if(t&1){let i=I();a(0,"td",47)(1,"input",30),k("ngModelChange",function(e){C(i);let n=m().$implicit;return N(n.selected,e)||(n.selected=e),f(e)}),c()()}if(t&2){let i=m().$implicit;l(),V("ngModel",i.selected)}}function it(t,r){if(t&1){let i=I();v(0),a(1,"td",49),p(2),S(3,"number"),c(),a(4,"td",50),h("click",function(){let e=C(i).$implicit,n=m(2).$implicit,d=m().$implicit,_=m(2);return f(_.openTableDialog(n,d,e))}),a(5,"div",51)(6,"div",52),p(7),S(8,"number"),c(),a(9,"a",53),h("click",function(e){return C(i),f(e==null?null:e.stopPropagation())}),b(10,"i",38),c()()(),y()}if(t&2){let i=r.$implicit;l(2),x(" ",w(3,4,i.PriceExpected)," "),l(2),s("ngClass",F(8,Ge,i.Price!=i.PriceExpected)),l(3),x(" ",w(8,6,i.Price)," "),l(2),s("href",i.Url,T)}}function ot(t,r){t&1&&(a(0,"td",54),p(1," X "),c(),a(2,"td",54),p(3," X "),c())}function rt(t,r){if(t&1&&(v(0),g(1,it,11,10,"ng-container",48)(2,ot,4,0,"ng-template",null,1,H),y()),t&2){let i=r.$implicit,o=z(3),e=m().$implicit,n=m(3);l(),s("ngIf",n.getItemFromChannel(e,i.ID))("ngIfElse",o)}}function at(t,r){if(t&1&&(a(0,"tr"),g(1,tt,9,9,"ng-container",3),a(2,"td",33),p(3),c(),a(4,"td",34)(5,"div",35)(6,"div",36),p(7),c(),a(8,"div",29)(9,"a",37),b(10,"i",38),c()()()(),g(11,nt,2,1,"ng-template",19)(12,rt,4,2,"ng-container",39),c()),t&2){let i=r.$implicit,o=r.$index,e=m(3);l(),s("ngIf",o==0),l(2),x(" ",i==null?null:i.Model," "),l(),s("matTooltip",i.Discontinued?e.discontinuedVariantMsg:""),l(2),s("ngClass",F(8,We,i.Discontinued)),l(),x(" ",i==null?null:i.Code," "),l(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(i==null?null:i.ID),T),l(2),s("ngxPermissionsOnly",F(10,ke,e.rolePriceEdit)),l(),s("ngForOf",e.channelOptions)}}function lt(t,r){if(t&1&&(a(0,"tbody"),M(1,at,13,12,"tr",null,E),c()),t&2){let i=r.$implicit;l(),O(i.Variants)}}function ct(t,r){if(t&1&&(v(0),M(1,lt,3,0,"tbody",null,E),y()),t&2){let i=r.ngIf;l(),O(i)}}var Zt=(()=>{let r=class r{constructor(o,e,n,d,_,u,Be){this.http=o,this.toastr=e,this.dialog=n,this.productService=d,this.authService=_,this.biggerPictureService=u,this.paginationService=Be,this.infinitePagination=Q(X),this.searchFilter=new Ie,this.checkboxState=!1,this.rolePriceEdit=_e.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:K.ALL,Value:"All"},{Key:K.DIFFERENCE,Value:"Difference"}],this.filterType=K.ALL,this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination()}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(q(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(Y(o=>{this.searchFilter=o.Filter,this.infinitePagination.reloadPagination(this.searchFilter)}))}onSelectAllData(){this.data$=this.data$.pipe(Z(o=>(o.map(e=>(e.Variants&&(e.Variants=e.Variants.map(n=>(n.selected=this.checkboxState,n))),e)),o)))}onFilter(o){this.searchFilter.text=o;let e={text:o,filterModel:this.filterType,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount};this.infinitePagination.reloadPagination(e)}updatePrice(o){let e=this.productService.selectedVariantProduct(o);if(e.length>0){let n=e.map(u=>u.ID),_={ListChannelID:this.channelOptions.filter(u=>u.selected).map(u=>u.ID),ListID:n};this.http.post("/api/Price/UpdateChannelOutletPrice",_).subscribe({next:u=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+_.ListID.length+" items in "+_.ListChannelID.length+" channels","Success")},error:u=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(o=>(o.selected=!1,o))}getItemFromChannel(o,e){return o.Channel.find(n=>n.ChannelID==e)}onUpdateItems(o){let e=this.productService.selectedVariantProduct(o);this.dialog.open(Oe,{data:{selectedItems:e,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(G(n=>J.IsNotEmpty(n))).subscribe(n=>{this.channelOptions=n,this.updatePrice(o)})}openTableDialog(o,e,n){let d=JSON.parse(JSON.stringify(o));this.dialog.open(De,{data:{Name:e.Name,Variant:d,ChannelID:n?.ChannelID,Table:"price",ChannelItemID:n?.ChannelItemID}}).afterClosed().pipe(G(u=>J.IsNotEmpty(u))).subscribe(u=>{this.updateProductPrice(u,n)})}updateProductPrice(o,e){let n={ID:o.ChannelID,ChannelItemID:o.ChannelItemID,ChannelVariantID:o.ChannelVariationID,Price:parseFloat(o.Price),VariantID:o.ID,SKU:o.Sku};this.http.post("/api/Price/UpdatePriceByID",n).subscribe(d=>{e.Price=n.Price;let _=this.productService.findChannelById(n.ID,this.channelOptions);this.toastr.success(`Successfully updated ${o.ItemName} (${o.VarName}) inventory in ${_.Name} to ${n.Price}`,"Success")})}openExportDialog(){this.dialog.open(Ee,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(o,e){this.biggerPictureService.openBiggerPicture(o,e)}};r.\u0275fac=function(e){return new(e||r)(P(ge),P(ue),P(xe),P(we),P(fe),P(Fe),P(Me))},r.\u0275cmp=D({type:r,selectors:[["app-custom-channel-price"]],standalone:!0,features:[re([X]),B],decls:38,vars:23,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[2,"height","46px"],[1,"mb-3"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(e,n){e&1&&(a(0,"mainpanel",2),h("onSubmit",function(_){return n.onFilter(_)}),a(1,"filters"),g(2,ze,5,2,"ng-container",3),S(3,"async"),c(),a(4,"actions")(5,"div",4),g(6,Je,3,1,"ng-container",3),S(7,"async"),a(8,"button",5),h("click",function(){return n.openExportDialog()}),b(9,"i",6),a(10,"span"),p(11,"Export"),c()()()(),a(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead",12)(19,"tr",13),b(20,"th",14),M(21,Xe,6,6,"th",15,E),c(),a(23,"tr")(24,"th",16)(25,"span"),p(26," Product "),c()(),a(27,"th",17),p(28,"Variant"),c(),a(29,"th",18),p(30,"SKU"),c(),g(31,Ze,2,1,"ng-template",19),M(32,qe,7,0,null,null,E),c()(),g(34,ct,3,0,"ng-container",3),S(35,"async"),c(),a(36,"infinite-paginator",20),S(37,"async"),h("onNextPage",function(){return n.infinitePagination.onNextPage(n.searchFilter)})("onLastPage",function(){return n.infinitePagination.onLastPage(n.searchFilter)})("onGetRowCount",function(){return n.infinitePagination.getRowCount(n.searchFilter)}),c()()()()()()()),e&2&&(s("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),l(2),s("ngIf",w(3,13,n.loader$)),l(4),s("ngIf",w(7,15,n.data$)),l(15),O(n.channelOptions),l(10),s("ngxPermissionsOnly",F(21,ke,n.rolePriceEdit)),l(),O(n.channelOptions),l(2),s("ngIf",w(35,17,n.data$)),l(2),s("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",w(37,19,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage()))},dependencies:[$,ce,R,se,me,pe,be,Pe,A,de,L,U,Ve,Ne,W,j,Te,Ce,he],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]});let t=r;return t})();export{Zt as CustomChannelPriceComponent};
1
+ import"./chunk-PHFMXSJW.js";import{a as Oe}from"./chunk-VS2ZOTGT.js";import{a as K}from"./chunk-XHAXYWZ7.js";import{a as De,b as Ve,c as X}from"./chunk-WWRX4VCC.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Me}from"./chunk-EVDAHZS7.js";import{a as Ie}from"./chunk-7KG3DC5J.js";import{b as Ee}from"./chunk-YXUEYLE5.js";import{a as Te}from"./chunk-T3POIC5F.js";import"./chunk-V6PMZ6DL.js";import"./chunk-HPCPVA6F.js";import{a as we}from"./chunk-UUI7T7NV.js";import"./chunk-OURZMROU.js";import{a as Se,b as ve,c as ye}from"./chunk-KSTCUPYX.js";import{a as Fe}from"./chunk-PW6QZKJS.js";import"./chunk-X54LLODL.js";import{g as fe}from"./chunk-BWVM6BFT.js";import{b as ue,e as ge}from"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{d as xe,m as Pe,n as be}from"./chunk-SG42JTLJ.js";import{t as j,u as W}from"./chunk-BZ7SMYI7.js";import"./chunk-DRY23ALE.js";import{A,b as de,h as L,m as U}from"./chunk-VFLG2BDB.js";import{c as J,e as he,f as Ce}from"./chunk-T4MH7AFK.js";import{$a as s,$b as w,B as G,Cc as pe,Dc as $,Ha as T,Hb as z,Ia as l,Ib as p,Ja as P,Jb as oe,Kb as x,Mb as V,Nb as N,Ob as k,Pb as re,Q as q,Qb as B,Sb as F,Tb as ae,X as Y,Za as g,_b as S,ac as le,bc as H,cb as te,da as Q,ga as D,gb as ne,hb as E,jb as M,kb as O,lb as a,mb as c,nb as b,oa as C,ob as v,pa as f,pb as y,q as Z,rb as I,tc as ce,ub as h,vc as R,wb as m,wc as se,za as ee,zb as ie,zc as me}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var Ae=(t,r)=>({color:t,"font-weight":r});function je(t,r){if(t&1&&(a(0,"mat-radio-button",2),p(1),c()),t&2){let i=r.$implicit,o=r.index,e=m();te(ae(7,Ae,e.model==i.Key&&e.activeBold?"#0976b4":"",e.model==i.Key&&e.activeBold?"700":"")),s("disabled",e.exception==i.Value)("matTooltip",e.title.length>0?e.title[o]:"")("value",i.Key)("name",e.name),l(),x("",i.Value," ")}}var Ne=(()=>{let r=class r{constructor(){this.disabled=!1,this.modelChange=new ee,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold=""}change(o){this.modelChange.emit(o)}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=D({type:r,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},standalone:!0,features:[B],decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(e,n){e&1&&(a(0,"mat-radio-group",0),h("ngModelChange",function(_){return n.change(_)}),g(1,je,2,10,"mat-radio-button",1),c()),e&2&&(s("disabled",n.disabled)("ngModel",n.model),l(),s("ngForOf",n.options))},dependencies:[$,R,ye,Se,ve,A,L,U,W,j],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px;--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]});let t=r;return t})();var ke=t=>[t],We=t=>({"text-decoration-line-through":t}),Ke=t=>({"border-bottom":t}),Ge=t=>({"bg-gradient-warning":t});function ze(t,r){if(t&1){let i=I();v(0),a(1,"div",21)(2,"h6",22),p(3,"Filter by"),c(),a(4,"lib-radio-options",23),k("modelChange",function(e){C(i);let n=m();return N(n.filterType,e)||(n.filterType=e),f(e)}),c()(),y()}if(t&2){let i=m();l(4),V("model",i.filterType),s("options",i.filterTypeOptions)}}function He(t,r){if(t&1){let i=I();a(0,"button",25),h("click",function(){C(i);let e=m().ngIf,n=m();return f(n.onUpdateItems(e))}),b(1,"i",26),p(2," Update "),c()}}function Je(t,r){if(t&1&&(v(0),a(1,"div",4),g(2,He,3,0,"button",24),c(),y()),t&2){let i=r.ngIf,o=m();l(2),s("ngIf",o.productService.hasSelectionVariant(i))}}function Xe(t,r){if(t&1&&(a(0,"th",15)(1,"div",27),b(2,"img",28),a(3,"div",29),p(4),S(5,"stringLimit"),c()()()),t&2){let i=r.$implicit;l(),s("matTooltip",(i.Name==null?null:i.Name.length)>20?i.Name:""),l(),s("src",i==null?null:i.Img,T),l(2),x(" ",le(5,3,i.Name,20)," ")}}function Ze(t,r){if(t&1){let i=I();a(0,"th")(1,"input",30),k("ngModelChange",function(e){C(i);let n=m();return N(n.checkboxState,e)||(n.checkboxState=e),f(e)}),h("ngModelChange",function(){C(i);let e=m();return f(e.onSelectAllData())}),c()()}if(t&2){let i=m();l(),V("ngModel",i.checkboxState)}}function qe(t,r){t&1&&(a(0,"th",31)(1,"span"),p(2,"Expected"),c(),a(3,"span",32),p(4,"(POS)"),c()(),a(5,"th",31),p(6,"Channel"),c())}function Ye(t,r){if(t&1){let i=I();a(0,"img",45),h("click",function(e){C(i);let n=m(3).$implicit,d=m(2);return f(d.onZoomImage(e,n==null?null:n.ImageUrl))}),c()}if(t&2){let i=m(3).$implicit;ie("src",i==null?null:i.ImageUrl,T)}}function Qe(t,r){t&1&&b(0,"img",46)}function et(t,r){if(t&1&&(a(0,"small",44),p(1),c()),t&2){let i=m(3).$implicit;l(),x("(",i==null?null:i.Category,")")}}function tt(t,r){if(t&1&&(v(0),a(1,"td",40),g(2,Ye,1,1,"img",41)(3,Qe,1,0,"ng-template",null,0,H),c(),a(5,"td",42)(6,"h5",43),p(7),c(),g(8,et,2,1,"small",44),c(),y()),t&2){let i=z(4),o=m().$index,e=m().$implicit,n=m().ngIf;l(),s("rowSpan",e==null?null:e.Variants.length)("ngClass",F(7,Ke,o+1==n.length)),l(),s("ngIf",e==null?null:e.ImageUrl)("ngIfElse",i),l(3),s("rowSpan",e==null?null:e.Variants.length),l(2),oe(e==null?null:e.Name),l(),ne(e!=null&&e.Category?8:-1)}}function nt(t,r){if(t&1){let i=I();a(0,"td",47)(1,"input",30),k("ngModelChange",function(e){C(i);let n=m().$implicit;return N(n.selected,e)||(n.selected=e),f(e)}),c()()}if(t&2){let i=m().$implicit;l(),V("ngModel",i.selected)}}function it(t,r){if(t&1){let i=I();v(0),a(1,"td",49),p(2),S(3,"number"),c(),a(4,"td",50),h("click",function(){let e=C(i).$implicit,n=m(2).$implicit,d=m().$implicit,_=m(2);return f(_.openTableDialog(n,d,e))}),a(5,"div",51)(6,"div",52),p(7),S(8,"number"),c(),a(9,"a",53),h("click",function(e){return C(i),f(e==null?null:e.stopPropagation())}),b(10,"i",38),c()()(),y()}if(t&2){let i=r.$implicit;l(2),x(" ",w(3,4,i.PriceExpected)," "),l(2),s("ngClass",F(8,Ge,i.Price!=i.PriceExpected)),l(3),x(" ",w(8,6,i.Price)," "),l(2),s("href",i.Url,T)}}function ot(t,r){t&1&&(a(0,"td",54),p(1," X "),c(),a(2,"td",54),p(3," X "),c())}function rt(t,r){if(t&1&&(v(0),g(1,it,11,10,"ng-container",48)(2,ot,4,0,"ng-template",null,1,H),y()),t&2){let i=r.$implicit,o=z(3),e=m().$implicit,n=m(3);l(),s("ngIf",n.getItemFromChannel(e,i.ID))("ngIfElse",o)}}function at(t,r){if(t&1&&(a(0,"tr"),g(1,tt,9,9,"ng-container",3),a(2,"td",33),p(3),c(),a(4,"td",34)(5,"div",35)(6,"div",36),p(7),c(),a(8,"div",29)(9,"a",37),b(10,"i",38),c()()()(),g(11,nt,2,1,"ng-template",19)(12,rt,4,2,"ng-container",39),c()),t&2){let i=r.$implicit,o=r.$index,e=m(3);l(),s("ngIf",o==0),l(2),x(" ",i==null?null:i.Model," "),l(),s("matTooltip",i.Discontinued?e.discontinuedVariantMsg:""),l(2),s("ngClass",F(8,We,i.Discontinued)),l(),x(" ",i==null?null:i.Code," "),l(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(i==null?null:i.ID),T),l(2),s("ngxPermissionsOnly",F(10,ke,e.rolePriceEdit)),l(),s("ngForOf",e.channelOptions)}}function lt(t,r){if(t&1&&(a(0,"tbody"),M(1,at,13,12,"tr",null,E),c()),t&2){let i=r.$implicit;l(),O(i.Variants)}}function ct(t,r){if(t&1&&(v(0),M(1,lt,3,0,"tbody",null,E),y()),t&2){let i=r.ngIf;l(),O(i)}}var Zt=(()=>{let r=class r{constructor(o,e,n,d,_,u,Be){this.http=o,this.toastr=e,this.dialog=n,this.productService=d,this.authService=_,this.biggerPictureService=u,this.paginationService=Be,this.infinitePagination=Q(X),this.searchFilter=new Ie,this.checkboxState=!1,this.rolePriceEdit=_e.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:K.ALL,Value:"All"},{Key:K.DIFFERENCE,Value:"Difference"}],this.filterType=K.ALL,this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination()}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(q(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(Y(o=>{this.searchFilter=o.Filter,this.infinitePagination.reloadPagination(this.searchFilter)}))}onSelectAllData(){this.data$=this.data$.pipe(Z(o=>(o.map(e=>(e.Variants&&(e.Variants=e.Variants.map(n=>(n.selected=this.checkboxState,n))),e)),o)))}onFilter(o){this.searchFilter.text=o;let e={text:o,filterModel:this.filterType,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount};this.infinitePagination.reloadPagination(e)}updatePrice(o){let e=this.productService.selectedVariantProduct(o);if(e.length>0){let n=e.map(u=>u.ID),_={ListChannelID:this.channelOptions.filter(u=>u.selected).map(u=>u.ID),ListID:n};this.http.post("/api/Price/UpdateChannelOutletPrice",_).subscribe({next:u=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+_.ListID.length+" items in "+_.ListChannelID.length+" channels","Success")},error:u=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(o=>(o.selected=!1,o))}getItemFromChannel(o,e){return o.Channel.find(n=>n.ChannelID==e)}onUpdateItems(o){let e=this.productService.selectedVariantProduct(o);this.dialog.open(Oe,{data:{selectedItems:e,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(G(n=>J.IsNotEmpty(n))).subscribe(n=>{this.channelOptions=n,this.updatePrice(o)})}openTableDialog(o,e,n){let d=JSON.parse(JSON.stringify(o));this.dialog.open(De,{data:{Name:e.Name,Variant:d,ChannelID:n?.ChannelID,Table:"price",ChannelItemID:n?.ChannelItemID}}).afterClosed().pipe(G(u=>J.IsNotEmpty(u))).subscribe(u=>{this.updateProductPrice(u,n)})}updateProductPrice(o,e){let n={ID:o.ChannelID,ChannelItemID:o.ChannelItemID,ChannelVariantID:o.ChannelVariationID,Price:parseFloat(o.Price),VariantID:o.ID,SKU:o.Sku};this.http.post("/api/Price/UpdatePriceByID",n).subscribe(d=>{e.Price=n.Price;let _=this.productService.findChannelById(n.ID,this.channelOptions);this.toastr.success(`Successfully updated ${o.ItemName} (${o.VarName}) inventory in ${_.Name} to ${n.Price}`,"Success")})}openExportDialog(){this.dialog.open(Ee,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(o,e){this.biggerPictureService.openBiggerPicture(o,e)}};r.\u0275fac=function(e){return new(e||r)(P(ge),P(ue),P(xe),P(we),P(fe),P(Fe),P(Me))},r.\u0275cmp=D({type:r,selectors:[["app-custom-channel-price"]],standalone:!0,features:[re([X]),B],decls:38,vars:23,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[2,"height","46px"],[1,"mb-3"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(e,n){e&1&&(a(0,"mainpanel",2),h("onSubmit",function(_){return n.onFilter(_)}),a(1,"filters"),g(2,ze,5,2,"ng-container",3),S(3,"async"),c(),a(4,"actions")(5,"div",4),g(6,Je,3,1,"ng-container",3),S(7,"async"),a(8,"button",5),h("click",function(){return n.openExportDialog()}),b(9,"i",6),a(10,"span"),p(11,"Export"),c()()()(),a(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead",12)(19,"tr",13),b(20,"th",14),M(21,Xe,6,6,"th",15,E),c(),a(23,"tr")(24,"th",16)(25,"span"),p(26," Product "),c()(),a(27,"th",17),p(28,"Variant"),c(),a(29,"th",18),p(30,"SKU"),c(),g(31,Ze,2,1,"ng-template",19),M(32,qe,7,0,null,null,E),c()(),g(34,ct,3,0,"ng-container",3),S(35,"async"),c(),a(36,"infinite-paginator",20),S(37,"async"),h("onNextPage",function(){return n.infinitePagination.onNextPage(n.searchFilter)})("onLastPage",function(){return n.infinitePagination.onLastPage(n.searchFilter)})("onGetRowCount",function(){return n.infinitePagination.getRowCount(n.searchFilter)}),c()()()()()()()),e&2&&(s("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),l(2),s("ngIf",w(3,13,n.loader$)),l(4),s("ngIf",w(7,15,n.data$)),l(15),O(n.channelOptions),l(10),s("ngxPermissionsOnly",F(21,ke,n.rolePriceEdit)),l(),O(n.channelOptions),l(2),s("ngIf",w(35,17,n.data$)),l(2),s("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",w(37,19,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage()))},dependencies:[$,ce,R,se,me,pe,be,Pe,A,de,L,U,Ve,Ne,W,j,Te,Ce,he],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]});let t=r;return t})();export{Zt as CustomChannelPriceComponent};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-AKI6ACKF.js";import{a as P}from"./chunk-ZCPPEAJQ.js";import{a as C}from"./chunk-6JF7HXB4.js";import{b as O}from"./chunk-AXDEQQNM.js";import"./chunk-CHZBEIYE.js";import{c as M}from"./chunk-KSTCUPYX.js";import{a as m}from"./chunk-L7OZWIEI.js";import{a as h}from"./chunk-LIJHEC5V.js";import"./chunk-PW6QZKJS.js";import"./chunk-A3ZMDUMP.js";import"./chunk-X54LLODL.js";import{e as s}from"./chunk-DDUQ3IZU.js";import"./chunk-ZHLEQV6S.js";import"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{n as u}from"./chunk-SG42JTLJ.js";import{u as f}from"./chunk-BZ7SMYI7.js";import"./chunk-DRY23ALE.js";import{A as g}from"./chunk-VFLG2BDB.js";import"./chunk-T4MH7AFK.js";import{Dc as i,Vc as l,Zc as a,aa as e,ga as d,ha as r,nb as c}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var _=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=d({type:t,selectors:[["app-products"]],decls:1,vars:0,template:function(n,v){n&1&&c(0,"router-outlet")},dependencies:[l],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=t;return o})();var y=[{path:"",component:_,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-PTMDFQOD.js").then(o=>o.StatusModule),canActivate:[m]},{path:"download",loadChildren:()=>import("./chunk-OUZSNKTY.js").then(o=>o.DownloadModule),canActivate:[m]},{path:"upload",loadComponent:()=>import("./chunk-MAFA6A4E.js").then(o=>o.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[m]}]}],w=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,a.forChild(y)]});let o=t;return o})();var W=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,g,a,w,f,u,s,O,C,M,h,P,b]});let o=t;return o})();export{W as ProductModule};
1
+ import{a as b}from"./chunk-AKI6ACKF.js";import{a as P}from"./chunk-ZCPPEAJQ.js";import{a as C}from"./chunk-6JF7HXB4.js";import{b as O}from"./chunk-AXDEQQNM.js";import"./chunk-CHZBEIYE.js";import{c as M}from"./chunk-KSTCUPYX.js";import{a as m}from"./chunk-QRSQP67K.js";import{a as h}from"./chunk-LIJHEC5V.js";import"./chunk-PW6QZKJS.js";import"./chunk-A3ZMDUMP.js";import"./chunk-X54LLODL.js";import{e as s}from"./chunk-DDUQ3IZU.js";import"./chunk-BWVM6BFT.js";import"./chunk-SUL6ZUGT.js";import"./chunk-KCDL7SWP.js";import{n as u}from"./chunk-SG42JTLJ.js";import{u as f}from"./chunk-BZ7SMYI7.js";import"./chunk-DRY23ALE.js";import{A as g}from"./chunk-VFLG2BDB.js";import"./chunk-T4MH7AFK.js";import{Dc as i,Vc as l,Zc as a,aa as e,ga as d,ha as r,nb as c}from"./chunk-IH2NT4RC.js";import"./chunk-GNOSNGXM.js";var _=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=d({type:t,selectors:[["app-products"]],decls:1,vars:0,template:function(n,v){n&1&&c(0,"router-outlet")},dependencies:[l],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=t;return o})();var y=[{path:"",component:_,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-5WPUUMMO.js").then(o=>o.StatusModule),canActivate:[m]},{path:"download",loadChildren:()=>import("./chunk-Q2SEJTHF.js").then(o=>o.DownloadModule),canActivate:[m]},{path:"upload",loadComponent:()=>import("./chunk-WIURRHOQ.js").then(o=>o.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[m]}]}],w=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,a.forChild(y)]});let o=t;return o})();var W=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,g,a,w,f,u,s,O,C,M,h,P,b]});let o=t;return o})();export{W as ProductModule};
@@ -1 +1 @@
1
- import{a as fe}from"./chunk-WWRX4VCC.js";import{a as ie}from"./chunk-BVIRHZTZ.js";import{a as xe}from"./chunk-T3POIC5F.js";import{a as de,b as ue}from"./chunk-V6PMZ6DL.js";import{c as ge}from"./chunk-OURZMROU.js";import{a as se}from"./chunk-PW6QZKJS.js";import{g as pe}from"./chunk-X54LLODL.js";import{g as le}from"./chunk-ZHLEQV6S.js";import{d as _e,g as me}from"./chunk-SG42JTLJ.js";import{t as ae,u as ce}from"./chunk-BZ7SMYI7.js";import{A as ne,b as Q,h as ee,m as te}from"./chunk-VFLG2BDB.js";import{e as oe,f as re}from"./chunk-T4MH7AFK.js";import{$a as m,$b as R,Cc as G,Dc as J,Ha as S,Hb as b,Ia as r,Ib as p,Ja as I,Jb as k,Kb as v,Mb as O,Nb as D,Ob as N,Qb as H,Sb as T,V as L,Za as s,_b as $,ac as Z,bc as y,c as W,ga as z,gb as P,hb as E,jb as M,kb as V,lb as c,mb as _,nb as w,oa as g,ob as x,pa as d,pb as f,qb as U,rb as C,tc as q,ub as h,vc as K,wb as a,wc as X,yc as Y,za as B,zb as A}from"./chunk-IH2NT4RC.js";var j=t=>[t],Ce=t=>({"text-decoration-line-through":t}),he=t=>({"ms-10":t}),Te=t=>({"bg-gradient-warning":t});function be(t,l){if(t&1){let n=C();c(0,"mat-slide-toggle",14),h("toggleChange",function(){g(n);let e=a();return e.toggleStatus=!e.toggleStatus,d(e.onToggle())}),c(1,"small",15),p(2),_()()}if(t&2){let n=a();r(2),v(" ",n.productToggleTitle?n.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function ve(t,l){if(t&1){let n=C();c(0,"th")(1,"input",16),N("ngModelChange",function(e){g(n);let o=a();return D(o.checkboxState,e)||(o.checkboxState=e),d(e)}),h("ngModelChange",function(){g(n);let e=a();return d(e.onCheckboxStateChange())}),_()()}if(t&2){let n=a();r(),O("ngModel",n.checkboxState)}}function Se(t,l){t&1&&(c(0,"th",11),p(1,"POS"),_())}function we(t,l){if(t&1&&(x(0),c(1,"th",17)(2,"div",18)(3,"div",19),w(4,"img",20),c(5,"div",21),p(6),$(7,"stringLimit"),_()()()(),f()),t&2){let n=l.$implicit;r(3),m("matTooltip",(n.Name==null?null:n.Name.length)>20?n.Name:""),r(),m("src",n==null?null:n.Img,S),r(2),v(" ",Z(7,3,n.Name,20)," ")}}function ye(t,l){t&1&&U(0)}function Fe(t,l){if(t&1&&(x(0),s(1,ye,1,0,"ng-container",34),f()),t&2){a();let n=b(7);r(),m("ngTemplateOutlet",n)}}function Ie(t,l){t&1&&U(0)}function Pe(t,l){if(t&1&&s(0,Ie,1,0,"ng-container",34),t&2){a(2);let n=b(7);m("ngTemplateOutlet",n)}}function Ee(t,l){if(t&1&&s(0,Pe,1,1,"ng-template",12),t&2){let n=a(4);m("ngxPermissionsOnly",T(1,j,n.rolePriceEdit))}}function Me(t,l){if(t&1){let n=C();x(0),c(1,"input",35),N("ngModelChange",function(e){g(n);let o=a(4).$implicit;return D(o.selected,e)||(o.selected=e),d(e)}),h("ngModelChange",function(){g(n);let e=a(4).$implicit,o=a();return d(o.onCheckboxStateProduct(e.ID))}),_(),f()}if(t&2){let n=a(4).$implicit;r(),O("ngModel",n.selected)}}function Ve(t,l){if(t&1&&s(0,Me,2,1,"ng-container",22),t&2){let n=a(3).$implicit;m("ngIf",(n==null||n.Variants==null?null:n.Variants.length)>1)}}function ke(t,l){if(t&1){let n=C();x(0),c(1,"img",36),h("click",function(e){g(n);let o=a(3).$implicit,u=a();return d(u.onZoomImage(e,o==null?null:o.ImageUrl))}),_(),f()}if(t&2){let n=a(3).$implicit;r(),A("src",n==null?null:n.ThumbnailUrl,S)}}function Oe(t,l){t&1&&w(0,"img",37)}function De(t,l){if(t&1&&(x(0),c(1,"td",29)(2,"div",30),s(3,Fe,2,1,"ng-container",31)(4,Ee,1,3,"ng-template",null,0,y)(6,Ve,1,1,"ng-template",null,1,y),c(8,"div",26),s(9,ke,2,1,"ng-container",31)(10,Oe,1,0,"ng-template",null,2,y),_()()(),c(12,"td",32)(13,"div"),p(14),_(),c(15,"small",33),p(16),_()(),f()),t&2){let n=b(5),i=b(11),e=a(2).$implicit,o=a();r(),m("rowSpan",e==null?null:e.Variants.length),r(2),m("ngIf",o.table=="inventory")("ngIfElse",n),r(5),m("ngClass",T(9,he,(e==null||e.Variants==null?null:e.Variants.length)<=1)),r(),m("ngIf",e==null?null:e.ThumbnailUrl)("ngIfElse",i),r(3),m("rowSpan",e==null?null:e.Variants.length),r(2),k(e==null?null:e.Name),r(2),v("(",e==null?null:e.Category,")")}}function Ne(t,l){if(t&1){let n=C();c(0,"input",16),N("ngModelChange",function(e){g(n);let o=a(2).$implicit;return D(o.selected,e)||(o.selected=e),d(e)}),_()}if(t&2){let n=a(2).$implicit;O("ngModel",n.selected)}}function $e(t,l){if(t&1&&(c(0,"td",38),s(1,Ne,1,1,"input",39),_()),t&2){let n=a().$implicit,i=a(2);r(),m("ngIf",i.printPOS(n)>=0||i.table=="price")}}function Be(t,l){if(t&1&&(c(0,"td",24),p(1),$(2,"number"),_()),t&2){let n=a().$implicit,i=a(2);r(),k(R(2,1,i.printPOS(n)))}}function Ue(t,l){if(t&1){let n=C();x(0),c(1,"td",40),h("click",function(){g(n);let e=a().$implicit,o=a().$implicit,u=a().$implicit,F=a();return d(F.openTableDialog(u.Name,o,e.ID,u.ChannelItemID))}),c(2,"div",30)(3,"div",41),p(4),$(5,"number"),_(),c(6,"a",42),h("click",function(e){return g(n),d(e==null?null:e.stopPropagation())}),w(7,"i",28),_()()(),f()}if(t&2){let n=l.$implicit,i=a(2).$implicit,e=a(2);r(),m("ngClass",T(5,Te,e.printPOS(i)!=e.printItem(n))),r(3),v(" ",R(5,3,e.printItem(n))," "),r(2),m("href",n.Url,S)}}function Re(t,l){t&1&&(c(0,"td",43)(1,"div",30)(2,"span"),p(3,"X"),_()()())}function je(t,l){if(t&1&&s(0,Ue,8,7,"ng-container",31)(1,Re,4,0,"ng-template",null,3,y),t&2){let n=l.$implicit,i=b(2),e=a().$implicit,o=a(2);m("ngIf",o.getItemFromChannel(e,n.ID))("ngIfElse",i)}}function We(t,l){if(t&1&&(c(0,"tr"),s(1,De,17,11,"ng-container",22),c(2,"td",23),p(3),_(),c(4,"td",24)(5,"div",25)(6,"div",26),p(7),_(),c(8,"div",21)(9,"a",27),w(10,"i",28),_()()()(),s(11,$e,2,1,"ng-template",12)(12,Be,3,3,"td",24),M(13,je,3,2,null,null,E),_()),t&2){let n=l.$implicit,i=l.$index,e=a(2);r(),m("ngIf",i==0),r(2),k(n==null?null:n.Model),r(2),m("matTooltip",n.Discontinued?e.discontinuedVariantMsg:""),r(),m("ngClass",T(8,Ce,n.Discontinued)),r(),v(" ",n.Code," "),r(2),m("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),S),r(2),m("ngxPermissionsOnly",T(10,j,e.rolePriceEdit)),r(),P(e.filter!=null&&e.filter.HiddenIPOSInventory?-1:12),r(),V(e.channel)}}function Le(t,l){if(t&1&&(c(0,"tbody"),M(1,We,15,12,"tr",null,E),_()),t&2){let n=l.$implicit;r(),V(n.Variants)}}var xt=(()=>{let l=class l{constructor(i,e,o){this.dialog=i,this.biggerPictureService=e,this.authService=o,this.showProductToggle=!1,this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=ie.price,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 W,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}onCheckboxStateProduct(i){let e=this.data.filter(o=>o.ID==i);e.length>0&&(e=e.map(o=>(o.Variants=o.Variants.map(u=>(u.selected=o.selected,u)),o)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(e=>(e.selected=this.checkboxState,e)),i))}getItemFromChannel(i,e){return i.Channel.find(o=>o.ChannelID==e)}printItem(i){if(this.table=="inventory")return i.Inventory;if(this.table=="price")return i.Price}openTableDialog(i,e,o,u){this.dialog.open(fe,{data:{Name:i,Variant:e,ChannelID:o,Table:this.table,ChannelItemID:u}}).afterClosed().pipe(L(this.destroy$)).subscribe(F=>{F!=null&&this.onSubmit.emit(F)})}printPOS(i){return this.table=="inventory"?i.Inventory?i.Inventory:0:this.table=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,e){this.biggerPictureService.openBiggerPicture(i,e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};l.\u0275fac=function(e){return new(e||l)(I(_e),I(se),I(le))},l.\u0275cmp=z({type:l,selectors:[["app-table"]],inputs:{filter:"filter",data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle"},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},standalone:!0,features:[H],decls:18,vars:6,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[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"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[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"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],[1,"p-0","pointer","cell-hover",3,"click","ngClass"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(e,o){e&1&&(c(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),p(7,"Product"),_(),s(8,be,3,1,"mat-slide-toggle",9),_()(),c(9,"th",10),p(10,"Variant"),_(),c(11,"th",11),p(12,"SKU"),_(),s(13,ve,2,1,"ng-template",12)(14,Se,2,0,"th",11)(15,we,8,6,"ng-container",13),_()(),M(16,Le,3,0,"tbody",null,E),_()()),e&2&&(r(8),P(o.showProductToggle?8:-1),r(5),m("ngxPermissionsOnly",T(4,j,o.rolePriceEdit)),r(),P(o.filter!=null&&o.filter.HiddenIPOSInventory?-1:14),r(),m("ngForOf",o.channel),r(),V(o.data))},dependencies:[J,q,K,X,Y,G,ne,Q,ee,te,ue,de,me,pe,ge,re,oe,ce,ae,xe],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}"]});let t=l;return t})();export{xt as a};
1
+ import{a as fe}from"./chunk-WWRX4VCC.js";import{a as ie}from"./chunk-BVIRHZTZ.js";import{a as xe}from"./chunk-T3POIC5F.js";import{a as de,b as ue}from"./chunk-V6PMZ6DL.js";import{c as ge}from"./chunk-OURZMROU.js";import{a as se}from"./chunk-PW6QZKJS.js";import{g as pe}from"./chunk-X54LLODL.js";import{g as le}from"./chunk-BWVM6BFT.js";import{d as _e,g as me}from"./chunk-SG42JTLJ.js";import{t as ae,u as ce}from"./chunk-BZ7SMYI7.js";import{A as ne,b as Q,h as ee,m as te}from"./chunk-VFLG2BDB.js";import{e as oe,f as re}from"./chunk-T4MH7AFK.js";import{$a as m,$b as R,Cc as G,Dc as J,Ha as S,Hb as b,Ia as r,Ib as p,Ja as I,Jb as k,Kb as v,Mb as O,Nb as D,Ob as N,Qb as H,Sb as T,V as L,Za as s,_b as $,ac as Z,bc as y,c as W,ga as z,gb as P,hb as E,jb as M,kb as V,lb as c,mb as _,nb as w,oa as g,ob as x,pa as d,pb as f,qb as U,rb as C,tc as q,ub as h,vc as K,wb as a,wc as X,yc as Y,za as B,zb as A}from"./chunk-IH2NT4RC.js";var j=t=>[t],Ce=t=>({"text-decoration-line-through":t}),he=t=>({"ms-10":t}),Te=t=>({"bg-gradient-warning":t});function be(t,l){if(t&1){let n=C();c(0,"mat-slide-toggle",14),h("toggleChange",function(){g(n);let e=a();return e.toggleStatus=!e.toggleStatus,d(e.onToggle())}),c(1,"small",15),p(2),_()()}if(t&2){let n=a();r(2),v(" ",n.productToggleTitle?n.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function ve(t,l){if(t&1){let n=C();c(0,"th")(1,"input",16),N("ngModelChange",function(e){g(n);let o=a();return D(o.checkboxState,e)||(o.checkboxState=e),d(e)}),h("ngModelChange",function(){g(n);let e=a();return d(e.onCheckboxStateChange())}),_()()}if(t&2){let n=a();r(),O("ngModel",n.checkboxState)}}function Se(t,l){t&1&&(c(0,"th",11),p(1,"POS"),_())}function we(t,l){if(t&1&&(x(0),c(1,"th",17)(2,"div",18)(3,"div",19),w(4,"img",20),c(5,"div",21),p(6),$(7,"stringLimit"),_()()()(),f()),t&2){let n=l.$implicit;r(3),m("matTooltip",(n.Name==null?null:n.Name.length)>20?n.Name:""),r(),m("src",n==null?null:n.Img,S),r(2),v(" ",Z(7,3,n.Name,20)," ")}}function ye(t,l){t&1&&U(0)}function Fe(t,l){if(t&1&&(x(0),s(1,ye,1,0,"ng-container",34),f()),t&2){a();let n=b(7);r(),m("ngTemplateOutlet",n)}}function Ie(t,l){t&1&&U(0)}function Pe(t,l){if(t&1&&s(0,Ie,1,0,"ng-container",34),t&2){a(2);let n=b(7);m("ngTemplateOutlet",n)}}function Ee(t,l){if(t&1&&s(0,Pe,1,1,"ng-template",12),t&2){let n=a(4);m("ngxPermissionsOnly",T(1,j,n.rolePriceEdit))}}function Me(t,l){if(t&1){let n=C();x(0),c(1,"input",35),N("ngModelChange",function(e){g(n);let o=a(4).$implicit;return D(o.selected,e)||(o.selected=e),d(e)}),h("ngModelChange",function(){g(n);let e=a(4).$implicit,o=a();return d(o.onCheckboxStateProduct(e.ID))}),_(),f()}if(t&2){let n=a(4).$implicit;r(),O("ngModel",n.selected)}}function Ve(t,l){if(t&1&&s(0,Me,2,1,"ng-container",22),t&2){let n=a(3).$implicit;m("ngIf",(n==null||n.Variants==null?null:n.Variants.length)>1)}}function ke(t,l){if(t&1){let n=C();x(0),c(1,"img",36),h("click",function(e){g(n);let o=a(3).$implicit,u=a();return d(u.onZoomImage(e,o==null?null:o.ImageUrl))}),_(),f()}if(t&2){let n=a(3).$implicit;r(),A("src",n==null?null:n.ThumbnailUrl,S)}}function Oe(t,l){t&1&&w(0,"img",37)}function De(t,l){if(t&1&&(x(0),c(1,"td",29)(2,"div",30),s(3,Fe,2,1,"ng-container",31)(4,Ee,1,3,"ng-template",null,0,y)(6,Ve,1,1,"ng-template",null,1,y),c(8,"div",26),s(9,ke,2,1,"ng-container",31)(10,Oe,1,0,"ng-template",null,2,y),_()()(),c(12,"td",32)(13,"div"),p(14),_(),c(15,"small",33),p(16),_()(),f()),t&2){let n=b(5),i=b(11),e=a(2).$implicit,o=a();r(),m("rowSpan",e==null?null:e.Variants.length),r(2),m("ngIf",o.table=="inventory")("ngIfElse",n),r(5),m("ngClass",T(9,he,(e==null||e.Variants==null?null:e.Variants.length)<=1)),r(),m("ngIf",e==null?null:e.ThumbnailUrl)("ngIfElse",i),r(3),m("rowSpan",e==null?null:e.Variants.length),r(2),k(e==null?null:e.Name),r(2),v("(",e==null?null:e.Category,")")}}function Ne(t,l){if(t&1){let n=C();c(0,"input",16),N("ngModelChange",function(e){g(n);let o=a(2).$implicit;return D(o.selected,e)||(o.selected=e),d(e)}),_()}if(t&2){let n=a(2).$implicit;O("ngModel",n.selected)}}function $e(t,l){if(t&1&&(c(0,"td",38),s(1,Ne,1,1,"input",39),_()),t&2){let n=a().$implicit,i=a(2);r(),m("ngIf",i.printPOS(n)>=0||i.table=="price")}}function Be(t,l){if(t&1&&(c(0,"td",24),p(1),$(2,"number"),_()),t&2){let n=a().$implicit,i=a(2);r(),k(R(2,1,i.printPOS(n)))}}function Ue(t,l){if(t&1){let n=C();x(0),c(1,"td",40),h("click",function(){g(n);let e=a().$implicit,o=a().$implicit,u=a().$implicit,F=a();return d(F.openTableDialog(u.Name,o,e.ID,u.ChannelItemID))}),c(2,"div",30)(3,"div",41),p(4),$(5,"number"),_(),c(6,"a",42),h("click",function(e){return g(n),d(e==null?null:e.stopPropagation())}),w(7,"i",28),_()()(),f()}if(t&2){let n=l.$implicit,i=a(2).$implicit,e=a(2);r(),m("ngClass",T(5,Te,e.printPOS(i)!=e.printItem(n))),r(3),v(" ",R(5,3,e.printItem(n))," "),r(2),m("href",n.Url,S)}}function Re(t,l){t&1&&(c(0,"td",43)(1,"div",30)(2,"span"),p(3,"X"),_()()())}function je(t,l){if(t&1&&s(0,Ue,8,7,"ng-container",31)(1,Re,4,0,"ng-template",null,3,y),t&2){let n=l.$implicit,i=b(2),e=a().$implicit,o=a(2);m("ngIf",o.getItemFromChannel(e,n.ID))("ngIfElse",i)}}function We(t,l){if(t&1&&(c(0,"tr"),s(1,De,17,11,"ng-container",22),c(2,"td",23),p(3),_(),c(4,"td",24)(5,"div",25)(6,"div",26),p(7),_(),c(8,"div",21)(9,"a",27),w(10,"i",28),_()()()(),s(11,$e,2,1,"ng-template",12)(12,Be,3,3,"td",24),M(13,je,3,2,null,null,E),_()),t&2){let n=l.$implicit,i=l.$index,e=a(2);r(),m("ngIf",i==0),r(2),k(n==null?null:n.Model),r(2),m("matTooltip",n.Discontinued?e.discontinuedVariantMsg:""),r(),m("ngClass",T(8,Ce,n.Discontinued)),r(),v(" ",n.Code," "),r(2),m("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),S),r(2),m("ngxPermissionsOnly",T(10,j,e.rolePriceEdit)),r(),P(e.filter!=null&&e.filter.HiddenIPOSInventory?-1:12),r(),V(e.channel)}}function Le(t,l){if(t&1&&(c(0,"tbody"),M(1,We,15,12,"tr",null,E),_()),t&2){let n=l.$implicit;r(),V(n.Variants)}}var xt=(()=>{let l=class l{constructor(i,e,o){this.dialog=i,this.biggerPictureService=e,this.authService=o,this.showProductToggle=!1,this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=ie.price,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 W,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}onCheckboxStateProduct(i){let e=this.data.filter(o=>o.ID==i);e.length>0&&(e=e.map(o=>(o.Variants=o.Variants.map(u=>(u.selected=o.selected,u)),o)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(e=>(e.selected=this.checkboxState,e)),i))}getItemFromChannel(i,e){return i.Channel.find(o=>o.ChannelID==e)}printItem(i){if(this.table=="inventory")return i.Inventory;if(this.table=="price")return i.Price}openTableDialog(i,e,o,u){this.dialog.open(fe,{data:{Name:i,Variant:e,ChannelID:o,Table:this.table,ChannelItemID:u}}).afterClosed().pipe(L(this.destroy$)).subscribe(F=>{F!=null&&this.onSubmit.emit(F)})}printPOS(i){return this.table=="inventory"?i.Inventory?i.Inventory:0:this.table=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,e){this.biggerPictureService.openBiggerPicture(i,e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};l.\u0275fac=function(e){return new(e||l)(I(_e),I(se),I(le))},l.\u0275cmp=z({type:l,selectors:[["app-table"]],inputs:{filter:"filter",data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle"},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},standalone:!0,features:[H],decls:18,vars:6,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[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"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[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"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],[1,"p-0","pointer","cell-hover",3,"click","ngClass"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(e,o){e&1&&(c(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),p(7,"Product"),_(),s(8,be,3,1,"mat-slide-toggle",9),_()(),c(9,"th",10),p(10,"Variant"),_(),c(11,"th",11),p(12,"SKU"),_(),s(13,ve,2,1,"ng-template",12)(14,Se,2,0,"th",11)(15,we,8,6,"ng-container",13),_()(),M(16,Le,3,0,"tbody",null,E),_()()),e&2&&(r(8),P(o.showProductToggle?8:-1),r(5),m("ngxPermissionsOnly",T(4,j,o.rolePriceEdit)),r(),P(o.filter!=null&&o.filter.HiddenIPOSInventory?-1:14),r(),m("ngForOf",o.channel),r(),V(o.data))},dependencies:[J,q,K,X,Y,G,ne,Q,ee,te,ue,de,me,pe,ge,re,oe,ce,ae,xe],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}"]});let t=l;return t})();export{xt as a};