Add shortId handling for QR

Add renumerate script
Add Tasks
This commit is contained in:
mcarquigny
2025-06-27 15:35:31 +02:00
parent 6459dbd68c
commit a7225eb054
6 changed files with 95 additions and 5 deletions

View File

@ -188,6 +188,8 @@ export default {
},
async addItem (category) {
this.$q.loading.show()
// Get next short id
let shortId = await this.$store.dispatch('core/getNextShortId')
let newItem = {
available: true,
comment: '',
@ -196,7 +198,8 @@ export default {
ref: null,
state: null,
type: category.name,
system: null
system: null,
short_id: shortId
}
newItem.ref = `${category.code}-${String(this.counters[category.name] + 1).padStart(4, '0')}`
await this.$store.dispatch('core/addToCollection', {