marketplacepos 5.50.3 → 5.51.2
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-ZM7ND6FE.js → chunk-26E54WQH.js} +1 -1
- package/Marketplace/{chunk-DIDUSCV7.js → chunk-3KECTTUV.js} +1 -1
- package/Marketplace/chunk-4XA7JWTB.js +1 -0
- package/Marketplace/{chunk-7VJ22OLT.js → chunk-575TS45M.js} +1 -1
- package/Marketplace/{chunk-EV6TBBSW.js → chunk-75RVMUFO.js} +1 -1
- package/Marketplace/{chunk-7E4ZSLPD.js → chunk-AMQMYSQR.js} +1 -1
- package/Marketplace/{chunk-NGQFZI6A.js → chunk-APQWBZOM.js} +1 -1
- package/Marketplace/{chunk-KKQ32Z72.js → chunk-AVSAALDJ.js} +1 -1
- package/Marketplace/{chunk-HAZ7U3MT.js → chunk-AVTQG66S.js} +1 -1
- package/Marketplace/{chunk-PFP5WMC3.js → chunk-BKVIOCLH.js} +1 -1
- package/Marketplace/{chunk-XYZI7ZXN.js → chunk-BZ7QY7N3.js} +1 -1
- package/Marketplace/{chunk-KDJVMFOK.js → chunk-CHCAQ4NV.js} +1 -1
- package/Marketplace/{chunk-UWKDFRVX.js → chunk-DCMOITWM.js} +1 -1
- package/Marketplace/{chunk-FBXKHJ2G.js → chunk-DOQD3RMB.js} +1 -1
- package/Marketplace/{chunk-RRRPWDKB.js → chunk-DV3BDHBL.js} +1 -1
- package/Marketplace/{chunk-QWEMPIP7.js → chunk-DVJ7VXWL.js} +1 -1
- package/Marketplace/{chunk-YQPAS2RI.js → chunk-DW7R34MP.js} +1 -1
- package/Marketplace/chunk-EXKAFEQL.js +1 -0
- package/Marketplace/{chunk-ZLJBRQ5V.js → chunk-FQM4RKLX.js} +1 -1
- package/Marketplace/{chunk-53ZGHR7J.js → chunk-GYQHWDWX.js} +1 -1
- package/Marketplace/{chunk-XCGXT3P7.js → chunk-HO6XCGRR.js} +1 -1
- package/Marketplace/{chunk-KNE2UYQ2.js → chunk-HPQDUJXF.js} +1 -1
- package/Marketplace/{chunk-HHDJUCIT.js → chunk-ICY32GYN.js} +1 -1
- package/Marketplace/{chunk-PHVEBMTE.js → chunk-ILFG3IYB.js} +1 -1
- package/Marketplace/{chunk-YDNXBOLU.js → chunk-IUJ6UX3L.js} +1 -1
- package/Marketplace/{chunk-2OKZEOBU.js → chunk-J4552BMI.js} +1 -1
- package/Marketplace/{chunk-YEU5TPRD.js → chunk-JUN3HVEV.js} +1 -1
- package/Marketplace/{chunk-JLDXWNDU.js → chunk-KHGTW7IV.js} +1 -1
- package/Marketplace/{chunk-CGDIULPW.js → chunk-KVLHLMO4.js} +1 -1
- package/Marketplace/{chunk-3YUIOGNI.js → chunk-LB276KSA.js} +1 -1
- package/Marketplace/{chunk-JEJHGIUU.js → chunk-MG7B4OWR.js} +1 -1
- package/Marketplace/chunk-MRWGPCR7.js +1 -0
- package/Marketplace/{chunk-MZWP4SZF.js → chunk-N6VPSXF7.js} +2 -2
- package/Marketplace/{chunk-TOPYLZOF.js → chunk-NEB6AMMM.js} +1 -1
- package/Marketplace/{chunk-HMDHDMIC.js → chunk-NKN7T3C3.js} +1 -1
- package/Marketplace/{chunk-VA7NXG7X.js → chunk-NMOQXVWS.js} +1 -1
- package/Marketplace/{chunk-6MUVEZMQ.js → chunk-NUF326RW.js} +1 -1
- package/Marketplace/{chunk-X2WAAZ7G.js → chunk-NX3QFU4A.js} +1 -1
- package/Marketplace/{chunk-QJH7APJQ.js → chunk-OEUA6IL2.js} +1 -1
- package/Marketplace/{chunk-FDVRSAF3.js → chunk-PGQYHHH3.js} +1 -1
- package/Marketplace/{chunk-QZMWXAUJ.js → chunk-Q3Z7EEVP.js} +1 -1
- package/Marketplace/{chunk-XMU7MXAM.js → chunk-QJ7SMXW4.js} +1 -1
- package/Marketplace/{chunk-JG7M73IA.js → chunk-QLFVXMNJ.js} +1 -1
- package/Marketplace/{chunk-FO75JP2L.js → chunk-QPELTSKE.js} +1 -1
- package/Marketplace/{chunk-3PUUKJCQ.js → chunk-QUIZLT5F.js} +1 -1
- package/Marketplace/{chunk-FPJTI4LM.js → chunk-REDQ2L7Y.js} +1 -1
- package/Marketplace/{chunk-CQBHWYUO.js → chunk-SLCKHYT3.js} +1 -1
- package/Marketplace/{chunk-2FB6QJKT.js → chunk-U4ARIHUF.js} +1 -1
- package/Marketplace/{chunk-XYRET5HT.js → chunk-UHWLUO2C.js} +1 -1
- package/Marketplace/{chunk-CBULW22C.js → chunk-UJAA73LE.js} +1 -1
- package/Marketplace/{chunk-N4MYHIMN.js → chunk-UOFJCKS5.js} +1 -1
- package/Marketplace/{chunk-YCKLOFMA.js → chunk-VRD2D2BP.js} +1 -1
- package/Marketplace/{chunk-MYJZFEAZ.js → chunk-WZQRKTBN.js} +1 -1
- package/Marketplace/{chunk-QJU2YGUH.js → chunk-YFR3EI3B.js} +1 -1
- package/Marketplace/{chunk-UMJVPGHV.js → chunk-YMOSVDG5.js} +1 -1
- package/Marketplace/{chunk-FS3VTRY2.js → chunk-YSYA7XCF.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-7TBLEURN.js → main-I5THR2C3.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-CFJAZJYY.js +0 -1
- package/Marketplace/chunk-KMNWLBEP.js +0 -1
- package/Marketplace/chunk-S2ZFBPPJ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as pe,b as se}from"./chunk-K5WSFDNA.js";import{a as ue}from"./chunk-
|
|
1
|
+
import{a as pe,b as se}from"./chunk-K5WSFDNA.js";import{a as ue}from"./chunk-DOQD3RMB.js";import{a as F}from"./chunk-L6CRWJ2O.js";import{a as ce}from"./chunk-PV4OJSZI.js";import{a as de}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as me}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as ae}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 re}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as le}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 oe}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as ne,c as $,h as ee,m as te,o as ie}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as Y,B as Z,w as Q,x as U,y as X}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as G,Hb as W,Ia as N,Mc as z,Nc as l,Oc as V,Pc as A,Rc as h,Sc as S,Tc as w,Uc as R,Vc as H,Wc as j,Z as L,_c as q,ac as x,ad as J,bc as B,cc as b,dc as D,fc as I,gc as k,hc as y,ic as i,id as _,jc as n,jd as f,kc as C,kd as K,ob as r,ra as O,rc as T,wc as E,ya as c,yc as g,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as M,b as P}from"./chunk-66YHNWRR.js";var _e=()=>[],fe=t=>({"td-cell-hover":t});function Ce(t,m){if(t&1&&C(0,"variants-dropdown",26),t&2){let e=g().$implicit;y("variants",e==null?null:e.Variants)}}function ge(t,m){if(t&1&&C(0,"variant-with-image",27),t&2){let e=g().$implicit;y("variant",e==null?null:e.Variants[0])}}function he(t,m){if(t&1&&(i(0,"span"),l(1),n()),t&2){let e=g().$implicit;r(),A("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Se(t,m){t&1&&l(0," Awaiting Collection ")}function we(t,m){t&1&&l(0," Shipped ")}function ve(t,m){t&1&&l(0," Completed ")}function ye(t,m){t&1&&l(0," To Ship ")}function xe(t,m){t&1&&l(0," - ")}function be(t,m){if(t&1&&(i(0,"tr")(1,"td")(2,"div",23)(3,"div"),C(4,"order-link",24),n(),i(5,"small"),l(6),_(7,"date"),n(),C(8,"br"),i(9,"small"),C(10,"i",25),l(11),n()()(),i(12,"td"),x(13,Ce,1,1,"variants-dropdown",26)(14,ge,1,1,"variant-with-image",27),n(),i(15,"td"),l(16),_(17,"number"),n(),i(18,"td")(19,"div",23)(20,"div",28)(21,"span"),l(22),n(),x(23,he,2,1,"span"),n(),i(24,"small"),l(25),n()()(),i(26,"td"),x(27,Se,1,0),_(28,"lowercase"),_(29,"lowercase"),_(30,"lowercase"),_(31,"lowercase"),_(32,"lowercase"),_(33,"lowercase"),B(34,we,1,0)(35,ve,1,0)(36,ye,1,0)(37,xe,1,0),n()()),t&2){let e=m.$implicit;r(4),y("order",e),r(2),A(" ",K(7,11,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),r(5),A(" ",e.Customer," "),r(),z(J(28,fe,(e.Variants==null?null:e.Variants.length)>1)),r(),b((e.Variants==null?null:e.Variants.length)>1?13:14),r(3),V(f(17,14,e.Amount)),r(6),V(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),r(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?23:-1),r(2),A(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),r(2),b(f(28,16,e.Fulfillment)==="awaitingcollection"?27:f(29,18,e.Fulfillment)==="sent"&&f(30,20,e.Payment)==="unpaid"?34:f(31,22,e.Payment)==="paid"?35:f(32,24,e.Payment)==="unpaid"&&f(33,26,e.Fulfillment)==="unsent"?36:37)}}function Ae(t,m){if(t&1){let e=T();i(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Number"),n(),i(6,"th"),l(7,"Items"),n(),i(8,"th",21),l(9,"Amount"),n(),i(10,"th",21),l(11,"Fulfillment"),n(),i(12,"th",21),l(13,"Order Status"),n()()(),i(14,"tbody"),I(15,be,38,30,"tr",null,D),n()(),i(17,"app-custom-paginator",22),E("next",function(){c(e);let p=g();return u(p.initAllOrders())})("previous",function(){c(e);let p=g();return u(p.initAllOrders())}),n()()}if(t&2){let e=g(),d=j(0);r(15),k(d),r(2),y("filter",e.filter())("totaldata",d==null?null:d.length)}}function Te(t,m){t&1&&(i(0,"div",16),C(1,"app-empty-state"),n())}var Ke=(()=>{let m=class m{constructor(){this.orderService=O(F),this.filter=N({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:d=>{this.initFromDate(d)},error:d=>{console.error("Error fetching default date:",d),this.initFromDate(null)}})}initFromDate(d){this.filter.update(p=>P(M({},p),{From:d})),this.initAllOrders()}initAllOrders(){this.allOrders$=this.orderService.getAllOrders(this.filter()).pipe(L(1))}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=W({type:m,selectors:[["app-all"]],features:[q([F])],decls:34,vars:12,consts:[["headerTitle","All Orders","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],["rowCountApi","/api/orders/allcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"d-flex","align-items-end","gap-2"]],template:function(p,a){if(p&1){let s=T();R(0),_(1,"async"),i(2,"mainpanel",0),E("onSubmit",function(){return c(s),u(a.initAllOrders())}),w("textChange",function(o){return c(s),S(a.filter().Number,o)||(a.filter().Number=o),u(o)}),i(3,"actions")(4,"a",1),C(5,"i",2),i(6,"span"),l(7,"Order Fulfillment Display"),n()()(),i(8,"filters")(9,"div")(10,"label",3),l(11,"Channel"),n(),i(12,"app-channel-options-v2",4),w("ngModelChange",function(o){return c(s),S(a.filter().ListChannelID,o)||(a.filter().ListChannelID=o),u(o)}),n()(),i(13,"div",5)(14,"label",3),l(15,"From/To"),n(),i(16,"div",6)(17,"datepicker",7),w("dateChange",function(o){return c(s),S(a.filter().From,o)||(a.filter().From=o),u(o)}),n()(),i(18,"div")(19,"datepicker",8),w("dateChange",function(o){return c(s),S(a.filter().To,o)||(a.filter().To=o),u(o)}),n()()(),i(20,"div",5)(21,"label",9),l(22,"Page Number"),n(),i(23,"input",10),w("ngModelChange",function(o){return c(s),S(a.filter().PageNumber,o)||(a.filter().PageNumber=o),u(o)}),n()(),i(24,"div",5)(25,"label",9),l(26,"Page Size"),n(),i(27,"input",11),w("ngModelChange",function(o){return c(s),S(a.filter().PageSize,o)||(a.filter().PageSize=o),u(o)}),n()()(),i(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,Ae,18,2,"div",15)(33,Te,2,0,"div",16),n()()()()()}if(p&2){let s=H(f(1,8,a.allOrders$)||G(11,_e));r(2),h("text",a.filter().Number),r(10),y("multiple",!0),h("ngModel",a.filter().ListChannelID),r(5),h("date",a.filter().From),r(2),h("date",a.filter().To),r(4),h("ngModel",a.filter().PageNumber),r(4),h("ngModel",a.filter().PageSize),r(5),b((s==null?null:s.length)>0?32:33)}},dependencies:[Z,re,ae,me,ne,$,ie,ee,te,pe,se,ce,le,oe,ue,de,Q,U,Y,X],encapsulation:2});let t=m;return t})();export{Ke as AllComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $}from"./chunk-RUYX7KTP.js";import{a as Z}from"./chunk-TVEI5B2O.js";import{a as Y}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as U,b as J,d as Q}from"./chunk-BZWZ64N5.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as K}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./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-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as V}from"./chunk-
|
|
1
|
+
import{a as $}from"./chunk-RUYX7KTP.js";import{a as Z}from"./chunk-TVEI5B2O.js";import{a as Y}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as U,b as J,d as Q}from"./chunk-BZWZ64N5.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as K}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./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-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as V}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as q,c as z,h as G,m as H,o as j}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as B}from"./chunk-D6JH2KV4.js";import{e as O}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{y as A}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as W,Hb as L,Nb as R,Nc as l,Oc as _,Pc as S,Rc as g,Sc as u,Tc as c,ac as P,ad as D,cc as M,ec as N,fc as E,gc as x,hc as h,ic as i,id as F,jc as n,kc as C,kd as k,mb as v,ob as r,ra as f,rc as I,wc as y,ya as b,yc as w,za as T}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ee=()=>["/menu/log/rawlog/detail"],te=o=>({ID:o});function ie(o,p){if(o&1&&(i(0,"span",17),C(1,"img",18),n(),l(2)),o&2){let a=p.item;r(),h("src",a.Img,v)("alt",a.Name),r(),S(" ",a.Name," ")}}function ne(o,p){if(o&1&&(i(0,"tr")(1,"td")(2,"a",23),l(3),F(4,"date"),n()(),i(5,"td"),l(6),n(),i(7,"td"),l(8),n(),i(9,"td"),l(10),n()()),o&2){let a=p.$implicit;r(2),h("routerLink",W(9,ee))("queryParams",D(10,te,a.id)),r(),S(" ",k(4,6,a.Created,"dd MMM yyyy HH:mm:ss")," "),r(3),_(a.type),r(2),_(a.number),r(2),_(a.message)}}function ae(o,p){if(o&1){let a=I();i(0,"div",15)(1,"table",19)(2,"thead",20)(3,"tr")(4,"th",21),l(5,"Date"),n(),i(6,"th"),l(7,"Type"),n(),i(8,"th"),l(9,"Number"),n(),i(10,"th"),l(11,"Message"),n()()(),i(12,"tbody"),E(13,ne,11,12,"tr",null,N),n()(),i(15,"mat-paginator",22),y("page",function(m){b(a);let e=w();return T(e.changePage(m))}),n()()}if(o&2){let a=w();r(13),x(a.Result),r(2),h("length",a.paginationTotal)("pageSize",a.paginationPageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function oe(o,p){o&1&&(i(0,"div",16),C(1,"app-empty-state"),n())}var be=(()=>{let p=class p{constructor(){this.http=f(B),this._RawLogService=f($),this.authService=f(V),this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}],this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(d={}){this.http.post("/api/OrdersLoader/Get",d).subscribe(m=>{this.filter=m.Filter,this.ActionTypeList=m.Options.ActionTypeList,this.Get()})}Get(d){this.filter.Number=d,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(m=>{this._RawLogService.Data=m.hits,this.Result=Array();for(let e of m.hits){let s={id:e._id,message:e._source.message,responseCode:e._source.log.responseCode,processTypeString:e._source.log.processType,type:e._source.log.type,number:e._source.log.number,Created:e._source["@timestamp_received"]};this.Result.push(s)}this.paginationTotal=m.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(d){this.filter.PageNumber=d.pageIndex+1,this.Get()}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=L({type:p,selectors:[["app-raw-log"]],decls:28,vars:9,consts:[["headerTitle","Channel Push Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[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","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"]],template:function(m,e){m&1&&(i(0,"mainpanel",0),c("textChange",function(t){return u(e.filter.Number,t)||(e.filter.Number=t),t}),y("onSubmit",function(t){return e.Get(t)}),i(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),n(),i(5,"ng-select",2),c("ngModelChange",function(t){return u(e.filter.ChannelID,t)||(e.filter.ChannelID=t),t}),R(6,ie,3,3,"ng-template",3),n()(),i(7,"div",4)(8,"label",5),l(9,"From/To"),n(),i(10,"div",6)(11,"datepicker",7),c("dateChange",function(t){return u(e.filter.From,t)||(e.filter.From=t),t}),n()(),i(12,"div")(13,"datepicker",8),c("dateChange",function(t){return u(e.filter.To,t)||(e.filter.To=t),t}),n()()(),i(14,"div",4)(15,"label",9),l(16,"Page Number"),n(),i(17,"input",10),c("ngModelChange",function(t){return u(e.filter.PageNumber,t)||(e.filter.PageNumber=t),t}),n()(),i(18,"div",4)(19,"label",9),l(20,"Page Size"),n(),i(21,"input",11),c("ngModelChange",function(t){return u(e.filter.RowCount,t)||(e.filter.RowCount=t),t}),n()()(),i(22,"content")(23,"div",12)(24,"div",13)(25,"div",14),P(26,ae,16,3,"div",15)(27,oe,2,0,"div",16),n()()()()()),m&2&&(g("text",e.filter.Number),r(5),h("clearable",!0)("items",e.channelOptions),g("ngModel",e.filter.ChannelID),r(6),g("date",e.filter.From),r(2),g("date",e.filter.To),r(4),g("ngModel",e.filter.PageNumber),r(4),g("ngModel",e.filter.RowCount),r(5),M((e.Result==null?null:e.Result.length)>0?26:27))},dependencies:[K,Q,q,z,j,G,H,U,J,Y,O,Z,X,A],encapsulation:2});let o=p;return o})();export{be as RawLogComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F}from"./chunk-TQROQOXU.js";import{a as x}from"./chunk-
|
|
1
|
+
import{a as F}from"./chunk-TQROQOXU.js";import{a as x}from"./chunk-REDQ2L7Y.js";import{h as E}from"./chunk-J4552BMI.js";import{a as T}from"./chunk-AGBJEXIM.js";import{b as i,c as g}from"./chunk-UPRDDI4K.js";import{b as D,e as d}from"./chunk-D6JH2KV4.js";import{d as w}from"./chunk-UB3ZV5NW.js";import{B as U,G as C,Ia as j,J as l,g as A,ma as s,q as u,ra as p,v as I}from"./chunk-OHGMB7HJ.js";var H=(()=>{let o=class o{constructor(){this.httpService=p(d)}getAttributes(t,e){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/shopee/AddProduct",t).pipe(l(r=>u(null)))}generateAttribute(t){return t.map(e=>({attribute_id:e.attribute_id,attribute_value_list:e.attribute_value_list.map(r=>({value_id:r.value_id,name:r.name}))})),t}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let a=o;return a})();var R=(()=>{let o=class o{constructor(){this.httpService=p(d)}getCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tiktok/AddProduct",t).pipe(l(r=>u(null)))}generateAttribute(t){let e;return t.map(r=>(r.type=="PRODUCT_PROPERTY"?e={id:r.id,name:r.name,type:r.type,values:r.values}:e={id:r.id,name:r.values[0].id,type:r.type},e))}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let a=o;return a})();var V=(()=>{let o=class o{constructor(){this.httpService=p(d)}getAttributes(t,e){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/lazada/AddProduct",t).pipe(l(r=>u(null)))}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let a=o;return a})();var z=(()=>{let o=class o{constructor(){this.httpService=p(d)}getAttributes(t,e){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/woo/AddProduct",t).pipe(l(r=>u(null)))}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let a=o;return a})();var y=class{};var v=class{};var G=(()=>{let o=class o{constructor(){this.httpService=p(d)}getCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tokopedia/AddProduct",t).pipe(l(r=>u(null)))}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let a=o;return a})();var N=(()=>{let o=class o{constructor(){this.httpService=p(d)}uploadProduct(t){return this.httpService.post("api/product/shopify/AddProduct",t).pipe(l(r=>u(null)))}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let a=o;return a})();var O=(()=>{let o=class o{constructor(){this.httpService=p(d)}uploadProduct(t){return this.httpService.post(T.UploadPlugoProduct,t).pipe(l(e=>u(null)))}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let a=o;return a})();var Bt=(()=>{let o=class o{constructor(){this.authService=p(E),this.productService=p(x),this.shoppeUploadService=p(H),this.tiktokUploadService=p(R),this.lazadaUploadService=p(V),this.tokopediaUploadService=p(G),this.wooUploadService=p(z),this.shopifyUploadService=p(N),this.plugoUploadService=p(O),this.toastrHandlingService=p(F),this.toastr=p(D),this.router=p(w),this.httpService=p(d),this._selectedProduct=new A(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(C(t=>t&&t.length>0))}getStoredProducts(){let t=localStorage.getItem("productsUpload");if(t){let e=JSON.parse(t);return e&&e.length>0?e:[]}else return[]}setSelectedProduct(t){localStorage.setItem("productsUpload",JSON.stringify(t)),this._selectedProduct.next(t)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let t=this.authService.getChannels(),e=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(e,t)}getDefaultCategory(){return this.httpService.get("api/v1/Channel/ProductCategory/Default")}get channelProductUpload(){let t=this.getUnselectedChannels();return j(t.map(r=>{let c=new y;return c.id=r.ID,c.name=r.Name,c.type=r.TypeID,c.categoryId=null,c.attributes=[],c.selected=!1,c}))}onUploadProduct(t){let e=t.filter(r=>r.selected&&g.IsNotEmpty(r.categoryId)||r.selected&&(r.type==i.Shopify||r.type==i.ShopifyV2||r.type==i.Plugo));if(e.length>0){let r=this.generateDataForUpload(e);this.uploadProduct(r)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(t){let e=this.generateObservableForUpload(t);U(e).pipe(I(r=>{let c=[];return r.filter(f=>g.IsNotEmpty(f)).forEach(f=>{c=[...c,...f]}),c})).subscribe({next:(r=[])=>{g.IsNotEmpty(r)&&this.toastrHandlingService.showToastrUploadMultiple(r),this.hasSuccessRes(r)&&this.onSuccessUpload()}})}hasSuccessRes(t){let e=!1;return t.forEach(r=>{r?.Response.Success_list?.length>0&&g.IsNotEmpty(r)&&(e=!0)}),e}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(t){let e=[],r=[],c=[],f=[],S=[],k=[],P=[],b=[];t.forEach(n=>{switch(n.ChannelType){case i.Shopee:r.push(n);break;case i.Tiktok:e.push(n);break;case i.Lazada:c.push(n);break;case i.Tokopedia:f.push(n);break;case i.WooCommerce:S.push(n);break;case i.Shopify:k.push(n);break;case i.ShopifyV2:P.push(n);break;case i.Plugo:b.push(n);break}});let h=[];return[{type:i.Shopee,data:r},{type:i.Tiktok,data:e},{type:i.Lazada,data:c},{type:i.Tokopedia,data:f},{type:i.WooCommerce,data:S},{type:i.Shopify,data:k},{type:i.ShopifyV2,data:P},{type:i.Plugo,data:b}].filter(n=>n.data.length>0).forEach(n=>{switch(n.type){case i.Shopee:h.push(this.shoppeUploadService.uploadProduct(r));break;case i.Tiktok:h.push(this.tiktokUploadService.uploadProduct(e));break;case i.Lazada:h.push(this.lazadaUploadService.uploadProduct(c));break;case i.Tokopedia:h.push(this.tokopediaUploadService.uploadProduct(f));break;case i.WooCommerce:h.push(this.wooUploadService.uploadProduct(S));break;case i.Shopify:h.push(this.shopifyUploadService.uploadProduct(k));break;case i.ShopifyV2:h.push(this.shopifyUploadService.uploadProduct(P));break;case i.Plugo:h.push(this.plugoUploadService.uploadProduct(b));break}}),h}generateDataForUpload(t){let e=[];return t.forEach(r=>{let c=new v;c.ChannelID=r.id,c.ChannelType=r.type,c.Products=this._selectedProduct.getValue(),r.type==i.Shopify||r.type==i.ShopifyV2?delete c.CategoryID:c.CategoryID=r.categoryId,c=this.generateAttributeHttpRequest(r,c),e.push(c)}),e}generateAttributeHttpRequest(t,e){return t.type==i.WooCommerce||t.type==i.Shopify||t.type==i.ShopifyV2?e.Attribute=t.attributes[0]:t.type==i.Tiktok?(e.Attributes=this.formatAttributes(t.type,t.attributes),e.listing_platforms=t.listing_platforms):e.Attributes=this.formatAttributes(t.type,t.attributes),e}formatAttributes(t,e){let r;switch(t){case i.Shopee:r=this.shoppeUploadService.generateAttribute(e);break;case i.Tiktok:r=this.tiktokUploadService.generateAttribute(e);break;case i.WooCommerce:r=this.tiktokUploadService.generateAttribute(e);break;case i.Tokopedia:r=e;break;case i.Shopify:r=e;break;case i.ShopifyV2:r=e;break;default:r=[];break}return r}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let a=o;return a})();export{H as a,R as b,V as c,z as d,Bt as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-QJASIA27.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-
|
|
1
|
+
import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-QJASIA27.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-CHCAQ4NV.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-BZ7QY7N3.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-DW7R34MP.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-75RVMUFO.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-GYQHWDWX.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-AVSAALDJ.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-UHWLUO2C.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-AMQMYSQR.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"log/detail",loadComponent(){return import("./chunk-5NWJOQN5.js").then(t=>t.DownloadOrderDetailComponent)},title:"Download Log Detail"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.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-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as I}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as H,c as R,h as j,m as F}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as W}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B,w as k,z as P}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as x,Ia as h,Nc as i,Oc as V,Rc as f,Sc as C,Tc as b,Uc as O,Vc as D,Wc as _,Z as S,ac as M,cc as N,hc as g,ic as e,id as v,jc as t,jd as y,kc as L,ob as d,ra as E,rc as T,wc as w,ya as p,yc as A,za as m}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function Y(r,l){if(r&1&&(e(0,"pre",21),i(1),v(2,"json"),t()),r&2){A();let U=_(25);d(),V(y(2,1,U))}}function q(r,l){r&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ae=(()=>{let l=class l{constructor(){this.httpService=E(W),this.selectedChannel=h(null),this.orderNumber=h(null)}initEscrowLog(){this.escrowLog$=this.httpService.post(I.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(S(1))}copyToClipboard(c){if(!c)return;let s=typeof c=="string"?c:JSON.stringify(c,null,2);navigator.clipboard.writeText(s),alert("Copied to clipboard!")}};l.\u0275fac=function(s){return new(s||l)},l.\u0275cmp=x({type:l,selectors:[["app-escrow-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(s,n){if(s&1){let a=T();e(0,"mainpanel",0)(1,"actions")(2,"button",1),w("click",function(){return p(a),m(n.initEscrowLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),b("ngModelChange",function(o){return p(a),C(n.selectedChannel,o)||(n.selectedChannel=o),m(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),b("ngModelChange",function(o){return p(a),C(n.orderNumber,o)||(n.orderNumber=o),m(o)}),t()()()()(),O(25),v(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),w("click",function(){p(a);let o=_(25);return m(n.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,Y,3,3,"pre",21)(39,q,2,0,"p",22),t()()()()()()()()()}if(s&2){g("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),f("ngModel",n.selectedChannel),d(8),f("ngModel",n.orderNumber),d();let a=D(y(26,6,n.escrowLog$));d(8),g("disabled",!a),d(5),N(a?38:39)}},dependencies:[B,H,R,j,F,J,G,k,P],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}"]});let r=l;return r})();export{ae as EscrowApiComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ye}from"./chunk-YKKHSYDW.js";import{a as de,b as he}from"./chunk-Z3PLQ27X.js";import"./chunk-VG66LDXQ.js";import{e as me}from"./chunk-
|
|
1
|
+
import{a as ye}from"./chunk-YKKHSYDW.js";import{a as de,b as he}from"./chunk-Z3PLQ27X.js";import"./chunk-VG66LDXQ.js";import{e as me}from"./chunk-HPQDUJXF.js";import"./chunk-TQROQOXU.js";import{a as ge}from"./chunk-IQGRGC3E.js";import{c as Ce,d as be}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as W}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as xe}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import{a as ce}from"./chunk-GNXSEYJF.js";import{a as ue}from"./chunk-7KG3DC5J.js";import{a as fe}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as _e}from"./chunk-27DIE2YS.js";import{a as pe}from"./chunk-REDQ2L7Y.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import{a as re}from"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import{e as le}from"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import{a as at}from"./chunk-3NCMRK7E.js";import{a as ne}from"./chunk-KHGTW7IV.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import{g as st}from"./chunk-C4MTEDSW.js";import{b as L,c as ae,d as Ct,e as $}from"./chunk-JMRRXRKO.js";import{b as se}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as oe,h as ie}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.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{P as _t,Q as Qt,ha as H,la as qt,ma as ft,ua as Kt}from"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as it}from"./chunk-ZSUWHVKX.js";import{h as Jt}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as Wt}from"./chunk-AGBJEXIM.js";import{b as Ht,c as $t}from"./chunk-NB2H6KA7.js";import{b as ut,c as g}from"./chunk-UPRDDI4K.js";import{A as ee,c as Yt,h as Xt,m as te}from"./chunk-6UM4NHOR.js";import{a as Rt}from"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as zt,e as Gt}from"./chunk-D6JH2KV4.js";import{b as jt,d as ot}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as mt,q as Dt,s as Bt,t as Nt,v as At}from"./chunk-CGSMHTKB.js";import{c as ht,d as gt,f as et,g as Lt,i as nt,k as Ut,m as Zt}from"./chunk-XBIHN6D3.js";import{$c as Ft,Aa as w,Ab as Tt,Bc as Q,Dc as q,Ec as K,Fd as tt,G as F,Gd as j,Hb as I,Ia as M,Lb as k,Lc as Y,Mb as wt,Mc as T,Nb as P,Nc as b,Oc as U,Pa as V,Pc as O,Rc as Z,Sc as z,Tc as X,_b as S,_c as G,aa as ct,ac as f,ad as E,bd as Mt,cc as C,dd as kt,ec as It,fc as Pt,gc as Ot,hc as l,ic as c,jc as d,kc as u,lb as vt,lc as D,ld as Et,ma as bt,mc as B,nc as N,ob as r,oc as A,pa as yt,pc as R,pd as Vt,qc as pt,ra as h,rc as v,sc as J,tb as dt,ub as St,wc as x,ya as p,yc as a,za as m}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Oe=["data-p-icon","exclamation-triangle"],ve=(()=>{class e extends at{pathId;onInit(){this.pathId="url(#"+L()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=V(e)))(n||e)}})();static \u0275cmp=I({type:e,selectors:[["","data-p-icon","exclamation-triangle"]],features:[k],attrs:Oe,decls:7,vars:2,consts:[["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(o,n){o&1&&(w(),D(0,"g"),N(1,"path",0)(2,"path",1)(3,"path",2),B(),D(4,"defs")(5,"clipPath",3),N(6,"rect",4),B()()),o&2&&(S("clip-path",n.pathId),r(5),J("id",n.pathId))},encapsulation:2})}return e})();var Fe=["data-p-icon","info-circle"],Se=(()=>{class e extends at{pathId;onInit(){this.pathId="url(#"+L()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=V(e)))(n||e)}})();static \u0275cmp=I({type:e,selectors:[["","data-p-icon","info-circle"]],features:[k],attrs:Fe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(o,n){o&1&&(w(),D(0,"g"),N(1,"path",0),B(),D(2,"defs")(3,"clipPath",1),N(4,"rect",2),B()()),o&2&&(S("clip-path",n.pathId),r(3),J("id",n.pathId))},encapsulation:2})}return e})();var Te=`
|
|
2
2
|
.p-toast {
|
|
3
3
|
width: dt('toast.width');
|
|
4
4
|
white-space: pre-line;
|
|
@@ -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.50.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(`
|
|
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.2",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-FPJTI4LM.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-JLDXWNDU.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-2OKZEOBU.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-REDQ2L7Y.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-KHGTW7IV.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-J4552BMI.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};
|