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

@ -30,6 +30,14 @@ export function deleteItem (store, data) {
return pb.collection(data.collection).delete(data.data.id)
}
export function getNextShortId (store) {
return pb.collection('stock').getFirstListItem('short_id>0', {
sort: '-short_id'
}).then(item => {
return item.short_id + 1
})
}
// export function uploadFile (store, file) {
// return Firebase.storage().ref().child(Date.now() + file.name).put(file)
// }