diff --git a/package-lock.json b/package-lock.json index 859be6f..d16240e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14826,6 +14826,11 @@ "integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=", "dev": true }, + "vue-toastification": { + "version": "1.7.11", + "resolved": "https://registry.npmjs.org/vue-toastification/-/vue-toastification-1.7.11.tgz", + "integrity": "sha512-CT/DYttb/VtWDNdhJG0BskLVfveZq5rGOgO/u3qTX+RPQQzX0WSai8VVxxUuvR8UpxfSGPS+JQleR33bo3Vadg==" + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npm.taobao.org/w3c-hr-time/download/w3c-hr-time-1.0.2.tgz", diff --git a/package.json b/package.json index c9e402e..09245f1 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "vue-popperjs": "^2.3.0", "vue-property-decorator": "^9.1.2", "vue-router": "^3.2.0", - "vue-tailwindcss-typeahead": "^1.0.1" + "vue-tailwindcss-typeahead": "^1.0.1", + "vue-toastification": "^1.7.11" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.0", diff --git a/src/App.vue b/src/App.vue index 3afd1f5..9405b54 100644 --- a/src/App.vue +++ b/src/App.vue @@ -32,6 +32,7 @@ import Vue from 'vue' import Login from "@/views/Login" import router from './router' import LoadingSpinner from "@/components/LoadingSpinner"; +import axios from 'axios' export default Vue.extend({ components : { @@ -61,7 +62,7 @@ export default Vue.extend({ this.loggedin = state; if(state) { router.push("/calendar") - this.$axios.get('/profile', { + axios.get('/profile', { headers: { 'Authorization': `Bearer ${window.localStorage.getItem('JWT')}` } @@ -85,7 +86,7 @@ export default Vue.extend({ return; } try{ - const response = await this.$axios.get('/profile',{ + const response = await axios.get('/profile',{ headers : { 'Authorization': `Bearer ${window.localStorage.getItem('JWT')}` } diff --git a/src/components/AppointmentModal.vue b/src/components/AppointmentModal.vue index 259e1ba..f92e6c0 100644 --- a/src/components/AppointmentModal.vue +++ b/src/components/AppointmentModal.vue @@ -70,6 +70,7 @@ import DatetimePicker from '@/components/DatetimePicker' import Typeahead from '@/components/Typeahead'; import dayjs from 'dayjs' +import axios from 'axios' export default{ components: { @@ -98,7 +99,7 @@ export default{ this.showModal = true; }, saveClicked: function(){ - this.$axios.post('/appointments', { + axios.post('/appointments', { start: dayjs(this.start, 'YYYY-MM-DDTHH:mm').toISOString(), end: dayjs(this.end, 'YYYY-MM-DDTHH:mm').toISOString(), online: this.online, @@ -132,7 +133,7 @@ export default{ this.patient = entry.patient; }, updatePatientSuggestions: function(searchTerm){ - this.$axios.get('/patients', { + axios.get('/patients', { params: { name: searchTerm }, diff --git a/src/components/LoginForm.vue b/src/components/LoginForm.vue index e455aa1..66ac179 100644 --- a/src/components/LoginForm.vue +++ b/src/components/LoginForm.vue @@ -66,6 +66,7 @@