add savings mock data to DEV_populateDatabase
This commit is contained in:
parent
99f3fbcaa7
commit
cec3a4d238
1 changed files with 2 additions and 1 deletions
|
|
@ -144,6 +144,7 @@ export const DEV_populateDatabase = async () => {
|
||||||
for(let i=0; i < 5; i++){
|
for(let i=0; i < 5; i++){
|
||||||
let random = Math.floor(Math.random() * colors.length);
|
let random = Math.floor(Math.random() * colors.length);
|
||||||
await addCategory(`Category ${i}`, colors[random], "budget", 50)
|
await addCategory(`Category ${i}`, colors[random], "budget", 50)
|
||||||
|
await addCategory(`Category ${i+6}`, colors[random], "budget", 50)
|
||||||
}
|
}
|
||||||
const result = await executeQuery({sql:"SELECT * from category", args:[]})
|
const result = await executeQuery({sql:"SELECT * from category", args:[]})
|
||||||
let categories: {[column: string]: any}[];
|
let categories: {[column: string]: any}[];
|
||||||
|
|
@ -160,7 +161,7 @@ export const DEV_populateDatabase = async () => {
|
||||||
let randomDay = Math.floor(Math.random() * 20)
|
let randomDay = Math.floor(Math.random() * 20)
|
||||||
date.setDate(randomDay)
|
date.setDate(randomDay)
|
||||||
let string = new SimpleDate(date).toISOString()
|
let string = new SimpleDate(date).toISOString()
|
||||||
await addExpense(`Expense ${i}`, categories[random].guid, string, 15)
|
await addExpense(`Expense ${i}`, categories[random].guid, string, 30)
|
||||||
}
|
}
|
||||||
} catch(e){
|
} catch(e){
|
||||||
console.error(e)
|
console.error(e)
|
||||||
|
|
|
||||||
Reference in a new issue