placementt-core 1.20.196 → 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
@@ -39,6 +39,7 @@ export type StudentPlacementData = {
39
39
  placementId?: string;
40
40
  addressId?: string;
41
41
  geoHash?: string;
42
+ statusType: "draft" | "submitted" | "active" | "completed" | "withdrawn";
42
43
  questions: PlacementQuestions;
43
44
  staffRoles: string[];
44
45
  sector: string;
@@ -49,12 +50,61 @@ export type StudentPlacementData = {
49
50
  active: boolean;
50
51
  completed: boolean;
51
52
  personalAnalytics?: string[];
53
+ completedStages?: number[];
52
54
  contactId?: string;
53
55
  created: string;
54
56
  inProgress: boolean;
55
57
  draft: boolean;
56
58
  activeDates: string[];
57
59
  insurance: boolean | "awaitingReview";
60
+ riskAssessment?: boolean | "awaitingReview";
61
+ riskAssessmentType?: "file" | "form";
62
+ riskAssessmentData?: {
63
+ [key: string]: unknown;
64
+ }[];
65
+ dbsCheck?: boolean | "awaitingReview";
66
+ dbsCheckType?: "file" | "form";
67
+ dbsCheckData?: {
68
+ [key: string]: unknown;
69
+ }[];
70
+ contactType?: "email" | "website" | "phone" | "post";
71
+ webpage?: string;
72
+ providerLogs?: string[];
73
+ studentsLogs?: string[];
74
+ staffLogs?: [];
75
+ feedback: {
76
+ students: {
77
+ completed: boolean;
78
+ data?: {
79
+ [key: string]: unknown;
80
+ };
81
+ };
82
+ provider: {
83
+ completed: boolean;
84
+ data?: {
85
+ [key: string]: unknown;
86
+ };
87
+ };
88
+ staff: {
89
+ completed: boolean;
90
+ data?: {
91
+ [key: string]: unknown;
92
+ };
93
+ };
94
+ };
95
+ onboarding: (OnboardingDocs & {
96
+ completed: {
97
+ submitted: string | false;
98
+ accepted?: boolean;
99
+ filesViewed?: string[];
100
+ formsCompleted?: {
101
+ [key: string]: unknown;
102
+ };
103
+ filesUploaded?: {
104
+ [key: number]: string[];
105
+ };
106
+ };
107
+ }) | false;
58
108
  };
59
109
  export type PlacementQuestions = {
60
110
  title: string;
@@ -62,6 +112,7 @@ export type PlacementQuestions = {
62
112
  dressCode: string;
63
113
  dressCodeText?: string;
64
114
  firstDayContact: string;
115
+ firstAider?: string;
65
116
  equipment: string;
66
117
  responsibilities: string;
67
118
  experiencesGiven: string;
@@ -71,15 +122,34 @@ export type PlacementQuestions = {
71
122
  bikeStorage: boolean;
72
123
  wheelchairFriendly: boolean;
73
124
  kitchen: boolean;
74
- studentLevel: "gcse" | "college" | "undergraduate" | "postgraduate";
125
+ lunchArrangements?: string;
126
+ hours: any;
127
+ studentLevel: "gcse" | "college" | "undergraduate" | "postgraduate" | "over18";
128
+ studentSublevel: string[];
75
129
  desiredLength: number;
130
+ desiredMinLength?: number;
131
+ desiredMaxLength?: number;
76
132
  desiredLengthUnits: "days" | "weeks" | "months";
77
133
  maximumStudents: number;
78
134
  workingLocation: "inPerson" | "hybrid" | "remote";
135
+ pay?: number;
136
+ payFrequency: "total" | "hourly" | "daily" | "weekly" | "monthly" | "annually";
137
+ };
138
+ export type SavedPlacement = {
139
+ placementId: string;
140
+ savedByProduct: Products;
141
+ savedByUserType: "Organisation" | "Student";
142
+ savedById: string;
143
+ status?: "Accepted" | "Blocked" | "providerReview";
144
+ listed: boolean;
145
+ concurrentPlacements?: number;
146
+ id: string;
79
147
  };
148
+ export type PlacementListingStages = "basic" | "address" | "students" | "responsibilities" | "applications" | "onboarding" | "review" | "complete";
80
149
  export type PlacementListing = {
81
150
  title: string;
82
151
  uid: string;
152
+ template?: string;
83
153
  providerId?: string;
84
154
  name: string;
85
155
  providerEmail: string;
@@ -95,7 +165,7 @@ export type PlacementListing = {
95
165
  country: string;
96
166
  addressId?: string;
97
167
  geoHash?: string;
98
- status: "listed" | "unlisted" | "deleted";
168
+ status: "listed" | "unlisted" | "deleted" | "draft";
99
169
  questions: PlacementQuestions;
100
170
  savedBy?: {
101
171
  [key: string]: {
@@ -108,12 +178,93 @@ export type PlacementListing = {
108
178
  mapConsent?: boolean;
109
179
  mapConsentData?: string;
110
180
  uploadedBy: "student" | "institute" | "provider";
181
+ riskAssessmentType?: "file" | "form";
182
+ riskAssessmentData?: {
183
+ [key: string]: unknown;
184
+ }[];
185
+ dbsCheckType?: "file" | "form";
186
+ dbsCheckData?: {
187
+ [key: string]: unknown;
188
+ }[];
189
+ contactType?: "email" | "website" | "phone" | "post";
190
+ webpage?: string;
191
+ stage: PlacementListingStages;
192
+ placementDateType?: "any" | "range" | "defined";
193
+ placementDates?: {
194
+ start: string;
195
+ end: string;
196
+ }[];
197
+ applicationType?: "simple" | "complex";
198
+ applicantWorkflowId?: string;
199
+ applicantWorkflow?: ApplicantStage[];
200
+ onboarding: OnboardingDocs | false;
201
+ maxApplicants?: number;
202
+ maxStudents?: number;
203
+ primaryContactId: string;
111
204
  };
205
+ export type OnboardingDocs = {
206
+ deadline?: string;
207
+ message?: string;
208
+ deadlineType?: "date" | "days";
209
+ forms?: string[];
210
+ files?: string[];
211
+ formDetails?: {
212
+ [key: string]: {
213
+ name: string;
214
+ id: string;
215
+ description?: string;
216
+ product: Products;
217
+ oId: string;
218
+ form: CustomFormSchema;
219
+ };
220
+ };
221
+ requiredFiles?: {
222
+ fileName: string;
223
+ fileType: string;
224
+ }[];
225
+ viewableFiles?: {
226
+ [key: string]: FileItem;
227
+ };
228
+ };
229
+ export type PlacementTemplate = PlacementListing & {
230
+ templateName: string;
231
+ };
232
+ export type OrganisationAddressStages = "address" | "contacts" | "misc" | "review" | "complete";
112
233
  export type OrganisationAddress = Address & {
113
234
  name?: string;
114
235
  savedBy?: string[];
115
236
  product: Products;
116
237
  oId: string;
238
+ stage: OrganisationAddressStages;
239
+ additionalQuestions?: {
240
+ bikeStorage?: boolean;
241
+ kitchen?: boolean;
242
+ parking?: boolean;
243
+ disabledAccess?: boolean;
244
+ };
245
+ contacts?: {
246
+ firstAid?: {
247
+ name?: string;
248
+ phone?: string;
249
+ email?: string;
250
+ location?: string;
251
+ }[];
252
+ security?: {
253
+ name?: string;
254
+ phone?: string;
255
+ email?: string;
256
+ location?: string;
257
+ }[];
258
+ reception?: {
259
+ name?: string;
260
+ phone?: string;
261
+ email?: string;
262
+ location?: string;
263
+ }[];
264
+ };
265
+ primaryContactId?: string;
266
+ default?: boolean;
267
+ flags?: ("addressMissing" | "noPrimaryContact")[];
117
268
  };
118
269
  export type Address = {
119
270
  id?: string;
@@ -124,14 +275,17 @@ export type Address = {
124
275
  country: string;
125
276
  geoHash?: string;
126
277
  };
127
- export type FlagCodes = "inactive" | "noParentEmailWarning" | "noParentEmailError" | "overdue" | "noInsurance" | "nearingStart" | "awaitingInsurance" | "notVerified" | "needInformation";
278
+ export type FlagCodes = "inactive" | "noParentEmailWarning" | "noParentEmailError" | "overdue" | "noInsurance" | "providerRejection" | "nearingStart" | "awaitingInsurance" | "noRiskAssessment" | "awaitingRiskAssessment" | "parentEmailFailed" | "providerEmailFailed" | "userEmailFailed" | "noDbsCheck" | "awaitingDbsCheck" | "completeOnboarding" | "reviewOnboarding" | "requestedVisibleAddresses" | "requestedVisiblePlacementListings";
128
279
  export type UserData = {
129
280
  details: {
130
281
  forename: string;
131
282
  surname: string;
132
- parentEmail: string;
283
+ parentEmail?: string;
133
284
  year?: string;
134
285
  };
286
+ renewalMonth: number;
287
+ placementCharged?: boolean;
288
+ algoliaKey: string;
135
289
  email: string;
136
290
  phone?: string;
137
291
  status: "active" | "inactive" | "unclaimed";
@@ -175,6 +329,13 @@ export type UserData = {
175
329
  shareNameWithReferralLeaderboardConsent?: boolean;
176
330
  shareNameWithReferralLeaderboardConsentDate?: boolean;
177
331
  referralCode?: string;
332
+ notificationFrequency?: "daily" | "weekly" | "fortnightly" | "never";
333
+ monthAdded?: number;
334
+ placementsCharged?: boolean;
335
+ visibleAddresses?: string[];
336
+ visibleListings?: string[];
337
+ requestedVisibleAddresses?: string[];
338
+ requestedVisibleListings?: string[];
178
339
  };
179
340
  export type AnalyticsItem = {
180
341
  units?: "placements" | "weeks" | "days" | "hours";
@@ -218,21 +379,20 @@ export type UserGroupData = {
218
379
  viewStudents: "all" | "filter" | "none";
219
380
  filterUsersBy?: string;
220
381
  filterUsersValue?: string;
221
- };
222
- export type StaffUserGroup = UserGroupData & {
382
+ } & ProviderUserPermissions;
383
+ export type StaffUserGroup = UserGroupData & StaffUserPermissions;
384
+ export type ProviderUserGroup = UserGroupData & ProviderUserPermissions;
385
+ export type StaffUserPermissions = UserGroupData & {
223
386
  viewStaff: boolean;
224
- viewCohorts: "all" | "some" | "none";
225
- cohorts?: string[];
226
- viewStudents: "all" | "filter" | "none";
227
- filterUsersBy?: string;
228
- filterUsersValue?: string;
229
387
  addStaff?: boolean;
388
+ activateStaff?: boolean;
230
389
  editStaff?: boolean;
231
390
  deleteStaff?: boolean;
232
391
  addStaffGroups?: boolean;
233
392
  editStaffGroups?: boolean;
234
393
  deleteStaffGroups?: boolean;
235
394
  addStudents?: boolean;
395
+ activateStudents?: boolean;
236
396
  editStudents?: boolean;
237
397
  deleteStudents?: boolean;
238
398
  viewSetup?: boolean;
@@ -246,6 +406,67 @@ export type StaffUserGroup = UserGroupData & {
246
406
  manageBilling?: boolean;
247
407
  proposePlacements?: boolean;
248
408
  createCohorts?: boolean;
409
+ viewPlacements?: boolean;
410
+ viewPlacementTasks?: boolean;
411
+ signOffPlacements?: boolean;
412
+ editPlacements?: boolean;
413
+ addPlacements?: boolean;
414
+ deletePlacements?: boolean;
415
+ verifyInsurance?: boolean;
416
+ verifyListings?: boolean;
417
+ viewDatabase?: boolean;
418
+ addListings?: boolean;
419
+ deleteListings?: boolean;
420
+ verifyRiskAssessments?: boolean;
421
+ verifyDbsChecks?: boolean;
422
+ addCohorts?: boolean;
423
+ editCohorts?: boolean;
424
+ deleteCohorts?: boolean;
425
+ editRequests?: boolean;
426
+ deleteRequests?: boolean;
427
+ };
428
+ export type ProviderUserPermissions = {
429
+ viewStaff: boolean;
430
+ addStaff?: boolean;
431
+ activateStaff?: boolean;
432
+ editStaff?: boolean;
433
+ deleteStaff?: boolean;
434
+ addUserGroups?: boolean;
435
+ editUserGroups?: boolean;
436
+ deleteUserGroups?: boolean;
437
+ addStudents?: boolean;
438
+ addForms?: boolean;
439
+ editForms?: boolean;
440
+ deleteForms?: boolean;
441
+ addFiles?: boolean;
442
+ deleteFiles?: boolean;
443
+ viewBilling?: boolean;
444
+ manageBilling?: boolean;
445
+ createPlacementListing?: "any" | "template" | "none";
446
+ createPlacementTemplate?: boolean;
447
+ viewPlacementListings?: "all" | "request" | "none";
448
+ viewPlacementGroups?: "all" | "request" | "none";
449
+ viewAddresses?: "all" | "request" | "none";
450
+ processApplicants?: boolean;
451
+ addAddresses?: boolean;
452
+ editAddresses?: boolean;
453
+ deleteAddresses?: boolean;
454
+ addApplicantWorkflows?: boolean;
455
+ editApplicantWorkflows?: boolean;
456
+ deleteApplicantWorkflows?: boolean;
457
+ editRequests?: boolean;
458
+ deleteRequests?: boolean;
459
+ manageAccessRequests?: boolean;
460
+ manageRegistrationRequests?: boolean;
461
+ };
462
+ export type RegistrationRequest = {
463
+ forename: string;
464
+ surname: string;
465
+ email: string;
466
+ message: string;
467
+ created: string;
468
+ oId: string;
469
+ product: "providers" | "institutes";
249
470
  };
250
471
  export type WorkflowStage = {
251
472
  id: number;
@@ -270,6 +491,8 @@ export type WorkflowStage = {
270
491
  name: string;
271
492
  }];
272
493
  eli?: boolean;
494
+ riskAssessment?: boolean;
495
+ dbsCheck?: boolean;
273
496
  defaultForms?: {
274
497
  name: string;
275
498
  description: string;
@@ -277,6 +500,10 @@ export type WorkflowStage = {
277
500
  user: "staff" | "students" | "provider";
278
501
  details: CustomFormSchema;
279
502
  }[];
503
+ requiredFiles?: {
504
+ fileName: string;
505
+ fileType: string;
506
+ }[];
280
507
  };
281
508
  export type ProviderPlacementData = {
282
509
  title: string;
@@ -300,11 +527,12 @@ export type ProviderData = {
300
527
  insurance: boolean;
301
528
  regNumber?: string;
302
529
  insuranceExpiry: string;
303
- mapConsent?: boolean;
530
+ mapConsent?: boolean | "unlisted";
304
531
  mapConsentDate?: string;
305
532
  staffGuidance?: {
306
533
  [key: number]: string;
307
534
  };
535
+ about?: string;
308
536
  sector: string;
309
537
  defAddress: string;
310
538
  subsector: string;
@@ -317,6 +545,22 @@ export type ProviderData = {
317
545
  status: "uploaded" | "approved" | "blocked";
318
546
  };
319
547
  };
548
+ onboarding?: {
549
+ hasStaff?: boolean;
550
+ multipleAddresses?: boolean;
551
+ };
552
+ registrationRequests?: boolean | string;
553
+ registrationRequestsDate?: string;
554
+ information: {
555
+ description?: string;
556
+ staff?: string;
557
+ locations?: number;
558
+ };
559
+ discount?: string;
560
+ package?: string;
561
+ splitBilling?: boolean;
562
+ adminBillingContactId: string;
563
+ addOnPackages?: string[];
320
564
  };
321
565
  export type InstituteData = {
322
566
  students: number;
@@ -329,6 +573,10 @@ export type InstituteData = {
329
573
  name: string;
330
574
  verifiedProviders?: string[];
331
575
  awaitingProviderInsurance?: string[];
576
+ verifiedRiskAssessments?: string[];
577
+ awaitingPlacementRiskAssessments?: string[];
578
+ verifiedDbsChecks?: string[];
579
+ awaitingPlacementDbsChecks?: string[];
332
580
  staffGuidance?: {
333
581
  [key: number]: string;
334
582
  };
@@ -340,10 +588,12 @@ export type InstituteData = {
340
588
  [cohortId: string]: string[];
341
589
  };
342
590
  };
343
- packages?: {
344
- [key: string]: unknown;
345
- };
346
591
  externalProviderUploads?: boolean;
592
+ discount?: string;
593
+ package?: string;
594
+ splitBilling?: boolean;
595
+ adminBillingContactId?: string;
596
+ addOnPackages?: string[];
347
597
  } & Address;
348
598
  export type NotificationObject = {
349
599
  buttonURL: string;
@@ -354,28 +604,35 @@ export type NotificationObject = {
354
604
  viewedBy: string[];
355
605
  docPath: DocumentReference<DocumentData>;
356
606
  };
357
- export type CustomFormSchema = [
358
- {
359
- id: number;
360
- title: string;
361
- fields: {
362
- id: number;
363
- label: string;
364
- required: boolean;
365
- type: "short" | "long" | "number" | "date" | "dropdown" | "checkbox" | "rating";
366
- width: number;
367
- subtitle?: string;
368
- extra: {
369
- default?: boolean | string | number;
370
- min?: number;
371
- max?: number;
372
- minRows?: number;
373
- options?: string[];
374
- levels?: number;
375
- };
376
- }[];
377
- }
378
- ];
607
+ export type CustomFormSchemaField = {
608
+ id: number;
609
+ label: string;
610
+ required: boolean;
611
+ type: "short" | "long" | "number" | "date" | "dropdown" | "checkbox" | "rating";
612
+ width: number;
613
+ subtitle?: string;
614
+ extra: {
615
+ default?: boolean | string | number;
616
+ min?: number;
617
+ max?: number;
618
+ minRows?: number;
619
+ options?: string[];
620
+ levels?: number;
621
+ };
622
+ };
623
+ export type CustomFormSchemaSection = {
624
+ id: number;
625
+ title?: string;
626
+ description?: string;
627
+ fields: CustomFormSchemaField[];
628
+ };
629
+ export type CustomFormSchema = {
630
+ name?: string;
631
+ description?: string;
632
+ updated?: string;
633
+ id?: string;
634
+ form?: CustomFormSchemaSection[];
635
+ };
379
636
  export type StaffRoles = {
380
637
  name: string;
381
638
  filters: {
@@ -392,21 +649,6 @@ export type QueryObject = {
392
649
  where?: QueryObjectConstraint;
393
650
  orderBy?: string;
394
651
  };
395
- export type AdmissionsCohort = {
396
- name: string;
397
- students: {
398
- [key: string]: {
399
- email: string;
400
- status: "Pending" | "Accepted" | "Rejected" | "In institute" | "Account removed";
401
- forename: string;
402
- surname: string;
403
- };
404
- };
405
- permissions: {
406
- [key: string]: unknown;
407
- };
408
- expiry: string;
409
- };
410
652
  export type Note = {
411
653
  title?: string;
412
654
  body?: {
@@ -444,15 +686,38 @@ export type CohortData = {
444
686
  id?: string;
445
687
  name: string;
446
688
  placementType: "defined" | "continuous";
689
+ forms?: string[];
690
+ files?: string[];
447
691
  startSubmission: string;
448
692
  endSubmission: string;
449
693
  startPlacements: string;
450
694
  endPlacements: string;
451
- stage: "name" | "placementType" | "students" | "workflow" | "review" | "created" | "archived";
695
+ stage: "info" | "name" | "placementType" | "students" | "workflow" | "review" | "created" | "archived";
452
696
  workflow: WorkflowStage[];
697
+ customWorkflow?: boolean;
453
698
  oId: string;
454
699
  product: Products;
455
700
  designatedStaff?: string;
701
+ logType?: "basic" | "custom";
702
+ logs?: {
703
+ students?: string;
704
+ staff?: string;
705
+ provider?: string;
706
+ };
707
+ feedback?: {
708
+ students?: string;
709
+ staff?: string;
710
+ provider?: string;
711
+ };
712
+ feedbackText?: {
713
+ students?: Descendant[];
714
+ staff?: Descendant[];
715
+ provider?: Descendant[];
716
+ };
717
+ providerFeedbackSent?: Timestamp;
718
+ studentsFeedbackSent?: Timestamp;
719
+ billingEmail?: string;
720
+ billingContactId?: string;
456
721
  };
457
722
  export type ArrowObject = {
458
723
  start: number | string;
@@ -462,6 +727,7 @@ export type ArrowObject = {
462
727
  screenX?: number;
463
728
  };
464
729
  export type PlacementReviewDetails = {
730
+ activeDates: string[];
465
731
  studentForename: string;
466
732
  studentSurname: string;
467
733
  instituteName: string;
@@ -475,6 +741,7 @@ export type PlacementReviewDetails = {
475
741
  contactForename: string;
476
742
  contactSurname: string;
477
743
  cohort: string;
744
+ cohortData?: CohortData;
478
745
  providerKey: string;
479
746
  status: number;
480
747
  ["address-line1"]: string;
@@ -498,12 +765,38 @@ export type PlacementReviewDetails = {
498
765
  mapConsent: boolean;
499
766
  jobTitle: string;
500
767
  questions: PlacementQuestions;
768
+ riskAssessment: boolean | "awaitingReview";
769
+ riskAssessmentType: "form" | "file";
770
+ riskAssessmentData?: {
771
+ [key: string]: unknown;
772
+ };
773
+ dbsCheck: boolean | "awaitingReview";
774
+ dbsCheckType: "form" | "file";
775
+ dbsCheckData?: {
776
+ [key: string]: unknown;
777
+ };
501
778
  };
502
779
  };
503
780
  requireELI?: boolean;
781
+ requireRA?: boolean;
782
+ requireDBS?: boolean;
504
783
  importedProviderForms: boolean;
505
784
  currentStage: WorkflowStage;
506
785
  placementId?: string;
786
+ incompleteItems: {
787
+ [key: number]: string[];
788
+ };
789
+ riskAssessmentData?: {
790
+ [key: string]: unknown;
791
+ }[];
792
+ dbsCheckData?: {
793
+ [key: string]: unknown;
794
+ }[];
795
+ feedbackText?: Descendant[];
796
+ feedback: CustomFormSchema;
797
+ providerFeedback?: {
798
+ [key: string]: unknown;
799
+ };
507
800
  };
508
801
  export type BlogCategories = "students" | "providers" | "institutes" | "placementt";
509
802
  export type Blog = {
@@ -515,3 +808,135 @@ export type Blog = {
515
808
  author?: string;
516
809
  tags?: string;
517
810
  };
811
+ export type PlacementExportObject = {
812
+ cohortId: string;
813
+ startDate?: string;
814
+ endDate?: string;
815
+ allTime?: boolean;
816
+ includeStudentData?: boolean;
817
+ activePlacements?: boolean;
818
+ completedPlacements?: boolean;
819
+ };
820
+ export type ApplicantWorkflow = {
821
+ id?: string;
822
+ name: string;
823
+ forms?: string[];
824
+ files?: string[];
825
+ workflow: ApplicantStage[];
826
+ customWorkflow?: boolean;
827
+ oId: string;
828
+ product: Products;
829
+ type: "simple" | "complex";
830
+ };
831
+ export type ApplicantStage = {
832
+ id: number;
833
+ name: string;
834
+ message?: string;
835
+ userType?: "Students" | "Staff";
836
+ permanent?: boolean;
837
+ checkpoint?: boolean;
838
+ buttons?: {
839
+ id: number;
840
+ name: string | false;
841
+ required: boolean;
842
+ }[];
843
+ pos?: {
844
+ x: number;
845
+ y: number;
846
+ };
847
+ forms?: string[];
848
+ files?: string[];
849
+ deadline?: string;
850
+ deadlineType?: "date" | "days";
851
+ formDetails?: {
852
+ [key: string]: {
853
+ name: string;
854
+ id: string;
855
+ description?: string;
856
+ product: Products;
857
+ oId: string;
858
+ form: CustomFormSchema;
859
+ };
860
+ };
861
+ requiredFiles?: {
862
+ fileName: string;
863
+ fileType: string;
864
+ }[];
865
+ portfolio?: boolean;
866
+ viewableFiles?: {
867
+ [key: string]: FileItem;
868
+ };
869
+ };
870
+ export type Application = {
871
+ id?: string;
872
+ uid: string;
873
+ applicantWorkflowId: string;
874
+ listingId: string;
875
+ providerId: string;
876
+ reqUserType: "Students" | "Staff";
877
+ completedSections: {
878
+ [stage: number]: {
879
+ submitted?: string;
880
+ filesViewed?: string[];
881
+ formsCompleted?: {
882
+ [key: string]: unknown;
883
+ };
884
+ filesUploaded?: {
885
+ [key: number]: string[];
886
+ };
887
+ };
888
+ };
889
+ created: string;
890
+ submitted: string;
891
+ startDate: string;
892
+ endDate: string;
893
+ leadTimes?: string[];
894
+ stage: number;
895
+ outcomeMessage?: string;
896
+ status: "draft" | "submitted" | "approved" | "declined";
897
+ placementId?: string;
898
+ };
899
+ export type Report = {
900
+ added: string;
901
+ id: string;
902
+ oId: string;
903
+ product: Products;
904
+ pId: string;
905
+ reason: string;
906
+ uid: string;
907
+ status: "open" | "closed";
908
+ };
909
+ export type FileItem = {
910
+ product: Products;
911
+ oId: string;
912
+ added: string;
913
+ name: string;
914
+ fileName: string;
915
+ url?: string;
916
+ };
917
+ export type Event = {
918
+ collection: "users" | "placements" | "placementListings";
919
+ documentId: string;
920
+ product: Products;
921
+ oId: string;
922
+ created: Timestamp;
923
+ title: string;
924
+ description?: string;
925
+ severity: string;
926
+ button?: {
927
+ title: string;
928
+ url: string;
929
+ };
930
+ };
931
+ export type BillingPackage = {
932
+ name: string;
933
+ staffUnitCost: number;
934
+ studentUnitCost: number;
935
+ placementUnitCost: number;
936
+ product: Products;
937
+ priority: number;
938
+ features: {
939
+ [key: string]: number | boolean | string;
940
+ };
941
+ description: string;
942
+ };