PageSourceSearch

https://booking.hotel-newgrand.co.jp/page-MyAccount-MyPromotions-vue.927b8648585a7417822c.js

js hotel-newgrand.co.jp collected 2026-09-24 18:39:14 UTC 30,827 bytes, 2 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[41],{1448:function(e,t,i){"use strict";var o=i(33),r=Object(o.a)({},(function render(){var e=this._self._c;return e("svg",this._g({attrs:{width:"19",height:"19",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},this.$listeners),[e("path",{attrs:{d:"M9.5 18.5c-2.3 0-4.304-.762-6.013-2.288C1.78 14.688.8 12.783.55 10.5H2.6c.233 1.733 1.004 3.167 2.312 4.3 1.309 1.133 2.838 1.7 4.588 1.7 1.95 0 3.604-.68 4.963-2.037C15.82 13.104 16.5 11.45 16.5 9.5c0-1.95-.68-3.604-2.037-4.963C13.104 3.18 11.45 2.5 9.5 2.5a6.75 6.75 0 00-3.225.8A7.431 7.431 0 003.75 5.5H6.5v2h-6v-6h2v2.35a8.732 8.732 0 013.112-2.475A8.93 8.93 0 019.5.5c1.25 0 2.42.238 3.512.712a9.147 9.147 0 012.85 1.926 9.149 9.149 0 011.926 2.85A8.707 8.707 0 0118.5 9.5c0 1.25-.238 2.42-.712 3.512a9.148 9.148 0 01-1.925 2.85 9.148 9.148 0 01-2.85 1.926A8.707 8.707 0 019.5 18.5zm2.8-4.8L8.5 9.9V4.5h2v4.6l3.2 3.2-1.4 1.4z",fill:"#1C1B1F"}})])}),[],!1,null,null,null);t.a=r.exports},1493:function(e,t,i){},1494:function(e,t,i){},1495:function(e,t,i){},1496:function(e,t,i){},1497:function(e,t,i){},1498:function(e,t,i){},1621:function(e,t,i){"use strict";i(1493)},1622:function(e,t,i){"use strict";i(1494)},1623:function(e,t,i){"use strict";i(1495)},1624:function(e,t,i){"use strict";i(1496)},1625:function(e,t,i){"use strict";i(1497)},1626:function(e,t,i){"use strict";i(1498)},890:function(e,t,i){"use strict";i.r(t);var o=i(40),r=i(33),n=Object(r.a)({},(function render(){var e=this._self._c;return e("svg",this._g({attrs:{width:"24",height:"25",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},this.$listeners),[e("path",{attrs:{d:"M9 18.5c-.55 0-1.02-.196-1.412-.587A1.927 1.927 0 017 16.5v-12c0-.55.196-1.021.588-1.413A1.925 1.925 0 019 2.5h9c.55 0 1.021.196 1.413.587.391.392.587.863.587 1.413v12c0 .55-.196 1.021-.587 1.413A1.928 1.928 0 0118 18.5H9zm-4 4c-.55 0-1.021-.196-1.413-.587A1.928 1.928 0 013 20.5v-14h2v14h11v2H5z"}}),e("mask",{staticStyle:{"mask-type":"alpha"},attrs:{id:"a",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"25"}},[e("path",{attrs:{d:"M0 .5h24v24H0z"}})])])}),[],!1,null,null,null).exports,a=Object(r.a)({},(function render(){var e=this._self._c;return e("svg",this._g({attrs:{width:"20",height:"21",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},this.$listeners),[e("path",{attrs:{d:"M10.7 12.55l5.65-5.65-1.4-1.45L10.7 9.7 8.55 7.6 7.15 9l3.55 3.55zM6 16.5c-.55 0-1.02-.196-1.412-.588A1.926 1.926 0 014 14.5v-12c0-.55.196-1.02.588-1.413A1.926 1.926 0 016 .5h12c.55 0 1.02.196 1.413.587.391.392.587.863.587 1.413v12c0 .55-.196 1.02-.587 1.412A1.926 1.926 0 0118 16.5H6zm-4 4c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 010 18.5v-14h2v14h14v2H2z",fill:"#00805B"}})])}),[],!1,null,null,null).exports,s=(Object(r.a)({},(function render(){var e=this._self._c;return e("svg",this._g({attrs:{width:"14",height:"19",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},this.$listeners),[e("path",{attrs:{d:"M6 18.5v-4H1v-2h5v-2H1v-2h4.075L0 .5h2.375L7 7.8 11.625.5H14l-5.075 8H13v2H8v2h5v2H8v4H6z",fill:"#1C1B1F"}})])}),[],!1,null,null,null).exports,i(1448)),c=Object(r.a)({},(function render(){var e=this._self._c;return e("svg",this._g({attrs:{width:"19",height:"21",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},this.$listeners),[e("path",{attrs:{d:"M8.45 16.85L4.9 13.3l1.45-1.45 2.1 2.1 4.2-4.2 1.45 1.45-5.65 5.65zM2.5 20.5c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 01.5 18.5v-14c0-.55.196-1.02.587-1.413A1.926 1.926 0 012.5 2.5h1v-2h2v2h8v-2h2v2h1c.55 0 1.02.196 1.413.587.391.392.587.863.587 1.413v14c0 .55-.196 1.02-.587 1.413a1.926 1.926 0 01-1.413.587h-14zm0-2h14v-10h-14v10zm0-12h14v-2h-14v2z",fill:"#1C1B1F"}})])}),[],!1,null,null,null).exports,l=Object(r.a)({},(function render(){var e=this._self._c;return e("svg",this._g({attrs:{width:"18",height:"21",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},this.$listeners),[e("path",{attrs:{d:"M6.7 17.2l-1.4-1.4 2.3-2.3-2.3-2.3 1.4-1.4L9 12.1l2.3-2.3 1.4 1.4-2.3 2.3 2.3 2.3-1.4 1.4L9 14.9l-2.3 2.3zM2 20.5c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 010 18.5v-14c0-.55.196-1.02.588-1.413A1.926 1.926 0 012 2.5h1v-2h2v2h8v-2h2v2h1c.55 0 1.02.196 1.413.587.391.392.587.863.587 1.413v14c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0116 20.5H2zm0-2h14v-10H2v10zm0-12h14v-2H2v2z",fill:"#1C1B1F"}})])}),[],!1,null,null,null).exports,u=Object(r.a)({},(function render(){var e=this._self._c;return e("svg",this._g({attrs:{width:"19",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},this.$listeners),[e("path",{attrs:{d:"M2.5 20c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 01.5 18V4c0-.55.196-1.02.587-1.413A1.926 1.926 0 012.5 2h1V0h2v2h8V0h2v2h1c.55 0 1.02.196 1.413.587.391.392.587.863.587 1.413v14c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0116.5 20h-14zm0-2h14V8h-14v10zm0-12h14V4h-14v2z",fill:"#1C1B1F"}})])}),[],!1,null,null,null).exports,d=i(31),h=i(975),v=i(70),m={name:"BadgeStatus",props:{text:{type:String,default:null},status:{type:String,default:null}}},_=(i(1621),Object(r.a)(m,(function render(){return(0,this._self._c)("span",{class:"status-badge status-badge-".concat(this.status," mb-4")},[this._v("\n    "+this._s(this.text)+"\n  ")])}
1),[],!1,null,"625d9971",null).exports),f=i(11),p=i(49),b=i(180),y=i(83),g=i(122);function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var w={name:"VoucherModal",components:{CopyIcon:n,CopySuccessIcon:a,DeviceResetIcon:s.a,EventAvailableIcon:c,EventBusyIcon:l,CalendarTodayIcon:u,BadgeStatus:_},props:{voucherDetail:{type:Object,default:null}},data:function data(){return{loading:!1,reservation:null,voucherTypes:{PRICE:"price",NO_PRICE:"no_price",FIXED_AMOUNT:"fixed_amount"},voucherStatus:{AVAILABLE:"available",PENDING:"pending",EXPIRED:"expired",CONSUMED:"consumed"},priceWithPrefix:h.a,SUPPORT_MCP_CURRENCIES:y.c,copiedVoucherCode:null,isMobile:Object(d.h)()}},computed:function _objectSpread(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(i,!0).forEach((function(t){_defineProperty(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(i).forEac
1h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},Object(o.d)({currency:"mcp/selectedCurrency",hotelCurrency:"setting/getCurrency"}),{visibiltyPreference:function visibiltyPreference(){var e,t,i,o,r,n,a,s,c,l,u,d,h,v;return{canViewConsumption:"consumed"===(null===(e=this.voucherDetail)||void 0===e?void 0:e.ui_status)&&"no_price"===(null===(t=this.voucherDetail)||void 0===t?void 0:t.voucher_type),canViewReservationNumber:"consumed"===(null===(i=this.voucherDetail)||void 0===i?void 0:i.ui_status)&&(null===(o=this.voucherDetail)||void 0===o?void 0:o.reservation_number),canViewValidThrough:(null===(r=this.voucherDetail)||void 0===r?void 0:r.sale_start_date)&&(null===(n=this.voucherDetail)||void 0===n?void 0:n.sale_end_date)&&"consumed"!==(null===(a=this.voucherDetail)||void 0===a?void 0:a.ui_status),canViewAmount:null===(s=this.voucherDetail)||void 0===s?void 0:s.amount,canViewTargetStaying:(null===(c=this.voucherDetail)||void 0===c?void 0:c.stay_start_date)&&(null===(l=this.voucherDetail)||void 0===l?void 0:l.stay_end_date)&&["available","pending"].includes(null===(u=this.voucherDetail)||void 0===u?void 0:u.ui_status),canViewExcludeDuring:(null===(d=this.voucherDetail)||void 0===d?void 0:d.excluding_start_date)&&(null===(h=this.voucherDetail)||void 0===h?void 0:h.excluding_end_date)&&["available","pending"].includes(null===(v=this.voucherDetail)||void 0===v?void 0:v.ui_status)}},copyButtonVariant:function copyButtonVariant(){return this.copiedVoucherCode?"dotted-success":"dotted-theme"},isServedByOta:function isServedByOta(){var e;return[g.a.BOOKING_WIDGET_TO_TRIPLA_OTA,g.a.TRIPLA_OTA].includes(null===(e=this.reservation)||void 0===e?void 0:e.booking_method)},reservationLink:function reservationLink(){var e,t;return this.reservation?this.isServedByOta?null:{name:f.a.reservation.confirmation,params:{confirmationNumber:this.voucherDetail.reservation_number},query:{bypass_token:this.reservation.bypass_token,hotelId:null===(e=this.voucherDetail.hotel)||void 0===e?void 0:e.triplabot_code,code:null===(t=this.voucherDetail.hotel)||void 0===t?void 0:t.triplabot_code}}:null},otaReservationLink:function otaReservationLink(){var e;return this.reservation&&this.isServedByOta?Object(v.e)({current_reservation:this.voucherDetail.reservation_number,code:null===(e=this.voucherDetail.hotel)||void 0===e?void 0:e.triplabot_code,bypass_token:this.reservation.bypass_token,locale:this.$i18n.locale,from:encodeURIComponent(location.href)}):null}}),watch:{voucherDetail:function voucherDetail(e){var t,i,o,r=this;(null===(t=this.voucherDetail)||void 0===t?void 0:t.reservation_number)&&(this.loading=!0,b.a.get({reservationID:null===(i=this.voucherDetail)||void 0===i?void 0:i.reservation_number,hotelId:null===(o=this.voucherDetail.hotel)||void 0===o?void 0:o.triplabot_code}).then((function(e){r.reservation=e})).catch((function(e){r.reservation=null,console.warn("Failed to fetch reservation details for voucher:",e)})).finally((function(){return r.loading=!1})))}},methods:{statusButton:function statusButton(e){var t={disabled:!0,text:""};switch("".concat(this.voucherDetail.voucher_type,"_").concat(this.voucherDetail.ui_status)){case"".concat(this.voucherTypes.PRICE,"_").concat(this.voucherStatus.AVAILABLE):t={disabled:!1,text:this.$t("myProfile.myVoucher.makeReservation"),handler:"make_reservation"};break;case"".concat(this.voucherTypes.PRICE,"_").concat(this.voucherStatus.PENDING):t={disabled:!0,text:this.$t("myProfile.myVoucher.makeReservation")};break;case"".concat(this.voucherTypes.NO_PRICE,"_").concat(this.voucherStatus.AVAILABLE):t={disabled:!1,text:this.$t("myProfile.myVoucher.consumeVoucher"),handler:"consume"};break;case"".concat(this.voucherTypes.NO_PRICE,"_").concat(this.voucherStatus.PENDING):t={disabled:!0,text:this.$t("myProfile.myVoucher.consumeVoucher"),handler:"consume"};break;default:t={}}return t},formatDateTime:function formatDateTime(e){return Object(p.k)(new Date(e),"YYYY-MM-DD HH:mm:ss")},closeModal:function closeModal(){this.copiedVoucherCode=null,this.$emit("remove-voucher-modal")},writeText:function writeText(e){return new Promise((function(t,i){var o=document.createRange();o.selectNodeContents(document.body),document.getSelection().addRange(o);var r=!1,n=function listener(t){t.clipboardData.setData("text/plain",e),t.preventDefault(),r
1=!0};document.addEventListener("copy",n),document.execCommand("copy"),document.removeEventListener("copy",n),document.getSelection().removeAllRanges(),r?t():i(new Error("Failed to copy text to clipboard"))}))},copyVoucher:function copyVoucher(){var e=document.querySelector("#voucher-code").innerHTML||"";this.writeText(e),this.copiedVoucherCode=e}}},C=(i(1622),Object(r.a)(w,(function render(){var e,t,i,o,r,n,a,s,c,l,u,d,h,v,m,_,f,p,b=this,y=b._self._c;return y("b-modal",{attrs:{id:"my-voucher-modal",size:"lg","hide-footer":"",centered:""},on:{hide:b.closeModal}},[b.loading?y("div",{staticClass:"d-flex justify-content-center overflow-hidden"},[y("b-spinner")],1):y("div",[y("section",{staticClass:"text-center pt-5px"},[y("badge-status",{attrs:{text:b.$t("myProfile.myVoucher.status.".concat(null===(e=b.voucherDetail)||void 0===e?void 0:e.ui_status)),status:null===(t=b.voucherDetail)||void 0===t?void 0:t.ui_status}}),b._v(" "),y("h5",{staticClass:"voucher-modal-title mt-4"},[b._v("\n          "+b._s(null===(i=b.voucherDetail)||void 0===i?void 0:i.name)+"\n        ")]),b._v(" "),y("div",{staticClass:"voucher-modal-info my-3"},[b.visibiltyPreference.canViewAmount?y("div",{staticClass:"voucher-modal-text"},[y("div",{staticClass:"voucher-modal-label"},[y("span",{staticClass:"price-symbol"},[b._v(b._s(b.hotelCurrency.symbol))]),b._v(" "),y("span",[b._v(b._s(b.$t("myProfile.myVoucher.amount")))])]),b._v(" "),y("span",[b._v(b._s(b.priceWithPrefix(null===(o=b.voucherDetail)||void 0===o?void 0:o.amount,b.hotelCurrency.symbol)))])]):b._e(),b._v(" "),b.visibiltyPreference.canViewConsumption?y("div",{staticClass:"voucher-modal-text"},[y("div",{staticClass:"voucher-modal-label"},[y("device-reset-icon"),b._v(" "),y("span",[b._v(b._s(b.$t("myProfile.myVoucher.consumptionTime")))])],1
1),b._v(" "),y("span",[b._v(b._s(b.formatDateTime(null===(r=b.voucherDetail)||void 0===r?void 0:r.consumed_at)))])]):b._e(),b._v(" "),b.visibiltyPreference.canViewReservationNumber?y("div",{staticClass:"voucher-modal-text"},[y("div",{staticClass:"voucher-modal-label"},[y("calendar-today-icon"),b._v(" "),y("span",[b._v(b._s(b.$t("myProfile.myVoucher.reservationNumber")))])],1),b._v(" "),b.reservationLink?y("router-link",{staticClass:"reservation-link",attrs:{"data-cy":"reservation-link-".concat(b.voucherDetail.reservation_number),to:b.reservationLink}},[b._v(b._s(null===(n=b.voucherDetail)||void 0===n?void 0:n.reservation_number))]):b.otaReservationLink?y("a",{staticClass:"reservation-link",attrs:{href:b.otaReservationLink,"data-cy":"reservation-link-".concat(b.voucherDetail.reservation_number),target:"_blank"}},[b._v(b._s(null===(a=b.voucherDetail)||void 0===a?void 0:a.reservation_number))]):y("span",{attrs:{"data-cy":"reservation-link-".concat(b.voucherDetail.reservation_number)}},[b._v(b._s(null===(s=b.voucherDetail)||void 0===s?void 0:s.reservation_number))])],1):b._e(),b._v(" "),b.visibiltyPreference.canViewValidThrough?y("div",{staticClass:"voucher-modal-text"},[y("div",{staticClass:"voucher-modal-label"},[y("device-reset-icon"),b._v(" "),y("span",[b._v(b._s(b.$t("myProfile.myVoucher.validThrough")))])],1),b._v(" "),y("span",[b._v(b._s(null===(c=b.voucherDetail)||void 0===c?void 0:c.sale_start_date)+" - "+b._s(null===(l=b.voucherDetail)||void 0===l?void 0:l.sale_end_date))])]):b._e(),b._v(" "),b.visibiltyPreference.canViewTargetStaying?y("div",{staticClass:"voucher-modal-text"},[y("div",{staticClass:"voucher-modal-label"},[y("event-available-icon"),b._v(" "),y("span",[b._v(b._s(b.$t("myProfile.myVoucher.targetStayingPeriod")))])],1),b._v(" "),y("span",[b._v(b._s(null===(u=b.voucherDetail)||void 0===u?void 0:u.stay_start_date)+" - "+b._s(null===(d=b.voucherDetail)||void 0===d?void 0:d.stay_end_date))])]):b._e(),b._v(" "),b.visibiltyPreference.canViewExcludeDuring?y("div",{staticClass:"voucher-modal-text"},[y("div",{staticClass:"voucher-modal-label"},[y("event-busy-icon"),b._v(" "),y("span",[b._v(b._s(b.$t("myProfile.myVoucher.excludeDuring")))])],1),b._v(" "),y("span",[b._v(b._s(null===(h=b.voucherDetail)||void 0===h?void 0:h.excluding_start_date)+" -\n              "+b._s(null===(v=b.voucherDetail)||void 0===v?void 0:v.excluding_end_date))])]):b._e()])],1),b._v(" "),"available"===(null===(m=b.voucherDetail)||void 0===m?void 0:m.ui_status)||"pending"===(null===(_=b.voucherDetail)||void 0===_?void 0:_.ui_status)?y("div",{staticClass:"voucher-modal-action mt-2"},["available"===(null===(f=b.voucherDetail)||void 0===f?void 0:f.ui_status)?y("b-button",{attrs:{variant:b.copyButtonVariant},on:{click:b.copyVoucher}},[b.copiedVoucherCode?y("copy-success-icon",{staticClass:"fill-success"}):y("copy-icon",{staticClass:"fill-theme"}),b._v(" "),y("span",{staticClass:"ml-2",attrs:{id:"voucher-code"}},[b._v(b._s(null===(p=b.voucherDetail)||void 0===p?void 0:p.code))])],1):b._e(),b._v(" "),y("b-button",{directives:[{name:"theme-btn",rawName:"v-theme-btn"}],staticClass:"gray-disabled",attrs:{disabled:b.statusButton(b.voucherDetail).disabled},on:{click:function click(e){b.$emit("click-action",b.statusButton(b.voucherDetail).handler,b.voucherDetail)}}},[b._v(b._s(b.statusButton(b.voucherDetail).text))])],1):b._e()])])}),[],!1,null,"3f059d8d",null).exports),P=i(210),D={name:"VoucherConsumeModal",props:{voucher:{type:Object,default:null}},methods:{consumeVoucher:function consumeVoucher(){var e=this;P.a.consumeVoucher(this.voucher.id).then((function(){e.$bvModal.hide("consume-voucher-modal"),e.$emit("update-vouchers")})).catch((function(t){e.$bvModal.hide("consume-voucher-modal"),console.warn(t),e.$logger.error(t),e.$store.dispatch("error/setInitError",t.error)}))}}},V=(i(1623),Object(r.a)(D,(function render(){var e=this,t=e._self._c;return t("b-modal",{attrs:{id:"consume-voucher-modal",size:"lg",centered:""},scopedSlots:e._u([{key:"modal-title",fn:function fn(){return[e._v(e._s(e.$t("myProfile.myVoucher.askConsume")))]},proxy:!0},{key:"modal-footer",fn:function fn(){return[t("div",{staticClass:"d-flex modal
1-actions"},[t("b-button",{staticClass:"cancel-btn mr-1 minw-3",attrs:{variant:"outline-primary-pink"},on:{click:function click(t){return e.$bvModal.hide("consume-voucher-modal")}}},[e._v("\n          "+e._s(e.$t("myProfile.myVoucher.cancel"))+"\n        ")]),e._v(" "),t("b-button",{directives:[{name:"theme-btn",rawName:"v-theme-btn"}],staticClass:"minw-3",on:{click:e.consumeVoucher}},[e._v("\n          "+e._s(e.$t("myProfile.myVoucher.consume"))+"\n        ")])],1)]},proxy:!0}])},[e._v(" "),t("div",[e._v(e._s(e.$t("myProfile.myVoucher.askConsumeMessage")))])])}),[],!1,null,"164ee96e",null).exports),k=i(209);function MakeReservationModalvue_type_script_lang_js_ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function MakeReservationModalvue_type_script_lang_js_objectSpread(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?MakeReservationModalvue_type_script_lang_js_ownKeys(i,!0).forEach((function(t){MakeReservationModalvue_type_script_lang_js_defineProperty(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):MakeReservationModalvue_type_script_lang_js_ownKeys(i).forEac
1h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function MakeReservationModalvue_type_script_lang_js_defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var O={name:"VoucherMakeReservationModal",props:{voucher:{type:Object,default:null},facilities:{type:Array,default:function _default(){return[]}}},data:function data(){return{selectedFacility:null}},computed:MakeReservationModalvue_type_script_lang_js_objectSpread({},Object(o.d)({currentUser:"membership/getCurrentUser"}),{dropdownLabel:function dropdownLabel(){return this.selectedFacility?this.selectedFacility.name:"-"}}),mounted:function mounted(){var e=this;this.$root.$on("bv::modal::hide",(function(){e.selectedFacility=null})),this.$root.$on("bv::modal::show",(function(){if(e.facilities){var t=e.facilities.findIndex((function(t){return t.id===e.currentUser.sign_up_facility_id}));e.selectedFacility=e.facilities[t]}}))},methods:{toSearchResult:function toSearchResult(){var e=this.$router.resolve({name:f.a.booking.result,query:MakeReservationModalvue_type_script_lang_js_objectSpread({code:this.selectedFacility.triplabot_code,coupon_code:this.voucher.code,voucher_coupon_code:this.voucher.code},Object(k.a)()?{maintenance_mode:!1}:{})});window.location.href=e.href}}},x=(i(1624),Object(r.a)(O,(function render(){var e=this,t=e._self._c;return t("b-modal",{attrs:{id:"voucher-make-reservation-modal",title:e.$t("myProfile.myVoucher.selectHotel"),"hide-footer":"",size:"lg",scrollable:!1,centered:""}},[t("b-row",[t("b-col",{staticClass:"pr-0",attrs:{cols:"12",md:"7"}},[t("b-dropdown",{staticClass:"facilities-dropdown",attrs:{variant:"outline-secondary-light","no-caret":""},scopedSlots:e._u([{key:"button-content",fn:function fn(){return[t("span",[e._v(e._s(e.dropdownLabel))]),e._v(" "),t("span",{staticClass:"mb-2 caret-custom"},[e._v(" ⌄ ")])]},proxy:!0}])},[e._v(" "),e._l(e.facilities,(function(i){return t("b-dropdown-item",{key:i.id,staticClass:"facilities-dropdown-item",on:{click:function click(t){e.selectedFacility=i}}},[e._v("\n            "+e._s(i.name)+"\n          ")])}))],2)],1),e._v(" "),t("b-col",{staticClass:"mt-2 mt-md-0 pr-0",attrs:{cols:"12",md:"5"}},[t("b-button",{directives:[{name:"theme-btn",rawName:"v-theme-btn"}],staticClass:"w-100",attrs:{disabled:!e.selectedFacility},on:{click:e.toSearchResult}},[e._v(e._s(e.$t("ota.checkAvailability")))])],1)],1)],1)}),[],!1,null,null,null).exports),j={name:"DotLabelStatus",props:{status:{required:!0,type:String},text:{required:!0,type:String}}},S=(i(1625),Object(r.a)(j,(function render(){var e=this._self._c;return e("div",{staticClass:"dot-label-flag"},[e("span",{class:["dot-label-flag-circle","dot-label-flag--".concat(this.status.toLowerCase())]}),this._v("\n    "+this._s(this.text)+"\n  ")])}),[],!1,null,"42aa750c",null).exports),M=i(205),I="consume",A="make_reservation";function VoucherListvue_type_script_lang_js_ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function VoucherListvue_type_script_lang_js_defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var $={name:"VoucherList",components:{VoucherModal:C,DotLabelStatus:S,VoucherConsumeConfirmation:V,MakeReservationModal:x},data:function data(){return{priceWithSymbol:h.c,voucherTypes:{PRICE:"price",NO_PRICE:"no_price",FIXED_AMOUNT:"fixed_amount"},voucherStatus:{AVAILABLE:"available",PENDING:"pending",EXPIRED:"expired",CONSUMED:"consumed"},loading:!1,voucherDetail:null,tableItems:[],totalPages:1,filters:{page:1,limit:20,order:"asc",sort_by:null},facilities:[],SUPPORT_MCP_CURRENCIES:y.c}},computed:function VoucherListvue_type_script_lang_js_objectSpread(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?VoucherListvue_type_script_lang_js_ownKeys(i,!0).forEach((function(t){VoucherListvue_type_script_lang_js_defineProperty(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):VoucherListvue_type_script_lang_js_ownKeys(i).forEac
1h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({isMobile:function isMobile(){return Object(d.h)()},fields:function fields(){var e=this;return[{key:"name",label:this.$t("myProfile.myVoucher.name"),thClass:"head-clickable",thStyle:{width:"60%"}},{key:"amount",label:this.$t("myProfile.myVoucher.amount"),thClass:"head-clickable",formatter:function formatter(t){return Object(h.c)(t,e.hotelCurrency.code)},thStyle:{width:"10%"}},{key:"ui_status",label:this.$t("myProfile.myVoucher.status.status"),thClass:"head-clickable"}]}},Object(o.d)({hotelId:"setting/getHotelId",hotelName:"setting/getHotelName",hotelCode:"setting/getHotelCode",currency:"mcp/selectedCurrency",hotelCurrency:"setting/getCurrency",isUserSignedIn:"membership/isUserSignedIn"})),created:function created(){this.isUserSignedIn&&this.fetchMyVouchers(),this.fetchFacilities()},methods:{headClicked:function headClicked(e,t){var i=t.thClass,o=t.sortKey;if(i.includes("head-clickable")){var r=o||e;this.filters.sort_by===r?this.filters.order="asc"===this.filters.order?"desc":"asc":("status"===r&&(this.filters.sort_by="ui_status"),this.filters.sort_by=r),this.isUserSignedIn&&this.fetchMyVouchers()}},removeVoucherModal:function removeVoucherModal(){this.voucherDetail=null},onRowSelected:function onRowSelected(e){this.$nextTick((function(){this.voucherDetail=e,this.$bvModal.show("my-voucher-modal")}))},consumeVoucher:function consumeVoucher(e){this.$nextTick((function(){this.voucherDetail=e,this.$bvModal.show("consume-voucher-modal")}))},handleVoucherButton:function handleVoucherButton(e,t){switch(this.$bvModal.hide("my-voucher-modal"),e){case I:this.consumeVoucher(t);break;case A:this.voucherDetail=t,this.$bvModal.show("voucher-make-reservation-modal")}},statusButton:function statusButton(e){var t={disabled:!0,text:""};switch("".concat(e.voucher_type,"_").concat(e.ui_status)){case"".concat(this.voucherTypes.PRICE,"_").concat(this.voucherStatus.AVAILABLE):t={disabled:!1,text:this.$t("myProfile.myVoucher.makeReservation"),handler:A};break;case"".concat(this.voucherTypes.PRICE,"_").concat(this.voucherStatus.PENDING):t={disabled:!0,text:this.$t("myProfile.myVoucher.makeReservation")};break;case"".concat(this.voucherTypes.NO_PRICE,"_").concat(this.voucherStatus.AVAILABLE):t={disabled:!1,text:this.$t("myProfile.myVoucher.consumeVoucher"),handler:I};break;case"".concat(this.voucherTypes.NO_PRICE,"_").concat(this.voucherStatus.PENDING):t={disabled:!0,text:this.$t("myProfile.myVoucher.consumeVoucher"),handler:I};break;default:t={}}return t},fetchFacilities:function fetchFacilities(){var e=this;M.a.getFacilities({include_brand_facility:!0}).then((function(t){e.facilities=t.data.filter((function(e){return e.triplabot_code}))}))},fetchMyVouchers:function fetchMyVouchers(){var e=this;this.loading=!0,P.a.getMyVouchers({per_page:this.filters.limit,page:this.filters.page,order:this.filters.order,sort_by:this.filters.sort_by}).then((function(t){e.tableItems=t.data,e.totalPages=t.total_pages,e.loading=!1})).catch((function(t){e.loading=!1,console.warn(t),e.$logger.error(t),e.$store.dispatch("error/setInitError",t.error)}))}}},E=(i(1626),{name:"MyPromotions",components:{VoucherList:Object(r.a)($,(function render(){var e=this,t=e._self._c;return t("div",[e.loading?t("div",{staticClass:"d-flex justify-content-center"},[t("b-spinner")],1):t("b-row",[t("b-col",{attrs:{cols:"12"}},[e.isMobile?t("b-row",[t("b-col",{attrs:{cols:"12"}},e._l(e.tableItems,(function(i,o){return t("div",{key:o,staticClass:"d-flex flex-column bg-white p-3 mb-3"},[t("div",{staticClass:"mb-2",on:{click:function click(t){return e.onRowSelected(i)}}},[t("div",{staticClass:"d-flex justify-content-between align-items-end"},[t("dot-label-status",{attrs:{text:e.$t("myProfile.myVoucher.status.".concat(i.ui_status)),status:i.ui_status}}),e._v(" "),i.amount?t("div",{staticClass:"d-flex flex-column"},[t("span",{staticClass:"font-weight-bold"},[e._v(e._s(e.$t("myProfile.myVoucher.amount")))]),e._v(" "),t("span",[e._v(e._s(e.priceWithSymbol(i.amount,e.hotelCurrency.code)))])]):e._e()],1),e._v(" "),t("hr"),e._v(" "),t("span",{staticClass:"voucher-name"},[e._v(e._s(i.name))])]),e._v(" "),i.ui_status===e.voucherStatus.AVAILABLE||i.ui_status===e.voucherStatus.PENDING?t("b-button",{directives:[{name:"theme-btn",rawName:"v-theme-btn"}],staticClass:"gray-disabled",attrs:{disabled:e.statusButton(i).disabled},on:{click:function click(t){e.handleVoucherButton(e.statusButton(i).handler,i)}}},[e._v("\n                "+e._s(e.statusButton(i).text)+"\n              ")]):e._e(
1)],1)})),0)],1):t("div",{staticClass:"promotions-table-container has-box-shadow"},[t("b-table",{staticClass:"customize-border",attrs:{"data-cy":"vouchers-table",responsive:"md",hover:"",fields:e.fields,items:e.tableItems,"tbody-tr-class":"cursor-pointer","tbody-tr-attr":function tbodyTrAttr(e){return{"data-cy":"voucher-row-".concat(e.code)}}},on:{"row-clicked":e.onRowSelected,"head-clicked":e.headClicked},scopedSlots:e._u([{key:"cell(ui_status)",fn:function fn(i){return[t("div",{staticClass:"d-flex justify-content-between align-items-center"},[t("dot-label-status",{attrs:{"data-cy":"status-voucher-".concat(i.item.ui_status,"-").concat(i.item.voucher_type,"-").concat(i.item.id),text:e.$t("myProfile.myVoucher.status.".concat(i.item.ui_status)),status:i.item.ui_status}}),e._v(" "),i.item.ui_status===e.voucherStatus.AVAILABLE||i.item.ui_status===e.voucherStatus.PENDING?t("b-button",{directives:[{name:"theme-btn",rawName:"v-theme-btn"}],staticClass:"gray-disabled",attrs:{"data-cy":"btn-voucher-".concat(i.item.ui_status,"-").concat(i.item.voucher_type,"-").concat(i.item.id),disabled:e.statusButton(i.item).disabled},on:{click:function click(t){e.handleVoucherButton(e.statusButton(i.item).handler,i.item)}}},[e._v("\n                  "+e._s(e.statusButton(i.item).text)+"\n                ")]):e._e()],1)]}}],null,!1,3479734380)})],1),e._v(" "),e.totalPages>1?t("t-pagination",{staticClass:"mt-3",attrs:{align:"center","per-page":e.filters.limit,"total-rows":e.filters.limit*e.totalPages},on:{input:e.fetchMyVouchers},model:{value:e.filters.page,callback:function callback(t){e.$set(e.filters,"page",t)},expression:"filters.page"}}):e._e()],1)],1),e._v(" "),t("voucher-modal",{attrs:{"voucher-detail":e.voucherDetail},on:{"remove-voucher-modal":e.removeVoucherModal,"click-action":e.handleVoucherButton}}),e._v(" "),t("voucher-consume-confirmation",{attrs:{voucher:e.voucherDetail},on:{"update-vouchers":e.fetchMyVouchers}}),e._v(" "),t("make-reservation-modal",{attrs:{facilities:e.facilities,voucher:e.voucherDetail}})],1)}),[],!1,null,null,null).exports}}),R=Object(r.a)(E,(function render(){var e=this._self._c;return e("b-container",{staticClass:"pb-4"},[e("voucher-list")],1)}),[],!1,null,null,null);t.default=R.exports},975:function(e,t,i){"use strict";i.d(t,"a",(function(){return priceWithPrefix})),i.d(t,"b",(function(){return priceWithComma})),i.d(t,"c",(function(){return a}));var o=i(8),r=i(83);function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var i=[],o=!0,r=!1,n=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(c){r=!0,n=c}finally{try{o||null==s.return||s.return()}finally{if(r)throw n}}return i}(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var n=function purePriceWithPrefix(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Â¥";if(0!==e&&!Number(e))return e;var i=e<0?"-":"";return"".concat(i).concat(t).concat(Math.abs(e).toFixed(0).replace(/\d(?=(\d{3})+$)/g,"$&,"))};function priceWithPrefix(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.a.getters["setting/getCurrency"].symbol;return n(e,t)}function priceWithComma(e){if(0===e||Number(e))return Number(e).toFixed(0).replace(/\d(?=(\d{3})+$)/g,"$&,")}var a=function priceWithSymbol(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.a.getters["mcp/selectedCurrency"];if(!r.c[t])return String(e);var i=r.c[t],n=i.symbol,a=i.decimalDigits,s=e/Math.pow(10,a),c=String(s).split("."),l=_slicedToArray(c,2),u=l[0],d=l[1],h=void 0===d?"":d,v=Number(u).toLocaleString(),m=a?".".concat(h.padEnd(a,0)):"";return"".concat(n," ").concat(v).concat(m)}}}]);
2//# sourceMappingURL=page-MyAccount-MyPromotions-vue.927b8648585a7417822c.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.