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.
Files changed (135) hide show
  1. package/.eslintrc.js +40 -40
  2. package/.gitattributes +2 -2
  3. package/lib/config.d.ts +0 -1
  4. package/lib/constants.d.ts +5 -2
  5. package/lib/constants.js +130 -136
  6. package/lib/constants.js.map +1 -1
  7. package/lib/features/analytics/useAnalytics.d.ts +0 -1
  8. package/lib/features/analytics/useAnalytics.js +3 -4
  9. package/lib/features/analytics/useAnalytics.js.map +1 -1
  10. package/lib/features/config.d.ts +133 -133
  11. package/lib/features/config.js +35 -35
  12. package/lib/features/contacts/contacts.d.ts +75 -75
  13. package/lib/features/contacts/contacts.js +105 -105
  14. package/lib/features/contacts/contactsSlice.d.ts +5 -5
  15. package/lib/features/contacts/useContacts.js +1 -2
  16. package/lib/features/contacts/useContacts.js.map +1 -1
  17. package/lib/features/downtime/useDowntime.d.ts +11 -11
  18. package/lib/features/downtime/useDowntime.js +22 -22
  19. package/lib/features/dropdown/useDropdown.d.ts +2 -3
  20. package/lib/features/dropdown/useDropdown.js +1 -2
  21. package/lib/features/dropdown/useDropdown.js.map +1 -1
  22. package/lib/features/global/downtime/useDowntime.d.ts +0 -1
  23. package/lib/features/global/downtime/useDowntime.js +3 -2
  24. package/lib/features/global/downtime/useDowntime.js.map +1 -1
  25. package/lib/features/global/users/useUserFunctions.d.ts +0 -1
  26. package/lib/features/global/users/useUserFunctions.js +6 -7
  27. package/lib/features/global/users/useUserFunctions.js.map +1 -1
  28. package/lib/features/placements/studentPlacements/activePlacement.d.ts +1 -1
  29. package/lib/features/placements/studentPlacements/activePlacement.js +1 -1
  30. package/lib/features/placements/studentPlacements/activePlacement.js.map +1 -1
  31. package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.d.ts +4 -5
  32. package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.js +1 -4
  33. package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.js.map +1 -1
  34. package/lib/features/placements/studentPlacements/studentPlacementsSlice.d.ts +63 -63
  35. package/lib/features/placements/studentPlacements/studentPlacementsSlice.js +81 -81
  36. package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.d.ts +4 -4
  37. package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.js +1 -1
  38. package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.js.map +1 -1
  39. package/lib/features/placements/studentPlacements/useStudentPlacements.d.ts +0 -1
  40. package/lib/features/placements/studentPlacements/useStudentPlacements.js +1 -2
  41. package/lib/features/placements/studentPlacements/useStudentPlacements.js.map +1 -1
  42. package/lib/features/providerPlacements/providerPlacementsSlice.d.ts +19 -19
  43. package/lib/features/providerPlacements/providerPlacementsSlice.js +24 -24
  44. package/lib/features/referrals/useReferrals.d.ts +0 -1
  45. package/lib/features/referrals/useReferrals.js +1 -2
  46. package/lib/features/referrals/useReferrals.js.map +1 -1
  47. package/lib/features/studentPlacements/studentPlacementsSlice.d.ts +62 -62
  48. package/lib/features/studentPlacements/studentPlacementsSlice.js +87 -87
  49. package/lib/features/studentPlacements/useStudentPlacements.d.ts +6 -6
  50. package/lib/features/studentPlacements/useStudentPlacements.js +18 -18
  51. package/lib/features/updates/useUpdates.js +1 -2
  52. package/lib/features/updates/useUpdates.js.map +1 -1
  53. package/lib/features/userSlice.d.ts +26 -26
  54. package/lib/features/userSlice.js +23 -23
  55. package/lib/features/users/useUserFunctions.d.ts +25 -25
  56. package/lib/features/users/useUserFunctions.js +124 -124
  57. package/lib/features/users/userSlice.d.ts +46 -46
  58. package/lib/features/users/userSlice.js +48 -48
  59. package/lib/firebase/firebase.d.ts +1 -1
  60. package/lib/firebase/firebase.js +9 -4
  61. package/lib/firebase/firebase.js.map +1 -1
  62. package/lib/firebase/firebaseConfig.js +3 -0
  63. package/lib/firebase/firebaseConfig.js.map +1 -1
  64. package/lib/firebase/firebaseQuery.js +3 -0
  65. package/lib/firebase/firebaseQuery.js.map +1 -1
  66. package/lib/firebase/persistence.js +2 -2
  67. package/lib/firebase/persistence.js.map +1 -1
  68. package/lib/firebase/readDatabase.d.ts +9 -6
  69. package/lib/firebase/readDatabase.js +16 -6
  70. package/lib/firebase/readDatabase.js.map +1 -1
  71. package/lib/firebase/util.d.ts +3 -4
  72. package/lib/firebase/util.js +49 -4
  73. package/lib/firebase/util.js.map +1 -1
  74. package/lib/firebase/writeDatabase.d.ts +3 -3
  75. package/lib/firebase/writeDatabase.js +7 -1
  76. package/lib/firebase/writeDatabase.js.map +1 -1
  77. package/lib/hooks.d.ts +384 -23
  78. package/lib/hooks.js +1342 -223
  79. package/lib/hooks.js.map +1 -1
  80. package/lib/images/GatsbyBenchmarks.d.ts +0 -1
  81. package/lib/images/GatsbyBenchmarks.js +1 -1
  82. package/lib/images/GatsbyBenchmarks.js.map +1 -1
  83. package/lib/reduxHooks.d.ts +11 -20
  84. package/lib/reduxHooks.js +28 -18
  85. package/lib/reduxHooks.js.map +1 -1
  86. package/lib/tasksAndTips.d.ts +25 -5
  87. package/lib/tasksAndTips.js +346 -48
  88. package/lib/tasksAndTips.js.map +1 -1
  89. package/lib/typeDefinitions.d.ts +478 -53
  90. package/lib/util.d.ts +1 -0
  91. package/lib/util.js +78 -6
  92. package/lib/util.js.map +1 -1
  93. package/package.json +52 -49
  94. package/src/DatabaseDefinitions.ts +18 -18
  95. package/src/apiCalls.ts +128 -128
  96. package/src/config.ts +50 -50
  97. package/src/constants.ts +708 -707
  98. package/src/databaseTypes.ts +42 -42
  99. package/src/features/analytics/useAnalytics.tsx +55 -55
  100. package/src/features/contacts/contactsSlice.ts +147 -147
  101. package/src/features/contacts/useContacts.tsx +73 -73
  102. package/src/features/dropdown/useDropdown.tsx +52 -52
  103. package/src/features/global/downtime/useDowntime.tsx +19 -18
  104. package/src/features/global/users/useUserFunctions.tsx +132 -132
  105. package/src/features/jobs/jobsSlice.ts +65 -65
  106. package/src/features/placements/studentPlacements/activePlacement.ts +63 -63
  107. package/src/features/placements/studentPlacements/completedStudentPlacementsSlice.ts +94 -97
  108. package/src/features/placements/studentPlacements/upcomingStudentPlacementsSlice.ts +108 -108
  109. package/src/features/placements/studentPlacements/useStudentPlacements.tsx +33 -33
  110. package/src/features/placements/types.ts +10 -10
  111. package/src/features/referrals/useReferrals.tsx +56 -56
  112. package/src/features/updates/useUpdates.tsx +36 -36
  113. package/src/firebase/firebase.tsx +142 -138
  114. package/src/firebase/firebaseConfig.tsx +45 -42
  115. package/src/firebase/firebaseQuery.tsx +143 -140
  116. package/src/firebase/persistence.ts +84 -84
  117. package/src/firebase/readDatabase.tsx +208 -197
  118. package/src/firebase/util.tsx +352 -308
  119. package/src/firebase/writeDatabase.tsx +75 -68
  120. package/src/hooks.tsx +3395 -1943
  121. package/src/images/GatsbyBenchmarks.tsx +711 -711
  122. package/src/images/LogFuturePlacement.jsx +64 -64
  123. package/src/images/LogPreviousPlacement.jsx +228 -228
  124. package/src/images/gatsby_benchmarks.svg +466 -466
  125. package/src/images/log_future_placement.svg +114 -114
  126. package/src/images/log_previous_placement.svg +199 -199
  127. package/src/index.ts +34 -34
  128. package/src/readDatabase.tsx +3 -3
  129. package/src/reduxHooks.ts +183 -170
  130. package/src/tasksAndTips.ts +744 -410
  131. package/src/tutorialTips.ts +58 -58
  132. package/src/typeDefinitions.ts +899 -503
  133. package/src/util.ts +132 -47
  134. package/tsconfig.dev.json +5 -5
  135. 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 = "name" | "placementType" | "students" | "workflow" | "review";
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
- } | undefined) => void;
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
- [key: string]: unknown;
211
- email?: string | undefined;
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: string;
230
- product?: "providers" | "institutes";
394
+ cohortId?: string;
395
+ product?: Products;
231
396
  oId?: string;
232
397
  };
233
- export declare function useWorkflowEditor({ user, initialData, onSubmit, cohortId, product, oId }: WorkflowEditorParams): {
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: () => void;
241
- onDelete: (id: number) => void;
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 {};