Load map data inside a composable instead of Pinia store

This commit is contained in:
2025-01-25 02:38:40 +01:00
parent 807bc2066e
commit 7a51323682
14 changed files with 120 additions and 125 deletions

View File

@ -23,6 +23,14 @@ export class BaseStorage<T extends { id: string }> {
}
}
async update(id: string, item: Partial<T>) {
try {
await this.dexie.table(this.tableName).update(id, item)
} catch (error) {
console.error(`Failed to update ${this.tableName} ${id}:`, error)
}
}
async delete(id: string) {
try {
await this.dexie.table(this.tableName).delete(id)