marketplacepos 5.51.0 → 5.51.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-53B6D5OR.js → chunk-2JS77RTQ.js} +1 -1
- package/Marketplace/{chunk-OPCGCQMZ.js → chunk-2MC4ICGX.js} +1 -1
- package/Marketplace/{chunk-SLQ42VND.js → chunk-3OPIBKGC.js} +1 -1
- package/Marketplace/{chunk-7RIUHK6K.js → chunk-4H6YQH5Y.js} +1 -1
- package/Marketplace/{chunk-25Q56ATV.js → chunk-5EGTHBHU.js} +1 -1
- package/Marketplace/{chunk-E6W25RW5.js → chunk-5ZKD2ZJE.js} +1 -1
- package/Marketplace/{chunk-2PMJPSC4.js → chunk-6KAANNEH.js} +2 -2
- package/Marketplace/{chunk-C64L25TP.js → chunk-6ZRATZJD.js} +1 -1
- package/Marketplace/{chunk-6DGG765N.js → chunk-772J5O6W.js} +1 -1
- package/Marketplace/{chunk-YF7CCYHF.js → chunk-7RPUDPF6.js} +1 -1
- package/Marketplace/{chunk-J4RDYEJC.js → chunk-A24BFVXA.js} +1 -1
- package/Marketplace/{chunk-LOVYZLSU.js → chunk-BQFOS7WM.js} +1 -1
- package/Marketplace/{chunk-LWUMLKSO.js → chunk-CKH47T4N.js} +1 -1
- package/Marketplace/{chunk-T3CN3WQD.js → chunk-D765LK7G.js} +1 -1
- package/Marketplace/{chunk-36OIR6DM.js → chunk-E22EMCMR.js} +1 -1
- package/Marketplace/{chunk-VBVBTC2P.js → chunk-FSLUPR5I.js} +1 -1
- package/Marketplace/{chunk-364CDNZV.js → chunk-FYQFBMXR.js} +1 -1
- package/Marketplace/{chunk-ILFUI3MT.js → chunk-GJANGM3E.js} +1 -1
- package/Marketplace/{chunk-Q5IVQP3E.js → chunk-GRQA7Y7Y.js} +1 -1
- package/Marketplace/{chunk-ZMSM2NR7.js → chunk-GYCHAJYH.js} +1 -1
- package/Marketplace/{chunk-SASGSPGQ.js → chunk-HEK6DTVD.js} +1 -1
- package/Marketplace/{chunk-3Q6QZGLZ.js → chunk-HIGPOY23.js} +1 -1
- package/Marketplace/{chunk-AZEH7PMO.js → chunk-JNBROTGJ.js} +1 -1
- package/Marketplace/{chunk-GD5I7ADU.js → chunk-LI2DXLEI.js} +1 -1
- package/Marketplace/{chunk-EX4C4ZW4.js → chunk-LITY3VSE.js} +1 -1
- package/Marketplace/{chunk-A4X7F4MN.js → chunk-LPJSEQGR.js} +1 -1
- package/Marketplace/{chunk-EGJMTFNO.js → chunk-M3EGUVW7.js} +1 -1
- package/Marketplace/{chunk-HZTKN5RX.js → chunk-NJYWKADT.js} +1 -1
- package/Marketplace/{chunk-7QDKBMEA.js → chunk-NYBCG2UK.js} +1 -1
- package/Marketplace/{chunk-WH76SMZT.js → chunk-PDIHZKEM.js} +1 -1
- package/Marketplace/{chunk-AF6XAQPY.js → chunk-PG2DZ63W.js} +1 -1
- package/Marketplace/chunk-PPG26QRX.js +1 -0
- package/Marketplace/{chunk-BKCKASH3.js → chunk-PRMV4INM.js} +1 -1
- package/Marketplace/{chunk-4JCS7WPV.js → chunk-QCUYDIE3.js} +1 -1
- package/Marketplace/{chunk-HT2MSA66.js → chunk-QKXMWSIJ.js} +1 -1
- package/Marketplace/{chunk-R3BRUX7Z.js → chunk-QREYZRXT.js} +1 -1
- package/Marketplace/{chunk-EYYKWIXP.js → chunk-QVK3OFDS.js} +1 -1
- package/Marketplace/{chunk-BLOGT3TL.js → chunk-RIGKFQ2Q.js} +1 -1
- package/Marketplace/{chunk-ZXFWQ6VJ.js → chunk-RQI26KZX.js} +1 -1
- package/Marketplace/{chunk-T62YFSKW.js → chunk-SU5GJKTU.js} +1 -1
- package/Marketplace/{chunk-TLTFNFAB.js → chunk-TBDHXPBR.js} +1 -1
- package/Marketplace/{chunk-XSOP2OTT.js → chunk-TFCSRACM.js} +1 -1
- package/Marketplace/{chunk-6IZWIEUD.js → chunk-TIGXYFOW.js} +1 -1
- package/Marketplace/{chunk-4ITXH35D.js → chunk-UAQIEHEC.js} +1 -1
- package/Marketplace/{chunk-LCN52IJT.js → chunk-V7V5O62J.js} +1 -1
- package/Marketplace/{chunk-OJI34QN5.js → chunk-VR7NFJRO.js} +1 -1
- package/Marketplace/{chunk-K2CHDL7K.js → chunk-VWETHESQ.js} +1 -1
- package/Marketplace/{chunk-7E6JD2PT.js → chunk-VYYJFRP5.js} +1 -1
- package/Marketplace/{chunk-5YQUGH5Z.js → chunk-W4GP3QI7.js} +1 -1
- package/Marketplace/{chunk-IXNEMOFX.js → chunk-XR3S3ZAY.js} +1 -1
- package/Marketplace/{chunk-ZMMMNVOU.js → chunk-YEVETIZF.js} +1 -1
- package/Marketplace/{chunk-62YNPW6Q.js → chunk-YH3KWMUX.js} +1 -1
- package/Marketplace/{chunk-M5JNIPMS.js → chunk-YM4QLIHR.js} +1 -1
- package/Marketplace/{chunk-XAL6YLNQ.js → chunk-YNWLLBHM.js} +1 -1
- package/Marketplace/{chunk-BVW7WI5I.js → chunk-YTEEAEDW.js} +1 -1
- package/Marketplace/{chunk-WEJBY3OB.js → chunk-Z53UJ4A4.js} +1 -1
- package/Marketplace/{chunk-OMY5ASFA.js → chunk-ZCJEYG3D.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-SOO5LINL.js → main-TW7CIXAJ.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-5NWJOQN5.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-YKKHSYDW.js";import{a as J}from"./chunk-
|
|
1
|
+
import{a as Q}from"./chunk-YKKHSYDW.js";import{a as J}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as q}from"./chunk-ZZYFVEJO.js";import{a as z}from"./chunk-DLHIDOS3.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as j}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as b}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as Z,h as G,m as H}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as O}from"./chunk-D6JH2KV4.js";import{e as W,g as $}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as R,B as F,w as N}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as U,Ia as D,Nc as a,Oc as g,Rc as T,Sc as P,Tc as B,Uc as A,Z as V,ac as I,cc as k,dc as E,fc as L,gc as K,hc as s,ic as e,id as v,jc as t,jd as y,kc as c,mb as M,ob as l,ra as x,rc as w,wc as h,ya as u,yc as S,za as d}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function X(r,p){if(r&1){let o=w();e(0,"img",21),h("click",function(m){u(o);let i=S().$implicit,n=S();return d(n.onZoomImage(m,i==null?null:i.ImageUrl))}),t()}if(r&2){let o=S().$implicit;s("src",o==null?null:o.ThumbnailUrl,M)}}function Y(r,p){r&1&&c(0,"img",17)}function ee(r,p){if(r&1&&(e(0,"tr")(1,"td")(2,"div",15),I(3,X,1,1,"img",16)(4,Y,1,0,"img",17),t()(),e(5,"td"),a(6),t(),e(7,"td"),a(8),t(),e(9,"td")(10,"div",18),c(11,"app-channel-logo",19),e(12,"span"),a(13),t()()(),e(14,"td",20),a(15),v(16,"number"),t()()),r&2){let o=p.$implicit;l(3),k(o.ImageUrl?3:4),l(3),g(o.Name),l(2),g(o.SKU),l(3),s("typeId",o.TypeID),l(2),g(o.ChannelName),l(2),g(y(16,6,o.Count))}}var Ce=(()=>{let p=class p{constructor(){this.httpService=x(O),this.biggerPictureService=x(z),this.filter=D({PageNumber:1,RowCount:20,ListChannelID:[]}),this.rowCountApi=b.GetMultilistingSKUCount,this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(b.GetMultiListingSKU,this.filter()).pipe(V(1))}onZoomImage(_,m){this.biggerPictureService.openBiggerPicture(_,m)}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=U({type:p,selectors:[["app-duplicate-sku-v2"]],decls:33,vars:8,consts:[["headerTitle","Duplicate SKU","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/duplicate-sku",1,"d-flex","align-items-center","gap-2","btn","btn-outline-secondary","btn-lg"],[1,"fa-solid","fa-credit-card"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[2,"width","200px"],[2,"width","250px"],[1,"text-end",2,"width","50px"],[3,"next","previous","filter","totaldata","rowCountApi"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"d-flex","align-items-center"],[3,"typeId"],[1,"text-end"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"]],template:function(m,i){if(m&1){let n=w();A(0),v(1,"async"),e(2,"mainpanel",0),h("onSubmit",function(){return u(n),d(i.initMultipleListingSKU())}),e(3,"actions")(4,"a",1),c(5,"i",2),e(6,"span"),a(7,"Card View"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),B("ngModelChange",function(C){return u(n),P(i.filter().ListChannelID,C)||(i.filter().ListChannelID=C),d(C)}),t()()(),e(13,"content")(14,"div",5)(15,"div",6)(16,"div",7)(17,"table",8)(18,"thead",9)(19,"tr"),c(20,"th",10),e(21,"th"),a(22,"Product"),t(),e(23,"th",11),a(24,"SKU"),t(),e(25,"th",12),a(26,"Channel"),t(),e(27,"th",13),a(28,"Count"),t()()(),e(29,"tbody"),L(30,ee,17,8,"tr",null,E),t()(),e(32,"app-custom-paginator",14),h("next",function(){return u(n),d(i.initMultipleListingSKU())})("previous",function(){return u(n),d(i.initMultipleListingSKU())}),t()()()()()()}if(m&2){let n=y(1,6,i.multipleListingSKU$);l(2),s("hideSearchBox",!0),l(10),s("multiple",!0),T("ngModel",i.filter().ListChannelID),l(18),K(n==null?null:n.Data),l(2),s("filter",i.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("rowCountApi",i.rowCountApi)}},dependencies:[F,j,q,$,W,Q,J,Z,G,H,N,R],encapsulation:2});let r=p;return r})();export{Ce as DuplicateSkuV2Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as N}from"./chunk-ISMIPSYN.js";import{a as Te}from"./chunk-A6SP65CH.js";import{a as Fe,b as ve,c as be,d as L,e as W}from"./chunk-C67KF7MG.js";import{a as we}from"./chunk-TYSM3R5E.js";import{a as Pe,b as ye}from"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as xe,d as Se}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as he}from"./chunk-BZWZ64N5.js";import{a as fe}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as ue}from"./chunk-DLHIDOS3.js";import{a as ge}from"./chunk-LCN52IJT.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as me,b as Ce}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as pe}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ae}from"./chunk-ZSUWHVKX.js";import{h as oe}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as ne,c as ie}from"./chunk-NB2H6KA7.js";import{c as Y}from"./chunk-UPRDDI4K.js";import{A as de,b as re,c as le,h as ce,m as se,o as _e}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as ee,e as te}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as E,B as Q,G as X,q as J,w as Z}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as A,Hb as q,Ia as H,Nb as M,Nc as p,Oc as B,Pc as T,Rc as P,Sc as y,Tc as w,Xc as G,Z as $,_c as K,ac as h,ad as V,cc as g,dc as k,ea as z,fc as O,gc as R,hc as C,ic as a,id as v,jc as l,jd as b,kc as F,kd as j,mb as D,ob as c,ra as u,rc as S,wc as x,ya as _,yc as r,za as d}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var U=o=>[o],Ve=o=>({"text-decoration-line-through":o}),Ie=o=>({"bg-gradient-warning":o});function De(o,s){if(o&1){let e=S();a(0,"button",13),x("click",function(){_(e);let t=r(),i=r(2);return d(i.updateStock(t))}),F(1,"i",14),p(2," Update "),l()}}function Ee(o,s){if(o&1){let e=S();a(0,"div",8),h(1,De,3,0,"button",10),a(2,"button",11),x("click",function(){_(e);let t=r(2);return d(t.openExportDialog())}),F(3,"i",12),a(4,"span"),p(5,"Export"),l()()()}if(o&2){let e=r(2);c(),g(e.productService.hasSelectionVariant(s)?1:-1)}}function Me(o,s){if(o&1){let e=S();a(0,"th")(1,"input",28),x("change",function(t){_(e);let i=r(),m=r(2);return d(m.onSelectAllSKU(t.target.checked,i))}),l()()}}function Ne(o,s){if(o&1){let e=S();a(0,"input",46),w("ngModelChange",function(t){_(e);let i=r(4).$implicit;return y(i.selected,t)||(i.selected=t),d(t)}),x("ngModelChange",function(){_(e);let t=r(4).$implicit,i=r(3);return d(i.onCheckboxStateProduct(t))}),l()}if(o&2){let e=r(4).$implicit;P("ngModel",e.selected)}}function ke(o,s){if(o&1&&M(0,Ne,1,1,"ng-template",22),o&2){let e=r(6);C("ngxPermissionsOnly",V(1,U,e.rolePriceEdit))}}function Oe(o,s){if(o&1){let e=S();a(0,"img",47),x("click",function(t){_(e);let i=r(3).$implicit,m=r(3);return d(m.onZoomImage(t,i==null?null:i.ImageUrl))}),l()}if(o&2){let e=r(3).$implicit;C("src",G(e.ThumbnailUrl),D)}}function Re(o,s){o&1&&F(0,"img",42)}function Be(o,s){if(o&1&&(a(0,"small",45),p(1),l()),o&2){let e=r(3).$implicit;c(),T("(",e.Category,")")}}function Le(o,s){if(o&1&&(a(0,"td",40)(1,"div",31),h(2,ke,1,3,null,22),a(3,"div"),h(4,Oe,1,2,"img",41)(5,Re,1,0,"img",42),l()()(),a(6,"td",43)(7,"span",44),p(8),l(),h(9,Be,2,1,"small",45),l()),o&2){let e=r(2).$implicit;C("rowSpan",e.Variants.length),c(2),g((e.Variants==null?null:e.Variants.length)>1?2:-1),c(2),g(e.ThumbnailUrl?4:5),c(2),C("rowSpan",e.Variants.length),c(2),B(e.Name),c(),g(e.Category?9:-1)}}function We(o,s){if(o&1){let e=S();a(0,"input",50),w("ngModelChange",function(t){_(e);let i=r(2).$implicit;return y(i.selected,t)||(i.selected=t),d(t)}),l()}if(o&2){let e=r(2).$implicit;P("ngModel",e.selected)}}function Ue(o,s){if(o&1&&(a(0,"td",48),h(1,We,1,1,"input",49),l()),o&2){let e=r().$implicit;c(),g(e.UnitPrice>=0?1:-1)}}function Ae(o,s){o&1&&(a(0,"div",32),p(1," Not Found "),l())}function $e(o,s){if(o&1&&(a(0,"div"),p(1),v(2,"number"),l()),o&2){let e=r().$implicit;c(),T(" ",b(2,1,e.UnitPrice)," ")}}function ze(o,s){if(o&1&&(a(0,"div",33)(1,"a",36),F(2,"i",51),l()()),o&2){let e=r().$implicit,n=r(4);c(),C("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),D)}}function He(o,s){if(o&1){let e=S();a(0,"div",52),x("click",function(){_(e);let t=r().$implicit,i=r().$implicit,m=r(2),f=r();return d(f.openTableDialog(t,i,m))}),p(1),v(2,"number"),l()}if(o&2){let e=r().$implicit;c(),T(" ",b(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function qe(o,s){if(o&1){let e=S();a(0,"tr",29),h(1,Le,10,6),a(2,"td",20),p(3),l(),a(4,"td",23)(5,"span",30),p(6),l()(),M(7,Ue,2,1,"ng-template",22),a(8,"td",23)(9,"div",31),h(10,Ae,2,0,"div",32),h(11,$e,3,3,"div"),h(12,ze,3,1,"div",33),l()(),a(13,"td",34)(14,"div",31),h(15,He,3,3,"div",35),a(16,"div",33)(17,"a",36),F(18,"i",37),l()(),a(19,"div",33)(20,"div",38),x("click",function(){let t=_(e).$implicit,i=r(4);return d(i.refreshPrice(t))}),F(21,"i",39),l()()()()()}if(o&2){let e=s.$implicit,n=s.$index,t=r(4);c(),g(n==0?1:-1),c(2),B(e.Model),c(2),C("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",V(12,Ve,e.Discontinued)),c(),T(" ",e.Code," "),c(),C("ngxPermissionsOnly",V(14,U,t.rolePriceEdit)),c(3),g((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),c(),g((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),c(),g((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),c(),C("ngClass",V(16,Ie,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),c(2),g(e.Channel.length>0?15:-1),c(2),C("href",e.Channel[0]==null?null:e.Channel[0].Url,D)}}function Ge(o,s){if(o&1&&O(0,qe,22,18,"tr",29,k),o&2){let e=s.$implicit;R(e.Variants)}}function Ke(o,s){if(o&1){let e=S();a(0,"div",9)(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr")(5,"th",18),p(6," Product "),a(7,"div")(8,"mat-slide-toggle",19),w("ngModelChange",function(t){_(e);let i=r(2);return y(i.toggleDifferentInventory,t)||(i.toggleDifferentInventory=t),d(t)}),x("toggleChange",function(){_(e);let t=r(2);return d(t.onToggleDifferentInventory())}),a(9,"small",6),p(10,"FILTER DIFFERENT PRICE"),l()()()(),a(11,"th",20),p(12,"Variant"),l(),a(13,"th",21),p(14,"SKU"),l(),M(15,Me,2,0,"ng-template",22),a(16,"th",23),p(17,"POS"),l(),a(18,"th",23)(19,"div",24),x("click",function(){_(e);let t=r(2);return d(t.openModalFilter())}),F(20,"img",25),a(21,"span",26),p(22),v(23,"stringLimit"),l()()()()(),a(24,"tbody"),O(25,Ge,2,0,null,null,k),l()(),a(27,"infinite-paginator",27),v(28,"async"),x("onNextPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=r(2);return d(t.infinitePagination.getRowCount(t.searchFilter))}),l()()()}if(o&2){let e=r(2);c(8),P("ngModel",e.toggleDifferentInventory),c(7),C("ngxPermissionsOnly",V(16,U,e.rolePriceEdit)),c(4),C("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),c(),C("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),c(2),T(" ",j(23,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),c(3),R(s),c(2),C("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",b(28,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function je(o,s){if(o&1){let e=S();a(0,"mainpanel",1),w("textChange",function(t){_(e);let i=r();return y(i.searchFilter.text,t)||(i.searchFilter.text=t),d(t)}),x("onSubmit",function(){_(e);let t=r();return d(t.onSearch())}),a(1,"filters")(2,"div",2)(3,"label",3),p(4,"Channel"),l(),a(5,"app-channel-options-v2",4),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.ChannelID,t)||(i.searchFilter.ChannelID=t),d(t)}),l()(),a(6,"div",2)(7,"filter-query-type",5),w("numberFilterComparatorChange",function(t){_(e);let i=r();return y(i.searchFilter.NumberFilterComparator,t)||(i.searchFilter.NumberFilterComparator=t),d(t)})("searchTypeChange",function(t){_(e);let i=r();return y(i.searchFilter.SearchType,t)||(i.searchFilter.SearchType=t),d(t)}),l()(),a(8,"div",2)(9,"label",6),p(10,"Page Number"),l(),a(11,"input",7),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),d(t)}),l()(),a(12,"div")(13,"label",6),p(14,"Page Size"),l(),a(15,"input",7),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),d(t)}),l()()(),a(16,"actions"),h(17,Ee,6,1,"div",8),v(18,"async"),l(),a(19,"content"),h(20,Ke,29,18,"div",9),v(21,"async"),l()()}if(o&2){let e,n,t=s,i=r();C("headerTitle",i.pageTitle),P("text",i.searchFilter.text),C("searchBoxPlaceHolder",i.searchPlaceholder()),c(5),P("ngModel",i.searchFilter.ChannelID),c(2),C("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions),P("numberFilterComparator",i.searchFilter.NumberFilterComparator),C("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions),P("searchType",i.searchFilter.SearchType),c(4),P("ngModel",i.searchFilter.PageNumber),c(4),P("ngModel",i.searchFilter.RowCount),c(2),g((e=b(18,12,i.data$))?17:-1,e),c(3),g((n=b(21,14,i.data$))?20:-1,n)}}var Et=(()=>{let s=class s{constructor(){this.http=u(te),this.toastr=u(ee),this.dialog=u(pe),this.productService=u(ge),this.biggerPictureService=u(ue),this.authService=u(oe),this.mainPanelService=u(me),this.decimalPipe=u(E),this.placeholderService=u(xe),this.infinitePagination=u(L),this.updateResHandling=u(W),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=ae.PriceUpdate,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.searchPlaceholder=H("Search ...");let n=this.authService;this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=n.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(z(n=>{this.searchFilter=n.Filter,this.searchFilter.filterModel=N.ALL,this.initSearchPlaceholder(),this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=N.ALL:this.searchFilter.filterModel=N.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(n){n.Variants=n.Variants.map(t=>(t.selected=n.selected,t))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(n){let i=this.productService.selectedVariantProduct(n).map(f=>({ID:f.ID,ChannelID:f.Channel[0].ChannelID,Code:f.Code,Price:f.UnitPrice})),m={ListChannelID:[this.searchFilter.ChannelID],ListPrice:i};this.http.post("/api/Price/UpdateChannel",m).subscribe(f=>{this.onSearch(),this.handlingUpdateStock(f.Response)})}handlingUpdateStock(n){if(n.success_list?.length>0||n.failure_list?.length>0){let t=n.failure_list,i=n.success_list;this.updateResHandling.responseHandling(i,t,"Price")}else this.toastr.error(n[0]?.Exception,"Error")}refreshPrice(n){let t={ChannelItemID:n?.Channel[0].ChannelItemID,ChannelVariationID:n?.Channel[0]?.ChannelVariationID,ChannelID:n?.Channel[0]?.ChannelID,VariantID:n.ID};this.http.post("/api/Price/RefreshPriceChannel",t).subscribe(i=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel(),this.initSearchPlaceholder()}openTableDialog(n,t,i){let m=JSON.parse(JSON.stringify(n));this.dialog.open(Fe,{data:{Name:t.Name,Variant:m,ChannelID:m?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:m?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(I=>Y.IsNotEmpty(I))).subscribe(I=>{this.updateItemAfterDialog(I,n)})}updateItemAfterDialog(n,t){let i={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,Price:parseFloat(n.Price),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Price/UpdatePriceByID",i).subscribe(m=>{let f=this.productService.findChannelById(i.ID,this.channelOptions),I=i.Price?this.decimalPipe.transform(i.Price):i.Price;this.toastr.success(`Successfully updated ${n.ItemName} (${n.VarName}) price in ${f.Name} to ${I}`,"Success"),t.Channel[0]&&(t.Channel[0].Price=i.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(n=>n.ID==this.searchFilter.ChannelID)}onSelectAllSKU(n,t){t=t.map(i=>(i.Variants=i.Variants.map(m=>(m.selected=n,m)),i))}onZoomImage(n,t){this.biggerPictureService.openBiggerPicture(n,t)}openExportDialog(){this.dialog.open(we,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=q({type:s,selectors:[["app-price-single-channel"]],features:[K([L,Te,X("https://resc.cloudinary.com/"),E,W])],decls:2,vars:3,consts:[[1,"single-price",3,"headerTitle","text","searchBoxPlaceHolder"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text","searchBoxPlaceHolder"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"d-flex"],[1,"container-fluid","mt-5"],[1,"btn","btn-success"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(t,i){if(t&1&&(h(0,je,22,16,"mainpanel",0),v(1,"async")),t&2){let m;g((m=b(1,1,i.loader$))?0:-1,m)}},dependencies:[Q,J,Ce,de,le,_e,re,ce,se,be,ie,ne,ye,Pe,fe,he,Se,Z,E,ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let o=s;return o})();export{Et as PriceSingleChannelComponent};
|
|
1
|
+
import{a as N}from"./chunk-ISMIPSYN.js";import{a as Te}from"./chunk-A6SP65CH.js";import{a as Fe,b as ve,c as be,d as L,e as W}from"./chunk-C67KF7MG.js";import{a as we}from"./chunk-TYSM3R5E.js";import{a as Pe,b as ye}from"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as xe,d as Se}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as he}from"./chunk-BZWZ64N5.js";import{a as fe}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as ue}from"./chunk-DLHIDOS3.js";import{a as ge}from"./chunk-V7V5O62J.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-PRMV4INM.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as me,b as Ce}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as pe}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ae}from"./chunk-ZSUWHVKX.js";import{h as oe}from"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as ne,c as ie}from"./chunk-NB2H6KA7.js";import{c as Y}from"./chunk-UPRDDI4K.js";import{A as de,b as re,c as le,h as ce,m as se,o as _e}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as ee,e as te}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as E,B as Q,G as X,q as J,w as Z}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as A,Hb as q,Ia as H,Nb as M,Nc as p,Oc as B,Pc as T,Rc as P,Sc as y,Tc as w,Xc as G,Z as $,_c as K,ac as h,ad as V,cc as g,dc as k,ea as z,fc as O,gc as R,hc as C,ic as a,id as v,jc as l,jd as b,kc as F,kd as j,mb as D,ob as c,ra as u,rc as S,wc as x,ya as _,yc as r,za as d}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var U=o=>[o],Ve=o=>({"text-decoration-line-through":o}),Ie=o=>({"bg-gradient-warning":o});function De(o,s){if(o&1){let e=S();a(0,"button",13),x("click",function(){_(e);let t=r(),i=r(2);return d(i.updateStock(t))}),F(1,"i",14),p(2," Update "),l()}}function Ee(o,s){if(o&1){let e=S();a(0,"div",8),h(1,De,3,0,"button",10),a(2,"button",11),x("click",function(){_(e);let t=r(2);return d(t.openExportDialog())}),F(3,"i",12),a(4,"span"),p(5,"Export"),l()()()}if(o&2){let e=r(2);c(),g(e.productService.hasSelectionVariant(s)?1:-1)}}function Me(o,s){if(o&1){let e=S();a(0,"th")(1,"input",28),x("change",function(t){_(e);let i=r(),m=r(2);return d(m.onSelectAllSKU(t.target.checked,i))}),l()()}}function Ne(o,s){if(o&1){let e=S();a(0,"input",46),w("ngModelChange",function(t){_(e);let i=r(4).$implicit;return y(i.selected,t)||(i.selected=t),d(t)}),x("ngModelChange",function(){_(e);let t=r(4).$implicit,i=r(3);return d(i.onCheckboxStateProduct(t))}),l()}if(o&2){let e=r(4).$implicit;P("ngModel",e.selected)}}function ke(o,s){if(o&1&&M(0,Ne,1,1,"ng-template",22),o&2){let e=r(6);C("ngxPermissionsOnly",V(1,U,e.rolePriceEdit))}}function Oe(o,s){if(o&1){let e=S();a(0,"img",47),x("click",function(t){_(e);let i=r(3).$implicit,m=r(3);return d(m.onZoomImage(t,i==null?null:i.ImageUrl))}),l()}if(o&2){let e=r(3).$implicit;C("src",G(e.ThumbnailUrl),D)}}function Re(o,s){o&1&&F(0,"img",42)}function Be(o,s){if(o&1&&(a(0,"small",45),p(1),l()),o&2){let e=r(3).$implicit;c(),T("(",e.Category,")")}}function Le(o,s){if(o&1&&(a(0,"td",40)(1,"div",31),h(2,ke,1,3,null,22),a(3,"div"),h(4,Oe,1,2,"img",41)(5,Re,1,0,"img",42),l()()(),a(6,"td",43)(7,"span",44),p(8),l(),h(9,Be,2,1,"small",45),l()),o&2){let e=r(2).$implicit;C("rowSpan",e.Variants.length),c(2),g((e.Variants==null?null:e.Variants.length)>1?2:-1),c(2),g(e.ThumbnailUrl?4:5),c(2),C("rowSpan",e.Variants.length),c(2),B(e.Name),c(),g(e.Category?9:-1)}}function We(o,s){if(o&1){let e=S();a(0,"input",50),w("ngModelChange",function(t){_(e);let i=r(2).$implicit;return y(i.selected,t)||(i.selected=t),d(t)}),l()}if(o&2){let e=r(2).$implicit;P("ngModel",e.selected)}}function Ue(o,s){if(o&1&&(a(0,"td",48),h(1,We,1,1,"input",49),l()),o&2){let e=r().$implicit;c(),g(e.UnitPrice>=0?1:-1)}}function Ae(o,s){o&1&&(a(0,"div",32),p(1," Not Found "),l())}function $e(o,s){if(o&1&&(a(0,"div"),p(1),v(2,"number"),l()),o&2){let e=r().$implicit;c(),T(" ",b(2,1,e.UnitPrice)," ")}}function ze(o,s){if(o&1&&(a(0,"div",33)(1,"a",36),F(2,"i",51),l()()),o&2){let e=r().$implicit,n=r(4);c(),C("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),D)}}function He(o,s){if(o&1){let e=S();a(0,"div",52),x("click",function(){_(e);let t=r().$implicit,i=r().$implicit,m=r(2),f=r();return d(f.openTableDialog(t,i,m))}),p(1),v(2,"number"),l()}if(o&2){let e=r().$implicit;c(),T(" ",b(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function qe(o,s){if(o&1){let e=S();a(0,"tr",29),h(1,Le,10,6),a(2,"td",20),p(3),l(),a(4,"td",23)(5,"span",30),p(6),l()(),M(7,Ue,2,1,"ng-template",22),a(8,"td",23)(9,"div",31),h(10,Ae,2,0,"div",32),h(11,$e,3,3,"div"),h(12,ze,3,1,"div",33),l()(),a(13,"td",34)(14,"div",31),h(15,He,3,3,"div",35),a(16,"div",33)(17,"a",36),F(18,"i",37),l()(),a(19,"div",33)(20,"div",38),x("click",function(){let t=_(e).$implicit,i=r(4);return d(i.refreshPrice(t))}),F(21,"i",39),l()()()()()}if(o&2){let e=s.$implicit,n=s.$index,t=r(4);c(),g(n==0?1:-1),c(2),B(e.Model),c(2),C("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",V(12,Ve,e.Discontinued)),c(),T(" ",e.Code," "),c(),C("ngxPermissionsOnly",V(14,U,t.rolePriceEdit)),c(3),g((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),c(),g((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),c(),g((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),c(),C("ngClass",V(16,Ie,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),c(2),g(e.Channel.length>0?15:-1),c(2),C("href",e.Channel[0]==null?null:e.Channel[0].Url,D)}}function Ge(o,s){if(o&1&&O(0,qe,22,18,"tr",29,k),o&2){let e=s.$implicit;R(e.Variants)}}function Ke(o,s){if(o&1){let e=S();a(0,"div",9)(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr")(5,"th",18),p(6," Product "),a(7,"div")(8,"mat-slide-toggle",19),w("ngModelChange",function(t){_(e);let i=r(2);return y(i.toggleDifferentInventory,t)||(i.toggleDifferentInventory=t),d(t)}),x("toggleChange",function(){_(e);let t=r(2);return d(t.onToggleDifferentInventory())}),a(9,"small",6),p(10,"FILTER DIFFERENT PRICE"),l()()()(),a(11,"th",20),p(12,"Variant"),l(),a(13,"th",21),p(14,"SKU"),l(),M(15,Me,2,0,"ng-template",22),a(16,"th",23),p(17,"POS"),l(),a(18,"th",23)(19,"div",24),x("click",function(){_(e);let t=r(2);return d(t.openModalFilter())}),F(20,"img",25),a(21,"span",26),p(22),v(23,"stringLimit"),l()()()()(),a(24,"tbody"),O(25,Ge,2,0,null,null,k),l()(),a(27,"infinite-paginator",27),v(28,"async"),x("onNextPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=r(2);return d(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=r(2);return d(t.infinitePagination.getRowCount(t.searchFilter))}),l()()()}if(o&2){let e=r(2);c(8),P("ngModel",e.toggleDifferentInventory),c(7),C("ngxPermissionsOnly",V(16,U,e.rolePriceEdit)),c(4),C("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),c(),C("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),c(2),T(" ",j(23,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),c(3),R(s),c(2),C("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",b(28,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function je(o,s){if(o&1){let e=S();a(0,"mainpanel",1),w("textChange",function(t){_(e);let i=r();return y(i.searchFilter.text,t)||(i.searchFilter.text=t),d(t)}),x("onSubmit",function(){_(e);let t=r();return d(t.onSearch())}),a(1,"filters")(2,"div",2)(3,"label",3),p(4,"Channel"),l(),a(5,"app-channel-options-v2",4),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.ChannelID,t)||(i.searchFilter.ChannelID=t),d(t)}),l()(),a(6,"div",2)(7,"filter-query-type",5),w("numberFilterComparatorChange",function(t){_(e);let i=r();return y(i.searchFilter.NumberFilterComparator,t)||(i.searchFilter.NumberFilterComparator=t),d(t)})("searchTypeChange",function(t){_(e);let i=r();return y(i.searchFilter.SearchType,t)||(i.searchFilter.SearchType=t),d(t)}),l()(),a(8,"div",2)(9,"label",6),p(10,"Page Number"),l(),a(11,"input",7),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),d(t)}),l()(),a(12,"div")(13,"label",6),p(14,"Page Size"),l(),a(15,"input",7),w("ngModelChange",function(t){_(e);let i=r();return y(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),d(t)}),l()()(),a(16,"actions"),h(17,Ee,6,1,"div",8),v(18,"async"),l(),a(19,"content"),h(20,Ke,29,18,"div",9),v(21,"async"),l()()}if(o&2){let e,n,t=s,i=r();C("headerTitle",i.pageTitle),P("text",i.searchFilter.text),C("searchBoxPlaceHolder",i.searchPlaceholder()),c(5),P("ngModel",i.searchFilter.ChannelID),c(2),C("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions),P("numberFilterComparator",i.searchFilter.NumberFilterComparator),C("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions),P("searchType",i.searchFilter.SearchType),c(4),P("ngModel",i.searchFilter.PageNumber),c(4),P("ngModel",i.searchFilter.RowCount),c(2),g((e=b(18,12,i.data$))?17:-1,e),c(3),g((n=b(21,14,i.data$))?20:-1,n)}}var Et=(()=>{let s=class s{constructor(){this.http=u(te),this.toastr=u(ee),this.dialog=u(pe),this.productService=u(ge),this.biggerPictureService=u(ue),this.authService=u(oe),this.mainPanelService=u(me),this.decimalPipe=u(E),this.placeholderService=u(xe),this.infinitePagination=u(L),this.updateResHandling=u(W),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=ae.PriceUpdate,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.searchPlaceholder=H("Search ...");let n=this.authService;this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=n.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(z(n=>{this.searchFilter=n.Filter,this.searchFilter.filterModel=N.ALL,this.initSearchPlaceholder(),this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=N.ALL:this.searchFilter.filterModel=N.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(n){n.Variants=n.Variants.map(t=>(t.selected=n.selected,t))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(n){let i=this.productService.selectedVariantProduct(n).map(f=>({ID:f.ID,ChannelID:f.Channel[0].ChannelID,Code:f.Code,Price:f.UnitPrice})),m={ListChannelID:[this.searchFilter.ChannelID],ListPrice:i};this.http.post("/api/Price/UpdateChannel",m).subscribe(f=>{this.onSearch(),this.handlingUpdateStock(f.Response)})}handlingUpdateStock(n){if(n.success_list?.length>0||n.failure_list?.length>0){let t=n.failure_list,i=n.success_list;this.updateResHandling.responseHandling(i,t,"Price")}else this.toastr.error(n[0]?.Exception,"Error")}refreshPrice(n){let t={ChannelItemID:n?.Channel[0].ChannelItemID,ChannelVariationID:n?.Channel[0]?.ChannelVariationID,ChannelID:n?.Channel[0]?.ChannelID,VariantID:n.ID};this.http.post("/api/Price/RefreshPriceChannel",t).subscribe(i=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel(),this.initSearchPlaceholder()}openTableDialog(n,t,i){let m=JSON.parse(JSON.stringify(n));this.dialog.open(Fe,{data:{Name:t.Name,Variant:m,ChannelID:m?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:m?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(I=>Y.IsNotEmpty(I))).subscribe(I=>{this.updateItemAfterDialog(I,n)})}updateItemAfterDialog(n,t){let i={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,Price:parseFloat(n.Price),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Price/UpdatePriceByID",i).subscribe(m=>{let f=this.productService.findChannelById(i.ID,this.channelOptions),I=i.Price?this.decimalPipe.transform(i.Price):i.Price;this.toastr.success(`Successfully updated ${n.ItemName} (${n.VarName}) price in ${f.Name} to ${I}`,"Success"),t.Channel[0]&&(t.Channel[0].Price=i.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(n=>n.ID==this.searchFilter.ChannelID)}onSelectAllSKU(n,t){t=t.map(i=>(i.Variants=i.Variants.map(m=>(m.selected=n,m)),i))}onZoomImage(n,t){this.biggerPictureService.openBiggerPicture(n,t)}openExportDialog(){this.dialog.open(we,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=q({type:s,selectors:[["app-price-single-channel"]],features:[K([L,Te,X("https://resc.cloudinary.com/"),E,W])],decls:2,vars:3,consts:[[1,"single-price",3,"headerTitle","text","searchBoxPlaceHolder"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text","searchBoxPlaceHolder"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"d-flex"],[1,"container-fluid","mt-5"],[1,"btn","btn-success"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(t,i){if(t&1&&(h(0,je,22,16,"mainpanel",0),v(1,"async")),t&2){let m;g((m=b(1,1,i.loader$))?0:-1,m)}},dependencies:[Q,J,Ce,de,le,_e,re,ce,se,be,ie,ne,ye,Pe,fe,he,Se,Z,E,ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let o=s;return o})();export{Et as PriceSingleChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ne,b as Fe}from"./chunk-RIIIECQH.js";import{a as Pe}from"./chunk-JWDQVXQP.js";import{a as Ee,b as Ve}from"./chunk-K5WSFDNA.js";import{a as De}from"./chunk-VBVBTC2P.js";import{a as j}from"./chunk-L6CRWJ2O.js";import{a as Ae}from"./chunk-PV4OJSZI.js";import"./chunk-FSOZOROI.js";import"./chunk-VYI7JYH5.js";import"./chunk-BZWZ64N5.js";import{a as Me}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as Le}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as Te}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ke}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as Se,c as we,e as ve,f as ye,g as xe}from"./chunk-IA7NJXJD.js";import{a as be}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as _e}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as x}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as d,c as A}from"./chunk-UPRDDI4K.js";import{A as z,b as ge,c as fe,h as W,m as R,o as Ce}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as M,e as O}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as ue,B as he,w as me,y as de}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Cc as te,Dc as ie,Ec as ne,G,Hb as N,Ia as B,Mc as oe,Nc as m,Oc as P,Pc as E,Rc as S,Sc as w,Tc as v,Uc as re,Vc as ae,Wc as F,Z as J,_c as le,aa as X,ac as k,ad as pe,cc as T,dc as Z,fc as $,gc as ee,hc as y,ic as o,id as V,jc as r,jd as I,kc as _,kd as se,ma as D,mb as Y,ob as c,pd as ce,ra as C,rc as L,v as K,wc as b,ya as h,yc as f,za as g}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Q,b as q}from"./chunk-66YHNWRR.js";var Ie=(()=>{let l=class l{constructor(){this.http=C(O),this.toastr=C(M)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(K(p=>(p&&(p.Number=e),p)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case d.Tokopedia:let u=window.open("about:blank","_blank");u.document.write(e.File),u.document.close();break;case d.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case d.Shopee:var i=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),p=new Blob([i],{type:"octet/stream"});A.openDownloadFile(p,`${e?.Number}.pdf`);break;case d.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var Oe=(()=>{let l=class l{constructor(){this.dialogRef=C(Se),this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"h2",1),m(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),m(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),v("ngModelChange",function(u){return w(i.tandaiSudahDicetak,u)||(i.tandaiSudahDicetak=u),u}),r(),o(10,"span",7),m(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),m(14,"Cancel"),r(),o(15,"button",10),b("click",function(){return i.onPrint()}),m(16,"Cetak Pesanan"),r()()()),t&2&&(c(9),S("ngModel",i.tandaiSudahDicetak))},dependencies:[z,W,R,xe,ye,ve],encapsulation:2});let a=l;return a})();var U=(()=>{let l=class l{constructor(){this.httpService=C(O),this.shippingLabelService=C(Ie),this.toastrService=C(M),this.dialog=C(we)}printShippingLabel(e){switch(e?.MarketType){case d.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Shopee));break;case d.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tiktok));break;case d.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(G(t=>A.IsNotEmpty(t)),X(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tokopedia));break;case d.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Lazada));break;case d.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(p=>({OrderNumber:p.Number,ShopID:p.ShopID})),i="";switch(e[0]?.MarketType){case d.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case d.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case d.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(p=>{var u=Uint8Array.from(atob(p.File),We=>We.charCodeAt(0)),s=new Blob([u],{type:"octet/stream"});A.openDownloadFile(s,`${p?.Name}.pdf`)})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac});let a=l;return a})();var ze=["contextMenu"],Be=a=>({"td-cell-hover":a});function je(a,l){if(a&1){let n=L();o(0,"button",20),b("click",function(){h(n);let t=f(),i=F(0);return g(t.onDowloadShippingLabel(i))}),_(1,"i",21),o(2,"span"),m(3,"Download Shipping Label"),r()()}}function He(a,l){if(a&1){let n=L();o(0,"input",47),v("ngModelChange",function(t){h(n);let i=f().$implicit;return w(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){h(n);let t=f(3),i=F(0);return g(t.onSelectOrders(i))}),r()}if(a&2){let n=f().$implicit,e=f(2);S("ngModel",n.selected),y("disabled",e.selectedChannelType()!=null&&e.selectedChannelType()!=n.MarketType)}}function Ue(a,l){if(a&1&&_(0,"variants-dropdown",39),a&2){let n=f().$implicit;y("variants",n==null?null:n.Variants)}}function Qe(a,l){if(a&1&&_(0,"variant-with-image",40),a&2){let n=f().$implicit;y("variant",n==null?null:n.Variants[0])}}function qe(a,l){if(a&1&&(o(0,"span"),m(1),r()),a&2){let n=f().$implicit;c(),E("(",n.LogisticService==null?null:n.LogisticService.Option,")")}}function Ke(a,l){if(a&1){let n=L();o(0,"button",48),b("click",function(){h(n);let t=f().$implicit,i=f(2);return g(i.onPrintShippingLabel(t))}),_(1,"i",49),r()}}function Ge(a,l){if(a&1){let n=L();o(0,"tr")(1,"td"),k(2,He,1,2,"input",31),r(),o(3,"td")(4,"div",32),_(5,"img",33),V(6,"channelImage"),o(7,"div",34)(8,"div"),m(9),r(),o(10,"small",35)(11,"span"),m(12),r()()()()(),o(13,"td")(14,"div",36)(15,"div"),_(16,"order-link",37),r(),o(17,"small"),m(18),V(19,"date"),r(),_(20,"br"),o(21,"small"),_(22,"i",38),m(23),r()()(),o(24,"td"),k(25,Ue,1,1,"variants-dropdown",39)(26,Qe,1,1,"variant-with-image",40),r(),o(27,"td",41),m(28),V(29,"number"),r(),o(30,"td",42),b("mouseenter",function(t){let i=h(n).$implicit,p=f(2);return g(p.onMouseEnter(t,i))}),o(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),m(35),r(),k(36,qe,2,1,"span"),r(),o(37,"small"),m(38),r()()()(),o(39,"td",45),k(40,Ke,2,0,"button",46),r()()}if(a&2){let n=l.$implicit,e=f(2);c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?2:-1),c(3),y("src",I(6,16,n==null?null:n.MarketType),Y)("alt",n==null||n.Variants[0]==null?null:n.Variants[0].Name),c(4),P(n.Outlet),c(3),P(n.ChannelName),c(4),y("order",n),c(2),E(" ",se(19,18,n==null?null:n.Created,"dd/MM/yyyy HH:mm:ss")," "),c(5),E(" ",n.Customer," "),c(),oe(pe(23,Be,(n.Variants==null?null:n.Variants.length)>1)),c(),T((n.Variants==null?null:n.Variants.length)>1?25:26),c(3),P(I(29,21,n.Amount)),c(7),P(n.LogisticService!=null&&n.LogisticService.Name?n.LogisticService==null?null:n.LogisticService.Name:"-"),c(),T(n.LogisticService!=null&&n.LogisticService.Option&&(n.LogisticService==null?null:n.LogisticService.Option)!="Default"?36:-1),c(2),E(" ",n.ReferenceNumber?n.ReferenceNumber:"-"," "),c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?40:-1)}}function Je(a,l){if(a&1){let n=L();o(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),_(4,"th",25),o(5,"th",26),m(6,"Outlet"),r(),o(7,"th",26),m(8,"Number"),r(),o(9,"th"),m(10,"Items"),r(),o(11,"th",27),m(12,"Amount"),r(),o(13,"th",28),m(14,"Shipping"),r(),_(15,"th",29),r()(),o(16,"tbody"),$(17,Ge,41,25,"tr",null,Z),r()(),o(19,"app-custom-paginator",30),b("next",function(){h(n);let t=f();return g(t.initAwaitingCollection())})("previous",function(){h(n);let t=f();return g(t.initAwaitingCollection())}),r()()}if(a&2){let n=f(),e=F(0);c(17),ee(e),c(2),y("filter",n.filter())("totaldata",e==null?null:e.length)}}function Xe(a,l){a&1&&(o(0,"div",18),_(1,"app-empty-state"),r())}var Jt=(()=>{let l=class l{constructor(){this.printShippingService=C(U),this.orderService=C(j),this.toastr=C(M),this.fulfillmentService=C(Ne),this.channelType=d,this.selectedOrders=B([]),this.selectedChannelType=ce(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=B({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>q(Q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(J(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&te(ze,5),t&2){let p;ie(p=ne())&&(i.contextMenuEl=p.first)}},features:[le([j,U])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let p=L();re(0),V(1,"async"),o(2,"mainpanel",1),b("onSubmit",function(){return h(p),g(i.initAwaitingCollection())}),v("textChange",function(s){return h(p),w(i.filter().Number,s)||(i.filter().Number=s),g(s)}),o(3,"actions"),k(4,je,4,0,"button",2),o(5,"a",3),_(6,"i",4),o(7,"span"),m(8,"Order Fulfillment Display"),r()()(),o(9,"filters")(10,"div")(11,"label",5),m(12,"Channel"),r(),o(13,"app-channel-options-v2",6),v("ngModelChange",function(s){return h(p),w(i.filter().ListChannelID,s)||(i.filter().ListChannelID=s),g(s)}),r()(),o(14,"div",7)(15,"label",5),m(16,"From/To"),r(),o(17,"div",8)(18,"datepicker",9),v("dateChange",function(s){return h(p),w(i.filter().From,s)||(i.filter().From=s),g(s)}),r()(),o(19,"div")(20,"datepicker",10),v("dateChange",function(s){return h(p),w(i.filter().To,s)||(i.filter().To=s),g(s)}),r()()(),o(21,"div",7)(22,"label",11),m(23,"Page Number"),r(),o(24,"input",12),v("ngModelChange",function(s){return h(p),w(i.filter().PageNumber,s)||(i.filter().PageNumber=s),g(s)}),r()(),o(25,"div",7)(26,"label",11),m(27,"Page Size"),r(),o(28,"input",13),v("ngModelChange",function(s){return h(p),w(i.filter().PageSize,s)||(i.filter().PageSize=s),g(s)}),r()()(),o(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),k(33,Je,20,2,"div",17)(34,Xe,2,0,"div",18),r()()()()(),o(35,"app-context-menu",19,0),b("onSelectItem",function(s){return h(p),g(i.onSelectContextItem(s))}),r()}if(t&2){let p=ae(I(1,10,i.awaitingCollections$));c(2),S("text",i.filter().Number),c(2),T(i.selectedOrders().length>0?4:-1),c(9),y("multiple",!0),S("ngModel",i.filter().ListChannelID),c(5),S("date",i.filter().From),c(2),S("date",i.filter().To),c(4),S("ngModel",i.filter().PageNumber),c(4),S("ngModel",i.filter().PageSize),c(5),T((p==null?null:p.length)>0?33:34),c(2),y("items",i.contextMenuItems)}},dependencies:[he,ke,Te,Le,z,fe,Ce,ge,W,R,Ee,Ve,Ae,be,_e,De,Fe,Me,me,ue,de,Pe],encapsulation:2});let a=l;return a})();export{Jt as AwaitingCollectionComponent};
|
|
1
|
+
import{a as Ne,b as Fe}from"./chunk-RIIIECQH.js";import{a as Pe}from"./chunk-JWDQVXQP.js";import{a as Ee,b as Ve}from"./chunk-K5WSFDNA.js";import{a as De}from"./chunk-FSLUPR5I.js";import{a as j}from"./chunk-L6CRWJ2O.js";import{a as Ae}from"./chunk-PV4OJSZI.js";import"./chunk-FSOZOROI.js";import"./chunk-VYI7JYH5.js";import"./chunk-BZWZ64N5.js";import{a as Me}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as Le}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as Te}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ke}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as Se,c as we,e as ve,f as ye,g as xe}from"./chunk-IA7NJXJD.js";import{a as be}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as _e}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as x}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{b as d,c as A}from"./chunk-UPRDDI4K.js";import{A as z,b as ge,c as fe,h as W,m as R,o as Ce}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as M,e as O}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as ue,B as he,w as me,y as de}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Cc as te,Dc as ie,Ec as ne,G,Hb as N,Ia as B,Mc as oe,Nc as m,Oc as P,Pc as E,Rc as S,Sc as w,Tc as v,Uc as re,Vc as ae,Wc as F,Z as J,_c as le,aa as X,ac as k,ad as pe,cc as T,dc as Z,fc as $,gc as ee,hc as y,ic as o,id as V,jc as r,jd as I,kc as _,kd as se,ma as D,mb as Y,ob as c,pd as ce,ra as C,rc as L,v as K,wc as b,ya as h,yc as f,za as g}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Q,b as q}from"./chunk-66YHNWRR.js";var Ie=(()=>{let l=class l{constructor(){this.http=C(O),this.toastr=C(M)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(K(p=>(p&&(p.Number=e),p)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case d.Tokopedia:let u=window.open("about:blank","_blank");u.document.write(e.File),u.document.close();break;case d.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case d.Shopee:var i=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),p=new Blob([i],{type:"octet/stream"});A.openDownloadFile(p,`${e?.Number}.pdf`);break;case d.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var Oe=(()=>{let l=class l{constructor(){this.dialogRef=C(Se),this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"h2",1),m(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),m(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),v("ngModelChange",function(u){return w(i.tandaiSudahDicetak,u)||(i.tandaiSudahDicetak=u),u}),r(),o(10,"span",7),m(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),m(14,"Cancel"),r(),o(15,"button",10),b("click",function(){return i.onPrint()}),m(16,"Cetak Pesanan"),r()()()),t&2&&(c(9),S("ngModel",i.tandaiSudahDicetak))},dependencies:[z,W,R,xe,ye,ve],encapsulation:2});let a=l;return a})();var U=(()=>{let l=class l{constructor(){this.httpService=C(O),this.shippingLabelService=C(Ie),this.toastrService=C(M),this.dialog=C(we)}printShippingLabel(e){switch(e?.MarketType){case d.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Shopee));break;case d.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tiktok));break;case d.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(G(t=>A.IsNotEmpty(t)),X(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tokopedia));break;case d.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Lazada));break;case d.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(p=>({OrderNumber:p.Number,ShopID:p.ShopID})),i="";switch(e[0]?.MarketType){case d.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case d.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case d.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(p=>{var u=Uint8Array.from(atob(p.File),We=>We.charCodeAt(0)),s=new Blob([u],{type:"octet/stream"});A.openDownloadFile(s,`${p?.Name}.pdf`)})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac});let a=l;return a})();var ze=["contextMenu"],Be=a=>({"td-cell-hover":a});function je(a,l){if(a&1){let n=L();o(0,"button",20),b("click",function(){h(n);let t=f(),i=F(0);return g(t.onDowloadShippingLabel(i))}),_(1,"i",21),o(2,"span"),m(3,"Download Shipping Label"),r()()}}function He(a,l){if(a&1){let n=L();o(0,"input",47),v("ngModelChange",function(t){h(n);let i=f().$implicit;return w(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){h(n);let t=f(3),i=F(0);return g(t.onSelectOrders(i))}),r()}if(a&2){let n=f().$implicit,e=f(2);S("ngModel",n.selected),y("disabled",e.selectedChannelType()!=null&&e.selectedChannelType()!=n.MarketType)}}function Ue(a,l){if(a&1&&_(0,"variants-dropdown",39),a&2){let n=f().$implicit;y("variants",n==null?null:n.Variants)}}function Qe(a,l){if(a&1&&_(0,"variant-with-image",40),a&2){let n=f().$implicit;y("variant",n==null?null:n.Variants[0])}}function qe(a,l){if(a&1&&(o(0,"span"),m(1),r()),a&2){let n=f().$implicit;c(),E("(",n.LogisticService==null?null:n.LogisticService.Option,")")}}function Ke(a,l){if(a&1){let n=L();o(0,"button",48),b("click",function(){h(n);let t=f().$implicit,i=f(2);return g(i.onPrintShippingLabel(t))}),_(1,"i",49),r()}}function Ge(a,l){if(a&1){let n=L();o(0,"tr")(1,"td"),k(2,He,1,2,"input",31),r(),o(3,"td")(4,"div",32),_(5,"img",33),V(6,"channelImage"),o(7,"div",34)(8,"div"),m(9),r(),o(10,"small",35)(11,"span"),m(12),r()()()()(),o(13,"td")(14,"div",36)(15,"div"),_(16,"order-link",37),r(),o(17,"small"),m(18),V(19,"date"),r(),_(20,"br"),o(21,"small"),_(22,"i",38),m(23),r()()(),o(24,"td"),k(25,Ue,1,1,"variants-dropdown",39)(26,Qe,1,1,"variant-with-image",40),r(),o(27,"td",41),m(28),V(29,"number"),r(),o(30,"td",42),b("mouseenter",function(t){let i=h(n).$implicit,p=f(2);return g(p.onMouseEnter(t,i))}),o(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),m(35),r(),k(36,qe,2,1,"span"),r(),o(37,"small"),m(38),r()()()(),o(39,"td",45),k(40,Ke,2,0,"button",46),r()()}if(a&2){let n=l.$implicit,e=f(2);c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?2:-1),c(3),y("src",I(6,16,n==null?null:n.MarketType),Y)("alt",n==null||n.Variants[0]==null?null:n.Variants[0].Name),c(4),P(n.Outlet),c(3),P(n.ChannelName),c(4),y("order",n),c(2),E(" ",se(19,18,n==null?null:n.Created,"dd/MM/yyyy HH:mm:ss")," "),c(5),E(" ",n.Customer," "),c(),oe(pe(23,Be,(n.Variants==null?null:n.Variants.length)>1)),c(),T((n.Variants==null?null:n.Variants.length)>1?25:26),c(3),P(I(29,21,n.Amount)),c(7),P(n.LogisticService!=null&&n.LogisticService.Name?n.LogisticService==null?null:n.LogisticService.Name:"-"),c(),T(n.LogisticService!=null&&n.LogisticService.Option&&(n.LogisticService==null?null:n.LogisticService.Option)!="Default"?36:-1),c(2),E(" ",n.ReferenceNumber?n.ReferenceNumber:"-"," "),c(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?40:-1)}}function Je(a,l){if(a&1){let n=L();o(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),_(4,"th",25),o(5,"th",26),m(6,"Outlet"),r(),o(7,"th",26),m(8,"Number"),r(),o(9,"th"),m(10,"Items"),r(),o(11,"th",27),m(12,"Amount"),r(),o(13,"th",28),m(14,"Shipping"),r(),_(15,"th",29),r()(),o(16,"tbody"),$(17,Ge,41,25,"tr",null,Z),r()(),o(19,"app-custom-paginator",30),b("next",function(){h(n);let t=f();return g(t.initAwaitingCollection())})("previous",function(){h(n);let t=f();return g(t.initAwaitingCollection())}),r()()}if(a&2){let n=f(),e=F(0);c(17),ee(e),c(2),y("filter",n.filter())("totaldata",e==null?null:e.length)}}function Xe(a,l){a&1&&(o(0,"div",18),_(1,"app-empty-state"),r())}var Jt=(()=>{let l=class l{constructor(){this.printShippingService=C(U),this.orderService=C(j),this.toastr=C(M),this.fulfillmentService=C(Ne),this.channelType=d,this.selectedOrders=B([]),this.selectedChannelType=ce(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=B({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>q(Q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(J(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&te(ze,5),t&2){let p;ie(p=ne())&&(i.contextMenuEl=p.first)}},features:[le([j,U])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let p=L();re(0),V(1,"async"),o(2,"mainpanel",1),b("onSubmit",function(){return h(p),g(i.initAwaitingCollection())}),v("textChange",function(s){return h(p),w(i.filter().Number,s)||(i.filter().Number=s),g(s)}),o(3,"actions"),k(4,je,4,0,"button",2),o(5,"a",3),_(6,"i",4),o(7,"span"),m(8,"Order Fulfillment Display"),r()()(),o(9,"filters")(10,"div")(11,"label",5),m(12,"Channel"),r(),o(13,"app-channel-options-v2",6),v("ngModelChange",function(s){return h(p),w(i.filter().ListChannelID,s)||(i.filter().ListChannelID=s),g(s)}),r()(),o(14,"div",7)(15,"label",5),m(16,"From/To"),r(),o(17,"div",8)(18,"datepicker",9),v("dateChange",function(s){return h(p),w(i.filter().From,s)||(i.filter().From=s),g(s)}),r()(),o(19,"div")(20,"datepicker",10),v("dateChange",function(s){return h(p),w(i.filter().To,s)||(i.filter().To=s),g(s)}),r()()(),o(21,"div",7)(22,"label",11),m(23,"Page Number"),r(),o(24,"input",12),v("ngModelChange",function(s){return h(p),w(i.filter().PageNumber,s)||(i.filter().PageNumber=s),g(s)}),r()(),o(25,"div",7)(26,"label",11),m(27,"Page Size"),r(),o(28,"input",13),v("ngModelChange",function(s){return h(p),w(i.filter().PageSize,s)||(i.filter().PageSize=s),g(s)}),r()()(),o(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),k(33,Je,20,2,"div",17)(34,Xe,2,0,"div",18),r()()()()(),o(35,"app-context-menu",19,0),b("onSelectItem",function(s){return h(p),g(i.onSelectContextItem(s))}),r()}if(t&2){let p=ae(I(1,10,i.awaitingCollections$));c(2),S("text",i.filter().Number),c(2),T(i.selectedOrders().length>0?4:-1),c(9),y("multiple",!0),S("ngModel",i.filter().ListChannelID),c(5),S("date",i.filter().From),c(2),S("date",i.filter().To),c(4),S("ngModel",i.filter().PageNumber),c(4),S("ngModel",i.filter().PageSize),c(5),T((p==null?null:p.length)>0?33:34),c(2),y("items",i.contextMenuItems)}},dependencies:[he,ke,Te,Le,z,fe,Ce,ge,W,R,Ee,Ve,Ae,be,_e,De,Fe,Me,me,ue,de,Pe],encapsulation:2});let a=l;return a})();export{Jt as AwaitingCollectionComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as ot}from"./chunk-BZWZ64N5.js";import{a as lt}from"./chunk-
|
|
1
|
+
import{e as ot}from"./chunk-BZWZ64N5.js";import{a as lt}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as at}from"./chunk-7KG3DC5J.js";import{a as rt}from"./chunk-ZZYFVEJO.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import{b as it}from"./chunk-PRMV4INM.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as nt}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as K}from"./chunk-UPRDDI4K.js";import{A as et,h as Z,m as tt}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as Q}from"./chunk-D6JH2KV4.js";import{e as X,g as Y}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as U,B as G,q,w as A,y as J}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as z,Hb as L,Nc as l,Oc as x,Pc as w,Rc as V,Sc as k,Tc as H,Xc as O,Z as v,ac as g,ad as W,bd as j,ca as E,cc as S,ec as F,f as D,fc as R,gc as $,hc as d,ic as o,id as c,jc as a,jd as u,kc as N,kd as I,lb as M,mb as P,ob as p,ra as b,rc as B,v as _,wc as T,ya as C,yc as s,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var pt=(i,r)=>({"bg-gradient-danger":i,"bg-gradient-warning":r}),st=()=>["/menu/products/status/notification/detail"],ct=i=>({ID:i});function mt(i,r){if(i&1&&(l(0),c(1,"number"),o(2,"span"),l(3,"s"),a()),i&2){let n=s().$implicit;w(" ",I(1,1,n.DurationInSecond,"1.1-1")," ")}}function dt(i,r){i&1&&l(0," - ")}function ut(i,r){if(i&1&&(o(0,"tr",11)(1,"td")(2,"a",12),N(3,"img",13),o(4,"span"),l(5),a()()(),o(6,"td")(7,"b"),l(8),a(),N(9,"div",14),a(),o(10,"td"),g(11,mt,4,4)(12,dt,1,0),a(),o(13,"td"),l(14),a(),o(15,"td"),l(16),c(17,"date"),a()()),i&2){let n=r.$implicit;d("ngClass",j(14,pt,n.Status==1,n.Status==0)),p(2),d("routerLink",z(17,st))("queryParams",W(18,ct,n.ID)),p(),d("src",O(n.Img),P),p(2),x(n.Name),p(3),x(n.Label),p(),d("innerHTML",n.Message,M),p(2),S(n.DurationInSecond?11:12),p(3),x(n.StatusLabel),p(2),w(" ",I(17,11,n.Created,"dd MMM yyyy HH:mm")," ")}}function ft(i,r){if(i&1){let n=B();o(0,"div",5)(1,"div",15)(2,"app-custom-paginator",16),c(3,"async"),c(4,"async"),T("total",function(){C(n);let t=s(2);return h(t.getRowCount())})("next",function(){C(n);let t=s(2);return h(t.getNotifications())})("previous",function(){C(n);let t=s(2);return h(t.getNotifications())}),a()()()}if(i&2){let n=s(),e=s();p(2),d("filter",e.filter)("totaldata",n==null?null:n.length)("paginationTotal",u(3,4,e.rowCount$))("hasClicked",u(4,6,e.rowCount$))}}function _t(i,r){i&1&&g(0,ft,5,8,"div",5),i&2&&S(r.length>0?0:-1)}var $t=(()=>{let r=class r{constructor(){this.http=b(Q),this.notificationService=b(it),this.filter=new at,this.destroy$=new D}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(E(this.destroy$)).subscribe(e=>{e.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(e=>{this.filter=e.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let e={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",e).pipe(_(t=>t.Data),_(t=>(t=this.setChannelLogoToNotifications(t),t=this.setTimeToSecond(t),t)),v(1))}setTimeToSecond(e){return e=e.map(t=>(t.DurationInSecond=parseInt(t.Duration)/1e3,t)),e}setChannelLogoToNotifications(e){return e=e.map(t=>(t.Img=K.getChannelLogoByTypeId(t.TypeID),t)),e}getRowCount(){let e={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",e).pipe(_(t=>t.Count),v(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=L({type:r,selectors:[["app-notification"]],decls:33,vars:6,consts:[["headerTitle","Product Scan Job","hideSearchBox","true",3,"onSubmit"],["routerLink","/menu/products/status/notificationV2",1,"btn","btn-outline-secondary","btn-lg"],[1,"mb-2"],[3,"ngModelChange","ngModel"],[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"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(t,m){if(t&1&&(o(0,"mainpanel",0),T("onSubmit",function(){return m.onFilter()}),o(1,"actions")(2,"a",1),l(3," Scan Job V2 "),a()(),o(4,"filters")(5,"div")(6,"h6",2),l(7,"Channel"),a(),o(8,"app-channel-options-v2",3),H("ngModelChange",function(y){return k(m.filter.ChannelID,y)||(m.filter.ChannelID=y),y}),a()()(),o(9,"content")(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"table",8)(15,"thead",9)(16,"tr",10)(17,"th"),l(18,"Channel"),a(),o(19,"th"),l(20,"Process"),a(),o(21,"th"),l(22,"Duration"),a(),o(23,"th"),l(24,"Status"),a(),o(25,"th"),l(26,"Created"),a()()(),o(27,"tbody"),R(28,ut,18,20,"tr",11,F),c(30,"async"),a()()()()(),g(31,_t,1,1),c(32,"async"),a()()()),t&2){let f;p(8),V("ngModel",m.filter.ChannelID),p(20),$(u(30,2,m.notifications$)),p(3),S((f=u(32,4,m.notifications$))?31:-1,f)}},dependencies:[G,q,et,Z,tt,nt,rt,ot,Y,X,lt,A,U,J],encapsulation:2});let i=r;return i})();export{$t as NotificationComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as nt}from"./chunk-X2CTSYKS.js";import{a as ee}from"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-NB2H6KA7.js";import{b as we,c as te}from"./chunk-UPRDDI4K.js";import{b as Qe}from"./chunk-RQUCYFCB.js";import{a as Ge,b as fe,c as Ze,d as Je,e as ge,f as Xe,g as me,h as Ye,i as J,j as ye,k as x}from"./chunk-RXLMJGUY.js";import{e as et}from"./chunk-D6JH2KV4.js";import{d as tt}from"./chunk-UB3ZV5NW.js";import{D as qe,E as Ve}from"./chunk-CGSMHTKB.js";import{Da as Ue,F as Ne,G as Fe,Ib as z,Ma as ze,O as le,S as Le,T as $e,Wa as K,Z as ue,aa as O,ba as de,c as m,ea as he,f as je,ga as We,ha as He,j as Oe,k as Be,ma as D,n as G,na as H,o as Q,p as B,pa as P,q as Z,qa as g,ra as M,ub as U,v as _,va as pe,w as Me,xa as Ke,zd as L}from"./chunk-OHGMB7HJ.js";import{b as w}from"./chunk-WFMAM73Y.js";import{a as ce,i as k}from"./chunk-66YHNWRR.js";var ot={production:!0,version:"5.51.0",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var it=(()=>{let o=class o{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let r=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return typeof r=="string"&&(r=[r]),r||[]}ParseToken(e){try{let n=e.split(".")[0].replace("-","+").replace("_","/"),i=JSON.parse(window.atob(n)),l=e.split(".")[1].replace("-","+").replace("_","/"),c=JSON.parse(window.atob(l));return c.header=i,c}catch{return!1}}};o.\u0275fac=function(r){return new(r||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();var Tt="firebase",Ct="11.10.0";J(Tt,Ct,"app");var q=new We("ANGULARFIRE2_VERSION");var st=(t,o)=>{let s=o?[o]:Ye(),e=[];return s.forEach(r=>{r.container.getProvider(t).instances.forEach(i=>{e.includes(i)||e.push(i)})}),e},Ae=(function(t){return t[t.SILENT=0]="SILENT",t[t.WARN=1]="WARN",t[t.VERBOSE=2]="VERBOSE",t})(Ae||{}),Mr=L()&&typeof Zone<"u"?Ae.WARN:Ae.SILENT;var re=class{zone;delegate;constructor(o,s=Be){this.zone=o,this.delegate=s}now(){return this.delegate.now()}schedule(o,s,e){let r=this.zone,n=function(i){r?r.runGuarded(()=>{o.apply(this,[i])}):o.apply(this,[i])};return this.delegate.schedule(n,s,e)}},ve=(()=>{class t{outsideAngular;insideAngular;constructor(){let s=M(U);this.outsideAngular=s.runOutsideAngular(()=>new re(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=s.run(()=>new re(typeof Zone>"u"?void 0:Zone.current,Oe))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Pt="firebase",xt="11.10.0";x.registerVersion(Pt,xt,"app-compat");var Rt=["ngOnDestroy"],ct=(t,o,s,e={})=>new Proxy(t,{get:(r,n)=>s.runOutsideAngular(()=>{if(t[n])return e?.spy?.get&&e.spy.get(n,t[n]),t[n];if(Rt.indexOf(n)>-1)return()=>{};let i=o.toPromise().then(a=>{let l=a?.[n];return typeof l=="function"?l.bind(a):l?.then?l.then(c=>s.run(()=>c)):s.run(()=>l)});return new Proxy(()=>{},{get:(a,l)=>i[l],apply:(a,l,c)=>i.then(u=>{let f=u?.(...c);return e?.spy?.apply&&e.spy.apply(n,c,f),f})})})});var ne=class{constructor(o){return o}},oe=new P("angularfire2.app.options"),ie=new P("angularfire2.app.name");function ke(t,o,s){let e=typeof s=="string"&&s||"[DEFAULT]",r=typeof s=="object"&&s||{};r.name=r.name||e;let i=x.apps.filter(a=>a&&a.name===r.name)[0]||o.runOutsideAngular(()=>x.initializeApp(t,r));try{if(JSON.stringify(t)!==JSON.stringify(i.options)){let a=!!module.hot;_t("error",`${i.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ne(i)}var _t=(t,...o)=>{L()&&typeof console<"u"&&console[t](...o)},jt={provide:ne,useFactory:ke,deps:[oe,U,[new ze,ie]]},zr=(()=>{class t{static initializeApp(s,e){return{ngModule:t,providers:[{provide:oe,useValue:s},{provide:ie,useValue:e}]}}constructor(s){x.registerVersion("angularfire",q.full,"core"),x.registerVersion("angularfire",q.full,"app-compat"),x.registerVersion("angular",He.full,s.toString())}static \u0275fac=function(e){return new(e||t)(g(K))};static \u0275mod=z({type:t});static \u0275inj=H({providers:[jt]})}return t})();function lt(t,o,s,e,r){let[,n,i]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===t)||[];if(n)return Ot(r,i)||(at("error",`${o} was already initialized on the ${s} Firebase App with different settings.${Bt?" You may need to reload as Firebase is not HMR aware.":""}`),at("warn",{is:r,was:i})),n;{let a=e();return globalThis.\u0275AngularfireInstanceCache.push([t,a,r]),a}}function Ot(t,o){try{return t.toString()===o.toString()}catch{return t===o}}var Bt=typeof module<"u"&&!!module.hot,at=(t,...o)=>{L()&&typeof console<"u"&&console[t](...o)};globalThis.\u0275AngularfireInstanceCache||=[];var Mt=new Map,Nt={activated:!1,tokenObservers:[]},Ft={initialized:!1,enabled:!1};function R(t){return Mt.get(t)||Object.assign({},Nt)}function pt(){return Ft}var Lt="https://content-firebaseappcheck.googleapis.com/v1";var $t="exchangeDebugToken",ut={OFFSET_DURATION:300*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:960*1e3},nn=1440*60*1e3;var Ee=class{constructor(o,s,e,r,n){if(this.operation=o,this.retryPolicy=s,this.getWaitDuration=e,this.lowerBound=r,this.upperBound=n,this.pending=null,this.nextErrorWaitInterval=r,r>n)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(o){return k(this,null,function*(){this.stop();try{this.pending=new fe,this.pending.promise.catch(s=>{}),yield Wt(this.getNextRun(o)),this.pending.resolve(),yield this.pending.promise,this.pending=new fe,this.pending.promise.catch(s=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(s){this.retryPolicy(s)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(o){if(o)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let s=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),s}}};function Wt(t){return new Promise(o=>{setTimeout(o,t)})}var Ht={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},N=new Je("appCheck","AppCheck",Ht);function ft(t){if(!R(t).activated)throw N.create("use-before-activation",{appName:t.name})}function gt(e,r){return k(this,arguments,function*({url:t,body:o},s){let n={"Content-Type":"application/json"},i=s.getImmediate({optional:!0});if(i){let h=yield i.getHeartbeatsHeader();h&&(n["X-Firebase-Client"]=h)}let a={method:"POST",body:JSON.stringify(o),headers:n},l;try{l=yield fetch(t,a)}catch(h){throw N.create("fetch-network-error",{originalErrorMessage:h?.message})}if(l.status!==200)throw N.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(h){throw N.create("fetch-parse-error",{originalErrorMessage:h?.message})}let u=c.ttl.match(/^([\d.]+)(s)$/);if(!u||!u[2]||isNaN(Number(u[1])))throw N.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let f=Number(u[1])*1e3,d=Date.now();return{token:c.token,expireTimeMillis:d+f,issuedAtTimeMillis:d}})}function mt(t,o){let{projectId:s,appId:e,apiKey:r}=t.options;return{url:`${Lt}/projects/${s}/apps/${e}:${$t}?key=${r}`,body:{debug_token:o}}}var Kt="firebase-app-check-database",Ut=1,Ie="firebase-app-check-store";var se=null;function zt(){return se||(se=new Promise((t,o)=>{try{let s=indexedDB.open(Kt,Ut);s.onsuccess=e=>{t(e.target.result)},s.onerror=e=>{var r;o(N.create("storage-open",{originalErrorMessage:(r=e.target.error)===null||r===void 0?void 0:r.message}))},s.onupgradeneeded=e=>{let r=e.target.result;switch(e.oldVersion){case 0:r.createObjectStore(Ie,{keyPath:"compositeKey"})}}}catch(s){o(N.create("storage-open",{originalErrorMessage:s?.message}))}}),se)}function qt(t,o){return Vt(Gt(t),o)}function Vt(t,o){return k(this,null,function*(){let e=(yield zt()).transaction(Ie,"readwrite"),n=e.objectStore(Ie).put({compositeKey:t,value:o});return new Promise((i,a)=>{n.onsuccess=l=>{i()},e.onerror=l=>{var c;a(N.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Gt(t){return`${t.options.appId}-${t.name}`}var X=new Xe("@firebase/app-check");function be(t,o){return Ze()?qt(t,o).catch(s=>{X.warn(`Failed to write token to IndexedDB. Error: ${s}`)}):Promise.resolve()}function yt(){return pt().enabled}function wt(){return k(this,null,function*(){let t=pt();if(t.enabled&&t.token)return t.token.promise;throw Error(`
|
|
1
|
+
import{a as nt}from"./chunk-X2CTSYKS.js";import{a as ee}from"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-NB2H6KA7.js";import{b as we,c as te}from"./chunk-UPRDDI4K.js";import{b as Qe}from"./chunk-RQUCYFCB.js";import{a as Ge,b as fe,c as Ze,d as Je,e as ge,f as Xe,g as me,h as Ye,i as J,j as ye,k as x}from"./chunk-RXLMJGUY.js";import{e as et}from"./chunk-D6JH2KV4.js";import{d as tt}from"./chunk-UB3ZV5NW.js";import{D as qe,E as Ve}from"./chunk-CGSMHTKB.js";import{Da as Ue,F as Ne,G as Fe,Ib as z,Ma as ze,O as le,S as Le,T as $e,Wa as K,Z as ue,aa as O,ba as de,c as m,ea as he,f as je,ga as We,ha as He,j as Oe,k as Be,ma as D,n as G,na as H,o as Q,p as B,pa as P,q as Z,qa as g,ra as M,ub as U,v as _,va as pe,w as Me,xa as Ke,zd as L}from"./chunk-OHGMB7HJ.js";import{b as w}from"./chunk-WFMAM73Y.js";import{a as ce,i as k}from"./chunk-66YHNWRR.js";var ot={production:!0,version:"5.51.3",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var it=(()=>{let o=class o{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let r=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return typeof r=="string"&&(r=[r]),r||[]}ParseToken(e){try{let n=e.split(".")[0].replace("-","+").replace("_","/"),i=JSON.parse(window.atob(n)),l=e.split(".")[1].replace("-","+").replace("_","/"),c=JSON.parse(window.atob(l));return c.header=i,c}catch{return!1}}};o.\u0275fac=function(r){return new(r||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();var Tt="firebase",Ct="11.10.0";J(Tt,Ct,"app");var q=new We("ANGULARFIRE2_VERSION");var st=(t,o)=>{let s=o?[o]:Ye(),e=[];return s.forEach(r=>{r.container.getProvider(t).instances.forEach(i=>{e.includes(i)||e.push(i)})}),e},Ae=(function(t){return t[t.SILENT=0]="SILENT",t[t.WARN=1]="WARN",t[t.VERBOSE=2]="VERBOSE",t})(Ae||{}),Mr=L()&&typeof Zone<"u"?Ae.WARN:Ae.SILENT;var re=class{zone;delegate;constructor(o,s=Be){this.zone=o,this.delegate=s}now(){return this.delegate.now()}schedule(o,s,e){let r=this.zone,n=function(i){r?r.runGuarded(()=>{o.apply(this,[i])}):o.apply(this,[i])};return this.delegate.schedule(n,s,e)}},ve=(()=>{class t{outsideAngular;insideAngular;constructor(){let s=M(U);this.outsideAngular=s.runOutsideAngular(()=>new re(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=s.run(()=>new re(typeof Zone>"u"?void 0:Zone.current,Oe))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Pt="firebase",xt="11.10.0";x.registerVersion(Pt,xt,"app-compat");var Rt=["ngOnDestroy"],ct=(t,o,s,e={})=>new Proxy(t,{get:(r,n)=>s.runOutsideAngular(()=>{if(t[n])return e?.spy?.get&&e.spy.get(n,t[n]),t[n];if(Rt.indexOf(n)>-1)return()=>{};let i=o.toPromise().then(a=>{let l=a?.[n];return typeof l=="function"?l.bind(a):l?.then?l.then(c=>s.run(()=>c)):s.run(()=>l)});return new Proxy(()=>{},{get:(a,l)=>i[l],apply:(a,l,c)=>i.then(u=>{let f=u?.(...c);return e?.spy?.apply&&e.spy.apply(n,c,f),f})})})});var ne=class{constructor(o){return o}},oe=new P("angularfire2.app.options"),ie=new P("angularfire2.app.name");function ke(t,o,s){let e=typeof s=="string"&&s||"[DEFAULT]",r=typeof s=="object"&&s||{};r.name=r.name||e;let i=x.apps.filter(a=>a&&a.name===r.name)[0]||o.runOutsideAngular(()=>x.initializeApp(t,r));try{if(JSON.stringify(t)!==JSON.stringify(i.options)){let a=!!module.hot;_t("error",`${i.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ne(i)}var _t=(t,...o)=>{L()&&typeof console<"u"&&console[t](...o)},jt={provide:ne,useFactory:ke,deps:[oe,U,[new ze,ie]]},zr=(()=>{class t{static initializeApp(s,e){return{ngModule:t,providers:[{provide:oe,useValue:s},{provide:ie,useValue:e}]}}constructor(s){x.registerVersion("angularfire",q.full,"core"),x.registerVersion("angularfire",q.full,"app-compat"),x.registerVersion("angular",He.full,s.toString())}static \u0275fac=function(e){return new(e||t)(g(K))};static \u0275mod=z({type:t});static \u0275inj=H({providers:[jt]})}return t})();function lt(t,o,s,e,r){let[,n,i]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===t)||[];if(n)return Ot(r,i)||(at("error",`${o} was already initialized on the ${s} Firebase App with different settings.${Bt?" You may need to reload as Firebase is not HMR aware.":""}`),at("warn",{is:r,was:i})),n;{let a=e();return globalThis.\u0275AngularfireInstanceCache.push([t,a,r]),a}}function Ot(t,o){try{return t.toString()===o.toString()}catch{return t===o}}var Bt=typeof module<"u"&&!!module.hot,at=(t,...o)=>{L()&&typeof console<"u"&&console[t](...o)};globalThis.\u0275AngularfireInstanceCache||=[];var Mt=new Map,Nt={activated:!1,tokenObservers:[]},Ft={initialized:!1,enabled:!1};function R(t){return Mt.get(t)||Object.assign({},Nt)}function pt(){return Ft}var Lt="https://content-firebaseappcheck.googleapis.com/v1";var $t="exchangeDebugToken",ut={OFFSET_DURATION:300*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:960*1e3},nn=1440*60*1e3;var Ee=class{constructor(o,s,e,r,n){if(this.operation=o,this.retryPolicy=s,this.getWaitDuration=e,this.lowerBound=r,this.upperBound=n,this.pending=null,this.nextErrorWaitInterval=r,r>n)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(o){return k(this,null,function*(){this.stop();try{this.pending=new fe,this.pending.promise.catch(s=>{}),yield Wt(this.getNextRun(o)),this.pending.resolve(),yield this.pending.promise,this.pending=new fe,this.pending.promise.catch(s=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(s){this.retryPolicy(s)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(o){if(o)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let s=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),s}}};function Wt(t){return new Promise(o=>{setTimeout(o,t)})}var Ht={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},N=new Je("appCheck","AppCheck",Ht);function ft(t){if(!R(t).activated)throw N.create("use-before-activation",{appName:t.name})}function gt(e,r){return k(this,arguments,function*({url:t,body:o},s){let n={"Content-Type":"application/json"},i=s.getImmediate({optional:!0});if(i){let h=yield i.getHeartbeatsHeader();h&&(n["X-Firebase-Client"]=h)}let a={method:"POST",body:JSON.stringify(o),headers:n},l;try{l=yield fetch(t,a)}catch(h){throw N.create("fetch-network-error",{originalErrorMessage:h?.message})}if(l.status!==200)throw N.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(h){throw N.create("fetch-parse-error",{originalErrorMessage:h?.message})}let u=c.ttl.match(/^([\d.]+)(s)$/);if(!u||!u[2]||isNaN(Number(u[1])))throw N.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let f=Number(u[1])*1e3,d=Date.now();return{token:c.token,expireTimeMillis:d+f,issuedAtTimeMillis:d}})}function mt(t,o){let{projectId:s,appId:e,apiKey:r}=t.options;return{url:`${Lt}/projects/${s}/apps/${e}:${$t}?key=${r}`,body:{debug_token:o}}}var Kt="firebase-app-check-database",Ut=1,Ie="firebase-app-check-store";var se=null;function zt(){return se||(se=new Promise((t,o)=>{try{let s=indexedDB.open(Kt,Ut);s.onsuccess=e=>{t(e.target.result)},s.onerror=e=>{var r;o(N.create("storage-open",{originalErrorMessage:(r=e.target.error)===null||r===void 0?void 0:r.message}))},s.onupgradeneeded=e=>{let r=e.target.result;switch(e.oldVersion){case 0:r.createObjectStore(Ie,{keyPath:"compositeKey"})}}}catch(s){o(N.create("storage-open",{originalErrorMessage:s?.message}))}}),se)}function qt(t,o){return Vt(Gt(t),o)}function Vt(t,o){return k(this,null,function*(){let e=(yield zt()).transaction(Ie,"readwrite"),n=e.objectStore(Ie).put({compositeKey:t,value:o});return new Promise((i,a)=>{n.onsuccess=l=>{i()},e.onerror=l=>{var c;a(N.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Gt(t){return`${t.options.appId}-${t.name}`}var X=new Xe("@firebase/app-check");function be(t,o){return Ze()?qt(t,o).catch(s=>{X.warn(`Failed to write token to IndexedDB. Error: ${s}`)}):Promise.resolve()}function yt(){return pt().enabled}function wt(){return k(this,null,function*(){let t=pt();if(t.enabled&&t.token)return t.token.promise;throw Error(`
|
|
2
2
|
Can't get debug token in production mode.
|
|
3
3
|
`)})}var Zt={error:"UNKNOWN_ERROR"};function Jt(t){return Ge.encodeString(JSON.stringify(t),!1)}function Te(t,o=!1,s=!1){return k(this,null,function*(){let e=t.app;ft(e);let r=R(e),n=r.token,i;if(n&&!Y(n)&&(r.token=void 0,n=void 0),!n){let c=yield r.cachedTokenPromise;c&&(Y(c)?n=c:yield be(e,void 0))}if(!o&&n&&Y(n))return{token:n.token};let a=!1;if(yt())try{r.exchangeTokenPromise||(r.exchangeTokenPromise=gt(mt(e,yield wt()),t.heartbeatServiceProvider).finally(()=>{r.exchangeTokenPromise=void 0}),a=!0);let c=yield r.exchangeTokenPromise;return yield be(e,c),r.token=c,{token:c.token}}catch(c){return c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?X.warn(c.message):s&&X.error(c),Se(c)}try{r.exchangeTokenPromise||(r.exchangeTokenPromise=r.provider.getToken().finally(()=>{r.exchangeTokenPromise=void 0}),a=!0),n=yield R(e).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?X.warn(c.message):s&&X.error(c),i=c}let l;return n?i?Y(n)?l={token:n.token,internalError:i}:l=Se(i):(l={token:n.token},r.token=n,yield be(e,n)):l=Se(i),a&&er(e,l),l})}function Xt(t){return k(this,null,function*(){let o=t.app;ft(o);let{provider:s}=R(o);if(yt()){let e=yield wt(),{token:r}=yield gt(mt(o,e),t.heartbeatServiceProvider);return{token:r}}else{let{token:e}=yield s.getToken();return{token:e}}})}function Yt(t,o,s,e){let{app:r}=t,n=R(r),i={next:s,error:e,type:o};if(n.tokenObservers=[...n.tokenObservers,i],n.token&&Y(n.token)){let a=n.token;Promise.resolve().then(()=>{s({token:a.token}),dt(t)}).catch(()=>{})}n.cachedTokenPromise.then(()=>dt(t))}function At(t,o){let s=R(t),e=s.tokenObservers.filter(r=>r.next!==o);e.length===0&&s.tokenRefresher&&s.tokenRefresher.isRunning()&&s.tokenRefresher.stop(),s.tokenObservers=e}function dt(t){let{app:o}=t,s=R(o),e=s.tokenRefresher;e||(e=Qt(t),s.tokenRefresher=e),!e.isRunning()&&s.isTokenAutoRefreshEnabled&&e.start()}function Qt(t){let{app:o}=t;return new Ee(()=>k(null,null,function*(){let s=R(o),e;if(s.token?e=yield Te(t,!0):e=yield Te(t),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let s=R(o);if(s.token){let e=s.token.issuedAtTimeMillis+(s.token.expireTimeMillis-s.token.issuedAtTimeMillis)*.5+3e5,r=s.token.expireTimeMillis-300*1e3;return e=Math.min(e,r),Math.max(0,e-Date.now())}else return 0},ut.RETRIAL_MIN_WAIT,ut.RETRIAL_MAX_WAIT)}function er(t,o){let s=R(t).tokenObservers;for(let e of s)try{e.type==="EXTERNAL"&&o.error!=null?e.error(o.error):e.next(o)}catch{}}function Y(t){return t.expireTimeMillis-Date.now()>0}function Se(t){return{token:Jt(Zt),error:t}}var Ce=class{constructor(o,s){this.app=o,this.heartbeatServiceProvider=s}_delete(){let{tokenObservers:o}=R(this.app);for(let s of o)At(this.app,s.next);return Promise.resolve()}};function tr(t,o){return new Ce(t,o)}function rr(t){return{getToken:o=>Te(t,o),getLimitedUseToken:()=>Xt(t),addTokenListener:o=>Yt(t,"INTERNAL",o),removeTokenListener:o=>At(t.app,o)}}var nr="@firebase/app-check",or="0.10.1";var ir="app-check",ht="app-check-internal";function sr(){me(new ge(ir,t=>{let o=t.getProvider("app").getImmediate(),s=t.getProvider("heartbeat");return tr(o,s)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,o,s)=>{t.getProvider(ht).initialize()})),me(new ge(ht,t=>{let o=t.getProvider("app-check").getImmediate();return rr(o)},"PUBLIC").setInstantiationMode("EXPLICIT")),J(nr,or)}sr();var ar="app-check";var ae=class{constructor(){return st(ar)}};var cr=["localhost","0.0.0.0","127.0.0.1"],An=typeof window<"u"&&cr.includes(window.location.hostname);var ur=new P("angularfire2.auth.use-emulator"),dr=new P("angularfire2.auth.settings"),hr=new P("angularfire2.auth.tenant-id"),pr=new P("angularfire2.auth.langugage-code"),fr=new P("angularfire2.auth.use-device-language"),gr=new P("angularfire.auth.persistence"),mr=(t,o,s,e,r,n,i,a)=>lt(`${t.name}.auth`,"AngularFireAuth",t.name,()=>{let l=o.runOutsideAngular(()=>t.auth());if(s&&l.useEmulator(...s),e&&(l.tenantId=e),l.languageCode=r,n&&l.useDeviceLanguage(),i)for(let[c,u]of Object.entries(i))l.settings[c]=u;return a&&l.setPersistence(a),l},[s,e,r,n,i,a]),De=(()=>{class t{injector=M(pe);authState;idToken;user;idTokenResult;credential;constructor(s,e,r,n,i,a,l,c,u,f,d,h){let p=new je,y=Z(void 0).pipe(G(i.outsideAngular),O(()=>n.runOutsideAngular(()=>import("./chunk-XRLXIT7I.js"))),_(()=>ke(s,n,e)),_(T=>mr(T,n,a,c,u,f,l,d)),ue({bufferSize:1,refCount:!1}));if(Ve(r))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=Z(null);else{y.pipe($e()).subscribe();let T=y.pipe(O(I=>I.getRedirectResult().then(j=>j,()=>null)),Qe(this.injector),ue({bufferSize:1,refCount:!1})),W=y.pipe(O(I=>new m(j=>({unsubscribe:n.runOutsideAngular(()=>I.onAuthStateChanged(F=>j.next(F),F=>j.error(F),()=>j.complete()))})))),V=y.pipe(O(I=>new m(j=>({unsubscribe:n.runOutsideAngular(()=>I.onIdTokenChanged(F=>j.next(F),F=>j.error(F),()=>j.complete()))}))));this.authState=T.pipe(de(W),Q(i.outsideAngular),G(i.insideAngular)),this.user=T.pipe(de(V),Q(i.outsideAngular),G(i.insideAngular)),this.idToken=this.user.pipe(O(I=>I?B(I.getIdToken()):Z(null))),this.idTokenResult=this.user.pipe(O(I=>I?B(I.getIdTokenResult()):Z(null))),this.credential=Ne(T,p,this.authState.pipe(Fe(I=>!I))).pipe(_(I=>I?.user?I:null),Q(i.outsideAngular),G(i.insideAngular))}return ct(this,y,n,{spy:{apply:(T,W,V)=>{(T.startsWith("signIn")||T.startsWith("createUser"))&&V.then(I=>p.next(I))}}})}static \u0275fac=function(e){return new(e||t)(g(oe),g(ie,8),g(K),g(U),g(ve),g(ur,8),g(dr,8),g(hr,8),g(pr,8),g(fr,8),g(gr,8),g(ae,8))};static \u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"any"})}return t})(),Bn=(()=>{class t{constructor(){x.registerVersion("angularfire",q.full,"auth-compat")}static \u0275fac=function(e){return new(e||t)};static \u0275mod=z({type:t});static \u0275inj=H({providers:[De]})}return t})();var b=(function(t){return t.readonly="readonly",t.readwrite="readwrite",t})(b||{}),vt=new P(null),kt=new P("Indexed DB"),wr=new P("Server Indexed DB");function Ar(t,o){return t.objectStoreNames.contains(o)}function C(t,o,s){if(!t){s("You need to use the openDatabase function to create a database before you query it!");return}Ar(t,o)||s(`objectStore does not exists: ${o}`)}function S(t,o){let s=t.transaction(o.storeName,o.dbMode);return s.onerror=o.error,s.onabort=o.abort,s}function E(t,o,s,e){return{storeName:o,dbMode:t,error:r=>{s(r)},abort:r=>{s(r)}}}var xe=[];function A(t,o,s,e){return new Promise((r,n)=>{t||n("IndexedDB not available");let i=t.open(o,s),a;i.onsuccess=()=>{a=i.result,xe.push(a),r(a)},i.onerror=()=>{n(`IndexedDB error: ${i.error}`)},typeof e=="function"&&(i.onupgradeneeded=l=>{e(l,a)})})}function Pe(t,o,s,e,r){return k(this,null,function*(){return new Promise((n,i)=>{if(!t)return;let a=t.open(o,s);a.onupgradeneeded=l=>k(null,null,function*(){let c=l.target.result,u=e.map(d=>k(null,null,function*(){if(!c.objectStoreNames.contains(d.store)){let h=c.createObjectStore(d.store,d.storeConfig);for(let p of d.storeSchema)h.createIndex(p.name,p.keypath,p.options)}}));yield Promise.all(u);let f=r&&r();if(f){let d=Object.keys(f).map(h=>parseInt(h,10)).filter(h=>h>l.oldVersion).sort((h,p)=>h-p);for(let h of d)f[h](c,a.transaction)}c.close(),n()}),a.onsuccess=l=>{l.target.result.close(),n()},a.onerror=l=>{i(l)}})})}function vr(t,o,s){if(!t||!o||!s)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new m(e=>{try{let r=o+1,n=indexedDB.open(t,r);n.onupgradeneeded=i=>{let a=i.target.result;a.deleteObjectStore(s),a.close(),console.log("onupgradeneeded"),e.next(),e.complete()},n.onerror=i=>e.error(i)}catch(r){e.error(r)}})}function kr(t){return new Promise((o,s)=>{if(!t){s(new Error("No database to close"));return}try{t.close(),o()}catch(e){s(`Error closing database: ${e}`)}})}function v(){return function(t,o,s){let e=s.value;return s.value=function(...r){let n=e.apply(this,r);return n instanceof m?n.pipe(Le(()=>k(this,null,function*(){let i=xe.map(a=>k(this,null,function*(){yield kr(a)}));yield Promise.all(i),xe.length=0}))):n},s}}var _e=(()=>{let o=class o{constructor(e,r){this.dbConfigs=e,this.indexedDB=r,this.defaultDatabaseName=null,Object.values(this.dbConfigs).forEach((n,i,a)=>this.instanciateConfig(n,a.length===1))}instanciateConfig(e,r){return k(this,null,function*(){if(!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if((e.isDefault??!1)&&this.defaultDatabaseName)throw new Error("NgxIndexedDB: Only one database can be set as default");((e.isDefault??!1)&&!this.defaultDatabaseName||r)&&(this.defaultDatabaseName=e.name,this.selectedDb=e.name),yield Pe(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),A(this.indexedDB,e.name).then(n=>{n.version!==e.version&&(L()&&(console.warn(`
|
|
4
4
|
Your DB Config doesn't match the most recent version of the DB with name ${e.name}, please update it
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as qe}from"./chunk-MSSRROS6.js";import{a as J}from"./chunk-ISMIPSYN.js";import"./chunk-7T5DBPDP.js";import"./chunk-OH5T7D7O.js";import"./chunk-DE3FRI5N.js";import{a as E}from"./chunk-A6SP65CH.js";import{a as je,b as ze,c as Ge,d as Y,e as ee}from"./chunk-C67KF7MG.js";import{a as Re,b as Ne,c as Le}from"./chunk-FMZLGD5H.js";import{a as Qe}from"./chunk-TYSM3R5E.js";import{a as $e,b as He}from"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as Ue,d as We}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as Oe}from"./chunk-BZWZ64N5.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as Ae}from"./chunk-DLHIDOS3.js";import{a as Be}from"./chunk-LCN52IJT.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as Ee,b as ke}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as Te,b as Pe,c as De,i as Me,j as Ve}from"./chunk-IA7NJXJD.js";import{a as Fe}from"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as Ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as X}from"./chunk-ZSUWHVKX.js";import{h as xe}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as Z}from"./chunk-AGBJEXIM.js";import{a as ue,b as he,c as ge}from"./chunk-NB2H6KA7.js";import{c as y}from"./chunk-UPRDDI4K.js";import{A as be,b as fe,c as Se,h as ye,m as ve,o as we}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as pe,e as me}from"./chunk-D6JH2KV4.js";import{e as _e,g as Ce}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as de,B as Q,q as ce,w as $,y as H}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as se,G as j,Hb as O,Ia as M,Mc as ie,Nb as B,Nc as m,Oc as L,Pc as I,Rc as F,Sc as T,Tc as P,Uc as oe,Vc as ae,Wc as le,Xc as re,Z as R,_c as W,ac as u,ad as D,cc as h,dc as G,ea as z,fc as q,gc as K,hc as g,ic as a,id as f,jc as r,jd as b,kc as v,kd as V,mb as N,ob as s,oc as A,pc as U,ra as S,rc as w,v as k,wc as x,ya as _,yc as l,za as C}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as ne}from"./chunk-66YHNWRR.js";var Ye=()=>["/menu/order/download"];function Je(i,c){if(i&1&&(a(0,"li",4)(1,"div"),m(2," The last time you manually download your order is on "),a(3,"span",8),m(4),f(5,"date"),r()(),a(6,"div",9),m(7),r()()),i&2){l();let e=le(0);s(4),I(" ",V(5,2,e==null?null:e.OrderDownloadLatestOn,"dd MMM yyyy HH:mm")," "),s(3),I("(",e==null?null:e.calculatedDate,")")}}function et(i,c){i&1&&(a(0,"li",4),m(1," The last time you manually download your order is on (-) "),r())}var Ke=(()=>{let c=class c{constructor(){this.dialogRef=S(Te),this.data=S(Pe),this.modalConfig=new Me,this.inventoryService=S(E),this.lastDownloadInfo$=this.inventoryService.getLastInfoDownloadInventory(this.data.channelId).pipe(k(n=>{let t=n.OrderDownloadLatestOn!=y.MinDate,o=null,p=null;return t&&(o=new Date(n.OrderDownloadLatestOn),p=y.convertToReadableDate(o)),{OrderDownloadLatestOn:o,calculatedDate:p}}),R(1)),this.selectedProducts=M(this.data.selectedProducts||[]),this.modalConfig.title="Manual Inventory Sync",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}onUpdate(){this.dialogRef.close(!0)}onCancel(){this.dialogRef.close(!1)}};c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=O({type:c,selectors:[["app-dialog-update-product-info"]],features:[W([E])],decls:16,vars:8,consts:[[3,"onCancel","config"],["content",""],[1,"container"],[1,"mt-8"],[1,"lh-base"],["footer",""],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","routerLink"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","keyup.F2"],[1,"fw-bold","me-1"],[1,"fw-bold"]],template:function(t,o){if(t&1){let p=w();oe(0),f(1,"async"),a(2,"modal-material",0),x("onCancel",function(){return _(p),C(o.onCancel())}),a(3,"div",1)(4,"div",2)(5,"h4"),m(6),r(),a(7,"div",3)(8,"ul"),u(9,Je,8,5,"li",4)(10,et,2,0,"li",4),r()()()(),a(11,"div",5)(12,"a",6),x("click",function(){return _(p),C(o.onCancel())}),m(13," Download "),r(),a(14,"button",7),x("click",function(){return _(p),C(o.onUpdate())})("keyup.F2",function(){return _(p),C(o.onUpdate())}),m(15," Update Anyway "),r()()()}if(t&2){let p=ae(b(1,4,o.lastDownloadInfo$));s(2),g("config",o.modalConfig),s(4),I("",o.selectedProducts().length," Product(s) will be updated."),s(3),h(p!=null&&p.OrderDownloadLatestOn?9:10),s(3),g("routerLink",se(7,Ye))}},dependencies:[Ve,Q,Ce,_e,$,H],encapsulation:2});let i=c;return i})();var te=i=>[i],tt=i=>({"text-decoration-line-through":i}),nt=i=>({"me-10":i}),it=i=>({"bg-gradient-warning":i}),ot=i=>({cursor:i});function at(i,c){if(i&1){let e=w();a(0,"button",37),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onScanInventory(t))}),v(1,"i",38),m(2,"Refresh "),r()}}function lt(i,c){if(i&1){let e=w();a(0,"div",35)(1,"button",39),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onOpenDialogUpdateStockInfo(t))}),v(2,"i",40),m(3," Update "),r(),v(4,"button",41),a(5,"ul",42)(6,"a",43),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(7,"i",44),a(8,"span"),m(9,"Export"),r()()()()}}function rt(i,c){if(i&1){let e=w();a(0,"button",45),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(1,"i",44),a(2,"span"),m(3,"Export"),r()()}}function st(i,c){if(i&1&&(a(0,"div"),u(1,at,3,0,"button",34),u(2,lt,10,0,"div",35)(3,rt,4,0,"button",36),r()),i&2){let e=c,n=l(2);s(),h(n.productService.hasSelectionVariant(e)?1:-1),s(),h(n.productService.hasSelectionVariant(e)?2:3)}}function ct(i,c){i&1&&(a(0,"div",18)(1,"span"),m(2," showing only different stock, please press next to populate more data "),r()())}function dt(i,c){if(i&1){let e=w();a(0,"th")(1,"input",46),P("ngModelChange",function(t){_(e);let o=l(3);return T(o.checkboxState,t)||(o.checkboxState=t),C(t)}),x("ngModelChange",function(){let t=_(e),o=l(3);return C(o.onCheckboxStateChange(t))}),r()()}if(i&2){let e=l(3);s(),F("ngModel",e.checkboxState)}}function pt(i,c){if(i&1&&(A(0),u(1,dt,2,1,"th"),f(2,"async"),U()),i&2){let e,n=l(2);s(),h((e=b(2,1,n.products$))?1:-1,e)}}function mt(i,c){i&1&&(a(0,"th",31),m(1," Reserved "),r())}function _t(i,c){if(i&1){let e=w();a(0,"input",63),P("ngModelChange",function(t){_(e);let o=l(4).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),x("ngModelChange",function(){_(e);let t=l(4).$implicit,o=l(2);return C(o.onCheckboxStateProduct(t))}),r()}if(i&2){let e=l(4).$implicit;F("ngModel",e.selected)}}function Ct(i,c){if(i&1&&(A(0),a(1,"div",61),u(2,_t,1,1,"input",62),r(),U()),i&2){let e=l(3).$implicit;s(),g("ngClass",D(2,nt,e.Variants.length<=1)),s(),h(e.Variants.length>1?2:-1)}}function ut(i,c){if(i&1){let e=w();a(0,"img",64),x("click",function(t){_(e);let o=l(3).$implicit,p=l(2);return C(p.onZoomImage(t,o==null?null:o.ImageUrl))}),r()}if(i&2){let e=l(3).$implicit;g("src",re(e==null?null:e.ThumbnailUrl),N)}}function ht(i,c){i&1&&v(0,"img",58)}function gt(i,c){if(i&1&&(v(0,"br"),a(1,"div",65),v(2,"i",66),a(3,"small"),m(4),r()()),i&2){let e=l(3).$implicit;s(4),I("(",e==null?null:e.Category,")")}}function xt(i,c){if(i&1&&(a(0,"td",56)(1,"div",12),B(2,Ct,3,4,"ng-container",25),a(3,"div"),u(4,ut,1,2,"img",57)(5,ht,1,0,"img",58),r()()(),a(6,"td",59)(7,"span",60),m(8),r(),u(9,gt,5,1),r()),i&2){let e=l(2).$implicit,n=l(2);g("rowSpan",e==null?null:e.Variants.length),s(2),g("ngxPermissionsOnly",D(6,te,n.inventoryUpdateRole)),s(2),h(e!=null&&e.ThumbnailUrl?4:5),s(2),g("rowSpan",e==null?null:e.Variants.length),s(2),L(e==null?null:e.Name),s(),h(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function ft(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(3).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(3).$implicit;F("ngModel",e.selected)}}function St(i,c){if(i&1&&u(0,ft,1,1,"input",68),i&2){let e=l(2).$implicit;h((e==null?null:e.Inventory)<=1e5?0:-1)}}function yt(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(2).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(2).$implicit;F("ngModel",e.selected)}}function vt(i,c){if(i&1&&(A(0),a(1,"td",67),u(2,St,1,1)(3,yt,1,1,"input",68),r(),U()),i&2){let e=l().$implicit;s(2),h((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function wt(i,c){i&1&&(a(0,"div",51),m(1," Not Found "),r())}function bt(i,c){if(i&1&&(a(0,"div")(1,"span",69),m(2),f(3,"number"),r(),m(4," => "),a(5,"span",70),m(6),f(7,"number"),r()()),i&2){let e=l().$implicit;s(2),I(" ",b(3,2,e==null||e.I==null?null:e.I.Available)),s(4),L(b(7,4,e==null?null:e.Inventory))}}function It(i,c){if(i&1&&(m(0),f(1,"number")),i&2){let e=l().$implicit;I(" ",b(1,1,e==null?null:e.Inventory)," ")}}function Ft(i,c){if(i&1&&(a(0,"div",52)(1,"a",71),v(2,"i",72),r()()),i&2){let e=l().$implicit,n=l(3);s(),g("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),N)}}function Tt(i,c){if(i&1){let e=w();a(0,"span",76),x("click",function(){_(e);let t=l(2).$implicit,o=l().$implicit,p=l(2);return C(p.openTableDialog(o,t))}),m(1),f(2,"number"),r()}if(i&2){let e=l(2).$implicit,n=l(3);ie(D(5,ot,n.hasInventoryEdit())),s(),I(" ",b(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function Pt(i,c){if(i&1){let e=w();a(0,"td",53)(1,"div",50)(2,"div"),u(3,Tt,3,7,"span",73),f(4,"async"),r(),a(5,"div",52)(6,"a",71),v(7,"i",72),r()(),a(8,"div",52)(9,"span",74),x("click",function(){_(e);let t=l().$implicit,o=l(3);return C(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))}),v(10,"i",75),r()()()()}if(i&2){let e,n=l().$implicit,t=l(3);g("ngClass",D(5,it,(n==null?null:n.Inventory)!=(n==null||n.Channel[0]==null?null:n.Channel[0].Inventory))),s(3),h((e=b(4,3,t.products$))?3:-1,e),s(3),g("href",n==null||n.Channel[0]==null?null:n.Channel[0].Url,N)}}function Dt(i,c){if(i&1&&(a(0,"span",77),m(1),f(2,"number"),r()),i&2){let e=l(2).$implicit;s(),I(" (",b(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function Mt(i,c){i&1&&m(0," - ")}function Vt(i,c){if(i&1&&(a(0,"td",48),u(1,Dt,3,3,"span",77)(2,Mt,1,0),r()),i&2){let e=l().$implicit;s(),h(!(e==null||e.Channel[0]==null)&&e.Channel[0].InventoryReserved?1:2)}}function Et(i,c){i&1&&m(0," - ")}function kt(i,c){if(i&1&&(a(0,"span",55),f(1,"date"),m(2),f(3,"date"),r()),i&2){let e=l().$implicit;g("matTooltip",V(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),I(" ",V(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Rt(i,c){if(i&1&&(a(0,"tr"),u(1,xt,10,8),a(2,"td",47),m(3),r(),a(4,"td",48)(5,"span",49),m(6),r()(),B(7,vt,4,1,"ng-container",25),a(8,"td")(9,"div",50),u(10,wt,2,0,"div",51),u(11,bt,8,6,"div"),u(12,It,2,3),u(13,Ft,3,1,"div",52),r()(),u(14,Pt,11,7,"td",53),u(15,Vt,3,1,"td",48),a(16,"td",54),u(17,Et,1,0)(18,kt,4,8,"span",55),r()()),i&2){let e=c.$implicit,n=c.$index,t=l(3);s(),h(n==0?1:-1),s(2),L(e==null?null:e.Model),s(2),g("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",D(13,tt,e.Discontinued)),s(),L(e==null?null:e.Code),s(),g("ngxPermissionsOnly",D(15,te,t.inventoryUpdateRole)),s(3),h((e==null?null:e.I)==null?10:-1),s(),h((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),h((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),h((e==null?null:e.I)!=null?13:-1),s(),h(e!=null&&e.Channel?14:-1),s(),h(t.isShowReservedColumn?15:-1),s(2),h((e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==t.minDate?17:18)}}function Nt(i,c){if(i&1&&(a(0,"tbody"),q(1,Rt,19,17,"tr",null,G),r()),i&2){let e=c.$implicit;s(),K(e.Variants)}}function Lt(i,c){if(i&1){let e=w();a(0,"mainpanel",1),x("onSubmit",function(t){_(e);let o=l();return C(o.onSearch(t))}),a(1,"actions")(2,"div",2),u(3,st,4,2,"div"),f(4,"async"),r()(),a(5,"filters")(6,"div",3)(7,"label",4),m(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",5),x("onChannelChange",function(t){_(e);let o=l();return C(o.onChannelChange(t))}),r()(),a(10,"div",3)(11,"filter-query-type",6),P("numberFilterComparatorChange",function(t){_(e);let o=l();return T(o.searchFilter.NumberFilterComparator,t)||(o.searchFilter.NumberFilterComparator=t),C(t)})("searchTypeChange",function(t){_(e);let o=l();return T(o.searchFilter.SearchType,t)||(o.searchFilter.SearchType=t),C(t)}),r()(),a(12,"div",3)(13,"label",7),m(14,"PageNumber"),r(),a(15,"input",8),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),C(t)}),r()(),a(16,"div",3)(17,"label",9),m(18,"Page Size"),r(),a(19,"input",10),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),C(t)}),r()(),a(20,"div")(21,"label",11),m(22,"Quantity From - To"),r(),a(23,"div",12)(24,"input",13),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityFrom,t)||(o.searchFilter.QuantityFrom=t),C(t)}),r(),m(25," - "),a(26,"input",14),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityTo,t)||(o.searchFilter.QuantityTo=t),C(t)}),r()()()(),a(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,ct,3,0,"div",18),a(32,"table",19),x("matSortChange",function(t){_(e);let o=l();return C(o.onSortVariant(t))}),a(33,"thead",20)(34,"tr")(35,"th",21),m(36," Product "),v(37,"br"),a(38,"mat-slide-toggle",22),x("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,C(t.onShowDifferenceStock())}),a(39,"small",11),m(40,"FILTER DIFFERENT INVENTORY"),r()()(),a(41,"th",23),m(42,"Variant"),r(),a(43,"th",24),m(44,"SKU"),r(),B(45,pt,3,3,"ng-container",25),a(46,"th",26),m(47," POS "),r(),a(48,"th",27)(49,"div",28),x("click",function(){_(e);let t=l();return C(t.openModalFilter())}),v(50,"img",29),a(51,"span",30),m(52),f(53,"stringLimit"),r()()(),u(54,mt,2,0,"th",31),a(55,"th",32),m(56,"Last Sync"),r()()(),q(57,Nt,3,0,"tbody",null,G),f(59,"async"),r(),a(60,"infinite-paginator",33),f(61,"async"),x("onNextPage",function(){_(e);let t=l();return C(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return C(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return C(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(i&2){let e,n,t,o,p=c,d=l();g("hideSearchBox",!1)("searchBoxPlaceHolder",d.searchPlaceholder()),s(3),h((e=b(4,24,d.products$))?3:-1,e),s(6),g("ngModel",(d.searchFilter==null?null:d.searchFilter.LocationID)||(d.searchFilter==null?null:d.searchFilter.ChannelID)),s(2),g("numberFilterComparatorOptions",p==null||p.Options==null?null:p.Options.SearchComparatorTypeOptions),F("numberFilterComparator",d.searchFilter.NumberFilterComparator),g("searchTypeOptions",p==null||p.Options==null?null:p.Options.SearchSKUOnlyOrSKUNameOptions),F("searchType",d.searchFilter.SearchType),s(4),F("ngModel",d.searchFilter.PageNumber),s(4),F("ngModel",d.searchFilter.RowCount),s(5),F("ngModel",d.searchFilter.QuantityFrom),s(2),F("ngModel",d.searchFilter.QuantityTo),s(5),h((d.searchFilter==null?null:d.searchFilter.filterModel)==3?31:-1),s(14),g("ngxPermissionsOnly",D(33,te,d.inventoryUpdateRole)),s(4),g("matTooltip",((n=d.channelIdentity())==null||n.label==null?null:n.label.length)>13?(n=d.channelIdentity())==null?null:n.label:""),s(),g("src",(t=d.channelIdentity())==null?null:t.img,N),s(2),I(" ",V(53,26,(o=d.channelIdentity())==null?null:o.label,13)," "),s(2),h(d.isShowReservedColumn?54:-1),s(3),K(b(59,29,d.products$)),s(3),g("totalData",d.infinitePagination.totalData())("hideCount",d.infinitePagination.hideCount())("rowCount",b(61,31,d.infinitePagination.totalRowCount$))("pageNumber",d.infinitePagination.pageNumber())("disableNextButton",d.infinitePagination.disableNextButton())("goToLastPage",d.infinitePagination.isLastPage())}}var Ln=(()=>{let c=class c{constructor(){this.http=S(me),this.toastr=S(pe),this.dialog=S(De),this.productService=S(Be),this.authService=S(xe),this.biggerPictureService=S(Ae),this.mainPanelService=S(Ee),this.placeholderService=S(Ue),this.infinitePagination=S(Y),this.ngxPermissionsService=S(ue),this.updateResHandling=S(ee),this.inventoryService=S(E),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=y.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=y.GuidEMpty,this.selectedChannel=M(null),this.channelIdentity=M({img:null,label:null}),this.inventoryUpdateRole=X.InventoryUpdate,this.hasInventoryEdit=M(!0),this.searchPlaceholder=M("Search ...")}ngOnInit(){this.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(z(n=>{this.checkShowReservedColumn(n)}),k(n=>(n=this.calculateAvailableStock(n),n)),R(1)),this.products$=this.sourceObs$}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(R(1),z(n=>{this.searchFilter={RowCount:n.Filter?.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter?.ChannelID,LocationID:n.Filter?.LocationID,NumberFilterComparator:n.Filter?.NumberFilterComparator,SearchType:n.Filter?.SearchType},this.initReloadData(),this.initSearchPlaceholder(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}initRoles(){this.ngxPermissionsService.hasPermission(X.InventoryUpdate).then(n=>this.hasInventoryEdit.set(n))}calculateAvailableStock(n){return n.map(o=>(o.totalAvailable=o.Variants.reduce((p,d)=>(p+=d.I?.Available||0,p),0),o))}checkShowReservedColumn(n){let t=0,o;n.forEach(p=>{o=p.Variants.find(d=>y.IsNotEmpty(d?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),y.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());y.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=y.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=y.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
|
|
1
|
+
import{a as qe}from"./chunk-MSSRROS6.js";import{a as J}from"./chunk-ISMIPSYN.js";import"./chunk-7T5DBPDP.js";import"./chunk-OH5T7D7O.js";import"./chunk-DE3FRI5N.js";import{a as E}from"./chunk-A6SP65CH.js";import{a as je,b as ze,c as Ge,d as Y,e as ee}from"./chunk-C67KF7MG.js";import{a as Re,b as Ne,c as Le}from"./chunk-FMZLGD5H.js";import{a as Qe}from"./chunk-TYSM3R5E.js";import{a as $e,b as He}from"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as Ue,d as We}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as Oe}from"./chunk-BZWZ64N5.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as Ae}from"./chunk-DLHIDOS3.js";import{a as Be}from"./chunk-V7V5O62J.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-PRMV4INM.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as Ee,b as ke}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as Te,b as Pe,c as De,i as Me,j as Ve}from"./chunk-IA7NJXJD.js";import{a as Fe}from"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as Ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as X}from"./chunk-ZSUWHVKX.js";import{h as xe}from"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as Z}from"./chunk-AGBJEXIM.js";import{a as ue,b as he,c as ge}from"./chunk-NB2H6KA7.js";import{c as y}from"./chunk-UPRDDI4K.js";import{A as be,b as fe,c as Se,h as ye,m as ve,o as we}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as pe,e as me}from"./chunk-D6JH2KV4.js";import{e as _e,g as Ce}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as de,B as Q,q as ce,w as $,y as H}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as se,G as j,Hb as O,Ia as M,Mc as ie,Nb as B,Nc as m,Oc as L,Pc as I,Rc as F,Sc as T,Tc as P,Uc as oe,Vc as ae,Wc as le,Xc as re,Z as R,_c as W,ac as u,ad as D,cc as h,dc as G,ea as z,fc as q,gc as K,hc as g,ic as a,id as f,jc as r,jd as b,kc as v,kd as V,mb as N,ob as s,oc as A,pc as U,ra as S,rc as w,v as k,wc as x,ya as _,yc as l,za as C}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as ne}from"./chunk-66YHNWRR.js";var Ye=()=>["/menu/order/download"];function Je(i,c){if(i&1&&(a(0,"li",4)(1,"div"),m(2," The last time you manually download your order is on "),a(3,"span",8),m(4),f(5,"date"),r()(),a(6,"div",9),m(7),r()()),i&2){l();let e=le(0);s(4),I(" ",V(5,2,e==null?null:e.OrderDownloadLatestOn,"dd MMM yyyy HH:mm")," "),s(3),I("(",e==null?null:e.calculatedDate,")")}}function et(i,c){i&1&&(a(0,"li",4),m(1," The last time you manually download your order is on (-) "),r())}var Ke=(()=>{let c=class c{constructor(){this.dialogRef=S(Te),this.data=S(Pe),this.modalConfig=new Me,this.inventoryService=S(E),this.lastDownloadInfo$=this.inventoryService.getLastInfoDownloadInventory(this.data.channelId).pipe(k(n=>{let t=n.OrderDownloadLatestOn!=y.MinDate,o=null,p=null;return t&&(o=new Date(n.OrderDownloadLatestOn),p=y.convertToReadableDate(o)),{OrderDownloadLatestOn:o,calculatedDate:p}}),R(1)),this.selectedProducts=M(this.data.selectedProducts||[]),this.modalConfig.title="Manual Inventory Sync",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}onUpdate(){this.dialogRef.close(!0)}onCancel(){this.dialogRef.close(!1)}};c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=O({type:c,selectors:[["app-dialog-update-product-info"]],features:[W([E])],decls:16,vars:8,consts:[[3,"onCancel","config"],["content",""],[1,"container"],[1,"mt-8"],[1,"lh-base"],["footer",""],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","routerLink"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","keyup.F2"],[1,"fw-bold","me-1"],[1,"fw-bold"]],template:function(t,o){if(t&1){let p=w();oe(0),f(1,"async"),a(2,"modal-material",0),x("onCancel",function(){return _(p),C(o.onCancel())}),a(3,"div",1)(4,"div",2)(5,"h4"),m(6),r(),a(7,"div",3)(8,"ul"),u(9,Je,8,5,"li",4)(10,et,2,0,"li",4),r()()()(),a(11,"div",5)(12,"a",6),x("click",function(){return _(p),C(o.onCancel())}),m(13," Download "),r(),a(14,"button",7),x("click",function(){return _(p),C(o.onUpdate())})("keyup.F2",function(){return _(p),C(o.onUpdate())}),m(15," Update Anyway "),r()()()}if(t&2){let p=ae(b(1,4,o.lastDownloadInfo$));s(2),g("config",o.modalConfig),s(4),I("",o.selectedProducts().length," Product(s) will be updated."),s(3),h(p!=null&&p.OrderDownloadLatestOn?9:10),s(3),g("routerLink",se(7,Ye))}},dependencies:[Ve,Q,Ce,_e,$,H],encapsulation:2});let i=c;return i})();var te=i=>[i],tt=i=>({"text-decoration-line-through":i}),nt=i=>({"me-10":i}),it=i=>({"bg-gradient-warning":i}),ot=i=>({cursor:i});function at(i,c){if(i&1){let e=w();a(0,"button",37),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onScanInventory(t))}),v(1,"i",38),m(2,"Refresh "),r()}}function lt(i,c){if(i&1){let e=w();a(0,"div",35)(1,"button",39),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onOpenDialogUpdateStockInfo(t))}),v(2,"i",40),m(3," Update "),r(),v(4,"button",41),a(5,"ul",42)(6,"a",43),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(7,"i",44),a(8,"span"),m(9,"Export"),r()()()()}}function rt(i,c){if(i&1){let e=w();a(0,"button",45),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(1,"i",44),a(2,"span"),m(3,"Export"),r()()}}function st(i,c){if(i&1&&(a(0,"div"),u(1,at,3,0,"button",34),u(2,lt,10,0,"div",35)(3,rt,4,0,"button",36),r()),i&2){let e=c,n=l(2);s(),h(n.productService.hasSelectionVariant(e)?1:-1),s(),h(n.productService.hasSelectionVariant(e)?2:3)}}function ct(i,c){i&1&&(a(0,"div",18)(1,"span"),m(2," showing only different stock, please press next to populate more data "),r()())}function dt(i,c){if(i&1){let e=w();a(0,"th")(1,"input",46),P("ngModelChange",function(t){_(e);let o=l(3);return T(o.checkboxState,t)||(o.checkboxState=t),C(t)}),x("ngModelChange",function(){let t=_(e),o=l(3);return C(o.onCheckboxStateChange(t))}),r()()}if(i&2){let e=l(3);s(),F("ngModel",e.checkboxState)}}function pt(i,c){if(i&1&&(A(0),u(1,dt,2,1,"th"),f(2,"async"),U()),i&2){let e,n=l(2);s(),h((e=b(2,1,n.products$))?1:-1,e)}}function mt(i,c){i&1&&(a(0,"th",31),m(1," Reserved "),r())}function _t(i,c){if(i&1){let e=w();a(0,"input",63),P("ngModelChange",function(t){_(e);let o=l(4).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),x("ngModelChange",function(){_(e);let t=l(4).$implicit,o=l(2);return C(o.onCheckboxStateProduct(t))}),r()}if(i&2){let e=l(4).$implicit;F("ngModel",e.selected)}}function Ct(i,c){if(i&1&&(A(0),a(1,"div",61),u(2,_t,1,1,"input",62),r(),U()),i&2){let e=l(3).$implicit;s(),g("ngClass",D(2,nt,e.Variants.length<=1)),s(),h(e.Variants.length>1?2:-1)}}function ut(i,c){if(i&1){let e=w();a(0,"img",64),x("click",function(t){_(e);let o=l(3).$implicit,p=l(2);return C(p.onZoomImage(t,o==null?null:o.ImageUrl))}),r()}if(i&2){let e=l(3).$implicit;g("src",re(e==null?null:e.ThumbnailUrl),N)}}function ht(i,c){i&1&&v(0,"img",58)}function gt(i,c){if(i&1&&(v(0,"br"),a(1,"div",65),v(2,"i",66),a(3,"small"),m(4),r()()),i&2){let e=l(3).$implicit;s(4),I("(",e==null?null:e.Category,")")}}function xt(i,c){if(i&1&&(a(0,"td",56)(1,"div",12),B(2,Ct,3,4,"ng-container",25),a(3,"div"),u(4,ut,1,2,"img",57)(5,ht,1,0,"img",58),r()()(),a(6,"td",59)(7,"span",60),m(8),r(),u(9,gt,5,1),r()),i&2){let e=l(2).$implicit,n=l(2);g("rowSpan",e==null?null:e.Variants.length),s(2),g("ngxPermissionsOnly",D(6,te,n.inventoryUpdateRole)),s(2),h(e!=null&&e.ThumbnailUrl?4:5),s(2),g("rowSpan",e==null?null:e.Variants.length),s(2),L(e==null?null:e.Name),s(),h(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function ft(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(3).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(3).$implicit;F("ngModel",e.selected)}}function St(i,c){if(i&1&&u(0,ft,1,1,"input",68),i&2){let e=l(2).$implicit;h((e==null?null:e.Inventory)<=1e5?0:-1)}}function yt(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(2).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(2).$implicit;F("ngModel",e.selected)}}function vt(i,c){if(i&1&&(A(0),a(1,"td",67),u(2,St,1,1)(3,yt,1,1,"input",68),r(),U()),i&2){let e=l().$implicit;s(2),h((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function wt(i,c){i&1&&(a(0,"div",51),m(1," Not Found "),r())}function bt(i,c){if(i&1&&(a(0,"div")(1,"span",69),m(2),f(3,"number"),r(),m(4," => "),a(5,"span",70),m(6),f(7,"number"),r()()),i&2){let e=l().$implicit;s(2),I(" ",b(3,2,e==null||e.I==null?null:e.I.Available)),s(4),L(b(7,4,e==null?null:e.Inventory))}}function It(i,c){if(i&1&&(m(0),f(1,"number")),i&2){let e=l().$implicit;I(" ",b(1,1,e==null?null:e.Inventory)," ")}}function Ft(i,c){if(i&1&&(a(0,"div",52)(1,"a",71),v(2,"i",72),r()()),i&2){let e=l().$implicit,n=l(3);s(),g("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),N)}}function Tt(i,c){if(i&1){let e=w();a(0,"span",76),x("click",function(){_(e);let t=l(2).$implicit,o=l().$implicit,p=l(2);return C(p.openTableDialog(o,t))}),m(1),f(2,"number"),r()}if(i&2){let e=l(2).$implicit,n=l(3);ie(D(5,ot,n.hasInventoryEdit())),s(),I(" ",b(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function Pt(i,c){if(i&1){let e=w();a(0,"td",53)(1,"div",50)(2,"div"),u(3,Tt,3,7,"span",73),f(4,"async"),r(),a(5,"div",52)(6,"a",71),v(7,"i",72),r()(),a(8,"div",52)(9,"span",74),x("click",function(){_(e);let t=l().$implicit,o=l(3);return C(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))}),v(10,"i",75),r()()()()}if(i&2){let e,n=l().$implicit,t=l(3);g("ngClass",D(5,it,(n==null?null:n.Inventory)!=(n==null||n.Channel[0]==null?null:n.Channel[0].Inventory))),s(3),h((e=b(4,3,t.products$))?3:-1,e),s(3),g("href",n==null||n.Channel[0]==null?null:n.Channel[0].Url,N)}}function Dt(i,c){if(i&1&&(a(0,"span",77),m(1),f(2,"number"),r()),i&2){let e=l(2).$implicit;s(),I(" (",b(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function Mt(i,c){i&1&&m(0," - ")}function Vt(i,c){if(i&1&&(a(0,"td",48),u(1,Dt,3,3,"span",77)(2,Mt,1,0),r()),i&2){let e=l().$implicit;s(),h(!(e==null||e.Channel[0]==null)&&e.Channel[0].InventoryReserved?1:2)}}function Et(i,c){i&1&&m(0," - ")}function kt(i,c){if(i&1&&(a(0,"span",55),f(1,"date"),m(2),f(3,"date"),r()),i&2){let e=l().$implicit;g("matTooltip",V(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),I(" ",V(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Rt(i,c){if(i&1&&(a(0,"tr"),u(1,xt,10,8),a(2,"td",47),m(3),r(),a(4,"td",48)(5,"span",49),m(6),r()(),B(7,vt,4,1,"ng-container",25),a(8,"td")(9,"div",50),u(10,wt,2,0,"div",51),u(11,bt,8,6,"div"),u(12,It,2,3),u(13,Ft,3,1,"div",52),r()(),u(14,Pt,11,7,"td",53),u(15,Vt,3,1,"td",48),a(16,"td",54),u(17,Et,1,0)(18,kt,4,8,"span",55),r()()),i&2){let e=c.$implicit,n=c.$index,t=l(3);s(),h(n==0?1:-1),s(2),L(e==null?null:e.Model),s(2),g("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",D(13,tt,e.Discontinued)),s(),L(e==null?null:e.Code),s(),g("ngxPermissionsOnly",D(15,te,t.inventoryUpdateRole)),s(3),h((e==null?null:e.I)==null?10:-1),s(),h((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),h((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),h((e==null?null:e.I)!=null?13:-1),s(),h(e!=null&&e.Channel?14:-1),s(),h(t.isShowReservedColumn?15:-1),s(2),h((e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==t.minDate?17:18)}}function Nt(i,c){if(i&1&&(a(0,"tbody"),q(1,Rt,19,17,"tr",null,G),r()),i&2){let e=c.$implicit;s(),K(e.Variants)}}function Lt(i,c){if(i&1){let e=w();a(0,"mainpanel",1),x("onSubmit",function(t){_(e);let o=l();return C(o.onSearch(t))}),a(1,"actions")(2,"div",2),u(3,st,4,2,"div"),f(4,"async"),r()(),a(5,"filters")(6,"div",3)(7,"label",4),m(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",5),x("onChannelChange",function(t){_(e);let o=l();return C(o.onChannelChange(t))}),r()(),a(10,"div",3)(11,"filter-query-type",6),P("numberFilterComparatorChange",function(t){_(e);let o=l();return T(o.searchFilter.NumberFilterComparator,t)||(o.searchFilter.NumberFilterComparator=t),C(t)})("searchTypeChange",function(t){_(e);let o=l();return T(o.searchFilter.SearchType,t)||(o.searchFilter.SearchType=t),C(t)}),r()(),a(12,"div",3)(13,"label",7),m(14,"PageNumber"),r(),a(15,"input",8),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),C(t)}),r()(),a(16,"div",3)(17,"label",9),m(18,"Page Size"),r(),a(19,"input",10),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),C(t)}),r()(),a(20,"div")(21,"label",11),m(22,"Quantity From - To"),r(),a(23,"div",12)(24,"input",13),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityFrom,t)||(o.searchFilter.QuantityFrom=t),C(t)}),r(),m(25," - "),a(26,"input",14),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityTo,t)||(o.searchFilter.QuantityTo=t),C(t)}),r()()()(),a(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,ct,3,0,"div",18),a(32,"table",19),x("matSortChange",function(t){_(e);let o=l();return C(o.onSortVariant(t))}),a(33,"thead",20)(34,"tr")(35,"th",21),m(36," Product "),v(37,"br"),a(38,"mat-slide-toggle",22),x("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,C(t.onShowDifferenceStock())}),a(39,"small",11),m(40,"FILTER DIFFERENT INVENTORY"),r()()(),a(41,"th",23),m(42,"Variant"),r(),a(43,"th",24),m(44,"SKU"),r(),B(45,pt,3,3,"ng-container",25),a(46,"th",26),m(47," POS "),r(),a(48,"th",27)(49,"div",28),x("click",function(){_(e);let t=l();return C(t.openModalFilter())}),v(50,"img",29),a(51,"span",30),m(52),f(53,"stringLimit"),r()()(),u(54,mt,2,0,"th",31),a(55,"th",32),m(56,"Last Sync"),r()()(),q(57,Nt,3,0,"tbody",null,G),f(59,"async"),r(),a(60,"infinite-paginator",33),f(61,"async"),x("onNextPage",function(){_(e);let t=l();return C(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return C(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return C(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(i&2){let e,n,t,o,p=c,d=l();g("hideSearchBox",!1)("searchBoxPlaceHolder",d.searchPlaceholder()),s(3),h((e=b(4,24,d.products$))?3:-1,e),s(6),g("ngModel",(d.searchFilter==null?null:d.searchFilter.LocationID)||(d.searchFilter==null?null:d.searchFilter.ChannelID)),s(2),g("numberFilterComparatorOptions",p==null||p.Options==null?null:p.Options.SearchComparatorTypeOptions),F("numberFilterComparator",d.searchFilter.NumberFilterComparator),g("searchTypeOptions",p==null||p.Options==null?null:p.Options.SearchSKUOnlyOrSKUNameOptions),F("searchType",d.searchFilter.SearchType),s(4),F("ngModel",d.searchFilter.PageNumber),s(4),F("ngModel",d.searchFilter.RowCount),s(5),F("ngModel",d.searchFilter.QuantityFrom),s(2),F("ngModel",d.searchFilter.QuantityTo),s(5),h((d.searchFilter==null?null:d.searchFilter.filterModel)==3?31:-1),s(14),g("ngxPermissionsOnly",D(33,te,d.inventoryUpdateRole)),s(4),g("matTooltip",((n=d.channelIdentity())==null||n.label==null?null:n.label.length)>13?(n=d.channelIdentity())==null?null:n.label:""),s(),g("src",(t=d.channelIdentity())==null?null:t.img,N),s(2),I(" ",V(53,26,(o=d.channelIdentity())==null?null:o.label,13)," "),s(2),h(d.isShowReservedColumn?54:-1),s(3),K(b(59,29,d.products$)),s(3),g("totalData",d.infinitePagination.totalData())("hideCount",d.infinitePagination.hideCount())("rowCount",b(61,31,d.infinitePagination.totalRowCount$))("pageNumber",d.infinitePagination.pageNumber())("disableNextButton",d.infinitePagination.disableNextButton())("goToLastPage",d.infinitePagination.isLastPage())}}var Ln=(()=>{let c=class c{constructor(){this.http=S(me),this.toastr=S(pe),this.dialog=S(De),this.productService=S(Be),this.authService=S(xe),this.biggerPictureService=S(Ae),this.mainPanelService=S(Ee),this.placeholderService=S(Ue),this.infinitePagination=S(Y),this.ngxPermissionsService=S(ue),this.updateResHandling=S(ee),this.inventoryService=S(E),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=y.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=y.GuidEMpty,this.selectedChannel=M(null),this.channelIdentity=M({img:null,label:null}),this.inventoryUpdateRole=X.InventoryUpdate,this.hasInventoryEdit=M(!0),this.searchPlaceholder=M("Search ...")}ngOnInit(){this.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(z(n=>{this.checkShowReservedColumn(n)}),k(n=>(n=this.calculateAvailableStock(n),n)),R(1)),this.products$=this.sourceObs$}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(R(1),z(n=>{this.searchFilter={RowCount:n.Filter?.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter?.ChannelID,LocationID:n.Filter?.LocationID,NumberFilterComparator:n.Filter?.NumberFilterComparator,SearchType:n.Filter?.SearchType},this.initReloadData(),this.initSearchPlaceholder(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}initRoles(){this.ngxPermissionsService.hasPermission(X.InventoryUpdate).then(n=>this.hasInventoryEdit.set(n))}calculateAvailableStock(n){return n.map(o=>(o.totalAvailable=o.Variants.reduce((p,d)=>(p+=d.I?.Available||0,p),0),o))}checkShowReservedColumn(n){let t=0,o;n.forEach(p=>{o=p.Variants.find(d=>y.IsNotEmpty(d?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),y.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());y.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=y.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=y.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
|
|
2
2
|
Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(n){this.searchFilter.text=n,this.setChannelFilter(),this.initReloadData(),this.initSearchPlaceholder()}openModalFilter(){this.mainPanelService.openModalFilter()}onOpenDialogUpdateStockInfo(n){let t=this.productService.selectedVariantProduct(n);this.dialog.open(Ke,{data:{channelId:t[0]?.Channel[0]?.ChannelID,selectedProducts:t}}).afterClosed().pipe(j(o=>o===!0)).subscribe(()=>{this.updateStock(t)})}updateStock(n){if(n.length>0){let t=this.searchFilter.LocationID,o=n.map(d=>ne({ChannelItemID:d?.Channel[0]?.ChannelItemID,ChannelVariationID:d?.Channel[0]?.ChannelVariationID,Inventory:d.Inventory},y.IsNotEmpty(t)&&{LocationID:t})),p={ListChannelID:[this.searchFilter.ChannelID],List:o};this.http.post(Z.UpdateInventoryChannel,p).subscribe(d=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(d)})}}handlingUpdateStock(n){if(n[0]?.Response){let t=n[0]?.Response?.Fail_list,o=n[0]?.Response?.Success_list;this.updateResHandling.responseHandling(o,t,"Stock")}else this.toastr.error(n[0]?.Exception,"Error")}refreshInventory(n,t,o,p){let d={ChannelItemID:n,ChannelVariationID:t,ChannelID:o,VariantID:p};this.http.post("/api/Inventory/RefreshInventoryChannel",d).subscribe(Ot=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(n){n.Variants=n.Variants.map(t=>(t.Inventory>=0&&(t.selected=n.selected),t))}onCheckboxStateChange(n){n=n.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=this.checkboxState,o)),t))}openTableDialog(n,t){this.hasInventoryEdit()&&this.dialog.open(je,{data:{Name:n.Name,Variant:t,ChannelID:t?.Channel[0]?.ChannelID,Table:"inventory",ChannelItemID:n.ChannelItemID}}).afterClosed().pipe(j(p=>y.IsNotEmpty(p))).subscribe(p=>{this.updateItemAfterDialog(p)})}updateItemAfterDialog(n){let t=n.InventoryMultiwarehouse[0]?.LocationID,o={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:n?.Inventory,VariantID:n.ID,SKU:n?.Sku,LocationID:t};this.http.post(Z.UpdateUpdateQuantityByItem,o).subscribe(p=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([p])})}onScanInventory(n){let t=this.productService.selectedVariantProduct(n);this.inventoryService.refreshInventory(t).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(Qe,{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=J.DIFFERENCE:this.searchFilter.filterModel=J.ALL,this.initReloadData()}onZoomImage(n,t){this.biggerPictureService.openBiggerPicture(n,t)}onSortVariant(n){if(n.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(k(t=>t.map(o=>(o.Variants=o.Variants.sort((p,d)=>y.compare(p.I?.Available,d.I?.Available,n.direction==="asc")),o)).sort((o,p)=>y.compare(o.totalAvailable,p.totalAvailable,n.direction==="asc"))))}};c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=O({type:c,selectors:[["app-single-channel-comparison"]],features:[W([Y,E,ee])],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"hideSearchBox","searchBoxPlaceHolder"],["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"d-flex"],[1,"mb-5"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],["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"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["matSort","",1,"table","border-bottom",3,"matSortChange"],[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%"],[4,"ngxPermissionsOnly"],["scope","col","mat-sort-header","Available","arrowPosition","before",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"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[1,"text-center"],["matTooltipShowDelay","500",3,"matTooltip"],[1,"text-start",2,"width","0%",3,"rowSpan"],[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"],[3,"ngClass"],["type","checkbox",1,"me-3",3,"ngModel"],["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%"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["title","Stock Available"],["title","Inventory below minimum inventory"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[3,"class"],["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"],[3,"click"],[1,"text-danger"]],template:function(t,o){if(t&1&&(u(0,Lt,62,35,"mainpanel",0),f(1,"async")),t&2){let p;h((p=b(1,1,o.loader$))?0:-1,p)}},dependencies:[Q,ce,ke,Oe,be,Se,we,fe,ye,ve,Ge,ge,he,He,$e,Fe,Ie,Le,Re,Ne,qe,We,$,de,H,ze],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 i=c;return i})();export{Ln as SingleChannelComparisonComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./chunk-DE3FRI5N.js";import{a as o}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-DE3FRI5N.js";import{a as o}from"./chunk-PDIHZKEM.js";import{a as v,b as d}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c,g as u}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,_c as s,hc as m,ic as p,jc as l,kc as r,ob as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var f=(()=>{let n=class n{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=i({type:n,selectors:[["app-inventory"]],features:[s([h])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,C){t&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),r(3,"nav-tab",2),l()()(),r(4,"router-outlet")),t&2&&(a(3),m("Tabs",C.inventoryTabs))},dependencies:[d,v,u,c],encapsulation:2});let e=n;return e})();var U=[{path:"",component:f,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-7RPUDPF6.js").then(e=>e.MultiChannelComparison)},canActivate:[o],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-YM4QLIHR.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[o],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-VWETHESQ.js").then(e=>e.ChannelSummaryComponent)},canActivate:[o],data:{title:"Different Inventory"}}]}];export{U as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as n}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as n}from"./chunk-PDIHZKEM.js";import{a as d,b as m}from"./chunk-75IM3UUA.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as u}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as c,hc as l,ic as p,jc as s,kc as i,ob as r}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var h=(()=>{let o=class o{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"},{Title:"Scan Job",Url:"/menu/products/status/notification",Description:"Scan results for each channel, including product counts and synchronization status"}]}};o.\u0275fac=function(a){return new(a||o)},o.\u0275cmp=c({type:o,selectors:[["app-status"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"]],template:function(a,f){a&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),s()()(),i(4,"router-outlet")),a&2&&(r(3),l("Tabs",f.productTabs))},dependencies:[m,d,u],encapsulation:2});let t=o;return t})();var U=[{component:h,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",loadComponent(){return import("./chunk-PG2DZ63W.js").then(t=>t.InPosComponent)},canActivate:[n,e],data:{title:"Products in POS"}},{path:"sold-in-channel",loadComponent(){return import("./chunk-QCUYDIE3.js").then(t=>t.SoldInChannelComponent)},canActivate:[n,e],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",loadComponent(){return import("./chunk-FYQFBMXR.js").then(t=>t.NotInChannelComponent)},canActivate:[n,e],data:{title:"Products not in Channel"}},{path:"not-in-pos",loadComponent(){return import("./chunk-SU5GJKTU.js").then(t=>t.NotInPosComponent)},canActivate:[n,e],data:{title:"Products not in POS"}},{path:"duplicate-sku",loadComponent(){return import("./chunk-2JS77RTQ.js").then(t=>t.DuplicateSkuComponent)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-VYYJFRP5.js").then(t=>t.DuplicateSkuV2Component)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",loadComponent(){return import("./chunk-6ZRATZJD.js").then(t=>t.ChannelStatisticComponent)},canActivate:[n,e],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-YEVETIZF.js").then(t=>t.NotificationComponent)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-UAQIEHEC.js").then(t=>t.NotificationV2Component)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2/detailV2",loadComponent(){return import("./chunk-2WQLSGW3.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-2MC4ICGX.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}}]}];export{U as routes};
|