@jsb188/app 1.1.11 → 1.1.12

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 (59) hide show
  1. package/package.json +7 -4
  2. package/src/constants/agent.ts +39 -62
  3. package/src/constants/app.ts +17 -0
  4. package/src/constants/wsActions.ts +7 -15
  5. package/src/i18n/account.ts +1 -1
  6. package/src/i18n/agent.ts +326 -88
  7. package/src/i18n/agentToolBusiness.ts +196 -0
  8. package/src/i18n/agentToolGrid.ts +137 -0
  9. package/src/i18n/agentToolWorkflow.ts +101 -0
  10. package/src/i18n/agent_note.ts +109 -0
  11. package/src/i18n/app.ts +23 -17
  12. package/src/i18n/auth.ts +28 -30
  13. package/src/i18n/billing.ts +3 -85
  14. package/src/i18n/c.ts +907 -0
  15. package/src/i18n/campaign.ts +842 -140
  16. package/src/i18n/datetime.ts +6 -0
  17. package/src/i18n/editor.ts +58 -0
  18. package/src/i18n/error.ts +307 -168
  19. package/src/i18n/field_doc_editor.ts +21 -0
  20. package/src/i18n/field_doc_programs.ts +52 -0
  21. package/src/i18n/field_docs.ts +170 -8
  22. package/src/i18n/index.ts +21 -5
  23. package/src/i18n/log.ts +232 -38
  24. package/src/i18n/memory.ts +18 -4
  25. package/src/i18n/note.ts +5 -3
  26. package/src/i18n/org.ts +93 -44
  27. package/src/i18n/schedule.ts +209 -0
  28. package/src/i18n/sheet.ts +102 -145
  29. package/src/i18n/sheet_formula.ts +165 -0
  30. package/src/i18n/workflow.ts +48 -9
  31. package/src/main.ts +2 -2
  32. package/src/platform.ts +89 -49
  33. package/src/types/ai.d.ts +19 -0
  34. package/src/types/app.d.ts +50 -57
  35. package/src/types/other.d.ts +8 -1
  36. package/src/utils/api.ts +46 -0
  37. package/src/utils/clientIP.ts +213 -0
  38. package/src/utils/color.ts +77 -0
  39. package/src/utils/csv.ts +19 -0
  40. package/src/utils/datetime.ts +207 -31
  41. package/src/utils/deferredSave.ts +89 -0
  42. package/src/utils/email.ts +50 -0
  43. package/src/utils/expression.helpers.ts +470 -0
  44. package/src/utils/expression.test.ts +793 -0
  45. package/src/utils/expression.ts +1633 -239
  46. package/src/utils/language.ts +9 -0
  47. package/src/utils/logic.ts +9 -162
  48. package/src/utils/number.ts +30 -11
  49. package/src/utils/object.ts +29 -0
  50. package/src/utils/promise.ts +78 -7
  51. package/src/utils/queryReset.ts +101 -14
  52. package/src/utils/string.test.ts +24 -39
  53. package/src/utils/string.ts +73 -143
  54. package/src/utils/url_client.ts +83 -14
  55. package/src/constants/billing.ts +0 -146
  56. package/src/i18n/agentDoc.ts +0 -110
  57. package/src/i18n/form.ts +0 -496
  58. package/src/types/form.d.ts +0 -101
  59. package/src/utils/billing.ts +0 -141
package/src/i18n/org.ts CHANGED
@@ -4,31 +4,40 @@ export default {
4
4
  organizations: 'Organizations',
5
5
  grower: 'Grower',
6
6
  growers: 'Growers',
7
+ growers_end: 'There is %{smart_count} grower for this organization.||||' +
8
+ 'There are %{smart_count} growers for this organization.',
9
+ growers_empty: "There aren't any growers for this organization.",
10
+ vendors_end: 'There is %{smart_count} vendor for this organization.||||' +
11
+ 'There are %{smart_count} vendors for this organization.',
12
+ vendors_empty: "There aren't any vendors for this organization.",
7
13
  my_organizations: 'My organizations',
8
14
  name: 'Organization name',
9
15
  name_of: 'Name of organization',
10
16
  type_of: 'Type of organization',
11
17
  claimed_business: 'Claimed business',
12
- contact_associated_with:
13
- 'This contact is associated with: %{organizationNames}',
14
- contact_choose_associated_orgs:
15
- 'Choose the associated organizations for this contact.',
16
- org_info: 'Organization information',
18
+ contact_associated_with: 'This contact is associated with: %{organizationNames}',
19
+ contact_choose_associated_orgs: 'Choose the associated organizations for this contact.',
20
+ org_info: 'Organization settings',
17
21
  nothing_found: 'No organizations found.',
18
22
  farms: 'Farms',
19
23
  settings: 'Organization settings',
24
+ log_language_preference: 'Log display language preference',
25
+ log_language_preference_description:
26
+ 'Choose whether log pages will display available translations or always show the original texts.',
27
+ display_translated_logs_if_available: 'Display translated logs if available',
28
+ always_show_original_log_texts: 'Always show original log texts',
29
+ translate_language: 'Log translation language',
30
+ translate_language_disabled: 'Disabled - do not translate',
31
+ translate_language_description:
32
+ 'Logs written in a different language will always be translated into this language. It may take 1 to 3 minutes before you see the translated texts.',
20
33
  edit_operation: 'Edit operation',
21
34
  edit_child_org_operation: 'Edit child organization operation',
22
- edit_child_org_operation_msg:
23
- 'Choose the business operation for\n [hl]%{name}[/hl].',
24
- edit_child_org_operation_finished_msg:
25
- "[hl]%{name}[/hl]'s business operation is set to **%{operation}**.",
35
+ edit_child_org_operation_msg: 'Choose the business operation for\n [hl]%{name}[/hl].',
36
+ edit_child_org_operation_finished_msg: "[hl]%{name}[/hl]'s business operation is set to **%{operation}**.",
26
37
  edit_child_org_info_msg: 'Update the information for\n [hl]%{name}[/hl].',
27
- edit_child_org_info_finished_msg:
28
- 'Information has been updated for\n [hl]%{name}[/hl].',
38
+ edit_child_org_info_finished_msg: 'Information has been updated for\n [hl]%{name}[/hl].',
29
39
  edit_site_location_msg: 'Update the information for\n [hl]%{name}[/hl].',
30
- edit_site_location_finished_msg:
31
- 'Information has been updated for\n [hl]%{name}[/hl].',
40
+ edit_site_location_finished_msg: 'Information has been updated for\n [hl]%{name}[/hl].',
32
41
  delete_child_org_msg: 'Are you sure you want to remove\n [hl]%{name}[/hl]?',
33
42
  manage_team: 'Manage team',
34
43
  site_locations: 'Site locations',
@@ -38,10 +47,8 @@ export default {
38
47
  administration: 'Administration',
39
48
  billing: 'Billing',
40
49
  department_req_msg: 'Please select a department for this contact.',
41
- contact_phone_or_email_req_msg:
42
- 'Please provide a phone number or email for this contact.',
43
- address_notice_msg:
44
- 'This information will appear on the invoices you generate for your customers and to others in your network.',
50
+ contact_phone_or_email_req_msg: 'Please provide a phone number or email for this contact.',
51
+ address_notice_msg: 'This information will appear on the invoices you generate for your customers and others in your network.',
45
52
  no_recurring_schedule: 'This event does not have a recurring schedule.',
46
53
  daily_event_msg: 'This event repeats every day.',
47
54
  single_event_msg: 'This event only occurs once.',
@@ -58,39 +65,27 @@ export default {
58
65
  past_markets: 'Past Markets',
59
66
  load_lists: 'Load Lists',
60
67
  contact_to_change: 'Please contact us to change this information.',
61
- locked_contact_msg:
62
- 'This contact information is saved by the owner of this organization.',
63
- no_contact_information_msg:
64
- "This organization doesn't have any contact information.",
68
+ locked_contact_msg: 'This contact information is saved by the owner of this organization.',
69
+ no_contact_information_msg: "This organization doesn't have any contact information.",
65
70
  no_site_locations: "This organization doesn't have any site locations.",
66
- could_not_load_not_linked_org:
67
- "This organization's data could not be loaded because it's no longer linked to your organization.",
68
- vendor_documents_not_found_msg:
69
- "This vendor hasn't submitted any compliance documents or certifications.",
71
+ could_not_load_not_linked_org: "This organization's data could not be loaded because it's no longer linked to your organization.",
72
+ vendor_documents_not_found_msg: "This vendor hasn't submitted any compliance documents or certifications.",
70
73
  switch_organizations: 'Switch organizations',
71
- switch_msg:
72
- 'Messages from your phone number <span class="em_text"><span class="rel z1">%{phoneNumber}</span></span> ' +
73
- 'will only be sent to your primary organization, <span class="em_text"><span class="rel z1">%{orgName}</span></span>.',
74
- switch_msg_no_org_selected:
75
- 'Messages from your phone number <span class="em_text"><span class="rel z1">%{phoneNumber}</span></span> ' +
76
- 'will only be sent to your primary organization.',
77
- switch_msg_no_phone_selected:
78
- 'Messages from your phone number ' +
79
- 'will only be sent to your primary organization, <span class="em_text"><span class="rel z1">%{orgName}</span></span>.',
80
- switch_msg_none_selected:
81
- 'Messages from your phone number will only be sent to your primary organization.',
82
- switch_instr:
83
- 'Select from the list below to change your primary organization.',
74
+ switch_organization: 'Switch organization',
75
+ choose_sign_in_organization: 'Choose the organization you want to sign in as.',
76
+ switch_msg: 'Messages from your phone number [hl]%{phoneNumber}[/hl] will default to the logged in organization: [hl]%{orgName}[/hl].',
77
+ switch_msg_no_org_selected: 'Messages from your phone number [hl]%{phoneNumber}[/hl] will only be sent to the organization you\'re logged into.',
78
+ switch_msg_no_phone_selected: 'Messages from your phone number will only be sent to the organization you\'re logged into: [hl]%{orgName}[/hl].',
79
+ switch_msg_none_selected: 'Messages from your phone number will only be sent to the organization you\'re logged into.',
80
+ switch_instr: 'Select from the list below to change your organization.',
84
81
 
85
82
  switch_confirm_msg:
86
83
  // NOTE: Because ".em_text" only works when the entire word is in 1 line,
87
84
  // we need to give as much space as possible to <span> block.
88
- 'Do you want to switch your primary organization to ' +
89
- '<span class="em_text"><span class="rel z1">%{orgName}</span></span>?',
85
+ 'Do you want to switch your primary organization to ' + '[hl]%{orgName}[/hl]?',
90
86
 
91
- switch_finished_msg:
92
- 'Your primary organization has been switched to ' +
93
- '<span class="em_text"><span class="rel z1">%{orgName}</span></span>.',
87
+ switch_finished_msg: 'Your primary organization has been switched to ' +
88
+ '[hl]%{orgName}[/hl].',
94
89
 
95
90
  yes_switch: 'Yes, switch organization',
96
91
 
@@ -104,12 +99,19 @@ export default {
104
99
 
105
100
  type: {
106
101
  ARABLE: 'Arable farm',
102
+ LIVESTOCK: 'Livestock ranch', // We don't support this operation, but it still needs to be here because some orgs can still be LIVESTOCK operation
107
103
  FARMERS_MARKET: 'Farmers market',
108
104
  GROWER_NETWORK: 'Grower network',
109
105
  RESTAURANT: 'Restaurant',
110
106
  VENDOR: 'Vendor',
111
107
  WHOLESALE_FOOD: 'Wholesale (Food)',
112
108
  UNKNOWN: 'Unknown',
109
+ CONSTRUCTION: 'Construction',
110
+ UTILITIES: 'Utilities',
111
+ CHILDCARE: 'Childcare',
112
+ CONSTRUCTION_INSPECTION_AGENCY: 'Construction inspection agency',
113
+ EMERGENCY_MEDICAL_SERVICES_AGENCY: 'Emergency medical services agency',
114
+ FOOD_MANUFACTURING: 'Food manufacturing',
113
115
  },
114
116
 
115
117
  type_short: {
@@ -120,6 +122,12 @@ export default {
120
122
  VENDOR: 'Vendor',
121
123
  WHOLESALE_FOOD: 'Wholesale',
122
124
  UNKNOWN: 'Unknown',
125
+ CONSTRUCTION: 'Construction',
126
+ UTILITIES: 'Utilities',
127
+ CHILDCARE: 'Childcare',
128
+ CONSTRUCTION_INSPECTION_AGENCY: 'Inspection agency',
129
+ EMERGENCY_MEDICAL_SERVICES_AGENCY: 'EMS agency',
130
+ FOOD_MANUFACTURING: 'Food manufacturer',
123
131
  },
124
132
 
125
133
  type_inline: {
@@ -130,6 +138,12 @@ export default {
130
138
  VENDOR: 'vendor',
131
139
  WHOLESALE_FOOD: 'wholesale food business',
132
140
  UNKNOWN: 'unknown organization',
141
+ CONSTRUCTION: 'construction company',
142
+ UTILITIES: 'utilities company',
143
+ CHILDCARE: 'childcare provider',
144
+ CONSTRUCTION_INSPECTION_AGENCY: 'inspection agency',
145
+ EMERGENCY_MEDICAL_SERVICES_AGENCY: 'EMS agency',
146
+ FOOD_MANUFACTURING: 'food manufacturer',
133
147
  },
134
148
 
135
149
  type_active: {
@@ -140,6 +154,12 @@ export default {
140
154
  VENDOR: 'Vendor',
141
155
  WHOLESALE_FOOD: 'Wholesale',
142
156
  UNKNOWN: 'Unknown',
157
+ CONSTRUCTION: 'Projects',
158
+ UTILITIES: 'Projects',
159
+ CHILDCARE: 'Staffing',
160
+ CONSTRUCTION_INSPECTION_AGENCY: 'Inspections',
161
+ EMERGENCY_MEDICAL_SERVICES_AGENCY: 'EMS',
162
+ FOOD_MANUFACTURING: 'Manufacturing',
143
163
  },
144
164
 
145
165
  type_detailed: {
@@ -150,13 +170,18 @@ export default {
150
170
  VENDOR: 'Vendor (customer or supplier)',
151
171
  WHOLESALE_FOOD: 'Wholesale (Food)',
152
172
  UNKNOWN: 'Unknown',
173
+ CONSTRUCTION: 'Construction (contractor or engineering firm)',
174
+ UTILITIES: 'Utilities (power, water, gas, telecom)',
175
+ CHILDCARE: 'Childcare and early learning',
176
+ CONSTRUCTION_INSPECTION_AGENCY: 'Construction inspection agency (special inspections, materials testing)',
177
+ EMERGENCY_MEDICAL_SERVICES_AGENCY: 'Emergency medical services agency',
178
+ FOOD_MANUFACTURING: 'Food manufacturing and processing',
153
179
  },
154
180
 
155
181
  operation_desc: {
156
182
  ARABLE: 'Crop production (%{commodities})',
157
183
 
158
184
  ARABLE_default: 'Crop production (produce)',
159
-
160
185
  // ..
161
186
  // Other operations will defaults to "Unknown"
162
187
  },
@@ -174,6 +199,11 @@ export default {
174
199
  VENDOR: 'product',
175
200
  WHOLESALE_FOOD: 'product',
176
201
  UNKNOWN: 'product',
202
+ CONSTRUCTION: 'product',
203
+ UTILITIES: 'product',
204
+ CONSTRUCTION_INSPECTION_AGENCY: 'product',
205
+ EMERGENCY_MEDICAL_SERVICES_AGENCY: 'product',
206
+ FOOD_MANUFACTURING: 'product',
177
207
  },
178
208
 
179
209
  children: {
@@ -197,7 +227,13 @@ export default {
197
227
  VENDOR: 'View vendor',
198
228
  WHOLESALE_FOOD: 'View wholesale business',
199
229
  UNKNOWN: 'View organization',
230
+ CONSTRUCTION: 'View construction company',
231
+ UTILITIES: 'View utilities company',
232
+ CONSTRUCTION_INSPECTION_AGENCY: 'View inspection agency',
233
+ EMERGENCY_MEDICAL_SERVICES_AGENCY: 'View EMS agency',
234
+ FOOD_MANUFACTURING: 'View food manufacturer',
200
235
  },
236
+ view_organization_type: 'View %{type}',
201
237
 
202
238
  edit: {
203
239
  ARABLE: 'Edit farm',
@@ -208,6 +244,11 @@ export default {
208
244
  VENDOR: 'Edit vendor',
209
245
  WHOLESALE_FOOD: 'Edit wholesale business',
210
246
  UNKNOWN: 'Edit organization',
247
+ CONSTRUCTION: 'Edit construction company',
248
+ UTILITIES: 'Edit utilities company',
249
+ CONSTRUCTION_INSPECTION_AGENCY: 'Edit inspection agency',
250
+ EMERGENCY_MEDICAL_SERVICES_AGENCY: 'Edit EMS agency',
251
+ FOOD_MANUFACTURING: 'Edit food manufacturer',
211
252
  },
212
253
 
213
254
  delete: {
@@ -219,6 +260,11 @@ export default {
219
260
  VENDOR: 'Delete vendor',
220
261
  WHOLESALE_FOOD: 'Delete wholesale business',
221
262
  UNKNOWN: 'Delete organization',
263
+ CONSTRUCTION: 'Delete construction company',
264
+ UTILITIES: 'Delete utilities company',
265
+ CONSTRUCTION_INSPECTION_AGENCY: 'Delete inspection agency',
266
+ EMERGENCY_MEDICAL_SERVICES_AGENCY: 'Delete EMS agency',
267
+ FOOD_MANUFACTURING: 'Delete food manufacturer',
222
268
  },
223
269
 
224
270
  remove: {
@@ -230,6 +276,9 @@ export default {
230
276
  VENDOR: 'Remove vendor',
231
277
  WHOLESALE_FOOD: 'Remove wholesale business',
232
278
  UNKNOWN: 'Remove organization',
279
+ CONSTRUCTION_INSPECTION_AGENCY: 'Remove inspection agency',
280
+ EMERGENCY_MEDICAL_SERVICES_AGENCY: 'Remove EMS agency',
281
+ FOOD_MANUFACTURING: 'Remove food manufacturer',
233
282
  },
234
283
 
235
284
  contact_department: {
@@ -0,0 +1,209 @@
1
+ export default {
2
+ en: {
3
+ settings: {
4
+ title: 'Schedule settings',
5
+ kind: 'Resource type',
6
+ kind_LABOR: 'Staff member',
7
+ kind_EQUIPMENT: 'Equipment',
8
+ kind_MATERIAL: 'Material',
9
+ kind_SPACE: 'Room or space',
10
+ key: 'Resource code',
11
+ name: 'Name',
12
+ description: 'Description',
13
+ account: 'Linked member',
14
+ unlinked: 'No linked member',
15
+ work_calendar: 'Working calendar',
16
+ work_calendars: 'Working calendars',
17
+ resources: 'Resources',
18
+ notifications: 'My notifications',
19
+ maxUnitsPerDay: 'Available units per day',
20
+ capacity: 'Room capacity',
21
+ unitOfMeasure: 'Unit of measure',
22
+ can_level: 'Use available capacity when leveling',
23
+ roles: 'Roles (comma separated)',
24
+ tags: 'Tags (comma separated)',
25
+ ageGroup: 'Age group',
26
+ qualifications: 'Qualifications',
27
+ qualification: 'Qualification',
28
+ expires: 'Expires at (local time)',
29
+ add_qualification: 'Add qualification',
30
+ add_hours: 'Add working hours',
31
+ minutes_per_day: 'Minutes in one working day',
32
+ is_default: 'Organization default working calendar',
33
+ timeZone: 'Time zone',
34
+ weekday_1: 'Monday',
35
+ weekday_2: 'Tuesday',
36
+ weekday_3: 'Wednesday',
37
+ weekday_4: 'Thursday',
38
+ weekday_5: 'Friday',
39
+ weekday_6: 'Saturday',
40
+ weekday_7: 'Sunday',
41
+ select: 'Select an item',
42
+ retired_name: '%{name} (retired)',
43
+ add_resource: 'Add resource',
44
+ add_calendar: 'Add working calendar',
45
+ loading: 'Loading schedule settings…',
46
+ error: 'The change could not be saved. Check the values and try again.',
47
+ conflict:
48
+ 'Someone changed this item. Reopen it to review the latest values before saving.',
49
+ availability: 'Availability windows',
50
+ availability_description:
51
+ 'Set daily capacity for a date range. Zero marks the resource unavailable.',
52
+ availability_row: '%{from} – %{to}: %{units} units per day',
53
+ ongoing: 'ongoing',
54
+ startsOn: 'From date',
55
+ endsOn: 'Until date (exclusive, optional)',
56
+ add_availability: 'Add availability window',
57
+ retire_confirm:
58
+ 'Retiring this resource releases its future shift assignments and closes affected requests.',
59
+ reactivate: 'Reactivate resource',
60
+ confirm_retire: 'Confirm retirement',
61
+ retire: 'Retire resource',
62
+ exceptions: 'Holidays and dated exceptions',
63
+ date: 'Date',
64
+ start: 'Start time',
65
+ end: 'End time',
66
+ note: 'Note',
67
+ holiday: 'Non-working day',
68
+ save_exception: 'Save date exception',
69
+ delete_calendar_confirm:
70
+ 'Delete this working calendar? Calendars in use cannot be deleted.',
71
+ confirm_delete: 'Confirm deletion',
72
+ notify_description:
73
+ 'In-app schedule updates stay on. Email and SMS use your verified contact details when you opt in.',
74
+ notify_unlinked:
75
+ 'A manager must link your account to a staff resource before you can change schedule notifications.',
76
+ channel_IN_APP: 'In-app updates',
77
+ channel_EMAIL: 'Email',
78
+ channel_SMS: 'SMS',
79
+ saved: 'Preferences saved.',
80
+ },
81
+
82
+ title: 'Schedule',
83
+ default_surface: 'Default schedule view',
84
+ default_surface_description:
85
+ 'Choose which schedule view appears first in your organization navigation.',
86
+ operation_default: 'Use organization type default',
87
+ projects: 'Projects',
88
+ calendar: 'Calendar',
89
+ shifts: 'Shifts',
90
+ my_shifts: 'My shifts',
91
+ open_shifts: 'Open shifts',
92
+ requests: 'Requests',
93
+ time_off: 'Time off',
94
+ activities: 'Activities',
95
+ resources: 'Resources',
96
+ run: 'Schedule',
97
+ level: 'Level resources',
98
+ publish: 'Publish schedule',
99
+ acknowledge: 'Acknowledge',
100
+ queued: 'Queued',
101
+ running: 'Calculating',
102
+ complete: 'Complete',
103
+ failed: 'Failed',
104
+ cancelled: 'Cancelled',
105
+ superseded: 'Replaced by a newer run',
106
+ needs_reschedule: 'Schedule needs recalculation',
107
+ auto_schedule: 'Automatically schedule changes',
108
+ unreviewed: 'Needs review',
109
+ approve: 'Approve',
110
+ decline: 'Decline',
111
+ consent: 'Accept swap',
112
+ refuse: 'Decline swap',
113
+ withdraw: 'Withdraw',
114
+ claim: 'Claim shift',
115
+ drop: 'Give up shift',
116
+ swap: 'Swap shifts',
117
+ no_shifts: 'No shifts in this window.',
118
+ no_requests: 'No requests to show.',
119
+ no_resources: 'No resources yet.',
120
+ no_activities: 'Add activities to build this project.',
121
+ view_schedule: 'View schedule',
122
+ notification: 'Schedule update',
123
+ eligibility: {
124
+ COVERAGE_IMPACT: 'This change would leave required staffing uncovered.',
125
+ NOT_LABOR: 'Only a staff member can take this shift.',
126
+ RESOURCE_RETIRED: 'This staff member is no longer active.',
127
+ OCCURRENCE_NOT_SHIFT: 'This item is not a shift.',
128
+ OCCURRENCE_ENDED: 'This shift has already ended.',
129
+ ALREADY_ASSIGNED: 'Already assigned to this shift.',
130
+ SLOT_UNKNOWN: 'This slot no longer exists.',
131
+ SLOT_FULL: 'This slot is full.',
132
+ NO_MATCHING_SLOT: 'No open slot matches this staff member.',
133
+ PREDICATE_MISMATCH: 'Required roles, qualifications or tags are missing.',
134
+ QUALIFICATION_EXPIRED: 'A required qualification has expired.',
135
+ QUALIFICATION_EXPIRES_DURING_SHIFT:
136
+ 'A required qualification expires during this shift.',
137
+ TIME_OFF: 'Approved time off overlaps this shift.',
138
+ OVERLAP: 'Another assignment overlaps this shift.',
139
+ WINDOW_HOURS_EXCEEDED: 'This shift exceeds the working-hours limit.',
140
+ MIN_REST: 'There is not enough rest between shifts.',
141
+ },
142
+ coverage: {
143
+ REQUIRED_COUNT: 'A required staffing slot is not covered.',
144
+ DERIVED_COUNT: 'Staffing does not meet the configured ratio.',
145
+ ROOM_CAPACITY: 'Demand exceeds the room capacity.',
146
+ OPERATING_HOURS: 'Minimum staffing is missing during operating hours.',
147
+ ELIGIBILITY: 'An assignment does not meet its requirements.',
148
+ ACTOR_WINDOW_AGGREGATE: 'Working-hours or rest limits are exceeded.',
149
+ },
150
+ violation: {
151
+ required_count:
152
+ '%{occurrence}: %{slot} needs %{requiredCount} staff; %{filledCount} are assigned.',
153
+ derived_count:
154
+ '%{resource} needs %{requiredCount} staff; %{presentCount} are present.',
155
+ room_capacity:
156
+ '%{resource} has demand of %{demandTotal}, above its capacity of %{capacity}.',
157
+ operating_hours_center:
158
+ 'The center needs %{minAdults} staff during operating hours; %{presentCount} are present.',
159
+ operating_hours_room:
160
+ '%{resource} needs %{minAdults} staff during operating hours; %{presentCount} are present.',
161
+ actor_window_aggregate_hours:
162
+ '%{resource} has %{totalMinutes} scheduled minutes in %{windowDays} days, above the limit of %{maxMinutes}.',
163
+ actor_window_aggregate_rest:
164
+ '%{resource} has %{restMinutes} minutes of rest between shifts; %{minRestMinutes} are required.',
165
+ eligibility_not_labor:
166
+ '%{occurrence}: %{resource} is not a staff member.',
167
+ eligibility_resource_retired:
168
+ '%{occurrence}: %{resource} is no longer active.',
169
+ eligibility_slot_unknown:
170
+ '%{occurrence}: the assigned slot no longer exists.',
171
+ eligibility_predicate_mismatch:
172
+ '%{occurrence}: %{resource} does not meet the requirements for %{slot}.',
173
+ eligibility_qualification_expired:
174
+ '%{occurrence}: a required qualification for %{resource} has expired.',
175
+ eligibility_time_off:
176
+ '%{occurrence}: %{resource} has approved time off during this shift.',
177
+ eligibility_overlap:
178
+ '%{occurrence}: %{resource} is assigned to another overlapping shift.',
179
+ },
180
+ diagnostic: {
181
+ ratio_not_configured:
182
+ 'A demand category has no staffing ratio. Configure its ratio before publishing.',
183
+ operating_hours_not_configured:
184
+ 'An operating-hours rule has no work calendar. Configure the operating hours before publishing.',
185
+ qualification_expiry_invalid:
186
+ 'A qualification has an invalid expiry date.',
187
+ unknown_resource:
188
+ 'The schedule refers to a resource that could not be found.',
189
+ unknown_slot_key: 'An assignment refers to a slot that no longer exists.',
190
+ rule_config_invalid: 'A scheduling rule has an invalid configuration.',
191
+ rule_subject_kind_mismatch:
192
+ 'A scheduling rule applies to the wrong resource kind.',
193
+ violation_cap:
194
+ 'The evaluation reached its issue limit. Narrow the window and resolve the issues before publishing.',
195
+ },
196
+ notify: {
197
+ SCHEDULE_PUBLISHED: 'A schedule has been published.',
198
+ ASSIGNMENT_CHANGED: 'Your shift assignment changed.',
199
+ OCCURRENCE_CHANGED: 'A shift changed.',
200
+ REQUEST_OPENED: 'A shift request needs attention.',
201
+ REQUEST_DECIDED: 'A shift request has been decided.',
202
+ TIME_OFF_DECIDED: 'A time-off request has been decided.',
203
+ VIOLATION_RAISED: 'The schedule has a blocking staffing issue.',
204
+ SCHEDULE_RUN_COMPLETE: 'The project schedule run has finished.',
205
+ MILESTONE_AT_RISK: 'A milestone is at risk.',
206
+ RESOURCE_OVERALLOCATED: 'A resource is overallocated.',
207
+ },
208
+ },
209
+ };