File "chunk-2d0b5f96.749de1eac0662f2a10ec.js"
Full path: /home/satitravel/public_html/wp-content/plugins/citynet/public/mobile/js/chunk-2d0b5f96.749de1eac0662f2a10ec.js
File
size: 7.31 B
MIME-type: text/plain
Charset: utf-8
Download Open Edit Advanced Editor &nnbsp; Back
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b5f96"],{"1ad4":function(e,t,r){"use strict";r.r(t);var i=r("62ad"),o=r("0fd9"),n=r("b974"),s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"moreRadius button border--full--solid py-2 mt-2"},[t(o["a"],{staticClass:"mb-2 mx-0",class:e.$vuetify.breakpoint.mobile?"d-none":""},e._l(e.headers,(function(r){return t(i["a"],{key:r.key,class:r.class,attrs:{cols:r.cols}},[e._v(" "+e._s(r.text)+" ")])})),1),e._l(e.items,(function(r){return t(o["a"],{key:r.ages,staticClass:"mx-0 dir-rtl"},e._l(e.headers,(function(o){return t(i["a"],{key:o.key,class:o.class,staticStyle:{display:"flex","align-items":"center"},attrs:{cols:o.cols}},["input"===o.key?[t("div",{staticClass:"d-flex justify-center align-start",class:{" justify-end":e.$vuetify.rtl," flex-column":e.$vuetify.breakpoint.mobile},staticStyle:{gap:"4px"}},["targetAmount"!==e.editPriceType?t(n["a"],{staticClass:"moreRadius input font-size-13",staticStyle:{"max-width":"100px"},style:e.$vuetify.breakpoint.mobile?{width:"100%"}:{"max-width":"100px"},attrs:{value:e.editedPrices[r.ageGroup].type,outlined:"",items:["inc","dec"],dense:"","menu-props":{"offset-y":!0,contentClass:"custom-scroll moreRadius button menu-shadow"}},on:{input:function(t){return e.handleUpdateEditedPrices({value:t,ageGroup:r.ageGroup,key:"type"})}},scopedSlots:e._u([{key:"item",fn:function(r){return[t("span",{staticClass:"font-size-13 font-weight-400 black--text"},[e._v(" "+e._s(e._f("effectType")(r.item))+" ")])]}},{key:"selection",fn:function(r){return[t("span",{staticClass:"font-size-13 font-weight-400"},[e._v(" "+e._s(e._f("effectType")(r.item))+" ")])]}}],null,!0),model:{value:e.editedPrices[r.ageGroup].type,callback:function(t){e.$set(e.editedPrices[r.ageGroup],"type",t)},expression:"editedPrices[item.ageGroup].type"}}):e._e(),t("NumberField",{class:"targetAmount"!==e.editPriceType?e.$vuetify.rtl?"mr-1":"ml-1":"",attrs:{value:e.editedPrices[r.ageGroup].amount,label:e.$t("Amount"),maxLength:"increaseDecreasePercent"==e.editPriceType||"increaseDecreasePercentTotal"==e.editPriceType?5:null,appendIcon:"increaseDecreasePercent"==e.editPriceType||"increaseDecreasePercentTotal"==e.editPriceType?"icon-percentage icon-20":"",dir:e.$vuetify.rtl?"rtl":"ltr",noDot:e.hasPriceFormat,height:40,faNum:e.$i18n.locale,hasPriceFormat:e.hasPriceFormat,hideDetails:!1},on:{input:function(t){return e.handleUpdateEditedPrices({value:t,ageGroup:r.ageGroup,key:"amount"})}}})],1)]:[e._v(e._s(r[o.key]))]],2)})),1)}))],2)},a=[],c=r("60a3"),l=r("c514"),u=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),p=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.handleUpdateEditedPrices=function(e){this.$emit("edit-price",e)},t.prototype.priceConvertor=function(e){var t,r,i;this.currencyConvert;return null===(t=this.$options.filters)||void 0===t?void 0:t.simplePersian(null===(r=this.$options.filters)||void 0===r?void 0:r.price(null===(i=this.$options.filters)||void 0===i?void 0:i.round(e,this.currencyAbbr)),this.$i18n.locale)},t.prototype.priceInCurrency=function(e){var t=e.BaseFare,r=e.Taxes,i=e.ServiceTax,o=e.Commission,n=e.TotalFare;return{BaseFare:t*this.currencyConvert,Taxes:r*this.currencyConvert,ServiceTax:i*this.currencyConvert,Commission:o*this.currencyConvert,TotalFare:n*this.currencyConvert}},t.prototype.calculatePricesBreakdown=function(e){var t=e.baseAndCommissionDif,r=e.commission,i=e.base,o=e.taxDif,n=e.tax,s=(e.total,r-t),a=n+o,c=s>=0?s:0,l=s>=0?i:i-s;return{baseToShow:l,commissionToShow:c,taxToShow:a,totalToShow:l+a-c}},Object.defineProperty(t.prototype,"items",{get:function(){var e=this;return this.service?this.service.CipItineraryPricingInfo.PTC_FareBreakdowns.map((function(t){var r,i,o=t.PassengerTypeQuantity,n=t.PassengerFare,s=e.priceInCurrency(n),a=s.BaseFare,c=s.Taxes,l=s.Commission,u=s.TotalFare,p=o.Code,d=e.editedPrices[p],y=d.amount,f=d.type,m=0,h=0;if(y>0){var v="inc"===f?1:-1,P=u;"targetAmount"===e.editPriceType&&(P=y),"increaseDecreasePriceTotal"===e.editPriceType&&(P=u+v*y),"increaseDecreasePercent"===e.editPriceType&&(P=u+v*(y*a/100)),"increaseDecreasePercentTotal"===e.editPriceType&&(P=u+v*(y*u/100));var b=10*P/11,x=P-b;m=b-a+l,h=x-c}var g=e.calculatePricesBreakdown({taxDif:h,baseAndCommissionDif:m,tax:c,commission:l,total:u,base:a}),T=g.baseToShow,k=g.taxToShow,C=g.commissionToShow,$=g.totalToShow;return{ageGroup:p,ages:"".concat(null===(r=e.$options.filters)||void 0===r?void 0:r.human(o.Code,e.$i18n.locale)," x ").concat(null===(i=e.$options.filters)||void 0===i?void 0:i.simplePersian(e.service.Quantity,e.$i18n.locale)),base:e.priceConvertor(T),tax:e.priceConvertor(k),commission:e.priceConvertor(C),totalPerPerson:e.priceConvertor($),sumOfNumbers:e.priceConvertor($*e.service.Quantity),input:"",total:e.priceConvertor($*e.service.Quantity),baseAndCommissionDif:Number(m.toFixed(2)),taxDif:Number(h.toFixed(2))}})):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"headers",{get:function(){return[{key:"ages",text:this.$t("ages"),class:"grey--text text--darken-1",cols:1},{key:"base",text:this.$t("base"),class:"grey--text text--darken-1"},{key:"tax",text:this.$t("tax"),class:"grey--text text--darken-1",cols:1},{key:"commission",text:this.$t("commission"),class:"grey--text text--darken-1"},{key:"totalPerPerson",text:this.$t("totalPerPerson"),class:"grey--text text--darken-1"},{key:"sumOfNumbers",text:this.$t("sthSum",[this.$t("number")]),class:"grey--text text--darken-1"},{key:"input",text:"".concat("targetAmount"===this.editPriceType?this.$t(this.editPriceType):"increaseDecreasePercent"==this.editPriceType?this.$t("percentage"):this.$t("Amount")," (").concat(this.$t("perPerson"),")"),class:"grey--text text--darken-1",cols:3},{key:"total",text:this.$t("total"),class:["black--text",this.$vuetify.rtl?"text-end":"text-start","justify-end"]}]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasPriceFormat",{get:function(){return"targetAmount"===this.editPriceType||"increaseDecreasePriceTotal"===this.editPriceType||"increaseDecreasePriceBase"===this.editPriceType},enumerable:!1,configurable:!0}),p([Object(c["c"])({required:!0})],t.prototype,"service",void 0),p([Object(c["c"])({required:!0})],t.prototype,"editPriceType",void 0),p([Object(c["c"])({required:!0})],t.prototype,"editedPrices",void 0),p([Object(c["c"])({default:"IRR"})],t.prototype,"currencyAbbr",void 0),p([Object(c["c"])({default:1})],t.prototype,"currencyConvert",void 0),t=p([Object(c["a"])({name:"EditPriceDetailsExtraService",components:{NumberField:l["a"]}})],t),t}(c["d"]),y=d,f=y,m=r("2877"),h=Object(m["a"])(f,s,a,!1,null,null,null);t["default"]=h.exports}}]);