u
This commit is contained in:
@@ -1,3 +1,20 @@
|
||||
/**
|
||||
* @file companyAutomat.js
|
||||
* @description Manages configuration details of the currently selected company
|
||||
* (tax rates, currency, language, legal details, and root category ID).
|
||||
*
|
||||
* Upstream Triggers:
|
||||
* - `authAutomat`: Subscribes to auth state changes — triggers `actions.load()`
|
||||
* when status is `'authed'` with a `selectedCompanyId`, and `actions.reset()` on `'anon'`.
|
||||
* - UI / Settings: Calls `update(payload)` or manual `load()`.
|
||||
*
|
||||
* Downstream Triggers:
|
||||
* - `categoryAutomat`: Subscribes to `companyAutomat` — triggers `actions.loadTree()`
|
||||
* whenever `company.current.id` or `rootCategoryId` changes/becomes available;
|
||||
* resets when company is unset.
|
||||
* - `posterminalAutomat`: Reads `companyAutomat.state.current?.id` as a fallback company ID.
|
||||
*/
|
||||
|
||||
import { Automat } from 'react-automat';
|
||||
import { company as companyApi } from '../api';
|
||||
import authAutomat from './authAutomat';
|
||||
|
||||
Reference in New Issue
Block a user