placementt-core 1.20.211 → 1.20.213

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 (84) hide show
  1. package/lib/config.d.ts +0 -1
  2. package/lib/constants.d.ts +17 -2
  3. package/lib/constants.js +206 -136
  4. package/lib/constants.js.map +1 -1
  5. package/lib/features/analytics/useAnalytics.d.ts +0 -1
  6. package/lib/features/analytics/useAnalytics.js +4 -7
  7. package/lib/features/analytics/useAnalytics.js.map +1 -1
  8. package/lib/features/contacts/contactsSlice.d.ts +5 -5
  9. package/lib/features/contacts/useContacts.js +1 -2
  10. package/lib/features/contacts/useContacts.js.map +1 -1
  11. package/lib/features/dropdown/useDropdown.d.ts +2 -3
  12. package/lib/features/dropdown/useDropdown.js +1 -2
  13. package/lib/features/dropdown/useDropdown.js.map +1 -1
  14. package/lib/features/global/downtime/useDowntime.d.ts +0 -1
  15. package/lib/features/global/downtime/useDowntime.js +1 -2
  16. package/lib/features/global/downtime/useDowntime.js.map +1 -1
  17. package/lib/features/global/users/useUserFunctions.d.ts +0 -1
  18. package/lib/features/global/users/useUserFunctions.js +7 -8
  19. package/lib/features/global/users/useUserFunctions.js.map +1 -1
  20. package/lib/features/jobs/jobsSlice.d.ts +10 -2
  21. package/lib/features/jobs/jobsSlice.js +5 -2
  22. package/lib/features/jobs/jobsSlice.js.map +1 -1
  23. package/lib/features/placements/studentPlacements/activePlacement.d.ts +1 -1
  24. package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.d.ts +2 -2
  25. package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.d.ts +2 -2
  26. package/lib/features/placements/studentPlacements/useStudentPlacements.d.ts +0 -1
  27. package/lib/features/placements/studentPlacements/useStudentPlacements.js +1 -2
  28. package/lib/features/placements/studentPlacements/useStudentPlacements.js.map +1 -1
  29. package/lib/features/referrals/useReferrals.d.ts +0 -1
  30. package/lib/features/referrals/useReferrals.js +1 -2
  31. package/lib/features/referrals/useReferrals.js.map +1 -1
  32. package/lib/features/updates/useUpdates.js +1 -2
  33. package/lib/features/updates/useUpdates.js.map +1 -1
  34. package/lib/firebase/firebase.d.ts +4 -2
  35. package/lib/firebase/firebase.js +14 -7
  36. package/lib/firebase/firebase.js.map +1 -1
  37. package/lib/firebase/firebaseConfig.js +3 -0
  38. package/lib/firebase/firebaseConfig.js.map +1 -1
  39. package/lib/firebase/firebaseQuery.d.ts +6 -2
  40. package/lib/firebase/firebaseQuery.js +14 -3
  41. package/lib/firebase/firebaseQuery.js.map +1 -1
  42. package/lib/firebase/persistence.js +2 -2
  43. package/lib/firebase/persistence.js.map +1 -1
  44. package/lib/firebase/readDatabase.d.ts +8 -7
  45. package/lib/firebase/readDatabase.js +41 -8
  46. package/lib/firebase/readDatabase.js.map +1 -1
  47. package/lib/firebase/util.d.ts +3 -4
  48. package/lib/firebase/util.js +49 -4
  49. package/lib/firebase/util.js.map +1 -1
  50. package/lib/firebase/writeDatabase.d.ts +7 -3
  51. package/lib/firebase/writeDatabase.js +9 -2
  52. package/lib/firebase/writeDatabase.js.map +1 -1
  53. package/lib/hooks.d.ts +562 -23
  54. package/lib/hooks.js +2134 -249
  55. package/lib/hooks.js.map +1 -1
  56. package/lib/images/GatsbyBenchmarks.d.ts +0 -1
  57. package/lib/images/GatsbyBenchmarks.js +1 -1
  58. package/lib/images/GatsbyBenchmarks.js.map +1 -1
  59. package/lib/reduxHooks.d.ts +82 -2
  60. package/lib/reduxHooks.js +108 -17
  61. package/lib/reduxHooks.js.map +1 -1
  62. package/lib/tasksAndTips.d.ts +28 -6
  63. package/lib/tasksAndTips.js +780 -49
  64. package/lib/tasksAndTips.js.map +1 -1
  65. package/lib/typeDefinitions.d.ts +547 -59
  66. package/lib/util.d.ts +8 -2
  67. package/lib/util.js +91 -7
  68. package/lib/util.js.map +1 -1
  69. package/package.json +8 -3
  70. package/src/constants.ts +218 -138
  71. package/src/features/analytics/useAnalytics.tsx +1 -2
  72. package/src/features/global/users/useUserFunctions.tsx +1 -1
  73. package/src/features/jobs/jobsSlice.ts +9 -3
  74. package/src/firebase/firebase.tsx +16 -9
  75. package/src/firebase/firebaseConfig.tsx +4 -1
  76. package/src/firebase/firebaseQuery.tsx +14 -3
  77. package/src/firebase/readDatabase.tsx +46 -8
  78. package/src/firebase/util.tsx +48 -4
  79. package/src/firebase/writeDatabase.tsx +12 -3
  80. package/src/hooks.tsx +2896 -501
  81. package/src/reduxHooks.ts +119 -17
  82. package/src/tasksAndTips.ts +825 -58
  83. package/src/typeDefinitions.ts +515 -72
  84. package/src/util.ts +116 -13
package/lib/hooks.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
- import { DocumentData, QueryConstraint, QueryDocumentSnapshot } from "firebase/firestore";
3
- import { ArrowObject, CohortData, InstituteData, PlacementListing, Products, QueryObject, StudentPlacementData, UserData, UserGroupData, WorkflowStage } from "./typeDefinitions";
1
+ import { DocumentData, QueryConstraint, QueryDocumentSnapshot, QueryFieldFilterConstraint } from "firebase/firestore";
2
+ import { ApplicantStage, ApplicantWorkflow, Application, ArrowObject, CohortData, CustomFormSchema, FileItem, FlagCodes, InstituteData, OnboardingDocs, PlacementListing, Products, ProviderData, QueryObject, QueryObjectConstraint, 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,18 @@ 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
+ type NewInstitutePlacementParams = {
30
+ id?: string;
31
+ user: UserData;
32
+ cohort?: string;
33
+ queryConstraints?: QueryObjectConstraint;
34
+ ql?: number;
35
+ inProgress?: boolean;
36
+ view: "list" | "table";
37
+ };
38
+ export declare function useOldInstitutePlacementList({ id, user, cohort, queryConstraint, ql, inProgress }: InstitutePlacementParams): {
29
39
  placements: {
30
40
  [key: string]: StudentPlacementData & {
31
41
  student: UserData;
@@ -33,12 +43,25 @@ export declare function useNewInstitutePlacementList({ id, user, cohort, queryCo
33
43
  } | undefined;
34
44
  loadMoreIcon: boolean;
35
45
  loadMorePlacements: (fStartPlacementAfter?: [QueryDocumentSnapshot<DocumentData> | undefined, number] | undefined) => Promise<void>;
36
- setQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
46
+ setQuery: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
37
47
  setInitialQueryLimit: import("react").Dispatch<import("react").SetStateAction<number>>;
38
48
  reset: () => void;
39
49
  changeQueryConstraints: (e: QueryConstraint[]) => void;
40
50
  };
41
- export declare function useOldInstitutePlacementList({ user, cohort, queryConstraint, ql }: InstitutePlacementParams): {
51
+ export declare function useNewInstitutePlacementList({ id, user, view, cohort, queryConstraints, ql, inProgress }: NewInstitutePlacementParams): {
52
+ tableData: {
53
+ [key: string]: {
54
+ [key: string]: unknown;
55
+ };
56
+ };
57
+ page: number;
58
+ loading: boolean | "loaded";
59
+ updateSearch: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
60
+ setFilters: import("react").Dispatch<import("react").SetStateAction<FilterObject | undefined>>;
61
+ pageUp: () => void;
62
+ pageDown: () => void;
63
+ };
64
+ export declare function useVeryOldInstitutePlacementList({ user, cohort, queryConstraint, ql }: InstitutePlacementParams): {
42
65
  placements: {
43
66
  [key: string]: StudentPlacementData & {
44
67
  student: UserData;
@@ -67,31 +90,38 @@ export declare function useFilterTablePaginator({ data }: {
67
90
  setFilters: import("react").Dispatch<import("react").SetStateAction<{
68
91
  [key: string]: unknown;
69
92
  } | undefined>>;
93
+ page: number[];
70
94
  };
71
95
  export declare function usePlacementListingPaginator({ data, user }: {
72
96
  data: QueryObject[];
73
97
  user: UserData;
74
98
  }): {
75
99
  tableData: {
76
- [key: string]: PlacementListing;
100
+ [key: string]: PlacementListing & {
101
+ savedPlacement: SavedPlacement;
102
+ };
77
103
  };
78
104
  setPage: import("react").Dispatch<import("react").SetStateAction<number[]>>;
79
105
  setFilters: import("react").Dispatch<import("react").SetStateAction<{
80
106
  [key: string]: unknown;
81
107
  } | undefined>>;
108
+ page: number[];
82
109
  };
83
110
  type UserPaginatorParams = {
84
111
  user: UserData;
85
112
  cohort?: string;
86
113
  data: QueryObject[];
114
+ search?: string;
115
+ userType: "Staff" | "Students";
87
116
  };
88
- export declare function useCohortUserPaginator({ user, cohort, data }: UserPaginatorParams): {
117
+ export declare function useCohortUserPaginator({ user, cohort, data, search, userType }: UserPaginatorParams): {
89
118
  tableData: {
90
119
  [key: string]: {
91
120
  [key: string]: unknown;
92
121
  };
93
122
  };
94
123
  setPage: import("react").Dispatch<import("react").SetStateAction<number[]>>;
124
+ page: number[];
95
125
  setFilters: import("react").Dispatch<import("react").SetStateAction<{
96
126
  [key: string]: unknown;
97
127
  } | undefined>>;
@@ -119,8 +149,25 @@ type LazyLoadQueryParams = {
119
149
  number: number;
120
150
  endResultsText?: string;
121
151
  noResultsText?: string;
152
+ onItemFetched?: (item: unknown) => Promise<{
153
+ [key: string]: unknown;
154
+ }>;
155
+ };
156
+ export declare function useLazyLoadQueryList({ path, constraints, number, onItemFetched }: LazyLoadQueryParams): {
157
+ items: {
158
+ [key: string]: {
159
+ [key: string]: unknown;
160
+ };
161
+ };
162
+ loadMore: () => Promise<void>;
163
+ loadMoreIcon: boolean;
164
+ reset: () => void;
122
165
  };
123
- export declare function useLazyLoadQueryList({ path, constraints, number }: LazyLoadQueryParams): {
166
+ type PublicPlacementListingLoaderParams = {
167
+ providerId?: string;
168
+ number: number;
169
+ };
170
+ export declare function usePublicPlacementListingLoader({ providerId, number }: PublicPlacementListingLoaderParams): {
124
171
  items: {
125
172
  [key: string]: {
126
173
  [key: string]: unknown;
@@ -130,6 +177,148 @@ export declare function useLazyLoadQueryList({ path, constraints, number }: Lazy
130
177
  loadMoreIcon: boolean;
131
178
  reset: () => void;
132
179
  };
180
+ export type ApplicationHookParams = {
181
+ successText: {
182
+ submitted: {
183
+ title: string;
184
+ desc: string;
185
+ };
186
+ draftSaved: {
187
+ title: string;
188
+ desc: string;
189
+ };
190
+ stageComplete: {
191
+ title: string;
192
+ desc: string;
193
+ };
194
+ outcome: {
195
+ title: string;
196
+ desc: string;
197
+ };
198
+ };
199
+ setSuccessPopup: import("react").Dispatch<import("react").SetStateAction<"submitted" | "draftSaved" | "stageComplete" | "outcome" | undefined>>;
200
+ openSuccessPopup: (type: "submitted" | "draftSaved" | "stageComplete" | "outcome") => void;
201
+ setFApplication: import("react").Dispatch<import("react").SetStateAction<Partial<Application>>>;
202
+ fApplication: Partial<Application>;
203
+ draftSaved: boolean;
204
+ profileUrl: string | undefined;
205
+ successPopup: "submitted" | "draftSaved" | "stageComplete" | "outcome" | undefined;
206
+ fApplicationId: string | undefined;
207
+ fListing: PlacementListing | false | undefined;
208
+ student: UserData | undefined;
209
+ fProvider: {
210
+ details?: ProviderData;
211
+ profile?: string;
212
+ id?: string;
213
+ } | undefined;
214
+ onFApply: (draft?: boolean) => Promise<void>;
215
+ setFormComplete: (formId: string, e: {
216
+ [key: string]: unknown;
217
+ }) => void;
218
+ viewFile: (file: string, onOpen: (url: string) => void) => void;
219
+ addFile: (files: string[], fileId: number) => void;
220
+ uploadedFiles?: {
221
+ [key: string]: FileItem;
222
+ };
223
+ getCurrentStage: (stage: number) => Promise<{
224
+ stage: ApplicantStage;
225
+ completedSections: {
226
+ submitted?: string | undefined;
227
+ filesViewed?: string[] | undefined;
228
+ formsCompleted?: {
229
+ [key: string]: unknown;
230
+ } | undefined;
231
+ filesUploaded?: {
232
+ [key: number]: string[];
233
+ } | undefined;
234
+ };
235
+ }>;
236
+ currentStageComplete?: boolean;
237
+ progressStage: (type: number | "accept" | "reject", e?: {
238
+ feedback?: string;
239
+ }) => Promise<void>;
240
+ };
241
+ export declare function useCreateApplicationRenderer({ user, listingId, listing, provider, application, applicationId, orgContext }: {
242
+ user: UserData;
243
+ listingId: string;
244
+ applicationId?: string;
245
+ listing?: PlacementListing;
246
+ application?: Partial<Application>;
247
+ orgContext?: {
248
+ details: ProviderData;
249
+ addresses: {
250
+ [key: string]: OrganisationAddress;
251
+ };
252
+ applicantWorkflows: {
253
+ [key: string]: ApplicantWorkflow;
254
+ };
255
+ };
256
+ provider?: {
257
+ details?: ProviderData;
258
+ profile?: string;
259
+ id?: string;
260
+ };
261
+ }): {
262
+ successText: {
263
+ submitted: {
264
+ title: string;
265
+ desc: string;
266
+ };
267
+ draftSaved: {
268
+ title: string;
269
+ desc: string;
270
+ };
271
+ stageComplete: {
272
+ title: string;
273
+ desc: string;
274
+ };
275
+ outcome: {
276
+ title: string;
277
+ desc: string;
278
+ };
279
+ };
280
+ onFApply: (draft?: boolean) => Promise<void>;
281
+ progressStage: (type: number | "accept" | "reject", e?: {
282
+ feedback?: string;
283
+ }) => Promise<void>;
284
+ currentStageComplete: boolean | undefined;
285
+ uploadedFiles: {
286
+ [key: string]: FileItem;
287
+ } | undefined;
288
+ getCurrentStage: (stage: number) => Promise<{
289
+ stage: ApplicantStage;
290
+ completedSections: {
291
+ submitted?: string | undefined;
292
+ filesViewed?: string[] | undefined;
293
+ formsCompleted?: {
294
+ [key: string]: unknown;
295
+ } | undefined;
296
+ filesUploaded?: {
297
+ [key: number]: string[];
298
+ } | undefined;
299
+ };
300
+ }>;
301
+ setFormComplete: (formId: string, e: {
302
+ [key: string]: unknown;
303
+ }) => void;
304
+ viewFile: (file: string, onOpen: (url: string) => void) => void;
305
+ addFile: (files: string[], fileId: number) => void;
306
+ setSuccessPopup: import("react").Dispatch<import("react").SetStateAction<"submitted" | "draftSaved" | "stageComplete" | "outcome" | undefined>>;
307
+ openSuccessPopup: (type: "submitted" | "draftSaved" | "stageComplete" | "outcome") => void;
308
+ setFApplication: import("react").Dispatch<import("react").SetStateAction<Partial<Application>>>;
309
+ fApplication: Partial<Application>;
310
+ draftSaved: boolean;
311
+ profileUrl: string | undefined;
312
+ successPopup: "submitted" | "draftSaved" | "stageComplete" | "outcome" | undefined;
313
+ fApplicationId: string | undefined;
314
+ fListing: false | PlacementListing | undefined;
315
+ student: UserData | undefined;
316
+ fProvider: {
317
+ details?: ProviderData;
318
+ profile?: string;
319
+ id?: string;
320
+ } | undefined;
321
+ };
133
322
  export declare function useProposePlacementRenderer({ user, orgContext, placement }: {
134
323
  user: UserData;
135
324
  orgContext?: {
@@ -187,12 +376,12 @@ type CreateCohortRendererParams = {
187
376
  product: Products;
188
377
  initialData?: CohortData;
189
378
  };
190
- export type CreateCohortStages = "name" | "placementType" | "students" | "workflow" | "review";
379
+ export type CreateCohortStages = "info" | "name" | "placementType" | "review";
191
380
  export declare function useCreateCohortRenderer({ oId, product, initialData }: CreateCohortRendererParams): {
192
381
  submitCohort: () => void;
193
382
  submitSection: (e?: {
194
383
  [key: string]: unknown;
195
- } | undefined) => void;
384
+ }) => void;
196
385
  back: () => void;
197
386
  setCohortData: import("react").Dispatch<import("react").SetStateAction<CohortData>>;
198
387
  deleteCohort: () => Promise<void>;
@@ -202,7 +391,7 @@ export declare function useCreateCohortRenderer({ oId, product, initialData }: C
202
391
  type UserUploadParams = {
203
392
  userType: "Staff" | "Students";
204
393
  user: UserData;
205
- onComplete?: () => void;
394
+ onComplete?: (e: string) => void;
206
395
  cohortId?: string;
207
396
  userGroupId?: string;
208
397
  shareNameWithReferralLeaderboardConsent?: string;
@@ -211,10 +400,10 @@ type UserUploadParams = {
211
400
  };
212
401
  export declare function useUserUploadHandler({ product, oId, userType, user, onComplete, userGroupId, cohortId }: UserUploadParams): {
213
402
  uploadUsers: (users: {
214
- [key: string]: unknown;
215
- email?: string | undefined;
216
- parentEmail?: string | undefined;
403
+ email?: string;
404
+ parentEmail?: string;
217
405
  year: number;
406
+ [key: string]: unknown;
218
407
  }[]) => Promise<void>;
219
408
  alert: {
220
409
  severity: "warning" | "error" | "success" | "info";
@@ -224,25 +413,29 @@ export declare function useUserUploadHandler({ product, oId, userType, user, onC
224
413
  };
225
414
  type WorkflowEditorParams = {
226
415
  user: UserData;
227
- initialData?: WorkflowStage[];
416
+ initialData?: WorkflowStage[] | ApplicantStage[];
228
417
  onSubmit: (e: {
229
418
  workflow: WorkflowStage[];
230
419
  includedFiles: string[];
231
420
  includedForms: string[];
232
421
  }) => void;
233
- cohortId: string;
234
- product?: "providers" | "institutes";
422
+ cohortId?: string;
423
+ product?: Products;
235
424
  oId?: string;
236
425
  };
237
- export declare function useWorkflowEditor({ user, initialData, onSubmit, cohortId, product, oId }: WorkflowEditorParams): {
426
+ export declare function useWorkflowEditor({ user, initialData, onSubmit, cohortId }: WorkflowEditorParams): {
238
427
  filePopupActive: boolean;
239
428
  files: {
240
429
  name: string;
241
430
  url: string;
242
431
  }[];
243
432
  uploadFile: (files: any[]) => Promise<void>;
244
- addNode: () => void;
245
- onDelete: (id: number) => void;
433
+ addNode: ({ userType, nextStage, prevStage }?: {
434
+ userType?: "Students" | "Staff" | "Provider" | "Parent";
435
+ nextStage?: number;
436
+ prevStage?: number;
437
+ }) => number;
438
+ onDelete: (id?: number) => Promise<void>;
246
439
  arrows: ArrowObject[];
247
440
  onChange: (path: (string | number)[], value: unknown) => void;
248
441
  error: string | undefined;
@@ -253,7 +446,7 @@ export declare function useWorkflowEditor({ user, initialData, onSubmit, cohortI
253
446
  setTutorialActive: import("react").Dispatch<import("react").SetStateAction<boolean>>;
254
447
  setFilePopupActive: import("react").Dispatch<import("react").SetStateAction<boolean>>;
255
448
  includedForms: string[];
256
- submitWorkflow: () => Promise<void>;
449
+ submitWorkflow: (workflow?: WorkflowStage[] | ApplicantStage[], callOnComplete?: boolean) => Promise<false | void>;
257
450
  openPopup: () => void;
258
451
  snackbar: string | undefined;
259
452
  setSnackbar: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
@@ -268,7 +461,55 @@ export declare function useWorkflowEditor({ user, initialData, onSubmit, cohortI
268
461
  containerRef: import("react").RefObject<HTMLFormElement>;
269
462
  setError: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
270
463
  setArrows: import("react").Dispatch<import("react").SetStateAction<ArrowObject[]>>;
271
- setWorkflowNodes: import("react").Dispatch<import("react").SetStateAction<WorkflowStage[]>>;
464
+ setWorkflowNodes: import("react").Dispatch<import("react").SetStateAction<WorkflowStage[] | ApplicantStage[]>>;
465
+ };
466
+ type ApplicantWorkflowEditorParams = {
467
+ user: UserData;
468
+ initialData?: ApplicantStage[];
469
+ onSubmit: (e: {
470
+ workflow: ApplicantStage[];
471
+ includedFiles: string[];
472
+ includedForms: string[];
473
+ }) => void;
474
+ workflowId?: string;
475
+ product?: Products;
476
+ oId?: string;
477
+ };
478
+ export declare function useApplicantWorkflowEditor({ user, initialData, onSubmit, workflowId }: ApplicantWorkflowEditorParams): {
479
+ filePopupActive: boolean;
480
+ uploadFile: (files: any[]) => Promise<void>;
481
+ addNode: ({ userType, nextStage, prevStage }?: {
482
+ userType?: "Students" | "Staff";
483
+ nextStage?: number;
484
+ prevStage?: number;
485
+ }) => number;
486
+ onDelete: (id?: number) => Promise<void>;
487
+ arrows: ArrowObject[];
488
+ onChange: (path: (string | number)[], value: unknown) => void;
489
+ error: string | undefined;
490
+ includedFiles: string[];
491
+ onMoveEnd: (id: number, currentRef?: HTMLDivElement) => void;
492
+ addEdgePoint: (id: number, existingEdgePoint: number) => void;
493
+ newEdgePoint: number | undefined;
494
+ setTutorialActive: import("react").Dispatch<import("react").SetStateAction<boolean>>;
495
+ setFilePopupActive: import("react").Dispatch<import("react").SetStateAction<boolean>>;
496
+ includedForms: string[];
497
+ submitWorkflow: (workflow?: ApplicantStage[], callOnComplete?: boolean) => Promise<false | void>;
498
+ openPopup: () => void;
499
+ snackbar: string | undefined;
500
+ setSnackbar: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
501
+ setMousePosFunc: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
502
+ mousePos: {
503
+ x: number;
504
+ y: number;
505
+ } | undefined;
506
+ tutorialActive: boolean;
507
+ onDeleteArrow: (data: ArrowObject) => void;
508
+ workflowNodes: ApplicantStage[];
509
+ containerRef: import("react").RefObject<HTMLFormElement>;
510
+ setError: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
511
+ setArrows: import("react").Dispatch<import("react").SetStateAction<ArrowObject[]>>;
512
+ setWorkflowNodes: import("react").Dispatch<import("react").SetStateAction<ApplicantStage[]>>;
272
513
  };
273
514
  type InstitutePlacementListingUploadParams = {
274
515
  user: UserData;
@@ -293,4 +534,302 @@ export declare function useInstitutePlacementListingHandler({ user }: InstituteP
293
534
  } | undefined;
294
535
  onChange: () => void;
295
536
  };
537
+ export declare function useGetIndividualPlacementForPlacementPage({ user, placementId, organisation }: {
538
+ user: UserData;
539
+ placementId: string;
540
+ organisation?: {
541
+ details: InstituteData | ProviderData;
542
+ cohorts: {
543
+ [key: string]: CohortData;
544
+ };
545
+ };
546
+ }): {
547
+ placement: StudentPlacementData | undefined;
548
+ wStage: (WorkflowStage & {
549
+ files: {
550
+ [fileId: string]: {
551
+ name: string;
552
+ url: string;
553
+ };
554
+ };
555
+ }) | undefined;
556
+ student: UserData | undefined;
557
+ workflow: WorkflowStage[] | undefined;
558
+ editable: boolean;
559
+ withdrawFromPlacementPopup: boolean;
560
+ addOnboardingDocsPopup: boolean;
561
+ setAddOnboardingDocsPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
562
+ dismissOnboardingPopup: boolean;
563
+ setDismissOnboardingPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
564
+ setWithdrawFromPlacementPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
565
+ withdrawFromPlacement: () => Promise<void>;
566
+ onFlagClick: (e: FlagCodes, onClose?: boolean) => Promise<void>;
567
+ setUploadInsurance: import("react").Dispatch<import("react").SetStateAction<boolean>>;
568
+ setUploadProviderDocPopup: import("react").Dispatch<import("react").SetStateAction<"insurance" | "riskAssessment" | "DbsCheck" | undefined>>;
569
+ setUploadRA: import("react").Dispatch<import("react").SetStateAction<boolean>>;
570
+ setUploadDBS: import("react").Dispatch<import("react").SetStateAction<boolean>>;
571
+ onboardingStatus: "Add onboarding documents" | "Onboarding sent" | "Onboarding docs completed" | "Onboarding docs approved" | "Complete onboarding";
572
+ setSkipStagePopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
573
+ onboardingPopup: boolean;
574
+ setViewExternalLinkPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
575
+ setOnboardingPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
576
+ setRejectELIPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
577
+ eliURL: string;
578
+ riskAssessmentURL: string;
579
+ dbsCheckURL: string;
580
+ setExternalLinkCopied: import("react").Dispatch<import("react").SetStateAction<boolean>>;
581
+ skipStagePopup: boolean;
582
+ snackbar: {
583
+ open: boolean;
584
+ message?: string;
585
+ };
586
+ setSnackbar: import("react").Dispatch<import("react").SetStateAction<{
587
+ open: boolean;
588
+ message?: string;
589
+ }>>;
590
+ cohort: CohortData | undefined;
591
+ disableEmail: {
592
+ parent: boolean;
593
+ provider: boolean;
594
+ };
595
+ rejectELIPopup: boolean;
596
+ eliPopupOpen: boolean;
597
+ rejectExternalDocPopup: false | "riskAssessment" | "dbsCheck";
598
+ externalDocPopupOpen: false | "riskAssessment" | "dbsCheck";
599
+ viewExternalLinkPopup: boolean;
600
+ externalLinkCopied: boolean;
601
+ uploadInsurance: boolean;
602
+ uploadRA: boolean;
603
+ uploadDBS: boolean;
604
+ editStage: (nextStageId: number) => Promise<void>;
605
+ sendEmail: (type: "provider" | "parent") => undefined;
606
+ canEdit: boolean;
607
+ approveELI: () => Promise<void>;
608
+ setEliPopupOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
609
+ uploadProviderDocPopup: "insurance" | "riskAssessment" | "DbsCheck" | undefined;
610
+ rejectELI: ({ reason }: {
611
+ reason: string;
612
+ }) => Promise<void>;
613
+ setRejectExternalDocPopup: import("react").Dispatch<import("react").SetStateAction<false | "riskAssessment" | "dbsCheck">>;
614
+ setExternalDocPopupOpen: import("react").Dispatch<import("react").SetStateAction<false | "riskAssessment" | "dbsCheck">>;
615
+ approveProviderDoc: (type: "riskAssessment" | "dbsCheck") => Promise<void>;
616
+ rejectProviderDoc: ({ reason }: {
617
+ reason: string;
618
+ }, type: "riskAssessment" | "dbsCheck") => Promise<void>;
619
+ manuallyConfigureProvider: () => Promise<void>;
620
+ institute: InstituteData | undefined;
621
+ shareStudentRequestPopup: boolean;
622
+ setShareStudentRequestPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
623
+ };
624
+ export declare function useOnboardingPopup({ onboarding, providerId, placementId, user, onClose }: {
625
+ onboarding: (OnboardingDocs & {
626
+ completed: {
627
+ submitted: boolean;
628
+ submittedDate?: string;
629
+ accepted?: boolean;
630
+ filesViewed?: string[];
631
+ formsCompleted?: {
632
+ [key: string]: unknown;
633
+ };
634
+ filesUploaded?: {
635
+ [key: number]: string[];
636
+ };
637
+ };
638
+ });
639
+ placementId: string;
640
+ user: UserData;
641
+ providerId: string;
642
+ onClose: () => void;
643
+ }): {
644
+ addFile: (files: string[]) => void;
645
+ viewFile: (file: string, onOpen: (url: string) => void) => void;
646
+ uploadedFiles: {
647
+ [key: string]: FileItem;
648
+ };
649
+ setFormComplete: (e: {
650
+ [key: string]: unknown;
651
+ }, formId?: string) => void;
652
+ setRejectPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
653
+ stagesCompleted: () => boolean;
654
+ setForm: import("react").Dispatch<import("react").SetStateAction<{
655
+ [key: string]: unknown;
656
+ id: string;
657
+ name: string;
658
+ } | undefined>>;
659
+ mOnboarding: OnboardingDocs & {
660
+ completed: {
661
+ submitted: boolean;
662
+ submittedDate?: string;
663
+ accepted?: boolean;
664
+ filesViewed?: string[];
665
+ formsCompleted?: {
666
+ [key: string]: unknown;
667
+ };
668
+ filesUploaded?: {
669
+ [key: number]: string[];
670
+ };
671
+ };
672
+ };
673
+ form: {
674
+ [key: string]: unknown;
675
+ id: string;
676
+ name: string;
677
+ } | undefined;
678
+ submit: () => Promise<void>;
679
+ acceptOnboarding: () => Promise<void>;
680
+ rejectOnboarding: ({ reason }: {
681
+ reason: string;
682
+ }) => Promise<void>;
683
+ rejectPopup: boolean;
684
+ completedSections: {
685
+ submitted: boolean;
686
+ submittedDate?: string;
687
+ filesViewed?: string[] | undefined;
688
+ formsCompleted?: {
689
+ [key: string]: unknown;
690
+ } | undefined;
691
+ filesUploaded?: {
692
+ [key: number]: string[];
693
+ } | undefined;
694
+ } | undefined;
695
+ fileUploadPopup: number | false;
696
+ setFileUploadPopup: import("react").Dispatch<import("react").SetStateAction<number | false>>;
697
+ viewableFiles: {
698
+ [key: string]: FileItem;
699
+ } | undefined;
700
+ formDetails: {
701
+ [key: string]: {
702
+ name: string;
703
+ id: string;
704
+ description?: string;
705
+ product: Products;
706
+ oId: string;
707
+ form: CustomFormSchema;
708
+ };
709
+ };
710
+ };
711
+ export declare function useLoadAddresses(user: UserData, limitItems?: number, queryConstraint?: QueryConstraint[], request?: boolean): {
712
+ addresses: {
713
+ [key: string]: import("placementt-core").Address & {
714
+ name?: string;
715
+ savedBy?: string[];
716
+ product: import("placementt-core").Products;
717
+ oId: string;
718
+ stage: import("placementt-core").OrganisationAddressStages;
719
+ additionalQuestions?: {
720
+ bikeStorage?: boolean;
721
+ kitchen?: boolean;
722
+ parking?: boolean;
723
+ disabledAccess?: boolean;
724
+ };
725
+ contacts?: {
726
+ firstAid?: {
727
+ name?: string;
728
+ phone?: string;
729
+ email?: string;
730
+ location?: string;
731
+ }[];
732
+ security?: {
733
+ name?: string;
734
+ phone?: string;
735
+ email?: string;
736
+ location?: string;
737
+ }[];
738
+ reception?: {
739
+ name?: string;
740
+ phone?: string;
741
+ email?: string;
742
+ location?: string;
743
+ }[];
744
+ };
745
+ primaryContactId?: string;
746
+ default?: boolean;
747
+ flags?: ("addressMissing" | "noPrimaryContact")[];
748
+ } & {
749
+ listings: number;
750
+ };
751
+ };
752
+ onScrollBottom: () => void;
753
+ loading: boolean;
754
+ changeQueryConstraints: (e: QueryConstraint[]) => void;
755
+ };
756
+ export declare function useLoadListings(user: UserData, queryConstraint?: QueryConstraint[], request?: boolean): {
757
+ listings: [string, PlacementListing & {
758
+ applicants?: number;
759
+ scheduled?: number;
760
+ active?: number;
761
+ }][];
762
+ onScrollBottom: () => void;
763
+ loading: boolean;
764
+ changeQueryConstraints: (e: QueryConstraint[]) => void;
765
+ };
766
+ export declare function useLoadProviderPlacements(user: UserData, queryConstraint?: QueryConstraint[], placementId?: string): {
767
+ placements: {
768
+ [k: string]: never;
769
+ };
770
+ onScrollBottom: () => void;
771
+ loading: boolean;
772
+ changeQueryConstraints: (e: QueryConstraint[]) => void;
773
+ };
774
+ export declare function useLoadApplications({ user, applicationType, listingId, queryConstraint }: {
775
+ user: UserData;
776
+ applicationType?: "all" | "actionRequired" | "awaitingStudent" | "closed";
777
+ listingId?: string;
778
+ queryConstraint?: QueryConstraint[];
779
+ }): {
780
+ applications: [string, Application][];
781
+ type: "all" | "closed" | "actionRequired" | "awaitingStudent";
782
+ setType: import("react").Dispatch<import("react").SetStateAction<"all" | "closed" | "actionRequired" | "awaitingStudent">>;
783
+ onScrollBottom: () => void;
784
+ loading: boolean;
785
+ changeQueryConstraints: (e: QueryConstraint[]) => void;
786
+ };
787
+ export type FilterObject = {
788
+ [key: string]: {
789
+ label: string;
790
+ value?: unknown;
791
+ values?: {
792
+ [key: string | number]: string | {
793
+ label: string;
794
+ test: QueryFieldFilterConstraint;
795
+ };
796
+ };
797
+ type: "dropdown" | "string" | "number";
798
+ };
799
+ };
800
+ export type DataViewerPaginater = {
801
+ view: "list" | "table";
802
+ queryLimit?: number;
803
+ formatItems?: (key: string, item: any) => Promise<{
804
+ key: string;
805
+ item: any;
806
+ }> | {
807
+ key: string;
808
+ item: any;
809
+ };
810
+ snapshot?: boolean;
811
+ filters?: FilterObject;
812
+ onSearch?: boolean | ((search: string, page?: number, limit?: number) => Promise<{
813
+ [key: string]: any;
814
+ }>);
815
+ data?: {
816
+ [key: string]: {
817
+ [key: string]: unknown;
818
+ };
819
+ } | QueryObject[];
820
+ additionalEntryProcessing?: (k: string, v: any) => Promise<any> | any;
821
+ };
822
+ export declare function useDataViewerPaginator({ view, queryLimit, additionalEntryProcessing, formatItems, snapshot, filters: initialFilters, onSearch, data }: DataViewerPaginater): {
823
+ tableData: {
824
+ [key: string]: {
825
+ [key: string]: unknown;
826
+ };
827
+ };
828
+ pageUp: () => void;
829
+ pageDown: () => void;
830
+ setFilters: import("react").Dispatch<import("react").SetStateAction<FilterObject | undefined>>;
831
+ page: number;
832
+ loading: boolean | "loaded";
833
+ updateSearch: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
834
+ };
296
835
  export {};