marketplacepos 6.31.2 → 6.32.1

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 (65) hide show
  1. package/Marketplace/chunk-2BKKP2LQ.js +1 -0
  2. package/Marketplace/{chunk-T7PNPUCK.js → chunk-46O2AZTC.js} +1 -1
  3. package/Marketplace/{chunk-CMN6WQRQ.js → chunk-4POOCCOW.js} +1 -1
  4. package/Marketplace/{chunk-6VEA6GG4.js → chunk-4QJFZAOZ.js} +1 -1
  5. package/Marketplace/{chunk-NZ77VVLC.js → chunk-4RJACYZI.js} +1 -1
  6. package/Marketplace/{chunk-VB4EKTTU.js → chunk-52GYT73T.js} +1 -1
  7. package/Marketplace/{chunk-KS63PJZE.js → chunk-54TVVA6O.js} +1 -1
  8. package/Marketplace/{chunk-KCPD4Z3X.js → chunk-5CY44R7W.js} +1 -1
  9. package/Marketplace/{chunk-W7G4WIRL.js → chunk-5O4ZOZTP.js} +1 -1
  10. package/Marketplace/{chunk-VSOZTJLX.js → chunk-6D73FNV2.js} +2 -2
  11. package/Marketplace/{chunk-6MA3X2DS.js → chunk-6FPUAKCJ.js} +1 -1
  12. package/Marketplace/{chunk-BDL6VX7O.js → chunk-7UM4QBWJ.js} +1 -1
  13. package/Marketplace/{chunk-NFKQXOQD.js → chunk-7WFGFR3N.js} +1 -1
  14. package/Marketplace/{chunk-7J6UH2BT.js → chunk-ARXIFZHC.js} +1 -1
  15. package/Marketplace/{chunk-VU5XZQJM.js → chunk-BFVO6VKS.js} +1 -1
  16. package/Marketplace/{chunk-UCBUYDAK.js → chunk-BKKBJDIO.js} +1 -1
  17. package/Marketplace/{chunk-YKBRWOO3.js → chunk-BZEANG66.js} +1 -1
  18. package/Marketplace/{chunk-ASKT24WA.js → chunk-C4LXIOM4.js} +1 -1
  19. package/Marketplace/{chunk-YHFFMWT4.js → chunk-C5WQMM35.js} +1 -1
  20. package/Marketplace/{chunk-DVTJ5IUH.js → chunk-CIOYBSHS.js} +1 -1
  21. package/Marketplace/{chunk-ZNUU6KNL.js → chunk-CS6G5VOF.js} +1 -1
  22. package/Marketplace/{chunk-45SZYPN7.js → chunk-DY5LRWZU.js} +1 -1
  23. package/Marketplace/{chunk-LHRO7M7M.js → chunk-EEV7C3GE.js} +1 -1
  24. package/Marketplace/{chunk-JURDZGFU.js → chunk-ESQEV3U3.js} +1 -1
  25. package/Marketplace/{chunk-DEC7P5YC.js → chunk-ETEUOMJS.js} +1 -1
  26. package/Marketplace/{chunk-LTFRIYVD.js → chunk-GEP3G6IQ.js} +1 -1
  27. package/Marketplace/{chunk-54E2GKVP.js → chunk-GJHPUH5E.js} +1 -1
  28. package/Marketplace/{chunk-CUFGJCZX.js → chunk-HSKAYNRW.js} +1 -1
  29. package/Marketplace/{chunk-BY4A7KFT.js → chunk-HSQ4QBGK.js} +1 -1
  30. package/Marketplace/{chunk-4NLZR5G6.js → chunk-I275YRDX.js} +1 -1
  31. package/Marketplace/{chunk-BGTQQCDH.js → chunk-IB64YUDR.js} +1 -1
  32. package/Marketplace/{chunk-OQ3SGN6B.js → chunk-IMS373GH.js} +1 -1
  33. package/Marketplace/{chunk-DENZQL5X.js → chunk-JZ3UO37F.js} +1 -1
  34. package/Marketplace/{chunk-PKEJBTNO.js → chunk-LWDVWTUP.js} +1 -1
  35. package/Marketplace/{chunk-RQUENCBZ.js → chunk-OANGKMNY.js} +1 -1
  36. package/Marketplace/{chunk-FUPT6QVP.js → chunk-OUTOPEON.js} +1 -1
  37. package/Marketplace/{chunk-JVVN7I3K.js → chunk-OWS3UI3D.js} +1 -1
  38. package/Marketplace/{chunk-SS5GOXIZ.js → chunk-P3ACIIKE.js} +1 -1
  39. package/Marketplace/{chunk-Y5TU2325.js → chunk-PL726SLZ.js} +1 -1
  40. package/Marketplace/{chunk-56UQOJHL.js → chunk-PM4W5GOZ.js} +1 -1
  41. package/Marketplace/{chunk-OFLYY6SE.js → chunk-QC5UO6G4.js} +1 -1
  42. package/Marketplace/chunk-QGURTH5P.js +1 -0
  43. package/Marketplace/{chunk-3YEPZOWW.js → chunk-QPNSOQZI.js} +1 -1
  44. package/Marketplace/{chunk-UZG65BH3.js → chunk-QVB62YCK.js} +1 -1
  45. package/Marketplace/{chunk-HDPVYUNM.js → chunk-QZVNZJJE.js} +1 -1
  46. package/Marketplace/{chunk-H3AJTV7H.js → chunk-RHHM7UNU.js} +1 -1
  47. package/Marketplace/{chunk-743ML6A7.js → chunk-RJ7MOCBZ.js} +1 -1
  48. package/Marketplace/{chunk-DGZJ7ASC.js → chunk-S57AWXHE.js} +1 -1
  49. package/Marketplace/{chunk-5GMAPKUT.js → chunk-T4QVLV6C.js} +1 -1
  50. package/Marketplace/{chunk-ZNL4R4ZY.js → chunk-T4VTCRVF.js} +1 -1
  51. package/Marketplace/{chunk-B7PRYIER.js → chunk-TI66O7XH.js} +1 -1
  52. package/Marketplace/{chunk-X77IQNIG.js → chunk-W66L3AQ5.js} +1 -1
  53. package/Marketplace/{chunk-YN6BGZZ6.js → chunk-WON4W737.js} +1 -1
  54. package/Marketplace/chunk-X3AI54X4.js +1 -0
  55. package/Marketplace/{chunk-KYZGVVJM.js → chunk-X55KFM6T.js} +1 -1
  56. package/Marketplace/{chunk-46MLNUK6.js → chunk-XQMESONK.js} +1 -1
  57. package/Marketplace/{chunk-XTQO7LQT.js → chunk-YBKORR26.js} +2 -2
  58. package/Marketplace/{chunk-VL3JT6OI.js → chunk-YUF3O25O.js} +1 -1
  59. package/Marketplace/{chunk-LALJHEQ4.js → chunk-ZCRXCSZU.js} +1 -1
  60. package/Marketplace/index.html +2 -2
  61. package/Marketplace/{main-STZJXPG6.js → main-SVP73KYH.js} +2 -2
  62. package/package.json +1 -1
  63. package/Marketplace/chunk-SHPCIBEX.js +0 -1
  64. package/Marketplace/chunk-VDFAJSCS.js +0 -1
  65. package/Marketplace/chunk-ZPKMQUVX.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as ge,b as Ce}from"./chunk-RWB2N7TQ.js";import{a as me,b as ce,c as ue}from"./chunk-HSKAYNRW.js";import{a as _e}from"./chunk-5O4ZOZTP.js";import{a as R}from"./chunk-HHZM6PB4.js";import{a as he}from"./chunk-J5PTSESV.js";import"./chunk-FJYX7L63.js";import"./chunk-D2THPOQ7.js";import{a as pe}from"./chunk-46O2AZTC.js";import"./chunk-6GSJBXEE.js";import"./chunk-2C6XBRGE.js";import"./chunk-RUHYZ275.js";import"./chunk-3BV4FPZE.js";import{a as se}from"./chunk-TWRFL73R.js";import"./chunk-7ES2Z445.js";import{a as de}from"./chunk-KMCVYMXQ.js";import"./chunk-QDKVYF6D.js";import"./chunk-VAYLCOBC.js";import"./chunk-6PI5PUIQ.js";import"./chunk-6VOSRCWX.js";import"./chunk-XSXHGAXP.js";import"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-ACIMXBIC.js";import"./chunk-67AXBZYF.js";import"./chunk-5QG5PZ7U.js";import"./chunk-KYK2ZFUZ.js";import"./chunk-KXLYQDZR.js";import{b as ae}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import{a as le}from"./chunk-RDXDKWLL.js";import"./chunk-2GINYFUG.js";import"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-SPNVH2ST.js";import"./chunk-BXA5YUTN.js";import{b as re}from"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-52GYT73T.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import{b as X}from"./chunk-NNVT5X6O.js";import{b as Z,c as ee,h as te,m as ie,o as ne,z as oe}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{b as Y}from"./chunk-45DFJJAO.js";import"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as J,D as K}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as Q,Dc as D,Eb as F,Ec as L,Fc as A,Ga as T,Nc as z,Oc as a,Pc as v,Qc as x,Sc as B,Tc as H,Uc as W,Vc as $,Wc as j,Xc as V,bc as f,bd as U,dc as S,ec as N,gc as k,hc as I,ic as m,jc as t,kb as E,kc as i,kd as w,lc as c,ld as P,mb as l,md as q,na as b,sc as y,sd as G,ua as s,va as p,xc as _,zc as u}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as M,b as O}from"./chunk-66YHNWRR.js";var fe=["contextMenu"],Se=r=>({"td-cell-hover":r});function ye(r,g){if(r&1){let e=y();t(0,"button",20),_("click",function(){s(e);let n=u();return p(n.setMultipleFulfillment())}),a(1," Set Fulfillment "),i()}}function ve(r,g){if(r&1&&c(0,"variants-dropdown",38),r&2){let e=u().$implicit;m("variants",e==null?null:e.Variants)}}function xe(r,g){if(r&1&&c(0,"variant-with-image",39),r&2){let e=u().$implicit;m("variant",e==null?null:e.Variants[0])}}function be(r,g){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=u().$implicit;l(),x("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Te(r,g){if(r&1){let e=y();t(0,"div",44)(1,"button",45),_("click",function(){s(e);let n=u().$implicit,d=u(2);return p(d.onSetFulfillment(n))}),c(2,"i",46),a(3,"Set Fulfillment "),i(),t(4,"button",47)(5,"span",48),a(6,"Toggle Dropdown"),i()(),t(7,"ul",49)(8,"li")(9,"a",50),_("click",function(){s(e);let n=u().$implicit,d=u(2);return p(d.refreshShippingAndRefNumber(n))}),c(10,"i",51),a(11,"Refresh Shipping Courier "),i()(),t(12,"li")(13,"a",52),c(14,"i",53),a(15,"Set Picklist (Coming Soon!) "),i()()()()}}function we(r,g){if(r&1){let e=y();t(0,"tr")(1,"td")(2,"input",30),W("ngModelChange",function(n){let d=s(e).$implicit;return H(d.selected,n)||(d.selected=n),p(n)}),_("ngModelChange",function(){s(e);let n=u(2),d=V(0);return p(n.onSelectOrder(d))}),i()(),t(3,"td")(4,"div",31),c(5,"img",32),w(6,"channelImage"),t(7,"div",33)(8,"div"),a(9),i(),t(10,"small",34)(11,"span"),a(12),i()()()()(),t(13,"td")(14,"div",35)(15,"div"),c(16,"order-link",36),i(),t(17,"small"),a(18),w(19,"date"),i(),c(20,"br"),t(21,"small"),c(22,"i",37),a(23),i()()(),t(24,"td"),f(25,ve,1,1,"variants-dropdown",38)(26,xe,1,1,"variant-with-image",39),i(),t(27,"td",40),a(28),w(29,"number"),i(),t(30,"td",41)(31,"div",42)(32,"div",35)(33,"div",43)(34,"span"),a(35),i(),f(36,be,2,1,"span"),i(),t(37,"small"),a(38),i()()()(),t(39,"td",41),f(40,Te,16,0,"div",44),i()()}if(r&2){let e=g.$implicit,o=u(2);l(2),B("ngModel",e.selected),m("disabled",o.selectedChannelType()!=null&&o.selectedChannelType()!=e.MarketType),l(3),m("src",P(6,17,e==null?null:e.MarketType),E)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),v(e.Outlet),l(3),v(e.ChannelName),l(4),m("order",e),l(2),x(" ",q(19,19,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(5),x(" ",e.Customer," "),l(),z(U(24,Se,(e.Variants==null?null:e.Variants.length)>1)),l(),S((e.Variants==null?null:e.Variants.length)>1?25:26),l(3),v(P(29,22,e.Amount)),l(7),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),S(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),l(2),x(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),l(2),S((e==null?null:e.MarketType)!=o.channelType.WooCommerce?40:-1)}}function Me(r,g){if(r&1){let e=y();t(0,"div",17)(1,"table",21)(2,"thead",22)(3,"tr",23),c(4,"th",24),t(5,"th",25),a(6,"Outlet"),i(),t(7,"th",25),a(8,"Number"),i(),t(9,"th"),a(10,"Items"),i(),t(11,"th",26),a(12,"Amount"),i(),t(13,"th",27),a(14,"Shipping"),i(),c(15,"th",28),i()(),t(16,"tbody"),k(17,we,41,26,"tr",null,N),i()(),t(19,"app-custom-paginator",29),_("next",function(){s(e);let n=u();return p(n.initReadyToShip())})("previous",function(){s(e);let n=u();return p(n.initReadyToShip())}),i()()}if(r&2){let e=u(),o=V(0);l(17),I(o),l(2),m("filter",e.filter())("totaldata",o==null?null:o.length)}}function Oe(r,g){r&1&&(t(0,"div",18),c(1,"app-empty-state"),i())}var Ze=(()=>{class r{constructor(){this.toastr=b(Y),this.orderService=b(R),this.fulfillmentService=b(ge),this.channelType=X,this.selectedOrders=T([]),this.selectedChannelType=G(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.readyToShip=T([]),this.filter=T({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(o=>O(M({},o),{From:e})),this.initReadyToShip()}initReadyToShip(){this.orderService.getReadyToShipOrders(this.filter()).subscribe(e=>{this.readyToShip.set(e),this.selectedOrders.set([])})}onFilterPropertyChange(e,o){this.filter.update(n=>O(M({},n),{[e]:o}))}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initReadyToShip()})}setMultipleFulfillment(){this.fulfillmentService.setFulfillmentMultipleOrders(this.selectedOrders()).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}onSelectOrder(e){let o=e.filter(n=>n.selected);this.selectedOrders.set(o)}onMouseHover(e,o){(!o.LogisticService?.Name||!o.ReferenceNumber)&&this.contextMenuEl.show(e,o)}onSelectContextItem(e){e.item?.id==="refresh"&&this.refreshShippingAndRefNumber(e.data)}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=F({type:r,selectors:[["app-ready-to-ship"]],viewQuery:function(o,n){if(o&1&&D(fe,5),o&2){let d;L(d=A())&&(n.contextMenuEl=d.first)}},features:[Q([R])],decls:36,vars:11,consts:[["contextMenu",""],["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],[2,"width","230px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"btn-group","btn-split-action"],[1,"btn","btn-success","btn-lg","fw-medium",3,"click"],[1,"fa-solid","fa-dolly","me-2"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-lg","fw-medium","dropdown-toggle","dropdown-toggle-split"],[1,"visually-hidden"],[1,"dropdown-menu"],["href","javascript:void(0)",1,"dropdown-item",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-2"],["href","javascript:void(0)",1,"dropdown-item","disabled"],[1,"fa-solid","fa-list-check","me-2"]],template:function(o,n){if(o&1){let d=y();$(0),t(1,"mainpanel",1),_("onSubmit",function(){return s(d),p(n.initReadyToShip())})("textChange",function(h){return s(d),p(n.onFilterPropertyChange("Number",h))}),t(2,"actions"),f(3,ye,2,0,"button",2),t(4,"a",3),c(5,"i",4),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",5),a(11,"Channel"),i(),t(12,"app-channel-options-v2",6),_("ngModelChange",function(h){return s(d),p(n.onFilterPropertyChange("ListChannelID",h))}),i()(),t(13,"div",7)(14,"label",5),a(15,"From/To"),i(),t(16,"div",8)(17,"datepicker",9),_("dateChange",function(h){return s(d),p(n.onFilterPropertyChange("From",h))}),i()(),t(18,"div")(19,"datepicker",10),_("dateChange",function(h){return s(d),p(n.onFilterPropertyChange("To",h))}),i()()(),t(20,"div",7)(21,"label",11),a(22,"Page Number"),i(),t(23,"input",12),_("ngModelChange",function(h){return s(d),p(n.onFilterPropertyChange("PageNumber",+h))}),i()(),t(24,"div",7)(25,"label",11),a(26,"Page Size"),i(),t(27,"input",13),_("ngModelChange",function(h){return s(d),p(n.onFilterPropertyChange("PageSize",+h))}),i()()(),t(28,"content")(29,"div",14)(30,"div",15)(31,"div",16),f(32,Me,20,2,"div",17)(33,Oe,2,0,"div",18),i()()()()(),t(34,"app-context-menu",19,0),_("onSelectItem",function(h){return s(d),p(n.onSelectContextItem(h))}),i()}if(o&2){let d=j(n.readyToShip());l(),m("text",n.filter().Number),l(2),S(n.selectedOrders().length>0?3:-1),l(9),m("multiple",!0)("ngModel",n.filter().ListChannelID),l(5),m("date",n.filter().From),l(2),m("date",n.filter().To),l(4),m("ngModel",n.filter().PageNumber),l(4),m("ngModel",n.filter().PageSize),l(5),S(d.length>0?32:33),l(2),m("items",n.contextMenuItems)}},dependencies:[ae,de,se,oe,ee,ne,Z,te,ie,ce,ue,he,_e,le,re,Ce,pe,me,J,K],styles:['@charset "UTF-8";.actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .12s ease-in-out}tr[_ngcontent-%COMP%]:hover .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], div[_ngcontent-%COMP%]:hover.actions-cell .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}.actions-cell[_ngcontent-%COMP%] .btn-group[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn-group[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:1!important;visibility:visible!important}td.actions-cell[_ngcontent-%COMP%]:last-child{text-align:right}.btn-split-action[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{margin-top:3px!important}'],changeDetection:0})}}return r})();export{Ze as ReadyToShipComponent};
@@ -1 +1 @@
1
- import{a as J,b as K}from"./chunk-6GSJBXEE.js";import{b as R}from"./chunk-2C6XBRGE.js";import{a as q,b as H}from"./chunk-3BV4FPZE.js";import{a as z}from"./chunk-QDKVYF6D.js";import{b as U,c as j}from"./chunk-VAYLCOBC.js";import{a as B}from"./chunk-ACIMXBIC.js";import{ra as F}from"./chunk-SPNVH2ST.js";import{h as E}from"./chunk-VB4EKTTU.js";import{b as N}from"./chunk-NNVT5X6O.js";import{a as W,h as P,m as G,z as A}from"./chunk-BUBQQEYA.js";import{$c as L,Eb as T,Ga as y,Jb as v,Kb as M,Oc as _,Pc as g,Sc as f,Tc as x,Uc as S,bc as D,dc as I,ic as r,jc as p,kb as V,kc as m,lc as b,mb as d,na as O,od as k,sc as C,ua as a,va as s,wd as h,xc as u,zc as o}from"./chunk-ZPV56E2J.js";function Q(l,c){if(l&1){let e=C();p(0,"div",7)(1,"p-checkbox",8),S("ngModelChange",function(t){let n=a(e).$implicit;return x(n.selected,t)||(n.selected=t),s(t)}),u("ngModelChange",function(t){let n=a(e).$implicit,w=o(2);return s(w.onGroupSelect(t,n))}),m(),b(2,"img",9),p(3,"span"),_(4),m()()}if(l&2){let e=c.$implicit;d(),r("binary",!0),f("ngModel",e.selected),d(),r("src",e.img,V),d(2),g(e.label)}}function X(l,c){if(l&1&&(p(0,"div"),_(1),m()),l&2){let e=c.$implicit;d(),g(e.Name)}}function Y(l,c){if(l&1){let e=C();p(0,"p-multiselect",5,0),u("click",function(){a(e);let t=o();return s(t.onClickSelect())}),S("ngModelChange",function(t){a(e);let n=o();return x(n.selectedChannels,t)||(n.selectedChannels=t),s(t)}),u("ngModelChange",function(t){a(e);let n=o();return s(n.onChannelChange(t))})("onClear",function(){a(e);let t=o();return s(t.onClearSelectedChannel())}),M(2,Q,5,4,"ng-template",null,1,k)(4,X,2,1,"ng-template",6),m()}if(l&2){let e=o();r("options",e.multiselectOptions())("placeholder",e.placeholder()),f("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())("group",!0)}}function Z(l,c){if(l&1&&(p(0,"div",11),b(1,"img",12),p(2,"div"),_(3),m()()),l&2){let e=c.$implicit;d(),r("src",e.logo,V),d(2),g(e.Name)}}function $(l,c){if(l&1){let e=C();p(0,"p-select",10,2),u("click",function(){a(e);let t=o();return s(t.onClickSelect())}),S("ngModelChange",function(t){a(e);let n=o();return x(n.selectedChannels,t)||(n.selectedChannels=t),s(t)}),u("ngModelChange",function(t){a(e);let n=o();return s(n.onChannelChange(t))}),M(2,Z,4,2,"ng-template",6),m()}if(l&2){let e=o();r("options",e.options())("placeholder",e.placeholder()),f("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var fe=(()=>{class l extends z{constructor(){super(),this.authService=O(E),this.multiple=h(!1),this.clearable=h(!0),this.placeholder=h("Select Channels"),this.options=y(this.authService.getChannels()),this.maxSelectedLabels=h(6),this.multiselectOptions=y([]),this.onChange=e=>{},this.initMultiSelectOptions()}initMultiSelectOptions(){let e=this.authService.getChannels(),i=[];e.forEach(t=>{let n=i.find(w=>w.value===t.TypeID);n?n.items.push(t):(n={label:N[t.TypeID],selected:!1,img:t.Img,value:t.TypeID,items:[t]},i.push(n))}),this.multiselectOptions.set(i)}onGroupSelect(e,i){this.selectedChannels=this.selectedChannels?this.selectedChannels:[];let t=i.items.map(n=>n.ID);e?this.selectedChannels=[...this.selectedChannels,...t.filter(n=>!this.selectedChannels.includes(n))]:this.selectedChannels=this.selectedChannels.filter(n=>!t.includes(n)),this.onChange(this.selectedChannels)}onChannelChange(e){this.multiple()?e=e||[]:e=e||B.GuidEmpty,this.checkSelectedGroup(),this.onChange(e)}checkSelectedGroup(){this.multiselectOptions.update(e=>(e.forEach(i=>{let t=i.items.map(n=>n.ID);i.selected=t.every(n=>this.selectedChannels.includes(n))}),e))}onClearSelectedChannel(){this.multiselectOptions.update(e=>(e.forEach(i=>{i.selected=!1}),e)),this.onChange([])}onClickSelect(){this.initTopPosition(),setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||l)}}static{this.\u0275cmp=T({type:l,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],maxSelectedLabels:[1,"maxSelectedLabels"]},features:[L([{provide:W,multi:!0,useExisting:l}]),v],decls:2,vars:1,consts:[["multiSelect",""],["group",""],["select",""],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","onClear","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["pTemplate","item"],[1,"flex","items-center"],[1,"me-3",3,"ngModelChange","binary","ngModel"],[1,"me-2",2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"]],template:function(i,t){i&1&&D(0,Y,5,7,"p-multiselect",3)(1,$,3,6,"p-select",4),i&2&&I(t.multiple()?0:1)},dependencies:[K,J,F,R,A,P,G,j,U,H,q],styles:["li.p-multiselect-option{margin-left:30px}"],changeDetection:0})}}return l})();export{fe as a};
1
+ import{a as J,b as K}from"./chunk-6GSJBXEE.js";import{b as R}from"./chunk-2C6XBRGE.js";import{a as q,b as H}from"./chunk-3BV4FPZE.js";import{a as z}from"./chunk-QDKVYF6D.js";import{b as U,c as j}from"./chunk-VAYLCOBC.js";import{a as B}from"./chunk-ACIMXBIC.js";import{ra as F}from"./chunk-SPNVH2ST.js";import{h as E}from"./chunk-52GYT73T.js";import{b as N}from"./chunk-NNVT5X6O.js";import{a as W,h as P,m as G,z as A}from"./chunk-BUBQQEYA.js";import{$c as L,Eb as T,Ga as y,Jb as v,Kb as M,Oc as _,Pc as g,Sc as f,Tc as x,Uc as S,bc as D,dc as I,ic as r,jc as p,kb as V,kc as m,lc as b,mb as d,na as O,od as k,sc as C,ua as a,va as s,wd as h,xc as u,zc as o}from"./chunk-ZPV56E2J.js";function Q(l,c){if(l&1){let e=C();p(0,"div",7)(1,"p-checkbox",8),S("ngModelChange",function(t){let n=a(e).$implicit;return x(n.selected,t)||(n.selected=t),s(t)}),u("ngModelChange",function(t){let n=a(e).$implicit,w=o(2);return s(w.onGroupSelect(t,n))}),m(),b(2,"img",9),p(3,"span"),_(4),m()()}if(l&2){let e=c.$implicit;d(),r("binary",!0),f("ngModel",e.selected),d(),r("src",e.img,V),d(2),g(e.label)}}function X(l,c){if(l&1&&(p(0,"div"),_(1),m()),l&2){let e=c.$implicit;d(),g(e.Name)}}function Y(l,c){if(l&1){let e=C();p(0,"p-multiselect",5,0),u("click",function(){a(e);let t=o();return s(t.onClickSelect())}),S("ngModelChange",function(t){a(e);let n=o();return x(n.selectedChannels,t)||(n.selectedChannels=t),s(t)}),u("ngModelChange",function(t){a(e);let n=o();return s(n.onChannelChange(t))})("onClear",function(){a(e);let t=o();return s(t.onClearSelectedChannel())}),M(2,Q,5,4,"ng-template",null,1,k)(4,X,2,1,"ng-template",6),m()}if(l&2){let e=o();r("options",e.multiselectOptions())("placeholder",e.placeholder()),f("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())("group",!0)}}function Z(l,c){if(l&1&&(p(0,"div",11),b(1,"img",12),p(2,"div"),_(3),m()()),l&2){let e=c.$implicit;d(),r("src",e.logo,V),d(2),g(e.Name)}}function $(l,c){if(l&1){let e=C();p(0,"p-select",10,2),u("click",function(){a(e);let t=o();return s(t.onClickSelect())}),S("ngModelChange",function(t){a(e);let n=o();return x(n.selectedChannels,t)||(n.selectedChannels=t),s(t)}),u("ngModelChange",function(t){a(e);let n=o();return s(n.onChannelChange(t))}),M(2,Z,4,2,"ng-template",6),m()}if(l&2){let e=o();r("options",e.options())("placeholder",e.placeholder()),f("ngModel",e.selectedChannels),r("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var fe=(()=>{class l extends z{constructor(){super(),this.authService=O(E),this.multiple=h(!1),this.clearable=h(!0),this.placeholder=h("Select Channels"),this.options=y(this.authService.getChannels()),this.maxSelectedLabels=h(6),this.multiselectOptions=y([]),this.onChange=e=>{},this.initMultiSelectOptions()}initMultiSelectOptions(){let e=this.authService.getChannels(),i=[];e.forEach(t=>{let n=i.find(w=>w.value===t.TypeID);n?n.items.push(t):(n={label:N[t.TypeID],selected:!1,img:t.Img,value:t.TypeID,items:[t]},i.push(n))}),this.multiselectOptions.set(i)}onGroupSelect(e,i){this.selectedChannels=this.selectedChannels?this.selectedChannels:[];let t=i.items.map(n=>n.ID);e?this.selectedChannels=[...this.selectedChannels,...t.filter(n=>!this.selectedChannels.includes(n))]:this.selectedChannels=this.selectedChannels.filter(n=>!t.includes(n)),this.onChange(this.selectedChannels)}onChannelChange(e){this.multiple()?e=e||[]:e=e||B.GuidEmpty,this.checkSelectedGroup(),this.onChange(e)}checkSelectedGroup(){this.multiselectOptions.update(e=>(e.forEach(i=>{let t=i.items.map(n=>n.ID);i.selected=t.every(n=>this.selectedChannels.includes(n))}),e))}onClearSelectedChannel(){this.multiselectOptions.update(e=>(e.forEach(i=>{i.selected=!1}),e)),this.onChange([])}onClickSelect(){this.initTopPosition(),setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||l)}}static{this.\u0275cmp=T({type:l,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],maxSelectedLabels:[1,"maxSelectedLabels"]},features:[L([{provide:W,multi:!0,useExisting:l}]),v],decls:2,vars:1,consts:[["multiSelect",""],["group",""],["select",""],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","onClear","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels","group"],["pTemplate","item"],[1,"flex","items-center"],[1,"me-3",3,"ngModelChange","binary","ngModel"],[1,"me-2",2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"]],template:function(i,t){i&1&&D(0,Y,5,7,"p-multiselect",3)(1,$,3,6,"p-select",4),i&2&&I(t.multiple()?0:1)},dependencies:[K,J,F,R,A,P,G,j,U,H,q],styles:["li.p-multiselect-option{margin-left:30px}"],changeDetection:0})}}return l})();export{fe as a};
@@ -1,4 +1,4 @@
1
- import{a as ae}from"./chunk-HHZM6PB4.js";import{a as Xe,b as et,c as tt,e as nt,f as it,g as ot}from"./chunk-WMYEGCCH.js";import{g as at,i as rt,j as lt}from"./chunk-WZDFB7PP.js";import"./chunk-FJYX7L63.js";import{a as Ze,b as qe,c as Je}from"./chunk-I4XJB7OG.js";import"./chunk-MHV46BJA.js";import"./chunk-D2THPOQ7.js";import"./chunk-WXQUJZQY.js";import{a as Ke,b as Qe}from"./chunk-6GSJBXEE.js";import"./chunk-RUHYZ275.js";import"./chunk-3BV4FPZE.js";import{a as Ae,b as $e,c as We}from"./chunk-CHCLLSOR.js";import"./chunk-72AE6737.js";import{a as ze}from"./chunk-KYZGVVJM.js";import"./chunk-VAYLCOBC.js";import"./chunk-6PI5PUIQ.js";import"./chunk-6VOSRCWX.js";import"./chunk-XSXHGAXP.js";import"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-ASKT24WA.js";import"./chunk-ACIMXBIC.js";import"./chunk-67AXBZYF.js";import"./chunk-5QG5PZ7U.js";import"./chunk-KYK2ZFUZ.js";import{c as Oe,d as Re,e as Be}from"./chunk-KXLYQDZR.js";import{b as Fe}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import{a as ne}from"./chunk-RDXDKWLL.js";import"./chunk-RBYZVK4L.js";import{f as je,g as Ge,h as Ue,i as Ye,j as He}from"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import{e as Le}from"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import{qa as Pe}from"./chunk-SPNVH2ST.js";import"./chunk-BXA5YUTN.js";import{b as Ie}from"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{h as te}from"./chunk-VB4EKTTU.js";import{a as Ee}from"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import{a as ee}from"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import{b as X,c as y}from"./chunk-NNVT5X6O.js";import{b as Ve,c as ke,h as W,m as L,x as Ne,z}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{b as be,e as Te}from"./chunk-45DFJJAO.js";import{g as Me}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as $,z as xe}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as q,Ca as I,Dc as he,Eb as P,Ec as fe,Fc as ge,Ga as u,Ja as Q,Jc as N,Kb as k,Lc as Z,Nc as B,Oc as d,Pc as b,Qc as E,Sc as _e,Tc as we,Uc as Ce,V as pe,Yc as ve,_c as Se,aa as me,ad as U,bc as w,cd as A,dc as C,fc as F,gc as O,hc as R,ia as ce,ic as p,jc as o,k as de,kb as ue,kc as a,kd as Y,lc as v,ld as De,mb as l,mc as x,md as oe,na as S,nc as M,oc as ie,od as H,sc as D,sd as J,t as se,ua as m,va as c,vd as ye,wd as V,xc as g,zc as _}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as re,b as le}from"./chunk-66YHNWRR.js";function ut(t,s){if(t&1&&(x(0,"tr")(1,"td"),d(2),M(),x(3,"td"),d(4),M(),x(5,"td"),d(6),M(),x(7,"td"),d(8),M()()),t&2){let e=s.$implicit,i=s.$index;Z("over-due",e.Exception),l(2),b(i+1),l(2),b(e.Number),l(2),b(e.Status),l(2),b(e.Exception)}}function ht(t,s){if(t&1&&O(0,ut,9,6,"tr",6,F),t&2){let e,i=_();R((e=i.downloadResult())==null?null:e.Body)}}function ft(t,s){t&1&&(x(0,"tr",5)(1,"td",7)(2,"div",8),ie(3,"i",9),M(),x(4,"h4",10),d(5," There is no order to processed "),M()()())}var dt=(()=>{class t{constructor(){this.downloadResult=V()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:15,vars:1,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[1,"text-center"],[3,"over-due"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(i,n){if(i&1&&(x(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),ie(5,"th",4),x(6,"th"),d(7,"Order Number"),M(),x(8,"th"),d(9,"Status"),M(),x(10,"th"),d(11,"Exception"),M()()(),x(12,"tbody"),w(13,ht,2,0)(14,ft,6,0,"tr",5),M()()()()),i&2){let r;l(13),C(((r=n.downloadResult())==null||r.Body==null?null:r.Body.length)>0?13:14)}},encapsulation:2,changeDetection:0})}}return t})();var gt=()=>({standalone:!0}),pt=(()=>{class t{constructor(){this.datePipe=S($),this.fullWidth=V(!1),this.placeholder=V(""),this.timeChange=new I}ngOnInit(){}onTimeChange(e){let i=null;e&&(i=this.datePipe.transform(e,"HH:mm")),this.timeChange.emit(i),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="outside")}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"],placeholder:[1,"placeholder"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","baseZIndex","ngModel","timeOnly","ngModelOptions","placeholder"],["size","small","label","Close",3,"click"]],template:function(i,n){if(i&1){let r=D();o(0,"p-datepicker",1,0),Ce("ngModelChange",function(h){return m(r),we(n.time,h)||(n.time=h),c(h)}),g("ngModelChange",function(h){return m(r),c(n.onTimeChange(h))})("onSelect",function(){return m(r),c(n.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),g("click",function(){return m(r),N(1).hideOverlay(),c(n.onShowCalendar())}),a()()()}i&2&&(Z("full-width",n.fullWidth()),p("baseZIndex",1100),_e("ngModel",n.time),p("timeOnly",!0)("ngModelOptions",U(7,gt))("placeholder",n.placeholder()))},dependencies:[z,W,L,Je,qe,Ze,Pe],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"],changeDetection:0})}}return t})();var j=(()=>{class t{constructor(){this.httpService=S(Te),this.toastr=S(be),this.datePipe=S($)}gerChannelDetailById(e){return this.httpService.post(ee.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(ee.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(ee.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(me(i=>{i.Data?.length===0&&this.toastrEmptyPreview(e)})):de}toastrEmptyPreview(e){let i=this.datePipe.transform(e.From,"dd MMM yyyy"),n=this.datePipe.transform(e.To,"dd MMM yyyy"),r=e.TimeFrom?e.TimeFrom:"",f=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${i} ${r} to ${n} ${f}!`,"No Orders!")}validateDatePreview(e){let i=!0;return e.downloadType==!0?y.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),i=!1):y.getDaysDiff(e?.From,e?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),i=!1),i}getDateTitle(e,i){let n=y.formatTitleFromDate(new Date(e),new Date(i)),r=this.datePipe.transform(e,n),f=this.datePipe.transform(i,"dd MMM yyyy");return`${n==null?"":r+"-"} ${f}`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ce({token:t,factory:t.\u0275fac})}}return t})();function _t(t,s){if(t&1&&(o(0,"ng-option",7),v(1,"img",17),d(2),a()),t&2){let e=s.$implicit;p("value",e.ID),l(),p("src",e==null?null:e.Img,ue),l(),E("",e.Name," ")}}function wt(t,s){if(t&1){let e=D();o(0,"div",8)(1,"div",4)(2,"h5"),d(3,"Type"),a(),o(4,"p",5),d(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),g("ngModelChange",function(n){m(e);let r=_();return r.downloadType.set(n),c(r.onDownloadTypeChange())}),o(10,"mat-radio-button",20),d(11," Orders "),a(),o(12,"mat-radio-button",21),d(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),v(16,"i",24),a(),o(17,"p",25),d(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(t&2){let e=_();l(9),p("ngModel",e.downloadType()),l(),p("value",!1),l(2),p("value",!0)}}function Ct(t,s){t&1&&(o(0,"p",5),d(1," Select Disbursement date "),o(2,"span",26),d(3,"(payment date / order complete date)"),a(),d(4," of the channel you want to download (Max 1 Week). "),a())}function vt(t,s){t&1&&(o(0,"p",5),d(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function St(t,s){if(t&1){let e=D();o(0,"div",16)(1,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.startTime.set(n),c(r.onStartTimeChange())}),a(),o(2,"span",28),d(3,"-"),a(),o(4,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.endTime.set(n),c(r.onEndTimeChange())}),a()()}if(t&2){let e=_();l(),p("time",e.startTime()),l(3),p("time",e.endTime())}}var mt=(()=>{class t{constructor(){this.reset=V(!1),this.authService=S(te),this.tokenService=S(Ee),this.downloadService=S(j),this.downloadType=u(!1),this.selectedChannelId=u(null),this.channelOptions=u(this.authService.getChannels()),this.channelType=X,this.selectedChannel=u(null),this.showTimePicker=u(!1),this.startDate=u(null),this.endDate=u(null),this.startTime=u("00:00"),this.endTime=u("23:59"),this.minDate=u(new Date),this.maxDate=u(new Date),this.filterData=new I,this._onRememberMeChange=ye({alias:"onRememberMeChange"}),this.rememberMe=u(!1),Q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let e=this.tokenService?.getTokenValue(),i=e?.DownloadRange?JSON.parse(e?.DownloadRange):0;if(i<=0)this.minDate.set(null),this.maxDate.set(null);else{let n=new Date,r=y.addDays(n,i-1);this.minDate.set(r)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(e=>e.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(se(e=>e?.Model),pe(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=y.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(e){this._onRememberMeChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[q([j,Le()])],decls:32,vars:13,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"row","mt-6"],[1,"col-12","d-flex","align-items-center"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker","min","max"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel","maxlength"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"col-6","d-flex","align-items-center","gap-2","mt-10"],["type","checkbox",2,"width","16px","height","16px",3,"ngModelChange","ngModel"],[1,"ms-2"],[1,"mt-8","d-flex","align-items-center"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(i,n){if(i&1){let r=D();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),d(5,"Select a Channel"),a(),o(6,"p",5),d(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),g("ngModelChange",function(h){return m(r),n.selectedChannelId.set(h),c(n.onSelectChannel())}),O(10,_t,3,3,"ng-option",7,F),a()()(),w(12,wt,19,3,"div",8),Y(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),d(17,"Date Range"),a(),w(18,Ct,5,0,"p",5)(19,vt,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),g("ngModelChange",function(h){return m(r),c(n.startDate.set(h))})("click",function(){m(r);let h=N(26);return c(h.open())}),a(),o(24,"input",12),g("ngModelChange",function(h){return m(r),n.endDate.set(h),c(n.onFilterDateChange())})("click",function(){m(r);let h=N(26);return c(h.open())}),a()(),v(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),g("ngModelChange",function(h){return m(r),n.rememberMe.set(h),c(n.onChangeRememberMe(h))}),a(),o(29,"h5",15),d(30,"Save Date"),a()(),w(31,St,5,2,"div",16),a()()()()}if(i&2){let r,f,h=N(26);l(9),p("clearable",!1)("ngModel",n.selectedChannelId()),l(),R(n.channelOptions()),l(2),C((r=De(13,11,n.channelDetail$))!=null&&r.ServiceFeeWriteOff&&((r=n.selectedChannel())==null?null:r.TypeID)==n.channelType.Tokopedia?12:-1),l(6),C(n.downloadType()&&((f=n.selectedChannel())==null?null:f.TypeID)==n.channelType.Tokopedia?18:19),l(4),p("rangePicker",h)("min",n.minDate())("max",n.maxDate()),l(),p("ngModel",n.startDate()),l(),p("ngModel",n.endDate()),l(4),p("ngModel",n.rememberMe()),l(3),C(n.showTimePicker()?31:-1)}},dependencies:[Be,Re,Oe,We,Ae,$e,z,ke,Ve,W,Ne,L,pt,Ye,je,He,Ge,Ue,xe],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}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"],changeDetection:0})}}return t})();var T=(function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t})(T||{});var G=(function(t){return t[t.DoNothing=0]="DoNothing",t[t.New=1]="New",t[t.Update=2]="Update",t})(G||{});var Dt=(t,s)=>({"btn-secondary text-white":t,"btn-outline-dark":s}),yt=(t,s)=>({"btn-success":t,"btn-outline-success":s}),xt=(t,s)=>({"btn-warning text-white":t,"btn-outline-warning":s}),bt=(t,s)=>({"btn-danger":t,"btn-outline-danger":s}),Tt=()=>({"min-width":"100%"}),Mt=()=>({minWidth:"14rem"}),Et=(t,s)=>({"over-due-today":t,"over-due":s});function Pt(t,s){t&1&&d(0," Created Date ")}function Vt(t,s){t&1&&d(0," Modified Date ")}function kt(t,s){if(t&1){let e=D();o(0,"p-multiselect",24),g("onChange",function(n){let r=m(e).filterCallback;return c(r(n.value))}),a()}if(t&2){let e=s.$implicit,i=_(2);p("ngModel",e)("options",i.channelStatusOptions())("panelStyle",U(3,Mt))}}function Nt(t,s){if(t&1&&(o(0,"tr"),v(1,"th",18),o(2,"th",19),d(3,"Number"),a(),o(4,"th",20),w(5,Pt,1,0)(6,Vt,1,0),a(),o(7,"th",21)(8,"div",22),d(9," Channel "),o(10,"p-columnFilter",23),k(11,kt,1,4,"ng-template",null,3,H),a()()(),o(13,"th",21),d(14,"POS Status"),a(),o(15,"th"),d(16,"Action"),a(),v(17,"th",18),a()),t&2){let e,i=_();l(5),C(((e=i.selectedChannel())==null?null:e.TypeID)===i.channelType.WooCommerce?5:6),l(5),p("showMatchModes",!1)("showOperator",!1)("showAddButton",!1)}}function It(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Date,"dd MMM yyyy HH:mm:ss"))}}function Ft(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Modified,"dd MMM yyyy HH:mm:ss"))}}function Ot(t,s){if(t&1&&(o(0,"span"),d(1),a()),t&2){let e=_().$implicit;l(),b(e.ActionString)}}function Rt(t,s){if(t&1&&(o(0,"li"),d(1),a()),t&2){let e=s.$implicit;l(),b(e)}}function Bt(t,s){if(t&1&&(o(0,"ul",26),O(1,Rt,2,1,"li",null,F),a()),t&2){let e=_().$implicit;l(),R(e.ActionString)}}function At(t,s){if(t&1&&(o(0,"span",27),v(1,"i",28),a()),t&2){let e=_().$implicit;p("title",Se("Delivery : ",e.DeliveryState,`
1
+ import{a as ae}from"./chunk-HHZM6PB4.js";import{a as Xe,b as et,c as tt,e as nt,f as it,g as ot}from"./chunk-WMYEGCCH.js";import{g as at,i as rt,j as lt}from"./chunk-WZDFB7PP.js";import"./chunk-FJYX7L63.js";import{a as Ze,b as qe,c as Je}from"./chunk-I4XJB7OG.js";import"./chunk-MHV46BJA.js";import"./chunk-D2THPOQ7.js";import"./chunk-WXQUJZQY.js";import{a as Ke,b as Qe}from"./chunk-6GSJBXEE.js";import"./chunk-RUHYZ275.js";import"./chunk-3BV4FPZE.js";import{a as Ae,b as $e,c as We}from"./chunk-CHCLLSOR.js";import"./chunk-72AE6737.js";import{a as ze}from"./chunk-X55KFM6T.js";import"./chunk-VAYLCOBC.js";import"./chunk-6PI5PUIQ.js";import"./chunk-6VOSRCWX.js";import"./chunk-XSXHGAXP.js";import"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-C4LXIOM4.js";import"./chunk-ACIMXBIC.js";import"./chunk-67AXBZYF.js";import"./chunk-5QG5PZ7U.js";import"./chunk-KYK2ZFUZ.js";import{c as Oe,d as Re,e as Be}from"./chunk-KXLYQDZR.js";import{b as Fe}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import{a as ne}from"./chunk-RDXDKWLL.js";import"./chunk-RBYZVK4L.js";import{f as je,g as Ge,h as Ue,i as Ye,j as He}from"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import{e as Le}from"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import{qa as Pe}from"./chunk-SPNVH2ST.js";import"./chunk-BXA5YUTN.js";import{b as Ie}from"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{h as te}from"./chunk-52GYT73T.js";import{a as Ee}from"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import{a as ee}from"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import{b as X,c as y}from"./chunk-NNVT5X6O.js";import{b as Ve,c as ke,h as W,m as L,x as Ne,z}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{b as be,e as Te}from"./chunk-45DFJJAO.js";import{g as Me}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as $,z as xe}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as q,Ca as I,Dc as he,Eb as P,Ec as fe,Fc as ge,Ga as u,Ja as Q,Jc as N,Kb as k,Lc as Z,Nc as B,Oc as d,Pc as b,Qc as E,Sc as _e,Tc as we,Uc as Ce,V as pe,Yc as ve,_c as Se,aa as me,ad as U,bc as w,cd as A,dc as C,fc as F,gc as O,hc as R,ia as ce,ic as p,jc as o,k as de,kb as ue,kc as a,kd as Y,lc as v,ld as De,mb as l,mc as x,md as oe,na as S,nc as M,oc as ie,od as H,sc as D,sd as J,t as se,ua as m,va as c,vd as ye,wd as V,xc as g,zc as _}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as re,b as le}from"./chunk-66YHNWRR.js";function ut(t,s){if(t&1&&(x(0,"tr")(1,"td"),d(2),M(),x(3,"td"),d(4),M(),x(5,"td"),d(6),M(),x(7,"td"),d(8),M()()),t&2){let e=s.$implicit,i=s.$index;Z("over-due",e.Exception),l(2),b(i+1),l(2),b(e.Number),l(2),b(e.Status),l(2),b(e.Exception)}}function ht(t,s){if(t&1&&O(0,ut,9,6,"tr",6,F),t&2){let e,i=_();R((e=i.downloadResult())==null?null:e.Body)}}function ft(t,s){t&1&&(x(0,"tr",5)(1,"td",7)(2,"div",8),ie(3,"i",9),M(),x(4,"h4",10),d(5," There is no order to processed "),M()()())}var dt=(()=>{class t{constructor(){this.downloadResult=V()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:15,vars:1,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[1,"text-center"],[3,"over-due"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(i,n){if(i&1&&(x(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),ie(5,"th",4),x(6,"th"),d(7,"Order Number"),M(),x(8,"th"),d(9,"Status"),M(),x(10,"th"),d(11,"Exception"),M()()(),x(12,"tbody"),w(13,ht,2,0)(14,ft,6,0,"tr",5),M()()()()),i&2){let r;l(13),C(((r=n.downloadResult())==null||r.Body==null?null:r.Body.length)>0?13:14)}},encapsulation:2,changeDetection:0})}}return t})();var gt=()=>({standalone:!0}),pt=(()=>{class t{constructor(){this.datePipe=S($),this.fullWidth=V(!1),this.placeholder=V(""),this.timeChange=new I}ngOnInit(){}onTimeChange(e){let i=null;e&&(i=this.datePipe.transform(e,"HH:mm")),this.timeChange.emit(i),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="outside")}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"],placeholder:[1,"placeholder"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","baseZIndex","ngModel","timeOnly","ngModelOptions","placeholder"],["size","small","label","Close",3,"click"]],template:function(i,n){if(i&1){let r=D();o(0,"p-datepicker",1,0),Ce("ngModelChange",function(h){return m(r),we(n.time,h)||(n.time=h),c(h)}),g("ngModelChange",function(h){return m(r),c(n.onTimeChange(h))})("onSelect",function(){return m(r),c(n.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),g("click",function(){return m(r),N(1).hideOverlay(),c(n.onShowCalendar())}),a()()()}i&2&&(Z("full-width",n.fullWidth()),p("baseZIndex",1100),_e("ngModel",n.time),p("timeOnly",!0)("ngModelOptions",U(7,gt))("placeholder",n.placeholder()))},dependencies:[z,W,L,Je,qe,Ze,Pe],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"],changeDetection:0})}}return t})();var j=(()=>{class t{constructor(){this.httpService=S(Te),this.toastr=S(be),this.datePipe=S($)}gerChannelDetailById(e){return this.httpService.post(ee.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(ee.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(ee.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(me(i=>{i.Data?.length===0&&this.toastrEmptyPreview(e)})):de}toastrEmptyPreview(e){let i=this.datePipe.transform(e.From,"dd MMM yyyy"),n=this.datePipe.transform(e.To,"dd MMM yyyy"),r=e.TimeFrom?e.TimeFrom:"",f=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${i} ${r} to ${n} ${f}!`,"No Orders!")}validateDatePreview(e){let i=!0;return e.downloadType==!0?y.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),i=!1):y.getDaysDiff(e?.From,e?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),i=!1),i}getDateTitle(e,i){let n=y.formatTitleFromDate(new Date(e),new Date(i)),r=this.datePipe.transform(e,n),f=this.datePipe.transform(i,"dd MMM yyyy");return`${n==null?"":r+"-"} ${f}`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ce({token:t,factory:t.\u0275fac})}}return t})();function _t(t,s){if(t&1&&(o(0,"ng-option",7),v(1,"img",17),d(2),a()),t&2){let e=s.$implicit;p("value",e.ID),l(),p("src",e==null?null:e.Img,ue),l(),E("",e.Name," ")}}function wt(t,s){if(t&1){let e=D();o(0,"div",8)(1,"div",4)(2,"h5"),d(3,"Type"),a(),o(4,"p",5),d(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),g("ngModelChange",function(n){m(e);let r=_();return r.downloadType.set(n),c(r.onDownloadTypeChange())}),o(10,"mat-radio-button",20),d(11," Orders "),a(),o(12,"mat-radio-button",21),d(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),v(16,"i",24),a(),o(17,"p",25),d(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(t&2){let e=_();l(9),p("ngModel",e.downloadType()),l(),p("value",!1),l(2),p("value",!0)}}function Ct(t,s){t&1&&(o(0,"p",5),d(1," Select Disbursement date "),o(2,"span",26),d(3,"(payment date / order complete date)"),a(),d(4," of the channel you want to download (Max 1 Week). "),a())}function vt(t,s){t&1&&(o(0,"p",5),d(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function St(t,s){if(t&1){let e=D();o(0,"div",16)(1,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.startTime.set(n),c(r.onStartTimeChange())}),a(),o(2,"span",28),d(3,"-"),a(),o(4,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.endTime.set(n),c(r.onEndTimeChange())}),a()()}if(t&2){let e=_();l(),p("time",e.startTime()),l(3),p("time",e.endTime())}}var mt=(()=>{class t{constructor(){this.reset=V(!1),this.authService=S(te),this.tokenService=S(Ee),this.downloadService=S(j),this.downloadType=u(!1),this.selectedChannelId=u(null),this.channelOptions=u(this.authService.getChannels()),this.channelType=X,this.selectedChannel=u(null),this.showTimePicker=u(!1),this.startDate=u(null),this.endDate=u(null),this.startTime=u("00:00"),this.endTime=u("23:59"),this.minDate=u(new Date),this.maxDate=u(new Date),this.filterData=new I,this._onRememberMeChange=ye({alias:"onRememberMeChange"}),this.rememberMe=u(!1),Q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let e=this.tokenService?.getTokenValue(),i=e?.DownloadRange?JSON.parse(e?.DownloadRange):0;if(i<=0)this.minDate.set(null),this.maxDate.set(null);else{let n=new Date,r=y.addDays(n,i-1);this.minDate.set(r)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(e=>e.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(se(e=>e?.Model),pe(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=y.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(e){this._onRememberMeChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[q([j,Le()])],decls:32,vars:13,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"row","mt-6"],[1,"col-12","d-flex","align-items-center"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker","min","max"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel","maxlength"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"col-6","d-flex","align-items-center","gap-2","mt-10"],["type","checkbox",2,"width","16px","height","16px",3,"ngModelChange","ngModel"],[1,"ms-2"],[1,"mt-8","d-flex","align-items-center"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(i,n){if(i&1){let r=D();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),d(5,"Select a Channel"),a(),o(6,"p",5),d(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),g("ngModelChange",function(h){return m(r),n.selectedChannelId.set(h),c(n.onSelectChannel())}),O(10,_t,3,3,"ng-option",7,F),a()()(),w(12,wt,19,3,"div",8),Y(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),d(17,"Date Range"),a(),w(18,Ct,5,0,"p",5)(19,vt,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),g("ngModelChange",function(h){return m(r),c(n.startDate.set(h))})("click",function(){m(r);let h=N(26);return c(h.open())}),a(),o(24,"input",12),g("ngModelChange",function(h){return m(r),n.endDate.set(h),c(n.onFilterDateChange())})("click",function(){m(r);let h=N(26);return c(h.open())}),a()(),v(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),g("ngModelChange",function(h){return m(r),n.rememberMe.set(h),c(n.onChangeRememberMe(h))}),a(),o(29,"h5",15),d(30,"Save Date"),a()(),w(31,St,5,2,"div",16),a()()()()}if(i&2){let r,f,h=N(26);l(9),p("clearable",!1)("ngModel",n.selectedChannelId()),l(),R(n.channelOptions()),l(2),C((r=De(13,11,n.channelDetail$))!=null&&r.ServiceFeeWriteOff&&((r=n.selectedChannel())==null?null:r.TypeID)==n.channelType.Tokopedia?12:-1),l(6),C(n.downloadType()&&((f=n.selectedChannel())==null?null:f.TypeID)==n.channelType.Tokopedia?18:19),l(4),p("rangePicker",h)("min",n.minDate())("max",n.maxDate()),l(),p("ngModel",n.startDate()),l(),p("ngModel",n.endDate()),l(4),p("ngModel",n.rememberMe()),l(3),C(n.showTimePicker()?31:-1)}},dependencies:[Be,Re,Oe,We,Ae,$e,z,ke,Ve,W,Ne,L,pt,Ye,je,He,Ge,Ue,xe],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}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"],changeDetection:0})}}return t})();var T=(function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t})(T||{});var G=(function(t){return t[t.DoNothing=0]="DoNothing",t[t.New=1]="New",t[t.Update=2]="Update",t})(G||{});var Dt=(t,s)=>({"btn-secondary text-white":t,"btn-outline-dark":s}),yt=(t,s)=>({"btn-success":t,"btn-outline-success":s}),xt=(t,s)=>({"btn-warning text-white":t,"btn-outline-warning":s}),bt=(t,s)=>({"btn-danger":t,"btn-outline-danger":s}),Tt=()=>({"min-width":"100%"}),Mt=()=>({minWidth:"14rem"}),Et=(t,s)=>({"over-due-today":t,"over-due":s});function Pt(t,s){t&1&&d(0," Created Date ")}function Vt(t,s){t&1&&d(0," Modified Date ")}function kt(t,s){if(t&1){let e=D();o(0,"p-multiselect",24),g("onChange",function(n){let r=m(e).filterCallback;return c(r(n.value))}),a()}if(t&2){let e=s.$implicit,i=_(2);p("ngModel",e)("options",i.channelStatusOptions())("panelStyle",U(3,Mt))}}function Nt(t,s){if(t&1&&(o(0,"tr"),v(1,"th",18),o(2,"th",19),d(3,"Number"),a(),o(4,"th",20),w(5,Pt,1,0)(6,Vt,1,0),a(),o(7,"th",21)(8,"div",22),d(9," Channel "),o(10,"p-columnFilter",23),k(11,kt,1,4,"ng-template",null,3,H),a()()(),o(13,"th",21),d(14,"POS Status"),a(),o(15,"th"),d(16,"Action"),a(),v(17,"th",18),a()),t&2){let e,i=_();l(5),C(((e=i.selectedChannel())==null?null:e.TypeID)===i.channelType.WooCommerce?5:6),l(5),p("showMatchModes",!1)("showOperator",!1)("showAddButton",!1)}}function It(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Date,"dd MMM yyyy HH:mm:ss"))}}function Ft(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Modified,"dd MMM yyyy HH:mm:ss"))}}function Ot(t,s){if(t&1&&(o(0,"span"),d(1),a()),t&2){let e=_().$implicit;l(),b(e.ActionString)}}function Rt(t,s){if(t&1&&(o(0,"li"),d(1),a()),t&2){let e=s.$implicit;l(),b(e)}}function Bt(t,s){if(t&1&&(o(0,"ul",26),O(1,Rt,2,1,"li",null,F),a()),t&2){let e=_().$implicit;l(),R(e.ActionString)}}function At(t,s){if(t&1&&(o(0,"span",27),v(1,"i",28),a()),t&2){let e=_().$implicit;p("title",Se("Delivery : ",e.DeliveryState,`
2
2
  Payment : `,e.PaymentState))}}function $t(t,s){if(t&1&&(o(0,"tr")(1,"td"),d(2),a(),o(3,"td"),d(4),a(),w(5,It,3,4,"td")(6,Ft,3,4,"td"),o(7,"td")(8,"span"),d(9),a(),d(10),a(),o(11,"td",25)(12,"span"),d(13),a(),d(14),a(),o(15,"td"),w(16,Ot,2,1,"span"),w(17,Bt,3,0,"ul",26),a(),o(18,"td"),w(19,At,2,3,"span",27),a()()),t&2){let e,i=s.$implicit,n=s.rowIndex,r=_();l(2),b(n+1),l(2),b(i.Number),l(),C(((e=r.selectedChannel())==null?null:e.TypeID)===r.channelType.WooCommerce?5:6),l(4),E("",i.ChannelStatus," - "),l(),E("",i.ChannelStatusDescription," "),l(),B(A(13,Et,(i==null?null:i.Action)==r.actionPreviewOrder.Update,(i==null?null:i.Action)==r.actionPreviewOrder.New)),p("matTooltip",i.POSStatus==91||i.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),l(2),E("",i.POSStatus," - "),l(),E("",i.POSStatusDescription," "),l(2),C(i.ActionString.length==1?16:-1),l(),C(i.ActionString.length>1?17:-1),l(2),C(i.ChannelStatus!=99&&i.POSStatus!=99?19:-1)}}function Wt(t,s){t&1&&(o(0,"tr",29)(1,"td",30)(2,"div",31),v(3,"i",32),a(),o(4,"h4",33),d(5," There is no order to processed "),a()()())}var ct=(()=>{class t{constructor(){this.orderPreview=V(),this.selectedChannel=V(),this.channelType=X,this.allData=u(0),this.syncData=u(0),this.wrongData=u(0),this.unsyncData=u(0),this.pillStatus=u(T.ALL),this.actionPreviewOrder=G,this.previewStatus=T,this.displayPreviewData=u([]),this.exportOrders=new I,this.channelStatusOptions=J(()=>{let e=this.orderPreview()??[],i=new Map;return e.forEach(n=>{i.has(n.ChannelStatus)||i.set(n.ChannelStatus,n.ChannelStatusDescription)}),Array.from(i.entries()).map(([n,r])=>({label:`${n} - ${r}`,value:n}))}),Q(()=>{this.orderPreview()&&(this.filterPreviewData(T.ALL),this.initLengthStatusData())},{allowSignalWrites:!0})}filterPreviewData(e){this.pillStatus.update(()=>e),this.displayPreviewData.update(()=>this.filterDataByStatus(e))}initLengthStatusData(){this.wrongData.update(()=>this.filterDataByStatus(T.WRONG).length),this.syncData.update(()=>this.filterDataByStatus(T.SYNC).length),this.allData.update(()=>this.orderPreview().length),this.unsyncData.update(()=>this.filterDataByStatus(T.UNSYNC).length)}filterDataByStatus(e){let i=[];switch(e){case T.ALL:i=this.orderPreview();break;case T.SYNC:i=this.orderPreview().filter(n=>n.Action==G.DoNothing);break;case T.WRONG:i=this.orderPreview().filter(n=>n.Action==G.Update);break;case T.UNSYNC:i=this.orderPreview().filter(n=>n.Action==G.New);break}return i}onExportOrders(){this.exportOrders.emit()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["preview-step"]],inputs:{orderPreview:[1,"orderPreview"],selectedChannel:[1,"selectedChannel"]},outputs:{exportOrders:"onExportOrders"},decls:30,vars:27,consts:[["header",""],["body",""],["emptymessage",""],["filter",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[3,"value","tableStyle"],["width","1%"],["width","25%"],["width","15%"],["width","10%"],[1,"d-flex","align-items-center","justify-content-between","gap-2"],["field","ChannelStatus","matchMode","in","display","menu",3,"showMatchModes","showOperator","showAddButton"],["optionLabel","label","optionValue","value","placeholder","All",2,"min-width","14rem","width","14rem",3,"onChange","ngModel","options","panelStyle"],["matTooltipClass","custom-width-tooltip",3,"matTooltip"],[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"]],template:function(i,n){if(i&1){let r=D();o(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"div")(5,"ul",8)(6,"li",9)(7,"button",10),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.ALL))}),d(8),a()(),o(9,"li",11)(10,"button",12),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.SYNC))}),d(11),a()(),o(12,"li",11)(13,"button",13),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.WRONG))}),d(14),a()(),o(15,"li",11)(16,"button",14),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.UNSYNC))}),d(17),a()()()(),o(18,"div")(19,"button",15),g("click",function(){return m(r),c(n.onExportOrders())}),v(20,"i",16),o(21,"span"),d(22,"Export"),a()()()()(),o(23,"p-table",17),k(24,Nt,18,4,"ng-template",null,0,H)(26,$t,20,16,"ng-template",null,1,H)(28,Wt,6,0,"ng-template",null,2,H),a()()()}i&2&&(l(7),B(A(14,Dt,n.pillStatus()=="all",n.pillStatus()!="all")),l(),E(" All (",n.allData(),") "),l(2),B(A(17,yt,n.pillStatus()=="sync",n.pillStatus()!="sync")),l(),E(" Existing (",n.syncData(),") "),l(2),B(A(20,xt,n.pillStatus()=="wrong",n.pillStatus()!="wrong")),l(),E(" Wrong Status (",n.wrongData(),") "),l(2),B(A(23,bt,n.pillStatus()=="unsync",n.pillStatus()!="unsync")),l(),E(" Missing (",n.unsyncData(),") "),l(6),p("value",n.displayPreviewData())("tableStyle",U(26,Tt)))},dependencies:[ne,Ie,lt,at,rt,Qe,Ke,z,W,L,$],encapsulation:2,changeDetection:0})}}return t})();var Lt=["stepper"];function zt(t,s){if(t&1){let e=D();o(0,"div",2)(1,"button",20),g("click",function(){m(e);let n=_();return c(n.onStepperBack())}),d(2," Back "),a(),o(3,"button",21),g("click",function(){m(e);let n=_();return c(n.onNextStep())}),d(4," Next "),a()()}if(t&2){let e=_();l(3),p("disabled",e.disabledNextFilter())}}function jt(t,s){if(t&1){let e=D();o(0,"button",22),g("click",function(){m(e);let n=_();return c(n.onNextStep())}),d(1," Next "),a()}if(t&2){let e=_();p("disabled",e.disabledNextFilter())}}function Gt(t,s){if(t&1){let e=D();o(0,"button",23),g("click",function(){m(e);let n=_();return c(n.onNewDownload())}),v(1,"i",24),d(2," New "),a()}}function Ut(t,s){t&1&&(v(0,"i",25),o(1,"span"),d(2,"Filter"),a())}function Yt(t,s){t&1&&(v(0,"i",26),o(1,"span"),d(2,"Preview"),a())}function Ht(t,s){if(t&1){let e=D();o(0,"preview-step",27),g("onExportOrders",function(){m(e);let n=_();return c(n.onExportOrders())}),a()}if(t&2){let e=_();p("orderPreview",s)("selectedChannel",e.selectedChannel())}}function Kt(t,s){t&1&&(v(0,"i",28),o(1,"span"),d(2,"Finish"),a())}function Qt(t,s){t&1&&v(0,"complete-step",16),t&2&&p("downloadResult",s)}function Zt(t,s){t&1&&(o(0,"h6"),d(1,"1"),a())}function qt(t,s){t&1&&(o(0,"h6"),d(1,"2"),a())}function Jt(t,s){t&1&&(o(0,"h6"),d(1,"3"),a())}var Vi=(()=>{class t{constructor(){this.downloadService=S(j),this.orderService=S(ae),this.productService=S(ze),this.authService=S(te),this.stepperSelectedIndex=u(0),this.disabledNextFilter=u(!0),this.filter=u(void 0),this.isResetFilter=u(!1),this.orderPreview=u(void 0),this.downloadPreview=u(void 0),this.pageTitle=u("Download to POS"),this.cacheKey=u(y.GuidEMpty),this.rememberMe=u(!1),this.selectedChannel=J(()=>{let e=this.filter()?.channelId;if(e)return this.productService.findChannelById(e,this.authService.getChannels())})}onFilterChange(e){this.filter.set(e),this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>{let e=this.filter();return y.IsEmpty(e?.channelId)||!y.isValidDate(e.startDate)||!y.isValidDate(e.endDate)})}onNextStep(){switch(this.stepper.selectedIndex){case 0:this.onPreview();let e=this.productService.findChannelById(this.filter().channelId,this.authService.getChannels());this.setPageTitle(`Preview ${e?.Name}`);break;case 1:this.onDownload(),this.setPageTitle("Download");break}}onStepperNext(){this.stepper.selected.completed=!0,this.stepper.next()}onPreview(){let e=this.filter(),i={ID:e.channelId,From:e.startDate,To:e.endDate,IsDisbursement:e.downloadType};y.IsNotEmpty(e.startTime)&&(i=le(re({},i),{TimeFrom:e.startTime+":00",TimeTo:e.endTime+":00"})),this.downloadService.onPreviewOrder(i).subscribe(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext()),this.orderPreview.set(n.Data)})}onExportOrders(){let e=this.filter(),i={ID:e.channelId,From:e.startDate?e.startDate:null,To:e.endDate?e.endDate:null},n=`Orders ${this.downloadService.getDateTitle(e.startDate,e.endDate)}`;this.orderService.exportOrders(i,n).subscribe()}onDownload(){let e=this.filter(),i={ID:e.channelId,From:e.startDate,To:e.endDate,ListPreview:[],IsDisbursement:e.downloadType,CacheKey:this.cacheKey()},n=this.orderPreview();i.ListPreview=n,this.downloadService.getDownloadOrder(i).subscribe(r=>{this.downloadPreview.set(r),this.onStepperNext()})}setPageTitle(e){let i=this.filter();this.pageTitle.update(()=>`
3
3
  ${e} (${this.downloadService.getDateTitle(i.startDate,i.endDate)})
4
4
  `)}onStepperBack(){this.stepper.previous(),this.pageTitle.update(()=>"Download to POS")}onNewDownload(){this.isResetFilter.update(()=>!this.rememberMe()),this.stepper.reset(),this.stepperSelectedIndex.update(()=>0),this.orderPreview.set(void 0),this.downloadPreview.set(void 0),this.pageTitle.update(()=>"Download to POS")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-download-v2"]],viewQuery:function(i,n){if(i&1&&he(Lt,5),i&2){let r;fe(r=ge())&&(n.stepper=r.first)}},features:[q([j,ae,{provide:Xe,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:17,consts:[["stepper",""],[3,"hideSearchBox","hideSearchDropdown","headerTitle","description"],[1,"btn-group","me-3"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"disabled"],[1,"btn","btn-outline-secondary","btn-fill","d-flex","align-items-center","gap-2"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectedIndexChange","ngClass","selectedIndex"],["state","filter",3,"completed","editable"],["matStepLabel",""],[1,"w-100",3,"onFilterChange","onRememberMeChange","reset"],["state","preview",3,"editable","completed"],[3,"orderPreview","selectedChannel"],["state","finish"],[3,"downloadResult"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill","d-flex","align-items-center","gap-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt"],[1,"fa-solid","fa-filter","me-3"],[1,"fa-solid","fa-file","me-3"],[3,"onExportOrders","orderPreview","selectedChannel"],[1,"fa-solid","fa-flag","me-3"]],template:function(i,n){if(i&1){let r=D();o(0,"mainpanel",1)(1,"actions"),w(2,zt,5,1,"div",2),w(3,jt,2,1,"button",3),w(4,Gt,3,0,"button",4),a(),o(5,"content")(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"mat-stepper",9,0),g("selectedIndexChange",function(h){return m(r),c(n.stepperSelectedIndex.set(h))}),o(12,"mat-step",10),k(13,Ut,3,0,"ng-template",11),o(14,"filter-step",12),g("onFilterChange",function(h){return m(r),c(n.onFilterChange(h))})("onRememberMeChange",function(h){return m(r),c(n.rememberMe.set(h))}),a()(),o(15,"mat-step",13),k(16,Yt,3,0,"ng-template",11),w(17,Ht,1,2,"preview-step",14),a(),o(18,"mat-step",15),k(19,Kt,3,0,"ng-template",11),w(20,Qt,1,1,"complete-step",16),a(),k(21,Zt,2,0,"ng-template",17)(22,qt,2,0,"ng-template",18)(23,Jt,2,0,"ng-template",19),a()()()()()()()}if(i&2){let r,f,h=N(11);p("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",n.pageTitle())("description",n.pageTitle()),l(2),C(n.stepperSelectedIndex()==1?2:-1),l(),C(n.stepperSelectedIndex()==0?3:-1),l(),C(n.stepperSelectedIndex()==2?4:-1),l(6),p("ngClass",ve("last-edited-step-"+h.selectedIndex))("selectedIndex",n.stepperSelectedIndex()),l(2),p("completed",!1)("editable",n.stepperSelectedIndex()!=2),l(2),p("reset",n.isResetFilter()),l(),p("editable",n.stepperSelectedIndex()!=2)("completed",!1),l(2),C((r=n.orderPreview())?17:-1,r),l(3),C((f=n.downloadPreview())?20:-1,f)}},dependencies:[dt,mt,ct,ot,nt,et,it,tt,Fe,Me,ne],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{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-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}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
@@ -1,3 +1,3 @@
1
- import{a as z,b as q,c as J,d as K,e as Q,f as X}from"./chunk-WMYEGCCH.js";import{b as G}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-RBYZVK4L.js";import"./chunk-QGNTUEVO.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-BXA5YUTN.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{h as F}from"./chunk-VB4EKTTU.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import{c as H,h as $,m as W,z as j}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{e as A}from"./chunk-45DFJJAO.js";import"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as P,Eb as E,Ga as b,Jc as w,Kb as x,Kc as R,Oc as l,Pc as V,bc as y,dc as v,fc as D,gc as T,hc as N,ia as I,ic as m,jb as B,jc as o,kc as r,lc as g,mb as p,mc as h,na as S,nc as C,oc as M,sc as _,tc as L,ua as d,va as u,vd as O,wd as U,xc as f,zc as c}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as k}from"./chunk-66YHNWRR.js";var Z=(()=>{class e{constructor(){this.httpService=S(A)}download(t){return this.httpService.post("/api/Product/downloadurl",t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function ne(e,s){if(e&1&&(h(0,"th"),l(1),C()),e&2){let t=s.$implicit;p(),V(t.column)}}function ie(e,s){if(e&1&&(h(0,"td"),M(1,"span",4),C()),e&2){let t=s.$implicit,n=c().$implicit;p(),L("innerHTML",n[t.prop],B)}}function oe(e,s){if(e&1&&(h(0,"tr"),T(1,ie,2,1,"td",null,D),C()),e&2){let t=s.$implicit,n=c();R("background-color",t.Status>200?"#F4D6D5":"#DEE9C9"),p(),N(n.configs())}}var ee=(()=>{class e{constructor(){this.configs=U([]),this.data=U([]),this.status=U(void 0),this.eventClose=O({alias:"onClose"})}onClose(){this.eventClose.emit()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=E({type:e,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"background-color"],[3,"innerHTML"]],template:function(n,i){n&1&&(h(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),T(4,ne,2,1,"th",null,D),C()(),h(6,"tbody"),T(7,oe,3,2,"tr",3,D),C()()()),n&2&&(p(4),N(i.configs()),p(3),N(i.data()))},encapsulation:2,changeDetection:0})}}return e})();function re(e,s){if(e&1){let t=_();o(0,"button",17),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onNewStepperState(a))}),g(1,"i",18),l(2," New "),r()}}function ae(e,s){if(e&1){let t=_();o(0,"button",17),f("click",function(){d(t),c();let i=w(11);return u(i.previous())}),l(1," Back "),r()}}function le(e,s){if(e&1){let t=_();o(0,"button",19),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onStepperNext(a))}),l(1," Next "),r()}}function se(e,s){if(e&1){let t=_();o(0,"button",20),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onSubmit(a))}),l(1," Download "),r()}if(e&2){let t=c();m("disabled",!t.urls)}}function pe(e,s){e&1&&(g(0,"i",21),o(1,"span"),l(2,"Instruction"),r())}function ce(e,s){e&1&&(o(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),l(4,"Note"),r()(),o(5,"div",26)(6,"ol",27)(7,"li"),l(8," Use this form to Download Products from Tokopedia using product URL "),r(),o(9,"li"),l(10," Copy Product URL from "),o(11,"a",28),l(12,"https://seller.tokopedia.com/ "),r(),l(13," and paste in this form "),r(),o(14,"li"),l(15," Use New Line when you want to input several product URLs "),r()()()()())}function me(e,s){e&1&&(g(0,"i",29),o(1,"span"),l(2,"Download"),r())}function de(e,s){if(e&1){let t=_();o(0,"div",22)(1,"textarea",30),f("ngModelChange",function(i){d(t);let a=c();return u(a.urls.set(i))}),r()()}if(e&2){let t=c();p(),m("placeholder",t.urlPlaceholder)("ngModel",t.urls())}}function ue(e,s){e&1&&(g(0,"i",31),o(1,"span"),l(2,"Finish"),r())}function _e(e,s){if(e&1&&(o(0,"div",22),g(1,"app-response-api-list",32),r()),e&2){let t=c();p(),m("data",t.downloadResponses())("configs",t.configs)}}function fe(e,s){e&1&&(o(0,"h6"),l(1,"1"),r())}function ge(e,s){e&1&&(o(0,"h6"),l(1,"2"),r())}function he(e,s){e&1&&(o(0,"h6"),l(1,"3"),r())}var Fe=(()=>{class e{constructor(){this.downloadService=S(Z),this.authService=S(F),this.urls=b(null),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=b([]),this.stepperState=b("DOWNLOAD"),this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
1
+ import{a as z,b as q,c as J,d as K,e as Q,f as X}from"./chunk-WMYEGCCH.js";import{b as G}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-RBYZVK4L.js";import"./chunk-QGNTUEVO.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-BXA5YUTN.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{h as F}from"./chunk-52GYT73T.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import{c as H,h as $,m as W,z as j}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{e as A}from"./chunk-45DFJJAO.js";import"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as P,Eb as E,Ga as b,Jc as w,Kb as x,Kc as R,Oc as l,Pc as V,bc as y,dc as v,fc as D,gc as T,hc as N,ia as I,ic as m,jb as B,jc as o,kc as r,lc as g,mb as p,mc as h,na as S,nc as C,oc as M,sc as _,tc as L,ua as d,va as u,vd as O,wd as U,xc as f,zc as c}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as k}from"./chunk-66YHNWRR.js";var Z=(()=>{class e{constructor(){this.httpService=S(A)}download(t){return this.httpService.post("/api/Product/downloadurl",t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function ne(e,s){if(e&1&&(h(0,"th"),l(1),C()),e&2){let t=s.$implicit;p(),V(t.column)}}function ie(e,s){if(e&1&&(h(0,"td"),M(1,"span",4),C()),e&2){let t=s.$implicit,n=c().$implicit;p(),L("innerHTML",n[t.prop],B)}}function oe(e,s){if(e&1&&(h(0,"tr"),T(1,ie,2,1,"td",null,D),C()),e&2){let t=s.$implicit,n=c();R("background-color",t.Status>200?"#F4D6D5":"#DEE9C9"),p(),N(n.configs())}}var ee=(()=>{class e{constructor(){this.configs=U([]),this.data=U([]),this.status=U(void 0),this.eventClose=O({alias:"onClose"})}onClose(){this.eventClose.emit()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=E({type:e,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"background-color"],[3,"innerHTML"]],template:function(n,i){n&1&&(h(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),T(4,ne,2,1,"th",null,D),C()(),h(6,"tbody"),T(7,oe,3,2,"tr",3,D),C()()()),n&2&&(p(4),N(i.configs()),p(3),N(i.data()))},encapsulation:2,changeDetection:0})}}return e})();function re(e,s){if(e&1){let t=_();o(0,"button",17),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onNewStepperState(a))}),g(1,"i",18),l(2," New "),r()}}function ae(e,s){if(e&1){let t=_();o(0,"button",17),f("click",function(){d(t),c();let i=w(11);return u(i.previous())}),l(1," Back "),r()}}function le(e,s){if(e&1){let t=_();o(0,"button",19),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onStepperNext(a))}),l(1," Next "),r()}}function se(e,s){if(e&1){let t=_();o(0,"button",20),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onSubmit(a))}),l(1," Download "),r()}if(e&2){let t=c();m("disabled",!t.urls)}}function pe(e,s){e&1&&(g(0,"i",21),o(1,"span"),l(2,"Instruction"),r())}function ce(e,s){e&1&&(o(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),l(4,"Note"),r()(),o(5,"div",26)(6,"ol",27)(7,"li"),l(8," Use this form to Download Products from Tokopedia using product URL "),r(),o(9,"li"),l(10," Copy Product URL from "),o(11,"a",28),l(12,"https://seller.tokopedia.com/ "),r(),l(13," and paste in this form "),r(),o(14,"li"),l(15," Use New Line when you want to input several product URLs "),r()()()()())}function me(e,s){e&1&&(g(0,"i",29),o(1,"span"),l(2,"Download"),r())}function de(e,s){if(e&1){let t=_();o(0,"div",22)(1,"textarea",30),f("ngModelChange",function(i){d(t);let a=c();return u(a.urls.set(i))}),r()()}if(e&2){let t=c();p(),m("placeholder",t.urlPlaceholder)("ngModel",t.urls())}}function ue(e,s){e&1&&(g(0,"i",31),o(1,"span"),l(2,"Finish"),r())}function _e(e,s){if(e&1&&(o(0,"div",22),g(1,"app-response-api-list",32),r()),e&2){let t=c();p(),m("data",t.downloadResponses())("configs",t.configs)}}function fe(e,s){e&1&&(o(0,"h6"),l(1,"1"),r())}function ge(e,s){e&1&&(o(0,"h6"),l(1,"2"),r())}function he(e,s){e&1&&(o(0,"h6"),l(1,"3"),r())}var Fe=(()=>{class e{constructor(){this.downloadService=S(Z),this.authService=S(F),this.urls=b(null),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=b([]),this.stepperState=b("DOWNLOAD"),this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
2
2
  https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=b(this.authService.getDomain())}onStepperChange(t){this.stepperState.set(t.selectedStep.state)}onSubmit(t){let i=(this.urls()??"").split(/\r?\n/).filter(a=>a.trim());this.downloadService.download(i).subscribe(a=>{this.downloadResponses.set(a),this.mappingLinkToProduct(),this.onStepperNext(t)})}mappingLinkToProduct(){let t=this.currentDomain(),n=this.downloadResponses().map(i=>{let a=k({},i);return a.Name=a?.Name?`<a href="${t}/menu/Products/Catalog/Products/Info?ID=${a.ID}" target="_blank">${a?.Name}</a>`:"-",a});this.downloadResponses.set(n)}onNewStepperState(t){this.downloadResponses.set([]),this.urls.set(null),this.stepperState.set("DOWNLOAD"),t.reset(),this.onStepperNext(t)}onStepperNext(t){t.selected.completed=!0,t.next()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=E({type:e,selectors:[["app-by-url"]],features:[P([{provide:z,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["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,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[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"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(n,i){if(n&1){let a=_();o(0,"mainpanel",1)(1,"actions"),y(2,re,3,0,"button",2),y(3,ae,2,0,"button",2),y(4,le,2,0,"button",3),y(5,se,2,1,"button",4),r(),o(6,"content")(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,0),f("selectionChange",function(te){return d(a),u(i.onStepperChange(te))}),o(12,"mat-step",9),x(13,pe,3,0,"ng-template",10)(14,ce,16,0,"ng-template",11),r(),o(15,"mat-step",12),x(16,me,3,0,"ng-template",10)(17,de,2,2,"ng-template",11),r(),o(18,"mat-step",13),x(19,ue,3,0,"ng-template",10)(20,_e,2,2,"ng-template",11),r(),x(21,fe,2,0,"ng-template",14)(22,ge,2,0,"ng-template",15)(23,he,2,0,"ng-template",16),r()()()()()()}n&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),v(i.stepperState()=="FINISH"?2:-1),p(),v(i.stepperState()=="DOWNLOAD"?3:-1),p(),v(i.stepperState()=="GUIDE"?4:-1),p(),v(i.stepperState()=="DOWNLOAD"?5:-1),p(5),m("selectedIndex",1),p(2),m("editable",i.stepperState()!="FINISH")("completed",!0),p(3),m("editable",i.stepperState()!="FINISH")("completed",!1))},dependencies:[G,X,Q,q,K,j,H,$,W,ee,J],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.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%}
3
3
  `],encapsulation:2,changeDetection:0})}}return e})();export{Fe as ByUrlComponent};
@@ -1 +1 @@
1
- import{a as oe}from"./chunk-MIMZDUDP.js";import{a as ie}from"./chunk-ZEALEXSH.js";import{a as ne}from"./chunk-J5PTSESV.js";import"./chunk-26I3WOHT.js";import"./chunk-72AE6737.js";import{a as te}from"./chunk-KMCVYMXQ.js";import"./chunk-ACIMXBIC.js";import{a as Y,b as Z,d as ee}from"./chunk-KXLYQDZR.js";import{b as X}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-2GINYFUG.js";import"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-BXA5YUTN.js";import{b as Q}from"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{h as G}from"./chunk-VB4EKTTU.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import{c as H,h as q,m as $,o as j,u as K,v as U,z as J}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{e as V}from"./chunk-45DFJJAO.js";import{b as k,e as z}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as L}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as N,Ga as c,Kb as E,Lc as I,Nc as B,Oc as l,Pc as b,Qc as v,ad as P,bc as _,bd as W,dc as h,fc as O,gc as R,hc as w,ic as s,jc as n,kb as x,kc as t,kd as F,lc as S,mb as o,md as A,na as f,sc as D,ua as M,va as T,xc as m,zc as C}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as u,b as y}from"./chunk-66YHNWRR.js";var re=()=>["/menu/log/order/detail-user"],le=a=>({ID:a});function de(a,g){if(a&1&&(n(0,"span",22),S(1,"img",23),t(),l(2)),a&2){let e=g.item;o(),s("src",e.Img,x)("alt",e.Name),o(),v(" ",e.Name," ")}}function pe(a,g){a&1&&(n(0,"th")(1,"span",29),l(2," Response Body Warning "),t()())}function se(a,g){a&1&&(n(0,"th")(1,"span",29),l(2," Number Override "),t()())}function me(a,g){if(a&1&&(n(0,"td",26)(1,"span",31),l(2),t()()),a&2){let e=C().$implicit;o(),I("bg-warning",e.responseBodyWarning!=null),o(),b(e.responseBodyWarning)}}function ge(a,g){if(a&1&&(n(0,"td"),l(1),t()),a&2){let e=C().$implicit;o(),v(" ",e.ResponseBodyWarningReference," ")}}function ce(a,g){if(a&1&&(n(0,"tr")(1,"td")(2,"a",30),l(3),F(4,"date"),t()(),n(5,"td"),l(6),t(),n(7,"td"),l(8),t(),n(9,"td"),l(10),t(),n(11,"td",26)(12,"span",31),l(13),t()(),_(14,me,3,3,"td",26),_(15,ge,2,1,"td"),t()),a&2){let e=g.$implicit,d=C(2);o(2),s("routerLink",P(14,re))("queryParams",W(15,le,e.ID)),o(),v(" ",A(4,11,e.Created,"dd MMM yyyy HH:mm:ss")," "),o(3),b(e.ChannelName),o(2),b(e.POSActionTypeString),o(2),b(e.Number),o(2),B(e.ResponseCode===200||e.ResponseCode===202?"bg-success":"bg-warning"),o(),v(" ",e.ResponseCode," "),o(),h(d.responseBodyWarningVisible()?14:-1),o(),h(d.responseBodyWarningVisible()?15:-1)}}function ue(a,g){if(a&1){let e=D();n(0,"div",20)(1,"table",24)(2,"thead")(3,"tr",25)(4,"th"),l(5,"Date"),t(),n(6,"th"),l(7,"Channel"),t(),n(8,"th"),l(9,"Actions"),t(),n(10,"th"),l(11,"Number"),t(),n(12,"th",26)(13,"span",27),l(14," Response Code "),t()(),_(15,pe,3,0,"th"),_(16,se,3,0,"th"),t()(),n(17,"tbody"),R(18,ce,16,17,"tr",null,O),t()(),n(20,"mat-paginator",28),m("page",function(i){M(e);let r=C();return T(r.changePage(i))}),t()()}if(a&2){let e=C();o(15),h(e.responseBodyWarningVisible()?15:-1),o(),h(e.responseBodyWarningVisible()?16:-1),o(2),w(e.Result()),o(2),s("length",e.paginationTotal())("pageSize",e.paginationPageSize())("pageIndex",e.filter().PageNumber==0?0:e.filter().PageNumber-1)}}function _e(a,g){a&1&&(n(0,"div",21),S(1,"app-empty-state"),t())}var Pe=(()=>{class a{constructor(){this.http=f(V),this._RawLogService=f(oe),this.route=f(k),this.authService=f(G),this.Result=c([]),this.filter=c({RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""}),this.paginationTotal=c(0),this.paginationPageSize=c(0),this.Number=c(null),this.channelOptions=c(this.authService.getChannels()),this.ActionTypeList=c(null),this.responseBodyWarningVisible=c(!1)}ngOnInit(){this.route.queryParams.subscribe(e=>{this.responseCode=e.responseCode,this.responseCode!=null?this.Load(e):this.Load()})}Load(e={}){this.http.post("/api/OrdersLoader/Get",e).subscribe(d=>{this.filter.update(i=>u(u({},i),d.Filter)),this.ActionTypeList.set(d.Options.ActionTypeList),this.Get()})}Get(e){this.filter.update(d=>y(u({},d),{Number:e})),this.http.post("/api/Orders/Get",this.filter()).subscribe(d=>{this._RawLogService.Data=d.hits;let i=[];for(let r of d.hits){r._source.log.responseBodyWarning!=null&&this.responseBodyWarningVisible.set(!0);let p={ID:r._id,Created:r._source["@timestamp_received"],shopId:r._source.shopId,MarketTypeString:r._source.log.type,ChannelName:r._source?.channelId!=null?this.channelOptions().find(ae=>ae.ID===r._source?.channelId)?.Name:"",POSActionTypeString:r._source.message,Number:r._source.log.number,ResponseCode:r._source.log.responseCode,responseBodyWarning:r._source.log.responseBodyWarning,ResponseBodyWarningReference:r._source.log.ResponseBodyWarningReference};i.push(p)}this.Result.set(i),this.paginationTotal.set(d.total.value),this.paginationPageSize.set(this.filter().RowCount>this.paginationTotal()?this.paginationTotal():this.filter().RowCount)})}changePage(e){this.filter.update(d=>y(u({},d),{PageNumber:e.pageIndex+1})),this.Get()}updateFilter(e,d){this.filter.update(i=>y(u({},i),{[e]:d}))}static{this.\u0275fac=function(d){return new(d||a)}}static{this.\u0275cmp=N({type:a,selectors:[["app-order"]],decls:42,vars:14,consts:[["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(d,i){if(d&1&&(n(0,"mainpanel",0),m("textChange",function(p){return i.Number.set(p)})("onSubmit",function(p){return i.Get(p)}),n(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),t(),n(5,"ng-select",2),m("ngModelChange",function(p){return i.updateFilter("ChannelID",p)}),E(6,de,3,3,"ng-template",3),t()(),n(7,"div",4)(8,"label",1),l(9,"Action"),t(),n(10,"ng-select",5),m("ngModelChange",function(p){return i.updateFilter("ActionType",p)}),t()(),n(11,"div",4)(12,"label",6),l(13,"From/To"),t(),n(14,"div",7)(15,"datepicker",8),m("dateChange",function(p){return i.updateFilter("From",p)}),t()(),n(16,"div")(17,"datepicker",9),m("dateChange",function(p){return i.updateFilter("To",p)}),t()()(),n(18,"div",4)(19,"label",10),l(20,"Response Code"),t(),n(21,"input",11),m("ngModelChange",function(p){return i.updateFilter("StatusCode",p)}),t()(),n(22,"div",4)(23,"label",10),l(24,"Response Body Warning"),t(),n(25,"input",12),m("ngModelChange",function(p){return i.updateFilter("responseBodyWarning",p)}),t(),n(26,"datalist",13),S(27,"option",14),t()(),n(28,"div",4)(29,"label",10),l(30,"Page Number"),t(),n(31,"input",15),m("ngModelChange",function(p){return i.updateFilter("PageNumber",p)}),t()(),n(32,"div",4)(33,"label",10),l(34,"Page Size"),t(),n(35,"input",16),m("ngModelChange",function(p){return i.updateFilter("RowCount",p)}),t()()(),n(36,"content")(37,"div",17)(38,"div",18)(39,"div",19),_(40,ue,21,5,"div",20)(41,_e,2,0,"div",21),t()()()()()),d&2){let r;s("text",i.Number()),o(5),s("clearable",!0)("items",i.channelOptions())("ngModel",i.filter().ChannelID),o(5),s("clearable",!0)("items",i.ActionTypeList())("ngModel",i.filter().ActionType),o(5),s("date",i.filter().From),o(2),s("date",i.filter().To),o(4),s("ngModel",i.filter().StatusCode),o(4),s("ngModel",i.filter().responseBodyWarning),o(6),s("ngModel",i.filter().PageNumber),o(4),s("ngModel",i.filter().RowCount),o(5),h(((r=i.Result())==null?null:r.length)>0?40:41)}},dependencies:[X,ee,J,K,U,H,j,q,$,Y,Z,ne,Q,z,ie,te,L],encapsulation:2,changeDetection:0})}}return a})();export{Pe as OrderComponent};
1
+ import{a as oe}from"./chunk-MIMZDUDP.js";import{a as ie}from"./chunk-ZEALEXSH.js";import{a as ne}from"./chunk-J5PTSESV.js";import"./chunk-26I3WOHT.js";import"./chunk-72AE6737.js";import{a as te}from"./chunk-KMCVYMXQ.js";import"./chunk-ACIMXBIC.js";import{a as Y,b as Z,d as ee}from"./chunk-KXLYQDZR.js";import{b as X}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-2GINYFUG.js";import"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-BXA5YUTN.js";import{b as Q}from"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{h as G}from"./chunk-52GYT73T.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import{c as H,h as q,m as $,o as j,u as K,v as U,z as J}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{e as V}from"./chunk-45DFJJAO.js";import{b as k,e as z}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as L}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as N,Ga as c,Kb as E,Lc as I,Nc as B,Oc as l,Pc as b,Qc as v,ad as P,bc as _,bd as W,dc as h,fc as O,gc as R,hc as w,ic as s,jc as n,kb as x,kc as t,kd as F,lc as S,mb as o,md as A,na as f,sc as D,ua as M,va as T,xc as m,zc as C}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as u,b as y}from"./chunk-66YHNWRR.js";var re=()=>["/menu/log/order/detail-user"],le=a=>({ID:a});function de(a,g){if(a&1&&(n(0,"span",22),S(1,"img",23),t(),l(2)),a&2){let e=g.item;o(),s("src",e.Img,x)("alt",e.Name),o(),v(" ",e.Name," ")}}function pe(a,g){a&1&&(n(0,"th")(1,"span",29),l(2," Response Body Warning "),t()())}function se(a,g){a&1&&(n(0,"th")(1,"span",29),l(2," Number Override "),t()())}function me(a,g){if(a&1&&(n(0,"td",26)(1,"span",31),l(2),t()()),a&2){let e=C().$implicit;o(),I("bg-warning",e.responseBodyWarning!=null),o(),b(e.responseBodyWarning)}}function ge(a,g){if(a&1&&(n(0,"td"),l(1),t()),a&2){let e=C().$implicit;o(),v(" ",e.ResponseBodyWarningReference," ")}}function ce(a,g){if(a&1&&(n(0,"tr")(1,"td")(2,"a",30),l(3),F(4,"date"),t()(),n(5,"td"),l(6),t(),n(7,"td"),l(8),t(),n(9,"td"),l(10),t(),n(11,"td",26)(12,"span",31),l(13),t()(),_(14,me,3,3,"td",26),_(15,ge,2,1,"td"),t()),a&2){let e=g.$implicit,d=C(2);o(2),s("routerLink",P(14,re))("queryParams",W(15,le,e.ID)),o(),v(" ",A(4,11,e.Created,"dd MMM yyyy HH:mm:ss")," "),o(3),b(e.ChannelName),o(2),b(e.POSActionTypeString),o(2),b(e.Number),o(2),B(e.ResponseCode===200||e.ResponseCode===202?"bg-success":"bg-warning"),o(),v(" ",e.ResponseCode," "),o(),h(d.responseBodyWarningVisible()?14:-1),o(),h(d.responseBodyWarningVisible()?15:-1)}}function ue(a,g){if(a&1){let e=D();n(0,"div",20)(1,"table",24)(2,"thead")(3,"tr",25)(4,"th"),l(5,"Date"),t(),n(6,"th"),l(7,"Channel"),t(),n(8,"th"),l(9,"Actions"),t(),n(10,"th"),l(11,"Number"),t(),n(12,"th",26)(13,"span",27),l(14," Response Code "),t()(),_(15,pe,3,0,"th"),_(16,se,3,0,"th"),t()(),n(17,"tbody"),R(18,ce,16,17,"tr",null,O),t()(),n(20,"mat-paginator",28),m("page",function(i){M(e);let r=C();return T(r.changePage(i))}),t()()}if(a&2){let e=C();o(15),h(e.responseBodyWarningVisible()?15:-1),o(),h(e.responseBodyWarningVisible()?16:-1),o(2),w(e.Result()),o(2),s("length",e.paginationTotal())("pageSize",e.paginationPageSize())("pageIndex",e.filter().PageNumber==0?0:e.filter().PageNumber-1)}}function _e(a,g){a&1&&(n(0,"div",21),S(1,"app-empty-state"),t())}var Pe=(()=>{class a{constructor(){this.http=f(V),this._RawLogService=f(oe),this.route=f(k),this.authService=f(G),this.Result=c([]),this.filter=c({RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""}),this.paginationTotal=c(0),this.paginationPageSize=c(0),this.Number=c(null),this.channelOptions=c(this.authService.getChannels()),this.ActionTypeList=c(null),this.responseBodyWarningVisible=c(!1)}ngOnInit(){this.route.queryParams.subscribe(e=>{this.responseCode=e.responseCode,this.responseCode!=null?this.Load(e):this.Load()})}Load(e={}){this.http.post("/api/OrdersLoader/Get",e).subscribe(d=>{this.filter.update(i=>u(u({},i),d.Filter)),this.ActionTypeList.set(d.Options.ActionTypeList),this.Get()})}Get(e){this.filter.update(d=>y(u({},d),{Number:e})),this.http.post("/api/Orders/Get",this.filter()).subscribe(d=>{this._RawLogService.Data=d.hits;let i=[];for(let r of d.hits){r._source.log.responseBodyWarning!=null&&this.responseBodyWarningVisible.set(!0);let p={ID:r._id,Created:r._source["@timestamp_received"],shopId:r._source.shopId,MarketTypeString:r._source.log.type,ChannelName:r._source?.channelId!=null?this.channelOptions().find(ae=>ae.ID===r._source?.channelId)?.Name:"",POSActionTypeString:r._source.message,Number:r._source.log.number,ResponseCode:r._source.log.responseCode,responseBodyWarning:r._source.log.responseBodyWarning,ResponseBodyWarningReference:r._source.log.ResponseBodyWarningReference};i.push(p)}this.Result.set(i),this.paginationTotal.set(d.total.value),this.paginationPageSize.set(this.filter().RowCount>this.paginationTotal()?this.paginationTotal():this.filter().RowCount)})}changePage(e){this.filter.update(d=>y(u({},d),{PageNumber:e.pageIndex+1})),this.Get()}updateFilter(e,d){this.filter.update(i=>y(u({},i),{[e]:d}))}static{this.\u0275fac=function(d){return new(d||a)}}static{this.\u0275cmp=N({type:a,selectors:[["app-order"]],decls:42,vars:14,consts:[["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(d,i){if(d&1&&(n(0,"mainpanel",0),m("textChange",function(p){return i.Number.set(p)})("onSubmit",function(p){return i.Get(p)}),n(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),t(),n(5,"ng-select",2),m("ngModelChange",function(p){return i.updateFilter("ChannelID",p)}),E(6,de,3,3,"ng-template",3),t()(),n(7,"div",4)(8,"label",1),l(9,"Action"),t(),n(10,"ng-select",5),m("ngModelChange",function(p){return i.updateFilter("ActionType",p)}),t()(),n(11,"div",4)(12,"label",6),l(13,"From/To"),t(),n(14,"div",7)(15,"datepicker",8),m("dateChange",function(p){return i.updateFilter("From",p)}),t()(),n(16,"div")(17,"datepicker",9),m("dateChange",function(p){return i.updateFilter("To",p)}),t()()(),n(18,"div",4)(19,"label",10),l(20,"Response Code"),t(),n(21,"input",11),m("ngModelChange",function(p){return i.updateFilter("StatusCode",p)}),t()(),n(22,"div",4)(23,"label",10),l(24,"Response Body Warning"),t(),n(25,"input",12),m("ngModelChange",function(p){return i.updateFilter("responseBodyWarning",p)}),t(),n(26,"datalist",13),S(27,"option",14),t()(),n(28,"div",4)(29,"label",10),l(30,"Page Number"),t(),n(31,"input",15),m("ngModelChange",function(p){return i.updateFilter("PageNumber",p)}),t()(),n(32,"div",4)(33,"label",10),l(34,"Page Size"),t(),n(35,"input",16),m("ngModelChange",function(p){return i.updateFilter("RowCount",p)}),t()()(),n(36,"content")(37,"div",17)(38,"div",18)(39,"div",19),_(40,ue,21,5,"div",20)(41,_e,2,0,"div",21),t()()()()()),d&2){let r;s("text",i.Number()),o(5),s("clearable",!0)("items",i.channelOptions())("ngModel",i.filter().ChannelID),o(5),s("clearable",!0)("items",i.ActionTypeList())("ngModel",i.filter().ActionType),o(5),s("date",i.filter().From),o(2),s("date",i.filter().To),o(4),s("ngModel",i.filter().StatusCode),o(4),s("ngModel",i.filter().responseBodyWarning),o(6),s("ngModel",i.filter().PageNumber),o(4),s("ngModel",i.filter().RowCount),o(5),h(((r=i.Result())==null?null:r.length)>0?40:41)}},dependencies:[X,ee,J,K,U,H,j,q,$,Y,Z,ne,Q,z,ie,te,L],encapsulation:2,changeDetection:0})}}return a})();export{Pe as OrderComponent};
@@ -1,4 +1,4 @@
1
- import{a as nt}from"./chunk-4JTBEEYK.js";import{a as Q}from"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-7R55YTL6.js";import{b as we,c as ee}from"./chunk-NNVT5X6O.js";import{d as Qe}from"./chunk-BMVBJQDF.js";import{a as Ge,b as fe,c as Ze,d as Je,e as ge,f as Xe,g as me,h as Ye,i as G,j as ye,k as x}from"./chunk-34FX4M3J.js";import{e as et}from"./chunk-45DFJJAO.js";import{d as tt}from"./chunk-OF426VSL.js";import{H as qe,I as Ve}from"./chunk-4NAKX6WQ.js";import{Bd as L,D as Ne,Da as H,E as Fe,Fb as U,L as le,La as ze,P as Le,Q as $e,Ua as K,V as ue,Y as O,Z as de,aa as he,c as g,ca as We,d as je,da as He,h as Oe,i as Be,ia as T,ja as W,l as q,la as C,m as Y,ma as f,n as B,na as M,o as V,ra as pe,t as R,ta as Ke,u as Me,za as Ue}from"./chunk-ZPV56E2J.js";import{b as y}from"./chunk-WFMAM73Y.js";import{a as ce,i as A}from"./chunk-66YHNWRR.js";var ot={production:!0,version:"6.31.2",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var it=(()=>{class r{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let t=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return typeof t=="string"&&(t=[t]),t||[]}ParseToken(e){try{let n=e.split(".")[0].replace("-","+").replace("_","/"),o=JSON.parse(window.atob(n)),c=e.split(".")[1].replace("-","+").replace("_","/"),s=JSON.parse(window.atob(c));return s.header=o,s}catch{return!1}}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=T({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Tt="firebase",Ct="11.10.0";G(Tt,Ct,"app");var z=new We("ANGULARFIRE2_VERSION");var st=(r,a)=>{let e=a?[a]:Ye(),t=[];return e.forEach(n=>{n.container.getProvider(r).instances.forEach(i=>{t.includes(i)||t.push(i)})}),t},ve=(function(r){return r[r.SILENT=0]="SILENT",r[r.WARN=1]="WARN",r[r.VERBOSE=2]="VERBOSE",r})(ve||{}),Mr=L()&&typeof Zone<"u"?ve.WARN:ve.SILENT;var te=class{zone;delegate;constructor(a,e=Be){this.zone=a,this.delegate=e}now(){return this.delegate.now()}schedule(a,e,t){let n=this.zone,o=function(i){n?n.runGuarded(()=>{a.apply(this,[i])}):a.apply(this,[i])};return this.delegate.schedule(o,e,t)}},Ae=(()=>{class r{outsideAngular;insideAngular;constructor(){let e=M(H);this.outsideAngular=e.runOutsideAngular(()=>new te(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=e.run(()=>new te(typeof Zone>"u"?void 0:Zone.current,Oe))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=T({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Pt="firebase",xt="11.10.0";x.registerVersion(Pt,xt,"app-compat");var _t=["ngOnDestroy"],ct=(r,a,e,t={})=>new Proxy(r,{get:(n,o)=>e.runOutsideAngular(()=>{if(r[o])return t?.spy?.get&&t.spy.get(o,r[o]),r[o];if(_t.indexOf(o)>-1)return()=>{};let i=a.toPromise().then(c=>{let s=c?.[o];return typeof s=="function"?s.bind(c):s?.then?s.then(l=>e.run(()=>l)):e.run(()=>s)});return new Proxy(()=>{},{get:(c,s)=>i[s],apply:(c,s,l)=>i.then(h=>{let u=h?.(...l);return t?.spy?.apply&&t.spy.apply(o,l,u),u})})})});var re=class{constructor(a){return a}},ne=new C("angularfire2.app.options"),oe=new C("angularfire2.app.name");function ke(r,a,e){let t=typeof e=="string"&&e||"[DEFAULT]",n=typeof e=="object"&&e||{};n.name=n.name||t;let i=x.apps.filter(c=>c&&c.name===n.name)[0]||a.runOutsideAngular(()=>x.initializeApp(r,n));try{if(JSON.stringify(r)!==JSON.stringify(i.options)){let c=!!module.hot;Rt("error",`${i.name} Firebase App already initialized with different options${c?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new re(i)}var Rt=(r,...a)=>{L()&&typeof console<"u"&&console[r](...a)},jt={provide:re,useFactory:ke,deps:[ne,H,[new ze,oe]]},zr=(()=>{class r{static initializeApp(e,t){return{ngModule:r,providers:[{provide:ne,useValue:e},{provide:oe,useValue:t}]}}constructor(e){x.registerVersion("angularfire",z.full,"core"),x.registerVersion("angularfire",z.full,"app-compat"),x.registerVersion("angular",He.full,e.toString())}static \u0275fac=function(t){return new(t||r)(f(K))};static \u0275mod=U({type:r});static \u0275inj=W({providers:[jt]})}return r})();function lt(r,a,e,t,n){let[,o,i]=globalThis.\u0275AngularfireInstanceCache.find(c=>c[0]===r)||[];if(o)return Ot(n,i)||(at("error",`${a} was already initialized on the ${e} Firebase App with different settings.${Bt?" You may need to reload as Firebase is not HMR aware.":""}`),at("warn",{is:n,was:i})),o;{let c=t();return globalThis.\u0275AngularfireInstanceCache.push([r,c,n]),c}}function Ot(r,a){try{return r.toString()===a.toString()}catch{return r===a}}var Bt=typeof module<"u"&&!!module.hot,at=(r,...a)=>{L()&&typeof console<"u"&&console[r](...a)};globalThis.\u0275AngularfireInstanceCache||=[];var Mt=new Map,Nt={activated:!1,tokenObservers:[]},Ft={initialized:!1,enabled:!1};function _(r){return Mt.get(r)||Object.assign({},Nt)}function pt(){return Ft}var Lt="https://content-firebaseappcheck.googleapis.com/v1";var $t="exchangeDebugToken",ut={OFFSET_DURATION:300*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:960*1e3},nn=1440*60*1e3;var Ee=class{constructor(a,e,t,n,o){if(this.operation=a,this.retryPolicy=e,this.getWaitDuration=t,this.lowerBound=n,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=n,n>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(a){return A(this,null,function*(){this.stop();try{this.pending=new fe,this.pending.promise.catch(e=>{}),yield Wt(this.getNextRun(a)),this.pending.resolve(),yield this.pending.promise,this.pending=new fe,this.pending.promise.catch(e=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(a){if(a)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}};function Wt(r){return new Promise(a=>{setTimeout(a,r)})}var Ht={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},N=new Je("appCheck","AppCheck",Ht);function ft(r){if(!_(r).activated)throw N.create("use-before-activation",{appName:r.name})}function gt(t,n){return A(this,arguments,function*({url:r,body:a},e){let o={"Content-Type":"application/json"},i=e.getImmediate({optional:!0});if(i){let d=yield i.getHeartbeatsHeader();d&&(o["X-Firebase-Client"]=d)}let c={method:"POST",body:JSON.stringify(a),headers:o},s;try{s=yield fetch(r,c)}catch(d){throw N.create("fetch-network-error",{originalErrorMessage:d?.message})}if(s.status!==200)throw N.create("fetch-status-error",{httpStatus:s.status});let l;try{l=yield s.json()}catch(d){throw N.create("fetch-parse-error",{originalErrorMessage:d?.message})}let h=l.ttl.match(/^([\d.]+)(s)$/);if(!h||!h[2]||isNaN(Number(h[1])))throw N.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${l.ttl}`});let u=Number(h[1])*1e3,p=Date.now();return{token:l.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function mt(r,a){let{projectId:e,appId:t,apiKey:n}=r.options;return{url:`${Lt}/projects/${e}/apps/${t}:${$t}?key=${n}`,body:{debug_token:a}}}var Kt="firebase-app-check-database",Ut=1,Ie="firebase-app-check-store";var ie=null;function zt(){return ie||(ie=new Promise((r,a)=>{try{let e=indexedDB.open(Kt,Ut);e.onsuccess=t=>{r(t.target.result)},e.onerror=t=>{var n;a(N.create("storage-open",{originalErrorMessage:(n=t.target.error)===null||n===void 0?void 0:n.message}))},e.onupgradeneeded=t=>{let n=t.target.result;switch(t.oldVersion){case 0:n.createObjectStore(Ie,{keyPath:"compositeKey"})}}}catch(e){a(N.create("storage-open",{originalErrorMessage:e?.message}))}}),ie)}function qt(r,a){return Vt(Gt(r),a)}function Vt(r,a){return A(this,null,function*(){let t=(yield zt()).transaction(Ie,"readwrite"),o=t.objectStore(Ie).put({compositeKey:r,value:a});return new Promise((i,c)=>{o.onsuccess=s=>{i()},t.onerror=s=>{var l;c(N.create("storage-set",{originalErrorMessage:(l=s.target.error)===null||l===void 0?void 0:l.message}))}})})}function Gt(r){return`${r.options.appId}-${r.name}`}var Z=new Xe("@firebase/app-check");function be(r,a){return Ze()?qt(r,a).catch(e=>{Z.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}function yt(){return pt().enabled}function wt(){return A(this,null,function*(){let r=pt();if(r.enabled&&r.token)return r.token.promise;throw Error(`
1
+ import{a as nt}from"./chunk-4JTBEEYK.js";import{a as Q}from"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-7R55YTL6.js";import{b as we,c as ee}from"./chunk-NNVT5X6O.js";import{d as Qe}from"./chunk-BMVBJQDF.js";import{a as Ge,b as fe,c as Ze,d as Je,e as ge,f as Xe,g as me,h as Ye,i as G,j as ye,k as x}from"./chunk-34FX4M3J.js";import{e as et}from"./chunk-45DFJJAO.js";import{d as tt}from"./chunk-OF426VSL.js";import{H as qe,I as Ve}from"./chunk-4NAKX6WQ.js";import{Bd as L,D as Ne,Da as H,E as Fe,Fb as U,L as le,La as ze,P as Le,Q as $e,Ua as K,V as ue,Y as O,Z as de,aa as he,c as g,ca as We,d as je,da as He,h as Oe,i as Be,ia as T,ja as W,l as q,la as C,m as Y,ma as f,n as B,na as M,o as V,ra as pe,t as R,ta as Ke,u as Me,za as Ue}from"./chunk-ZPV56E2J.js";import{b as y}from"./chunk-WFMAM73Y.js";import{a as ce,i as A}from"./chunk-66YHNWRR.js";var ot={production:!0,version:"6.32.1",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var it=(()=>{class r{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let t=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return typeof t=="string"&&(t=[t]),t||[]}ParseToken(e){try{let n=e.split(".")[0].replace("-","+").replace("_","/"),o=JSON.parse(window.atob(n)),c=e.split(".")[1].replace("-","+").replace("_","/"),s=JSON.parse(window.atob(c));return s.header=o,s}catch{return!1}}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=T({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Tt="firebase",Ct="11.10.0";G(Tt,Ct,"app");var z=new We("ANGULARFIRE2_VERSION");var st=(r,a)=>{let e=a?[a]:Ye(),t=[];return e.forEach(n=>{n.container.getProvider(r).instances.forEach(i=>{t.includes(i)||t.push(i)})}),t},ve=(function(r){return r[r.SILENT=0]="SILENT",r[r.WARN=1]="WARN",r[r.VERBOSE=2]="VERBOSE",r})(ve||{}),Mr=L()&&typeof Zone<"u"?ve.WARN:ve.SILENT;var te=class{zone;delegate;constructor(a,e=Be){this.zone=a,this.delegate=e}now(){return this.delegate.now()}schedule(a,e,t){let n=this.zone,o=function(i){n?n.runGuarded(()=>{a.apply(this,[i])}):a.apply(this,[i])};return this.delegate.schedule(o,e,t)}},Ae=(()=>{class r{outsideAngular;insideAngular;constructor(){let e=M(H);this.outsideAngular=e.runOutsideAngular(()=>new te(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=e.run(()=>new te(typeof Zone>"u"?void 0:Zone.current,Oe))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=T({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Pt="firebase",xt="11.10.0";x.registerVersion(Pt,xt,"app-compat");var _t=["ngOnDestroy"],ct=(r,a,e,t={})=>new Proxy(r,{get:(n,o)=>e.runOutsideAngular(()=>{if(r[o])return t?.spy?.get&&t.spy.get(o,r[o]),r[o];if(_t.indexOf(o)>-1)return()=>{};let i=a.toPromise().then(c=>{let s=c?.[o];return typeof s=="function"?s.bind(c):s?.then?s.then(l=>e.run(()=>l)):e.run(()=>s)});return new Proxy(()=>{},{get:(c,s)=>i[s],apply:(c,s,l)=>i.then(h=>{let u=h?.(...l);return t?.spy?.apply&&t.spy.apply(o,l,u),u})})})});var re=class{constructor(a){return a}},ne=new C("angularfire2.app.options"),oe=new C("angularfire2.app.name");function ke(r,a,e){let t=typeof e=="string"&&e||"[DEFAULT]",n=typeof e=="object"&&e||{};n.name=n.name||t;let i=x.apps.filter(c=>c&&c.name===n.name)[0]||a.runOutsideAngular(()=>x.initializeApp(r,n));try{if(JSON.stringify(r)!==JSON.stringify(i.options)){let c=!!module.hot;Rt("error",`${i.name} Firebase App already initialized with different options${c?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new re(i)}var Rt=(r,...a)=>{L()&&typeof console<"u"&&console[r](...a)},jt={provide:re,useFactory:ke,deps:[ne,H,[new ze,oe]]},zr=(()=>{class r{static initializeApp(e,t){return{ngModule:r,providers:[{provide:ne,useValue:e},{provide:oe,useValue:t}]}}constructor(e){x.registerVersion("angularfire",z.full,"core"),x.registerVersion("angularfire",z.full,"app-compat"),x.registerVersion("angular",He.full,e.toString())}static \u0275fac=function(t){return new(t||r)(f(K))};static \u0275mod=U({type:r});static \u0275inj=W({providers:[jt]})}return r})();function lt(r,a,e,t,n){let[,o,i]=globalThis.\u0275AngularfireInstanceCache.find(c=>c[0]===r)||[];if(o)return Ot(n,i)||(at("error",`${a} was already initialized on the ${e} Firebase App with different settings.${Bt?" You may need to reload as Firebase is not HMR aware.":""}`),at("warn",{is:n,was:i})),o;{let c=t();return globalThis.\u0275AngularfireInstanceCache.push([r,c,n]),c}}function Ot(r,a){try{return r.toString()===a.toString()}catch{return r===a}}var Bt=typeof module<"u"&&!!module.hot,at=(r,...a)=>{L()&&typeof console<"u"&&console[r](...a)};globalThis.\u0275AngularfireInstanceCache||=[];var Mt=new Map,Nt={activated:!1,tokenObservers:[]},Ft={initialized:!1,enabled:!1};function _(r){return Mt.get(r)||Object.assign({},Nt)}function pt(){return Ft}var Lt="https://content-firebaseappcheck.googleapis.com/v1";var $t="exchangeDebugToken",ut={OFFSET_DURATION:300*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:960*1e3},nn=1440*60*1e3;var Ee=class{constructor(a,e,t,n,o){if(this.operation=a,this.retryPolicy=e,this.getWaitDuration=t,this.lowerBound=n,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=n,n>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(a){return A(this,null,function*(){this.stop();try{this.pending=new fe,this.pending.promise.catch(e=>{}),yield Wt(this.getNextRun(a)),this.pending.resolve(),yield this.pending.promise,this.pending=new fe,this.pending.promise.catch(e=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(a){if(a)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}};function Wt(r){return new Promise(a=>{setTimeout(a,r)})}var Ht={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},N=new Je("appCheck","AppCheck",Ht);function ft(r){if(!_(r).activated)throw N.create("use-before-activation",{appName:r.name})}function gt(t,n){return A(this,arguments,function*({url:r,body:a},e){let o={"Content-Type":"application/json"},i=e.getImmediate({optional:!0});if(i){let d=yield i.getHeartbeatsHeader();d&&(o["X-Firebase-Client"]=d)}let c={method:"POST",body:JSON.stringify(a),headers:o},s;try{s=yield fetch(r,c)}catch(d){throw N.create("fetch-network-error",{originalErrorMessage:d?.message})}if(s.status!==200)throw N.create("fetch-status-error",{httpStatus:s.status});let l;try{l=yield s.json()}catch(d){throw N.create("fetch-parse-error",{originalErrorMessage:d?.message})}let h=l.ttl.match(/^([\d.]+)(s)$/);if(!h||!h[2]||isNaN(Number(h[1])))throw N.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${l.ttl}`});let u=Number(h[1])*1e3,p=Date.now();return{token:l.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function mt(r,a){let{projectId:e,appId:t,apiKey:n}=r.options;return{url:`${Lt}/projects/${e}/apps/${t}:${$t}?key=${n}`,body:{debug_token:a}}}var Kt="firebase-app-check-database",Ut=1,Ie="firebase-app-check-store";var ie=null;function zt(){return ie||(ie=new Promise((r,a)=>{try{let e=indexedDB.open(Kt,Ut);e.onsuccess=t=>{r(t.target.result)},e.onerror=t=>{var n;a(N.create("storage-open",{originalErrorMessage:(n=t.target.error)===null||n===void 0?void 0:n.message}))},e.onupgradeneeded=t=>{let n=t.target.result;switch(t.oldVersion){case 0:n.createObjectStore(Ie,{keyPath:"compositeKey"})}}}catch(e){a(N.create("storage-open",{originalErrorMessage:e?.message}))}}),ie)}function qt(r,a){return Vt(Gt(r),a)}function Vt(r,a){return A(this,null,function*(){let t=(yield zt()).transaction(Ie,"readwrite"),o=t.objectStore(Ie).put({compositeKey:r,value:a});return new Promise((i,c)=>{o.onsuccess=s=>{i()},t.onerror=s=>{var l;c(N.create("storage-set",{originalErrorMessage:(l=s.target.error)===null||l===void 0?void 0:l.message}))}})})}function Gt(r){return`${r.options.appId}-${r.name}`}var Z=new Xe("@firebase/app-check");function be(r,a){return Ze()?qt(r,a).catch(e=>{Z.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}function yt(){return pt().enabled}function wt(){return A(this,null,function*(){let r=pt();if(r.enabled&&r.token)return r.token.promise;throw Error(`
2
2
  Can't get debug token in production mode.
3
3
  `)})}var Zt={error:"UNKNOWN_ERROR"};function Jt(r){return Ge.encodeString(JSON.stringify(r),!1)}function Te(r,a=!1,e=!1){return A(this,null,function*(){let t=r.app;ft(t);let n=_(t),o=n.token,i;if(o&&!J(o)&&(n.token=void 0,o=void 0),!o){let l=yield n.cachedTokenPromise;l&&(J(l)?o=l:yield be(t,void 0))}if(!a&&o&&J(o))return{token:o.token};let c=!1;if(yt())try{n.exchangeTokenPromise||(n.exchangeTokenPromise=gt(mt(t,yield wt()),r.heartbeatServiceProvider).finally(()=>{n.exchangeTokenPromise=void 0}),c=!0);let l=yield n.exchangeTokenPromise;return yield be(t,l),n.token=l,{token:l.token}}catch(l){return l.code==="appCheck/throttled"||l.code==="appCheck/initial-throttle"?Z.warn(l.message):e&&Z.error(l),Se(l)}try{n.exchangeTokenPromise||(n.exchangeTokenPromise=n.provider.getToken().finally(()=>{n.exchangeTokenPromise=void 0}),c=!0),o=yield _(t).exchangeTokenPromise}catch(l){l.code==="appCheck/throttled"||l.code==="appCheck/initial-throttle"?Z.warn(l.message):e&&Z.error(l),i=l}let s;return o?i?J(o)?s={token:o.token,internalError:i}:s=Se(i):(s={token:o.token},n.token=o,yield be(t,o)):s=Se(i),c&&er(t,s),s})}function Xt(r){return A(this,null,function*(){let a=r.app;ft(a);let{provider:e}=_(a);if(yt()){let t=yield wt(),{token:n}=yield gt(mt(a,t),r.heartbeatServiceProvider);return{token:n}}else{let{token:t}=yield e.getToken();return{token:t}}})}function Yt(r,a,e,t){let{app:n}=r,o=_(n),i={next:e,error:t,type:a};if(o.tokenObservers=[...o.tokenObservers,i],o.token&&J(o.token)){let c=o.token;Promise.resolve().then(()=>{e({token:c.token}),dt(r)}).catch(()=>{})}o.cachedTokenPromise.then(()=>dt(r))}function vt(r,a){let e=_(r),t=e.tokenObservers.filter(n=>n.next!==a);t.length===0&&e.tokenRefresher&&e.tokenRefresher.isRunning()&&e.tokenRefresher.stop(),e.tokenObservers=t}function dt(r){let{app:a}=r,e=_(a),t=e.tokenRefresher;t||(t=Qt(r),e.tokenRefresher=t),!t.isRunning()&&e.isTokenAutoRefreshEnabled&&t.start()}function Qt(r){let{app:a}=r;return new Ee(()=>A(null,null,function*(){let e=_(a),t;if(e.token?t=yield Te(r,!0):t=yield Te(r),t.error)throw t.error;if(t.internalError)throw t.internalError}),()=>!0,()=>{let e=_(a);if(e.token){let t=e.token.issuedAtTimeMillis+(e.token.expireTimeMillis-e.token.issuedAtTimeMillis)*.5+3e5,n=e.token.expireTimeMillis-300*1e3;return t=Math.min(t,n),Math.max(0,t-Date.now())}else return 0},ut.RETRIAL_MIN_WAIT,ut.RETRIAL_MAX_WAIT)}function er(r,a){let e=_(r).tokenObservers;for(let t of e)try{t.type==="EXTERNAL"&&a.error!=null?t.error(a.error):t.next(a)}catch{}}function J(r){return r.expireTimeMillis-Date.now()>0}function Se(r){return{token:Jt(Zt),error:r}}var Ce=class{constructor(a,e){this.app=a,this.heartbeatServiceProvider=e}_delete(){let{tokenObservers:a}=_(this.app);for(let e of a)vt(this.app,e.next);return Promise.resolve()}};function tr(r,a){return new Ce(r,a)}function rr(r){return{getToken:a=>Te(r,a),getLimitedUseToken:()=>Xt(r),addTokenListener:a=>Yt(r,"INTERNAL",a),removeTokenListener:a=>vt(r.app,a)}}var nr="@firebase/app-check",or="0.10.1";var ir="app-check",ht="app-check-internal";function sr(){me(new ge(ir,r=>{let a=r.getProvider("app").getImmediate(),e=r.getProvider("heartbeat");return tr(a,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((r,a,e)=>{r.getProvider(ht).initialize()})),me(new ge(ht,r=>{let a=r.getProvider("app-check").getImmediate();return rr(a)},"PUBLIC").setInstantiationMode("EXPLICIT")),G(nr,or)}sr();var ar="app-check";var se=class{constructor(){return st(ar)}};var cr=["localhost","0.0.0.0","127.0.0.1"],vn=typeof window<"u"&&cr.includes(window.location.hostname);var ur=new C("angularfire2.auth.use-emulator"),dr=new C("angularfire2.auth.settings"),hr=new C("angularfire2.auth.tenant-id"),pr=new C("angularfire2.auth.langugage-code"),fr=new C("angularfire2.auth.use-device-language"),gr=new C("angularfire.auth.persistence"),mr=(r,a,e,t,n,o,i,c)=>lt(`${r.name}.auth`,"AngularFireAuth",r.name,()=>{let s=a.runOutsideAngular(()=>r.auth());if(e&&s.useEmulator(...e),t&&(s.tenantId=t),s.languageCode=n,o&&s.useDeviceLanguage(),i)for(let[l,h]of Object.entries(i))s.settings[l]=h;return c&&s.setPersistence(c),s},[e,t,n,o,i,c]),De=(()=>{class r{injector=M(pe);authState;idToken;user;idTokenResult;credential;constructor(e,t,n,o,i,c,s,l,h,u,p,d){let m=new je,D=V(void 0).pipe(q(i.outsideAngular),O(()=>o.runOutsideAngular(()=>import("./chunk-JHNZSQGY.js"))),R(()=>ke(e,o,t)),R(P=>mr(P,o,c,l,h,u,s,p)),ue({bufferSize:1,refCount:!1}));if(Ve(n))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=V(null);else{D.pipe($e()).subscribe();let P=D.pipe(O(E=>E.getRedirectResult().then(j=>j,()=>null)),Qe(this.injector),ue({bufferSize:1,refCount:!1})),X=D.pipe(O(E=>new g(j=>({unsubscribe:o.runOutsideAngular(()=>E.onAuthStateChanged(F=>j.next(F),F=>j.error(F),()=>j.complete()))})))),ae=D.pipe(O(E=>new g(j=>({unsubscribe:o.runOutsideAngular(()=>E.onIdTokenChanged(F=>j.next(F),F=>j.error(F),()=>j.complete()))}))));this.authState=P.pipe(de(X),Y(i.outsideAngular),q(i.insideAngular)),this.user=P.pipe(de(ae),Y(i.outsideAngular),q(i.insideAngular)),this.idToken=this.user.pipe(O(E=>E?B(E.getIdToken()):V(null))),this.idTokenResult=this.user.pipe(O(E=>E?B(E.getIdTokenResult()):V(null))),this.credential=Ne(P,m,this.authState.pipe(Fe(E=>!E))).pipe(R(E=>E?.user?E:null),Y(i.outsideAngular),q(i.insideAngular))}return ct(this,D,o,{spy:{apply:(P,X,ae)=>{(P.startsWith("signIn")||P.startsWith("createUser"))&&ae.then(E=>m.next(E))}}})}static \u0275fac=function(t){return new(t||r)(f(ne),f(oe,8),f(K),f(H),f(Ae),f(ur,8),f(dr,8),f(hr,8),f(pr,8),f(fr,8),f(gr,8),f(se,8))};static \u0275prov=T({token:r,factory:r.\u0275fac,providedIn:"any"})}return r})(),Bn=(()=>{class r{constructor(){x.registerVersion("angularfire",z.full,"auth-compat")}static \u0275fac=function(t){return new(t||r)};static \u0275mod=U({type:r});static \u0275inj=W({providers:[De]})}return r})();var k=(function(r){return r.readonly="readonly",r.readwrite="readwrite",r})(k||{}),At=new C(null),kt=new C("Indexed DB"),wr=new C("Server Indexed DB");function vr(r,a){return r.objectStoreNames.contains(a)}function I(r,a,e){if(!r){e("You need to use the openDatabase function to create a database before you query it!");return}vr(r,a)||e(`objectStore does not exists: ${a}`)}function b(r,a){let e=r.transaction(a.storeName,a.dbMode);return e.onerror=a.error,e.onabort=a.abort,e}function S(r,a,e,t){return{storeName:a,dbMode:r,error:n=>{e(n)},abort:n=>{e(n)}}}var xe=[];function w(r,a,e,t){return new Promise((n,o)=>{r||o("IndexedDB not available");let i=r.open(a,e),c;i.onsuccess=()=>{c=i.result,xe.push(c),n(c)},i.onerror=()=>{o(`IndexedDB error: ${i.error}`)},typeof t=="function"&&(i.onupgradeneeded=s=>{t(s,c)})})}function Pe(r,a,e,t,n){return A(this,null,function*(){return new Promise((o,i)=>{if(!r)return;let c=r.open(a,e);c.onupgradeneeded=s=>A(null,null,function*(){let l=s.target.result,h=t.map(p=>A(null,null,function*(){if(!l.objectStoreNames.contains(p.store)){let d=l.createObjectStore(p.store,p.storeConfig);for(let m of p.storeSchema)d.createIndex(m.name,m.keypath,m.options)}}));yield Promise.all(h);let u=n&&n();if(u){let p=Object.keys(u).map(d=>parseInt(d,10)).filter(d=>d>s.oldVersion).sort((d,m)=>d-m);for(let d of p)u[d](l,c.transaction)}l.close(),o()}),c.onsuccess=s=>{s.target.result.close(),o()},c.onerror=s=>{i(s)}})})}function Ar(r,a,e){if(!r||!a||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(t=>{try{let n=a+1,o=indexedDB.open(r,n);o.onupgradeneeded=i=>{let c=i.target.result;c.deleteObjectStore(e),c.close(),console.log("onupgradeneeded"),t.next(),t.complete()},o.onerror=i=>t.error(i)}catch(n){t.error(n)}})}function kr(r){return new Promise((a,e)=>{if(!r){e(new Error("No database to close"));return}try{r.close(),a()}catch(t){e(`Error closing database: ${t}`)}})}function v(){return function(r,a,e){let t=e.value;return e.value=function(...n){let o=t.apply(this,n);return o instanceof g?o.pipe(Le(()=>A(this,null,function*(){let i=xe.map(c=>A(this,null,function*(){yield kr(c)}));yield Promise.all(i),xe.length=0}))):o},e}}var Re=(()=>{class r{constructor(e,t){this.dbConfigs=e,this.indexedDB=t,this.defaultDatabaseName=null,Object.values(this.dbConfigs).forEach((n,o,i)=>this.instanciateConfig(n,i.length===1))}instanciateConfig(e,t){return A(this,null,function*(){if(!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if((e.isDefault??!1)&&this.defaultDatabaseName)throw new Error("NgxIndexedDB: Only one database can be set as default");((e.isDefault??!1)&&!this.defaultDatabaseName||t)&&(this.defaultDatabaseName=e.name,this.selectedDb=e.name),yield Pe(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),w(this.indexedDB,e.name).then(n=>{n.version!==e.version&&(L()&&(console.warn(`
4
4
  Your DB Config doesn't match the most recent version of the DB with name ${e.name}, please update it
@@ -1 +1 @@
1
- import{a as te}from"./chunk-MIMZDUDP.js";import{a as ee}from"./chunk-ZEALEXSH.js";import{a as $}from"./chunk-J5PTSESV.js";import"./chunk-26I3WOHT.js";import"./chunk-72AE6737.js";import{a as Z}from"./chunk-KMCVYMXQ.js";import"./chunk-ACIMXBIC.js";import{a as Q,b as X,d as Y}from"./chunk-KXLYQDZR.js";import{b as J}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-2GINYFUG.js";import"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-BXA5YUTN.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{h as B}from"./chunk-VB4EKTTU.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import{c as W,h as j,m as q,o as K,z as U}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{e as G}from"./chunk-45DFJJAO.js";import{e as H}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as V}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as T,Ga as g,Kb as R,Oc as p,Pc as f,Qc as S,Sc as D,Tc as F,Uc as I,ad as k,bc as L,bd as O,dc as M,fc as N,gc as x,hc as E,ic as d,jc as n,kb as w,kc as i,kd as A,lc as C,mb as m,md as z,na as _,sc as P,ua as v,va as y,xc as s,zc as b}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as u,b as h}from"./chunk-66YHNWRR.js";var ne=()=>["/menu/log/rawlog/detail"],ie=r=>({ID:r});function ae(r,c){if(r&1&&(n(0,"span",17),C(1,"img",18),i(),p(2)),r&2){let e=c.item;m(),d("src",e.Img,w)("alt",e.Name),m(),S(" ",e.Name," ")}}function oe(r,c){if(r&1&&(n(0,"tr")(1,"td")(2,"a",23),p(3),A(4,"date"),i()(),n(5,"td"),p(6),i(),n(7,"td"),p(8),i(),n(9,"td"),p(10),i()()),r&2){let e=c.$implicit;m(2),d("routerLink",k(9,ne))("queryParams",O(10,ie,e.id)),m(),S(" ",z(4,6,e.Created,"dd MMM yyyy HH:mm:ss")," "),m(3),f(e.type),m(2),f(e.number),m(2),f(e.message)}}function re(r,c){if(r&1){let e=P();n(0,"div",15)(1,"table",19)(2,"thead",20)(3,"tr")(4,"th",21),p(5,"Date"),i(),n(6,"th"),p(7,"Type"),i(),n(8,"th"),p(9,"Number"),i(),n(10,"th"),p(11,"Message"),i()()(),n(12,"tbody"),x(13,oe,11,12,"tr",null,N),i()(),n(15,"mat-paginator",22),s("page",function(t){v(e);let a=b();return y(a.changePage(t))}),i()()}if(r&2){let e=b();m(13),E(e.Result()),m(2),d("length",e.paginationTotal())("pageSize",e.paginationPageSize())("pageIndex",e.filter().PageNumber==0?0:e.filter().PageNumber-1)}}function le(r,c){r&1&&(n(0,"div",16),C(1,"app-empty-state"),i())}var Re=(()=>{class r{constructor(){this.http=_(G),this._RawLogService=_(te),this.authService=_(B),this.Result=g([]),this.filter=g({RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""}),this.list=[],this.paginationTotal=g(0),this.paginationPageSize=g(0),this.ActionTypeList=g(null),this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}],this.channelOptions=g(this.authService.getChannels())}ngOnInit(){this.Load()}Load(e={}){this.http.post("/api/OrdersLoader/Get",e).subscribe(o=>{this.filter.update(t=>u(u({},t),o.Filter)),this.ActionTypeList.set(o.Options.ActionTypeList),this.Get()})}Get(e){this.filter.update(o=>h(u({},o),{Number:e})),this.http.post("api/Orders/GetRawLog",this.filter()).subscribe(o=>{this._RawLogService.Data=o.hits;let t=[];for(let a of o.hits){let l={id:a._id,message:a._source.message,responseCode:a._source.log.responseCode,processTypeString:a._source.log.processType,type:a._source.log.type,number:a._source.log.number,Created:a._source["@timestamp_received"]};t.push(l)}this.Result.set(t),this.paginationTotal.set(o.total.value),this.paginationPageSize.set(this.filter().RowCount>this.paginationTotal()?this.paginationTotal():this.filter().RowCount)})}changePage(e){this.filter.update(o=>h(u({},o),{PageNumber:e.pageIndex+1})),this.Get()}updateFilter(e,o){this.filter.update(t=>h(u({},t),{[e]:o}))}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=T({type:r,selectors:[["app-raw-log"]],decls:28,vars:9,consts:[["headerTitle","Channel Push Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"]],template:function(o,t){if(o&1&&(n(0,"mainpanel",0),I("textChange",function(l){return F(t.filter().Number,l)||(t.filter().Number=l),l}),s("onSubmit",function(l){return t.Get(l)}),n(1,"filters")(2,"div")(3,"label",1),p(4,"Channel"),i(),n(5,"ng-select",2),s("ngModelChange",function(l){return t.updateFilter("ChannelID",l)}),R(6,ae,3,3,"ng-template",3),i()(),n(7,"div",4)(8,"label",5),p(9,"From/To"),i(),n(10,"div",6)(11,"datepicker",7),s("dateChange",function(l){return t.updateFilter("From",l)}),i()(),n(12,"div")(13,"datepicker",8),s("dateChange",function(l){return t.updateFilter("To",l)}),i()()(),n(14,"div",4)(15,"label",9),p(16,"Page Number"),i(),n(17,"input",10),s("ngModelChange",function(l){return t.updateFilter("PageNumber",l)}),i()(),n(18,"div",4)(19,"label",9),p(20,"Page Size"),i(),n(21,"input",11),s("ngModelChange",function(l){return t.updateFilter("RowCount",l)}),i()()(),n(22,"content")(23,"div",12)(24,"div",13)(25,"div",14),L(26,re,16,3,"div",15)(27,le,2,0,"div",16),i()()()()()),o&2){let a;D("text",t.filter().Number),m(5),d("clearable",!0)("items",t.channelOptions())("ngModel",t.filter().ChannelID),m(6),d("date",t.filter().From),m(2),d("date",t.filter().To),m(4),d("ngModel",t.filter().PageNumber),m(4),d("ngModel",t.filter().RowCount),m(5),M(((a=t.Result())==null?null:a.length)>0?26:27)}},dependencies:[J,Y,U,W,K,j,q,Q,X,$,H,ee,Z,V],encapsulation:2})}}return r})();export{Re as RawLogComponent};
1
+ import{a as te}from"./chunk-MIMZDUDP.js";import{a as ee}from"./chunk-ZEALEXSH.js";import{a as $}from"./chunk-J5PTSESV.js";import"./chunk-26I3WOHT.js";import"./chunk-72AE6737.js";import{a as Z}from"./chunk-KMCVYMXQ.js";import"./chunk-ACIMXBIC.js";import{a as Q,b as X,d as Y}from"./chunk-KXLYQDZR.js";import{b as J}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-2GINYFUG.js";import"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-BXA5YUTN.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{h as B}from"./chunk-52GYT73T.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import{c as W,h as j,m as q,o as K,z as U}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{e as G}from"./chunk-45DFJJAO.js";import{e as H}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as V}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as T,Ga as g,Kb as R,Oc as p,Pc as f,Qc as S,Sc as D,Tc as F,Uc as I,ad as k,bc as L,bd as O,dc as M,fc as N,gc as x,hc as E,ic as d,jc as n,kb as w,kc as i,kd as A,lc as C,mb as m,md as z,na as _,sc as P,ua as v,va as y,xc as s,zc as b}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as u,b as h}from"./chunk-66YHNWRR.js";var ne=()=>["/menu/log/rawlog/detail"],ie=r=>({ID:r});function ae(r,c){if(r&1&&(n(0,"span",17),C(1,"img",18),i(),p(2)),r&2){let e=c.item;m(),d("src",e.Img,w)("alt",e.Name),m(),S(" ",e.Name," ")}}function oe(r,c){if(r&1&&(n(0,"tr")(1,"td")(2,"a",23),p(3),A(4,"date"),i()(),n(5,"td"),p(6),i(),n(7,"td"),p(8),i(),n(9,"td"),p(10),i()()),r&2){let e=c.$implicit;m(2),d("routerLink",k(9,ne))("queryParams",O(10,ie,e.id)),m(),S(" ",z(4,6,e.Created,"dd MMM yyyy HH:mm:ss")," "),m(3),f(e.type),m(2),f(e.number),m(2),f(e.message)}}function re(r,c){if(r&1){let e=P();n(0,"div",15)(1,"table",19)(2,"thead",20)(3,"tr")(4,"th",21),p(5,"Date"),i(),n(6,"th"),p(7,"Type"),i(),n(8,"th"),p(9,"Number"),i(),n(10,"th"),p(11,"Message"),i()()(),n(12,"tbody"),x(13,oe,11,12,"tr",null,N),i()(),n(15,"mat-paginator",22),s("page",function(t){v(e);let a=b();return y(a.changePage(t))}),i()()}if(r&2){let e=b();m(13),E(e.Result()),m(2),d("length",e.paginationTotal())("pageSize",e.paginationPageSize())("pageIndex",e.filter().PageNumber==0?0:e.filter().PageNumber-1)}}function le(r,c){r&1&&(n(0,"div",16),C(1,"app-empty-state"),i())}var Re=(()=>{class r{constructor(){this.http=_(G),this._RawLogService=_(te),this.authService=_(B),this.Result=g([]),this.filter=g({RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""}),this.list=[],this.paginationTotal=g(0),this.paginationPageSize=g(0),this.ActionTypeList=g(null),this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}],this.channelOptions=g(this.authService.getChannels())}ngOnInit(){this.Load()}Load(e={}){this.http.post("/api/OrdersLoader/Get",e).subscribe(o=>{this.filter.update(t=>u(u({},t),o.Filter)),this.ActionTypeList.set(o.Options.ActionTypeList),this.Get()})}Get(e){this.filter.update(o=>h(u({},o),{Number:e})),this.http.post("api/Orders/GetRawLog",this.filter()).subscribe(o=>{this._RawLogService.Data=o.hits;let t=[];for(let a of o.hits){let l={id:a._id,message:a._source.message,responseCode:a._source.log.responseCode,processTypeString:a._source.log.processType,type:a._source.log.type,number:a._source.log.number,Created:a._source["@timestamp_received"]};t.push(l)}this.Result.set(t),this.paginationTotal.set(o.total.value),this.paginationPageSize.set(this.filter().RowCount>this.paginationTotal()?this.paginationTotal():this.filter().RowCount)})}changePage(e){this.filter.update(o=>h(u({},o),{PageNumber:e.pageIndex+1})),this.Get()}updateFilter(e,o){this.filter.update(t=>h(u({},t),{[e]:o}))}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=T({type:r,selectors:[["app-raw-log"]],decls:28,vars:9,consts:[["headerTitle","Channel Push Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"]],template:function(o,t){if(o&1&&(n(0,"mainpanel",0),I("textChange",function(l){return F(t.filter().Number,l)||(t.filter().Number=l),l}),s("onSubmit",function(l){return t.Get(l)}),n(1,"filters")(2,"div")(3,"label",1),p(4,"Channel"),i(),n(5,"ng-select",2),s("ngModelChange",function(l){return t.updateFilter("ChannelID",l)}),R(6,ae,3,3,"ng-template",3),i()(),n(7,"div",4)(8,"label",5),p(9,"From/To"),i(),n(10,"div",6)(11,"datepicker",7),s("dateChange",function(l){return t.updateFilter("From",l)}),i()(),n(12,"div")(13,"datepicker",8),s("dateChange",function(l){return t.updateFilter("To",l)}),i()()(),n(14,"div",4)(15,"label",9),p(16,"Page Number"),i(),n(17,"input",10),s("ngModelChange",function(l){return t.updateFilter("PageNumber",l)}),i()(),n(18,"div",4)(19,"label",9),p(20,"Page Size"),i(),n(21,"input",11),s("ngModelChange",function(l){return t.updateFilter("RowCount",l)}),i()()(),n(22,"content")(23,"div",12)(24,"div",13)(25,"div",14),L(26,re,16,3,"div",15)(27,le,2,0,"div",16),i()()()()()),o&2){let a;D("text",t.filter().Number),m(5),d("clearable",!0)("items",t.channelOptions())("ngModel",t.filter().ChannelID),m(6),d("date",t.filter().From),m(2),d("date",t.filter().To),m(4),d("ngModel",t.filter().PageNumber),m(4),d("ngModel",t.filter().RowCount),m(5),M(((a=t.Result())==null?null:a.length)>0?26:27)}},dependencies:[J,Y,U,W,K,j,q,Q,X,$,H,ee,Z,V],encapsulation:2})}}return r})();export{Re as RawLogComponent};
@@ -1 +1 @@
1
- import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-OL7LL2JK.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-VDFAJSCS.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-OFLYY6SE.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-UZG65BH3.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-PKEJBTNO.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-XTQO7LQT.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-HDPVYUNM.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-CMN6WQRQ.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-Y5TU2325.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"log/detail",loadComponent(){return import("./chunk-G2XGQFY4.js").then(t=>t.DownloadOrderDetailComponent)},title:"Download Log Detail"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
1
+ import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-OL7LL2JK.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-2BKKP2LQ.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-QC5UO6G4.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-QVB62YCK.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-LWDVWTUP.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-YBKORR26.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-QZVNZJJE.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-4POOCCOW.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-PL726SLZ.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"log/detail",loadComponent(){return import("./chunk-G2XGQFY4.js").then(t=>t.DownloadOrderDetailComponent)},title:"Download Log Detail"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
@@ -1 +1 @@
1
- import{f as x}from"./chunk-VB4EKTTU.js";import{c as o}from"./chunk-NNVT5X6O.js";import{e as k,g as C}from"./chunk-OF426VSL.js";import{Eb as v,Oc as u,Qc as p,bc as b,cd as I,dc as D,ia as h,ic as s,jc as c,kb as g,kc as m,mb as l,na as i,sd as f,wd as _,zc as d}from"./chunk-ZPV56E2J.js";var y=(()=>{class e{constructor(){this.localDataService=i(x),this.baseUrl=this.localDataService.getHostName()}getBaseUrl(r){let t="";return o.IsNotEmpty(r.ID)?t=`https://${this.baseUrl}/menu/Orders/Orders/Customer_Invoice/Info?ID=${r.ID}`:t="/menu/Order/detail",t}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var L=(e,a)=>({Number:e,Outlet:a});function N(e,a){if(e&1&&(c(0,"a",0),u(1),m()),e&2){let r,t=d();s("href",t.baseUrl(),g),l(),p(" ",(r=t.order())==null?null:r.Number," ")}}function S(e,a){if(e&1&&(c(0,"a",1),u(1),m()),e&2){let r,t,n=d();s("routerLink",n.baseUrl())("queryParams",I(3,L,(r=n.order())==null?null:r.Number,(r=n.order())==null?null:r.Outlet)),l(),p(" ",(t=n.order())==null?null:t.Number," ")}}var z=(()=>{class e{constructor(){this.order=_(),this.generateLinkService=i(y),this.baseUrl=f(()=>this.generateLinkService.getBaseUrl(this.order())),this.hasOrderID=f(()=>o.IsNotEmpty(this.order()?.ID))}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=v({type:e,selectors:[["order-link"]],inputs:{order:[1,"order"]},decls:2,vars:1,consts:[["target","_blank",3,"href"],["target","_blank",3,"routerLink","queryParams"]],template:function(t,n){t&1&&b(0,N,2,2,"a",0)(1,S,2,6,"a",1),t&2&&D(n.hasOrderID()?0:1)},dependencies:[C,k],encapsulation:2,changeDetection:0})}}return e})();export{z as a};
1
+ import{f as x}from"./chunk-52GYT73T.js";import{c as o}from"./chunk-NNVT5X6O.js";import{e as k,g as C}from"./chunk-OF426VSL.js";import{Eb as v,Oc as u,Qc as p,bc as b,cd as I,dc as D,ia as h,ic as s,jc as c,kb as g,kc as m,mb as l,na as i,sd as f,wd as _,zc as d}from"./chunk-ZPV56E2J.js";var y=(()=>{class e{constructor(){this.localDataService=i(x),this.baseUrl=this.localDataService.getHostName()}getBaseUrl(r){let t="";return o.IsNotEmpty(r.ID)?t=`https://${this.baseUrl}/menu/Orders/Orders/Customer_Invoice/Info?ID=${r.ID}`:t="/menu/Order/detail",t}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var L=(e,a)=>({Number:e,Outlet:a});function N(e,a){if(e&1&&(c(0,"a",0),u(1),m()),e&2){let r,t=d();s("href",t.baseUrl(),g),l(),p(" ",(r=t.order())==null?null:r.Number," ")}}function S(e,a){if(e&1&&(c(0,"a",1),u(1),m()),e&2){let r,t,n=d();s("routerLink",n.baseUrl())("queryParams",I(3,L,(r=n.order())==null?null:r.Number,(r=n.order())==null?null:r.Outlet)),l(),p(" ",(t=n.order())==null?null:t.Number," ")}}var z=(()=>{class e{constructor(){this.order=_(),this.generateLinkService=i(y),this.baseUrl=f(()=>this.generateLinkService.getBaseUrl(this.order())),this.hasOrderID=f(()=>o.IsNotEmpty(this.order()?.ID))}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=v({type:e,selectors:[["order-link"]],inputs:{order:[1,"order"]},decls:2,vars:1,consts:[["target","_blank",3,"href"],["target","_blank",3,"routerLink","queryParams"]],template:function(t,n){t&1&&b(0,N,2,2,"a",0)(1,S,2,6,"a",1),t&2&&D(n.hasOrderID()?0:1)},dependencies:[C,k],encapsulation:2,changeDetection:0})}}return e})();export{z as a};