2023-09-20 15:03:25 +00:00
|
|
|
import { observable, action, computed, makeObservable, runInAction } from "mobx";
|
|
|
|
import { IIssue } from "types";
|
2023-09-20 18:09:55 +00:00
|
|
|
import { RootStore } from "./root";
|
2023-09-20 15:03:25 +00:00
|
|
|
|
|
|
|
export interface IIssueStore {
|
|
|
|
loader: boolean;
|
|
|
|
error: any | null;
|
|
|
|
}
|
|
|
|
|
|
|
|
class IssueStore implements IIssueStore {
|
|
|
|
loader: boolean = false;
|
|
|
|
error: any | null = null;
|
|
|
|
issues: {
|
|
|
|
[project_id: string]: {
|
|
|
|
grouped: any;
|
|
|
|
ungrouped: IIssue[];
|
|
|
|
};
|
|
|
|
} = {};
|
|
|
|
|
2023-09-20 18:09:55 +00:00
|
|
|
rootStore;
|
|
|
|
|
|
|
|
constructor(_rootStore: RootStore) {
|
2023-09-20 15:03:25 +00:00
|
|
|
makeObservable(this, {
|
|
|
|
// observable
|
|
|
|
loader: observable.ref,
|
|
|
|
error: observable.ref,
|
|
|
|
issues: observable.ref,
|
|
|
|
});
|
2023-09-20 18:09:55 +00:00
|
|
|
this.rootStore = _rootStore;
|
2023-09-20 15:03:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fetchIssuesWithParams() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default IssueStore;
|