(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["FlightsManifest"],{"0d5e":function(t,e,s){"use strict";s.r(e);var n=s("8fea"),a=s("adda"),i=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",t._l(t.paginated.length,(function(s){return e("div",{key:"a4page"+s,staticClass:"a4page dir-ltr"},[e("div",[e("div",{staticClass:"d-flex align-center justify-space-between pt-4 pb-2 px-7"},[e("div",{staticClass:"display-1"},[t._v("Flights Manifest")]),e(a["a"],{attrs:{"max-width":"133",width:"133",height:"66",src:t.logo}})],1),e("div",{staticClass:"px-6"},[e(n["a"],{staticClass:"flights-manifest-table",attrs:{"hide-default-footer":"",items:[t.flightsManifestData.flight],headers:t.flightHeaders},scopedSlots:t._u([{key:"item.Date",fn:function({item:e}){return[t._v(" "+t._s(e.flightDateTime.split(" ")[0])+" ")]}},{key:"item.Time",fn:function({item:e}){return[t._v(" "+t._s(e.flightDateTime.split(" ")[1])+" ")]}}],null,!0)}),e(n["a"],{staticClass:"flights-manifest-table mt-5",attrs:{"hide-default-footer":"","items-per-page":20,page:s,items:t.flightsManifestData.passengers,headers:t.passengersHeaders},scopedSlots:t._u([{key:"item.index",fn:function({index:e}){return[t._v(" "+t._s((1==s?0:t.paginated.reduce((t,e,n)=>t+(n+1>=s?0:e.length),0))+(e+1))+" ")]}},{key:"item.Date",fn:function({item:e}){return[t._v(" "+t._s(e.flightDateTime.split(" ")[0])+" ")]}},{key:"item.Time",fn:function({item:e}){return[t._v(" "+t._s(e.flightDateTime.split(" ")[1])+" ")]}},{key:"item.vipStatus",fn:function({item:s}){return[s.vipStatus?e("i",{staticClass:"icon-tick-circle icon-20 darkGrey--text"}):e("span",[t._v("--")])]}},{key:"item.lomStatus",fn:function({item:s}){return[s.lomStatus?e("i",{staticClass:"icon-tick-circle icon-20 darkGrey--text"}):e("span",[t._v("--")])]}},{key:"item.visaStatus",fn:function({item:s}){return[s.visaStatus?e("i",{staticClass:"icon-tick-circle icon-20 darkGrey--text"}):e("span",[t._v("--")])]}},{key:"item.cabinClass",fn:function({item:s}){return["Business"==s.cabinClass?e("i",{staticClass:"icon-tick-circle icon-20 darkGrey--text"}):e("span",[t._v("--")])]}},{key:"item.GivenName",fn:function({item:e}){return[t._v(" "+t._s(`${e.GivenName} ${e.SurName}`)+" ")]}},s==t.paginate(t.flightsManifestData.passengers,20).length?{key:"body.append",fn:function(){return[e("tr",[e("td"),e("td",{staticClass:"text-end"},[t._v("Total")]),e("td",{staticClass:"text-center"},[t._v(" "+t._s(t.totals.vipStatus)+" ")]),e("td",{staticClass:"text-center"},["outbound"==t.$route.query.flightType?[t._v(" "+t._s(t.totals.bcStatus)+" ")]:[t._v(" "+t._s(t.totals.visaStatus)+" ")]],2),e("td",{staticClass:"text-center"},[t._v(" "+t._s(t.totals.lomStatus)+" ")])])]},proxy:!0}:null],null,!0)}),e("div",{staticClass:"pt-12 mt-12 pl-12 text-start"},[t._v("Signature")])],1)])])})),0)},r=[],o=s("60a3"),u=function(){var t=function(e,s){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])},t(e,s)};return function(e,s){if("function"!==typeof s&&null!==s)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function n(){this.constructor=e}t(e,s),e.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),l=function(){return l=Object.assign||function(t){for(var e,s=1,n=arguments.length;s<n;s++)for(var a in e=arguments[s],e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},l.apply(this,arguments)},c=function(t,e,s,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,s):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(t,e,s,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(i<3?a(r):i>3?a(e,s,r):a(e,s))||r);return i>3&&r&&Object.defineProperty(e,s,r),r},f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.page=1,e}return u(e,t),e.prototype.mounted=function(){var t=this;setTimeout((function(){t.$vuetify.rtl=!1}),500)},Object.defineProperty(e.prototype,"paginated",{get:function(){return this.paginate(this.flightsManifestData.passengers,20)},enumerable:!1,configurable:!0}),e.prototype.paginate=function(t,e){return t.reduce((function(t,s,n){var a=Math.floor(n/e),i=t[a]||(t[a]=[]);return i.push(s),t}),[])},Object.defineProperty(e.prototype,"totals",{get:function(){var t={vipStatus:this.flightsManifestData.passengers.reduce((function(t,e){return t+e.vipStatus}),0),visaStatus:this.flightsManifestData.passengers.reduce((function(t,e){return t+e.visaStatus}),0),lomStatus:this.flightsManifestData.passengers.reduce((function(t,e){return t+e.lomStatus}),0),bcStatus:this.flightsManifestData.passengers.reduce((function(t,e){return t+("Business"==e.cabinClass?1:0)}),0)};return t.vipStatus=t.vipStatus?String(t.vipStatus).padStart(2,"0"):0,t.visaStatus=t.visaStatus?String(t.visaStatus).padStart(2,"0"):0,t.lomStatus=t.lomStatus?String(t.lomStatus).padStart(2,"0"):0,t.bcStatus=t.bcStatus?String(t.bcStatus).padStart(2,"0"):0,t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"flightsManifestData",{get:function(){var t=JSON.parse(sessionStorage.getItem("flightsManifestData")||"{}");for(var e in t.gpPassengers=this.cnLodash.groupBy(t.passengers,"PassengerId"),t.passengers=[],t.gpPassengers){var s=0,n=0,a=0;("outbound"==this.$route.query.flightType&&(t.gpPassengers[e].some((function(t){return"wheelchair"==t.serviceName}))||t.gpPassengers[e].some((function(t){return t.lomStatus})))||"inbound"==this.$route.query.flightType&&t.gpPassengers[e].some((function(t){return"wheelchair"==t.serviceName})))&&(n=1),"inbound"==this.$route.query.flightType&&t.gpPassengers[e].some((function(t){return"visa"==t.serviceName}))&&(a=1),t.gpPassengers[e].some((function(t){return t.vipStatus}))&&(s=1),t.gpPassengers[e].some((function(t){return"attendant"==t.serviceName}))||t.passengers.push(l(l({},t.gpPassengers[e][0]),{vipStatus:s,visaStatus:a,lomStatus:n}))}return t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logo",{get:function(){return window.location.origin+"/reservation-logo/logo.png"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"flightHeaders",{get:function(){return[{text:"Airline",value:"airline",align:"center",sortable:!1,width:50},{text:"Flight No.",value:"flightNumber",align:"center",sortable:!1,width:50},{text:"Destination",value:"airport",align:"center",sortable:!1,width:50},{text:"Date",value:"Date",align:"center",sortable:!1,width:50},{text:"Time",value:"Time",align:"center",sortable:!1,width:50}]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"passengersHeaders",{get:function(){var t=[{text:"#",value:"index",align:"center",sortable:!1,width:30},{text:"Passengers",value:"GivenName",sortable:!1},{text:"VIP",value:"vipStatus",align:"center",sortable:!1,width:30}];return"outbound"==this.$route.query.flightType?t.push({text:"BC",value:"cabinClass",align:"center",sortable:!1,width:30}):t.push({text:"Visa",value:"visaStatus",align:"center",sortable:!1,width:30}),t.push({text:"LOM",value:"lomStatus",align:"center",sortable:!1,width:30}),t},enumerable:!1,configurable:!0}),e=c([o["a"]],e),e}(o["d"]),p=f,g=p,d=(s("d42e"),s("2877")),h=Object(d["a"])(g,i,r,!1,null,"0c244140",null);e["default"]=h.exports},1052:function(t,e,s){},d42e:function(t,e,s){"use strict";s("1052")}}]);