|
|
@ -208,7 +208,7 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
loadPresets() {
|
|
|
|
loadPresets() {
|
|
|
|
this.$http.get('/api/deliveryPresets')
|
|
|
|
this.$http.get('api/deliveryPresets')
|
|
|
|
.then(response => {
|
|
|
|
.then(response => {
|
|
|
|
this.presetSearchItems = response.body.map(x => { return {
|
|
|
|
this.presetSearchItems = response.body.map(x => { return {
|
|
|
|
text: x.name,
|
|
|
|
text: x.name,
|
|
|
@ -218,7 +218,7 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
loadConfig() {
|
|
|
|
loadConfig() {
|
|
|
|
this.$http.get('/config').then(response => {
|
|
|
|
this.$http.get('config').then(response => {
|
|
|
|
const newConfig = response.body
|
|
|
|
const newConfig = response.body
|
|
|
|
newConfig.regions = newConfig.regions.map((x) => {
|
|
|
|
newConfig.regions = newConfig.regions.map((x) => {
|
|
|
|
x._id = btoa(JSON.stringify(x))
|
|
|
|
x._id = btoa(JSON.stringify(x))
|
|
|
@ -234,9 +234,9 @@
|
|
|
|
delete x._id
|
|
|
|
delete x._id
|
|
|
|
return x
|
|
|
|
return x
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.$http.post('/config', storeConfig).then(response => {
|
|
|
|
this.$http.post('config', storeConfig).then(response => {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then(this.$http.post('/restart'))
|
|
|
|
.then(this.$http.post('restart'))
|
|
|
|
.then(() => {
|
|
|
|
.then(() => {
|
|
|
|
document.body.style = 'display:none'
|
|
|
|
document.body.style = 'display:none'
|
|
|
|
setTimeout(() => window.location.reload(), 1e3)
|
|
|
|
setTimeout(() => window.location.reload(), 1e3)
|
|
|
|