-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathjobs.actions.ts
61 lines (52 loc) · 1.74 KB
/
jobs.actions.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { createAction, props } from "@ngrx/store";
import { Job } from "shared/sdk";
export const fetchJobsAction = createAction("[Job] Fetch Jobs");
export const fetchJobsCompleteAction = createAction(
"[Job] Fetch Jobs Complete",
props<{ jobs: Job[] }>(),
);
export const fetchJobsFailedAction = createAction("[Job] Fetch Jobs Failed");
export const fetchCountAction = createAction("[Job] Fetch Count");
export const fetchCountCompleteAction = createAction(
"[Job] Fetch Count Complete",
props<{ count: number }>(),
);
export const fetchCountFailedAction = createAction("[Job] Fetch Count Failed");
export const fetchJobAction = createAction(
"[Job] Fetch Job",
props<{ jobId: string }>(),
);
export const fetchJobCompleteAction = createAction(
"[Job] Fetch Job Complete",
props<{ job: Job }>(),
);
export const fetchJobFailedAction = createAction("[Job] Fetch Job Failed");
export const submitJobAction = createAction(
"[Job] Submit Job",
props<{ job: Job }>(),
);
export const submitJobCompleteAction = createAction(
"[Job] Submit Job Complete",
props<{ job: Job }>(),
);
export const submitJobFailedAction = createAction(
"[Job] Submit Job Failed",
props<{ err: Error }>(),
);
export const setJobViewModeAction = createAction(
"[Job] Set Mode Filter",
props<{ mode: Record<string, string> | undefined }>(),
);
export const setJobsLimitFilterAction = createAction(
"[Job] Set Limit Filter",
props<{ limit: number }>(),
);
export const changePageAction = createAction(
"[Job] Change Page",
props<{ page: number; limit: number }>(),
);
export const sortByColumnAction = createAction(
"[Job] Sort By Column",
props<{ column: string; direction: string }>(),
);
export const clearJobsStateAction = createAction("[Job] Clear State");