mirror of
https://github.com/mokuappio/serverless-invoices.git
synced 2025-10-27 16:01:07 -04:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
5
package-lock.json
generated
5
package-lock.json
generated
@ -12622,6 +12622,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/vue-notification/-/vue-notification-1.3.20.tgz",
|
"resolved": "https://registry.npmjs.org/vue-notification/-/vue-notification-1.3.20.tgz",
|
||||||
"integrity": "sha512-vPj67Ah72p8xvtyVE8emfadqVWguOScAjt6OJDEUdcW5hW189NsqvfkOrctxHUUO9UYl9cTbIkzAEcPnHu+zBQ=="
|
"integrity": "sha512-vPj67Ah72p8xvtyVE8emfadqVWguOScAjt6OJDEUdcW5hW189NsqvfkOrctxHUUO9UYl9cTbIkzAEcPnHu+zBQ=="
|
||||||
},
|
},
|
||||||
|
"vue-progressbar": {
|
||||||
|
"version": "0.7.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-progressbar/-/vue-progressbar-0.7.5.tgz",
|
||||||
|
"integrity": "sha512-VeNG/inMsFbvdCTS7lJ1gjDAKSUZdqkhW9gS1tb0we1rqFKxR+BCEiVUgw5C84vODKb14M2GWHTw0WVdpoVg6g=="
|
||||||
|
},
|
||||||
"vue-router": {
|
"vue-router": {
|
||||||
"version": "3.4.5",
|
"version": "3.4.5",
|
||||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.5.tgz",
|
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.5.tgz",
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
"vue-autosuggest": "^2.2.0",
|
"vue-autosuggest": "^2.2.0",
|
||||||
"vue-multiselect": "^2.1.6",
|
"vue-multiselect": "^2.1.6",
|
||||||
"vue-notification": "^1.3.16",
|
"vue-notification": "^1.3.16",
|
||||||
|
"vue-progressbar": "^0.7.5",
|
||||||
"vue-router": "^3.0.3",
|
"vue-router": "^3.0.3",
|
||||||
"vue2-datepicker": "^3.7.0",
|
"vue2-datepicker": "^3.7.0",
|
||||||
"vuex": "^3.0.1"
|
"vuex": "^3.0.1"
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
<div id="app"
|
<div id="app"
|
||||||
class="min-vh-100"
|
class="min-vh-100"
|
||||||
:class="$route.name">
|
:class="$route.name">
|
||||||
|
<vue-progress-bar/>
|
||||||
<transition name="fade" mode="out-in">
|
<transition name="fade" mode="out-in">
|
||||||
<router-view/>
|
<router-view/>
|
||||||
</transition>
|
</transition>
|
||||||
|
|||||||
@ -49,7 +49,7 @@ export default {
|
|||||||
bank_name: account.bank_name,
|
bank_name: account.bank_name,
|
||||||
bank_account_id: account.id,
|
bank_account_id: account.id,
|
||||||
});
|
});
|
||||||
this.$bvModal.hide('account_no');
|
this.$bvModal.hide('bank_account_no');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
5
src/config/progressbar.config.js
Normal file
5
src/config/progressbar.config.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
color: 'var(--primary)',
|
||||||
|
failedColor: 'var(--error)',
|
||||||
|
thickness: '2px',
|
||||||
|
};
|
||||||
@ -1,6 +1,8 @@
|
|||||||
import 'es6-promise';
|
import 'es6-promise';
|
||||||
|
import VueProgressBar from 'vue-progressbar';
|
||||||
|
import progressbarConfig from '@/config/progressbar.config';
|
||||||
import '@/config/local-storage.config';
|
import '@/config/local-storage.config';
|
||||||
import { BVModalPlugin } from 'bootstrap-vue';
|
import { ModalPlugin } from 'bootstrap-vue';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import App from '@/App.vue';
|
import App from '@/App.vue';
|
||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
@ -9,8 +11,9 @@ import VueNotifications from 'vue-notification';
|
|||||||
import './registerServiceWorker';
|
import './registerServiceWorker';
|
||||||
import i18n from './config/i18n.config';
|
import i18n from './config/i18n.config';
|
||||||
|
|
||||||
Vue.use(BVModalPlugin);
|
Vue.use(ModalPlugin);
|
||||||
Vue.use(VueNotifications);
|
Vue.use(VueNotifications);
|
||||||
|
Vue.use(VueProgressBar, progressbarConfig);
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import app from '@/main';
|
||||||
|
import NotificationService from '@/services/notification.service';
|
||||||
import { removeVuexORMFlags } from '@/utils/helpers';
|
import { removeVuexORMFlags } from '@/utils/helpers';
|
||||||
|
|
||||||
const config = window.name ? JSON.parse(window.name) : { api_url: '', nonce: '' };
|
const config = window.name ? JSON.parse(window.name) : { api_url: '', nonce: '' };
|
||||||
@ -10,6 +12,34 @@ const http = axios.create({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
http.interceptors.request.use((request) => {
|
||||||
|
if (typeof request.hideLoading === 'undefined' || !request.hideLoading) {
|
||||||
|
app.$Progress.start();
|
||||||
|
}
|
||||||
|
return request;
|
||||||
|
}, (error) => {
|
||||||
|
app.$Progress.finish();
|
||||||
|
|
||||||
|
NotificationService.error('Network error. Check your connection');
|
||||||
|
return Promise.reject(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
http.interceptors.response.use((response) => {
|
||||||
|
app.$Progress.finish();
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}, (error) => {
|
||||||
|
app.$Progress.finish();
|
||||||
|
|
||||||
|
// Server down
|
||||||
|
if (error.response.status >= 500) {
|
||||||
|
NotificationService.error('Server Unavailable.');
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Promise.reject(error);
|
||||||
|
});
|
||||||
|
|
||||||
class WordpressAdapter {
|
class WordpressAdapter {
|
||||||
async get(uri) {
|
async get(uri) {
|
||||||
const parts = uri.split('/');
|
const parts = uri.split('/');
|
||||||
|
|||||||
Reference in New Issue
Block a user