added bulk api endpoint for SLE checking

This commit is contained in:
vabene1111
2024-01-16 08:06:26 +08:00
parent 2b1eda12d1
commit 2697e42af7
4 changed files with 260 additions and 3816 deletions

View File

@ -299,10 +299,19 @@ export const useShoppingListStore = defineStore(_STORE_ID, {
this.registerChange((checked ? 'CHECKED' : 'UNCHECKED'), entries)
}
let entry_id_list = []
for (let i in entries) {
this.entries[i].checked = checked
this.updateObject(this.entries[i])
Vue.set(this.entries[i], 'checked', checked)
Vue.set(this.entries[i], 'update_at', moment().format())
entry_id_list.push(i)
}
let apiClient = new ApiApiFactory()
apiClient.bulkShoppingListEntry({'ids': entry_id_list, 'checked': checked}).then((r) => {
}).catch((err) => {
StandardToasts.makeStandardToast(this, StandardToasts.FAIL_UPDATE, err)
})
},
/**
* function to handle user "delaying" and "undelaying" shopping entries

File diff suppressed because it is too large Load Diff