Kaydet (Commit) 534cf727 authored tarafından Eda Altuntaş's avatar Eda Altuntaş

Parkların getirilmesi beklendi

üst 975f65d1
......@@ -63,8 +63,9 @@ export default {
let vm = this;
window.addEventListener(
"modal",
function(e) {
vm.getContainers();
async function(e) {
await vm.getContainers();
console.log(vm.containers);
if (vm.containers.length === 0) {
vm.$message({
message: vm.$t("containers.upload_modal.no_container_message"),
......@@ -80,15 +81,19 @@ export default {
},
methods: {
getContainers: function() {
this.$loading();
this.$http
.get(`/containers`)
.then(({ data }) => {
this.containers = data;
})
.finally(() => {
this.$loading().close();
});
const vm = this;
return new Promise(resolve => {
vm.$loading();
vm.$http
.get(`/containers`)
.then(({ data }) => {
vm.containers = data;
})
.finally(() => {
vm.$loading().close();
resolve();
});
});
},
send: function() {
const container = this.containers[this.form.container];
......
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