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') {
Vue.config.devtools = false;
Vue.config.debug = false;
Vue.config.silent = true;
console.log("production");
var productionUrl = "mesort";
}else{
Vue.config.devtools = true;
Vue.config.debug = true;
Vue.config.silent = false;
console.log("local");
var productionUrl = "";
}
Vue.config.devtools = true;
Vue.config.debug = true;
......@@ -67,6 +71,11 @@ var bus = new Vue();
// Assign globally functions for getCookies and setCookies in JS
Vue.mixin({
data() {
return {
productionUrl: process.env.MIX_ENV_MODE === 'production' ? 'mesort' : ''
}
},
computed: {
url: function () {
return document.URL.split('/').pop();
......
......@@ -94,7 +94,7 @@
var localeData = moment.localeData();
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());
},
......@@ -116,7 +116,7 @@
this.loading = true;
this.message = "";
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 => {
setTimeout(function () {
self.loading = false;
......@@ -127,7 +127,7 @@
}, 500);
}).catch(function (error) {
console.log(error);
self.loading = false;
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