-
Notifications
You must be signed in to change notification settings - Fork 0
/
8415.a32bc36e696175d0.js
1 lines (1 loc) · 37.4 KB
/
8415.a32bc36e696175d0.js
1
"use strict";(self.webpackChunkcheapflightclient=self.webpackChunkcheapflightclient||[]).push([[8415],{36499:(A,_,a)=>{a.r(_),a.d(_,{BtcOrderManagementComponent:()=>Ce,BtcOrderManagementDetailComponent:()=>de});var c=a(36895),l=a(83700),i=a(72506),u=a(12264),h=a(67460),b=a(76978),x=a(80429),O=a(39300),g=a(63900),e=a(94650),I=a(80529),E=a(88001),w=a(50494),L=a(54004),d=a(97582),p=a(87067);let H=(()=>{class n{}return(0,d.gn)([(0,p.C)()],n.prototype,"status",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"data",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"objectError",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"traceId",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"errorCode",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"success",void 0),n})();var B=a(43429);let z=(()=>{class n{}return(0,d.gn)([(0,p.C)()],n.prototype,"status",void 0),(0,d.gn)([(0,B.D)(()=>G),(0,p.C)()],n.prototype,"data",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"objectError",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"traceId",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"errorCode",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"success",void 0),n})(),G=(()=>{class n{}return(0,d.gn)([(0,p.C)()],n.prototype,"orderId",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"state",void 0),(0,d.gn)([(0,B.D)(()=>V),(0,p.C)()],n.prototype,"totalCharge",void 0),(0,d.gn)([(0,B.D)(()=>K),(0,p.C)()],n.prototype,"journeyInfos",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"timeBook",void 0),n})(),K=(()=>{class n{}return(0,d.gn)([(0,p.C)()],n.prototype,"airline",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"startPoint",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"endPoint",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"departureTime",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"numPax",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"nameBooked",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"totalPrice",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"pnr",void 0),n})(),V=(()=>{class n{}return(0,d.gn)([(0,p.C)()],n.prototype,"totalFare",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"totalPrice",void 0),(0,d.gn)([(0,p.C)()],n.prototype,"totalDiscount",void 0),n})();const S={headers:new I.WM({"Content-Type":"application/json"})};let U=(()=>{class n{constructor(t,o){this.http=t,this.appConfig=o}getListOrder(t){return this.http.post(this.appConfig.apiUrl+"bc-server/get-list-order",JSON.stringify(t),S).pipe((0,L.U)(o=>(0,w.yE)(z,o,{excludeExtraneousValues:!0})))}getInfoOrderDetail(t){return this.http.post(this.appConfig.apiUrl+"bc-server/get-info-order-detail",JSON.stringify({orderId:t}),S).pipe((0,L.U)(o=>(0,w.yE)(H,o,{excludeExtraneousValues:!0})))}updateStateOrder(t,o){return this.http.post(this.appConfig.apiUrl+"bc-server/update-state-order",JSON.stringify({orderId:t,state:o}),S).pipe()}}return n.\u0275fac=function(t){return new(t||n)(e.LFG(I.eN),e.LFG(E.qB))},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var q=a(82761),F=a(62733),J=a(28490),j=a(97579),R=a(62331);function $(n,r){if(1&n){const t=e.EpF();e.TgZ(0,"button",9),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.confirmPayment())}),e._uU(1," X\xe1c nh\u1eadn thanh to\xe1n "),e.qZA()}}function X(n,r){if(1&n){const t=e.EpF();e.TgZ(0,"button",9),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.confirmRefund())}),e._uU(1," X\xe1c nh\u1eadn ho\xe0n ti\u1ec1n "),e.qZA()}}function W(n,r){if(1&n&&(e.TgZ(0,"div",7),e.YNc(1,$,2,0,"button",8),e.YNc(2,X,2,0,"button",8),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf","PAYMENT_PROCESSING"===(null==t.dataOrder.orderInfo?null:t.dataOrder.orderInfo.state)),e.xp6(1),e.Q6J("ngIf","FAILED"===(null==t.dataOrder.orderInfo?null:t.dataOrder.orderInfo.state))}}function ee(n,r){if(1&n&&(e.TgZ(0,"div",10)(1,"div",11),e._UZ(2,"div",12),e.TgZ(3,"div",13),e._uU(4,"T\u1ed5ng quan \u0111\u01a1n h\xe0ng"),e.qZA()(),e.TgZ(5,"div",14)(6,"div",15)(7,"div",10)(8,"div",16)(9,"div",17),e._UZ(10,"cf-icon",18),e.TgZ(11,"div",19),e._uU(12," M\xe3 \u0111\u01a1n h\xe0ng: "),e.qZA(),e.TgZ(13,"span",20),e._uU(14),e.qZA()(),e.TgZ(15,"div",17),e._UZ(16,"cf-icon",21),e.TgZ(17,"div",19),e._uU(18," T\u1ed5ng ti\u1ec1n (\u0110\xe3 g\u1ed3m VAT): "),e.qZA(),e.TgZ(19,"span",20),e._uU(20),e.ALo(21,"replace"),e.ALo(22,"number"),e.qZA()(),e.TgZ(23,"div",17),e._UZ(24,"cf-icon",22),e.TgZ(25,"div",19),e._uU(26," Ph\u01b0\u01a1ng th\u1ee9c thanh to\xe1n: "),e.qZA(),e.TgZ(27,"span",20),e._uU(28),e.qZA()()()()()()()),2&n){const t=e.oxw();e.xp6(14),e.Oqu(t.dataOrder.orderInfo.orderId),e.xp6(6),e.hij(" ",e.Dn7(21,3,e.lcZ(22,7,t.dataOrder.orderInfo.totalPrice),",",".")," \u0111 "),e.xp6(8),e.hij("",t.dataOrder.orderInfo.paymentMethod," ")}}function te(n,r){if(1&n&&(e.TgZ(0,"div",10)(1,"div",11),e._UZ(2,"div",12),e.TgZ(3,"div",13),e._uU(4,"Th\xf4ng tin li\xean h\u1ec7"),e.qZA()(),e.TgZ(5,"div",14)(6,"div",23)(7,"div",24),e._UZ(8,"cf-icon",25),e.TgZ(9,"span",26),e._uU(10,"H\u1ecd v\xe0 t\xean:"),e.qZA(),e.TgZ(11,"span",27),e._uU(12),e.qZA()(),e.TgZ(13,"div",24),e._UZ(14,"cf-icon",28),e.TgZ(15,"span",26),e._uU(16,"S\u1ed1 \u0111i\u1ec7n tho\u1ea1i:"),e.qZA(),e.TgZ(17,"span",27),e._uU(18),e.qZA()(),e.TgZ(19,"div",24),e._UZ(20,"cf-icon",29),e.TgZ(21,"span",26),e._uU(22,"Email:"),e.qZA(),e.TgZ(23,"span",27),e._uU(24),e.qZA()()()()()),2&n){const t=e.oxw();e.xp6(12),e.hij(" ",t.dataOrder.contact.name||"N/A"," "),e.xp6(6),e.AsE(" ",t.dataOrder.contact.phonePrefix,"",t.dataOrder.contact.phone||"N/A"," "),e.xp6(6),e.hij(" ",t.dataOrder.contact.email||"N/A"," ")}}function ne(n,r){if(1&n&&(e.TgZ(0,"tr")(1,"td",34),e._uU(2),e.qZA(),e.TgZ(3,"td",35),e._uU(4),e.ALo(5,"mapper"),e.qZA(),e.TgZ(6,"td",36),e._uU(7),e.ALo(8,"mapper"),e.qZA()()),2&n){const t=r.$implicit,o=e.oxw(2);e.xp6(2),e.hij(" ",t.firstName+" "+t.lastName||"N/A"," "),e.xp6(2),e.hij(" ",e.xi3(5,3,t.type,o.formatterPassengerType)||"N/A"," "),e.xp6(3),e.hij(" ",e.xi3(8,6,t.gender,o.formatterGender)||"N/A"," ")}}function oe(n,r){if(1&n&&(e.TgZ(0,"div",10)(1,"div",11),e._UZ(2,"div",12),e.TgZ(3,"div",13),e._uU(4,"Th\xf4ng tin h\xe0nh kh\xe1ch"),e.qZA()(),e.TgZ(5,"div",14)(6,"div",30)(7,"table",31)(8,"thead")(9,"tr")(10,"th",32),e._uU(11," H\u1ecd t\xean "),e.qZA(),e.TgZ(12,"th",32),e._uU(13," Lo\u1ea1i kh\xe1ch "),e.qZA(),e.TgZ(14,"th",32),e._uU(15," Gi\u1edbi t\xednh "),e.qZA()()(),e.TgZ(16,"tbody"),e.YNc(17,ne,9,9,"tr",33),e.qZA()()()()()),2&n){const t=e.oxw();e.xp6(17),e.Q6J("ngForOf",t.dataOrder.listPax)}}function re(n,r){if(1&n&&(e.TgZ(0,"div",59)(1,"div",60),e._uU(2),e.qZA(),e.TgZ(3,"div",60),e._uU(4),e.qZA(),e.TgZ(5,"div",60),e._uU(6),e.ALo(7,"date"),e.ALo(8,"date"),e.qZA()()),2&n){const t=r.$implicit;e.xp6(2),e.AsE(" ",t.airline,"",t.flightNumber," "),e.xp6(2),e.AsE(" ",t.startPoint," - ",t.endPoint," "),e.xp6(2),e.AsE(" ",e.xi3(7,6,t.departureTime,"HH:mm")," - ",e.xi3(8,9,t.departureTime,"dd/MM/yyyy")," ")}}function ie(n,r){if(1&n&&(e.TgZ(0,"div",61)(1,"div"),e._uU(2," M\xe3 \u0111\u1eb7t ch\u1ed7 "),e.qZA(),e.TgZ(3,"div",62),e._uU(4),e.qZA()()),2&n){const t=e.oxw().$implicit;e.xp6(4),e.hij(" ",t.pnr||"---"," ")}}function ae(n,r){if(1&n&&(e.TgZ(0,"tr")(1,"td",34),e._uU(2),e.qZA(),e.TgZ(3,"td",35),e._uU(4),e.ALo(5,"mapper"),e.qZA(),e.TgZ(6,"td",36),e._uU(7),e.ALo(8,"mapper"),e.qZA(),e.TgZ(9,"td",63),e._uU(10),e.ALo(11,"replace"),e.ALo(12,"number"),e.qZA()()),2&n){const t=r.$implicit,o=e.oxw(3);e.xp6(2),e.AsE(" ",t.firstName," ",t.lastName," "),e.xp6(2),e.hij(" ",e.xi3(5,5,t.type,o.formatterPassengerType)," "),e.xp6(3),e.hij(" ",e.xi3(8,8,t.gender,o.formatterGender)," "),e.xp6(3),e.hij(" ",e.Dn7(11,11,e.lcZ(12,15,t.totalFare),",",".")," \u0111 ")}}function se(n,r){if(1&n&&(e.TgZ(0,"div",64)(1,"div",65)(2,"div",66),e._uU(3,"H\u1ecd t\xean"),e.qZA(),e.TgZ(4,"div",67),e._uU(5),e.qZA()(),e.TgZ(6,"div",65)(7,"div",66),e._uU(8,"Lo\u1ea1i kh\xe1ch"),e.qZA(),e.TgZ(9,"div",67),e._uU(10),e.ALo(11,"mapper"),e.qZA()(),e.TgZ(12,"div",65)(13,"div",66),e._uU(14,"Gi\u1edbi t\xednh"),e.qZA(),e.TgZ(15,"div",67),e._uU(16),e.ALo(17,"mapper"),e.qZA()(),e.TgZ(18,"div",65)(19,"div",66),e._uU(20,"Gi\xe1 v\xe9"),e.qZA(),e.TgZ(21,"div",67),e._uU(22),e.ALo(23,"replace"),e.ALo(24,"number"),e.qZA()()()),2&n){const t=r.$implicit,o=e.oxw(3);e.xp6(5),e.AsE("",t.firstName," ",t.lastName," "),e.xp6(5),e.hij(" ",e.xi3(11,5,t.type,o.formatterPassengerType)||"N/A",""),e.xp6(6),e.Oqu(e.xi3(17,8,t.gender,o.formatterGender)||"N/A"),e.xp6(6),e.Oqu(e.Dn7(23,11,e.lcZ(24,15,t.totalFare),",",".")||"N/A")}}function le(n,r){if(1&n&&(e.TgZ(0,"div",39)(1,"div",40)(2,"div",41),e._UZ(3,"img",42),e.ALo(4,"mapper"),e.TgZ(5,"div",43),e._uU(6),e.qZA()(),e.TgZ(7,"div",44)(8,"div",41)(9,"div",45)(10,"div",41)(11,"div",46),e._uU(12),e.ALo(13,"mapper"),e.qZA()(),e.TgZ(14,"div"),e._UZ(15,"cf-icon",47),e.qZA(),e.TgZ(16,"div",41)(17,"div",48),e._uU(18),e.ALo(19,"mapper"),e.qZA()()(),e.TgZ(20,"div",49),e.YNc(21,re,9,12,"div",50),e.qZA()(),e.YNc(22,ie,5,1,"div",51),e.qZA()(),e.TgZ(23,"table",52)(24,"thead")(25,"tr")(26,"th",32),e._uU(27," H\u1ecd t\xean "),e.qZA(),e.TgZ(28,"th",32),e._uU(29," Lo\u1ea1i kh\xe1ch "),e.qZA(),e.TgZ(30,"th",32),e._uU(31," Gi\u1edbi t\xednh "),e.qZA(),e.TgZ(32,"th",53),e._uU(33," Gi\xe1 v\xe9 "),e.qZA()()(),e.TgZ(34,"tbody"),e.YNc(35,ae,13,17,"tr",33),e.qZA()(),e.TgZ(36,"div",54),e.YNc(37,se,25,17,"div",55),e.qZA(),e.TgZ(38,"div",56)(39,"div",57),e._uU(40," T\u1ed5ng ti\u1ec1n: "),e.qZA(),e.TgZ(41,"div",58),e._uU(42),e.ALo(43,"replace"),e.ALo(44,"number"),e.ALo(45,"mapper"),e.qZA()()()),2&n){const t=r.$implicit,o=e.oxw(2);e.xp6(3),e.Q6J("src",e.xi3(4,12,t.airline,o.getAirlineLogoByCode),e.LSH)("alt",t.airline),e.xp6(3),e.hij(" ",t.airline," "),e.xp6(6),e.AsE(" ",e.xi3(13,15,t.startPoint,o.getLocationData)," (",t.startPoint,") "),e.xp6(6),e.AsE(" ",e.xi3(19,18,t.endPoint,o.getLocationData)," ( ",t.endPoint,") "),e.xp6(3),e.Q6J("ngForOf",t.segments),e.xp6(1),e.Q6J("ngIf",t.pnr),e.xp6(13),e.Q6J("ngForOf",t.paxList),e.xp6(2),e.Q6J("ngForOf",t.paxList),e.xp6(5),e.hij(" ",e.Dn7(43,21,e.lcZ(44,25,e.xi3(45,27,t.paxList,o.sumPriceByPaxList)),",",".")," \u0111 ")}}function ce(n,r){if(1&n&&(e.TgZ(0,"div",10)(1,"div",11),e._UZ(2,"div",12),e.TgZ(3,"div",13),e._uU(4,"Th\xf4ng tin h\xe0nh tr\xecnh"),e.qZA()(),e.TgZ(5,"div",14)(6,"div",37),e.YNc(7,le,46,30,"div",38),e.qZA()()()),2&n){const t=e.oxw();e.xp6(7),e.Q6J("ngForOf",t.dataOrder.listJourney)}}let de=(()=>{class n{constructor(t,o,s,m,f,Z,N){this._bcServiceSvc=t,this.route=o,this._flightDataService=s,this.cfIconRegister=m,this._locationDataSvc=f,this._modal=Z,this._toastService=N,this.configStatus=u.cT,this.getAirlineLogoByCode=v=>this._flightDataService.getAirlineLogoByCode(v),this.getLocationData=v=>this._locationDataSvc.getCityNameByCode(v),this.formatterPassengerType=v=>({ADT:"Ng\u01b0\u1eddi l\u1edbn",CHD:"Tr\u1ebb em",INF:"Em b\xe9"}[v]||v),this.formatterGender=v=>({male:"Nam",female:"N\u1eef",order:"Kh\xf4ng x\xe1c \u0111\u1ecbnh"}[v]||v),this.sumPriceByPaxList=v=>v.reduce((T,P)=>T+P.totalFare,0),this.cfIconRegister.registerIcons([i.KYu,i.GUN,i.$f3,i.o1t,i.P5K,i.PcQ,i.S7Q,i.Gey,i.YwC,i.hTA,i.okA])}ngOnInit(){this.initDataOrder()}initDataOrder(){this.route.paramMap.pipe((0,O.h)(t=>t.has("id")),(0,g.w)(t=>{const o=t.get("id");return this._bcServiceSvc.getInfoOrderDetail(o)})).subscribe(t=>{this.dataOrder=t.data})}confirmPayment(){this._modal.open(h.V0,{title:"X\xe1c nh\u1eadn thanh to\xe1n \u0111\u01a1n h\xe0ng",body:"H\u1ec7 th\u1ed1ng s\u1ebd ti\u1ebfn h\xe0nh xu\u1ea5t v\xe9 khi b\u1ea5m x\xe1c nh\u1eadn. B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn \u0111\u01a1n h\xe0ng n\xe0y \u0111\u01b0\u1ee3c thanh to\xe1n th\xe0nh c\xf4ng",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y",hasIcon:!1}).afterClosed$.subscribe({next:o=>{o.data&&this._bcServiceSvc.updateStateOrder(this.dataOrder.orderInfo.orderId,"PAYMENT_SUCCESS").subscribe(s=>{this._toastService.add(s.success?{severity:"success",summary:"Thanh to\xe1n th\xe0nh c\xf4ng",detail:"",sticky:!1}:{severity:"error",summary:"Thanh to\xe1n th\u1ea5t b\u1ea1i",detail:"",sticky:!1})})},error:()=>{this._toastService.add({severity:"error",summary:"Thanh to\xe1n th\u1ea5t b\u1ea1i",detail:"",sticky:!1})}})}confirmRefund(){this._modal.open(h.V0,{title:"X\xe1c nh\u1eadn ho\xe0n ti\u1ec1n \u0111\u01a1n h\xe0ng",body:"H\u1ec7 th\u1ed1ng s\u1ebd ti\u1ebfn h\xe0nh ho\xe0n ti\u1ec1n khi b\u1ea5m x\xe1c nh\u1eadn. B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn \u0111\u01a1n h\xe0ng n\xe0y \u0111\u01b0\u1ee3c ho\xe0n ti\u1ec1n",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y",hasIcon:!1}).afterClosed$.subscribe({next:o=>{o.data&&this._bcServiceSvc.updateStateOrder(this.dataOrder.orderInfo.orderId,"REFUNDED").subscribe(s=>{this._toastService.add(s.success?{severity:"success",summary:"Ho\xe0n ti\u1ec1n th\xe0nh c\xf4ng",detail:"",sticky:!1}:{severity:"error",summary:"Ho\xe0n ti\u1ec1n th\u1ea5t b\u1ea1i",detail:"",sticky:!1})})},error:()=>{this._toastService.add({severity:"error",summary:"Ho\xe0n ti\u1ec1n th\u1ea5t b\u1ea1i",detail:"",sticky:!1})}})}back(){window.history.back()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(U),e.Y36(q.gz),e.Y36(F.G),e.Y36(i.KNP),e.Y36(J._),e.Y36(j.oE),e.Y36(R.BX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["btc-order-management-detail"]],standalone:!0,features:[e.jDz],decls:10,vars:5,consts:[[1,"container","mx-auto","px-4","py-6","max-w-4xl"],[1,"space-y-6"],[1,"flex","justify-between","items-center"],["type","secondary","size","medium","cf-button","",1,"bg-white",3,"click"],["class","flex gap-4 items-center",4,"ngIf"],["class","flex flex-col gap-4",4,"ngIf"],["class","flex flex-col gap-4 ",4,"ngIf"],[1,"flex","gap-4","items-center"],["type","solid","size","medium","cf-button","",3,"click",4,"ngIf"],["type","solid","size","medium","cf-button","",3,"click"],[1,"flex","flex-col","gap-4"],[1,"flex","gap-x-[20px]"],[1,"w-1","bg-primary-2-4"],[1,"text-heading-md","text-neutral-black"],[1,"p-6","bg-white","shadow-sm","rounded-lg"],[1,"flex","justify-between","items-start","flex-col","gap-3"],[1,"flex","flex-col","gap-3"],[1,"flex","items-center","gap-2","text-sm","text-neutral-gray-6"],["cfHeadIcon","","icon","ticket","size","small",1,"text-neutral-gray-6"],[1,"text-body-md-short"],[1,"font-medium","text-body-md-short","text-neutral-gray-6"],["cfHeadIcon","","icon","money","size","small",1,"text-neutral-gray-6"],["cfHeadIcon","","icon","credit_card","size","small",1,"text-neutral-gray-6"],[1,"space-y-3"],[1,"flex","items-center","gap-2","text-sm"],["cfHeadIcon","","icon","user","size","small",1,"text-neutral-gray-6"],[1,"text-neutral-gray-6","text-body-md-short"],[1,"font-medium","text-body-md-short"],["cfHeadIcon","","icon","call","size","small",1,"text-neutral-gray-6"],["cfHeadIcon","","icon","email","size","small",1,"text-neutral-gray-6"],[1,"overflow-x-auto"],[1,"min-w-full","divide-y","divide-neutral-gray-3"],[1,"text-left","text-espressive-sm","text-neutral-gray-4","pb-3"],[4,"ngFor","ngForOf"],[1,"text-body-md","text-neutral-black","pt-4","uppercase"],[1,"text-body-md","text-neutral-black","pt-4"],[1,"text-body-md","text-neutral-black","pt-4","capitalize"],[1,"space-y-4"],["class","p-3 flex flex-col gap-3 shadow-lg rounded-lg",4,"ngFor","ngForOf"],[1,"p-3","flex","flex-col","gap-3","shadow-lg","rounded-lg"],[1,"flex","gap-6","items-center"],[1,"flex","flex-col","items-center"],[1,"w-14","h-14","object-contain",3,"src","alt"],[1,"text-body-md-long","font-semibold","text-neutral-gray-4"],[1,"flex","gap-3","md:flex-col"],[1,"flex","gap-3","items-center","md:flex-col","md:items-start"],[1,"text-body-md","font-semibold"],["icon","plane","size","small"],[1,"text-body-lg","font-semibold"],[1,"flex","flex-col","gap-3","w-full"],["class","flex gap-2 md:flex-col text-neutral-gray-4 text-body-md",4,"ngFor","ngForOf"],["class","flex flex-col gap-1 text-body-md",4,"ngIf"],[1,"min-w-full","divide-y","divide-neutral-gray-3","md:hidden"],[1,"text-espressive-sm","text-neutral-gray-4","pb-3","text-right"],[1,"hidden","w-full","md:flex","justify-between","gap-4"],["class","flex flex-col rounded-lg bg-neutral-white p-3 gap-y-2",4,"ngFor","ngForOf"],[1,"w-full","flex","justify-end","gap-4"],[1,"text-espressive-sm","text-neutral-gray-4"],[1,"text-heading-md","font-bold"],[1,"flex","gap-2","md:flex-col","text-neutral-gray-4","text-body-md"],[1,"flex","items-center","gap-1"],[1,"flex","flex-col","gap-1","text-body-md"],[1,"font-semibold"],[1,"text-body-md","text-neutral-black","pt-4","text-right"],[1,"flex","flex-col","rounded-lg","bg-neutral-white","p-3","gap-y-2"],[1,"flex","items-center","gap-x-5"],[1,"text-body-sm","text-neutral-gray-4","w-[104px]"],[1,"text-espressive-md","text-neutral-gray-6"]],template:function(t,o){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),e.NdJ("click",function(){return o.back()}),e._uU(4," Quay l\u1ea1i "),e.qZA(),e.YNc(5,W,3,2,"div",4),e.qZA(),e.YNc(6,ee,29,9,"div",5),e.YNc(7,te,25,4,"div",6),e.YNc(8,oe,18,1,"div",5),e.YNc(9,ce,8,1,"div",5),e.qZA()()),2&t&&(e.xp6(5),e.Q6J("ngIf",null==o.dataOrder?null:o.dataOrder.orderInfo),e.xp6(1),e.Q6J("ngIf",null==o.dataOrder?null:o.dataOrder.orderInfo),e.xp6(1),e.Q6J("ngIf",null==o.dataOrder?null:o.dataOrder.contact),e.xp6(1),e.Q6J("ngIf",null==o.dataOrder?null:o.dataOrder.listPax),e.xp6(1),e.Q6J("ngIf",null==o.dataOrder?null:o.dataOrder.listJourney))},dependencies:[c.ez,c.sg,c.O5,c.JJ,c.uU,i.AxE,i.Sm8,x.q,b.AS,l.N8,l.Xq],encapsulation:2}),n})();var y=a(24006),pe=a(88516),D=a(44143),ue=a(4688),fe=a(74713),M=a(78043),C=a(40899);function me(n,r){if(1&n&&(e.TgZ(0,"div",19),e._UZ(1,"cf-icon",20),e.TgZ(2,"span",21),e._uU(3),e.qZA()()),2&n){const t=r.ngIf;e.Q6J("ngClass",t.bgColor),e.xp6(1),e.Q6J("icon",t.icon),e.xp6(2),e.hij(" ",t.name," ")}}function ge(n,r){if(1&n&&(e.TgZ(0,"div",46),e._UZ(1,"div",47),e.TgZ(2,"div",48),e._uU(3),e.qZA(),e._UZ(4,"div",47),e.qZA()),2&n){const t=e.oxw().index;e.xp6(3),e.hij("Ch\u1eb7ng ",t+2,"")}}function he(n,r){if(1&n&&(e.TgZ(0,"div",22)(1,"div",23)(2,"div",24)(3,"div",25),e._UZ(4,"img",26),e.ALo(5,"mapper"),e.qZA(),e.TgZ(6,"div",27)(7,"div",28)(8,"div",29)(9,"div",30),e._uU(10),e.ALo(11,"mapper"),e.qZA()(),e.TgZ(12,"div"),e._UZ(13,"cf-icon",31),e.qZA(),e.TgZ(14,"div",29)(15,"div",30),e._uU(16),e.ALo(17,"mapper"),e.qZA()()(),e.TgZ(18,"div",32)(19,"div",33)(20,"div",34),e._UZ(21,"cf-icon",35),e._uU(22),e.ALo(23,"date"),e.qZA(),e.TgZ(24,"div",34),e._UZ(25,"cf-icon",8),e._uU(26),e.ALo(27,"date"),e.qZA()()()()()(),e.TgZ(28,"div",36)(29,"div",37)(30,"div",38)(31,"div",39),e._UZ(32,"cf-icon",40),e._uU(33," H\xe0nh kh\xe1ch: "),e.qZA(),e.TgZ(34,"div",41),e._uU(35),e.qZA()(),e.TgZ(36,"div",38)(37,"div",39),e._UZ(38,"cf-icon",42),e._uU(39," PNR: "),e.qZA(),e.TgZ(40,"div",41),e._uU(41),e.qZA()()(),e.TgZ(42,"div",43)(43,"div",44),e._uU(44),e.ALo(45,"replace"),e.ALo(46,"number"),e.qZA()()(),e.YNc(47,ge,5,1,"div",45),e.qZA()),2&n){const t=r.$implicit,o=r.last,s=e.oxw();e.xp6(4),e.Q6J("src",e.xi3(5,11,t.airline,s.getAirlineLogoByCode),e.LSH),e.xp6(6),e.AsE(" ",e.xi3(11,14,t.startPoint,s.getLocationData)," (",t.startPoint,") "),e.xp6(6),e.AsE(" ",e.xi3(17,17,t.endPoint,s.getLocationData)," ( ",t.endPoint,") "),e.xp6(6),e.hij(" ",e.xi3(23,20,t.departureTime,"dd/MM/yyyy")," "),e.xp6(4),e.hij(" ",e.xi3(27,23,t.departureTime,"HH:mm")," "),e.xp6(9),e.hij(" ",t.numPax||"---"," "),e.xp6(6),e.hij(" ",t.pnr||"---"," "),e.xp6(3),e.hij(" T\u1ed5ng ti\u1ec1n: ",e.Dn7(45,26,e.lcZ(46,30,t.totalPrice),",",".")," \u0111 "),e.xp6(3),e.Q6J("ngIf",!o)}}function xe(n,r){if(1&n){const t=e.EpF();e.TgZ(0,"button",49),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.navigateToDetail(s.order.orderId))}),e._uU(1," Chi ti\u1ebft "),e.qZA()}}function ve(n,r){if(1&n){const t=e.EpF();e.TgZ(0,"button",50),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.confirmPayment())}),e._uU(1," X\xe1c nh\u1eadn thanh to\xe1n "),e.qZA()}}function _e(n,r){if(1&n){const t=e.EpF();e.TgZ(0,"button",50),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.confirmRefund())}),e._uU(1," X\xe1c nh\u1eadn ho\xe0n ti\u1ec1n "),e.qZA()}}let ye=(()=>{class n{constructor(t,o,s,m,f,Z,N,v){this._flightDataService=t,this._locationDataSvc=o,this.cfIconRegister=s,this.router=m,this._modal=f,this._bcServiceSvc=Z,this._toastService=N,this._permissionService=v,this.configStatus=u.cT,this.isViewInfoOrderDetail=this._permissionService.hasPermission(C.or.GetInfoOrderDetail),this.isViewUpdateOrder=this._permissionService.hasPermission(C.or.UpdateOrder),this.isViewRefundTopup=this._permissionService.hasPermission(C.or.RefundTopup),this.getAirlineLogoByCode=T=>this._flightDataService.getAirlineLogoByCode(T),this.getLocationData=T=>this._locationDataSvc.getCityNameByCode(T),this.totalPriceJourneys=T=>T.reduce((P,Ee)=>P+Ee.totalPrice,0),this.cfIconRegister.registerIcons([i.okA,i.qDv,i.wvd,i.o1t,i.DFc,i.YwC,i.TOh,i.o1t,i.P5K,i.PcQ,i.S7Q,i.Gey])}navigateToDetail(t){this.router.navigate(["admin/btc-order-detail",t])}confirmPayment(){this._modal.open(h.V0,{title:"X\xe1c nh\u1eadn thanh to\xe1n \u0111\u01a1n h\xe0ng",body:"H\u1ec7 th\u1ed1ng s\u1ebd ti\u1ebfn h\xe0nh xu\u1ea5t v\xe9 khi b\u1ea5m x\xe1c nh\u1eadn. B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn \u0111\u01a1n h\xe0ng n\xe0y \u0111\u01b0\u1ee3c thanh to\xe1n th\xe0nh c\xf4ng",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y",hasIcon:!1}).afterClosed$.subscribe({next:o=>{o.data&&this._bcServiceSvc.updateStateOrder(this.order.orderId,"PAYMENT_SUCCESS").subscribe(s=>{this._toastService.add(s.success?{severity:"success",summary:"Thanh to\xe1n th\xe0nh c\xf4ng",detail:"",sticky:!1}:{severity:"error",summary:"Thanh to\xe1n th\u1ea5t b\u1ea1i",detail:"",sticky:!1})})},error:()=>{this._toastService.add({severity:"error",summary:"Thanh to\xe1n th\u1ea5t b\u1ea1i",detail:"",sticky:!1})}})}confirmRefund(){this._modal.open(h.V0,{title:"X\xe1c nh\u1eadn ho\xe0n ti\u1ec1n \u0111\u01a1n h\xe0ng",body:"H\u1ec7 th\u1ed1ng s\u1ebd ti\u1ebfn h\xe0nh ho\xe0n ti\u1ec1n khi b\u1ea5m x\xe1c nh\u1eadn. B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn \u0111\u01a1n h\xe0ng n\xe0y \u0111\u01b0\u1ee3c ho\xe0n ti\u1ec1n",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y",hasIcon:!1}).afterClosed$.subscribe({next:o=>{o.data&&this._bcServiceSvc.updateStateOrder(this.order.orderId,"REFUNDED").subscribe(s=>{this._toastService.add(s.success?{severity:"success",summary:"Ho\xe0n ti\u1ec1n th\xe0nh c\xf4ng",detail:"",sticky:!1}:{severity:"error",summary:"Ho\xe0n ti\u1ec1n th\u1ea5t b\u1ea1i",detail:"",sticky:!1})})},error:()=>{this._toastService.add({severity:"error",summary:"Ho\xe0n ti\u1ec1n th\u1ea5t b\u1ea1i",detail:"",sticky:!1})}})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.G),e.Y36(J._),e.Y36(i.KNP),e.Y36(q.F0),e.Y36(j.oE),e.Y36(U),e.Y36(R.BX),e.Y36(C.$A))},n.\u0275cmp=e.Xpm({type:n,selectors:[["btc-order-item"]],inputs:{order:"order"},standalone:!0,features:[e.jDz],decls:28,vars:20,consts:[[1,"flex","flex-col","rounded-lg","w-full","shadow-md","bg-neutral-white","gap-3","p-4"],[1,"flex","flex-col","gap-2"],[1,"flex","gap-2","items-center"],[1,"text-body-lg","text-neutral-gray-5","font-semibold"],[1,"font-semibold","text-heading-lg","md:text-body-sm"],["class","py-1 px-2 rounded-full w-fit gap-1 h-fit flex items-center justify-center",3,"ngClass",4,"ngIf"],[1,"flex","flex-col","gap-1"],[1,"text-body-md","text-neutral-gray-4","font-medium","gap-1","flex","items-center"],["icon","clock","size","small"],[1,"pt-3","px-3"],[1,"w-full","border-b","border-neutral-gray-2","pb-4","flex","flex-col","gap-4"],["class","flex flex-col gap-4",4,"ngFor","ngForOf"],[1,"rounded-b-lg","flex","gap-2","p-3","bg-white","justify-end","items-center"],[1,"text-body-lg","font-semibold","flex","items-center","gap-1"],["icon","inbox","size","small"],[1,"text-body-lg","font-semibold"],[1,"flex","gap-2","items-center","w-full","justify-end"],["type","secondary","size","medium","cf-button","",3,"click",4,"ngIf"],["type","solid","size","medium","cf-button","",3,"click",4,"ngIf"],[1,"py-1","px-2","rounded-full","w-fit","gap-1","h-fit","flex","items-center","justify-center",3,"ngClass"],["size","small",1,"md:hidden","text-white",3,"icon"],[1,"text-neutral-white","text-body-sm"],[1,"flex","flex-col","gap-4"],[1,"flex","justify-between"],[1,"flex","gap-6","items-center","md:w-full","md:justify-between"],[1,"flex","gap-3"],["alt","logo airline",1,"w-14","h-14","object-contain",3,"src"],[1,"flex","flex-col","items-center","gap-1","md:items-start","md:flex-1"],[1,"flex","gap-3","items-center","md:flex-col","md:items-start"],[1,"flex","flex-col","items-center"],[1,"text-body-md","font-semibold"],["icon","plane","size","small"],[1,"flex","gap-4"],[1,"flex","gap-3","items-center","text-neutral-gray-4","text-espressive-sm"],[1,"flex","items-center","gap-1"],["icon","calendar","size","small"],[1,"flex","gap-5","justify-between"],[1,"flex","gap-6","items-center","md:items-start","md:flex-col"],[1,"flex","gap-1"],[1,"text-body-md","flex","gap-1","items-center"],["icon","users","size","small",1,"md:hidden"],[1,"text-body-md"],["icon","ticket","size","small",1,"md:hidden"],[1,"flex","flex-col","gap-1","items-center","md:justify-end"],[1,"text-body-md","font-medium"],["class","my-2 flex items-center gap-2",4,"ngIf"],[1,"my-2","flex","items-center","gap-2"],[1,"flex-1","border-t","border-neutral-gray-2","h-[1px]"],[1,"border","rounded-2xl","p-1","border-neutral-gray-2","w-fit","text-body-sm"],["type","secondary","size","medium","cf-button","",3,"click"],["type","solid","size","medium","cf-button","",3,"click"]],template:function(t,o){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e._uU(4),e.qZA(),e.TgZ(5,"div",4),e.YNc(6,me,4,3,"div",5),e.qZA()(),e.TgZ(7,"div",6)(8,"div",7),e._UZ(9,"cf-icon",8),e._uU(10),e.ALo(11,"date"),e.qZA()()(),e.TgZ(12,"div",9)(13,"div",10),e.YNc(14,he,48,32,"div",11),e.qZA()(),e.TgZ(15,"div",12)(16,"div",13),e._UZ(17,"cf-icon",14),e._uU(18," T\u1ed5ng ti\u1ec1n: "),e.qZA(),e.TgZ(19,"div",15),e._uU(20),e.ALo(21,"replace"),e.ALo(22,"number"),e.ALo(23,"mapper"),e.qZA()(),e.TgZ(24,"div",16),e.YNc(25,xe,2,0,"button",17),e.YNc(26,ve,2,0,"button",18),e.YNc(27,_e,2,0,"button",18),e.qZA()()),2&t&&(e.xp6(4),e.hij(" ",o.order.orderId," "),e.xp6(2),e.Q6J("ngIf",o.configStatus[o.order.state]),e.xp6(4),e.hij(" Ng\xe0y \u0111\u1eb7t: ",e.xi3(11,8,o.order.timeBook,"dd/MM/yyyy")||"---"," "),e.xp6(4),e.Q6J("ngForOf",o.order.journeyInfos),e.xp6(6),e.hij(" ",e.Dn7(21,11,e.lcZ(22,15,e.xi3(23,17,o.order.journeyInfos,o.totalPriceJourneys)),",",".")," \u0111 "),e.xp6(5),e.Q6J("ngIf",o.isViewInfoOrderDetail),e.xp6(1),e.Q6J("ngIf","PAYMENT_PROCESSING"===o.order.state&&o.isViewUpdateOrder),e.xp6(1),e.Q6J("ngIf","FAILED"===o.order.state&&o.isViewRefundTopup))},dependencies:[c.ez,c.mk,c.sg,c.O5,c.JJ,c.uU,i.AxE,i.Sm8,l.N8,l.Xq,x.q,b.AS],styles:[":host{display:block}\n"],encapsulation:2,changeDetection:0}),n})();var k=a(35119),Y=a(81664);const Te=function(n,r){return{"border-b-4 border-neutral-gray-4":n,"!pl-5":r}},Ze=function(n){return{"text-neutral-gray-6":n}},be=function(n){return{"!bg-neutral-gray-6 text-express-sm":n}};function Oe(n,r){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",38,39),e.NdJ("click",function(){const m=e.CHM(t).$implicit,f=e.MAs(2),Z=e.oxw();return e.KtG(Z.onChangeTab(m,f))}),e.TgZ(3,"div",40),e._uU(4),e.TgZ(5,"cf-label",41),e._uU(6),e.qZA()()(),e.BQk()}if(2&n){const t=r.$implicit,o=r.first,s=e.oxw();e.xp6(1),e.Q6J("ngClass",e.WLB(6,Te,t.value===s.currentTab,!o)),e.xp6(2),e.Q6J("ngClass",e.VKq(9,Ze,t.value===s.currentTab)),e.xp6(1),e.hij(" ",t.text," "),e.xp6(1),e.Q6J("color","green")("ngClass",e.VKq(11,be,t.value===s.currentTab)),e.xp6(1),e.hij(" ",t.counter>99?"99+":t.counter," ")}}function Ie(n,r){1&n&&e._UZ(0,"cf-input-hint",42),2&n&&e.Q6J("hint","Th\u1eddi gian kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Ae(n,r){if(1&n&&(e.ynx(0),e._UZ(1,"btc-order-item",43),e.BQk()),2&n){const t=r.$implicit;e.xp6(1),e.Q6J("order",t)}}const Q=function(){return[]},De=function(){return{standalone:!0}};let Ce=(()=>{class n{constructor(t,o){this._fb=t,this._bcServiceSvc=o,this.listTab=[{value:"ALL",text:"T\u1ea5t c\u1ea3",counter:0,active:!0},...Object.keys(u.cT).map(s=>({value:s,text:u.cT[s].name,counter:0,active:!1}))],this.currentTab="ALL",this.listOrderRaw=[],this.invalidTimeFilter=!1,this.dateRangeStr="",this.timeOptions=u.qM,this.channelTypeOptions=u.bN,this.searchTypeOptions=u.Oi,this.filterByTab=(s,m)=>s.filter(f=>"ALL"===m||f.state===m)}ngOnInit(){this.initSearchForm()}onChangeTab(t,o){t.value!==this.currentTab&&(this.currentTab=t.value)}initSearchForm(){const t=(0,c.p6)((0,k.Z)(new Date),"dd/MM/yyyy","vi-VN"),o=(0,c.p6)((0,Y.Z)(new Date),"dd/MM/yyyy","vi-VN");this.dateRangeStr=t+" - "+o,this.searchForm=this._fb.group({startTime:[(0,k.Z)(new Date),y.kI.required],endTime:[(0,Y.Z)(new Date),y.kI.required],searchText:"",timeOption:M.XY.TIME_BOOKED,channelType:M.R$.ALL,searchType:M.r4.PNR}),this.onSearch()}onDateSelection(t,o,s,m){if(o.value||s.value)if(o.value&&!s.value&&t&&t.getTime()>=o.value.getTime()){s.setValue(t),m.close(),this.startDate=o.value;const f=(0,c.p6)(t,"dd/MM/yyyy","vi-VN");this.dateRangeStr+=f}else{s.setValue(null),o.setValue(t);const f=(0,c.p6)(t,"dd/MM/yyyy","vi-VN");this.dateRangeStr=f+" - "}else{o.setValue(t),s.setValue(null);const f=(0,c.p6)(t,"dd/MM/yyyy","vi-VN");this.dateRangeStr=f+" - "}this.invalidTimeFilter=o.invalid||s.invalid}onSearch(){this.searchForm.invalid||this.invalidTimeFilter||this._bcServiceSvc.getListOrder(this.searchForm.value).subscribe({next:t=>{this.listOrderRaw=[...t.data],this.progressCouterOfTabs(t.data)}})}progressCouterOfTabs(t){this.listTab=[...this.listTab.map(o=>(o.counter=(t||[]).filter(s=>"ALL"===o.value||s.state===o.value).length,o))]}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(y.qu),e.Y36(U))},n.\u0275cmp=e.Xpm({type:n,selectors:[["btc-order-management"]],standalone:!0,features:[e.jDz],decls:47,vars:35,consts:[[1,"flex","flex-col","h-full","w-full"],[1,"py-4","px-[30px]","flex","flex-col","gap-y-[30px]","md:gap-y-4","bg-neutral-white"],[1,"flex","justify-between","gap-x-6","md:flex-col","md:gap-y-4"],[1,"flex","flex-col","gap-y-1.5"],[1,"text-heading-lg","md:text-heading-sm"],[1,"flex","flex-col","gap-y-5"],[1,"flex","overflow-x-auto"],[4,"ngFor","ngForOf"],[1,"flex","flex-col","gap-y-3",3,"formGroup"],[1,"flex","gap-x-4","items-center","md:hidden"],[1,"flex","gap-y-1.5","flex-col"],[1,"text-express-md","whitespace-nowrap","text-neutral-gray-5"],["textField","text","valueField","value","formControlName","timeOption",1,"!max-w-none","w-[180px]",3,"status","data","placeholder","allowSearch"],[1,"flex"],[1,"grow",3,"status"],["cfHeadIcon","","icon","calendar","size","small"],["cfLabel",""],["cf-input","","type","text","size","medium","placeholder","Ch\u1ecdn ng\xe0y kh\u1edfi h\xe0nh",1,"py-[8px]",3,"ngModel","ngModelOptions","click","ngModelChange"],[1,"hidden"],["cfHint","",3,"hint",4,"ngIf"],["cfDatepicker","","type","text","outsideDays","hidden",1,"w-0","m-0","mr-2","bottom-0",3,"secondaryCalendar","displayMonths","rangeSelection","containerWidth","startDate","canReset","fromDate","toDate","dateSelect"],["dateRange","cfDatepicker"],["textField","text","valueField","value","formControlName","channelType",1,"!max-w-none","w-[160px]",3,"status","data","placeholder","allowSearch"],[1,"flex","gap-2","flex-1"],[1,"flex","items-center","gap-y-1.5"],["textField","text","valueField","value","formControlName","searchType",1,"!max-w-none","w-full",3,"status","data","placeholder","allowSearch"],[1,"flex-1","md:hidden"],["cfHeadIcon","","icon","search","size","small",1,"text-neutral-gray-4"],["size","medium","cf-input","","placeholder","Nh\u1eadp m\xe3 \u0111\u01a1n h\xe0ng","autocomplete","off","formControlName","searchText"],["tableSearchInput",""],[1,"flex","flex-col","justify-end","w-[168px]","shrink-0"],["cf-button","","type","secondary","size","medium",1,"justify-center",3,"disabled","click"],["cfHeadIcon","","icon","search","size","small",1,"mr-2"],[1,"flex-auto","h-full","w-full"],[1,"h-full","pt-8","pb-4","px-[30px]","flex","justify-center"],[1,"w-[680px]","max-w-[680px]"],[1,"w-full","h-full"],[1,"flex","flex-col","gap-y-6","md:gap-y-4"],[1,"py-2.5","pr-5","pl-0","flex","gap-x-2.5","border-b","border-neutral-gray-1","cursor-pointer",3,"ngClass","click"],["tabElement",""],[1,"flex","items-center","whitespace-nowrap","text-heading-md","text-neutral-gray-4","md:text-express-md",3,"ngClass"],[1,"!text-express-xs","!p-1","bg-neutral-gray-4","ml-2",3,"color","ngClass"],["cfHint","",3,"hint"],[3,"order"]],template:function(t,o){if(1&t){const s=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._uU(5,"Qu\u1ea3n l\xfd \u0111\u01a1n h\xe0ng B2C"),e.qZA()()(),e.TgZ(6,"div",5)(7,"div",6),e.YNc(8,Oe,7,13,"ng-container",7),e.qZA(),e.TgZ(9,"form",8)(10,"div",9)(11,"div",10)(12,"div",11),e._uU(13,"L\u1ecdc theo"),e.qZA(),e._UZ(14,"cf-select",12),e.qZA(),e.TgZ(15,"div",13)(16,"cf-input-group",14),e._UZ(17,"cf-icon",15),e.TgZ(18,"label",16),e._uU(19,"Th\u1eddi gian"),e.qZA(),e.TgZ(20,"input",17),e.NdJ("click",function(){e.CHM(s);const f=e.MAs(24);return e.KtG(f.open())})("ngModelChange",function(f){return o.dateRangeStr=f}),e.qZA(),e.TgZ(21,"div",18),e.YNc(22,Ie,1,1,"cf-input-hint",19),e.qZA()(),e.TgZ(23,"input",20,21),e.NdJ("dateSelect",function(f){e.CHM(s);const Z=e.MAs(24);return e.KtG(o.onDateSelection(f,o.searchForm.controls.startTime,o.searchForm.controls.endTime,Z))}),e.qZA()(),e.TgZ(25,"div",10)(26,"div",11),e._uU(27,"K\xeanh b\xe1n l\u1ebb"),e.qZA(),e._UZ(28,"cf-select",22),e.qZA()(),e.TgZ(29,"div",23)(30,"div",24),e._UZ(31,"cf-select",25),e.qZA(),e.TgZ(32,"cf-input-group",26),e._UZ(33,"cf-icon",27)(34,"input",28,29),e.qZA(),e.TgZ(36,"div",30)(37,"button",31),e.NdJ("click",function(){return o.onSearch()}),e._UZ(38,"cf-icon",32),e._uU(39," T\xecm ki\u1ebfm "),e.qZA()()()()()(),e.TgZ(40,"div",33)(41,"div",34)(42,"div",35)(43,"div",36)(44,"div",37),e.YNc(45,Ae,2,1,"ng-container",7),e.ALo(46,"mapper"),e.qZA()()()()()()}2&t&&(e.xp6(8),e.Q6J("ngForOf",o.listTab),e.xp6(1),e.Q6J("formGroup",o.searchForm),e.xp6(5),e.Q6J("status","default")("data",o.timeOptions||e.DdM(32,Q))("placeholder","")("allowSearch",!0),e.xp6(2),e.Q6J("status",o.invalidTimeFilter?"error":"default"),e.xp6(4),e.Q6J("ngModel",o.dateRangeStr)("ngModelOptions",e.DdM(33,De)),e.xp6(2),e.Q6J("ngIf",o.invalidTimeFilter),e.xp6(1),e.Q6J("secondaryCalendar","lunar")("displayMonths",2)("rangeSelection",!0)("containerWidth",600)("startDate",o.startDate)("canReset",!1)("fromDate",o.searchForm.controls.startTime.value)("toDate",o.searchForm.controls.endTime.value),e.xp6(5),e.Q6J("status","default")("data",o.channelTypeOptions)("placeholder","")("allowSearch",!1),e.xp6(3),e.Q6J("status","default")("data",o.searchTypeOptions||e.DdM(34,Q))("placeholder","")("allowSearch",!1),e.xp6(6),e.Q6J("disabled",o.invalidTimeFilter),e.xp6(8),e.Q6J("ngForOf",e.Dn7(46,28,o.listOrderRaw,o.filterByTab,o.currentTab)))},dependencies:[c.ez,c.mk,c.sg,c.O5,ye,fe.q,D.j$,D.ND,D.BN,D.v2,i.AxE,i.Sm8,l.N8,l.Xq,y.u5,y._Y,y.Fj,y.JJ,y.JL,y.On,ue.b,pe.Cs,y.UX,y.sg,y.u,x.q],encapsulation:2}),n})()},80429:(A,_,a)=>{a.d(_,{q:()=>l});var c=a(94650);let l=(()=>{class i{transform(h,b,...x){return b(h,...x)}}return i.\u0275fac=function(h){return new(h||i)},i.\u0275pipe=c.Yjl({name:"mapper",type:i,pure:!0,standalone:!0}),i})()},40833:(A,_,a)=>{function c(l,i){if(i.length<l)throw new TypeError(l+" argument"+(l>1?"s":"")+" required, but only "+i.length+" present")}a.d(_,{Z:()=>c})},80953:(A,_,a)=>{a.d(_,{Z:()=>i});var c=a(86),l=a(40833);function i(u){(0,l.Z)(1,arguments);var h=Object.prototype.toString.call(u);return u instanceof Date||"object"===(0,c.Z)(u)&&"[object Date]"===h?new Date(u.getTime()):"number"==typeof u||"[object Number]"===h?new Date(u):(("string"==typeof u||"[object String]"===h)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},4688:(A,_,a)=>{a.d(_,{b:()=>b});var c=a(36895),l=a(94650),i=a(72506);function u(x,O){if(1&x){const g=l.EpF();l.TgZ(0,"cf-icon",3),l.NdJ("click",function(I){l.CHM(g);const E=l.oxw();return l.KtG(E.close(I))}),l.qZA()}}const h=["*"];let b=(()=>{class x{constructor(g,e,I){this.renderer=g,this.elementRef=e,this.mode="default",this.type="solid",this.size="medium",this.color="red",this.onClose=new l.vpe,I.registerIcons([i.UNF])}ngOnChanges(g){this.loadClasses()}ngOnInit(){this.loadClasses()}loadClasses(){this.classes="rounded inline-flex justify-center items-center gap-x-1 "+this.getSizeClass()+" "+this.getModeClass()}getSizeClass(){return"small"===this.size?"py-1 px-2 text-express-sm":"xsmall"===this.size?"py-[2px] px-1 text-express-sm":"py-1.5 px-3 text-express-md"}getModeClass(){return"outline"===this.type?`bg-white bordertext-${this.color}-4 border-${this.color}-4`:"inverted"===this.type?`bg-${this.color}-1 text-${this.color}-4`:"gray-2"===this.color?"text-neutral-gray-6 bg-neutral-gray-2":`text-neutral-white bg-${this.color}-4`}close(g){this.onClose.emit(g),g.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),this.elementRef.nativeElement)}}return x.\u0275fac=function(g){return new(g||x)(l.Y36(l.Qsj),l.Y36(l.SBq),l.Y36(i.KNP))},x.\u0275cmp=l.Xpm({type:x,selectors:[["cf-label"]],hostVars:2,hostBindings:function(g,e){2&g&&l.Tol(e.classes)},inputs:{mode:"mode",type:"type",size:"size",color:"color"},outputs:{onClose:"onClose"},standalone:!0,features:[l.TTD,l.jDz],ngContentSelectors:h,decls:4,vars:1,consts:[[1,"flex","justify-between","items-center","gap-x-2"],[1,"text-ellipsis","overflow-hidden","whitespace-normal","flex","items-center"],["icon","close","size","small","class","cursor-pointer",3,"click",4,"ngIf"],["icon","close","size","small",1,"cursor-pointer",3,"click"]],template:function(g,e){1&g&&(l.F$t(),l.TgZ(0,"div",0)(1,"div",1),l.Hsn(2),l.qZA(),l.YNc(3,u,1,0,"cf-icon",2),l.qZA()),2&g&&(l.xp6(3),l.Q6J("ngIf","closeable"===e.mode))},dependencies:[c.ez,c.O5,i.AxE,i.Sm8],encapsulation:2,changeDetection:0}),x})()},86:(A,_,a)=>{function c(l){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(i){return typeof i}:function(i){return i&&"function"==typeof Symbol&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(l)}a.d(_,{Z:()=>c})}}]);