placementt-core 1.20.197 → 11.0.533
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.
- package/.eslintrc.js +40 -40
- package/.gitattributes +2 -2
- package/lib/config.d.ts +0 -1
- package/lib/constants.d.ts +5 -2
- package/lib/constants.js +130 -136
- package/lib/constants.js.map +1 -1
- package/lib/features/analytics/useAnalytics.d.ts +0 -1
- package/lib/features/analytics/useAnalytics.js +3 -4
- package/lib/features/analytics/useAnalytics.js.map +1 -1
- package/lib/features/config.d.ts +133 -133
- package/lib/features/config.js +35 -35
- package/lib/features/contacts/contacts.d.ts +75 -75
- package/lib/features/contacts/contacts.js +105 -105
- package/lib/features/contacts/contactsSlice.d.ts +5 -5
- package/lib/features/contacts/useContacts.js +1 -2
- package/lib/features/contacts/useContacts.js.map +1 -1
- package/lib/features/downtime/useDowntime.d.ts +11 -11
- package/lib/features/downtime/useDowntime.js +22 -22
- package/lib/features/dropdown/useDropdown.d.ts +2 -3
- package/lib/features/dropdown/useDropdown.js +1 -2
- package/lib/features/dropdown/useDropdown.js.map +1 -1
- package/lib/features/global/downtime/useDowntime.d.ts +0 -1
- package/lib/features/global/downtime/useDowntime.js +3 -2
- package/lib/features/global/downtime/useDowntime.js.map +1 -1
- package/lib/features/global/users/useUserFunctions.d.ts +0 -1
- package/lib/features/global/users/useUserFunctions.js +6 -7
- package/lib/features/global/users/useUserFunctions.js.map +1 -1
- package/lib/features/placements/studentPlacements/activePlacement.d.ts +1 -1
- package/lib/features/placements/studentPlacements/activePlacement.js +1 -1
- package/lib/features/placements/studentPlacements/activePlacement.js.map +1 -1
- package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.d.ts +4 -5
- package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.js +1 -4
- package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.js.map +1 -1
- package/lib/features/placements/studentPlacements/studentPlacementsSlice.d.ts +63 -63
- package/lib/features/placements/studentPlacements/studentPlacementsSlice.js +81 -81
- package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.d.ts +4 -4
- package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.js +1 -1
- package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.js.map +1 -1
- package/lib/features/placements/studentPlacements/useStudentPlacements.d.ts +0 -1
- package/lib/features/placements/studentPlacements/useStudentPlacements.js +1 -2
- package/lib/features/placements/studentPlacements/useStudentPlacements.js.map +1 -1
- package/lib/features/providerPlacements/providerPlacementsSlice.d.ts +19 -19
- package/lib/features/providerPlacements/providerPlacementsSlice.js +24 -24
- package/lib/features/referrals/useReferrals.d.ts +0 -1
- package/lib/features/referrals/useReferrals.js +1 -2
- package/lib/features/referrals/useReferrals.js.map +1 -1
- package/lib/features/studentPlacements/studentPlacementsSlice.d.ts +62 -62
- package/lib/features/studentPlacements/studentPlacementsSlice.js +87 -87
- package/lib/features/studentPlacements/useStudentPlacements.d.ts +6 -6
- package/lib/features/studentPlacements/useStudentPlacements.js +18 -18
- package/lib/features/updates/useUpdates.js +1 -2
- package/lib/features/updates/useUpdates.js.map +1 -1
- package/lib/features/userSlice.d.ts +26 -26
- package/lib/features/userSlice.js +23 -23
- package/lib/features/users/useUserFunctions.d.ts +25 -25
- package/lib/features/users/useUserFunctions.js +124 -124
- package/lib/features/users/userSlice.d.ts +46 -46
- package/lib/features/users/userSlice.js +48 -48
- package/lib/firebase/firebase.d.ts +1 -1
- package/lib/firebase/firebase.js +9 -4
- package/lib/firebase/firebase.js.map +1 -1
- package/lib/firebase/firebaseConfig.js +3 -0
- package/lib/firebase/firebaseConfig.js.map +1 -1
- package/lib/firebase/firebaseQuery.js +3 -0
- package/lib/firebase/firebaseQuery.js.map +1 -1
- package/lib/firebase/persistence.js +2 -2
- package/lib/firebase/persistence.js.map +1 -1
- package/lib/firebase/readDatabase.d.ts +9 -6
- package/lib/firebase/readDatabase.js +16 -6
- package/lib/firebase/readDatabase.js.map +1 -1
- package/lib/firebase/util.d.ts +3 -4
- package/lib/firebase/util.js +49 -4
- package/lib/firebase/util.js.map +1 -1
- package/lib/firebase/writeDatabase.d.ts +3 -3
- package/lib/firebase/writeDatabase.js +7 -1
- package/lib/firebase/writeDatabase.js.map +1 -1
- package/lib/hooks.d.ts +384 -23
- package/lib/hooks.js +1342 -223
- package/lib/hooks.js.map +1 -1
- package/lib/images/GatsbyBenchmarks.d.ts +0 -1
- package/lib/images/GatsbyBenchmarks.js +1 -1
- package/lib/images/GatsbyBenchmarks.js.map +1 -1
- package/lib/reduxHooks.d.ts +11 -20
- package/lib/reduxHooks.js +28 -18
- package/lib/reduxHooks.js.map +1 -1
- package/lib/tasksAndTips.d.ts +25 -5
- package/lib/tasksAndTips.js +346 -48
- package/lib/tasksAndTips.js.map +1 -1
- package/lib/typeDefinitions.d.ts +478 -53
- package/lib/util.d.ts +1 -0
- package/lib/util.js +78 -6
- package/lib/util.js.map +1 -1
- package/package.json +52 -49
- package/src/DatabaseDefinitions.ts +18 -18
- package/src/apiCalls.ts +128 -128
- package/src/config.ts +50 -50
- package/src/constants.ts +708 -707
- package/src/databaseTypes.ts +42 -42
- package/src/features/analytics/useAnalytics.tsx +55 -55
- package/src/features/contacts/contactsSlice.ts +147 -147
- package/src/features/contacts/useContacts.tsx +73 -73
- package/src/features/dropdown/useDropdown.tsx +52 -52
- package/src/features/global/downtime/useDowntime.tsx +19 -18
- package/src/features/global/users/useUserFunctions.tsx +132 -132
- package/src/features/jobs/jobsSlice.ts +65 -65
- package/src/features/placements/studentPlacements/activePlacement.ts +63 -63
- package/src/features/placements/studentPlacements/completedStudentPlacementsSlice.ts +94 -97
- package/src/features/placements/studentPlacements/upcomingStudentPlacementsSlice.ts +108 -108
- package/src/features/placements/studentPlacements/useStudentPlacements.tsx +33 -33
- package/src/features/placements/types.ts +10 -10
- package/src/features/referrals/useReferrals.tsx +56 -56
- package/src/features/updates/useUpdates.tsx +36 -36
- package/src/firebase/firebase.tsx +142 -138
- package/src/firebase/firebaseConfig.tsx +45 -42
- package/src/firebase/firebaseQuery.tsx +143 -140
- package/src/firebase/persistence.ts +84 -84
- package/src/firebase/readDatabase.tsx +208 -197
- package/src/firebase/util.tsx +352 -308
- package/src/firebase/writeDatabase.tsx +75 -68
- package/src/hooks.tsx +3395 -1943
- package/src/images/GatsbyBenchmarks.tsx +711 -711
- package/src/images/LogFuturePlacement.jsx +64 -64
- package/src/images/LogPreviousPlacement.jsx +228 -228
- package/src/images/gatsby_benchmarks.svg +466 -466
- package/src/images/log_future_placement.svg +114 -114
- package/src/images/log_previous_placement.svg +199 -199
- package/src/index.ts +34 -34
- package/src/readDatabase.tsx +3 -3
- package/src/reduxHooks.ts +183 -170
- package/src/tasksAndTips.ts +744 -410
- package/src/tutorialTips.ts +58 -58
- package/src/typeDefinitions.ts +899 -503
- package/src/util.ts +132 -47
- package/tsconfig.dev.json +5 -5
- package/tsconfig.json +21 -21
package/lib/hooks.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { DocumentData, QueryConstraint, QueryDocumentSnapshot } from "firebase/firestore";
|
|
3
|
-
import { ArrowObject, CohortData, InstituteData, PlacementListing, Products, QueryObject, StudentPlacementData, UserData, UserGroupData, WorkflowStage } from "./typeDefinitions";
|
|
2
|
+
import { ApplicantStage, ApplicantWorkflow, Application, ArrowObject, CohortData, FileItem, FlagCodes, InstituteData, OnboardingDocs, PlacementListing, Products, ProviderData, QueryObject, SavedPlacement, StudentPlacementData, UserData, UserGroupData, WorkflowStage } from "./typeDefinitions";
|
|
3
|
+
import { OrganisationAddress } from "placementt-core";
|
|
4
4
|
type StudentPlacementListParams = {
|
|
5
5
|
user: UserData;
|
|
6
6
|
student?: UserData;
|
|
@@ -24,8 +24,9 @@ type InstitutePlacementParams = {
|
|
|
24
24
|
cohort?: string;
|
|
25
25
|
queryConstraint?: QueryConstraint[];
|
|
26
26
|
ql?: number;
|
|
27
|
+
inProgress?: boolean;
|
|
27
28
|
};
|
|
28
|
-
export declare function useNewInstitutePlacementList({ id, user, cohort, queryConstraint, ql }: InstitutePlacementParams): {
|
|
29
|
+
export declare function useNewInstitutePlacementList({ id, user, cohort, queryConstraint, ql, inProgress }: InstitutePlacementParams): {
|
|
29
30
|
placements: {
|
|
30
31
|
[key: string]: StudentPlacementData & {
|
|
31
32
|
student: UserData;
|
|
@@ -33,7 +34,7 @@ export declare function useNewInstitutePlacementList({ id, user, cohort, queryCo
|
|
|
33
34
|
} | undefined;
|
|
34
35
|
loadMoreIcon: boolean;
|
|
35
36
|
loadMorePlacements: (fStartPlacementAfter?: [QueryDocumentSnapshot<DocumentData> | undefined, number] | undefined) => Promise<void>;
|
|
36
|
-
setQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
37
|
+
setQuery: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
37
38
|
setInitialQueryLimit: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
38
39
|
reset: () => void;
|
|
39
40
|
changeQueryConstraints: (e: QueryConstraint[]) => void;
|
|
@@ -67,31 +68,38 @@ export declare function useFilterTablePaginator({ data }: {
|
|
|
67
68
|
setFilters: import("react").Dispatch<import("react").SetStateAction<{
|
|
68
69
|
[key: string]: unknown;
|
|
69
70
|
} | undefined>>;
|
|
71
|
+
page: number[];
|
|
70
72
|
};
|
|
71
73
|
export declare function usePlacementListingPaginator({ data, user }: {
|
|
72
74
|
data: QueryObject[];
|
|
73
75
|
user: UserData;
|
|
74
76
|
}): {
|
|
75
77
|
tableData: {
|
|
76
|
-
[key: string]: PlacementListing
|
|
78
|
+
[key: string]: PlacementListing & {
|
|
79
|
+
savedPlacement: SavedPlacement;
|
|
80
|
+
};
|
|
77
81
|
};
|
|
78
82
|
setPage: import("react").Dispatch<import("react").SetStateAction<number[]>>;
|
|
79
83
|
setFilters: import("react").Dispatch<import("react").SetStateAction<{
|
|
80
84
|
[key: string]: unknown;
|
|
81
85
|
} | undefined>>;
|
|
86
|
+
page: number[];
|
|
82
87
|
};
|
|
83
88
|
type UserPaginatorParams = {
|
|
84
89
|
user: UserData;
|
|
85
90
|
cohort?: string;
|
|
86
91
|
data: QueryObject[];
|
|
92
|
+
search?: string;
|
|
93
|
+
userType: "Staff" | "Students";
|
|
87
94
|
};
|
|
88
|
-
export declare function useCohortUserPaginator({ user, cohort, data }: UserPaginatorParams): {
|
|
95
|
+
export declare function useCohortUserPaginator({ user, cohort, data, search, userType }: UserPaginatorParams): {
|
|
89
96
|
tableData: {
|
|
90
97
|
[key: string]: {
|
|
91
98
|
[key: string]: unknown;
|
|
92
99
|
};
|
|
93
100
|
};
|
|
94
101
|
setPage: import("react").Dispatch<import("react").SetStateAction<number[]>>;
|
|
102
|
+
page: number[];
|
|
95
103
|
setFilters: import("react").Dispatch<import("react").SetStateAction<{
|
|
96
104
|
[key: string]: unknown;
|
|
97
105
|
} | undefined>>;
|
|
@@ -119,8 +127,11 @@ type LazyLoadQueryParams = {
|
|
|
119
127
|
number: number;
|
|
120
128
|
endResultsText?: string;
|
|
121
129
|
noResultsText?: string;
|
|
130
|
+
onItemFetched?: (item: unknown) => Promise<{
|
|
131
|
+
[key: string]: unknown;
|
|
132
|
+
}>;
|
|
122
133
|
};
|
|
123
|
-
export declare function useLazyLoadQueryList({ path, constraints, number }: LazyLoadQueryParams): {
|
|
134
|
+
export declare function useLazyLoadQueryList({ path, constraints, number, onItemFetched }: LazyLoadQueryParams): {
|
|
124
135
|
items: {
|
|
125
136
|
[key: string]: {
|
|
126
137
|
[key: string]: unknown;
|
|
@@ -130,6 +141,162 @@ export declare function useLazyLoadQueryList({ path, constraints, number }: Lazy
|
|
|
130
141
|
loadMoreIcon: boolean;
|
|
131
142
|
reset: () => void;
|
|
132
143
|
};
|
|
144
|
+
type PublicPlacementListingLoaderParams = {
|
|
145
|
+
providerId?: string;
|
|
146
|
+
number: number;
|
|
147
|
+
};
|
|
148
|
+
export declare function usePublicPlacementListingLoader({ providerId, number }: PublicPlacementListingLoaderParams): {
|
|
149
|
+
items: {
|
|
150
|
+
[key: string]: {
|
|
151
|
+
[key: string]: unknown;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
loadMore: () => Promise<void>;
|
|
155
|
+
loadMoreIcon: boolean;
|
|
156
|
+
reset: () => void;
|
|
157
|
+
};
|
|
158
|
+
export type ApplicationHookParams = {
|
|
159
|
+
successText: {
|
|
160
|
+
submitted: {
|
|
161
|
+
title: string;
|
|
162
|
+
desc: string;
|
|
163
|
+
};
|
|
164
|
+
draftSaved: {
|
|
165
|
+
title: string;
|
|
166
|
+
desc: string;
|
|
167
|
+
};
|
|
168
|
+
stageComplete: {
|
|
169
|
+
title: string;
|
|
170
|
+
desc: string;
|
|
171
|
+
};
|
|
172
|
+
outcome: {
|
|
173
|
+
title: string;
|
|
174
|
+
desc: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
setSuccessPopup: import("react").Dispatch<import("react").SetStateAction<"submitted" | "draftSaved" | "stageComplete" | "outcome" | undefined>>;
|
|
178
|
+
openSuccessPopup: (type: "submitted" | "draftSaved" | "stageComplete" | "outcome") => void;
|
|
179
|
+
setFApplication: import("react").Dispatch<import("react").SetStateAction<Partial<Application>>>;
|
|
180
|
+
fApplication: Partial<Application>;
|
|
181
|
+
draftSaved: boolean;
|
|
182
|
+
profileUrl: string | undefined;
|
|
183
|
+
successPopup: "submitted" | "draftSaved" | "stageComplete" | "outcome" | undefined;
|
|
184
|
+
fApplicationId: string | undefined;
|
|
185
|
+
fListing: PlacementListing | undefined;
|
|
186
|
+
student: UserData | undefined;
|
|
187
|
+
fProvider: {
|
|
188
|
+
details?: ProviderData;
|
|
189
|
+
profile?: string;
|
|
190
|
+
id?: string;
|
|
191
|
+
} | undefined;
|
|
192
|
+
onFApply: (draft?: boolean) => Promise<void>;
|
|
193
|
+
setFormComplete: (formId: string, e: {
|
|
194
|
+
[key: string]: unknown;
|
|
195
|
+
}) => void;
|
|
196
|
+
viewFile: (file: string, onOpen: (url: string) => void) => void;
|
|
197
|
+
addFile: (files: string[], fileId: number) => void;
|
|
198
|
+
uploadedFiles?: {
|
|
199
|
+
[key: string]: FileItem;
|
|
200
|
+
};
|
|
201
|
+
getCurrentStage: (stage: number) => Promise<{
|
|
202
|
+
stage: ApplicantStage;
|
|
203
|
+
completedSections: {
|
|
204
|
+
submitted?: string | undefined;
|
|
205
|
+
filesViewed?: string[] | undefined;
|
|
206
|
+
formsCompleted?: {
|
|
207
|
+
[key: string]: unknown;
|
|
208
|
+
} | undefined;
|
|
209
|
+
filesUploaded?: {
|
|
210
|
+
[key: number]: string[];
|
|
211
|
+
} | undefined;
|
|
212
|
+
};
|
|
213
|
+
}>;
|
|
214
|
+
currentStageComplete?: boolean;
|
|
215
|
+
progressStage: (type: number | "accept" | "reject", e?: {
|
|
216
|
+
feedback?: string;
|
|
217
|
+
}) => Promise<void>;
|
|
218
|
+
};
|
|
219
|
+
export declare function useCreateApplicationRenderer({ user, listingId, listing, provider, application, applicationId, orgContext }: {
|
|
220
|
+
user: UserData;
|
|
221
|
+
listingId: string;
|
|
222
|
+
applicationId?: string;
|
|
223
|
+
listing?: PlacementListing;
|
|
224
|
+
application?: Partial<Application>;
|
|
225
|
+
orgContext?: {
|
|
226
|
+
details: ProviderData;
|
|
227
|
+
addresses: {
|
|
228
|
+
[key: string]: OrganisationAddress;
|
|
229
|
+
};
|
|
230
|
+
applicantWorkflows: {
|
|
231
|
+
[key: string]: ApplicantWorkflow;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
provider?: {
|
|
235
|
+
details?: ProviderData;
|
|
236
|
+
profile?: string;
|
|
237
|
+
id?: string;
|
|
238
|
+
};
|
|
239
|
+
}): {
|
|
240
|
+
successText: {
|
|
241
|
+
submitted: {
|
|
242
|
+
title: string;
|
|
243
|
+
desc: string;
|
|
244
|
+
};
|
|
245
|
+
draftSaved: {
|
|
246
|
+
title: string;
|
|
247
|
+
desc: string;
|
|
248
|
+
};
|
|
249
|
+
stageComplete: {
|
|
250
|
+
title: string;
|
|
251
|
+
desc: string;
|
|
252
|
+
};
|
|
253
|
+
outcome: {
|
|
254
|
+
title: string;
|
|
255
|
+
desc: string;
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
onFApply: (draft?: boolean) => Promise<void>;
|
|
259
|
+
progressStage: (type: number | "accept" | "reject", e?: {
|
|
260
|
+
feedback?: string;
|
|
261
|
+
}) => Promise<void>;
|
|
262
|
+
currentStageComplete: boolean | undefined;
|
|
263
|
+
uploadedFiles: {
|
|
264
|
+
[key: string]: FileItem;
|
|
265
|
+
} | undefined;
|
|
266
|
+
getCurrentStage: (stage: number) => Promise<{
|
|
267
|
+
stage: ApplicantStage;
|
|
268
|
+
completedSections: {
|
|
269
|
+
submitted?: string | undefined;
|
|
270
|
+
filesViewed?: string[] | undefined;
|
|
271
|
+
formsCompleted?: {
|
|
272
|
+
[key: string]: unknown;
|
|
273
|
+
} | undefined;
|
|
274
|
+
filesUploaded?: {
|
|
275
|
+
[key: number]: string[];
|
|
276
|
+
} | undefined;
|
|
277
|
+
};
|
|
278
|
+
}>;
|
|
279
|
+
setFormComplete: (formId: string, e: {
|
|
280
|
+
[key: string]: unknown;
|
|
281
|
+
}) => void;
|
|
282
|
+
viewFile: (file: string, onOpen: (url: string) => void) => void;
|
|
283
|
+
addFile: (files: string[], fileId: number) => void;
|
|
284
|
+
setSuccessPopup: import("react").Dispatch<import("react").SetStateAction<"submitted" | "draftSaved" | "stageComplete" | "outcome" | undefined>>;
|
|
285
|
+
openSuccessPopup: (type: "submitted" | "draftSaved" | "stageComplete" | "outcome") => void;
|
|
286
|
+
setFApplication: import("react").Dispatch<import("react").SetStateAction<Partial<Application>>>;
|
|
287
|
+
fApplication: Partial<Application>;
|
|
288
|
+
draftSaved: boolean;
|
|
289
|
+
profileUrl: string | undefined;
|
|
290
|
+
successPopup: "submitted" | "draftSaved" | "stageComplete" | "outcome" | undefined;
|
|
291
|
+
fApplicationId: string | undefined;
|
|
292
|
+
fListing: PlacementListing | undefined;
|
|
293
|
+
student: UserData | undefined;
|
|
294
|
+
fProvider: {
|
|
295
|
+
details?: ProviderData;
|
|
296
|
+
profile?: string;
|
|
297
|
+
id?: string;
|
|
298
|
+
} | undefined;
|
|
299
|
+
};
|
|
133
300
|
export declare function useProposePlacementRenderer({ user, orgContext, placement }: {
|
|
134
301
|
user: UserData;
|
|
135
302
|
orgContext?: {
|
|
@@ -158,9 +325,7 @@ export declare function useProposePlacementRenderer({ user, orgContext, placemen
|
|
|
158
325
|
setBusinessSectionComplete: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
159
326
|
setAddressSectionComplete: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
160
327
|
setPlacementSectionComplete: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
161
|
-
proposePlacement: (draft?: boolean) => Promise<
|
|
162
|
-
screen: string;
|
|
163
|
-
}>;
|
|
328
|
+
proposePlacement: (draft?: boolean) => Promise<any>;
|
|
164
329
|
deletePlacement: (id: string) => Promise<void>;
|
|
165
330
|
setStudent: import("react").Dispatch<import("react").SetStateAction<UserData | undefined>>;
|
|
166
331
|
submitSection: (type: "dates" | "provider" | "address", data: {
|
|
@@ -183,12 +348,12 @@ type CreateCohortRendererParams = {
|
|
|
183
348
|
product: Products;
|
|
184
349
|
initialData?: CohortData;
|
|
185
350
|
};
|
|
186
|
-
export type CreateCohortStages = "
|
|
351
|
+
export type CreateCohortStages = "info" | "name" | "placementType" | "review";
|
|
187
352
|
export declare function useCreateCohortRenderer({ oId, product, initialData }: CreateCohortRendererParams): {
|
|
188
353
|
submitCohort: () => void;
|
|
189
354
|
submitSection: (e?: {
|
|
190
355
|
[key: string]: unknown;
|
|
191
|
-
}
|
|
356
|
+
}) => void;
|
|
192
357
|
back: () => void;
|
|
193
358
|
setCohortData: import("react").Dispatch<import("react").SetStateAction<CohortData>>;
|
|
194
359
|
deleteCohort: () => Promise<void>;
|
|
@@ -207,10 +372,10 @@ type UserUploadParams = {
|
|
|
207
372
|
};
|
|
208
373
|
export declare function useUserUploadHandler({ product, oId, userType, user, onComplete, userGroupId, cohortId }: UserUploadParams): {
|
|
209
374
|
uploadUsers: (users: {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
parentEmail?: string | undefined;
|
|
375
|
+
email?: string;
|
|
376
|
+
parentEmail?: string;
|
|
213
377
|
year: number;
|
|
378
|
+
[key: string]: unknown;
|
|
214
379
|
}[]) => Promise<void>;
|
|
215
380
|
alert: {
|
|
216
381
|
severity: "warning" | "error" | "success" | "info";
|
|
@@ -220,25 +385,29 @@ export declare function useUserUploadHandler({ product, oId, userType, user, onC
|
|
|
220
385
|
};
|
|
221
386
|
type WorkflowEditorParams = {
|
|
222
387
|
user: UserData;
|
|
223
|
-
initialData?: WorkflowStage[];
|
|
388
|
+
initialData?: WorkflowStage[] | ApplicantStage[];
|
|
224
389
|
onSubmit: (e: {
|
|
225
390
|
workflow: WorkflowStage[];
|
|
226
391
|
includedFiles: string[];
|
|
227
392
|
includedForms: string[];
|
|
228
393
|
}) => void;
|
|
229
|
-
cohortId
|
|
230
|
-
product?:
|
|
394
|
+
cohortId?: string;
|
|
395
|
+
product?: Products;
|
|
231
396
|
oId?: string;
|
|
232
397
|
};
|
|
233
|
-
export declare function useWorkflowEditor({ user, initialData, onSubmit, cohortId
|
|
398
|
+
export declare function useWorkflowEditor({ user, initialData, onSubmit, cohortId }: WorkflowEditorParams): {
|
|
234
399
|
filePopupActive: boolean;
|
|
235
400
|
files: {
|
|
236
401
|
name: string;
|
|
237
402
|
url: string;
|
|
238
403
|
}[];
|
|
239
404
|
uploadFile: (files: any[]) => Promise<void>;
|
|
240
|
-
addNode: (
|
|
241
|
-
|
|
405
|
+
addNode: ({ userType, nextStage, prevStage }?: {
|
|
406
|
+
userType?: "Students" | "Staff" | "Provider" | "Parent";
|
|
407
|
+
nextStage?: number;
|
|
408
|
+
prevStage?: number;
|
|
409
|
+
}) => number;
|
|
410
|
+
onDelete: (id?: number) => Promise<void>;
|
|
242
411
|
arrows: ArrowObject[];
|
|
243
412
|
onChange: (path: (string | number)[], value: unknown) => void;
|
|
244
413
|
error: string | undefined;
|
|
@@ -249,7 +418,7 @@ export declare function useWorkflowEditor({ user, initialData, onSubmit, cohortI
|
|
|
249
418
|
setTutorialActive: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
250
419
|
setFilePopupActive: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
251
420
|
includedForms: string[];
|
|
252
|
-
submitWorkflow: () => Promise<void>;
|
|
421
|
+
submitWorkflow: (workflow?: WorkflowStage[] | ApplicantStage[], callOnComplete?: boolean) => Promise<false | void>;
|
|
253
422
|
openPopup: () => void;
|
|
254
423
|
snackbar: string | undefined;
|
|
255
424
|
setSnackbar: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
@@ -264,7 +433,55 @@ export declare function useWorkflowEditor({ user, initialData, onSubmit, cohortI
|
|
|
264
433
|
containerRef: import("react").RefObject<HTMLFormElement>;
|
|
265
434
|
setError: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
266
435
|
setArrows: import("react").Dispatch<import("react").SetStateAction<ArrowObject[]>>;
|
|
267
|
-
setWorkflowNodes: import("react").Dispatch<import("react").SetStateAction<WorkflowStage[]>>;
|
|
436
|
+
setWorkflowNodes: import("react").Dispatch<import("react").SetStateAction<ApplicantStage[] | WorkflowStage[]>>;
|
|
437
|
+
};
|
|
438
|
+
type ApplicantWorkflowEditorParams = {
|
|
439
|
+
user: UserData;
|
|
440
|
+
initialData?: ApplicantStage[];
|
|
441
|
+
onSubmit: (e: {
|
|
442
|
+
workflow: ApplicantStage[];
|
|
443
|
+
includedFiles: string[];
|
|
444
|
+
includedForms: string[];
|
|
445
|
+
}) => void;
|
|
446
|
+
workflowId?: string;
|
|
447
|
+
product?: Products;
|
|
448
|
+
oId?: string;
|
|
449
|
+
};
|
|
450
|
+
export declare function useApplicantWorkflowEditor({ user, initialData, onSubmit, workflowId }: ApplicantWorkflowEditorParams): {
|
|
451
|
+
filePopupActive: boolean;
|
|
452
|
+
uploadFile: (files: any[]) => Promise<void>;
|
|
453
|
+
addNode: ({ userType, nextStage, prevStage }?: {
|
|
454
|
+
userType?: "Students" | "Staff";
|
|
455
|
+
nextStage?: number;
|
|
456
|
+
prevStage?: number;
|
|
457
|
+
}) => number;
|
|
458
|
+
onDelete: (id?: number) => Promise<void>;
|
|
459
|
+
arrows: ArrowObject[];
|
|
460
|
+
onChange: (path: (string | number)[], value: unknown) => void;
|
|
461
|
+
error: string | undefined;
|
|
462
|
+
includedFiles: string[];
|
|
463
|
+
onMoveEnd: (id: number, currentRef?: HTMLDivElement) => void;
|
|
464
|
+
addEdgePoint: (id: number, existingEdgePoint: number) => void;
|
|
465
|
+
newEdgePoint: number | undefined;
|
|
466
|
+
setTutorialActive: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
467
|
+
setFilePopupActive: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
468
|
+
includedForms: string[];
|
|
469
|
+
submitWorkflow: (workflow?: ApplicantStage[], callOnComplete?: boolean) => Promise<false | void>;
|
|
470
|
+
openPopup: () => void;
|
|
471
|
+
snackbar: string | undefined;
|
|
472
|
+
setSnackbar: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
473
|
+
setMousePosFunc: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
474
|
+
mousePos: {
|
|
475
|
+
x: number;
|
|
476
|
+
y: number;
|
|
477
|
+
} | undefined;
|
|
478
|
+
tutorialActive: boolean;
|
|
479
|
+
onDeleteArrow: (data: ArrowObject) => void;
|
|
480
|
+
workflowNodes: ApplicantStage[];
|
|
481
|
+
containerRef: import("react").RefObject<HTMLFormElement>;
|
|
482
|
+
setError: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
483
|
+
setArrows: import("react").Dispatch<import("react").SetStateAction<ArrowObject[]>>;
|
|
484
|
+
setWorkflowNodes: import("react").Dispatch<import("react").SetStateAction<ApplicantStage[]>>;
|
|
268
485
|
};
|
|
269
486
|
type InstitutePlacementListingUploadParams = {
|
|
270
487
|
user: UserData;
|
|
@@ -289,4 +506,148 @@ export declare function useInstitutePlacementListingHandler({ user }: InstituteP
|
|
|
289
506
|
} | undefined;
|
|
290
507
|
onChange: () => void;
|
|
291
508
|
};
|
|
509
|
+
export declare function useGetIndividualPlacementForPlacementPage({ user, placementId, organisation }: {
|
|
510
|
+
user: UserData;
|
|
511
|
+
placementId: string;
|
|
512
|
+
organisation?: {
|
|
513
|
+
details: InstituteData | ProviderData;
|
|
514
|
+
cohorts: {
|
|
515
|
+
[key: string]: CohortData;
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
}): {
|
|
519
|
+
placement: StudentPlacementData | undefined;
|
|
520
|
+
wStage: WorkflowStage | undefined;
|
|
521
|
+
student: UserData | undefined;
|
|
522
|
+
workflow: WorkflowStage[] | undefined;
|
|
523
|
+
editable: boolean;
|
|
524
|
+
withdrawFromPlacementPopup: boolean;
|
|
525
|
+
setWithdrawFromPlacementPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
526
|
+
withdrawFromPlacement: () => Promise<void>;
|
|
527
|
+
onFlagClick: (e: FlagCodes) => Promise<void>;
|
|
528
|
+
setUploadInsurance: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
529
|
+
setUploadProviderDocPopup: import("react").Dispatch<import("react").SetStateAction<"insurance" | "riskAssessment" | "DbsCheck" | undefined>>;
|
|
530
|
+
setUploadRA: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
531
|
+
setUploadDBS: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
532
|
+
onboardingStatus: "Add onboarding documents" | "Onboarding sent" | "Onboarding docs completed" | "Onboarding docs approved" | "Complete onboarding";
|
|
533
|
+
setSkipStagePopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
534
|
+
onboardingPopup: boolean;
|
|
535
|
+
setViewExternalLinkPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
536
|
+
setOnboardingPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
537
|
+
setRejectELIPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
538
|
+
eliURL: string;
|
|
539
|
+
riskAssessmentURL: string;
|
|
540
|
+
dbsCheckURL: string;
|
|
541
|
+
setExternalLinkCopied: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
542
|
+
skipStagePopup: boolean;
|
|
543
|
+
snackbar: {
|
|
544
|
+
open: boolean;
|
|
545
|
+
message?: string;
|
|
546
|
+
};
|
|
547
|
+
setSnackbar: import("react").Dispatch<import("react").SetStateAction<{
|
|
548
|
+
open: boolean;
|
|
549
|
+
message?: string;
|
|
550
|
+
}>>;
|
|
551
|
+
cohort: CohortData | undefined;
|
|
552
|
+
disableEmail: {
|
|
553
|
+
parent: boolean;
|
|
554
|
+
provider: boolean;
|
|
555
|
+
};
|
|
556
|
+
rejectELIPopup: boolean;
|
|
557
|
+
eliPopupOpen: boolean;
|
|
558
|
+
rejectExternalDocPopup: false | "riskAssessment" | "dbsCheck";
|
|
559
|
+
externalDocPopupOpen: false | "riskAssessment" | "dbsCheck";
|
|
560
|
+
viewExternalLinkPopup: boolean;
|
|
561
|
+
externalLinkCopied: boolean;
|
|
562
|
+
uploadInsurance: boolean;
|
|
563
|
+
uploadRA: boolean;
|
|
564
|
+
uploadDBS: boolean;
|
|
565
|
+
editStage: (nextStageId: number) => Promise<void>;
|
|
566
|
+
sendEmail: (type: "provider" | "parent") => undefined;
|
|
567
|
+
canEdit: boolean;
|
|
568
|
+
approveELI: () => Promise<void>;
|
|
569
|
+
setEliPopupOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
570
|
+
uploadProviderDocPopup: "insurance" | "riskAssessment" | "DbsCheck" | undefined;
|
|
571
|
+
rejectELI: ({ reason }: {
|
|
572
|
+
reason: string;
|
|
573
|
+
}) => Promise<void>;
|
|
574
|
+
setRejectExternalDocPopup: import("react").Dispatch<import("react").SetStateAction<false | "riskAssessment" | "dbsCheck">>;
|
|
575
|
+
setExternalDocPopupOpen: import("react").Dispatch<import("react").SetStateAction<false | "riskAssessment" | "dbsCheck">>;
|
|
576
|
+
approveProviderDoc: (type: "riskAssessment" | "dbsCheck") => Promise<void>;
|
|
577
|
+
rejectProviderDoc: ({ reason }: {
|
|
578
|
+
reason: string;
|
|
579
|
+
}, type: "riskAssessment" | "dbsCheck") => Promise<void>;
|
|
580
|
+
manuallyConfigureProvider: () => Promise<void>;
|
|
581
|
+
institute: InstituteData | undefined;
|
|
582
|
+
};
|
|
583
|
+
export declare function useOnboardingPopup({ onboarding, placementId, user, onClose }: {
|
|
584
|
+
onboarding: (OnboardingDocs & {
|
|
585
|
+
completed: {
|
|
586
|
+
submitted: string | false;
|
|
587
|
+
accepted?: boolean;
|
|
588
|
+
filesViewed?: string[];
|
|
589
|
+
formsCompleted?: {
|
|
590
|
+
[key: string]: unknown;
|
|
591
|
+
};
|
|
592
|
+
filesUploaded?: {
|
|
593
|
+
[key: number]: string[];
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
});
|
|
597
|
+
placementId: string;
|
|
598
|
+
user: UserData;
|
|
599
|
+
onClose: () => void;
|
|
600
|
+
}): {
|
|
601
|
+
addFile: (files: string[]) => void;
|
|
602
|
+
viewFile: (file: string, onOpen: (url: string) => void) => void;
|
|
603
|
+
uploadedFiles: {
|
|
604
|
+
[key: string]: FileItem;
|
|
605
|
+
};
|
|
606
|
+
setFormComplete: (e: {
|
|
607
|
+
[key: string]: unknown;
|
|
608
|
+
}, formId?: string) => void;
|
|
609
|
+
setRejectPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
610
|
+
stagesCompleted: () => boolean;
|
|
611
|
+
setForm: import("react").Dispatch<import("react").SetStateAction<{
|
|
612
|
+
[key: string]: unknown;
|
|
613
|
+
id: string;
|
|
614
|
+
name: string;
|
|
615
|
+
} | undefined>>;
|
|
616
|
+
mOnboarding: OnboardingDocs & {
|
|
617
|
+
completed: {
|
|
618
|
+
submitted: string | false;
|
|
619
|
+
accepted?: boolean;
|
|
620
|
+
filesViewed?: string[];
|
|
621
|
+
formsCompleted?: {
|
|
622
|
+
[key: string]: unknown;
|
|
623
|
+
};
|
|
624
|
+
filesUploaded?: {
|
|
625
|
+
[key: number]: string[];
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
};
|
|
629
|
+
form: {
|
|
630
|
+
[key: string]: unknown;
|
|
631
|
+
id: string;
|
|
632
|
+
name: string;
|
|
633
|
+
} | undefined;
|
|
634
|
+
submit: () => Promise<void>;
|
|
635
|
+
acceptOnboarding: () => Promise<void>;
|
|
636
|
+
rejectOnboarding: ({ reason }: {
|
|
637
|
+
reason: string;
|
|
638
|
+
}) => Promise<void>;
|
|
639
|
+
rejectPopup: boolean;
|
|
640
|
+
completedSections: {
|
|
641
|
+
submitted: string | false;
|
|
642
|
+
filesViewed?: string[] | undefined;
|
|
643
|
+
formsCompleted?: {
|
|
644
|
+
[key: string]: unknown;
|
|
645
|
+
} | undefined;
|
|
646
|
+
filesUploaded?: {
|
|
647
|
+
[key: number]: string[];
|
|
648
|
+
} | undefined;
|
|
649
|
+
} | undefined;
|
|
650
|
+
fileUploadPopup: number | false;
|
|
651
|
+
setFileUploadPopup: import("react").Dispatch<import("react").SetStateAction<number | false>>;
|
|
652
|
+
};
|
|
292
653
|
export {};
|