-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path5266.e1d079716b70cb20.js
1 lines (1 loc) · 94.7 KB
/
5266.e1d079716b70cb20.js
1
"use strict";(self.webpackChunkcheapflightclient=self.webpackChunkcheapflightclient||[]).push([[5266],{15266:(Y,I,d)=>{d.r(I),d.d(I,{CreateServiceFeePageComponent:()=>ct,EditServiceFeePageComponent:()=>Nt,ServiceFeeConfigPageComponent:()=>Le,ServiceFeePageComponent:()=>De});var R=d(836),g=d(80750),f=d(36895),s=d(24006),T=d(83700),p=d(72506),v=d(44143),S=d(74713),_=d(48373),y=d(62331),C=d(67460),U=d(40899),b=d(28746),e=d(94650),J=d(82761),M=d(80529),z=d(88001),B=d(54004),a=d(97582),u=d(87067),E=d(43429);let j=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"status",void 0),(0,a.gn)([(0,E.D)(()=>G),(0,u.C)()],i.prototype,"data",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"objectError",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"success",void 0),i})(),G=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"id",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"airline",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"startPointType",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"startPointTypeName",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"endPointType",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"endPointTypeName",void 0),(0,a.gn)([(0,E.D)(()=>K),(0,u.C)()],i.prototype,"startPointDetails",void 0),(0,a.gn)([(0,E.D)(()=>V),(0,u.C)()],i.prototype,"endPointDetails",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"groupAgId",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"groupAgName",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"timeCreate",void 0),(0,a.gn)([(0,E.D)(()=>X),(0,u.C)()],i.prototype,"currencyCode",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"adtFee",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"chdFee",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"infFee",void 0),i})(),K=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),i})(),V=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),i})(),X=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),i})();var Q=d(50494);let $=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"status",void 0),(0,a.gn)([(0,E.D)(()=>W),(0,u.C)()],i.prototype,"data",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"objectError",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"success",void 0),i})(),W=(()=>{class i{}return(0,a.gn)([(0,E.D)(()=>ee),(0,u.C)()],i.prototype,"serviceFee",void 0),(0,a.gn)([(0,E.D)(()=>re),(0,u.C)()],i.prototype,"description",void 0),i})(),ee=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"id",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"airline",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"startPointType",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"startPointTypeName",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"endPointType",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"endPointTypeName",void 0),(0,a.gn)([(0,E.D)(()=>te),(0,u.C)()],i.prototype,"startPointDetails",void 0),(0,a.gn)([(0,E.D)(()=>ie),(0,u.C)()],i.prototype,"endPointDetails",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"groupAgId",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"groupAgName",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"timeCreate",void 0),(0,a.gn)([(0,E.D)(()=>ne),(0,u.C)()],i.prototype,"currencyCode",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"adtFee",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"chdFee",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"infFee",void 0),i})(),te=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),i})(),ie=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),i})(),ne=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),i})(),re=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"en",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"vi",void 0),i})(),oe=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"status",void 0),(0,a.gn)([(0,E.D)(()=>ce),(0,u.C)()],i.prototype,"data",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"objectError",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"success",void 0),i})(),ce=(()=>{class i{}return(0,a.gn)([(0,E.D)(()=>ae),(0,u.C)()],i.prototype,"airlineList",void 0),(0,a.gn)([(0,E.D)(()=>ue),(0,u.C)()],i.prototype,"airportInfoList",void 0),(0,a.gn)([(0,E.D)(()=>se),(0,u.C)()],i.prototype,"nationalInfoList",void 0),(0,a.gn)([(0,E.D)(()=>le),(0,u.C)()],i.prototype,"mergePointList",void 0),(0,a.gn)([(0,E.D)(()=>de),(0,u.C)()],i.prototype,"areaInfoList",void 0),(0,a.gn)([(0,E.D)(()=>pe),(0,u.C)()],i.prototype,"grpAgList",void 0),(0,a.gn)([(0,E.D)(()=>he),(0,u.C)()],i.prototype,"currencyList",void 0),i})(),ae=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),i})(),ue=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"nationalCode",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"nationalName",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"areaCode",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"areaName",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"order",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"city",void 0),i})(),se=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"areaCode",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"areaName",void 0),i})(),le=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"type",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"typeName",void 0),i})(),de=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),i})(),pe=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"id",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),i})(),he=(()=>{class i{}return(0,a.gn)([(0,u.C)()],i.prototype,"code",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"name",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"baseCurrency",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"baseCharge",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"description",void 0),(0,a.gn)([(0,u.C)()],i.prototype,"exchangeRate",void 0),i})();const Z={headers:new M.WM({"Content-Type":"application/json"})};let k=(()=>{class i{constructor(t,n){this.http=t,this.appConfig=n}getInfoCreateServiceFee(){return this.http.get(this.appConfig.apiUrl+"service-fee/get-info-create-service-fee",Z).pipe((0,B.U)(t=>(0,Q.yE)(oe,t,{excludeExtraneousValues:!0})))}geServiceFeeById(t){return this.http.get(this.appConfig.apiUrl+"service-fee/get-service-fee-config-by-id?id="+t,Z).pipe((0,B.U)(n=>(0,Q.yE)(j,n,{excludeExtraneousValues:!0})))}createServiceFee(t){return this.http.post(this.appConfig.apiUrl+"service-fee/create-service-fee-config",JSON.stringify(t),Z)}getListServiceFee(t){return this.http.post(this.appConfig.apiUrl+"service-fee/get-list-service-fee",JSON.stringify(t),Z)}deleteServiceFeeConfig(t){return this.http.delete(this.appConfig.apiUrl+"service-fee/delete-service-fee-config?id="+t,Z)}updateServiceFeeConfig(t){return this.http.put(this.appConfig.apiUrl+"service-fee/update-service-fee-config",JSON.stringify(t),Z).pipe((0,B.U)(n=>(0,Q.yE)($,n,{excludeExtraneousValues:!0})))}createServiceFeeReceiverConfig(t){return this.http.post(this.appConfig.apiUrl+"service-fee/create-service-fee-receiver-config",JSON.stringify(t),Z)}getServiceFeeReceiverConfig(){return this.http.get(this.appConfig.apiUrl+"service-fee/get-service-fee-receiver-config",Z)}}return i.\u0275fac=function(t){return new(t||i)(e.LFG(M.eN),e.LFG(z.qB))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var w=d(97579);function ge(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onCreateServiceFee())}),e._UZ(1,"cf-icon",25),e._uU(2," T\u1ea1o ph\xed d\u1ecbch v\u1ee5 "),e.qZA()}}function me(i,c){if(1&i&&e._UZ(0,"img",37),2&i){const t=e.oxw().$implicit;e.Q6J("src","assets/airline-logo/"+t.airline+".png",e.LSH)}}function ve(i,c){1&i&&(e.TgZ(0,"div"),e._uU(1,"T\u1ea5t c\u1ea3 h\xe3ng bay"),e.qZA())}function fe(i,c){1&i&&(e.TgZ(0,"div"),e._uU(1,"T\u1ea5t c\u1ea3 \u0111\u1ea1i l\xfd"),e.qZA())}function _e(i,c){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.groupAgName)}}function Ee(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"tr",26)(1,"td",27),e.YNc(2,me,1,1,"img",28),e.YNc(3,ve,2,0,"div",23),e.qZA(),e.TgZ(4,"td",29),e._uU(5),e.qZA(),e.TgZ(6,"td",30)(7,"div",31),e._uU(8),e.qZA(),e.TgZ(9,"cf-icon",32),e.NdJ("click",function(){const o=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.onExpand(o.startPointDetails,"\u0110i\xeam \u0111i"))}),e.qZA()(),e.TgZ(10,"td",29),e._uU(11),e.qZA(),e.TgZ(12,"td",30)(13,"div",31),e._uU(14),e.qZA(),e.TgZ(15,"cf-icon",32),e.NdJ("click",function(){const o=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.onExpand(o.endPointDetails,"\u0110i\u1ec3m \u0111\u1ebfn"))}),e.qZA()(),e.TgZ(16,"td",27),e.YNc(17,fe,2,0,"div",23),e.YNc(18,_e,2,1,"div",23),e.qZA(),e.TgZ(19,"td",29),e._uU(20),e.ALo(21,"number"),e.qZA(),e.TgZ(22,"td",29),e._uU(23),e.ALo(24,"number"),e.qZA(),e.TgZ(25,"td",29),e._uU(26),e.ALo(27,"number"),e.qZA(),e.TgZ(28,"td",27),e._uU(29),e.qZA(),e.TgZ(30,"td",29),e._uU(31),e.ALo(32,"date"),e.qZA(),e.TgZ(33,"td",33)(34,"div",34)(35,"div",35),e.NdJ("click",function(){const o=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.onEdit(o))}),e._uU(36," Chi ti\u1ebft "),e.qZA(),e.TgZ(37,"div",36),e.NdJ("click",function(){const o=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.onDelete(o.id))}),e._uU(38,"X\xf3a"),e.qZA()()()()}if(2&i){const t=c.$implicit,n=e.oxw();e.xp6(2),e.Q6J("ngIf","ALL"!==t.airline),e.xp6(1),e.Q6J("ngIf","ALL"===t.airline),e.xp6(2),e.Oqu(n.pointObj[t.startPointTypeName]),e.xp6(3),e.hij(" ",t.startPointDetails," "),e.xp6(3),e.Oqu(n.pointObj[t.endPointTypeName]),e.xp6(3),e.hij(" ",t.endPointDetails," "),e.xp6(3),e.Q6J("ngIf","ALL"===t.groupAgName),e.xp6(1),e.Q6J("ngIf","ALL"!==t.groupAgName),e.xp6(2),e.Oqu(e.lcZ(21,14,t.adtFee)),e.xp6(3),e.Oqu(e.lcZ(24,16,t.chdFee)),e.xp6(3),e.Oqu(e.lcZ(27,18,t.infFee)),e.xp6(3),e.Oqu(t.currency),e.xp6(2),e.Oqu(e.xi3(32,20,1e3*t.timeCreate,"dd/MM/yyyy")),e.xp6(2),e.Q6J("sticky","right")}}function Ce(i,c){1&i&&e._UZ(0,"cf-spinner")}const Fe=function(){return{num:25}},xe=function(){return{num:50}},ye=function(){return{num:75}},Ae=function(){return{num:100}},Te=function(i,c,t,n){return[i,c,t,n]};let De=(()=>{class i{constructor(t,n,r,o,l,A,N){this._router=n,this._serviceFeeService=r,this._modal=o,this._toastService=l,this._cd=A,this._permissionService=N,this.pageSize=25,this.currentPage=1,this.listServiceFee=[],this.dataSource=[],this.airlineOptions=[],this.agentGroupOptions=[],this.pointOptions=[],this.filterSearchData={airline:"ALL",endPoint:"ALL",grpAgId:"ALL",startPoint:"ALL"},this.filterData={airline:"",startPointTypeNameStr:"",startPointDetails:"",endPointTypeNameStr:"",endPointDetails:"",groupAgName:"",adtFeeStr:"",chdFeeStr:"",infFeeStr:"",currency:"",timeCreateStr:""},this.isLoadingData=!1,this.pointObj={AIRPORT:"S\xe2n bay",NATIONAL:"Qu\u1ed1c gia",AREA:"Khu v\u1ef1c"},this.canCreateServiceFee=this._permissionService.hasPermission(U.or.SetupServiceFee)||this._permissionService.hasPermission(U.or.SetupOwnServiceFee),this.searchChange=(h,F)=>F,this.increaseAlphabetSort=(h,F)=>h<F?-1:h>F?1:0,this.decreaseAlphabetSort=(h,F)=>h>F?-1:h<F?1:0,this.increaseNumberSort=(h,F)=>h-F,this.decreaseNumberSort=(h,F)=>F-h,this.sortChange=(h,F)=>{let m=F.map(q=>q);for(let q=0;q<h.length;q++){const x=h[q];switch(x.key){case"airline":m=this.airlineSort(m,x);break;case"startPointTypeNameStr":m=this.startPointTypeNameStrSort(m,x);break;case"startPointDetails":m=this.startPointDetailsSort(m,x);break;case"endPointTypeNameStr":m=this.endPointTypeNameStrSort(m,x);break;case"endPointDetails":m=this.endPointDetailsSort(m,x);break;case"groupAgName":m=this.groupAgNameSort(m,x);break;case"adtFeeStr":m=this.adtFeeStrSort(m,x);break;case"chdFeeStr":m=this.chdFeeStrSort(m,x);break;case"infFeeStr":m=this.infFeeStrSort(m,x);break;case"currency":m=this.currencySort(m,x);break;case"timeCreateStr":m=this.timeCreateStrSort(m,x)}}return m},t.registerIcons([p.TM4,p.Tdu])}ngOnInit(){this.onSearch(),this.getCreateInfo()}onSearch(){const t={airline:this.filterSearchData.airline,startPoint:this.filterSearchData.startPoint,endPoint:this.filterSearchData.endPoint,grpAgId:this.filterSearchData.grpAgId};this.isLoadingData=!0,this._serviceFeeService.getListServiceFee(t).pipe((0,b.x)(()=>this.isLoadingData=!1)).subscribe({next:n=>{var r,o;this.dataSource=null!==(o=null===(r=n.data)||void 0===r?void 0:r.map(l=>Object.assign(Object.assign({},l),{adtFeeStr:l.adtFee+"",chdFeeStr:l.chdFee+"",infFeeStr:l.infFee+"",currency:l.currencyCode.name,timeCreateStr:(0,R.Z)(new Date(1e3*l.timeCreate),"dd/MM/yyyy"),startPointTypeNameStr:this.pointObj[l.startPointTypeName],endPointTypeNameStr:this.pointObj[l.startPointTypeName],startPointDetails:l.startPointDetails.map(A=>A.name).join(", "),endPointDetails:l.endPointDetails.map(A=>A.name).join(", ")})))&&void 0!==o?o:[],this.listServiceFee=this.dataSource.map(l=>l)},error:()=>{this.listServiceFee=[],this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"Kh\xf4ng c\xf3 k\u1ebft qu\u1ea3 tr\u1ea3 v\u1ec1",sticky:!0})}})}getCreateInfo(){this._serviceFeeService.getInfoCreateServiceFee().subscribe({next:t=>{t.success&&(this.airlineOptions=t.data.airlineList.map(n=>({code:n.code,name:n.name})),this.airlineOptions.unshift({code:"ALL",name:"T\u1ea5t c\u1ea3"}),this.agentGroupOptions=t.data.grpAgList.map(n=>({code:n.id,name:n.name})),this.agentGroupOptions.unshift({code:"ALL",name:"T\u1ea5t c\u1ea3"}),this.pointOptions=t.data.mergePointList.map(n=>({code:n.code,name:n.name})),this.pointOptions.unshift({code:"ALL",name:"T\u1ea5t c\u1ea3 l\u1ef1a ch\u1ecdn"}),this._cd.detectChanges(),this.filterSearchData={airline:"ALL",endPoint:"ALL",grpAgId:"ALL",startPoint:"ALL"})}})}airlineSort(t,n){return t.sort("ascend"===n.sort?(r,o)=>this.increaseAlphabetSort(r.airline,o.airline):(r,o)=>this.decreaseAlphabetSort(r.airline,o.airline))}startPointTypeNameStrSort(t,n){return t.sort("ascend"===n.sort?(r,o)=>this.increaseAlphabetSort(r.startPointTypeNameStr,o.startPointTypeNameStr):(r,o)=>this.decreaseAlphabetSort(r.startPointTypeNameStr,o.startPointTypeNameStr))}startPointDetailsSort(t,n){return t.sort("ascend"===n.sort?(r,o)=>this.increaseAlphabetSort(r.startPointDetails,o.startPointDetails):(r,o)=>this.decreaseAlphabetSort(r.startPointDetails,o.startPointDetails))}endPointTypeNameStrSort(t,n){return t.sort("ascend"===n.sort?(r,o)=>this.increaseAlphabetSort(r.endPointTypeNameStr,o.endPointTypeNameStr):(r,o)=>this.decreaseAlphabetSort(r.endPointTypeNameStr,o.endPointTypeNameStr))}endPointDetailsSort(t,n){return t.sort("ascend"===n.sort?(r,o)=>this.increaseAlphabetSort(r.endPointDetails,o.endPointDetails):(r,o)=>this.decreaseAlphabetSort(r.endPointDetails,o.endPointDetails))}groupAgNameSort(t,n){return t.sort("ascend"===n.sort?(r,o)=>this.increaseAlphabetSort(r.groupAgName,o.groupAgName):(r,o)=>this.decreaseAlphabetSort(r.groupAgName,o.groupAgName))}adtFeeStrSort(t,n){return t.sort("ascend"===n.sort?(r,o)=>this.increaseAlphabetSort(r.adtFeeStr,o.adtFeeStr):(r,o)=>this.decreaseAlphabetSort(r.adtFeeStr,o.adtFeeStr))}chdFeeStrSort(t,n){return t.sort("ascend"===n.sort?(r,o)=>this.increaseAlphabetSort(r.chdFeeStr,o.chdFeeStr):(r,o)=>this.decreaseAlphabetSort(r.chdFeeStr,o.chdFeeStr))}infFeeStrSort(t,n){return t.sort("ascend"===n.sort?(r,o)=>this.increaseAlphabetSort(r.infFeeStr,o.infFeeStr):(r,o)=>this.decreaseAlphabetSort(r.infFeeStr,o.infFeeStr))}currencySort(t,n){return t.sort("ascend"===n.sort?(r,o)=>this.increaseAlphabetSort(r.currency,o.currency):(r,o)=>this.decreaseAlphabetSort(r.currency,o.currency))}timeCreateStrSort(t,n){return t.sort("ascend"===n.sort?(r,o)=>this.increaseNumberSort(r.timeCreateStr,o.timeCreateStr):(r,o)=>this.decreaseNumberSort(r.timeCreateStr,o.timeCreateStr))}onCreateServiceFee(){this._router.navigate(["admin/create-service-fee"])}onEdit(t){this._router.navigate(["admin/service-fee-detail/"+t.id])}onDelete(t){this._modal.open(C.V0,{title:"X\xf3a ph\xed d\u1ecbch v\u1ee5",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n x\xf3a ph\xed d\u1ecbch v\u1ee5 n\xe0y? Vi\u1ec7c n\xe0y kh\xf4ng th\u1ec3 ho\xe0n t\xe1c, vui l\xf2ng ki\u1ec3m tra k\u0129 tr\u01b0\u1edbc khi thao t\xe1c."}).afterClosed$.subscribe({next:r=>{r.data&&this._serviceFeeService.deleteServiceFeeConfig(t).subscribe({next:o=>{o.success?(this.onSearch(),this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"X\xf3a ph\xed d\u1ecbch v\u1ee5 th\xe0nh c\xf4ng",sticky:!1})):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"X\xf3a ph\xed d\u1ecbch v\u1ee5 th\u1ea5t b\u1ea1i",sticky:!0})}})}})}onExpand(t,n){this._modal.open(g.G,{description:t,title:n})}removeAccents(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\u0111/g,"d").replace(/\u0110/g,"D")}filterChange(){this.listServiceFee=this.dataSource.filter(t=>{const n=this.removeAccents(t.airline.toLowerCase()),r=this.removeAccents(this.filterData.airline.toLowerCase());if(!n.includes(r))return!1;const o=this.removeAccents(t.startPointTypeNameStr.toLowerCase()),l=this.removeAccents(this.filterData.startPointTypeNameStr.toLowerCase());if(!o.includes(l))return!1;const A=this.removeAccents(t.startPointDetails.toLowerCase()),N=this.removeAccents(this.filterData.startPointDetails.toLowerCase());if(!A.includes(N))return!1;const h=this.removeAccents(t.endPointTypeNameStr.toLowerCase()),F=this.removeAccents(this.filterData.endPointTypeNameStr.toLowerCase());if(!h.includes(F))return!1;const m=this.removeAccents(t.endPointDetails.toLowerCase()),q=this.removeAccents(this.filterData.endPointDetails.toLowerCase());if(!m.includes(q))return!1;const x=this.removeAccents(t.groupAgName.toLowerCase()),qt=this.removeAccents(this.filterData.groupAgName.toLowerCase());if(!x.includes(qt))return!1;const Ut=this.removeAccents(t.adtFeeStr.toLowerCase()),Jt=this.removeAccents(this.filterData.adtFeeStr.toLowerCase());if(!Ut.includes(Jt))return!1;const It=this.removeAccents(t.chdFeeStr.toLowerCase()),Rt=this.removeAccents(this.filterData.chdFeeStr.toLowerCase());if(!It.includes(Rt))return!1;const kt=this.removeAccents(t.infFeeStr.toLowerCase()),wt=this.removeAccents(this.filterData.infFeeStr.toLowerCase());if(!kt.includes(wt))return!1;const Lt=this.removeAccents(t.currency.toLowerCase()),Bt=this.removeAccents(this.filterData.currency.toLowerCase());if(!Lt.includes(Bt))return!1;const Qt=this.removeAccents(t.timeCreateStr.toLowerCase()),Ot=this.removeAccents(this.filterData.timeCreateStr.toLowerCase());return!!Qt.includes(Ot)})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(p.KNP),e.Y36(J.F0),e.Y36(k),e.Y36(w.oE),e.Y36(y.BX),e.Y36(e.sBO),e.Y36(U.$A))},i.\u0275cmp=e.Xpm({type:i,selectors:[["service-fee-manage-page"]],standalone:!0,features:[e.jDz],decls:89,vars:57,consts:[[1,"flex","flex-col","px-[30px]","py-4","gap-y-4","bg-neutral-white"],[1,"flex","gap-x-4"],["textField","name","valueField","code","size","medium","placeholder","Ch\u1ecdn h\xe3ng bay",1,"!max-w-none","!w-[252px]",3,"status","data","allowSearch","ngModel","ngModelChange"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5"],["textField","name","valueField","code","size","medium","placeholder","Ch\u1ecdn \u0111\u1ecba \u0111i\u1ec3m",1,"!max-w-none","!w-[252px]",3,"status","data","allowSearch","ngModel","ngModelChange"],["textField","name","valueField","code","size","medium","placeholder","Ch\u1ecdn nh\xf3m \u0111\u1ea1i l\xfd",1,"!max-w-none","!w-[252px]",3,"status","data","allowSearch","ngModel","ngModelChange"],["cf-button","","type","secondary",1,"mt-7","whitespace-nowrap","w-[168px]","flex","justify-center","gap-x-2",3,"click"],["icon","search","size","small",1,"text-[#616161]"],[1,"py-4","px-[30px]","rounded-lg","flex","justify-center"],[1,"bg-neutral-white","rounded-lg","shadow-cf-md","w-full"],[1,"p-4","flex","justify-between","items-center"],[1,"text-heading-sm"],["cf-button","","class","flex gap-x-2",3,"click",4,"ngIf"],[1,"",3,"fnSort","fnSearch","pageSizeList","listData","pageSize"],["managerTable",""],["cf-thead",""],["cf-th","",1,"whitespace-nowrap",3,"sortName"],["cf-th","",1,"whitespace-nowrap",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","",3,"sticky"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["cf-button","",1,"flex","gap-x-2",3,"click"],["icon","plus"],[1,"border-b","border-neutral-gray-1"],["cf-td","",1,"py-2","px-3","text-body-sm","whitespace-nowrap"],["class","w-[80px] h-[40px] object-contain",3,"src",4,"ngIf"],["cf-td","",1,"py-2","px-3","text-body-sm"],["cf-td","",1,"py-2","px-3","text-body-sm","group","relative"],[1,"w-[170px]","overflow-ellipsis","whitespace-nowrap","overflow-hidden"],["icon","expand","size","small",1,"group-hover:block","hidden","text-body-sm","absolute","right-0","top-0","cursor-pointer",3,"click"],["cf-td","",1,"py-2","px-3","text-body-sm",3,"sticky"],[1,"flex","gap-x-4","items-center"],[1,"text-body-md","text-secondary-3-4","cursor-pointer","whitespace-nowrap",3,"click"],[1,"text-body-md","text-secondary-6-4","cursor-pointer",3,"click"],[1,"w-[80px]","h-[40px]","object-contain",3,"src"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"cf-select",2),e.NdJ("ngModelChange",function(o){return n.filterSearchData.airline=o}),e.TgZ(3,"label",3),e._uU(4," H\xe3ng bay "),e.qZA()(),e.TgZ(5,"cf-select",4),e.NdJ("ngModelChange",function(o){return n.filterSearchData.startPoint=o}),e.TgZ(6,"label",3),e._uU(7," \u0110i\u1ec3m \u0111i "),e.qZA()(),e.TgZ(8,"cf-select",4),e.NdJ("ngModelChange",function(o){return n.filterSearchData.endPoint=o}),e.TgZ(9,"label",3),e._uU(10," \u0110i\u1ec3m \u0111\u1ebfn "),e.qZA()(),e.TgZ(11,"cf-select",5),e.NdJ("ngModelChange",function(o){return n.filterSearchData.grpAgId=o}),e.TgZ(12,"label",3),e._uU(13," Nh\xf3m \u0111\u1ea1i l\xfd "),e.qZA()(),e.TgZ(14,"button",6),e.NdJ("click",function(){return n.onSearch()}),e._UZ(15,"cf-icon",7),e._uU(16," T\xecm ki\u1ebfm "),e.qZA()()(),e.TgZ(17,"div",8)(18,"div",9)(19,"div",10)(20,"div",11),e._uU(21,"Danh s\xe1ch ph\xed d\u1ecbch v\u1ee5"),e.qZA(),e.YNc(22,ge,3,0,"button",12),e.qZA(),e.TgZ(23,"cf-table",13,14)(25,"thead",15)(26,"th",16),e._uU(27,"H\xe3ng bay"),e.qZA(),e.TgZ(28,"th",16),e._uU(29,"Lo\u1ea1i \u0111i\u1ec3m \u0111i"),e.qZA(),e.TgZ(30,"th",16),e._uU(31,"\u0110i\u1ec3m \u0111i"),e.qZA(),e.TgZ(32,"th",16),e._uU(33,"Lo\u1ea1i \u0111i\u1ec3m \u0111\u1ebfn"),e.qZA(),e.TgZ(34,"th",16),e._uU(35,"\u0110i\u1ec3m \u0111\u1ebfn"),e.qZA(),e.TgZ(36,"th",16),e._uU(37,"Nh\xf3m \u0111\u1ea1i l\xfd"),e.qZA(),e.TgZ(38,"th",16),e._uU(39,"Ng\u01b0\u1eddi l\u1edbn"),e.qZA(),e.TgZ(40,"th",16),e._uU(41,"Tr\u1ebb em"),e.qZA(),e.TgZ(42,"th",16),e._uU(43,"Em b\xe9"),e.qZA(),e.TgZ(44,"th",16),e._uU(45,"Lo\u1ea1i ti\u1ec1n"),e.qZA(),e.TgZ(46,"th",16),e._uU(47,"Ng\xe0y t\u1ea1o"),e.qZA(),e.TgZ(48,"th",17),e._uU(49,"Ch\u1ee9c n\u0103ng"),e.qZA()(),e.TgZ(50,"tbody")(51,"tr")(52,"td",18)(53,"cf-input-group",19)(54,"input",20),e.NdJ("ngModelChange",function(o){return n.filterData.airline=o})("input",function(){return n.filterChange()}),e.qZA()()(),e.TgZ(55,"td",18)(56,"cf-input-group",19)(57,"input",20),e.NdJ("ngModelChange",function(o){return n.filterData.startPointTypeNameStr=o})("input",function(){return n.filterChange()}),e.qZA()()(),e.TgZ(58,"td",18)(59,"cf-input-group",19)(60,"input",20),e.NdJ("ngModelChange",function(o){return n.filterData.startPointDetails=o})("input",function(){return n.filterChange()}),e.qZA()()(),e.TgZ(61,"td",18)(62,"cf-input-group",19)(63,"input",20),e.NdJ("ngModelChange",function(o){return n.filterData.endPointTypeNameStr=o})("input",function(){return n.filterChange()}),e.qZA()()(),e.TgZ(64,"td",18)(65,"cf-input-group",19)(66,"input",20),e.NdJ("ngModelChange",function(o){return n.filterData.endPointDetails=o})("input",function(){return n.filterChange()}),e.qZA()()(),e.TgZ(67,"td",18)(68,"cf-input-group",19)(69,"input",20),e.NdJ("ngModelChange",function(o){return n.filterData.groupAgName=o})("input",function(){return n.filterChange()}),e.qZA()()(),e.TgZ(70,"td",18)(71,"cf-input-group",19)(72,"input",20),e.NdJ("ngModelChange",function(o){return n.filterData.adtFeeStr=o})("input",function(){return n.filterChange()}),e.qZA()()(),e.TgZ(73,"td",18)(74,"cf-input-group",19)(75,"input",20),e.NdJ("ngModelChange",function(o){return n.filterData.chdFeeStr=o})("input",function(){return n.filterChange()}),e.qZA()()(),e.TgZ(76,"td",18)(77,"cf-input-group",19)(78,"input",20),e.NdJ("ngModelChange",function(o){return n.filterData.infFeeStr=o})("input",function(){return n.filterChange()}),e.qZA()()(),e.TgZ(79,"td",18)(80,"cf-input-group",19)(81,"input",20),e.NdJ("ngModelChange",function(o){return n.filterData.currency=o})("input",function(){return n.filterChange()}),e.qZA()()(),e.TgZ(82,"td",18)(83,"cf-input-group",19)(84,"input",20),e.NdJ("ngModelChange",function(o){return n.filterData.timeCreateStr=o})("input",function(){return n.filterChange()}),e.qZA()()(),e._UZ(85,"td",21),e.qZA(),e.YNc(86,Ee,39,23,"ng-template",22),e.qZA()()()(),e._UZ(87,"cf-toast"),e.YNc(88,Ce,1,0,"cf-spinner",23)),2&t){const r=e.MAs(24);e.xp6(2),e.Q6J("status","default")("data",n.airlineOptions)("allowSearch",!1)("ngModel",n.filterSearchData.airline),e.xp6(3),e.Q6J("status","default")("data",n.pointOptions)("allowSearch",!0)("ngModel",n.filterSearchData.startPoint),e.xp6(3),e.Q6J("status","default")("data",n.pointOptions)("allowSearch",!0)("ngModel",n.filterSearchData.endPoint),e.xp6(3),e.Q6J("status","default")("data",n.agentGroupOptions)("allowSearch",!1)("ngModel",n.filterSearchData.grpAgId),e.xp6(11),e.Q6J("ngIf",n.canCreateServiceFee),e.xp6(1),e.Q6J("fnSort",n.sortChange)("fnSearch",n.searchChange)("pageSizeList",e.l5B(52,Te,e.DdM(48,Fe),e.DdM(49,xe),e.DdM(50,ye),e.DdM(51,Ae)))("listData",n.listServiceFee)("pageSize",n.pageSize),e.xp6(3),e.Q6J("sortName","airline"),e.xp6(2),e.Q6J("sortName","startPointTypeNameStr"),e.xp6(2),e.Q6J("sortName","startPointDetails"),e.xp6(2),e.Q6J("sortName","endPointTypeNameStr"),e.xp6(2),e.Q6J("sortName","endPointDetails"),e.xp6(2),e.Q6J("sortName","groupAgName"),e.xp6(2),e.Q6J("sortName","adtFeeStr"),e.xp6(2),e.Q6J("sortName","chdFeeStr"),e.xp6(2),e.Q6J("sortName","infFeeStr"),e.xp6(2),e.Q6J("sortName","currency"),e.xp6(2),e.Q6J("sortName","timeCreateStr"),e.xp6(2),e.Q6J("sticky","right"),e.xp6(6),e.Q6J("ngModel",n.filterData.airline),e.xp6(3),e.Q6J("ngModel",n.filterData.startPointTypeNameStr),e.xp6(3),e.Q6J("ngModel",n.filterData.startPointDetails),e.xp6(3),e.Q6J("ngModel",n.filterData.endPointTypeNameStr),e.xp6(3),e.Q6J("ngModel",n.filterData.endPointDetails),e.xp6(3),e.Q6J("ngModel",n.filterData.groupAgName),e.xp6(3),e.Q6J("ngModel",n.filterData.adtFeeStr),e.xp6(3),e.Q6J("ngModel",n.filterData.chdFeeStr),e.xp6(3),e.Q6J("ngModel",n.filterData.infFeeStr),e.xp6(3),e.Q6J("ngModel",n.filterData.currency),e.xp6(3),e.Q6J("ngModel",n.filterData.timeCreateStr),e.xp6(1),e.Q6J("sticky","right"),e.xp6(1),e.Q6J("ngForOf",r.partOfdata),e.xp6(2),e.Q6J("ngIf",n.isLoadingData)}},dependencies:[f.ez,f.sg,f.O5,f.JJ,f.uU,s.u5,s.Fj,s.JJ,s.On,S.q,v.j$,v.ND,v.BN,T.N8,T.Xq,p.AxE,p.Sm8,_.rC,_.E_,_.zs,_.qS,y.hj,C.OR],encapsulation:2}),i})();var O=d(34541);function Se(i,c){if(1&i&&e._UZ(0,"cf-input-hint",32),2&i){const t=e.oxw();e.Q6J("hint",t.errorMessage.percentBookerReceiver)}}function Ze(i,c){if(1&i&&e._UZ(0,"cf-input-hint",32),2&i){const t=e.oxw();e.Q6J("hint",t.errorMessage.daysApplyRefer)}}function Pe(i,c){if(1&i&&e._UZ(0,"cf-input-hint",32),2&i){const t=e.oxw();e.Q6J("hint",t.errorMessage.percentReferReceiver)}}function be(i,c){1&i&&e._UZ(0,"cf-icon",33)}function Ne(i,c){1&i&&e._UZ(0,"cf-icon",34)}function qe(i,c){if(1&i&&e._UZ(0,"cf-input-hint",32),2&i){const t=e.oxw(3);e.Q6J("hint",t.errorMessage.numRefer)}}function Ue(i,c){if(1&i&&e._UZ(0,"cf-input-hint",32),2&i){const t=e.oxw(3);e.Q6J("hint",t.errorMessage.percentReceiver)}}function Je(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",43)(1,"cf-input-group",18)(2,"label",21),e._uU(3," S\u1ed1 \u0111\u1ea1i l\xfd gi\u1edbi thi\u1ec7u t\u1ed1i thi\u1ec3u "),e.qZA(),e._UZ(4,"input",44),e.YNc(5,qe,1,1,"cf-input-hint",20),e.qZA(),e.TgZ(6,"cf-input-group",18)(7,"label",21),e._uU(8," Ph\u1ea7n tr\u0103m ph\xed d\u1ecbch v\u1ee5 kh\u1edfi \u0111i\u1ec3m "),e.qZA(),e._UZ(9,"input",45),e.YNc(10,Ue,1,1,"cf-input-hint",20),e.qZA(),e.TgZ(11,"div",46)(12,"cf-icon",47),e.NdJ("click",function(){const o=e.CHM(t).index,l=e.oxw(2);return e.KtG(l.deleteLine(o))}),e.qZA()()()}if(2&i){const t=c.$implicit;e.xp6(1),e.Q6J("status",t.controls.numRefer.invalid&&(t.controls.numRefer.dirty||t.controls.numRefer.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",t.controls.numRefer),e.xp6(1),e.Q6J("ngIf",t.controls.numRefer.hasError("required")&&(t.controls.numRefer.touched||t.controls.numRefer.dirty)),e.xp6(1),e.Q6J("status",t.controls.percentReceiver.invalid&&(t.controls.percentReceiver.dirty||t.controls.percentReceiver.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",t.controls.percentReceiver),e.xp6(1),e.Q6J("ngIf",t.controls.percentReceiver.hasError("required")&&(t.controls.percentReceiver.touched||t.controls.percentReceiver.dirty))}}const Ie=function(i){return{"opacity-50":i}};function Re(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",48)(1,"div")(2,"button",49),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onResetRefer())}),e._UZ(3,"cf-icon",50),e._uU(4," Reset "),e.qZA()(),e.TgZ(5,"button",51),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onConfirm())}),e._UZ(6,"cf-icon",30),e._uU(7," Th\u1ef1c hi\u1ec7n "),e.qZA()()}if(2&i){const t=e.oxw(2);e.xp6(5),e.Q6J("disabled",t.advancedReferReceiverForm.invalid)("ngClass",e.VKq(2,Ie,t.advancedReferReceiverForm.invalid))}}function ke(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",35)(1,"div",3,36)(3,"div"),e.O4$(),e.TgZ(4,"svg",5),e._UZ(5,"path",6)(6,"path",7)(7,"path",8),e.qZA()(),e.kcU(),e.TgZ(8,"div")(9,"div",9),e._uU(10," L\u01b0u \xfd khi t\xf9y ch\u1ec9nh m\u1ee9c ph\u1ea7n tr\u0103m "),e.qZA(),e.TgZ(11,"div",10)(12,"ul",11)(13,"li"),e._uU(14," Thi\u1ebft l\u1eadp c\xe1c m\u1ee9c ph\u1ea7n tr\u0103m chi\u1ebft kh\u1ea5u m\xe0 Ng\u01b0\u1eddi gi\u1edbi thi\u1ec7u \u0111\u01b0\u1ee3c nh\u1eadn khi \u0111\u1ea1t s\u1ed1 l\u01b0\u1ee3ng \u0111\u1ea1i l\xfd con gi\u1edbi thi\u1ec7u \u0111\u01b0\u1ee3c. "),e.qZA(),e.TgZ(15,"li"),e._uU(16," N\u1ebfu ch\u01b0a th\u1ecfa m\xe3n b\u1ea5t k\xec \u0111i\u1ec1u ki\u1ec7n s\u1ed1 l\u01b0\u1ee3ng \u0111\u1ea1i l\xfd gi\u1edbi thi\u1ec7u th\xec Ng\u01b0\u1eddi gi\u1edbi thi\u1ec7u s\u1ebd \u0111\u01b0\u1ee3c nh\u1eadn m\u1ee9c ph\u1ea7n tr\u0103m kh\u1edfi \u0111i\u1ec3m. "),e.qZA()()()(),e.TgZ(17,"div")(18,"cf-icon",12),e.NdJ("click",function(){e.CHM(t);const r=e.MAs(2);return e.KtG(r.style.display="none")}),e.qZA()()(),e.TgZ(19,"div")(20,"div",37),e.YNc(21,Je,13,8,"div",38),e.qZA(),e.TgZ(22,"div",39)(23,"div",40),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onAddLine())}),e._UZ(24,"cf-icon",41),e._uU(25," Th\xeam \u0111i\u1ec1u ki\u1ec7n s\u1ed1 l\u01b0\u1ee3ng gi\u1edbi thi\u1ec7u "),e.qZA()(),e.YNc(26,Re,8,4,"div",42),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(21),e.Q6J("ngForOf",t.listAdvancedReferReceiver.controls),e.xp6(5),e.Q6J("ngIf",t.isShowButton)}}function we(i,c){1&i&&e._UZ(0,"cf-spinner")}let Le=(()=>{class i{constructor(t,n,r,o,l){this._fb=t,this._serviceFeeService=n,this._modal=r,this._toastService=o,this.errorMessage={daysApplyRefer:"Ng\xe0y \xe1p d\u1ee5ng kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",percentBookerReceiver:"Ph\u1ea7n tr\u0103m ph\xed d\u1ecbch v\u1ee5 kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",percentReferReceiver:"Ph\u1ea7n tr\u0103m ph\xed d\u1ecbch v\u1ee5 kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",numRefer:"S\u1ed1 l\u01b0\u1ee3ng \u0111\u1ea1i l\xfd kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",percentReceiver:"Ph\u1ea7n tr\u0103m chi\u1ebft kh\u1ea5u kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng"},this.isLoading=!1,this.isExpand=!1,this.isShowButton=!1,l.registerIcons([p.UNF,p.fqi,p.n78,p.TM4,p.NNX,p.$S,p.Hge])}ngOnInit(){this.initserviceFeeReceiverForm(),this.getServiceFeeReceiverConfig()}initserviceFeeReceiverForm(){this.serviceFeeReceiverForm=this._fb.group({daysApplyRefer:[null,s.kI.required],percentBookerReceiver:[null,s.kI.required],percentReferReceiver:[null,s.kI.required]}),this.advancedReferReceiverForm=this._fb.group({listAdvancedReferReceiver:this._fb.array([])})}instanceAdvancedReferForm(){return this._fb.group({numRefer:[null,s.kI.required],percentReceiver:[null,s.kI.required]})}get listAdvancedReferReceiver(){return this.advancedReferReceiverForm.get("listAdvancedReferReceiver")}getServiceFeeReceiverConfig(){this.isLoading=!0,this._serviceFeeService.getServiceFeeReceiverConfig().pipe((0,b.x)(()=>this.isLoading=!1)).subscribe({next:t=>{var n,r,o;t.success&&t.data&&(this.serviceFeeConfigData=Object.assign(Object.assign({},t.data),{percentBookerReceiver:t.data.percentBookerReceive}),this.serviceFeeReceiverForm.patchValue(this.serviceFeeConfigData),this.isExpand=(null===(n=t.data.listAdvancedReferReceiver)||void 0===n?void 0:n.length)||!1,null===(r=t.data.listAdvancedReferReceiver)||void 0===r||r.forEach(l=>{this.listAdvancedReferReceiver.push(this._fb.group({numRefer:[l.numRefer,s.kI.required],percentReceiver:[l.percentReceiver,s.kI.required]}))}),this.isShowButton=(null===(o=this.listAdvancedReferReceiver)||void 0===o?void 0:o.length)||!1)}})}onAddLine(){var t;this.listAdvancedReferReceiver.push(this.instanceAdvancedReferForm()),this.isShowButton=null!==(t=this.listAdvancedReferReceiver.length)&&void 0!==t&&t}deleteLine(t){var n;this.listAdvancedReferReceiver.removeAt(t),this.isShowButton=null!==(n=this.listAdvancedReferReceiver.length)&&void 0!==n&&n}onResetRefer(){var t;this.listAdvancedReferReceiver.clear(),this.isShowButton=null!==(t=this.listAdvancedReferReceiver.length)&&void 0!==t&&t}onConfirm(){this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"Th\xeam t\xf9y ch\u1ec9nh n\xe2ng cao th\xe0nh c\xf4ng",sticky:!1})}onSubmit(){if(this.serviceFeeReceiverForm.markAllAsTouched(),this.serviceFeeReceiverForm.invalid)return;const t=this.listAdvancedReferReceiver.value,r=Object.assign(Object.assign({},this.serviceFeeReceiverForm.value),{listAdvancedReferReceiver:null==t?void 0:t.map(o=>({numRefer:o.numRefer,percentReceiver:o.percentReceiver}))});this.isLoading=!0,this._serviceFeeService.createServiceFeeReceiverConfig(r).pipe((0,b.x)(()=>this.isLoading=!1)).subscribe({next:o=>{this._modal.open(C.z5,o.success?{title:"Thi\u1ebft l\u1eadp th\xe0nh c\xf4ng",content:"H\u1ec7 th\u1ed1ng thi\u1ebft l\u1eadp ph\xed d\u1ecbch v\u1ee5 th\xe0nh c\xf4ng",status:"success"}:{title:"Thi\u1ebft l\u1eadp th\u1ea5t b\u1ea1i",content:"H\u1ec7 th\u1ed1ng thi\u1ebft l\u1eadp ph\xed d\u1ecbch v\u1ee5 th\u1ea5t b\u1ea1i",status:"error"})}})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(s.qu),e.Y36(k),e.Y36(w.oE),e.Y36(y.BX),e.Y36(p.KNP))},i.\u0275cmp=e.Xpm({type:i,selectors:[["service-fee-config"]],standalone:!0,features:[e.jDz],decls:62,vars:15,consts:[[1,"flex","justify-center","py-4","px-[30px]"],[1,"w-[1000px]","max-w-[1000px]"],[1,"flex","flex-col","gap-y-4"],[1,"rounded","bg-[#FFF8E7]","text-neutral-gray-6","p-4","flex","gap-x-2.5"],["noteServiceFee",""],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M1.23916 18.3886L10.1497 3.95484C10.3277 3.6666 10.594 3.42538 10.92 3.25714C11.246 3.0889 11.6194 3 12 3C12.3806 3 12.754 3.0889 13.08 3.25714C13.406 3.42538 13.6723 3.6666 13.8503 3.95484L22.7608 18.3886C22.9281 18.661 23.0101 18.9659 22.999 19.2735C22.9879 19.5812 22.8839 19.8811 22.6973 20.1441C22.5106 20.407 22.2477 20.6241 21.934 20.7741C21.6204 20.9241 21.2667 21.0019 20.9075 21H3.08847C2.72962 21.0013 2.37647 20.9231 2.06336 20.7728C1.75026 20.6226 1.48787 20.4055 1.3017 20.1426C1.11553 19.8797 1.01193 19.58 1.00097 19.2727C0.99001 18.9653 1.07207 18.6608 1.23916 18.3886Z","fill","#FCB40A"],["d","M12 18.75C11.5858 18.75 11.25 18.4142 11.25 18L11.25 17.99C11.25 17.5758 11.5858 17.24 12 17.24C12.4142 17.24 12.75 17.5758 12.75 17.99L12.75 18C12.75 18.4142 12.4142 18.75 12 18.75Z","fill","#2C2C2C"],["d","M12 15.75C11.5858 15.75 11.25 15.4142 11.25 15L11.25 7.99997C11.25 7.58576 11.5858 7.24997 12 7.24997C12.4142 7.24997 12.75 7.58576 12.75 7.99997L12.75 15C12.75 15.4142 12.4142 15.75 12 15.75Z","fill","#2C2C2C"],[1,"text-express-md"],[1,"text-body-md-short","text-neutral-gray-5"],[1,"px-5","list-disc"],["size","small","icon","close",1,"cursor-pointer",3,"click"],[1,"bg-white","rounded","shadow-cf-md","flex","flex-col","gap-y-4","p-6"],[1,"flex","flex-col","gap-y-1"],[1,"text-heading-sm","text-neutral-black"],[1,"text-espressive-sm","text-neutral-gray-4"],[1,""],[1,"grow-[400]","!w-full",3,"status"],["type","number","cf-input","","size","medium","placeholder","Nh\u1eadp ph\u1ea7n tr\u0103m (%) ph\xed d\u1ecbch v\u1ee5 cho Booker",3,"formControl"],["cfHint","",3,"hint",4,"ngIf"],["cfLabel","",1,"text-express-sm","text-black",3,"CfRequired"],["type","number","cf-input","","size","medium","placeholder","Nh\u1eadp s\u1ed1 ng\xe0y hi\u1ec7u l\u1ef1c c\u1ee7a vi\u1ec7c chia s\u1ebb ph\u1ea7n tr\u0103m chi\u1ebft kh\u1ea5u",3,"formControl"],["type","number","cf-input","","size","medium","placeholder","Nh\u1eadp ph\u1ea7n tr\u0103m (%) ph\xed d\u1ecbch v\u1ee5 kh\u1edfi \u0111i\u1ec3m cho Ng\u01b0\u1eddi gi\u1edbi thi\u1ec7u",3,"formControl"],[1,"flex","gap-x-2","items-center","text-express-md","cursor-pointer",3,"click"],["size","small","icon","chevron_up",4,"ngIf"],["size","small","icon","chevron_down",4,"ngIf"],["class","p-4 flex flex-col gap-y-6 rounded bg-neutral-gray-1",4,"ngIf"],[1,"flex","justify-between"],["cf-button","","size","medium",3,"click"],["size","small","icon","check",1,"mr-2.5"],[4,"ngIf"],["cfHint","",3,"hint"],["size","small","icon","chevron_up"],["size","small","icon","chevron_down"],[1,"p-4","flex","flex-col","gap-y-6","rounded","bg-neutral-gray-1"],["notePercent",""],[1,"flex","flex-col","gap-y-3"],["class","flex gap-x-3",4,"ngFor","ngForOf"],[1,"mt-3"],[1,"flex","gap-x-2.5","py-1.5","px-3","text-espressive-sm","text-secondary-7-5","cursor-pointer",3,"click"],["size","small","icon","plus"],["class","flex justify-end gap-x-3",4,"ngIf"],[1,"flex","gap-x-3"],["cf-input","","type","number","size","medium","placeholder","Nh\u1eadp s\u1ed1 \u0111\u1ea1i l\xfd gi\u1edbi thi\u1ec7u t\u1ed1i thi\u1ec3u",3,"formControl"],["cf-input","","type","number","size","medium","placeholder","Nh\u1eadp ph\u1ea7n tr\u0103m (%) ph\xed d\u1ecbch v\u1ee5",3,"formControl"],[1,"flex","items-start","mt-10"],["size","small","icon","delete",1,"mb-2.5","text-neutral-gray-4","cursor-pointer",3,"click"],[1,"flex","justify-end","gap-x-3"],["cf-button","","size","medium","type","secondary",1,"bg-white",3,"click"],["size","small","icon","refresh",1,"mr-2.5"],["cf-button","","size","medium",1,"!bg-secondary-1-4",3,"disabled","ngClass","click"]],template:function(t,n){if(1&t){const r=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3,4)(5,"div"),e.O4$(),e.TgZ(6,"svg",5),e._UZ(7,"path",6)(8,"path",7)(9,"path",8),e.qZA()(),e.kcU(),e.TgZ(10,"div")(11,"div",9),e._uU(12," Ph\xe2n chia ph\xed d\u1ecbch v\u1ee5 "),e.qZA(),e.TgZ(13,"div",10),e._uU(14," Ph\xed d\u1ecbch v\u1ee5 m\xe0 \u0111\u1ea1i l\xfd thu \u0111\u1ea1i l\xfd con khi th\u1ef1c hi\u1ec7n m\u1ed9t s\u1ed1 thao t\xe1c (Xu\u1ea5t v\xe9, Ho\xe0n v\xe9, \u0110\u1ed5i v\xe9, Th\xeam DVCT) s\u1ebd \u0111\u01b0\u1ee3c chia cho c\xe1c b\xean n\u1ebfu r\u01a1i v\xe0o 1 trong c\xe1c tr\u01b0\u1eddng h\u1ee3p sau: "),e.TgZ(15,"ul",11)(16,"li"),e._uU(17," C\xe1c thao t\xe1c tr\xean \u0111\u01b0\u1ee3c th\u1ef1c hi\u1ec7n b\u1edfi 1 Booker thu\u1ed9c \u0111\u1ea1i l\xfd "),e.qZA(),e.TgZ(18,"li"),e._uU(19," \u0110\u1ea1i l\xfd con \u0111\u01b0\u1ee3c gi\u1edbi thi\u1ec7u b\u1edfi 1 ng\u01b0\u1eddi gi\u1edbi thi\u1ec7u v\xe0 th\u1eddi gian hi\u1ec7u l\u1ef1c v\u1eabn c\xf2n h\u1ee3p l\u1ec7 "),e.qZA()()()(),e.TgZ(20,"div")(21,"cf-icon",12),e.NdJ("click",function(){e.CHM(r);const l=e.MAs(4);return e.KtG(l.style.display="none")}),e.qZA()()(),e.TgZ(22,"div",13)(23,"div",14)(24,"div",15),e._uU(25," Ph\u1ea7n tr\u0103m cho Booker "),e.qZA(),e.TgZ(26,"div",16),e._uU(27," Ph\u1ea7n tr\u0103m ph\xed d\u1ecbch v\u1ee5 \u0111\u1ea1i l\xfd thu \u0111\u1ea1i l\xfd con cho Booker \u0111\u01b0\u1ee3c nh\u1eadn n\u1ebfu h\u1ed7 tr\u1ee3 \u0111\u1ea1i l\xfd con "),e.qZA()(),e.TgZ(28,"div",17)(29,"cf-input-group",18),e._UZ(30,"input",19),e.YNc(31,Se,1,1,"cf-input-hint",20),e.qZA()()(),e.TgZ(32,"div",13)(33,"div",14)(34,"div",15),e._uU(35," Ph\u1ea7n tr\u0103m cho Ng\u01b0\u1eddi gi\u1edbi thi\u1ec7u "),e.qZA(),e.TgZ(36,"div",16),e._uU(37," Ph\u1ea7n tr\u0103m ph\xed d\u1ecbch v\u1ee5 \u0111\u1ea1i l\xfd thu \u0111\u1ea1i l\xfd con cho Ng\u01b0\u1eddi gi\u1edbi thi\u1ec7u \u0111\u1ea1i l\xfd con \u0111\u01b0\u1ee3c nh\u1eadn "),e.qZA()(),e.TgZ(38,"div",2)(39,"cf-input-group",18)(40,"label",21),e._uU(41," S\u1ed1 ng\xe0y \xe1p d\u1ee5ng (t\xednh t\u1eeb th\u1eddi \u0111i\u1ec3m \u0111\u1ea1i l\xfd con \u0111\u0103ng k\xfd) "),e.qZA(),e._UZ(42,"input",22),e.YNc(43,Ze,1,1,"cf-input-hint",20),e.qZA(),e.TgZ(44,"cf-input-group",18)(45,"label",21),e._uU(46," Ph\u1ea7n tr\u0103m ph\xed d\u1ecbch v\u1ee5 kh\u1edfi \u0111i\u1ec3m "),e.qZA(),e._UZ(47,"input",23),e.YNc(48,Pe,1,1,"cf-input-hint",20),e.qZA()(),e.TgZ(49,"div",2)(50,"div",24),e.NdJ("click",function(){return n.isExpand=!n.isExpand}),e.TgZ(51,"div"),e._uU(52,"T\xf9y ch\u1ec9nh m\u1ee9c ph\u1ea7n tr\u0103m n\xe2ng cao"),e.qZA(),e.YNc(53,be,1,0,"cf-icon",25),e.YNc(54,Ne,1,0,"cf-icon",26),e.qZA(),e.YNc(55,ke,27,2,"div",27),e.qZA()(),e.TgZ(56,"div",28),e._UZ(57,"div"),e.TgZ(58,"button",29),e.NdJ("click",function(){return n.onSubmit()}),e._UZ(59,"cf-icon",30),e._uU(60," Ho\xe0n th\xe0nh "),e.qZA()()()()(),e.YNc(61,we,1,0,"cf-spinner",31)}2&t&&(e.xp6(29),e.Q6J("status",n.serviceFeeReceiverForm.controls.percentBookerReceiver.invalid&&(n.serviceFeeReceiverForm.controls.percentBookerReceiver.dirty||n.serviceFeeReceiverForm.controls.percentBookerReceiver.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",n.serviceFeeReceiverForm.controls.percentBookerReceiver),e.xp6(1),e.Q6J("ngIf",n.serviceFeeReceiverForm.controls.percentBookerReceiver.hasError("required")&&(n.serviceFeeReceiverForm.controls.percentBookerReceiver.touched||n.serviceFeeReceiverForm.controls.percentBookerReceiver.dirty)),e.xp6(8),e.Q6J("status",n.serviceFeeReceiverForm.controls.daysApplyRefer.invalid&&(n.serviceFeeReceiverForm.controls.daysApplyRefer.dirty||n.serviceFeeReceiverForm.controls.daysApplyRefer.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",n.serviceFeeReceiverForm.controls.daysApplyRefer),e.xp6(1),e.Q6J("ngIf",n.serviceFeeReceiverForm.controls.daysApplyRefer.hasError("required")&&(n.serviceFeeReceiverForm.controls.daysApplyRefer.touched||n.serviceFeeReceiverForm.controls.daysApplyRefer.dirty)),e.xp6(1),e.Q6J("status",n.serviceFeeReceiverForm.controls.percentReferReceiver.invalid&&(n.serviceFeeReceiverForm.controls.percentReferReceiver.dirty||n.serviceFeeReceiverForm.controls.percentReferReceiver.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",n.serviceFeeReceiverForm.controls.percentReferReceiver),e.xp6(1),e.Q6J("ngIf",n.serviceFeeReceiverForm.controls.percentReferReceiver.hasError("required")&&(n.serviceFeeReceiverForm.controls.percentReferReceiver.touched||n.serviceFeeReceiverForm.controls.percentReferReceiver.dirty)),e.xp6(5),e.Q6J("ngIf",n.isExpand),e.xp6(1),e.Q6J("ngIf",!n.isExpand),e.xp6(1),e.Q6J("ngIf",n.isExpand),e.xp6(6),e.Q6J("ngIf",n.isLoading))},dependencies:[f.ez,f.mk,f.sg,f.O5,s.UX,s.Fj,s.wV,s.JJ,s.oH,s.u5,v.j$,v.ND,v.BN,v.v2,O.C,T.N8,T.Xq,p.AxE,p.Sm8,C.OR],encapsulation:2}),i})();var L=d(19123),H=d(17736),Be=d(50633);const P=function(){return[]};function Qe(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"cf-multi-select",35),e.NdJ("valueChange",function(r){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onPointChange(r,"startPointDetail"))}),e.qZA()}if(2&i){const t=e.oxw(2),n=e.MAs(7);e.Q6J("status","default")("data",t.airportDepartureOptions||e.DdM(6,P))("allowSearch",!0)("maxHeight",230)("optionTmp",n)("formControl",t.serviceFeeForm.controls.startPointDetail)}}function Oe(i,c){if(1&i&&e._UZ(0,"cf-multi-select",36),2&i){const t=e.oxw(2);e.Q6J("status","default")("data",t.countryDepartureOptions||e.DdM(5,P))("allowSearch",!0)("maxHeight",230)("formControl",t.serviceFeeForm.controls.startPointDetail)}}function Me(i,c){if(1&i&&e._UZ(0,"cf-multi-select",37),2&i){const t=e.oxw(2);e.Q6J("status","default")("data",t.areaDepartureOptions||e.DdM(5,P))("allowSearch",!0)("maxHeight",230)("formControl",t.serviceFeeForm.controls.startPointDetail)}}function He(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"cf-multi-select",35),e.NdJ("valueChange",function(r){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onPointChange(r,"endPointDetail"))}),e.qZA()}if(2&i){const t=e.oxw(2),n=e.MAs(7);e.Q6J("status","default")("data",t.airportArrivalOptions||e.DdM(6,P))("allowSearch",!0)("maxHeight",230)("optionTmp",n)("formControl",t.serviceFeeForm.controls.endPointDetail)}}function Ye(i,c){if(1&i&&e._UZ(0,"cf-multi-select",36),2&i){const t=e.oxw(2);e.Q6J("status","default")("data",t.countryArrivalOptions||e.DdM(5,P))("allowSearch",!0)("maxHeight",230)("formControl",t.serviceFeeForm.controls.endPointDetail)}}function ze(i,c){if(1&i&&e._UZ(0,"cf-multi-select",37),2&i){const t=e.oxw(2);e.Q6J("status","default")("data",t.areaArrivalOptions||e.DdM(5,P))("allowSearch",!0)("maxHeight",230)("formControl",t.serviceFeeForm.controls.endPointDetail)}}function je(i,c){1&i&&e._UZ(0,"cf-input-hint",38),2&i&&e.Q6J("hint","Nh\xf3m \u0111\u1ea1i l\xfd kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Ge(i,c){if(1&i&&e._UZ(0,"cf-input-hint",38),2&i){const t=e.oxw(2);e.Q6J("hint",t.errorMessage.adtFee)}}function Ke(i,c){if(1&i&&e._UZ(0,"cf-input-hint",38),2&i){const t=e.oxw(2);e.Q6J("hint",t.errorMessage.chdFee)}}function Ve(i,c){if(1&i&&e._UZ(0,"cf-input-hint",38),2&i){const t=e.oxw(2);e.Q6J("hint",t.errorMessage.infFee)}}function Xe(i,c){if(1&i&&e._UZ(0,"cf-input-hint",38),2&i){const t=e.oxw(2);e.Q6J("hint",t.errorMessage.currencyCode)}}function $e(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",6)(1,"div",7)(2,"div",8)(3,"div",9),e._uU(4," \u0110i\u1ec1u ki\u1ec7n h\xe3ng bay "),e.qZA(),e.TgZ(5,"div",10),e._uU(6," H\xe3ng bay khai th\xe1c "),e.qZA()(),e.TgZ(7,"div",11),e._UZ(8,"cf-select",12),e.qZA()(),e.TgZ(9,"div",7)(10,"div",8)(11,"div",9),e._uU(12," \u0110i\u1ec1u ki\u1ec7n h\xe0nh tr\xecnh "),e.qZA(),e.TgZ(13,"div",10),e._uU(14," H\xe0nh tr\xecnh bay \xe1p d\u1ee5ng, bao g\u1ed3m c\u1ea3 m\u1ed9t chi\u1ec1u v\xe0 kh\u1ee9 h\u1ed3i "),e.qZA()(),e.TgZ(15,"div",13)(16,"div",6)(17,"div",14),e._uU(18,"\u0110i\u1ec3m \u0111i"),e.qZA(),e.TgZ(19,"div",15)(20,"cf-radio-group",16),e.NdJ("checkChange",function(r){e.CHM(t);const o=e.oxw();return e.KtG(o.onChangeType("departureType",r))}),e.TgZ(21,"cf-radio",17),e._uU(22,"Theo s\xe2n bay"),e.qZA(),e.TgZ(23,"cf-radio",17),e._uU(24,"Theo qu\u1ed1c gia"),e.qZA(),e.TgZ(25,"cf-radio",17),e._uU(26,"Theo khu v\u1ef1c"),e.qZA()(),e.YNc(27,Qe,1,7,"cf-multi-select",18),e.YNc(28,Oe,1,6,"cf-multi-select",19),e.YNc(29,Me,1,6,"cf-multi-select",20),e.qZA()(),e.TgZ(30,"div",6)(31,"div",14),e._uU(32,"\u0110i\u1ec3m \u0111\u1ebfn"),e.qZA(),e.TgZ(33,"div",15)(34,"cf-radio-group",16),e.NdJ("checkChange",function(r){e.CHM(t);const o=e.oxw();return e.KtG(o.onChangeType("arrivalType",r))}),e.TgZ(35,"cf-radio",17),e._uU(36,"Theo s\xe2n bay"),e.qZA(),e.TgZ(37,"cf-radio",17),e._uU(38,"Theo qu\u1ed1c gia"),e.qZA(),e.TgZ(39,"cf-radio",17),e._uU(40,"Theo khu v\u1ef1c"),e.qZA()(),e.YNc(41,He,1,7,"cf-multi-select",18),e.YNc(42,Ye,1,6,"cf-multi-select",19),e.YNc(43,ze,1,6,"cf-multi-select",20),e.qZA()()()(),e.TgZ(44,"div",7)(45,"div",8)(46,"div",9),e._uU(47," Nh\xf3m \u0111\u1ea1i l\xfd "),e.qZA(),e.TgZ(48,"div",10),e._uU(49," C\xe1c \u0111\u1ea1i l\xfd thu\u1ed9c nh\xf3m n\xe0y s\u1ebd \u0111\u01b0\u1ee3c \xe1p d\u1ee5ng m\u1ee9c ph\xed d\u1ecbch v\u1ee5 "),e.qZA()(),e.TgZ(50,"div",11)(51,"cf-select",21),e.YNc(52,je,1,1,"cf-input-hint",22),e.qZA()()(),e.TgZ(53,"div",7)(54,"div",8)(55,"div",9),e._uU(56," M\u1ee9c ph\xed d\u1ecbch v\u1ee5 "),e.qZA(),e.TgZ(57,"div",10),e._uU(58," M\u1ee9c ph\xed d\u1ecbch v\u1ee5 \xe1p d\u1ee5ng cho vi\u1ec7c xu\u1ea5t, ho\xe0n, \u0111\u1ed5i v\xe9 v\xe0 th\xeam d\u1ecbch v\u1ee5 c\u1ed9ng th\xeam "),e.qZA()(),e.TgZ(59,"div",23)(60,"div",24)(61,"cf-input-group",25)(62,"label",26),e._uU(63," Ng\u01b0\u1eddi l\u1edbn (ADT) "),e.qZA(),e._UZ(64,"cf-input-number",27),e.YNc(65,Ge,1,1,"cf-input-hint",22),e.qZA(),e.TgZ(66,"cf-input-group",25)(67,"label",26),e._uU(68," Tr\u1ebb em (CHD) "),e.qZA(),e._UZ(69,"cf-input-number",27),e.YNc(70,Ke,1,1,"cf-input-hint",22),e.qZA(),e.TgZ(71,"cf-input-group",25)(72,"label",26),e._uU(73," Em b\xe9 (IFN) "),e.qZA(),e._UZ(74,"cf-input-number",27),e.YNc(75,Ve,1,1,"cf-input-hint",22),e.qZA()(),e.TgZ(76,"cf-select",28)(77,"label",26),e._uU(78," Lo\u1ea1i ti\u1ec1n "),e.qZA(),e.YNc(79,Xe,1,1,"cf-input-hint",22),e.qZA()()(),e.TgZ(80,"div",29),e._UZ(81,"div"),e.TgZ(82,"div",30)(83,"button",31),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onClose())}),e._UZ(84,"cf-icon",32),e._uU(85," \u0110\xf3ng "),e.qZA(),e.TgZ(86,"button",33),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onSubmit())}),e._UZ(87,"cf-icon",34),e._uU(88," Ho\xe0n th\xe0nh "),e.qZA()()()()}if(2&i){const t=e.oxw();e.xp6(8),e.Q6J("status",t.serviceFeeForm.controls.airline.invalid&&(t.serviceFeeForm.controls.airline.dirty||t.serviceFeeForm.controls.airline.touched)?"error":"default")("data",t.airlineOptions)("allowSearch",!1)("formControl",t.serviceFeeForm.controls.airline),e.xp6(12),e.Q6J("ngModel",t.departureType),e.xp6(1),e.Q6J("value","AIRPORT"),e.xp6(2),e.Q6J("value","NATIONAL"),e.xp6(2),e.Q6J("value","AREA"),e.xp6(2),e.Q6J("ngIf","AIRPORT"===t.departureType),e.xp6(1),e.Q6J("ngIf","NATIONAL"===t.departureType),e.xp6(1),e.Q6J("ngIf","AREA"===t.departureType),e.xp6(5),e.Q6J("ngModel",t.arrivalType),e.xp6(1),e.Q6J("value","AIRPORT"),e.xp6(2),e.Q6J("value","NATIONAL"),e.xp6(2),e.Q6J("value","AREA"),e.xp6(2),e.Q6J("ngIf","AIRPORT"===t.arrivalType),e.xp6(1),e.Q6J("ngIf","NATIONAL"===t.arrivalType),e.xp6(1),e.Q6J("ngIf","AREA"===t.arrivalType),e.xp6(8),e.Q6J("status",t.serviceFeeForm.controls.groupAgId.invalid&&(t.serviceFeeForm.controls.groupAgId.dirty||t.serviceFeeForm.controls.groupAgId.touched)?"error":"default")("data",t.agentGroupOptions||e.DdM(44,P))("allowSearch",!1)("formControl",t.serviceFeeForm.controls.groupAgId),e.xp6(1),e.Q6J("ngIf",t.serviceFeeForm.controls.groupAgId.hasError("required")&&(t.serviceFeeForm.controls.groupAgId.touched||t.serviceFeeForm.controls.groupAgId.dirty)),e.xp6(9),e.Q6J("status",t.serviceFeeForm.controls.adtFee.invalid&&(t.serviceFeeForm.controls.adtFee.dirty||t.serviceFeeForm.controls.adtFee.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("placeholder","Nh\u1eadp m\u1ee9c ph\xed d\u1ecbch v\u1ee5")("formControl",t.serviceFeeForm.controls.adtFee),e.xp6(1),e.Q6J("ngIf",t.serviceFeeForm.controls.adtFee.hasError("required")&&(t.serviceFeeForm.controls.adtFee.touched||t.serviceFeeForm.controls.adtFee.dirty)),e.xp6(1),e.Q6J("status",t.serviceFeeForm.controls.chdFee.invalid&&(t.serviceFeeForm.controls.chdFee.dirty||t.serviceFeeForm.controls.chdFee.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("placeholder","Nh\u1eadp m\u1ee9c ph\xed d\u1ecbch v\u1ee5")("formControl",t.serviceFeeForm.controls.chdFee),e.xp6(1),e.Q6J("ngIf",t.serviceFeeForm.controls.chdFee.hasError("required")&&(t.serviceFeeForm.controls.chdFee.touched||t.serviceFeeForm.controls.chdFee.dirty)),e.xp6(1),e.Q6J("status",t.serviceFeeForm.controls.infFee.invalid&&(t.serviceFeeForm.controls.infFee.dirty||t.serviceFeeForm.controls.infFee.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("placeholder","Nh\u1eadp m\u1ee9c ph\xed d\u1ecbch v\u1ee5")("formControl",t.serviceFeeForm.controls.infFee),e.xp6(1),e.Q6J("ngIf",t.serviceFeeForm.controls.infFee.hasError("required")&&(t.serviceFeeForm.controls.infFee.touched||t.serviceFeeForm.controls.infFee.dirty)),e.xp6(1),e.Q6J("status",t.serviceFeeForm.controls.currencyCode.invalid&&(t.serviceFeeForm.controls.currencyCode.dirty||t.serviceFeeForm.controls.currencyCode.touched)?"error":"default")("data",t.currencyOptions||e.DdM(45,P))("allowSearch",!1)("formControl",t.serviceFeeForm.controls.currencyCode),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("ngIf",t.serviceFeeForm.controls.currencyCode.hasError("required")&&(t.serviceFeeForm.controls.currencyCode.touched||t.serviceFeeForm.controls.currencyCode.dirty))}}function We(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",39),e._UZ(1,"img",40),e.TgZ(2,"div",41)(3,"div",42),e._uU(4," Th\xeam quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5 th\xe0nh c\xf4ng! "),e.qZA(),e.TgZ(5,"div",43),e._uU(6," \u0110\xe3 th\xeam quy \u0111\u1ecbnh ph\xf3 d\u1ecbch v\u1ee5. B\u1ea1n c\xf3 th\u1ec3 th\xeam quy \u0111\u1ecbnh m\u1edbi ho\u1eb7c tr\u1edf v\u1ec1 m\xe0n h\xecnh danh s\xe1ch c\xe1c quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5 "),e.qZA()(),e.TgZ(7,"div",30)(8,"button",44),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onBackToList())}),e._uU(9," Xem danh s\xe1ch "),e.qZA(),e.TgZ(10,"button",33),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onCreateNew())}),e._uU(11," T\u1ea1o m\u1edbi "),e.qZA()()()}}function et(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",39),e._UZ(1,"img",45),e.TgZ(2,"div",41)(3,"div",42),e._uU(4," Th\xeam quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5 th\u1ea5t b\u1ea1i "),e.qZA(),e.TgZ(5,"div",43),e._uU(6," C\xf3 l\u1ed7i x\u1ea3y ra trong qu\xe1 tr\xecnh th\xeam quy \u0111\u1ecbnh. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c tr\u1edf v\u1ec1 m\xe0n h\xecnh danh s\xe1ch! "),e.qZA()(),e.TgZ(7,"div",30)(8,"button",44),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onBackToList())}),e._uU(9," Xem danh s\xe1ch "),e.qZA(),e.TgZ(10,"button",33),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onNextStep("CONFIG"))}),e._uU(11," Th\u1eed l\u1ea1i "),e.qZA()()()}}function tt(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",39),e._UZ(1,"img",45),e.TgZ(2,"div",41)(3,"div",42),e._uU(4," \u0110\xe3 t\u1ed3n t\u1ea1i quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5 "),e.qZA(),e.TgZ(5,"div",46)(6,"div"),e._uU(7,"Kh\xf4ng th\u1ec3 th\xeam quy \u0111\u1ecbnh m\u1edbi v\xec trng h\u1ec7 th\u1ed1ng \u0111\xe3 t\u1ed3n t\u1ea1i quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5 v\u1edbi \u0111i\u1ec1u ki\u1ec7n t\u01b0\u01a1ng t\u1ef1. "),e.qZA(),e.TgZ(8,"div"),e._uU(9,"Vui l\xf2ng ch\u1ec9nh s\u1eeda \u0111i\u1ec1u ki\u1ec7n ho\u1eb7c h\u1ee7y vi\u1ec7c th\xeam m\u1edbi."),e.qZA()()(),e.TgZ(10,"div",30)(11,"button",44),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onBackToList())}),e._uU(12," Xem danh s\xe1ch "),e.qZA(),e.TgZ(13,"button",33),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onNextStep("CONFIG"))}),e._uU(14," Ch\u1ec9nh s\u1eeda "),e.qZA()()()}}function it(i,c){if(1&i&&(e.TgZ(0,"div",48),e._UZ(1,"div",49),e.ALo(2,"highlighter"),e._UZ(3,"div",50),e.ALo(4,"highlighter"),e.qZA()),2&i){const t=e.oxw(),n=t.item,r=t.search;e.xp6(1),e.Q6J("innerHtml",e.xi3(2,2,n.city+", "+n.nationalName,r.text),e.oJD),e.xp6(2),e.Q6J("innerHtml",e.xi3(4,5,n.code+" - "+n.name,r.text),e.oJD)}}function nt(i,c){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"div",49),e.ALo(2,"highlighter"),e.qZA()),2&i){const t=e.oxw(),n=t.item,r=t.search;e.xp6(1),e.Q6J("innerHtml",e.xi3(2,1,n.name,r.text),e.oJD)}}function rt(i,c){if(1&i&&(e.YNc(0,it,5,8,"div",47),e.YNc(1,nt,3,4,"div",5)),2&i){const t=c.item;e.Q6J("ngIf","ALL"!==t.code),e.xp6(1),e.Q6J("ngIf","ALL"===t.code)}}function ot(i,c){1&i&&e._UZ(0,"cf-spinner")}let ct=(()=>{class i{constructor(t,n,r,o,l,A,N){this._fb=r,this._serviceFeeService=o,this._route=l,this._cd=A,this._modal=N,this.departureType="AIRPORT",this.arrivalType="AIRPORT",this.step="CONFIG",this.airlineOptions=[],this.currencyOptions=[],this.airportDepartureOptions=[],this.countryDepartureOptions=[],this.areaDepartureOptions=[],this.airportArrivalOptions=[],this.countryArrivalOptions=[],this.areaArrivalOptions=[],this.agentGroupOptions=[],this.errorMessage={airline:"H\xe3ng bay kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",groupAgId:"Nh\xf3m \u0111\u1ea1i l\xfd kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",adtFee:"Gi\xe1 tr\u1ecb kh\xf4ng h\u1ee3p l\u1ec7",chdFee:"Gi\xe1 tr\u1ecb kh\xf4ng h\u1ee3p l\u1ec7",infFee:"Gi\xe1 tr\u1ecb kh\xf4ng h\u1ee3p l\u1ec7",currencyCode:"Lo\u1ea1i ti\u1ec1n kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng"},this.isLoading=!1,t.registerIcons([p.rJw,p.llu,p.NNX]),this.serviceFeeId=n.snapshot.params.id;const h=history.state.serviceFeeData;this.serviceFeeId&&(this.serivceFeeDataPatch={airline:h.airline,startPointType:h.startPointType,endPointType:h.endPointType,groupAgId:h.groupAgId?h.groupAgId:"ALL",adtFee:h.adtFee,chdFee:h.chdFee,infFee:h.infFee,currencyCode:h.currencyCode.code},this.departureType=h.startPointType,this.arrivalType=h.endPointType)}ngOnInit(){this.getCreateInfo(),this.initFormGroup()}initFormGroup(){this.serviceFeeForm=this._fb.group({airline:[null,s.kI.required],startPointType:["",s.kI.required],startPointDetail:[null,s.kI.required],endPointType:["",s.kI.required],endPointDetail:[null,s.kI.required],groupAgId:["ALL",s.kI.required],adtFee:["",s.kI.required],chdFee:["",s.kI.required],infFee:["",s.kI.required],currencyCode:["",s.kI.required]})}getCreateInfo(){this._serviceFeeService.getInfoCreateServiceFee().subscribe({next:t=>{t.success&&(this.airlineOptions=t.data.airlineList.map(n=>({code:n.code,name:n.name})),this.airlineOptions.unshift({code:"ALL",name:"T\u1ea5t c\u1ea3"}),this.currencyOptions=t.data.currencyList.map(n=>({code:n.code,name:n.name})),this.airportDepartureOptions=t.data.airportInfoList.map(n=>({code:n.code,name:n.name,city:n.city,nationalName:n.nationalName,displayName:`${n.code} - ${n.city}`})),this.airportDepartureOptions.unshift({code:"ALL",name:"T\u1ea5t c\u1ea3 s\xe2n bay",city:"",nationalName:"",displayName:"T\u1ea5t c\u1ea3 s\xe2n bay"}),this.areaDepartureOptions=t.data.areaInfoList.map(n=>({code:n.code,name:n.name})),this.countryDepartureOptions=t.data.nationalInfoList.map(n=>({code:n.code,name:n.name})),this.airportArrivalOptions=t.data.airportInfoList.map(n=>({code:n.code,name:n.name,city:n.city,nationalName:n.nationalName,displayName:`${n.code} - ${n.city}`})),this.airportArrivalOptions.unshift({code:"ALL",name:"T\u1ea5t c\u1ea3 s\xe2n bay",city:"",nationalName:"",displayName:"T\u1ea5t c\u1ea3 s\xe2n bay"}),this.areaArrivalOptions=t.data.areaInfoList.map(n=>({code:n.code,name:n.name})),this.countryArrivalOptions=t.data.nationalInfoList.map(n=>({code:n.code,name:n.name})),this.agentGroupOptions=t.data.grpAgList.map(n=>({code:n.id,name:n.name})),this.agentGroupOptions.unshift({code:"ALL",name:"T\u1ea5t c\u1ea3"}),this._cd.detectChanges(),this.serviceFeeForm.patchValue(this.serivceFeeDataPatch?this.serivceFeeDataPatch:{airline:"ALL",startPointType:this.departureType,endPointType:this.arrivalType,startPointDetail:["ALL"],endPointDetail:["ALL"],groupAgId:"ALL",currencyCode:"VND"}))}})}onChangeType(t,n){"departureType"===t&&(this.departureType=n,this.serviceFeeForm.controls.startPointDetail.setValue(["ALL"])),"arrivalType"===t&&(this.arrivalType=n,this.serviceFeeForm.controls.endPointDetail.setValue(["ALL"]))}onPointChange(t,n){"ALL"===t.code?(this.serviceFeeForm.get(n).setValue(null),this.serviceFeeForm.get(n).setValue(["ALL"])):this.serviceFeeForm.get(n).value.includes("ALL")&&(this.serviceFeeForm.get(n).setValue(null),this.serviceFeeForm.get(n).setValue([t.code]))}checkDirtyNumber(t){const n=this.serviceFeeForm.value;this.serviceFeeForm.controls[t].setErrors(n[t]||0===n[t]?null:{required:!0})}onSubmit(){if(this.checkDirtyNumber("adtFee"),this.checkDirtyNumber("chdFee"),this.checkDirtyNumber("infFee"),this.serviceFeeForm.markAllAsTouched(),this.serviceFeeForm.invalid)return;const t=this.serviceFeeForm.value,n={airline:t.airline||"",startPointType:this.departureType||"",startPointDetail:t.startPointDetail.join(","),endPointType:this.arrivalType||"",endPointDetail:t.endPointDetail.join(","),groupAgId:t.groupAgId||null,adtFee:t.adtFee||0,chdFee:t.chdFee||0,infFee:t.infFee||0,currencyCode:t.currencyCode||""};if(this.isLoading=!0,this.serviceFeeId){const r=Object.assign(Object.assign({},n),{id:this.serviceFeeId});this._serviceFeeService.updateServiceFeeConfig(r).pipe((0,b.x)(()=>this.isLoading=!1)).subscribe({next:o=>{this.step=o.success&&o.data?"SUCCESS":"ERROR"},error:()=>{this.step="ERROR"}})}else this._serviceFeeService.createServiceFee(n).pipe((0,b.x)(()=>this.isLoading=!1)).subscribe({next:r=>{this.step=r.success&&r.data?"SUCCESS":"ERROR"},error:()=>{this.step="ERROR"}})}onBackToList(){this._route.navigate(["admin/service-fee"])}onNextStep(t){this.step=t}onClose(){this._modal.open(C.V0,{title:"R\u1eddi kh\u1ecfi m\xe0n h\xecnh n\xe0y?",body:"Th\xf4ng tin nh\u1eadp s\u1ebd b\u1ecb m\u1ea5t n\u1ebfu b\u1ea1n r\u1eddi kh\u1ecfi m\xe0n h\xecnh n\xe0y. B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n r\u1eddi kh\u1ecfi trang?",okText:"C\xf3, R\u1eddi trang",cancelText:"Kh\xf4ng, \u1edf l\u1ea1i",hasIcon:!1}).afterClosed$.subscribe({next:n=>{n.data&&this._route.navigate(["admin/service-fee"])}})}onCreateNew(){this.step="CONFIG",this.serviceFeeForm.reset()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(p.KNP),e.Y36(J.gz),e.Y36(s.qu),e.Y36(k),e.Y36(J.F0),e.Y36(e.sBO),e.Y36(w.oE))},i.\u0275cmp=e.Xpm({type:i,selectors:[["create-service-fee-page"]],standalone:!0,features:[e.jDz],decls:9,vars:5,consts:[[1,"flex","justify-center","py-4","px-[30px]"],[1,"w-[1000px]","max-w-[1000px]"],["class","flex flex-col gap-y-4",4,"ngIf"],["class","rounded-lg bg-neutral-white mx-auto py-32 flex flex-col gap-y-6 justify-center items-center",4,"ngIf"],["optionTmp",""],[4,"ngIf"],[1,"flex","flex-col","gap-y-4"],[1,"bg-white","rounded","shadow-cf-md","flex","flex-col","gap-y-3","p-6"],[1,"flex","flex-col","gap-y-1"],[1,"text-heading-sm","text-neutral-black"],[1,"text-espressive-sm","text-neutral-gray-4"],[1,""],["textField","name","valueField","code","placeholder","Ch\u1ecdn h\xe3ng bay",1,"w-full","!max-w-full",3,"status","data","allowSearch","formControl"],[1,"flex","flex-col","gap-y-6"],[1,"text-espressive-md","text-neutral-gray-5"],[1,"border","border-neutral-gray-2","p-4","rounded","flex","flex-col","gap-y-3"],[1,"flex","items-center","gap-x-8",3,"ngModel","checkChange"],["size","medium",3,"value"],["class","w-full !max-w-full","textField","displayName","valueField","code","placeholder","Ch\u1ecdn m\xe3 s\xe2n bay",3,"status","data","allowSearch","maxHeight","optionTmp","formControl","valueChange",4,"ngIf"],["class","w-full !max-w-full","textField","name","valueField","code","placeholder","Ch\u1ecdn qu\u1ed1c gia",3,"status","data","allowSearch","maxHeight","formControl",4,"ngIf"],["class","w-full !max-w-full","textField","name","valueField","code","placeholder","Ch\u1ecdn khu v\u1ef1c",3,"status","data","allowSearch","maxHeight","formControl",4,"ngIf"],["textField","name","valueField","code","placeholder","Ch\u1ecdn nh\xf3m \u0111\u1ea1i l\xfd",1,"w-full","!max-w-full",3,"status","data","allowSearch","formControl"],["cfHint","",3,"hint",4,"ngIf"],[1,"flex","flex-col","gap-y-3"],[1,"flex","gap-x-3"],[1,"grow-[400]","!w-full",3,"status"],["cfLabel","",1,"text-express-sm","text-black",3,"CfRequired"],["size","medium",3,"placeholder","formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn lo\u1ea1i ti\u1ec1n",1,"w-full","!max-w-full",3,"status","data","allowSearch","formControl"],[1,"flex","justify-between"],[1,"flex","gap-x-4"],["cf-button","","size","medium","type","secondary",1,"bg-neutral-white",3,"click"],["icon","chevron_left","size","small",1,"mr-2.5"],["cf-button","","size","medium",3,"click"],["icon","check","size","small",1,"mr-2.5"],["textField","displayName","valueField","code","placeholder","Ch\u1ecdn m\xe3 s\xe2n bay",1,"w-full","!max-w-full",3,"status","data","allowSearch","maxHeight","optionTmp","formControl","valueChange"],["textField","name","valueField","code","placeholder","Ch\u1ecdn qu\u1ed1c gia",1,"w-full","!max-w-full",3,"status","data","allowSearch","maxHeight","formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn khu v\u1ef1c",1,"w-full","!max-w-full",3,"status","data","allowSearch","maxHeight","formControl"],["cfHint","",3,"hint"],[1,"rounded-lg","bg-neutral-white","mx-auto","py-32","flex","flex-col","gap-y-6","justify-center","items-center"],["src","assets/icons/icon-success.svg","alt",""],[1,"flex","flex-col","gap-y-3","justify-center","items-center"],[1,"text-heading-sm","text-neutral-gray-6"],[1,"text-body-md","text-neutral-gray-5"],["cf-button","","size","medium","type","secondary",1,"bg-white",3,"click"],["src","assets/icons/icon-error.svg","alt",""],[1,"text-body-md","text-neutral-gray-5","text-center"],["class","flex flex-col",4,"ngIf"],[1,"flex","flex-col"],[1,"text-body-md-short","text-neutral-gray-6",3,"innerHtml"],[1,"text-body-sm","text-neutral-gray-4",3,"innerHtml"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,$e,89,46,"div",2),e.YNc(3,We,12,0,"div",3),e.YNc(4,et,12,0,"div",3),e.YNc(5,tt,15,0,"div",3),e.qZA()(),e.YNc(6,rt,2,2,"ng-template",null,4,e.W1O),e.YNc(8,ot,1,0,"cf-spinner",5)),2&t&&(e.xp6(2),e.Q6J("ngIf","CONFIG"===n.step),e.xp6(1),e.Q6J("ngIf","SUCCESS"===n.step),e.xp6(1),e.Q6J("ngIf","ERROR"===n.step),e.xp6(1),e.Q6J("ngIf","DUPLICATE"===n.step),e.xp6(3),e.Q6J("ngIf",n.isLoading))},dependencies:[f.ez,f.O5,s.u5,s.JJ,s.On,s.UX,s.oH,S.q,H.U,v.j$,v.ND,v.v2,v.lt,O.C,L.o,L.T,T.N8,T.Xq,p.AxE,p.Sm8,Be.T,C.OR],encapsulation:2}),i})();var at=d(4688),ut=d(76978);function st(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",9)(1,"button",10),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onEdit())}),e._UZ(2,"cf-icon",11),e._uU(3," Ch\u1ec9nh s\u1eeda "),e.qZA(),e.TgZ(4,"button",5),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onDelete())}),e._UZ(5,"cf-icon",12),e._uU(6," X\xf3a "),e.qZA()()}}function lt(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",9)(1,"button",10),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onSubmit())}),e._UZ(2,"cf-icon",13),e._uU(3," L\u01b0u "),e.qZA(),e.TgZ(4,"button",5),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onCancel())}),e._UZ(5,"cf-icon",14),e._uU(6," H\u1ee7y "),e.qZA()()}}function dt(i,c){if(1&i&&(e.ynx(0),e.TgZ(1,"cf-label",35),e._uU(2),e.qZA(),e.BQk()),2&i){const t=c.$implicit;e.xp6(1),e.Q6J("size","small")("color","gray-2"),e.xp6(1),e.hij(" ","ALL"===t?"T\u1ea5t c\u1ea3":t," ")}}function pt(i,c){if(1&i&&(e.ynx(0),e.TgZ(1,"cf-label",35),e._uU(2),e.qZA(),e.BQk()),2&i){const t=c.$implicit;e.xp6(1),e.Q6J("size","small")("color","gray-2"),e.xp6(1),e.hij(" ","ALL"===t?"T\u1ea5t c\u1ea3":t," ")}}const D=function(){return[]};function ht(i,c){if(1&i&&(e.TgZ(0,"div",15)(1,"div",16)(2,"div",17)(3,"div",18),e._uU(4," \u0110i\u1ec1u ki\u1ec7n h\xe3ng bay "),e.qZA(),e.TgZ(5,"div",19),e._uU(6," H\xe3ng bay khai th\xe1c "),e.qZA()(),e.TgZ(7,"div",20),e._uU(8),e.qZA()(),e.TgZ(9,"div",16)(10,"div",17)(11,"div",18),e._uU(12," \u0110i\u1ec1u ki\u1ec7n h\xe0nh tr\xecnh "),e.qZA(),e.TgZ(13,"div",19),e._uU(14," H\xe0nh tr\xecnh bay \xe1p d\u1ee5ng, bao g\u1ed3m c\u1ea3 m\u1ed9t chi\u1ec1u v\xe0 kh\u1ee9 h\u1ed3i "),e.qZA()(),e.TgZ(15,"div",21)(16,"div",15)(17,"div",22),e._uU(18,"\u0110i\u1ec3m kh\u1edfi h\xe0nh"),e.qZA(),e.TgZ(19,"div",23)(20,"cf-radio-group",24)(21,"cf-radio",25),e._uU(22,"Theo s\xe2n bay"),e.qZA(),e.TgZ(23,"cf-radio",25),e._uU(24,"Theo qu\u1ed1c gia"),e.qZA(),e.TgZ(25,"cf-radio",25),e._uU(26,"Theo khu v\u1ef1c"),e.qZA()(),e.TgZ(27,"div",26),e.YNc(28,dt,3,3,"ng-container",27),e.qZA()()(),e.TgZ(29,"div",15)(30,"div",22),e._uU(31,"\u0110i\u1ec3m \u0111\u1ebfn"),e.qZA(),e.TgZ(32,"div",23)(33,"cf-radio-group",24)(34,"cf-radio",25),e._uU(35,"Theo s\xe2n bay"),e.qZA(),e.TgZ(36,"cf-radio",25),e._uU(37,"Theo qu\u1ed1c gia"),e.qZA(),e.TgZ(38,"cf-radio",25),e._uU(39,"Theo khu v\u1ef1c"),e.qZA()(),e.TgZ(40,"div",26),e.YNc(41,pt,3,3,"ng-container",27),e.qZA()()()()(),e.TgZ(42,"div",16)(43,"div",17)(44,"div",18),e._uU(45," Nh\xf3m \u0111\u1ea1i l\xfd "),e.qZA(),e.TgZ(46,"div",19),e._uU(47," C\xe1c \u0111\u1ea1i l\xfd thu\u1ed9c nh\xf3m n\xe0y s\u1ebd \u0111\u01b0\u1ee3c \xe1p d\u1ee5ng m\u1ee9c ph\xed d\u1ecbch v\u1ee5 "),e.qZA()(),e.TgZ(48,"div",28)(49,"div",29),e._uU(50),e.qZA()()(),e.TgZ(51,"div",16)(52,"div",17)(53,"div",18),e._uU(54," M\u1ee9c ph\xed d\u1ecbch v\u1ee5 "),e.qZA(),e.TgZ(55,"div",19),e._uU(56," M\u1ee9c ph\xed d\u1ecbch v\u1ee5 \xe1p d\u1ee5ng cho vi\u1ec7c xu\u1ea5t, ho\xe0n, \u0111\u1ed5i v\xe9 v\xe0 th\xeam d\u1ecbch v\u1ee5 c\u1ed9ng th\xeam "),e.qZA()(),e.TgZ(57,"div",30)(58,"div",31)(59,"div",32)(60,"div",33),e._uU(61,"Ng\u01b0\u1eddi l\u1edbn (ADT)"),e.qZA(),e.TgZ(62,"div",29),e._uU(63),e.ALo(64,"replace"),e.ALo(65,"number"),e.qZA()(),e.TgZ(66,"div",32)(67,"div",33),e._uU(68,"Tr\u1ebb em (CHD)"),e.qZA(),e.TgZ(69,"div",29),e._uU(70),e.ALo(71,"replace"),e.ALo(72,"number"),e.qZA()(),e.TgZ(73,"div",32)(74,"div",33),e._uU(75,"Em b\xe9 (IFN)"),e.qZA(),e.TgZ(76,"div",29),e._uU(77),e.ALo(78,"replace"),e.ALo(79,"number"),e.qZA()()(),e.TgZ(80,"div",34)(81,"div",33),e._uU(82,"Lo\u1ea1i ti\u1ec1n"),e.qZA(),e.TgZ(83,"div",29),e._uU(84),e.qZA()()()()()),2&i){const t=e.oxw(2);e.xp6(8),e.hij(" ",null==t.serivceFeeDisplay?null:t.serivceFeeDisplay.airline," "),e.xp6(12),e.Q6J("ngModel",t.departureType),e.xp6(1),e.Q6J("disabled",!0)("value","AIRPORT"),e.xp6(2),e.Q6J("disabled",!0)("value","NATIONAL"),e.xp6(2),e.Q6J("disabled",!0)("value","AREA"),e.xp6(3),e.Q6J("ngForOf",(null==t.serivceFeeDisplay?null:t.serivceFeeDisplay.startPointDetail)||e.DdM(40,D)),e.xp6(5),e.Q6J("ngModel",t.arrivalType),e.xp6(1),e.Q6J("disabled",!0)("value","AIRPORT"),e.xp6(2),e.Q6J("disabled",!0)("value","NATIONAL"),e.xp6(2),e.Q6J("disabled",!0)("value","AREA"),e.xp6(3),e.Q6J("ngForOf",(null==t.serivceFeeDisplay?null:t.serivceFeeDisplay.endPointDetail)||e.DdM(41,D)),e.xp6(9),e.hij(" ",null==t.serivceFeeDisplay?null:t.serivceFeeDisplay.groupAgName," "),e.xp6(13),e.hij(" ",e.Dn7(64,22,e.lcZ(65,26,(null==t.serivceFeeDisplay?null:t.serivceFeeDisplay.adtFee)||0),",",".")," \u0111 "),e.xp6(7),e.hij(" ",e.Dn7(71,28,e.lcZ(72,32,(null==t.serivceFeeDisplay?null:t.serivceFeeDisplay.chdFee)||0),",",".")," \u0111 "),e.xp6(7),e.hij(" ",e.Dn7(78,34,e.lcZ(79,38,(null==t.serivceFeeDisplay?null:t.serivceFeeDisplay.infFee)||0),",",".")," \u0111 "),e.xp6(7),e.hij(" ",null==t.serivceFeeDisplay?null:t.serivceFeeDisplay.currencyCode," ")}}function gt(i,c){if(1&i&&e._UZ(0,"cf-multi-select",48),2&i){const t=e.oxw(3);e.Q6J("status","default")("data",t.airportDepartureOptions||e.DdM(5,D))("allowSearch",!0)("maxHeight",230)("formControl",t.serviceFeeForm.controls.startPointDetail)}}function mt(i,c){if(1&i&&e._UZ(0,"cf-multi-select",49),2&i){const t=e.oxw(3);e.Q6J("status","default")("data",t.countryDepartureOptions||e.DdM(5,D))("allowSearch",!0)("maxHeight",230)("formControl",t.serviceFeeForm.controls.startPointDetail)}}function vt(i,c){if(1&i&&e._UZ(0,"cf-multi-select",50),2&i){const t=e.oxw(3);e.Q6J("status","default")("data",t.areaDepartureOptions||e.DdM(5,D))("allowSearch",!0)("maxHeight",230)("formControl",t.serviceFeeForm.controls.startPointDetail)}}function ft(i,c){if(1&i&&e._UZ(0,"cf-multi-select",48),2&i){const t=e.oxw(3);e.Q6J("status","default")("data",t.airportArrivalOptions||e.DdM(5,D))("allowSearch",!0)("maxHeight",230)("formControl",t.serviceFeeForm.controls.endPointDetail)}}function _t(i,c){if(1&i&&e._UZ(0,"cf-multi-select",49),2&i){const t=e.oxw(3);e.Q6J("status","default")("data",t.countryArrivalOptions||e.DdM(5,D))("allowSearch",!0)("maxHeight",230)("formControl",t.serviceFeeForm.controls.endPointDetail)}}function Et(i,c){if(1&i&&e._UZ(0,"cf-multi-select",50),2&i){const t=e.oxw(3);e.Q6J("status","default")("data",t.areaArrivalOptions||e.DdM(5,D))("allowSearch",!0)("maxHeight",230)("formControl",t.serviceFeeForm.controls.endPointDetail)}}function Ct(i,c){1&i&&e._UZ(0,"cf-input-hint",51),2&i&&e.Q6J("hint","Nh\xf3m \u0111\u1ea1i l\xfd kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Ft(i,c){if(1&i&&e._UZ(0,"cf-input-hint",51),2&i){const t=e.oxw(3);e.Q6J("hint",t.errorMessage.adtFee)}}function xt(i,c){if(1&i&&e._UZ(0,"cf-input-hint",51),2&i){const t=e.oxw(3);e.Q6J("hint",t.errorMessage.chdFee)}}function yt(i,c){if(1&i&&e._UZ(0,"cf-input-hint",51),2&i){const t=e.oxw(3);e.Q6J("hint",t.errorMessage.infFee)}}function At(i,c){if(1&i&&e._UZ(0,"cf-input-hint",51),2&i){const t=e.oxw(3);e.Q6J("hint",t.errorMessage.currencyCode)}}function Tt(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",15)(1,"div",16)(2,"div",17)(3,"div",18),e._uU(4," \u0110i\u1ec1u ki\u1ec7n h\xe3ng bay "),e.qZA(),e.TgZ(5,"div",19),e._uU(6," H\xe3ng bay khai th\xe1c "),e.qZA()(),e.TgZ(7,"div",28),e._UZ(8,"cf-select",36),e.qZA()(),e.TgZ(9,"div",16)(10,"div",17)(11,"div",18),e._uU(12," \u0110i\u1ec1u ki\u1ec7n h\xe0nh tr\xecnh "),e.qZA(),e.TgZ(13,"div",19),e._uU(14," H\xe0nh tr\xecnh bay \xe1p d\u1ee5ng, bao g\u1ed3m c\u1ea3 m\u1ed9t chi\u1ec1u v\xe0 kh\u1ee9 h\u1ed3i "),e.qZA()(),e.TgZ(15,"div",21)(16,"div",15)(17,"div",22),e._uU(18,"\u0110i\u1ec3m kh\u1edfi h\xe0nh"),e.qZA(),e.TgZ(19,"div",23)(20,"cf-radio-group",37),e.NdJ("checkChange",function(r){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onChangeType("departureType",r))}),e.TgZ(21,"cf-radio",38),e._uU(22,"Theo s\xe2n bay"),e.qZA(),e.TgZ(23,"cf-radio",38),e._uU(24,"Theo qu\u1ed1c gia"),e.qZA(),e.TgZ(25,"cf-radio",38),e._uU(26,"Theo khu v\u1ef1c"),e.qZA()(),e.YNc(27,gt,1,6,"cf-multi-select",39),e.YNc(28,mt,1,6,"cf-multi-select",40),e.YNc(29,vt,1,6,"cf-multi-select",41),e.qZA()(),e.TgZ(30,"div",15)(31,"div",22),e._uU(32,"\u0110i\u1ec3m \u0111\u1ebfn"),e.qZA(),e.TgZ(33,"div",23)(34,"cf-radio-group",37),e.NdJ("checkChange",function(r){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onChangeType("arrivalType",r))}),e.TgZ(35,"cf-radio",38),e._uU(36,"Theo s\xe2n bay"),e.qZA(),e.TgZ(37,"cf-radio",38),e._uU(38,"Theo qu\u1ed1c gia"),e.qZA(),e.TgZ(39,"cf-radio",38),e._uU(40,"Theo khu v\u1ef1c"),e.qZA()(),e.YNc(41,ft,1,6,"cf-multi-select",39),e.YNc(42,_t,1,6,"cf-multi-select",40),e.YNc(43,Et,1,6,"cf-multi-select",41),e.qZA()()()(),e.TgZ(44,"div",16)(45,"div",17)(46,"div",18),e._uU(47," Nh\xf3m \u0111\u1ea1i l\xfd "),e.qZA(),e.TgZ(48,"div",19),e._uU(49," C\xe1c \u0111\u1ea1i l\xfd thu\u1ed9c nh\xf3m n\xe0y s\u1ebd \u0111\u01b0\u1ee3c \xe1p d\u1ee5ng m\u1ee9c ph\xed d\u1ecbch v\u1ee5 "),e.qZA()(),e.TgZ(50,"div",28)(51,"cf-select",42),e.YNc(52,Ct,1,1,"cf-input-hint",43),e.qZA()()(),e.TgZ(53,"div",16)(54,"div",17)(55,"div",18),e._uU(56," M\u1ee9c ph\xed d\u1ecbch v\u1ee5 "),e.qZA(),e.TgZ(57,"div",19),e._uU(58," M\u1ee9c ph\xed d\u1ecbch v\u1ee5 \xe1p d\u1ee5ng cho vi\u1ec7c xu\u1ea5t, ho\xe0n, \u0111\u1ed5i v\xe9 v\xe0 th\xeam d\u1ecbch v\u1ee5 c\u1ed9ng th\xeam "),e.qZA()(),e.TgZ(59,"div",30)(60,"div",31)(61,"cf-input-group",44)(62,"label",45),e._uU(63," Ng\u01b0\u1eddi l\u1edbn (ADT) "),e.qZA(),e._UZ(64,"cf-input-number",46),e.YNc(65,Ft,1,1,"cf-input-hint",43),e.qZA(),e.TgZ(66,"cf-input-group",44)(67,"label",45),e._uU(68," Tr\u1ebb em (CHD) "),e.qZA(),e._UZ(69,"cf-input-number",46),e.YNc(70,xt,1,1,"cf-input-hint",43),e.qZA(),e.TgZ(71,"cf-input-group",44)(72,"label",45),e._uU(73," Em b\xe9 (IFN) "),e.qZA(),e._UZ(74,"cf-input-number",46),e.YNc(75,yt,1,1,"cf-input-hint",43),e.qZA()(),e.TgZ(76,"cf-select",47)(77,"label",45),e._uU(78," Lo\u1ea1i ti\u1ec1n "),e.qZA(),e.YNc(79,At,1,1,"cf-input-hint",43),e.qZA()()()()}if(2&i){const t=e.oxw(2);e.xp6(8),e.Q6J("status",t.serviceFeeForm.controls.airline.invalid&&(t.serviceFeeForm.controls.airline.dirty||t.serviceFeeForm.controls.airline.touched)?"error":"default")("data",t.airlineOptions)("allowSearch",!1)("formControl",t.serviceFeeForm.controls.airline),e.xp6(12),e.Q6J("ngModel",t.departureType),e.xp6(1),e.Q6J("value","AIRPORT"),e.xp6(2),e.Q6J("value","NATIONAL"),e.xp6(2),e.Q6J("value","AREA"),e.xp6(2),e.Q6J("ngIf","AIRPORT"===t.departureType),e.xp6(1),e.Q6J("ngIf","NATIONAL"===t.departureType),e.xp6(1),e.Q6J("ngIf","AREA"===t.departureType),e.xp6(5),e.Q6J("ngModel",t.arrivalType),e.xp6(1),e.Q6J("value","AIRPORT"),e.xp6(2),e.Q6J("value","NATIONAL"),e.xp6(2),e.Q6J("value","AREA"),e.xp6(2),e.Q6J("ngIf","AIRPORT"===t.arrivalType),e.xp6(1),e.Q6J("ngIf","NATIONAL"===t.arrivalType),e.xp6(1),e.Q6J("ngIf","AREA"===t.arrivalType),e.xp6(8),e.Q6J("status",t.serviceFeeForm.controls.groupAgId.invalid&&(t.serviceFeeForm.controls.groupAgId.dirty||t.serviceFeeForm.controls.groupAgId.touched)?"error":"default")("data",t.agentGroupOptions||e.DdM(44,D))("allowSearch",!1)("formControl",t.serviceFeeForm.controls.groupAgId),e.xp6(1),e.Q6J("ngIf",t.serviceFeeForm.controls.groupAgId.hasError("required")&&(t.serviceFeeForm.controls.groupAgId.touched||t.serviceFeeForm.controls.groupAgId.dirty)),e.xp6(9),e.Q6J("status",t.serviceFeeForm.controls.adtFee.invalid&&(t.serviceFeeForm.controls.adtFee.dirty||t.serviceFeeForm.controls.adtFee.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("placeholder","Nh\u1eadp m\u1ee9c ph\xed d\u1ecbch v\u1ee5")("formControl",t.serviceFeeForm.controls.adtFee),e.xp6(1),e.Q6J("ngIf",t.serviceFeeForm.controls.adtFee.hasError("required")&&(t.serviceFeeForm.controls.adtFee.touched||t.serviceFeeForm.controls.adtFee.dirty)),e.xp6(1),e.Q6J("status",t.serviceFeeForm.controls.chdFee.invalid&&(t.serviceFeeForm.controls.chdFee.dirty||t.serviceFeeForm.controls.chdFee.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("placeholder","Nh\u1eadp m\u1ee9c ph\xed d\u1ecbch v\u1ee5")("formControl",t.serviceFeeForm.controls.chdFee),e.xp6(1),e.Q6J("ngIf",t.serviceFeeForm.controls.chdFee.hasError("required")&&(t.serviceFeeForm.controls.chdFee.touched||t.serviceFeeForm.controls.chdFee.dirty)),e.xp6(1),e.Q6J("status",t.serviceFeeForm.controls.infFee.invalid&&(t.serviceFeeForm.controls.infFee.dirty||t.serviceFeeForm.controls.infFee.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("placeholder","Nh\u1eadp m\u1ee9c ph\xed d\u1ecbch v\u1ee5")("formControl",t.serviceFeeForm.controls.infFee),e.xp6(1),e.Q6J("ngIf",t.serviceFeeForm.controls.infFee.hasError("required")&&(t.serviceFeeForm.controls.infFee.touched||t.serviceFeeForm.controls.infFee.dirty)),e.xp6(1),e.Q6J("status",t.serviceFeeForm.controls.currencyCode.invalid&&(t.serviceFeeForm.controls.currencyCode.dirty||t.serviceFeeForm.controls.currencyCode.touched)?"error":"default")("data",t.currencyOptions||e.DdM(45,D))("allowSearch",!1)("formControl",t.serviceFeeForm.controls.currencyCode),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("ngIf",t.serviceFeeForm.controls.currencyCode.hasError("required")&&(t.serviceFeeForm.controls.currencyCode.touched||t.serviceFeeForm.controls.currencyCode.dirty))}}function Dt(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"div",4)(2,"div")(3,"button",5),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onBackToList())}),e._UZ(4,"cf-icon",6),e._uU(5," Quay l\u1ea1i t\xecm ki\u1ebfm "),e.qZA()(),e.YNc(6,st,7,0,"div",7),e.YNc(7,lt,7,0,"div",7),e.qZA(),e.YNc(8,ht,85,42,"div",8),e.YNc(9,Tt,80,46,"div",8),e.qZA()}if(2&i){const t=e.oxw();e.xp6(6),e.Q6J("ngIf",!t.isEdit),e.xp6(1),e.Q6J("ngIf",t.isEdit),e.xp6(1),e.Q6J("ngIf",!t.isEdit),e.xp6(1),e.Q6J("ngIf",t.isEdit)}}function St(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",52),e._UZ(1,"img",53),e.TgZ(2,"div",54)(3,"div",55),e._uU(4),e.qZA(),e.TgZ(5,"div",56),e._uU(6),e.qZA()(),e.TgZ(7,"div",57)(8,"button",58),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onBackToList())}),e._uU(9," Xem danh s\xe1ch "),e.qZA(),e.TgZ(10,"button",10),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onCreateNew())}),e._uU(11," T\u1ea1o m\u1edbi "),e.qZA()()()}if(2&i){const t=e.oxw();e.xp6(4),e.hij(" ",t.titleText," "),e.xp6(2),e.hij(" ",t.bodyText," ")}}function Zt(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",52),e._UZ(1,"img",59),e.TgZ(2,"div",54)(3,"div",55),e._uU(4),e.qZA(),e.TgZ(5,"div",56),e._uU(6),e.qZA()(),e.TgZ(7,"div",57)(8,"button",58),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onBackToList())}),e._uU(9," Xem danh s\xe1ch "),e.qZA(),e.TgZ(10,"button",10),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onNextStep("CONFIG"))}),e._uU(11," Th\u1eed l\u1ea1i "),e.qZA()()()}if(2&i){const t=e.oxw();e.xp6(4),e.hij(" ",t.titleText," "),e.xp6(2),e.hij(" ",t.bodyText," ")}}function Pt(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",52),e._UZ(1,"img",59),e.TgZ(2,"div",54)(3,"div",55),e._uU(4," \u0110\xe3 t\u1ed3n t\u1ea1i quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5 "),e.qZA(),e.TgZ(5,"div",60)(6,"div"),e._uU(7,"Kh\xf4ng th\u1ec3 th\xeam quy \u0111\u1ecbnh m\u1edbi v\xec trng h\u1ec7 th\u1ed1ng \u0111\xe3 t\u1ed3n t\u1ea1i quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5 v\u1edbi \u0111i\u1ec1u ki\u1ec7n t\u01b0\u01a1ng t\u1ef1. "),e.qZA(),e.TgZ(8,"div"),e._uU(9,"Vui l\xf2ng ch\u1ec9nh s\u1eeda \u0111i\u1ec1u ki\u1ec7n ho\u1eb7c h\u1ee7y vi\u1ec7c th\xeam m\u1edbi."),e.qZA()()(),e.TgZ(10,"div",57)(11,"button",58),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onBackToList())}),e._uU(12," Xem danh s\xe1ch "),e.qZA(),e.TgZ(13,"button",10),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onNextStep("CONFIG"))}),e._uU(14," Ch\u1ec9nh s\u1eeda "),e.qZA()()()}}function bt(i,c){1&i&&e._UZ(0,"cf-spinner")}let Nt=(()=>{class i{constructor(t,n,r,o,l,A,N,h){this._fb=r,this._serviceFeeService=o,this._route=l,this._cd=A,this._modal=N,this._toastService=h,this.departureType="AIRPORT",this.arrivalType="AIRPORT",this.step="CONFIG",this.airlineOptions=[],this.currencyOptions=[],this.airportDepartureOptions=[],this.countryDepartureOptions=[],this.areaDepartureOptions=[],this.airportArrivalOptions=[],this.countryArrivalOptions=[],this.areaArrivalOptions=[],this.agentGroupOptions=[],this.errorMessage={airline:"H\xe3ng bay kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",groupAgId:"Nh\xf3m \u0111\u1ea1i l\xfd kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",adtFee:"Gi\xe1 tr\u1ecb kh\xf4ng h\u1ee3p l\u1ec7",chdFee:"Gi\xe1 tr\u1ecb kh\xf4ng h\u1ee3p l\u1ec7",infFee:"Gi\xe1 tr\u1ecb kh\xf4ng h\u1ee3p l\u1ec7",currencyCode:"Lo\u1ea1i ti\u1ec1n kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng"},this.isEdit=!1,this.isLoading=!1,t.registerIcons([p.rJw,p.llu,p.NNX,p.oFb,p.HTW,p.P5K,p.Hge]),this.serviceFeeId=n.snapshot.params.id}ngOnInit(){this.getCreateInfo(),this.initFormGroup()}initFormGroup(){this.serviceFeeForm=this._fb.group({airline:[null,s.kI.required],startPointType:["",s.kI.required],startPointDetail:[null,s.kI.required],endPointType:["",s.kI.required],endPointDetail:[null,s.kI.required],groupAgId:["ALL",s.kI.required],adtFee:["",s.kI.required],chdFee:["",s.kI.required],infFee:["",s.kI.required],currencyCode:["",s.kI.required]})}getServiceFeeDetail(){this.isLoading=!0,this._serviceFeeService.geServiceFeeById(this.serviceFeeId).pipe((0,b.x)(()=>this.isLoading=!1)).subscribe({next:t=>{var n;this.serivceFeeDisplay={airline:(null===(n=this.airlineOptions.find(o=>o.code===t.data.airline))||void 0===n?void 0:n.name)||"",startPointType:t.data.startPointType,startPointDetail:t.data.startPointDetails.map(o=>o.name),endPointType:t.data.endPointType,endPointDetail:t.data.endPointDetails.map(o=>o.name),groupAgName:t.data.groupAgName&&"ALL"!==t.data.groupAgName.toUpperCase()?t.data.groupAgName:"T\u1ea5t c\u1ea3 nh\xf3m \u0111\u1ea1i l\xfd",adtFee:t.data.adtFee,chdFee:t.data.chdFee,infFee:t.data.infFee,currencyCode:t.data.currencyCode.name};const r={airline:t.data.airline,startPointType:t.data.startPointType,startPointDetail:t.data.startPointDetails.map(o=>o.code),endPointType:t.data.endPointType,endPointDetail:t.data.endPointDetails.map(o=>o.code),groupAgName:t.data.groupAgName?t.data.groupAgName:"T\u1ea5t c\u1ea3 nh\xf3m \u0111\u1ea1i l\xfd",adtFee:t.data.adtFee,chdFee:t.data.chdFee,infFee:t.data.infFee,currencyCode:t.data.currencyCode.code};this.serviceFeeForm.patchValue(r)}})}getCreateInfo(){this._serviceFeeService.getInfoCreateServiceFee().subscribe({next:t=>{t.success&&(this.airlineOptions=t.data.airlineList.map(n=>({code:n.code,name:n.name})),this.airlineOptions.unshift({code:"ALL",name:"T\u1ea5t c\u1ea3"}),this.currencyOptions=t.data.currencyList.map(n=>({code:n.code,name:n.name})),this.airportDepartureOptions=t.data.airportInfoList.map(n=>({code:n.code,name:n.name})),this.areaDepartureOptions=t.data.areaInfoList.map(n=>({code:n.code,name:n.name})),this.countryDepartureOptions=t.data.nationalInfoList.map(n=>({code:n.code,name:n.name})),this.airportArrivalOptions=t.data.airportInfoList.map(n=>({code:n.code,name:n.name})),this.areaArrivalOptions=t.data.areaInfoList.map(n=>({code:n.code,name:n.name})),this.countryArrivalOptions=t.data.nationalInfoList.map(n=>({code:n.code,name:n.name})),this.agentGroupOptions=t.data.grpAgList.map(n=>({code:n.id,name:n.name})),this.agentGroupOptions.unshift({code:"ALL",name:"T\u1ea5t c\u1ea3"}),this._cd.detectChanges(),this.serviceFeeId&&this.getServiceFeeDetail())}})}onChangeType(t,n){"departureType"===t&&(this.departureType=n,this.serviceFeeForm.controls.startPointDetail.setValue(["ALL"])),"arrivalType"===t&&(this.arrivalType=n,this.serviceFeeForm.controls.endPointDetail.setValue(["ALL"]))}checkDirtyNumber(t){const n=this.serviceFeeForm.value;this.serviceFeeForm.controls[t].setErrors(n[t]||0===n[t]?null:{required:!0})}onSubmit(){if(this.checkDirtyNumber("adtFee"),this.checkDirtyNumber("chdFee"),this.checkDirtyNumber("infFee"),this.serviceFeeForm.markAllAsTouched(),this.serviceFeeForm.invalid)return;const t=this.serviceFeeForm.value,n={airline:t.airline||"",startPointType:this.departureType||"",startPointDetail:t.startPointDetail.join(","),endPointType:this.arrivalType||"",endPointDetail:t.endPointDetail.join(","),groupAgId:t.groupAgId||null,adtFee:t.adtFee||0,chdFee:t.chdFee||0,infFee:t.infFee||0,currencyCode:t.currencyCode||""};if(this.serviceFeeId){const r=Object.assign(Object.assign({},n),{id:this.serviceFeeId});this.isLoading=!0,this._serviceFeeService.updateServiceFeeConfig(r).pipe((0,b.x)(()=>this.isLoading=!1)).subscribe({next:o=>{o.success&&o.data?(this.step="SUCCESS",this.titleText="C\u1eadp nh\u1eadt quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5 th\xe0nh c\xf4ng!",this.bodyText="\u0110\xe3 c\u1eadp nh\u1eadt quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5. B\u1ea1n c\xf3 th\u1ec3 th\xeam quy \u0111\u1ecbnh m\u1edbi ho\u1eb7c tr\u1edf v\u1ec1 m\xe0n h\xecnh danh s\xe1ch c\xe1c quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5"):(this.step="ERROR",this.titleText="C\u1eadp nh\u1eadt quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5 th\u1ea5t b\u1ea1i",this.bodyText=o.objectError.errorDescription.vi)},error:()=>{this.step="ERROR",this.titleText="C\u1eadp nh\u1eadt quy \u0111\u1ecbnh ph\xed d\u1ecbch v\u1ee5 th\u1ea5t b\u1ea1i",this.bodyText="C\xf3 l\u1ed7i x\u1ea3y ra trong qu\xe1 tr\xecnh th\xeam quy \u0111\u1ecbnh. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c tr\u1edf v\u1ec1 m\xe0n h\xecnh danh s\xe1ch!"}})}}onBackToList(){this._route.navigate(["admin/service-fee"])}onNextStep(t){this.step=t}onClose(){this._modal.open(C.V0,{title:"R\u1eddi kh\u1ecfi m\xe0n h\xecnh n\xe0y?",body:"Th\xf4ng tin nh\u1eadp s\u1ebd b\u1ecb m\u1ea5t n\u1ebfu b\u1ea1n r\u1eddi kh\u1ecfi m\xe0n h\xecnh n\xe0y. B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n r\u1eddi kh\u1ecfi trang?",okText:"C\xf3, R\u1eddi trang",cancelText:"Kh\xf4ng, \u1edf l\u1ea1i",hasIcon:!1}).afterClosed$.subscribe({next:n=>{n.data&&this._route.navigate(["admin/service-fee"])}})}onCreateNew(){this.step="CONFIG",this.serviceFeeForm.reset()}onEdit(){this.isEdit=!0}onDelete(){this._modal.open(C.V0,{title:"X\xf3a th\u1ebft l\u1eadp chi ph\xed n\xe0y?",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n x\xf3a thi\u1ebft l\u1eadp chi ph\xed n\xe0y? Vi\u1ec7c n\xe0y kh\xf4ng th\u1ec3 ho\xe0n t\xe1c, vui l\xf2ng ki\u1ec3m tra k\u0129 tr\u01b0\u1edbc khi thao t\xe1c.",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y b\u1ecf"}).afterClosed$.subscribe({next:n=>{n.data&&this._serviceFeeService.deleteServiceFeeConfig(this.serviceFeeId).subscribe({next:r=>{r.success?(this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"X\xf3a ph\xed d\u1ecbch v\u1ee5 th\xe0nh c\xf4ng",sticky:!1}),this._route.navigate(["admin/service-fee"])):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"X\xf3a ph\xed d\u1ecbch v\u1ee5 th\u1ea5t b\u1ea1i",sticky:!0})}})}})}onCancel(){this._modal.open(C.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:"Kh\xf4ng, ti\u1ebfp t\u1ee5c",cancelText:"C\xf3, h\u1ee7y b\u1ecf"}).afterClosed$.subscribe({next:n=>{n.data||(this.isEdit=!1)}})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(p.KNP),e.Y36(J.gz),e.Y36(s.qu),e.Y36(k),e.Y36(J.F0),e.Y36(e.sBO),e.Y36(w.oE),e.Y36(y.BX))},i.\u0275cmp=e.Xpm({type:i,selectors:[["edit-service-fee-page"]],standalone:!0,features:[e.jDz],decls:7,vars:5,consts:[[1,"flex","justify-center","py-4","px-[30px]"],[1,"w-[1000px]","max-w-[1000px]"],[4,"ngIf"],["class","rounded-lg bg-neutral-white mx-auto py-32 flex flex-col gap-y-6 justify-center items-center",4,"ngIf"],[1,"flex","justify-between","items-center","mb-4"],["cf-button","","size","medium","type","secondary",1,"bg-neutral-white",3,"click"],["cfHeadIcon","","icon","chevron_left","size","small",1,"mr-2.5"],["class","flex items-center gap-x-3",4,"ngIf"],["class","flex flex-col gap-y-4",4,"ngIf"],[1,"flex","items-center","gap-x-3"],["cf-button","","size","medium",3,"click"],["cfHeadIcon","","icon","edit_alt","size","small",1,"mr-2.5"],["cfHeadIcon","","icon","delete","size","small",1,"mr-2.5"],["cfHeadIcon","","icon","save","size","small",1,"mr-2.5"],["cfHeadIcon","","icon","circle_error","size","small",1,"mr-2.5"],[1,"flex","flex-col","gap-y-4"],[1,"bg-white","rounded","shadow-cf-md","flex","flex-col","gap-y-3","p-6"],[1,"flex","flex-col","gap-y-1"],[1,"text-heading-sm","text-neutral-black"],[1,"text-espressive-sm","text-neutral-gray-4"],[1,"w-full","h-10","py-2.5","px-3","text-body-md","text-neutral-gray-6","rounded","border","border-neutral-gray-3","bg-neutral-gray-1"],[1,"flex","flex-col","gap-y-6"],[1,"text-espressive-md","text-neutral-gray-5"],[1,"border","border-neutral-gray-2","p-4","rounded","flex","flex-col","gap-y-3"],[1,"flex","items-center","gap-x-8",3,"ngModel"],["size","medium",3,"disabled","value"],[1,"w-full","h-10","py-2.5","px-3","text-body-md","rounded","border","border-neutral-gray-3","bg-neutral-gray-1","flex","gap-x-2"],[4,"ngFor","ngForOf"],[1,""],[1,"w-full","h-10","py-2.5","px-3","text-body-md","rounded","border","border-neutral-gray-3","bg-neutral-gray-1"],[1,"flex","flex-col","gap-y-3"],[1,"flex","gap-x-3"],[1,"flex","w-full","flex-col","gap-y-1.5"],[1,"text-express-sm"],[1,"flex","flex-col","gap-y-1.5"],[3,"size","color"],["textField","name","valueField","code","placeholder","Ch\u1ecdn h\xe3ng bay",1,"w-full","!max-w-full",3,"status","data","allowSearch","formControl"],[1,"flex","items-center","gap-x-8",3,"ngModel","checkChange"],["size","medium",3,"value"],["class","w-full !max-w-full","textField","name","valueField","code","placeholder","Ch\u1ecdn m\xe3 s\xe2n bay",3,"status","data","allowSearch","maxHeight","formControl",4,"ngIf"],["class","w-full !max-w-full","textField","name","valueField","code","placeholder","Ch\u1ecdn qu\u1ed1c gia",3,"status","data","allowSearch","maxHeight","formControl",4,"ngIf"],["class","w-full !max-w-full","textField","name","valueField","code","placeholder","Ch\u1ecdn khu v\u1ef1c",3,"status","data","allowSearch","maxHeight","formControl",4,"ngIf"],["textField","name","valueField","code","placeholder","Ch\u1ecdn nh\xf3m \u0111\u1ea1i l\xfd",1,"w-full","!max-w-full",3,"status","data","allowSearch","formControl"],["cfHint","",3,"hint",4,"ngIf"],[1,"grow-[400]","!w-full",3,"status"],["cfLabel","",1,"text-express-sm","text-black",3,"CfRequired"],["size","medium",3,"placeholder","formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn lo\u1ea1i ti\u1ec1n",1,"w-full","!max-w-full",3,"status","data","allowSearch","formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn m\xe3 s\xe2n bay",1,"w-full","!max-w-full",3,"status","data","allowSearch","maxHeight","formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn qu\u1ed1c gia",1,"w-full","!max-w-full",3,"status","data","allowSearch","maxHeight","formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn khu v\u1ef1c",1,"w-full","!max-w-full",3,"status","data","allowSearch","maxHeight","formControl"],["cfHint","",3,"hint"],[1,"rounded-lg","bg-neutral-white","mx-auto","py-32","flex","flex-col","gap-y-6","justify-center","items-center"],["src","assets/icons/icon-success.svg","alt",""],[1,"flex","flex-col","gap-y-3","justify-center","items-center"],[1,"text-heading-sm","text-neutral-gray-6"],[1,"text-body-md","text-neutral-gray-5"],[1,"flex","gap-x-4"],["cf-button","","size","medium","type","secondary",1,"bg-white",3,"click"],["src","assets/icons/icon-error.svg","alt",""],[1,"text-body-md","text-neutral-gray-5","text-center"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,Dt,10,4,"div",2),e.YNc(3,St,12,2,"div",3),e.YNc(4,Zt,12,2,"div",3),e.YNc(5,Pt,15,0,"div",3),e.qZA()(),e.YNc(6,bt,1,0,"cf-spinner",2)),2&t&&(e.xp6(2),e.Q6J("ngIf","CONFIG"===n.step),e.xp6(1),e.Q6J("ngIf","SUCCESS"===n.step),e.xp6(1),e.Q6J("ngIf","ERROR"===n.step),e.xp6(1),e.Q6J("ngIf","DUPLICATE"===n.step),e.xp6(1),e.Q6J("ngIf",n.isLoading))},dependencies:[f.ez,f.sg,f.O5,f.JJ,s.u5,s.JJ,s.On,s.UX,s.oH,S.q,H.U,v.j$,v.ND,v.v2,v.lt,O.C,L.o,L.T,T.N8,T.Xq,p.AxE,p.Sm8,at.b,C.OR,ut.AS],encapsulation:2}),i})()},4688:(Y,I,d)=>{d.d(I,{b:()=>p});var R=d(36895),g=d(94650),f=d(72506);function s(v,S){if(1&v){const _=g.EpF();g.TgZ(0,"cf-icon",3),g.NdJ("click",function(C){g.CHM(_);const U=g.oxw();return g.KtG(U.close(C))}),g.qZA()}}const T=["*"];let p=(()=>{class v{constructor(_,y,C){this.renderer=_,this.elementRef=y,this.mode="default",this.type="solid",this.size="medium",this.color="red",this.onClose=new g.vpe,C.registerIcons([f.UNF])}ngOnChanges(_){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(_){this.onClose.emit(_),_.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),this.elementRef.nativeElement)}}return v.\u0275fac=function(_){return new(_||v)(g.Y36(g.Qsj),g.Y36(g.SBq),g.Y36(f.KNP))},v.\u0275cmp=g.Xpm({type:v,selectors:[["cf-label"]],hostVars:2,hostBindings:function(_,y){2&_&&g.Tol(y.classes)},inputs:{mode:"mode",type:"type",size:"size",color:"color"},outputs:{onClose:"onClose"},standalone:!0,features:[g.TTD,g.jDz],ngContentSelectors:T,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(_,y){1&_&&(g.F$t(),g.TgZ(0,"div",0)(1,"div",1),g.Hsn(2),g.qZA(),g.YNc(3,s,1,0,"cf-icon",2),g.qZA()),2&_&&(g.xp6(3),g.Q6J("ngIf","closeable"===y.mode))},dependencies:[R.ez,R.O5,f.AxE,f.Sm8],encapsulation:2,changeDetection:0}),v})()}}]);