%PDF- %PDF-
Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/pages/account/ |
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/pages/account/availability.js |
exports.ids = [41,3,6,10]; exports.modules = { /***/ 131: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/slots/Block.vue?vue&type=template&id=0e972406& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"bg-gray py-8 md:py-20 px-4 md:px-8 mb-8"},[_vm._ssrNode("<div class=\"max-w-xl mx-auto w-full\"><header class=\"text-center mb-10\"><h2"+(_vm._ssrClass("text-2xl sm:text-3xl font-bold",_vm.description ? 'mb-8' : ''))+">"+_vm._ssrEscape(_vm._s(_vm.title))+"</h2> "+((_vm.description)?("<p class=\"text-sm sm:text-base\">"+_vm._ssrEscape(_vm._s(_vm.description))+"</p>"):"<!---->")+"</header></div> "),_vm._ssrNode("<div"+(_vm._ssrClass("mx-auto w-full",_vm.width ? _vm.width : 'max-w-xl'))+">","</div>",[_vm._t("default")],2)],2)} var staticRenderFns = [] // CONCATENATED MODULE: ./components/slots/Block.vue?vue&type=template&id=0e972406& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/slots/Block.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // /* harmony default export */ var Blockvue_type_script_lang_js_ = ({ props: { title: { type: String, required: true }, description: { type: String, required: false }, width: { type: String, required: false } } }); // CONCATENATED MODULE: ./components/slots/Block.vue?vue&type=script&lang=js& /* harmony default export */ var slots_Blockvue_type_script_lang_js_ = (Blockvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/slots/Block.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( slots_Blockvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "127f880a" ) /* harmony default export */ var Block = __webpack_exports__["default"] = (component.exports); /* nuxt-component-imports */ installComponents(component, {Header: __webpack_require__(12).default}) /***/ }), /***/ 145: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/AccountProgressBar.vue?vue&type=template&id=7467445a& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"relative z-20 max-w-md w-full mt-8 text-center"},[_vm._ssrNode("<div class=\"w-full bg-black bg-opacity-25 h-1 rounded-lg overflow-hidden mb-6\"><div class=\"bg-white h-1 transition-width duration-500\""+(_vm._ssrStyle(null,'width:'+_vm.progress+'%', null))+"></div></div> <span class=\"uppercase text-lg\">"+_vm._ssrEscape(_vm._s(_vm.progress)+"% Complete")+"</span>")])} var staticRenderFns = [] // CONCATENATED MODULE: ./components/blocks/Account/AccountProgressBar.vue?vue&type=template&id=7467445a& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/AccountProgressBar.vue?vue&type=script&lang=js& // // // // // // // // // // /* harmony default export */ var AccountProgressBarvue_type_script_lang_js_ = ({ props: { slug: { type: String, required: false, default: null } }, computed: { progress() { return this.$store.state.account.progress.total; } }, async mounted() { await this.$store.dispatch('account/progress/get', { slug: this.slug }); } }); // CONCATENATED MODULE: ./components/blocks/Account/AccountProgressBar.vue?vue&type=script&lang=js& /* harmony default export */ var Account_AccountProgressBarvue_type_script_lang_js_ = (AccountProgressBarvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/blocks/Account/AccountProgressBar.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( Account_AccountProgressBarvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "6bf5e32c" ) /* harmony default export */ var AccountProgressBar = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ 146: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/AccountNav.vue?vue&type=template&id=37a7f59d& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:"relative"},[_vm._ssrNode("<button class=\"flex md:hidden items-center justify-center w-full focus:outline-none\"><div class=\"relative w-8\"><span"+(_vm._ssrClass("block mb-1.5 h-1 w-full bg-black rounded transform transition duration-100",_vm.menuOpen ? 'rotate-45 translate-y-2' : ''))+"></span> <span"+(_vm._ssrClass("block my-1.5 h-1 w-full bg-black rounded transform transition duration-100",_vm.menuOpen ? 'opacity-0' : ''))+"></span> <span"+(_vm._ssrClass("block mt-1.5 h-1 w-full bg-black rounded transform transition duration-100",_vm.menuOpen ? '-rotate-45 -translate-y-3' : ''))+"></span></div> <span class=\"block ml-3 font-bold\">Menu</span></button> "),_vm._ssrNode("<div class=\"hidden md:flex flex-wrap items-center justify-center\">","</div>",[_vm._l((_vm.links),function(link,key){return _vm._ssrNode("<div>","</div>",[(link.role == 'all' || _vm.role == link.role)?_c('NuxtLink',{staticClass:"account-nav-link",attrs:{"to":link.url}},[_vm._v(_vm._s(link.name))]):_vm._e()],1)}),_vm._ssrNode(" <button type=\"button\" class=\"account-nav-link\">Log Out</button>")],2),_vm._ssrNode(" "+((_vm.menuOpen == true)?("<div class=\"fixed z-40 top-0 left-0 w-full h-full\"></div>"):"<!---->")+" "),(_vm.menuOpen == true)?_vm._ssrNode("<div class=\"fixed z-50 bottom-0 left-0 w-full p-3 rounded-t-xl bg-white block overflow-hidden md:hidden\">","</div>",[_vm._l((_vm.links),function(link,key){return _vm._ssrNode("<div>","</div>",[(link.role == 'all' || _vm.role == link.role)?_c('NuxtLink',{staticClass:"block w-full py-2 p-3 rounded-lg font-bold hover:bg-yellow",attrs:{"to":link.url}},[_vm._v(_vm._s(link.name))]):_vm._e()],1)}),_vm._ssrNode(" <button type=\"button\" class=\"block w-full py-2 p-3 rounded-lg font-bold hover:bg-yellow\">Log Out</button>")],2):_vm._e()],2)} var staticRenderFns = [] // CONCATENATED MODULE: ./components/blocks/Account/AccountNav.vue?vue&type=template&id=37a7f59d& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/AccountNav.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var AccountNavvue_type_script_lang_js_ = ({ data() { return { menuOpen: false, links: [{ role: 'therapist', name: 'Profile', url: '/account' }, { role: 'therapist', name: 'Availability', url: '/account/availability' }, { role: 'therapist', name: 'Verification', url: '/account/verification' }, { role: 'all', name: 'Financial', url: '/account/financial' }, { role: 'all', name: 'Settings', url: '/account/settings' }] }; }, computed: { role() { if (this.$auth.loggedIn == true) { return this.$auth.user.data.role.name; } return 'all'; } }, methods: { async logout() { await this.$auth.logout(); } } }); // CONCATENATED MODULE: ./components/blocks/Account/AccountNav.vue?vue&type=script&lang=js& /* harmony default export */ var Account_AccountNavvue_type_script_lang_js_ = (AccountNavvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/blocks/Account/AccountNav.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( Account_AccountNavvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "6f6d45ae" ) /* harmony default export */ var AccountNav = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ 178: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(214); if(content.__esModule) content = content.default; if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; // add CSS to SSR context var add = __webpack_require__(6).default module.exports.__inject__ = function (context) { add("3745c2dd", content, true, context) }; /***/ }), /***/ 213: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_4_oneOf_1_0_node_modules_nuxt_postcss8_node_modules_css_loader_dist_cjs_js_ref_4_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_nuxt_postcss8_node_modules_postcss_loader_dist_cjs_js_ref_4_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_availability_vue_vue_type_style_index_0_id_7a9186e0_lang_postcss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(178); /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_4_oneOf_1_0_node_modules_nuxt_postcss8_node_modules_css_loader_dist_cjs_js_ref_4_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_nuxt_postcss8_node_modules_postcss_loader_dist_cjs_js_ref_4_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_availability_vue_vue_type_style_index_0_id_7a9186e0_lang_postcss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_4_oneOf_1_0_node_modules_nuxt_postcss8_node_modules_css_loader_dist_cjs_js_ref_4_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_nuxt_postcss8_node_modules_postcss_loader_dist_cjs_js_ref_4_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_availability_vue_vue_type_style_index_0_id_7a9186e0_lang_postcss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_ref_4_oneOf_1_0_node_modules_nuxt_postcss8_node_modules_css_loader_dist_cjs_js_ref_4_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_nuxt_postcss8_node_modules_postcss_loader_dist_cjs_js_ref_4_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_availability_vue_vue_type_style_index_0_id_7a9186e0_lang_postcss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_ref_4_oneOf_1_0_node_modules_nuxt_postcss8_node_modules_css_loader_dist_cjs_js_ref_4_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_nuxt_postcss8_node_modules_postcss_loader_dist_cjs_js_ref_4_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_availability_vue_vue_type_style_index_0_id_7a9186e0_lang_postcss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); /***/ }), /***/ 214: /***/ (function(module, exports, __webpack_require__) { // Imports var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(5); var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]}); // Module ___CSS_LOADER_EXPORT___.push([module.i, "[data-v-7a9186e0]::-webkit-scrollbar{width:0}[data-v-7a9186e0]::-webkit-scrollbar-track{display:none}[data-v-7a9186e0] .custom-calendar.vc-container{--day-border:1px solid #ccc;--day-border-highlight:1px solid #ccc;--day-width:90px;--day-height:150px;--weekday-bg:#f8fafc;--weekday-border:1px solid #eaeaea;border-radius:15px;overflow:hidden;width:100%;}[data-v-7a9186e0] .custom-calendar.vc-container .vc-header{background-color:#fff;padding:10px 0}[data-v-7a9186e0] .custom-calendar.vc-container .vc-weeks{padding:0;overflow-x:auto}[data-v-7a9186e0] .custom-calendar.vc-container .vc-weekday{background-color:var(--weekday-bg);border-bottom:var(--weekday-border);border-top:var(--weekday-border);padding:5px 0}[data-v-7a9186e0] .custom-calendar.vc-container .vc-day{padding:0 5px 3px;text-align:left;height:var(--day-height);min-width:var(--day-width);background-color:#fff;}[data-v-7a9186e0] .custom-calendar.vc-container .vc-day.weekday-1,[data-v-7a9186e0] .custom-calendar.vc-container .vc-day.weekday-7{background-color:#eff8ff}[data-v-7a9186e0] .custom-calendar.vc-container .vc-day:not(.on-bottom){border-bottom:var(--day-border);}[data-v-7a9186e0] .custom-calendar.vc-container .vc-day:not(.on-bottom).weekday-1{border-bottom:var(--day-border-highlight)}[data-v-7a9186e0] .custom-calendar.vc-container .vc-day:not(.on-right){border-right:var(--day-border)}[data-v-7a9186e0] .custom-calendar.vc-container .vc-day-dots{margin-bottom:5px}", ""]); // Exports module.exports = ___CSS_LOADER_EXPORT___; /***/ }), /***/ 241: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/account/availability.vue?vue&type=template&id=7a9186e0&scoped=true& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"page-wrapper"},[_c('PageHeader',{attrs:{"classObject":"bg-pink"}},[_c('img',{staticClass:"relative z-20 mb-8",attrs:{"src":__webpack_require__(20),"alt":"Takeaseat"}}),_vm._v(" "),_c('span',{staticClass:"font-bold uppercase text-xl"},[_vm._v("Account")]),_vm._v(" "),_c('h1',{staticClass:"relative z-20 text-5xl lg:text-7xl font-bold m-0"},[_vm._v("Availability")]),_vm._v(" "),_c('AccountProgressBar',{attrs:{"slug":"availability"}}),_vm._v(" "),_c('div',{staticClass:"page-header-bottom"},[_c('AccountNav')],1)],1),_vm._ssrNode(" "),_c('Block',{attrs:{"title":"Availability","description":"Select the times you have available for bookings. You can do this in one-hour slots (recommended) or select a block of time i.e. 9-12. If you get a non-Take a seat booking, you will have to delete the block and add the times you have available. Keep your availability up to date to ensure you receive bookings.","width":"max-w-6xl"}},[_c('v-calendar',{staticClass:"custom-calendar max-w-full",attrs:{"masks":_vm.masks,"attributes":_vm.attributes,"min-date":new Date(),"disable-page-swipe":"","is-expanded":""},scopedSlots:_vm._u([{key:"day-content",fn:function(ref){ var day = ref.day; var attributes = ref.attributes; return [(new Date(day.id) >= new Date())?_c('div',{staticClass:"h-full"},[_c('div',{staticClass:"flex flex-col h-full z-10 overflow-hidden"},[_c('span',{staticClass:"day-label text-sm text-gray-900"},[_vm._v(_vm._s(day.day))]),_vm._v(" "),_c('div',{staticClass:"flex-grow overflow-y-auto overflow-x-auto"},[_vm._l((attributes),function(attr,key){return _c('div',{key:key},[_c('div',{staticClass:"relative text-xs leading-tight rounded-sm p-1 mt-0 mb-1 cursor-pointer",class:attr.customData.class},[_c('button',{staticClass:"absolute top-1 right-1",on:{"click":function($event){return _vm.removeAvailability(attr.customData.id)}}},[_c('svg',{staticClass:"w-4 h-4 text-white hover:text-red transition",attrs:{"xmlns":"http://www.w3.org/2000/svg","fill":"none","viewBox":"0 0 24 24","stroke":"currentColor"}},[_c('path',{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2","d":"M6 18L18 6M6 6l12 12"}})]),_vm._v(" "),_c('span',{staticClass:"sr-only"},[_vm._v("Delete")])]),_vm._v(" "),_c('span',{staticClass:"block"},[_vm._v(_vm._s(attr.customData.title))])])])}),_vm._v(" "),_c('button',{staticClass:"p-1 w-full flex items-center text-xs text-black transition text-opacity-50 hover:text-opacity-100",attrs:{"type":"button"},on:{"click":function($event){return _vm.openAvailabilityPopup(day)}}},[_c('span',[_vm._v("Add Availability")]),_vm._v(" "),_c('svg',{staticClass:"w-4 h-4",attrs:{"xmlns":"http://www.w3.org/2000/svg","fill":"none","viewBox":"0 0 24 24","stroke":"currentColor"}},[_c('path',{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2","d":"M12 6v6m0 0v6m0-6h6m-6 0H6"}})])])],2)])]):_vm._e()]}}])}),_vm._v(" "),_c('t-modal',{attrs:{"header":'Add Availability for '+_vm.$moment(_vm.form.date).format('DD/MM/Y')},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('div',{staticClass:"flex justify-between"},[_c('button',{staticClass:"btn btn-small btn-primary",attrs:{"type":"button"},on:{"click":function($event){_vm.form.open = false}}},[_vm._v("Cancel")]),_vm._v(" "),_c('button',{staticClass:"btn btn-small btn-primary",attrs:{"type":"button"},on:{"click":_vm.addAvailability}},[(_vm.working == false)?_c('span',[_vm._v("Add Availability")]):_c('span',{staticClass:"flex items-center justify-center"},[_c('svg',{staticClass:"animate-spin -ml-1 mr-3 h-5 w-5 text-current",attrs:{"xmlns":"http://www.w3.org/2000/svg","fill":"none","viewBox":"0 0 24 24"}},[_c('circle',{staticClass:"opacity-25",attrs:{"cx":"12","cy":"12","r":"10","stroke":"currentColor","stroke-width":"4"}}),_vm._v(" "),_c('path',{staticClass:"opacity-75",attrs:{"fill":"currentColor","d":"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}})]),_vm._v(" "),_c('span',[_vm._v("Adding")])])])])]},proxy:true}]),model:{value:(_vm.form.open),callback:function ($$v) {_vm.$set(_vm.form, "open", $$v)},expression:"form.open"}},[_c('ValidationObserver',{ref:"availabilityForm"},[_c('t-input-group',{attrs:{"label":"Available From"}},[_c('ValidationProvider',{attrs:{"rules":"required","name":"available_from"},scopedSlots:_vm._u([{key:"default",fn:function(ref){ var errors = ref.errors; return [_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.form.available_from),expression:"form.available_from"}],staticClass:"form-control",attrs:{"type":"time","id":"available_form","name":"available_form","value":"09:00"},domProps:{"value":(_vm.form.available_from)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.form, "available_from", $event.target.value)}}}),_vm._v(" "),(errors[0])?_c('span',{staticClass:"field-invalid"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}])})],1),_vm._v(" "),_c('t-input-group',{attrs:{"label":"Available To"}},[_c('ValidationProvider',{attrs:{"rules":"required|hourAfter:@available_from","name":"available_to"},scopedSlots:_vm._u([{key:"default",fn:function(ref){ var errors = ref.errors; return [_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.form.available_to),expression:"form.available_to"}],staticClass:"form-control",attrs:{"type":"time","id":"available_to","name":"available_to","value":"17:00"},domProps:{"value":(_vm.form.available_to)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.form, "available_to", $event.target.value)}}}),_vm._v(" "),(errors[0])?_c('span',{staticClass:"field-invalid"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}])})],1),_vm._v(" "),_c('t-input-group',{attrs:{"label":"Session Types"}},[_c('ValidationProvider',{attrs:{"rules":"required","name":"session_types"},scopedSlots:_vm._u([{key:"default",fn:function(ref){ var errors = ref.errors; return [_c('t-checkbox-group',{attrs:{"name":"session_types","valueAttribute":"id","textAttribute":"name","options":_vm.session_types},model:{value:(_vm.form.session_types),callback:function ($$v) {_vm.$set(_vm.form, "session_types", $$v)},expression:"form.session_types"}}),_vm._v(" "),(errors[0])?_c('span',{staticClass:"field-invalid"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}])})],1),_vm._v(" "),(_vm.form.session_types.includes(3))?_c('t-input-group',{attrs:{"label":"In Person Address"}},[_c('ValidationProvider',{attrs:{"rules":"required","name":"address"},scopedSlots:_vm._u([{key:"default",fn:function(ref){ var errors = ref.errors; return [_c('t-select',{attrs:{"valueAttribute":"id","textAttribute":"formatted","options":_vm.addresses,"placeholder":"Select address..."},model:{value:(_vm.form.address_id),callback:function ($$v) {_vm.$set(_vm.form, "address_id", $$v)},expression:"form.address_id"}}),_vm._v(" "),(errors[0])?_c('span',{staticClass:"field-invalid"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}],null,false,1373260050)})],1):_vm._e()],1)],1)],1)],2)} var staticRenderFns = [] // CONCATENATED MODULE: ./pages/account/availability.vue?vue&type=template&id=7a9186e0&scoped=true& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/account/availability.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var availabilityvue_type_script_lang_js_ = ({ middleware: ['auth', 'therapist'], head() { return { titleTemplate: 'Availability | %s' }; }, data() { return { timer: null, working: false, masks: { weekdays: 'WWW' }, attributes: [], addresses: [], session_types: [], slot_increments: [], form: { open: false, date: null, available_from: '09:00', available_to: '10:00', address_id: null, session_types: [] } }; }, async asyncData({ app }) { const data = await app.$axios.$get('/account/availability'); return { attributes: data.availability, session_types: data.session_types, addresses: data.addresses }; }, methods: { async addAvailability() { this.$refs.availabilityForm.validate().then(success => { if (!success) { return; } this.saveAvailability(); }); }, openAvailabilityPopup(day) { this.form.open = true; this.form.date = day.id; }, async removeAvailability(id) { await this.$axios.$post('/account/availability/delete/' + id).then(response => { this.$axios.$get('/account/availability').then(response => { this.attributes = response.availability; }); }).catch(error => { this.$toast.error(error).goAway(1000); }); }, async saveAvailability() { this.working = true; await this.$axios.$post('/account/availability/create', this.form).then(response => { this.working = false; this.form.open = false; this.$axios.$get('/account/availability').then(response => { this.attributes = response.availability; }); }).catch(error => { this.working = false; this.$toast.error(error.response.data).goAway(1000); this.$refs.availabilityForm.setErrors(error.response.data.errors); }); } }, watch: { 'form.available_from': function (val) { let from = val.replace(":00", ""); let to = parseInt(from) + 1; let formattedFrom = from + ':00'; let formattedTo = to < 10 ? '0' + to + ':00' : to + ':00'; if (val.includes(":00") && parseInt(from) > 0) { this.form.available_from = formattedFrom; this.form.available_to = formattedTo; } } } }); // CONCATENATED MODULE: ./pages/account/availability.vue?vue&type=script&lang=js& /* harmony default export */ var account_availabilityvue_type_script_lang_js_ = (availabilityvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./pages/account/availability.vue function injectStyles (context) { var style0 = __webpack_require__(213) if (style0.__inject__) style0.__inject__(context) } /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( account_availabilityvue_type_script_lang_js_, render, staticRenderFns, false, injectStyles, "7a9186e0", "131f4949" ) /* harmony default export */ var availability = __webpack_exports__["default"] = (component.exports); /* nuxt-component-imports */ installComponents(component, {AccountProgressBar: __webpack_require__(145).default,AccountNav: __webpack_require__(146).default,PageHeader: __webpack_require__(36).default,Block: __webpack_require__(131).default}) /***/ }) };; //# sourceMappingURL=availability.js.map