-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path6285.88d8a36de95c71d4.js
1 lines (1 loc) · 30.4 KB
/
6285.88d8a36de95c71d4.js
1
"use strict";(self.webpackChunkcheapflightclient=self.webpackChunkcheapflightclient||[]).push([[6285],{36285:(k,E,o)=>{o.r(E),o.d(E,{GeneralPageComponent:()=>pe});var v=o(76978),a=o(67460),p=o(36895),u=o(24006),_=o(83700),m=o(27898),c=o(72506),f=o(44143),h=o(74713),x=o(34541),C=o(7453),y=o(39102),D=o(54004),Z=o(28746),F=o(40899),U=o(4688),T=o(37094),e=o(94650),S=o(85522),P=o(61027),G=o(62331),B=o(97579),J=o(82761),A=o(80529),N=o(88001);const b={headers:new A.WM({"Content-Type":"application/json"})};let w=(()=>{class i{constructor(t,r){this.http=t,this.appConfig=r}getBookingTicket(t){return this.http.post(this.appConfig.apiUrl+"notification/zalo-link",JSON.stringify({code:t}),b)}getAllStatusThirdParty(){return this.http.get(this.appConfig.apiUrl+"notification/get-status-third-party",b)}unlinkZalo(){return this.http.post(this.appConfig.apiUrl+"notification/unlink-zalo",b)}}return i.\u0275fac=function(t){return new(t||i)(e.LFG(A.eN),e.LFG(N.qB))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var q=o(9381);function Q(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",15),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.showSurchargeFee=!n.showSurchargeFee)}),e.TgZ(1,"span"),e._uU(2,"M\u1edf r\u1ed9ng"),e.qZA(),e._UZ(3,"cf-icon",16),e.qZA()}}function I(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",15),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.showSurchargeFee=!n.showSurchargeFee)}),e.TgZ(1,"span"),e._uU(2,"Thu g\u1ecdn"),e.qZA(),e._UZ(3,"cf-icon",17),e.qZA()}}function z(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",20)(1,"div",21)(2,"div",22)(3,"div",23),e._uU(4,"Vietnam Airlines"),e.qZA(),e.TgZ(5,"div",24)(6,"div",25),e._UZ(7,"img",26),e.TgZ(8,"span",27),e._uU(9,"VN"),e.qZA()(),e._UZ(10,"cf-input-number",28),e.TgZ(11,"span",29),e._uU(12,"\u0111"),e.qZA()(),e.TgZ(13,"div",30),e._uU(14,"M\u1ee9c ph\xed \xe1p d\u1ee5ng cho 1 h\xe0nh kh\xe1ch/h\xe0nh tr\xecnh (journey)"),e.qZA()(),e.TgZ(15,"div",22)(16,"div",23),e._uU(17,"Bamboo Airways"),e.qZA(),e.TgZ(18,"div",24)(19,"div",25),e._UZ(20,"img",26),e.TgZ(21,"span",27),e._uU(22,"QH"),e.qZA()(),e._UZ(23,"cf-input-number",28),e.TgZ(24,"span",29),e._uU(25,"\u0111"),e.qZA()(),e.TgZ(26,"div",30),e._uU(27,"M\u1ee9c ph\xed \xe1p d\u1ee5ng cho 1 h\xe0nh kh\xe1ch/h\xe0nh tr\xecnh (journey)"),e.qZA()(),e.TgZ(28,"div",22)(29,"div",23),e._uU(30,"VietJet Air"),e.qZA(),e.TgZ(31,"div",24)(32,"div",25),e._UZ(33,"img",26),e.TgZ(34,"span",27),e._uU(35,"VJ"),e.qZA()(),e._UZ(36,"cf-input-number",28),e.TgZ(37,"span",29),e._uU(38,"\u0111"),e.qZA()(),e.TgZ(39,"div",30),e._uU(40,"M\u1ee9c ph\xed \xe1p d\u1ee5ng cho 1 h\xe0nh kh\xe1ch/h\xe0nh tr\xecnh (journey)"),e.qZA()(),e.TgZ(41,"div",22)(42,"div",23),e._uU(43,"Vietravel Airlines"),e.qZA(),e.TgZ(44,"div",24)(45,"div",25),e._UZ(46,"img",26),e.TgZ(47,"span",27),e._uU(48,"VU"),e.qZA()(),e._UZ(49,"cf-input-number",28),e.TgZ(50,"span",29),e._uU(51,"\u0111"),e.qZA()(),e.TgZ(52,"div",30),e._uU(53,"M\u1ee9c ph\xed \xe1p d\u1ee5ng cho 1 h\xe0nh kh\xe1ch/h\xe0nh tr\xecnh (journey)"),e.qZA()(),e.TgZ(54,"div",22)(55,"div",23),e._uU(56,"H\u1ec7 th\u1ed1ng 1A, 1G (1 h\xe0nh kh\xe1ch/h\xe0nh tr\xecnh)"),e.qZA(),e.TgZ(57,"div",24)(58,"div",25),e._UZ(59,"img",26),e.TgZ(60,"span",27),e._uU(61,"1A, 1G"),e.qZA()(),e._UZ(62,"cf-input-number",28),e.TgZ(63,"span",29),e._uU(64,"\u0111"),e.qZA()(),e.TgZ(65,"cf-checkbox",31),e.NdJ("checkChange",function(n){e.CHM(t);const d=e.oxw(3);return e.KtG(d.checkedChange(n))}),e._uU(66," \xc1p d\u1ee5ng m\u1ee9c ph\xed tr\xean cho chuy\u1ebfn bay kh\u1ee9 h\u1ed3i "),e.qZA()()(),e.TgZ(67,"div",32)(68,"button",33),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(3);return e.KtG(n.updateSurchargeFeeConfig())}),e._UZ(69,"cf-icon",34),e._uU(70," C\u1eadp nh\u1eadt "),e.qZA()()()}if(2&i){const t=e.oxw(3);e.xp6(7),e.Q6J("src","assets/icons/vn-icon.svg",e.LSH),e.xp6(3),e.Q6J("placeholder","0")("formControl",t.surchargeFeeForm.controls.amountVN),e.xp6(10),e.Q6J("src","assets/icons/qh-icon.svg",e.LSH),e.xp6(3),e.Q6J("placeholder","0")("formControl",t.surchargeFeeForm.controls.amountQH),e.xp6(10),e.Q6J("src","assets/icons/vj-icon.svg",e.LSH),e.xp6(3),e.Q6J("placeholder","0")("formControl",t.surchargeFeeForm.controls.amountVJ),e.xp6(10),e.Q6J("src","assets/icons/vu-icon.png",e.LSH),e.xp6(3),e.Q6J("placeholder","0")("formControl",t.surchargeFeeForm.controls.amountVU),e.xp6(10),e.Q6J("src","assets/icons/airline-default.svg",e.LSH),e.xp6(3),e.Q6J("placeholder","0")("formControl",t.surchargeFeeForm.controls.amountGDS),e.xp6(3),e.Q6J("checked",!!t.surchargeFeeForm.controls.roundTripGDS.value)}}function V(i,s){1&i&&(e.TgZ(0,"div"),e._UZ(1,"ticket-item-skeleton")(2,"ticket-item-skeleton")(3,"ticket-item-skeleton"),e.qZA())}function H(i,s){if(1&i&&(e.TgZ(0,"div",18),e.YNc(1,z,71,16,"div",19),e.YNc(2,V,4,0,"div",7),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!t.isLoaddingGeneral),e.xp6(1),e.Q6J("ngIf",t.isLoaddingGeneral)}}function L(i,s){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"div",10)(3,"div",11),e._uU(4,"Ph\xed ph\u1ee5 thu m\u1eb7c \u0111\u1ecbnh"),e.qZA(),e.TgZ(5,"div",12),e._uU(6," Ph\xed ph\u1ee5 thu m\u1eb7c \u0111\u1ecbnh \u0111\u01b0\u1ee3c c\u1ed9ng th\xeam khi b\xe1o gi\xe1 v\xe0 chia s\u1ebb chuy\u1ebfn bay \u0111\u01b0\u1ee3c ch\u1ecdn "),e.qZA()(),e.YNc(7,Q,4,0,"div",13),e.YNc(8,I,4,0,"div",13),e.qZA(),e.YNc(9,H,3,2,"div",14),e.qZA()),2&i){const t=e.oxw();e.xp6(7),e.Q6J("ngIf",!t.showSurchargeFee),e.xp6(1),e.Q6J("ngIf",t.showSurchargeFee),e.xp6(1),e.Q6J("ngIf",t.showSurchargeFee)}}function Y(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",15),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.showBookingFace=!n.showBookingFace)}),e.TgZ(1,"span"),e._uU(2,"M\u1edf r\u1ed9ng"),e.qZA(),e._UZ(3,"cf-icon",16),e.qZA()}}function M(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",15),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.showBookingFace=!n.showBookingFace)}),e.TgZ(1,"span"),e._uU(2,"Thu g\u1ecdn"),e.qZA(),e._UZ(3,"cf-icon",17),e.qZA()}}function K(i,s){1&i&&e._UZ(0,"cf-input-hint",53),2&i&&e.Q6J("hint","Email kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function O(i,s){1&i&&e._UZ(0,"cf-input-hint",53),2&i&&e.Q6J("hint","\u0110\u1ecbnh d\u1ea1ng kh\xf4ng h\u1ee3p l\u1ec7")}function R(i,s){1&i&&e._UZ(0,"cf-input-hint",53),2&i&&e.Q6J("hint","S\u1ed1 \u0111i\u1ec7n tho\u1ea1i kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function j(i,s){1&i&&e._UZ(0,"cf-input-hint",53),2&i&&e.Q6J("hint","T\u1ed1i thi\u1ec3u 7 ch\u1eef s\u1ed1")}function W(i,s){1&i&&e._UZ(0,"cf-input-hint",53),2&i&&e.Q6J("hint","T\u1ed1i \u0111a 11 ch\u1eef s\u1ed1")}const $=function(){return[]},te=function(){return{branding:!1,promotion:!1,base_url:"/tinymce",suffix:".min",plugins:"lists code",toolbar1:"styleselect | blocks | fontfamily fontsizeinput | outdent indent numlist bullist code",toolbar2:"bold italic | alignleft aligncenter alignright alignjustify | undo redo"}};function ie(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",36)(1,"div",37)(2,"div",38)(3,"div",39)(4,"div",40)(5,"label",41),e._uU(6," Email "),e.qZA()(),e.TgZ(7,"cf-input-group",42),e._UZ(8,"input",43),e.YNc(9,K,1,1,"cf-input-hint",44),e.YNc(10,O,1,1,"cf-input-hint",44),e.qZA(),e.TgZ(11,"div",45),e._uU(12,"Email c\xf3 th\u1ec3 kh\xe1c v\u1edbi email \u0111\u0103ng k\xfd"),e.qZA()(),e.TgZ(13,"div",39)(14,"div",40)(15,"label",41),e._uU(16," S\u1ed1 \u0111i\u1ec7n tho\u1ea1i "),e.qZA()(),e.TgZ(17,"cf-select",46)(18,"div",47),e._UZ(19,"input",48),e.qZA(),e.YNc(20,R,1,1,"cf-input-hint",44),e.YNc(21,j,1,1,"cf-input-hint",44),e.YNc(22,W,1,1,"cf-input-hint",44),e.qZA(),e.TgZ(23,"div",45),e._uU(24,"S\u1ed1 \u0111i\u1ec7n tho\u1ea1i c\xf3 th\u1ec3 kh\xe1c v\u1edbi s\u1ed1 \u0111i\u1ec7n tho\u1ea1i \u0111\u0103ng k\xfd "),e.qZA()()(),e.TgZ(25,"div",38)(26,"div",39)(27,"div",40)(28,"label",49),e._uU(29," \u0110\u1ecba ch\u1ec9 "),e.qZA()(),e.TgZ(30,"cf-input-group",42),e._UZ(31,"input",50),e.qZA()(),e.TgZ(32,"div",39)(33,"div",40)(34,"label",49),e._uU(35," Website "),e.qZA()(),e.TgZ(36,"cf-input-group",42),e._UZ(37,"input",51),e.qZA()()(),e._UZ(38,"editor",52),e.qZA(),e.TgZ(39,"div",32)(40,"button",33),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(3);return e.KtG(n.updateBookingFaceConfig())}),e._UZ(41,"cf-icon",34),e._uU(42," C\u1eadp nh\u1eadt "),e.qZA()()()}if(2&i){const t=e.oxw(3);e.xp6(5),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.bookingFaceForm.controls.email.invalid&&(t.bookingFaceForm.controls.email.dirty||t.bookingFaceForm.controls.email.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.bookingFaceForm.controls.email),e.xp6(1),e.Q6J("ngIf",(null==t.bookingFaceForm.controls.email.errors?null:t.bookingFaceForm.controls.email.errors.required)&&(t.bookingFaceForm.controls.email.dirty||t.bookingFaceForm.controls.email.touched)),e.xp6(1),e.Q6J("ngIf",t.bookingFaceForm.controls.email.hasError("email")&&(t.bookingFaceForm.controls.email.touched||t.bookingFaceForm.controls.email.dirty)),e.xp6(5),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.bookingFaceForm.controls.phone.invalid&&(t.bookingFaceForm.controls.phone.dirty||t.bookingFaceForm.controls.phone.touched)?"error":"default")("data",t.optionsAreaCode||e.DdM(19,$))("formControl",t.bookingFaceForm.controls.phoneArea),e.xp6(2),e.Q6J("formControl",t.bookingFaceForm.controls.phone),e.xp6(1),e.Q6J("ngIf",(null==t.bookingFaceForm.controls.phone.errors?null:t.bookingFaceForm.controls.phone.errors.required)&&(t.bookingFaceForm.controls.phone.dirty||t.bookingFaceForm.controls.phone.touched)),e.xp6(1),e.Q6J("ngIf",t.bookingFaceForm.controls.phone.hasError("minlength")&&(t.bookingFaceForm.controls.phone.touched||t.bookingFaceForm.controls.phone.dirty)),e.xp6(1),e.Q6J("ngIf",t.bookingFaceForm.controls.phone.hasError("maxlength")&&(t.bookingFaceForm.controls.phone.touched||t.bookingFaceForm.controls.phone.dirty)),e.xp6(8),e.Q6J("status","default"),e.xp6(1),e.Q6J("formControl",t.bookingFaceForm.controls.address),e.xp6(5),e.Q6J("status","default"),e.xp6(1),e.Q6J("formControl",t.bookingFaceForm.controls.website),e.xp6(1),e.Q6J("init",e.DdM(20,te))("formControl",t.bookingFaceForm.controls.footerAttention)}}function ne(i,s){1&i&&(e.TgZ(0,"div"),e._UZ(1,"ticket-item-skeleton")(2,"ticket-item-skeleton")(3,"ticket-item-skeleton"),e.qZA())}function oe(i,s){if(1&i&&(e.TgZ(0,"div",18),e.YNc(1,ie,43,21,"div",35),e.YNc(2,ne,4,0,"div",7),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!t.isLoaddingGeneral),e.xp6(1),e.Q6J("ngIf",t.isLoaddingGeneral)}}function ae(i,s){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"div",10)(3,"div",11),e._uU(4,"Th\xf4ng tin m\u1eb7t v\xe9"),e.qZA(),e.TgZ(5,"div",12),e._uU(6," Th\xf4ng tin \u0111\u1ea1i l\xfd hi\u1ec3n th\u1ecb tr\xean b\xe1o gi\xe1, m\u1eb7t v\xe9 v\xe0 chia s\u1ebb chuy\u1ebfn bay \u0111\u01b0\u1ee3c ch\u1ecdn "),e.qZA()(),e.YNc(7,Y,4,0,"div",13),e.YNc(8,M,4,0,"div",13),e.qZA(),e.YNc(9,oe,3,2,"div",14),e.qZA()),2&i){const t=e.oxw();e.xp6(7),e.Q6J("ngIf",!t.showBookingFace),e.xp6(1),e.Q6J("ngIf",t.showBookingFace),e.xp6(1),e.Q6J("ngIf",t.showBookingFace)}}function re(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",15),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.showThirdParty=!n.showThirdParty)}),e.TgZ(1,"span"),e._uU(2,"M\u1edf r\u1ed9ng"),e.qZA(),e._UZ(3,"cf-icon",16),e.qZA()}}function se(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",15),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.showThirdParty=!n.showThirdParty)}),e.TgZ(1,"span"),e._uU(2,"Thu g\u1ecdn"),e.qZA(),e._UZ(3,"cf-icon",17),e.qZA()}}function ce(i,s){1&i&&(e.TgZ(0,"cf-label",66),e._uU(1," \u0110\xe3 li\xean k\u1ebft "),e.qZA()),2&i&&e.Q6J("color","green")}function ue(i,s){if(1&i&&(e.TgZ(0,"div")(1,"a",67)(2,"button",68),e._UZ(3,"cf-icon",69),e._uU(4," K\u1ebft n\u1ed1i "),e.qZA()()()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("href",t.zaloLink,e.LSH)}}function le(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"button",70),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(3);return e.KtG(n.unlinkZalo())}),e._UZ(1,"cf-icon",71),e._uU(2," H\u1ee7y li\xean k\u1ebft "),e.qZA()}}function he(i,s){if(1&i&&(e.TgZ(0,"div",56)(1,"div",57),e._UZ(2,"img",58),e.TgZ(3,"div",59)(4,"div",60)(5,"div",61),e._uU(6,"K\u1ebft n\u1ed1i t\xe0i kho\u1ea3n Zalo"),e.qZA(),e.YNc(7,ce,2,1,"cf-label",62),e.qZA(),e.TgZ(8,"div",63),e._uU(9,"Ch\xfang t\xf4i g\u1eedi th\xf4ng b\xe1o ho\u1ea1t \u0111\u1ed9ng quan tr\u1ecdng t\u1edbi t\xe0i kho\u1ea3n Zalo c\u1ee7a b\u1ea1n."),e.qZA()()(),e.TgZ(10,"div",64),e.YNc(11,ue,5,1,"div",7),e.YNc(12,le,3,0,"button",65),e.qZA()()),2&i){const t=e.oxw(2);e.xp6(7),e.Q6J("ngIf",t.isZaloLinked),e.xp6(4),e.Q6J("ngIf",!t.isZaloLinked),e.xp6(1),e.Q6J("ngIf",t.isZaloLinked)}}function de(i,s){if(1&i&&(e.TgZ(0,"div",54)(1,"div",9)(2,"div",10)(3,"div",11),e._uU(4,"T\xe0i kho\u1ea3n li\xean k\u1ebft"),e.qZA(),e.TgZ(5,"div",12),e._uU(6," Qu\u1ea3n l\xfd c\xe1c t\xe0i kho\u1ea3n li\xean k\u1ebft v\u1edbi h\u1ec7 th\u1ed1ng Flychills "),e.qZA()(),e.YNc(7,re,4,0,"div",13),e.YNc(8,se,4,0,"div",13),e.qZA(),e.YNc(9,he,13,3,"div",55),e.qZA()),2&i){const t=e.oxw();e.xp6(7),e.Q6J("ngIf",!t.showThirdParty),e.xp6(1),e.Q6J("ngIf",t.showThirdParty),e.xp6(1),e.Q6J("ngIf",t.showThirdParty)}}function ge(i,s){1&i&&e._UZ(0,"cf-spinner")}let pe=(()=>{class i{constructor(t,r,n,d,g,l,me,fe,_e,ve,Ee){this._fb=r,this._phoneDataService=n,this._generalService=d,this._toastService=g,this._modal=l,this._permissionService=me,this.route=fe,this._linkPageService=_e,this._mobileDetectService=ve,this._bottomSheetService=Ee,this.optionsAreaCode=[],this.isUpdating=!1,this.isLoaddingGeneral=!1,this.isUpdateSurcharge=this._permissionService.hasPermission(F.or.CreateOrUpdateSurchargeFeeConfig),this.isUpdateInfoBookingFace=this._permissionService.hasPermission(F.or.CreateOrUpdateInfoBookingFaceConfig),this.isLinkThirdParty=this._permissionService.hasPermission(F.or.LinkThirdPartyApp),this.surchargeFeeData={amountVN:0,amountQH:0,amountVJ:0,amountVU:0,amountGDS:0,roundTripGDS:!1},this.isChangeSurchargeFee=!1,this.isChangeBookingFace=!1,this.initializedSurchargeFee=!0,this.initializedBookingFace=!0,this.showSurchargeFee=!1,this.showBookingFace=!1,this.showThirdParty=!1,t.registerIcons([c.HTW,c.SlW,c.UNF,c.fqi,c.n78])}ngOnInit(){this.optionsAreaCode=this._phoneDataService.optionsAreaCode,this.initLinkApp(),this.initFormGroup(),this.getGeneralConfig(),this.surchargeFeeForm.valueChanges.subscribe(()=>{this.initializedSurchargeFee||(this.isChangeSurchargeFee=!0),this.initializedSurchargeFee&&(this.initializedSurchargeFee=!1)}),this.bookingFaceForm.valueChanges.subscribe(()=>{this.initializedBookingFace||(this.isChangeBookingFace=!0),this.initializedBookingFace&&(this.initializedBookingFace=!1)})}initLinkApp(){this.updateStatusThirdParty(),this.linkType=this.route.snapshot.params.type,"link-zalo"==this.linkType&&this.linkZalo(this.route.snapshot.queryParams.code,this.route.snapshot.queryParams.state),this.zaloLink=`https://oauth.zaloapp.com/v4/permission?app_id=3917482906218962677&redirect_uri=${document.location.origin}/admin/general/link-zalo&state=test`}linkZalo(t,r){this._linkPageService.getBookingTicket(t).subscribe({next:n=>{this.updateStatusThirdParty(),this.showThirdParty=!0,this._toastService.add({severity:"success",summary:"Li\xean k\u1ebft t\xe0i kho\u1ea3n Zalo th\xe0nh c\xf4ng!",detail:"\u0110\xe3 li\xean k\u1ebft th\xe0nh c\xf4ng t\xe0i kho\u1ea3n Zalo",sticky:!1})},error:n=>{console.log(n),this.showThirdParty=!0,this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 li\xean k\u1ebft Zalo. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!0})}})}unlinkZalo(){if(this._mobileDetectService.isMobile()){const t=this._bottomSheetService.open(a.Q4,{headerTitle:"H\u1ee7y b\u1ecf li\xean k\u1ebft t\xe0i kho\u1ea3n Zalo?",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",data:{body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n h\u1ee7y b\u1ecf li\xean k\u1ebft t\xe0i kho\u1ea3n Zalo? H\u1ec7 th\u1ed1ng c\u1ea7n li\xean k\u1ebft t\xe0i kho\u1ea3n Zalo \u0111\u1ec3 th\xf4ng b\xe1o c\xe1c ho\u1ea1t \u0111\u1ed9ng quan tr\u1ecdng.",okText:"C\xf3, H\u1ee7y li\xean k\u1ebft",cancelText:"Kh\xf4ng",hasIcon:!0}});t.containerInstance._rightButtonClick.subscribe(()=>{t.dismiss()}),t.afterDismissed().subscribe(r=>{r&&this._linkPageService.unlinkZalo().subscribe({next:()=>{this.updateStatusThirdParty(),this._toastService.add({severity:"success",summary:"H\u1ee7y b\u1ecf li\xean k\u1ebft Zalo th\xe0nh c\xf4ng",detail:"\u0110\xe3 h\u1ee7y b\u1ecf li\xean k\u1ebft t\xe0i kho\u1ea3n Zalo.",sticky:!1})},error:()=>{this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 h\u1ee7y b\u1ecf li\xean k\u1ebft t\xe0i kho\u1ea3n Zalo l\xfac n\xe0y. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!0})}})})}else this._modal.open(a.V0,{title:"H\u1ee7y b\u1ecf li\xean k\u1ebft t\xe0i kho\u1ea3n Zalo?",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n h\u1ee7y b\u1ecf li\xean k\u1ebft t\xe0i kho\u1ea3n Zalo? H\u1ec7 th\u1ed1ng c\u1ea7n li\xean k\u1ebft t\xe0i kho\u1ea3n Zalo \u0111\u1ec3 th\xf4ng b\xe1o c\xe1c ho\u1ea1t \u0111\u1ed9ng quan tr\u1ecdng.",okText:"C\xf3, H\u1ee7y li\xean k\u1ebft",cancelText:"Kh\xf4ng"}).afterClosed$.subscribe(r=>{1==r.data&&this._linkPageService.unlinkZalo().subscribe({next:()=>{this.updateStatusThirdParty(),this._toastService.add({severity:"success",summary:"H\u1ee7y b\u1ecf li\xean k\u1ebft Zalo th\xe0nh c\xf4ng",detail:"\u0110\xe3 h\u1ee7y b\u1ecf li\xean k\u1ebft t\xe0i kho\u1ea3n Zalo.",sticky:!1})},error:()=>{this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 h\u1ee7y b\u1ecf li\xean k\u1ebft t\xe0i kho\u1ea3n Zalo l\xfac n\xe0y. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!0})}})})}updateStatusThirdParty(){this._linkPageService.getAllStatusThirdParty().subscribe({next:t=>{this.isZaloLinked=t.data.zalo},error:t=>{console.log(t)}})}initFormGroup(){this.surchargeFeeForm=this._fb.group({amountVN:[null],amountQH:[null],amountVJ:[null],amountVU:[null],amountGDS:[null],roundTripGDS:[!1]}),this.bookingFaceForm=this._fb.group({address:[""],email:["",[u.kI.required,u.kI.email]],footerAttention:[""],phone:["",[u.kI.required,u.kI.minLength(7),u.kI.maxLength(11)]],phoneArea:["+84"],website:[""]})}deactivate(){return!this.isChangeSurchargeFee&&!this.isChangeBookingFace||this._modal.open(a.V0,{title:"H\u1ee7y b\u1ecf thay \u0111\u1ed5i?",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n h\u1ee7y b\u1ecf thay \u0111\u1ed5i v\xe0 d\u1eebng vi\u1ec7c ch\u1ec9nh s\u1eeda? H\xe0nh \u0111\u1ed9ng n\xe0y kh\xf4ng th\u1ec3 ho\xe0n t\xe1c.",okText:"C\xf3, h\u1ee7y b\u1ecf",cancelText:"Kh\xf4ng, ti\u1ebfp t\u1ee5c",isSecondary:!0}).afterClosed$.pipe((0,D.U)(n=>!!n.data))}canDeactivate(){return this.deactivate()}getGeneralConfig(){this.isLoaddingGeneral=!0,this._generalService.getGeneralConfig().pipe((0,Z.x)(()=>this.isLoaddingGeneral=!1)).subscribe({next:t=>{var r,n;if(t.success&&t.data){const d=t.data.listSurchargeFeeConfig,g=t.data.infoBookingFaceConfig;this.bookingFaceData={email:g.email,phoneArea:g.phoneArea,phone:g.phone,address:g.address,website:g.website,footerAttention:g.footerAttention},this.bookingFaceForm.patchValue(this.bookingFaceData),this._generalService.syncBookingFaceConfig(this.bookingFaceData),d.forEach(l=>{switch(l.airline){case"VN":this.surchargeFeeData.amountVN=l.amount;break;case"QH":this.surchargeFeeData.amountQH=l.amount;break;case"VJ":this.surchargeFeeData.amountVJ=l.amount;break;case"VU":this.surchargeFeeData.amountVU=l.amount;break;case"GDS":this.surchargeFeeData.amountGDS=l.amount,this.surchargeFeeData.roundTripGDS="ROUND_TRIP"===l.applyType}}),this._generalService.syncSurchargeFeeConfig(d),this.surchargeFeeForm.patchValue(this.surchargeFeeData),this.initializedSurchargeFee=!0,this.initializedBookingFace=!0}else{const d=null===(n=null===(r=t.objectError)||void 0===r?void 0:r.errorDescription)||void 0===n?void 0:n.vi;this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:d||"Kh\xf4ng th\u1ec3 l\u1ea5y th\xf4ng tin c\u1ea5u h\xecnh l\xfac n\xe0y. Vui l\xf2ng th\u1eed l\u1ea1i sau!",sticky:!0})}},error:()=>{this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 l\u1ea5y th\xf4ng tin c\u1ea5u h\xecnh l\xfac n\xe0y. Vui l\xf2ng th\u1eed l\u1ea1i sau!",sticky:!0})}})}checkedChange(t){var r;null===(r=this.surchargeFeeForm.get("roundTripGDS"))||void 0===r||r.setValue(t)}updateSurchargeFeeConfig(){if(this.surchargeFeeForm.invalid)return;const t=this.surchargeFeeForm.value,r=[{airline:"VN",amount:t.amountVN||0,applyType:"ONE_WAY",currencyCode:""},{airline:"VJ",amount:t.amountVJ||0,applyType:"ONE_WAY",currencyCode:""},{airline:"QH",amount:t.amountQH||0,applyType:"ONE_WAY",currencyCode:""},{airline:"VU",amount:t.amountVU||0,applyType:"ONE_WAY",currencyCode:""},{airline:"GDS",amount:t.amountGDS||0,applyType:t.roundTripGDS?"ROUND_TRIP":"ONE_WAY",currencyCode:""}];this.isUpdating=!0,this._generalService.updateSurchargeFeeConfig(r).pipe((0,Z.x)(()=>this.isUpdating=!1)).subscribe({next:n=>{var d,g;if(n.success)this.isChangeSurchargeFee=!1,n.data.forEach(l=>{switch(l.airline){case"VN":this.surchargeFeeData.amountVN=l.amount;break;case"QH":this.surchargeFeeData.amountQH=l.amount;break;case"VJ":this.surchargeFeeData.amountVJ=l.amount;break;case"VU":this.surchargeFeeData.amountVU=l.amount;break;case"GDS":this.surchargeFeeData.amountGDS=l.amount,this.surchargeFeeData.roundTripGDS="ROUND_TRIP"===l.applyType}}),this._toastService.add({severity:"success",summary:"C\u1eadp nh\u1eadt th\xe0nh c\xf4ng",detail:"C\u1eadp nh\u1eadt th\xf4ng tin c\u1ea5u h\xecnh th\xe0nh c\xf4ng!",sticky:!1});else{const l=null===(g=null===(d=n.objectError)||void 0===d?void 0:d.errorDescription)||void 0===g?void 0:g.vi;this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:l||"Kh\xf4ng th\u1ec3 c\u1eadp nh\u1eadt c\u1ea5u h\xecnh m\u1edbi. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!0})}},error:()=>{this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 c\u1eadp nh\u1eadt c\u1ea5u h\xecnh m\u1edbi. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!0})}})}updateBookingFaceConfig(){const r=Object.assign({},this.bookingFaceForm.value);this.isUpdating=!0,this._generalService.updateBookingFaceConfig(r).pipe((0,Z.x)(()=>this.isUpdating=!1)).subscribe({next:n=>{var d,g;if(n.success)this.isChangeBookingFace=!1,this.bookingFaceData={email:n.data.email,phoneArea:n.data.phoneArea,phone:n.data.phone,address:n.data.address,website:n.data.website,footerAttention:n.data.footerAttention},this._toastService.add({severity:"success",summary:"C\u1eadp nh\u1eadt th\xe0nh c\xf4ng",detail:"C\u1eadp nh\u1eadt th\xf4ng tin c\u1ea5u h\xecnh th\xe0nh c\xf4ng!",sticky:!1});else{const l=null===(g=null===(d=n.objectError)||void 0===d?void 0:d.errorDescription)||void 0===g?void 0:g.vi;this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:l||"Kh\xf4ng th\u1ec3 c\u1eadp nh\u1eadt c\u1ea5u h\xecnh m\u1edbi. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!0})}},error:()=>{this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 c\u1eadp nh\u1eadt c\u1ea5u h\xecnh m\u1edbi. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!0})}})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(c.KNP),e.Y36(u.qu),e.Y36(S.l),e.Y36(P.m),e.Y36(G.BX),e.Y36(B.oE),e.Y36(F.$A),e.Y36(J.gz),e.Y36(w),e.Y36(q.L),e.Y36(T.a2))},i.\u0275cmp=e.Xpm({type:i,selectors:[["general-page"]],standalone:!0,features:[e.jDz],decls:10,vars:4,consts:[[1,"flex","justify-center","py-4","px-[30px]","md:p-4"],[1,"w-[1000px]","max-w-[1000px]","flex","flex-col","gap-y-4"],[1,"flex","gap-x-[20px]"],[1,"w-1","bg-secondary-7-4"],[1,"text-heading-md"],["class","p-6 bg-neutral-white",4,"ngIf"],["class","p-6 bg-neutral-white rounded md:p-4",4,"ngIf"],[4,"ngIf"],[1,"p-6","bg-neutral-white"],[1,"flex","justify-between","items-start","gap-x-6"],[1,"flex","flex-col","gap-y-[1px]"],[1,"text-heading-sm","text-neutral-gray-6"],[1,"text-body-md-long","text-neutral-gray-4"],["class","text-button-md text-secondary-3-4 flex items-center gap-x-1 cursor-default whitespace-nowrap",3,"click",4,"ngIf"],["class","mt-4",4,"ngIf"],[1,"text-button-md","text-secondary-3-4","flex","items-center","gap-x-1","cursor-default","whitespace-nowrap",3,"click"],["icon","chevron_down","size","small",1,"mr-2.5","inline-block"],["icon","chevron_up","size","small",1,"mr-2.5","inline-block"],[1,"mt-4"],["class","flex flex-col gapy-y-5",4,"ngIf"],[1,"flex","flex-col","gapy-y-5"],[1,"flex","flex-col","gap-y-4","md:gap-y-3"],[1,"flex","flex-col","gap-y-1.5"],[1,"text-express-sm","md:hidden"],[1,"w-full","h-10","flex","justify-between","border","border-neutral-gray-1","rounded"],[1,"w-[130px]","shrink-0","flex","gap-x-2","border-r","border-neutral-gray-1","py-2.5","px-4"],[1,"h-5","w-10","object-contain",3,"src"],[1,"text-body-md"],["size","medium",1,"pl-4",3,"placeholder","formControl"],[1,"text-body-md-short","px-3","py-2"],[1,"text-body-sm","md:hidden"],["size","medium",1,"md:mt-[22px]","md:mb-5",3,"checked","checkChange"],[1,"flex","justify-end"],["cf-button","","size","medium",3,"click"],["icon","save","size","small",1,"mr-2.5"],["class","flex flex-col gap-y-5",4,"ngIf"],[1,"flex","flex-col","gap-y-5"],[1,"flex","flex-col","gap-y-4"],[1,"flex","flex-nowrap","gap-x-4","md:flex-col","md:gap-y-2.5"],[1,"!w-1/2","md:!w-full"],[1,"text-express-sm","text-neutral-gray-6","mb-1.5","empty:!m-0"],["cfLabel","",1,"text-express-sm","text-neutral-gray-6","mb-1.5",3,"CfRequired"],[1,"!w-full",3,"status"],["cf-input","","size","medium","placeholder","Nh\u1eadp email \u0111\u1ea1i di\u1ec7n",3,"formControl"],["cfHint","",3,"hint",4,"ngIf"],[1,"text-body-sm","text-neutral-gray-6","mt-1.5"],["textField","name","valueField","code","size","small","placeholder","Nh\u1eadp m\xe3",1,"!w-full","!max-w-full",3,"status","data","formControl"],["cfSuffix","",1,"w-[65%]","px-3","text-body-md","flex","gap-x-2","items-center","border-l","border-neutral-gray-2"],["cf-input","","size","medium","autocomplete","off","placeholder","Nh\u1eadp s\u1ed1 \u0111i\u1ec7n tho\u1ea1i","CfNumberic","",3,"formControl"],["cfLabel","",1,"text-express-sm","text-neutral-gray-6","mb-1.5"],["cf-input","","size","medium","placeholder","Nh\u1eadp \u0111\u1ecba ch\u1ec9 \u0111\u1ea1i l\xfd",3,"formControl"],["cf-input","","size","medium","placeholder","Nh\u1eadp website \u0111\u1ea1i l\xfd",3,"formControl"],[3,"init","formControl"],["cfHint","",3,"hint"],[1,"p-6","bg-neutral-white","rounded","md:p-4"],["class","flex justify-between cursor-pointer gap-x-2 mt-4",4,"ngIf"],[1,"flex","justify-between","cursor-pointer","gap-x-2","mt-4"],[1,"flex","gap-x-4"],["src","assets/icons/zalo-logo.svg"],[1,"flex","flex-col","gap-y-1"],[1,"flex","items-center","gap-x-4","md:flex-col","md:items-start"],[1,"text-body-md-long","text-neutral-gray-6"],["size","small","type","solid",3,"color",4,"ngIf"],[1,"text-body-sm","text-neutral-gray-5"],[1,""],["cf-button","","size","small","type","border","class","whitespace-nowrap",3,"click",4,"ngIf"],["size","small","type","solid",3,"color"],[3,"href"],["cf-button","","size","small","type","border",1,"whitespace-nowrap"],["icon","arrow_right_up",1,"mr-2.5"],["cf-button","","size","small","type","border",1,"whitespace-nowrap",3,"click"],["icon","close",1,"mr-2.5"]],template:function(t,r){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._UZ(3,"div",3),e.TgZ(4,"div",4),e._uU(5,"C\u1ea5u h\xecnh chung"),e.qZA()(),e.YNc(6,L,10,3,"div",5),e.YNc(7,ae,10,3,"div",5),e.YNc(8,de,10,3,"div",6),e.qZA()(),e.YNc(9,ge,1,0,"cf-spinner",7)),2&t&&(e.xp6(6),e.Q6J("ngIf",r.isUpdateSurcharge),e.xp6(1),e.Q6J("ngIf",r.isUpdateInfoBookingFace),e.xp6(1),e.Q6J("ngIf",r.isLinkThirdParty),e.xp6(1),e.Q6J("ngIf",r.isUpdating))},dependencies:[p.ez,p.O5,u.u5,u.Fj,u.JJ,u.UX,u.oH,f.j$,f.ND,f.BN,f.v2,f.lt,m.u,x.C,C.z,h.q,y.Z_,y.PG,c.AxE,c.Sm8,_.N8,_.Xq,a.OR,v.IA,U.b,T.DW],encapsulation:2}),i})()},7453:(k,E,o)=>{o.d(E,{z:()=>a});var v=o(94650);let a=(()=>{class p{onInput(_){const m=_.target,c=m.value;if(!/^[0-9]*$/.test(c)){const h=c.replace(/[^0-9]*/g,"");m.value=h,m.dispatchEvent(new Event("input",{bubbles:!0}))}}}return p.\u0275fac=function(_){return new(_||p)},p.\u0275dir=v.lG2({type:p,selectors:[["","CfNumberic",""]],hostBindings:function(_,m){1&_&&v.NdJ("input",function(f){return m.onInput(f)})},standalone:!0}),p})()},34541:(k,E,o)=>{o.d(E,{C:()=>p});var v=o(36895),a=o(94650);let p=(()=>{class u{constructor(m,c,f){this.elementRef=m,this.renderer=c,this.document=f}set CfRequired(m){if(m){const c=this.document.createElement("span");c.innerHTML=" (*)",c.className="text-primary-1-4 text-espressive-sm",this.renderer.appendChild(this.elementRef.nativeElement,c)}}}return u.\u0275fac=function(m){return new(m||u)(a.Y36(a.SBq),a.Y36(a.Qsj),a.Y36(v.K0))},u.\u0275dir=a.lG2({type:u,selectors:[["","CfRequired",""]],inputs:{CfRequired:"CfRequired"},standalone:!0}),u})()},4688:(k,E,o)=>{o.d(E,{b:()=>m});var v=o(36895),a=o(94650),p=o(72506);function u(c,f){if(1&c){const h=a.EpF();a.TgZ(0,"cf-icon",3),a.NdJ("click",function(C){a.CHM(h);const y=a.oxw();return a.KtG(y.close(C))}),a.qZA()}}const _=["*"];let m=(()=>{class c{constructor(h,x,C){this.renderer=h,this.elementRef=x,this.mode="default",this.type="solid",this.size="medium",this.color="red",this.onClose=new a.vpe,C.registerIcons([p.UNF])}ngOnChanges(h){this.loadClasses()}ngOnInit(){this.loadClasses()}loadClasses(){this.classes="rounded inline-flex justify-center items-center gap-x-1 "+this.getSizeClass()+" "+this.getModeClass()}getSizeClass(){return"small"===this.size?"py-1 px-2 text-express-sm":"xsmall"===this.size?"py-[2px] px-1 text-express-sm":"py-1.5 px-3 text-express-md"}getModeClass(){return"outline"===this.type?`bg-white bordertext-${this.color}-4 border-${this.color}-4`:"inverted"===this.type?`bg-${this.color}-1 text-${this.color}-4`:"gray-2"===this.color?"text-neutral-gray-6 bg-neutral-gray-2":`text-neutral-white bg-${this.color}-4`}close(h){this.onClose.emit(h),h.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),this.elementRef.nativeElement)}}return c.\u0275fac=function(h){return new(h||c)(a.Y36(a.Qsj),a.Y36(a.SBq),a.Y36(p.KNP))},c.\u0275cmp=a.Xpm({type:c,selectors:[["cf-label"]],hostVars:2,hostBindings:function(h,x){2&h&&a.Tol(x.classes)},inputs:{mode:"mode",type:"type",size:"size",color:"color"},outputs:{onClose:"onClose"},standalone:!0,features:[a.TTD,a.jDz],ngContentSelectors:_,decls:4,vars:1,consts:[[1,"flex","justify-between","items-center","gap-x-2"],[1,"text-ellipsis","overflow-hidden","whitespace-normal","flex","items-center"],["icon","close","size","small","class","cursor-pointer",3,"click",4,"ngIf"],["icon","close","size","small",1,"cursor-pointer",3,"click"]],template:function(h,x){1&h&&(a.F$t(),a.TgZ(0,"div",0)(1,"div",1),a.Hsn(2),a.qZA(),a.YNc(3,u,1,0,"cf-icon",2),a.qZA()),2&h&&(a.xp6(3),a.Q6J("ngIf","closeable"===x.mode))},dependencies:[v.ez,v.O5,p.AxE,p.Sm8],encapsulation:2,changeDetection:0}),c})()}}]);