%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.map |
{"version":3,"file":"pages/account/availability.js","sources":["webpack:///./components/slots/Block.vue?a39f","webpack:///./components/slots/Block.vue","webpack:///./components/slots/Block.vue?8d1a","webpack:///./components/slots/Block.vue?1f5b","webpack:///./components/blocks/Account/AccountProgressBar.vue?b794","webpack:///./components/blocks/Account/AccountProgressBar.vue","webpack:///./components/blocks/Account/AccountProgressBar.vue?f744","webpack:///./components/blocks/Account/AccountProgressBar.vue?5447","webpack:///./components/blocks/Account/AccountNav.vue?2db9","webpack:///./components/blocks/Account/AccountNav.vue","webpack:///./components/blocks/Account/AccountNav.vue?0d75","webpack:///./components/blocks/Account/AccountNav.vue?0790","webpack:///./pages/account/availability.vue?231c","webpack:///./pages/account/availability.vue?45d8","webpack:///./pages/account/availability.vue?9f0e","webpack:///./pages/account/availability.vue?a22c","webpack:///./pages/account/availability.vue","webpack:///./pages/account/availability.vue?4970","webpack:///./pages/account/availability.vue?2352"],"sourcesContent":["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)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n props: {\n title: {\n type: String,\n required: true\n },\n description: {\n type: String,\n required: false\n },\n width: {\n type: String,\n required: false,\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Block.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Block.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Block.vue?vue&type=template&id=0e972406&\"\nimport script from \"./Block.vue?vue&type=script&lang=js&\"\nexport * from \"./Block.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n \"127f880a\"\n \n)\n\nexport default component.exports\n\n/* nuxt-component-imports */\ninstallComponents(component, {Header: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/layout/Header.vue').default})\n","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>\")])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n props: {\n slug: {\n type: String,\n required: false,\n default: null\n },\n },\n\n computed: {\n progress() {\n return this.$store.state.account.progress.total\n },\n },\n\n async mounted() {\n await this.$store.dispatch('account/progress/get', {\n slug: this.slug\n })\n }\n}\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountProgressBar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountProgressBar.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AccountProgressBar.vue?vue&type=template&id=7467445a&\"\nimport script from \"./AccountProgressBar.vue?vue&type=script&lang=js&\"\nexport * from \"./AccountProgressBar.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n \"6bf5e32c\"\n \n)\n\nexport default component.exports","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)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n data() {\n return {\n menuOpen: false,\n \n links: [\n {\n role: 'therapist',\n name: 'Profile',\n url: '/account'\n },\n {\n role: 'therapist',\n name: 'Availability',\n url: '/account/availability'\n },\n {\n role: 'therapist',\n name: 'Verification',\n url: '/account/verification'\n },\n {\n role: 'all',\n name: 'Financial',\n url: '/account/financial'\n },\n {\n role: 'all',\n name: 'Settings',\n url: '/account/settings'\n },\n ]\n }\n },\n\n computed: {\n role() {\n if(this.$auth.loggedIn == true) { \n return this.$auth.user.data.role.name;\n }\n\n return 'all';\n }\n },\n\n methods: {\n async logout() {\n await this.$auth.logout()\n }\n }\n}\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountNav.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountNav.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AccountNav.vue?vue&type=template&id=37a7f59d&\"\nimport script from \"./AccountNav.vue?vue&type=script&lang=js&\"\nexport * from \"./AccountNav.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n \"6f6d45ae\"\n \n)\n\nexport default component.exports","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../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&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add CSS to SSR context\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesServer.js\").default\nmodule.exports.__inject__ = function (context) {\n add(\"3745c2dd\", content, true, context)\n};","export * from \"-!../../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&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/@nuxt/postcss8/node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"[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}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","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\":require(\"assets/images/logo-white-small.svg\"),\"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){\nvar day = ref.day;\nvar attributes = ref.attributes;\nreturn [(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){\nvar errors = ref.errors;\nreturn [_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){\nvar errors = ref.errors;\nreturn [_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){\nvar errors = ref.errors;\nreturn [_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){\nvar errors = ref.errors;\nreturn [_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)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n middleware: ['auth', 'therapist'],\n\n head () {\n return {\n titleTemplate: 'Availability | %s',\n }\n },\n\n data() {\n return {\n timer: null,\n working: false,\n masks: {\n weekdays: 'WWW',\n },\n attributes: [],\n addresses: [],\n session_types: [],\n slot_increments: [],\n form: {\n open: false,\n date: null,\n available_from: '09:00',\n available_to: '10:00',\n address_id: null,\n session_types: []\n }\n };\n },\n\n async asyncData ({ app }) {\n const data = await app.$axios.$get('/account/availability')\n\n return {\n attributes: data.availability,\n session_types: data.session_types,\n addresses: data.addresses\n }\n },\n\n methods: {\n async addAvailability() {\n this.$refs.availabilityForm.validate().then(success => {\n if (!success) {\n return;\n }\n\n this.saveAvailability();\n })\n },\n\n openAvailabilityPopup(day) {\n this.form.open = true;\n this.form.date = day.id;\n },\n\n async removeAvailability(id) {\n await this.$axios.$post('/account/availability/delete/'+id).then((response) => {\n this.$axios.$get('/account/availability').then((response) => {\n this.attributes = response.availability;\n });\n }).catch((error) => {\n this.$toast.error(error).goAway(1000);\n })\n },\n\n async saveAvailability() {\n this.working = true;\n await this.$axios.$post('/account/availability/create', this.form).then((response) => {\n this.working = false;\n this.form.open = false\n this.$axios.$get('/account/availability').then((response) => {\n this.attributes = response.availability\n });\n }).catch((error) => {\n this.working = false;\n this.$toast.error(error.response.data).goAway(1000);\n this.$refs.availabilityForm.setErrors(error.response.data.errors);\n })\n },\n },\n\n watch: {\n 'form.available_from': function (val) {\n let from = val.replace(\":00\", \"\");\n let to = parseInt(from) + 1;\n let formattedFrom = from+':00';\n let formattedTo = to < 10 ? '0'+to+':00' : to+':00';\n \n if(val.includes(\":00\") && parseInt(from) > 0) {\n this.form.available_from = formattedFrom;\n this.form.available_to = formattedTo;\n }\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./availability.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./availability.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./availability.vue?vue&type=template&id=7a9186e0&scoped=true&\"\nimport script from \"./availability.vue?vue&type=script&lang=js&\"\nexport * from \"./availability.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n var style0 = require(\"./availability.vue?vue&type=style&index=0&id=7a9186e0&lang=postcss&scoped=true&\")\nif (style0.__inject__) style0.__inject__(context)\n\n}\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n injectStyles,\n \"7a9186e0\",\n \"131f4949\"\n \n)\n\nexport default component.exports\n\n/* nuxt-component-imports */\ninstallComponents(component, {AccountProgressBar: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/blocks/Account/AccountProgressBar.vue').default,AccountNav: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/blocks/Account/AccountNav.vue').default,PageHeader: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/layout/PageHeader.vue').default,Block: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/slots/Block.vue').default})\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AATA;AADA;;AClBA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAHA;AADA;AAQA;AACA;AACA;AACA;AACA;AAJA;AACA;AAKA;AACA;AACA;AADA;AAGA;AACA;AApBA;;ACXA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;AACA;AACA;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAHA;AAMA;AACA;AACA;AAHA;AAMA;AACA;AACA;AAHA;AAMA;AACA;AACA;AAHA;AAMA;AACA;AACA;AAHA;AAxBA;AA+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAUA;AACA;AACA;AACA;AACA;AAJA;AA7CA;;AClDA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AAAA;AAAA;AAAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAVA;AAmBA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxCA;AA0CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA;AAnFA;;ACtIA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;A","sourceRoot":""}