-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4682.faf37eb503cd5577.js
1 lines (1 loc) · 130 KB
/
4682.faf37eb503cd5577.js
1
"use strict";(self.webpackChunkcheapflightclient=self.webpackChunkcheapflightclient||[]).push([[4682],{88873:(R,P,m)=>{m.r(P),m.d(P,{ImportPnrPageComponent:()=>Rt,IssueBookingPageComponent:()=>pt,ManageBookingPageComponent:()=>Ge,OpenBookingComponent:()=>Ot,VoidBookingPageComponent:()=>bt});var h=m(36895),d=m(24006),B=m(83700),w=m(27898),U=m(88516),_=m(72506),E=m(44143),V=m(4688),K=m(74713),O=m(48373),D=m(67460),ee=m(77296),Z=m(28746),e=m(94650);let ae=(()=>{class n{transform(t,i){return t.length<i?t:t.slice(0,i)+"..."}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=e.Yjl({name:"truncateName",type:n,pure:!0,standalone:!0}),n})();var M=m(37094),I=m(19123),H=m(40899),z=m(20553),se=m(16039),Q=m(62733),q=m(82761),te=m(9381);function le(n,s){1&n&&e._UZ(0,"cf-input-hint",68),2&n&&e.Q6J("hint","Th\u1eddi gian kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function ce(n,s){1&n&&(e.TgZ(0,"div",26),e._uU(1,"Th\u1eddi gian \u0111\u1eb7t"),e.qZA())}function ue(n,s){1&n&&(e.TgZ(0,"div",26),e._uU(1,"Th\u1eddi gian bay"),e.qZA())}function ge(n,s){1&n&&e._UZ(0,"td",69),2&n&&e.Q6J("sticky","right")}function de(n,s){if(1&n&&(e.TgZ(0,"td",73)(1,"div",74)(2,"div",83),e._uU(3),e.ALo(4,"date"),e.qZA(),e.TgZ(5,"div",83),e._uU(6),e.ALo(7,"date"),e.qZA()()()),2&n){const t=e.oxw().$implicit;e.xp6(3),e.hij(" ",e.xi3(4,2,1e3*t.departureTime,"dd/MM/yyyy HH:mm")," "),e.xp6(3),e.hij(" ",e.xi3(7,5,t.returnTime,"dd/MM/yyyy HH:mm")," ")}}function pe(n,s){if(1&n&&(e.TgZ(0,"td",77),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",t.departureTime?e.xi3(2,1,1e3*t.departureTime,"dd/MM/yyyy HH:mm"):"-"," ")}}function he(n,s){1&n&&(e.ynx(0),e.TgZ(1,"cf-label",84),e._UZ(2,"cf-icon",85),e._uU(3," \u0110\xe3 xu\u1ea5t v\xe9 "),e.qZA(),e.BQk()),2&n&&(e.xp6(1),e.Q6J("color","green"))}function me(n,s){1&n&&(e.ynx(0),e.TgZ(1,"cf-label",84),e._UZ(2,"cf-icon",85),e._uU(3," \u0110\xe3 gi\u1eef ch\u1ed7 "),e.qZA(),e.BQk()),2&n&&(e.xp6(1),e.Q6J("color","yellow"))}function fe(n,s){1&n&&(e.ynx(0),e.TgZ(1,"cf-label",86),e._UZ(2,"cf-icon",87),e._uU(3," \u0110\xe3 void "),e.qZA(),e.BQk()),2&n&&(e.xp6(1),e.Q6J("color","red"))}function _e(n,s){1&n&&(e.ynx(0),e.TgZ(1,"cf-label",86),e._UZ(2,"cf-icon",87),e._uU(3," \u0110\xe3 h\u1ee7y "),e.qZA(),e.BQk()),2&n&&(e.xp6(1),e.Q6J("color","red"))}function ve(n,s){1&n&&(e.ynx(0),e.TgZ(1,"cf-label",86),e._UZ(2,"cf-icon",87),e._uU(3," \u0110\u1eb7t ch\u1ed7 l\u1ed7i "),e.qZA(),e.BQk()),2&n&&(e.xp6(1),e.Q6J("color","red"))}function xe(n,s){1&n&&(e.ynx(0),e.TgZ(1,"cf-label",86),e._UZ(2,"cf-icon",87),e._uU(3," \u0110ang x\u1eed l\xfd "),e.qZA(),e.BQk()),2&n&&(e.xp6(1),e.Q6J("color","red"))}function Ce(n,s){if(1&n&&(e.ynx(0),e._uU(1),e.BQk()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.state)}}function be(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",90),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2).$implicit,r=e.oxw();return e.KtG(r.gotoBookingDetail(o.bookingCode,o.airline))}),e._uU(1,"Chi ti\u1ebft"),e.qZA()}}function ke(n,s){if(1&n&&(e.TgZ(0,"td",88),e.YNc(1,be,2,0,"div",89),e.qZA()),2&n){const t=e.oxw().$implicit;e.Q6J("sticky","right"),e.xp6(1),e.Q6J("ngIf",t.bookingCode)}}function Te(n,s){if(1&n&&(e.TgZ(0,"tr",70)(1,"td",71),e._UZ(2,"img",72),e.qZA(),e.TgZ(3,"td",73),e._uU(4),e.qZA(),e.TgZ(5,"td",73)(6,"div",74),e._uU(7),e.ALo(8,"date"),e.qZA()(),e.YNc(9,de,8,8,"td",75),e.YNc(10,pe,3,4,"td",76),e.TgZ(11,"td",77),e._uU(12),e.ALo(13,"truncateName"),e.qZA(),e.TgZ(14,"td",73)(15,"div",78),e.YNc(16,he,4,1,"ng-container",79),e.YNc(17,me,4,1,"ng-container",79),e.YNc(18,fe,4,1,"ng-container",79),e.YNc(19,_e,4,1,"ng-container",79),e.YNc(20,ve,4,1,"ng-container",79),e.YNc(21,xe,4,1,"ng-container",79),e.YNc(22,Ce,2,1,"ng-container",80),e.qZA()(),e.TgZ(23,"td",77),e._uU(24),e.ALo(25,"date"),e.qZA(),e.TgZ(26,"td",73),e._uU(27),e.qZA(),e.TgZ(28,"td",73),e._uU(29),e.qZA(),e.TgZ(30,"td",81),e._uU(31),e.ALo(32,"number"),e.qZA(),e.YNc(33,ke,2,2,"td",82),e.qZA()),2&n){const t=s.$implicit,i=e.oxw();e.xp6(2),e.Q6J("src",t.airlineLogo,e.LSH),e.xp6(2),e.hij(" ",t.bookingCode||"-"," "),e.xp6(3),e.hij(" ",e.xi3(8,18,t.bookedTime,"dd/MM/yyyy HH:mm")," "),e.xp6(2),e.Q6J("ngIf",t.returnTime),e.xp6(1),e.Q6J("ngIf",!t.returnTime),e.xp6(2),e.Oqu(e.xi3(13,21,t.passengerName,20)),e.xp6(3),e.Q6J("ngSwitch",t.state),e.xp6(1),e.Q6J("ngSwitchCase","ISSUED"),e.xp6(1),e.Q6J("ngSwitchCase","BOOKED"),e.xp6(1),e.Q6J("ngSwitchCase","VOID"),e.xp6(1),e.Q6J("ngSwitchCase","CANCEL"),e.xp6(1),e.Q6J("ngSwitchCase","ERROR"),e.xp6(1),e.Q6J("ngSwitchCase","IN_PROGRESS"),e.xp6(3),e.hij(" ",t.timeKeepHolding?e.xi3(25,24,1e3*t.timeKeepHolding,"dd/MM/yyyy HH:mm"):"-"," "),e.xp6(3),e.Oqu(t.userBooked||"-"),e.xp6(2),e.Oqu(t.agentName||"-"),e.xp6(2),e.hij("",e.lcZ(32,27,t.total)," \u0111"),e.xp6(2),e.Q6J("ngIf",i.viewAllFlightBookingDetail||i.viewOwnFlightBookingDetail)}}function ye(n,s){1&n&&(e.ynx(0),e.TgZ(1,"div",104),e._UZ(2,"cf-icon",105),e.TgZ(3,"div",106),e._uU(4,"\u0110\xe3 xu\u1ea5t v\xe9"),e.qZA()(),e.BQk())}function Ee(n,s){1&n&&(e.ynx(0),e.TgZ(1,"div",107),e._UZ(2,"cf-icon",108),e.TgZ(3,"div",109),e._uU(4,"\u0110ang gi\u1eef ch\u1ed7"),e.qZA()(),e.BQk())}function De(n,s){1&n&&(e.ynx(0),e.TgZ(1,"div",110),e._UZ(2,"cf-icon",111),e.TgZ(3,"div",112),e._uU(4,"\u0110\xe3 void"),e.qZA()(),e.BQk())}function Ze(n,s){1&n&&(e.ynx(0),e.TgZ(1,"div",113),e._UZ(2,"cf-icon",114),e.TgZ(3,"div",115),e._uU(4,"\u0110\xe3 h\u1ee7y"),e.qZA()(),e.BQk())}function Ae(n,s){1&n&&(e.ynx(0),e.TgZ(1,"div",110),e._UZ(2,"cf-icon",116),e.TgZ(3,"div",117),e._uU(4,"\u0110ang x\u1eed l\xfd"),e.qZA()(),e.BQk())}function Be(n,s){if(1&n&&(e.ynx(0),e._uU(1),e.BQk()),2&n){const t=e.oxw(2).$implicit;e.xp6(1),e.Oqu(t.state)}}function Se(n,s){if(1&n&&(e.TgZ(0,"div",96)(1,"div",97),e._uU(2,"H\u1ea1n gi\u1eef ch\u1ed7"),e.qZA(),e.TgZ(3,"div",98),e._uU(4),e.ALo(5,"date"),e.qZA()()),2&n){const t=e.oxw(2).$implicit;e.xp6(4),e.hij("",e.xi3(5,1,1e3*t.timeKeepHolding,"dd/MM/yyyy HH:mm")," ")}}function Me(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",92),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw();return e.KtG(r.gotoBookingDetail(o.bookingCode,o.airline))}),e.TgZ(1,"div",93),e._UZ(2,"img",94),e.TgZ(3,"div",95),e.YNc(4,ye,5,0,"ng-container",79),e.YNc(5,Ee,5,0,"ng-container",79),e.YNc(6,De,5,0,"ng-container",79),e.YNc(7,Ze,5,0,"ng-container",79),e.YNc(8,Ae,5,0,"ng-container",79),e.YNc(9,Be,2,1,"ng-container",80),e.qZA()(),e.TgZ(10,"div",96)(11,"div",97),e._uU(12,"H\xe0nh kh\xe1ch"),e.qZA(),e.TgZ(13,"div",98),e._uU(14),e.qZA()(),e.TgZ(15,"div",96)(16,"div",97),e._uU(17,"Ng\xe0y \u0111\u1eb7t"),e.qZA(),e.TgZ(18,"div",98),e._uU(19),e.ALo(20,"date"),e.qZA()(),e.YNc(21,Se,6,4,"div",99),e.TgZ(22,"div",100)(23,"div",101)(24,"div",102),e._uU(25,"M\xe3 v\xe9"),e.qZA(),e.TgZ(26,"div",103),e._uU(27),e.qZA()(),e.TgZ(28,"div",101)(29,"div",102),e._uU(30,"Ng\xe0y bay"),e.qZA(),e.TgZ(31,"div",103),e._uU(32),e.ALo(33,"date"),e.qZA()(),e.TgZ(34,"div",101)(35,"div",102),e._uU(36,"Ng\xe0y v\u1ec1"),e.qZA(),e.TgZ(37,"div",103),e._uU(38),e.ALo(39,"date"),e.qZA()()()()}if(2&n){const t=e.oxw().$implicit;e.xp6(2),e.s9C("src",t.airlineMobileLogo,e.LSH),e.xp6(1),e.Q6J("ngSwitch",t.state),e.xp6(1),e.Q6J("ngSwitchCase","ISSUED"),e.xp6(1),e.Q6J("ngSwitchCase","BOOKED"),e.xp6(1),e.Q6J("ngSwitchCase","VOID"),e.xp6(1),e.Q6J("ngSwitchCase","CANCEL"),e.xp6(1),e.Q6J("ngSwitchCase","IN_PROGRESS"),e.xp6(6),e.Oqu(t.passengerName),e.xp6(5),e.Oqu(e.xi3(20,13,t.bookedTime,"dd/MM/yyyy HH:mm")),e.xp6(2),e.Q6J("ngIf",t.timeKeepHolding>0),e.xp6(6),e.Oqu(t.bookingCode),e.xp6(5),e.Oqu(e.xi3(33,16,1e3*t.departureTime,"dd/MM/yyyy")),e.xp6(6),e.Oqu(e.xi3(39,19,t.returnTime,"dd/MM/yyyy"))}}function Ne(n,s){if(1&n&&(e.ynx(0),e.YNc(1,Me,40,22,"div",91),e.BQk()),2&n){const t=s.index,i=e.oxw();e.xp6(1),e.Q6J("ngIf",t<i.ticketInfiniteScrollCount)}}function Ie(n,s){1&n&&e._UZ(0,"cf-input-hint",68),2&n&&e.Q6J("hint","Th\u1eddi gian kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Fe(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",118)(1,"div",119)(2,"cf-input-group",120),e._UZ(3,"cf-icon",19)(4,"input",121,21),e.qZA(),e.TgZ(6,"cf-select",122)(7,"label",123)(8,"span"),e._uU(9,"L\u1ecdc theo"),e.qZA()()(),e.TgZ(10,"cf-input-group",124),e._UZ(11,"cf-icon",9),e.TgZ(12,"label",123),e._uU(13,"Th\u1eddi gian"),e.qZA(),e.TgZ(14,"input",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(),r=e.MAs(142);return e.KtG(o.openTimeSelectBts(r))})("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.dateRangeStr=o)}),e.qZA(),e.TgZ(15,"div",11),e.YNc(16,Ie,1,1,"cf-input-hint",12),e.qZA()(),e.TgZ(17,"cf-select",122)(18,"label",123)(19,"span"),e._uU(20,"H\xe3ng bay"),e.qZA()()(),e.TgZ(21,"cf-select",122)(22,"label",123)(23,"span"),e._uU(24,"Tr\u1ea1ng th\xe1i"),e.qZA()()()(),e.TgZ(25,"div")(26,"button",125),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.search())}),e._UZ(27,"cf-icon",126),e.TgZ(28,"div"),e._uU(29,"T\xecm ki\u1ebfm"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(4),e.Q6J("formControl",t.searchForm.controls.searchText),e.xp6(2),e.Q6J("status","default")("data",t.timeSelectOption)("allowSearch",!1)("formControl",t.searchForm.controls.timeType),e.xp6(4),e.Q6J("status",t.invalidTimeFilter?"error":"default"),e.xp6(4),e.Q6J("ngModel",t.dateRangeStr),e.xp6(2),e.Q6J("ngIf",t.invalidTimeFilter),e.xp6(1),e.Q6J("status","default")("data",t.airlineSelectOption)("allowSearch",!1)("formControl",t.searchForm.controls.airline),e.xp6(4),e.Q6J("status","default")("data",t.stateBookingOption)("allowSearch",!1)("formControl",t.searchForm.controls.stateBooking)}}function we(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",127)(1,"div",128)(2,"div",129),e.NdJ("scrolled",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.scrollDown())})("scrolledUp",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.scrollUp())}),e.TgZ(3,"cf-datepicker-inline",130),e.NdJ("dateSelect",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.onMobileDateSelection(o,r.searchForm.controls.fromDate,r.searchForm.controls.toDate))}),e.qZA()()(),e.TgZ(4,"div",131)(5,"button",132),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onMobileDatePickerOK())}),e._uU(6,"X\xe1c nh\u1eadn"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("infiniteScrollDistance",2)("infiniteScrollThrottle",300)("infiniteScrollUpDistance",2)("scrollWindow",!1)("fromRoot",!0)("alwaysCallback",!0)("infiniteScrollContainer",".ngb-dp-content"),e.xp6(1),e.Q6J("displayMonths",t.numOfMonth)("displayMonthsOffset",t.displayMonthsOffset)("rangeSelection",!0)("fromDate",t.searchForm.controls.fromDate.value)("startDate",t.startDate)("toDate",t.searchForm.controls.toDate.value)}}function Pe(n,s){if(1&n&&(e.TgZ(0,"cf-radio",139)(1,"div",140),e._UZ(2,"img",141),e.TgZ(3,"div",142),e._uU(4),e.qZA()()()),2&n){const t=s.$implicit;e.Q6J("value",t.value),e.xp6(2),e.Q6J("src",t.logo,e.LSH),e.xp6(2),e.AsE(" ",t.name," (",t.value,") ")}}function Ue(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",133)(1,"div",119)(2,"div",134)(3,"cf-radio-group",135),e.YNc(4,Pe,5,4,"cf-radio",136),e.qZA()(),e.TgZ(5,"div",137)(6,"button",138),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.search())}),e._uU(7,"X\xe1c nh\u1eadn"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("formControl",t.searchForm.controls.airline),e.xp6(1),e.Q6J("ngForOf",t.airlineSelectOption)}}function qe(n,s){if(1&n&&(e.TgZ(0,"cf-radio",139),e._uU(1),e.qZA()),2&n){const t=s.$implicit;e.Q6J("value",t.value),e.xp6(1),e.hij(" ",t.name," ")}}function Je(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",133)(1,"div",119)(2,"div",134)(3,"cf-radio-group",135),e.YNc(4,qe,2,2,"cf-radio",136),e.qZA()(),e.TgZ(5,"div",137)(6,"button",138),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.search())}),e._uU(7,"X\xe1c nh\u1eadn"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("formControl",t.searchForm.controls.timeType),e.xp6(1),e.Q6J("ngForOf",t.timeSelectOption)}}function Oe(n,s){if(1&n&&(e.TgZ(0,"cf-radio",139),e._uU(1),e.qZA()),2&n){const t=s.$implicit;e.Q6J("value",t.value),e.xp6(1),e.hij(" ",t.name," ")}}function He(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",133)(1,"div",119)(2,"div",134)(3,"cf-radio-group",135),e.YNc(4,Oe,2,2,"cf-radio",136),e.qZA()(),e.TgZ(5,"div",137)(6,"button",138),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.search())}),e._uU(7,"X\xe1c nh\u1eadn"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("formControl",t.searchForm.controls.stateBooking),e.xp6(1),e.Q6J("ngForOf",t.stateBookingOption)}}function Qe(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",118)(1,"div",119)(2,"cf-input-group",120)(3,"label",123)(4,"span"),e._uU(5,"H\xe3ng bay"),e.qZA()(),e.TgZ(6,"input",143),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.tempFilterData.airline=o)}),e.qZA()(),e.TgZ(7,"cf-input-group",120)(8,"label",123)(9,"span"),e._uU(10,"PNR"),e.qZA()(),e.TgZ(11,"input",143),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.tempFilterData.pnr=o)}),e.qZA()(),e.TgZ(12,"cf-input-group",120)(13,"label",123)(14,"span"),e._uU(15,"Ng\xe0y bay"),e.qZA()(),e.TgZ(16,"input",143),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.tempFilterData.departDate=o)}),e.qZA()(),e.TgZ(17,"cf-input-group",120)(18,"label",123)(19,"span"),e._uU(20,"H\xe0nh kh\xe1ch"),e.qZA()(),e.TgZ(21,"input",143),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.tempFilterData.passenger=o)}),e.qZA()(),e.TgZ(22,"cf-input-group",120)(23,"label",123)(24,"span"),e._uU(25,"Tr\u1ea1ng th\xe1i"),e.qZA()(),e.TgZ(26,"input",143),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.tempFilterData.state=o)}),e.qZA()(),e.TgZ(27,"cf-input-group",120)(28,"label",123)(29,"span"),e._uU(30,"T\u1ed5ng gi\xe1"),e.qZA()(),e.TgZ(31,"input",143),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.tempFilterData.totalPrice=o)}),e.qZA()()(),e.TgZ(32,"div")(33,"button",125),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.mobileFilterOk())}),e._UZ(34,"cf-icon",126),e.TgZ(35,"div"),e._uU(36,"T\xecm ki\u1ebfm"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(6),e.Q6J("ngModel",t.filterData.airline),e.xp6(5),e.Q6J("ngModel",t.filterData.pnr),e.xp6(5),e.Q6J("ngModel",t.filterData.departDate),e.xp6(5),e.Q6J("ngModel",t.filterData.passenger),e.xp6(5),e.Q6J("ngModel",t.filterData.state),e.xp6(5),e.Q6J("ngModel",t.filterData.totalPrice)}}function je(n,s){1&n&&e._UZ(0,"cf-spinner")}const Le=function(){return{num:25}},Ye=function(){return{num:50}},Ve=function(){return{num:75}},Ke=function(){return{num:100}},ze=function(n,s,t,i){return[n,s,t,i]};let Ge=(()=>{class n{constructor(t,i,o,r,a,l,u,p,k){this._bookingManageService=o,this._excelService=r,this._flightDataService=a,this._route=l,this._bottomSheetService=u,this._mobileDetectService=p,this._permissionService=k,this.timeSelectOption=[],this.airlineSelectOption=[],this.stateBookingOption=[],this.pageSize=25,this.currentPage=1,this.listOfData=[],this.dataSource=[],this.TICKET_INFINITE_SCROLL_DEFAULT=10,this.TICKET_INFINITE_OFSET_INCREASE=10,this.ticketInfiniteScrollCount=this.TICKET_INFINITE_SCROLL_DEFAULT,this.dateRangeStr="",this.isLoading=!1,this.invalidTimeFilter=!1,this.filterData={airline:"",pnr:"",bookedDate:"",departDate:"",passenger:"",state:"",timeKeepHolding:"",user:"",agentName:"",totalPrice:""},this.tempFilterData={airline:"",pnr:"",bookedDate:"",departDate:"",passenger:"",state:"",timeKeepHolding:"",user:"",agentName:"",totalPrice:""},this.numberOfDateFilter=6,this.viewAllFlightBookingDetail=this._permissionService.hasPermission(H.or.ViewAllFlightBookingDetail),this.viewOwnFlightBookingDetail=this._permissionService.hasPermission(H.or.ViewOwnFlightBookingDetail),this.sortChange=(x,b)=>{let T=b.map(N=>N);for(let N=0;N<x.length;N++){const A=x[N];switch(A.key){case"airline":T=this.airlineSort(T,A);break;case"pnr":T=this.pnrSort(T,A);break;case"bookedDate":T=this.bookedTimeSort(T,A);break;case"departDate":T=this.deaprtDateSort(T,A);break;case"passenger":T=this.passengerSort(T,A);break;case"state":T=this.stateSort(T,A);break;case"user":T=this.userSort(T,A);break;case"totalPrice":T=this.totalPriceSort(T,A);break;case"timeKeepHolding":T=this.timeKeepHoldingSort(T,A);break;case"agentName":T=this.agentNameSort(T,A)}}return this.reloadScroll(),T},this.searchChange=(x,b)=>x?(this.reloadScroll(),b.filter(T=>{const N=this.removeAccents(T.passengerName.toLowerCase()),A=this.removeAccents(T.bookingCode.toLowerCase());return N.includes(x.toLocaleLowerCase())||A.includes(x.toLocaleLowerCase())})):b,this.increaseAlphabetSort=(x,b)=>x<b?-1:x>b?1:0,this.decreaseAlphabetSort=(x,b)=>x>b?-1:x<b?1:0,this.increaseNumberSort=(x,b)=>x-b,this.decreaseNumberSort=(x,b)=>b-x,this.increaseDateSort=(x,b)=>x.getTime()-b.getTime(),this.decreaseDateSort=(x,b)=>b.getTime()-x.getTime(),this.DEFAULT_NUM_OF_MONTH=4,this.INCREASE_OFFSET=4,this.numOfMonth=this.DEFAULT_NUM_OF_MONTH,this.displayMonthsOffset=0,t.registerIcons([_.wvd,_.esH,_.n78,_.PlV,_.iYu,_.LdZ,_.D7,_.xbi,_.fXw,_.poJ,_.iK7]);const y=sessionStorage.getItem("manageBookingFilter"),c=JSON.parse(y||"{}"),C=new Date;C.setDate(C.getDate()-this.numberOfDateFilter);const f=new Date,g=(0,h.p6)(C,"dd/MM/yyyy","vi-VN"),v=(0,h.p6)(f,"dd/MM/yyyy","vi-VN");this.dateRangeStr=g+" - "+v,this.searchForm=i.group({timeType:[c.timeType||"BOOKED_TIME",d.kI.required],fromDate:[C,d.kI.required],toDate:[f,d.kI.required],airline:[c.airline||""],searchText:[c.searchText||""],stateBooking:[c.stateBooking||""]}),this.search()}ngOnInit(){this.timeSelectOption=[{name:"Th\u1eddi gian \u0111\u1eb7t ch\u1ed7",value:"BOOKED_TIME"},{name:"Th\u1eddi gian bay",value:"DEPART_TIME"}],this.airlineSelectOption=[{name:"T\u1ea5t c\u1ea3 h\xe3ng bay",value:"",logo:this._flightDataService.getAirlineLogoByCode("")},{name:"Vietnam Airlines",value:"VN",logo:this._flightDataService.getAirlineLogoByCode("VN")},{name:"Bamboo Airways",value:"QH",logo:this._flightDataService.getAirlineLogoByCode("QH")},{name:"Vietjet Air",value:"VJ",logo:this._flightDataService.getAirlineLogoByCode("VJ")},{name:"Vietravel Airlines",value:"VU",logo:this._flightDataService.getAirlineLogoByCode("VU")}],this.stateBookingOption=[{name:"T\u1ea5t c\u1ea3 tr\u1ea1ng th\xe1i",value:""},{name:"\u0110\xe3 gi\u1eef ch\u1ed7",value:"BOOKED"},{name:"\u0110\xe3 xu\u1ea5t v\xe9",value:"ISSUED"},{name:"\u0110\xe3 h\u1ee7y",value:"CANCEL"},{name:"\u0110\xe3 void",value:"REFUND"},{name:"\u0110ang x\u1eed l\xed",value:"IN_PROGRESS"},{name:"\u0110\u1eb7t ch\u1ed7 l\u1ed7i",value:"INVALID"}]}fromDateChange(t){t&&(this.minToDate=new U.Ao(t.getFullYear(),t.getMonth()+1,t.getDate()))}resetRangeDate(t,i){t.setValue(""),i.setValue("")}onDateSelection(t,i,o,r){if(i.value||o.value)if(i.value&&!o.value&&t&&t.getTime()>=i.value.getTime()){o.setValue(t),r.close(),this.startDate=i.value;const a=(0,h.p6)(t,"dd/MM/yyyy","vi-VN");this.dateRangeStr+=a}else{o.setValue(null),i.setValue(t);const a=(0,h.p6)(t,"dd/MM/yyyy","vi-VN");this.dateRangeStr=a+" - "}else{i.setValue(t),o.setValue(null);const a=(0,h.p6)(t,"dd/MM/yyyy","vi-VN");this.dateRangeStr=a+" - "}this.invalidTimeFilter=i.invalid||o.invalid}search(){if(this._mobileDetectService.isMobile()&&this.btsSearchMobile&&this.btsSearchMobile.dismiss(),this.searchForm.valid){const t={airline:this.searchForm.controls.airline.value,bookedTime:"BOOKED_TIME"===this.searchForm.controls.timeType.value?1:0,bookingCodeOrPassName:this.searchForm.controls.searchText.value.trim().toUpperCase(),fromDateTime:(0,h.p6)(this.searchForm.controls.fromDate.value,"yyyy-MM-dd","vi-VN"),toDateTime:(0,h.p6)(this.searchForm.controls.toDate.value,"yyyy-MM-dd","vi-VN"),state:this.searchForm.controls.stateBooking.value};this.isLoading=!0,this._bookingManageService.getBookingTicket(t).pipe((0,Z.x)(()=>this.isLoading=!1)).subscribe({next:i=>{this.dataSource=i.data.sort((o,r)=>r.bookedTime-o.bookedTime).map(o=>({airline:o.airline||"",airlineName:o.airlineName||"",airlineLogo:this._flightDataService.getAirlineLogoByCode(o.airline)||"",airlineMobileLogo:this._flightDataService.getSmallAirlineLogoByCode(o.airline)||"",bookingCode:o.bookingCode||"",provider:o.provider||"",passengerName:o.passengerName||"",state:o.state||"",bookedTime:new Date(1e3*o.bookedTime),departureTime:o.departureTime||0,returnTime:o.returnTime?new Date(1e3*o.returnTime):void 0,userBooked:o.userBooked||"",total:o.total||0,timeKeepHolding:o.timeKeepHolding||0,agentName:o.agentName||""})),this.listOfData=this.dataSource.map(o=>o),this.reloadScroll()}}),sessionStorage.setItem("manageBookingFilter",JSON.stringify(this.searchForm.value))}this.searchForm.markAllAsTouched()}reloadScroll(){this.ticketInfiniteScrollCount=this.TICKET_INFINITE_SCROLL_DEFAULT}removeAccents(t){return t?t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\u0111/g,"d").replace(/\u0110/g,"D"):""}airlineSort(t,i){return t.sort("ascend"===i.sort?(o,r)=>this.increaseAlphabetSort(o.airline,r.airline):(o,r)=>this.decreaseAlphabetSort(o.airline,r.airline))}pnrSort(t,i){return t.sort("ascend"===i.sort?(o,r)=>this.increaseAlphabetSort(o.bookingCode,r.bookingCode):(o,r)=>this.decreaseAlphabetSort(o.bookingCode,r.bookingCode))}bookedTimeSort(t,i){return t.sort("ascend"===i.sort?(o,r)=>this.increaseDateSort(o.bookedTime,r.bookedTime):(o,r)=>this.decreaseDateSort(o.bookedTime,r.bookedTime))}deaprtDateSort(t,i){return t.sort("ascend"===i.sort?(o,r)=>o.departureTime-r.departureTime:(o,r)=>r.departureTime-o.departureTime)}passengerSort(t,i){return t.sort("ascend"===i.sort?(o,r)=>this.increaseAlphabetSort(o.passengerName,r.passengerName):(o,r)=>this.decreaseAlphabetSort(o.passengerName,r.passengerName))}stateSort(t,i){return t.sort("ascend"===i.sort?(o,r)=>this.increaseAlphabetSort(o.state,r.state):(o,r)=>this.decreaseAlphabetSort(o.state,r.state))}userSort(t,i){return t.sort("ascend"===i.sort?(o,r)=>this.increaseAlphabetSort(o.userBooked,r.userBooked):(o,r)=>this.decreaseAlphabetSort(o.userBooked,r.userBooked))}totalPriceSort(t,i){return t.sort("ascend"===i.sort?(o,r)=>this.increaseNumberSort(o.total,r.total):(o,r)=>this.decreaseNumberSort(o.total,r.total))}timeKeepHoldingSort(t,i){return t.sort("ascend"===i.sort?(o,r)=>this.increaseNumberSort(o.timeKeepHolding,r.timeKeepHolding):(o,r)=>this.decreaseNumberSort(o.timeKeepHolding,r.timeKeepHolding))}agentNameSort(t,i){return t.sort("ascend"===i.sort?(o,r)=>this.increaseAlphabetSort(o.agentName,r.agentName):(o,r)=>this.decreaseAlphabetSort(o.agentName,r.agentName))}checkChange(t){this.pageSize=parseInt(t)}exportExcel(t){const i="ve_"+(0,h.p6)(new Date,"yyyy-MM-dd","vi-VN");this._excelService.exportToExcel(t.map(o=>({airline:o.airline,bookingCode:o.bookingCode,bookedTime:(0,h.p6)(o.bookedTime,"dd/MM/yyyy HH:mm","vi-VN"),departureTime:o.returnTime?(0,h.p6)(1e3*o.departureTime,"dd/MM/yyyy HH:mm","vi-VN")+" - "+(0,h.p6)(o.returnTime,"dd/MM/yyyy HH:mm","vi-VN"):(0,h.p6)(1e3*o.departureTime,"dd/MM/yyyy HH:mm","vi-VN"),passengerName:o.passengerName,state:o.state,userBooked:o.userBooked,total:o.total})),["H\xe3ng bay","PNR","Ng\xe0y \u0111\u1eb7t","Ng\xe0y bay","H\xe0nh kh\xe1ch","Tr\u1ea1ng th\xe1i","Ng\u01b0\u1eddi \u0111\u1eb7t","T\u1ed5ng gi\xe1"],i,[{wch:10},{wch:10},{wch:20},{wch:25},{wch:25},{wch:10},{wch:20},{wch:20}])}gotoBookingDetail(t,i){(this.viewAllFlightBookingDetail||this.viewOwnFlightBookingDetail)&&this._route.navigate([`admin/booking-detail/${i}/${t}`])}ticketTrackByFn(t,i){return i.bookingCode}onScrollDown(){this.ticketInfiniteScrollCount+=this.TICKET_INFINITE_OFSET_INCREASE}mobileFilterOk(){this.filterData={airline:this.tempFilterData.airline,pnr:this.tempFilterData.pnr,bookedDate:this.tempFilterData.bookedDate,departDate:this.tempFilterData.departDate,passenger:this.tempFilterData.passenger,state:this.tempFilterData.state,timeKeepHolding:this.tempFilterData.timeKeepHolding,user:this.tempFilterData.user,agentName:this.tempFilterData.agentName,totalPrice:this.tempFilterData.totalPrice},this.filterChange(),this._bottomSheetService.dismiss()}filterChange(){this.listOfData=this.dataSource.filter(t=>{const i=this.removeAccents(this.filterData.airline.toLowerCase()),o=this.removeAccents(t.airline.toLowerCase()),r=this.removeAccents(t.provider.toLowerCase());if("gds".includes(i)){if(!r.includes(i))return!1}else if(!o.includes(i))return!1;const a=this.removeAccents(this.filterData.pnr.toLowerCase());if(!this.removeAccents(t.bookingCode.toLowerCase()).includes(a))return!1;const u=this.removeAccents(this.filterData.bookedDate.toLowerCase());if(!this.removeAccents((0,h.p6)(t.bookedTime,"dd/MM/yyyy HH:mm","vi-VN")).includes(u))return!1;const k=this.removeAccents(this.filterData.departDate.toLowerCase());if(!`${this.removeAccents((0,h.p6)(new Date(1e3*t.departureTime),"dd/MM/yyyy HH:mm","vi-VN"))} ${t.returnTime?this.removeAccents((0,h.p6)(t.returnTime,"dd/MM/yyyy HH:mm","vi-VN")):""}`.includes(k))return!1;const C=this.removeAccents(this.filterData.passenger.toLowerCase());if(!this.removeAccents(t.passengerName.toLowerCase()).includes(C))return!1;let g="";switch(t.state){case"ISSUED":g="\u0110\xe3 xu\u1ea5t v\xe9";break;case"BOOKED":g="\u0110\xe3 gi\u1eef ch\u1ed7";break;case"VOID":g="\u0110\xe3 void";break;case"CANCEL":g="\u0110\xe3 h\u1ee7y";break;case"ERROR":g="\u0110\u1eb7t ch\u1ed7 l\u1ed7i";break;case"IN_PROGRESS":g="\u0110ang x\u1eed l\xfd"}const v=this.removeAccents(this.filterData.state.toLowerCase());if(!this.removeAccents(g.toLowerCase()).includes(v))return!1;const b=this.removeAccents(this.filterData.timeKeepHolding.toLowerCase());if(!this.removeAccents((0,h.p6)(new Date(1e3*t.timeKeepHolding),"dd/MM/yyyy HH:mm","vi-VN")).includes(b))return!1;const N=this.removeAccents(this.filterData.user.toLowerCase());if(!this.removeAccents(t.userBooked.toLowerCase()).includes(N))return!1;const ei=this.removeAccents(this.filterData.agentName.toLowerCase());if(!this.removeAccents(t.agentName.toLowerCase()).includes(ei))return!1;const ti=this.removeAccents(this.filterData.totalPrice.toLowerCase());return!!this.removeAccents(t.total.toString().toLowerCase()).includes(ti)})}openSearchBts(t){this.btsSearchMobile=this._bottomSheetService.open(t,{headerTitle:"Danh s\xe1ch \u0111\u1eb7t ch\u1ed7",containerFullHeigh:!0,rightButtonIcon:"",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1}),this.btsSearchMobile.containerInstance._leftButtonClick.subscribe(()=>this.btsSearchMobile.dismiss())}openFilterBts(t){this.tempFilterData={airline:"",pnr:"",bookedDate:"",departDate:"",passenger:"",state:"",timeKeepHolding:"",user:"",agentName:"",totalPrice:""};const i=this._bottomSheetService.open(t,{headerTitle:"B\u1ed9 l\u1ecdc",containerFullHeigh:!0,rightButtonIcon:"",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});i.containerInstance._leftButtonClick.subscribe(()=>i.dismiss())}openAirlineBts(t){this.btsSearchMobile=this._bottomSheetService.open(t,{headerTitle:"H\xe3ng bay",rightButtonIcon:"close",leftButtonIcon:"",rightButtonIconClass:"text-neutral-gray-4",restoreFocus:!1}),this.btsSearchMobile.containerInstance._rightButtonClick.subscribe(()=>this.btsSearchMobile.dismiss())}openTimeTypeBts(t){this.btsSearchMobile=this._bottomSheetService.open(t,{headerTitle:"Lo\u1ea1i th\u1eddi gian",rightButtonIcon:"close",leftButtonIcon:"",rightButtonIconClass:"text-neutral-gray-4",restoreFocus:!1}),this.btsSearchMobile.containerInstance._rightButtonClick.subscribe(()=>this.btsSearchMobile.dismiss())}openStatusBts(t){this.btsSearchMobile=this._bottomSheetService.open(t,{headerTitle:"Tr\u1ea1ng th\xe1i",rightButtonIcon:"close",leftButtonIcon:"",rightButtonIconClass:"text-neutral-gray-4",restoreFocus:!1}),this.btsSearchMobile.containerInstance._rightButtonClick.subscribe(()=>this.btsSearchMobile.dismiss())}openTimeSelectBts(t,i=""){if(this._mobileDetectService.mobileSubject.value){const o=this._bottomSheetService.open(t,{headerTitle:"T\xf9y ch\u1ec9nh th\u1eddi gian",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",rightButtonIcon:"",containerFullHeigh:!0,restoreFocus:!1});o.afterDismissed().subscribe(r=>{this.displayMonthsOffset=0,this.numOfMonth=0,"TIME_ONLY"===i&&this.search()}),o.containerInstance._leftButtonClick.subscribe(r=>{o.dismiss()}),setTimeout(()=>{this.displayMonthsOffset=this.DEFAULT_NUM_OF_MONTH})}}scrollDown(){this.numOfMonth=this.numOfMonth+this.INCREASE_OFFSET}scrollUp(){this.displayMonthsOffset=this.displayMonthsOffset+this.INCREASE_OFFSET}onMobileDateSelection(t,i,o){if(i.value||o.value)if(i.value&&!o.value&&t&&t.getTime()>=i.value.getTime()){o.setValue(t),this.startDate=i.value;const r=(0,h.p6)(t,"dd/MM/yyyy","vi-VN");this.dateRangeStr+=r}else if(i.value&&o.value&&t&&t.getTime()>o.value.getTime()){o.setValue(null),i.setValue(t);const r=(0,h.p6)(t,"dd/MM/yyyy","vi-VN");this.dateRangeStr=r+" - "}else if(i.value&&o.value&&t&&t.getTime()<o.value.getTime()){i.setValue(t);const r=(0,h.p6)(t,"dd/MM/yyyy","vi-VN"),a=(0,h.p6)(o.value,"dd/MM/yyyy","vi-VN");this.dateRangeStr=r+" - "+a}else{i.setValue(t);const r=(0,h.p6)(t,"dd/MM/yyyy","vi-VN");this.dateRangeStr=r+" - "}else{i.setValue(t);const r=(0,h.p6)(t,"dd/MM/yyyy","vi-VN");this.dateRangeStr=r+" - "}}onMobileDatePickerOK(){this._bottomSheetService.dismiss()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(_.KNP),e.Y36(d.qu),e.Y36(z.fB),e.Y36(se.x),e.Y36(Q.G),e.Y36(q.F0),e.Y36(M.a2),e.Y36(te.L),e.Y36(H.$A))},n.\u0275cmp=e.Xpm({type:n,selectors:[["manage-booking-page"]],standalone:!0,features:[e.jDz],decls:152,vars:81,consts:[[1,"flex","flex-col","py-4","px-[30px]","bg-white","w-full","md:py-3","md:pl-4","md:pr-0"],[1,"text-heading-sm","text-neutral-gray-6","mb-3","hidden","md:block"],[1,"flex","gap-x-[17px]","md:flex-col"],[1,"flex","flex-col","grow","gap-y-4"],[1,"flex","w-full","justify-between","items-end","md:hidden"],["size","medium","textField","name","valueField","value",1,"grow-[180]","mr-4",3,"formControl","data","allowSearch"],["cfLabel",""],[1,"flex","mr-2"],[1,"grow",3,"status"],["cfHeadIcon","","icon","calendar","size","small"],["cf-input","","type","text","size","medium","placeholder","Ch\u1ecdn ng\xe0y kh\u1edfi h\xe0nh",1,"py-[7px]",3,"ngModel","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","name","valueField","value","size","medium",1,"grow-[180]","mr-4",3,"formControl","data","allowSearch"],["textField","name","valueField","value","size","medium",1,"grow-[180]",3,"formControl","data","allowSearch"],[1,"flex","justify-center","gap-x-2","items-center"],[1,"!w-full","md:mr-4","md:hidden"],["cfHeadIcon","","icon","search","size","small"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm trong danh s\xe1ch k\u1ebft qu\u1ea3...",3,"formControl","keydown.enter"],["tableSearchInput",""],[1,"hidden","!w-full","md:mr-4","md:block"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm trong danh s\xe1ch k\u1ebft qu\u1ea3...",3,"formControl","focus"],[1,"gap-x-2","hidden","md:flex","overflow-x-auto","mt-3","pr-4"],[1,"gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]","hidden","md:flex",3,"click"],[1,"text-body-md","whitespace-nowrap"],["icon","filter_alt","size","small",1,"text-neutral-gray-5"],["class","text-body-md whitespace-nowrap",4,"ngIf"],["icon","chevron_down","size","small",1,"text-neutral-gray-5"],[1,"flex","flex-col","justify-end","w-[168px]","shrink-0","md:hidden"],["cf-button","","type","secondary","size","medium",1,"justify-center",3,"disabled","click"],["cfHeadIcon","","icon","search","size","small",1,"mr-2"],[1,"flex","justify-start","mt-4","md:justify-between","md:mr-4"],["size","medium"],[1,"md:flex","hidden","gap-x-1.5",3,"click"],["icon","export","size","small"],[1,"text-body-md"],[1,"py-4","px-[30px]","rounded-lg","md:hidden"],[1,"bg-neutral-white","rounded-lg","shadow-cf-md"],[1,"p-4","flex","justify-between","items-center"],[1,"text-heading-sm"],["cf-button","","type","secondary",3,"click"],["icon","export","size","small",1,"mr-2"],[1,"",3,"fnSort","fnSearch","pageSizeList","listData","pageSize"],["managerTable",""],["cf-thead",""],["cf-th","",1,"whitespace-nowrap",3,"sortName"],["cf-th","",3,"sticky"],["cf-td","",1,"py-2","px-1","!bg-neutral-white"],[1,"grow","!w-auto"],["type","text","size","medium","cf-input","","placeholder","L\u1ecdc",3,"ngModel","ngModelChange","input"],["cf-td","",1,"py-2","px-1","!bg-neutral-white",3,"sticky"],["cf-td","",3,"sticky",4,"ngIf"],["ngFor","",3,"ngForOf"],[1,"hidden","md:flex","p-4","flex-col"],[1,"w-full","flex","items-center","justify-between"],[1,"text-body-md","text-neutral-gray-6"],[1,"flex","gap-x-1.5","text-neutral-gray-6","items-center"],["infinite-scroll","",3,"infiniteScrollDistance","infiniteScrollThrottle","infiniteScrollContainer","scrollWindow","fromRoot","alwaysCallback","scrolled"],[4,"ngFor","ngForOf","ngForTrackBy"],["searchBts",""],["timeDatepickerBottomSheet",""],["airlineBts",""],["timeTypeBts",""],["statusBts",""],["filterBts",""],[4,"ngIf"],["cfHint","",3,"hint"],["cf-td","",3,"sticky"],[1,"border-b","border-neutral-gray-1"],[1,"py-2","px-3"],[1,"w-12","h-6","object-contain",3,"src"],[1,"py-2","px-3","text-body-sm"],[1,"w-[120px]"],["class","py-2 px-3 text-body-sm",4,"ngIf"],["class","py-2 px-3 text-body-sm whitespace-nowrap",4,"ngIf"],[1,"py-2","px-3","text-body-sm","whitespace-nowrap"],[1,"w-[120px]",3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"py-2","px-3","text-body-sm","whitespace-nowrap","text-right"],["cf-td","","class","py-2 px-3",3,"sticky",4,"ngIf"],[1,"whitespace-nowrap"],["type","inverted",1,"whitespace-nowrap",3,"color"],["icon","document","size","small",1,"mr-2.5"],["type","inverted",3,"color"],["icon","error","size","small",1,"mr-2.5"],["cf-td","",1,"py-2","px-3",3,"sticky"],["class","text-espressive-sm text-secondary-3-4 cursor-pointer whitespace-nowrap",3,"click",4,"ngIf"],[1,"text-espressive-sm","text-secondary-3-4","cursor-pointer","whitespace-nowrap",3,"click"],["class","flex flex-col rounded-lg bg-white p-3 mt-3 gap-y-2 shadow-cf-sm",3,"click",4,"ngIf"],[1,"flex","flex-col","rounded-lg","bg-white","p-3","mt-3","gap-y-2","shadow-cf-sm",3,"click"],[1,"flex","justify-between","items-center"],[1,"w-9","h-9","object-contain",3,"src"],[3,"ngSwitch"],[1,"flex","justify-start","items-center"],[1,"text-body-sm","text-neutral-gray-4","w-[104px]"],[1,"text-express-md","text-neutral-gray-6"],["class","flex justify-start items-center",4,"ngIf"],[1,"flex","p-2","justify-between","rounded","bg-neutral-gray-1"],[1,"flex","flex-col","gap-y-2","w-[70px]"],[1,"text-body-sm","text-neutral-gray-4"],[1,"text-express-sm","text-neutral-gray-6"],[1,"py-1","px-2","rounded","flex","gap-x-1","bg-secondary-5-1","w-fit"],["icon","document",1,"text-secondary-5-4"],[1,"text-espressive-sm","text-secondary-5-4"],[1,"py-1","px-2","rounded","flex","gap-x-1","bg-secondary-7-1","w-fit"],["icon","document",1,"text-secondary-7-4"],[1,"text-espressive-sm","text-secondary-7-4"],[1,"py-1","px-2","rounded","flex","gap-x-1","bg-[#ffeceb]","w-fit"],["icon","document",1,"text-secondary-6-4"],[1,"text-espressive-sm","text-primary-1-4"],[1,"py-1","px-2","rounded","flex","gap-x-1","bg-neutral-gray-1","w-fit"],["icon","coupon_slash",1,"text-neutral-black"],[1,"text-espressive-sm","text-neutral-black"],["icon","error",1,"text-secondary-6-4"],[1,"text-espressive-sm","text-secondary-6-4"],[1,"p-4","w-full","flex","flex-col","justify-between"],[1,"flex","flex-col","gap-y-4"],[1,"!w-full"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm trong danh s\xe1ch k\u1ebft qu\u1ea3",3,"formControl"],["textField","name","valueField","value","size","medium","placeholder","Ch\u1ecdn tr\u1ea1ng th\xe1i",1,"!max-w-none","w-full",3,"status","data","allowSearch","formControl"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5"],[1,"!w-full",3,"status"],["cf-button","",1,"w-full","justify-center","gap-x-2",3,"click"],["icon","search","size","small"],[1,"flex","w-full","h-full","flex-col","justify-between"],[1,"grow","overflow-y-hidden","flex","pb-12"],["infinite-scroll","",1,"w-full","flex",3,"infiniteScrollDistance","infiniteScrollThrottle","infiniteScrollUpDistance","scrollWindow","fromRoot","alwaysCallback","infiniteScrollContainer","scrolled","scrolledUp"],["outsideDays","hidden","navigation","none","direction","vertical",1,"",3,"displayMonths","displayMonthsOffset","rangeSelection","fromDate","startDate","toDate","dateSelect"],[1,"p-4","fixed","bottom-0","w-full","right-0","bg-neutral-white"],["cf-button","",1,"justify-center","w-full",3,"click"],[1,"p-4","shadow-cf-lg","w-[280px]","bg-neutral-white","rounded","md:w-full"],[1,"flex","flex-col","gap-y-[9px]","md:gap-y-4"],[1,"flex","flex-col","gap-x-8","gap-y-4",3,"formControl"],["size","medium",3,"value",4,"ngFor","ngForOf"],[1,"hidden","md:block"],["cf-button","",1,"w-full","justify-center",3,"click"],["size","medium",3,"value"],[1,"flex","items-center","gap-x-2"],[1,"w-6","h-6","object-contain",3,"src"],[1,"text-body-md-long"],["size","medium","cf-input","","placeholder","Nh\u1eadp h\xe3ng bay",3,"ngModel","ngModelChange"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1),e._uU(2,"Qu\u1ea3n l\xfd danh s\xe1ch \u0111\u1eb7t ch\u1ed7"),e.qZA(),e.TgZ(3,"div",2)(4,"div",3)(5,"div",4)(6,"cf-select",5)(7,"label",6),e._uU(8,"L\u1ecdc theo"),e.qZA()(),e.TgZ(9,"div",7)(10,"cf-input-group",8),e._UZ(11,"cf-icon",9),e.TgZ(12,"label",6),e._uU(13,"Th\u1eddi gian"),e.qZA(),e.TgZ(14,"input",10),e.NdJ("click",function(){e.CHM(o);const a=e.MAs(18);return e.KtG(a.open())})("ngModelChange",function(a){return i.dateRangeStr=a}),e.qZA(),e.TgZ(15,"div",11),e.YNc(16,le,1,1,"cf-input-hint",12),e.qZA()(),e.TgZ(17,"input",13,14),e.NdJ("dateSelect",function(a){e.CHM(o);const l=e.MAs(18);return e.KtG(i.onDateSelection(a,i.searchForm.controls.fromDate,i.searchForm.controls.toDate,l))}),e.qZA()(),e.TgZ(19,"cf-select",15)(20,"label",6),e._uU(21,"H\xe3ng bay"),e.qZA()(),e.TgZ(22,"cf-select",16)(23,"label",6),e._uU(24,"Tr\u1ea1ng th\xe1i"),e.qZA()()(),e.TgZ(25,"div",17)(26,"cf-input-group",18),e._UZ(27,"cf-icon",19),e.TgZ(28,"input",20,21),e.NdJ("keydown.enter",function(){return i.search()}),e.qZA()(),e.TgZ(30,"cf-input-group",22),e._UZ(31,"cf-icon",19),e.TgZ(32,"input",23,21),e.NdJ("focus",function(){e.CHM(o);const a=e.MAs(140);return e.KtG(i.openSearchBts(a))}),e.qZA()()()(),e.TgZ(34,"div",24)(35,"div",25),e.NdJ("click",function(){e.CHM(o);const a=e.MAs(150);return e.KtG(i.openFilterBts(a))}),e.TgZ(36,"div",26),e._uU(37,"B\u1ed9 l\u1ecdc"),e.qZA(),e._UZ(38,"cf-icon",27),e.qZA(),e.TgZ(39,"div",25),e.NdJ("click",function(){e.CHM(o);const a=e.MAs(146);return e.KtG(i.openTimeTypeBts(a))}),e.YNc(40,ce,2,0,"div",28),e.YNc(41,ue,2,0,"div",28),e._UZ(42,"cf-icon",29),e.qZA(),e.TgZ(43,"div",25),e.NdJ("click",function(){e.CHM(o);const a=e.MAs(142);return e.KtG(i.openTimeSelectBts(a,"TIME_ONLY"))}),e.TgZ(44,"div",26),e._uU(45,"Th\u1eddi gian"),e.qZA(),e._UZ(46,"cf-icon",29),e.qZA(),e.TgZ(47,"div",25),e.NdJ("click",function(){e.CHM(o);const a=e.MAs(144);return e.KtG(i.openAirlineBts(a))}),e.TgZ(48,"div",26),e._uU(49,"H\xe3ng bay"),e.qZA(),e._UZ(50,"cf-icon",29),e.qZA(),e.TgZ(51,"div",25),e.NdJ("click",function(){e.CHM(o);const a=e.MAs(148);return e.KtG(i.openStatusBts(a))}),e.TgZ(52,"div",26),e._uU(53,"Tr\u1ea1ng th\xe1i"),e.qZA(),e._UZ(54,"cf-icon",29),e.qZA()(),e.TgZ(55,"div",30)(56,"button",31),e.NdJ("click",function(){return i.search()}),e._UZ(57,"cf-icon",32),e._uU(58," T\xecm ki\u1ebfm "),e.qZA()()(),e.TgZ(59,"div",33)(60,"cf-checkbox",34),e._uU(61,"\u1ea8n PNR h\u1ebft h\u1ea1n gi\u1eef ch\u1ed7"),e.qZA(),e.TgZ(62,"div",35),e.NdJ("click",function(){e.CHM(o);const a=e.MAs(75);return e.KtG(i.exportExcel(a.data))}),e._UZ(63,"cf-icon",36),e.TgZ(64,"div",37),e._uU(65,"Xu\u1ea5t excel"),e.qZA()()()(),e.TgZ(66,"div",38)(67,"div",39)(68,"div",40)(69,"div",41),e._uU(70,"Qu\u1ea3n l\xfd danh s\xe1ch \u0111\u1eb7t ch\u1ed7"),e.qZA(),e.TgZ(71,"button",42),e.NdJ("click",function(){e.CHM(o);const a=e.MAs(75);return e.KtG(i.exportExcel(a.data))}),e._UZ(72,"cf-icon",43),e._uU(73," Xu\u1ea5t excel "),e.qZA()(),e.TgZ(74,"cf-table",44,45)(76,"thead",46)(77,"th",47),e._uU(78,"H\xe3ng bay"),e.qZA(),e.TgZ(79,"th",47),e._uU(80,"PNR"),e.qZA(),e.TgZ(81,"th",47),e._uU(82,"Ng\xe0y \u0111\u1eb7t"),e.qZA(),e.TgZ(83,"th",47),e._uU(84,"Ng\xe0y bay"),e.qZA(),e.TgZ(85,"th",47),e._uU(86,"H\xe0nh kh\xe1ch"),e.qZA(),e.TgZ(87,"th",47),e._uU(88,"Tr\u1ea1ng th\xe1i"),e.qZA(),e.TgZ(89,"th",47),e._uU(90,"H\u1ea1n gi\u1eef ch\u1ed7"),e.qZA(),e.TgZ(91,"th",47),e._uU(92,"Ng\u01b0\u1eddi \u0111\u1eb7t"),e.qZA(),e.TgZ(93,"th",47),e._uU(94,"Thu\u1ed9c \u0111\u1ea1i l\xfd"),e.qZA(),e.TgZ(95,"th",47),e._uU(96,"T\u1ed5ng gi\xe1"),e.qZA(),e._UZ(97,"th",48),e.qZA(),e.TgZ(98,"tbody")(99,"tr")(100,"td",49)(101,"cf-input-group",50)(102,"input",51),e.NdJ("ngModelChange",function(a){return i.filterData.airline=a})("input",function(){return i.filterChange()}),e.qZA()()(),e.TgZ(103,"td",52)(104,"cf-input-group",50)(105,"input",51),e.NdJ("ngModelChange",function(a){return i.filterData.pnr=a})("input",function(){return i.filterChange()}),e.qZA()()(),e.TgZ(106,"td",52)(107,"cf-input-group",50)(108,"input",51),e.NdJ("ngModelChange",function(a){return i.filterData.bookedDate=a})("input",function(){return i.filterChange()}),e.qZA()()(),e.TgZ(109,"td",52)(110,"cf-input-group",50)(111,"input",51),e.NdJ("ngModelChange",function(a){return i.filterData.departDate=a})("input",function(){return i.filterChange()}),e.qZA()()(),e.TgZ(112,"td",52)(113,"cf-input-group",50)(114,"input",51),e.NdJ("ngModelChange",function(a){return i.filterData.passenger=a})("input",function(){return i.filterChange()}),e.qZA()()(),e.TgZ(115,"td",52)(116,"cf-input-group",50)(117,"input",51),e.NdJ("ngModelChange",function(a){return i.filterData.state=a})("input",function(){return i.filterChange()}),e.qZA()()(),e.TgZ(118,"td",52)(119,"cf-input-group",50)(120,"input",51),e.NdJ("ngModelChange",function(a){return i.filterData.timeKeepHolding=a})("input",function(){return i.filterChange()}),e.qZA()()(),e.TgZ(121,"td",52)(122,"cf-input-group",50)(123,"input",51),e.NdJ("ngModelChange",function(a){return i.filterData.user=a})("input",function(){return i.filterChange()}),e.qZA()()(),e.TgZ(124,"td",52)(125,"cf-input-group",50)(126,"input",51),e.NdJ("ngModelChange",function(a){return i.filterData.agentName=a})("input",function(){return i.filterChange()}),e.qZA()()(),e.TgZ(127,"td",52)(128,"cf-input-group",50)(129,"input",51),e.NdJ("ngModelChange",function(a){return i.filterData.totalPrice=a})("input",function(){return i.filterChange()}),e.qZA()()(),e.YNc(130,ge,1,1,"td",53),e.qZA(),e.YNc(131,Te,34,29,"ng-template",54),e.qZA()()()(),e.TgZ(132,"div",55)(133,"div",56)(134,"div",57),e._uU(135),e.qZA(),e._UZ(136,"div",58),e.qZA(),e.TgZ(137,"div",59),e.NdJ("scrolled",function(){return i.onScrollDown()}),e.YNc(138,Ne,2,1,"ng-container",60),e.qZA()(),e.YNc(139,Fe,30,16,"ng-template",null,61,e.W1O),e.YNc(141,we,7,13,"ng-template",null,62,e.W1O),e.YNc(143,Ue,8,2,"ng-template",null,63,e.W1O),e.YNc(145,Je,8,2,"ng-template",null,64,e.W1O),e.YNc(147,He,8,2,"ng-template",null,65,e.W1O),e.YNc(149,Qe,37,6,"ng-template",null,66,e.W1O),e.YNc(151,je,1,0,"cf-spinner",67)}if(2&t){const o=e.MAs(75);e.xp6(6),e.Q6J("formControl",i.searchForm.controls.timeType)("data",i.timeSelectOption)("allowSearch",!1),e.xp6(4),e.Q6J("status",i.invalidTimeFilter?"error":"default"),e.xp6(4),e.Q6J("ngModel",i.dateRangeStr),e.xp6(2),e.Q6J("ngIf",i.invalidTimeFilter),e.xp6(1),e.Q6J("secondaryCalendar","lunar")("displayMonths",2)("rangeSelection",!0)("containerWidth",600)("startDate",i.startDate)("canReset",!1)("fromDate",i.searchForm.controls.fromDate.value)("toDate",i.searchForm.controls.toDate.value),e.xp6(2),e.Q6J("formControl",i.searchForm.controls.airline)("data",i.airlineSelectOption)("allowSearch",!1),e.xp6(3),e.Q6J("formControl",i.searchForm.controls.stateBooking)("data",i.stateBookingOption)("allowSearch",!1),e.xp6(6),e.Q6J("formControl",i.searchForm.controls.searchText),e.xp6(4),e.Q6J("formControl",i.searchForm.controls.searchText),e.xp6(8),e.Q6J("ngIf","BOOKED_TIME"===i.searchForm.controls.timeType.value),e.xp6(1),e.Q6J("ngIf","DEPART_TIME"===i.searchForm.controls.timeType.value),e.xp6(15),e.Q6J("disabled",i.invalidTimeFilter),e.xp6(18),e.Q6J("fnSort",i.sortChange)("fnSearch",i.searchChange)("pageSizeList",e.l5B(76,ze,e.DdM(72,Le),e.DdM(73,Ye),e.DdM(74,Ve),e.DdM(75,Ke)))("listData",i.listOfData)("pageSize",i.pageSize),e.xp6(3),e.Q6J("sortName","airline"),e.xp6(2),e.Q6J("sortName","pnr"),e.xp6(2),e.Q6J("sortName","bookedDate"),e.xp6(2),e.Q6J("sortName","departDate"),e.xp6(2),e.Q6J("sortName","passenger"),e.xp6(2),e.Q6J("sortName","state"),e.xp6(2),e.Q6J("sortName","timeKeepHolding"),e.xp6(2),e.Q6J("sortName","user"),e.xp6(2),e.Q6J("sortName","agentName"),e.xp6(2),e.Q6J("sortName","totalPrice"),e.xp6(2),e.Q6J("sticky","right"),e.xp6(5),e.Q6J("ngModel",i.filterData.airline),e.xp6(1),e.Q6J("sticky","left"),e.xp6(2),e.Q6J("ngModel",i.filterData.pnr),e.xp6(1),e.Q6J("sticky","left"),e.xp6(2),e.Q6J("ngModel",i.filterData.bookedDate),e.xp6(1),e.Q6J("sticky","left"),e.xp6(2),e.Q6J("ngModel",i.filterData.departDate),e.xp6(1),e.Q6J("sticky","left"),e.xp6(2),e.Q6J("ngModel",i.filterData.passenger),e.xp6(1),e.Q6J("sticky","left"),e.xp6(2),e.Q6J("ngModel",i.filterData.state),e.xp6(1),e.Q6J("sticky","left"),e.xp6(2),e.Q6J("ngModel",i.filterData.timeKeepHolding),e.xp6(1),e.Q6J("sticky","left"),e.xp6(2),e.Q6J("ngModel",i.filterData.user),e.xp6(1),e.Q6J("sticky","left"),e.xp6(2),e.Q6J("ngModel",i.filterData.agentName),e.xp6(1),e.Q6J("sticky","left"),e.xp6(2),e.Q6J("ngModel",i.filterData.totalPrice),e.xp6(1),e.Q6J("ngIf",i.viewAllFlightBookingDetail||i.viewOwnFlightBookingDetail),e.xp6(1),e.Q6J("ngForOf",o.partOfdata),e.xp6(4),e.hij("",i.listOfData.length," k\u1ebft qu\u1ea3"),e.xp6(2),e.Q6J("infiniteScrollDistance",1)("infiniteScrollThrottle",300)("infiniteScrollContainer",".main-scroll-bar")("scrollWindow",!1)("fromRoot",!0)("alwaysCallback",!0),e.xp6(1),e.Q6J("ngForOf",i.listOfData)("ngForTrackBy",i.ticketTrackByFn),e.xp6(13),e.Q6J("ngIf",i.isLoading)}},dependencies:[K.q,d.u5,d.Fj,d.JJ,d.On,d.UX,d.oH,E.j$,E.ND,E.BN,E.v2,h.ez,h.sg,h.O5,h.RF,h.n9,h.ED,h.JJ,h.uU,_.AxE,_.Sm8,U.Cs,B.N8,B.Xq,O.rC,O.E_,O.qS,O.zs,w.u,ee.Rq,ee.Ry,V.b,ae,D.OR,M.DW,U._o,I.T,I.o],encapsulation:2}),n})();var G=m(72853),ie=m(45881),S=m(90837),j=m(76978),L=m(88001),J=m(15439),F=m(17414),ne=m(90602),$=m(97579),oe=m(2225),X=m(40105),Y=m(62331),$e=m(78533);const re=function(n){return{"opacity-50 pointer-events-none cursor-default":n}};function Xe(n,s){if(1&n&&e._UZ(0,"cf-select",29),2&n){const t=e.oxw();e.Q6J("formControl",t.searchForm.controls.supplier)("data",t.supplierSelectOption)("allowSearch",!1)("ngClass",e.VKq(4,re,t.isDisableSupplier))}}function We(n,s){1&n&&e._UZ(0,"cf-hint",30),2&n&&e.Q6J("hint","Ch\u01b0a nh\u1eadp booking code")}function Re(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",31),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(),r=e.MAs(30);return e.KtG(o.openSupplierBts(r))}),e.TgZ(1,"div",17),e._uU(2,"Ch\u1ecdn nh\xe0 cung c\u1ea5p"),e.qZA(),e._UZ(3,"cf-icon",18),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,re,t.isDisableSupplier))}}function et(n,s){if(1&n&&(e.TgZ(0,"cf-radio",38),e._uU(1),e.qZA()),2&n){const t=s.$implicit;e.Q6J("value",t.value),e.xp6(1),e.Oqu(t.name)}}function tt(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",32)(1,"div",33)(2,"cf-radio-group",34),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.mobileAirlineChange(o))}),e.YNc(3,et,2,2,"cf-radio",35),e.qZA()(),e.TgZ(4,"div",36)(5,"button",37),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.airlineOptionChange())}),e._uU(6,"X\xe1c nh\u1eadn"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngModel",t.searchForm.controls.airline.value),e.xp6(1),e.Q6J("ngForOf",t.airlineSelectOption)}}function it(n,s){if(1&n&&(e.TgZ(0,"cf-radio",38),e._uU(1),e.qZA()),2&n){const t=s.$implicit;e.Q6J("value",t.value),e.xp6(1),e.Oqu(t.name)}}function nt(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",32)(1,"div",33)(2,"cf-radio-group",34),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.mobileSupplierChange(o))}),e.YNc(3,it,2,2,"cf-radio",35),e.qZA()(),e.TgZ(4,"div",36)(5,"button",37),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.airlineOptionChange())}),e._uU(6,"X\xe1c nh\u1eadn"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngModel",t.searchForm.controls.supplier.value),e.xp6(1),e.Q6J("ngForOf",t.supplierSelectOption)}}function ot(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",39)(1,"div",40)(2,"cf-input-group",20),e._UZ(3,"cf-icon",7)(4,"input",41),e.qZA(),e.TgZ(5,"cf-select",42),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.mobileAirlineChange(o))}),e.TgZ(6,"label",43),e._uU(7,"H\xe3ng bay"),e.qZA()()(),e.TgZ(8,"div")(9,"button",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onMobileSearch())}),e._UZ(10,"cf-icon",45),e.TgZ(11,"div"),e._uU(12,"T\xecm ki\u1ebfm"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(4),e.Q6J("formControl",t.searchForm.controls.searchText),e.xp6(1),e.Q6J("ngModel",t.searchForm.controls.airline.value)("data",t.airlineSelectOption)("allowSearch",!1)}}function rt(n,s){1&n&&(e.TgZ(0,"div",46)(1,"div",47)(2,"div",48)(3,"div",49)(4,"div",50),e._UZ(5,"img",51),e.qZA(),e.TgZ(6,"div",52),e._uU(7," Nh\u1eadp m\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\u1ec3 xu\u1ea5t v\xe9 "),e.qZA(),e.TgZ(8,"div",53),e._uU(9," Vui l\xf2ng nh\u1eadp m\xe3 \u0111\u1eb7t ch\u1ed7 c\u1ee7a b\u1ea1n v\xe0o \xf4 b\xean tr\xean v\xe0 ch\u1ecdn n\xfat "),e.TgZ(10,"span",54),e._uU(11,"T\xecm ki\u1ebfm"),e.qZA(),e._uU(12," \u0111\u1ec3 b\u1eaft \u0111\u1ea7u "),e.qZA()()()()())}function at(n,s){1&n&&(e.ynx(0),e.TgZ(1,"div",52),e._uU(2," Kh\xf4ng c\xf3 k\u1ebft qu\u1ea3 "),e.qZA(),e.TgZ(3,"div",56)(4,"div"),e._uU(5,"Kh\xf4ng c\xf3 k\u1ebft qu\u1ea3 \u0111\u1ec3 hi\u1ec3n th\u1ecb"),e.qZA(),e.TgZ(6,"div"),e._uU(7,"Vui l\xf2ng th\u1eed l\u1ea1i sau ho\u1eb7c ki\u1ec3m tra l\u1ea1i th\xf4ng tin m\xe3 \u0111\u1eb7t ch\u1ed7!"),e.qZA()(),e.BQk())}function st(n,s){1&n&&(e.ynx(0),e.TgZ(1,"div",52),e._uU(2," M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 b\u1ecb h\u1ee7y "),e.qZA(),e.TgZ(3,"div",57)(4,"div"),e._uU(5,"M\xe3 \u0111\u1eb7t ch\u1ed7 n\xe0y \u0111\xe3 b\u1ecb h\u1ee7y, kh\xf4ng th\u1ec3 ti\u1ebfp t\u1ee5c xu\u1ea5t v\xe9. Vui l\xf2ng xu\u1ea5t cho m\xe3 \u0111\u1eb7t ch\u1ed7 kh\xe1c!"),e.qZA()(),e.BQk())}function lt(n,s){1&n&&(e.ynx(0),e.TgZ(1,"div",52),e._uU(2," M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 xu\u1ea5t "),e.qZA(),e.TgZ(3,"div",57)(4,"div"),e._uU(5,"M\xe3 \u0111\u1eb7t ch\u1ed7 n\xe0y \u0111\xe3 xu\u1ea5t v\xe9, kh\xf4ng th\u1ec3 ti\u1ebfp t\u1ee5c xu\u1ea5t v\xe9. Vui l\xf2ng xu\u1ea5t cho m\xe3 \u0111\u1eb7t ch\u1ed7 kh\xe1c!"),e.qZA()(),e.BQk())}function ct(n,s){if(1&n&&(e.TgZ(0,"div",46)(1,"div",47)(2,"div",48)(3,"div",49)(4,"div",50),e._UZ(5,"img",55),e.qZA(),e.YNc(6,at,8,0,"ng-container",28),e.YNc(7,st,6,0,"ng-container",28),e.YNc(8,lt,6,0,"ng-container",28),e.qZA()()()()),2&n){const t=e.oxw();e.xp6(6),e.Q6J("ngIf","not_found"===t.stateMode),e.xp6(1),e.Q6J("ngIf","cancelled"===t.stateMode),e.xp6(1),e.Q6J("ngIf","issued"===t.stateMode)}}function ut(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",58)(1,"issue-booking-detail",59),e.NdJ("issueBooking",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onIssue())})("gotoBooking",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onGotoBooking())})("selectedAgent",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.onSelectedAgent(o))}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("optionAgent",t.optionAgent)("isLoading",t.isLoading)("bookingDetail",t.bookingDetail)("priceDetail",t.priceDetail)("hasDiscountFare",t.hasDiscountFare)}}function gt(n,s){1&n&&(e.TgZ(0,"div",60)(1,"div",61),e._UZ(2,"ticket-item-skeleton",62)(3,"ticket-item-skeleton",62)(4,"ticket-item-skeleton",62)(5,"ticket-item-skeleton",62),e.qZA()())}function dt(n,s){1&n&&(e.TgZ(0,"div"),e._UZ(1,"cf-spinner"),e.qZA())}let pt=(()=>{class n{constructor(t,i,o,r,a,l,u,p,k,y,c,C,f,g,v){this._router=o,this._bookingDetailService=r,this._manageBookingService=a,this._modal=l,this._flightDataService=u,this._route=p,this._userService=k,this._searchFlightService=y,this._toastService=c,this._bottomSheetService=C,this._mobileDetectService=f,this._permissionService=g,this._sockerService=v,this.airlineSelectOption=[],this.supplierSelectOption=[],this.stateMode="search_default",this.isLoading=!1,this.isLoadingIssue=!1,this.optionAgent=[],this.isShowSupplier=this._permissionService.isAgent1()||this._permissionService.isBooker(),this.isDisableSupplier=!1,this.hasDiscountFare=!1,t.registerIcons([_.esH,_.n78]),this.searchForm=i.group({airline:["all",d.kI.required],supplier:[""],searchText:["",d.kI.required]})}ngOnInit(){this.airlineSelectOption=[{name:"T\u1ef1 \u0111\u1ed9ng",value:"all"},{name:"Vietnam Airlines",value:"VN"},{name:"Bamboo Airways",value:"QH"},{name:"Vietjet Air",value:"VJ"},{name:"Vietravel Airlines",value:"VU"},{name:"1A",value:"BSP"},{name:"1G",value:"AIR_1G"}],this.supplierSelectOption=[{name:"T\u1ef1 \u0111\u1ed9ng",value:""},...Object.entries(L.f$).map(([t,i])=>({name:t,value:i}))]}handleSocketTimoutEvent(){const i=this._permissionService.getCurrentUser().userId;this._sockerService.timeoutEvent$.subscribe({next:o=>{if(this.refTimoutModal&&this.refTimoutModal.close(),this.refTimoutBts&&this.refTimoutBts.dismiss(),o.receiverId===i){const r=`/admin/booking-detail/${o.airline}/${o.pnr}`;this._toastService.add({severity:"success",summary:"Xu\u1ea5t v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c xu\u1ea5t v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([r])}}})}getAllAgentUser(){this._userService.getAutocompleteUser().subscribe({next:t=>{t.success&&(this.optionAgent=t.data.map(i=>({id:i.id,name:`${i.username} - ${i.name}`})))}})}onAirlineChange(t){this.checkDisableSupplier(t.value)}onSearch(){var t;if(this.searchForm.invalid)return;this.isLoading=!0;const o={provider:"all"===this.searchForm.controls.airline.value?"":this.searchForm.controls.airline.value,bookingCode:this.searchForm.value.searchText.trim().toUpperCase(),globalSearch:!1,supplier:(null===(t=this.searchForm.controls.supplier)||void 0===t?void 0:t.value)||null};this._searchFlightService.searchByPNR(o).pipe((0,Z.x)(()=>this.isLoading=!1)).subscribe({next:r=>{r.success&&r.data&&("VN"===r.data.airline&&"CANCEL"!==r.data.state||"BOOKED"===r.data.state)?(this.bookingCodeStatus=r.data.state,this.internal=r.data.internal,this.stateMode="has_value",this.bookingCode=r.data.bookingCode,this.airline=r.data.airline,this.discountPercentage=r.data.discountPercentage,this.hasDiscountFare=!!this.discountPercentage,this.initBookingDetail(r.data),this.initPriceDetail(r.data),this.bookingDetail.internal||this.getAllAgentUser()):this.stateMode=r.success&&r.data&&("CANCEL"===r.data.state||"VOID"===r.data.state)?"cancelled":r.success&&r.data&&"ISSUED"===r.data.state?"issued":"not_found"},error:()=>{this.stateMode="not_found"}})}initBookingDetail(t){var i,o;this.bookingDetail={bookingCode:t.bookingCode,provider:t.provider||"",supplier:t.supplier||"",airlineLogo:this._flightDataService.getAirlineLogoByCode(t.airline),airlineSystem:t.airline,airlineName:this._flightDataService.getAirlineSystemNameByCode(t.airline),startPoint:t.journeys[0].departure.airport.code,endPoint:1===t.journeys.length?t.journeys[0].arrival.airport.code:t.journeys[t.journeys.length-1].departure.airport.code,statusText:t.getStatusText(),internal:t.internal,status:t.state,flightNumber:`${t.journeys[0].airline}${t.journeys[0].segments[0].flightNumber}`,journeys:t.journeys.map(r=>{var a;return{startPoint:r.departure.airport.code,endPoint:r.arrival.airport.code,startTime:J(r.departure.localTime).toDate(),flightNumber:r.segments[0].operating+r.segments[0].flightNumber,segments:null===(a=r.segments)||void 0===a?void 0:a.map(l=>({airline:l.airline,startPoint:l.departure.airport.code,endPoint:l.arrival.airport.code,startTime:l.departure.localTime,endTime:l.arrival.localTime,flightNumber:l.flightNumber}))}}),passengers:t.passengers.map(r=>({name:r.getName(),type:r.getType(),index:r.index,key:r.key,birthday:r.birthday,lastName:r.lastName,firstName:r.firstName,parentKey:r.parentKey,gender:r.gender,base:r.base,tax:r.tax,total:r.total,document:r.document})),ticketingAllowed:null!==(o=null===(i=t.bookDetail)||void 0===i?void 0:i.ticketingAllowed)&&void 0!==o&&o}}initPriceDetail(t){var i,o,r;const a=t.passengers.map(l=>({name:l.getName(),type:l.type,typeName:l.getType(),key:l.key}));this.priceDetail={provider:t.journeys.map(l=>l.airline||l.operating),totalBasePrice:t.totalCharges.total.totalFareCharge,totalDiscountBasePrice:0,totalServiceFee:t.totalCharges.total.totalServiceFee,totalAddonService:t.totalCharges.total.totalAddonCharge,totalPrice:t.totalCharges.total.total,totalDiscountFareCharge:0,totalOthersCharge:t.totalCharges.total.totalOthersCharge,passengers:a.map(l=>{var u;return{name:l.name,type:l.typeName,base:t.fareCharges.getBaseCharge(l.type),tax:t.fareCharges.getTaxCharge(l.type)+t.fareCharges.getVATCharge(l.type),discountAmount:null===(u=t.fareCharges)||void 0===u?void 0:u.getDiscountByPercent(l.type,this.discountPercentage),total:t.fareCharges.getTotalCharge(l.type),get totalDiscountFarePrice(){return this.total-this.discountAmount}}})},this.totalDiscountAmount=null===(i=this.priceDetail.passengers)||void 0===i?void 0:i.reduce((l,u)=>l+((null==u?void 0:u.discountAmount)||0),0),this.priceDetail.totalDiscountBasePrice=this.priceDetail.totalBasePrice-this.totalDiscountAmount,this.priceDetail.totalDiscountFareCharge=null!==(o=this.priceDetail)&&void 0!==o&&o.totalPrice?(null===(r=this.priceDetail)||void 0===r?void 0:r.totalPrice)-this.totalDiscountAmount:0}getIssueData(){var t,i,o,r;const a=null===(t=this.bookingDetail.passengers.filter(u=>"INF"!==u.type))||void 0===t?void 0:t.map(u=>{const p=this.bookingDetail.passengers.filter(k=>"INF"===k.type).find(k=>k.parentKey===u.key);return{firstName:u.firstName,lastName:u.lastName,type:u.type,child:p?{firstName:p.firstName,lastName:p.lastName,type:p.type}:null}});return{bookingCode:this.bookingDetail.bookingCode,passengers:a,segments:null===(o=null===(i=this.bookingDetail.journeys)||void 0===i?void 0:i.flatMap(u=>u.segments))||void 0===o?void 0:o.map(u=>({flightNumber:`${u.airline}${u.flightNumber}`,startCode:u.startPoint,endCode:u.endPoint,route:`${u.startPoint}${u.endPoint}`,departDate:u.startTime?(0,h.p6)(u.startTime,"dMMM","en-US"):"",startTime:u.startTime?(0,h.p6)(u.startTime,"HH:mm","vi-VN"):"",endTime:u.endTime?(0,h.p6)(u.endTime,"HH:mm","vi-VN"):""})),totalCharge:(null===(r=this.priceDetail)||void 0===r?void 0:r.totalPrice)||0}}onIssue(){var t,i,o;if("ISSUED"===this.bookingCodeStatus&&L.PY&&"VN"===(null===(t=this.airline)||void 0===t?void 0:t.toUpperCase()))return void this._modal.open(D.z5,{title:"Th\xf4ng b\xe1o",content:"H\u1ec7 th\u1ed1ng m\u1edbi Vietnam Airlines ch\u01b0a h\u1ed7 tr\u1ee3 t\xednh n\u0103ng n\xe0y. Xin li\u1ec7n h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3",status:"error",cancelText:"\u0110\xf3ng"});const r={agentId:(null===(i=this.agentSelected)||void 0===i?void 0:i.id)||"",bookingCode:this.bookingCode,bookingPrice:0,internal:this.internal,provider:this.bookingDetail.provider||"",checkDiscountFee:!0,passengers:[]};this.bookingDetail.supplier&&(r.supplier=this.bookingDetail.supplier);const a=`/admin/booking-detail/${this.airline}/${this.bookingCode}`;if("BSP"===(null===(o=this.bookingDetail.provider)||void 0===o?void 0:o.toUpperCase())){const l=u=>{this.isLoadingIssue=!0,this._manageBookingService.issueTicket(r).pipe((0,Z.x)(()=>this.isLoadingIssue=!1)).subscribe({next:p=>{var k,y;if(p.success)this._toastService.add({severity:"success",summary:"Xu\u1ea5t v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c xu\u1ea5t v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([a]);else if("DS-EL005"===p.objectError.errorCode){const c=p.objectError.errorData.priceInfo.newPrice-p.objectError.errorData.priceInfo.oldPrice,C={newPrice:p.objectError.errorData.priceInfo.newPrice,oldPrice:p.objectError.errorData.priceInfo.oldPrice,priceGap:Math.abs(c),type:c>0?"+":"-"};if(this._mobileDetectService.isMobile()){const f=this._bottomSheetService.open(S.EH,{headerTitle:"Chi ph\xed thay \u0111\u1ed5i",containerFullHeigh:!0,rightButtonIcon:"",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",data:{priceChangeData:C}});f.containerInstance._leftButtonClick.subscribe(g=>f.dismiss()),f.afterDismissed().subscribe(g=>{g&&(this.isLoadingIssue=!0,this._manageBookingService.issueTicket(r).pipe((0,Z.x)(()=>this.isLoadingIssue=!1)).subscribe({next:v=>{v.success?(this._toastService.add({severity:"success",summary:"Xu\u1ea5t v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c xu\u1ea5t v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([a])):"DS-EH001"===v.objectError.errorCode?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"Xu\u1ea5t v\xe9 th\u1ea5t b\u1ea1i",detail:v.objectError.errorDescription.vi?v.objectError.errorDescription.vi:v.objectError.errorDescription.en,sticky:!0,life:1e4})},error:v=>{v instanceof F.W?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Xu\u1ea5t s\u1ed1 v\xe9 kh\xf4ng th\xe0nh c\xf4ng. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c li\xean h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3!",sticky:!0,life:1e4})}}))})}else this._modal.open(S.EH,{priceChangeData:C}).afterClosed$.subscribe({next:g=>{g.data&&(this.isLoadingIssue=!0,this._manageBookingService.issueTicket(r).pipe((0,Z.x)(()=>this.isLoadingIssue=!1)).subscribe({next:v=>{v.success?(this._toastService.add({severity:"success",summary:"Xu\u1ea5t v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c xu\u1ea5t v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([a])):this._toastService.add({severity:"error",summary:"Xu\u1ea5t v\xe9 th\u1ea5t b\u1ea1i",detail:v.objectError.errorDescription.vi?v.objectError.errorDescription.vi:v.objectError.errorDescription.en,sticky:!0,life:1e4})}}))}})}else if("BE-EF045"===p.objectError.errorCode){const c={newPrice:p.objectError.errorData.newPriceTicket,oldPrice:p.objectError.errorData.oldPriceTicket,get priceGap(){return Math.abs(this.newPrice-this.oldPrice)},type:p.objectError.errorData.discountChange};if(this._mobileDetectService.isMobile()){const C=this._bottomSheetService.open(S.Gn,{headerTitle:"Th\xf4ng b\xe1o thay \u0111\u1ed5i chi\u1ebft kh\u1ea5u",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",data:{discountChangeData:c}});C.containerInstance._rightButtonClick.subscribe(()=>{C.dismiss()}),C.afterDismissed().subscribe({next:f=>{f&&(this.isLoadingIssue=!0,r.checkDiscountFee=!1,this._manageBookingService.issueTicket(r).pipe((0,Z.x)(()=>this.isLoadingIssue=!1)).subscribe({next:g=>{g.success?(this._toastService.add({severity:"success",summary:"Xu\u1ea5t v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c xu\u1ea5t v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([a])):"DS-EH001"===g.objectError.errorCode?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"Xu\u1ea5t v\xe9 th\u1ea5t b\u1ea1i",detail:g.objectError.errorDescription.vi?g.objectError.errorDescription.vi:g.objectError.errorDescription.en,sticky:!0,life:1e4})},error:g=>{g instanceof F.W?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Xu\u1ea5t s\u1ed1 v\xe9 kh\xf4ng th\xe0nh c\xf4ng. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c li\xean h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3!",sticky:!0,life:1e4})}}))}})}else this._modal.open(S.Gn,{discountChangeData:c}).afterClosed$.subscribe({next:f=>{f.data&&(this.isLoadingIssue=!0,r.checkDiscountFee=!1,this._manageBookingService.issueTicket(r).pipe((0,Z.x)(()=>this.isLoadingIssue=!1)).subscribe({next:g=>{g.success?(this._toastService.add({severity:"success",summary:"Xu\u1ea5t v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c xu\u1ea5t v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([a])):"DS-EH001"===g.objectError.errorCode?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"Xu\u1ea5t v\xe9 th\u1ea5t b\u1ea1i",detail:g.objectError.errorDescription.vi?g.objectError.errorDescription.vi:g.objectError.errorDescription.en,sticky:!0,life:1e4})},error:g=>{g instanceof F.W?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Xu\u1ea5t s\u1ed1 v\xe9 kh\xf4ng th\xe0nh c\xf4ng. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c li\xean h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3!",sticky:!0,life:1e4})}}))}})}else if("DS-EH001"===p.objectError.errorCode)this.hanldeTimeoutIssue();else{const c=(null===(k=p.objectError)||void 0===k?void 0:k.errorDescription.vi)||(null===(y=p.objectError)||void 0===y?void 0:y.errorDescription.en);this._toastService.add({severity:"error",summary:"Xu\u1ea5t v\xe9 th\u1ea5t b\u1ea1i",detail:c,sticky:!0,life:1e4})}},error:p=>{p instanceof F.W?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Xu\u1ea5t s\u1ed1 v\xe9 kh\xf4ng th\xe0nh c\xf4ng. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c li\xean h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3!",sticky:!0,life:1e4})}})};if(this._mobileDetectService.isMobile()){const u=this._bottomSheetService.open(D.V0,{headerTitle:"Kh\xf4ng th\u1ec3 ti\u1ebfp t\u1ee5c",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",data:{title:"",body:"C\u1ea7n b\u1ed5 sung \u0111\u1ea7y \u0111\u1ee7 th\xf4ng tin h\u1ed9 chi\u1ebfu c\u1ee7a h\xe0nh kh\xe1ch tr\u01b0\u1edbc khi xu\u1ea5t v\xe9",okText:"B\u1ed5 sung",cancelText:"\u0110\xf3ng",hasIcon:!0}});u.containerInstance._rightButtonClick.subscribe(()=>{u.dismiss()}),u.afterDismissed().subscribe({next:p=>{if(p){const k=[];this.bookingDetail.passengers.forEach((c,C)=>{var f,g,v,x,b;k.push({index:c.index,key:c.key||"",name:c.lastName+" "+c.firstName,parentKey:"N/A"==c.parentKey||null==c.parentKey?"":c.parentKey,type:c.type,child:"N/A",selected:0==C,gender:c.gender,firstName:c.firstName,lastName:c.lastName,dayOfBirth:c.birthday?c.birthday:"",parentName:"",fullType:c.type,issuanceDate:c.document&&(null===(f=c.document[0])||void 0===f?void 0:f.issuanceDate)||"",expiryDate:c.document&&(null===(g=c.document[0])||void 0===g?void 0:g.expiryDate)||"",issuanceCountry:c.document&&(null===(v=c.document[0])||void 0===v?void 0:v.issuanceCountry)||"",nationality:c.document&&(null===(x=c.document[0])||void 0===x?void 0:x.nationality)||"",number:c.document&&(null===(b=c.document[0])||void 0===b?void 0:b.number)||""})});const y=this._bottomSheetService.open(ie.vj,{headerTitle:"Ch\u1ec9nh s\u1eeda h\u1ed9 chi\u1ebfu",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",containerFullHeigh:!0,data:{listPaxUpdate:k}});y.containerInstance._rightButtonClick.subscribe(()=>{y.dismiss()}),y.afterDismissed().subscribe({next:c=>{c&&l(c)}})}}})}else this._modal.open(D.V0,{title:"Kh\xf4ng th\u1ec3 ti\u1ebfp t\u1ee5c",body:"C\u1ea7n b\u1ed5 sung \u0111\u1ea7y \u0111\u1ee7 th\xf4ng tin h\u1ed9 chi\u1ebfu c\u1ee7a h\xe0nh kh\xe1ch tr\u01b0\u1edbc khi xu\u1ea5t v\xe9",okText:"B\u1ed5 sung",cancelText:"\u0110\xf3ng"}).afterClosed$.subscribe({next:p=>{if(p.data){const k=[];this.bookingDetail.passengers.forEach((c,C)=>{var f,g,v,x,b;k.push({index:c.index,key:c.key||"",name:c.lastName+" "+c.firstName,parentKey:"N/A"==c.parentKey||null==c.parentKey?"":c.parentKey,type:c.type,child:"N/A",selected:0==C,gender:c.gender,firstName:c.firstName,lastName:c.lastName,dayOfBirth:c.birthday?c.birthday:"",parentName:"",fullType:c.type,issuanceDate:c.document&&(null===(f=c.document[0])||void 0===f?void 0:f.issuanceDate)||"",expiryDate:c.document&&(null===(g=c.document[0])||void 0===g?void 0:g.expiryDate)||"",issuanceCountry:c.document&&(null===(v=c.document[0])||void 0===v?void 0:v.issuanceCountry)||"",nationality:c.document&&(null===(x=c.document[0])||void 0===x?void 0:x.nationality)||"",number:c.document&&(null===(b=c.document[0])||void 0===b?void 0:b.number)||""})}),this._modal.open(ie.vj,{listPaxUpdate:k}).afterClosed$.subscribe({next:c=>{c.data&&l(c.data)}})}}})}else{const l=()=>{this.isLoadingIssue=!0,this._manageBookingService.issueTicket(r).pipe((0,Z.x)(()=>this.isLoadingIssue=!1)).subscribe({next:u=>{var p,k;if(u.success)this._toastService.add({severity:"success",summary:"Xu\u1ea5t v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c xu\u1ea5t v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([a]);else if("DS-EL005"===u.objectError.errorCode){const y=u.objectError.errorData.priceInfo.newPrice-u.objectError.errorData.priceInfo.oldPrice,c={newPrice:u.objectError.errorData.priceInfo.newPrice,oldPrice:u.objectError.errorData.priceInfo.oldPrice,priceGap:Math.abs(y),type:y>0?"+":"-"};if(this._mobileDetectService.isMobile()){const C=this._bottomSheetService.open(S.EH,{headerTitle:"Chi ph\xed thay \u0111\u1ed5i",containerFullHeigh:!0,rightButtonIcon:"",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",data:{priceChangeData:c}});C.containerInstance._leftButtonClick.subscribe(f=>C.dismiss()),C.afterDismissed().subscribe(f=>{f&&(this.isLoadingIssue=!0,this._manageBookingService.issueTicket(r).pipe((0,Z.x)(()=>this.isLoadingIssue=!1)).subscribe({next:g=>{g.success?(this._toastService.add({severity:"success",summary:"Xu\u1ea5t v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c xu\u1ea5t v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([a])):"DS-EH001"===g.objectError.errorCode?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"Xu\u1ea5t v\xe9 th\u1ea5t b\u1ea1i",detail:g.objectError.errorDescription.vi?g.objectError.errorDescription.vi:g.objectError.errorDescription.en,sticky:!0,life:1e4})},error:g=>{g instanceof F.W?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Xu\u1ea5t s\u1ed1 v\xe9 kh\xf4ng th\xe0nh c\xf4ng. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c li\xean h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3!",sticky:!0,life:1e4})}}))})}else this._modal.open(S.EH,{priceChangeData:c}).afterClosed$.subscribe({next:f=>{f.data&&(this.isLoadingIssue=!0,this._manageBookingService.issueTicket(r).pipe((0,Z.x)(()=>this.isLoadingIssue=!1)).subscribe({next:g=>{g.success?(this._toastService.add({severity:"success",summary:"Xu\u1ea5t v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c xu\u1ea5t v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([a])):this._toastService.add({severity:"error",summary:"Xu\u1ea5t v\xe9 th\u1ea5t b\u1ea1i",detail:g.objectError.errorDescription.vi?g.objectError.errorDescription.vi:g.objectError.errorDescription.en,sticky:!0,life:1e4})}}))}})}else if("DS-EH001"===u.objectError.errorCode)this.hanldeTimeoutIssue();else if("BE-EF045"===u.objectError.errorCode){const y={newPrice:u.objectError.errorData.newPriceTicket,oldPrice:u.objectError.errorData.oldPriceTicket,get priceGap(){return Math.abs(this.newPrice-this.oldPrice)},type:u.objectError.errorData.discountChange};if(this._mobileDetectService.isMobile()){const c=this._bottomSheetService.open(S.Gn,{headerTitle:"Th\xf4ng b\xe1o thay \u0111\u1ed5i chi\u1ebft kh\u1ea5u",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",data:{discountChangeData:y}});c.containerInstance._rightButtonClick.subscribe(()=>{c.dismiss()}),c.afterDismissed().subscribe({next:C=>{C&&(this.isLoadingIssue=!0,r.checkDiscountFee=!1,this._manageBookingService.issueTicket(r).pipe((0,Z.x)(()=>this.isLoadingIssue=!1)).subscribe({next:f=>{f.success?(this._toastService.add({severity:"success",summary:"Xu\u1ea5t v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c xu\u1ea5t v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([a])):"DS-EH001"===f.objectError.errorCode?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"Xu\u1ea5t v\xe9 th\u1ea5t b\u1ea1i",detail:f.objectError.errorDescription.vi?f.objectError.errorDescription.vi:f.objectError.errorDescription.en,sticky:!0,life:1e4})},error:f=>{f instanceof F.W?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Xu\u1ea5t s\u1ed1 v\xe9 kh\xf4ng th\xe0nh c\xf4ng. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c li\xean h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3!",sticky:!0,life:1e4})}}))}})}else this._modal.open(S.Gn,{discountChangeData:y}).afterClosed$.subscribe({next:C=>{C.data&&(this.isLoadingIssue=!0,r.checkDiscountFee=!1,this._manageBookingService.issueTicket(r).pipe((0,Z.x)(()=>this.isLoadingIssue=!1)).subscribe({next:f=>{f.success?(this._toastService.add({severity:"success",summary:"Xu\u1ea5t v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c xu\u1ea5t v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([a])):"DS-EH001"===f.objectError.errorCode?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"Xu\u1ea5t v\xe9 th\u1ea5t b\u1ea1i",detail:f.objectError.errorDescription.vi?f.objectError.errorDescription.vi:f.objectError.errorDescription.en,sticky:!0,life:1e4})},error:f=>{f instanceof F.W?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Xu\u1ea5t s\u1ed1 v\xe9 kh\xf4ng th\xe0nh c\xf4ng. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c li\xean h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3!",sticky:!0,life:1e4})}}))}})}else{const y=(null===(p=u.objectError)||void 0===p?void 0:p.errorDescription.vi)||(null===(k=u.objectError)||void 0===k?void 0:k.errorDescription.en);this._toastService.add({severity:"error",summary:"Xu\u1ea5t v\xe9 th\u1ea5t b\u1ea1i",detail:y,sticky:!0,life:1e4})}},error:u=>{u instanceof F.W?this.hanldeTimeoutIssue():this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Xu\u1ea5t s\u1ed1 v\xe9 kh\xf4ng th\xe0nh c\xf4ng. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c li\xean h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3!",sticky:!0,life:1e4})}})};if(this._mobileDetectService.isMobile()){const u=this._bottomSheetService.open(D._3,{headerTitle:"X\xe1c nh\u1eadn xu\u1ea5t v\xe9",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",data:{issueDataConfirm:this.getIssueData()}});u.containerInstance._rightButtonClick.subscribe(()=>{u.dismiss()}),u.afterDismissed().subscribe(p=>{p&&l()})}else this._modal.open(D._3,{issueDataConfirm:this.getIssueData()}).afterClosed$.subscribe({next:p=>{p.data&&l()}})}}onGotoBooking(){const t=this._getCurrentUrl();window.open(t)}onSelectedAgent(t){this.agentSelected=t}_getCurrentUrl(){return`${window.location.origin}/admin/booking-detail/${this.airline}/${this.bookingCode}`}onMobileSearch(){this.tempMobileAirline&&this.searchForm.controls.airline.setValue(this.tempMobileAirline),this._bottomSheetService.dismiss(),this.onSearch()}openSearchBts(t){const i=this._bottomSheetService.open(t,{headerTitle:"T\xecm ki\u1ebfm",rightButtonIcon:"",leftButtonIcon:"close",containerFullHeigh:!0,leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});i.containerInstance._leftButtonClick.subscribe(()=>i.dismiss())}openAirlineBts(t){const i=this._bottomSheetService.open(t,{headerTitle:"H\xe3ng bay",rightButtonIcon:"",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});i.containerInstance._leftButtonClick.subscribe(()=>i.dismiss())}openSupplierBts(t){if(this.isDisableSupplier)return;const i=this._bottomSheetService.open(t,{headerTitle:"Nh\xe0 cung c\u1ea5p",rightButtonIcon:"",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});i.containerInstance._leftButtonClick.subscribe(()=>i.dismiss())}mobileAirlineChange(t){this.tempMobileAirline=t}mobileSupplierChange(t){this.tempMobileSupplier=t}airlineOptionChange(){this.checkDisableSupplier(this.tempMobileAirline),this.searchForm.controls.airline.setValue(this.tempMobileAirline),this._bottomSheetService.dismiss(),this.onSearch()}supplierOptionChange(){this.searchForm.controls.supplier.setValue(this.tempMobileSupplier),this._bottomSheetService.dismiss(),this.onSearch()}checkDisableSupplier(t){this.isDisableSupplier="VN"!==t}hanldeTimeoutIssue(){this._mobileDetectService.isMobile()?(this.refTimoutBts=this._bottomSheetService.open(D.NK,{headerTitle:"",leftButtonIcon:"",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",containerFullHeigh:!1,data:{title:"\u0110ang x\u1eed l\xfd xu\u1ea5t v\xe9",body:"Qu\xfd \u0111\u1ea1i l\xfd vui l\xf2ng \u0111\u1ee3i trong gi\xe2y l\xe1t ho\u1eb7c ch\u1ee7 \u0111\u1ed9ng theo d\xf5i tr\u1ea1ng th\xe1i v\xe9 \u1edf m\u1ee5c Qu\u1ea3n l\xfd \u0111\u1eb7t ch\u1ed7",cancelText:"\u0110\xf3ng",okText:"M\u1edf qu\u1ea3n l\xfd \u0111\u1eb7t ch\u1ed7"}}),this.refTimoutBts.containerInstance._leftButtonClick.subscribe(t=>this.refTimoutBts.dismiss()),this.refTimoutBts.afterDismissed().subscribe({next:t=>{t&&this._route.navigate(["admin/manage-booking"])}})):(this.refTimoutModal=this._modal.open(D.NK,{title:"\u0110ang x\u1eed l\xfd xu\u1ea5t v\xe9",body:"Qu\xfd \u0111\u1ea1i l\xfd vui l\xf2ng \u0111\u1ee3i trong gi\xe2y l\xe1t ho\u1eb7c ch\u1ee7 \u0111\u1ed9ng theo d\xf5i tr\u1ea1ng th\xe1i v\xe9 \u1edf m\u1ee5c Qu\u1ea3n l\xfd \u0111\u1eb7t ch\u1ed7",cancelText:"\u0110\xf3ng",okText:"M\u1edf qu\u1ea3n l\xfd \u0111\u1eb7t ch\u1ed7"}),this.refTimoutModal.afterClosed$.subscribe({next:t=>{t.data&&this._route.navigate(["admin/manage-booking"])}}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(_.KNP),e.Y36(d.qu),e.Y36(q.F0),e.Y36(ne.P3),e.Y36(z.fB),e.Y36($.oE),e.Y36(Q.G),e.Y36(q.F0),e.Y36(oe.KD),e.Y36(X.t7),e.Y36(Y.BX),e.Y36(M.a2),e.Y36(te.L),e.Y36(H.$A),e.Y36($e.$))},n.\u0275cmp=e.Xpm({type:n,selectors:[["issue-booking-page"]],standalone:!0,features:[e.jDz],decls:38,vars:15,consts:[[1,"flex-auto","flex","flex-col","w-full"],[1,"bg-white","p-[30px]","w-full","shadow-sm","flex","flex-col","gap-y-[30px]","md:hidden"],[1,"text-heading-lg"],[1,"flex","gap-x-3","items-start","min-h-[60px]"],["textField","name","valueField","value","size","medium",1,"w-[180px]",3,"formControl","data","allowSearch","selectedChange"],["class","w-[180px]","textField","name","valueField","value","size","medium","placeholder","Ch\u1ecdn nh\xe0 cung c\u1ea5p",3,"formControl","data","allowSearch","ngClass",4,"ngIf"],[1,"flex-1",3,"status"],["cfHeadIcon","","icon","search","size","small"],["size","medium","cf-input","","placeholder","Nh\u1eadp booking code",3,"formControl"],["tableSearchInput",""],["cfHint","",3,"hint",4,"ngIf"],["cf-button","","size","medium","type","secondary",1,"!text-button-md",3,"disabled","click"],["icon","search","size","small",1,"mr-2.5"],[1,"hidden","md:flex","flex-col","py-3","px-4","gap-y-3","pr-0","bg-neutral-white"],[1,"text-heading-sm","text-neutral-gray-6"],[1,"flex","gap-x-3","overflow-x-auto"],[1,"gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]","hidden","md:flex",3,"click"],[1,"text-body-md","whitespace-nowrap"],["icon","chevron_down","size","small",1,"text-neutral-gray-5"],["class","gap-x-1.5 items-center border border-neutral-gray-3 rounded-full px-4 py-[5px] hidden md:flex",3,"ngClass","click",4,"ngIf"],[1,"hidden","!w-full","md:pr-4","md:block"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm",3,"formControl","focus"],["airlineOptionMobile",""],["supplierOptionMobile",""],["searchBts",""],["class","flex-auto w-full max-h-[calc(100vh-152px)] py-4 px-[30px] md:p-0",4,"ngIf"],["class","flex-auto flex justify-center w-full max-h-[calc(100vh-152px)] py-4",4,"ngIf"],["class","flex-auto flex justify-center w-full max-h-[calc(100vh-152px)] py-4 px-[30px]",4,"ngIf"],[4,"ngIf"],["textField","name","valueField","value","size","medium","placeholder","Ch\u1ecdn nh\xe0 cung c\u1ea5p",1,"w-[180px]",3,"formControl","data","allowSearch","ngClass"],["cfHint","",3,"hint"],[1,"gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]","hidden","md:flex",3,"ngClass","click"],[1,"flex","flex-col","justify-between","w-full"],[1,"p-4","pb-2"],[1,"flex","flex-col","gap-y-4",3,"ngModel","ngModelChange"],["size","medium",3,"value",4,"ngFor","ngForOf"],[1,"p-4"],["cf-button","",1,"justify-center","w-full",3,"click"],["size","medium",3,"value"],[1,"p-4","w-full","flex","flex-col","justify-between"],[1,"flex","flex-col","gap-y-4"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm",3,"formControl"],["textField","name","valueField","value","size","medium","placeholder","Ch\u1ecdn h\xe3ng bay",1,"w-full","max-w-none","mr-4",3,"ngModel","data","allowSearch","ngModelChange"],["cfLabel",""],["cf-button","",1,"w-full","justify-center","gap-x-2",3,"click"],["icon","search","size","small"],[1,"flex-auto","w-full","max-h-[calc(100vh-152px)]","py-4","px-[30px]","md:p-0"],[1,"bg-white","w-full","h-full","rounded-lg","md:bg-transparent"],[1,"h-[500px]","flex","flex-col","justify-center","items-center"],[1,"flex","flex-col","justify-center","items-center"],[1,"mb-8"],["src","assets/images/web-page.svg","alt",""],[1,"text-heading-md","text-neutral-black","mb-2"],[1,"text-espressive-md","text-neutral-gray-5","md:w-[257px]","md:text-center"],[1,"text-espressive-md"],["src","assets/images/empty-result.svg","alt",""],[1,"text-espressive-md","text-neutral-gray-5","text-center","md:w-[257px]"],[1,"text-espressive-md","text-neutral-gray-5","text-center"],[1,"flex-auto","flex","justify-center","w-full","max-h-[calc(100vh-152px)]","py-4"],[1,"w-fit",3,"optionAgent","isLoading","bookingDetail","priceDetail","hasDiscountFare","issueBooking","gotoBooking","selectedAgent"],[1,"flex-auto","flex","justify-center","w-full","max-h-[calc(100vh-152px)]","py-4","px-[30px]"],[1,"flex","flex-col","justify-center","items-center","w-full","h-full"],[1,"w-full"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._uU(3,"Xu\u1ea5t v\xe9"),e.qZA(),e.TgZ(4,"div",3)(5,"cf-select",4),e.NdJ("selectedChange",function(a){return i.onAirlineChange(a)}),e.qZA(),e.YNc(6,Xe,1,6,"cf-select",5),e.TgZ(7,"cf-input-group",6),e._UZ(8,"cf-icon",7)(9,"input",8,9),e.YNc(11,We,1,1,"cf-hint",10),e.qZA(),e.TgZ(12,"button",11),e.NdJ("click",function(){return i.onSearch()}),e._UZ(13,"cf-icon",12),e._uU(14," T\xecm ki\u1ebfm "),e.qZA()()(),e.TgZ(15,"div",13)(16,"div",14),e._uU(17,"Xu\u1ea5t v\xe9"),e.qZA(),e.TgZ(18,"div",15)(19,"div",16),e.NdJ("click",function(){e.CHM(o);const a=e.MAs(28);return e.KtG(i.openAirlineBts(a))}),e.TgZ(20,"div",17),e._uU(21,"Ch\u1ecdn h\xe3ng bay"),e.qZA(),e._UZ(22,"cf-icon",18),e.qZA(),e.YNc(23,Re,4,3,"div",19),e.qZA(),e.TgZ(24,"cf-input-group",20),e._UZ(25,"cf-icon",7),e.TgZ(26,"input",21),e.NdJ("focus",function(){e.CHM(o);const a=e.MAs(32);return e.KtG(i.openSearchBts(a))}),e.qZA()()(),e.YNc(27,tt,7,2,"ng-template",null,22,e.W1O),e.YNc(29,nt,7,2,"ng-template",null,23,e.W1O),e.YNc(31,ot,13,4,"ng-template",null,24,e.W1O),e.YNc(33,rt,13,0,"div",25),e.YNc(34,ct,9,3,"div",25),e.YNc(35,ut,2,5,"div",26),e.YNc(36,gt,6,0,"div",27),e.qZA(),e.YNc(37,dt,2,0,"div",28)}2&t&&(e.xp6(5),e.Q6J("formControl",i.searchForm.controls.airline)("data",i.airlineSelectOption)("allowSearch",!1),e.xp6(1),e.Q6J("ngIf",i.isShowSupplier),e.xp6(1),e.Q6J("status",i.searchForm.controls.searchText.invalid&&(i.searchForm.controls.searchText.dirty||i.searchForm.controls.searchText.touched)?"error":"default"),e.xp6(2),e.Q6J("formControl",i.searchForm.controls.searchText),e.xp6(2),e.Q6J("ngIf",(null==i.searchForm.controls.searchText.errors?null:i.searchForm.controls.searchText.errors.required)&&(i.searchForm.controls.searchText.dirty||i.searchForm.controls.searchText.touched)),e.xp6(1),e.Q6J("disabled",i.isLoading),e.xp6(11),e.Q6J("ngIf",i.isShowSupplier),e.xp6(3),e.Q6J("formControl",i.searchForm.controls.searchText),e.xp6(7),e.Q6J("ngIf",!i.isLoading&&"search_default"===i.stateMode),e.xp6(1),e.Q6J("ngIf",!i.isLoading&&("not_found"===i.stateMode||"cancelled"===i.stateMode||"issued"===i.stateMode)),e.xp6(1),e.Q6J("ngIf",!i.isLoading&&"has_value"===i.stateMode),e.xp6(1),e.Q6J("ngIf",i.isLoading),e.xp6(1),e.Q6J("ngIf",i.isLoadingIssue))},dependencies:[h.ez,h.mk,h.sg,h.O5,E.j$,E.ND,E.BN,_.AxE,_.Sm8,d.u5,d.Fj,d.JJ,d.On,d.UX,d.oH,K.q,B.N8,B.Xq,G.m,S.Wn,j.IA,D.OR,I.o,I.T,M.DW],encapsulation:2}),n})();function ht(n,s){1&n&&e._UZ(0,"cf-hint",21),2&n&&e.Q6J("hint","Ch\u01b0a nh\u1eadp m\xe3 \u0111\u1eb7t ch\u1ed7")}function mt(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",22)(1,"div",23)(2,"cf-input-group",13),e._UZ(3,"cf-icon",5)(4,"input",24),e.qZA()(),e.TgZ(5,"div")(6,"button",25),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onMobileSearch())}),e._UZ(7,"cf-icon",26),e.TgZ(8,"div"),e._uU(9,"T\xecm ki\u1ebfm"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(4),e.Q6J("formControl",t.searchForm.controls.searchText)}}function ft(n,s){1&n&&(e.TgZ(0,"div",27)(1,"div",28),e._UZ(2,"img",29),e.qZA(),e.TgZ(3,"div",30)(4,"div",31),e._uU(5,"Nh\u1eadp m\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\u1ec3 ti\u1ebfn h\xe0nh h\u1ee7y v\xe9"),e.qZA(),e.TgZ(6,"div",32),e._uU(7," Vui l\xf2ng nh\u1eadp m\xe3 \u0111\u1eb7t ch\u1ed7 c\u1ee7a b\u1ea1n v\xe0o \xf4 b\xean tr\xean v\xe0 ch\u1ecdn n\xfat T\xecm ki\u1ebfm \u0111\u1ec3 b\u1eaft \u0111\u1ea7u "),e.qZA()()())}function _t(n,s){1&n&&(e.TgZ(0,"div",33),e._UZ(1,"ticket-item-skeleton")(2,"ticket-item-skeleton")(3,"ticket-item-skeleton")(4,"ticket-item-skeleton"),e.qZA())}function vt(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"div",34)(2,"ticket-number",35),e.NdJ("actionChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.onActionChange(o))}),e.qZA()(),e.TgZ(3,"div",23)(4,"div",36)(5,"div",37)(6,"div",38),e._uU(7,"Gi\u1eef l\u1ea1i h\xe0nh tr\xecnh sau khi void v\xe9?"),e.qZA(),e.TgZ(8,"div",39)(9,"cf-radio-group",40),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.cancelBooking=o)}),e.TgZ(10,"cf-radio",41),e._uU(11,"Kh\xf4ng, h\xe3y h\u1ee7y h\xe0nh tr\xecnh"),e.qZA(),e.TgZ(12,"cf-radio",41),e._uU(13,"C\xf3, gi\u1eef l\u1ea1i \u0111\u1ec3 ti\u1ebfp t\u1ee5c \u0111\u1eb7t v\xe9"),e.qZA()()()()(),e.TgZ(14,"div",42)(15,"button",43),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onCancel())}),e._uU(16," \u0110\xf3ng "),e.qZA(),e.TgZ(17,"button",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onVoidBooking())}),e._UZ(18,"cf-icon",45),e._uU(19," Void t\u1ea5t c\u1ea3 "),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("bookingCode",t.bookingCode)("listTicketNumber",t.listTicketNumber)("totalCharge",t.totalCharge),e.xp6(7),e.Q6J("ngModel",t.cancelBooking),e.xp6(1),e.Q6J("value","true"),e.xp6(2),e.Q6J("value","false")}}function xt(n,s){1&n&&(e.TgZ(0,"div",27)(1,"div",28),e._UZ(2,"img",46),e.qZA(),e.TgZ(3,"div",30)(4,"div",47),e._uU(5,"Kh\xf4ng c\xf3 k\u1ebft qu\u1ea3"),e.qZA(),e.TgZ(6,"div",32)(7,"div"),e._uU(8,"Kh\xf4ng c\xf3 k\u1ebft qu\u1ea3 \u0111\u1ec3 hi\u1ec3n th\u1ecb"),e.qZA(),e.TgZ(9,"div"),e._uU(10,"Vui l\xf2ng th\u1eed l\u1ea1i sau ho\u1eb7c ki\u1ec3m tra l\u1ea1i th\xf4ng tin m\xe3 \u0111\u1eb7t ch\u1ed7"),e.qZA()()()())}function Ct(n,s){1&n&&(e.TgZ(0,"div"),e._UZ(1,"cf-spinner"),e.qZA())}let bt=(()=>{class n{constructor(t,i,o,r,a,l,u){this._modal=o,this._toastService=r,this._bookingDetailService=a,this._manageBookingService=l,this._bottomSheetService=u,this.airline="VN",this.listTicketNumber=[],this.state="SEARCH",this.isLoading=!1,this.cancelBooking="true",i.registerIcons([_.esH,_.tLH]),this.searchForm=t.group({searchText:["",d.kI.required]})}onSearch(){this.searchForm.invalid||(this.bookingCode=this.searchForm.value.searchText.trim().toUpperCase(),this.loadTicketVoid())}loadTicketVoid(){this.state="LOADING",this._manageBookingService.getTicketVoid(this.bookingCode).subscribe({next:t=>{t.success&&t.data&&t.data.listTicketNumber.length?(this.state="SUCCESS",this.totalCharge=t.data.totalCharge,this.listTicketNumber=t.data.listTicketNumber.map(i=>({ticketNumber:i.ticketNumber,status:i.status,totalCharge:i.totalCharge||0}))):this.state="EMPTY"},error:()=>{this.state="EMPTY"}})}onActionChange(t){if("review"===t.action)return this.onReview(t.ticketNumber)}onVoidBooking(){const t={title:"Void v\xe9 th\xe0nh c\xf4ng",content:`<div>T\u1ea5t c\u1ea3 c\xe1c s\u1ed1 v\xe9 h\u1ee3p l\u1ec7 t\u1eeb m\xe3 \u0111\u1eb7t ch\u1ed7 <strong>${this.bookingCode}</strong> \u0111\xe3 \u0111\u01b0\u1ee3c void th\xe0nh c\xf4ng.</div>`,status:"success"},i={title:"Void v\xe9 th\u1ea5t b\u1ea1i",content:"<div>Void s\u1ed1 v\xe9 kh\xf4ng th\xe0nh c\xf4ng. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c li\xean h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3.</div>",status:"error"};this._modal.open(D.V0,{title:"X\xe1c nh\u1eadn h\u1ee7y v\xe9",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n void c\xe1c s\u1ed1 v\xe9 n\xe0y kh\xf4ng? H\xe0nh \u0111\u1ed9ng n\xe0y kh\xf4ng th\u1ec3 ho\xe0n t\xe1c."}).afterClosed$.subscribe({next:r=>{var a;if(r.data){const u={agentName:JSON.parse(null!==(a=localStorage.getItem("currentUser"))&&void 0!==a?a:"").data.roleId,cancelBooking:"true"===this.cancelBooking,airline:this.airline,bookingCode:this.bookingCode,ticketNumber:this.listTicketNumber.map(p=>p.ticketNumber)};this.isLoading=!0,this._manageBookingService.voidTicket(u).pipe((0,Z.x)(()=>this.isLoading=!1)).subscribe({next:p=>{p.success&&p.data.filter(c=>c.void).length===p.data.length?this._modal.open(D.z5,t).afterClosed$.subscribe({next:()=>{this.state="SEARCH",this.searchForm.reset()}}):this._modal.open(D.z5,i).afterClosed$.subscribe({next:()=>{this.state="SUCCESS",this.loadTicketVoid()}})},error:()=>{this.state="SUCCESS",this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Void v\xe9 kh\xf4ng th\xe0nh c\xf4ng. Vui l\xf2ng li\xean h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3!",sticky:!0})}})}}})}onReview(t){var i;if(L.PY&&"VN"===(null===(i=this.airline)||void 0===i?void 0:i.toUpperCase()))return void this._modal.open(D.z5,{title:"Th\xf4ng b\xe1o",content:"H\u1ec7 th\u1ed1ng m\u1edbi Vietnam Airlines ch\u01b0a h\u1ed7 tr\u1ee3 t\xednh n\u0103ng n\xe0y. Xin li\u1ec7n h\u1ec7 booker \u0111\u1ec3 \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3",status:"error",cancelText:"\u0110\xf3ng"});const o=this._getCurrentUrl();this.isLoading=!0,this._manageBookingService.getTicketDetail(t).pipe((0,Z.x)(()=>this.isLoading=!1)).subscribe({next:r=>{const a=this.proccessTicketDetail(r.data);this._modal.open(S.co,{ticketDetail:a,curentUrl:o,isAction:!0,airline:this.airline})}})}onOpenBooking(){const t=this._getCurrentUrl();window.open(t)}_getCurrentUrl(){return`${window.location.origin}/admin/booking-detail/${this.airline}/${this.bookingCode}`}proccessTicketDetail(t){return{ticketNumber:"",passengerName:t.ticketInfo.passengerName,ticketInfo:{numCoupons:t.ticketInfo.numCoupons,issueDate:t.ticketInfo.issueDate,createDate:t.ticketInfo.createDate,bookingCode:t.ticketInfo.prn},segments:t.segment.map(i=>({number:i.number,airline:i.marketingAirline,flightNumber:i.flightNumber,classCode:i.bookingClassCode,date:"15MAR",brdoff:i.originLocation+i.destinationLocation,time:"2200",status:i.segmentStatus,fareBasis:i.fareBasis,statusCode:i.ticketStatus,baggageAllowance:i.baggageAllowance})),pricingInfo:{baseFare:t.pricingInfo.baseFare.currencyCode.concat(" ",t.pricingInfo.baseFare.amount),taxes:t.pricingInfo.taxes.map(i=>i.amount.concat(i.taxCode)).join(" "),totalFare:t.pricingInfo.totalFare.currencyCode.concat(" ",t.pricingInfo.totalFare.amount)},fareCalc:t.pricingInfo.fareCalculation,paymentInfo:{paymentCardNumber:t.paymentInfo.paymentCardNumber,authorizationCode:t.paymentInfo.authorizationCode},ticketData:{issueDate:t.ticketData.issueDate,printStation:t.ticketData.printStation,issuingAgent:t.ticketData.issuingAgent,remarks:t.ticketData.remarks,endorsements:t.ticketData.endorsements.join("")}}}onCancel(){this.searchForm.reset(),this.state="SEARCH"}onMobileSearch(){this._bottomSheetService.dismiss(),this.onSearch()}openSearchBts(t){const i=this._bottomSheetService.open(t,{headerTitle:"T\xecm ki\u1ebfm",rightButtonIcon:"",leftButtonIcon:"close",containerFullHeigh:!0,leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});i.containerInstance._leftButtonClick.subscribe(()=>i.dismiss())}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(d.qu),e.Y36(_.KNP),e.Y36($.oE),e.Y36(Y.BX),e.Y36(ne.P3),e.Y36(z.fB),e.Y36(M.a2))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-void-booking-page"]],standalone:!0,features:[e.jDz],decls:29,vars:9,consts:[[1,"flex-auto","flex","flex-col","w-full"],[1,"bg-white","p-[30px]","w-full","shadow-sm","flex","flex-col","gap-y-[30px]","md:hidden"],[1,"text-heading-lg"],[1,"flex","items-stretch","gap-x-3"],[1,"!w-full",3,"status"],["cfHeadIcon","","icon","search","size","small"],["size","medium","cf-input","","placeholder","Nh\u1eadp m\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\u1ec3 b\u1eaft \u0111\u1ea7u vi\u1ec7c t\xecm s\u1ed1 v\xe9...",3,"formControl"],["tableSearchInput",""],["cfHint","",3,"hint",4,"ngIf"],["cf-button","","size","medium","type","secondary",1,"w-[168px]","justify-center",3,"click"],["icon","search","size","small",1,"pr-3"],[1,"hidden","md:flex","flex-col","py-3","px-4","gap-y-3","pr-0","bg-neutral-white"],[1,"text-heading-sm","text-neutral-gray-6"],[1,"hidden","!w-full","md:pr-4","md:block"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm",3,"formControl","focus"],["searchBts",""],[1,"flex-auto","w-full","max-h-[calc(100vh-152px)]","px-[30px]","py-4","md:p-0","md:h-full"],[1,"bg-white","w-full","h-full","rounded-lg","md:bg-transparent"],["class","h-[500px] p-6 flex flex-col gap-y-8 justify-center items-center",4,"ngIf"],["class","p-6",4,"ngIf"],[4,"ngIf"],["cfHint","",3,"hint"],[1,"p-4","w-full","flex","flex-col","justify-between"],[1,"flex","flex-col","gap-y-4"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm",3,"formControl"],["cf-button","",1,"w-full","justify-center","gap-x-2",3,"click"],["icon","search","size","small"],[1,"h-[500px]","p-6","flex","flex-col","gap-y-8","justify-center","items-center"],[1,"flex","justify-center"],["src","assets/images/web-page.svg","alt",""],[1,"text-center"],[1,"text-heading-md","text-neutral-black","mb-4"],[1,"text-body-md-short","text-neutral-gray-5"],[1,"p-6"],[1,"h-fit","w-full"],[3,"bookingCode","listTicketNumber","totalCharge","actionChange"],[1,"md:px-4","md:rounded-lg"],[1,"p-4","flex","flex-col","gap-y-2","bg-neutral-white"],[1,"text-express-md"],[1,"flex","gap-x-6"],[1,"flex","items-center","gap-x-8",3,"ngModel","ngModelChange"],["size","medium",3,"value"],[1,"flex","justify-end","gap-x-4","p-4"],["cf-button","","size","medium","type","secondary",1,"bg-white",3,"click"],["cf-button","","size","medium",3,"click"],["icon","coupon","size","small",1,"mr-2.5","text-white"],["src","assets/images/empty-result.svg","alt",""],[1,"text-heading-md","text-neutral-black","mb-2"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._uU(3,"Void v\xe9"),e.qZA(),e.TgZ(4,"div",3)(5,"cf-input-group",4),e._UZ(6,"cf-icon",5)(7,"input",6,7),e.YNc(9,ht,1,1,"cf-hint",8),e.qZA(),e.TgZ(10,"button",9),e.NdJ("click",function(){return i.onSearch()}),e._UZ(11,"cf-icon",10),e._uU(12," T\xecm ki\u1ebfm "),e.qZA()()(),e.TgZ(13,"div",11)(14,"div",12),e._uU(15,"Void v\xe9"),e.qZA(),e.TgZ(16,"cf-input-group",13),e._UZ(17,"cf-icon",5),e.TgZ(18,"input",14),e.NdJ("focus",function(){e.CHM(o);const a=e.MAs(20);return e.KtG(i.openSearchBts(a))}),e.qZA()()(),e.YNc(19,mt,10,1,"ng-template",null,15,e.W1O),e.TgZ(21,"div",16)(22,"div",17),e.YNc(23,ft,8,0,"div",18),e.YNc(24,_t,5,0,"div",19),e.YNc(25,vt,20,6,"div",20),e.YNc(26,xt,11,0,"div",18),e.qZA()()(),e._UZ(27,"cf-toast"),e.YNc(28,Ct,2,0,"div",20)}2&t&&(e.xp6(5),e.Q6J("status",i.searchForm.controls.searchText.invalid&&(i.searchForm.controls.searchText.dirty||i.searchForm.controls.searchText.touched)?"error":"default"),e.xp6(2),e.Q6J("formControl",i.searchForm.controls.searchText),e.xp6(2),e.Q6J("ngIf",(null==i.searchForm.controls.searchText.errors?null:i.searchForm.controls.searchText.errors.required)&&(i.searchForm.controls.searchText.dirty||i.searchForm.controls.searchText.touched)),e.xp6(9),e.Q6J("formControl",i.searchForm.controls.searchText),e.xp6(5),e.Q6J("ngIf","SEARCH"===i.state),e.xp6(1),e.Q6J("ngIf","LOADING"===i.state),e.xp6(1),e.Q6J("ngIf","SUCCESS"===i.state),e.xp6(1),e.Q6J("ngIf","EMPTY"===i.state),e.xp6(2),e.Q6J("ngIf",i.isLoading))},dependencies:[h.ez,h.O5,E.j$,E.ND,E.BN,_.AxE,_.Sm8,d.u5,d.Fj,d.JJ,d.On,d.UX,d.oH,B.N8,B.Xq,G.m,Y.hj,S.kP,D.OR,j.IA,M.DW,I.o,I.T],encapsulation:2}),n})();var kt=m(28490);function Tt(n,s){1&n&&e._UZ(0,"cf-input-hint",16),2&n&&e.Q6J("hint","M\xe3 \u0111\u1eb7t ch\u1ed7 kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function yt(n,s){1&n&&(e.TgZ(0,"div",17)(1,"div",18)(2,"div",19)(3,"div",20)(4,"div",21),e._UZ(5,"img",22),e.qZA(),e.TgZ(6,"div",23),e._uU(7," Nh\u1eadp m\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\u1ec3 tra c\u1ee9u th\xf4ng tin "),e.qZA(),e.TgZ(8,"div",24),e._uU(9," Vui l\xf2ng nh\u1eadp m\xe3 \u0111\u1eb7t ch\u1ed7 c\u1ea7n tra c\u1ee9u v\xe0o \xf4 b\xean tr\xean v\xe0 ch\u1ecdn n\xfat "),e.TgZ(10,"span",25),e._uU(11,"T\xecm ki\u1ebfm"),e.qZA(),e._uU(12," \u0111\u1ec3 b\u1eaft \u0111\u1ea7u "),e.qZA()()()()())}function Et(n,s){if(1&n&&(e.TgZ(0,"div",17)(1,"div",18)(2,"div",19)(3,"div",20)(4,"div",26),e._UZ(5,"img",27),e.qZA(),e.TgZ(6,"div",23),e._uU(7," Kh\xf4ng c\xf3 k\u1ebft qu\u1ea3 "),e.qZA(),e.TgZ(8,"div",28)(9,"div"),e._uU(10,"Kh\xf4ng t\xecm th\u1ea5y th\xf4ng tin m\xe3 \u0111\u1eb7t ch\u1ed7 "),e.TgZ(11,"strong"),e._uU(12),e.qZA(),e._uU(13,"."),e.qZA(),e.TgZ(14,"div"),e._uU(15,"M\xe3 \u0111\u1eb7t ch\u1ed7 c\xf3 th\u1ec3 kh\xf4ng t\u1ed3n t\u1ea1i trong h\u1ec7 th\u1ed1ng. Vui l\xf2ng ki\u1ec3m tra l\u1ea1i th\xf4ng tin."),e.qZA()()()()()()),2&n){const t=e.oxw();e.xp6(12),e.Oqu(t.bookingCode)}}function Dt(n,s){1&n&&(e.TgZ(0,"div",29),e._UZ(1,"ticket-item-skeleton")(2,"ticket-item-skeleton")(3,"ticket-item-skeleton")(4,"ticket-item-skeleton"),e.qZA())}function Zt(n,s){1&n&&e._UZ(0,"cf-icon",69)}function At(n,s){1&n&&e._UZ(0,"cf-icon",70)}function Bt(n,s){if(1&n&&(e.TgZ(0,"div",71),e._UZ(1,"cf-icon",72),e.TgZ(2,"span",73),e._uU(3),e.ALo(4,"date"),e.qZA()()),2&n){const t=s.$implicit;e.xp6(3),e.lnq("",t.startPoint," - ",t.endPoint," (",e.xi3(4,3,t.startTime,"HH:mm - dd/MM/yyyy"),")")}}function St(n,s){1&n&&e._UZ(0,"div",48)}function Mt(n,s){1&n&&e._UZ(0,"cf-icon",74)}function Nt(n,s){if(1&n&&(e.TgZ(0,"div",80)(1,"div",81)(2,"div",82)(3,"div",56),e._uU(4,"H\u1ec7 th\u1ed1ng \u0111\u1eb7t ch\u1ed7:"),e.qZA(),e.TgZ(5,"div",83),e._uU(6),e.qZA()(),e.TgZ(7,"div",82)(8,"div",56),e._uU(9,"Ng\xe0y \u0111\u1eb7t:"),e.qZA(),e.TgZ(10,"div",84),e._uU(11),e.qZA()()(),e.TgZ(12,"div",85)(13,"div",82)(14,"div",56),e._uU(15,"H\u1ea1n gi\u1eef ch\u1ed7:"),e.qZA(),e.TgZ(16,"div",84),e._uU(17),e.qZA()(),e.TgZ(18,"div",82)(19,"div",56),e._uU(20,"Ng\u01b0\u1eddi \u0111\u1eb7t:"),e.qZA(),e.TgZ(21,"div",84),e._uU(22),e.qZA()()(),e.TgZ(23,"div",85)(24,"div",82)(25,"div",56),e._uU(26,"H\u1ea1n gi\u1eef gi\xe1:"),e.qZA(),e.TgZ(27,"div",84),e._uU(28),e.qZA()(),e.TgZ(29,"div",82)(30,"div",56),e._uU(31,"Thu\u1ed9c \u0111\u1ea1i l\xfd:"),e.qZA(),e.TgZ(32,"div",84),e._uU(33),e.qZA()()()()),2&n){const t=e.oxw(3);e.xp6(6),e.AsE(" ",t.bookingDetail.airlineSystem," - ",t.bookingDetail.airlineName,""),e.xp6(5),e.hij("",t.bookingDetail.dateBooked||"N/A"," "),e.xp6(6),e.hij("",t.bookingDetail.timeHoldBooking||"N/A"," "),e.xp6(5),e.hij("",t.bookingDetail.userBooked||"N/A"," "),e.xp6(6),e.hij("",t.bookingDetail.timeHoldPricing||"N/A"," "),e.xp6(5),e.hij("",t.bookingDetail.agentName||"N/A"," ")}}function It(n,s){if(1&n&&(e.TgZ(0,"div",86),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.hij(" ",t.bookingDetail.statusDesc," ")}}function Ft(n,s){if(1&n&&(e.TgZ(0,"div")(1,"div")(2,"div",75),e._UZ(3,"cf-icon",76),e.TgZ(4,"span",77),e._uU(5,"Th\xf4ng tin \u0111\u1eb7t ch\u1ed7"),e.qZA()(),e.YNc(6,Nt,34,7,"div",78),e.YNc(7,It,2,1,"ng-template",null,79,e.W1O),e.qZA()()),2&n){const t=e.MAs(8),i=e.oxw(2);e.xp6(6),e.Q6J("ngIf","ERROR"!==i.bookingDetail.status)("ngIfElse",t)}}function wt(n,s){if(1&n&&(e.TgZ(0,"tr")(1,"td",87),e._uU(2),e.qZA(),e.TgZ(3,"td",88),e._uU(4),e.qZA(),e.TgZ(5,"td",88),e._uU(6),e.qZA()()),2&n){const t=s.$implicit;e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Oqu(t.type),e.xp6(2),e.Oqu(t.sex)}}function Pt(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",30)(1,"div",31)(2,"div",32)(3,"div",33)(4,"div",34),e._UZ(5,"div",35),e.TgZ(6,"div",36),e._uU(7,"Chi ti\u1ebft \u0111\u1eb7t ch\u1ed7"),e.qZA()(),e.TgZ(8,"button",37),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.gotoBooking(o.bookingDetail.bookingCodeDisplay,o.bookingDetail.airline))}),e._UZ(9,"cf-icon",38),e._uU(10," M\u1edf booking "),e.qZA()(),e.TgZ(11,"div",39)(12,"div",40)(13,"div",41)(14,"div",42)(15,"div"),e._UZ(16,"img",43),e.qZA(),e.TgZ(17,"div",44)(18,"span",45),e._uU(19),e.qZA(),e.TgZ(20,"span",46),e._uU(21),e.qZA()(),e.TgZ(22,"div",47),e._uU(23),e.qZA()(),e._UZ(24,"div",48),e.TgZ(25,"div",49)(26,"div",50)(27,"span"),e._uU(28),e.qZA(),e.YNc(29,Zt,1,0,"cf-icon",51),e.YNc(30,At,1,0,"cf-icon",52),e.TgZ(31,"span"),e._uU(32),e.qZA()(),e.YNc(33,Bt,5,6,"div",53),e.qZA(),e.YNc(34,St,1,0,"div",54),e.TgZ(35,"div",55)(36,"div",56),e._uU(37,"M\xe3 \u0111\u1eb7t ch\u1ed7"),e.qZA(),e.TgZ(38,"div",57),e._uU(39),e.qZA()(),e._UZ(40,"div",48),e.TgZ(41,"div",55)(42,"div",56),e._uU(43,"Tr\u1ea1ng th\xe1i"),e.qZA(),e.TgZ(44,"div",58),e.YNc(45,Mt,1,0,"cf-icon",59),e.TgZ(46,"div",60)(47,"label",61),e._uU(48),e.qZA()()()()(),e.YNc(49,Ft,9,2,"div",62),e.qZA()()(),e.TgZ(50,"div",63)(51,"div",34),e._UZ(52,"div",35),e.TgZ(53,"div",36),e._uU(54,"Th\xf4ng tin h\xe0nh kh\xe1ch"),e.qZA()(),e.TgZ(55,"div",64)(56,"table",65)(57,"thead")(58,"tr",66)(59,"th",67),e._uU(60,"H\xe0nh kh\xe1ch"),e.qZA(),e.TgZ(61,"th",67),e._uU(62,"Lo\u1ea1i kh\xe1ch"),e.qZA(),e.TgZ(63,"th",67),e._uU(64,"Gi\u1edbi t\xednh"),e.qZA()()(),e.TgZ(65,"tbody"),e.YNc(66,wt,7,3,"tr",68),e.qZA()()()()()()}if(2&n){const t=e.oxw();e.xp6(16),e.Q6J("src",t.bookingDetail.airlineLogo,e.LSH),e.xp6(3),e.hij("",t.bookingDetail.airlineSystem," -\xa0"),e.xp6(2),e.Oqu(t.bookingDetail.airlineName),e.xp6(2),e.hij(" H\u1ec7 th\u1ed1ng: ",t.bookingDetail.airlineSystem," "),e.xp6(5),e.hij(" ",t.bookingDetail.startPoint,""),e.xp6(1),e.Q6J("ngIf",1===t.bookingDetail.journeys.length),e.xp6(1),e.Q6J("ngIf",t.bookingDetail.journeys.length>1),e.xp6(2),e.hij(" ",t.bookingDetail.endPoint," "),e.xp6(1),e.Q6J("ngForOf",t.bookingDetail.journeys),e.xp6(1),e.Q6J("ngIf",t.isBooked),e.xp6(5),e.Oqu(t.bookingDetail.bookingCodeDisplay),e.xp6(6),e.Q6J("ngIf",t.isBooked),e.xp6(3),e.Oqu(t.bookingDetail.statusText),e.xp6(1),e.Q6J("ngIf","CANCEL"!==t.bookingDetail.status),e.xp6(17),e.Q6J("ngForOf",t.passengerInfos)}}function Ut(n,s){1&n&&(e.TgZ(0,"td",89),e._uU(1,"N/A"),e.qZA())}function qt(n,s){1&n&&(e.TgZ(0,"td",90),e._uU(1,"N/A"),e.qZA())}function Jt(n,s){1&n&&(e.TgZ(0,"div",91),e._uU(1,"N/A \u0111"),e.qZA())}let Ot=(()=>{class n{constructor(t,i,o,r,a,l){this._searchFlightService=i,this._flightDataService=o,this._locationDataService=r,this._router=l,this.isLoading=!1,this.isFirst=!0,this.isBooked=!1,this.state="SEARCH",this.passengerInfos=[],a.registerIcons([_.Ffn,_._tC,_.llu,_.QkI])}bookingInputChange(){this.isFirst=!1}validInput(){return!(""===this.bookingCode&&!this.isFirst||!this.isFirst&&this.bookingCode&&""===this.bookingCode.trim())}validBooking(){return this.bookingCode&&""!==this.bookingCode.trim()}getBookingTicket(){this.state="LOADING",this._searchFlightService.searchByPNR({provider:"",bookingCode:this.bookingCode,globalSearch:!0}).pipe((0,Z.x)(()=>this.isLoading=!1)).subscribe({next:t=>{var i,o,r;if(t.success){this.state="SUCCESS",this.passengerInfos=t.data.passengers.map(l=>({name:l.getName(),type:l.getType(),sex:l.getGender(),birthday:l.getBirthday()}));const a=t.data;this.isBooked=["BOOKED","ISSUED"].includes(a.state),this.bookingDetail={bookingCodeDisplay:a.bookingCode,statusText:this.getStatusText(a.state),airline:a.airline,airlineLogo:this._flightDataService.getAirlineLogoByCode(t.data.airline),airlineSystem:t.data.airline,airlineName:t.data.airlineName,status:a.state,startPoint:a.journeys[0].departure.airport.code,endPoint:1===a.journeys.length?a.journeys[0].arrival.airport.code:a.journeys[a.journeys.length-1].departure.airport.code,timeHoldBooking:null!==(i=a.bookDetail)&&void 0!==i&&i.timeHoldBooking?J(a.bookDetail.timeHoldBooking).format("HH:mm, DD/MM/YYYY"):"",timeHoldPricing:null!==(o=a.bookDetail)&&void 0!==o&&o.timeKeepPrice?J(a.bookDetail.timeKeepPrice).format("HH:mm, DD/MM/YYYY"):"N/A",userBooked:a.bookDetail.userBooked?a.bookDetail.userBooked:"",dateBooked:null!==(r=a.bookDetail)&&void 0!==r&&r.dateBooked?J(1e3*a.bookDetail.dateBooked).format("HH:mm, DD/MM/YYYY"):"N/A",agentName:a.bookDetail.agentName?a.bookDetail.agentName:"",journeys:a.journeys.map(l=>({airline:l.airline,airlineLogo:this._flightDataService.getAirlineLogoByCode(l.airline),airlineName:this._flightDataService.getAirlineSystemNameByCode(l.airline),operating:l.operating,operatingName:l.operating,startPoint:l.departure.airport.code,startPointName:this._locationDataService.getCityNameByCode(l.departure.airport.code),endPoint:l.arrival.airport.code,endPointName:this._locationDataService.getCityNameByCode(l.arrival.airport.code),startTime:new Date(1e3*l.departure.scheduleTime),endTime:new Date(1e3*l.arrival.scheduleTime)}))}}else this.state="EMPTY"},error:()=>{this.state="EMPTY"}})}getStatusText(t){switch(t){case"BOOKED":return"\u0110\xe3 gi\u1eef ch\u1ed7";case"ISSUED":return"\u0110\xe3 xu\u1ea5t v\xe9";case"REFUND":return"\u0110\xe3 ho\xe0n";case"CANCEL":return"\u0110\xe3 h\u1ee7y";case"EXPIRED":return"H\u1ebft h\u1ea1n";case"INVALID":return"Kh\xf4ng c\xf2n gi\xe1 tr\u1ecb";case"VOID":return"\u0110\xe3 void";default:return"\u0110\u1eb7t ch\u1ed7 l\u1ed7i"}}gotoBooking(t,i){this._router.navigate([`admin/booking-detail/${i}/${t}`])}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(d.qu),e.Y36(X.t7),e.Y36(Q.G),e.Y36(kt._),e.Y36(_.KNP),e.Y36(q.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-open-booking"]],standalone:!0,features:[e.jDz],decls:25,vars:8,consts:[[1,"flex-auto","flex","flex-col","w-full"],[1,"bg-white","p-[30px]","w-full","shadow-sm","flex","flex-col","gap-y-[30px]","md:hidden"],[1,"text-heading-lg"],[1,"flex","gap-x-4","items-start"],[1,"!w-full",3,"status"],["cfHeadIcon","","icon","search","size","small"],["size","medium","cf-input","","placeholder","Nh\u1eadp m\xe3 \u0111\u1eb7t ch\u1ed7",3,"ngModel","ngModelChange","keydown.enter"],["cfLabel",""],["cfHint","",3,"hint",4,"ngIf"],["cf-button","","size","medium","type","secondary",1,"whitespace-nowrap","justify-center","mt-[28px]",3,"disabled","click"],["icon","search","size","small",1,"pr-3"],["class","flex-auto w-full max-h-[calc(100vh-152px)] py-4 px-[30px]",4,"ngIf"],["class","p-6",4,"ngIf"],["class","px-6 py-4 md:p-4 md:pb-[90px] flex justify-center",4,"ngIf"],["NATemplate",""],["NARightTemplate",""],["cfHint","",3,"hint"],[1,"flex-auto","w-full","max-h-[calc(100vh-152px)]","py-4","px-[30px]"],[1,"bg-white","w-full","h-full","rounded-lg","md:bg-transparent"],[1,"h-[500px]","flex","flex-col","justify-center","items-center"],[1,"flex","flex-col","justify-center","items-center"],[1,"mb-8"],["src","assets/images/web-page.svg","alt",""],[1,"text-heading-md","text-neutral-black","mb-2"],[1,"text-body-md-short","text-neutral-gray-5","md:text-center"],[1,"text-espressive-md"],[1,"mb-3"],["src","assets/images/empty-result.svg","alt",""],[1,"text-body-md-short","text-neutral-gray-5","text-center"],[1,"p-6"],[1,"px-6","py-4","md:p-4","md:pb-[90px]","flex","justify-center"],[1,"w-[764px]","h-full","flex","flex-col","gap-2"],[1,""],[1,"flex","gap-x-[20px]","mb-4","justify-between","items-center"],[1,"flex","gap-x-[20px]","mb-4"],[1,"w-1","bg-primary-2-4"],[1,"text-heading-md","text-neutral-black"],["cf-button","",3,"click"],["icon","external_link",1,"mr-2"],[1,"flex","flex-col","gap-y-2"],[1,"p-6","bg-white","rounded","shadow-cf-md"],[1,"h-[100px]","flex","justify-between","items-center","mb-6","gap-x-7"],[1,"h-full","w-full","flex","flex-col","gap-y-1.5","justify-center","items-center"],[1,"w-[120px]","h-[60px]","object-contain",3,"src"],[1,"text-body-sm","flex","flex-nowrap"],[1,"text-espressive-sm","whitespace-nowrap"],[1,"whitespace-nowrap"],[1,"h-5","flex","items-center","px-2","bg-neutral-gray-1","rounded","text-espressive-sm","text-neutral-black"],[1,"w-[2px]","h-full","border-l","border-dashed","border-neutral-gray-1"],[1,"h-full","w-[206px]","shrink-0","flex","flex-col","justify-center"],[1,"text-heading-sm","py-1","px-3","bg-neutral-gray-1","flex","gap-x-2","items-center","justify-center","w-fit","rounded"],["icon","arrow_right","size","small",4,"ngIf"],["icon","switch","size","small",4,"ngIf"],["class","mt-3 flex gap-x-2",4,"ngFor","ngForOf"],["class","w-[2px] h-full border-l border-dashed border-neutral-gray-1",4,"ngIf"],[1,"h-full","w-full","flex","flex-col","py-3","gap-[20px]"],[1,"text-body-md","text-neutral-black"],["CfSelectable","",1,"text-heading-lg"],[1,"text-espressive-md","text-neutral-black","flex","gap-2.5","items-center"],["icon","checkbox_checked","size","medium","class","text-secondary-5-4",4,"ngIf"],[1,"flex","flex-col","items-center"],[1,"text-espressive-md","text-neutral-black","whitespace-nowrap"],[4,"ngIf"],[1,"mb-2"],[1,"px-6","pt-6","pb-6","bg-white","rounded","shadow-cf-md"],[1,"table-auto","w-full"],[1,"border-b","border-neutral-gray-1"],[1,"text-left","text-espressive-sm","text-neutral-gray-4","pb-3"],[4,"ngFor","ngForOf"],["icon","arrow_right","size","small"],["icon","switch","size","small"],[1,"mt-3","flex","gap-x-2"],["icon","plane","size","small",1,"text-[#ccc]"],[1,"text-espressive-sm","text-neutral-black"],["icon","checkbox_checked","size","medium",1,"text-secondary-5-4"],[1,"mb-4","mt-6","flex","items-center","gap-x-2"],["icon","circle_information","size","small"],[1,"text-heading-sm","text-neutral-black"],["class","border border-dashed rounded border-neutral-gray-2 p-6 mb-6",4,"ngIf","ngIfElse"],["templateBookingFail",""],[1,"border","border-dashed","rounded","border-neutral-gray-2","p-6","mb-6"],[1,"flex","justify-between","items-center","gap-x-16","border-b","border-neutral-gray-1","pb-2"],[1,"flex","justify-between","items-center","w-full"],[1,"px-3","bg-secondary-5-1","rounded","text-body-md","text-secondary-5-5"],[1,"text-espressive-md","text-neutral-black"],[1,"flex","justify-between","items-center","gap-x-16","border-b","border-neutral-gray-1","py-3"],[1,"w-full","mb-6","bg-secondary-6-1","rounded","text-body-md","py-[10px]","px-[18px]","text-secondary-6-5","break-all"],[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","py-3"],[1,"text-right","text-body-md","text-neutral-black","py-3"],[1,"text-heading-md"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._uU(3,"M\u1edf \u0111\u1eb7t ch\u1ed7"),e.qZA(),e.TgZ(4,"div",3)(5,"cf-input-group",4),e._UZ(6,"cf-icon",5),e.TgZ(7,"input",6),e.NdJ("ngModelChange",function(r){return i.bookingCode=r})("ngModelChange",function(){return i.bookingInputChange()})("keydown.enter",function(){return i.getBookingTicket()}),e.qZA(),e.TgZ(8,"label",7),e._uU(9,"M\xe3 \u0111\u1eb7t ch\u1ed7 (PNR)"),e.qZA(),e.YNc(10,Tt,1,1,"cf-input-hint",8),e.qZA(),e.TgZ(11,"button",9),e.NdJ("click",function(){return i.getBookingTicket()}),e._UZ(12,"cf-icon",10),e._uU(13," T\xecm ki\u1ebfm "),e.qZA()()(),e.TgZ(14,"div"),e.YNc(15,yt,13,0,"div",11),e.YNc(16,Et,16,1,"div",11),e.YNc(17,Dt,5,0,"div",12),e.YNc(18,Pt,67,15,"div",13),e.qZA()(),e.YNc(19,Ut,2,0,"ng-template",null,14,e.W1O),e.YNc(21,qt,2,0,"ng-template",null,15,e.W1O),e.YNc(23,Jt,2,0,"ng-template",null,15,e.W1O)),2&t&&(e.xp6(5),e.Q6J("status",i.validInput()?"default":"error"),e.xp6(2),e.Q6J("ngModel",i.bookingCode),e.xp6(3),e.Q6J("ngIf",!i.validInput()),e.xp6(1),e.Q6J("disabled",!i.validBooking()||"LOADING"===i.state),e.xp6(4),e.Q6J("ngIf","SEARCH"===i.state),e.xp6(1),e.Q6J("ngIf","EMPTY"===i.state),e.xp6(1),e.Q6J("ngIf","LOADING"===i.state),e.xp6(1),e.Q6J("ngIf","SUCCESS"===i.state))},dependencies:[h.ez,h.sg,h.O5,h.uU,d.u5,d.Fj,d.JJ,d.On,E.j$,E.ND,E.BN,E.v2,_.AxE,_.Sm8,B.N8,B.Xq,j.IA,d.UX,M.DW],encapsulation:2}),n})();function Ht(n,s){1&n&&e._UZ(0,"cf-hint",29),2&n&&e.Q6J("hint","Ch\u01b0a nh\u1eadp booking code")}function Qt(n,s){if(1&n&&(e.TgZ(0,"cf-radio",36),e._uU(1),e.qZA()),2&n){const t=s.$implicit;e.Q6J("value",t.value),e.xp6(1),e.Oqu(t.text)}}function jt(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",30)(1,"div",31)(2,"cf-radio-group",32),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.mobileProviderChange(o))}),e.YNc(3,Qt,2,2,"cf-radio",33),e.qZA()(),e.TgZ(4,"div",34)(5,"button",35),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.providerOptionChange())}),e._uU(6,"X\xe1c nh\u1eadn"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngModel",t.searchForm.controls.provider.value),e.xp6(1),e.Q6J("ngForOf",t.providerSelectOption)}}function Lt(n,s){if(1&n&&(e.TgZ(0,"cf-radio",36),e._uU(1),e.qZA()),2&n){const t=s.$implicit;e.Q6J("value",t.value),e.xp6(1),e.Oqu(t.text)}}function Yt(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",30)(1,"div",31)(2,"cf-radio-group",32),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.mobileSupplierChange(o))}),e.YNc(3,Lt,2,2,"cf-radio",33),e.qZA()(),e.TgZ(4,"div",34)(5,"button",35),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.supplierOptionChange())}),e._uU(6,"X\xe1c nh\u1eadn"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngModel",t.searchForm.controls.supplier.value),e.xp6(1),e.Q6J("ngForOf",t.supplierSelectOption)}}const W=function(n){return{"opacity-50 pointer-events-none cursor-default":n}};function Vt(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",37)(1,"div",38)(2,"cf-input-group",20),e._UZ(3,"cf-icon",7)(4,"input",39),e.qZA(),e.TgZ(5,"cf-select",40),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.mobileProviderChange(o))}),e.TgZ(6,"label",41),e._uU(7,"Provider"),e.qZA()(),e.TgZ(8,"cf-select",42)(9,"label",41),e._uU(10,"Nh\xe0 cung c\u1ea5p"),e.qZA()()(),e.TgZ(11,"div")(12,"button",43),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onMobileSearch())}),e._UZ(13,"cf-icon",44),e.TgZ(14,"div"),e._uU(15,"T\xecm ki\u1ebfm"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(4),e.Q6J("formControl",t.searchForm.controls.searchText),e.xp6(1),e.Q6J("ngModel",t.searchForm.controls.provider.value)("data",t.providerSelectOption)("allowSearch",!1),e.xp6(3),e.Q6J("formControl",t.searchForm.controls.supplier)("data",t.supplierSelectOption)("allowSearch",!1)("ngClass",e.VKq(8,W,t.isDisableSupplier))}}function Kt(n,s){1&n&&(e.TgZ(0,"div",45)(1,"div",46)(2,"div",47)(3,"div",48)(4,"div",49),e._UZ(5,"img",50),e.qZA(),e.TgZ(6,"div",51),e._uU(7," Nh\u1eadp m\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\u1ec3 import v\xe9 "),e.qZA(),e.TgZ(8,"div",52),e._uU(9," Vui l\xf2ng nh\u1eadp m\xe3 \u0111\u1eb7t ch\u1ed7 c\u1ee7a b\u1ea1n v\xe0o \xf4 b\xean tr\xean v\xe0 ch\u1ecdn n\xfat "),e.TgZ(10,"span",53),e._uU(11,"T\xecm ki\u1ebfm"),e.qZA(),e._uU(12," \u0111\u1ec3 b\u1eaft \u0111\u1ea7u "),e.qZA()()()()())}function zt(n,s){1&n&&(e.ynx(0),e.TgZ(1,"div",51),e._uU(2," Kh\xf4ng c\xf3 k\u1ebft qu\u1ea3 "),e.qZA(),e.TgZ(3,"div",55)(4,"div"),e._uU(5,"Kh\xf4ng c\xf3 k\u1ebft qu\u1ea3 \u0111\u1ec3 hi\u1ec3n th\u1ecb"),e.qZA(),e.TgZ(6,"div"),e._uU(7,"Vui l\xf2ng th\u1eed l\u1ea1i sau ho\u1eb7c ki\u1ec3m tra l\u1ea1i th\xf4ng tin m\xe3 \u0111\u1eb7t ch\u1ed7!"),e.qZA()(),e.BQk())}function Gt(n,s){if(1&n&&(e.TgZ(0,"div",45)(1,"div",46)(2,"div",47)(3,"div",48)(4,"div",49),e._UZ(5,"img",54),e.qZA(),e.YNc(6,zt,8,0,"ng-container",28),e.qZA()()()()),2&n){const t=e.oxw();e.xp6(6),e.Q6J("ngIf","not_found"===t.stateMode)}}function $t(n,s){if(1&n){const t=e.EpF();e.TgZ(0,"div",56)(1,"import-pnr-detail",57),e.NdJ("importBooking",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onImportBooking())})("selectedAgent",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.onSelectedAgent(o))}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("optionAgent",t.agentSelectOption)("isLoading",t.isLoading)("bookingDetail",t.bookingDetail)("priceDetail",t.priceDetail)}}function Xt(n,s){1&n&&(e.TgZ(0,"div",58)(1,"div",59),e._UZ(2,"ticket-item-skeleton",60)(3,"ticket-item-skeleton",60)(4,"ticket-item-skeleton",60)(5,"ticket-item-skeleton",60),e.qZA()())}function Wt(n,s){1&n&&e._UZ(0,"cf-spinner")}let Rt=(()=>{class n{constructor(t,i,o,r,a,l,u,p){this._fb=t,this._searchFlightService=i,this._flightDataService=o,this._userService=r,this._toastService=a,this._router=l,this._modal=u,this._bottomSheetService=p,this.stateMode="search_default",this.isLoadingImport=!1,this.isLoading=!1,this.isDisableSupplier=!0,this.providerSelectOption=[],this.supplierSelectOption=[],this.agentSelectOption=[],this.getAllAgentUser()}ngOnInit(){this.initSelectOption(),this.searchForm=this._fb.group({provider:["",d.kI.required],supplier:[""],searchText:["",d.kI.required]})}initSelectOption(){this.providerSelectOption=[{text:"Vietnam Airlines",value:"VN"},{text:"Bamboo Airways",value:"QH"},{text:"Vietjet Air",value:"VJ"},{text:"Vietravel Airlines",value:"VU"},{text:"1A",value:"BSP"},{text:"1G",value:"AIR_1G"},{text:"LCC",value:"FLY_ONE"}],this.supplierSelectOption=[...Object.entries(L.f$).map(([t,i])=>({text:t,value:i}))]}onSearch(){var t,i;if(this.searchForm.invalid)return;const o=this.searchForm.value,r={provider:o.provider||"",bookingCode:(null===(i=null===(t=o.searchText)||void 0===t?void 0:t.trim())||void 0===i?void 0:i.toUpperCase())||"",supplier:"VN"===o.provider&&o.supplier||null};this.isLoading=!0,this._searchFlightService.searchPNRImport(r).pipe((0,Z.x)(()=>this.isLoading=!1)).subscribe({next:a=>{"OK"===a.status?(console.log(a),this.stateMode="has_value",this.initBookingDetail(a.data),a.data.totalCharges&&this.initPriceDetail(a.data)):(this.stateMode="not_found",this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:a.objectError.errorDescription.vi?a.objectError.errorDescription.vi:a.objectError.errorDescription.en,sticky:!0}))},error:()=>{this._toastService.add({severity:"error",summary:"T\xecm ki\u1ebfm v\xe9 th\u1ea5t b\u1ea1i",detail:"C\xf3 l\u1ed7i x\u1ea3y ra",sticky:!0})}})}initBookingDetail(t){var i,o,r,a;this.bookingDetail={bookingCode:t.bookingCode,provider:t.provider||"",supplier:t.supplier||"",airlineLogo:this._flightDataService.getAirlineLogoByCode(t.airline),airlineSystem:t.airline,airlineName:this._flightDataService.getAirlineSystemNameByCode(t.airline),startPoint:(null===(i=t.journeys[0])||void 0===i?void 0:i.departure.airport.code)||"",endPoint:t.journeys.length?1===t.journeys.length?t.journeys[0].arrival.airport.code:t.journeys[t.journeys.length-1].departure.airport.code:"",statusText:t.getStatusText(),internal:t.internal,status:t.state,flightNumber:t.journeys.length?`${t.journeys[0].airline}${t.journeys[0].segments[0].flightNumber}`:"",journeys:(null===(o=t.journeys)||void 0===o?void 0:o.map(l=>{var u;return{startPoint:l.departure.airport.code,endPoint:l.arrival.airport.code,startTime:J(l.departure.localTime).toDate(),flightNumber:l.segments[0].operating+l.segments[0].flightNumber,segments:null===(u=l.segments)||void 0===u?void 0:u.map(p=>({airline:p.airline,startPoint:p.departure.airport.code,endPoint:p.arrival.airport.code,startTime:p.departure.localTime,endTime:p.arrival.localTime,flightNumber:p.flightNumber}))}}))||[],passengers:t.passengers.map(l=>({name:l.getName(),type:l.getType(),index:l.index,key:l.key,birthday:l.birthday,lastName:l.lastName,firstName:l.firstName,parentKey:l.parentKey,gender:l.gender,base:l.base,tax:l.tax,total:l.total,document:l.document})),ticketingAllowed:null!==(a=null===(r=t.bookDetail)||void 0===r?void 0:r.ticketingAllowed)&&void 0!==a&&a}}initPriceDetail(t){var i,o,r;const a=t.passengers.map(l=>({name:l.getName(),type:l.type,typeName:l.getType(),key:l.key}));this.priceDetail={provider:t.journeys.map(l=>l.airline||l.operating),totalBasePrice:t.totalCharges.total.totalFareCharge,totalDiscountBasePrice:0,totalServiceFee:t.totalCharges.total.totalServiceFee,totalAddonService:t.totalCharges.total.totalAddonCharge,totalPrice:t.totalCharges.total.total,totalDiscountFareCharge:0,totalOthersCharge:t.totalCharges.total.totalOthersCharge,passengers:a.map(l=>{var u;return{name:l.name,type:l.typeName,base:t.fareCharges.getBaseCharge(l.type),tax:t.fareCharges.getTaxCharge(l.type)+t.fareCharges.getVATCharge(l.type),discountAmount:null===(u=t.fareCharges)||void 0===u?void 0:u.getDiscountByPercent(l.type,this.discountPercentage),total:t.fareCharges.getTotalCharge(l.type),get totalDiscountFarePrice(){return this.total-this.discountAmount}}})},this.totalDiscountAmount=null===(i=this.priceDetail.passengers)||void 0===i?void 0:i.reduce((l,u)=>l+((null==u?void 0:u.discountAmount)||0),0),this.priceDetail.totalDiscountBasePrice=this.priceDetail.totalBasePrice-this.totalDiscountAmount,this.priceDetail.totalDiscountFareCharge=null!==(o=this.priceDetail)&&void 0!==o&&o.totalPrice?(null===(r=this.priceDetail)||void 0===r?void 0:r.totalPrice)-this.totalDiscountAmount:0}onProviderChange(t){this.checkDisableSupplier(t.value)}checkDisableSupplier(t){"VN"!==t?(this.isDisableSupplier=!0,this.searchForm.get("supplier").clearValidators(),this.searchForm.get("supplier").updateValueAndValidity()):(this.isDisableSupplier=!1,this.searchForm.get("supplier").setValidators([d.kI.required]),this.searchForm.get("supplier").updateValueAndValidity())}onSelectedAgent(t){this.agentSelected=t}getAllAgentUser(){this._userService.getAutocompleteUser().subscribe({next:t=>{t.success&&(this.agentSelectOption=t.data.map(i=>({id:i.id,name:`${i.username} - ${i.name}`})))}})}onImportBooking(){this._modal.open(D.V0,{title:"",body:"X\xe1c nh\u1eadn import v\xe9 n\xe0y v\xe0o h\u1ec7 th\u1ed1ng?",okText:"Import",cancelText:"\u0110\xf3ng",hasIcon:!1}).afterClosed$.subscribe({next:i=>{var o;if(i.data){const r={agentId:(null===(o=this.agentSelected)||void 0===o?void 0:o.id)||"",bookingCode:this.bookingDetail.bookingCode||"",provider:this.bookingDetail.provider||"",supplier:this.bookingDetail.supplier||null};this.isLoadingImport=!0,this._searchFlightService.importPNROutside(r).pipe((0,Z.x)(()=>this.isLoadingImport=!1)).subscribe({next:a=>{console.log(a),"OK"===a.status?(this._toastService.add({severity:"success",summary:"Import v\xe9 th\xe0nh c\xf4ng",detail:"M\xe3 \u0111\u1eb7t ch\u1ed7 \u0111\xe3 \u0111\u01b0\u1ee3c import v\xe9 th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate([`/admin/booking-detail/${this.bookingDetail.airlineSystem}/${this.bookingDetail.bookingCode}`])):this._toastService.add({severity:"error",summary:"Import v\xe9 th\u1ea5t b\u1ea1i",detail:a.objectError.errorDescription.vi?a.objectError.errorDescription.vi:a.objectError.errorDescription.en,sticky:!0})},error:()=>{this._toastService.add({severity:"error",summary:"Import v\xe9 th\u1ea5t b\u1ea1i",detail:"C\xf3 l\u1ed7i x\u1ea3y ra, vui l\xf2ng th\u1eed l\u1ea1i sau!",sticky:!0})}})}}})}openProviderBts(t){const i=this._bottomSheetService.open(t,{headerTitle:"Provider",rightButtonIcon:"",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});i.containerInstance._leftButtonClick.subscribe(()=>i.dismiss())}openSupplierBts(t){if(this.isDisableSupplier)return;const i=this._bottomSheetService.open(t,{headerTitle:"Nh\xe0 cung c\u1ea5p",rightButtonIcon:"",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});i.containerInstance._leftButtonClick.subscribe(()=>i.dismiss())}openSearchBts(t){const i=this._bottomSheetService.open(t,{headerTitle:"T\xecm ki\u1ebfm",rightButtonIcon:"",leftButtonIcon:"close",containerFullHeigh:!0,leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});i.containerInstance._leftButtonClick.subscribe(()=>i.dismiss())}mobileProviderChange(t){this.tempMobileProvider=t,this.checkDisableSupplier(this.tempMobileProvider)}mobileSupplierChange(t){this.tempMobileSupplier=t}providerOptionChange(){this.checkDisableSupplier(this.tempMobileProvider),this.searchForm.controls.provider.setValue(this.tempMobileProvider),this._bottomSheetService.dismiss(),this.onSearch()}supplierOptionChange(){this.searchForm.controls.supplier.setValue(this.tempMobileSupplier),this._bottomSheetService.dismiss(),this.onSearch()}onMobileSearch(){this.tempMobileProvider&&this.searchForm.controls.provider.setValue(this.tempMobileProvider),this._bottomSheetService.dismiss(),this.onSearch()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(d.qu),e.Y36(X.t7),e.Y36(Q.G),e.Y36(oe.KD),e.Y36(Y.BX),e.Y36(q.F0),e.Y36($.oE),e.Y36(M.a2))},n.\u0275cmp=e.Xpm({type:n,selectors:[["import-pnr-page"]],standalone:!0,features:[e.jDz],decls:41,vars:22,consts:[[1,"flex-auto","flex","flex-col","w-full"],[1,"bg-white","p-[30px]","w-full","shadow-sm","flex","flex-col","gap-y-[30px]","md:hidden"],[1,"text-heading-lg"],[1,"flex","gap-x-3","items-start","min-h-[60px]"],["textField","text","valueField","value","size","medium","placeholder","Ch\u1ecdn provider",1,"w-[180px]",3,"formControl","data","allowSearch","selectedChange"],["textField","text","valueField","value","size","medium","placeholder","Ch\u1ecdn nh\xe0 cung c\u1ea5p",1,"w-[180px]",3,"formControl","data","allowSearch","ngClass"],[1,"flex-1",3,"status"],["cfHeadIcon","","icon","search","size","small"],["size","medium","cf-input","","placeholder","Nh\u1eadp booking code",3,"formControl"],["tableSearchInput",""],["cfHint","",3,"hint",4,"ngIf"],["cf-button","","size","medium","type","secondary",1,"!text-button-md",3,"disabled","click"],["icon","search","size","small",1,"mr-2.5"],[1,"hidden","md:flex","flex-col","py-3","px-4","gap-y-3","pr-0","bg-neutral-white"],[1,"text-heading-sm","text-neutral-gray-6"],[1,"flex","gap-x-3","overflow-x-auto"],[1,"gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]","hidden","md:flex",3,"click"],[1,"text-body-md","whitespace-nowrap"],["icon","chevron_down","size","small",1,"text-neutral-gray-5"],[1,"gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]","hidden","md:flex",3,"ngClass","click"],[1,"hidden","!w-full","md:pr-4","md:block"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm",3,"formControl","focus"],["providerOptionMobile",""],["supplierOptionMobile",""],["searchBts",""],["class","flex-auto w-full max-h-[calc(100vh-152px)] py-4 px-[30px] md:p-0",4,"ngIf"],["class","flex-auto flex justify-center w-full max-h-[calc(100vh-152px)] py-4",4,"ngIf"],["class","flex-auto flex justify-center w-full max-h-[calc(100vh-152px)] py-4 px-[30px]",4,"ngIf"],[4,"ngIf"],["cfHint","",3,"hint"],[1,"flex","flex-col","justify-between","w-full"],[1,"p-4","pb-2"],[1,"flex","flex-col","gap-y-4",3,"ngModel","ngModelChange"],["size","medium",3,"value",4,"ngFor","ngForOf"],[1,"p-4"],["cf-button","",1,"justify-center","w-full",3,"click"],["size","medium",3,"value"],[1,"p-4","w-full","flex","flex-col","justify-between"],[1,"flex","flex-col","gap-y-4"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm",3,"formControl"],["textField","text","valueField","value","size","medium","placeholder","Ch\u1ecdn provider",1,"w-full","max-w-none","mr-4",3,"ngModel","data","allowSearch","ngModelChange"],["cfLabel",""],["textField","text","valueField","value","size","medium","placeholder","Ch\u1ecdn nh\xe0 cung c\u1ea5p",1,"w-full","max-w-none","mr-4",3,"formControl","data","allowSearch","ngClass"],["cf-button","",1,"w-full","justify-center","gap-x-2",3,"click"],["icon","search","size","small"],[1,"flex-auto","w-full","max-h-[calc(100vh-152px)]","py-4","px-[30px]","md:p-0"],[1,"bg-white","w-full","h-full","rounded-lg","md:bg-transparent"],[1,"h-[500px]","flex","flex-col","justify-center","items-center"],[1,"flex","flex-col","justify-center","items-center"],[1,"mb-8"],["src","assets/images/web-page.svg","alt",""],[1,"text-heading-md","text-neutral-black","mb-2"],[1,"text-espressive-md","text-neutral-gray-5","md:w-[257px]","md:text-center"],[1,"text-espressive-md"],["src","assets/images/empty-result.svg","alt",""],[1,"text-espressive-md","text-neutral-gray-5","text-center","md:w-[257px]"],[1,"flex-auto","flex","justify-center","w-full","max-h-[calc(100vh-152px)]","py-4"],[1,"w-fit",3,"optionAgent","isLoading","bookingDetail","priceDetail","importBooking","selectedAgent"],[1,"flex-auto","flex","justify-center","w-full","max-h-[calc(100vh-152px)]","py-4","px-[30px]"],[1,"flex","flex-col","justify-center","items-center","w-full","h-full"],[1,"w-full"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._uU(3,"Import v\xe9"),e.qZA(),e.TgZ(4,"div",3)(5,"cf-select",4),e.NdJ("selectedChange",function(a){return i.onProviderChange(a)}),e.qZA(),e._UZ(6,"cf-select",5),e.TgZ(7,"cf-input-group",6),e._UZ(8,"cf-icon",7)(9,"input",8,9),e.YNc(11,Ht,1,1,"cf-hint",10),e.qZA(),e.TgZ(12,"button",11),e.NdJ("click",function(){return i.onSearch()}),e._UZ(13,"cf-icon",12),e._uU(14," T\xecm ki\u1ebfm "),e.qZA()()(),e.TgZ(15,"div",13)(16,"div",14),e._uU(17,"Import v\xe9"),e.qZA(),e.TgZ(18,"div",15)(19,"div",16),e.NdJ("click",function(){e.CHM(o);const a=e.MAs(31);return e.KtG(i.openProviderBts(a))}),e.TgZ(20,"div",17),e._uU(21,"Ch\u1ecdn provider"),e.qZA(),e._UZ(22,"cf-icon",18),e.qZA(),e.TgZ(23,"div",19),e.NdJ("click",function(){e.CHM(o);const a=e.MAs(33);return e.KtG(i.openSupplierBts(a))}),e.TgZ(24,"div",17),e._uU(25,"Ch\u1ecdn nh\xe0 cung c\u1ea5p"),e.qZA(),e._UZ(26,"cf-icon",18),e.qZA()(),e.TgZ(27,"cf-input-group",20),e._UZ(28,"cf-icon",7),e.TgZ(29,"input",21),e.NdJ("focus",function(){e.CHM(o);const a=e.MAs(35);return e.KtG(i.openSearchBts(a))}),e.qZA()()(),e.YNc(30,jt,7,2,"ng-template",null,22,e.W1O),e.YNc(32,Yt,7,2,"ng-template",null,23,e.W1O),e.YNc(34,Vt,16,10,"ng-template",null,24,e.W1O),e.YNc(36,Kt,13,0,"div",25),e.YNc(37,Gt,7,1,"div",25),e.YNc(38,$t,2,4,"div",26),e.YNc(39,Xt,6,0,"div",27),e.qZA(),e.YNc(40,Wt,1,0,"cf-spinner",28)}2&t&&(e.xp6(5),e.Q6J("formControl",i.searchForm.controls.provider)("data",i.providerSelectOption)("allowSearch",!1),e.xp6(1),e.Q6J("formControl",i.searchForm.controls.supplier)("data",i.supplierSelectOption)("allowSearch",!1)("ngClass",e.VKq(18,W,i.isDisableSupplier)),e.xp6(1),e.Q6J("status",i.searchForm.controls.searchText.invalid&&(i.searchForm.controls.searchText.dirty||i.searchForm.controls.searchText.touched)?"error":"default"),e.xp6(2),e.Q6J("formControl",i.searchForm.controls.searchText),e.xp6(2),e.Q6J("ngIf",(null==i.searchForm.controls.searchText.errors?null:i.searchForm.controls.searchText.errors.required)&&(i.searchForm.controls.searchText.dirty||i.searchForm.controls.searchText.touched)),e.xp6(1),e.Q6J("disabled",i.isLoading||i.searchForm.invalid),e.xp6(11),e.Q6J("ngClass",e.VKq(20,W,i.isDisableSupplier)),e.xp6(6),e.Q6J("formControl",i.searchForm.controls.searchText),e.xp6(7),e.Q6J("ngIf",!i.isLoading&&"search_default"===i.stateMode),e.xp6(1),e.Q6J("ngIf",!i.isLoading&&("not_found"===i.stateMode||"cancelled"===i.stateMode||"issued"===i.stateMode)),e.xp6(1),e.Q6J("ngIf",!i.isLoading&&"has_value"===i.stateMode),e.xp6(1),e.Q6J("ngIf",i.isLoading),e.xp6(1),e.Q6J("ngIf",i.isLoadingImport))},dependencies:[h.ez,h.mk,h.sg,h.O5,E.j$,E.ND,E.BN,_.AxE,_.Sm8,B.N8,B.Xq,K.q,d.u5,d.Fj,d.JJ,d.On,d.UX,d.oH,G.m,S.UD,D.OR,j.IA,I.o,I.T,M.DW],encapsulation:2}),n})()},34541:(R,P,m)=>{m.d(P,{C:()=>B});var h=m(36895),d=m(94650);let B=(()=>{class w{constructor(_,E,V){this.elementRef=_,this.renderer=E,this.document=V}set CfRequired(_){if(_){const E=this.document.createElement("span");E.innerHTML=" (*)",E.className="text-primary-1-4 text-espressive-sm",this.renderer.appendChild(this.elementRef.nativeElement,E)}}}return w.\u0275fac=function(_){return new(_||w)(d.Y36(d.SBq),d.Y36(d.Qsj),d.Y36(h.K0))},w.\u0275dir=d.lG2({type:w,selectors:[["","CfRequired",""]],inputs:{CfRequired:"CfRequired"},standalone:!0}),w})()},3447:(R,P,m)=>{m.d(P,{E:()=>h});const h=d=>d.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\u0111/g,"d").replace(/\u0110/g,"D")}}]);