marketplacepos 5.50.2 → 5.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +26 -26
- package/Marketplace/{chunk-BGJEGBP5.js → chunk-25Q56ATV.js} +1 -1
- package/Marketplace/{chunk-4NT5VNJW.js → chunk-2PMJPSC4.js} +2 -2
- package/Marketplace/{chunk-VFZ76Z6T.js → chunk-364CDNZV.js} +1 -1
- package/Marketplace/{chunk-JUWHPFPW.js → chunk-36OIR6DM.js} +1 -1
- package/Marketplace/{chunk-TLCH5ENB.js → chunk-3Q6QZGLZ.js} +1 -1
- package/Marketplace/{chunk-B5BQZD66.js → chunk-4ITXH35D.js} +1 -1
- package/Marketplace/{chunk-EDGT4W2Q.js → chunk-4JCS7WPV.js} +1 -1
- package/Marketplace/{chunk-RNJHJCHP.js → chunk-53B6D5OR.js} +1 -1
- package/Marketplace/chunk-5NWJOQN5.js +1 -0
- package/Marketplace/{chunk-LQUMSCFQ.js → chunk-5YQUGH5Z.js} +1 -1
- package/Marketplace/{chunk-7K6U3ABQ.js → chunk-62YNPW6Q.js} +1 -1
- package/Marketplace/{chunk-YBRWFONB.js → chunk-6DGG765N.js} +1 -1
- package/Marketplace/{chunk-7AJN7ECH.js → chunk-6IZWIEUD.js} +1 -1
- package/Marketplace/{chunk-SS4PLPBF.js → chunk-7E6JD2PT.js} +1 -1
- package/Marketplace/{chunk-5NJAMQES.js → chunk-7QDKBMEA.js} +1 -1
- package/Marketplace/{chunk-TH27YE6R.js → chunk-7RIUHK6K.js} +1 -1
- package/Marketplace/{chunk-ELAPYSP6.js → chunk-A4X7F4MN.js} +1 -1
- package/Marketplace/{chunk-ZLNNQRTE.js → chunk-AF6XAQPY.js} +1 -1
- package/Marketplace/{chunk-7XA3VQEB.js → chunk-AZEH7PMO.js} +1 -1
- package/Marketplace/{chunk-GD6ZN56B.js → chunk-BKCKASH3.js} +1 -1
- package/Marketplace/{chunk-3TK5BYAY.js → chunk-BLOGT3TL.js} +1 -1
- package/Marketplace/{chunk-ZD5PSX3I.js → chunk-BVW7WI5I.js} +1 -1
- package/Marketplace/{chunk-QSW7O4GN.js → chunk-C64L25TP.js} +1 -1
- package/Marketplace/chunk-E6W25RW5.js +1 -0
- package/Marketplace/{chunk-DYTXOFIM.js → chunk-EGJMTFNO.js} +1 -1
- package/Marketplace/{chunk-YYKWI27U.js → chunk-EX4C4ZW4.js} +1 -1
- package/Marketplace/{chunk-PRM7MTFP.js → chunk-EYYKWIXP.js} +1 -1
- package/Marketplace/{chunk-U7FIZHGC.js → chunk-GD5I7ADU.js} +1 -1
- package/Marketplace/{chunk-2UKRRVAM.js → chunk-HT2MSA66.js} +1 -1
- package/Marketplace/{chunk-G3KVHCET.js → chunk-HZTKN5RX.js} +1 -1
- package/Marketplace/{chunk-OWLZQ5WE.js → chunk-ILFUI3MT.js} +1 -1
- package/Marketplace/{chunk-F24YPKYG.js → chunk-IXNEMOFX.js} +1 -1
- package/Marketplace/chunk-J4RDYEJC.js +1 -0
- package/Marketplace/{chunk-QB7PXKAO.js → chunk-K2CHDL7K.js} +1 -1
- package/Marketplace/{chunk-WCX3T6LK.js → chunk-LCN52IJT.js} +1 -1
- package/Marketplace/{chunk-GRVGKVD6.js → chunk-LOVYZLSU.js} +1 -1
- package/Marketplace/{chunk-CHGAMAQX.js → chunk-LWUMLKSO.js} +1 -1
- package/Marketplace/{chunk-EU324R5S.js → chunk-M5JNIPMS.js} +1 -1
- package/Marketplace/{chunk-OUYOKQ57.js → chunk-OJI34QN5.js} +1 -1
- package/Marketplace/{chunk-FUBZ75C7.js → chunk-OMY5ASFA.js} +1 -1
- package/Marketplace/{chunk-KA2HPWPG.js → chunk-OPCGCQMZ.js} +1 -1
- package/Marketplace/{chunk-A4UF2QH6.js → chunk-Q5IVQP3E.js} +1 -1
- package/Marketplace/{chunk-XF4A775R.js → chunk-R3BRUX7Z.js} +1 -1
- package/Marketplace/{chunk-PQM7IB5J.js → chunk-SASGSPGQ.js} +1 -1
- package/Marketplace/{chunk-XCJ5XRFI.js → chunk-SLQ42VND.js} +1 -1
- package/Marketplace/chunk-T3CN3WQD.js +1 -0
- package/Marketplace/{chunk-TG7XOXCH.js → chunk-T62YFSKW.js} +1 -1
- package/Marketplace/{chunk-KUPGF23P.js → chunk-TLTFNFAB.js} +1 -1
- package/Marketplace/{chunk-TVFILHVN.js → chunk-VBVBTC2P.js} +1 -1
- package/Marketplace/chunk-WEJBY3OB.js +1 -0
- package/Marketplace/{chunk-TUJBAZ5Q.js → chunk-WH76SMZT.js} +1 -1
- package/Marketplace/{chunk-2DZHA445.js → chunk-XAL6YLNQ.js} +1 -1
- package/Marketplace/{chunk-6LXQMIYX.js → chunk-XSOP2OTT.js} +1 -1
- package/Marketplace/{chunk-EKYPWTJN.js → chunk-YF7CCYHF.js} +1 -1
- package/Marketplace/{chunk-YQKEWN54.js → chunk-ZMMMNVOU.js} +1 -1
- package/Marketplace/{chunk-WXXGLR46.js → chunk-ZMSM2NR7.js} +1 -1
- package/Marketplace/{chunk-WG34QKGX.js → chunk-ZXFWQ6VJ.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-G6GGJLGW.js → main-SOO5LINL.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-42GDFAAQ.js +0 -1
- package/Marketplace/chunk-CZICXKFA.js +0 -1
- package/Marketplace/chunk-DQXBBV26.js +0 -1
- package/Marketplace/chunk-UQ7PDZO3.js +0 -1
- /package/Marketplace/{chunk-FDGH6XKK.js → chunk-CIVDQKQZ.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ve}from"./chunk-FH2KAM6J.js";import{a as Se,b as we}from"./chunk-C67KF7MG.js";import{a as Te,b as ye}from"./chunk-JKRELT7N.js";import{a as fe}from"./chunk-DLHIDOS3.js";import{a as pe,b as ge,c as ue,g as he,i as Ce,j as xe}from"./chunk-IA7NJXJD.js";import{a as _e}from"./chunk-UEXWQT5J.js";import{b as be}from"./chunk-M27MYADT.js";import{a as le}from"./chunk-UDNUDL5Z.js";import{c as me}from"./chunk-IZZY74PN.js";import{a as D}from"./chunk-ZSUWHVKX.js";import{h as se}from"./chunk-7K6U3ABQ.js";import{a as ae,b as re,c as ce}from"./chunk-NB2H6KA7.js";import{c as Z}from"./chunk-UPRDDI4K.js";import{A as L,b as de,h as $,m as B}from"./chunk-6UM4NHOR.js";import{A as ie,B as oe,q as te,v as ne}from"./chunk-CGSMHTKB.js";import{G,Hb as N,Ia as R,Ic as z,Nb as T,Nc as _,Oc as F,Pc as P,Rc as E,Sc as k,Tc as O,Xc as Y,ac as u,ad as M,bd as J,ca as K,cc as h,dc as I,ec as X,f as q,fc as v,gc as S,hc as d,ic as r,id as U,jc as s,jd as H,kc as w,kd as Q,ld as ee,mb as y,ob as c,qc as j,ra as b,rc as C,tb as A,ud as V,wc as x,ya as p,yc as a,za as g}from"./chunk-OHGMB7HJ.js";function Fe(t,l){if(t&1){let e=C();r(0,"span")(1,"mat-checkbox",4),x("change",function(n){p(e);let o=a();return g(o.onSelectAll(n==null?null:n.checked))}),r(2,"h5",5),_(3,"Select All"),s()()()}}function Pe(t,l){if(t&1){let e=C();r(0,"li")(1,"mat-checkbox",6),O("ngModelChange",function(n){let o=p(e).$implicit;return k(o.selected,n)||(o.selected=n),g(n)}),r(2,"div",7),w(3,"img",8),r(4,"h5",9),_(5),s()()()()}if(t&2){let e=l.$implicit;c(),E("ngModel",e.selected),c(2),d("src",e.Img,y),c(2),F(e.Name)}}var dt=(()=>{let l=class l{constructor(){this.data=b(ge),this.dialogRef=b(pe),this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){let i=this.data.title?this.data.title:"Updating Inventory";this.modalConfig=new Ce,this.modalConfig.title=i}onSelectAll(i){this.channels=this.channels.map(n=>(n.selected=i,n))}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}get getSelectedChannel(){return this.channels.filter(i=>i.selected)}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=N({type:l,selectors:[["app-modal-update-channels"]],decls:7,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet",2,"margin-bottom","0px !important","overflow","hidden"],["color","primary",1,"me-6",3,"change"],[1,"fw-light"],["color","primary",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(n,o){n&1&&(r(0,"modal-material",0),x("onOk",function(){return o.onOk()})("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()}),r(1,"div",1)(2,"div",2),u(3,Fe,4,0,"span"),r(4,"ul",3),v(5,Pe,6,3,"li",null,I),s()()()()),n&2&&(d("dynamicValidated",(o.getSelectedChannel==null?null:o.getSelectedChannel.length)>0)("config",o.modalConfig),c(3),h((o.channels==null?null:o.channels.length)>1?3:-1),c(2),S(o.channels))},dependencies:[xe,ve,L,$,B],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let t=l;return t})();var W=t=>[t],Ee=t=>({"text-decoration-line-through":t}),ke=t=>({"text-danger":t}),Oe=(t,l)=>({"bg-gradient-warning":t,"cell-hover pointer":l});function Ve(t,l){if(t&1){let e=C();r(0,"mat-slide-toggle",10),x("toggleChange",function(){p(e);let n=a();return n.toggleStatus=!n.toggleStatus,g(n.onToggle())}),r(1,"small",11),_(2),s()()}if(t&2){let e=a();c(2),P(" ",e.productToggleTitle?e.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function De(t,l){if(t&1){let e=C();r(0,"th")(1,"input",13),O("ngModelChange",function(n){p(e);let o=a(2);return k(o.checkboxState,n)||(o.checkboxState=n),g(n)}),x("ngModelChange",function(){p(e);let n=a(2);return g(n.onCheckboxStateChange())}),s()()}if(t&2){let e=a(2);c(),E("ngModel",e.checkboxState)}}function Ne(t,l){if(t&1&&(T(0,De,2,1,"ng-template",12),r(1,"th",8),_(2,"POS"),s()),t&2){let e=a();d("ngxPermissionsOnly",M(1,W,e.rolePriceEdit))}}function Ue(t,l){if(t&1&&(r(0,"th",9)(1,"div",14)(2,"div",15),w(3,"img",16),r(4,"div",17),_(5),U(6,"stringLimit"),s()()()()),t&2){let e=l.$implicit;c(2),d("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),c(),d("src",e==null?null:e.Img,y),c(2),P(" ",Q(6,3,e.Name,20)," ")}}function $e(t,l){t&1&&j(0)}function Be(t,l){if(t&1&&T(0,$e,1,0,"ng-container",29),t&2){a(2);let e=z(5);d("ngTemplateOutlet",e)}}function Le(t,l){if(t&1&&T(0,Be,1,1,"ng-template",12),t&2){let e=a(4);d("ngxPermissionsOnly",M(1,W,e.roleInventoryUpdate))}}function We(t,l){t&1&&j(0)}function Re(t,l){if(t&1&&T(0,We,1,0,"ng-container",29),t&2){a(2);let e=z(5);d("ngTemplateOutlet",e)}}function Ae(t,l){if(t&1&&T(0,Re,1,1,"ng-template",12),t&2){let e=a(4);d("ngxPermissionsOnly",M(1,W,e.rolePriceEdit))}}function je(t,l){if(t&1){let e=C();r(0,"div")(1,"input",30),O("ngModelChange",function(n){p(e);let o=a(4).$implicit;return k(o.selected,n)||(o.selected=n),g(n)}),x("ngModelChange",function(){p(e);let n=a(4).$implicit,o=a();return g(o.onCheckboxStateProduct(n.ID))}),s()()}if(t&2){let e=a(4).$implicit;c(),E("ngModel",e.selected),d("disabled",!(e!=null&&e.Category))}}function ze(t,l){if(t&1&&u(0,je,2,2,"div"),t&2){let e=a(3).$implicit;h((e==null||e.Variants==null?null:e.Variants.length)>1?0:-1)}}function He(t,l){if(t&1){let e=C();r(0,"img",31),x("click",function(n){p(e);let o=a(3).$implicit,m=a();return g(m.onZoomImage(n,o==null?null:o.ImageUrl))}),s()}if(t&2){let e=a(3).$implicit;d("src",Y(e==null?null:e.ThumbnailUrl),y)}}function Ze(t,l){t&1&&w(0,"img",26)}function qe(t,l){if(t&1&&(r(0,"td",23)(1,"div",24),u(2,Le,1,3,null,12)(3,Ae,1,3,null,12),T(4,ze,1,1,"ng-template",null,0,ee),r(6,"div"),u(7,He,1,2,"img",25)(8,Ze,1,0,"img",26),s()()(),r(9,"td",27)(10,"div"),_(11),s(),r(12,"small",28),_(13),s()()),t&2){let e=a(2).$implicit,i=a();d("rowSpan",e==null?null:e.Variants.length),c(2),h(i.table()=="inventory"?2:3),c(5),h(e!=null&&e.ThumbnailUrl?7:8),c(2),d("rowSpan",e==null?null:e.Variants.length),c(2),F(e==null?null:e.Name),c(),d("ngClass",M(7,ke,!(e!=null&&e.Category))),c(),P("(",e!=null&&e.Category?e==null?null:e.Category:"Not Found In POS",")")}}function Ge(t,l){if(t&1&&(r(0,"a",22),w(1,"i",32),s()),t&2){let e=a().$implicit,i=a(2);d("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),y)}}function Ke(t,l){if(t&1){let e=C();r(0,"input",35),O("ngModelChange",function(n){p(e);let o=a(3).$implicit;return k(o.selected,n)||(o.selected=n),g(n)}),s()}if(t&2){let e=a(3).$implicit,i=a().$implicit;E("ngModel",e.selected),d("disabled",!(i!=null&&i.Category))}}function Xe(t,l){if(t&1&&(r(0,"td",33),u(1,Ke,1,2,"input",34),s()),t&2){let e=a(2).$implicit,i=a(2);c(),h(i.printPOS(e)>=0||i.table()=="price"?1:-1)}}function Ye(t,l){if(t&1&&(T(0,Xe,2,1,"ng-template",12),r(1,"td",19),_(2),U(3,"number"),s()),t&2){let e=a().$implicit,i=a(2);d("ngxPermissionsOnly",M(4,W,i.rolePriceEdit)),c(2),F(H(3,2,i.printPOS(e)))}}function Je(t,l){if(t&1){let e=C();r(0,"td",38),x("click",function(){p(e);let n=a().$implicit,o=a().$implicit,m=a().$implicit,f=a();return g(f.onUpdateData(m.Name,o,n.ID,m.ChannelItemID))}),r(1,"div",39)(2,"div",40),_(3),U(4,"number"),s(),r(5,"a",41),x("click",function(n){return p(e),g(n==null?null:n.stopPropagation())}),w(6,"i",32),s()()()}if(t&2){let e=l,i=a(2).$implicit,n=a(2);d("ngClass",J(5,Oe,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table()=="price"||n.hasInventoryEdit()&&n.table()=="inventory")),c(3),P(" ",H(4,3,n.printItem(e))," "),c(2),d("href",e.Url,y)}}function Qe(t,l){t&1&&(r(0,"td",37)(1,"div",39)(2,"span"),_(3,"X"),s()()())}function et(t,l){if(t&1&&u(0,Je,7,8,"td",36)(1,Qe,4,0,"td",37),t&2){let e,i=l.$implicit,n=a().$implicit,o=a(2);h((e=o.getItemFromChannel(n,i))?0:1,e)}}function tt(t,l){if(t&1&&(r(0,"tr"),u(1,qe,14,9),r(2,"td",18),_(3),s(),r(4,"td",19)(5,"div",20)(6,"div",21),_(7),s(),r(8,"div",17),u(9,Ge,2,1,"a",22),s()()(),u(10,Ye,4,6),v(11,et,2,1,null,null,I),s()),t&2){let e=l.$implicit,i=l.$index,n=a().$implicit,o=a();c(),h(i==0?1:-1),c(2),F(e==null?null:e.Model),c(2),d("matTooltip",e.Discontinued?o.discontinuedVariantMsg:""),c(),d("ngClass",M(7,Ee,e.Discontinued)),c(),P(" ",e.Code," "),c(2),h(n.Category?9:-1),c(),h(o.hiddenIPOSInventory()==!1?10:-1),c(),S(o.channel())}}function nt(t,l){if(t&1&&(r(0,"tbody"),v(1,tt,13,9,"tr",null,I),s()),t&2){let e=l.$implicit;c(),S(e.Variants)}}var Nt=(()=>{let l=class l{constructor(){this.dialog=b(ue),this.biggerPictureService=b(fe),this.authService=b(se),this.permissionsService=b(ae),this.table=V(void 0),this.channel=V(void 0),this.showProductToggle=V(!1),this.multiwarehouse=V(!1),this.hiddenIPOSInventory=V(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=D.PriceUpdate,this.roleInventoryUpdate=D.InventoryUpdate,this.hasPriceEdit=R(!1),this.hasInventoryEdit=R(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new A,this.destroy$=new q,this.toggle=new A,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles();let i=this.table();i=="inventory"?this.stockHeader="Stock":i=="price"&&(this.stockHeader="Price")}initRoles(){this.permissionsService.hasPermission(D.InventoryUpdate).then(i=>this.hasInventoryEdit.set(i)),this.permissionsService.hasPermission(D.PriceUpdate).then(i=>this.hasPriceEdit.set(i))}onCheckboxStateProduct(i){let n=this.data.filter(o=>o.ID==i);n.length>0&&(n=n.map(o=>(o.Variants=o.Variants.map(m=>(m.selected=o.selected,m)),o)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(n=>(n.selected=this.checkboxState,n)),i))}getItemFromChannel(i,n){return i.Channel.find(m=>Z.IsNotEmpty(n.LocationID)?m.LocationID==n.LocationID:m.ChannelID==n.ID)}printItem(i){let n=this.table();if(n=="inventory")return i.Inventory;if(n=="price")return i.Price}onUpdateData(i,n,o,m){let f=this.table();this.hasPriceEdit()&&f=="price"&&this.onOpenDialogUpdate(i,n,o,m),this.hasInventoryEdit()&&f=="inventory"&&this.onOpenDialogUpdate(i,n,o,m)}onOpenDialogUpdate(i,n,o,m){this.dialog.open(Se,{data:{Name:i,Variant:n,ChannelID:o,Table:this.table(),ChannelItemID:m}}).afterClosed().pipe(G(f=>Z.IsNotEmpty(f)),K(this.destroy$)).subscribe(f=>{this.onSubmit.emit(f)})}printPOS(i){let n=this.table();return n=="inventory"?i.Inventory?i.Inventory:0:n=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,n){this.biggerPictureService.openBiggerPicture(i,n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=N({type:l,selectors:[["app-table"]],inputs:{data:"data",table:[1,"table"],channel:[1,"channel"],showProductToggle:[1,"showProductToggle"],productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:18,vars:2,consts:[["checkbox_update",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],["scope","col"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[1,"border","rounded","w-img","cursor-pointer",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"ngClass"],[1,"table-white","text-center",2,"color","red"],[1,"p-0",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"]],template:function(n,o){n&1&&(r(0,"div",1)(1,"table",2)(2,"thead",3)(3,"tr")(4,"th",4)(5,"div",5)(6,"div"),_(7,"Product"),s(),u(8,Ve,3,1,"mat-slide-toggle",6),s()(),r(9,"th",7),_(10,"Variant"),s(),r(11,"th",8),_(12,"SKU"),s(),u(13,Ne,3,3),v(14,Ue,7,6,"th",9,X),s()(),v(16,nt,3,0,"tbody",null,I),s()()),n&2&&(c(8),h(o.showProductToggle()?8:-1),c(5),h(o.hiddenIPOSInventory()==!1?13:-1),c(),S(o.channel()),c(2),S(o.data))},dependencies:[oe,te,ne,L,de,$,B,ye,Te,he,le,be,ce,re,_e,me,ie,we],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]});let t=l;return t})();export{dt as a,Nt as b};
|
|
1
|
+
import{a as ve}from"./chunk-FH2KAM6J.js";import{a as Se,b as we}from"./chunk-C67KF7MG.js";import{a as Te,b as ye}from"./chunk-JKRELT7N.js";import{a as fe}from"./chunk-DLHIDOS3.js";import{a as pe,b as ge,c as ue,g as he,i as Ce,j as xe}from"./chunk-IA7NJXJD.js";import{a as _e}from"./chunk-UEXWQT5J.js";import{b as be}from"./chunk-M27MYADT.js";import{a as le}from"./chunk-UDNUDL5Z.js";import{c as me}from"./chunk-IZZY74PN.js";import{a as D}from"./chunk-ZSUWHVKX.js";import{h as se}from"./chunk-62YNPW6Q.js";import{a as ae,b as re,c as ce}from"./chunk-NB2H6KA7.js";import{c as Z}from"./chunk-UPRDDI4K.js";import{A as L,b as de,h as $,m as B}from"./chunk-6UM4NHOR.js";import{A as ie,B as oe,q as te,v as ne}from"./chunk-CGSMHTKB.js";import{G,Hb as N,Ia as R,Ic as z,Nb as T,Nc as _,Oc as F,Pc as P,Rc as E,Sc as k,Tc as O,Xc as Y,ac as u,ad as M,bd as J,ca as K,cc as h,dc as I,ec as X,f as q,fc as v,gc as S,hc as d,ic as r,id as U,jc as s,jd as H,kc as w,kd as Q,ld as ee,mb as y,ob as c,qc as j,ra as b,rc as C,tb as A,ud as V,wc as x,ya as p,yc as a,za as g}from"./chunk-OHGMB7HJ.js";function Fe(t,l){if(t&1){let e=C();r(0,"span")(1,"mat-checkbox",4),x("change",function(n){p(e);let o=a();return g(o.onSelectAll(n==null?null:n.checked))}),r(2,"h5",5),_(3,"Select All"),s()()()}}function Pe(t,l){if(t&1){let e=C();r(0,"li")(1,"mat-checkbox",6),O("ngModelChange",function(n){let o=p(e).$implicit;return k(o.selected,n)||(o.selected=n),g(n)}),r(2,"div",7),w(3,"img",8),r(4,"h5",9),_(5),s()()()()}if(t&2){let e=l.$implicit;c(),E("ngModel",e.selected),c(2),d("src",e.Img,y),c(2),F(e.Name)}}var dt=(()=>{let l=class l{constructor(){this.data=b(ge),this.dialogRef=b(pe),this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){let i=this.data.title?this.data.title:"Updating Inventory";this.modalConfig=new Ce,this.modalConfig.title=i}onSelectAll(i){this.channels=this.channels.map(n=>(n.selected=i,n))}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}get getSelectedChannel(){return this.channels.filter(i=>i.selected)}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=N({type:l,selectors:[["app-modal-update-channels"]],decls:7,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet",2,"margin-bottom","0px !important","overflow","hidden"],["color","primary",1,"me-6",3,"change"],[1,"fw-light"],["color","primary",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(n,o){n&1&&(r(0,"modal-material",0),x("onOk",function(){return o.onOk()})("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()}),r(1,"div",1)(2,"div",2),u(3,Fe,4,0,"span"),r(4,"ul",3),v(5,Pe,6,3,"li",null,I),s()()()()),n&2&&(d("dynamicValidated",(o.getSelectedChannel==null?null:o.getSelectedChannel.length)>0)("config",o.modalConfig),c(3),h((o.channels==null?null:o.channels.length)>1?3:-1),c(2),S(o.channels))},dependencies:[xe,ve,L,$,B],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let t=l;return t})();var W=t=>[t],Ee=t=>({"text-decoration-line-through":t}),ke=t=>({"text-danger":t}),Oe=(t,l)=>({"bg-gradient-warning":t,"cell-hover pointer":l});function Ve(t,l){if(t&1){let e=C();r(0,"mat-slide-toggle",10),x("toggleChange",function(){p(e);let n=a();return n.toggleStatus=!n.toggleStatus,g(n.onToggle())}),r(1,"small",11),_(2),s()()}if(t&2){let e=a();c(2),P(" ",e.productToggleTitle?e.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function De(t,l){if(t&1){let e=C();r(0,"th")(1,"input",13),O("ngModelChange",function(n){p(e);let o=a(2);return k(o.checkboxState,n)||(o.checkboxState=n),g(n)}),x("ngModelChange",function(){p(e);let n=a(2);return g(n.onCheckboxStateChange())}),s()()}if(t&2){let e=a(2);c(),E("ngModel",e.checkboxState)}}function Ne(t,l){if(t&1&&(T(0,De,2,1,"ng-template",12),r(1,"th",8),_(2,"POS"),s()),t&2){let e=a();d("ngxPermissionsOnly",M(1,W,e.rolePriceEdit))}}function Ue(t,l){if(t&1&&(r(0,"th",9)(1,"div",14)(2,"div",15),w(3,"img",16),r(4,"div",17),_(5),U(6,"stringLimit"),s()()()()),t&2){let e=l.$implicit;c(2),d("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),c(),d("src",e==null?null:e.Img,y),c(2),P(" ",Q(6,3,e.Name,20)," ")}}function $e(t,l){t&1&&j(0)}function Be(t,l){if(t&1&&T(0,$e,1,0,"ng-container",29),t&2){a(2);let e=z(5);d("ngTemplateOutlet",e)}}function Le(t,l){if(t&1&&T(0,Be,1,1,"ng-template",12),t&2){let e=a(4);d("ngxPermissionsOnly",M(1,W,e.roleInventoryUpdate))}}function We(t,l){t&1&&j(0)}function Re(t,l){if(t&1&&T(0,We,1,0,"ng-container",29),t&2){a(2);let e=z(5);d("ngTemplateOutlet",e)}}function Ae(t,l){if(t&1&&T(0,Re,1,1,"ng-template",12),t&2){let e=a(4);d("ngxPermissionsOnly",M(1,W,e.rolePriceEdit))}}function je(t,l){if(t&1){let e=C();r(0,"div")(1,"input",30),O("ngModelChange",function(n){p(e);let o=a(4).$implicit;return k(o.selected,n)||(o.selected=n),g(n)}),x("ngModelChange",function(){p(e);let n=a(4).$implicit,o=a();return g(o.onCheckboxStateProduct(n.ID))}),s()()}if(t&2){let e=a(4).$implicit;c(),E("ngModel",e.selected),d("disabled",!(e!=null&&e.Category))}}function ze(t,l){if(t&1&&u(0,je,2,2,"div"),t&2){let e=a(3).$implicit;h((e==null||e.Variants==null?null:e.Variants.length)>1?0:-1)}}function He(t,l){if(t&1){let e=C();r(0,"img",31),x("click",function(n){p(e);let o=a(3).$implicit,m=a();return g(m.onZoomImage(n,o==null?null:o.ImageUrl))}),s()}if(t&2){let e=a(3).$implicit;d("src",Y(e==null?null:e.ThumbnailUrl),y)}}function Ze(t,l){t&1&&w(0,"img",26)}function qe(t,l){if(t&1&&(r(0,"td",23)(1,"div",24),u(2,Le,1,3,null,12)(3,Ae,1,3,null,12),T(4,ze,1,1,"ng-template",null,0,ee),r(6,"div"),u(7,He,1,2,"img",25)(8,Ze,1,0,"img",26),s()()(),r(9,"td",27)(10,"div"),_(11),s(),r(12,"small",28),_(13),s()()),t&2){let e=a(2).$implicit,i=a();d("rowSpan",e==null?null:e.Variants.length),c(2),h(i.table()=="inventory"?2:3),c(5),h(e!=null&&e.ThumbnailUrl?7:8),c(2),d("rowSpan",e==null?null:e.Variants.length),c(2),F(e==null?null:e.Name),c(),d("ngClass",M(7,ke,!(e!=null&&e.Category))),c(),P("(",e!=null&&e.Category?e==null?null:e.Category:"Not Found In POS",")")}}function Ge(t,l){if(t&1&&(r(0,"a",22),w(1,"i",32),s()),t&2){let e=a().$implicit,i=a(2);d("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),y)}}function Ke(t,l){if(t&1){let e=C();r(0,"input",35),O("ngModelChange",function(n){p(e);let o=a(3).$implicit;return k(o.selected,n)||(o.selected=n),g(n)}),s()}if(t&2){let e=a(3).$implicit,i=a().$implicit;E("ngModel",e.selected),d("disabled",!(i!=null&&i.Category))}}function Xe(t,l){if(t&1&&(r(0,"td",33),u(1,Ke,1,2,"input",34),s()),t&2){let e=a(2).$implicit,i=a(2);c(),h(i.printPOS(e)>=0||i.table()=="price"?1:-1)}}function Ye(t,l){if(t&1&&(T(0,Xe,2,1,"ng-template",12),r(1,"td",19),_(2),U(3,"number"),s()),t&2){let e=a().$implicit,i=a(2);d("ngxPermissionsOnly",M(4,W,i.rolePriceEdit)),c(2),F(H(3,2,i.printPOS(e)))}}function Je(t,l){if(t&1){let e=C();r(0,"td",38),x("click",function(){p(e);let n=a().$implicit,o=a().$implicit,m=a().$implicit,f=a();return g(f.onUpdateData(m.Name,o,n.ID,m.ChannelItemID))}),r(1,"div",39)(2,"div",40),_(3),U(4,"number"),s(),r(5,"a",41),x("click",function(n){return p(e),g(n==null?null:n.stopPropagation())}),w(6,"i",32),s()()()}if(t&2){let e=l,i=a(2).$implicit,n=a(2);d("ngClass",J(5,Oe,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table()=="price"||n.hasInventoryEdit()&&n.table()=="inventory")),c(3),P(" ",H(4,3,n.printItem(e))," "),c(2),d("href",e.Url,y)}}function Qe(t,l){t&1&&(r(0,"td",37)(1,"div",39)(2,"span"),_(3,"X"),s()()())}function et(t,l){if(t&1&&u(0,Je,7,8,"td",36)(1,Qe,4,0,"td",37),t&2){let e,i=l.$implicit,n=a().$implicit,o=a(2);h((e=o.getItemFromChannel(n,i))?0:1,e)}}function tt(t,l){if(t&1&&(r(0,"tr"),u(1,qe,14,9),r(2,"td",18),_(3),s(),r(4,"td",19)(5,"div",20)(6,"div",21),_(7),s(),r(8,"div",17),u(9,Ge,2,1,"a",22),s()()(),u(10,Ye,4,6),v(11,et,2,1,null,null,I),s()),t&2){let e=l.$implicit,i=l.$index,n=a().$implicit,o=a();c(),h(i==0?1:-1),c(2),F(e==null?null:e.Model),c(2),d("matTooltip",e.Discontinued?o.discontinuedVariantMsg:""),c(),d("ngClass",M(7,Ee,e.Discontinued)),c(),P(" ",e.Code," "),c(2),h(n.Category?9:-1),c(),h(o.hiddenIPOSInventory()==!1?10:-1),c(),S(o.channel())}}function nt(t,l){if(t&1&&(r(0,"tbody"),v(1,tt,13,9,"tr",null,I),s()),t&2){let e=l.$implicit;c(),S(e.Variants)}}var Nt=(()=>{let l=class l{constructor(){this.dialog=b(ue),this.biggerPictureService=b(fe),this.authService=b(se),this.permissionsService=b(ae),this.table=V(void 0),this.channel=V(void 0),this.showProductToggle=V(!1),this.multiwarehouse=V(!1),this.hiddenIPOSInventory=V(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=D.PriceUpdate,this.roleInventoryUpdate=D.InventoryUpdate,this.hasPriceEdit=R(!1),this.hasInventoryEdit=R(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new A,this.destroy$=new q,this.toggle=new A,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles();let i=this.table();i=="inventory"?this.stockHeader="Stock":i=="price"&&(this.stockHeader="Price")}initRoles(){this.permissionsService.hasPermission(D.InventoryUpdate).then(i=>this.hasInventoryEdit.set(i)),this.permissionsService.hasPermission(D.PriceUpdate).then(i=>this.hasPriceEdit.set(i))}onCheckboxStateProduct(i){let n=this.data.filter(o=>o.ID==i);n.length>0&&(n=n.map(o=>(o.Variants=o.Variants.map(m=>(m.selected=o.selected,m)),o)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(n=>(n.selected=this.checkboxState,n)),i))}getItemFromChannel(i,n){return i.Channel.find(m=>Z.IsNotEmpty(n.LocationID)?m.LocationID==n.LocationID:m.ChannelID==n.ID)}printItem(i){let n=this.table();if(n=="inventory")return i.Inventory;if(n=="price")return i.Price}onUpdateData(i,n,o,m){let f=this.table();this.hasPriceEdit()&&f=="price"&&this.onOpenDialogUpdate(i,n,o,m),this.hasInventoryEdit()&&f=="inventory"&&this.onOpenDialogUpdate(i,n,o,m)}onOpenDialogUpdate(i,n,o,m){this.dialog.open(Se,{data:{Name:i,Variant:n,ChannelID:o,Table:this.table(),ChannelItemID:m}}).afterClosed().pipe(G(f=>Z.IsNotEmpty(f)),K(this.destroy$)).subscribe(f=>{this.onSubmit.emit(f)})}printPOS(i){let n=this.table();return n=="inventory"?i.Inventory?i.Inventory:0:n=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,n){this.biggerPictureService.openBiggerPicture(i,n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=N({type:l,selectors:[["app-table"]],inputs:{data:"data",table:[1,"table"],channel:[1,"channel"],showProductToggle:[1,"showProductToggle"],productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:18,vars:2,consts:[["checkbox_update",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],["scope","col"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[1,"border","rounded","w-img","cursor-pointer",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"ngClass"],[1,"table-white","text-center",2,"color","red"],[1,"p-0",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"]],template:function(n,o){n&1&&(r(0,"div",1)(1,"table",2)(2,"thead",3)(3,"tr")(4,"th",4)(5,"div",5)(6,"div"),_(7,"Product"),s(),u(8,Ve,3,1,"mat-slide-toggle",6),s()(),r(9,"th",7),_(10,"Variant"),s(),r(11,"th",8),_(12,"SKU"),s(),u(13,Ne,3,3),v(14,Ue,7,6,"th",9,X),s()(),v(16,nt,3,0,"tbody",null,I),s()()),n&2&&(c(8),h(o.showProductToggle()?8:-1),c(5),h(o.hiddenIPOSInventory()==!1?13:-1),c(),S(o.channel()),c(2),S(o.data))},dependencies:[oe,te,ne,L,de,$,B,ye,Te,he,le,be,ce,re,_e,me,ie,we],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]});let t=l;return t})();export{dt as a,Nt as b};
|
|
@@ -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-62YNPW6Q.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 e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as o}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as o}from"./chunk-WH76SMZT.js";import"./chunk-IA7NJXJD.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as p}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,kc as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var d=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=i({type:n,selectors:[["app-products"]],decls:1,vars:0,template:function(r,l){r&1&&a(0,"router-outlet")},dependencies:[p],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let t=n;return t})();var f=[{path:"",component:d,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-BVW7WI5I.js").then(t=>t.routes),canActivate:[o,e]},{path:"download",loadChildren:()=>import("./chunk-3Q6QZGLZ.js").then(t=>t.routes),canActivate:[o,e]},{path:"upload",loadComponent:()=>import("./chunk-HT2MSA66.js").then(t=>t.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[o,e]}]}];export{f as routes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as M}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as w}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as N}from"./chunk-D6JH2KV4.js";import{b as T}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{w as y,y as g,z as C}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as f,Nc as n,Oc as p,ac as E,cc as I,hc as x,ic as t,id as s,jc as i,jd as h,kc as D,kd as b,ma as S,ob as o,ra as c,v as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var O=(()=>{let r=class r{constructor(){this.httpService=c(N)}getExceptionDetail(m){return this.httpService.post("/api/Orders/GetDetailException",{ID:m}).pipe(u(a=>a?.hits[0]?._source))}};r.\u0275fac=function(d){return new(d||r)},r.\u0275prov=S({token:r,factory:r.\u0275fac,providedIn:"root"});let l=r;return l})();function B(l,r){if(l&1&&(t(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),n(6,"General"),i()(),t(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),n(12,"Date"),i(),t(13,"div")(14,"span"),n(15),s(16,"date"),i()()()(),t(17,"div",8)(18,"div",9)(19,"label"),n(20,"Number"),i(),t(21,"div")(22,"span"),n(23),i()()()(),t(24,"div",8)(25,"div",9)(26,"label"),n(27,"Channel Name"),i(),t(28,"div")(29,"span"),n(30),i()()()(),t(31,"div",8)(32,"div",9)(33,"label"),n(34,"ShopID"),i(),t(35,"div")(36,"span"),n(37),i()()()(),t(38,"div",8)(39,"div",9)(40,"label"),n(41,"Channel ID"),i(),t(42,"div")(43,"span"),n(44),i()()()()()()()()(),t(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),n(50,"Request"),i()(),t(51,"div",6)(52,"pre"),n(53),s(54,"json"),i()()()(),t(55,"div",8)(56,"div",11)(57,"div",5)(58,"h5"),n(59,"Stack Trace"),i()(),t(60,"div",6),D(61,"pre",12),i()(),t(62,"div",13)(63,"div",5)(64,"h5"),n(65,"Exception Message"),i()(),t(66,"div",6)(67,"pre"),n(68),s(69,"json"),i()()()()()()),l&2){let e=r;o(15),p(b(16,8,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),o(8),p(e==null||e.error==null?null:e.error.number),o(7),p(e==null?null:e.channelName),o(7),p(e==null?null:e.shopId),o(7),p(e==null?null:e.message),o(9),p(h(54,11,e==null||e.error==null?null:e.error.request)),o(8),x("textContent",e==null||e.error==null?null:e.error.stackTrace),o(7),p(h(69,13,e==null||e.error==null?null:e.error.response))}}var K=(()=>{let r=class r{constructor(){this.activatedRoute=c(T),this.exceptionService=c(O),this.authService=c(w),this.invoiceNumber="",this.channelName="",this.logo=null,this.channelOptions=this.authService.getChannels()}ngOnInit(){let m=this.activatedRoute.snapshot.queryParams;this.exceptionDetail$=this.exceptionService.getExceptionDetail(m?.ID).pipe(u(d=>{let a=d;return{"@timestamp":a["@timestamp"]||a["@timestamp_received"],error:{number:a?.error?.number,stackTrace:a?.error?.stackTrace,request:JSON.parse(a?.error?.request),response:JSON.parse(a?.error?.response)},channelName:a?.channelId!=null?this.channelOptions.find(v=>v.ID===a?.channelId)?.Name:a?.shopId,shopId:a?.shopId,message:a?.message}}))}};r.\u0275fac=function(d){return new(d||r)},r.\u0275cmp=f({type:r,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"card","mb-2"],[3,"textContent"],[1,"card","mt-7"]],template:function(d,a){if(d&1&&(t(0,"mainpanel",0)(1,"content"),E(2,B,70,15,"div",1),s(3,"async"),i()()),d&2){let v;x("headerTitle","Order #"+a.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),I((v=h(3,4,a.exceptionDetail$))?2:-1,v)}},dependencies:[M,y,C,g],encapsulation:2});let l=r;return l})();export{K as ExceptionDetailComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as bt}from"./chunk-IQGRGC3E.js";import{c as Mt,d as Ft}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as Pt}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import{a as ft,b as St}from"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as Ot}from"./chunk-WG34QKGX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as wt}from"./chunk-7KG3DC5J.js";import{a as xt}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as vt}from"./chunk-27DIE2YS.js";import{a as yt}from"./chunk-WCX3T6LK.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-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as _t}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as mt,b as ht,c as ut,i as Ct,j as gt}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"./chunk-JTKEMQZT.js";import{c as pt}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as U}from"./chunk-ZSUWHVKX.js";import{h as at}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-AGBJEXIM.js";import{a as nt,b as it,c as ot}from"./chunk-NB2H6KA7.js";import{c as f}from"./chunk-UPRDDI4K.js";import{A as dt,c as lt,h as st,m as ct}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as X,e as tt}from"./chunk-D6JH2KV4.js";import{b as et}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as Z,w as Q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as q,G as L,Hb as I,Ia as x,Nb as G,Nc as g,Oc as R,Pc as $,Rc as y,Sc as w,Tc as F,Uc as j,ac as M,ad as b,cc as O,dc as H,ea as W,ec as J,fc as N,gc as V,hc as u,ic as a,id as z,jc as s,jd as Y,kc as T,ob as l,oc as E,pc as k,ra as _,rc as P,wc as S,ya as m,yc as C,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Tt=o=>({"bg-gradient-warning":o});function Dt(o,c){if(o&1&&(a(0,"tr",5)(1,"td"),g(2),s(),a(3,"td",6),g(4),s()()),o&2){let n=c.$implicit;u("matTooltip",n.duplicateMessage),l(2),R(n==null?null:n.Name),l(),u("ngClass",b(4,Tt,n.isDuplicate)),l(),R(n!=null&&n.ChannelVariationSKU?n==null?null:n.ChannelVariationSKU:"Not Assigned")}}var It=(()=>{let c=class c{constructor(){this.data=_(ht),this.dialogRef=_(mt),this.variants=x([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,e={},i=[],d=t.filter(p=>f.IsEmpty(p.ChannelVariationSKU));t.filter(p=>f.IsNotEmpty(p.ChannelVariationSKU)).forEach((p,r,K)=>{e[p.ChannelVariationSKU]=K.filter(v=>v.ChannelVariationSKU===p.ChannelVariationSKU)}),Object.keys(e).forEach(p=>{e[p].length>1&&(e[p]=e[p].map((r,K,v)=>{let B=`SKU ${r.ChannelVariationSKU} is duplicated with variant`;return v.forEach((D,Nt)=>{D.Name!==r.Name&&(B+=` ${v.length>2?D.Name+(Nt!==v.length-1?",":""):D.Name}`)}),r.duplicateMessage=B,r.isDuplicate=!0,r})),i.push(...e[p])}),i.push(...d),this.variants.set(i)}initModalConfig(){this.modalConfig=new Ct,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-modal-variants"]],decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,i){e&1&&(a(0,"modal-material",0),S("onCancel",function(){return i.dialogRef.close()}),a(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),g(6,"Variant"),s(),a(7,"th",4),g(8,"SKU"),s()()(),a(9,"tbody"),N(10,Dt,5,6,"tr",5,H),s()()()()),e&2&&(u("config",i.modalConfig),l(10),V(i.variants()))},dependencies:[gt,pt,Z],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]});let o=c;return o})();var A=o=>[o],Et=()=>[];function kt(o,c){if(o&1){let n=P();a(0,"button",16),S("click",function(){m(n);let e=C(2);return h(e.openScanDialog())}),T(1,"i",17),g(2," Scan Channel "),s()}}function Rt(o,c){if(o&1&&(E(0),M(1,kt,3,0,"button",15),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?-1:1)}}function Ut(o,c){if(o&1){let n=P();a(0,"button",19),S("click",function(){m(n);let e=C(2);return h(e.onDownloadAllProduct("SELECTED"))}),T(1,"i",20),g(2),s()}if(o&2){let n,t=C(2);l(2),$(" Download (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function At(o,c){if(o&1&&(E(0),M(1,Ut,3,1,"button",18),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?1:-1)}}function Kt(o,c){if(o&1){let n=P();a(0,"div",12)(1,"app-product-card",21),S("onCheckBoxChange",function(e){let i=m(n).$index,d=C();return h(d.onSelectProduct(e,i))})("onDescEvent",function(){let e=m(n).$index,i=C();return h(i.onShowVariantDetail(e))})("onDownload",function(){let e=m(n).$implicit,i=C();return h(i.onDownloadProduct(e))})("onScan",function(){let e=m(n).$implicit,i=C();return h(i.onScanChannel(e))}),s()()}if(o&2){let n=c.$implicit,t=C();l(),u("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?b(10,A,n==null?null:n.Channel):q(12,Et))("showCheckBox",t.hasDownloadRole())("scanButton",!0)}}function Bt(o,c){o&1&&(a(0,"div",13),T(1,"app-empty-state"),s())}function Lt(o,c){if(o&1){let n=P();a(0,"div",14)(1,"div",22)(2,"app-custom-paginator",23),S("total",function(){m(n);let e=C();return h(e.getRowCount())})("next",function(){m(n);let e=C();return h(e.getProducts())})("previous",function(){m(n);let e=C();return h(e.getProducts())}),s()()()}if(o&2){let n=C();l(2),u("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var Me=(()=>{let c=class c{constructor(){this.http=_(tt),this.dialog=_(ut),this.productService=_(yt),this.toastrService=_(X),this.activateRouter=_(et),this.authService=_(at),this.placeholderService=_(Mt),this.permissionService=_(nt),this.searchFilter=new wt,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=U.ProductScan,this.downloadProductRole=U.ProductDownload,this.hasDownloadRole=x(!0),this.searchPlaceholder=x("Search ..."),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(t=>{this.hasDownloadRole.set(t)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.loader$=this.productService.loader(t).pipe(W(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts(),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?f.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts(),this.initSearchPlaceholder()}onClearChannelFilter(){this.searchFilter.ChannelID=f.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(f.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=f.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(Pt,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(L(i=>f.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(f.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(It,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku),SearchType:this.searchFilter.SearchType,NumberFilterComparator:this.searchFilter.NumberFilterComparator};this.http.post(rt.GetNotInPosRowCount,t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-not-in-pos"]],decls:34,vars:21,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){if(e&1){let d=P();j(0),z(1,"async"),a(2,"mainpanel",0),S("onSubmit",function(r){return m(d),h(i.onSearch(r))}),a(3,"actions"),G(4,Rt,2,1,"ng-container",1)(5,At,2,1,"ng-container",1),s(),a(6,"filters")(7,"div",2)(8,"label",3),g(9,"Channel"),s(),a(10,"app-channel-options-v2",4),F("ngModelChange",function(r){return m(d),w(i.searchFilter.ChannelID,r)||(i.searchFilter.ChannelID=r),h(r)}),s()(),a(11,"div",2)(12,"label",5),g(13,"SKU Assigned"),s(),a(14,"mat-radio-group",6),F("ngModelChange",function(r){return m(d),w(i.searchFilter.HaveSku,r)||(i.searchFilter.HaveSku=r),h(r)}),a(15,"mat-radio-button",7),g(16," All "),s(),a(17,"mat-radio-button",7),g(18," Yes "),s(),a(19,"mat-radio-button",7),g(20," No "),s()()(),a(21,"div",2)(22,"label",5),g(23,"Item ID"),s(),a(24,"input",8),F("ngModelChange",function(r){return m(d),w(i.searchFilter.Item_id,r)||(i.searchFilter.Item_id=r),h(r)}),s()(),a(25,"div")(26,"filter-query-type",9),F("numberFilterComparatorChange",function(r){return m(d),w(i.searchFilter.NumberFilterComparator,r)||(i.searchFilter.NumberFilterComparator=r),h(r)})("searchTypeChange",function(r){return m(d),w(i.searchFilter.SearchType,r)||(i.searchFilter.SearchType=r),h(r)}),s()()(),a(27,"content")(28,"div",10)(29,"div",11),N(30,Kt,2,13,"div",12,J),M(32,Bt,2,0,"div",13),s(),M(33,Lt,3,4,"div",14),s()()()}if(e&2){let d=Y(1,15,i.loader$);l(2),u("searchBoxPlaceHolder",i.searchPlaceholder()),l(2),u("ngxPermissionsOnly",b(17,A,i.scanProductRole)),l(),u("ngxPermissionsOnly",b(19,A,i.downloadProductRole)),l(5),y("ngModel",i.searchFilter.ChannelID),l(4),y("ngModel",i.searchFilter.HaveSku),l(),u("value",0),l(2),u("value",1),l(2),u("value",2),l(5),y("ngModel",i.searchFilter.Item_id),l(2),u("numberFilterComparatorOptions",d==null||d.Options==null?null:d.Options.SearchComparatorTypeOptions),y("numberFilterComparator",i.searchFilter.NumberFilterComparator),u("searchTypeOptions",d==null||d.Options==null?null:d.Options.SearchSKUOnlyOrSKUNameOptions),y("searchType",i.searchFilter.SearchType),l(4),V(i.products),l(2),O(i.products.length==0?32:-1),l(),O((i.products==null?null:i.products.length)>0?33:-1)}},dependencies:[_t,ot,it,Ot,dt,lt,st,ct,ft,St,Ft,bt,vt,xt,Q],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=c;return o})();export{Me as NotInPosComponent};
|
|
1
|
+
import{a as bt}from"./chunk-IQGRGC3E.js";import{c as Mt,d as Ft}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as Pt}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import{a as ft,b as St}from"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as Ot}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as wt}from"./chunk-7KG3DC5J.js";import{a as xt}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as vt}from"./chunk-27DIE2YS.js";import{a as yt}from"./chunk-LCN52IJT.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as _t}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as mt,b as ht,c as ut,i as Ct,j as gt}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"./chunk-JTKEMQZT.js";import{c as pt}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as U}from"./chunk-ZSUWHVKX.js";import{h as at}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-AGBJEXIM.js";import{a as nt,b as it,c as ot}from"./chunk-NB2H6KA7.js";import{c as f}from"./chunk-UPRDDI4K.js";import{A as dt,c as lt,h as st,m as ct}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as X,e as tt}from"./chunk-D6JH2KV4.js";import{b as et}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as Z,w as Q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as q,G as L,Hb as I,Ia as x,Nb as G,Nc as g,Oc as R,Pc as $,Rc as y,Sc as w,Tc as F,Uc as j,ac as M,ad as b,cc as O,dc as H,ea as W,ec as J,fc as N,gc as V,hc as u,ic as a,id as z,jc as s,jd as Y,kc as T,ob as l,oc as E,pc as k,ra as _,rc as P,wc as S,ya as m,yc as C,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Tt=o=>({"bg-gradient-warning":o});function Dt(o,c){if(o&1&&(a(0,"tr",5)(1,"td"),g(2),s(),a(3,"td",6),g(4),s()()),o&2){let n=c.$implicit;u("matTooltip",n.duplicateMessage),l(2),R(n==null?null:n.Name),l(),u("ngClass",b(4,Tt,n.isDuplicate)),l(),R(n!=null&&n.ChannelVariationSKU?n==null?null:n.ChannelVariationSKU:"Not Assigned")}}var It=(()=>{let c=class c{constructor(){this.data=_(ht),this.dialogRef=_(mt),this.variants=x([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,e={},i=[],d=t.filter(p=>f.IsEmpty(p.ChannelVariationSKU));t.filter(p=>f.IsNotEmpty(p.ChannelVariationSKU)).forEach((p,r,K)=>{e[p.ChannelVariationSKU]=K.filter(v=>v.ChannelVariationSKU===p.ChannelVariationSKU)}),Object.keys(e).forEach(p=>{e[p].length>1&&(e[p]=e[p].map((r,K,v)=>{let B=`SKU ${r.ChannelVariationSKU} is duplicated with variant`;return v.forEach((D,Nt)=>{D.Name!==r.Name&&(B+=` ${v.length>2?D.Name+(Nt!==v.length-1?",":""):D.Name}`)}),r.duplicateMessage=B,r.isDuplicate=!0,r})),i.push(...e[p])}),i.push(...d),this.variants.set(i)}initModalConfig(){this.modalConfig=new Ct,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-modal-variants"]],decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,i){e&1&&(a(0,"modal-material",0),S("onCancel",function(){return i.dialogRef.close()}),a(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),g(6,"Variant"),s(),a(7,"th",4),g(8,"SKU"),s()()(),a(9,"tbody"),N(10,Dt,5,6,"tr",5,H),s()()()()),e&2&&(u("config",i.modalConfig),l(10),V(i.variants()))},dependencies:[gt,pt,Z],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]});let o=c;return o})();var A=o=>[o],Et=()=>[];function kt(o,c){if(o&1){let n=P();a(0,"button",16),S("click",function(){m(n);let e=C(2);return h(e.openScanDialog())}),T(1,"i",17),g(2," Scan Channel "),s()}}function Rt(o,c){if(o&1&&(E(0),M(1,kt,3,0,"button",15),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?-1:1)}}function Ut(o,c){if(o&1){let n=P();a(0,"button",19),S("click",function(){m(n);let e=C(2);return h(e.onDownloadAllProduct("SELECTED"))}),T(1,"i",20),g(2),s()}if(o&2){let n,t=C(2);l(2),$(" Download (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function At(o,c){if(o&1&&(E(0),M(1,Ut,3,1,"button",18),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?1:-1)}}function Kt(o,c){if(o&1){let n=P();a(0,"div",12)(1,"app-product-card",21),S("onCheckBoxChange",function(e){let i=m(n).$index,d=C();return h(d.onSelectProduct(e,i))})("onDescEvent",function(){let e=m(n).$index,i=C();return h(i.onShowVariantDetail(e))})("onDownload",function(){let e=m(n).$implicit,i=C();return h(i.onDownloadProduct(e))})("onScan",function(){let e=m(n).$implicit,i=C();return h(i.onScanChannel(e))}),s()()}if(o&2){let n=c.$implicit,t=C();l(),u("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?b(10,A,n==null?null:n.Channel):q(12,Et))("showCheckBox",t.hasDownloadRole())("scanButton",!0)}}function Bt(o,c){o&1&&(a(0,"div",13),T(1,"app-empty-state"),s())}function Lt(o,c){if(o&1){let n=P();a(0,"div",14)(1,"div",22)(2,"app-custom-paginator",23),S("total",function(){m(n);let e=C();return h(e.getRowCount())})("next",function(){m(n);let e=C();return h(e.getProducts())})("previous",function(){m(n);let e=C();return h(e.getProducts())}),s()()()}if(o&2){let n=C();l(2),u("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var Me=(()=>{let c=class c{constructor(){this.http=_(tt),this.dialog=_(ut),this.productService=_(yt),this.toastrService=_(X),this.activateRouter=_(et),this.authService=_(at),this.placeholderService=_(Mt),this.permissionService=_(nt),this.searchFilter=new wt,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=U.ProductScan,this.downloadProductRole=U.ProductDownload,this.hasDownloadRole=x(!0),this.searchPlaceholder=x("Search ..."),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(t=>{this.hasDownloadRole.set(t)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.loader$=this.productService.loader(t).pipe(W(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts(),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?f.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts(),this.initSearchPlaceholder()}onClearChannelFilter(){this.searchFilter.ChannelID=f.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(f.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=f.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(Pt,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(L(i=>f.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(f.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(It,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku),SearchType:this.searchFilter.SearchType,NumberFilterComparator:this.searchFilter.NumberFilterComparator};this.http.post(rt.GetNotInPosRowCount,t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-not-in-pos"]],decls:34,vars:21,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){if(e&1){let d=P();j(0),z(1,"async"),a(2,"mainpanel",0),S("onSubmit",function(r){return m(d),h(i.onSearch(r))}),a(3,"actions"),G(4,Rt,2,1,"ng-container",1)(5,At,2,1,"ng-container",1),s(),a(6,"filters")(7,"div",2)(8,"label",3),g(9,"Channel"),s(),a(10,"app-channel-options-v2",4),F("ngModelChange",function(r){return m(d),w(i.searchFilter.ChannelID,r)||(i.searchFilter.ChannelID=r),h(r)}),s()(),a(11,"div",2)(12,"label",5),g(13,"SKU Assigned"),s(),a(14,"mat-radio-group",6),F("ngModelChange",function(r){return m(d),w(i.searchFilter.HaveSku,r)||(i.searchFilter.HaveSku=r),h(r)}),a(15,"mat-radio-button",7),g(16," All "),s(),a(17,"mat-radio-button",7),g(18," Yes "),s(),a(19,"mat-radio-button",7),g(20," No "),s()()(),a(21,"div",2)(22,"label",5),g(23,"Item ID"),s(),a(24,"input",8),F("ngModelChange",function(r){return m(d),w(i.searchFilter.Item_id,r)||(i.searchFilter.Item_id=r),h(r)}),s()(),a(25,"div")(26,"filter-query-type",9),F("numberFilterComparatorChange",function(r){return m(d),w(i.searchFilter.NumberFilterComparator,r)||(i.searchFilter.NumberFilterComparator=r),h(r)})("searchTypeChange",function(r){return m(d),w(i.searchFilter.SearchType,r)||(i.searchFilter.SearchType=r),h(r)}),s()()(),a(27,"content")(28,"div",10)(29,"div",11),N(30,Kt,2,13,"div",12,J),M(32,Bt,2,0,"div",13),s(),M(33,Lt,3,4,"div",14),s()()()}if(e&2){let d=Y(1,15,i.loader$);l(2),u("searchBoxPlaceHolder",i.searchPlaceholder()),l(2),u("ngxPermissionsOnly",b(17,A,i.scanProductRole)),l(),u("ngxPermissionsOnly",b(19,A,i.downloadProductRole)),l(5),y("ngModel",i.searchFilter.ChannelID),l(4),y("ngModel",i.searchFilter.HaveSku),l(),u("value",0),l(2),u("value",1),l(2),u("value",2),l(5),y("ngModel",i.searchFilter.Item_id),l(2),u("numberFilterComparatorOptions",d==null||d.Options==null?null:d.Options.SearchComparatorTypeOptions),y("numberFilterComparator",i.searchFilter.NumberFilterComparator),u("searchTypeOptions",d==null||d.Options==null?null:d.Options.SearchSKUOnlyOrSKUNameOptions),y("searchType",i.searchFilter.SearchType),l(4),V(i.products),l(2),O(i.products.length==0?32:-1),l(),O((i.products==null?null:i.products.length)>0?33:-1)}},dependencies:[_t,ot,it,Ot,dt,lt,st,ct,ft,St,Ft,bt,vt,xt,Q],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=c;return o})();export{Me as NotInPosComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-WH76SMZT.js";import{a as g,b as d}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as m}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as l,hc as p,ic as c,jc as i,kc as r,ob as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var u=(()=>{let e=class e{constructor(){this.channelTabs=[{Title:"Channel",Url:"/menu/channel/marketplace"},{Title:"POS",Url:"/menu/channel/pos"}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=l({type:e,selectors:[["app-channels"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,s){o&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),r(3,"nav-tab",2),i()()(),r(4,"router-outlet")),o&2&&(a(3),p("Tabs",s.channelTabs))},dependencies:[d,g,m],styles:[".form-label-group[_ngcontent-%COMP%]{position:relative;margin-bottom:1rem}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{width:auto;position:absolute;top:1.125rem;left:.75rem;display:block;margin-bottom:0;line-height:1.5;color:#ccc;pointer-events:none;cursor:text;border:1px solid transparent;border-radius:.25rem;transition:all .1s ease-in-out;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]{padding:.75rem;color:#343434;resize:both;font-size:.875rem;border-radius:.25rem;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{top:.9375rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus ~ label[_ngcontent-%COMP%]{top:1rem;left:.78125rem}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] .ng-select-container{min-height:3.625rem;border-color:#c8d3df;box-shadow:none}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:inline-block;top:-.625rem;background-color:#fff;font-size:.75rem!important;color:#9da2a6;padding:0 .25rem;z-index:1002;left:.5rem}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{padding-left:.25rem!important}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{top:18px!important}.form-label-group.radio[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;border-radius:.25rem!important;border:solid 1px #c8d3df}.form-label-group.radio[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem!important;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group.empty[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:none}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::placeholder{color:transparent}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%]{color:#3f8aec}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{padding-left:.25rem;color:#ccc!important;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-has-value .ng-value{padding-left:.25rem;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-value-container{overflow:initial!important}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{top:auto!important;padding-left:.875rem!important;font-size:.875rem}"]});let t=e;return t})();var v=[{path:"",component:u,children:[{path:"",redirectTo:"marketplace",pathMatch:"full"},{path:"marketplace",loadComponent(){return import("./chunk-CKFHJ3IS.js").then(t=>t.MarketplaceComponent)},canActivate:[n],data:{title:"List"}},{path:"marketplace/form",loadComponent(){return import("./chunk-MS5NHG4Z.js").then(t=>t.MarketplaceFormComponent)},canActivate:[n],data:{title:"Add new Channel"}},{path:"marketplace/view",loadComponent(){return import("./chunk-56NTLHVB.js").then(t=>t.MarketplaceViewComponent)},canActivate:[n],data:{title:"Marketplace View"}},{path:"marketplace/add",loadComponent(){return import("./chunk-GQT5IVF5.js").then(t=>t.MarketplaceAddComponent)},canActivate:[n],data:{title:"Marketplace Add"}},{path:"pos",loadComponent(){return import("./chunk-UMIGDHOS.js").then(t=>t.PosComponent)},canActivate:[n],data:{title:"POS"}},{path:"pos/edit",loadComponent(){return import("./chunk-XHWASSX2.js").then(t=>t.EditComponent)},canActivate:[n],data:{title:"POS Edit"}}]}];export{v as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as _}from"./chunk-
|
|
1
|
+
import{f as _}from"./chunk-62YNPW6Q.js";import{c as a}from"./chunk-UPRDDI4K.js";import{e as k,g as C}from"./chunk-UB3ZV5NW.js";import{Hb as v,Nc as u,Pc as p,ac as I,bd as D,cc as g,hc as s,ic as c,jc as m,ma as h,mb as b,ob as l,pd as f,ra as o,ud as x,yc as d}from"./chunk-OHGMB7HJ.js";var y=(()=>{let e=class e{constructor(){this.localDataService=o(_),this.baseUrl=this.localDataService.getHostName()}getBaseUrl(n){let r="";return a.IsNotEmpty(n.ID)?r=`https://${this.baseUrl}/menu/Orders/Orders/Customer_Invoice/Info?ID=${n.ID}`:r="/menu/Order/detail",r}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var U=(t,e)=>({Number:t,Outlet:e});function L(t,e){if(t&1&&(c(0,"a",0),u(1),m()),t&2){let i,n=d();s("href",n.baseUrl(),b),l(),p(" ",(i=n.order())==null?null:i.Number," ")}}function S(t,e){if(t&1&&(c(0,"a",1),u(1),m()),t&2){let i,n,r=d();s("routerLink",r.baseUrl())("queryParams",D(3,U,(i=r.order())==null?null:i.Number,(i=r.order())==null?null:i.Outlet)),l(),p(" ",(n=r.order())==null?null:n.Number," ")}}var z=(()=>{let e=class e{constructor(){this.order=x(),this.generateLinkService=o(y),this.baseUrl=f(()=>this.generateLinkService.getBaseUrl(this.order())),this.hasOrderID=f(()=>a.IsNotEmpty(this.order()?.ID))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=v({type:e,selectors:[["order-link"]],inputs:{order:[1,"order"]},decls:2,vars:1,consts:[["target","_blank",3,"href"],["target","_blank",3,"routerLink","queryParams"]],template:function(r,N){r&1&&I(0,L,2,2,"a",0)(1,S,2,6,"a",1),r&2&&g(N.hasOrderID()?0:1)},dependencies:[C,k],encapsulation:2});let t=e;return t})();export{z as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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 K,d as Q}from"./chunk-BZWZ64N5.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as J}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-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as G,c as A,h as q,m as H,o as j}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as z}from"./chunk-D6JH2KV4.js";import{e as B}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{y as R}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as W,Hb as N,Nb as I,Nc as m,Oc as w,Pc as b,Rc as g,Sc as u,Tc as h,ac as f,ad as F,cc as C,ec as v,fc as M,gc as P,hc as s,ic as n,id as O,jc as i,kc as x,kd as k,mb as y,ob as r,ra as S,rc as D,wc as E,ya as L,yc as _,za as T}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var $=()=>["/menu/log/exception/detail"],ee=o=>({ID:o});function te(o,l){if(o&1&&(n(0,"span",17),x(1,"img",18),i(),m(2)),o&2){let t=l.item;r(),s("src",t.Img,y)("alt",t.Name),r(),b(" ",t.Name," ")}}function ne(o,l){if(o&1&&x(0,"img",23),o&2){let t=_().$implicit;s("src",t.Logo,y)}}function ie(o,l){if(o&1&&(n(0,"tr")(1,"td"),f(2,ne,1,1,"img",23),m(3),i(),n(4,"td")(5,"a",24),m(6),i()(),n(7,"td"),m(8),O(9,"date"),i(),n(10,"td")(11,"div"),m(12),i()()()),o&2){let t=l.$implicit;r(2),C(t.Logo?2:-1),r(),b(" ",t.ChannelName," "),r(2),s("routerLink",W(10,$))("queryParams",F(11,ee,t.id)),r(),b(" ",t.number??"N/A"," "),r(2),w(k(9,7,t.date,"dd-MM-yyyy hh:mm:ss")),r(4),w(t.response)}}function oe(o,l){if(o&1){let t=D();n(0,"mat-paginator",25),E("page",function(p){L(t);let e=_(2);return T(e.onPaginationChange(p))}),i()}if(o&2){let t=_(2);s("length",t.pageTotal)("pageSize",t.pageSize)("pageIndex",(t.filter==null?null:t.filter.PageNumber)==0?0:(t.filter==null?null:t.filter.PageNumber)-1)}}function ae(o,l){if(o&1&&(n(0,"div",15)(1,"table",19)(2,"thead")(3,"tr",20)(4,"th",21),m(5,"Channel Name"),i(),n(6,"th",21),m(7,"Number"),i(),n(8,"th",21),m(9,"Date"),i(),n(10,"th"),m(11,"Exception"),i()()(),n(12,"tbody"),M(13,ie,13,13,"tr",null,v),i()(),f(15,oe,1,3,"mat-paginator",22),i()),o&2){let t=_();r(13),P(t.exceptions),r(2),C((t.exceptions==null?null:t.exceptions.length)>0?15:-1)}}function re(o,l){o&1&&(n(0,"div",16),x(1,"app-empty-state"),i())}var ye=(()=>{let l=class l{constructor(){this.http=S(z),this.authService=S(V),this.exceptions=[],this.filter={RowCount:50,PageNumber:1,Number:null,From:null,To:null,ChannelID:null},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(c={}){this.http.post("/api/OrdersLoader/Get",c).subscribe(p=>{this.filter=p.Filter,this.getData()})}getData(c){this.filter.Number=c,this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(p=>{this.exceptions=p.hits.map(e=>({id:e._id,ChannelName:e._source?.channelId!=null?this.channelOptions.find(d=>d.ID===e._source?.channelId)?.Name:e._source?.shopId,Logo:e._source?.channelId!=null?this.channelOptions.find(d=>d.ID===e._source?.channelId)?.Img:null,number:e._source?.error?.number,date:e._source["@timestamp_received"],stackTrace:e._source?.error?.stackTrace,response:e._source?.error?.response,message:e._source?.message,requestJSON:e._source?.error?.requestJSON})),this.pageTotal=p.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(c){this.filter.PageNumber=c.pageIndex+1,this.getData()}};l.\u0275fac=function(p){return new(p||l)},l.\u0275cmp=N({type:l,selectors:[["app-exception-log"]],decls:28,vars:8,consts:[["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...",3,"onSubmit"],[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","table-hover"],[1,"table-light"],[2,"width","10%"],[3,"length","pageSize","pageIndex"],["alt","Logo",2,"width","18px",3,"src"],[3,"routerLink","queryParams"],[3,"page","length","pageSize","pageIndex"]],template:function(p,e){p&1&&(n(0,"mainpanel",0),E("onSubmit",function(a){return e.getData(a)}),n(1,"filters")(2,"div")(3,"label",1),m(4,"Channel"),i(),n(5,"ng-select",2),h("ngModelChange",function(a){return u(e.filter.ChannelID,a)||(e.filter.ChannelID=a),a}),I(6,te,3,3,"ng-template",3),i()(),n(7,"div",4)(8,"label",5),m(9,"From/To"),i(),n(10,"div",6)(11,"datepicker",7),h("dateChange",function(a){return u(e.filter.From,a)||(e.filter.From=a),a}),i()(),n(12,"div")(13,"datepicker",8),h("dateChange",function(a){return u(e.filter.To,a)||(e.filter.To=a),a}),i()()(),n(14,"div",4)(15,"label",9),m(16,"Page Number"),i(),n(17,"input",10),h("ngModelChange",function(a){return u(e.filter.PageNumber,a)||(e.filter.PageNumber=a),a}),i()(),n(18,"div",4)(19,"label",9),m(20,"Page Size"),i(),n(21,"input",11),h("ngModelChange",function(a){return u(e.filter.RowCount,a)||(e.filter.RowCount=a),a}),i()()(),n(22,"content")(23,"div",12)(24,"div",13)(25,"div",14),f(26,ae,16,1,"div",15)(27,re,2,0,"div",16),i()()()()()),p&2&&(r(5),s("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),C(e.exceptions.length>0?26:27))},dependencies:[J,Q,G,A,j,q,H,U,K,Y,B,Z,X,R],encapsulation:2});let o=l;return o})();export{ye as ExceptionLogComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h}from"./chunk-
|
|
1
|
+
import{h}from"./chunk-62YNPW6Q.js";import{a as u}from"./chunk-NB2H6KA7.js";import{b as l}from"./chunk-D6JH2KV4.js";import{d as p}from"./chunk-UB3ZV5NW.js";import{ma as c,qa as t}from"./chunk-OHGMB7HJ.js";var g=(()=>{let e=class e{constructor(s,i,r,n){this.toastr=s,this.authService=i,this.router=r,this.permissionService=n}canActivate(s,i){let r=JSON.parse(window.localStorage.getItem("user")),n=new Date,a=!1;if(r!=null){let m=new Date(r?.Token?.expiredAt);n<m?a=!0:(this.authService.logout(),this.onTokenExpired())}else this.router.navigate([""]),this.onTokenExpired();return a}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired")}};e.\u0275fac=function(i){return new(i||e)(t(l),t(h),t(p),t(u))},e.\u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"});let o=e;return o})();export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./chunk-DE3FRI5N.js";import{a as o}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-DE3FRI5N.js";import{a as o}from"./chunk-WH76SMZT.js";import{a as v,b as d}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c,g as u}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as i,_c as s,hc as m,ic as p,jc as l,kc as r,ob as a}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var f=(()=>{let n=class n{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=i({type:n,selectors:[["app-inventory"]],features:[s([h])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,C){t&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),r(3,"nav-tab",2),l()()(),r(4,"router-outlet")),t&2&&(a(3),m("Tabs",C.inventoryTabs))},dependencies:[d,v,u,c],encapsulation:2});let e=n;return e})();var U=[{path:"",component:f,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-YF7CCYHF.js").then(e=>e.MultiChannelComparison)},canActivate:[o],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-M5JNIPMS.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[o],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-K2CHDL7K.js").then(e=>e.ChannelSummaryComponent)},canActivate:[o],data:{title:"Different Inventory"}}]}];export{U as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as pe}from"./chunk-JWDQVXQP.js";import{a as de,b as me}from"./chunk-K5WSFDNA.js";import{a as ce}from"./chunk-
|
|
1
|
+
import{a as pe}from"./chunk-JWDQVXQP.js";import{a as de,b as me}from"./chunk-K5WSFDNA.js";import{a as ce}from"./chunk-VBVBTC2P.js";import{a as P}from"./chunk-L6CRWJ2O.js";import{a as se}from"./chunk-PV4OJSZI.js";import{a as le}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as oe}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 ne}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 ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as te,c as Y,h as Z,m as $,o as ee}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 Q,B as X,w as J,y as K}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as U,Hb as D,Ia as F,Mc as z,Nc as l,Oc as w,Pc as x,Rc as f,Sc as S,Tc as C,Uc as A,Vc as R,Wc as H,_c as j,ac as b,ad as q,cc as V,dc as I,fc as B,gc as k,hc as g,ic as t,id as y,jc as i,jd as E,kc as _,kd as G,mb as W,ob as r,ra as O,rc as M,wc as T,ya as s,yc as h,za as c}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as L,b as N}from"./chunk-66YHNWRR.js";var ue=()=>[],_e=a=>({"td-cell-hover":a});function ge(a,p){if(a&1&&_(0,"variants-dropdown",31),a&2){let e=h().$implicit;g("variants",e==null?null:e.Variants)}}function he(a,p){if(a&1&&_(0,"variant-with-image",32),a&2){let e=h().$implicit;g("variant",e==null?null:e.Variants[0])}}function fe(a,p){if(a&1&&(t(0,"span"),l(1),i()),a&2){let e=h().$implicit;r(),x("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Se(a,p){if(a&1&&(t(0,"tr")(1,"td")(2,"div",24),_(3,"img",25),y(4,"channelImage"),t(5,"div",26)(6,"div"),l(7),i(),t(8,"small",27)(9,"span"),l(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div"),_(14,"order-link",29),i(),t(15,"small"),l(16),y(17,"date"),i(),_(18,"br"),t(19,"small"),_(20,"i",30),l(21),i()()(),t(22,"td"),b(23,ge,1,1,"variants-dropdown",31)(24,he,1,1,"variant-with-image",32),i(),t(25,"td",33),l(26),y(27,"number"),i(),t(28,"td")(29,"div",28)(30,"div",34)(31,"span"),l(32),i(),b(33,fe,2,1,"span"),i(),t(34,"small"),l(35),i()()()()),a&2){let e=p.$implicit;r(3),g("src",E(4,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),r(4),w(e.Outlet),r(3),w(e.ChannelName),r(4),g("order",e),r(2),x(" ",G(17,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),r(5),x(" ",e.Customer," "),r(),z(q(21,_e,(e.Variants==null?null:e.Variants.length)>1)),r(),V((e.Variants==null?null:e.Variants.length)>1?23:24),r(3),w(E(27,19,e.Amount)),r(6),w(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),r(),V(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?33:-1),r(2),x(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function Ce(a,p){if(a&1){let e=M();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",20),l(7,"Number"),i(),t(8,"th"),l(9,"Items"),i(),t(10,"th",21),l(11,"Amount"),i(),t(12,"th",22),l(13,"Shipping"),i()()(),t(14,"tbody"),B(15,Se,36,23,"tr",null,I),i()(),t(17,"app-custom-paginator",23),T("next",function(){s(e);let m=h();return c(m.initShippedOrders())})("previous",function(){s(e);let m=h();return c(m.initShippedOrders())}),i()()}if(a&2){let e=h(),d=H(0);r(15),k(d),r(2),g("filter",e.filter())("totaldata",d==null?null:d.length)}}function ve(a,p){a&1&&(t(0,"div",16),_(1,"app-empty-state"),i())}var Re=(()=>{let p=class p{constructor(){this.orderService=O(P),this.filter=F({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(m=>N(L({},m),{From:d})),this.initShippedOrders()}initShippedOrders(){this.shippedOrders$=this.orderService.getShippedOrders(this.filter())}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=D({type:p,selectors:[["app-shipped"]],features:[j([P])],decls:34,vars:12,consts:[["headerTitle","Shipped","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],["rowCountApi","/api/orders/shippedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-end","gap-2"]],template:function(m,o){if(m&1){let u=M();A(0),y(1,"async"),t(2,"mainpanel",0),T("onSubmit",function(){return s(u),c(o.initShippedOrders())}),C("textChange",function(n){return s(u),S(o.filter().Number,n)||(o.filter().Number=n),c(n)}),t(3,"actions")(4,"a",1),_(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"Channel"),i(),t(12,"app-channel-options-v2",4),C("ngModelChange",function(n){return s(u),S(o.filter().ListChannelID,n)||(o.filter().ListChannelID=n),c(n)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),C("dateChange",function(n){return s(u),S(o.filter().From,n)||(o.filter().From=n),c(n)}),i()(),t(18,"div")(19,"datepicker",8),C("dateChange",function(n){return s(u),S(o.filter().To,n)||(o.filter().To=n),c(n)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),C("ngModelChange",function(n){return s(u),S(o.filter().PageNumber,n)||(o.filter().PageNumber=n),c(n)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),C("ngModelChange",function(n){return s(u),S(o.filter().PageSize,n)||(o.filter().PageSize=n),c(n)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),b(32,Ce,18,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(m&2){let u=R(E(1,8,o.shippedOrders$)||U(11,ue));r(2),f("text",o.filter().Number),r(10),g("multiple",!0),f("ngModel",o.filter().ListChannelID),r(5),f("date",o.filter().From),r(2),f("date",o.filter().To),r(4),f("ngModel",o.filter().PageNumber),r(4),f("ngModel",o.filter().PageSize),r(5),V(u.length>0?32:33)}},dependencies:[X,re,ae,oe,te,Y,ee,Z,$,de,me,se,ne,ie,ce,le,J,Q,K,pe],encapsulation:2});let a=p;return a})();export{Re as ShippedComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Se}from"./chunk-MSSRROS6.js";import{a as V}from"./chunk-ISMIPSYN.js";import"./chunk-7T5DBPDP.js";import"./chunk-OH5T7D7O.js";import"./chunk-DE3FRI5N.js";import{a as Ce,b as ge}from"./chunk-XF4A775R.js";import"./chunk-FH2KAM6J.js";import{c as fe,d as O,e as R}from"./chunk-C67KF7MG.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as me,d as ue}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as he}from"./chunk-BZWZ64N5.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-DLHIDOS3.js";import{a as de}from"./chunk-WCX3T6LK.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-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as ce,b as pe}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as se}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ne}from"./chunk-ZSUWHVKX.js";import{h as N}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as E}from"./chunk-AGBJEXIM.js";import{b as ee,c as te}from"./chunk-NB2H6KA7.js";import{c as _}from"./chunk-UPRDDI4K.js";import{A as le,c as ie,h as oe,m as re,o as ae}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Z,e as $}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as Y,w as X}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as k,Hb as A,Ia as y,Nb as G,Nc as v,Rc as b,Sc as I,Tc as T,Uc as K,_c as Q,ac as F,ad as J,cc as M,ea as H,hc as f,ic as s,id as w,jc as d,jd as P,kc as j,ma as W,ob as C,oc as z,pc as q,ra as c,rc as D,wc as S,ya as p,yc as g,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as B,b as U}from"./chunk-66YHNWRR.js";var x=(()=>{let l=class l{constructor(){this.authService=c(N),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(n,r){let e=Object.assign([],this.channelOptions),i=[],o;return n.forEach(t=>{o=e.find(u=>u.ID==t?.parent?.id),o&&(o=U(B({},o),{Name:`${t?.parent?.label} - ${t?.label}`,LocationID:t?.id}),i.push(o))}),r.forEach(t=>{o=e.find(u=>u.ID==t.id),o&&i.push(o)}),i}generateFilterLocation(n,r){let e=[],i=[],o=[];return n.length>0?(e=n.map(t=>t.id),i=n.filter(t=>_.IsNotEmpty(t?.parent?.id)).map(t=>t?.parent?.id).filter((t,u,L)=>L.indexOf(t)===u)):(e=[],i=[]),o=r.map(t=>t.id),o=o.concat(i).filter((t,u,L)=>L.indexOf(t)===u),{locationIds:e,channelIds:o}}};l.\u0275fac=function(r){return new(r||l)},l.\u0275prov=W({token:l,factory:l.\u0275fac});let a=l;return a})();var ye=a=>[a];function ve(a,l){if(a&1){let m=D();s(0,"button",17),S("click",function(){p(m);let r=g(2),e=g();return h(e.onUpdateItems(r))}),j(1,"i",18),v(2," Update "),d()}}function be(a,l){if(a&1&&(z(0),F(1,ve,3,0,"button",16),q()),a&2){let m=g(),n=g();C(),M(n.productService.hasSelectionVariant(m)?1:-1)}}function Ie(a,l){if(a&1&&(s(0,"actions")(1,"div",14),G(2,be,2,1,"ng-container",15),d()()),a&2){let m=g();C(2),f("ngxPermissionsOnly",J(1,ye,m.inventoryUpdateRole))}}function we(a,l){if(a&1){let m=D();s(0,"app-table",19),S("onToggle",function(r){p(m);let e=g();return h(e.onShowDifferenceStock(r))})("onSubmit",function(r){p(m);let e=g();return h(e.updateStockByVariant(r))}),d()}if(a&2){let m=g();f("data",l)("channel",m.channels())("showProductToggle",!0)("hiddenIPOSInventory",m.searchFilter.HiddenIPOSInventory)}}var st=(()=>{let l=class l{constructor(){this.http=c($),this.toastr=c(Z),this.dialog=c(se),this.productService=c(de),this.authService=c(N),this.mainPanelService=c(ce),this.placeholderService=c(me),this.paginationService=c(O),this.multiChannelService=c(x),this.updateResHandling=c(R),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=y([]),this.selectedChannels=y([]),this.channels=y([]),this.inventoryUpdateRole=ne.InventoryUpdate,this.searchPlaceholder=y("Search ..."),this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(H(n=>{n.Filter={PageNumber:n.Filter.PageNumber,filterModel:V.ALL,RowCount:n.Filter.PageSize,HiddenIPOSInventory:n.Filter.HiddenIPOSInventory,SearchType:n.Filter.SearchType,NumberFilterComparator:n.Filter.NumberFilterComparator},this.searchFilter=n.Filter,this.initSearchPlaceholder(),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}onChannelChange(n=[]){let r=n.filter(i=>_.isValidGUID(i.id)==!1),e=n.filter(i=>_.isValidGUID(i.id));this.selectedLocations.set(r),this.selectedChannels.set(e)}onSearch(n){let r=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(r);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=n,this.initSearchPlaceholder(),this.paginationService.reloadPagination(this.searchFilter)}updateStock(n,r){if(n.length>0){let e=[];n.forEach(t=>{t.Channel?.forEach(u=>{e.push({ChannelItemID:u?.ChannelItemID,ChannelVariationID:u?.ChannelVariationID,Inventory:t.Inventory,LocationID:u?.LocationID})})});let o={ListChannelID:r.filter(t=>t.selected).map(t=>t.ID),List:e};this.http.post(E.UpdateInventoryChannel,o).subscribe(t=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success")})}}updateStockByVariant(n){let r=n.InventoryMultiwarehouse[0]?.LocationID,e={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:n.Inventory,VariantID:n.ID,SKU:n?.Sku,LocationID:r};this.http.post(E.UpdateUpdateQuantityByItem,e).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock(i)})}handlingUpdateStock(n){if(n){let r=n?.Response?.Fail_list,e=n?.Response?.Success_list;this.updateResHandling.responseHandling(e,r,"Stock")}else this.toastr.error(n?.Exception,"Error")}onShowDifferenceStock(n){n?this.searchFilter.filterModel=V.DIFFERENCE:this.searchFilter.filterModel=V.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(n){let r=this.productService.selectedVariantProduct(n),e=this.channelOptions.filter(i=>this.channels()?.find(o=>o.ID===i.ID));this.dialog.open(Ce,{data:{selectedItems:r,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(k(i=>_.IsNotEmpty(i))).subscribe(i=>{this.updateStock(r,i)})}};l.\u0275fac=function(r){return new(r||l)},l.\u0275cmp=A({type:l,selectors:[["app-multi-channel-comparison"]],features:[Q([O,x,R])],decls:28,vars:25,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"mb-5"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[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,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(r,e){if(r&1){let i=D();s(0,"mainpanel",0),S("onSubmit",function(t){return p(i),h(e.onSearch(t))}),F(1,Ie,3,3,"actions"),w(2,"async"),s(3,"filters"),K(4),w(5,"async"),s(6,"div",1)(7,"label",2),v(8,"Channel"),d(),s(9,"multiwarehouse-tree-select",3),S("onChannelChange",function(t){return p(i),h(e.onChannelChange(t))}),d()(),s(10,"div",1)(11,"filter-query-type",4),T("numberFilterComparatorChange",function(t){return p(i),I(e.searchFilter.NumberFilterComparator,t)||(e.searchFilter.NumberFilterComparator=t),h(t)})("searchTypeChange",function(t){return p(i),I(e.searchFilter.SearchType,t)||(e.searchFilter.SearchType=t),h(t)}),d()(),s(12,"div",1)(13,"label",5),v(14,"PageNumber"),d(),s(15,"input",6),T("ngModelChange",function(t){return p(i),I(e.searchFilter.PageNumber,t)||(e.searchFilter.PageNumber=t),h(t)}),d()(),s(16,"div")(17,"label",7),v(18,"Page Size"),d(),s(19,"input",8),T("ngModelChange",function(t){return p(i),I(e.searchFilter.RowCount,t)||(e.searchFilter.RowCount=t),h(t)}),d()()(),s(20,"content")(21,"div",9)(22,"div",10)(23,"div",11),F(24,we,1,4,"app-table",12),w(25,"async"),s(26,"infinite-paginator",13),w(27,"async"),S("onNextPage",function(){return p(i),h(e.paginationService.onNextPage(e.searchFilter))})("onLastPage",function(){return p(i),h(e.paginationService.onLastPage(e.searchFilter))})("onGetRowCount",function(){return p(i),h(e.paginationService.getRowCount(e.searchFilter))}),d()()()()()()}if(r&2){let i,o;f("hideSearchBox",!1)("searchBoxPlaceHolder",e.searchPlaceholder()),C(),M((i=P(2,17,e.paginationService.data$))?1:-1,i);let t=P(5,19,e.loader$);C(8),f("multiple",!0),C(2),f("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions),b("numberFilterComparator",e.searchFilter.NumberFilterComparator),f("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions),b("searchType",e.searchFilter.SearchType),C(4),b("ngModel",e.searchFilter.PageNumber),C(4),b("ngModel",e.searchFilter.RowCount),C(5),M((o=P(25,21,e.paginationService.data$))?24:-1,o),C(2),f("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",P(27,23,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage())}},dependencies:[Y,pe,ge,le,ie,ae,oe,re,fe,Se,te,ee,he,ue,X],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let a=l;return a})();export{st as MultiChannelComparison};
|
|
1
|
+
import{a as Se}from"./chunk-MSSRROS6.js";import{a as V}from"./chunk-ISMIPSYN.js";import"./chunk-7T5DBPDP.js";import"./chunk-OH5T7D7O.js";import"./chunk-DE3FRI5N.js";import{a as Ce,b as ge}from"./chunk-R3BRUX7Z.js";import"./chunk-FH2KAM6J.js";import{c as fe,d as O,e as R}from"./chunk-C67KF7MG.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{c as me,d as ue}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import{e as he}from"./chunk-BZWZ64N5.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-DLHIDOS3.js";import{a as de}from"./chunk-LCN52IJT.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{a as ce,b as pe}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as se}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ne}from"./chunk-ZSUWHVKX.js";import{h as N}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as E}from"./chunk-AGBJEXIM.js";import{b as ee,c as te}from"./chunk-NB2H6KA7.js";import{c as _}from"./chunk-UPRDDI4K.js";import{A as le,c as ie,h as oe,m as re,o as ae}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Z,e as $}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as Y,w as X}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as k,Hb as A,Ia as y,Nb as G,Nc as v,Rc as b,Sc as I,Tc as T,Uc as K,_c as Q,ac as F,ad as J,cc as M,ea as H,hc as f,ic as s,id as w,jc as d,jd as P,kc as j,ma as W,ob as C,oc as z,pc as q,ra as c,rc as D,wc as S,ya as p,yc as g,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as B,b as U}from"./chunk-66YHNWRR.js";var x=(()=>{let l=class l{constructor(){this.authService=c(N),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(n,r){let e=Object.assign([],this.channelOptions),i=[],o;return n.forEach(t=>{o=e.find(u=>u.ID==t?.parent?.id),o&&(o=U(B({},o),{Name:`${t?.parent?.label} - ${t?.label}`,LocationID:t?.id}),i.push(o))}),r.forEach(t=>{o=e.find(u=>u.ID==t.id),o&&i.push(o)}),i}generateFilterLocation(n,r){let e=[],i=[],o=[];return n.length>0?(e=n.map(t=>t.id),i=n.filter(t=>_.IsNotEmpty(t?.parent?.id)).map(t=>t?.parent?.id).filter((t,u,L)=>L.indexOf(t)===u)):(e=[],i=[]),o=r.map(t=>t.id),o=o.concat(i).filter((t,u,L)=>L.indexOf(t)===u),{locationIds:e,channelIds:o}}};l.\u0275fac=function(r){return new(r||l)},l.\u0275prov=W({token:l,factory:l.\u0275fac});let a=l;return a})();var ye=a=>[a];function ve(a,l){if(a&1){let m=D();s(0,"button",17),S("click",function(){p(m);let r=g(2),e=g();return h(e.onUpdateItems(r))}),j(1,"i",18),v(2," Update "),d()}}function be(a,l){if(a&1&&(z(0),F(1,ve,3,0,"button",16),q()),a&2){let m=g(),n=g();C(),M(n.productService.hasSelectionVariant(m)?1:-1)}}function Ie(a,l){if(a&1&&(s(0,"actions")(1,"div",14),G(2,be,2,1,"ng-container",15),d()()),a&2){let m=g();C(2),f("ngxPermissionsOnly",J(1,ye,m.inventoryUpdateRole))}}function we(a,l){if(a&1){let m=D();s(0,"app-table",19),S("onToggle",function(r){p(m);let e=g();return h(e.onShowDifferenceStock(r))})("onSubmit",function(r){p(m);let e=g();return h(e.updateStockByVariant(r))}),d()}if(a&2){let m=g();f("data",l)("channel",m.channels())("showProductToggle",!0)("hiddenIPOSInventory",m.searchFilter.HiddenIPOSInventory)}}var st=(()=>{let l=class l{constructor(){this.http=c($),this.toastr=c(Z),this.dialog=c(se),this.productService=c(de),this.authService=c(N),this.mainPanelService=c(ce),this.placeholderService=c(me),this.paginationService=c(O),this.multiChannelService=c(x),this.updateResHandling=c(R),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=y([]),this.selectedChannels=y([]),this.channels=y([]),this.inventoryUpdateRole=ne.InventoryUpdate,this.searchPlaceholder=y("Search ..."),this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(H(n=>{n.Filter={PageNumber:n.Filter.PageNumber,filterModel:V.ALL,RowCount:n.Filter.PageSize,HiddenIPOSInventory:n.Filter.HiddenIPOSInventory,SearchType:n.Filter.SearchType,NumberFilterComparator:n.Filter.NumberFilterComparator},this.searchFilter=n.Filter,this.initSearchPlaceholder(),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}onChannelChange(n=[]){let r=n.filter(i=>_.isValidGUID(i.id)==!1),e=n.filter(i=>_.isValidGUID(i.id));this.selectedLocations.set(r),this.selectedChannels.set(e)}onSearch(n){let r=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(r);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=n,this.initSearchPlaceholder(),this.paginationService.reloadPagination(this.searchFilter)}updateStock(n,r){if(n.length>0){let e=[];n.forEach(t=>{t.Channel?.forEach(u=>{e.push({ChannelItemID:u?.ChannelItemID,ChannelVariationID:u?.ChannelVariationID,Inventory:t.Inventory,LocationID:u?.LocationID})})});let o={ListChannelID:r.filter(t=>t.selected).map(t=>t.ID),List:e};this.http.post(E.UpdateInventoryChannel,o).subscribe(t=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success")})}}updateStockByVariant(n){let r=n.InventoryMultiwarehouse[0]?.LocationID,e={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:n.Inventory,VariantID:n.ID,SKU:n?.Sku,LocationID:r};this.http.post(E.UpdateUpdateQuantityByItem,e).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock(i)})}handlingUpdateStock(n){if(n){let r=n?.Response?.Fail_list,e=n?.Response?.Success_list;this.updateResHandling.responseHandling(e,r,"Stock")}else this.toastr.error(n?.Exception,"Error")}onShowDifferenceStock(n){n?this.searchFilter.filterModel=V.DIFFERENCE:this.searchFilter.filterModel=V.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(n){let r=this.productService.selectedVariantProduct(n),e=this.channelOptions.filter(i=>this.channels()?.find(o=>o.ID===i.ID));this.dialog.open(Ce,{data:{selectedItems:r,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(k(i=>_.IsNotEmpty(i))).subscribe(i=>{this.updateStock(r,i)})}};l.\u0275fac=function(r){return new(r||l)},l.\u0275cmp=A({type:l,selectors:[["app-multi-channel-comparison"]],features:[Q([O,x,R])],decls:28,vars:25,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"mb-5"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[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,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(r,e){if(r&1){let i=D();s(0,"mainpanel",0),S("onSubmit",function(t){return p(i),h(e.onSearch(t))}),F(1,Ie,3,3,"actions"),w(2,"async"),s(3,"filters"),K(4),w(5,"async"),s(6,"div",1)(7,"label",2),v(8,"Channel"),d(),s(9,"multiwarehouse-tree-select",3),S("onChannelChange",function(t){return p(i),h(e.onChannelChange(t))}),d()(),s(10,"div",1)(11,"filter-query-type",4),T("numberFilterComparatorChange",function(t){return p(i),I(e.searchFilter.NumberFilterComparator,t)||(e.searchFilter.NumberFilterComparator=t),h(t)})("searchTypeChange",function(t){return p(i),I(e.searchFilter.SearchType,t)||(e.searchFilter.SearchType=t),h(t)}),d()(),s(12,"div",1)(13,"label",5),v(14,"PageNumber"),d(),s(15,"input",6),T("ngModelChange",function(t){return p(i),I(e.searchFilter.PageNumber,t)||(e.searchFilter.PageNumber=t),h(t)}),d()(),s(16,"div")(17,"label",7),v(18,"Page Size"),d(),s(19,"input",8),T("ngModelChange",function(t){return p(i),I(e.searchFilter.RowCount,t)||(e.searchFilter.RowCount=t),h(t)}),d()()(),s(20,"content")(21,"div",9)(22,"div",10)(23,"div",11),F(24,we,1,4,"app-table",12),w(25,"async"),s(26,"infinite-paginator",13),w(27,"async"),S("onNextPage",function(){return p(i),h(e.paginationService.onNextPage(e.searchFilter))})("onLastPage",function(){return p(i),h(e.paginationService.onLastPage(e.searchFilter))})("onGetRowCount",function(){return p(i),h(e.paginationService.getRowCount(e.searchFilter))}),d()()()()()()}if(r&2){let i,o;f("hideSearchBox",!1)("searchBoxPlaceHolder",e.searchPlaceholder()),C(),M((i=P(2,17,e.paginationService.data$))?1:-1,i);let t=P(5,19,e.loader$);C(8),f("multiple",!0),C(2),f("numberFilterComparatorOptions",t==null||t.Options==null?null:t.Options.SearchComparatorTypeOptions),b("numberFilterComparator",e.searchFilter.NumberFilterComparator),f("searchTypeOptions",t==null||t.Options==null?null:t.Options.SearchSKUOnlyOrSKUNameOptions),b("searchType",e.searchFilter.SearchType),C(4),b("ngModel",e.searchFilter.PageNumber),C(4),b("ngModel",e.searchFilter.RowCount),C(5),M((o=P(25,21,e.paginationService.data$))?24:-1,o),C(2),f("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",P(27,23,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage())}},dependencies:[Y,pe,ge,le,ie,ae,oe,re,fe,Se,te,ee,he,ue,X],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let a=l;return a})();export{st as MultiChannelComparison};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as ot}from"./chunk-BZWZ64N5.js";import{a as lt}from"./chunk-
|
|
1
|
+
import{e as ot}from"./chunk-BZWZ64N5.js";import{a as lt}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as at}from"./chunk-7KG3DC5J.js";import{a as rt}from"./chunk-ZZYFVEJO.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import{b as it}from"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as nt}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as K}from"./chunk-UPRDDI4K.js";import{A as et,h as Z,m as tt}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as Q}from"./chunk-D6JH2KV4.js";import{e as X,g as Y}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as U,B as G,q,w as A,y as J}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as z,Hb as L,Nc as l,Oc as x,Pc as w,Rc as V,Sc as k,Tc as H,Xc as O,Z as v,ac as g,ad as W,bd as j,ca as E,cc as S,ec as F,f as D,fc as R,gc as $,hc as d,ic as o,id as c,jc as a,jd as u,kc as N,kd as I,lb as M,mb as P,ob as p,ra as b,rc as B,v as _,wc as T,ya as C,yc as s,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var pt=(i,r)=>({"bg-gradient-danger":i,"bg-gradient-warning":r}),st=()=>["/menu/products/status/notification/detail"],ct=i=>({ID:i});function mt(i,r){if(i&1&&(l(0),c(1,"number"),o(2,"span"),l(3,"s"),a()),i&2){let n=s().$implicit;w(" ",I(1,1,n.DurationInSecond,"1.1-1")," ")}}function dt(i,r){i&1&&l(0," - ")}function ut(i,r){if(i&1&&(o(0,"tr",11)(1,"td")(2,"a",12),N(3,"img",13),o(4,"span"),l(5),a()()(),o(6,"td")(7,"b"),l(8),a(),N(9,"div",14),a(),o(10,"td"),g(11,mt,4,4)(12,dt,1,0),a(),o(13,"td"),l(14),a(),o(15,"td"),l(16),c(17,"date"),a()()),i&2){let n=r.$implicit;d("ngClass",j(14,pt,n.Status==1,n.Status==0)),p(2),d("routerLink",z(17,st))("queryParams",W(18,ct,n.ID)),p(),d("src",O(n.Img),P),p(2),x(n.Name),p(3),x(n.Label),p(),d("innerHTML",n.Message,M),p(2),S(n.DurationInSecond?11:12),p(3),x(n.StatusLabel),p(2),w(" ",I(17,11,n.Created,"dd MMM yyyy HH:mm")," ")}}function ft(i,r){if(i&1){let n=B();o(0,"div",5)(1,"div",15)(2,"app-custom-paginator",16),c(3,"async"),c(4,"async"),T("total",function(){C(n);let t=s(2);return h(t.getRowCount())})("next",function(){C(n);let t=s(2);return h(t.getNotifications())})("previous",function(){C(n);let t=s(2);return h(t.getNotifications())}),a()()()}if(i&2){let n=s(),e=s();p(2),d("filter",e.filter)("totaldata",n==null?null:n.length)("paginationTotal",u(3,4,e.rowCount$))("hasClicked",u(4,6,e.rowCount$))}}function _t(i,r){i&1&&g(0,ft,5,8,"div",5),i&2&&S(r.length>0?0:-1)}var $t=(()=>{let r=class r{constructor(){this.http=b(Q),this.notificationService=b(it),this.filter=new at,this.destroy$=new D}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(E(this.destroy$)).subscribe(e=>{e.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(e=>{this.filter=e.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let e={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",e).pipe(_(t=>t.Data),_(t=>(t=this.setChannelLogoToNotifications(t),t=this.setTimeToSecond(t),t)),v(1))}setTimeToSecond(e){return e=e.map(t=>(t.DurationInSecond=parseInt(t.Duration)/1e3,t)),e}setChannelLogoToNotifications(e){return e=e.map(t=>(t.Img=K.getChannelLogoByTypeId(t.TypeID),t)),e}getRowCount(){let e={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",e).pipe(_(t=>t.Count),v(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=L({type:r,selectors:[["app-notification"]],decls:33,vars:6,consts:[["headerTitle","Product Scan Job","hideSearchBox","true",3,"onSubmit"],["routerLink","/menu/products/status/notificationV2",1,"btn","btn-outline-secondary","btn-lg"],[1,"mb-2"],[3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(t,m){if(t&1&&(o(0,"mainpanel",0),T("onSubmit",function(){return m.onFilter()}),o(1,"actions")(2,"a",1),l(3," Scan Job V2 "),a()(),o(4,"filters")(5,"div")(6,"h6",2),l(7,"Channel"),a(),o(8,"app-channel-options-v2",3),H("ngModelChange",function(y){return k(m.filter.ChannelID,y)||(m.filter.ChannelID=y),y}),a()()(),o(9,"content")(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"table",8)(15,"thead",9)(16,"tr",10)(17,"th"),l(18,"Channel"),a(),o(19,"th"),l(20,"Process"),a(),o(21,"th"),l(22,"Duration"),a(),o(23,"th"),l(24,"Status"),a(),o(25,"th"),l(26,"Created"),a()()(),o(27,"tbody"),R(28,ut,18,20,"tr",11,F),c(30,"async"),a()()()()(),g(31,_t,1,1),c(32,"async"),a()()()),t&2){let f;p(8),V("ngModel",m.filter.ChannelID),p(20),$(u(30,2,m.notifications$)),p(3),S((f=u(32,4,m.notifications$))?31:-1,f)}},dependencies:[G,q,et,Z,tt,nt,rt,ot,Y,X,lt,A,U,J],encapsulation:2});let i=r;return i})();export{$t as NotificationComponent};
|