placementt-core 1.20.211 → 11.10.151

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 (130) 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 +6 -2
  5. package/lib/constants.js +136 -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 +1 -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 +7 -8
  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/completedStudentPlacementsSlice.d.ts +2 -2
  30. package/lib/features/placements/studentPlacements/studentPlacementsSlice.d.ts +63 -63
  31. package/lib/features/placements/studentPlacements/studentPlacementsSlice.js +81 -81
  32. package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.d.ts +2 -2
  33. package/lib/features/placements/studentPlacements/useStudentPlacements.d.ts +0 -1
  34. package/lib/features/placements/studentPlacements/useStudentPlacements.js +1 -2
  35. package/lib/features/placements/studentPlacements/useStudentPlacements.js.map +1 -1
  36. package/lib/features/providerPlacements/providerPlacementsSlice.d.ts +19 -19
  37. package/lib/features/providerPlacements/providerPlacementsSlice.js +24 -24
  38. package/lib/features/referrals/useReferrals.d.ts +0 -1
  39. package/lib/features/referrals/useReferrals.js +1 -2
  40. package/lib/features/referrals/useReferrals.js.map +1 -1
  41. package/lib/features/studentPlacements/studentPlacementsSlice.d.ts +62 -62
  42. package/lib/features/studentPlacements/studentPlacementsSlice.js +87 -87
  43. package/lib/features/studentPlacements/useStudentPlacements.d.ts +6 -6
  44. package/lib/features/studentPlacements/useStudentPlacements.js +18 -18
  45. package/lib/features/updates/useUpdates.js +1 -2
  46. package/lib/features/updates/useUpdates.js.map +1 -1
  47. package/lib/features/userSlice.d.ts +26 -26
  48. package/lib/features/userSlice.js +23 -23
  49. package/lib/features/users/useUserFunctions.d.ts +25 -25
  50. package/lib/features/users/useUserFunctions.js +124 -124
  51. package/lib/features/users/userSlice.d.ts +46 -46
  52. package/lib/features/users/userSlice.js +48 -48
  53. package/lib/firebase/firebase.d.ts +3 -1
  54. package/lib/firebase/firebase.js +9 -3
  55. package/lib/firebase/firebase.js.map +1 -1
  56. package/lib/firebase/firebaseConfig.js +3 -0
  57. package/lib/firebase/firebaseConfig.js.map +1 -1
  58. package/lib/firebase/firebaseQuery.d.ts +3 -1
  59. package/lib/firebase/firebaseQuery.js +11 -1
  60. package/lib/firebase/firebaseQuery.js.map +1 -1
  61. package/lib/firebase/persistence.js +2 -2
  62. package/lib/firebase/persistence.js.map +1 -1
  63. package/lib/firebase/readDatabase.d.ts +8 -7
  64. package/lib/firebase/readDatabase.js +41 -8
  65. package/lib/firebase/readDatabase.js.map +1 -1
  66. package/lib/firebase/util.d.ts +3 -4
  67. package/lib/firebase/util.js +49 -4
  68. package/lib/firebase/util.js.map +1 -1
  69. package/lib/firebase/writeDatabase.d.ts +7 -3
  70. package/lib/firebase/writeDatabase.js +9 -2
  71. package/lib/firebase/writeDatabase.js.map +1 -1
  72. package/lib/hooks.d.ts +476 -20
  73. package/lib/hooks.js +1855 -237
  74. package/lib/hooks.js.map +1 -1
  75. package/lib/images/GatsbyBenchmarks.d.ts +0 -1
  76. package/lib/images/GatsbyBenchmarks.js +1 -1
  77. package/lib/images/GatsbyBenchmarks.js.map +1 -1
  78. package/lib/reduxHooks.d.ts +9 -2
  79. package/lib/reduxHooks.js +36 -9
  80. package/lib/reduxHooks.js.map +1 -1
  81. package/lib/tasksAndTips.d.ts +25 -5
  82. package/lib/tasksAndTips.js +517 -48
  83. package/lib/tasksAndTips.js.map +1 -1
  84. package/lib/typeDefinitions.d.ts +472 -55
  85. package/lib/util.d.ts +1 -0
  86. package/lib/util.js +85 -7
  87. package/lib/util.js.map +1 -1
  88. package/package.json +52 -49
  89. package/src/DatabaseDefinitions.ts +18 -18
  90. package/src/apiCalls.ts +128 -128
  91. package/src/config.ts +50 -50
  92. package/src/constants.ts +714 -707
  93. package/src/databaseTypes.ts +42 -42
  94. package/src/features/analytics/useAnalytics.tsx +64 -64
  95. package/src/features/contacts/contactsSlice.ts +147 -147
  96. package/src/features/contacts/useContacts.tsx +73 -73
  97. package/src/features/dropdown/useDropdown.tsx +52 -52
  98. package/src/features/global/downtime/useDowntime.tsx +23 -23
  99. package/src/features/global/users/useUserFunctions.tsx +132 -132
  100. package/src/features/jobs/jobsSlice.ts +65 -65
  101. package/src/features/placements/studentPlacements/activePlacement.ts +68 -68
  102. package/src/features/placements/studentPlacements/completedStudentPlacementsSlice.ts +97 -97
  103. package/src/features/placements/studentPlacements/upcomingStudentPlacementsSlice.ts +108 -108
  104. package/src/features/placements/studentPlacements/useStudentPlacements.tsx +9 -9
  105. package/src/features/placements/types.ts +10 -10
  106. package/src/features/referrals/useReferrals.tsx +56 -56
  107. package/src/features/updates/useUpdates.tsx +38 -38
  108. package/src/firebase/firebase.tsx +144 -138
  109. package/src/firebase/firebaseConfig.tsx +45 -42
  110. package/src/firebase/firebaseQuery.tsx +150 -140
  111. package/src/firebase/persistence.ts +84 -84
  112. package/src/firebase/readDatabase.tsx +235 -197
  113. package/src/firebase/util.tsx +352 -308
  114. package/src/firebase/writeDatabase.tsx +77 -68
  115. package/src/hooks.tsx +4029 -1928
  116. package/src/images/GatsbyBenchmarks.tsx +711 -711
  117. package/src/images/LogFuturePlacement.jsx +64 -64
  118. package/src/images/LogPreviousPlacement.jsx +228 -228
  119. package/src/images/gatsby_benchmarks.svg +466 -466
  120. package/src/images/log_future_placement.svg +114 -114
  121. package/src/images/log_previous_placement.svg +199 -199
  122. package/src/index.ts +34 -34
  123. package/src/readDatabase.tsx +3 -3
  124. package/src/reduxHooks.ts +231 -200
  125. package/src/tasksAndTips.ts +917 -410
  126. package/src/tutorialTips.ts +58 -58
  127. package/src/typeDefinitions.ts +893 -503
  128. package/src/util.ts +137 -47
  129. package/tsconfig.dev.json +5 -5
  130. 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,63 @@ 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
+ deadline?: string;
97
+ completed: {
98
+ submitted: boolean;
99
+ submittedDate?: string;
100
+ accepted?: boolean;
101
+ filesViewed?: string[];
102
+ formsCompleted?: {
103
+ [key: string]: unknown;
104
+ };
105
+ filesUploaded?: {
106
+ [key: number]: string[];
107
+ };
108
+ };
109
+ }) | false | null;
58
110
  };
59
111
  export type PlacementQuestions = {
60
112
  title: string;
@@ -62,6 +114,7 @@ export type PlacementQuestions = {
62
114
  dressCode: string;
63
115
  dressCodeText?: string;
64
116
  firstDayContact: string;
117
+ firstAider?: string;
65
118
  equipment: string;
66
119
  responsibilities: string;
67
120
  experiencesGiven: string;
@@ -71,15 +124,34 @@ export type PlacementQuestions = {
71
124
  bikeStorage: boolean;
72
125
  wheelchairFriendly: boolean;
73
126
  kitchen: boolean;
74
- studentLevel: "gcse" | "college" | "undergraduate" | "postgraduate";
127
+ lunchArrangements?: string;
128
+ hours: any;
129
+ studentLevel: "gcse" | "college" | "undergraduate" | "postgraduate" | "over18";
130
+ studentSublevel: string[];
75
131
  desiredLength: number;
132
+ desiredMinLength?: number;
133
+ desiredMaxLength?: number;
76
134
  desiredLengthUnits: "days" | "weeks" | "months";
77
135
  maximumStudents: number;
78
136
  workingLocation: "inPerson" | "hybrid" | "remote";
137
+ pay?: number;
138
+ payFrequency: "total" | "hourly" | "daily" | "weekly" | "monthly" | "annually";
139
+ };
140
+ export type SavedPlacement = {
141
+ placementId: string;
142
+ savedByProduct: Products;
143
+ savedByUserType: "Organisation" | "Student";
144
+ savedById: string;
145
+ status?: "Accepted" | "Blocked" | "providerReview";
146
+ listed: boolean;
147
+ concurrentPlacements?: number;
148
+ id: string;
79
149
  };
150
+ export type PlacementListingStages = "basic" | "address" | "students" | "responsibilities" | "applications" | "onboarding" | "review" | "complete";
80
151
  export type PlacementListing = {
81
152
  title: string;
82
153
  uid: string;
154
+ template?: string;
83
155
  providerId?: string;
84
156
  name: string;
85
157
  providerEmail: string;
@@ -95,7 +167,7 @@ export type PlacementListing = {
95
167
  country: string;
96
168
  addressId?: string;
97
169
  geoHash?: string;
98
- status: "listed" | "unlisted" | "deleted";
170
+ status: "listed" | "unlisted" | "deleted" | "draft";
99
171
  questions: PlacementQuestions;
100
172
  savedBy?: {
101
173
  [key: string]: {
@@ -108,12 +180,80 @@ export type PlacementListing = {
108
180
  mapConsent?: boolean;
109
181
  mapConsentData?: string;
110
182
  uploadedBy: "student" | "institute" | "provider";
183
+ riskAssessmentType?: "file" | "form";
184
+ riskAssessmentData?: {
185
+ [key: string]: unknown;
186
+ }[];
187
+ dbsCheckType?: "file" | "form";
188
+ dbsCheckData?: {
189
+ [key: string]: unknown;
190
+ }[];
191
+ contactType?: "email" | "website" | "phone" | "post";
192
+ webpage?: string;
193
+ stage: PlacementListingStages;
194
+ placementDateType?: "any" | "range" | "defined";
195
+ placementDates?: {
196
+ start: string;
197
+ end: string;
198
+ }[];
199
+ applicationType?: "simple" | "complex";
200
+ applicantWorkflowId?: string;
201
+ applicantWorkflow?: ApplicantStage[];
202
+ onboarding: (OnboardingDocs & {
203
+ deadline: number;
204
+ }) | false;
205
+ maxApplicants?: number;
206
+ maxStudents?: number;
207
+ primaryContactId: string;
111
208
  };
209
+ export type OnboardingDocs = {
210
+ message?: string;
211
+ forms?: string[];
212
+ files?: string[];
213
+ requiredFiles?: {
214
+ fileName: string;
215
+ fileType: string;
216
+ }[];
217
+ };
218
+ export type PlacementTemplate = PlacementListing & {
219
+ templateName: string;
220
+ };
221
+ export type OrganisationAddressStages = "address" | "contacts" | "misc" | "review" | "complete";
112
222
  export type OrganisationAddress = Address & {
113
223
  name?: string;
114
224
  savedBy?: string[];
115
225
  product: Products;
116
226
  oId: string;
227
+ stage: OrganisationAddressStages;
228
+ additionalQuestions?: {
229
+ bikeStorage?: boolean;
230
+ kitchen?: boolean;
231
+ parking?: boolean;
232
+ disabledAccess?: boolean;
233
+ };
234
+ contacts?: {
235
+ firstAid?: {
236
+ name?: string;
237
+ phone?: string;
238
+ email?: string;
239
+ location?: string;
240
+ }[];
241
+ security?: {
242
+ name?: string;
243
+ phone?: string;
244
+ email?: string;
245
+ location?: string;
246
+ }[];
247
+ reception?: {
248
+ name?: string;
249
+ phone?: string;
250
+ email?: string;
251
+ location?: string;
252
+ }[];
253
+ };
254
+ primaryContactId?: string;
255
+ default?: boolean;
256
+ flags?: ("addressMissing" | "noPrimaryContact")[];
117
257
  };
118
258
  export type Address = {
119
259
  id?: string;
@@ -124,14 +264,18 @@ export type Address = {
124
264
  country: string;
125
265
  geoHash?: string;
126
266
  };
127
- export type FlagCodes = "inactive" | "noParentEmailWarning" | "noParentEmailError" | "overdue" | "noInsurance" | "nearingStart" | "awaitingInsurance" | "notVerified" | "needInformation";
267
+ export type FlagCodes = "inactive" | "noParentEmailWarning" | "noParentEmailError" | "overdue" | "noInsurance" | "providerRejection" | "nearingStart" | "awaitingInsurance" | "noRiskAssessment" | "awaitingRiskAssessment" | "parentEmailFailed" | "providerEmailFailed" | "userEmailFailed" | "noDbsCheck" | "awaitingDbsCheck" | "completeOnboarding" | "reviewOnboarding" | "requestedVisibleAddresses" | "requestedVisiblePlacementListings" | "addOnboarding";
128
268
  export type UserData = {
129
269
  details: {
130
270
  forename: string;
131
271
  surname: string;
132
- parentEmail: string;
272
+ pronouns?: string;
273
+ parentEmail?: string;
133
274
  year?: string;
134
275
  };
276
+ renewalMonth: number;
277
+ placementCharged?: boolean;
278
+ algoliaKey: string;
135
279
  email: string;
136
280
  phone?: string;
137
281
  status: "active" | "inactive" | "unclaimed";
@@ -170,11 +314,19 @@ export type UserData = {
170
314
  visibleCohorts?: string;
171
315
  readUpdates?: string[];
172
316
  contactProviderConsent?: boolean;
173
- contactProviderConsenDate?: boolean;
317
+ contactProviderConsentDate?: boolean;
174
318
  referrals?: number;
175
319
  shareNameWithReferralLeaderboardConsent?: boolean;
176
320
  shareNameWithReferralLeaderboardConsentDate?: boolean;
177
321
  referralCode?: string;
322
+ notificationFrequency?: "daily" | "weekly" | "fortnightly" | "never";
323
+ monthAdded?: number;
324
+ placementsCharged?: boolean;
325
+ visibleAddresses?: string[];
326
+ visibleListings?: string[];
327
+ requestedVisibleAddresses?: string[];
328
+ requestedVisibleListings?: string[];
329
+ packageData?: BillingPackage;
178
330
  };
179
331
  export type AnalyticsItem = {
180
332
  units?: "placements" | "weeks" | "days" | "hours";
@@ -218,21 +370,20 @@ export type UserGroupData = {
218
370
  viewStudents: "all" | "filter" | "none";
219
371
  filterUsersBy?: string;
220
372
  filterUsersValue?: string;
221
- };
222
- export type StaffUserGroup = UserGroupData & {
373
+ } & ProviderUserPermissions;
374
+ export type StaffUserGroup = UserGroupData & StaffUserPermissions;
375
+ export type ProviderUserGroup = UserGroupData & ProviderUserPermissions;
376
+ export type StaffUserPermissions = UserGroupData & {
223
377
  viewStaff: boolean;
224
- viewCohorts: "all" | "some" | "none";
225
- cohorts?: string[];
226
- viewStudents: "all" | "filter" | "none";
227
- filterUsersBy?: string;
228
- filterUsersValue?: string;
229
378
  addStaff?: boolean;
379
+ activateStaff?: boolean;
230
380
  editStaff?: boolean;
231
381
  deleteStaff?: boolean;
232
382
  addStaffGroups?: boolean;
233
383
  editStaffGroups?: boolean;
234
384
  deleteStaffGroups?: boolean;
235
385
  addStudents?: boolean;
386
+ activateStudents?: boolean;
236
387
  editStudents?: boolean;
237
388
  deleteStudents?: boolean;
238
389
  viewSetup?: boolean;
@@ -246,6 +397,67 @@ export type StaffUserGroup = UserGroupData & {
246
397
  manageBilling?: boolean;
247
398
  proposePlacements?: boolean;
248
399
  createCohorts?: boolean;
400
+ viewPlacements?: boolean;
401
+ viewPlacementTasks?: boolean;
402
+ signOffPlacements?: boolean;
403
+ editPlacements?: boolean;
404
+ addPlacements?: boolean;
405
+ deletePlacements?: boolean;
406
+ verifyInsurance?: boolean;
407
+ verifyListings?: boolean;
408
+ viewDatabase?: boolean;
409
+ addListings?: boolean;
410
+ deleteListings?: boolean;
411
+ verifyRiskAssessments?: boolean;
412
+ verifyDbsChecks?: boolean;
413
+ addCohorts?: boolean;
414
+ editCohorts?: boolean;
415
+ deleteCohorts?: boolean;
416
+ editRequests?: boolean;
417
+ deleteRequests?: boolean;
418
+ };
419
+ export type ProviderUserPermissions = {
420
+ viewStaff: boolean;
421
+ addStaff?: boolean;
422
+ activateStaff?: boolean;
423
+ editStaff?: boolean;
424
+ deleteStaff?: boolean;
425
+ addUserGroups?: boolean;
426
+ editUserGroups?: boolean;
427
+ deleteUserGroups?: boolean;
428
+ addStudents?: boolean;
429
+ addForms?: boolean;
430
+ editForms?: boolean;
431
+ deleteForms?: boolean;
432
+ addFiles?: boolean;
433
+ deleteFiles?: boolean;
434
+ viewBilling?: boolean;
435
+ manageBilling?: boolean;
436
+ createPlacementListing?: "any" | "template" | "none";
437
+ createPlacementTemplate?: boolean;
438
+ viewPlacementListings?: "all" | "request" | "none";
439
+ viewPlacementGroups?: "all" | "request" | "none";
440
+ viewAddresses?: "all" | "request" | "none";
441
+ processApplicants?: boolean;
442
+ addAddresses?: boolean;
443
+ editAddresses?: boolean;
444
+ deleteAddresses?: boolean;
445
+ addApplicantWorkflows?: boolean;
446
+ editApplicantWorkflows?: boolean;
447
+ deleteApplicantWorkflows?: boolean;
448
+ editRequests?: boolean;
449
+ deleteRequests?: boolean;
450
+ manageAccessRequests?: boolean;
451
+ manageRegistrationRequests?: boolean;
452
+ };
453
+ export type RegistrationRequest = {
454
+ forename: string;
455
+ surname: string;
456
+ email: string;
457
+ message: string;
458
+ created: string;
459
+ oId: string;
460
+ product: "providers" | "institutes";
249
461
  };
250
462
  export type WorkflowStage = {
251
463
  id: number;
@@ -270,6 +482,8 @@ export type WorkflowStage = {
270
482
  name: string;
271
483
  }];
272
484
  eli?: boolean;
485
+ riskAssessment?: boolean;
486
+ dbsCheck?: boolean;
273
487
  defaultForms?: {
274
488
  name: string;
275
489
  description: string;
@@ -277,6 +491,10 @@ export type WorkflowStage = {
277
491
  user: "staff" | "students" | "provider";
278
492
  details: CustomFormSchema;
279
493
  }[];
494
+ requiredFiles?: {
495
+ fileName: string;
496
+ fileType: string;
497
+ }[];
280
498
  };
281
499
  export type ProviderPlacementData = {
282
500
  title: string;
@@ -297,14 +515,15 @@ export type ProviderData = {
297
515
  staffActive: number;
298
516
  admin: string;
299
517
  name: string;
300
- insurance: boolean;
518
+ insurance: boolean | "awaitingReview";
301
519
  regNumber?: string;
302
520
  insuranceExpiry: string;
303
- mapConsent?: boolean;
521
+ mapConsent?: boolean | "unlisted";
304
522
  mapConsentDate?: string;
305
523
  staffGuidance?: {
306
524
  [key: number]: string;
307
525
  };
526
+ about?: string;
308
527
  sector: string;
309
528
  defAddress: string;
310
529
  subsector: string;
@@ -317,6 +536,22 @@ export type ProviderData = {
317
536
  status: "uploaded" | "approved" | "blocked";
318
537
  };
319
538
  };
539
+ onboarding?: {
540
+ hasStaff?: boolean;
541
+ multipleAddresses?: boolean;
542
+ };
543
+ registrationRequests?: boolean | string;
544
+ registrationRequestsDate?: string;
545
+ information: {
546
+ description?: string;
547
+ staff?: string;
548
+ locations?: number;
549
+ };
550
+ discount?: string;
551
+ package: string;
552
+ splitBilling?: boolean;
553
+ adminBillingContactId: string;
554
+ addOnPackages?: string[];
320
555
  };
321
556
  export type InstituteData = {
322
557
  students: number;
@@ -329,6 +564,10 @@ export type InstituteData = {
329
564
  name: string;
330
565
  verifiedProviders?: string[];
331
566
  awaitingProviderInsurance?: string[];
567
+ verifiedRiskAssessments?: string[];
568
+ awaitingPlacementRiskAssessments?: string[];
569
+ verifiedDbsChecks?: string[];
570
+ awaitingPlacementDbsChecks?: string[];
332
571
  staffGuidance?: {
333
572
  [key: number]: string;
334
573
  };
@@ -340,10 +579,12 @@ export type InstituteData = {
340
579
  [cohortId: string]: string[];
341
580
  };
342
581
  };
343
- packages?: {
344
- [key: string]: unknown;
345
- };
346
582
  externalProviderUploads?: boolean;
583
+ discount?: string;
584
+ package?: string;
585
+ splitBilling?: boolean;
586
+ adminBillingContactId?: string;
587
+ addOnPackages?: string[];
347
588
  } & Address;
348
589
  export type NotificationObject = {
349
590
  buttonURL: string;
@@ -354,28 +595,35 @@ export type NotificationObject = {
354
595
  viewedBy: string[];
355
596
  docPath: DocumentReference<DocumentData>;
356
597
  };
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
- ];
598
+ export type CustomFormSchemaField = {
599
+ id: number;
600
+ label: string;
601
+ required: boolean;
602
+ type: "short" | "long" | "number" | "date" | "dropdown" | "checkbox" | "rating";
603
+ width: number;
604
+ subtitle?: string;
605
+ extra: {
606
+ default?: boolean | string | number;
607
+ min?: number;
608
+ max?: number;
609
+ minRows?: number;
610
+ options?: string[];
611
+ levels?: number;
612
+ };
613
+ };
614
+ export type CustomFormSchemaSection = {
615
+ id: number;
616
+ title?: string;
617
+ description?: string;
618
+ fields: CustomFormSchemaField[];
619
+ };
620
+ export type CustomFormSchema = {
621
+ name?: string;
622
+ description?: string;
623
+ updated?: string;
624
+ id?: string;
625
+ form?: CustomFormSchemaSection[];
626
+ };
379
627
  export type StaffRoles = {
380
628
  name: string;
381
629
  filters: {
@@ -392,21 +640,6 @@ export type QueryObject = {
392
640
  where?: QueryObjectConstraint;
393
641
  orderBy?: string;
394
642
  };
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
643
  export type Note = {
411
644
  title?: string;
412
645
  body?: {
@@ -444,15 +677,38 @@ export type CohortData = {
444
677
  id?: string;
445
678
  name: string;
446
679
  placementType: "defined" | "continuous";
680
+ forms?: string[];
681
+ files?: string[];
447
682
  startSubmission: string;
448
683
  endSubmission: string;
449
684
  startPlacements: string;
450
685
  endPlacements: string;
451
- stage: "name" | "placementType" | "students" | "workflow" | "review" | "created" | "archived";
686
+ stage: "info" | "name" | "placementType" | "students" | "workflow" | "review" | "created" | "archived";
452
687
  workflow: WorkflowStage[];
688
+ customWorkflow?: boolean;
453
689
  oId: string;
454
690
  product: Products;
455
691
  designatedStaff?: string;
692
+ logType?: "basic" | "custom";
693
+ logs?: {
694
+ students?: string;
695
+ staff?: string;
696
+ provider?: string;
697
+ };
698
+ feedback?: {
699
+ students?: string;
700
+ staff?: string;
701
+ provider?: string;
702
+ };
703
+ feedbackText?: {
704
+ students?: Descendant[];
705
+ staff?: Descendant[];
706
+ provider?: Descendant[];
707
+ };
708
+ providerFeedbackSent?: Timestamp;
709
+ studentsFeedbackSent?: Timestamp;
710
+ billingEmail?: string;
711
+ billingContactId?: string;
456
712
  };
457
713
  export type ArrowObject = {
458
714
  start: number | string;
@@ -462,6 +718,7 @@ export type ArrowObject = {
462
718
  screenX?: number;
463
719
  };
464
720
  export type PlacementReviewDetails = {
721
+ activeDates: string[];
465
722
  studentForename: string;
466
723
  studentSurname: string;
467
724
  instituteName: string;
@@ -475,6 +732,7 @@ export type PlacementReviewDetails = {
475
732
  contactForename: string;
476
733
  contactSurname: string;
477
734
  cohort: string;
735
+ cohortData?: CohortData;
478
736
  providerKey: string;
479
737
  status: number;
480
738
  ["address-line1"]: string;
@@ -498,12 +756,38 @@ export type PlacementReviewDetails = {
498
756
  mapConsent: boolean;
499
757
  jobTitle: string;
500
758
  questions: PlacementQuestions;
759
+ riskAssessment: boolean | "awaitingReview";
760
+ riskAssessmentType: "form" | "file";
761
+ riskAssessmentData?: {
762
+ [key: string]: unknown;
763
+ };
764
+ dbsCheck: boolean | "awaitingReview";
765
+ dbsCheckType: "form" | "file";
766
+ dbsCheckData?: {
767
+ [key: string]: unknown;
768
+ };
501
769
  };
502
770
  };
503
771
  requireELI?: boolean;
772
+ requireRA?: boolean;
773
+ requireDBS?: boolean;
504
774
  importedProviderForms: boolean;
505
775
  currentStage: WorkflowStage;
506
776
  placementId?: string;
777
+ incompleteItems: {
778
+ [key: number]: string[];
779
+ };
780
+ riskAssessmentData?: {
781
+ [key: string]: unknown;
782
+ }[];
783
+ dbsCheckData?: {
784
+ [key: string]: unknown;
785
+ }[];
786
+ feedbackText?: Descendant[];
787
+ feedback: CustomFormSchema;
788
+ providerFeedback?: {
789
+ [key: string]: unknown;
790
+ };
507
791
  };
508
792
  export type BlogCategories = "students" | "providers" | "institutes" | "placementt";
509
793
  export type Blog = {
@@ -515,3 +799,136 @@ export type Blog = {
515
799
  author?: string;
516
800
  tags?: string;
517
801
  };
802
+ export type PlacementExportObject = {
803
+ cohortId: string;
804
+ startDate?: string;
805
+ endDate?: string;
806
+ allTime?: boolean;
807
+ includeStudentData?: boolean;
808
+ activePlacements?: boolean;
809
+ completedPlacements?: boolean;
810
+ };
811
+ export type ApplicantWorkflow = {
812
+ id?: string;
813
+ name: string;
814
+ forms?: string[];
815
+ files?: string[];
816
+ workflow: ApplicantStage[];
817
+ customWorkflow?: boolean;
818
+ oId: string;
819
+ product: Products;
820
+ type: "simple" | "complex";
821
+ };
822
+ export type ApplicantStage = {
823
+ id: number;
824
+ name: string;
825
+ message?: string;
826
+ userType?: "Students" | "Staff";
827
+ permanent?: boolean;
828
+ checkpoint?: boolean;
829
+ buttons?: {
830
+ id: number;
831
+ name: string | false;
832
+ required: boolean;
833
+ }[];
834
+ pos?: {
835
+ x: number;
836
+ y: number;
837
+ };
838
+ forms?: string[];
839
+ files?: string[];
840
+ deadline?: string;
841
+ deadlineType?: "date" | "days";
842
+ formDetails?: {
843
+ [key: string]: {
844
+ name: string;
845
+ id: string;
846
+ description?: string;
847
+ product: Products;
848
+ oId: string;
849
+ form: CustomFormSchema;
850
+ };
851
+ };
852
+ requiredFiles?: {
853
+ fileName: string;
854
+ fileType: string;
855
+ }[];
856
+ portfolio?: boolean;
857
+ viewableFiles?: {
858
+ [key: string]: FileItem;
859
+ };
860
+ };
861
+ export type Application = {
862
+ id?: string;
863
+ uid: string;
864
+ applicantWorkflowId: string;
865
+ listingId: string;
866
+ addressId: string;
867
+ providerId: string;
868
+ reqUserType: "Students" | "Staff";
869
+ completedSections: {
870
+ [stage: number]: {
871
+ submitted?: string;
872
+ filesViewed?: string[];
873
+ formsCompleted?: {
874
+ [key: string]: unknown;
875
+ };
876
+ filesUploaded?: {
877
+ [key: number]: string[];
878
+ };
879
+ };
880
+ };
881
+ created: string;
882
+ submitted: string;
883
+ startDate: string;
884
+ endDate: string;
885
+ leadTimes?: string[];
886
+ stage: number;
887
+ outcomeMessage?: string;
888
+ status: "draft" | "submitted" | "approved" | "declined";
889
+ placementId?: string;
890
+ };
891
+ export type Report = {
892
+ added: string;
893
+ id: string;
894
+ oId: string;
895
+ product: Products;
896
+ pId: string;
897
+ reason: string;
898
+ uid: string;
899
+ status: "open" | "closed";
900
+ };
901
+ export type FileItem = {
902
+ product: Products;
903
+ oId: string;
904
+ added: string;
905
+ name: string;
906
+ fileName: string;
907
+ url?: string;
908
+ };
909
+ export type Event = {
910
+ collection: "users" | "placements" | "placementListings";
911
+ documentId: string;
912
+ product: Products;
913
+ oId: string;
914
+ created: Timestamp;
915
+ title: string;
916
+ description?: string;
917
+ severity: string;
918
+ button?: {
919
+ title: string;
920
+ url: string;
921
+ };
922
+ };
923
+ export type BillingPackage = {
924
+ name: string;
925
+ staffUnitCost: number;
926
+ studentUnitCost: number;
927
+ placementUnitCost: number;
928
+ product: Products;
929
+ priority: number;
930
+ features: {
931
+ [key: string]: number | boolean | string;
932
+ };
933
+ description: string;
934
+ };