Filling edit form
This commit is contained in:
@ -891,12 +891,16 @@
|
||||
},
|
||||
units: project_id => {
|
||||
if (project_id in reservations.data.units) {
|
||||
reservations.locks.units = null
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(reservations.data.units[project_id])
|
||||
})
|
||||
}
|
||||
if (reservations.locks.units !== null) {
|
||||
return reservations.locks.units
|
||||
}
|
||||
const uri = `/api/proyecto/${project_id}/unidades/disponibles`
|
||||
return APIClient.fetch(uri).then(response => response.json()).then(json => {
|
||||
reservations.locks.units = APIClient.fetch(uri).then(response => response.json()).then(json => {
|
||||
if (json.unidades.length === 0) {
|
||||
reservations.data.units[project_id] = {}
|
||||
return reservations.data.units[project_id]
|
||||
@ -914,6 +918,7 @@
|
||||
|
||||
return reservations.data.units[project_id]
|
||||
})
|
||||
return reservations.locks.units
|
||||
},
|
||||
},
|
||||
loading: {
|
||||
|
||||
Reference in New Issue
Block a user