stores: add process store

This commit is contained in:
Chika 2022-10-25 15:57:08 +03:00
parent 34bab4f715
commit 815a6336ec
2 changed files with 13 additions and 0 deletions

9
stores/process/index.ts Normal file
View File

@ -0,0 +1,9 @@
import type { ObservableSet } from 'mobx';
import { observable } from 'mobx';
export type Process = 'LoadKP' | 'ELT';
export type ProcessStore = ObservableSet<Process>;
export default function createProcessStore() {
return observable.set<Process>();
}

View File

@ -1,6 +1,8 @@
/* eslint-disable import/no-cycle */
import { enableStaticRendering } from 'mobx-react-lite';
import CalculationStore from './calculation';
import type { ProcessStore } from './process';
import createProcessStore from './process';
import ResultsStore from './results';
import TablesStore from './tables';
@ -10,10 +12,12 @@ export default class RootStore {
$calculation: CalculationStore;
$results: ResultsStore;
$tables: TablesStore;
$process: ProcessStore;
constructor() {
this.$calculation = new CalculationStore(this);
this.$results = new ResultsStore(this);
this.$tables = new TablesStore(this);
this.$process = createProcessStore();
}
}