%PDF- %PDF-
Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/pages/therapist/ |
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/pages/therapist/messages.js.map |
{"version":3,"file":"pages/therapist/messages.js","sources":["webpack:///./components/partials/Message.vue?6f96","webpack:///./components/partials/Message.vue","webpack:///./components/partials/Message.vue?cbca","webpack:///./components/partials/Message.vue?44ca","webpack:///./pages/therapist/messages.vue?5040","webpack:///./pages/therapist/messages.vue","webpack:///./pages/therapist/messages.vue?b025","webpack:///./pages/therapist/messages.vue?25d5"],"sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"mb-1 relative p-6 bg-gray grid grid-cols-1 sm:grid-cols-3 md:grid-cols-6 gap-6 transition duration-100 hover:bg-opacity-75\"},[_vm._ssrNode(((_vm.isOverlayShowing)?(\"<div class=\\\"absolute z-20 top-0 left-0 w-full h-full bg-white border border-black border-opacity-10 bg-opacity-75 flex flex-col items-center justify-center\\\"><span class=\\\"block mb-3 font-medium\\\">Are you sure you want to delete this message?</span> <div class=\\\"w-full px-8 sm:w-auto grid grid-cols-2 gap-4\\\"><button class=\\\"bg-red border border-red appearance-none px-3 py-3 text-center rounded-full text-white transition ease-in-out duration-200\\\">Yes</button> <button class=\\\"btn btn-primary btn-small rounded-full\\\">No</button></div></div>\"):\"<!---->\")+\" <div class=\\\"sm:col-span-1\\\"><div class=\\\"relative\\\"><div class=\\\"absolute top-0 left-0 w-full h-full border-15 border-yellow border-opacity-50\\\"></div> <img\"+(_vm._ssrAttr(\"src\",'https://eu.ui-avatars.com/api/?name='+_vm.message.name))+\" class=\\\"w-full\\\"></div> <div class=\\\"my-2 sm:my-0 flex justify-center sm:block\\\"><button class=\\\"sm:absolute sm:top-2 sm:right-2 sm:w-6 sm:h-6 sm:bg-red sm:rounded-full text-red sm:text-white flex items-center justify-center\\\"><svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"none\\\" viewBox=\\\"0 0 24 24\\\" stroke=\\\"currentColor\\\" class=\\\"h-4 w-4 hidden sm:block\\\"><path stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16\\\"></path></svg> <span class=\\\"block sm:hidden\\\">Remove</span></button></div></div> <div class=\\\"sm:col-span-2 md:col-span-5 grid grid-cols-1 md:grid-cols-6 py-2\\\"><div class=\\\"md:col-span-4\\\"><small class=\\\"uppercase text-sm text-black text-opacity-80\\\">\"+_vm._ssrEscape(_vm._s(_vm.message.created_at))+\"</small> <h2 class=\\\"text-2xl font-bold\\\">\"+_vm._ssrEscape(_vm._s(_vm.message.name))+\"</h2> <div class=\\\"my-3 flex flex-col\\\"><a\"+(_vm._ssrAttr(\"href\",'mailto:'+_vm.message.email))+\" target=\\\"_blank\\\" class=\\\"inline-flex items-center my-1 hover:text-blue-light transition\\\"><svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"none\\\" viewBox=\\\"0 0 24 24\\\" stroke=\\\"currentColor\\\" class=\\\"h-6 w-6 mr-2\\\"><path stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z\\\"></path></svg>\"+_vm._ssrEscape(\"\\n \"+_vm._s(_vm.message.email)+\"\\n \")+\"</a> <a\"+(_vm._ssrAttr(\"href\",'tel:'+_vm.message.phone))+\" target=\\\"_blank\\\" class=\\\"inline-flex items-center my-1 hover:text-blue-light transition\\\"><svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"none\\\" viewBox=\\\"0 0 24 24\\\" stroke=\\\"currentColor\\\" class=\\\"h-6 w-6 mr-2\\\"><path stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z\\\"></path></svg>\"+_vm._ssrEscape(\"\\n \"+_vm._s(_vm.message.phone)+\"\\n \")+\"</a></div> <button class=\\\"text-blue-light text-sm font-bold \\\">\"+((_vm.working == true)?(\"<span>Revealing Message...</span>\"):(_vm.isMessageShowing == false)?(\"<span>Reveal Message</span>\"):(\"<span>Hide Message</span>\"))+\"</button> \"+((_vm.isMessageShowing)?(\"<div class=\\\"mt-6\\\">\"+(_vm._s(_vm.message.message))+\"</div>\"):\"<!---->\")+\"</div></div>\")])}\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\nexport default {\n props: {\n message: {\n type: Object,\n required: true\n },\n user_id: {\n type: Number,\n required: true\n },\n page_number: {\n type: Number,\n required: true\n }\n },\n\n data() {\n return {\n working: false,\n isOverlayShowing: false,\n isMessageShowing: false\n }\n },\n\n methods: {\n async readMessage() {\n if(this.isMessageShowing == false) {\n this.working = true;\n await this.$axios.patch('/user/'+this.user_id+'/messages/'+this.message.id).then((response) => {\n this.$store.dispatch('therapist/messages/get', {\n user_id: this.user_id,\n page: this.page_number\n });\n this.isMessageShowing = true;\n this.working = false;\n }).catch((error) => {\n this.working = false;\n this.$toast.error('Oops, something went wrong, please try again later.').goAway(3000);\n })\n } else {\n this.isMessageShowing = false;\n }\n },\n\n async remove(message_id) {\n await this.$axios.delete('/user/'+this.user_id+'/messages/'+message_id)\n .then((response) => {\n if(response.status == 200) {\n this.isOverlayShowing = false;\n this.$store.dispatch('therapist/messages/get', {\n user_id: this.user_id,\n page: this.page_number\n });\n this.$toast.success('Successfully deleted message #'.message_id).goAway(3000);\n }\n }).catch((error) => {\n this.isOverlayShowing = false;\n this.working = false;\n this.$toast.error('Oops, something went wrong, please try again later.').goAway(3000);\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!./Message.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!./Message.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Message.vue?vue&type=template&id=cf04f426&\"\nimport script from \"./Message.vue?vue&type=script&lang=js&\"\nexport * from \"./Message.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 \"3d993a9c\"\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('div',{staticClass:\"page-wrapper\"},[_c('PageHeader',[_c('img',{staticClass:\"relative z-20 mb-8\",attrs:{\"src\":require(\"assets/images/logo-white-small.svg\"),\"alt\":\"Takeaseat\"}}),_vm._v(\" \"),_c('h1',{staticClass:\"relative z-20 text-5xl lg:text-7xl font-bold m-0\"},[_vm._v(\"Messages\")])]),_vm._ssrNode(\" \"),(_vm.messages.length > 0)?_vm._ssrNode(\"<section>\",\"</section>\",[_vm._ssrNode(\"<div class=\\\"max-w-5xl mx-auto w-full\\\">\",\"</div>\",[_vm._l((_vm.messages),function(message,key){return _c('Message',{key:key,attrs:{\"message\":message,\"user_id\":_vm.user.data.id,\"page_number\":_vm.current_page}})}),_vm._ssrNode(\" \"),(_vm.meta.total > _vm.meta.per_page)?_c('t-pagination',{attrs:{\"total-items\":_vm.meta.total,\"per-page\":_vm.meta.per_page,\"limit\":_vm.meta.last_page},model:{value:(_vm.current_page),callback:function ($$v) {_vm.current_page=$$v},expression:\"current_page\"}}):_vm._e()],2)]):_vm._ssrNode((\"<section class=\\\"py-20 w-full bg-gray text-center\\\"><span class=\\\"font-bold text-3xl\\\">You have no messages</span></section>\"))],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\nexport default {\n middleware: ['auth', 'therapist'],\n \n head () {\n return {\n titleTemplate: 'Messages | %s',\n }\n },\n\n data() {\n return {\n working: false,\n current_page: 1,\n }\n },\n\n computed: {\n user() {\n return this.$auth.user;\n },\n messages() {\n return this.$store.state.therapist.messages.list\n },\n meta() {\n return this.$store.state.therapist.messages.meta\n },\n },\n\n async mounted() {\n await this.$store.dispatch('therapist/messages/get', {\n user_id: this.user.data.id\n })\n },\n\n methods: {\n async changePage(pageNumber) {\n this.$router.push({\n query: {\n page: pageNumber\n }}\n );\n \n this.$store.dispatch('therapist/messages/get', {\n user_id: this.user.data.id,\n page: pageNumber\n }).then(() => {\n console.log('scroll!');\n this.scrollToTop();\n })\n },\n\n scrollToTop() {\n if (this.$refs.scrollTo) {\n this.$SmoothScroll(this.$refs.scrollTo, 500);\n }\n }\n },\n\n watch: {\n current_page: function (val) {\n this.changePage(val);\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!./messages.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!./messages.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./messages.vue?vue&type=template&id=4410322c&\"\nimport script from \"./messages.vue?vue&type=script&lang=js&\"\nexport * from \"./messages.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 \"568e598d\"\n \n)\n\nexport default component.exports\n\n/* nuxt-component-imports */\ninstallComponents(component, {PageHeader: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/layout/PageHeader.vue').default,Message: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/partials/Message.vue').default})\n"],"mappings":";;;;;;;;;;;AAAA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AATA;AACA;AAcA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArCA;AAxBA;;AC1DA;;;;;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;AAEA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAVA;AACA;AAWA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AADA;AAMA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAtBA;AAwBA;AACA;AACA;AACA;AAHA;AA1DA;;AC/BA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;A","sourceRoot":""}