marketplacepos 5.51.2 → 5.51.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-26E54WQH.js → chunk-2JS77RTQ.js} +1 -1
- package/Marketplace/{chunk-DVJ7VXWL.js → chunk-2MC4ICGX.js} +1 -1
- package/Marketplace/{chunk-NX3QFU4A.js → chunk-3OPIBKGC.js} +1 -1
- package/Marketplace/{chunk-NUF326RW.js → chunk-4H6YQH5Y.js} +1 -1
- package/Marketplace/{chunk-YSYA7XCF.js → chunk-5EGTHBHU.js} +1 -1
- package/Marketplace/{chunk-ICY32GYN.js → chunk-5ZKD2ZJE.js} +1 -1
- package/Marketplace/{chunk-N6VPSXF7.js → chunk-6KAANNEH.js} +2 -2
- package/Marketplace/{chunk-NMOQXVWS.js → chunk-6ZRATZJD.js} +1 -1
- package/Marketplace/{chunk-Q3Z7EEVP.js → chunk-772J5O6W.js} +1 -1
- package/Marketplace/{chunk-DV3BDHBL.js → chunk-7RPUDPF6.js} +1 -1
- package/Marketplace/{chunk-EXKAFEQL.js → chunk-A24BFVXA.js} +1 -1
- package/Marketplace/{chunk-QLFVXMNJ.js → chunk-BQFOS7WM.js} +1 -1
- package/Marketplace/{chunk-OEUA6IL2.js → chunk-CKH47T4N.js} +1 -1
- package/Marketplace/{chunk-MRWGPCR7.js → chunk-D765LK7G.js} +1 -1
- package/Marketplace/{chunk-AMQMYSQR.js → chunk-E22EMCMR.js} +1 -1
- package/Marketplace/{chunk-DOQD3RMB.js → chunk-FSLUPR5I.js} +1 -1
- package/Marketplace/{chunk-KVLHLMO4.js → chunk-FYQFBMXR.js} +1 -1
- package/Marketplace/{chunk-ILFG3IYB.js → chunk-GJANGM3E.js} +1 -1
- package/Marketplace/{chunk-DCMOITWM.js → chunk-GRQA7Y7Y.js} +1 -1
- package/Marketplace/{chunk-75RVMUFO.js → chunk-GYCHAJYH.js} +1 -1
- package/Marketplace/{chunk-HO6XCGRR.js → chunk-HEK6DTVD.js} +1 -1
- package/Marketplace/{chunk-MG7B4OWR.js → chunk-HIGPOY23.js} +1 -1
- package/Marketplace/{chunk-3KECTTUV.js → chunk-JNBROTGJ.js} +1 -1
- package/Marketplace/{chunk-CHCAQ4NV.js → chunk-LI2DXLEI.js} +1 -1
- package/Marketplace/{chunk-UOFJCKS5.js → chunk-LITY3VSE.js} +1 -1
- package/Marketplace/{chunk-UHWLUO2C.js → chunk-LPJSEQGR.js} +1 -1
- package/Marketplace/{chunk-GYQHWDWX.js → chunk-M3EGUVW7.js} +1 -1
- package/Marketplace/{chunk-HPQDUJXF.js → chunk-NJYWKADT.js} +1 -1
- package/Marketplace/{chunk-SLCKHYT3.js → chunk-NYBCG2UK.js} +1 -1
- package/Marketplace/{chunk-WZQRKTBN.js → chunk-PDIHZKEM.js} +1 -1
- package/Marketplace/{chunk-AVTQG66S.js → chunk-PG2DZ63W.js} +1 -1
- package/Marketplace/chunk-PPG26QRX.js +1 -0
- package/Marketplace/{chunk-KHGTW7IV.js → chunk-PRMV4INM.js} +1 -1
- package/Marketplace/{chunk-IUJ6UX3L.js → chunk-QCUYDIE3.js} +1 -1
- package/Marketplace/{chunk-FQM4RKLX.js → chunk-QKXMWSIJ.js} +1 -1
- package/Marketplace/{chunk-UJAA73LE.js → chunk-QREYZRXT.js} +1 -1
- package/Marketplace/{chunk-AVSAALDJ.js → chunk-QVK3OFDS.js} +1 -1
- package/Marketplace/{chunk-575TS45M.js → chunk-RIGKFQ2Q.js} +1 -1
- package/Marketplace/{chunk-QUIZLT5F.js → chunk-RQI26KZX.js} +1 -1
- package/Marketplace/{chunk-BKVIOCLH.js → chunk-SU5GJKTU.js} +1 -1
- package/Marketplace/{chunk-QPELTSKE.js → chunk-TBDHXPBR.js} +1 -1
- package/Marketplace/{chunk-DW7R34MP.js → chunk-TFCSRACM.js} +1 -1
- package/Marketplace/{chunk-VRD2D2BP.js → chunk-TIGXYFOW.js} +1 -1
- package/Marketplace/{chunk-NKN7T3C3.js → chunk-UAQIEHEC.js} +1 -1
- package/Marketplace/{chunk-REDQ2L7Y.js → chunk-V7V5O62J.js} +1 -1
- package/Marketplace/{chunk-PGQYHHH3.js → chunk-VR7NFJRO.js} +1 -1
- package/Marketplace/{chunk-NEB6AMMM.js → chunk-VWETHESQ.js} +1 -1
- package/Marketplace/{chunk-APQWBZOM.js → chunk-VYYJFRP5.js} +1 -1
- package/Marketplace/{chunk-LB276KSA.js → chunk-W4GP3QI7.js} +1 -1
- package/Marketplace/{chunk-BZ7QY7N3.js → chunk-XR3S3ZAY.js} +1 -1
- package/Marketplace/{chunk-QJ7SMXW4.js → chunk-YEVETIZF.js} +1 -1
- package/Marketplace/{chunk-J4552BMI.js → chunk-YH3KWMUX.js} +1 -1
- package/Marketplace/{chunk-JUN3HVEV.js → chunk-YM4QLIHR.js} +1 -1
- package/Marketplace/{chunk-U4ARIHUF.js → chunk-YNWLLBHM.js} +1 -1
- package/Marketplace/{chunk-YFR3EI3B.js → chunk-YTEEAEDW.js} +1 -1
- package/Marketplace/{chunk-4XA7JWTB.js → chunk-Z53UJ4A4.js} +1 -1
- package/Marketplace/{chunk-YMOSVDG5.js → chunk-ZCJEYG3D.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-I5THR2C3.js → main-TW7CIXAJ.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-5NWJOQN5.js +0 -1
|
@@ -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-J4552BMI.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-YH3KWMUX.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 le}from"./chunk-
|
|
1
|
+
import{a as le}from"./chunk-FSLUPR5I.js";import{a as M}from"./chunk-L6CRWJ2O.js";import{a as ae}from"./chunk-PV4OJSZI.js";import{a as re}from"./chunk-YKKHSYDW.js";import{a as ne}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as ie}from"./chunk-ZZYFVEJO.js";import{a as te}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ee}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as $}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 Z}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as Y,c as K,h as Q,m as U,o as X}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 G,B as J,w as j,y as q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as D,Ia as W,Nc as a,Oc as w,Rc as C,Sc as f,Tc as g,Uc as k,Vc as A,Wc as z,Z as P,_c as H,ac as F,cc as N,dc as L,fc as B,gc as I,hc as h,ic as e,id as b,jc as t,jd as E,kc as y,kd as R,ob as r,ra as O,rc as v,wc as x,ya as u,yc as S,za as c}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as T,b as V}from"./chunk-66YHNWRR.js";function oe(d,m){if(d&1&&(e(0,"tr")(1,"td"),a(2),t(),e(3,"td"),y(4,"order-link",26),t(),e(5,"td"),a(6),t(),e(7,"td"),a(8),b(9,"number"),t(),e(10,"td"),a(11),b(12,"date"),t(),e(13,"td"),y(14,"app-channel-logo",27),t()()),d&2){let o=m.$implicit;r(2),w(o.Outlet),r(2),h("order",o),r(2),w(o.Customer),r(2),w(E(9,6,o.Amount)),r(3),w(R(12,8,o.Created,"dd MMM yyyy HH:mm")),r(3),h("typeId",o==null?null:o.TypeID)}}function de(d,m){if(d&1){let o=v();e(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),t(),e(6,"th",21),a(7,"Order number"),t(),e(8,"th"),a(9,"Customer"),t(),e(10,"th",22),a(11,"Amount"),t(),e(12,"th",23),a(13," Created On "),t(),e(14,"th",24),a(15,"Channel"),t()()(),e(16,"tbody"),B(17,oe,15,11,"tr",null,L),t()(),e(19,"app-custom-paginator",25),x("next",function(){u(o);let p=S();return c(p.initCancelledOrders())})("previous",function(){u(o);let p=S();return c(p.initCancelledOrders())}),t()()}if(d&2){let o=S(),l=z(0);r(17),I(l),r(2),h("filter",o.filter())("totaldata",l==null?null:l.length)("paginationTotal",l==null?null:l.length)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}function me(d,m){d&1&&(e(0,"div",16),y(1,"app-empty-state"),t())}var Pe=(()=>{let m=class m{constructor(){this.orderService=O(M),this.filter=W({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:l=>{this.initFromDate(l)},error:l=>{console.error("Error fetching default date:",l),this.initFromDate(null)}})}initFromDate(l){this.filter.update(p=>V(T({},p),{From:l})),this.initCancelledOrders()}initCancelledOrders(){this.cancelledOrders$=this.orderService.getCancelledOrders(this.filter()).pipe(P(1))}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=D({type:m,selectors:[["app-cancelled"]],features:[H([M])],decls:34,vars:11,consts:[["headerTitle","Cancelled","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","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"],[3,"order"],[3,"typeId"]],template:function(p,n){if(p&1){let s=v();k(0),b(1,"async"),e(2,"mainpanel",0),x("onSubmit",function(){return u(s),c(n.initCancelledOrders())}),g("textChange",function(i){return u(s),f(n.filter().Number,i)||(n.filter().Number=i),c(i)}),e(3,"actions")(4,"a",1),y(5,"i",2),e(6,"span"),a(7,"Order Fulfillment Display"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),g("ngModelChange",function(i){return u(s),f(n.filter().ListChannelID,i)||(n.filter().ListChannelID=i),c(i)}),t()(),e(13,"div",5)(14,"label",3),a(15,"From/To"),t(),e(16,"div",6)(17,"datepicker",7),g("dateChange",function(i){return u(s),f(n.filter().From,i)||(n.filter().From=i),c(i)}),t()(),e(18,"div")(19,"datepicker",8),g("dateChange",function(i){return u(s),f(n.filter().To,i)||(n.filter().To=i),c(i)}),t()()(),e(20,"div",5)(21,"label",9),a(22,"Page Number"),t(),e(23,"input",10),g("ngModelChange",function(i){return u(s),f(n.filter().PageNumber,i)||(n.filter().PageNumber=i),c(i)}),t()(),e(24,"div",5)(25,"label",9),a(26,"Page Size"),t(),e(27,"input",11),g("ngModelChange",function(i){return u(s),f(n.filter().PageSize,i)||(n.filter().PageSize=i),c(i)}),t()()(),e(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),F(32,de,20,5,"div",15)(33,me,2,0,"div",16),t()()()()()}if(p&2){let s=A(E(1,8,n.cancelledOrders$));r(2),C("text",n.filter().Number),r(10),h("multiple",!0),C("ngModel",n.filter().ListChannelID),r(5),C("date",n.filter().From),r(2),C("date",n.filter().To),r(4),C("ngModel",n.filter().PageNumber),r(4),C("ngModel",n.filter().PageSize),r(5),N((s==null?null:s.length)>0?32:33)}},dependencies:[J,ee,te,ie,Y,K,X,Q,U,ae,$,Z,le,re,ne,j,G,q],encapsulation:2});let d=m;return d})();export{Pe as CancelledComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as J}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as K}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as H,c as R,h as O,m as j,p as F}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as U}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as N,w as W,z as D}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as V,Ia as w,Nc as l,Oc as A,Rc as g,Sc as C,Tc as y,Uc as L,Vc as T,Wc as b,Z as k,ac as S,cc as x,hc as _,ic as i,id as P,jc as t,jd as B,kc as E,ob as c,ra as I,rc as v,wc as M,ya as m,yc as h,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function Y(n,a){if(n&1){let p=v();i(0,"input",30),y("ngModelChange",function(o){m(p);let e=h();return C(e.sku,o)||(e.sku=o),u(o)}),t()}if(n&2){let p=h();g("ngModel",p.sku)}}function q(n,a){if(n&1){let p=v();i(0,"input",31),y("ngModelChange",function(o){m(p);let e=h();return C(e.itemId,o)||(e.itemId=o),u(o)}),t()}if(n&2){let p=h();g("ngModel",p.itemId)}}function z(n,a){if(n&1&&(i(0,"pre",28),l(1),P(2,"json"),t()),n&2){h();let p=b(35);c(),A(B(2,1,p))}}function Q(n,a){n&1&&(i(0,"p",29),l(1," Your data will be shown here once it's available "),t())}var pe=(()=>{let a=class a{constructor(){this.httpService=I(U),this.selectedChannel=w(null),this.sku=w(null),this.itemId=w(null),this.searchBy="sku"}initProductLog(){let d={ChannelID:this.selectedChannel()};this.searchBy==="sku"?d.SKU=this.sku():d.ItemID=this.itemId(),this.productLog$=this.httpService.post(K.GetProductApiLog,d).pipe(k(1))}copyToClipboard(d){if(!d)return;let o=typeof d=="string"?d:JSON.stringify(d,null,2);navigator.clipboard.writeText(o),alert("Copied to clipboard!")}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=V({type:a,selectors:[["app-product-api"]],decls:50,vars:14,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"]],template:function(o,e){if(o&1){let s=v();i(0,"mainpanel",0)(1,"actions")(2,"button",1),M("click",function(){return m(s),u(e.initProductLog())}),E(3,"i",2),l(4," Search "),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),l(12,"Channel"),t(),i(13,"p",8),l(14," View logs related to Product API Detail "),t()(),i(15,"div",9)(16,"app-channel-options-v2",10),y("ngModelChange",function(r){return m(s),C(e.selectedChannel,r)||(e.selectedChannel=r),u(r)}),t()()(),i(17,"div",11)(18,"div",7)(19,"h6"),l(20,"Product Code / SKU"),t(),i(21,"p",8),l(22," Product SKU or Code from Channel Product "),t()(),i(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),y("ngModelChange",function(r){return m(s),C(e.searchBy,r)||(e.searchBy=r),u(r)}),t(),i(27,"label",15),l(28,"Search by SKU"),t()(),i(29,"div",13)(30,"input",16),y("ngModelChange",function(r){return m(s),C(e.searchBy,r)||(e.searchBy=r),u(r)}),t(),i(31,"label",17),l(32,"Search by ItemID"),t()()(),S(33,Y,1,1,"input",18),S(34,q,1,1,"input",19),t()()()(),L(35),P(36,"async"),i(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),l(42,"Response"),t(),i(43,"button",24),M("click",function(){m(s);let r=b(35);return u(e.copyToClipboard(r))}),l(44," Copy "),t()(),i(45,"div",25)(46,"div",26)(47,"div",27),S(48,z,3,3,"pre",28)(49,Q,2,0,"p",29),t()()()()()()()()()}if(o&2){_("hideSearchBox",!0)("hideSearchDropdown",!0),c(16),g("ngModel",e.selectedChannel),c(10),g("ngModel",e.searchBy),_("value","sku"),c(4),g("ngModel",e.searchBy),_("value","itemid"),c(3),x(e.searchBy==="sku"?33:-1),c(),x(e.searchBy==="itemid"?34:-1),c();let s=T(B(36,11,e.productLog$));c(8),_("disabled",!s),c(5),x(s?48:49)}},dependencies:[N,H,R,F,O,j,J,G,W,D],encapsulation:2});let n=a;return n})();export{pe as ProductApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as z,b as B}from"./chunk-VVNLTDLG.js";import{b as j}from"./chunk-OHAT7WXU.js";import{a as W,b as A,c as U}from"./chunk-JU4ZP3HI.js";import{a as P}from"./chunk-A6QXXKPR.js";import{la as N}from"./chunk-JTKEMQZT.js";import{h as D}from"./chunk-
|
|
1
|
+
import{a as z,b as B}from"./chunk-VVNLTDLG.js";import{b as j}from"./chunk-OHAT7WXU.js";import{a as W,b as A,c as U}from"./chunk-JU4ZP3HI.js";import{a as P}from"./chunk-A6QXXKPR.js";import{la as N}from"./chunk-JTKEMQZT.js";import{h as D}from"./chunk-YH3KWMUX.js";import{A as I,a as F,h as k,m as E}from"./chunk-6UM4NHOR.js";import{Hb as V,Lb as v,Nb as _,Nc as x,Oc as S,Rc as w,Sc as b,Tc as y,_c as O,ac as T,cc as L,hc as p,ic as c,jc as u,kc as g,mb as h,ob as m,ra as M,rc as f,ud as d,wc as C,ya as r,yc as a,za as s}from"./chunk-OHGMB7HJ.js";function G(n,o){if(n&1&&(c(0,"div",6),g(1,"img",7),c(2,"div"),x(3),u()()),n&2){let e=o.$implicit;m(),p("src",e.logo,h),m(2),S(e.Name)}}function R(n,o){if(n&1){let e=f();c(0,"p-multiselect",4,0),C("click",function(){r(e);let i=a();return s(i.onClickSelect())}),y("ngModelChange",function(i){r(e);let l=a();return b(l.selectedChannels,i)||(l.selectedChannels=i),s(i)}),C("ngModelChange",function(i){r(e);let l=a();return s(l.onChannelChange(i))}),_(2,G,4,2,"ng-template",5),u()}if(n&2){let e=a();p("options",e.options())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),p("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())}}function q(n,o){if(n&1&&(c(0,"div",6),g(1,"img",7),c(2,"div"),x(3),u()()),n&2){let e=o.$implicit;m(),p("src",e.logo,h),m(2),S(e.Name)}}function H(n,o){if(n&1){let e=f();c(0,"p-select",8,1),C("click",function(){r(e);let i=a();return s(i.onClickSelect())}),y("ngModelChange",function(i){r(e);let l=a();return b(l.selectedChannels,i)||(l.selectedChannels=i),s(i)}),C("ngModelChange",function(i){r(e);let l=a();return s(l.onChannelChange(i))}),_(2,q,4,2,"ng-template",5),u()}if(n&2){let e=a();p("options",e.options())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),p("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var re=(()=>{let o=class o extends U{constructor(){super(),this.authService=M(D),this.multiple=d(!1),this.clearable=d(!0),this.placeholder=d("Select Channels"),this.options=d(this.authService.getChannels()),this.maxSelectedLabels=d(6),this.onChange=t=>{}}onChannelChange(t){this.multiple()?t=t||[]:t=t||P.GuidEmpty,this.onChange(t)}onClickSelect(){this.initTopPosition(),setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(t){this.selectedChannels=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){}setDisabledState(t){}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=V({type:o,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],options:[1,"options"],maxSelectedLabels:[1,"maxSelectedLabels"]},features:[O([{provide:F,multi:!0,useExisting:o}]),v],decls:2,vars:1,consts:[["multiSelect",""],["select",""],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["pTemplate","item"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"]],template:function(i,l){i&1&&T(0,R,3,6,"p-multiselect",2)(1,H,3,6,"p-select",3),i&2&&L(l.multiple()?0:1)},dependencies:[B,z,N,j,I,k,E,A,W],encapsulation:2});let n=o;return n})();export{re as a};
|
|
@@ -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-QUIZLT5F.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-REDQ2L7Y.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-KHGTW7IV.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-J4552BMI.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-RQI26KZX.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-V7V5O62J.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-PRMV4INM.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{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-YH3KWMUX.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-PDIHZKEM.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-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as 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{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-FSLUPR5I.js";import{a as P}from"./chunk-L6CRWJ2O.js";import{a as se}from"./chunk-PV4OJSZI.js";import{a as le}from"./chunk-RQI26KZX.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-YH3KWMUX.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 ae,b as ce,d as pe}from"./chunk-BZWZ64N5.js";import{b as se}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{c as le}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ie}from"./chunk-ZSUWHVKX.js";import{h as te}from"./chunk-
|
|
1
|
+
import{a as ae,b as ce,d as pe}from"./chunk-BZWZ64N5.js";import{b as se}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{c as le}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ie}from"./chunk-ZSUWHVKX.js";import{h as te}from"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Z,c as ee}from"./chunk-NB2H6KA7.js";import{b as g,c as Q}from"./chunk-UPRDDI4K.js";import{A as re,h as ne,m as oe}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as X,e as Y}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{w as q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as B,Ic as E,Nb as u,Nc as c,Oc as h,Pc as H,Rc as T,Sc as O,Tc as P,Uc as z,Vc as J,Wc as j,Z as x,aa as I,ac as k,ad as G,cc as F,ea as D,ec as R,fc as K,gc as V,hc as m,ic as o,id as S,jc as l,jd as f,kc as W,ld as N,mb as U,ob as a,oc as $,pc as A,q as M,ra as _,rc as v,v as C,wc as b,ya as L,yc as p,za as y}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var me=t=>[t];function de(t,s){if(t&1&&(o(0,"span",14),W(1,"img",15),l(),o(2,"span"),c(3),l()),t&2){let r=s.item;a(),m("src",r.Img,U)("alt",r.Name),a(2),H(" ",r.Name," ")}}function ge(t,s){if(t&1){let r=v();$(0),z(1),S(2,"async"),o(3,"a",16),b("click",function(){L(r);let e=j(1),n=p();return y(n.submitLogistics(e))}),c(4,"Submit"),l(),A()}if(t&2){let r=p();a(),J(f(2,0,r.logisticServices$))}}function he(t,s){}function _e(t,s){if(t&1){let r=v();o(0,"ng-select",18),P("ngModelChange",function(e){L(r);let n=p(2).$implicit;return O(n.ProductSKU,e)||(n.ProductSKU=e),y(e)}),l()}if(t&2){let r=p(),i=p().$implicit;T("ngModel",i.ProductSKU),m("items",r)}}function ue(t,s){if(t&1&&(o(0,"span"),c(1),l()),t&2){let r=p(2).$implicit;a(),h(r.ProductSKU||"-")}}function Se(t,s){if(t&1&&u(0,he,0,0,"ng-template",17)(1,_e,1,2,"ng-template",null,0,N)(3,ue,2,1,"ng-template",null,1,N),t&2){let r=E(2),i=E(4),e=p(2);m("ngxPermissionsOnly",G(3,me,e.logisticEditRole))("ngxPermissionsOnlyThen",r)("ngxPermissionsOnlyElse",i)}}function fe(t,s){if(t&1&&(o(0,"tr")(1,"td"),c(2),l(),o(3,"td"),c(4),l(),o(5,"td"),c(6),l(),o(7,"td"),k(8,Se,5,5),S(9,"async"),l()()),t&2){let r,i=s.$implicit,e=p();a(2),h(i.Name),a(2),h(i.Service),a(2),h(i.TypeString),a(2),F((r=f(9,4,e.logisticOptions$))?8:-1,r)}}var Re=(()=>{let s=class s{constructor(){this.http=_(Y),this.toastr=_(X),this.authService=_(te),this.filter={ChannelID:""},this.logisticEditRole=ie.LogisticUpdate,this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let i=[g.WooCommerce,g.Lazada,g.Shopify,g.Plugo,g.Tokopedia];this.channelOptions=this.channelOptions.map(e=>(i.forEach(n=>{e.TypeID===n&&(e.disabled=!0)}),e))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(i=>{this.filter=i.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(x(1))}submitLogistics(i){this.clonedLogisticServices$.pipe(C(e=>i.map(n=>(e.findIndex(d=>d.Name===n.Name&&d.ProductSKU==n.ProductSKU)==-1&&(n.IsChange=!0),n))),I(e=>this.http.post("/api/Logistic/Submit",e))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(C(i=>i.map(e=>(e.ProductSKU=Q.IsEmpty(e.ProductSKU)?null:e.ProductSKU,e))),D(i=>{let e=JSON.parse(JSON.stringify(i));this.clonedLogisticServices$=M(e)}),x(1))}iniTitle(){let i=this.channelOptions.find(e=>e.ID==this.filter.ChannelID);this.channelName=i?i.Name:null}};s.\u0275fac=function(e){return new(e||s)},s.\u0275cmp=B({type:s,selectors:[["app-logistic"]],decls:29,vars:8,consts:[["thenBlock",""],["elseBlock",""],["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngxPermissionsOnly"],[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"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(e,n){e&1&&(o(0,"mainpanel",2),b("onSubmit",function(){return n.getLogisticService()}),o(1,"filters")(2,"div")(3,"label",3),c(4,"Select a Channel"),l(),o(5,"ng-select",4),P("ngModelChange",function(d){return O(n.filter.ChannelID,d)||(n.filter.ChannelID=d),d}),u(6,de,4,3,"ng-template",5),l()()(),o(7,"actions"),u(8,ge,5,3,"ng-container",6),l(),o(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"table",11)(15,"thead",12)(16,"tr",13)(17,"th"),c(18,"Logistic"),l(),o(19,"th"),c(20,"Service"),l(),o(21,"th"),c(22,"Type"),l(),o(23,"th"),c(24,"Logistic Service"),l()()(),o(25,"tbody"),K(26,fe,10,6,"tr",null,R),S(28,"async"),l()()()()()()()()),e&2&&(m("headerTitle","Logistic Courier - "+n.channelName)("hideSearchDropdown",!1),a(5),m("clearable",!1)("items",n.channelOptions),T("ngModel",n.filter.ChannelID),a(3),m("ngxPermissionsOnly",n.logisticEditRole),a(18),V(f(28,6,n.logisticServices$)))},dependencies:[se,pe,re,ne,oe,ae,ce,ee,Z,le,q],encapsulation:2});let t=s;return t})();export{Re as LogisticComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b,b as ct}from"./chunk-4GV67OQR.js";import"./chunk-BKR7YPEW.js";import{a as lt}from"./chunk-
|
|
1
|
+
import{a as b,b as ct}from"./chunk-4GV67OQR.js";import"./chunk-BKR7YPEW.js";import{a as lt}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as 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"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as at}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as ot,h as it,m as nt}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{e as tt,g as et}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as X,B as Z,q as Y,w as G,y as Q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as j,Hb as M,Ia as w,Mc as $,Nc as n,Oc as x,Pc as C,Qc as O,Rc as H,Sc as J,Tc as W,Uc as q,Z as P,_c as A,ac as f,ad as z,bd as K,cc as _,cd as U,dc as L,ec as k,fc as I,gc as N,hc as m,ic as e,id as v,jc as i,jd as D,kc as B,kd as V,mb as T,ob as l,ra as F,rc as R,v as E,wc as y,ya as p,yc as S,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var st=(t,o)=>({"bg-gradient-danger":t,"bg-gradient-warning":o}),dt=()=>["/menu/products/status/notificationV2/detailV2"],mt=t=>({ID:t}),pt=(t,o,a)=>({"text-warning":t,"text-success":o,"text-danger":a});function ut(t,o){t&1&&(e(0,"div"),n(1," Scan in progress. You will be notified once it is complete. "),i())}function ft(t,o){if(t&1&&(e(0,"div"),n(1),v(2,"number"),i()),t&2){let a=o.$implicit;l(),O(" ",a.Key,": ",D(2,2,a.Value)," ")}}function _t(t,o){if(t&1&&(e(0,"div",19)(1,"div",18),n(2,"Status Product:"),i(),I(3,ft,3,4,"div",null,L),i()),t&2){let a=S(2).$implicit;l(3),N(a.ParsedStatus)}}function St(t,o){if(t&1&&(e(0,"div",18),n(1),i(),e(2,"div"),n(3),i(),f(4,_t,5,0,"div",19)),t&2){let a=S().$implicit;l(),C(" ",a.ProcessLabel," "),l(2),x(a.ProcessDescription),l(),_(a!=null&&a.ParsedStatus&&(a==null||a.ParsedStatus==null?null:a.ParsedStatus.length)>0?4:-1)}}function Ct(t,o){if(t&1&&(n(0),v(1,"number"),e(2,"span"),n(3,"s"),i()),t&2){let a=S().$implicit;C(" ",V(1,1,a.DurationInSecond,"1.1-1")," ")}}function vt(t,o){t&1&&n(0," - ")}function xt(t,o){t&1&&n(0," In Progress ")}function gt(t,o){t&1&&n(0," Completed ")}function ht(t,o){t&1&&n(0," Failed ")}function It(t,o){if(t&1&&(e(0,"tr",12)(1,"td")(2,"a",15),n(3),i()(),e(4,"td")(5,"div",16),B(6,"img",17),e(7,"span"),n(8),i()()(),e(9,"td"),f(10,ut,2,0,"div")(11,St,5,3),i(),e(12,"td"),f(13,Ct,4,4)(14,vt,1,0),i(),e(15,"td")(16,"div",18),f(17,xt,1,0)(18,gt,1,0)(19,ht,1,0),i()(),e(20,"td",19)(21,"div"),n(22),i(),e(23,"div"),n(24),v(25,"date"),i()()()),t&2){let a,r=o.$implicit,c=S();m("ngClass",K(16,st,r.Status==1,r.Status==0)),l(2),m("routerLink",j(19,dt))("queryParams",z(20,mt,r.ID)),l(),C(" ",r.ID," "),l(3),m("src",r.Img,T),l(2),x(r.ChannelName),l(2),_(r.StateID==c.scanState.InProgress?10:11),l(3),_(r.DurationInSecond?13:14),l(3),$(U(22,pt,r.StateID==c.scanState.InProgress,r.StateID==c.scanState.Completed,r.StateID==c.scanState.Failed)),l(),_((a=r.StateID)===c.scanState.InProgress?17:a===c.scanState.Completed?18:a===c.scanState.Failed?19:-1),l(5),x(r.LoginID),l(2),C(" ",V(25,13,r.Created,"dd MMM yyyy HH:mm")," ")}}var Ot=(()=>{let o=class o{constructor(){this.notificationService=F(b),this.filter=w({RowCount:20,PageNumber:1,ChannelID:null}),this.scanState=ct,this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotificationList(this.filter()).pipe(E(r=>(r.Data=r.Data.map(c=>(c.StatusProduct&&(c.ParsedStatus=JSON.parse(c.StatusProduct)),c)),r)),P(1))}onFilter(){this.initNotifications()}};o.\u0275fac=function(c){return new(c||o)},o.\u0275cmp=M({type:o,selectors:[["app-notificationV2"]],features:[A([b])],decls:37,vars:8,consts:[["headerTitle","Notification",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/notification",1,"btn","btn-outline-secondary","btn-lg"],[1,"fw-bold","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"],[2,"width","260px"],[3,"ngClass"],[1,"col-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","gap-3"],[1,"channelLogo-md",3,"src","alt"],[1,"fw-bold"],[1,"lh-base"]],template:function(c,d){if(c&1){let s=R();q(0),v(1,"async"),e(2,"mainpanel",0),y("onSubmit",function(){return p(s),u(d.onFilter())}),e(3,"actions")(4,"a",1),n(5," Scan Job "),i()(),e(6,"filters")(7,"div")(8,"label",2),n(9,"Channel"),i(),e(10,"app-channel-options-v2",3),W("ngModelChange",function(h){return p(s),J(d.filter().ChannelID,h)||(d.filter().ChannelID=h),u(h)}),i()()(),e(11,"content")(12,"div",4)(13,"div",5)(14,"div",6)(15,"div",7)(16,"table",8)(17,"thead",9)(18,"tr",10)(19,"th",11),n(20,"Job ID"),i(),e(21,"th"),n(22,"Channel"),i(),e(23,"th"),n(24,"Process"),i(),e(25,"th"),n(26,"Duration"),i(),e(27,"th"),n(28,"Status"),i(),e(29,"th"),n(30,"Creator"),i()()(),e(31,"tbody"),I(32,It,26,26,"tr",12,k),i()()()()(),e(34,"div",5)(35,"div",13)(36,"app-custom-paginator",14),y("next",function(){return p(s),u(d.initNotifications())})("previous",function(){return p(s),u(d.initNotifications())}),i()()()()()()}if(c&2){let s=D(1,6,d.notifications$);l(2),m("hideSearchBox",!0),l(8),H("ngModel",d.filter().ChannelID),l(22),N(s==null?null:s.Data),l(4),m("filter",d.filter())("totaldata",s==null||s.Data==null?null:s.Data.length)("paginationTotal",s==null?null:s.Count)("hasClicked",!0)}},dependencies:[Z,Y,ot,it,nt,at,rt,et,tt,lt,G,X,Q],encapsulation:2});let t=o;return t})();export{Ot as NotificationV2Component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as P,b as v}from"./chunk-
|
|
1
|
+
import{a as P,b as v}from"./chunk-PRMV4INM.js";import{h as I}from"./chunk-YH3KWMUX.js";import{a as f}from"./chunk-AGBJEXIM.js";import{c as i}from"./chunk-UPRDDI4K.js";import{b as m,e as g}from"./chunk-D6JH2KV4.js";import{J as h,ea as l,ma as C,qa as u,r as c,ra as S}from"./chunk-OHGMB7HJ.js";var R=(()=>{let o=class o{constructor(t,e,n){this.httpService=t,this.toastrService=e,this.notificationService=n,this.authService=S(I),this.scanChannelToastr=S(P),this.channelOptions=this.authService.getChannels()}loader(t=i.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:t})}LoadInPOS(t=i.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:t})}filterChannelByTypeId(t,e){return t.filter(n=>e.findIndex(a=>n.TypeID==a)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(t){let e={ID:t};return this.httpService.post("/api/product/TotalProductLive",e)}clearCacheChannel(t){let e={ID:t};return this.httpService.post("/api/Channel/ClearCacheChannel",e)}detachProduct(t){return this.httpService.post("/api/product/Detach",t)}uploadSingleProduct(t,e){let n={Channel:e,Products:t};return this.httpService.post("api/product/UploadMultipleChannel",n).pipe(l(a=>{this.showToastrSuccessUploadSingle(a,t[0])}),h(a=>(this.showToastErrorUploadSingle(a,t[0]),c(()=>new Error(a)))))}uploadMultipleProduct(t,e){let n={Channel:e,Products:t};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",n).pipe(l(a=>{this.showToastrUploadMultiple(a.Message)}),h(a=>(this.showToastrUploadMultiple(a.error?.Message),c(()=>new Error(a)))))}uploadNotInChannel(t,e){let n={Products:t,Channel:e};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",n).pipe(l(a=>{this.showToastrUploadMultiple(a)}),h(a=>(this.showToastrUploadMultiple(a.error?.Message),c(()=>new Error(a)))))}scanSingle(t,e){let n={ID:t,SKU:e};return this.httpService.post("/api/product/ScanSingle",n)}scanNotInChannel(t){let e={ID:t};return this.httpService.post("/api/product/ScanNotinChannel",e)}findAllSoldInChannel(t){return this.httpService.post("/api/product/GetSoldInChannel",t)}scanAll(t,e,n,a=!1){let s={ID:t,ScanFull:e,UpdatedProduct:n,Async:a};return this.httpService.post("/api/product/ScanOptimized",s)}scanAsyncProductV2(t,e,n){let a={ID:t,ScanFull:e,UpdatedProduct:n,Async:!0};return this.httpService.post(f.ScanAsyncProductV2,a).pipe(l(s=>{this.notificationService.subscribeToJobGroup(s.JobID)}))}scanSyncProductV2(t,e,n){let a={ID:t,ScanFull:e,UpdatedProduct:n,Async:!1};return this.httpService.post(f.ScanSyncProductV2,a)}scanProductV2(t,e,n,a=!1){let s=this.findChannelById(t,this.channelOptions);return a?this.scanAsyncProductV2(t,e,n).pipe(l(r=>{this.scanChannelToastr.showToast({text:"Scan Job Started",detail:`JobID: ${r.JobID}`,severity:"info",data:{channelName:s.Name,channelTypeId:s.TypeID,jobId:r.JobID}})})):this.scanSyncProductV2(t,e,n).pipe(l(r=>{this.successToastrScanAllProduct(r,s,!n)}))}scanCompareToPos(t){return this.httpService.post("/api/product/CompareMarketplaceToPOS",t)}getVariantCodesProduct(t){return(t.Variants||[]).map(a=>a.Code)}downloadMultipleProduct(t){let e=t.map(n=>({ChannelItemID:n.ChannelItemID,ChannelID:n.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",e).pipe(l(n=>{this.toastrService.success(`${n.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(t){let e={ChannelItemID:t.ChannelItemID,ChannelID:t.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",e).pipe(l(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(t=[]){let e=[];return t.forEach(n=>{n.Variants.forEach(a=>{e=[...e,a.Code]})}),e}filterUnselectedChannel(t,e){let n=[];t.forEach(s=>{n=[...n,...s.Channel]});let a;if(!n||n.length==0)a=e;else{let s=[];a=e.filter(r=>(s=n.filter(d=>d.ChannelID==r.ID),s.length!==t.length))}return a}findChannelById(t,e){return e.find(n=>n.ID==t)}sortChannel(t=[]){return t.sort((e,n)=>e.TypeID<n.TypeID?1:e.TypeID===n.TypeID?0:-1)}hasSelection(t=[]){return this.selectedProduct(t).length>0}selectedProduct(t=[]){return t.filter(e=>e.selected)}hasSelectionVariant(t){return this.selectedVariantProduct(t).length>0}selectedVariantProduct(t){let e=[];return t.forEach(n=>{e=[...e,...n.Variants!=null?n.Variants.filter(a=>a.selected):""]}),e}getChannelProduct(t){let e=t.Variants||[],n=[];for(let a of e)if(a.Channel!=null)for(let s of a.Channel)n.filter(r=>r.ChannelID==s.ChannelID).length==0&&n.push(s);return this.sortChannel(n)}successToastrScanAllProduct(t,e,n){let a=t.InChannel?t?.InChannel?.Product:0,s=t?.NotInPOS?.Product?t?.NotInPOS?.Product:0,r=i.IsNotEmpty(t.LastUpdate)?i.convertToReadableDate(t.LastUpdate):null;n?this.toastrService.success(`
|
|
2
2
|
${s+a} product updates in ${e.Name} </br>
|
|
3
3
|
(${a} In Channel + ${s} Not In Pos)
|
|
4
4
|
${i.IsNotEmpty(r)?"since "+r:""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-PDIHZKEM.js";import{a as d,b as u}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c,g as s}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as r,hc as p,ic as l,jc as m,kc as o,ob as i}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var h=(()=>{let t=class t{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"}]}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=r({type:t,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,f){n&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),m()()(),o(4,"router-outlet")),n&2&&(i(3),p("Tabs",f.priceTabs))},dependencies:[u,d,s,c],encapsulation:2});let e=t;return e})();var x=[{path:"",component:h,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-BQFOS7WM.js").then(e=>e.PricePosChannelComponent)},canActivate:[a],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-W4GP3QI7.js").then(e=>e.PriceSingleChannelComponent)},canActivate:[a],data:{title:"Price Single Channel Comparison"}}]}];export{x as routes};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Pt,b as _t,d as Ci}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import{a as si}from"./chunk-FSOZOROI.js";import{b as bt}from"./chunk-VYI7JYH5.js";import{a as pi}from"./chunk-OH5T7D7O.js";import{a as bi}from"./chunk-TQROQOXU.js";import{a as wi}from"./chunk-
|
|
1
|
+
import{a as Pt,b as _t,d as Ci}from"./chunk-PUSOOHGT.js";import"./chunk-ET33HPF3.js";import{a as si}from"./chunk-FSOZOROI.js";import{b as bt}from"./chunk-VYI7JYH5.js";import{a as pi}from"./chunk-OH5T7D7O.js";import{a as bi}from"./chunk-TQROQOXU.js";import{a as wi}from"./chunk-RQI26KZX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import{a as _i,b as yi}from"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as gi,b as fi}from"./chunk-JU4ZP3HI.js";import{a as li}from"./chunk-3T5VLB63.js";import{d as ft,e as Bt}from"./chunk-STOW2RQN.js";import{a as di}from"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import{a as We,b as hi,c as mi}from"./chunk-KOUB5HRK.js";import{a as Qe}from"./chunk-QETZ5VDX.js";import{a as gt,d as ci,e as ui}from"./chunk-WIRXMAIF.js";import{b as Ke}from"./chunk-S22I47XG.js";import{a as K}from"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import{a as M,e as F,f as ri}from"./chunk-C4MTEDSW.js";import{b as Y,c as pe,d as Ae,e as A,f as ue}from"./chunk-JMRRXRKO.js";import{b as ai}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{G as ei,U as ht,V as qe,ea as ti,fa as Ft,ga as Lt,ia as ii,la as ie,ma as q,ua as ce}from"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as ni}from"./chunk-ZSUWHVKX.js";import{h as Yt}from"./chunk-YH3KWMUX.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as Zt,c as Xt}from"./chunk-NB2H6KA7.js";import{c as Dt}from"./chunk-UPRDDI4K.js";import{A as we,a as Ie,b as oi,g as mt,h as Ne,m as He}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as Wt,e as Jt}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as qt,B as ne,D as Oe,q as Ve,s as pt,t as Le,u as ut,v as be,w as jt}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as Mt,Aa as S,Ab as ke,Bc as v,Ca as tt,Cc as ae,Dc as b,Ec as _,Fd as T,Gd as Z,Hb as I,Ia as it,Ib as le,Ic as lt,Jb as Rt,Jc as Re,K as kt,Lb as E,Lc as ze,Mb as se,Mc as C,Nb as p,Nc as V,Oc as $e,Pa as x,Pc as te,Rc as Me,Sc as De,Tc as Fe,Z as et,_b as D,_c as oe,ac as me,ad as G,bd as Se,cc as ge,dc as Ut,dd as st,ea as Ue,ed as dt,f as Pe,fc as at,fd as je,gc as rt,gd as $t,hc as l,ic as h,id as Te,jc as m,jd as ve,kc as B,la as xe,lc as U,ld as ye,ma as ee,mb as nt,mc as $,na as re,nc as L,ob as s,oc as O,pa as de,pc as N,pd as ct,qc as k,ra as z,rc as H,sc as X,tb as R,ub as ot,ud as fe,v as Gt,wc as P,ya as y,yc as c,za as w}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as Be,b as Ge}from"./chunk-66YHNWRR.js";var Ti=`
|
|
2
2
|
.p-datatable {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: block;
|