From 815a6336ec9e7c777ff99652c10497e7e3a4bff1 Mon Sep 17 00:00:00 2001 From: Chika Date: Tue, 25 Oct 2022 15:57:08 +0300 Subject: [PATCH] stores: add process store --- stores/process/index.ts | 9 +++++++++ stores/root.ts | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 stores/process/index.ts diff --git a/stores/process/index.ts b/stores/process/index.ts new file mode 100644 index 0000000..89037e0 --- /dev/null +++ b/stores/process/index.ts @@ -0,0 +1,9 @@ +import type { ObservableSet } from 'mobx'; +import { observable } from 'mobx'; + +export type Process = 'LoadKP' | 'ELT'; +export type ProcessStore = ObservableSet; + +export default function createProcessStore() { + return observable.set(); +} diff --git a/stores/root.ts b/stores/root.ts index 4c1f6eb..a5f372e 100644 --- a/stores/root.ts +++ b/stores/root.ts @@ -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(); } }