marketplacepos 2.9.4 → 2.9.6

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.
Files changed (70) hide show
  1. package/Marketplace/103.bd9a1f982b50e346.js +1 -0
  2. package/Marketplace/168.f88b133ecbdcb96a.js +1 -0
  3. package/Marketplace/231.0c7ab993977632a2.js +1 -0
  4. package/Marketplace/257.d1592e885695ba4b.js +1 -0
  5. package/Marketplace/278.e89610409641d910.js +1 -0
  6. package/Marketplace/296.93310f70e5f9d3a9.js +1 -0
  7. package/Marketplace/299.86cba892502ce6e4.js +1 -0
  8. package/Marketplace/307.f56ec0946ec944b7.js +1 -0
  9. package/Marketplace/311.17b5fcab2ef01d3f.js +1 -0
  10. package/Marketplace/389.f73b3c5db7bdf654.js +1 -0
  11. package/Marketplace/3rdpartylicenses.txt +1 -1
  12. package/Marketplace/445.8f1497373c95bb64.js +1 -0
  13. package/Marketplace/452.12b65c3c6f144b7e.js +1 -0
  14. package/Marketplace/476.d08ef7b92327904d.js +1 -0
  15. package/Marketplace/478.348a0f1d9f25448d.js +1 -0
  16. package/Marketplace/500.c2e6963e4771761e.js +1 -0
  17. package/Marketplace/527.e23646167d384e97.js +1 -0
  18. package/Marketplace/556.5d624cfb73f161b2.js +1 -0
  19. package/Marketplace/56.0432dfcbb3e04e39.js +1 -0
  20. package/Marketplace/599.8de0c2b4c7af0f9d.js +1 -0
  21. package/Marketplace/617.4db1b737553fe58b.js +1 -0
  22. package/Marketplace/62.4f9a8ca2692bdd97.js +1 -0
  23. package/Marketplace/671.8d5ec5d95df1c8e5.js +1 -0
  24. package/Marketplace/699.e1f8489991913e8e.js +1 -0
  25. package/Marketplace/726.318498721a0c771c.js +1 -0
  26. package/Marketplace/810.af61302495e16f98.js +1 -0
  27. package/Marketplace/877.bbdea3b04cc75780.js +1 -0
  28. package/Marketplace/900.f4171c8753af159f.js +1 -0
  29. package/Marketplace/967.2b39f548c7f4eb30.js +1 -0
  30. package/Marketplace/common.91711b840b02b984.js +1 -0
  31. package/Marketplace/index.html +6 -5
  32. package/Marketplace/main.e646f758e999bb20.js +1 -0
  33. package/Marketplace/polyfills.503b3f4bf922d237.js +1 -0
  34. package/Marketplace/runtime.2e7e4ee8428d338f.js +1 -0
  35. package/Marketplace/scripts.3e75d50128144df1.js +1 -0
  36. package/Marketplace/styles.7f496be7a7c4b295.css +19 -0
  37. package/package.json +1 -1
  38. package/Marketplace/213.73aa99e3f8dc5caa.js +0 -1
  39. package/Marketplace/277.e644e3531765ce65.js +0 -1
  40. package/Marketplace/360.8279e3b4ceab63e1.js +0 -1
  41. package/Marketplace/369.881799be1b0c0cd7.js +0 -1
  42. package/Marketplace/379.aad8784dbdb3dd33.js +0 -1
  43. package/Marketplace/392.f4537160149f627a.js +0 -1
  44. package/Marketplace/395.2943aa5a44308399.js +0 -1
  45. package/Marketplace/397.13ff3d72465810f8.js +0 -1
  46. package/Marketplace/425.03f8f97da7452806.js +0 -1
  47. package/Marketplace/455.c9dd08adf08a1b65.js +0 -1
  48. package/Marketplace/46.40ebac81bd0fb91b.js +0 -1
  49. package/Marketplace/481.64ffd74d20798f93.js +0 -1
  50. package/Marketplace/501.7645c32a140dd7f8.js +0 -1
  51. package/Marketplace/512.52dc49022c04fa43.js +0 -1
  52. package/Marketplace/53.3655b31ecb37ade9.js +0 -1
  53. package/Marketplace/533.cc5ab7f3ce13770c.js +0 -1
  54. package/Marketplace/545.4809f373cc63f3b4.js +0 -1
  55. package/Marketplace/655.ae475c8285604367.js +0 -1
  56. package/Marketplace/717.5d253da5bb63552f.js +0 -1
  57. package/Marketplace/739.0de1f18deac0ed90.js +0 -1
  58. package/Marketplace/767.eca7237ccb50aa86.js +0 -1
  59. package/Marketplace/835.6cfe266f3c9b5cc9.js +0 -1
  60. package/Marketplace/859.3a4d26983bbb5254.js +0 -1
  61. package/Marketplace/874.5b06431d2b5a1e8f.js +0 -1
  62. package/Marketplace/913.ec8155bc121fb0a6.js +0 -1
  63. package/Marketplace/993.5c22ca4b00b8c459.js +0 -1
  64. package/Marketplace/997.1e5281aa64540dee.js +0 -1
  65. package/Marketplace/common.af67cc08f47a8d44.js +0 -1
  66. package/Marketplace/main.4874ea507cbcab3a.js +0 -1
  67. package/Marketplace/polyfills.bee3c4d96e890990.js +0 -1
  68. package/Marketplace/runtime.357a02c3b18dd5e6.js +0 -1
  69. package/Marketplace/scripts.b7cebc1258dbcca8.js +0 -1
  70. package/Marketplace/styles.97105d62c44869cb.css +0 -20
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"marketplacepos","version":"2.9.4"}
1
+ {"name":"marketplacepos","version":"2.9.6"}
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[213],{8231:(A,M,i)=>{i.d(M,{j:()=>C});var f=i(5412),g=i(1889),c=i(9694),_=i(6779),t=i(4650),I=i(284),v=i(6895),m=i(4006),D=i(1948),e=i(9549),n=i(4385),a=i(3238),o=i(266),r=i(6401);function d(h,s){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 l=s.$implicit;t.Q6J("value",l.ID)("disabled",l.disabled),t.xp6(1),t.Q6J("matTooltip",l.disabled?"Single Product Scan disabled for this type of Channel":null),t.xp6(1),t.Q6J("src",l.Img,t.LSH),t.xp6(2),t.Oqu(l.Name)}}function T(h,s){if(1&h){const l=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(l);const S=t.oxw();return t.KtG(S.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 l=t.oxw();t.xp6(3),t.Q6J("ngModel",l.filter.ScanFull),t.xp6(1),t.Q6J("value",!0),t.xp6(2),t.Q6J("value",!1)}}function E(h,s){if(1&h){const l=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(l);const S=t.oxw();return t.KtG(S.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 l=t.oxw();t.xp6(2),t.hij(" Last Scan: ",t.xi3(3,4,l.selectedChannel.LastSync,"dd MMMM yyyy HH:mm")," "),t.xp6(2),t.Q6J("ngModel",l.filter.UpdatedProduct),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0)}}function U(h,s){if(1&h){const l=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(l);const S=t.oxw();return t.KtG(S.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 l=t.oxw();t.xp6(3),t.Q6J("ngModel",l.filter.Async),t.xp6(1),t.Q6J("value",!0),t.xp6(2),t.Q6J("value",!1)}}class C{constructor(s,l,u){this.dialogRef=s,this.data=l,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(l.isSingleChannel)&&this.data.isSingleChannel,this.disabledChannelOption=!g.g.IsEmpty(l.disabledChannelOption)&&this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new _.O,this.modalConfig.title="Scan Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID,this.filter.ScanFull=!1}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(s=>(s.disabled=!0,(s.TypeID==c.x.Tiktok||s.TypeID==c.x.Tokopedia||s.TypeID==c.x.Lazada)&&(s.disabled=!1),s)).sort(s=>s.disabled?1:-1))}onSelectChannel(s){let l=this.filterChannelById(s);this.selectedChannel=l,this.filter.Async=!0,l&&l.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(s){let l;return this.channelOptions&&(l=this.channelOptions.find(u=>u.ID==s)),l}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(s){return g.g.IsNotEmpty(s)}onClose(){this.dialogRef.close()}}C.\u0275fac=function(s){return new(s||C)(t.Y36(f.so),t.Y36(f.WI),t.Y36(I.F0))},C.\u0275cmp=t.Xpm({type:C,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(s,l){1&s&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return l.submit()})("onClose",function(){return l.onClose()})("onCancel",function(){return l.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 l.filter.ChannelID=p})("ngModelChange",function(p){return l.onSelectChannel(p)}),t.YNc(7,d,5,5,"mat-option",6),t.qZA()(),t.YNc(8,T,8,3,"div",7),t.YNc(9,E,9,7,"div",8),t.YNc(10,U,8,3,"div",8),t.qZA()()()),2&s&&(t.Q6J("dynamicValidated",l.isNotEmpty(l.filter.ChannelID))("config",l.modalConfig),t.xp6(6),t.Q6J("disabled",l.disabledChannelOption)("ngModel",l.filter.ChannelID),t.xp6(1),t.Q6J("ngForOf",l.channelOptions),t.xp6(1),t.Q6J("ngIf",!l.isSingleChannel&&!l.isTokopedia&&l.isNotEmpty(l.filter.ChannelID)),t.xp6(1),t.Q6J("ngIf",l.hasScanUpdate),t.xp6(1),t.Q6J("ngIf",!(null!=l.filter&&l.filter.UpdatedProduct)&&!l.isSingleChannel&&l.isNotEmpty(l.filter.ChannelID)))},dependencies:[v.sg,v.O5,m.JJ,m.On,D.VQ,D.U0,e.KE,n.gD,a.ey,o.gM,r.M,v.uU],encapsulation:2})},9425:(A,M,i)=>{i.d(M,{b:()=>C});var f=i(1135),g=i(7579),c=i(2722),_=i(9300),t=i(4351),I=i(4004),v=i(4482),m=i(5403),D=i(8421),e=i(4671),n=i(5032),a=i(3269),r=i(5026),d=i(8505),T=i(4782),E=i(4650),U=i(1318);class C{constructor(s){this.http=s,this.pagination$=new f.X(null),this.destroy$=new g.x,this.data$=this.paginationFunction()}onNextPage(s){s.PageNumber+=1,this.pagination$.next(s)}setPageNumberFooter(s){this.footerPageNumber=s.PageNumber}setPaginationButtonState(s,l){this.disableNextButton=0==l||!(l<s.RowCount*s.PageNumber)}resetToFirstPage(s){s.PageNumber=1,this.pagination$.next(s),this.hideCount=!0,this.goToLastPage=!1}getAllData(s,l){s.RowCount=l,this.pagination$.next(s),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new f.X(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe((0,c.R)(this.destroy$),(0,_.h)(s=>null!=s),(0,t.b)(s=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(s)).pipe((0,I.U)(l=>l.Data))),function o(...h){const s=(0,a.jO)(h);return(0,v.e)((l,u)=>{const p=h.length,S=new Array(p);let y=h.map(()=>!1),N=!1;for(let P=0;P<p;P++)(0,D.Xf)(h[P]).subscribe((0,m.x)(u,O=>{S[P]=O,!N&&!y[P]&&(y[P]=!0,(N=y.every(e.y))&&(y=null))},n.Z));l.subscribe((0,m.x)(u,P=>{if(N){const O=[P,...S];u.next(s?s(...O):O)}}))})}(this.pagination$),(0,r.R)((s,l)=>{const[u,p]=s,[S]=l;return 1==p.PageNumber?[S,p]:[u.concat(S),p]}),(0,d.b)(([s,l])=>{this.setPageNumberFooter(l),this.setPaginationButtonState(l,s.length)}),(0,I.U)(([s])=>s),(0,T.d)())}}C.\u0275fac=function(s){return new(s||C)(E.LFG(U.O))},C.\u0275prov=E.Yz7({token:C,factory:C.\u0275fac,providedIn:"root"})},6082:(A,M,i)=>{i.d(M,{M:()=>m});var f=i(8505),g=i(262),c=i(2843),_=i(1889),t=i(4650),I=i(1318),v=i(7185);class m{constructor(e,n){this.httpService=e,this.toastrService=n}loader(e=_.g.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:e})}LoadInPOS(e=_.g.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:e})}filterChannelByTypeId(e,n){return e.filter(a=>-1!==n.findIndex(o=>a.TypeID==o))}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}).pipe((0,f.b)(o=>{this.showToastrSuccessUploadSingle(o,e[0])}),(0,g.K)(o=>(this.showToastErrorUploadSingle(o,e[0]),(0,c._)(()=>new Error(o)))))}uploadMultipleProduct(e,n){return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",{Channel:n,Products:e}).pipe((0,f.b)(o=>{this.showToastrUploadMultiple(o.Message)}),(0,g.K)(o=>(this.showToastrUploadMultiple(o.error?.Message),(0,c._)(()=>new Error(o)))))}uploadNotInChannel(e,n){return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",{Products:e,Channel:n}).pipe((0,f.b)(o=>{this.showToastrUploadMultiple(o)}),(0,g.K)(o=>(this.showToastrUploadMultiple(o.error?.Message),(0,c._)(()=>new Error(o)))))}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,o=!1){return this.httpService.post("/api/product/ScanOptimized",{ID:e,ScanFull:n,UpdatedProduct:a,Async:o})}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,f.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,f.b)(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(e=[]){let n=[];return e.forEach(a=>{a.Variants.forEach(o=>{n=[...n,o.Code]})}),n}filterUnselectedChannel(e,n){let o,a=[];if(e.forEach(r=>{a=[...a,...r.Channel]}),a&&0!=a.length){let r=[];o=n.filter(d=>(r=a.filter(T=>T.ChannelID==d.ID),r.length!==e.length))}else o=n;return o}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(o=>o.selected):""]}),n}getChannelProduct(e){const n=e.Variants;let a=[];for(let o of n)if(null!=o.Channel)for(let r of o.Channel)0==a.filter(d=>d.ChannelID==r.ChannelID).length&&a.push(r);return this.sortChannel(a)}successToastrScanAllProduct(e,n,a){if(a){const o=e?.NotInPOS?.Product?e?.NotInPOS?.Product:0,r=e?.InChannel?.Product?e?.InChannel?.Product:0;this.toastrService.success(`\n ${o+r} found in ${n.Name} </br>\n (${r} In POS + ${o} 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(o=>(o.Channel=this.getChannelProduct(o),a=this.filterUnselectedChannel([o],n),o.hasScan=a.length>0,o))}checkProductHasUploadBtn(e,n){let a;return e.map(o=>(o.Channel=this.getChannelProduct(o),a=this.filterUnselectedChannel([o],n),o.hasUpload=a.length>0,o))}showToastrUploadMultiple(e=[]){let n=[],a=[];if(e.forEach(o=>{"string"==typeof o?.Response?a=[...a,`<li>${o.Response}</li>`]:(o?.Response?.Success.forEach(r=>{n=[...n,`<li>Product ${r} was <b>successfully</b> uploaded to ${o.Name}</li>`]}),o?.Response.Fail.forEach(r=>{a=[...a,`<li>${r} in <b>${o.Name}</b></li>`]}))}),a.length>0&&n.length>0){const o=[...n,...a];this.toastrService.warning(this.concatMessage(o),"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),o=e.filter(d=>1==d.Status),r=this.generateToastrMessage(a,o,n);this.toastrService.success(r.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(e,n){let a=e?.error?.Message.filter(d=>0==d.Status),o=e?.error?.Message.filter(d=>1==d.Status),r=this.generateToastrMessage(a,o,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,o="";return 0==e.length&&n.length>0?(r="SUCCESS",o=this.createSuccessResponse(n,a)):e.length>0&&0==n.length?(r="ERROR",o=this.createErrResponse(e,a)):(r="WARNING",o=`${this.createSuccessResponse(n,a)} ${this.createErrResponse(e,a)}`),o=`<ol>${o}</ol>`,{status:r,message:o}}createErrResponse(e,n){let a="";return e.forEach((o,r)=>{a+=`<li><b>${o.Response}</b> for ${n.Name} in ${o.Name}</li>`}),a}createSuccessResponse(e,n){let a="";return e.forEach((o,r)=>{a+=`<li>Product ${n.Name} was <b>successfully</b> uploaded to ${o.Name}</li>`}),a}getHostName(){if(_.g.IsEmpty(this.hostName)){const e=localStorage.getItem("Authorization");this.hostName=JSON.parse(e)?.Host}return this.hostName}}m.\u0275fac=function(e){return new(e||m)(t.LFG(I.O),t.LFG(v._W))},m.\u0275prov=t.Yz7({token:m,factory:m.\u0275fac,providedIn:"root"})}}]);