Edit modal, validation of whole data
This commit is contained in:
@ -91,8 +91,14 @@
|
||||
if (reservations.locks.promotions !== null) {
|
||||
await reservations.locks.promotions
|
||||
}
|
||||
const idxs = []
|
||||
promotions.forEach(promotion => {
|
||||
const idx = this.add()
|
||||
idxs.push(idx)
|
||||
})
|
||||
let i = 0
|
||||
promotions.forEach(promotion => {
|
||||
const idx = idxs[i ++]
|
||||
const dropdown = $(this.components.promotions.querySelector(`div.promotion[data-id="${idx}"]`).querySelector('div.dropdown'))
|
||||
dropdown.dropdown('set selected', promotion.id)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user