2022-04-22 11:02:03 +00:00
|
|
|
# src
|
|
|
|
|
|
|
|
This is where all the frontend code lives
|
|
|
|
|
2022-04-23 09:23:44 +00:00
|
|
|
## Fyo Initialization
|
2022-04-22 11:02:03 +00:00
|
|
|
|
2022-04-23 09:23:44 +00:00
|
|
|
The initialization flows are different when the instance is new or is existing.
|
|
|
|
All of them are triggered from `src/App.vue`.
|
|
|
|
|
|
|
|
**New Instance**
|
|
|
|
|
|
|
|
1. Run _Setup Wizard_ for init values (eg: `country`).
|
|
|
|
2. Call `setupInstance.ts/setupInstance` using init values.
|
|
|
|
|
|
|
|
**Existing Instance**
|
|
|
|
|
|
|
|
1. Connect to db.
|
2022-04-22 11:02:03 +00:00
|
|
|
2. Check if _Setup Wizard_ has been completed, if not, jump to **New Instance**
|
2022-04-23 09:23:44 +00:00
|
|
|
3. Call `initFyo/initializeInstance` with `dbPath` and `countryCode`
|
2022-04-24 06:48:44 +00:00
|
|
|
|
|
|
|
## Global Fyo
|
|
|
|
|
|
|
|
Global fyo is exported from `initFyo.ts`. Only code that isn't going to be unit
|
2022-05-26 19:15:05 +00:00
|
|
|
tested using `mocha` should use this, i.e. code in `src`
|