Commit 9fd55627 authored by ZeMKI's avatar ZeMKI

Interview delete on production bugfix

parent e4e62a67
...@@ -29,10 +29,14 @@ if (process.env.MIX_ENV_MODE === 'production') { ...@@ -29,10 +29,14 @@ if (process.env.MIX_ENV_MODE === 'production') {
Vue.config.devtools = false; Vue.config.devtools = false;
Vue.config.debug = false; Vue.config.debug = false;
Vue.config.silent = true; Vue.config.silent = true;
console.log("production");
var productionUrl = "mesort";
}else{ }else{
Vue.config.devtools = true; Vue.config.devtools = true;
Vue.config.debug = true; Vue.config.debug = true;
Vue.config.silent = false; Vue.config.silent = false;
console.log("local");
var productionUrl = "";
} }
Vue.config.devtools = true; Vue.config.devtools = true;
Vue.config.debug = true; Vue.config.debug = true;
...@@ -67,6 +71,11 @@ var bus = new Vue(); ...@@ -67,6 +71,11 @@ var bus = new Vue();
// Assign globally functions for getCookies and setCookies in JS // Assign globally functions for getCookies and setCookies in JS
Vue.mixin({ Vue.mixin({
data() {
return {
productionUrl: process.env.MIX_ENV_MODE === 'production' ? 'mesort' : ''
}
},
computed: { computed: {
url: function () { url: function () {
return document.URL.split('/').pop(); return document.URL.split('/').pop();
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
var localeData = moment.localeData(); var localeData = moment.localeData();
var format = localeData.longDateFormat('L') + ' ' + localeData.longDateFormat('LT'); var format = localeData.longDateFormat('L') + ' ' + localeData.longDateFormat('LT');
console.log((navigator.languages && navigator.languages.length) ? navigator.languages[0] : navigator.language); //console.log((navigator.languages && navigator.languages.length) ? navigator.languages[0] : navigator.language);
return moment(String(date)).format(this.getLocaleDateString()); return moment(String(date)).format(this.getLocaleDateString());
}, },
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
this.loading = true; this.loading = true;
this.message = ""; this.message = "";
let self = this; let self = this;
axios.delete(window.location.origin+'/interview/' + id, {data: id}) axios.delete(window.location.origin+this.productionUrl+'/interview/' + id, {data: id})
.then(response => { .then(response => {
setTimeout(function () { setTimeout(function () {
self.loading = false; self.loading = false;
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
}, 500); }, 500);
}).catch(function (error) { }).catch(function (error) {
console.log(error);
self.loading = false; self.loading = false;
self.$buefy.snackbar.open("There it was an error during the request - refresh page and try again"); self.$buefy.snackbar.open("There it was an error during the request - refresh page and try again");
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment