Major refactoring: navigation does not break anymore. the user can now navigate between the tabs without loosing context
This commit is contained in:
parent
457b098883
commit
1beee68bff
23 changed files with 137 additions and 80 deletions
|
|
@ -57,7 +57,7 @@ export const addCategory = async (name: string, color: string, type: string, all
|
|||
export const updateExpense = async (guid: string, name: string, category_guid: string, datetime: string, amount: number) => {
|
||||
|
||||
//needs user input validation for type and color (should be validated by this function)
|
||||
|
||||
console.log("update expense called")
|
||||
try {
|
||||
await db.transactionAsync(async (tx) => {
|
||||
await tx.executeSqlAsync("UPDATE expense SET name = ?, category_guid = ?, datetime = ?, amount = ? WHERE guid = ?", [name, category_guid, datetime, amount, guid]
|
||||
|
|
@ -67,6 +67,7 @@ export const updateExpense = async (guid: string, name: string, category_guid: s
|
|||
console.log("Error updating expense: ", error);
|
||||
throw error;
|
||||
}
|
||||
console.log("update expense finished")
|
||||
};
|
||||
|
||||
export const addExpense = async (name: string, category_guid: string, datetime: string, amount: number) => {
|
||||
|
|
|
|||
Reference in a new issue