++ Added "Projects" (step 1b)

This commit is contained in:
Paolo Arena
2019-03-28 12:58:34 +01:00
parent dbd062636b
commit de117d55e6
30 changed files with 1567 additions and 332 deletions

View File

@@ -1,3 +1,5 @@
import * as ApiTables from '@src/store/Modules/ApiTables'
export let idbKeyval = (() => {
let db;
@@ -13,7 +15,14 @@ export let idbKeyval = (() => {
openreq.onupgradeneeded = () => {
// First time setup: create an empty object store
for (mytab of ApiTables.allTables) {
for (let mytab of ApiTables.MainTables) {
openreq.result.createObjectStore(mytab, { keyPath: '_id' });
for (let mymeth of ApiTables.allMethod) {
const tab = mymeth + mytab
openreq.result.createObjectStore(tab, { keyPath: '_id' });
}
}
for (let mytab of ApiTables.OtherTables) {
openreq.result.createObjectStore(mytab, { keyPath: '_id' });
}
};