marketplacepos 2.7.8 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/213.cb4351cfb44ca3bf.js +1 -0
- package/Marketplace/277.e644e3531765ce65.js +1 -0
- package/Marketplace/360.8279e3b4ceab63e1.js +1 -0
- package/Marketplace/369.b5bcb467b3ca04c8.js +1 -0
- package/Marketplace/392.f4537160149f627a.js +1 -0
- package/Marketplace/397.55fafd1d8945185c.js +1 -0
- package/Marketplace/3rdpartylicenses.txt +587 -0
- package/Marketplace/408.b53797a5bda9f7f8.js +1 -0
- package/Marketplace/46.67982fb195b43a4d.js +1 -0
- package/Marketplace/501.7645c32a140dd7f8.js +1 -0
- package/Marketplace/512.6ddd3191d13695a8.js +1 -0
- package/Marketplace/53.7e8bb7325980dfd5.js +1 -0
- package/Marketplace/545.4809f373cc63f3b4.js +1 -0
- package/Marketplace/655.09b1b17f23a59b7e.js +1 -0
- package/Marketplace/717.2e5a78cf17e9bed1.js +1 -0
- package/Marketplace/718.78930b2d3e9fc2bd.js +1 -0
- package/Marketplace/72.a5fd86c341c782ab.js +1 -0
- package/Marketplace/739.0de1f18deac0ed90.js +1 -0
- package/Marketplace/82.fecf4fa3a3743326.js +1 -0
- package/Marketplace/859.b43bda3adda95fa3.js +1 -0
- package/Marketplace/87.0c53ec1547d4d5d5.js +1 -0
- package/Marketplace/874.7662257927081a57.js +1 -0
- package/Marketplace/877.7e5f8104980e0168.js +1 -0
- package/Marketplace/884.45404dc14d1585a7.js +1 -0
- package/Marketplace/913.6b5b3db030c3bc49.js +1 -0
- package/Marketplace/970.7c36426f4bcc50cb.js +1 -0
- package/Marketplace/993.5c22ca4b00b8c459.js +1 -0
- package/Marketplace/997.08e3f8cf0bafff67.js +1 -0
- package/Marketplace/common.df21aa97084954ce.js +1 -0
- package/Marketplace/favicon.ico +0 -0
- package/Marketplace/index.html +22 -0
- package/Marketplace/main.c27e23d32d8dc713.js +1 -0
- package/Marketplace/polyfills.bee3c4d96e890990.js +1 -0
- package/Marketplace/runtime.447f149bd5bc7630.js +1 -0
- package/Marketplace/scripts.b7cebc1258dbcca8.js +1 -0
- package/Marketplace/styles.97105d62c44869cb.css +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[213],{8231:(A,I,s)=>{s.d(I,{j:()=>m});var S=s(5412),g=s(1889),c=s(9694),D=s(6779),t=s(4650),f=s(284),P=s(6895),e=s(4006),n=s(1948),a=s(9549),l=s(4385),r=s(3238),d=s(266),_=s(6401);function E(h,i){if(1&h&&(t.TgZ(0,"mat-option",9)(1,"div",10),t._UZ(2,"img",11),t.TgZ(3,"span"),t._uU(4),t.qZA()()()),2&h){const o=i.$implicit;t.Q6J("value",o.ID)("disabled",o.disabled),t.xp6(1),t.Q6J("matTooltip",o.disabled?"Single Product Scan disabled for this type of Channel":null),t.xp6(1),t.Q6J("src",o.Img,t.LSH),t.xp6(2),t.Oqu(o.Name)}}function O(h,i){if(1&h){const o=t.EpF();t.TgZ(0,"div")(1,"h5",12),t._uU(2,"Scan Type"),t.qZA(),t.TgZ(3,"mat-radio-group",13),t.NdJ("ngModelChange",function(p){t.CHM(o);const C=t.oxw();return t.KtG(C.filter.ScanFull=p)}),t.TgZ(4,"mat-radio-button",14),t._uU(5," Full (Include Inactive Products) "),t.qZA(),t.TgZ(6,"mat-radio-button",15),t._uU(7," Active "),t.qZA()()()}if(2&h){const o=t.oxw();t.xp6(3),t.Q6J("ngModel",o.filter.ScanFull),t.xp6(1),t.Q6J("value",!0),t.xp6(2),t.Q6J("value",!1)}}function T(h,i){if(1&h){const o=t.EpF();t.TgZ(0,"div",16)(1,"h5",3),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"mat-radio-group",17),t.NdJ("ngModelChange",function(p){t.CHM(o);const C=t.oxw();return t.KtG(C.filter.UpdatedProduct=p)}),t.TgZ(5,"mat-radio-button",18),t._uU(6," Scan All Products "),t.qZA(),t.TgZ(7,"mat-radio-button",19),t._uU(8," Scan Updated Products "),t.qZA()()()}if(2&h){const o=t.oxw();t.xp6(2),t.hij(" Last Scan: ",t.xi3(3,4,o.selectedChannel.LastSync,"dd MMMM yyyy HH:mm")," "),t.xp6(2),t.Q6J("ngModel",o.filter.UpdatedProduct),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0)}}function U(h,i){if(1&h){const o=t.EpF();t.TgZ(0,"div",16)(1,"h5",3),t._uU(2," Scan Option "),t.qZA(),t.TgZ(3,"mat-radio-group",20),t.NdJ("ngModelChange",function(p){t.CHM(o);const C=t.oxw();return t.KtG(C.filter.Async=p)}),t.TgZ(4,"mat-radio-button",21),t._uU(5," Asynchronous (Get Notified when Complete) "),t.qZA(),t.TgZ(6,"mat-radio-button",22),t._uU(7," Synchronous (Wait until Complete) "),t.qZA()()()}if(2&h){const o=t.oxw();t.xp6(3),t.Q6J("ngModel",o.filter.Async),t.xp6(1),t.Q6J("value",!0),t.xp6(2),t.Q6J("value",!1)}}class m{constructor(i,o,u){this.dialogRef=i,this.data=o,this.router=u,this.channelType=c.x,this.disabledChannelOption=!1,this.filter={ChannelID:g.g.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=!!g.g.IsNotEmpty(o.isSingleChannel)&&this.data.isSingleChannel,this.disabledChannelOption=!g.g.IsEmpty(o.disabledChannelOption)&&this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new D.O,this.modalConfig.title="Scan Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID,this.filter.ScanFull=!1,1==this.channelOptions.length&&(this.filter.ChannelID=this.data.channelOptions[0].ID,this.selectedChannel=this.data.channelOptions[0])}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(i=>(i.disabled=!0,(i.TypeID==c.x.Tiktok||i.TypeID==c.x.Tokopedia||i.TypeID==c.x.Lazada)&&(i.disabled=!1),i)).sort(i=>i.disabled?1:-1))}onSelectChannel(i){let o=this.filterChannelById(i);this.selectedChannel=1==this.channelOptions.length?this.channelOptions[0]:o,this.filter.Async=!0,o&&o.TypeID==c.x.Tokopedia?(this.filter.ScanFull=!0,this.isTokopedia=!0):(this.filter.ScanFull=!1,this.isTokopedia=!1),this.iniHasScanUpdate(),this.setDefaultConfigUpdate()}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&g.g.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==c.x.ShopeeV2||this.selectedChannel.TypeID==c.x.Tiktok||this.selectedChannel.TypeID==c.x.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.hasScanUpdate=!(this.selectedChannel?.TypeID==c.x.WooCommerce||this.selectedChannel?.TypeID==c.x.KalCare||this.selectedChannel?.TypeID==c.x.None||!g.g.IsNotEmpty(this.selectedChannel?.LastSync)||this.isSingleChannel)}filterChannelById(i){let o;return this.channelOptions&&(o=this.channelOptions.find(u=>u.ID==i)),o}submit(){this.selectedChannel.TypeID==c.x.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):(this.beforeSubmit(),this.dialogRef.close(this.filter))}beforeSubmit(){this.filter.UpdatedProduct&&(this.filter.Async=!1)}isNotEmpty(i){return g.g.IsNotEmpty(i)}onClose(){this.dialogRef.close()}}m.\u0275fac=function(i){return new(i||m)(t.Y36(S.so),t.Y36(S.WI),t.Y36(f.F0))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-scan-dialog"]],decls:11,vars:8,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"mx-4"],[1,"mb-3","fw-normal"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"disabled","ngModel","ngModelChange"],["class","channel-option",3,"value","disabled",4,"ngFor","ngForOf"],[4,"ngIf"],["class","mt-8",4,"ngIf"],[1,"channel-option",3,"value","disabled"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mb-3","fw-normal","mt-3"],["name","scanType",1,"form-control","h-100","round",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],[1,"mt-8"],["name","ScanFull",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan only products that have been updated since the last channel scan",1,"me-5",3,"value"],["name","Async",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(i,o){1&i&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.submit()})("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()}),t.TgZ(1,"div",1)(2,"div",2)(3,"h5",3),t._uU(4,"Select a Channel"),t.qZA(),t.TgZ(5,"mat-form-field",4)(6,"mat-select",5),t.NdJ("ngModelChange",function(p){return o.filter.ChannelID=p})("ngModelChange",function(p){return o.onSelectChannel(p)}),t.YNc(7,E,5,5,"mat-option",6),t.qZA()(),t.YNc(8,O,8,3,"div",7),t.YNc(9,T,9,7,"div",8),t.YNc(10,U,8,3,"div",8),t.qZA()()()),2&i&&(t.Q6J("dynamicValidated",o.isNotEmpty(o.filter.ChannelID))("config",o.modalConfig),t.xp6(6),t.Q6J("disabled",o.disabledChannelOption)("ngModel",o.filter.ChannelID),t.xp6(1),t.Q6J("ngForOf",o.channelOptions),t.xp6(1),t.Q6J("ngIf",!o.isSingleChannel&&!o.isTokopedia&&o.isNotEmpty(o.filter.ChannelID)),t.xp6(1),t.Q6J("ngIf",o.hasScanUpdate),t.xp6(1),t.Q6J("ngIf",!(null!=o.filter&&o.filter.UpdatedProduct)&&!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)))},dependencies:[P.sg,P.O5,e.JJ,e.On,n.VQ,n.U0,a.KE,l.gD,r.ey,d.gM,_.M,P.uU],encapsulation:2})},9425:(A,I,s)=>{s.d(I,{b:()=>m});var S=s(1135),g=s(7579),c=s(2722),D=s(9300),t=s(4351),f=s(4004),P=s(4482),e=s(5403),n=s(8421),a=s(4671),l=s(5032),r=s(3269),_=s(5026),E=s(8505),O=s(4782),T=s(4650),U=s(1318);class m{constructor(i){this.http=i,this.pagination$=new S.X(null),this.destroy$=new g.x,this.data$=this.paginationFunction()}onNextPage(i){i.PageNumber+=1,this.pagination$.next(i)}setPageNumberFooter(i){this.footerPageNumber=i.PageNumber}setPaginationButtonState(i,o){this.disableNextButton=0==o||!(o<i.RowCount*i.PageNumber)}resetToFirstPage(i){i.PageNumber=1,this.pagination$.next(i),this.hideCount=!0,this.goToLastPage=!1}getAllData(i,o){i.RowCount=o,this.pagination$.next(i),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new S.X(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe((0,c.R)(this.destroy$),(0,D.h)(i=>null!=i),(0,t.b)(i=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(i)).pipe((0,f.U)(o=>o.Data))),function d(...h){const i=(0,r.jO)(h);return(0,P.e)((o,u)=>{const p=h.length,C=new Array(p);let M=h.map(()=>!1),N=!1;for(let v=0;v<p;v++)(0,n.Xf)(h[v]).subscribe((0,e.x)(u,y=>{C[v]=y,!N&&!M[v]&&(M[v]=!0,(N=M.every(a.y))&&(M=null))},l.Z));o.subscribe((0,e.x)(u,v=>{if(N){const y=[v,...C];u.next(i?i(...y):y)}}))})}(this.pagination$),(0,_.R)((i,o)=>{const[u,p]=i,[C]=o;return 1==p.PageNumber?[C,p]:[u.concat(C),p]}),(0,E.b)(([i,o])=>{this.setPageNumberFooter(o),this.setPaginationButtonState(o,i.length)}),(0,f.U)(([i])=>i),(0,O.d)())}}m.\u0275fac=function(i){return new(i||m)(T.LFG(U.O))},m.\u0275prov=T.Yz7({token:m,factory:m.\u0275fac,providedIn:"root"})},6082:(A,I,s)=>{s.d(I,{M:()=>f});var S=s(8505),g=s(1889),c=s(4650),D=s(1318),t=s(7185);class f{constructor(e,n){this.httpService=e,this.toastrService=n}loader(e=g.g.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:e})}LoadInPOS(e=g.g.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:e})}filterChannelByTypeId(e,n){return e.filter(a=>-1!==n.findIndex(l=>a.TypeID==l))}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(e){return this.httpService.post("/api/product/TotalProductLive",{ID:e})}clearCacheChannel(e){return this.httpService.post("/api/Channel/ClearCacheChannel",{ID:e})}uploadSingleProduct(e,n){return this.httpService.post("api/product/UploadMultipleChannel",{Channel:n,Products:e})}uploadMultipleProduct(e,n){return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",{Channel:n,Products:e})}scanSingle(e,n){return this.httpService.post("/api/product/ScanSingle",{ID:e,SKU:n})}scanNotInChannel(e){return this.httpService.post("/api/product/ScanNotinChannel",{ID:e})}findAllSoldInChannel(e){return this.httpService.post("/api/product/GetSoldInChannel",e)}scanAll(e,n,a,l=!1){return this.httpService.post("/api/product/ScanOptimized",{ID:e,ScanFull:n,UpdatedProduct:a,Async:l})}scanCompareToPos(e){return this.httpService.post("/api/product/CompareMarketplaceToPOS",e)}getVariantCodesProduct(e){return e.Variants.map(a=>a.Code)}downloadMultipleProduct(e){let n=e.map(a=>({ChannelItemID:a.ChannelItemID,ChannelID:a.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",n).pipe((0,S.b)(a=>{this.toastrService.success(`${a.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(e){return this.httpService.post("/api/product/DownloadProductFromChannel",{ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID}).pipe((0,S.b)(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(e=[]){let n=[];return e.forEach(a=>{a.Variants.forEach(l=>{n=[...n,l.Code]})}),n}filterUnselectedChannel(e,n){let l,a=[];if(e.forEach(r=>{a=[...a,...r.Channel]}),a&&0!=a.length){let r=[];l=n.filter(d=>(r=a.filter(_=>_.ChannelID==d.ID),r.length!==e.length))}else l=n;return l}findChannelById(e,n){return n.find(a=>a.ID==e)}sortChannel(e=[]){return e.sort((n,a)=>n.TypeID<a.TypeID?1:n.TypeID===a.TypeID?0:-1)}hasSelection(e=[]){return this.selectedProduct(e).length>0}selectedProduct(e=[]){return e.filter(n=>n.selected)}hasSelectionVariant(e){return this.selectedVariantProduct(e).length>0}selectedVariantProduct(e){let n=[];return e.forEach(a=>{n=[...n,...null!=a.Variants?a.Variants.filter(l=>l.selected):""]}),n}getChannelProduct(e){const n=e.Variants;let a=[];for(let l of n)if(null!=l.Channel)for(let r of l.Channel)0==a.filter(d=>d.ChannelID==r.ChannelID).length&&a.push(r);return this.sortChannel(a)}successToastrScanAllProduct(e,n,a){if(a){const l=e?.NotInPOS?.Product?e?.NotInPOS?.Product:0,r=e?.InChannel?.Product?e?.InChannel?.Product:0;this.toastrService.success(`\n ${l+r} found in ${n.Name} </br>\n (${r} In POS + ${l} Not In Pos)\n `,"Scan Complete!",{enableHtml:!0})}else this.toastrService.success(`${e.InChannel?e.InChannel.Product:0} product updates in ${n.Name} </br> \n since ${e.LastUpdate}`,"Scan Complete!",{enableHtml:!0})}checkProductHasScanButton(e,n){let a;return e.map(l=>(l.Channel=this.getChannelProduct(l),a=this.filterUnselectedChannel([l],n),l.hasScan=a.length>0,l))}checkProductHasUploadBtn(e,n){let a;return e.map(l=>(l.Channel=this.getChannelProduct(l),a=this.filterUnselectedChannel([l],n),l.hasUpload=a.length>0,l))}showToastrUploadMultiple(e=[]){let n=[],a=[];if(e.forEach(l=>{"string"==typeof l?.Response?a=[...a,`<li>${l.Response}</li>`]:(l?.Response?.Success.forEach(r=>{n=[...n,`<li>Product ${r} was <b>successfully</b> uploaded to ${l.Name}</li>`]}),l?.Response.Fail.forEach(r=>{a=[...a,`<li>${r}</li>`]}))}),a.length>0&&n.length>0){const l=[...n,...a];this.toastrService.warning(this.concatMessage(l),"Warning!",{enableHtml:!0})}else n.length>0&&0==a.length?this.toastrService.success(this.concatMessage(n),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(a),"Error",{enableHtml:!0})}concatMessage(e=[]){let n="";return e.forEach(a=>{n+=a}),`<ol>${n}</ol>`}showToastrSuccessUploadSingle(e,n){let a=e.filter(d=>0==d.Status),l=e.filter(d=>1==d.Status),r=this.generateToastrMessage(a,l,n);this.toastrService.success(r.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(e,n){let a=e?.error?.Message.filter(d=>0==d.Status),l=e?.error?.Message.filter(d=>1==d.Status),r=this.generateToastrMessage(a,l,n);"WARNING"==r.status?this.toastrService.warning(r.message,"Warning!",{enableHtml:!0}):this.toastrService.error(r.message,`Error - ${e.status}`,{enableHtml:!0})}generateToastrMessage(e,n,a){let r,l="";return 0==e.length&&n.length>0?(r="SUCCESS",l=this.createSuccessResponse(n,a)):e.length>0&&0==n.length?(r="ERROR",l=this.createErrResponse(e,a)):(r="WARNING",l=`${this.createSuccessResponse(n,a)} ${this.createErrResponse(e,a)}`),l=`<ol>${l}</ol>`,{status:r,message:l}}createErrResponse(e,n){let a="";return e.forEach((l,r)=>{a+=`<li><b>${l.Response}</b> for ${n.Name} in ${l.Name}</li>`}),a}createSuccessResponse(e,n){let a="";return e.forEach((l,r)=>{a+=`<li>Product ${n.Name} was <b>successfully</b> uploaded to ${l.Name}</li>`}),a}getHostName(){if(g.g.IsEmpty(this.hostName)){const e=localStorage.getItem("Authorization");this.hostName=JSON.parse(e)?.Host}return this.hostName}}f.\u0275fac=function(e){return new(e||f)(c.LFG(D.O),c.LFG(t._W))},f.\u0275prov=c.Yz7({token:f,factory:f.\u0275fac,providedIn:"root"})}}]);
|