fmaclen / canutin-desktop-react Goto Github PK
View Code? Open in Web Editor NEWA personal finance platform
Home Page: https://canutin.com
License: Apache License 2.0
A personal finance platform
Home Page: https://canutin.com
License: Apache License 2.0
type
and name
so I can later reference it.https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=2140%3A29311
<Select />
to src/app/components/common/Form
<FormAlert />
to <FieldNotice />
and move to src/app/components/common/Form
// src/database/repositories/account.repository.ts:9
export class AccountRepository {
static async createAccount(account: NewAccountType): Promise<Account> {
const accountType = await AccountTypeRepository.createOrGetAccountType({
name: account.accountType.toLowerCase(),
});
// ...
[1] query: SELECT "Account"."id" AS "Account_id", "Account"."createdAt" AS "Account_createdAt", "Account"."updatedAt" AS "Account_updatedAt", "Account"."name" AS "Account_name", "Account"."officialName" AS "Account_officialName", "Account"."institution" AS "Account_institution", "Account"."closed" AS "Account_closed", "Account"."balanceGroup" AS "Account_balanceGroup", "Account"."accountTypeId" AS "Account_accountTypeId" FROM "account" "Account" WHERE "Account"."name" = ? LIMIT 1 -- PARAMETERS: [null]
[1] (node:53396) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toLowerCase' of undefined
[1] at Function.<anonymous> (/Users/odyssey/projects/canutin/desktop/build/database/repositories/account.repository.js:53:55)
[1] at step (/Users/odyssey/projects/canutin/desktop/build/database/repositories/account.repository.js:33:23)
[1] at Object.next (/Users/odyssey/projects/canutin/desktop/build/database/repositories/account.repository.js:14:53)
[1] at /Users/odyssey/projects/canutin/desktop/build/database/repositories/account.repository.js:8:71
[1] at new Promise (<anonymous>)
[1] at __awaiter (/Users/odyssey/projects/canutin/desktop/build/database/repositories/account.repository.js:4:12)
[1] at Function.AccountRepository.createAccount (/Users/odyssey/projects/canutin/desktop/build/database/repositories/account.repository.js:48:16)
[1] at Function.<anonymous> (/Users/odyssey/projects/canutin/desktop/build/database/repositories/account.repository.js:124:69)
[1] at step (/Users/odyssey/projects/canutin/desktop/build/database/repositories/account.repository.js:33:23)
[1] at Object.next (/Users/odyssey/projects/canutin/desktop/build/database/repositories/account.repository.js:14:53)
1- Create an account by hand and name it: Test account
2- Navigate to Import Wizard and choose Other CSV
3- Select the CSV exported from Chase
4- Match the columns: Date, MM/DD/YYY, Description, Amount and Category (leave Account blank).
5- Select Test account from the Import to account field.
6- Click Continue and look at the backend logs.
REF #3
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1058%3A214
Found # accounts
, let's update that to: Found # accounts and # transactions
.Couldn’t interpret the chosen file
should be Couldn’t interprete the chosen file
REF #3
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1007%3A0
Cash
)Debt
)Investments
)Other assets
)https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1007%3A0
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1692%3A3460
description
, date
, category
and amount
so my calculations are updated and I can reference the transaction in the future.https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1689%3A1230
investment
group so I can visualize its performance over time.other assets
group so I can visualize its performance over time.cash
group so I can visualize its performance over time.debt
group so I can visualize its performance over time.https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1664%3A258
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1828%3A32
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1007%3A0
account
, date
, description
and amount
should be skipped.REF #3
When importing accounts or transactions via CSVs or CanutinFiles set default values if the following fields are not present:
AccountType: checking
balanceGroup: Cash
excludeFromTotals: false
category: uncategorized
REF #3
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1007%3A0
Proposed solution: add a step attribute to <InputField>
:
// src/app/components/common/Form/InputText/index.tsx:37
<InputElement
name={name}
ref={setRef ? setRef : register ? register({ required }) : null}
type={type}
id={name}
value={value}
disabled={disabled}
readOnly={disabled}
step={type === 'number' ? 'any' : undefined}
/>
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1692%3A3460
transaction
table called imported_at.The chosen file is not a valid Canutin database
.https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1058%3A214
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1867%3A2014
Address fmaclen/canutin-desktop#89 first, then add all of the newly created components in src/app/components/common/Form
to Storybook.
NewAssetTType
with NewAssetType
NewAccountTType
with NewAccountType
Improve the category mappings by introducing additional strings from known sources (Mint, Personal Capital, banking institutions, etc) to src/database/helpers/importResources/mapCategories.ts
.
Accounts
and Assets
balances grouped by type (BalanceGroup
) so I can get a better understanding of how my money is allocated.Accounts
.Assets
.Accounts
or Assets
present in any of the BalanceGroups
.$250.49 > $250
/ $250.50 > $251
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1759%3A0
Old requirements, ignore.
Accounts
and Assets
, except for those Accounts
that have associated Assets
so I don't see duplicated balances.Account
of type brokerage
with a balance of $500
has multiple associated Assets
:security
with a value of $200
security
with a value of $200
cash
with a value of $100
.All
toggle switch turned "on" only the 3 Assets
should appear in the list of balances and the Account
shouldn't appear at all.BalanceGroup
should show a total of $400
.BalanceGroup
should show a total of $100
.This is the default view, there is no Overview tab.
REF #3
When a JSON file is chosen which has a different format than expected this error throws:
Couldn't detect a CanutinFile
REF #3
Currency fields need to format the number as the user types:
$123,456.23
-$123,456.23
monospaceRegular
.This behavior needs to be applied to the following fields:
EDIT: useForm
has a shouldFocusError
rule that I think achieves the desired behavior.
Another alternative:
<a name="error">
and then point the browser to <path>/#error
html {
scroll-behavior: smooth;
}
@media screen and (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
Export_from_Mint.com.csv
) using the Other CSV flow, I then manually matched all of the columns and clicked Continue, only the accounts were imported but no transactions.When creating an asset:
When creating an account:
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1692%3A1387
{
"accounts": [
{
"name": "Example",
"balanceGroup": "cash",
"accountType": "checking"
}
]
}
[1] tscpaths --project /Users/odyssey/projects/canutin/desktop/src/electron/tsconfig.json --src /Users/odyssey/projects/canutin/desktop/src --out /Users/odyssey/projects/canutin/desktop/build
[1] could not replace @constants/events
[1] could not replace @constants/eventStatus
[1] /Users/odyssey/projects/canutin/desktop/build/electron/main.js: replaced 9 paths
[1] could not replace @constants/events
[1] /Users/odyssey/projects/canutin/desktop/build/database/helpers/importSource.js: replaced 7 paths
[1] /Users/odyssey/projects/canutin/desktop/build/database/repositories/account.repository.js: replaced 2 paths
[1] /Users/odyssey/projects/canutin/desktop/build/database/repositories/asset.repository.js: replaced 1 paths
[1] could not replace @constants/accountTypes
[1] /Users/odyssey/projects/canutin/desktop/build/database/seed/seedAccountTypes.js: replaced 1 paths
[1] could not replace @constants/assetTypes
[1] /Users/odyssey/projects/canutin/desktop/build/database/seed/seedAssetTypes.js: replaced 1 paths
[1] /Users/odyssey/projects/canutin/desktop/build/electron/helpers/database.helper.js: replaced 2 paths
[1] could not replace @constants/events
[1] /Users/odyssey/projects/canutin/desktop/build/electron/helpers/importSource.helper.js: replaced 3 paths
[1] /Users/odyssey/projects/canutin/desktop/build/electron/helpers/sourceHelpers/mint.js: replaced 2 paths
[1] /Users/odyssey/projects/canutin/desktop/build/electron/helpers/sourceHelpers/personalCapital.js: replaced 2 paths
[1] Replaced 30 paths in 10 files
[1] (node:1775) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron. See https://github.com/electron/electron/issues/23506 for more information
[1] (node:1775) ExtensionLoadWarning: Warnings loading extension at /Users/odyssey/Library/Application Support/canutin-desktop/extensions/fmkadmapgofadopljbjfkapdkoienihi: Unrecognized manifest key 'browser_action'. Unrecognized manifest key 'minimum_chrome_version'. Unrecognized manifest key 'update_url'. Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system.
Description of the problem
If the vault file is moved, renamed or deleted during an active session and the user performs an action (i.e creating a new account or adding a transaction) the app fails silently in the background and the user has no idea that the action didn't take place.
Expected behavior
The user should be shown the Canutin setup view prompting them to create a new vault or re-locate an existing one.
Steps to reproduce (in development environment):
CMD+R
CMD+R
query: INSERT INTO "account_type"("id", "createdAt", "updatedAt", "name") VALUES (NULL, datetime('now'), datetime('now'), ?) -- PARAMETERS: ["checking"]
query failed: INSERT INTO "account_type"("id", "createdAt", "updatedAt", "name") VALUES (NULL, datetime('now'), datetime('now'), ?) -- PARAMETERS: ["checking"]
error: [Error: SQLITE_READONLY: attempt to write a readonly database] {
errno: 8,
code: 'SQLITE_READONLY'
}
TODO
comment so I can add the rest.REF #3
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1703%3A0
transaction_category
to transaction_category_group
transaction_sub_category
to transaction_category
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=1692%3A3460
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=994%3A355
https://www.figma.com/file/ZnScVTFJFcQfKZDDbi35gTfn/Canutin?node-id=994%3A355
Examples of the problem:
balanceGroup
should be 2
, but it's stored as 0
.balanceGroup
should be 3
, but it's stored as 0
.Large demo files
REF #3
CANUTIN_FILE_DATE_FORMAT
so it matches the same date format as the DB (yyyy-MM-dd
).example.json
01
and 12
to make sure that they are parsed correctly.src/__tests__/data/canutinFile.json
and test them.A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.