File "ticketReport.749de1eac0662f2a10ec.js"
Full path: /home/satitravel/public_html/wp-content/plugins/citynet/public/mobile/js/ticketReport.749de1eac0662f2a10ec.js
File
size: 23.08 B
MIME-type: text/html
Charset: utf-8
Download Open Edit Advanced Editor &nnbsp; Back
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["ticketReport"],{2977:function(t,e,a){},c1c1:function(t,e,a){"use strict";a("2977")},f2d9:function(t,e,a){"use strict";(function(t){"undefined"!==typeof window?window:"undefined"!==typeof t||"undefined"!==typeof self&&self;function a(t,e){return e={exports:{}},t(e,e.exports),e.exports}var s=a((function(t,e){(function(e,a){t.exports=a()})(0,(function(){return function t(e,a,s){var n,i,o=window,r="application/octet-stream",l=s||r,c=e,d=!a&&!s&&c,p=document.createElement("a"),u=function(t){return String(t)},h=o.Blob||o.MozBlob||o.WebKitBlob||u,m=a||"download";if(h=h.call?h.bind(o):Blob,"true"===String(this)&&(c=[c,l],l=c[0],c=c[1]),d&&d.length<2048&&(m=d.split("/").pop().split("?")[0],p.href=d,-1!==p.href.indexOf(d))){var f=new XMLHttpRequest;return f.open("GET",d,!0),f.responseType="blob",f.onload=function(e){t(e.target.response,m,r)},setTimeout((function(){f.send()}),0),f}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(c)){if(!(c.length>2096103.424&&h!==u))return navigator.msSaveBlob?navigator.msSaveBlob(v(c),m):b(c);c=v(c),l=c.type||r}else if(/([\x80-\xff])/.test(c)){var x=0,g=new Uint8Array(c.length),y=g.length;for(x;x<y;++x)g[x]=c.charCodeAt(x);c=new h([g],{type:l})}function v(t){var e=t.split(/[:;,]/),a=e[1],s="base64"==e[2]?atob:decodeURIComponent,n=s(e.pop()),i=n.length,o=0,r=new Uint8Array(i);for(o;o<i;++o)r[o]=n.charCodeAt(o);return new h([r],{type:a})}function b(t,e){if("download"in p)return p.href=t,p.setAttribute("download",m),p.className="download-js-link",p.innerHTML="downloading...",p.style.display="none",document.body.appendChild(p),setTimeout((function(){p.click(),document.body.removeChild(p),!0===e&&setTimeout((function(){o.URL.revokeObjectURL(p.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(t)&&(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,r)),window.open(t)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=t),!0;var a=document.createElement("iframe");document.body.appendChild(a),!e&&/^data:/.test(t)&&(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,r)),a.src=t,setTimeout((function(){document.body.removeChild(a)}),333)}if(n=c instanceof h?c:new h([c],{type:l}),navigator.msSaveBlob)return navigator.msSaveBlob(n,m);if(o.URL)b(o.URL.createObjectURL(n),!0);else{if("string"===typeof n||n.constructor===u)try{return b("data:"+l+";base64,"+o.btoa(n))}catch(C){return b("data:"+l+","+encodeURIComponent(n))}i=new FileReader,i.onload=function(t){b(this.result)},i.readAsDataURL(n)}return!0}}))})),n={props:{type:{type:String,default:"xls"},data:{type:Array,required:!1,default:null},fields:{type:Object,required:!1},exportFields:{type:Object,required:!1},defaultValue:{type:String,required:!1,default:""},title:{default:null},footer:{default:null},name:{type:String,default:"data.xls"},fetch:{type:Function},meta:{type:Array,default:()=>[]},worksheet:{type:String,default:"Sheet1"},beforeGenerate:{type:Function},beforeFinish:{type:Function}},computed:{idName(){var t=(new Date).getTime();return"export_"+t},downloadFields(){return void 0!==this.fields?this.fields:void 0!==this.exportFields?this.exportFields:void 0}},methods:{async generate(){"function"===typeof this.beforeGenerate&&await this.beforeGenerate();let t=this.data;if("function"!==typeof this.fetch&&t||(t=await this.fetch()),!t||!t.length)return;let e=this.getProcessedJson(t,this.downloadFields);return"html"===this.type?this.export(this.jsonToXLS(e),this.name.replace(".xls",".html"),"text/html"):"csv"===this.type?this.export(this.jsonToCSV(e),this.name.replace(".xls",".csv"),"application/csv"):this.export(this.jsonToXLS(e),this.name,"application/vnd.ms-excel")},export:async function(t,e,a){let n=this.base64ToBlob(t,a);"function"===typeof this.beforeFinish&&await this.beforeFinish(),s(n,e,a)},jsonToXLS(t){let e='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 11"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>${worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e<style>br {mso-data-placement: same-cell;}</style></head><body><table>${table}</table></body></html>',a="<thead>";const s=Object.keys(t[0]).length;let n=this;null!=this.title&&(a+=this.parseExtraData(this.title,'<tr><th colspan="'+s+'">${data}</th></tr>')),a+="<tr>";for(let i in t[0])a+="<th>"+i+"</th>";return a+="</tr>",a+="</thead>",a+="<tbody>",t.map((function(t,e){a+="<tr>";for(let s in t)a+="<td>"+n.valueReformattedForMultilines(t[s])+"</td>";a+="</tr>"})),a+="</tbody>",null!=this.footer&&(a+="<tfoot>",a+=this.parseExtraData(this.footer,'<tr><td colspan="'+s+'">${data}</td></tr>'),a+="</tfoot>"),e.replace("${table}",a).replace("${worksheet}",this.worksheet)},jsonToCSV(t){var e=[];null!=this.title&&e.push(this.parseExtraData(this.title,"${data}\r\n"));for(let a in t[0])e.push(a),e.push(",");return e.pop(),e.push("\r\n"),t.map((function(t){for(let a in t){let s='="'+t[a]+'"';s.match(/[,"\n]/)&&(s='"'+s.replace(/\"/g,'""')+'"'),e.push(s),e.push(",")}e.pop(),e.push("\r\n")})),null!=this.footer&&e.push(this.parseExtraData(this.footer,"${data}\r\n")),e.join("")},getProcessedJson(t,e){let a=this.getKeys(t,e),s=[],n=this;return t.map((function(t,e){let i={};for(let s in a){let e=a[s];i[s]=n.getValue(e,t)}s.push(i)})),s},getKeys(t,e){if(e)return e;let a={};for(let s in t[0])a[s]=s;return a},parseExtraData(t,e){let a="";if(Array.isArray(t))for(var s=0;s<t.length;s++)a+=e.replace("${data}",t[s]);else a+=e.replace("${data}",t);return a},getValue(t,e){const a="object"!==typeof t?t:t.field;let s="string"!==typeof a?[]:a.split("."),n=this.defaultValue;return n=a?s.length>1?this.getValueFromNestedItem(e,s):this.parseValue(e[a]):e,t.hasOwnProperty("callback")&&(n=this.getValueFromCallback(n,t.callback)),n},valueReformattedForMultilines(t){return"string"==typeof t?t.replace(/\n/gi,"<br/>"):t},getValueFromNestedItem(t,e){let a=t;for(let s of e)a&&(a=a[s]);return this.parseValue(a)},getValueFromCallback(t,e){if("function"!==typeof e)return this.defaultValue;const a=e(t);return this.parseValue(a)},parseValue(t){return t||0===t||"boolean"===typeof t?t:this.defaultValue},base64ToBlob(t,e){let a=window.btoa(window.unescape(encodeURIComponent(t))),s=atob(a),n=s.length,i=new Uint8ClampedArray(n);while(n--)i[n]=s.charCodeAt(n);return new Blob([i],{type:e})}}};function i(t,e,a,s,n,i,o,r,l,c){"boolean"!==typeof o&&(l=r,r=o,o=!1);var d,p="function"===typeof a?a.options:a;if(t&&t.render&&(p.render=t.render,p.staticRenderFns=t.staticRenderFns,p._compiled=!0,n&&(p.functional=!0)),s&&(p._scopeId=s),i?(d=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(i)},p._ssrRegister=d):e&&(d=o?function(){e.call(this,c(this.$root.$options.shadowRoot))}:function(t){e.call(this,r(t))}),d)if(p.functional){var u=p.render;p.render=function(t,e){return d.call(e),u(t,e)}}else{var h=p.beforeCreate;p.beforeCreate=h?[].concat(h,d):[d]}return a}var o=i;const r=n;var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:t.idName},on:{click:t.generate}},[t._t("default",[t._v("\n\t\tDownload "+t._s(t.name)+"\n\t")])],2)},c=[];l._withStripped=!0;const d=void 0,p=void 0,u=void 0,h=!1;var m=o({render:l,staticRenderFns:c},d,r,p,h,u,void 0,void 0);e["a"]=m}).call(this,a("c8ba"))},fa5f:function(t,e,a){"use strict";a.r(e);var s=a("8336"),n=a("b0af"),i=a("99d9"),o=a("62ad"),r=a("8fea"),l=a("169a"),c=a("132d"),d=a("e449"),p=a("a797"),u=a("490a"),h=a("0fd9"),m=a("2fa4"),f=a("71a3"),x=a("fe57"),g=a("9a96"),y=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mt-10",staticStyle:{"min-height":"100vh"}},[e(p["a"],{staticStyle:{"z-index":"50"},attrs:{value:t.overlay}},[e(u["a"],{attrs:{indeterminate:"",size:"64"}})],1),e(l["a"],{attrs:{"max-width":"700"},model:{value:t.showDialog,callback:function(e){t.showDialog=e},expression:"showDialog"}},[e(n["a"],{staticClass:"moreRadius button"},[e(i["d"],[e("span",[t._v("خروجی گابریل")]),e(m["a"]),e(c["a"],{staticClass:"icon-remove icon-18",on:{click:function(e){t.showDialog=!1}}})],1),e(i["c"],{staticClass:"text-left"},[e("pre",[t._v(t._s(t.gabreilText))])])],1)],1),e(n["a"],{staticClass:"d-flex justify-center align-start container flex-column px-0 file-wrap",staticStyle:{width:"100%","min-height":"120px","border-radius":"5px"},attrs:{flat:""}},[e(x["a"],{staticClass:"justify-self-right tabRules d-flex flex-column flight-declare-tabs"},[e(g["a"],{attrs:{color:"primary"}}),e(f["a"],{staticStyle:{height:"40px",color:"#b7b7b7","letter-spacing":"0px"}},[t._v(" گزارش لیست پرواز ")]),e(o["a"],{staticClass:"px-2 pb-0",attrs:{md:"2"}},[e(d["a"],{attrs:{"close-on-content-click":!1,rounded:"",attach:".file-wrap","max-width":"200","content-class":"file-menu","offset-y":""},scopedSlots:t._u([{key:"activator",fn:function({on:a,attrs:n}){return[e(s["a"],t._g(t._b({staticClass:"black--text moreRadius button d-flex align-center justify-space-between",attrs:{depressed:"",color:"#F2F2F5",height:"40px",block:""}},"v-btn",n,!1),a),[t._v(" "+t._s(t.$t("download2"))+" "),e("i",{staticClass:"icon-import-1 icon-18"})])]}}])},[e(n["a"],{staticClass:"pt-2"},[e(s["a"],{staticClass:"py-2 px-4 d-block theme-color-lighten text-left",attrs:{loading:t.gabreilLoading,depressed:"",block:"",text:""},on:{click:t.exportGabriel}},[t._v("خروجی گابریل")]),e(s["a"],{staticClass:"py-2 px-4 d-block theme-color-lighten text-left",attrs:{loading:t.sepehrLoading,depressed:"",block:"",text:""},on:{click:t.exportSepehr}},[t._v(" خروجی سپهر")]),e(s["a"],{staticClass:"py-2 px-4 d-block theme-color-lighten text-left",attrs:{loading:t.niraLoading,depressed:"",width:"95px",block:"",text:""},on:{click:t.exportNira}},[t._v(" خروجی نیرا ")]),e(s["a"],{staticClass:"py-2 px-4 d-block theme-color-lighten text-left",attrs:{loading:t.sirenaLoading,depressed:"",width:"95px",block:"",text:""},on:{click:t.exportSirena}},[t._v(" خروجی Sirena ")]),e(s["a"],{staticClass:"py-2 px-4 d-block theme-color-lighten text-left",attrs:{loading:t.tailwindLoading[0],depressed:"",width:"95px",block:"",text:""},on:{click:function(e){return t.exportTailwind("TI01",0)}}},[t._v(" خروجی Tailwind رفت ")]),e(s["a"],{staticClass:"py-2 px-4 d-block theme-color-lighten text-left",attrs:{loading:t.tailwindLoading[1],depressed:"",width:"95px",block:"",text:""},on:{click:function(e){return t.exportTailwind("TI02",1)}}},[t._v(" خروجی Tailwind برگشت ")])],1)],1)],1)],1),e(h["a"],{staticClass:"d-flex flex-column mt-10",staticStyle:{width:"100%"}},[e(o["a"],{attrs:{cols:"12"}},[e(h["a"],{staticClass:"px-4"},[e(o["a"],{attrs:{cols:"6"}},[e("span",{staticClass:"px-1 grey--text text--darken-1"},[t._v("مسیر:")]),e("div",[e("span",{staticClass:"px-1"},[t._v(t._s(t.chosenFlight.Origin))]),e(c["a"],{staticClass:"px-0 mb-1 pb-1 icon-arrow-right icon-18",attrs:{color:"primary",small:""}}),e("span",{staticClass:"px-1"},[t._v(t._s(t.chosenFlight.Destination))])],1)]),e(o["a"],{attrs:{cols:"6"}},[e("span",{staticClass:"px-1 grey--text text--darken-1 body-2"},[t._v(" تاریخ و ساعت حرکت:")]),e("div",{staticClass:"px-1"},[t._v(t._s(t.chosenFlight.DepartureDatetime))])]),e(o["a"],{attrs:{cols:"6"}},[e("span",{staticClass:"px-1 grey--text text--darken-1"},[t._v("شماره پرواز:")]),e("div",{staticClass:"px-1"},[t._v(" "+t._s(t.chosenFlight.FlightSegments[0].Segment.FlightNo)+" ")])]),e(o["a"],{attrs:{cols:"6"}},[e("span",{staticClass:"px-1 grey--text text--darken-1"},[t._v(" ظرفیت:")]),e("div",{staticClass:"px-1"},[t._v(t._s(t.chosenFlight.Capacity))])]),e(o["a"],{attrs:{cols:"6"}},[e("span",{staticClass:"px-1 grey--text text--darken-1"},[t._v("مانده:")]),e("div",{staticClass:"px-1 d-inline-block"},[t._v(" "+t._s(t.chosenFlight.Seatremaining)+" ")])]),e(o["a"],{attrs:{cols:"6"}},[e("span",{staticClass:"px-1 grey--text text--darken-1"},[t._v("کلاس کابین:")]),e("div",{staticClass:"px-1"},[t._v(t._s(t.chosenFlight.CabinClass))])]),e(o["a"],{attrs:{cols:"6"}},[e("span",{staticClass:"px-1 grey--text text--darken-1"},[t._v("ایرلاین:")]),e("div",{staticClass:"px-1"},[t._v(" "+t._s(t.chosenFlight.FlightSegments[0].Segment.Airline)+" ")])]),e(o["a"],{attrs:{cols:"6"}},[e("span",{staticClass:"px-1 grey--text text--darken-1"},[t._v("رزرو:")]),e("div",{staticClass:"px-1"},[t._v(" "+t._s("0"==t.chosenFlight.Reserve?"خیر":" بله")+" ")])])],1)],1)],1),e(h["a"],{staticClass:"py-0 justify-center d-flex flex-nowrap mx-0",staticStyle:{width:"100%"}},[e(r["a"],{staticClass:"firstTable pa-2 col-12",attrs:{"item-key":"row",items:t.tableItems,headers:t.headers,search:t.searchTable,"loading-text":t.$t("pleaseWait"),"no-data-text":t.$t("noItemToShow"),"items-per-page":200,"disable-sort":""},scopedSlots:t._u([{key:"top",fn:function(){return[e(s["a"],{staticClass:"mx-3 mb-3 pa-2 theme-element-bg-light moreRadius button",attrs:{depressed:"",dense:"",height:"44"},scopedSlots:t._u([{key:"default",fn:function(){return[e("download-excel",{attrs:{fields:t.json_fields,data:t.tableItems,name:"ticketReport.xls"}},[e("div",{staticClass:"d-flex align-center mt-1"},[e("span",{staticClass:"font-weight-regular"},[t._v("دریافت فایل اکسل")]),e("div",[e("img",{attrs:{src:"https://logos-marques.com/wp-content/uploads/2020/09/Excel-logo.png",width:"42px"}})])])])]},proxy:!0}])})]},proxy:!0},{key:"footer",fn:function(){return[e("div",{staticClass:"body-2 text-end",staticStyle:{"border-top":"1px solid #0000001c"}},[e("div",{staticClass:"mx-5 mt-2"},[t._v(" تعداد پرواز های یک طرفه: "+t._s(t._f("simplePersian")(t.oneways,t.$i18n.locale))+" ")]),e("div",{staticClass:"mx-5 mt-2"},[t._v(" تعداد پرواز های دو طرفه: "+t._s(t._f("simplePersian")(t.twoways,t.$i18n.locale))+" ")]),t._l(t.costSum,(function(a,s){return e("div",{key:s,staticClass:"mx-5 mt-2 mb-2"},[t._v(" جمع قیمت: "+t._s(t._f("simplePersian")(t._f("price")(a.sum),t.$i18n.locale))+" "+t._s(t.$t(a.currency))+" ")])})),e("div",{staticClass:"mx-5 mt-2 mb-2"},[t._v(" جمع کل: "+t._s(t._f("simplePersian")(t._f("price")(t.total),t.$i18n.locale))+" "+t._s(t.$t(t.defaultCurrency))+" ")])],2)]},proxy:!0},{key:"item.row",fn:function({index:e}){return[t._v(" "+t._s(t._f("simplePersian")(e+1,t.$i18n.locale))+" ")]}},{key:"item.FlightCount",fn:function({item:e}){return[t._v(" "+t._s(1==e.FlightCount?"یکطرفه":"دوطرفه")+" ")]}},{key:"item.Gender",fn:function({item:e}){return[t._v(" "+t._s("Male"==e.Gender?"آقا":"خانم")+" ")]}},{key:"item.Owner",fn:function({item:a}){return[e("div",{staticClass:"pt-1"},[t._v(t._s(a.Owner))]),e("div",[t._v(t._s(a.OwnerMobile))]),e("div",{staticClass:"pb-1"},[t._v(t._s(a.OWnerEmail))])]}},{key:"item.PassengerTypeCode",fn:function({item:a}){return["ADT"==a.PassengerTypeCode?e("span",[t._v("بزرگسال")]):t._e(),"CHD"==a.PassengerTypeCode?e("span",[t._v("کودک")]):t._e(),"INF"==a.PassengerTypeCode?e("span",[t._v("نوزاد")]):t._e()]}},{key:"item.Price",fn:function({item:a}){return[e("span",{staticClass:"mx-1"},[t._v(t._s(t._f("simplePersian")(t._f("price")(a.Price),t.$i18n.locale)))]),e("span",[t._v(t._s(t.$t(a.Currency)))])]}},{key:"item.CurrencyConvert",fn:function({item:a}){return[e("span",[t._v(t._s(t._f("price")(a.CurrencyConvert)))])]}},{key:"item.conversion",fn:function({item:a}){return[e("span",{staticClass:"mx-1"},[t._v(t._s(t._f("simplePersian")(t._f("price")(t._f("round")(a.Price*a.CurrencyConvert,t.defaultCurrency)),t.$i18n.locale)))]),e("span",[t._v(t._s(t.$t(t.defaultCurrency)))])]}},{key:"item.Commission",fn:function({item:a}){return[e("span",{staticClass:"mx-1"},[t._v(t._s(t._f("simplePersian")(t._f("price")(a.Commission),t.$i18n.locale)))])]}},{key:"item.pnrString",fn:function({item:a}){return[e(s["a"],{attrs:{text:""},on:{click:function(e){return t.goToContactPNR(a.pnrString)}}},[t._v(t._s(a.pnrString))])]}}])})],1)],1)],1)},v=[],b=a("2f62"),C=a("f2d9"),w={data:()=>({headers:[{text:"ردیف",value:"row",align:"center"},{text:"نام ثبت کننده",value:"Owner",align:"center",width:100},{text:"نام",value:"GivenName",align:"center"},{text:"نام خانوادگی",value:"SurName",align:"center"},{text:" شماره پاسپورت",value:"PassportNO",align:"center"},{text:" جنسیت",value:"Gender",align:"center"},{text:" ملیت",value:"Nationality",align:"center"},{text:" رنج سنی",value:"PassengerTypeCode",align:"center"},{text:"کد ملی",value:"NationalId",align:"center"},{text:"رفرنس",value:"pnrString",align:"center"},{text:"شماره بلیط",value:"Ticket",align:"center"},{text:"نوع پرواز",value:"FlightCount",align:"center"},{text:"قیمت",value:"Price",align:"center"},{text:"کمیسیون",value:"Commission",align:"center"},{text:"برابری ارز",value:"CurrencyConvert",align:"center"},{text:"معادل",value:"conversion",align:"center"}],tableItems:[],tailwindLoading:[!1,!1],searchTable:"",gabreilText:"",gabreilLoading:!1,sepehrLoading:!1,sirenaLoading:!1,niraLoading:!1,showDialog:!1,overlay:!1,chosenFlight:"",total:0,oneways:0,twoways:0,quota:"",quotaAccountId:"",costSum:[],json_fields:{"معادل":"conversion","برابری ارز":"CurrencyConvert","کمیسیون":"Commission","قیمت":"Price","نوع پرواز":"FlightCount","شماره بلیط":"Ticket","رفرنس":"Pnr","کد ملی":"NationalId","رنج سنی":"PassengerTypeCode","جنسیت":"Gender","ملیت":"Nationality","شماره پاسپورت":"PassportNO","نام خانوادگی":"SurName","نام":"GivenName","ثبت کننده":"Owner"}}),components:{downloadExcel:C["a"]},created(){this.overlay=!0;const t=new URLSearchParams(window.location.search);this.chosenFlight=JSON.parse(t.get("flight")),this.classId=this.chosenFlight.classId,this.quota=this.chosenFlight.Quota,this.quotaAccountId=this.chosenFlight.QuotaAccountId,this.tableItems=this.getTicketReportItems,this.tableItems.map(t=>{this.$set(t,"conversion",t.Price*t.CurrencyConvert)}),console.log(this.tableItems),this.getTicketReportItems.forEach(t=>{1==t.FlightCount?this.oneways++:this.twoways++});let e=this.cnLodash.groupBy(this.getTicketReportItems,"Currency");this.cnLodash.forOwn(e,(t,e)=>{this.costSum.push({currency:e,sum:t.reduce((t,e)=>t+e.Price,0)}),this.total+=t.reduce((t,e)=>t+e.Price*e.CurrencyConvert,0)}),this.overlay=!1},methods:{goToContactPNR(t){const e=this.$router.resolve({name:"contracts",query:{pnr:t}});window.open(e.href,"_blank")},exportGabriel(){this.gabreilLoading=!0;let t={params:{ClassId:this.classId,IsQuota:this.quota,QuotaAccountId:this.quotaAccountId,Type:"Gabriel"}};this.$route.query.classType&&(t.params.ClassType=this.$route.query.classType),this.axios.get(this.$store.state.baseUrl+"flightinventorymanifest",t).then(t=>{this.showDialog=!0,this.gabreilText=t.data.Items,this.gabreilLoading=!1}).catch(()=>{this.gabreilLoading=!1})},exportSirena(){this.sirenaLoading=!0;let t={params:{ClassId:this.classId,IsQuota:this.quota,QuotaAccountId:this.quotaAccountId,Type:"Sirena"},headers:{"Content-Disposition":"attachment; filename=template.xlsx","Content-Type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},responseType:"arraybuffer"};this.$route.query.classType&&(t.params.ClassType=this.$route.query.classType),this.axios.get(this.$store.state.baseUrl+"flightinventorymanifest",t).then(t=>{const e={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};let a=(new Date).toLocaleDateString("en-GB",e);var s=new Blob([t.data],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;"}),n=document.createElement("a");n.href=window.URL.createObjectURL(s),n.download=`reportSirena_${a}.xlsx`,document.body.appendChild(n),n.click(),this.sirenaLoading=!1}).catch(t=>{this.sirenaLoading=!1})},exportTailwind(t,e){this.tailwindLoading[e]=!0;let a={params:{ClassId:this.classId,IsQuota:this.quota,QuotaAccountId:this.quotaAccountId,Type:t},headers:{"Content-Disposition":"attachment; filename=template.xlsx","Content-Type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},responseType:"arraybuffer"};this.$route.query.classType&&(a.params.ClassType=this.$route.query.classType),this.axios.get(this.$store.state.baseUrl+"flightinventorymanifest",a).then(a=>{const s={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};let n=(new Date).toLocaleDateString("en-GB",s);var i=new Blob([a.data],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;"}),o=document.createElement("a");o.href=window.URL.createObjectURL(i),o.download=`reportTailwind_${t}_${n}.xlsx`,document.body.appendChild(o),o.click(),this.this.tailwindLoading[e]=!1}).catch(t=>{this.this.tailwindLoading[e]=!1})},exportSepehr(){this.sepehrLoading=!0;let t={params:{ClassId:this.classId,IsQuota:this.quota,QuotaAccountId:this.quotaAccountId,Type:"Sepehr"},headers:{"Content-Disposition":"attachment; filename=template.xlsx","Content-Type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},responseType:"arraybuffer"};this.$route.query.classType&&(t.params.ClassType=this.$route.query.classType),this.axios.get(this.$store.state.baseUrl+"flightinventorymanifest",t).then(t=>{const e={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};let a=(new Date).toLocaleDateString("en-GB",e);var s=new Blob([t.data],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;"}),n=document.createElement("a");n.href=window.URL.createObjectURL(s),n.download=`reportSepehr_${a}.xlsx`,document.body.appendChild(n),n.click(),this.sepehrLoading=!1}).catch(t=>{this.sepehrLoading=!1})},exportNira(){this.niraLoading=!0;let t={params:{ClassId:this.classId,IsQuota:this.quota,QuotaAccountId:this.quotaAccountId,Type:"NiraD"},headers:{"Content-Disposition":"attachment; filename=template.xlsx","Content-Type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},responseType:"arraybuffer"};this.$route.query.classType&&(t.params.ClassType=this.$route.query.classType),this.axios.get(this.$store.state.baseUrl+"flightinventorymanifest",t).then(t=>{const e={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};let a=(new Date).toLocaleDateString("en-GB",e);var s=new Blob([t.data],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;"}),n=document.createElement("a");n.href=window.URL.createObjectURL(s),n.download=`reportNira_${a}.xlsx`,document.body.appendChild(n),n.click(),this.niraLoading=!1}).catch(t=>{this.niraLoading=!1})}},computed:{...Object(b["b"])({getTicketReportItems:"flightStore/getTicketReportItems"}),user(){return this.$store.state.authStore.user},guestUser(){return this.$store.state.authStore.guestUser},defaultCurrency(){return this.user?this.user.data.defaultCurrency:this.guestUser.data.defaultCurrency}}},_=w,k=(a("c1c1"),a("2877")),T=Object(k["a"])(_,y,v,!1,null,"3828fc7b",null);e["default"]=T.exports}}]);