placementt-core 1.20.217 → 11.0.803

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/.eslintrc.js +40 -40
  2. package/.gitattributes +2 -2
  3. package/lib/constants.js +10 -1
  4. package/lib/constants.js.map +1 -1
  5. package/lib/features/config.d.ts +133 -133
  6. package/lib/features/config.js +35 -35
  7. package/lib/features/contacts/contacts.d.ts +75 -75
  8. package/lib/features/contacts/contacts.js +105 -105
  9. package/lib/features/downtime/useDowntime.d.ts +11 -11
  10. package/lib/features/downtime/useDowntime.js +22 -22
  11. package/lib/features/placements/studentPlacements/studentPlacementsSlice.d.ts +63 -63
  12. package/lib/features/placements/studentPlacements/studentPlacementsSlice.js +81 -81
  13. package/lib/features/providerPlacements/providerPlacementsSlice.d.ts +19 -19
  14. package/lib/features/providerPlacements/providerPlacementsSlice.js +24 -24
  15. package/lib/features/studentPlacements/studentPlacementsSlice.d.ts +62 -62
  16. package/lib/features/studentPlacements/studentPlacementsSlice.js +87 -87
  17. package/lib/features/studentPlacements/useStudentPlacements.d.ts +6 -6
  18. package/lib/features/studentPlacements/useStudentPlacements.js +18 -18
  19. package/lib/features/userSlice.d.ts +26 -26
  20. package/lib/features/userSlice.js +23 -23
  21. package/lib/features/users/useUserFunctions.d.ts +25 -25
  22. package/lib/features/users/useUserFunctions.js +124 -124
  23. package/lib/features/users/userSlice.d.ts +46 -46
  24. package/lib/features/users/userSlice.js +48 -48
  25. package/lib/firebase/firebase.d.ts +1 -1
  26. package/lib/firebase/firebase.js +6 -2
  27. package/lib/firebase/firebase.js.map +1 -1
  28. package/lib/firebase/readDatabase.js +3 -1
  29. package/lib/firebase/readDatabase.js.map +1 -1
  30. package/lib/hooks.d.ts +33 -5
  31. package/lib/hooks.js +143 -107
  32. package/lib/hooks.js.map +1 -1
  33. package/lib/images/GatsbyBenchmarks.d.ts +1 -2
  34. package/lib/reduxHooks.d.ts +1 -66
  35. package/lib/reduxHooks.js +9 -69
  36. package/lib/reduxHooks.js.map +1 -1
  37. package/lib/tasksAndTips.d.ts +2 -2
  38. package/lib/tasksAndTips.js +37 -6
  39. package/lib/tasksAndTips.js.map +1 -1
  40. package/lib/typeDefinitions.d.ts +50 -5
  41. package/lib/util.d.ts +1 -1
  42. package/lib/util.js +12 -1
  43. package/lib/util.js.map +1 -1
  44. package/package.json +52 -56
  45. package/src/DatabaseDefinitions.ts +18 -18
  46. package/src/apiCalls.ts +128 -128
  47. package/src/config.ts +50 -50
  48. package/src/constants.ts +796 -787
  49. package/src/databaseTypes.ts +42 -42
  50. package/src/features/analytics/useAnalytics.tsx +63 -63
  51. package/src/features/contacts/contactsSlice.ts +147 -147
  52. package/src/features/contacts/useContacts.tsx +73 -73
  53. package/src/features/dropdown/useDropdown.tsx +52 -52
  54. package/src/features/global/downtime/useDowntime.tsx +23 -23
  55. package/src/features/global/users/useUserFunctions.tsx +132 -132
  56. package/src/features/jobs/jobsSlice.ts +71 -71
  57. package/src/features/placements/studentPlacements/activePlacement.ts +68 -68
  58. package/src/features/placements/studentPlacements/completedStudentPlacementsSlice.ts +97 -97
  59. package/src/features/placements/studentPlacements/upcomingStudentPlacementsSlice.ts +108 -108
  60. package/src/features/placements/studentPlacements/useStudentPlacements.tsx +9 -9
  61. package/src/features/placements/types.ts +10 -10
  62. package/src/features/referrals/useReferrals.tsx +56 -56
  63. package/src/features/updates/useUpdates.tsx +38 -38
  64. package/src/firebase/firebase.tsx +149 -145
  65. package/src/firebase/firebaseConfig.tsx +45 -45
  66. package/src/firebase/firebaseQuery.tsx +151 -151
  67. package/src/firebase/persistence.ts +84 -84
  68. package/src/firebase/readDatabase.tsx +236 -235
  69. package/src/firebase/util.tsx +352 -352
  70. package/src/firebase/writeDatabase.tsx +77 -77
  71. package/src/hooks.tsx +4353 -4323
  72. package/src/images/GatsbyBenchmarks.tsx +711 -711
  73. package/src/images/LogFuturePlacement.jsx +64 -64
  74. package/src/images/LogPreviousPlacement.jsx +228 -228
  75. package/src/images/gatsby_benchmarks.svg +466 -466
  76. package/src/images/log_future_placement.svg +114 -114
  77. package/src/images/log_previous_placement.svg +199 -199
  78. package/src/index.ts +34 -34
  79. package/src/readDatabase.tsx +3 -3
  80. package/src/reduxHooks.ts +232 -297
  81. package/src/tasksAndTips.ts +1209 -1177
  82. package/src/tutorialTips.ts +58 -58
  83. package/src/typeDefinitions.ts +1003 -958
  84. package/src/util.ts +160 -150
  85. package/tsconfig.dev.json +5 -5
  86. package/tsconfig.json +21 -22
@@ -1,75 +1,75 @@
1
- import { Contact } from "../../typeDefinitions";
2
- import { DocumentData, QueryConstraint, QueryDocumentSnapshot, QuerySnapshot } from "firebase/firestore";
3
- type InitialContactState = {
4
- status: string;
5
- lastContact: QueryDocumentSnapshot<DocumentData> | undefined;
6
- values: {
7
- [contactId: string]: Contact;
8
- };
9
- };
10
- export declare const fetchContacts: import("@reduxjs/toolkit").AsyncThunk<QuerySnapshot<DocumentData>, {
11
- formattedConstraints?: QueryConstraint | QueryConstraint[] | undefined;
12
- }, {
13
- state?: unknown;
14
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
15
- extra?: unknown;
16
- rejectValue?: unknown;
17
- serializedErrorType?: unknown;
18
- pendingMeta?: unknown;
19
- fulfilledMeta?: unknown;
20
- rejectedMeta?: unknown;
21
- }>;
22
- export declare const addContact: import("@reduxjs/toolkit").AsyncThunk<Contact, {
23
- contactForm: Contact;
24
- userId: string;
25
- }, {
26
- state?: unknown;
27
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
28
- extra?: unknown;
29
- rejectValue?: unknown;
30
- serializedErrorType?: unknown;
31
- pendingMeta?: unknown;
32
- fulfilledMeta?: unknown;
33
- rejectedMeta?: unknown;
34
- }>;
35
- export declare const updateContact: import("@reduxjs/toolkit").AsyncThunk<{
36
- contactForm: Contact;
37
- contactId: string;
38
- }, {
39
- contactForm: Contact;
40
- contactId: string;
41
- }, {
42
- state?: unknown;
43
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
44
- extra?: unknown;
45
- rejectValue?: unknown;
46
- serializedErrorType?: unknown;
47
- pendingMeta?: unknown;
48
- fulfilledMeta?: unknown;
49
- rejectedMeta?: unknown;
50
- }>;
51
- export declare const deleteContact: import("@reduxjs/toolkit").AsyncThunk<string, {
52
- contactId: string;
53
- }, {
54
- state?: unknown;
55
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
56
- extra?: unknown;
57
- rejectValue?: unknown;
58
- serializedErrorType?: unknown;
59
- pendingMeta?: unknown;
60
- fulfilledMeta?: unknown;
61
- rejectedMeta?: unknown;
62
- }>;
63
- export declare const contactsSlice: import("@reduxjs/toolkit").Slice<InitialContactState, {
64
- setContacts: (state: import("immer/dist/internal").WritableDraft<InitialContactState>, action: {
65
- payload: any;
66
- type: string;
67
- }) => void;
68
- setLastContact: (state: import("immer/dist/internal").WritableDraft<InitialContactState>, action: {
69
- payload: any;
70
- type: string;
71
- }) => void;
72
- }, "contacts">;
73
- export declare const setContacts: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "contacts/setContacts">, setLastContact: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "contacts/setLastContact">;
74
- declare const _default: import("redux").Reducer<InitialContactState>;
75
- export default _default;
1
+ import { Contact } from "../../typeDefinitions";
2
+ import { DocumentData, QueryConstraint, QueryDocumentSnapshot, QuerySnapshot } from "firebase/firestore";
3
+ type InitialContactState = {
4
+ status: string;
5
+ lastContact: QueryDocumentSnapshot<DocumentData> | undefined;
6
+ values: {
7
+ [contactId: string]: Contact;
8
+ };
9
+ };
10
+ export declare const fetchContacts: import("@reduxjs/toolkit").AsyncThunk<QuerySnapshot<DocumentData>, {
11
+ formattedConstraints?: QueryConstraint | QueryConstraint[] | undefined;
12
+ }, {
13
+ state?: unknown;
14
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
15
+ extra?: unknown;
16
+ rejectValue?: unknown;
17
+ serializedErrorType?: unknown;
18
+ pendingMeta?: unknown;
19
+ fulfilledMeta?: unknown;
20
+ rejectedMeta?: unknown;
21
+ }>;
22
+ export declare const addContact: import("@reduxjs/toolkit").AsyncThunk<Contact, {
23
+ contactForm: Contact;
24
+ userId: string;
25
+ }, {
26
+ state?: unknown;
27
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
28
+ extra?: unknown;
29
+ rejectValue?: unknown;
30
+ serializedErrorType?: unknown;
31
+ pendingMeta?: unknown;
32
+ fulfilledMeta?: unknown;
33
+ rejectedMeta?: unknown;
34
+ }>;
35
+ export declare const updateContact: import("@reduxjs/toolkit").AsyncThunk<{
36
+ contactForm: Contact;
37
+ contactId: string;
38
+ }, {
39
+ contactForm: Contact;
40
+ contactId: string;
41
+ }, {
42
+ state?: unknown;
43
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
44
+ extra?: unknown;
45
+ rejectValue?: unknown;
46
+ serializedErrorType?: unknown;
47
+ pendingMeta?: unknown;
48
+ fulfilledMeta?: unknown;
49
+ rejectedMeta?: unknown;
50
+ }>;
51
+ export declare const deleteContact: import("@reduxjs/toolkit").AsyncThunk<string, {
52
+ contactId: string;
53
+ }, {
54
+ state?: unknown;
55
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
56
+ extra?: unknown;
57
+ rejectValue?: unknown;
58
+ serializedErrorType?: unknown;
59
+ pendingMeta?: unknown;
60
+ fulfilledMeta?: unknown;
61
+ rejectedMeta?: unknown;
62
+ }>;
63
+ export declare const contactsSlice: import("@reduxjs/toolkit").Slice<InitialContactState, {
64
+ setContacts: (state: import("immer/dist/internal").WritableDraft<InitialContactState>, action: {
65
+ payload: any;
66
+ type: string;
67
+ }) => void;
68
+ setLastContact: (state: import("immer/dist/internal").WritableDraft<InitialContactState>, action: {
69
+ payload: any;
70
+ type: string;
71
+ }) => void;
72
+ }, "contacts">;
73
+ export declare const setContacts: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "contacts/setContacts">, setLastContact: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "contacts/setLastContact">;
74
+ declare const _default: import("redux").Reducer<InitialContactState>;
75
+ export default _default;
@@ -1,106 +1,106 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- var _a;
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.setLastContact = exports.setContacts = exports.contactsSlice = exports.deleteContact = exports.updateContact = exports.addContact = exports.fetchContacts = void 0;
8
- const toolkit_1 = require("@reduxjs/toolkit");
9
- const firebaseQuery_1 = __importDefault(require("../../firebase/firebaseQuery"));
10
- const initialState = {
11
- status: "",
12
- lastContact: undefined,
13
- values: {},
14
- };
15
- exports.fetchContacts = (0, toolkit_1.createAsyncThunk)("contacts/fetchContacts", async ({ formattedConstraints }, { rejectWithValue }) => {
16
- const firebaseQuery = new firebaseQuery_1.default();
17
- try {
18
- const documents = await firebaseQuery.getDocsWhere("contacts", formattedConstraints, true);
19
- return documents;
20
- }
21
- catch (error) {
22
- return rejectWithValue(error);
23
- }
24
- });
25
- exports.addContact = (0, toolkit_1.createAsyncThunk)("contacts/addContact", async ({ contactForm, userId }, { rejectWithValue }) => {
26
- const firebaseQuery = new firebaseQuery_1.default();
27
- try {
28
- await firebaseQuery.add(["contacts"], { ...contactForm, uid: userId });
29
- return contactForm;
30
- }
31
- catch (error) {
32
- return rejectWithValue(error);
33
- }
34
- });
35
- exports.updateContact = (0, toolkit_1.createAsyncThunk)("contacts/updateContact", async ({ contactForm, contactId }, { rejectWithValue }) => {
36
- const firebaseQuery = new firebaseQuery_1.default();
37
- try {
38
- await firebaseQuery.update(["contacts", contactId], contactForm);
39
- return { contactForm, contactId };
40
- }
41
- catch (error) {
42
- return rejectWithValue(error);
43
- }
44
- });
45
- exports.deleteContact = (0, toolkit_1.createAsyncThunk)("contacts/deleteContact", async ({ contactId }, { rejectWithValue }) => {
46
- const firebaseQuery = new firebaseQuery_1.default();
47
- try {
48
- await firebaseQuery.delete(["contacts", contactId]);
49
- return contactId;
50
- }
51
- catch (error) {
52
- return rejectWithValue(error);
53
- }
54
- });
55
- exports.contactsSlice = (0, toolkit_1.createSlice)({
56
- name: "contacts",
57
- initialState,
58
- reducers: {
59
- setContacts: (state, action) => {
60
- state.values = action.payload;
61
- },
62
- setLastContact: (state, action) => {
63
- state.lastContact = action.payload;
64
- }
65
- },
66
- extraReducers(builder) {
67
- builder
68
- .addCase(exports.fetchContacts.pending, (state) => {
69
- state.status = "loading";
70
- })
71
- .addCase(exports.fetchContacts.fulfilled, (state, action) => {
72
- state.status = "success";
73
- return {
74
- ...state,
75
- ...Object.fromEntries(action.payload.docs.map(doc => [doc.id, { ...doc.data(), docPath: doc.ref }])),
76
- ...state.lastContact = action.payload.docs[action.payload.docs.length - 1],
77
- };
78
- })
79
- .addCase(exports.fetchContacts.rejected, (state) => {
80
- state.status = "rejected";
81
- })
82
- .addCase(exports.addContact.fulfilled, (state, action) => {
83
- const newContact = action.payload;
84
- const newContacts = { ...state.values };
85
- newContacts[action.payload.id] = newContact;
86
- })
87
- .addCase(exports.updateContact.fulfilled, (state, action) => {
88
- return {
89
- ...state,
90
- values: {
91
- ...state.values,
92
- [action.payload.contactId]: action.payload.contactForm,
93
- },
94
- };
95
- })
96
- .addCase(exports.deleteContact.fulfilled, (state, action) => {
97
- const contactIdToDelete = action.payload;
98
- const newContacts = { ...state };
99
- delete newContacts.values[contactIdToDelete];
100
- return newContacts;
101
- });
102
- }
103
- });
104
- _a = exports.contactsSlice.actions, exports.setContacts = _a.setContacts, exports.setLastContact = _a.setLastContact;
105
- exports.default = exports.contactsSlice.reducer;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ var _a;
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.setLastContact = exports.setContacts = exports.contactsSlice = exports.deleteContact = exports.updateContact = exports.addContact = exports.fetchContacts = void 0;
8
+ const toolkit_1 = require("@reduxjs/toolkit");
9
+ const firebaseQuery_1 = __importDefault(require("../../firebase/firebaseQuery"));
10
+ const initialState = {
11
+ status: "",
12
+ lastContact: undefined,
13
+ values: {},
14
+ };
15
+ exports.fetchContacts = (0, toolkit_1.createAsyncThunk)("contacts/fetchContacts", async ({ formattedConstraints }, { rejectWithValue }) => {
16
+ const firebaseQuery = new firebaseQuery_1.default();
17
+ try {
18
+ const documents = await firebaseQuery.getDocsWhere("contacts", formattedConstraints, true);
19
+ return documents;
20
+ }
21
+ catch (error) {
22
+ return rejectWithValue(error);
23
+ }
24
+ });
25
+ exports.addContact = (0, toolkit_1.createAsyncThunk)("contacts/addContact", async ({ contactForm, userId }, { rejectWithValue }) => {
26
+ const firebaseQuery = new firebaseQuery_1.default();
27
+ try {
28
+ await firebaseQuery.add(["contacts"], { ...contactForm, uid: userId });
29
+ return contactForm;
30
+ }
31
+ catch (error) {
32
+ return rejectWithValue(error);
33
+ }
34
+ });
35
+ exports.updateContact = (0, toolkit_1.createAsyncThunk)("contacts/updateContact", async ({ contactForm, contactId }, { rejectWithValue }) => {
36
+ const firebaseQuery = new firebaseQuery_1.default();
37
+ try {
38
+ await firebaseQuery.update(["contacts", contactId], contactForm);
39
+ return { contactForm, contactId };
40
+ }
41
+ catch (error) {
42
+ return rejectWithValue(error);
43
+ }
44
+ });
45
+ exports.deleteContact = (0, toolkit_1.createAsyncThunk)("contacts/deleteContact", async ({ contactId }, { rejectWithValue }) => {
46
+ const firebaseQuery = new firebaseQuery_1.default();
47
+ try {
48
+ await firebaseQuery.delete(["contacts", contactId]);
49
+ return contactId;
50
+ }
51
+ catch (error) {
52
+ return rejectWithValue(error);
53
+ }
54
+ });
55
+ exports.contactsSlice = (0, toolkit_1.createSlice)({
56
+ name: "contacts",
57
+ initialState,
58
+ reducers: {
59
+ setContacts: (state, action) => {
60
+ state.values = action.payload;
61
+ },
62
+ setLastContact: (state, action) => {
63
+ state.lastContact = action.payload;
64
+ }
65
+ },
66
+ extraReducers(builder) {
67
+ builder
68
+ .addCase(exports.fetchContacts.pending, (state) => {
69
+ state.status = "loading";
70
+ })
71
+ .addCase(exports.fetchContacts.fulfilled, (state, action) => {
72
+ state.status = "success";
73
+ return {
74
+ ...state,
75
+ ...Object.fromEntries(action.payload.docs.map(doc => [doc.id, { ...doc.data(), docPath: doc.ref }])),
76
+ ...state.lastContact = action.payload.docs[action.payload.docs.length - 1],
77
+ };
78
+ })
79
+ .addCase(exports.fetchContacts.rejected, (state) => {
80
+ state.status = "rejected";
81
+ })
82
+ .addCase(exports.addContact.fulfilled, (state, action) => {
83
+ const newContact = action.payload;
84
+ const newContacts = { ...state.values };
85
+ newContacts[action.payload.id] = newContact;
86
+ })
87
+ .addCase(exports.updateContact.fulfilled, (state, action) => {
88
+ return {
89
+ ...state,
90
+ values: {
91
+ ...state.values,
92
+ [action.payload.contactId]: action.payload.contactForm,
93
+ },
94
+ };
95
+ })
96
+ .addCase(exports.deleteContact.fulfilled, (state, action) => {
97
+ const contactIdToDelete = action.payload;
98
+ const newContacts = { ...state };
99
+ delete newContacts.values[contactIdToDelete];
100
+ return newContacts;
101
+ });
102
+ }
103
+ });
104
+ _a = exports.contactsSlice.actions, exports.setContacts = _a.setContacts, exports.setLastContact = _a.setLastContact;
105
+ exports.default = exports.contactsSlice.reducer;
106
106
  //# sourceMappingURL=contacts.js.map
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
2
- export default function useDowntime(): {
3
- downtime: false | {
4
- title: string;
5
- body: string;
6
- } | undefined;
7
- setDowntime: import("react").Dispatch<import("react").SetStateAction<false | {
8
- title: string;
9
- body: string;
10
- } | undefined>>;
11
- };
1
+ /// <reference types="react" />
2
+ export default function useDowntime(): {
3
+ downtime: false | {
4
+ title: string;
5
+ body: string;
6
+ } | undefined;
7
+ setDowntime: import("react").Dispatch<import("react").SetStateAction<false | {
8
+ title: string;
9
+ body: string;
10
+ } | undefined>>;
11
+ };
@@ -1,23 +1,23 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const firestore_1 = require("firebase/firestore");
7
- const reduxHooks_1 = require("../../reduxHooks");
8
- const firebaseQuery_1 = __importDefault(require("../../firebase/firebaseQuery"));
9
- const react_1 = require("react");
10
- function useDowntime() {
11
- const [downtime, setDowntime] = (0, react_1.useState)();
12
- const firebaseQuery = new firebaseQuery_1.default();
13
- const { user } = (0, reduxHooks_1.useAppSelector)((state) => state.user);
14
- (0, react_1.useEffect)(() => {
15
- firebaseQuery.getDocsWhere("downtime", [(0, firestore_1.where)("products", "array-contains", user === null || user === void 0 ? void 0 : user.product), (0, firestore_1.where)("active", "==", true)]).then((docs) => {
16
- const downtimeDocs = { ...docs };
17
- setDowntime(downtimeDocs[Object.keys(downtimeDocs)[0]] || false);
18
- });
19
- }, [user]);
20
- return ({ ...{ downtime, setDowntime } });
21
- }
22
- exports.default = useDowntime;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const firestore_1 = require("firebase/firestore");
7
+ const reduxHooks_1 = require("../../reduxHooks");
8
+ const firebaseQuery_1 = __importDefault(require("../../firebase/firebaseQuery"));
9
+ const react_1 = require("react");
10
+ function useDowntime() {
11
+ const [downtime, setDowntime] = (0, react_1.useState)();
12
+ const firebaseQuery = new firebaseQuery_1.default();
13
+ const { user } = (0, reduxHooks_1.useAppSelector)((state) => state.user);
14
+ (0, react_1.useEffect)(() => {
15
+ firebaseQuery.getDocsWhere("downtime", [(0, firestore_1.where)("products", "array-contains", user === null || user === void 0 ? void 0 : user.product), (0, firestore_1.where)("active", "==", true)]).then((docs) => {
16
+ const downtimeDocs = { ...docs };
17
+ setDowntime(downtimeDocs[Object.keys(downtimeDocs)[0]] || false);
18
+ });
19
+ }, [user]);
20
+ return ({ ...{ downtime, setDowntime } });
21
+ }
22
+ exports.default = useDowntime;
23
23
  //# sourceMappingURL=useDowntime.js.map
@@ -1,63 +1,63 @@
1
- import { StudentPlacementData } from "../../../typeDefinitions";
2
- import { QueryConstraint } from "firebase/firestore";
3
- type PlacementState = {
4
- status: string;
5
- values: {
6
- [key: string]: StudentPlacementData;
7
- };
8
- };
9
- export declare const fetchStudentPlacements: import("@reduxjs/toolkit").AsyncThunk<void | import("@firebase/firestore").QuerySnapshot<import("@firebase/firestore").DocumentData> | {
10
- [k: string]: any;
11
- }, {
12
- w: QueryConstraint[] | QueryConstraint;
13
- }, {
14
- state?: unknown;
15
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
16
- extra?: unknown;
17
- rejectValue?: unknown;
18
- serializedErrorType?: unknown;
19
- pendingMeta?: unknown;
20
- fulfilledMeta?: unknown;
21
- rejectedMeta?: unknown;
22
- }>;
23
- export declare const updateStudentPlacement: import("@reduxjs/toolkit").AsyncThunk<{
24
- attributes: any;
25
- placementId: string;
26
- }, {
27
- placementId: string;
28
- attributes: any;
29
- }, {
30
- state?: unknown;
31
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
32
- extra?: unknown;
33
- rejectValue?: unknown;
34
- serializedErrorType?: unknown;
35
- pendingMeta?: unknown;
36
- fulfilledMeta?: unknown;
37
- rejectedMeta?: unknown;
38
- }>;
39
- export declare const deleteStudentPlacement: import("@reduxjs/toolkit").AsyncThunk<string, {
40
- placementId: string;
41
- }, {
42
- state?: unknown;
43
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
44
- extra?: unknown;
45
- rejectValue?: unknown;
46
- serializedErrorType?: unknown;
47
- pendingMeta?: unknown;
48
- fulfilledMeta?: unknown;
49
- rejectedMeta?: unknown;
50
- }>;
51
- export declare const studentsPlacementsSlice: import("@reduxjs/toolkit").Slice<PlacementState, {
52
- setStudentPlacements: (state: import("immer/dist/internal").WritableDraft<PlacementState>, action: {
53
- payload: any;
54
- type: string;
55
- }) => void;
56
- addStudentPlacement: (state: import("immer/dist/internal").WritableDraft<PlacementState>, action: {
57
- payload: any;
58
- type: string;
59
- }) => void;
60
- }, "studentPlacements">;
61
- export declare const setStudentPlacements: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "studentPlacements/setStudentPlacements">, addStudentPlacement: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "studentPlacements/addStudentPlacement">;
62
- declare const _default: import("redux").Reducer<PlacementState>;
63
- export default _default;
1
+ import { StudentPlacementData } from "../../../typeDefinitions";
2
+ import { QueryConstraint } from "firebase/firestore";
3
+ type PlacementState = {
4
+ status: string;
5
+ values: {
6
+ [key: string]: StudentPlacementData;
7
+ };
8
+ };
9
+ export declare const fetchStudentPlacements: import("@reduxjs/toolkit").AsyncThunk<void | import("@firebase/firestore").QuerySnapshot<import("@firebase/firestore").DocumentData> | {
10
+ [k: string]: any;
11
+ }, {
12
+ w: QueryConstraint[] | QueryConstraint;
13
+ }, {
14
+ state?: unknown;
15
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
16
+ extra?: unknown;
17
+ rejectValue?: unknown;
18
+ serializedErrorType?: unknown;
19
+ pendingMeta?: unknown;
20
+ fulfilledMeta?: unknown;
21
+ rejectedMeta?: unknown;
22
+ }>;
23
+ export declare const updateStudentPlacement: import("@reduxjs/toolkit").AsyncThunk<{
24
+ attributes: any;
25
+ placementId: string;
26
+ }, {
27
+ placementId: string;
28
+ attributes: any;
29
+ }, {
30
+ state?: unknown;
31
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
32
+ extra?: unknown;
33
+ rejectValue?: unknown;
34
+ serializedErrorType?: unknown;
35
+ pendingMeta?: unknown;
36
+ fulfilledMeta?: unknown;
37
+ rejectedMeta?: unknown;
38
+ }>;
39
+ export declare const deleteStudentPlacement: import("@reduxjs/toolkit").AsyncThunk<string, {
40
+ placementId: string;
41
+ }, {
42
+ state?: unknown;
43
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
44
+ extra?: unknown;
45
+ rejectValue?: unknown;
46
+ serializedErrorType?: unknown;
47
+ pendingMeta?: unknown;
48
+ fulfilledMeta?: unknown;
49
+ rejectedMeta?: unknown;
50
+ }>;
51
+ export declare const studentsPlacementsSlice: import("@reduxjs/toolkit").Slice<PlacementState, {
52
+ setStudentPlacements: (state: import("immer/dist/internal").WritableDraft<PlacementState>, action: {
53
+ payload: any;
54
+ type: string;
55
+ }) => void;
56
+ addStudentPlacement: (state: import("immer/dist/internal").WritableDraft<PlacementState>, action: {
57
+ payload: any;
58
+ type: string;
59
+ }) => void;
60
+ }, "studentPlacements">;
61
+ export declare const setStudentPlacements: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "studentPlacements/setStudentPlacements">, addStudentPlacement: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "studentPlacements/addStudentPlacement">;
62
+ declare const _default: import("redux").Reducer<PlacementState>;
63
+ export default _default;