marketplacepos 3.2.0 → 3.4.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.
Files changed (112) hide show
  1. package/Marketplace/3rdpartylicenses.txt +202 -187
  2. package/Marketplace/chunk-2KQ4WEPD.js +1 -0
  3. package/Marketplace/chunk-2OB3TW2H.js +4 -0
  4. package/Marketplace/chunk-3ICHEZSE.js +1 -0
  5. package/Marketplace/chunk-3TM7EKQZ.js +1 -0
  6. package/Marketplace/chunk-45IJGKR3.js +1 -0
  7. package/Marketplace/chunk-4O5EV6W4.js +1 -0
  8. package/Marketplace/chunk-5DS4AFTV.js +1 -0
  9. package/Marketplace/chunk-5DVM7TJ7.js +5 -0
  10. package/Marketplace/chunk-5JZJC54P.js +2 -0
  11. package/Marketplace/chunk-67YIEWYV.js +1 -0
  12. package/Marketplace/chunk-7DXQ5BDE.js +1 -0
  13. package/Marketplace/chunk-7RCRNZNI.js +1 -0
  14. package/Marketplace/chunk-7Y73MGEU.js +1 -0
  15. package/Marketplace/chunk-AIZ2SLGZ.js +5 -0
  16. package/Marketplace/chunk-B4RPQGTA.js +1 -0
  17. package/Marketplace/chunk-BELWZRNY.js +1 -0
  18. package/Marketplace/chunk-BYDOIRDD.js +1 -0
  19. package/Marketplace/chunk-CS64SQAA.js +1 -0
  20. package/Marketplace/chunk-CWG6UUW5.js +1 -0
  21. package/Marketplace/chunk-DBEZLCZM.js +1 -0
  22. package/Marketplace/chunk-ECB4VT3U.js +1 -0
  23. package/Marketplace/chunk-FWCMOK42.js +8 -0
  24. package/Marketplace/chunk-G5D7W2T3.js +2 -0
  25. package/Marketplace/chunk-GD6CRVOV.js +1 -0
  26. package/Marketplace/chunk-GFW452UY.js +1 -0
  27. package/Marketplace/chunk-GIFWICGN.js +2 -0
  28. package/Marketplace/chunk-GMALFTAY.js +1 -0
  29. package/Marketplace/chunk-H7KLY4IB.js +1 -0
  30. package/Marketplace/chunk-HWOBJ4Z3.js +1 -0
  31. package/Marketplace/chunk-I4V2RPID.js +1 -0
  32. package/Marketplace/chunk-IJIIMLQ7.js +1 -0
  33. package/Marketplace/chunk-ISBEY2N5.js +1 -0
  34. package/Marketplace/chunk-KEKROO5B.js +1 -0
  35. package/Marketplace/chunk-KX7WACSK.js +1 -0
  36. package/Marketplace/chunk-LJ6J4EIT.js +1 -0
  37. package/Marketplace/chunk-LKSBRXCX.js +1 -0
  38. package/Marketplace/chunk-MA4ZKUP6.js +4 -0
  39. package/Marketplace/chunk-MORUNYG3.js +6 -0
  40. package/Marketplace/chunk-MRWTB7OG.js +8 -0
  41. package/Marketplace/chunk-N76YHCQ6.js +1 -0
  42. package/Marketplace/chunk-NZBQKND7.js +1 -0
  43. package/Marketplace/chunk-O3V3GTIM.js +1 -0
  44. package/Marketplace/chunk-PJQTGT4K.js +1 -0
  45. package/Marketplace/chunk-PQGHN52M.js +1 -0
  46. package/Marketplace/chunk-Q7FH7Z7R.js +1 -0
  47. package/Marketplace/chunk-QK2PM3OO.js +2 -0
  48. package/Marketplace/chunk-QKVTZKIC.js +3 -0
  49. package/Marketplace/chunk-RFTG6MKX.js +1 -0
  50. package/Marketplace/chunk-S65ISV4X.js +5 -0
  51. package/Marketplace/chunk-SKA4KCAB.js +1 -0
  52. package/Marketplace/chunk-SWQXA73A.js +1 -0
  53. package/Marketplace/chunk-T6XRWLCZ.js +1 -0
  54. package/Marketplace/chunk-TBY7FO23.js +3 -0
  55. package/Marketplace/chunk-TJRQ2WWD.js +1 -0
  56. package/Marketplace/chunk-TMUAQXEK.js +1 -0
  57. package/Marketplace/chunk-TNVZKPJP.js +1 -0
  58. package/Marketplace/chunk-TQ6UUVH3.js +1 -0
  59. package/Marketplace/chunk-TT7NBZMD.js +1 -0
  60. package/Marketplace/chunk-UNZLFKB2.js +1 -0
  61. package/Marketplace/chunk-VIJ5HUKS.js +1 -0
  62. package/Marketplace/chunk-VRSV5O5R.js +1 -0
  63. package/Marketplace/chunk-VTFOZMLI.js +1 -0
  64. package/Marketplace/chunk-WBI4ZM2X.js +1 -0
  65. package/Marketplace/chunk-WYMCYQCR.js +1 -0
  66. package/Marketplace/chunk-XWIBRKIY.js +5 -0
  67. package/Marketplace/chunk-YQEEQRFM.js +2 -0
  68. package/Marketplace/chunk-YQXKX6O7.js +7 -0
  69. package/Marketplace/chunk-YWVMHX45.js +1 -0
  70. package/Marketplace/chunk-Z2ABDS6L.js +1 -0
  71. package/Marketplace/index.html +2 -2
  72. package/Marketplace/main-B2AQI7UJ.js +1 -0
  73. package/Marketplace/polyfills-KQQO3SZT.js +2 -0
  74. package/Marketplace/scripts-M46NWPTC.js +5 -0
  75. package/Marketplace/styles-WZSIIWL7.css +1 -0
  76. package/package.json +1 -1
  77. package/Marketplace/103.bc1f4c51ca99f04f.js +0 -1
  78. package/Marketplace/168.50d66b17241a3765.js +0 -1
  79. package/Marketplace/231.0c7ab993977632a2.js +0 -1
  80. package/Marketplace/257.d1592e885695ba4b.js +0 -1
  81. package/Marketplace/278.e89610409641d910.js +0 -1
  82. package/Marketplace/296.93310f70e5f9d3a9.js +0 -1
  83. package/Marketplace/311.afcc0c4a03ea0076.js +0 -1
  84. package/Marketplace/389.02d8fd64069d0119.js +0 -1
  85. package/Marketplace/394.11ae606578598904.js +0 -1
  86. package/Marketplace/445.cbf341bc0afe3ffc.js +0 -1
  87. package/Marketplace/452.58ce3ef12b9b5a47.js +0 -1
  88. package/Marketplace/476.d08ef7b92327904d.js +0 -1
  89. package/Marketplace/478.a63c640a3e971a16.js +0 -1
  90. package/Marketplace/500.c2e6963e4771761e.js +0 -1
  91. package/Marketplace/527.984c24771dbd0f8e.js +0 -1
  92. package/Marketplace/556.5d624cfb73f161b2.js +0 -1
  93. package/Marketplace/56.0432dfcbb3e04e39.js +0 -1
  94. package/Marketplace/599.8de0c2b4c7af0f9d.js +0 -1
  95. package/Marketplace/609.0e0a820d30efd4d4.js +0 -1
  96. package/Marketplace/617.4db1b737553fe58b.js +0 -1
  97. package/Marketplace/62.4f9a8ca2692bdd97.js +0 -1
  98. package/Marketplace/687.1fb4b2602d2b185a.js +0 -1
  99. package/Marketplace/699.d68a917277dbe11a.js +0 -1
  100. package/Marketplace/700.755c54d915bd281e.js +0 -1
  101. package/Marketplace/726.40535ee28a35e978.js +0 -1
  102. package/Marketplace/806.4037f673990a5242.js +0 -1
  103. package/Marketplace/810.629a800ca97725b7.js +0 -1
  104. package/Marketplace/877.bbdea3b04cc75780.js +0 -1
  105. package/Marketplace/900.b7de175b628a8dbe.js +0 -1
  106. package/Marketplace/967.2b39f548c7f4eb30.js +0 -1
  107. package/Marketplace/common.2cffc11d42ed963f.js +0 -1
  108. package/Marketplace/main.892c697dc9030f18.js +0 -1
  109. package/Marketplace/polyfills.503b3f4bf922d237.js +0 -1
  110. package/Marketplace/runtime.a3441aa39d1419eb.js +0 -1
  111. package/Marketplace/scripts.0d34bffadb54993a.js +0 -1
  112. package/Marketplace/styles.095460a0131dd2fc.css +0 -19
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[609],{609:(j,R,g)=>{g.r(R),g.d(R,{OrdersModule:()=>an});var h=g(6814),Z=g(9790),J=g(7826),e=g(5879),q=g(6027);let H=(()=>{var i;class r{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[J.G.downloadOrder]}]}ngOnInit(){}}return(i=r).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(t,n){1&t&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&t&&(e.xp6(3),e.Q6J("Tabs",n.ObjectOrderTabs)("usePermissions",!0))},dependencies:[q.e,Z.lC]}),r})();var T=g(5802),k=g(7081),A=g(9397),S=g(7398),f=g(754),s=g(1449),p=g(5149),c=g(9659),d=g(7700),u=g(9229);let C=(()=>{var i;class r{constructor(){}convertToCSV(t,n){let o;if("string"==typeof t)o=t;else{var l="object"==typeof t?t:JSON.parse(t);o=this.transformToCSVStringFormat(l)}this.downloadCSV(o,n)}transformToCSVStringFormat(t){if(!t||!t.length)return;const o=Object.keys(t[0]);return t.map(_=>o.map(x=>{let w=null==_[x]?"":_[x];return w=w instanceof Date?w.toLocaleString():w.toString().replace(/"/g,'""'),w.search(/("|,|\n)/g)>=0&&(w=`"${w}"`),w}).join(",")).join("\n")}downloadCSV(t,n){var o=new Blob([t],{type:"text/csv;charset=utf8;"}),l=document.createElement("a");l.setAttribute("href",window.URL.createObjectURL(o)),l.setAttribute("download",n),document.body.appendChild(l),l.click(),document.body.removeChild(l)}}return(i=r).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),r})(),P=(()=>{var i;class r{constructor(t,n,o,l){this.http=t,this.dialog=n,this.toastr=o,this.exportService=l}loadInitialPage(){return this.http.post("/api/ordersLoader/GetOrder",{})}getNewOrders(t){return this.http.post("/api/orders/GetNewOrder",t).pipe((0,S.U)(n=>n.Data))}getTotalNewOrders(t,n,o){return this.http.post("/api/orders/GetCountNewOrder",{ListChannelID:t,From:n,To:o}).pipe((0,S.U)(_=>_.Count))}exportOrders(t,n){return this.http.post("api/Orders/ExportOrder",t).pipe((0,A.b)(o=>{this.exportService.convertToCSV(o,n)}))}}return(i=r).\u0275fac=function(t){return new(t||i)(e.LFG(c.O),e.LFG(d.uw),e.LFG(u._W),e.LFG(C))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac}),r})(),Y=(()=>{var i;class r{constructor(t,n){this.http=t,this.toastr=n}acceptTokopediaOrders(t){return this.http.post("/api/Orders/AcceptOrderTokopedia",t).pipe((0,A.b)(n=>{this.tokopediaAcceptOrderHandler(n)}))}tokopediaAcceptOrderHandler(t){const n=t.filter(l=>0==l.Status),o=t.filter(l=>1==l.Status);if(0==n.length&&o.length>0){let l=`<ol>${this.generateSuccessMessage(o)}</ol>`;this.toastr.success(l,"Success",{enableHtml:!0})}else if(n.length>0&&o.length>0){let l=`<ol>\n ${this.generateSuccessMessage(o)}\n ${this.generateErrorMessage(n)}\n </ol>`;this.toastr.warning(l,"Warning",{enableHtml:!0})}else{let l=`<ol>${this.generateErrorMessage(n)}</ol>`;this.toastr.error(l,"Error",{enableHtml:!0})}}generateSuccessMessage(t){let n="";return t.forEach(o=>{n+=`<li><b>${o.OrderNumber}</b> was successfully Accept</li>`}),n}generateErrorMessage(t){let n="";return t.forEach(o=>{n+=`<li><b>${o.OrderNumber}</b> ${o.Message}</li>`}),n}}return(i=r).\u0275fac=function(t){return new(t||i)(e.LFG(c.O),e.LFG(u._W))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac}),r})();var V=g(2181),W=g(4664),m=g(6223),B=g(5986);let X=(()=>{var i;class r{constructor(t){this.dialogRef=t,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}}return(i=r).\u0275fac=function(t){return new(t||i)(e.Y36(d.so))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModel","ngModelChange"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"h2",1),e._uU(2,"Cetak label pesanan"),e.qZA(),e.TgZ(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),e._uU(7,"Kamu akan mencetak label yang berisi detail pesanan"),e.qZA(),e.TgZ(8,"div",5)(9,"mat-checkbox",6),e.NdJ("ngModelChange",function(l){return n.tandaiSudahDicetak=l}),e.qZA(),e.TgZ(10,"span",7),e._uU(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),e.qZA()()()()(),e.TgZ(12,"mat-dialog-actions",8)(13,"button",9),e.NdJ("click",function(){return n.onCancel()}),e._uU(14,"Cancel"),e.qZA(),e.TgZ(15,"button",10),e.NdJ("click",function(){return n.onPrint()}),e._uU(16,"Cetak Pesanan"),e.qZA()()()),2&t&&(e.xp6(9),e.Q6J("ngModel",n.tandaiSudahDicetak))},dependencies:[m.JJ,m.On,B.oG,d.xY,d.H8]}),r})(),$=(()=>{var i;class r{constructor(t,n,o){this.http=t,this.toastr=n,this.dialog=o}getTokopediaShippingLabel(t){return this.http.post("/api/v1/Shippinglabel/Tokopedia/Multiple",{Orders:t}).pipe((0,S.U)(n=>n.map(o=>(o.ChannelType=f.x.Tokopedia,o))))}getShopeeShippingLabel(t){return this.http.post("/api/v1/Shippinglabel/shopee/Multiple",{Orders:t}).pipe((0,S.U)(n=>n.map(o=>(o.ChannelType=f.x.ShopeeV2,o))))}getLazadaShippingLabel(t){return this.http.post("/api/v1/Shippinglabel/lazada/Multiple",{Orders:t}).pipe((0,S.U)(n=>n.map(o=>(o.ChannelType=f.x.Lazada,o))))}printShippingLabelTokopedia(t){const n={OrderNumber:t,Printed:!0};this.dialog.open(X).afterClosed().pipe((0,V.h)(o=>void 0!==o),(0,W.w)(o=>(n.Printed=o,this.http.post("api/v1/Shippinglabel/Tokopedia",n)))).subscribe(o=>{const l=window.open("about:blank","_blank");l.document.write(o),l.document.close()})}printShippingLabelTiktok(t,n){this.http.post("api/v1/Shippinglabel/Tiktok",{ShopID:n,OrderNumber:t}).subscribe(l=>{null!=l.data?window.open(l.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(t,n){this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",{ShopID:n,OrderNumber:t}).subscribe(l=>{var _=Uint8Array.from(atob(l),w=>w.charCodeAt(0)),x=new Blob([_],{type:"octet/stream"});T.g.openDownloadFile(x,`${t}.pdf`)})}printShippingLabelLazada(t,n){this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",{ShopID:n,OrderNumber:t}).subscribe(l=>{null!=l.result.data?window.open(l.result.data.pdf_url,"_blank"):this.toastr.error(l.message,"Cannot Print")})}}return(i=r).\u0275fac=function(t){return new(t||i)(e.LFG(c.O),e.LFG(u._W),e.LFG(d.uw))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),r})();var N=g(4387),b=g(4807),I=g(6930);let U=(()=>{var i;class r{set typeId(t){this.channelLogo=T.g.getChannelLogoByTypeId(t),this.initChannelName(t)}constructor(){}initChannelName(t){switch(t){case f.x.Tokopedia:this.channelName="Tokopedia";break;case f.x.Tiktok:this.channelName="Tiktok";break;case f.x.WooCommerce:this.channelName="WooCommerce";break;case f.x.ShopeeV2:this.channelName="Shopee";break;case f.x.Lazada:this.channelName="Lazada";break;case f.x.KalCare:this.channelName="Kalcare"}}}return(i=r).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-channel-logo"]],inputs:{typeId:"typeId"},decls:4,vars:2,consts:[[1,"d-flex","align-items-center"],[2,"width","20px",3,"src"],[1,"ms-3","fw-normal"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"img",1),e.TgZ(2,"span",2),e._uU(3),e.qZA()()),2&t&&(e.xp6(1),e.Q6J("src",n.channelLogo,e.LSH),e.xp6(2),e.Oqu(n.channelName))}}),r})();var L=g(5439),v=g(3566),M=g(4126);function ee(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"button",13),e.NdJ("click",function(){e.CHM(a);const n=e.oxw().ngIf,o=e.oxw();return e.KtG(o.onAcceptOrder(n))}),e._UZ(2,"i",14),e._uU(3," Accept "),e.qZA(),e.BQk()}}function te(i,r){if(1&i&&(e.ynx(0),e.YNc(1,ee,4,0,"ng-container",1),e.BQk()),2&i){const a=e.oxw();e.xp6(1),e.Q6J("ngIf",a.isTokopediaAvailable&&a.isTokopediaSelected)}}function ne(i,r){if(1&i&&(e.TgZ(0,"span",15),e._UZ(1,"img",16),e.qZA(),e._uU(2)),2&i){const a=r.item;e.xp6(1),e.Q6J("src",a.img,e.LSH),e.xp6(1),e.hij(" ",a.Name," ")}}function ie(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"th",28)(2,"input",29),e.NdJ("ngModelChange",function(n){e.CHM(a);const o=e.oxw(3);return e.KtG(o.isCheckAll=n)})("ngModelChange",function(){e.CHM(a);const n=e.oxw(2).ngIf,o=e.oxw();return e.KtG(o.onSelectAllOrderData(n))}),e.qZA()(),e.BQk()}if(2&i){const a=e.oxw(3);e.xp6(2),e.Q6J("ngModel",a.isCheckAll)}}function ae(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"input",29),e.NdJ("ngModelChange",function(n){e.CHM(a);const o=e.oxw(2).$implicit;return e.KtG(o.selected=n)})("ngModelChange",function(){e.CHM(a);const n=e.oxw(4).ngIf,o=e.oxw();return e.KtG(o.onSelectOrderData(n))}),e.qZA(),e.BQk()}if(2&i){const a=e.oxw(2).$implicit;e.xp6(1),e.Q6J("ngModel",a.selected)}}function oe(i,r){if(1&i&&(e.ynx(0),e.TgZ(1,"td"),e.YNc(2,ae,2,1,"ng-container",1),e.qZA(),e.BQk()),2&i){const a=e.oxw().$implicit,t=e.oxw(3);e.xp6(2),e.Q6J("ngIf",a.Type==t.tokopediaType)}}function re(i,r){if(1&i&&(e.ynx(0),e.TgZ(1,"span"),e._uU(2),e.qZA(),e.BQk()),2&i){const a=e.oxw().$implicit;e.xp6(2),e.Oqu(a.Number)}}function le(i,r){if(1&i&&(e.TgZ(0,"a",32),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit,t=e.oxw(3);e.Q6J("href",t.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+a.ID,e.LSH),e.xp6(1),e.Oqu(a.Number)}}function se(i,r){if(1&i&&(e.TgZ(0,"tr"),e.YNc(1,oe,3,1,"ng-container",1),e.TgZ(2,"td"),e._uU(3),e.qZA(),e.TgZ(4,"td"),e.YNc(5,re,3,1,"ng-container",17),e.YNc(6,le,2,2,"ng-template",null,30,e.W1O),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.ALo(12,"date"),e.qZA(),e.TgZ(13,"td"),e._UZ(14,"app-channel-logo",31),e.qZA()()),2&i){const a=r.$implicit,t=e.MAs(7),n=e.oxw(3);e.xp6(1),e.Q6J("ngIf",n.isTokopediaAvailable),e.xp6(2),e.Oqu(a.Outlet),e.xp6(2),e.Q6J("ngIf",a.ID==n.guidEmpty)("ngIfElse",t),e.xp6(4),e.Oqu(a.Customer),e.xp6(2),e.Oqu(e.xi3(12,7,a.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",a.Type)}}function pe(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"div",18)(2,"table",19),e.NdJ("matSortChange",function(n){e.CHM(a);const o=e.oxw(2);return e.KtG(o.onSort(n))}),e.TgZ(3,"thead",20)(4,"tr",21),e.YNc(5,ie,3,1,"ng-container",1),e.TgZ(6,"th",22),e._uU(7,"Outlet"),e.qZA(),e.TgZ(8,"th",23),e._uU(9,"Order number"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Customer"),e.qZA(),e.TgZ(12,"th",24),e._uU(13,"Created On"),e.qZA(),e.TgZ(14,"th",25),e._uU(15,"Channel"),e.qZA()()(),e.TgZ(16,"tbody"),e.YNc(17,se,15,10,"tr",26),e.qZA()(),e.TgZ(18,"app-mat-paginator-no-count",27),e.NdJ("total",function(){e.CHM(a);const n=e.oxw(2);return e.KtG(n.getPaginatonTotal())})("next",function(){e.CHM(a);const n=e.oxw(2);return e.KtG(n.onNextPage())})("previous",function(){e.CHM(a);const n=e.oxw(2);return e.KtG(n.onPreviousPage())}),e.ALo(19,"async"),e.ALo(20,"async"),e.qZA()(),e.BQk()}if(2&i){const a=e.oxw().ngIf,t=e.oxw();let n;e.xp6(5),e.Q6J("ngIf",t.isTokopediaAvailable&&a),e.xp6(12),e.Q6J("ngForOf",a),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",null==(n=e.lcZ(19,5,t.newOrdersData$))?null:n.length)("paginationTotal",e.lcZ(20,7,t.paginationTotal$))}}function ce(i,r){if(1&i&&(e.ynx(0),e.YNc(1,pe,21,9,"ng-container",17),e.BQk()),2&i){const a=r.ngIf;e.oxw();const t=e.MAs(31);e.xp6(1),e.Q6J("ngIf",(null==a?null:a.length)>0)("ngIfElse",t)}}function de(i,r){1&i&&(e.TgZ(0,"div",33),e._UZ(1,"app-empty-state"),e.qZA())}let ge=(()=>{var i;class r{constructor(t,n,o,l,_,x){this.localDataService=t,this.channelService=n,this.orderService=o,this.toastr=l,this.acceptOrderService=_,this.shippingLabelService=x,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=T.g.GuidEMpty,this.tokopediaType=f.x.Tokopedia,this.isTokopediaSelected=!1,this.isTokopediaAvailable=!1,this.isCheckAll=!1}ngOnInit(){this.initLoadPage()}initLoadPage(){this.orderService.loadInitialPage().subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.filter.From=t.Filter.From,this.filter.To=t.Filter.To,this.channels=t.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.getNewOrders()})}getNewOrders(){this.sourceObs$=this.orderService.getNewOrders({PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To}).pipe((0,k.d)()),this.newOrdersData$=this.sourceObs$.pipe((0,A.b)(n=>{n.filter(l=>l.Type==f.x.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe((0,k.d)())}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getNewOrders()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getNewOrders()}onSelectOrderData(t){this.isTokopediaSelected=!1,t.filter(o=>o.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(t){t=t.map(n=>(n.Type==f.x.Tokopedia&&(n.selected=this.isCheckAll),n)),this.onSelectOrderData(t)}onAcceptOrder(t){let n=this.getSelectedTokopediaOrders(t);this.acceptOrderService.acceptTokopediaOrders(n).subscribe(o=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(t){return t.filter(o=>o.selected).map(o=>o.Number)}onSort(t){if(""!=t.direction){if("created"==t.active){const n="asc"==t.direction;this.newOrdersData$=this.newOrdersData$.pipe((0,S.U)(o=>o.sort((l,_)=>T.g.compare(l.Created,_.Created,n))))}}else this.newOrdersData$=this.sourceObs$}}return(i=r).\u0275fac=function(t){return new(t||i)(e.Y36(s.T),e.Y36(p.T),e.Y36(P),e.Y36(u._W),e.Y36(Y),e.Y36($))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-new-order"]],decls:32,vars:15,consts:[["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"hideSearchBox","onSubmit"],[4,"ngIf"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["EMPTY_STATE",""],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[2,"width","5px"],["type","checkbox",3,"ngModel","ngModelChange"],["NOT_EMPTY",""],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return n.getNewOrders()}),e.TgZ(1,"actions"),e.YNc(2,te,2,1,"ng-container",1),e.ALo(3,"async"),e.qZA(),e.TgZ(4,"filters")(5,"div",2)(6,"div")(7,"h6"),e._uU(8,"Channel"),e.qZA(),e.TgZ(9,"ng-select",3),e.NdJ("ngModelChange",function(l){return n.filter.ListChannelID=l}),e.YNc(10,ne,3,2,"ng-template",4),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"Page Number"),e.qZA(),e.TgZ(14,"input",5),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(15,"div")(16,"h6"),e._uU(17,"Page Size"),e.qZA(),e.TgZ(18,"input",6),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()(),e.TgZ(19,"div")(20,"h6"),e._uU(21,"From/To"),e.qZA(),e.TgZ(22,"datepicker",7),e.NdJ("dateChange",function(l){return n.filter.From=l}),e.qZA(),e.TgZ(23,"datepicker",8),e.NdJ("dateChange",function(l){return n.filter.To=l}),e.qZA()()()(),e.TgZ(24,"content")(25,"div",9)(26,"div",10)(27,"div",11),e.YNc(28,ce,2,2,"ng-container",1),e.ALo(29,"async"),e.YNc(30,de,2,0,"ng-template",null,12,e.W1O),e.qZA()()()()()),2&t&&(e.Q6J("hideSearchBox",!0),e.xp6(2),e.Q6J("ngIf",e.lcZ(3,11,n.newOrdersData$)),e.xp6(7),e.Q6J("clearable",!0)("multiple",!0)("items",n.channels)("ngModel",n.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(5),e.Q6J("ngIf",e.lcZ(29,13,n.newOrdersData$)))},dependencies:[h.sg,h.O5,m.Fj,m.wV,m.Wl,m.JJ,m.On,N.p,b.w9,b.ir,I.n,U,L.s,v.YE,v.nU,M.Q,h.Ov,h.uU]}),r})();function he(i,r){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"number"),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.ALo(8,"number"),e.qZA()()),2&i){const a=r.$implicit;e.xp6(2),e.Oqu(a.Code),e.xp6(2),e.Oqu(e.lcZ(5,3,a.Quantity)),e.xp6(3),e.Oqu(e.lcZ(8,5,a.Price))}}function ue(i,r){if(1&i&&(e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),e._uU(5,"Outlet Info"),e.qZA()(),e.TgZ(6,"div",4)(7,"div",9),e._uU(8," Outlet : "),e.qZA(),e.TgZ(9,"div",9),e._uU(10),e.qZA()(),e.TgZ(11,"div",4)(12,"div",9),e._uU(13," Date : "),e.qZA(),e.TgZ(14,"div",9),e._uU(15),e.ALo(16,"date"),e.qZA()(),e.TgZ(17,"div",4)(18,"div",9),e._uU(19," Status : "),e.qZA(),e.TgZ(20,"div",9),e._uU(21),e.qZA()(),e.TgZ(22,"div",4)(23,"div",9),e._uU(24," Tax Type : "),e.qZA(),e.TgZ(25,"div",9),e._uU(26),e.qZA()(),e.TgZ(27,"div",4)(28,"div",9),e._uU(29," Due Date : "),e.qZA(),e.TgZ(30,"div",9),e._uU(31),e.ALo(32,"date"),e.qZA()()(),e.TgZ(33,"div",6)(34,"div",7)(35,"h3",8),e._uU(36,"Customer Info"),e.qZA()(),e.TgZ(37,"div",4)(38,"div",9),e._uU(39," Name : "),e.qZA(),e.TgZ(40,"div",9),e._uU(41),e.qZA()(),e.TgZ(42,"div",4)(43,"div",9),e._uU(44," Email : "),e.qZA(),e.TgZ(45,"div",9),e._uU(46),e.qZA()(),e.TgZ(47,"div",4)(48,"div",9),e._uU(49," Mobile : "),e.qZA(),e.TgZ(50,"div",9),e._uU(51),e.qZA()()()(),e.TgZ(52,"div",10)(53,"h3",11),e._uU(54,"Products Sold"),e.qZA(),e.TgZ(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),e._uU(60,"Code"),e.qZA(),e.TgZ(61,"th"),e._uU(62,"Quantity"),e.qZA(),e.TgZ(63,"th"),e._uU(64,"Price"),e.qZA()()(),e.TgZ(65,"tbody"),e.YNc(66,he,9,7,"tr",16),e.qZA()()()()()),2&i){const a=e.oxw();e.xp6(10),e.hij(" ",a.model.Outlet," "),e.xp6(5),e.hij(" ",e.xi3(16,9,a.model.Date,"dd MMM yyyy")," "),e.xp6(6),e.hij(" ",a.model.Delivery," "),e.xp6(5),e.hij(" ",a.model.TaxType," "),e.xp6(5),e.hij(" ",e.xi3(32,12,a.model.DueDate,"dd MMM yyyy")," "),e.xp6(10),e.hij(" ",a.model.Customer.Name," "),e.xp6(5),e.hij(" ",a.model.Customer.Email," "),e.xp6(5),e.hij(" ",a.model.Customer.Mobile," "),e.xp6(15),e.Q6J("ngForOf",a.model.Variants)}}const _e=function(){return["/menu/Order"]};let me=(()=>{var i;class r{constructor(t,n){this.http=t,this.url=n,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){this.http.post("/api/orders/GetInvoiceDetail",{Number:this.number,Outlet:this.outlet}).subscribe(n=>{this.model=n})}}return(i=r).\u0275fac=function(t){return new(t||i)(e.Y36(c.O),e.Y36(Z.gz))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-detail-order"]],decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2),e.YNc(6,ue,67,15,"div",3),e.qZA()()()),2&t&&(e.Q6J("headerTitle","Order #"+n.number)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("routerLink",e.DdM(5,_e)),e.xp6(4),e.Q6J("ngIf",n.model))},dependencies:[h.sg,h.O5,N.p,Z.rH,h.JJ,h.uU]}),r})();var fe=g(9315),D=function(i){return i.SPX="https://res.cloudinary.com/pos/image/upload/v1698216798/APP/Print%20Shipping%20Label/SPX_Logo.png",i.SICEPAT="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/SiCepat_Logo.png",i.JNT="https://res.cloudinary.com/pos/image/upload/v1698216792/APP/Print%20Shipping%20Label/J_T_Logo.png",i.ANTERAJA="https://res.cloudinary.com/pos/image/upload/v1698218271/APP/Print%20Shipping%20Label/anteraja_Logo.png",i.JNE="https://res.cloudinary.com/pos/image/upload/v1698216791/APP/Print%20Shipping%20Label/JNE_Logo.png",i.GRAB="https://res.cloudinary.com/pos/image/upload/v1698216794/APP/Print%20Shipping%20Label/GrabExpress_Logo.png",i.GOSEND="https://res.cloudinary.com/pos/image/upload/v1698218375/APP/Print%20Shipping%20Label/Gosend_Logo.png",i.LAZADA_EXPRESS="https://res.cloudinary.com/pos/image/upload/v1698914677/icons/Marketplace%20logo/lazada-Logistics.png",i}(D||{}),G=function(i){return i.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/Tokopedia_Logo.png",i.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1698219243/APP/Print%20Shipping%20Label/shopee-logo.png",i.LAZADA="https://res.cloudinary.com/pos/image/upload/v1698912333/icons/Marketplace%20logo/Lazada_icon.png",i}(G||{});function Te(i,r){if(1&i&&(e.ynx(0),e.TgZ(1,"div",35)(2,"div",12)(3,"div",36),e._uU(4),e.qZA()(),e.TgZ(5,"div",12)(6,"div",36),e._uU(7),e.qZA()()(),e.BQk()),2&i){const a=e.oxw();e.xp6(4),e.hij(" ",null==a.recipient?null:a.recipient.City," "),e.xp6(3),e.hij(" ",null==a.recipient?null:a.recipient.District," ")}}function Ce(i,r){if(1&i&&(e.ynx(0),e.TgZ(1,"div")(2,"span",15),e._uU(3,"Berat: "),e.qZA(),e.TgZ(4,"span",18),e._uU(5),e.qZA()(),e.BQk()),2&i){const a=e.oxw();e.xp6(5),e.hij("",null==a.shippingLabel?null:a.shippingLabel.Weight," gr")}}function Ze(i,r){if(1&i&&(e.ynx(0),e.TgZ(1,"div",37)(2,"span",14),e._uU(3,"Batas Kirim:"),e.qZA(),e.TgZ(4,"span",18),e._uU(5),e.ALo(6,"date"),e.qZA()(),e.BQk()),2&i){const a=e.oxw();e.xp6(5),e.Oqu(e.xi3(6,1,null==a.logistic?null:a.logistic.Batas_kirim,"dd-MM-yyy"))}}function be(i,r){if(1&i&&(e.ynx(0),e.TgZ(1,"div",37)(2,"span",14),e._uU(3,"No.Pesanan:"),e.qZA(),e.TgZ(4,"span",18),e._uU(5),e.qZA()(),e.BQk()),2&i){const a=e.oxw();e.xp6(5),e.Oqu(null==a.shippingLabel?null:a.shippingLabel.OrderNumber)}}function Se(i,r){if(1&i&&(e.TgZ(0,"tr")(1,"td",38),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.ALo(9,"number"),e.qZA()()),2&i){const a=r.$implicit,t=r.index;e.xp6(2),e.Oqu(t+1),e.xp6(2),e.Oqu(a.Product_Name),e.xp6(2),e.Oqu(a.SKU),e.xp6(2),e.Oqu(e.lcZ(9,4,a.Quantity))}}let z=(()=>{var i;class r{constructor(){this.minDate=T.g.MinDate,this.channelType=f.x}ngOnChanges(t){t.shippingLabel&&t.shippingLabel.currentValue&&(this.initShippingLabel(),this.getShippingLogo(),this.getChannelLogo())}ngAfterViewInit(){this.initBarcodeConfig()}getChannelLogo(){switch(this.shippingLabel.ChannelType){case f.x.Tokopedia:this.marketplaceLogo=G.TOKOPEDIA;break;case f.x.ShopeeV2:this.marketplaceLogo=G.SHOPEE;break;case f.x.Lazada:this.marketplaceLogo=G.LAZADA}}getShippingLogo(){let t=this.shippingLabel.Logistic.Logistic_Name;t=t?.toLowerCase(),t.includes("anteraja")?this.shippingLogo=D.ANTERAJA:t.includes("grabexpress")?this.shippingLogo=D.GRAB:t.includes("jne")?this.shippingLogo=D.JNE:t.includes("gosend")?this.shippingLogo=D.GOSEND:t.includes("j&t")?this.shippingLogo=D.JNT:t.includes("sicepat")?this.shippingLogo=D.SICEPAT:t.includes("spx")?this.shippingLogo=D.SPX:t.includes("lex")&&(this.shippingLogo=D.LAZADA_EXPRESS)}initShippingLabel(){this.recipient=this.shippingLabel.Recipient,this.store=this.shippingLabel.Store,this.products=this.shippingLabel.Products,this.logistic=this.shippingLabel.Logistic}initBarcodeConfig(){if(T.g.IsNotEmpty(this.logistic?.Resi_Number)){let t=this.logistic?.Resi_Number;JsBarcode(`#RESI${this.id}`,this.logistic?.Resi_Number,{displayValue:!1,width:t.length>15?1:1.5,height:40})}T.g.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}}return(i=r).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},standalone:!0,features:[e.TTD,e.jDz],decls:87,vars:20,consts:[[1,"label-container"],[2,"border","1px solid","padding","12px"],[1,"row","mb-2"],[1,"col-12"],[1,"d-flex","align-items-center","justify-content-between"],["width","105px",1,"border-0",3,"src"],[1,"mb-4"],[1,"row","mb-1"],[1,"text-center","fw-bold","border","p-2","fs-5","border-dark"],[1,"me-2"],[1,"col-12","text-center"],[3,"id"],[1,"col-6"],[1,"d-flex"],[1,"fw-bold","fs-6","me-1"],[1,"fw-bold","fs-6"],[1,"mt-2"],[1,"mb-0","fs-6"],[1,"fs-6"],[4,"ngIf"],[1,"row","px-6"],[1,"col-5","border","border-dark","border-end-0","text-center","p-2"],[1,"col-7","border","border-dark","p-2","text-center","fs-6"],[1,"fst-italic"],[1,"row"],[1,"col-5","pt-4",2,"padding-right","0px"],[1,"d-flex","justify-content-between"],[1,"col-7","text-center"],[1,"mt-1",3,"id"],[1,"table","table-sm","fs-6"],[1,"text-center",2,"width","5px"],[2,"width","150px"],[2,"width","50px"],[2,"width","25px"],[4,"ngFor","ngForOf"],[1,"row","mb-4"],[1,"text-center","fw-bold","border","p-2","fs-6","border-dark","text-uppercase"],[1,"mt-4"],[1,"text-center"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),e._UZ(6,"img",5),e.qZA(),e.TgZ(7,"div")(8,"h4"),e._uU(9),e.qZA()(),e.TgZ(10,"div"),e._UZ(11,"img",5),e.qZA()()()(),e.TgZ(12,"div",6),e._UZ(13,"hr"),e.qZA(),e.TgZ(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),e._uU(18),e.qZA(),e.TgZ(19,"span"),e._uU(20),e.qZA()()()(),e.TgZ(21,"div",7)(22,"div",10),e.O4$(),e._UZ(23,"svg",11),e.qZA()(),e.kcU(),e.TgZ(24,"div",6),e._UZ(25,"hr"),e.qZA(),e.TgZ(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),e._uU(30,"Penerima: "),e.qZA(),e.TgZ(31,"div",15),e._uU(32),e.qZA()(),e.TgZ(33,"div",16)(34,"span",15),e._uU(35,"Alamat Pengiriman:"),e.qZA(),e.TgZ(36,"div",17),e._uU(37),e.qZA()()(),e.TgZ(38,"div",12)(39,"div",13)(40,"div",14),e._uU(41,"Pengirim: "),e.qZA(),e.TgZ(42,"div")(43,"div",15),e._uU(44),e.qZA(),e.TgZ(45,"div",18),e._uU(46),e.qZA(),e.TgZ(47,"div",18),e._uU(48),e.qZA()()(),e._UZ(49,"div"),e.qZA()(),e.YNc(50,Te,8,2,"ng-container",19),e.TgZ(51,"div",20)(52,"div",21)(53,"div",15),e._uU(54,"CASHLESS"),e.qZA()(),e.TgZ(55,"div",22)(56,"small",23),e._uU(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),e.qZA()()(),e.TgZ(58,"div",24)(59,"div",25)(60,"div",26),e.YNc(61,Ce,6,1,"ng-container",19),e.TgZ(62,"div")(63,"span",15),e._uU(64,"COD: "),e.qZA(),e.TgZ(65,"span",18),e._uU(66),e.ALo(67,"number"),e.qZA()()(),e.YNc(68,Ze,7,4,"ng-container",19),e.YNc(69,be,6,1,"ng-container",19),e.qZA(),e.TgZ(70,"div",27),e.O4$(),e._UZ(71,"svg",28),e.qZA()()(),e.kcU(),e.TgZ(72,"div",24)(73,"div",3)(74,"table",29)(75,"thead")(76,"tr")(77,"th",30),e._uU(78,"No."),e.qZA(),e.TgZ(79,"th",31),e._uU(80,"Nama Produk"),e.qZA(),e.TgZ(81,"th",32),e._uU(82,"SKU"),e.qZA(),e.TgZ(83,"th",33),e._uU(84,"Qty"),e.qZA()()(),e.TgZ(85,"tbody"),e.YNc(86,Se,10,6,"tr",34),e.qZA()()()()()),2&t&&(e.xp6(6),e.Q6J("src",n.marketplaceLogo,e.LSH),e.xp6(3),e.Oqu(null==n.logistic?null:n.logistic.Service),e.xp6(2),e.Q6J("src",n.shippingLogo,e.LSH),e.xp6(7),e.hij(" ",(null==n.shippingLabel?null:n.shippingLabel.ChannelType)==(null==n.channelType?null:n.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),e.xp6(2),e.Oqu(null==n.logistic?null:n.logistic.Resi_Number),e.xp6(3),e.Q6J("id","RESI"+n.id),e.xp6(9),e.Oqu(null==n.recipient?null:n.recipient.Name),e.xp6(5),e.hij(" ",null==n.recipient?null:n.recipient.Address," "),e.xp6(7),e.Oqu(null==n.store?null:n.store.Name),e.xp6(2),e.Oqu(null==n.store?null:n.store.Phone),e.xp6(2),e.Oqu(null==n.store?null:n.store.Address),e.xp6(2),e.Q6J("ngIf",(null==n.recipient?null:n.recipient.City)&&(null==n.recipient?null:n.recipient.District)),e.xp6(11),e.Q6J("ngIf",null==n.shippingLabel?null:n.shippingLabel.Weight),e.xp6(5),e.hij("Rp. ",null!=n.shippingLabel&&n.shippingLabel.IsCOD?e.lcZ(67,18,null==n.shippingLabel||null==n.shippingLabel.SummaryPrice?null:n.shippingLabel.SummaryPrice.Total):0,""),e.xp6(2),e.Q6J("ngIf",(null==n.logistic?null:n.logistic.Batas_kirim)&&(null==n.logistic?null:n.logistic.Batas_kirim)!==n.minDate),e.xp6(1),e.Q6J("ngIf",null==n.shippingLabel?null:n.shippingLabel.OrderNumber),e.xp6(2),e.Q6J("id","NO"+n.id),e.xp6(15),e.Q6J("ngForOf",n.products))},dependencies:[h.ez,h.sg,h.O5,h.JJ,h.uU],styles:[".table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border:none!important}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-transform:capitalize;padding:4px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:none!important;padding:2px 2px 2px 5px!important;font-size:10px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.4509803922)}.label-container[_ngcontent-%COMP%]{width:465px;float:left}hr[_ngcontent-%COMP%]{opacity:.8;margin:0}"]}),r})();function ve(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"button",15),e.NdJ("click",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.onPrintMultipleShippingLabel())}),e._UZ(2,"i",16),e.TgZ(3,"span"),e._uU(4,"Print Shipping Label"),e.qZA()(),e.BQk()}}function xe(i,r){if(1&i&&(e.TgZ(0,"span",17),e._UZ(1,"img",18),e.qZA(),e._uU(2)),2&i){const a=r.item;e.xp6(1),e.Q6J("src",a.img,e.LSH),e.xp6(1),e.hij(" ",a.Name," ")}}function ye(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"input",25),e.NdJ("ngModelChange",function(n){e.CHM(a);const o=e.oxw().$implicit;return e.KtG(o.Selected=n)})("ngModelChange",function(){e.CHM(a);const n=e.oxw(3).ngIf,o=e.oxw();return e.KtG(o.onSelectReadyToShip(n))}),e.qZA(),e.BQk()}if(2&i){const a=e.oxw().$implicit;e.xp6(1),e.Q6J("ngModel",a.Selected)}}const Ae=function(){return["/menu/Order/detail"]},we=function(i,r){return{Number:i,Outlet:r}};function Ne(i,r){if(1&i&&(e.TgZ(0,"a",38),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,Ae))("queryParams",e.WLB(4,we,a.Number,a.Outlet)),e.xp6(1),e.Oqu(a.Number)}}function De(i,r){if(1&i&&(e.TgZ(0,"a",39),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit,t=e.oxw(3);e.Q6J("href",t.domain+a.ID,e.LSH),e.xp6(1),e.Oqu(a.Number)}}function Oe(i,r){if(1&i){const a=e.EpF();e.TgZ(0,"a",40),e.NdJ("click",function(){e.CHM(a);const n=e.oxw().$implicit,o=e.oxw(3);return e.KtG(o.onPrintShippingLabel(n.Number,n.ShopID,n.TypeID))}),e._UZ(1,"i",41),e.qZA()}}function Pe(i,r){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e.YNc(2,ye,2,1,"ng-container",1),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e.YNc(6,Ne,2,7,"a",33),e.YNc(7,De,2,2,"a",34),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.ALo(12,"number"),e.qZA(),e.TgZ(13,"td"),e._uU(14),e.ALo(15,"date"),e.qZA(),e.TgZ(16,"td"),e._UZ(17,"app-channel-logo",35),e.qZA(),e.TgZ(18,"td",36),e.YNc(19,Oe,2,0,"a",37),e.qZA()()),2&i){const a=r.$implicit,t=e.oxw(3);e.xp6(2),e.Q6J("ngIf",a.TypeID==t.channelType.ShopeeV2||a.TypeID==t.channelType.Tokopedia||a.TypeID==t.channelType.Tiktok),e.xp6(2),e.Oqu(a.Outlet),e.xp6(2),e.Q6J("ngIf",t.guidEmpty==a.ID),e.xp6(1),e.Q6J("ngIf",t.guidEmpty!=a.ID),e.xp6(2),e.Oqu(a.Customer),e.xp6(2),e.Oqu(e.lcZ(12,9,a.Amount)),e.xp6(3),e.Oqu(e.xi3(15,11,a.Date,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",a.TypeID),e.xp6(2),e.Q6J("ngIf",a.TypeID==t.channelType.ShopeeV2||a.TypeID==t.channelType.Tokopedia||a.TypeID==t.channelType.Tiktok||a.TypeID==t.channelType.Lazada)}}function Ie(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"div",20)(2,"table",21),e.NdJ("matSortChange",function(n){e.CHM(a);const o=e.oxw(2);return e.KtG(o.onSort(n))}),e.TgZ(3,"thead",22)(4,"tr",23)(5,"th",24)(6,"input",25),e.NdJ("ngModelChange",function(n){e.CHM(a);const o=e.oxw(2);return e.KtG(o.isCheckAll=n)})("ngModelChange",function(){e.CHM(a);const n=e.oxw().ngIf,o=e.oxw();return e.KtG(o.onSelectAllReadyToShip(n))}),e.qZA()(),e.TgZ(7,"th",26),e._uU(8,"Outlet"),e.qZA(),e.TgZ(9,"th",27),e._uU(10,"Order number"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Customer"),e.qZA(),e.TgZ(13,"th",28),e._uU(14,"Amount"),e.qZA(),e.TgZ(15,"th",29),e._uU(16,"Date"),e.qZA(),e.TgZ(17,"th",30),e._uU(18,"Channel"),e.qZA(),e._UZ(19,"th",31),e.qZA()(),e.TgZ(20,"tbody"),e.YNc(21,Pe,20,14,"tr",14),e.qZA()(),e.TgZ(22,"app-mat-paginator-no-count",32),e.NdJ("total",function(){e.CHM(a);const n=e.oxw(2);return e.KtG(n.getRowCount())})("next",function(){e.CHM(a);const n=e.oxw(2);return e.KtG(n.NextPage())})("previous",function(){e.CHM(a);const n=e.oxw(2);return e.KtG(n.PreviousPage())}),e.ALo(23,"async"),e.ALo(24,"async"),e.qZA()(),e.BQk()}if(2&i){const a=e.oxw().ngIf,t=e.oxw();let n;e.xp6(6),e.Q6J("ngModel",t.isCheckAll),e.xp6(15),e.Q6J("ngForOf",a),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",null==(n=e.lcZ(23,5,t.readyToShip$))?null:n.length)("paginationTotal",e.lcZ(24,7,t.paginationTotal$))}}function Me(i,r){if(1&i&&(e.ynx(0),e.YNc(1,Ie,25,9,"ng-container",19),e.BQk()),2&i){const a=r.ngIf;e.oxw();const t=e.MAs(30);e.xp6(1),e.Q6J("ngIf",a.length>0)("ngIfElse",t)}}function qe(i,r){1&i&&(e.TgZ(0,"div",42),e._UZ(1,"app-empty-state"),e.qZA())}function Ue(i,r){1&i&&(e.ynx(0),e.TgZ(1,"div",44),e._uU(2,"\xa0"),e.qZA(),e.BQk())}function Le(i,r){if(1&i&&(e.ynx(0),e._UZ(1,"app-shipping-label",43),e.YNc(2,Ue,3,0,"ng-container",1),e.BQk()),2&i){const a=r.$implicit,t=r.index,n=e.oxw();e.xp6(1),e.Q6J("shippingLabel",a)("id",t),e.xp6(1),e.Q6J("ngIf",t!==(null==n.shippingLabels?null:n.shippingLabels.length)-1)}}let Je=(()=>{var i;class r{constructor(t,n,o,l,_,x){this.http=t,this.localDataService=n,this.dialog=o,this.channelService=l,this.shippingLabelService=_,this.datePipe=x,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=f.x,this.guidEmpty=T.g.GuidEMpty,this.selectedReadyToShip=[],this.isCheckAll=!1}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.filter.From=t.Filter.From,this.filter.To=t.Filter.To,this.channels=t.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.getReadyToShip()})}getReadyToShip(t){this.sourceObs$=this.http.post("api/orders/GetReadyToShip",{Number:t,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To}).pipe((0,S.U)(o=>o.Data),(0,k.d)(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){const t=this.filterReadyToShipByChannel(this.selectedReadyToShip,f.x.Tokopedia),n=this.filterReadyToShipByChannel(this.selectedReadyToShip,f.x.ShopeeV2),o=[];t.length>0&&o.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(t))),n.length>0&&o.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(n))),(0,fe.D)(o).pipe((0,S.U)(l=>l.reduce((_,x)=>_.concat(x),[]))).subscribe({next:l=>{this.shippingLabels=l,this.printShippingLabel()}})}filterReadyToShipByChannel(t,n){return t.filter(o=>o.TypeID==n)}shippingLabelPayload(t){return t.map(n=>({ShopID:n.ShopID,OrderNumber:n.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(t,n,o){switch(o){case f.x.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(t);break;case f.x.Tiktok:this.shippingLabelService.printShippingLabelTiktok(t,n);break;case f.x.ShopeeV2:this.shippingLabelService.printShippingLabelShopee(t,n);break;case f.x.Lazada:this.shippingLabelService.printShippingLabelLazada(t,n)}}setPdfname(){if(this.selectedReadyToShip.length>1){const t=new Date,n=this.datePipe.transform(t,"dd-MM-yyyy"),o=this.datePipe.transform(t,"HH-mm");document.title=`ShippingLabel_${n}_${o}`}else document.title=`ShippingLabel_${this.selectedReadyToShip[0].Number}`}getSelectedReadyToShip(t){return t.filter(n=>n.Selected)}getRowCount(){this.paginationTotal$=this.http.post("api/orders/GetRowCount",{PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To}).pipe((0,S.U)(n=>n?.Total))}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getReadyToShip()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getReadyToShip()}onSort(t){if(""!=t.direction){if("date"==t.active){const n="asc"==t.direction;this.readyToShip$=this.readyToShip$.pipe((0,S.U)(o=>o.sort((l,_)=>T.g.compare(l.Date,_.Date,n))))}}else this.readyToShip$=this.sourceObs$}onSelectReadyToShip(t){this.selectedReadyToShip=this.getSelectedReadyToShip(t)}onSelectAllReadyToShip(t){t=t.map(n=>((n.TypeID==f.x.Tokopedia||n.TypeID==f.x.ShopeeV2||n.TypeID==f.x.Lazada)&&(n.Selected=this.isCheckAll),n)),this.selectedReadyToShip=this.getSelectedReadyToShip(t)}}return(i=r).\u0275fac=function(t){return new(t||i)(e.Y36(c.O),e.Y36(s.T),e.Y36(d.uw),e.Y36(p.T),e.Y36($),e.Y36(h.uU))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-ready-to-ship"]],decls:33,vars:13,consts:[["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[4,"ngIf"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["EMPTY_STATE",""],[1,"print_containers"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModel","ngModelChange"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","date",2,"width","130px"],[2,"width","114px"],[2,"width","10px"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"shippingLabel","id"],[1,"page-break"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(l){return n.getReadyToShip(l)}),e.TgZ(1,"actions"),e.YNc(2,ve,5,0,"ng-container",1),e.qZA(),e.TgZ(3,"filters")(4,"div",2)(5,"div")(6,"h6"),e._uU(7,"Channel"),e.qZA(),e.TgZ(8,"ng-select",3),e.NdJ("ngModelChange",function(l){return n.filter.ListChannelID=l}),e.YNc(9,xe,3,2,"ng-template",4),e.qZA()(),e.TgZ(10,"div")(11,"h6"),e._uU(12,"Page Number"),e.qZA(),e.TgZ(13,"input",5),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(14,"div")(15,"h6"),e._uU(16,"Page Size"),e.qZA(),e.TgZ(17,"input",6),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()(),e.TgZ(18,"div")(19,"h6"),e._uU(20,"From/To"),e.qZA(),e.TgZ(21,"datepicker",7),e.NdJ("dateChange",function(l){return n.filter.From=l}),e.qZA(),e.TgZ(22,"datepicker",8),e.NdJ("dateChange",function(l){return n.filter.To=l}),e.qZA()()()(),e.TgZ(23,"content")(24,"div",9)(25,"div",10)(26,"div",11),e.YNc(27,Me,2,2,"ng-container",1),e.ALo(28,"async"),e.YNc(29,qe,2,0,"ng-template",null,12,e.W1O),e.qZA()()()()(),e.TgZ(31,"div",13),e.YNc(32,Le,3,3,"ng-container",14),e.qZA()),2&t&&(e.xp6(2),e.Q6J("ngIf",n.selectedReadyToShip.length>0),e.xp6(6),e.Q6J("clearable",!0)("multiple",!0)("items",n.channels)("ngModel",n.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(5),e.Q6J("ngIf",e.lcZ(28,11,n.readyToShip$)),e.xp6(5),e.Q6J("ngForOf",n.shippingLabels))},dependencies:[h.sg,h.O5,m.Fj,m.wV,m.Wl,m.JJ,m.On,N.p,Z.rH,b.w9,b.ir,I.n,U,L.s,v.YE,v.nU,M.Q,z,h.Ov,h.JJ,h.uU],styles:[".print_containers[_ngcontent-%COMP%]{display:none}@media print{.print_containers[_ngcontent-%COMP%]{display:block}}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]}),r})();function ke(i,r){if(1&i&&(e.TgZ(0,"span",13),e._UZ(1,"img",14),e.qZA(),e._uU(2)),2&i){const a=r.item;e.xp6(1),e.Q6J("src",a.img,e.LSH),e.xp6(1),e.hij(" ",a.Name," ")}}const Fe=function(){return["/menu/Order/detail"]},Qe=function(i,r){return{Number:i,Outlet:r}};function Ee(i,r){if(1&i&&(e.TgZ(0,"a",29),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,Fe))("queryParams",e.WLB(4,Qe,a.Number,a.Outlet)),e.xp6(1),e.Oqu(a.Number)}}function Re(i,r){if(1&i&&(e.TgZ(0,"a",30),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit,t=e.oxw(2);e.Q6J("href",t.domain+a.ID,e.LSH),e.xp6(1),e.Oqu(a.Number)}}function Ye(i,r){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Ee,2,7,"a",26),e.YNc(5,Re,2,2,"a",27),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._UZ(15,"app-channel-logo",28),e.qZA()()),2&i){const a=r.$implicit,t=e.oxw(2);e.xp6(2),e.Oqu(a.Outlet),e.xp6(2),e.Q6J("ngIf",t.hasGuidEmpty(a.ID)),e.xp6(1),e.Q6J("ngIf",!t.hasGuidEmpty(a.ID)),e.xp6(2),e.Oqu(a.Customer),e.xp6(2),e.Oqu(e.lcZ(10,7,a.Amount)),e.xp6(3),e.Oqu(e.xi3(13,9,a.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",a.TypeID)}}function Ge(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"div",15)(2,"table",16),e.NdJ("matSortChange",function(n){e.CHM(a);const o=e.oxw();return e.KtG(o.onSort(n))}),e.TgZ(3,"thead",17)(4,"tr",18)(5,"th",19),e._uU(6,"Outlet"),e.qZA(),e.TgZ(7,"th",20),e._uU(8,"Order number"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Customer"),e.qZA(),e.TgZ(11,"th",21),e._uU(12,"Amount"),e.qZA(),e.TgZ(13,"th",22),e._uU(14,"Created On"),e.qZA(),e.TgZ(15,"th",23),e._uU(16,"Channel"),e.qZA()()(),e.TgZ(17,"tbody"),e.YNc(18,Ye,16,12,"tr",24),e.qZA()(),e.TgZ(19,"app-mat-paginator-no-count",25),e.NdJ("total",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.StoreRowsCountAPIResult())})("next",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.NextPage())})("previous",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.PreviousPage())}),e.qZA()(),e.BQk()}if(2&i){const a=e.oxw();e.xp6(18),e.Q6J("ngForOf",a.data),e.xp6(1),e.Q6J("filter",a.filter)("totaldata",a.totaldata)("paginationTotal",a.paginationTotal)}}function He(i,r){1&i&&(e.TgZ(0,"div",31),e._UZ(1,"app-empty-state"),e.qZA())}let $e=(()=>{var i;class r{constructor(t,n,o){this.http=t,this.localDataService=n,this.channelService=o,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=f.x}ngOnInit(){this.Load()}getChannelLogo(t){return T.g.getChannelLogoByTypeId(t)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.filter.From=t.Filter.From,this.filter.To=t.Filter.To,this.channels=t.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}hasGuidEmpty(t){return t==T.g.GuidEMpty}Get(t){this.http.post("api/orders/GetShipped",{Number:t,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To}).subscribe(o=>{this.data=o.Data,this.sourceData=[...o.Data],this.totaldata=this.data.length})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To}).subscribe(n=>{this.paginationTotal=n.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(t){if(""!=t.direction){if("created"==t.active){const n="asc"==t.direction;this.data=this.data.sort((o,l)=>T.g.compare(o.Created,l.Created,n))}}else this.data=this.sourceData}}return(i=r).\u0275fac=function(t){return new(t||i)(e.Y36(c.O),e.Y36(s.T),e.Y36(p.T))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-shipped"]],decls:28,vars:10,consts:[["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[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"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,n){if(1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(l){return n.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return n.filter.ListChannelID=l}),e.YNc(7,ke,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"Page Number"),e.qZA(),e.TgZ(11,"input",4),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Size"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"From/To"),e.qZA(),e.TgZ(19,"datepicker",6),e.NdJ("dateChange",function(l){return n.filter.From=l}),e.qZA(),e.TgZ(20,"datepicker",7),e.NdJ("dateChange",function(l){return n.filter.To=l}),e.qZA()()()(),e.TgZ(21,"content")(22,"div",8)(23,"div",9)(24,"div",10),e.YNc(25,Ge,20,4,"ng-container",11),e.YNc(26,He,2,0,"ng-template",null,12,e.W1O),e.qZA()()()()()),2&t){const o=e.MAs(27);e.xp6(6),e.Q6J("clearable",!0)("multiple",!0)("items",n.channels)("ngModel",n.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(5),e.Q6J("ngIf",n.data&&n.data.length>0)("ngIfElse",o)}},dependencies:[h.sg,h.O5,m.Fj,m.wV,m.JJ,m.On,N.p,Z.rH,b.w9,b.ir,I.n,U,L.s,v.YE,v.nU,M.Q,h.JJ,h.uU]}),r})();var Be=g(4750);function ze(i,r){if(1&i&&(e.TgZ(0,"span",13),e._UZ(1,"img",14),e.qZA(),e._uU(2)),2&i){const a=r.item;e.xp6(1),e.Q6J("src",a.img,e.LSH),e.xp6(1),e.hij(" ",a.Name," ")}}const Ke=function(){return["/menu/Order/detail"]},je=function(i,r){return{Number:i,Outlet:r}};function Ve(i,r){if(1&i&&(e.TgZ(0,"a",29),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,Ke))("queryParams",e.WLB(4,je,a.Number,a.Outlet)),e.xp6(1),e.Oqu(a.Number)}}function We(i,r){if(1&i&&(e.TgZ(0,"a",30),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit,t=e.oxw(2);e.Q6J("href",t.customerInfoUrl+a.ID,e.LSH),e.xp6(1),e.Oqu(a.Number)}}function Xe(i,r){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Ve,2,7,"a",26),e.YNc(5,We,2,2,"a",27),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._UZ(15,"app-channel-logo",28),e.qZA()()),2&i){const a=r.$implicit,t=e.oxw(2);e.xp6(2),e.Oqu(a.Outlet),e.xp6(2),e.Q6J("ngIf",t.hasGuidEmpty(a.ID)),e.xp6(1),e.Q6J("ngIf",!t.hasGuidEmpty(a.ID)),e.xp6(2),e.Oqu(a.Customer),e.xp6(2),e.Oqu(e.lcZ(10,7,a.Amount)),e.xp6(3),e.Oqu(e.xi3(13,9,a.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",a.TypeID)}}function et(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"div",15)(2,"table",16),e.NdJ("matSortChange",function(n){e.CHM(a);const o=e.oxw();return e.KtG(o.onSort(n))}),e.TgZ(3,"thead",17)(4,"tr",18)(5,"th",19),e._uU(6,"Outlet"),e.qZA(),e.TgZ(7,"th",20),e._uU(8,"Order number"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Customer"),e.qZA(),e.TgZ(11,"th",21),e._uU(12,"Amount"),e.qZA(),e.TgZ(13,"th",22),e._uU(14,"Created On"),e.qZA(),e.TgZ(15,"th",23),e._uU(16,"Channel"),e.qZA()()(),e.TgZ(17,"tbody"),e.YNc(18,Xe,16,12,"tr",24),e.qZA()(),e.TgZ(19,"app-mat-paginator-no-count",25),e.NdJ("total",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.StoreRowsCountAPIResult())})("next",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.NextPage())})("previous",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.PreviousPage())}),e.qZA()(),e.BQk()}if(2&i){const a=e.oxw();e.xp6(18),e.Q6J("ngForOf",a.data),e.xp6(1),e.Q6J("filter",a.filter)("totaldata",a.totaldata)("paginationTotal",a.paginationTotal)}}function tt(i,r){1&i&&(e.TgZ(0,"div",31),e._UZ(1,"app-empty-state"),e.qZA())}let nt=(()=>{var i;class r{constructor(t,n,o){this.http=t,this.authService=n,this.channelService=o,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=f.x}ngOnInit(){this.Load()}hasGuidEmpty(t){return t==T.g.GuidEMpty}getChannelLogo(t){return T.g.getChannelLogoByTypeId(t)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.filter.From=t.Filter.From,this.filter.To=t.Filter.To,this.channels=t.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(t){this.http.post("api/orders/GetDelivered ",{Number:t,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To}).subscribe(o=>{this.data=o.Data,this.sourceData=[...o.Data],this.totaldata=this.data.length})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To}).subscribe(n=>{this.paginationTotal=n.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(t){if(""!=t.direction){if("created"==t.active){const n="asc"==t.direction;this.data=this.data.sort((o,l)=>T.g.compare(o.Created,l.Created,n))}}else this.data=this.sourceData}}return(i=r).\u0275fac=function(t){return new(t||i)(e.Y36(c.O),e.Y36(Be.e),e.Y36(p.T))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-delivered"]],decls:28,vars:11,consts:[["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"hideSearchBox","onSubmit"],["container","",1,""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[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"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,n){if(1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(l){return n.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return n.filter.ListChannelID=l}),e.YNc(7,ze,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"Page Number"),e.qZA(),e.TgZ(11,"input",4),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Size"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"From/To"),e.qZA(),e.TgZ(19,"datepicker",6),e.NdJ("dateChange",function(l){return n.filter.From=l}),e.qZA(),e.TgZ(20,"datepicker",7),e.NdJ("dateChange",function(l){return n.filter.To=l}),e.qZA()()()(),e.TgZ(21,"content")(22,"div",8)(23,"div",9)(24,"div",10),e.YNc(25,et,20,4,"ng-container",11),e.YNc(26,tt,2,0,"ng-template",null,12,e.W1O),e.qZA()()()()()),2&t){const o=e.MAs(27);e.Q6J("hideSearchBox",!0),e.xp6(6),e.Q6J("clearable",!0)("multiple",!0)("items",n.channels)("ngModel",n.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(5),e.Q6J("ngIf",n.data&&n.data.length>0)("ngIfElse",o)}},dependencies:[h.sg,h.O5,m.Fj,m.wV,m.JJ,m.On,N.p,Z.rH,b.w9,b.ir,I.n,U,L.s,v.YE,v.nU,M.Q,h.JJ,h.uU]}),r})();function it(i,r){if(1&i&&(e.TgZ(0,"span",13),e._UZ(1,"img",14),e.qZA(),e._uU(2)),2&i){const a=r.item;e.xp6(1),e.Q6J("src",a.img,e.LSH),e.xp6(1),e.hij(" ",a.Name," ")}}const at=function(){return["/menu/Order/detail"]},ot=function(i,r){return{Number:i,Outlet:r}};function rt(i,r){if(1&i&&(e.TgZ(0,"a",30),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,at))("queryParams",e.WLB(4,ot,a.Number,a.Outlet)),e.xp6(1),e.Oqu(a.Number)}}function lt(i,r){if(1&i&&(e.TgZ(0,"a",31),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit,t=e.oxw(2);e.Q6J("href",t.domain+a.ID,e.LSH),e.xp6(1),e.Oqu(a.Number)}}function st(i,r){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,rt,2,7,"a",27),e.YNc(5,lt,2,2,"a",28),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._uU(15),e.qZA(),e.TgZ(16,"td"),e._UZ(17,"app-channel-logo",29),e.qZA()()),2&i){const a=r.$implicit,t=e.oxw(2);e.xp6(2),e.Oqu(a.Outlet),e.xp6(2),e.Q6J("ngIf",t.hasGuidEmpty(a.ID)),e.xp6(1),e.Q6J("ngIf",!t.hasGuidEmpty(a.ID)),e.xp6(2),e.Oqu(a.Customer),e.xp6(2),e.Oqu(e.lcZ(10,8,a.Amount)),e.xp6(3),e.Oqu(e.xi3(13,10,a.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Oqu(a.State),e.xp6(2),e.Q6J("typeId",a.TypeID)}}function pt(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"div",15)(2,"table",16),e.NdJ("matSortChange",function(n){e.CHM(a);const o=e.oxw();return e.KtG(o.onSort(n))}),e.TgZ(3,"thead",17)(4,"tr",18)(5,"th",19),e._uU(6,"Outlet"),e.qZA(),e.TgZ(7,"th",20),e._uU(8,"Order number"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Customer"),e.qZA(),e.TgZ(11,"th",21),e._uU(12,"Amount"),e.qZA(),e.TgZ(13,"th",22),e._uU(14,"Created On"),e.qZA(),e.TgZ(15,"th",23),e._uU(16,"Status"),e.qZA(),e.TgZ(17,"th",24),e._uU(18,"Channel"),e.qZA()()(),e.TgZ(19,"tbody"),e.YNc(20,st,18,13,"tr",25),e.qZA()(),e.TgZ(21,"app-mat-paginator-no-count",26),e.NdJ("total",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.StoreRowsCountAPIResult())})("next",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.NextPage())})("previous",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.PreviousPage())}),e.qZA()(),e.BQk()}if(2&i){const a=e.oxw();e.xp6(20),e.Q6J("ngForOf",a.data),e.xp6(1),e.Q6J("filter",a.filter)("totaldata",a.totaldata)("paginationTotal",a.paginationTotal)}}function ct(i,r){1&i&&(e.TgZ(0,"div",32),e._UZ(1,"app-empty-state"),e.qZA())}let dt=(()=>{var i;class r{constructor(t,n,o){this.http=t,this.localDataService=n,this.channelService=o,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}hasGuidEmpty(t){return t==T.g.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.filter.From=t.Filter.From,this.filter.To=t.Filter.To,this.channels=t.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(t){this.http.post("api/orders/GetAll ",{Number:t,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To}).subscribe(o=>{this.data=o.Data,this.sourceData=[...o.Data],this.totaldata=this.data.length})}changePage(t){this.filter=t,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To}).subscribe(n=>{this.paginationTotal=n.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(t){if(""!=t.direction){if("created"==t.active){const n="asc"==t.direction;this.data=this.data.sort((o,l)=>T.g.compare(o.Created,l.Created,n))}}else this.data=this.sourceData}}return(i=r).\u0275fac=function(t){return new(t||i)(e.Y36(c.O),e.Y36(s.T),e.Y36(p.T))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-all-order"]],decls:28,vars:10,consts:[["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[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","135px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,n){if(1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(l){return n.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return n.filter.ListChannelID=l}),e.YNc(7,it,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"Page Number"),e.qZA(),e.TgZ(11,"input",4),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Size"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"From/To"),e.qZA(),e.TgZ(19,"datepicker",6),e.NdJ("dateChange",function(l){return n.filter.From=l}),e.qZA(),e.TgZ(20,"datepicker",7),e.NdJ("dateChange",function(l){return n.filter.To=l}),e.qZA()()()(),e.TgZ(21,"content")(22,"div",8)(23,"div",9)(24,"div",10),e.YNc(25,pt,22,4,"ng-container",11),e.YNc(26,ct,2,0,"ng-template",null,12,e.W1O),e.qZA()()()()()),2&t){const o=e.MAs(27);e.xp6(6),e.Q6J("clearable",!0)("multiple",!0)("items",n.channels)("ngModel",n.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(5),e.Q6J("ngIf",n.data&&n.data.length>0)("ngIfElse",o)}},dependencies:[h.sg,h.O5,m.Fj,m.wV,m.JJ,m.On,N.p,Z.rH,b.w9,b.ir,I.n,U,L.s,v.YE,v.nU,M.Q,h.JJ,h.uU]}),r})();function gt(i,r){if(1&i&&(e.TgZ(0,"span",14),e._UZ(1,"img",15),e.qZA(),e._uU(2)),2&i){const a=r.item;e.xp6(1),e.Q6J("src",a.img,e.LSH),e.xp6(1),e.hij(" ",a.Name," ")}}const ht=function(){return["/menu/Order/detail"]},ut=function(i,r){return{Number:i,Outlet:r}};function _t(i,r){if(1&i&&(e.TgZ(0,"a",30),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,ht))("queryParams",e.WLB(4,ut,a.Number,a.Outlet)),e.xp6(1),e.Oqu(a.Number)}}function mt(i,r){if(1&i&&(e.TgZ(0,"a",31),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit,t=e.oxw(2);e.Q6J("href",t.domain+a.ID,e.LSH),e.xp6(1),e.Oqu(a.Number)}}function ft(i,r){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,_t,2,7,"a",27),e.YNc(5,mt,2,2,"a",28),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._UZ(15,"app-channel-logo",29),e.qZA()()),2&i){const a=r.$implicit,t=e.oxw(2);e.xp6(2),e.Oqu(a.Outlet),e.xp6(2),e.Q6J("ngIf",t.hasGuidEmpty(a.ID)),e.xp6(1),e.Q6J("ngIf",!t.hasGuidEmpty(a.ID)),e.xp6(2),e.Oqu(a.Customer),e.xp6(2),e.Oqu(e.lcZ(10,7,a.Amount)),e.xp6(3),e.Oqu(e.xi3(13,9,a.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",a.TypeID)}}function Tt(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"div",16)(2,"table",17),e.NdJ("matSortChange",function(n){e.CHM(a);const o=e.oxw();return e.KtG(o.onSort(n))}),e.TgZ(3,"thead",18)(4,"tr",19)(5,"th",20),e._uU(6,"Outlet"),e.qZA(),e.TgZ(7,"th",21),e._uU(8,"Order number"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Customer"),e.qZA(),e.TgZ(11,"th",22),e._uU(12,"Amount"),e.qZA(),e.TgZ(13,"th",23),e._uU(14,"Created On"),e.qZA(),e.TgZ(15,"th",24),e._uU(16,"Channel"),e.qZA()()(),e.TgZ(17,"tbody"),e.YNc(18,ft,16,12,"tr",25),e.qZA()(),e.TgZ(19,"app-mat-paginator-no-count",26),e.NdJ("total",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.StoreRowsCountAPIResult())})("next",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.NextPage())})("previous",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.PreviousPage())}),e.qZA()(),e.BQk()}if(2&i){const a=e.oxw();e.xp6(18),e.Q6J("ngForOf",a.data),e.xp6(1),e.Q6J("filter",a.filter)("totaldata",a.totaldata)("paginationTotal",a.paginationTotal)}}function Ct(i,r){1&i&&(e.TgZ(0,"div",32),e._UZ(1,"app-empty-state"),e.qZA())}let Zt=(()=>{var i;class r{constructor(t,n,o){this.http=t,this.localDataService=n,this.channelService=o,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],Note:"",From:null,To:null},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}hasGuidEmpty(t){return t==T.g.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(t=>{this.filter.PageNumber=t.Filter.PageNumber,this.filter.PageSize=t.Filter.RowCount,this.filter.From=t.Filter.From,this.filter.To=t.Filter.To,this.channels=t.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(t){this.http.post("api/orders/GetCancelled ",{Number:t,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,Note:this.filter.Note,From:this.filter.From,To:this.filter.To}).subscribe(o=>{this.data=o.Data,this.sourceData=[...o.Data],this.totaldata=this.data.length})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To}).subscribe(n=>{this.paginationTotal=n.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(t){return T.g.getChannelLogoByTypeId(t)}onSort(t){if(""!=t.direction){if("created"==t.active){const n="asc"==t.direction;this.data=this.data.sort((o,l)=>T.g.compare(o.Created,l.Created,n))}}else this.data=this.sourceData}}return(i=r).\u0275fac=function(t){return new(t||i)(e.Y36(c.O),e.Y36(s.T),e.Y36(p.T))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-cancelled"]],decls:32,vars:11,consts:[["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container","",1,""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],["type","text","name","Note",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[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"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,n){if(1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(l){return n.Get(l)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(l){return n.filter.ListChannelID=l}),e.YNc(7,gt,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"Page Number"),e.qZA(),e.TgZ(11,"input",4),e.NdJ("ngModelChange",function(l){return n.filter.PageNumber=l}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Size"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(l){return n.filter.PageSize=l}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Note"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(l){return n.filter.Note=l}),e.qZA()(),e.TgZ(20,"div")(21,"h6"),e._uU(22,"From/To"),e.qZA(),e.TgZ(23,"datepicker",7),e.NdJ("dateChange",function(l){return n.filter.From=l}),e.qZA(),e.TgZ(24,"datepicker",8),e.NdJ("dateChange",function(l){return n.filter.To=l}),e.qZA()()()(),e.TgZ(25,"content")(26,"div",9)(27,"div",10)(28,"div",11),e.YNc(29,Tt,20,4,"ng-container",12),e.YNc(30,Ct,2,0,"ng-template",null,13,e.W1O),e.qZA()()()()()),2&t){const o=e.MAs(31);e.xp6(6),e.Q6J("clearable",!0)("multiple",!0)("items",n.channels)("ngModel",n.filter.ListChannelID),e.xp6(5),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.PageSize),e.xp6(4),e.Q6J("ngModel",n.filter.Note),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(5),e.Q6J("ngIf",n.data&&n.data.length>0)("ngIfElse",o)}},dependencies:[h.sg,h.O5,m.Fj,m.wV,m.JJ,m.On,N.p,Z.rH,b.w9,b.ir,I.n,U,L.s,v.YE,v.nU,M.Q,h.JJ,h.uU]}),r})();var bt=g(1657),F=function(i){return i[i.DoNothing=0]="DoNothing",i[i.New=1]="New",i[i.Update=2]="Update",i}(F||{}),St=g(5993),Q=g(8034),E=g(8257),K=g(2596);function vt(i,r){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"div",28)(2,"button",29),e.NdJ("click",function(){e.CHM(a),e.oxw();const n=e.MAs(11);return e.KtG(n.previous())}),e._uU(3," Back "),e.qZA(),e.TgZ(4,"button",30),e.NdJ("click",function(){e.CHM(a);const n=e.oxw(),o=e.MAs(11);return e.KtG(n.onNext(o))}),e._uU(5," Next "),e.qZA(),e.TgZ(6,"button",31),e._UZ(7,"b",32),e.qZA(),e.TgZ(8,"ul",33)(9,"li",34)(10,"a",35),e.NdJ("click",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.exportOrders())}),e._uU(11," Export "),e.qZA()()()(),e.BQk()}if(2&i){const a=e.oxw();e.xp6(4),e.Q6J("disabled",a.checkDisabledNextFilter())}}function xt(i,r){if(1&i){const a=e.EpF();e.TgZ(0,"button",36),e.NdJ("click",function(){e.CHM(a);const n=e.oxw(),o=e.MAs(11);return e.KtG(n.onNext(o))}),e._uU(1," Next "),e.qZA()}if(2&i){const a=e.oxw();e.Q6J("disabled",a.checkDisabledNextFilter())}}function yt(i,r){if(1&i){const a=e.EpF();e.TgZ(0,"button",37),e.NdJ("click",function(){e.CHM(a);const n=e.oxw(),o=e.MAs(11);return e.KtG(n.onNew(o))}),e._UZ(1,"i",38),e._uU(2," New "),e.qZA()}}function At(i,r){1&i&&e._uU(0,"Filter")}function wt(i,r){if(1&i&&(e.TgZ(0,"ng-option",39),e._UZ(1,"img",40),e._uU(2),e.qZA()),2&i){const a=r.$implicit;e.Q6J("value",a.ID),e.xp6(1),e.s9C("src",a.Img,e.LSH),e.xp6(1),e.hij("",a.Name," ")}}function Nt(i,r){1&i&&e._uU(0,"Preview")}function Dt(i,r){if(1&i&&(e.TgZ(0,"th",58),e._uU(1),e.qZA()),2&i){const a=e.oxw(2);e.xp6(1),e.Oqu(0==a.getTypeID()?"Last Status Update":"Created Date")}}function Ot(i,r){if(1&i&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"date"),e.qZA()),2&i){const a=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,a.Date,"dd MMM yyyy HH:mm:ss"),"")}}function Pt(i,r){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&i){const a=e.oxw().$implicit;e.xp6(1),e.hij(" ",a.ActionString," ")}}function It(i,r){if(1&i&&(e.TgZ(0,"li"),e._uU(1),e.qZA()),2&i){const a=r.$implicit;e.xp6(1),e.hij("",a," ")}}function Mt(i,r){if(1&i&&(e.TgZ(0,"ul",63),e.YNc(1,It,2,1,"li",59),e.qZA()),2&i){const a=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",a.ActionString)}}function qt(i,r){if(1&i&&(e.TgZ(0,"span",64),e._UZ(1,"i",65),e.qZA()),2&i){const a=e.oxw().$implicit;e.hYB("title","Delivery : ",a.DeliveryState," \nPayment : ",a.PaymentState,"")}}const Ut=function(i,r){return{"over-due-today":i,"over-due":r}};function Lt(i,r){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.YNc(5,Ot,3,4,"td",1),e.TgZ(6,"td")(7,"span"),e._uU(8),e.qZA(),e._uU(9),e.qZA(),e.TgZ(10,"td",60)(11,"span"),e._uU(12),e.qZA(),e._uU(13),e.qZA(),e.TgZ(14,"td"),e.YNc(15,Pt,2,1,"span",1),e.YNc(16,Mt,2,1,"ul",61),e.qZA(),e.TgZ(17,"td"),e.YNc(18,qt,2,2,"span",62),e.qZA()()),2&i){const a=r.$implicit,t=r.index,n=e.oxw(3);e.xp6(2),e.Oqu(t+1),e.xp6(2),e.Oqu(a.Number),e.xp6(1),e.Q6J("ngIf",n.getTypeID()!=n.channelType.ShopeeV2),e.xp6(3),e.hij("",a.ChannelStatus," - "),e.xp6(1),e.Oqu(a.ChannelStatusDescription),e.xp6(1),e.Q6J("ngClass",e.WLB(12,Ut,(null==a?null:a.Action)==n.actionPreviewOrder.Update,(null==a?null:a.Action)==n.actionPreviewOrder.New))("matTooltip",91==a.POSStatus||"Conflict"==a.POSStatusDescription?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),e.xp6(2),e.hij("",a.POSStatus," - "),e.xp6(1),e.hij("",a.POSStatusDescription," "),e.xp6(2),e.Q6J("ngIf",1==a.ActionString.length),e.xp6(1),e.Q6J("ngIf",a.ActionString.length>1),e.xp6(2),e.Q6J("ngIf",99!=a.ChannelStatus&&99!=a.POSStatus)}}function Jt(i,r){if(1&i&&(e.ynx(0),e.YNc(1,Lt,19,15,"tr",59),e.BQk()),2&i){const a=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",a.displayedPreviewData)}}function kt(i,r){1&i&&(e.TgZ(0,"tr",66)(1,"td",67)(2,"div",68),e._UZ(3,"i",69),e.qZA(),e.TgZ(4,"h4",70),e._uU(5,"There is no order to processed"),e.qZA()()())}function Ft(i,r){if(1&i){const a=e.EpF();e.TgZ(0,"div",41)(1,"div",42)(2,"div",43)(3,"ul",44)(4,"li",45)(5,"button",46),e.NdJ("click",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.filterPreviewData(n.previewStatus.ALL))}),e._uU(6),e.qZA()(),e.TgZ(7,"li",45)(8,"button",47),e.NdJ("click",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.filterPreviewData(n.previewStatus.SYNC))}),e._uU(9),e.qZA()(),e.TgZ(10,"li",45)(11,"button",48),e.NdJ("click",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.filterPreviewData(n.previewStatus.WRONG))}),e._uU(12),e.qZA()(),e.TgZ(13,"li",45)(14,"button",49),e.NdJ("click",function(){e.CHM(a);const n=e.oxw();return e.KtG(n.filterPreviewData(n.previewStatus.UNSYNC))}),e._uU(15),e.qZA()()()(),e.TgZ(16,"table",50)(17,"thead",51)(18,"tr"),e._UZ(19,"th",52),e.TgZ(20,"th",53),e._uU(21,"Number"),e.qZA(),e.YNc(22,Dt,2,1,"th",54),e.TgZ(23,"th",55),e._uU(24,"Channel Status"),e.qZA(),e.TgZ(25,"th",55),e._uU(26,"POS Status"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Action"),e.qZA(),e._UZ(29,"th",52),e.qZA()(),e.TgZ(30,"tbody"),e.YNc(31,Jt,2,1,"ng-container",56),e.YNc(32,kt,6,0,"ng-template",null,57,e.W1O),e.qZA()()()()}if(2&i){const a=e.MAs(33),t=e.oxw();e.xp6(5),e.Q6J("ngClass","all"==t.pillStatus?"btn-secondary text-white":"btn-outline-dark"),e.xp6(1),e.hij("All (",t.allData,")"),e.xp6(2),e.Q6J("ngClass","sync"==t.pillStatus?"btn-success":"btn-outline-success"),e.xp6(1),e.hij("Existing (",t.syncData,")"),e.xp6(2),e.Q6J("ngClass","wrong"==t.pillStatus?"btn-warning text-white":"btn-outline-warning"),e.xp6(1),e.hij("Wrong Status (",t.wrongData,")"),e.xp6(2),e.Q6J("ngClass","unsync"==t.pillStatus?"btn-danger":"btn-outline-danger"),e.xp6(1),e.hij("Missing (",t.unsyncData,")"),e.xp6(7),e.Q6J("ngIf",t.getTypeID()!=t.channelType.ShopeeV2),e.xp6(9),e.Q6J("ngIf",t.displayedPreviewData.length>0)("ngIfElse",a)}}function Qt(i,r){1&i&&e._uU(0,"Finish")}const Et=function(i){return{"over-due":i}};function Rt(i,r){if(1&i&&(e.TgZ(0,"tr",73)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA()()),2&i){const a=r.$implicit,t=r.index;e.Q6J("ngClass",e.VKq(5,Et,a.Exception)),e.xp6(2),e.Oqu(t+1),e.xp6(2),e.Oqu(a.Number),e.xp6(2),e.Oqu(a.Status),e.xp6(2),e.Oqu(a.Exception)}}function Yt(i,r){if(1&i&&(e.ynx(0),e.YNc(1,Rt,9,7,"tr",72),e.BQk()),2&i){const a=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",a.downloadData)}}function Gt(i,r){1&i&&(e.TgZ(0,"tr",66)(1,"td",67)(2,"div",68),e._UZ(3,"i",69),e.qZA(),e.TgZ(4,"h4",70),e._uU(5,"There is no order to processed"),e.qZA()()())}function Ht(i,r){if(1&i&&(e.TgZ(0,"div",41)(1,"div",42)(2,"table",50)(3,"thead",51)(4,"tr"),e._UZ(5,"th",52),e.TgZ(6,"th"),e._uU(7,"Order Number"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Status"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Exception"),e.qZA()()(),e.TgZ(12,"tbody"),e.YNc(13,Yt,2,1,"ng-container",56),e.YNc(14,Gt,6,0,"ng-template",null,71,e.W1O),e.qZA()()()()),2&i){const a=e.MAs(15),t=e.oxw();e.xp6(13),e.Q6J("ngIf",(null==t.downloadData?null:t.downloadData.length)>0)("ngIfElse",a)}}function $t(i,r){1&i&&e._UZ(0,"i",74)}function Bt(i,r){1&i&&e._UZ(0,"i",75)}function zt(i,r){1&i&&e._UZ(0,"i",76)}var y=function(i){return i.ALL="all",i.SYNC="sync",i.WRONG="wrong",i.UNSYNC="unsync",i}(y||{});let Kt=(()=>{var i;class r{constructor(t,n,o,l,_,x){this.http=t,this.toastr=n,this.datePipe=o,this.url=l,this.productService=_,this.orderService=x,this.pageTitle="Download to POS",this.pillStatus="all",this.displayedPreviewData=[],this.previewData=[],this.channelType=f.x,this.previewStatus=y,this.currentState="filter",this.wrongData=0,this.unsyncData=0,this.syncData=0,this.allData=0,this.actionPreviewOrder=F}ngOnInit(){this.initPageLoader(),this.url.queryParams.subscribe(t=>{this.channelID=t.ChannelID,this.startDate=new Date(t.Date),this.endDate=new Date(t.Date)})}initPageLoader(){this.productService.loader().subscribe(t=>{this.channelOptions=t.Options.Channel})}onDownload(t){this.http.post("/api/Orders/Download",{ID:this.channelID,From:this.startDate,To:this.endDate,ListPreview:this.downloadedPreviewData}).subscribe(o=>{this.downloadData=o.Body,this.onStepperNext(t)})}onPreview(t){this.validateDatePreview()&&this.http.post("/api/Orders/Preview",{ID:this.channelID,From:this.startDate,To:this.endDate}).subscribe(o=>{0!=o.length?(this.previewData=o,this.groupingPreviewData(),this.filterPreviewData(y.ALL),this.initLengthStatusData(),this.onStepperNext(t)):this.toastrEmptyPreview()})}toastrEmptyPreview(){this.toastr.info("There is no orders from "+this.datePipe.transform(this.startDate,"dd MMM yyyy")+" to "+this.datePipe.transform(this.endDate,"dd MMM yyyy")+" !","No Orders!")}validateDatePreview(){let t=!0;return T.g.getDaysDiff(this.startDate,this.endDate)>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Failed"),t=!1),t}setPageTitle(t){this.pageTitle=`\n ${t} (${this.getDateTitle()})\n `}getDateTitle(){const t=T.g.formatTitleFromDate(new Date(this.startDate),new Date(this.endDate)),n=this.datePipe.transform(this.startDate,t);return`${null==t?"":n+"-"} ${this.datePipe.transform(this.endDate,"dd MMM yyyy")}`}onNew(t){this.channelID=null,this.startDate=null,this.endDate=null,this.pageTitle="Download to POS",t.reset()}groupingPreviewData(){let t=this.filterDataByStatus(y.UNSYNC),n=this.filterDataByStatus(y.WRONG);this.downloadedPreviewData=[...t,...n]}filterDataByStatus(t){let n=[];switch(t){case y.ALL:n=this.previewData;break;case y.SYNC:n=this.previewData.filter(o=>o.Action==F.DoNothing);break;case y.WRONG:n=this.previewData.filter(o=>o.Action==F.Update);break;case y.UNSYNC:n=this.previewData.filter(o=>o.Action==F.New)}return n}filterPreviewData(t){this.pillStatus=t,this.displayedPreviewData=this.filterDataByStatus(t)}initLengthStatusData(){this.wrongData=this.filterDataByStatus(y.WRONG).length,this.allData=this.previewData.length,this.syncData=this.filterDataByStatus(y.SYNC).length,this.unsyncData=this.filterDataByStatus(y.UNSYNC).length}getTypeID(){var t=this.channelOptions.find(n=>n.ID==this.channelID)?.TypeID;return t??0}onStepperChange(t){this.currentState=t.selectedStep.state}onStepperNext(t){t.selected.completed=!0,t.next()}onNext(t){switch(this.currentState){case"filter":this.onPreview(t);break;case"preview":this.onDownload(t)}}stepChange(t){switch(t?.selectedStep?.state){case"filter":this.pageTitle="Download To POS",this.resetPreviewData();break;case"preview":let n=this.productService.findChannelById(this.channelID,this.channelOptions);this.setPageTitle(`Preview ${n?.Name}`);break;case"finish":this.setPageTitle("Download")}}resetPreviewData(){this.displayedPreviewData=[],this.previewData=[],this.initLengthStatusData()}checkDisabledNextFilter(){let t=!T.g.isValidDate(this.startDate)||!T.g.isValidDate(this.endDate),n=T.g.IsEmpty(this.channelID);return t||n}exportOrders(){let t={ID:this.channelID,From:this.startDate,To:this.endDate};const n=`Orders ${this.getDateTitle()}`;this.orderService.exportOrders(t,n).subscribe()}}return(i=r).\u0275fac=function(t){return new(t||i)(e.Y36(c.O),e.Y36(u._W),e.Y36(h.uU),e.Y36(Z.gz),e.Y36(St.M),e.Y36(P))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-download"]],features:[e._Bn([{provide:bt.gx,useValue:{displayDefaultIndicatorType:!1}}])],decls:47,vars:20,consts:[[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],["class","btn btn-outline-secondary btn-fill btn-lg ms-2","type","button",3,"disabled","click",4,"ngIf"],["class","btn btn-outline-secondary btn-fill btn-lg ms-2",3,"click",4,"ngIf"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["labelPosition","bottom","linear","",1,"w-100","stepper-download",3,"ngClass","selectionChange"],["stepper",""],["state","filter",3,"editable","completed"],["matStepLabel",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-6"],[1,"text-muted"],["appendTo","body",3,"clearable","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-1rem"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],["state","preview",3,"editable","completed"],["class","row pt-2",4,"ngIf"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","border-end-0",3,"disabled","click"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end",2,"min-width","85px !important"],[1,"dropdown-item"],[3,"click"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"disabled","click"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"nav","nav-pills"],[1,"nav-item","mx-3"],[1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["EMPTY",""],["width","15%"],[4,"ngFor","ngForOf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],["EMPTY_DOWNLOAD",""],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"fa-solid","fa-filter"],[1,"fa-solid","fa-file"],[1,"fa-sharp","fa-solid","fa-flag"]],template:function(t,n){if(1&t){const o=e.EpF();e.TgZ(0,"mainpanel",0)(1,"actions"),e.YNc(2,vt,12,1,"ng-container",1),e.YNc(3,xt,2,1,"button",2),e.YNc(4,yt,3,0,"button",3),e.qZA(),e.TgZ(5,"content")(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,9),e.NdJ("selectionChange",function(_){return n.stepChange(_)})("selectionChange",function(_){return n.onStepperChange(_)}),e.TgZ(12,"mat-step",10),e.YNc(13,At,1,0,"ng-template",11),e.TgZ(14,"div",12)(15,"div",6)(16,"div",5)(17,"div",13)(18,"h5"),e._uU(19,"Select a Channel"),e.qZA(),e.TgZ(20,"p",14),e._uU(21,"Select Channel want to download order"),e.qZA()(),e.TgZ(22,"div",13)(23,"ng-select",15),e.NdJ("ngModelChange",function(_){return n.channelID=_}),e.YNc(24,wt,3,3,"ng-option",16),e.qZA()()(),e.TgZ(25,"div",17)(26,"div",13)(27,"h5"),e._uU(28,"Date Range"),e.qZA(),e.TgZ(29,"p",14),e._uU(30,"Select transaction date of the channel you want to download (Max 2 Weeks)"),e.qZA()(),e.TgZ(31,"div",13)(32,"div",6)(33,"mat-date-range-input",18)(34,"input",19),e.NdJ("ngModelChange",function(_){return n.startDate=_})("click",function(){e.CHM(o);const _=e.MAs(37);return e.KtG(_.open())}),e.qZA(),e.TgZ(35,"input",20),e.NdJ("ngModelChange",function(_){return n.endDate=_})("click",function(){e.CHM(o);const _=e.MAs(37);return e.KtG(_.open())}),e.qZA()(),e._UZ(36,"mat-date-range-picker",null,21),e.qZA()()()()()(),e.TgZ(38,"mat-step",22),e.YNc(39,Nt,1,0,"ng-template",11),e.YNc(40,Ft,34,11,"div",23),e.qZA(),e.TgZ(41,"mat-step",24),e.YNc(42,Qt,1,0,"ng-template",11),e.YNc(43,Ht,16,2,"div",23),e.qZA(),e.YNc(44,$t,1,0,"ng-template",25),e.YNc(45,Bt,1,0,"ng-template",26),e.YNc(46,zt,1,0,"ng-template",27),e.qZA()()()()()()()}if(2&t){const o=e.MAs(11),l=e.MAs(37);e.Q6J("headerTitle",n.pageTitle)("description",n.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("ngIf","preview"==n.currentState),e.xp6(1),e.Q6J("ngIf","filter"==n.currentState),e.xp6(1),e.Q6J("ngIf","finish"==n.currentState),e.xp6(6),e.s9C("ngClass","last-edited-step-"+o.selectedIndex),e.xp6(2),e.Q6J("editable","finish"!=n.currentState)("completed",!1),e.xp6(11),e.Q6J("clearable",!1)("ngModel",n.channelID),e.xp6(1),e.Q6J("ngForOf",n.channelOptions),e.xp6(9),e.Q6J("rangePicker",l),e.xp6(1),e.Q6J("ngModel",n.startDate),e.xp6(1),e.Q6J("ngModel",n.endDate),e.xp6(3),e.Q6J("editable","finish"!=n.currentState)("completed",!1),e.xp6(2),e.Q6J("ngIf","preview"==n.currentState),e.xp6(3),e.Q6J("ngIf","finish"==n.currentState)}},dependencies:[h.mk,h.sg,h.O5,m.Fj,m.JJ,m.On,N.p,b.w9,b.jq,Q.wx,Q.zY,Q.By,Q._g,E.C0,E.VY,E.Vq,E.z9,K.gM,h.uU],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container mat-step-header>div.mat-step-label{padding-top:8px} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}"]}),r})();var O=g(4575);const jt=[{path:"",component:H,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:ge,canActivate:[O.a],data:{title:"New Order"}},{path:"detail",component:me,canActivate:[O.a],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Je,canActivate:[O.a],data:{title:"Ready To Ship"}},{path:"Shipped",component:$e,canActivate:[O.a],data:{title:"Shipped"}},{path:"Delivered",component:nt,canActivate:[O.a],data:{title:"Delivered"}},{path:"All",component:dt,canActivate:[O.a],data:{title:"All Order"}},{path:"Cancelled",component:Zt,canActivate:[O.a],data:{title:"Cancelled"}},{path:"Download",component:Kt,canActivate:[O.a],data:{title:"Download"}}]}];let Vt=(()=>{var i;class r{}return(i=r).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[h.ez,Z.Bz.forChild(jt)]}),r})();var Wt=g(1476),Xt=g(3680),en=g(7738),tn=g(8525),nn=g(7801);let an=(()=>{var i;class r{}return(i=r).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({providers:[P,Y,$],imports:[h.ez,m.u5,Vt,q.Z,N.R,Wt.TU,Z.Bz,b.A0,Q.FA,Xt.XK,I.n,E.T5,K.AV,en.f,B.p9,d.Is,tn.LD,v.JX,nn.P,M.Q,z]}),r})()},5993:(j,R,g)=>{g.d(R,{M:()=>k});var h=g(9397),Z=g(6306),J=g(8504),e=g(5802),q=g(5879),H=g(9659),T=g(9229);let k=(()=>{var A;class S{constructor(s,p){this.httpService=s,this.toastrService=p}loader(s=e.g.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:s})}LoadInPOS(s=e.g.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:s})}filterChannelByTypeId(s,p){return s.filter(c=>-1!==p.findIndex(d=>c.TypeID==d))}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(s){return this.httpService.post("/api/product/TotalProductLive",{ID:s})}clearCacheChannel(s){return this.httpService.post("/api/Channel/ClearCacheChannel",{ID:s})}uploadSingleProduct(s,p){return this.httpService.post("api/product/UploadMultipleChannel",{Channel:p,Products:s}).pipe((0,h.b)(d=>{this.showToastrSuccessUploadSingle(d,s[0])}),(0,Z.K)(d=>(this.showToastErrorUploadSingle(d,s[0]),(0,J._)(()=>new Error(d)))))}uploadMultipleProduct(s,p){return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",{Channel:p,Products:s}).pipe((0,h.b)(d=>{this.showToastrUploadMultiple(d.Message)}),(0,Z.K)(d=>(this.showToastrUploadMultiple(d.error?.Message),(0,J._)(()=>new Error(d)))))}uploadNotInChannel(s,p){return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",{Products:s,Channel:p}).pipe((0,h.b)(d=>{this.showToastrUploadMultiple(d)}),(0,Z.K)(d=>(this.showToastrUploadMultiple(d.error?.Message),(0,J._)(()=>new Error(d)))))}scanSingle(s,p){return this.httpService.post("/api/product/ScanSingle",{ID:s,SKU:p})}scanNotInChannel(s){return this.httpService.post("/api/product/ScanNotinChannel",{ID:s})}findAllSoldInChannel(s){return this.httpService.post("/api/product/GetSoldInChannel",s)}scanAll(s,p,c,d=!1){return this.httpService.post("/api/product/ScanOptimized",{ID:s,ScanFull:p,UpdatedProduct:c,Async:d})}scanCompareToPos(s){return this.httpService.post("/api/product/CompareMarketplaceToPOS",s)}getVariantCodesProduct(s){return s.Variants.map(c=>c.Code)}downloadMultipleProduct(s){let p=s.map(c=>({ChannelItemID:c.ChannelItemID,ChannelID:c.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",p).pipe((0,h.b)(c=>{this.toastrService.success(`${c.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(s){return this.httpService.post("/api/product/DownloadProductFromChannel",{ChannelItemID:s.ChannelItemID,ChannelID:s.ChannelID}).pipe((0,h.b)(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(s=[]){let p=[];return s.forEach(c=>{c.Variants.forEach(d=>{p=[...p,d.Code]})}),p}filterUnselectedChannel(s,p){let d,c=[];if(s.forEach(u=>{c=[...c,...u.Channel]}),c&&0!=c.length){let u=[];d=p.filter(C=>(u=c.filter(P=>P.ChannelID==C.ID),u.length!==s.length))}else d=p;return d}findChannelById(s,p){return p.find(c=>c.ID==s)}sortChannel(s=[]){return s.sort((p,c)=>p.TypeID<c.TypeID?1:p.TypeID===c.TypeID?0:-1)}hasSelection(s=[]){return this.selectedProduct(s).length>0}selectedProduct(s=[]){return s.filter(p=>p.selected)}hasSelectionVariant(s){return this.selectedVariantProduct(s).length>0}selectedVariantProduct(s){let p=[];return s.forEach(c=>{p=[...p,...null!=c.Variants?c.Variants.filter(d=>d.selected):""]}),p}getChannelProduct(s){const p=s.Variants;let c=[];for(let d of p)if(null!=d.Channel)for(let u of d.Channel)0==c.filter(C=>C.ChannelID==u.ChannelID).length&&c.push(u);return this.sortChannel(c)}successToastrScanAllProduct(s,p,c){if(c){const d=s?.NotInPOS?.Product?s?.NotInPOS?.Product:0,u=s?.InChannel?.Product?s?.InChannel?.Product:0;this.toastrService.success(`\n ${d+u} found in ${p.Name} </br>\n (${u} In POS + ${d} Not In Pos)\n `,"Scan Complete!",{enableHtml:!0})}else this.toastrService.success(`${s.InChannel?s.InChannel.Product:0} product updates in ${p.Name} </br> \n since ${s.LastUpdate}`,"Scan Complete!",{enableHtml:!0})}checkProductHasScanButton(s,p){let c;return s.map(d=>(d.Channel=this.getChannelProduct(d),c=this.filterUnselectedChannel([d],p),d.hasScan=c.length>0,d))}checkProductHasUploadBtn(s,p){let c;return s.map(d=>(d.Channel=this.getChannelProduct(d),c=this.filterUnselectedChannel([d],p),d.hasUpload=c.length>0,d))}showToastrUploadMultiple(s=[]){let p=[],c=[];const d=this.getResponseList(s);if(s.forEach(u=>{"string"==typeof u?.Response?c=[...c,d.length>1?this.setHtmlli(u.Response):this.setHtmlli(u.Response,!1)]:(u?.Response?.Success.forEach(C=>{p=[...p,d.length>1?this.setHtmlli(`Product ${C} was <b>successfully</b> uploaded to ${u.Name}`):this.setHtmlli(`Product ${C} was <b>successfully</b> uploaded to ${u.Name}`,!1)]}),u?.Response.Fail.forEach(C=>{c=[...c,d.length>1?this.setHtmlli(C):this.setHtmlli(C,!1)]}))}),c.length>0&&p.length>0){const u=[...p,...c];this.toastrService.warning(this.concatMessage(u),"Warning!",{enableHtml:!0})}else p.length>0&&0==c.length?this.toastrService.success(this.concatMessage(p),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(c),"Error",{enableHtml:!0})}setHtmlli(s,p=!0){return p?`<li>${s}</li>`:s}getResponseList(s){let p=[];return s.forEach(c=>{"string"==typeof c?.Response?p=[...p,c.Response]:(c?.Response?.Success.forEach(d=>{p=[...p,c.Name]}),c?.Response.Fail.forEach(d=>{p=[...p,d]}))}),p}concatMessage(s=[]){let p="";return s.forEach(c=>{p+=c}),s.length>1?`<ol>${p}</ol>`:p}showToastrSuccessUploadSingle(s,p){let c=s.filter(C=>0==C.Status),d=s.filter(C=>1==C.Status),u=this.generateToastrMessage(c,d,p);this.toastrService.success(u.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(s,p){let c=s?.error?.Message.filter(C=>0==C.Status),d=s?.error?.Message.filter(C=>1==C.Status),u=this.generateToastrMessage(c,d,p);"WARNING"==u.status?this.toastrService.warning(u.message,"Warning!",{enableHtml:!0}):this.toastrService.error(u.message,`Error - ${s.status}`,{enableHtml:!0})}generateToastrMessage(s,p,c){let u,d="",C=[...s,...p];return 0==s.length&&p.length>0?(u="SUCCESS",d=this.createSuccessResponse(p,c)):s.length>0&&0==p.length?(u="ERROR",d=this.createErrResponse(s,c)):(u="WARNING",d=`${this.createSuccessResponse(p,c)} ${this.createErrResponse(s,c)}`),C.length>1&&(d=`<ol>${d}</ol>`),{status:u,message:d}}createErrResponse(s,p){let c="";return s.length>1?s.forEach((d,u)=>{c+=`<li>${d.Response}</li>`}):1==s.length&&(c+=`${s[0].Response}`),c}createSuccessResponse(s,p){let c="";return s.length>1?s.forEach((d,u)=>{c+=`<li>Product ${p.Name} was <b>successfully</b> uploaded to ${d.Name}</li>`}):1==s.length&&(c+=`Product ${p.Name} was <b>successfully</b> uploaded to ${s[0].Name}`),c}getHostName(){if(e.g.IsEmpty(this.hostName)){const s=localStorage.getItem("Authorization");this.hostName=JSON.parse(s)?.Host}return this.hostName}}return(A=S).\u0275fac=function(s){return new(s||A)(q.LFG(H.O),q.LFG(T._W))},A.\u0275prov=q.Yz7({token:A,factory:A.\u0275fac,providedIn:"root"}),S})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[617],{617:(Z,P,l)=>{l.d(P,{Hw:()=>X,Ps:()=>q});var i=l(5879),S=l(3680),w=l(2495),C=l(6814),g=l(2096),D=l(8504),N=l(9315),U=l(7394),F=l(9397),d=l(7398),x=l(6306),B=l(4716),W=l(3020),b=l(8180),M=l(9862),R=l(6593);const K=["*"];let v;function m(s){return function H(){if(void 0===v&&(v=null,typeof window<"u")){const s=window;void 0!==s.trustedTypes&&(v=s.trustedTypes.createPolicy("angular#components",{createHTML:c=>c}))}return v}()?.createHTML(s)||s}function A(s){return Error(`Unable to find icon with the name "${s}"`)}function L(s){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${s}".`)}function O(s){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${s}".`)}class _{constructor(c,h,t){this.url=c,this.svgText=h,this.options=t}}let I=(()=>{var s;class c{constructor(t,e,n,o){this._httpClient=t,this._sanitizer=e,this._errorHandler=o,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=n}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,o){return this._addSvgIconConfig(t,e,new _(n,null,o))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,o){const r=this._sanitizer.sanitize(i.q3G.HTML,n);if(!r)throw O(n);const a=m(r);return this._addSvgIconConfig(t,e,new _("",a,o))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new _(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){const o=this._sanitizer.sanitize(i.q3G.HTML,e);if(!o)throw O(e);const r=m(o);return this._addSvgIconSetConfig(t,new _("",r,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const e=this._sanitizer.sanitize(i.q3G.RESOURCE_URL,t);if(!e)throw L(t);const n=this._cachedIconsByUrl.get(e);return n?(0,g.of)(p(n)):this._loadSvgIconFromConfig(new _(t,null)).pipe((0,F.b)(o=>this._cachedIconsByUrl.set(e,o)),(0,d.U)(o=>p(o)))}getNamedSvgIcon(t,e=""){const n=T(e,t);let o=this._svgIconConfigs.get(n);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(e,t),o)return this._svgIconConfigs.set(n,o),this._getSvgFromConfig(o);const r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):(0,D._)(A(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?(0,g.of)(p(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe((0,d.U)(e=>p(e)))}_getSvgFromIconSetConfigs(t,e){const n=this._extractIconWithNameFromAnySet(t,e);if(n)return(0,g.of)(n);const o=e.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe((0,x.K)(a=>{const u=`Loading icon set URL: ${this._sanitizer.sanitize(i.q3G.RESOURCE_URL,r.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(u)),(0,g.of)(null)})));return(0,N.D)(o).pipe((0,d.U)(()=>{const r=this._extractIconWithNameFromAnySet(t,e);if(!r)throw A(t);return r}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){const o=e[n];if(o.svgText&&o.svgText.toString().indexOf(t)>-1){const r=this._svgElementFromConfig(o),a=this._extractSvgIconFromSet(r,t,o.options);if(a)return a}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe((0,F.b)(e=>t.svgText=e),(0,d.U)(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?(0,g.of)(null):this._fetchIcon(t).pipe((0,F.b)(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){const o=t.querySelector(`[id="${e}"]`);if(!o)return null;const r=o.cloneNode(!0);if(r.removeAttribute("id"),"svg"===r.nodeName.toLowerCase())return this._setSvgAttributes(r,n);if("symbol"===r.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(r),n);const a=this._svgElementFromString(m("<svg></svg>"));return a.appendChild(r),this._setSvgAttributes(a,n)}_svgElementFromString(t){const e=this._document.createElement("DIV");e.innerHTML=t;const n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){const e=this._svgElementFromString(m("<svg></svg>")),n=t.attributes;for(let o=0;o<n.length;o++){const{name:r,value:a}=n[o];"id"!==r&&e.setAttribute(r,a)}for(let o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[o].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){const{url:e,options:n}=t,o=n?.withCredentials??!1;if(!this._httpClient)throw function z(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}();if(null==e)throw Error(`Cannot fetch icon from URL "${e}".`);const r=this._sanitizer.sanitize(i.q3G.RESOURCE_URL,e);if(!r)throw L(e);const a=this._inProgressUrlFetches.get(r);if(a)return a;const f=this._httpClient.get(r,{responseType:"text",withCredentials:o}).pipe((0,d.U)(u=>m(u)),(0,B.x)(()=>this._inProgressUrlFetches.delete(r)),(0,W.B)());return this._inProgressUrlFetches.set(r,f),f}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(T(t,e),n),this}_addSvgIconSetConfig(t,e){const n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){const e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){const o=this._resolvers[n](e,t);if(o)return j(o)?new _(o.url,null,o.options):new _(o,null)}}}return(s=c).\u0275fac=function(t){return new(t||s)(i.LFG(M.eN,8),i.LFG(R.H7),i.LFG(C.K0,8),i.LFG(i.qLn))},s.\u0275prov=i.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),c})();function p(s){return s.cloneNode(!0)}function T(s,c){return s+":"+c}function j(s){return!(!s.url||!s.options)}const Y=(0,S.pj)(class{constructor(s){this._elementRef=s}}),G=new i.OlP("MAT_ICON_DEFAULT_OPTIONS"),V=new i.OlP("mat-icon-location",{providedIn:"root",factory:function k(){const s=(0,i.f3M)(C.K0),c=s?s.location:null;return{getPathname:()=>c?c.pathname+c.search:""}}}),y=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],Q=y.map(s=>`[${s}]`).join(", "),J=/^url\(['"]?#(.*?)['"]?\)$/;let X=(()=>{var s;class c extends Y{get inline(){return this._inline}set inline(t){this._inline=(0,w.Ig)(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}constructor(t,e,n,o,r,a){super(t),this._iconRegistry=e,this._location=o,this._errorHandler=r,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=U.w0.EMPTY,a&&(a.color&&(this.color=this.defaultColor=a.color),a.fontSet&&(this.fontSet=a.fontSet)),n||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];const e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){const n=t.childNodes[e];(1!==n.nodeType||"svg"===n.nodeName.toLowerCase())&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const e=this._elementsWithExternalReferences;e&&e.forEach((n,o)=>{n.forEach(r=>{o.setAttribute(r.name,`url('${t}#${r.value}')`)})})}_cacheChildrenWithExternalReferences(t){const e=t.querySelectorAll(Q),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<e.length;o++)y.forEach(r=>{const a=e[o],f=a.getAttribute(r),u=f?f.match(J):null;if(u){let E=n.get(a);E||(E=[],n.set(a,E)),E.push({name:r,value:u[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe((0,b.q)(1)).subscribe(o=>this._setSvgElement(o),o=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${e}:${n}! ${o.message}`))})}}}return(s=c).\u0275fac=function(t){return new(t||s)(i.Y36(i.SBq),i.Y36(I),i.$8M("aria-hidden"),i.Y36(V),i.Y36(i.qLn),i.Y36(G,8))},s.\u0275cmp=i.Xpm({type:s,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(t,e){2&t&&(i.uIk("data-mat-icon-type",e._usingFontIcon()?"font":"svg")("data-mat-icon-name",e._svgName||e.fontIcon)("data-mat-icon-namespace",e._svgNamespace||e.fontSet)("fontIcon",e._usingFontIcon()?e.fontIcon:null),i.ekj("mat-icon-inline",e.inline)("mat-icon-no-color","primary"!==e.color&&"accent"!==e.color&&"warn"!==e.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[i.qOj],ngContentSelectors:K,decls:1,vars:0,template:function(t,e){1&t&&(i.F$t(),i.Hsn(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),c})(),q=(()=>{var s;class c{}return(s=c).\u0275fac=function(t){return new(t||s)},s.\u0275mod=i.oAB({type:s}),s.\u0275inj=i.cJS({imports:[S.BQ,S.BQ]}),c})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[62],{6062:(J,p,o)=>{o.r(p),o.d(p,{LogisticModule:()=>N});var a=o(6814),d=o(9790),h=o(5802),f=o(7081),v=o(9397),L=o(7398),t=o(5879),S=o(9659),C=o(9229),r=o(6223),m=o(4387),g=o(4807),u=o(2596);function Z(e,c){if(1&e&&(t.TgZ(0,"span",14),t._UZ(1,"img",15),t.qZA(),t._uU(2)),2&e){const s=c.item;t.xp6(1),t.Q6J("src",s.logo,t.LSH),t.xp6(1),t.hij(" ",s.Name," ")}}function T(e,c){if(1&e){const s=t.EpF();t.ynx(0),t.TgZ(1,"ng-select",17),t.NdJ("ngModelChange",function(n){t.CHM(s);const l=t.oxw().$implicit;return t.KtG(l.ProductSKU=n)}),t.qZA(),t.BQk()}if(2&e){const s=c.ngIf,i=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",i.ProductSKU)("items",s)}}function O(e,c){if(1&e&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td"),t.YNc(8,T,2,2,"ng-container",16),t.ALo(9,"async"),t.qZA()()),2&e){const s=c.$implicit,i=t.oxw();t.xp6(2),t.Oqu(s.Name),t.xp6(2),t.Oqu(s.Service),t.xp6(2),t.Oqu(s.TypeString),t.xp6(2),t.Q6J("ngIf",t.lcZ(9,4,i.logisticOptions$))}}const b=[{path:"",component:(()=>{var e;class c{constructor(i,n){this.http=i,this.toastr=n,this.filter={ChannelID:""},this.logisticServiceOptions=[],this.initLoader()}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(i=>{this.channelOptions=h.g.assignChannelLogo(i.Options.Channel),this.filter=i.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe((0,f.d)(1),(0,v.b)(i=>{this.logisticServiceOptions=i}))}Validate(){for(let i of this.logisticServices)void 0===this.datasource.find(l=>l.ProductSKU==i.ProductSKU&&l.Name==i.Name)&&(i.IsChange=!0);return Promise.resolve(this.logisticServices)}submitLogistics(){this.Validate().then(i=>{this.http.post("/api/Logistic/Submit",this.logisticServices).subscribe(n=>{this.toastr.success("Success","Update Complete!",{timeOut:5e3,enableHtml:!0}),this.getLogisticService()})})}getLogisticService(){this.datasource=[],this.http.post("/api/Logistic/Get",this.filter).pipe((0,L.U)(i=>i.map(n=>(n.ProductSKU=h.g.IsEmpty(n.ProductSKU)?null:n.ProductSKU,n)))).subscribe(i=>{this.iniTitle(),this.logisticServices=i,this.datasource=structuredClone(i)})}iniTitle(){let i=this.channelOptions.find(n=>n.ID==this.filter.ChannelID);this.channelName=i?i.Name:null}}return(e=c).\u0275fac=function(i){return new(i||e)(t.Y36(S.O),t.Y36(C._W))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-logistic"]],decls:29,vars:6,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"headerTitle","hideSearchDropdown","onSubmit"],["container",""],[1,"mb-3","fw-normal"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],["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"],[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"],[4,"ngFor","ngForOf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModel","items","ngModelChange"]],template:function(i,n){1&i&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return n.getLogisticService()}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h5",2),t._uU(5,"Select a Channel"),t.qZA(),t.TgZ(6,"ng-select",3),t.NdJ("ngModelChange",function(y){return n.filter.ChannelID=y}),t.YNc(7,Z,3,2,"ng-template",4),t.qZA()()()(),t.TgZ(8,"actions")(9,"a",5),t.NdJ("click",function(){return n.submitLogistics()}),t._uU(10,"Submit"),t.qZA()(),t.TgZ(11,"content")(12,"div",6)(13,"div",7)(14,"div",8)(15,"div",9)(16,"table",10)(17,"thead",11)(18,"tr",12)(19,"th"),t._uU(20,"Logistic"),t.qZA(),t.TgZ(21,"th"),t._uU(22,"Service"),t.qZA(),t.TgZ(23,"th"),t._uU(24,"Type"),t.qZA(),t.TgZ(25,"th"),t._uU(26,"Logistic Service"),t.qZA()()(),t.TgZ(27,"tbody"),t.YNc(28,O,10,6,"tr",13),t.qZA()()()()()()()()),2&i&&(t.Q6J("headerTitle","Logistic Courier - "+n.channelName)("hideSearchDropdown",!1),t.xp6(6),t.Q6J("clearable",!1)("items",n.channelOptions)("ngModel",n.filter.ChannelID),t.xp6(22),t.Q6J("ngForOf",n.logisticServices))},dependencies:[a.sg,a.O5,r.JJ,r.On,m.p,g.w9,g.ir,u.gM,a.Ov]}),c})()}];let U=(()=>{var e;class c{}return(e=c).\u0275fac=function(i){return new(i||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[a.ez,d.Bz.forChild(b)]}),c})();var A=o(2599),M=o(7466);let N=(()=>{var e;class c{}return(e=c).\u0275fac=function(i){return new(i||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[a.ez,d.Bz,U,r.u5,m.R,g.A0,A.rP,M.Fk,u.AV]}),c})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[687],{3687:($,f,c)=>{c.r(f),c.d(f,{NotificationModule:()=>w});var r=c(6814),s=c(9790),m=c(5802),Z=c(5623),C=c(8645),T=c(9773),u=c(7398),h=c(7081),t=c(5879),N=c(9659),v=c(3079),p=c(4807),g=c(6223),d=c(4387),_=c(8558);function x(n,a){if(1&n&&(t.TgZ(0,"span",13),t._UZ(1,"img",14),t.qZA(),t._uU(2)),2&n){const i=a.item;t.xp6(1),t.Q6J("src",i.logo,t.LSH),t.xp6(1),t.hij(" ",i.Name," ")}}function y(n,a){if(1&n&&(t.ynx(0),t._uU(1),t.ALo(2,"number"),t.TgZ(3,"span"),t._uU(4,"s"),t.qZA(),t.BQk()),2&n){const i=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,i.DurationInSecond,"1.1-1")," ")}}function A(n,a){1&n&&t._uU(0," - ")}const I=function(n,a){return{"bg-gradient-danger":n,"bg-gradient-warning":a}},S=function(){return["/menu/notification/detail"]},U=function(n){return{ID:n}};function D(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"tr",15)(2,"td")(3,"a",16),t._UZ(4,"img",17),t.TgZ(5,"span"),t._uU(6),t.qZA()()(),t.TgZ(7,"td")(8,"b"),t._uU(9),t.qZA(),t._UZ(10,"div",18),t.qZA(),t.TgZ(11,"td"),t.YNc(12,y,5,4,"ng-container",19),t.YNc(13,A,1,0,"ng-template",null,20,t.W1O),t.qZA(),t.TgZ(15,"td"),t._uU(16),t.qZA(),t.TgZ(17,"td"),t._uU(18),t.ALo(19,"date"),t.qZA()(),t.BQk()),2&n){const i=a.$implicit,o=t.MAs(14);t.xp6(1),t.Q6J("ngClass",t.WLB(14,I,1==i.Status,0==i.Status)),t.xp6(2),t.Q6J("routerLink",t.DdM(17,S))("queryParams",t.VKq(18,U,i.ID)),t.xp6(1),t.s9C("src",i.Img,t.LSH),t.xp6(2),t.Oqu(i.Name),t.xp6(3),t.Oqu(i.Label),t.xp6(1),t.Q6J("innerHTML",i.Message,t.oJD),t.xp6(2),t.Q6J("ngIf",i.DurationInSecond)("ngIfElse",o),t.xp6(4),t.Oqu(i.StatusLabel),t.xp6(2),t.Oqu(t.xi3(19,11,i.Created,"dd MMM yyyy HH:mm"))}}function b(n,a){if(1&n){const i=t.EpF();t.ynx(0),t.TgZ(1,"div",5)(2,"div",21)(3,"app-custom-paginator",22),t.NdJ("total",function(){t.CHM(i);const e=t.oxw(2);return t.KtG(e.getRowCount())})("next",function(){t.CHM(i);const e=t.oxw(2);return t.KtG(e.onNextPage())})("previous",function(){t.CHM(i);const e=t.oxw(2);return t.KtG(e.onPreviousPage())}),t.ALo(4,"async"),t.ALo(5,"async"),t.qZA()()(),t.BQk()}if(2&n){const i=t.oxw().ngIf,o=t.oxw();t.xp6(3),t.Q6J("filter",o.filter)("totaldata",null==i?null:i.length)("paginationTotal",t.lcZ(4,4,o.rowCount$))("hasClicked",t.lcZ(5,6,o.rowCount$))}}function L(n,a){if(1&n&&(t.ynx(0),t.YNc(1,b,6,8,"ng-container",12),t.BQk()),2&n){const i=a.ngIf;t.xp6(1),t.Q6J("ngIf",i.length>0)}}let q=(()=>{var n;class a{constructor(o,e){this.http=o,this.notificationService=e,this.filter=new Z.k,this.destroy$=new C.x}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe((0,T.R)(this.destroy$)).subscribe(o=>{o.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(o=>{this.filter=o.Filter,this.filter.PageSize=this.filter.RowCount,this.channelOptions=m.g.assignChannelLogo(o.Options.Channel),this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){this.notifications$=this.http.post("/api/notification/Get",{ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber}).pipe((0,u.U)(e=>e.Data),(0,u.U)(e=>(e=this.setChannelLogoToNotifications(e),this.setTimeToSecond(e))),(0,h.d)(1))}setTimeToSecond(o){return o.map(e=>(e.DurationInSecond=parseInt(e.Duration)/1e3,e))}setChannelLogoToNotifications(o){return o.map(e=>(e.Img=m.g.getChannelLogoByTypeId(e.TypeID),e))}onNextPage(){this.filter.PageNumber+=1,this.getNotifications()}onPreviousPage(){this.filter.PageNumber-=1,this.getNotifications()}getRowCount(){this.rowCount$=this.http.post("/api/notification/RowCount",{ChannelID:this.filter.ChannelID}).pipe((0,u.U)(e=>e.Count),(0,h.d)(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}return(n=a).\u0275fac=function(o){return new(o||n)(t.Y36(N.O),t.Y36(v.g))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-notification"]],decls:31,vars:9,consts:[["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],[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"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["timeNotAvailable",""],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(o,e){1&o&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return e.onFilter()}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),t._uU(5,"Channel"),t.qZA(),t.TgZ(6,"ng-select",2),t.NdJ("ngModelChange",function(B){return e.filter.ChannelID=B}),t.YNc(7,x,3,2,"ng-template",3),t.qZA()()()(),t.TgZ(8,"content")(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"table",8)(14,"thead",9)(15,"tr",10)(16,"th"),t._uU(17,"Channel"),t.qZA(),t.TgZ(18,"th"),t._uU(19,"Process"),t.qZA(),t.TgZ(20,"th"),t._uU(21,"Duration"),t.qZA(),t.TgZ(22,"th"),t._uU(23,"Status"),t.qZA(),t.TgZ(24,"th"),t._uU(25,"Created"),t.qZA()()(),t.TgZ(26,"tbody"),t.YNc(27,D,20,20,"ng-container",11),t.ALo(28,"async"),t.qZA()()()()(),t.YNc(29,L,2,1,"ng-container",12),t.ALo(30,"async"),t.qZA()()()),2&o&&(t.xp6(6),t.Q6J("clearable",!0)("items",e.channelOptions)("ngModel",e.filter.ChannelID),t.xp6(21),t.Q6J("ngForOf",t.lcZ(28,5,e.notifications$)),t.xp6(2),t.Q6J("ngIf",t.lcZ(30,7,e.notifications$)))},dependencies:[r.mk,r.sg,r.O5,p.w9,p.ir,g.JJ,g.On,d.p,s.rH,_.y,r.Ov,r.JJ,r.uU]}),a})();var M=c(4664);function J(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"div",10)(2,"div",13)(3,"div",7)(4,"h5"),t._uU(5,"StackTrace"),t.qZA()(),t.TgZ(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),t._uU(10),t.qZA()()()()()(),t.BQk()),2&n){const i=t.oxw().ngIf;t.xp6(10),t.Oqu(null==i?null:i.StackTrace)}}function O(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"mainpanel",1)(2,"actions")(3,"a",2),t._uU(4,"Back"),t.qZA()(),t.TgZ(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),t._uU(12,"General"),t.qZA()(),t.TgZ(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),t._uU(18,"Created Date"),t.qZA(),t.TgZ(19,"div")(20,"span"),t._uU(21),t.ALo(22,"date"),t.qZA()()()(),t.TgZ(23,"div",10)(24,"div",11)(25,"label"),t._uU(26,"Status"),t.qZA(),t.TgZ(27,"div")(28,"span"),t._uU(29),t.qZA()()()()(),t.TgZ(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),t._uU(34,"Duration"),t.qZA(),t.TgZ(35,"div")(36,"span"),t._uU(37),t.ALo(38,"number"),t.qZA()()()(),t.TgZ(39,"div",10)(40,"div",11)(41,"label"),t._uU(42,"Label"),t.qZA(),t.TgZ(43,"div")(44,"span"),t._uU(45),t.qZA()()()()()()()()(),t.TgZ(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),t._uU(51,"Message"),t.qZA()(),t.TgZ(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),t._uU(56),t.qZA()()()()()(),t.YNc(57,J,11,1,"ng-container",0),t.qZA()()()(),t.BQk()),2&n){const i=a.ngIf;t.xp6(1),t.Q6J("headerTitle","Notification "+i.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(20),t.Oqu(t.xi3(22,9,i.Created,"dd MMM yyyy HH:mm:ss")),t.xp6(8),t.Oqu(i.StatusLabel),t.xp6(8),t.hij("",t.xi3(38,12,i.DurationInSecond,"1.1-1")," s"),t.xp6(8),t.Oqu(i.Label),t.xp6(11),t.Oqu(i.Message),t.xp6(1),t.Q6J("ngIf",null==i?null:i.StackTrace)}}const P=[{path:"",component:q},{path:"detail",component:(()=>{var n;class a{constructor(o,e){this.activatedRoute=o,this.notificationService=e}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe((0,M.w)(o=>this.notificationService.getNotificationDetail(o.ID).pipe((0,u.U)(l=>(l.DurationInSecond=parseInt(l.Duration)/1e3,l)))))}}return(n=a).\u0275fac=function(o){return new(o||n)(t.Y36(s.gz),t.Y36(v.g))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"]],template:function(o,e){1&o&&(t.YNc(0,O,58,15,"ng-container",0),t.ALo(1,"async")),2&o&&t.Q6J("ngIf",t.lcZ(1,1,e.notification$))},dependencies:[r.O5,d.p,s.rH,r.Ov,r.JJ,r.uU]}),a})()}];let Q=(()=>{var n;class a{}return(n=a).\u0275fac=function(o){return new(o||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[r.ez,s.Bz.forChild(P)]}),a})(),w=(()=>{var n;class a{}return(n=a).\u0275fac=function(o){return new(o||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[r.ez,Q,p.A0,g.u5,d.R,s.Bz,_.y]}),a})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[699],{9699:(w,v,p)=>{p.r(v),p.d(v,{DownloadModule:()=>Y});var d=p(6814),t=p(5879),_=p(6027),g=p(9790);const o=function(n){return[n]};function T(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"a",9),t._uU(2),t.qZA(),t.BQk()),2&n){const r=a.$implicit;t.xp6(1),t.Q6J("routerLink",t.VKq(2,o,r.url)),t.xp6(1),t.hij(" ",r.title,"")}}let C=(()=>{var n;class a{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}}return(n=a).\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-download"]],decls:12,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){1&e&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()(),t.TgZ(4,"div")(5,"div",3)(6,"a",4),t._UZ(7,"i",5),t.qZA(),t.TgZ(8,"div",6)(9,"div",7),t.YNc(10,T,3,4,"ng-container",8),t.qZA()()()()(),t._UZ(11,"router-outlet")),2&e&&(t.xp6(3),t.Q6J("Tabs",i.tabs),t.xp6(7),t.Q6J("ngForOf",i.moreMenu))},dependencies:[d.sg,_.e,g.lC,g.rH]}),a})();var b=p(1657),x=p(9659);let h=(()=>{var n;class a{constructor(e){this.httpService=e}download(e){return this.httpService.post("/api/Product/downloadurl",e)}}return(n=a).\u0275fac=function(e){return new(e||n)(t.LFG(x.O))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),a})();var y=p(4750),f=p(6223),s=p(4387),c=p(8257);function l(n,a){if(1&n&&(t.TgZ(0,"th"),t._uU(1),t.qZA()),2&n){const r=a.$implicit;t.xp6(1),t.Oqu(r.column)}}function m(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"td"),t._UZ(2,"span",6),t.qZA(),t.BQk()),2&n){const r=a.$implicit,e=t.oxw().$implicit;t.xp6(2),t.Q6J("innerHTML",e[r.prop],t.oJD)}}const U=function(n){return{"background-color":n}};function Z(n,a){if(1&n&&(t.TgZ(0,"tr",5),t.YNc(1,m,3,1,"ng-container",3),t.qZA()),2&n){const r=a.$implicit,e=t.oxw();t.Q6J("ngStyle",t.VKq(2,U,r.Status>200?"#F4D6D5":"#DEE9C9")),t.xp6(1),t.Q6J("ngForOf",e.configs)}}let D=(()=>{var n;class a{constructor(){this.eventClose=new t.vpe}ngOnInit(){}onClose(){this.eventClose.emit()}}return(n=a).\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},decls:7,vars:2,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"],[3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngStyle"],[3,"innerHTML"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),t.YNc(4,l,2,1,"th",3),t.qZA()(),t.TgZ(5,"tbody"),t.YNc(6,Z,2,4,"tr",4),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngForOf",i.configs),t.xp6(2),t.Q6J("ngForOf",i.data))},dependencies:[d.sg,d.PC]}),a})();function S(n,a){if(1&n){const r=t.EpF();t.ynx(0),t.TgZ(1,"button",23),t.NdJ("click",function(){t.CHM(r);const i=t.oxw(),u=t.MAs(11);return t.KtG(i.onNewStepperState(u))}),t._UZ(2,"i",24),t._uU(3," New "),t.qZA(),t.BQk()}}function A(n,a){if(1&n){const r=t.EpF();t.ynx(0),t.TgZ(1,"button",23),t.NdJ("click",function(){t.CHM(r),t.oxw();const i=t.MAs(11);return t.KtG(i.previous())}),t._uU(2," Back "),t.qZA(),t.BQk()}}function B(n,a){if(1&n){const r=t.EpF();t.ynx(0),t.TgZ(1,"button",25),t.NdJ("click",function(){t.CHM(r);const i=t.oxw(),u=t.MAs(11);return t.KtG(i.onStepperNext(u))}),t._uU(2," Next "),t.qZA(),t.BQk()}}function O(n,a){if(1&n){const r=t.EpF();t.ynx(0),t.TgZ(1,"button",26),t.NdJ("click",function(){t.CHM(r);const i=t.oxw(),u=t.MAs(11);return t.KtG(i.onSubmit(u))}),t._uU(2,"Download"),t.qZA(),t.BQk()}if(2&n){const r=t.oxw();t.xp6(1),t.Q6J("disabled",!r.urls)}}function I(n,a){1&n&&t._uU(0,"Instruction")}function M(n,a){1&n&&t._uU(0,"Download")}function k(n,a){1&n&&t._uU(0,"Finish")}function L(n,a){1&n&&t._UZ(0,"i",27)}function J(n,a){1&n&&t._UZ(0,"i",28)}function P(n,a){1&n&&t._UZ(0,"i",29)}let F=(()=>{var n;class a{constructor(e,i){this.downloadService=e,this.authService=i,this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder="https://tokopedia.com/tokoriyanadi/kaos-polos-biru\nhttps://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat",this.currentDomain=this.authService.getDomain()}onStepperChange(e){this.stepperState=e.selectedStep.state}onSubmit(e){const i=this.urls.split(/\r?\n/);this.downloadService.download(i).subscribe(u=>{this.downloadResponses=u,this.mappingLinkToProduct(),this.onStepperNext(e)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(e=>(e.Name=e?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${e.ID}" target="_blank">\n ${e?.Name}\n </a>`:"-",e))}onNewStepperState(e){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",e.reset(),this.onStepperNext(e)}onStepperNext(e){e.selected.completed=!0,e.next()}}return(n=a).\u0275fac=function(e){return new(e||n)(t.Y36(h),t.Y36(y.e))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-by-url"]],features:[t._Bn([{provide:b.gx,useValue:{displayDefaultIndicatorType:!1}}])],decls:41,vars:15,consts:[["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["labelPosition","bottom","linear","",1,"stepper-downloadByUrl",3,"selectedIndex","selectionChange"],["stepper",""],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],["state","DOWNLOAD",3,"editable","completed"],["name","url","cols","30","rows","25",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["state","FINISH"],["status","error",3,"data","configs"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled","click"],[1,"fa-solid","fa-info"],[1,"fa-solid","fa-download"],[1,"fa-sharp","fa-solid","fa-flag"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions"),t.YNc(2,S,4,0,"ng-container",1),t.YNc(3,A,3,0,"ng-container",1),t.YNc(4,B,3,0,"ng-container",1),t.YNc(5,O,3,1,"ng-container",1),t.qZA(),t.TgZ(6,"content")(7,"div",2)(8,"div",3)(9,"div",4)(10,"mat-stepper",5,6),t.NdJ("selectionChange",function(N){return i.onStepperChange(N)}),t.TgZ(12,"mat-step",7),t.YNc(13,I,1,0,"ng-template",8),t.TgZ(14,"div",9)(15,"div",10)(16,"div",11)(17,"h4",12),t._uU(18,"Note"),t.qZA()(),t.TgZ(19,"div",13)(20,"ol",14)(21,"li"),t._uU(22," Use this form to Download Products from Tokopedia using product URL "),t.qZA(),t.TgZ(23,"li"),t._uU(24," Copy Product URL from "),t.TgZ(25,"a",15),t._uU(26,"https://seller.tokopedia.com/ "),t.qZA(),t._uU(27," and paste in this form "),t.qZA(),t.TgZ(28,"li"),t._uU(29," Use New Line when you want to input several product URLs "),t.qZA()()()()()(),t.TgZ(30,"mat-step",16),t.YNc(31,M,1,0,"ng-template",8),t.TgZ(32,"div",9)(33,"textarea",17),t.NdJ("ngModelChange",function(N){return i.urls=N}),t.qZA()()(),t.TgZ(34,"mat-step",18),t.YNc(35,k,1,0,"ng-template",8),t.TgZ(36,"div",9),t._UZ(37,"app-response-api-list",19),t.qZA()(),t.YNc(38,L,1,0,"ng-template",20),t.YNc(39,J,1,0,"ng-template",21),t.YNc(40,P,1,0,"ng-template",22),t.qZA()()()()()()),2&e&&(t.Q6J("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf","FINISH"==i.stepperState),t.xp6(1),t.Q6J("ngIf","DOWNLOAD"==i.stepperState),t.xp6(1),t.Q6J("ngIf","GUIDE"==i.stepperState),t.xp6(1),t.Q6J("ngIf","DOWNLOAD"==i.stepperState),t.xp6(5),t.Q6J("selectedIndex",1),t.xp6(2),t.Q6J("editable","FINISH"!=i.stepperState)("completed",!0),t.xp6(18),t.Q6J("editable","FINISH"!=i.stepperState)("completed",!1),t.xp6(3),t.Q6J("placeholder",i.urlPlaceholder)("ngModel",i.urls),t.xp6(4),t.Q6J("data",i.downloadResponses)("configs",i.configs))},dependencies:[d.O5,f.Fj,f.JJ,f.On,s.p,c.C0,c.VY,c.Vq,c.z9,D],styles:[".card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container mat-step-header>div.mat-step-label{padding-top:8px}\n"],encapsulation:2}),a})();var Q=p(4575),E=p(617);const R=[{path:"",component:C,children:[{path:"by-url",component:F,data:{title:"Download Product By Url"},canActivate:[Q.a]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}];let Y=(()=>{var n;class a{}return(n=a).\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({providers:[h],imports:[d.ez,f.u5,_.Z,s.R,c.T5,E.Ps,g.Bz.forChild(R)]}),a})()},6027:(w,v,p)=>{p.d(v,{Z:()=>f,e:()=>y});var d=p(6814),t=p(2596),_=p(9790),g=p(621),o=p(5879);function T(s,c){if(1&s&&(o.ynx(0),o.TgZ(1,"a",6),o._uU(2),o.qZA(),o.BQk()),2&s){const l=o.oxw().$implicit;o.xp6(1),o.s9C("routerLink",l.Url),o.Q6J("title",l.Description?l.Description:""),o.xp6(1),o.hij(" ",l.Title," ")}}function C(s,c){if(1&s&&(o.TgZ(0,"li",4),o.YNc(1,T,3,3,"ng-container",5),o.qZA()),2&s){const l=c.$implicit;o.xp6(1),o.Q6J("ngxPermissionsOnly",l.Permissions)}}function b(s,c){if(1&s&&(o.ynx(0),o.YNc(1,C,2,1,"li",3),o.BQk()),2&s){const l=o.oxw();o.xp6(1),o.Q6J("ngForOf",l.Tabs)}}function x(s,c){if(1&s&&(o.TgZ(0,"li",4)(1,"a",6),o._uU(2),o.qZA()()),2&s){const l=c.$implicit;o.xp6(1),o.s9C("routerLink",l.Url),o.Q6J("title",l.Description?l.Description:""),o.xp6(1),o.hij(" ",l.Title," ")}}function h(s,c){if(1&s&&o.YNc(0,x,3,3,"li",3),2&s){const l=o.oxw();o.Q6J("ngForOf",l.Tabs)}}let y=(()=>{var s;class c{constructor(){this.usePermissions=!1}}return(s=c).\u0275fac=function(m){return new(m||s)},s.\u0275cmp=o.Xpm({type:s,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs",usePermissions:"usePermissions"},decls:4,vars:2,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],[4,"ngIf","ngIfElse"],["NOT_USE_PERMISSIONS",""],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[4,"ngxPermissionsOnly"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(m,U){if(1&m&&(o.TgZ(0,"ul",0),o.YNc(1,b,2,1,"ng-container",1),o.YNc(2,h,1,1,"ng-template",null,2,o.W1O),o.qZA()),2&m){const Z=o.MAs(3);o.xp6(1),o.Q6J("ngIf",U.usePermissions)("ngIfElse",Z)}},dependencies:[d.sg,d.O5,_.rH,_.Od,g.gE]}),c})(),f=(()=>{var s;class c{}return(s=c).\u0275fac=function(m){return new(m||s)},s.\u0275mod=o.oAB({type:s}),s.\u0275inj=o.cJS({imports:[d.ez,_.Bz,t.AV,g.VI.forChild()]}),c})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[700],{1700:(C,u,t)=>{t.r(u),t.d(u,{InventoryAsyncLogComponent:()=>T});var a=t(6814),_=t(4387),d=t(1476),p=t(7398),m=t(4126),c=t(9790),n=t(5879),y=t(2099);const v=function(){return["/menu/log/inventory-async/detail"]},h=function(o){return{ID:o}};function A(o,i){if(1&o&&(n.TgZ(0,"tr")(1,"td")(2,"a",11),n._uU(3),n.ALo(4,"date"),n.qZA()(),n.TgZ(5,"td"),n._uU(6),n.ALo(7,"number"),n.qZA(),n.TgZ(8,"td")(9,"span",12),n._uU(10),n.qZA()()()),2&o){const e=i.$implicit;n.xp6(2),n.Q6J("routerLink",n.DdM(13,v))("queryParams",n.VKq(14,h,e._id)),n.xp6(1),n.hij(" ",n.xi3(4,7,null==e?null:e._source["@timestamp"],"dd MMM yyyy")," "),n.xp6(3),n.hij(" ",n.xi3(7,10,e.DurationInSecond,"1.1-1")," s "),n.xp6(3),n.Tol(200===(null==e||null==e._source||null==e._source.log?null:e._source.log.respCode)||202===(null==e||null==e._source||null==e._source.log?null:e._source.log.respCode)?"bg-success":"bg-warning"),n.xp6(1),n.hij(" ",null==e||null==e._source||null==e._source.log?null:e._source.log.respCode," ")}}let T=(()=>{var o;class i{constructor(r){this.inventoryAsyncServiceLog=r,this.filters={PageNumber:1,RowCount:100,From:null,To:null}}ngOnInit(){this.initInventoryLog()}initInventoryLog(){this.inventoryLog$=this.inventoryAsyncServiceLog.getInventoryAsyncLog(this.filters).pipe((0,p.U)(r=>r?.hits))}onSubmitFilter(){this.initInventoryLog()}}return(o=i).\u0275fac=function(r){return new(r||o)(n.Y36(y.F))},o.\u0275cmp=n.Xpm({type:o,selectors:[["app-inventory-async-log"]],standalone:!0,features:[n.jDz],decls:25,vars:6,consts:[["headerTitle","Async Inventory",3,"hideSearchBox","onSubmit"],["container",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(r,l){1&r&&(n.TgZ(0,"mainpanel",0),n.NdJ("onSubmit",function(){return l.onSubmitFilter()}),n.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),n._uU(5,"From/To"),n.qZA(),n.TgZ(6,"datepicker",2),n.NdJ("dateChange",function(s){return l.filters.From=s}),n.qZA(),n.TgZ(7,"datepicker",3),n.NdJ("dateChange",function(s){return l.filters.To=s}),n.qZA()()()(),n.TgZ(8,"content")(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"table",8)(14,"thead")(15,"tr",9)(16,"th"),n._uU(17,"Created"),n.qZA(),n.TgZ(18,"th"),n._uU(19,"Duration"),n.qZA(),n.TgZ(20,"th"),n._uU(21,"Response code"),n.qZA()()(),n.TgZ(22,"tbody"),n.YNc(23,A,11,16,"tr",10),n.ALo(24,"async"),n.qZA()()()()()()()()),2&r&&(n.Q6J("hideSearchBox",!0),n.xp6(6),n.Q6J("date",l.filters.From),n.xp6(1),n.Q6J("date",l.filters.To),n.xp6(16),n.Q6J("ngForOf",n.lcZ(24,4,l.inventoryLog$)))},dependencies:[a.ez,a.sg,a.Ov,a.JJ,a.uU,_.R,_.p,d.TU,m.Q,c.Bz,c.rH]}),i})()}}]);