placementt-core 11.0.533 → 11.0.892

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 (76) hide show
  1. package/lib/constants.d.ts +13 -1
  2. package/lib/constants.js +86 -1
  3. package/lib/constants.js.map +1 -1
  4. package/lib/features/analytics/useAnalytics.d.ts +2 -0
  5. package/lib/features/analytics/useAnalytics.js +22 -19
  6. package/lib/features/analytics/useAnalytics.js.map +1 -1
  7. package/lib/features/global/downtime/useDowntime.d.ts +1 -0
  8. package/lib/features/global/downtime/useDowntime.js +9 -7
  9. package/lib/features/global/downtime/useDowntime.js.map +1 -1
  10. package/lib/features/global/users/useUserFunctions.js +1 -1
  11. package/lib/features/global/users/useUserFunctions.js.map +1 -1
  12. package/lib/features/jobs/jobsSlice.d.ts +10 -2
  13. package/lib/features/jobs/jobsSlice.js +5 -2
  14. package/lib/features/jobs/jobsSlice.js.map +1 -1
  15. package/lib/features/placements/studentPlacements/activePlacement.d.ts +5 -1
  16. package/lib/features/placements/studentPlacements/activePlacement.js +7 -3
  17. package/lib/features/placements/studentPlacements/activePlacement.js.map +1 -1
  18. package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.d.ts +3 -2
  19. package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.js +4 -1
  20. package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.js.map +1 -1
  21. package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.d.ts +2 -2
  22. package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.js +1 -1
  23. package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.js.map +1 -1
  24. package/lib/features/placements/studentPlacements/useStudentPlacements.d.ts +2 -12
  25. package/lib/features/placements/studentPlacements/useStudentPlacements.js +1 -26
  26. package/lib/features/placements/studentPlacements/useStudentPlacements.js.map +1 -1
  27. package/lib/features/updates/useUpdates.d.ts +1 -0
  28. package/lib/features/updates/useUpdates.js +13 -12
  29. package/lib/features/updates/useUpdates.js.map +1 -1
  30. package/lib/firebase/firebase.d.ts +5 -3
  31. package/lib/firebase/firebase.js +23 -12
  32. package/lib/firebase/firebase.js.map +1 -1
  33. package/lib/firebase/firebaseConfig.js.map +1 -1
  34. package/lib/firebase/firebaseQuery.d.ts +6 -2
  35. package/lib/firebase/firebaseQuery.js +11 -3
  36. package/lib/firebase/firebaseQuery.js.map +1 -1
  37. package/lib/firebase/readDatabase.d.ts +2 -4
  38. package/lib/firebase/readDatabase.js +30 -5
  39. package/lib/firebase/readDatabase.js.map +1 -1
  40. package/lib/firebase/writeDatabase.d.ts +6 -2
  41. package/lib/firebase/writeDatabase.js +2 -1
  42. package/lib/firebase/writeDatabase.js.map +1 -1
  43. package/lib/hooks.d.ts +277 -192
  44. package/lib/hooks.js +1437 -704
  45. package/lib/hooks.js.map +1 -1
  46. package/lib/reduxHooks.d.ts +122 -5
  47. package/lib/reduxHooks.js +132 -29
  48. package/lib/reduxHooks.js.map +1 -1
  49. package/lib/tasksAndTips.d.ts +19 -7
  50. package/lib/tasksAndTips.js +637 -164
  51. package/lib/tasksAndTips.js.map +1 -1
  52. package/lib/typeDefinitions.d.ts +321 -110
  53. package/lib/util.d.ts +15 -3
  54. package/lib/util.js +47 -10
  55. package/lib/util.js.map +1 -1
  56. package/package.json +7 -4
  57. package/src/constants.ts +91 -3
  58. package/src/features/analytics/useAnalytics.tsx +25 -17
  59. package/src/features/global/downtime/useDowntime.tsx +11 -7
  60. package/src/features/global/users/useUserFunctions.tsx +1 -1
  61. package/src/features/jobs/jobsSlice.ts +9 -3
  62. package/src/features/placements/studentPlacements/activePlacement.ts +8 -3
  63. package/src/features/placements/studentPlacements/completedStudentPlacementsSlice.ts +5 -2
  64. package/src/features/placements/studentPlacements/upcomingStudentPlacementsSlice.ts +2 -2
  65. package/src/features/placements/studentPlacements/useStudentPlacements.tsx +4 -28
  66. package/src/features/updates/useUpdates.tsx +14 -12
  67. package/src/firebase/firebase.tsx +26 -15
  68. package/src/firebase/firebaseConfig.tsx +1 -1
  69. package/src/firebase/firebaseQuery.tsx +11 -3
  70. package/src/firebase/readDatabase.tsx +34 -6
  71. package/src/firebase/writeDatabase.tsx +3 -1
  72. package/src/hooks.tsx +1804 -935
  73. package/src/reduxHooks.ts +144 -32
  74. package/src/tasksAndTips.ts +689 -166
  75. package/src/typeDefinitions.ts +373 -109
  76. package/src/util.ts +63 -18
package/lib/hooks.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { DocumentData, QueryConstraint, QueryDocumentSnapshot } from "firebase/firestore";
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";
1
+ import { DocumentData, QueryConstraint, QueryDocumentSnapshot, QueryFieldFilterConstraint } from "firebase/firestore";
2
+ import { AlumniConvoUser, ApplicantStage, Application, ArrowObject, CohortData, CustomFormSchema, FileItem, FlagCodes, InstituteData, OnboardingDocs, PlacementListing, Products, ProviderData, QueryObject, QueryObjectConstraint, Sorts, StudentPlacementData, UserData, UserGroupData, WorkflowStage } from "./typeDefinitions";
4
3
  type StudentPlacementListParams = {
5
4
  user: UserData;
6
5
  student?: UserData;
@@ -26,7 +25,17 @@ type InstitutePlacementParams = {
26
25
  ql?: number;
27
26
  inProgress?: boolean;
28
27
  };
29
- export declare function useNewInstitutePlacementList({ id, user, cohort, queryConstraint, ql, inProgress }: InstitutePlacementParams): {
28
+ type NewInstitutePlacementParams = {
29
+ id?: string;
30
+ user: UserData;
31
+ cohort?: string;
32
+ queryConstraints?: QueryObjectConstraint;
33
+ ql?: number;
34
+ inProgress?: boolean;
35
+ view: "list" | "table";
36
+ filters?: FilterObject;
37
+ };
38
+ export declare function useOldInstitutePlacementList({ id, user, cohort, queryConstraint, ql, inProgress }: InstitutePlacementParams): {
30
39
  placements: {
31
40
  [key: string]: StudentPlacementData & {
32
41
  student: UserData;
@@ -39,7 +48,60 @@ export declare function useNewInstitutePlacementList({ id, user, cohort, queryCo
39
48
  reset: () => void;
40
49
  changeQueryConstraints: (e: QueryConstraint[]) => void;
41
50
  };
42
- export declare function useOldInstitutePlacementList({ user, cohort, queryConstraint, ql }: InstitutePlacementParams): {
51
+ export declare function useNewInstitutePlacementList({ id, user, filters, 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
+ setView: import("react").Dispatch<import("react").SetStateAction<"table" | "list">>;
62
+ pageUp: () => void;
63
+ pageDown: () => void;
64
+ sorts: {
65
+ [label: string]: {
66
+ value: string;
67
+ direction: "asc" | "desc";
68
+ };
69
+ };
70
+ updateSort: (sortLabel: string) => void;
71
+ sort: [string, {
72
+ value: string;
73
+ direction: "asc" | "desc";
74
+ }] | undefined;
75
+ };
76
+ type AlumniPaginatorParams = {
77
+ user?: UserData;
78
+ alumniConvoUser?: AlumniConvoUser;
79
+ school?: string;
80
+ queryConstraints?: QueryObjectConstraint;
81
+ ql?: number;
82
+ view: "list" | "table";
83
+ filters?: FilterObject;
84
+ };
85
+ export declare function useAlumniPaginator({ user, alumniConvoUser, filters, view, school, queryConstraints, ql }: AlumniPaginatorParams): {
86
+ tableData: {
87
+ [key: string]: {
88
+ [key: string]: unknown;
89
+ };
90
+ };
91
+ page: number;
92
+ loading: boolean | "loaded";
93
+ setFilters: import("react").Dispatch<import("react").SetStateAction<FilterObject | undefined>>;
94
+ setView: import("react").Dispatch<import("react").SetStateAction<"table" | "list">>;
95
+ pageUp: () => void;
96
+ pageDown: () => void;
97
+ sorts: {
98
+ [label: string]: {
99
+ value: string;
100
+ direction: "asc" | "desc";
101
+ };
102
+ };
103
+ };
104
+ export declare function useVeryOldInstitutePlacementList({ user, cohort, queryConstraint, ql }: InstitutePlacementParams): {
43
105
  placements: {
44
106
  [key: string]: StudentPlacementData & {
45
107
  student: UserData;
@@ -70,20 +132,23 @@ export declare function useFilterTablePaginator({ data }: {
70
132
  } | undefined>>;
71
133
  page: number[];
72
134
  };
73
- export declare function usePlacementListingPaginator({ data, user }: {
135
+ export declare function useProviderContactPaginator({ data, user, view, filters }: {
74
136
  data: QueryObject[];
75
137
  user: UserData;
138
+ view: "list" | "table";
139
+ filters?: FilterObject;
76
140
  }): {
77
141
  tableData: {
78
- [key: string]: PlacementListing & {
79
- savedPlacement: SavedPlacement;
142
+ [key: string]: {
143
+ [key: string]: unknown;
80
144
  };
81
145
  };
82
- setPage: import("react").Dispatch<import("react").SetStateAction<number[]>>;
83
- setFilters: import("react").Dispatch<import("react").SetStateAction<{
84
- [key: string]: unknown;
85
- } | undefined>>;
86
- page: number[];
146
+ pageUp: () => void;
147
+ pageDown: () => void;
148
+ setFilters: import("react").Dispatch<import("react").SetStateAction<FilterObject | undefined>>;
149
+ page: number;
150
+ setView: import("react").Dispatch<import("react").SetStateAction<"table" | "list">>;
151
+ loading: boolean | "loaded";
87
152
  };
88
153
  type UserPaginatorParams = {
89
154
  user: UserData;
@@ -91,8 +156,9 @@ type UserPaginatorParams = {
91
156
  data: QueryObject[];
92
157
  search?: string;
93
158
  userType: "Staff" | "Students";
159
+ sort?: string;
94
160
  };
95
- export declare function useCohortUserPaginator({ user, cohort, data, search, userType }: UserPaginatorParams): {
161
+ export declare function useCohortUserPaginator({ user, cohort, data, search, userType, sort }: UserPaginatorParams): {
96
162
  tableData: {
97
163
  [key: string]: {
98
164
  [key: string]: unknown;
@@ -103,6 +169,9 @@ export declare function useCohortUserPaginator({ user, cohort, data, search, use
103
169
  setFilters: import("react").Dispatch<import("react").SetStateAction<{
104
170
  [key: string]: unknown;
105
171
  } | undefined>>;
172
+ setSort: (s: string) => void;
173
+ sortOptions: string[];
174
+ sortBy: string | undefined;
106
175
  };
107
176
  export declare function useAdmissionsPaginator({ data }: {
108
177
  data: {
@@ -141,162 +210,6 @@ export declare function useLazyLoadQueryList({ path, constraints, number, onItem
141
210
  loadMoreIcon: boolean;
142
211
  reset: () => void;
143
212
  };
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
- };
300
213
  export declare function useProposePlacementRenderer({ user, orgContext, placement }: {
301
214
  user: UserData;
302
215
  orgContext?: {
@@ -325,7 +238,13 @@ export declare function useProposePlacementRenderer({ user, orgContext, placemen
325
238
  setBusinessSectionComplete: import("react").Dispatch<import("react").SetStateAction<boolean>>;
326
239
  setAddressSectionComplete: import("react").Dispatch<import("react").SetStateAction<boolean>>;
327
240
  setPlacementSectionComplete: import("react").Dispatch<import("react").SetStateAction<boolean>>;
328
- proposePlacement: (draft?: boolean) => Promise<any>;
241
+ proposePlacement: (draft?: boolean) => Promise<{
242
+ status: {
243
+ active: boolean;
244
+ inProgress: boolean;
245
+ completed: boolean;
246
+ };
247
+ }>;
329
248
  deletePlacement: (id: string) => Promise<void>;
330
249
  setStudent: import("react").Dispatch<import("react").SetStateAction<UserData | undefined>>;
331
250
  submitSection: (type: "dates" | "provider" | "address", data: {
@@ -363,7 +282,7 @@ export declare function useCreateCohortRenderer({ oId, product, initialData }: C
363
282
  type UserUploadParams = {
364
283
  userType: "Staff" | "Students";
365
284
  user: UserData;
366
- onComplete?: () => void;
285
+ onComplete?: (e: string) => void;
367
286
  cohortId?: string;
368
287
  userGroupId?: string;
369
288
  shareNameWithReferralLeaderboardConsent?: string;
@@ -433,7 +352,7 @@ export declare function useWorkflowEditor({ user, initialData, onSubmit, cohortI
433
352
  containerRef: import("react").RefObject<HTMLFormElement>;
434
353
  setError: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
435
354
  setArrows: import("react").Dispatch<import("react").SetStateAction<ArrowObject[]>>;
436
- setWorkflowNodes: import("react").Dispatch<import("react").SetStateAction<ApplicantStage[] | WorkflowStage[]>>;
355
+ setWorkflowNodes: import("react").Dispatch<import("react").SetStateAction<WorkflowStage[] | ApplicantStage[]>>;
437
356
  };
438
357
  type ApplicantWorkflowEditorParams = {
439
358
  user: UserData;
@@ -483,23 +402,24 @@ export declare function useApplicantWorkflowEditor({ user, initialData, onSubmit
483
402
  setArrows: import("react").Dispatch<import("react").SetStateAction<ArrowObject[]>>;
484
403
  setWorkflowNodes: import("react").Dispatch<import("react").SetStateAction<ApplicantStage[]>>;
485
404
  };
486
- type InstitutePlacementListingUploadParams = {
405
+ type InstituteProviderContactUploadParams = {
487
406
  user: UserData;
488
407
  onComplete?: () => void;
489
408
  };
490
- export type InstitutePlacementListingUpload = {
491
- provider: string;
492
- jobTitle: string;
409
+ export type InstituteProviderContactUpload = {
410
+ business: string;
411
+ forename?: string;
412
+ surname?: string;
493
413
  email: string;
494
414
  phone?: string;
495
- addressOne: string;
496
- addressTwo: string;
497
- city: string;
498
- postcode: string;
499
- country: string;
500
- };
501
- export declare function useInstitutePlacementListingHandler({ user }: InstitutePlacementListingUploadParams): {
502
- uploadPlacements: (placements: InstitutePlacementListingUpload[]) => Promise<boolean>;
415
+ addressOne?: string;
416
+ addressTwo?: string;
417
+ city?: string;
418
+ postcode?: string;
419
+ country?: string;
420
+ };
421
+ export declare function useInstituteProviderContactsHandler({ user }: InstituteProviderContactUploadParams): {
422
+ uploadProviderContacts: (providers: InstituteProviderContactUpload[], schoolId?: string) => Promise<boolean>;
503
423
  alert: {
504
424
  severity: "warning" | "error" | "success" | "info";
505
425
  msg: string;
@@ -517,14 +437,25 @@ export declare function useGetIndividualPlacementForPlacementPage({ user, placem
517
437
  };
518
438
  }): {
519
439
  placement: StudentPlacementData | undefined;
520
- wStage: WorkflowStage | undefined;
440
+ wStage: (WorkflowStage & {
441
+ files: {
442
+ [fileId: string]: {
443
+ name: string;
444
+ url: string;
445
+ };
446
+ };
447
+ }) | undefined;
521
448
  student: UserData | undefined;
522
449
  workflow: WorkflowStage[] | undefined;
523
450
  editable: boolean;
524
451
  withdrawFromPlacementPopup: boolean;
452
+ addOnboardingDocsPopup: boolean;
453
+ setAddOnboardingDocsPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
454
+ dismissOnboardingPopup: boolean;
455
+ setDismissOnboardingPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
525
456
  setWithdrawFromPlacementPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
526
457
  withdrawFromPlacement: () => Promise<void>;
527
- onFlagClick: (e: FlagCodes) => Promise<void>;
458
+ onFlagClick: (e: FlagCodes, onClose?: boolean) => Promise<void>;
528
459
  setUploadInsurance: import("react").Dispatch<import("react").SetStateAction<boolean>>;
529
460
  setUploadProviderDocPopup: import("react").Dispatch<import("react").SetStateAction<"insurance" | "riskAssessment" | "DbsCheck" | undefined>>;
530
461
  setUploadRA: import("react").Dispatch<import("react").SetStateAction<boolean>>;
@@ -535,7 +466,7 @@ export declare function useGetIndividualPlacementForPlacementPage({ user, placem
535
466
  setViewExternalLinkPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
536
467
  setOnboardingPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
537
468
  setRejectELIPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
538
- eliURL: string;
469
+ eliData: string | undefined;
539
470
  riskAssessmentURL: string;
540
471
  dbsCheckURL: string;
541
472
  setExternalLinkCopied: import("react").Dispatch<import("react").SetStateAction<boolean>>;
@@ -579,11 +510,14 @@ export declare function useGetIndividualPlacementForPlacementPage({ user, placem
579
510
  }, type: "riskAssessment" | "dbsCheck") => Promise<void>;
580
511
  manuallyConfigureProvider: () => Promise<void>;
581
512
  institute: InstituteData | undefined;
513
+ shareStudentRequestPopup: boolean;
514
+ setShareStudentRequestPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
582
515
  };
583
- export declare function useOnboardingPopup({ onboarding, placementId, user, onClose }: {
516
+ export declare function useOnboardingPopup({ onboarding, providerId, placementId, user, onClose }: {
584
517
  onboarding: (OnboardingDocs & {
585
518
  completed: {
586
- submitted: string | false;
519
+ submitted: boolean;
520
+ submittedDate?: string;
587
521
  accepted?: boolean;
588
522
  filesViewed?: string[];
589
523
  formsCompleted?: {
@@ -596,6 +530,7 @@ export declare function useOnboardingPopup({ onboarding, placementId, user, onCl
596
530
  });
597
531
  placementId: string;
598
532
  user: UserData;
533
+ providerId: string;
599
534
  onClose: () => void;
600
535
  }): {
601
536
  addFile: (files: string[]) => void;
@@ -615,7 +550,8 @@ export declare function useOnboardingPopup({ onboarding, placementId, user, onCl
615
550
  } | undefined>>;
616
551
  mOnboarding: OnboardingDocs & {
617
552
  completed: {
618
- submitted: string | false;
553
+ submitted: boolean;
554
+ submittedDate?: string;
619
555
  accepted?: boolean;
620
556
  filesViewed?: string[];
621
557
  formsCompleted?: {
@@ -638,7 +574,8 @@ export declare function useOnboardingPopup({ onboarding, placementId, user, onCl
638
574
  }) => Promise<void>;
639
575
  rejectPopup: boolean;
640
576
  completedSections: {
641
- submitted: string | false;
577
+ submitted: boolean;
578
+ submittedDate?: string;
642
579
  filesViewed?: string[] | undefined;
643
580
  formsCompleted?: {
644
581
  [key: string]: unknown;
@@ -649,5 +586,153 @@ export declare function useOnboardingPopup({ onboarding, placementId, user, onCl
649
586
  } | undefined;
650
587
  fileUploadPopup: number | false;
651
588
  setFileUploadPopup: import("react").Dispatch<import("react").SetStateAction<number | false>>;
589
+ viewableFiles: {
590
+ [key: string]: FileItem;
591
+ } | undefined;
592
+ formDetails: {
593
+ [key: string]: {
594
+ name: string;
595
+ id: string;
596
+ description?: string;
597
+ product: Products;
598
+ oId: string;
599
+ form: CustomFormSchema;
600
+ };
601
+ };
602
+ };
603
+ export declare function useLoadAddresses(user: UserData, limitItems?: number, queryConstraint?: QueryConstraint[], request?: boolean): {
604
+ addresses: {
605
+ [key: string]: import("placementt-core").Address & {
606
+ name?: string;
607
+ savedBy?: string[];
608
+ product: import("placementt-core").Products;
609
+ oId: string;
610
+ stage: import("placementt-core").OrganisationAddressStages;
611
+ additionalQuestions?: {
612
+ bikeStorage?: boolean;
613
+ kitchen?: boolean;
614
+ parking?: boolean;
615
+ disabledAccess?: boolean;
616
+ };
617
+ contacts?: {
618
+ firstAid?: {
619
+ name?: string;
620
+ phone?: string;
621
+ email?: string;
622
+ location?: string;
623
+ }[];
624
+ security?: {
625
+ name?: string;
626
+ phone?: string;
627
+ email?: string;
628
+ location?: string;
629
+ }[];
630
+ reception?: {
631
+ name?: string;
632
+ phone?: string;
633
+ email?: string;
634
+ location?: string;
635
+ }[];
636
+ };
637
+ primaryContactId?: string;
638
+ default?: boolean;
639
+ flags?: ("addressMissing" | "noPrimaryContact")[];
640
+ } & {
641
+ listings: number;
642
+ };
643
+ };
644
+ onScrollBottom: () => void;
645
+ loading: boolean;
646
+ changeQueryConstraints: (e: QueryConstraint[]) => void;
647
+ };
648
+ export declare function useLoadListings(user: UserData, queryConstraint?: QueryConstraint[], request?: boolean): {
649
+ listings: [string, PlacementListing & {
650
+ applicants?: number;
651
+ scheduled?: number;
652
+ active?: number;
653
+ }][];
654
+ onScrollBottom: () => void;
655
+ loading: boolean;
656
+ changeQueryConstraints: (e: QueryConstraint[]) => void;
657
+ };
658
+ export declare function useLoadProviderPlacements(user: UserData, queryConstraint?: QueryConstraint[], placementId?: string): {
659
+ placements: {
660
+ [k: string]: never;
661
+ };
662
+ onScrollBottom: () => void;
663
+ loading: boolean;
664
+ changeQueryConstraints: (e: QueryConstraint[]) => void;
665
+ };
666
+ export declare function useLoadApplications({ user, applicationType, listingId, queryConstraint }: {
667
+ user: UserData;
668
+ applicationType?: "all" | "actionRequired" | "awaitingStudent" | "closed";
669
+ listingId?: string;
670
+ queryConstraint?: QueryConstraint[];
671
+ }): {
672
+ applications: [string, Application][];
673
+ type: "all" | "closed" | "actionRequired" | "awaitingStudent";
674
+ setType: import("react").Dispatch<import("react").SetStateAction<"all" | "closed" | "actionRequired" | "awaitingStudent">>;
675
+ onScrollBottom: () => void;
676
+ loading: boolean;
677
+ changeQueryConstraints: (e: QueryConstraint[]) => void;
678
+ };
679
+ export type FilterObject = {
680
+ [key: string]: {
681
+ label: string;
682
+ value?: unknown;
683
+ values?: {
684
+ [key: string | number]: string | {
685
+ label: string;
686
+ test: QueryFieldFilterConstraint;
687
+ };
688
+ };
689
+ type: "dropdown" | "string" | "number";
690
+ };
691
+ };
692
+ export type DataViewerPaginater = {
693
+ view: "list" | "table";
694
+ queryLimit?: number;
695
+ formatItems?: (key: string, item: any) => Promise<{
696
+ key: string;
697
+ item: any;
698
+ }> | {
699
+ key: string;
700
+ item: any;
701
+ };
702
+ snapshot?: boolean;
703
+ filters?: FilterObject;
704
+ onSearch?: boolean | ((search?: string, sort?: [string, {
705
+ value: string;
706
+ direction: "asc" | "desc";
707
+ }], page?: number, filters?: FilterObject, limit?: number) => Promise<{
708
+ [key: string]: any;
709
+ }>);
710
+ data?: {
711
+ [key: string]: {
712
+ [key: string]: unknown;
713
+ };
714
+ } | QueryObject[];
715
+ additionalEntryProcessing?: (k: string, v: any) => Promise<any> | any;
716
+ sorts?: Sorts;
717
+ };
718
+ export declare function useDataViewerPaginator({ view: initialView, sorts, queryLimit, additionalEntryProcessing, formatItems, snapshot, filters: initialFilters, onSearch, data }: DataViewerPaginater): {
719
+ tableData: {
720
+ [key: string]: {
721
+ [key: string]: unknown;
722
+ };
723
+ };
724
+ pageUp: () => void;
725
+ pageDown: () => void;
726
+ setFilters: import("react").Dispatch<import("react").SetStateAction<FilterObject | undefined>>;
727
+ page: number;
728
+ sorts: Sorts;
729
+ loading: boolean | "loaded";
730
+ sort: [string, {
731
+ value: string;
732
+ direction: "asc" | "desc";
733
+ }] | undefined;
734
+ updateSort: (sortLabel: string) => void;
735
+ setView: import("react").Dispatch<import("react").SetStateAction<"table" | "list">>;
736
+ updateSearch: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
652
737
  };
653
738
  export {};