(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["errorLogs"],{"5c32":function(t,e,s){"use strict";s("903e")},"903e":function(t,e,s){},af78:function(t,e,s){"use strict";s.r(e);var a=s("0798"),i=s("8336"),o=s("b0af"),r=s("99d9"),n=s("62ad"),c=s("a523"),l=s("169a"),d=s("ce7e"),u=s("132d"),p=s("891e"),h=s("490a"),f=s("0fd9"),g=s("2fa4"),m=s("8654"),v=function(){var t=this,e=t._self._c;t._self._setupProxy;return e(c["a"],{staticClass:"my-12"},[e(l["a"],{model:{value:t.showDetailsDialog,callback:function(e){t.showDetailsDialog=e},expression:"showDetailsDialog"}},[e(o["a"],{staticStyle:{"min-height":"100vh"}},[e(r["d"],[t._v(" "+t._s(t.$t("reportLog"))+" "),e(g["a"]),e(i["a"],{attrs:{text:""},on:{click:function(e){t.showDetailsDialog=!1}}},[e(u["a"],{staticClass:"icon-remove icon-18"})],1)],1),e(r["c"],{staticStyle:{overflow:"auto","text-align":"start",direction:"ltr"}},[e("pre",{staticStyle:{"font-size":"14px",overflow:"auto",direction:"ltr"}},[t._v(t._s(t.detailsToShow))])])],1)],1),e(o["a"],{staticClass:"pt-4 moreRadius button",attrs:{flat:"",tile:""}},[e(r["d"],[t._v("گزارش خطا")]),e(f["a"],{staticClass:"px-5"},[e(n["a"],{attrs:{cols:"12"}},[e("date-picker",{ref:"Datepicker",attrs:{locale:t.locale,label:t.$t("fromDate"),startLabel:t.$t("fromDate"),endLabel:t.$t("toDate"),dense:"",clearable:"",height:44,"locale-config":{fa:{inputFormat:"jdddd jYYYY/jMM/jDD "},en:{inputFormat:"dddd YYYY/MM/DD "}},modal:!0,selectSource:t.selectSource,to:t.todayJ,"auto-submit":!1},on:{focus:function(e){t.selectSource=1},changeLocales:t.getDatePickerLocale,rangeBegin:t.rangeBegin},model:{value:t.startDate,callback:function(e){t.startDate=e},expression:"startDate"}})],1),e(n["a"],{attrs:{cols:"12"}},[e(m["a"],{staticClass:"moreRadius input",attrs:{label:t.$t("toDate"),readonly:"",outlined:"","clear-icon":"icon-remove icon-18 grey--text",dense:"",clearable:"",height:44},on:{click:function(e){t.$refs.Datepicker.showPicker("input"),t.selectSource=2}},scopedSlots:t._u([{key:"prepend-inner",fn:function(){return[e("i",{staticClass:"homepage-icon-color pl-1 icon-calendar",staticStyle:{"pointer-events":"none"}})]},proxy:!0}]),model:{value:t.displayEndDate,callback:function(e){t.displayEndDate=e},expression:"displayEndDate"}})],1),e(n["a"],{attrs:{cols:"12"}},[e(i["a"],{staticClass:"py-2 px-7 moreRadius button",attrs:{color:"buttons",dark:"",width:"150","x-large":"",height:"42",depressed:""},on:{click:t.getData}},[t._v(" "+t._s(t.$t("search"))+" ")])],1)],1)],1),t.dataLoading?e(h["a"],{staticClass:"mx-auto d-block mt-5",attrs:{indeterminate:"",size:"44"}}):t._e(),!t.dataLoading&&t.items.length>0?t._l(t.items,(function(s,a){return e(o["a"],{key:8e3+a,staticClass:"moreRadius button mt-4",attrs:{flat:""}},[e(f["a"],{staticClass:"mx-0"},[e(n["a"],{attrs:{cols:"8"}},[e("div",{staticClass:"grey--text body-2"},[t._v(t._s(t.$t("date")))]),e("div",["fa"==t.$i18n.locale?e("span",{staticClass:"mx-1 body-2"},[t._v(" "+t._s(t._f("simplePersian")(t._f("persianDateTime")(s.createdAt.substring(0,10),"/"),t.$i18n.locale))+" ")]):t._e(),e("span",{staticClass:"mx-1 body-2"},[t._v(" "+t._s(s.createdAt.substring(0,10))+" ")])])]),e(n["a"],{attrs:{cols:"4 d-flex align-end flex-column"}},[e("div",{staticClass:"grey--text body-2"},[t._v(t._s(t.$t("hour")))]),e("div",{staticClass:"mx-1 body-2"},[t._v(" "+t._s(t._f("simplePersian")(s.createdAt.substring(10),t.$i18n.locale))+" ")])]),e(n["a"],{attrs:{cols:"12"}},[e("div",{staticClass:"grey--text body-2"},[t._v(t._s(t.$t("provider")))]),e("div",{staticClass:"body-2"},[t._v(" "+t._s(` ${t.$options.filters.subsystemName(s.serviceId)} - ${s.SubsystemName} (${s.SubsystemId})`)+" ")])]),e(n["a"],{attrs:{cols:"12"}},[e(d["a"],{staticClass:"mb-4"}),e("div",{staticClass:"d-flex justify-space-between"},[e(i["a"],{staticClass:"no-before",attrs:{depressed:"",text:"",small:""},on:{click:function(e){return t.showErrorLog(s,a,"showPassengers")}}},[t._v(t._s(t.$t("passengers"))+" "),e(u["a"],{class:"icon-16 px-1 icon-chevron-"+(s.showPassengers?"up":"down")})],1),e(i["a"],{staticClass:"no-before",attrs:{depressed:"",text:"",small:""},on:{click:function(e){return t.showErrorLog(s,a,"showServiceDetails")}}},[t._v(t._s(t.$t("serviceDetails"))+" "),e(u["a"],{class:"icon-16 px-1 icon-chevron-"+(s.showServiceDetails?"up":"down")})],1),e(i["a"],{staticClass:"no-before",attrs:{depressed:"",text:"",small:""},on:{click:function(e){return t.showErrorLog(s,a,"showError")}}},[t._v(t._s(t.$t("error"))+" "),e(u["a"],{class:"icon-16 px-1 icon-chevron-"+(s.showError?"up":"down")})],1)],1)],1)],1),e(o["a"],{key:"showPassengers"+a,staticClass:"moreRadius button",attrs:{flat:""}},[s.showPassengers?e("td",{staticClass:"pa-3",attrs:{colspan:"7"}},t._l(s.AirTraveler,(function(t,s){return e("div",{key:s},[e("passangers",{attrs:{passenger:t,isForeign:!0,currency:"IRR",index:s,first:0==s}})],1)})),0):t._e()]),e(o["a"],{key:"showError"+a,staticClass:"moreRadius button",attrs:{flat:""}},[s.showError?e("div",{staticClass:"pa-3"},[e("pre",{staticClass:"caption",staticStyle:{direction:"ltr","text-align":"start",width:"100%","max-height":"250px",overflow:"auto"}},[t._v(t._s(s.info.data?s.info.data.Items.BookResponse:s.errorLog?s.errorLog:""))]),s.showDetailsBtn?e(i["a"],{staticClass:"moreRadius button ml-auto d-block mt-4",attrs:{color:"buttons",depressed:"",dark:""},on:{click:function(e){return t.showDetails(s,a)}}},[t._v(" "+t._s(t.$t("show"))+" "+t._s(t.$t("details"))+" ")]):t._e()],1):t._e()]),e(o["a"],{key:"showServiceDetails"+a,staticClass:"moreRadius button",attrs:{flat:""}},[s.showServiceDetails?e("td",{staticClass:"pa-3",attrs:{colspan:"7"}},[2==s.serviceId?e("hotelDetails"):t._e(),1==s.serviceId?e("flightDetails",{staticClass:"w-100",attrs:{rtl:t.$vuetify.rtl,wide:!1,printable:!1,result:s.info.data.Items.SearchResponse}}):t._e()],1):t._e()])],1)})):t._e(),t.dataLoading||0!=t.items.length?t._e():e(a["a"],{staticClass:"body-1 my-4 mx-auto text-center",attrs:{text:"",border:"left",color:"#FF791F"}},[e("span",[t._v(t._s(t.$t("noDataFound")))])]),t.pageCount>1?e("div",{staticClass:"text-center pt-6"},[e(p["a"],{attrs:{length:t.pageCount,"total-visible":"10"},on:{input:t.getData},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1):t._e()],2)},b=[],y=s("60a3"),_=s("8ac9"),D=s("6047"),I=function(){var t=this,e=t._self._c;return e("div",[e(f["a"],{staticClass:"pb-3"},[e(n["a"],{attrs:{cols:"1 px-0"}},[0==t.index?e("div",{staticClass:"font-weight-bold"},[t._v("#")]):t._e(),e("div",{staticClass:"pt-1"},[t._v(" "+t._s(t.index+1)+" ")])]),e(n["a"],[0==t.index?e("div",{staticClass:"font-weight-bold"},[t._v(" "+t._s(t.$t("fullName"))+" ")]):t._e(),e("div",{staticClass:"pt-1"},[t._v(" "+t._s(t.passenger.PersonName.GivenName)+" "+t._s(t.passenger.PersonName.Surname)+" ")])]),e(n["a"],[0==t.index?e("div",{staticClass:"font-weight-bold"},[t._v(" "+t._s(t.$t("ageGroup"))+" ")]):t._e(),e("div",{staticClass:"pt-1"},[e("span",{staticClass:"px-3"},[t._v(t._s(t._f("human")(t.passenger.PassengerTypeCode))+" ")])])]),e(n["a"],[0==t.index?e("div",{staticClass:"font-weight-bold"},[t._v(t._s(t.$t("gender")))]):t._e(),e("div",{staticClass:"pt-1"},[t._v(" "+t._s(t.$t(t.passenger.PersonName.NamePrefix))+" ")])]),e(n["a"],[0==t.index?e("div",{staticClass:"font-weight-bold"},[t._v(" "+t._s(t.$t("nationalId"))+" ")]):t._e(),"IR"!=t.passenger.Document.DocIssueCountry?e("div",{staticClass:"pt-1"},[t._v(" -- ")]):e("div",{staticClass:"pt-1"},[t._v(" "+t._s(t.passenger.NationalId)+" ")])]),e(n["a"],[0==t.index?e("div",{staticClass:"font-weight-bold"},[t._v(" "+t._s(t.$t("birthDate"))+" ")]):t._e(),"IR"==t.passenger.Document.DocIssueCountry?e("div",{staticClass:"pt-1"},[t._v(" "+t._s(t.passenger.BirthDate.substring(0,10))+" ")]):e("div",{staticClass:"pt-1"},[t._v(" "+t._s(t.passenger.BirthDate.substring(0,10).split("-").join("/"))+" ")])]),e(n["a"],[0==t.index?e("div",{staticClass:"font-weight-bold"},[t._v(" "+t._s(t.$t("nationality"))+" ")]):t._e(),e("div",{staticClass:"pt-1"},[t._v(" "+t._s(t.passenger.Document.DocIssueCountry)+" ")])]),e(n["a"],[0==t.index?e("div",{staticClass:"font-weight-bold"},[t._v(" "+t._s(t.$t("passportNumber"))+" ")]):t._e(),"IR"!=t.passenger.Document.DocIssueCountry?e("div",{staticClass:"pt-1"},[t._v(" "+t._s(t.passenger.Document.DocID)+" ")]):e("div",{staticClass:"pt-1"},[t._v("--")])]),e(n["a"],[0==t.index?e("div",{staticClass:"font-weight-bold"},[t._v(" "+t._s(t.$t("passportExpireDate"))+" ")]):t._e(),"IR"!=t.passenger.Document.DocIssueCountry?e("div",{staticClass:"pt-1"},[t._v(" "+t._s(t.passenger.Document.ExpireDate.substring(0,10).split("-").join("/"))+" ")]):e("div",{staticClass:"pt-1"},[t._v("--")])])],1)],1)},C=[],w=s("403a"),x={props:["passenger","first","price","index","currency","isForeign"],methods:{flagUrl:w["f"]}},$=x,S=(s("5c32"),s("2877")),P=Object(S["a"])($,I,C,!1,null,null,null),k=P.exports,R=s("5c1f"),L=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 a(){this.constructor=e}t(e,s),e.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)}}(),j=function(t,e,s,a){var i,o=arguments.length,r=o<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,s):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(t,e,s,a);else for(var n=t.length-1;n>=0;n--)(i=t[n])&&(r=(o<3?i(r):o>3?i(e,s,r):i(e,s))||r);return o>3&&r&&Object.defineProperty(e,s,r),r},E=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.itemsPerPage=10,e.pageCount=0,e.page=1,e.selectSource=1,e.startDate="",e.dpLocale="fa",e.dataLoading=!1,e.showDetailsDialog=!1,e.detailsToShow=[],e.items=[],e}return L(e,t),e.prototype.created=function(){this.startDate=[this.todayG,this.todayG],this.getData()},e.prototype.showDetails=function(t,e){var s=this;if(this.showDetailsDialog=!0,1!=t.serviceId||t.hasOwnProperty("AirItinerary")||this.$set(this.items[e],"AirItinerary",{CombinationId:t.CombinationId,RecommendationId:t.RecommendationId,SessionId:t.SessionId,SubsystemId:t.SubsystemId,SubsystemName:t.SubsystemName}),2!=t.serviceId||t.hasOwnProperty("HotelItinerary")||this.$set(this.items[e],"HotelItinerary",{CombinationId:t.CombinationId,RecommendationId:t.RecommendationId,SessionId:t.SessionId,SubsystemId:t.SubsystemId,SubsystemName:t.SubsystemName}),"visitor"!=this.user.roleType){var a={};a=1==t.serviceId?{AirItinerary:t.AirItinerary}:{HotelItinerary:t.HotelItinerary},this.axios.post("".concat(this.$store.state.baseUrl).concat(1==t.serviceId?"flights":"hotels","/log"),a).then((function(t){var e=[];e=t.data.Success?t:t.data.Items;for(var a=!1,i=0,o=e;i<o.length;i++){var r=o[i];if(s.cnLodash.isEmpty(r.data.Items)){a=!0;break}}s.detailsToShow=a?s.$t("noRecordsFound"):t.data.Items.BookResponse})).catch((function(t){}))}},e.prototype.rangeBegin=function(){this.$set(this.startDate,1,"")},e.prototype.getDatePickerLocale=function(t){this.dpLocale=t},Object.defineProperty(e.prototype,"todayJ",{get:function(){return(new this.$persianDate).calendar("j").toString()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"todayG",{get:function(){return(new this.$persianDate).calendar("g").toString()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endDate",{get:function(){return 0!=this.startDate.length?this.startDate[1]:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayEndDate",{get:function(){var t;if(this.endDate){var e="fa"==this.dpLocale?"jdddd jYYYY/jMM/jDD":"dddd YYYY/MM/DD";return null===(t=this.$options.filters)||void 0===t?void 0:t.simplePersian(new this.$persianDate(this.endDate).toString(e),this.dpLocale)}return""},enumerable:!1,configurable:!0}),e.prototype.getData=function(){var t=this;this.dataLoading=!0,this.axios(this.$store.state.baseUrl+"bookingengine/errorlog?StartDate=".concat(this.startDate[0],"&EndDate=").concat(this.endDate,"\n        &perPage=").concat(this.itemsPerPage,"&pageNumber=").concat(this.page)).then((function(e){t.items=e.data.Items,t.dataLoading=!1,t.pageCount=e.data.PageIndexes})).catch((function(e){console.log(e),t.items.splice(0),t.dataLoading=!1}))},Object.defineProperty(e.prototype,"headers",{get:function(){var t=[{text:"#",value:"Row",align:"end",sortable:!1},{text:this.$t("date"),value:"Date",align:"center",sortable:!1},{text:this.$t("hour"),value:"Time",align:"center",sortable:!1},{text:this.$t("provider"),value:"SubsystemName",align:"center",sortable:!1},{text:this.$t("passengers"),value:"Passengers",align:"center",sortable:!1},{text:this.$t("serviceDetails"),value:"ServiceDetails",align:"center",sortable:!1},{text:this.$t("error"),value:"Error",align:"center",width:80,sortable:!1}];return t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"user",{get:function(){return this.$store.state.authStore.user},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"locale",{get:function(){return"fa"==this.$i18n.locale?"fa,en":"en,fa"},enumerable:!1,configurable:!0}),e.prototype.showErrorLog=function(t,e,s){var a=this;this.$set(this.items[e],s,!this.items[e][s]);var i=["showServiceDetails","showPassengers","showError"];if(i.forEach((function(t){t!=s&&a.$set(a.items[e],t,!1)})),1!=t.serviceId||t.hasOwnProperty("AirItinerary")||this.$set(this.items[e],"AirItinerary",{CombinationId:t.CombinationId,RecommendationId:t.RecommendationId,SessionId:t.SessionId,SubsystemId:t.SubsystemId,SubsystemName:t.SubsystemName}),2!=t.serviceId||t.hasOwnProperty("HotelItinerary")||this.$set(this.items[e],"HotelItinerary",{CombinationId:t.CombinationId,RecommendationId:t.RecommendationId,SessionId:t.SessionId,SubsystemId:t.SubsystemId,SubsystemName:t.SubsystemName}),"visitor"!=this.user.roleType&&t[s]){var o={};o=1==t.serviceId?{AirItinerary:t.AirItinerary}:{HotelItinerary:t.HotelItinerary},"showError"==s&&t.errorLog?(this.$set(this.items[e],"info",t.errorLog),this.$set(this.items[e],"showDetailsBtn",!0)):this.axios.post("".concat(this.$store.state.baseUrl).concat(1==t.serviceId?"flights":"hotels","/log"),o).then((function(t){var s=[];s=t.data.Success?t:t.data.Items;for(var i=!1,o=0,r=s;o<r.length;o++){var n=r[o];if(a.cnLodash.isEmpty(n.data.Items)){i=!0;break}}i?a.$toast.error(a.$t("noRecordsFound")):(a.$set(a.items[e],"info",t),console.log("this.errorLog",t))})).catch((function(t){}))}},e=j([Object(y["a"])({components:{flightDetails:D["a"],hotelDetails:_["a"],passangers:k,datePicker:R["a"]}})],e),e}(y["d"]),O=E,N=O,Y=(s("c6a0"),Object(S["a"])(N,v,b,!1,null,"735a0376",null));e["default"]=Y.exports},c6a0:function(t,e,s){"use strict";s("f16d")},f16d:function(t,e,s){}}]);