@jsb188/app 1.1.12 → 1.1.13
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.
- package/LICENSE +21 -0
- package/package.json +11 -3
- package/src/constants/agent.ts +17 -7
- package/src/constants/app.ts +26 -0
- package/src/constants/wsActions.ts +0 -6
- package/src/i18n/agent.ts +65 -78
- package/src/i18n/agentToolBusiness.ts +149 -5
- package/src/i18n/agentToolGrid.ts +0 -16
- package/src/i18n/agent_note.ts +7 -6
- package/src/i18n/auth.ts +0 -3
- package/src/i18n/c.ts +58 -12
- package/src/i18n/campaign.ts +81 -830
- package/src/i18n/editor.ts +3 -5
- package/src/i18n/email_outreach_editor.ts +526 -0
- package/src/i18n/error.ts +174 -85
- package/src/i18n/field_doc_programs.ts +2 -3
- package/src/i18n/field_docs.ts +1 -0
- package/src/i18n/form.ts +12 -0
- package/src/i18n/index.ts +5 -1
- package/src/i18n/log.ts +2 -1
- package/src/i18n/memory.ts +2 -3
- package/src/i18n/message.ts +1 -0
- package/src/i18n/org.ts +4 -1
- package/src/i18n/schedule.ts +46 -122
- package/src/i18n/sheet.ts +20 -33
- package/src/i18n/workflow.ts +66 -4
- package/src/types/ai.d.ts +0 -4
- package/src/types/app.d.ts +22 -59
- package/src/types/auth.d.ts +1 -1
- package/src/utils/api.ts +14 -10
- package/src/utils/color.ts +18 -0
- package/src/utils/object.ts +41 -128
- package/src/utils/queryReset.ts +16 -54
- package/src/utils/string.ts +7 -0
- package/src/utils/url_client.ts +46 -15
- package/src/utils/expression.test.ts +0 -793
- package/src/utils/managedSessionBff.test.ts +0 -60
- package/src/utils/string.test.ts +0 -278
- package/tsconfig.json +0 -12
package/src/i18n/schedule.ts
CHANGED
|
@@ -3,7 +3,8 @@ export default {
|
|
|
3
3
|
settings: {
|
|
4
4
|
title: 'Schedule settings',
|
|
5
5
|
kind: 'Resource type',
|
|
6
|
-
|
|
6
|
+
kind_PERSON: 'Team member',
|
|
7
|
+
kind_LABOR: 'Labor crew',
|
|
7
8
|
kind_EQUIPMENT: 'Equipment',
|
|
8
9
|
kind_MATERIAL: 'Material',
|
|
9
10
|
kind_SPACE: 'Room or space',
|
|
@@ -11,7 +12,6 @@ export default {
|
|
|
11
12
|
name: 'Name',
|
|
12
13
|
description: 'Description',
|
|
13
14
|
account: 'Linked member',
|
|
14
|
-
unlinked: 'No linked member',
|
|
15
15
|
work_calendar: 'Working calendar',
|
|
16
16
|
work_calendars: 'Working calendars',
|
|
17
17
|
resources: 'Resources',
|
|
@@ -20,9 +20,7 @@ export default {
|
|
|
20
20
|
capacity: 'Room capacity',
|
|
21
21
|
unitOfMeasure: 'Unit of measure',
|
|
22
22
|
can_level: 'Use available capacity when leveling',
|
|
23
|
-
roles: 'Roles (comma separated)',
|
|
24
23
|
tags: 'Tags (comma separated)',
|
|
25
|
-
ageGroup: 'Age group',
|
|
26
24
|
qualifications: 'Qualifications',
|
|
27
25
|
qualification: 'Qualification',
|
|
28
26
|
expires: 'Expires at (local time)',
|
|
@@ -44,18 +42,15 @@ export default {
|
|
|
44
42
|
add_calendar: 'Add working calendar',
|
|
45
43
|
loading: 'Loading schedule settings…',
|
|
46
44
|
error: 'The change could not be saved. Check the values and try again.',
|
|
47
|
-
conflict:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
'Set daily capacity for a date range. Zero marks the resource unavailable.',
|
|
52
|
-
availability_row: '%{from} – %{to}: %{units} units per day',
|
|
45
|
+
conflict: 'Someone changed this item. Reopen it to review the latest values before saving.',
|
|
46
|
+
capacity_periods: 'Capacity by date',
|
|
47
|
+
capacity_periods_description: 'Set daily capacity for a date range. Zero marks the resource unavailable.',
|
|
48
|
+
capacity_period_row: '%{from} – %{to}: %{units} units per day',
|
|
53
49
|
ongoing: 'ongoing',
|
|
54
50
|
startsOn: 'From date',
|
|
55
|
-
endsOn: '
|
|
56
|
-
|
|
57
|
-
retire_confirm:
|
|
58
|
-
'Retiring this resource releases its future shift assignments and closes affected requests.',
|
|
51
|
+
endsOn: 'Last day (optional)',
|
|
52
|
+
add_capacity_period: 'Add capacity period',
|
|
53
|
+
retire_confirm: 'Retiring this resource releases its future shifts and closes affected requests.',
|
|
59
54
|
reactivate: 'Reactivate resource',
|
|
60
55
|
confirm_retire: 'Confirm retirement',
|
|
61
56
|
retire: 'Retire resource',
|
|
@@ -66,13 +61,13 @@ export default {
|
|
|
66
61
|
note: 'Note',
|
|
67
62
|
holiday: 'Non-working day',
|
|
68
63
|
save_exception: 'Save date exception',
|
|
69
|
-
delete_calendar_confirm:
|
|
70
|
-
'Delete this working calendar? Calendars in use cannot be deleted.',
|
|
64
|
+
delete_calendar_confirm: 'Delete this working calendar? Calendars in use cannot be deleted.',
|
|
71
65
|
confirm_delete: 'Confirm deletion',
|
|
72
66
|
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
|
-
|
|
67
|
+
'In-app schedule updates stay on. Email and SMS use your verified contact details when you opt in. Turning SMS on agrees to shift texts.',
|
|
68
|
+
notify_unlinked: 'A manager must add you to the schedule before you can change schedule notifications.',
|
|
69
|
+
notify_inherited:
|
|
70
|
+
"You haven't chosen yet, so each location's default applies (usually in-app, plus SMS once you agree to shift texts). Saving keeps your choice.",
|
|
76
71
|
channel_IN_APP: 'In-app updates',
|
|
77
72
|
channel_EMAIL: 'Email',
|
|
78
73
|
channel_SMS: 'SMS',
|
|
@@ -80,130 +75,59 @@ export default {
|
|
|
80
75
|
},
|
|
81
76
|
|
|
82
77
|
title: 'Schedule',
|
|
83
|
-
default_surface: 'Default schedule view',
|
|
84
|
-
default_surface_description:
|
|
85
|
-
'Choose which schedule view appears first in your organization navigation.',
|
|
86
78
|
operation_default: 'Use organization type default',
|
|
87
|
-
projects: 'Projects',
|
|
88
79
|
calendar: 'Calendar',
|
|
89
|
-
shifts: 'Shifts',
|
|
90
80
|
my_shifts: 'My shifts',
|
|
91
|
-
open_shifts: 'Open shifts',
|
|
92
|
-
requests: 'Requests',
|
|
93
81
|
time_off: 'Time off',
|
|
94
|
-
activities: 'Activities',
|
|
95
82
|
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
83
|
no_shifts: 'No shifts in this window.',
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
84
|
+
my_todos: 'My to-dos',
|
|
85
|
+
no_todos: 'No open to-dos.',
|
|
86
|
+
todo_due_: 'Due %{date}',
|
|
87
|
+
todo_overdue: 'Overdue',
|
|
88
|
+
todo_high_priority: 'High priority',
|
|
89
|
+
todo_status: {
|
|
90
|
+
OPEN: 'Open',
|
|
91
|
+
IN_PROGRESS: 'In progress',
|
|
92
|
+
DONE: 'Done',
|
|
93
|
+
CANCELED: 'Canceled',
|
|
94
|
+
},
|
|
122
95
|
notification: 'Schedule update',
|
|
123
96
|
eligibility: {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
97
|
+
NOT_PERSON: 'Only a person on the team can take this shift.',
|
|
98
|
+
RESOURCE_RETIRED: 'This person is no longer active on the schedule.',
|
|
99
|
+
NOT_MEMBER: 'This person is no longer a member of the organization.',
|
|
100
|
+
SHIFT_CANCELED: 'This shift was canceled.',
|
|
101
|
+
SHIFT_ENDED: 'This shift has already ended.',
|
|
129
102
|
ALREADY_ASSIGNED: 'Already assigned to this shift.',
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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.',
|
|
103
|
+
ROLE_MISSING: 'This person does not have the role this shift needs.',
|
|
104
|
+
QUALIFICATION_MISSING: 'A qualification this role requires is missing.',
|
|
105
|
+
QUALIFICATION_EXPIRED: 'A qualification this role requires has expired.',
|
|
137
106
|
TIME_OFF: 'Approved time off overlaps this shift.',
|
|
138
|
-
OVERLAP: '
|
|
139
|
-
|
|
107
|
+
OVERLAP: 'This person already has a shift at that time.',
|
|
108
|
+
UNAVAILABLE: 'This person is unavailable at that time.',
|
|
109
|
+
MAX_HOURS: 'This shift goes over the hours limit.',
|
|
140
110
|
MIN_REST: 'There is not enough rest between shifts.',
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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.',
|
|
111
|
+
MAX_CONSECUTIVE_DAYS: 'This shift goes over the limit of days in a row.',
|
|
112
|
+
SHIFT_LENGTH: 'This shift is longer or shorter than allowed.',
|
|
113
|
+
COVERAGE_IMPACT: 'This change would leave the schedule short-staffed.',
|
|
195
114
|
},
|
|
196
115
|
notify: {
|
|
197
116
|
SCHEDULE_PUBLISHED: 'A schedule has been published.',
|
|
198
|
-
|
|
199
|
-
OCCURRENCE_CHANGED: 'A shift changed.',
|
|
117
|
+
SHIFTS_CHANGED: 'Your shifts changed.',
|
|
200
118
|
REQUEST_OPENED: 'A shift request needs attention.',
|
|
201
119
|
REQUEST_DECIDED: 'A shift request has been decided.',
|
|
120
|
+
CALL_OUT: 'Someone called out of a shift.',
|
|
121
|
+
TIME_OFF_REQUESTED: 'A time-off request needs attention.',
|
|
202
122
|
TIME_OFF_DECIDED: 'A time-off request has been decided.',
|
|
203
123
|
VIOLATION_RAISED: 'The schedule has a blocking staffing issue.',
|
|
124
|
+
TASK_ASSIGNED: 'You have a new to-do.',
|
|
204
125
|
SCHEDULE_RUN_COMPLETE: 'The project schedule run has finished.',
|
|
205
126
|
MILESTONE_AT_RISK: 'A milestone is at risk.',
|
|
206
127
|
RESOURCE_OVERALLOCATED: 'A resource is overallocated.',
|
|
128
|
+
OFFER_FILLED: 'An open shift was filled.',
|
|
129
|
+
OFFER_UNFILLED: 'An open shift was not filled.',
|
|
130
|
+
PROJECT_DIGEST: 'Your weekly project update is ready.',
|
|
207
131
|
},
|
|
208
132
|
},
|
|
209
133
|
};
|
package/src/i18n/sheet.ts
CHANGED
|
@@ -74,18 +74,17 @@ export default {
|
|
|
74
74
|
border_outline_right: 'Outline right side',
|
|
75
75
|
border_outline_top: 'Outline top side',
|
|
76
76
|
border_styles: 'Border style',
|
|
77
|
-
command_dropped: '
|
|
77
|
+
command_dropped: 'A previous edit reverted your changes, please re-enter them.',
|
|
78
78
|
command_failed: 'A change could not be saved and was reverted.',
|
|
79
|
-
command_save_delayed: 'Some changes are not saved
|
|
80
|
-
command_too_large: 'This change is too large to save at once and was reverted.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
command_save_delayed: 'Some changes are not saved, and a retry is in progress.',
|
|
80
|
+
command_too_large: 'This change is too large to save at once and was reverted.',
|
|
81
|
+
format_layer_too_large: 'This formatting is too fragmented to save and was reverted. Format larger areas at once and try again.',
|
|
82
|
+
command_access_lost: 'This sheet is no longer available, your changes were reverted.',
|
|
83
|
+
command_restore_failed: 'Some unsaved edits from a closed tab could not be restored.',
|
|
84
|
+
command_overridden: 'A more recent change already covers one of your edits.',
|
|
85
|
+
local_durability_unavailable_msg: 'Changes will sync while this page stays open.',
|
|
86
86
|
copy_cell_value: 'Copy',
|
|
87
87
|
create_sheet: 'New spreadsheet',
|
|
88
|
-
create_sheet_description: 'Create a new spreadsheet',
|
|
89
88
|
create_sheet_modal_msg: 'Create a new spreadsheet.',
|
|
90
89
|
create_new_spreadsheet: 'Create a new spreadsheet',
|
|
91
90
|
create_new_sheet: 'Create a new sheet',
|
|
@@ -94,7 +93,6 @@ export default {
|
|
|
94
93
|
data_table_ai_columns: 'AI columns',
|
|
95
94
|
data_table_ai_columns_paused: 'Paused',
|
|
96
95
|
data_table_ai_columns_paused_owner: 'Paused (AI note archived)',
|
|
97
|
-
data_table_ask_agent: 'Ask agent',
|
|
98
96
|
data_table_ask_owner_note_: 'Ask the AI note "%{title}" about this table',
|
|
99
97
|
data_table_coverage_gaps: 'Coverage gaps',
|
|
100
98
|
data_table_data_as_of: 'Data as of',
|
|
@@ -114,8 +112,7 @@ export default {
|
|
|
114
112
|
data_table_origin_SOURCE_msg: 'Filled from the source records',
|
|
115
113
|
data_table_owner_badge: 'AI note',
|
|
116
114
|
data_table_owner_note: 'AI note',
|
|
117
|
-
data_table_owner_note_msg:
|
|
118
|
-
'This table belongs to the AI note. If the note is deleted, the table stays as a standalone table. To delete both, ask the agent.',
|
|
115
|
+
data_table_owner_note_msg: 'This table belongs to the AI note. If the note is deleted, the table will stay as a standalone table.',
|
|
119
116
|
data_table_recent_changes: 'Recent changes',
|
|
120
117
|
data_table_rows: 'Rows',
|
|
121
118
|
data_table_rows_empty: 'This table has no rows yet.',
|
|
@@ -129,8 +126,7 @@ export default {
|
|
|
129
126
|
data_table_run_summary: '%{added} added, %{changed} changed, %{removed} removed',
|
|
130
127
|
data_table_run_summary_derived: '%{added} added, %{changed} changed, %{removed} removed, %{derived} AI-filled',
|
|
131
128
|
data_table_sort_by_: 'Sort by %{label}',
|
|
132
|
-
|
|
133
|
-
data_table_source_CAMPAIGN_RESPONSES: 'form responses',
|
|
129
|
+
data_table_source_EMAIL_OUTREACH_RECIPIENTS: 'email recipients',
|
|
134
130
|
data_table_source_FIELD_DOC_SUBMISSIONS: 'field doc submissions',
|
|
135
131
|
data_table_source_LOGS: 'logs',
|
|
136
132
|
data_table_sync_state_BACKFILLING: 'Loading source records',
|
|
@@ -188,11 +184,7 @@ export default {
|
|
|
188
184
|
import_sheet_mode_insert: 'Insert new sheet(s)',
|
|
189
185
|
import_sheet_mode_replace: 'Replace spreadsheet',
|
|
190
186
|
import_sheet_confirm: 'Import',
|
|
191
|
-
import_sheet_importing:
|
|
192
|
-
'Importing your file. Large files can take a few minutes; you can close this window and keep working. You will be notified when the import finishes.',
|
|
193
|
-
import_sheet_done: 'Your spreadsheet import finished.',
|
|
194
|
-
import_sheet_done_formula_warning: 'Your spreadsheet import finished, but some formulas could not be computed.',
|
|
195
|
-
import_sheet_failed: 'Your spreadsheet import failed. The uploaded file was kept so you can try again.',
|
|
187
|
+
import_sheet_importing: "Importing may take a few minutes. You can close this window; we'll notify you when it's done.",
|
|
196
188
|
insert_1_column_left: 'Insert 1 column left',
|
|
197
189
|
insert_1_column_right: 'Insert 1 column right',
|
|
198
190
|
insert_1_row_above: 'Insert 1 row above',
|
|
@@ -205,17 +197,12 @@ export default {
|
|
|
205
197
|
merge_vertically: 'Merge vertically',
|
|
206
198
|
move_sheet_tab_left: 'Move left',
|
|
207
199
|
move_sheet_tab_right: 'Move right',
|
|
208
|
-
move_selection_design_projection_split_msg:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
'This column could not be repositioned because your selection contains a merged cell. Please unmerge your cells and try again.',
|
|
215
|
-
move_selection_merged_source_msg:
|
|
216
|
-
'This selection could not be repositioned because it contains a merged cell. Please unmerge your cells and try again.',
|
|
217
|
-
move_selection_merged_target_msg:
|
|
218
|
-
'You cannot move a column to a position that contains a merged cell. Please unmerge your cells and try again.',
|
|
200
|
+
move_selection_design_projection_split_msg: 'Cannot move: a saved cell or named range would move or split.',
|
|
201
|
+
move_selection_formula_dependency_msg: 'Cannot move: formulas depend on cells that would change position.',
|
|
202
|
+
move_selection_formula_loading_msg: 'Wait for the other sheets to load before moving.',
|
|
203
|
+
move_selection_merged_source_column_msg: 'Unmerge the selected cells before moving this column.',
|
|
204
|
+
move_selection_merged_source_msg: 'Unmerge the selected cells before moving.',
|
|
205
|
+
move_selection_merged_target_msg: 'Unmerge cells at the destination before moving this column.',
|
|
219
206
|
move_selection_merged_title: 'Repositioning Error',
|
|
220
207
|
more_cell_actions: 'More cell actions',
|
|
221
208
|
more_sheet_tab_actions: 'More sheet actions',
|
|
@@ -226,16 +213,16 @@ export default {
|
|
|
226
213
|
unmerge_all: 'Unmerge all',
|
|
227
214
|
unfreeze_columns: 'Unfreeze columns',
|
|
228
215
|
unfreeze_rows: 'Unfreeze rows',
|
|
229
|
-
data_table_login_change_required_msg:
|
|
230
|
-
"This data table doesn't belong to [em_text##%{orgName}].\n Change your login to access this data table.",
|
|
216
|
+
data_table_login_change_required_msg: "This table isn't in [em_link##%{orgName}]. Switch logins to access it.",
|
|
231
217
|
open_data_table: 'Open data table',
|
|
232
218
|
redo_unavailable: 'This change can no longer be redone.',
|
|
233
219
|
undo_history_cleared: 'Undo history was cleared because the sheet changed.',
|
|
234
220
|
structure_insert_grid_full_msg: 'The sheet is full. Empty its last row or column before inserting another one.',
|
|
235
221
|
sheet_login_change_required_msg:
|
|
236
|
-
"This spreadsheet doesn't belong to [
|
|
222
|
+
"This spreadsheet doesn't belong to [em_link##%{orgName}].\n Change your login to access this spreadsheet.",
|
|
237
223
|
sync_cells: 'Sync cells',
|
|
238
224
|
paste: 'Paste',
|
|
225
|
+
print_preparing_msg: 'Preparing to print…',
|
|
239
226
|
strikethrough: 'Strikethrough',
|
|
240
227
|
text_color: 'Text color',
|
|
241
228
|
text_style: 'Text style',
|
package/src/i18n/workflow.ts
CHANGED
|
@@ -4,8 +4,6 @@ export default {
|
|
|
4
4
|
operation_workflows: 'Operation workflows',
|
|
5
5
|
workflow_missing: 'Workflow is missing',
|
|
6
6
|
workflow_missing_msg: "The workflow you're looking for could not be found.",
|
|
7
|
-
not_active_msg: 'Not active – no upcoming jobs',
|
|
8
|
-
active_msg: 'Active – waiting for %{logType} logs',
|
|
9
7
|
|
|
10
8
|
// Reminders
|
|
11
9
|
reminders: 'Scheduled',
|
|
@@ -28,6 +26,13 @@ export default {
|
|
|
28
26
|
follow_up_at_msg: 'Next follow-up: %{followUpAt}',
|
|
29
27
|
created_by: 'Created by %{name}',
|
|
30
28
|
recipients: 'Recipients',
|
|
29
|
+
// Scheduled tasks that start after other work finishes
|
|
30
|
+
waiting: 'Waiting',
|
|
31
|
+
blocked: 'Did not run',
|
|
32
|
+
waiting_for_label: 'Waiting for:',
|
|
33
|
+
waiting_msg: 'Waiting for other work to finish',
|
|
34
|
+
on_hold_msg: 'On hold: %{title} failed',
|
|
35
|
+
blocked_msg: 'Did not run: %{reason}',
|
|
31
36
|
|
|
32
37
|
run_status: {
|
|
33
38
|
STARTED: 'In progress',
|
|
@@ -70,8 +75,6 @@ export default {
|
|
|
70
75
|
program_managed_msg:
|
|
71
76
|
'This workflow comes with the %{program} program and stays up to date with it. You can pause it or add your own instructions.',
|
|
72
77
|
program_workflow: 'Program workflow',
|
|
73
|
-
program_trigger_msg: 'When a log is added to this document',
|
|
74
|
-
program_active_msg: 'Active – waiting for logs added to this document',
|
|
75
78
|
program_unenrolled_msg:
|
|
76
79
|
"This workflow's program was removed from your organization. Restore the program in App Settings → Programs to resume it.",
|
|
77
80
|
program_restore_expired_msg:
|
|
@@ -91,6 +94,65 @@ export default {
|
|
|
91
94
|
save_user_instructions: 'Save instructions',
|
|
92
95
|
user_instructions_saved: 'User instructions saved.',
|
|
93
96
|
|
|
97
|
+
// AI workflow definitions (the workflow modal)
|
|
98
|
+
step_type: {
|
|
99
|
+
CHECK: 'Check',
|
|
100
|
+
SEND_EMAIL: 'Email',
|
|
101
|
+
SEND_TEXT: 'Text',
|
|
102
|
+
WAIT: 'Wait',
|
|
103
|
+
CREATE_TASK: 'Create scheduled task',
|
|
104
|
+
},
|
|
105
|
+
runs_when: 'Runs when',
|
|
106
|
+
// A FINISHED trigger that names one scheduled task or workflow
|
|
107
|
+
trigger_source_runs: 'View runs of %{title}',
|
|
108
|
+
trigger_source_missing: 'What this trigger names no longer exists, so it will not run.',
|
|
109
|
+
steps: 'Steps',
|
|
110
|
+
steps_then: 'Then',
|
|
111
|
+
rules: 'Rules',
|
|
112
|
+
on_edit: 'When the log is edited',
|
|
113
|
+
remembers: 'Remembers',
|
|
114
|
+
problems: 'Problems',
|
|
115
|
+
last_dry_run: 'Last dry run',
|
|
116
|
+
// Keyed by Workflow.status; the sidebar derives the same three from workflowPublished and workflowActive
|
|
117
|
+
definition_status: {
|
|
118
|
+
DRAFT: 'Draft',
|
|
119
|
+
ACTIVE: 'On',
|
|
120
|
+
INACTIVE: 'Paused',
|
|
121
|
+
},
|
|
122
|
+
version_number: 'Version %{version}',
|
|
123
|
+
switch_on: 'Switch on',
|
|
124
|
+
apply_changes: 'Apply changes',
|
|
125
|
+
pause: 'Pause',
|
|
126
|
+
resume: 'Resume',
|
|
127
|
+
discard_draft: 'Discard draft',
|
|
128
|
+
remove_added: 'Remove what was added',
|
|
129
|
+
arrow_finish: 'Finish',
|
|
130
|
+
arrow_otherwise: 'otherwise',
|
|
131
|
+
to_label: 'To:',
|
|
132
|
+
reply_to_label: 'Reply-to:',
|
|
133
|
+
// The Draft/Live switch, shown when a workflow has both a live version and a draft
|
|
134
|
+
version_view: {
|
|
135
|
+
DRAFT: 'Draft',
|
|
136
|
+
LIVE: 'Live',
|
|
137
|
+
},
|
|
138
|
+
draft_not_live_msg: 'Changes in this draft are not live yet. The live version keeps running.',
|
|
139
|
+
switch_on_title: 'Switch on this workflow?',
|
|
140
|
+
switch_on_confirm_msg: 'From now on, when %{trigger}, this workflow will act without review.',
|
|
141
|
+
apply_changes_title: 'Apply these changes?',
|
|
142
|
+
apply_changes_confirm_msg: 'This draft will replace the live version. From now on, when %{trigger}, it will act without review.',
|
|
143
|
+
pause_form_title: "Pause this form's workflow?",
|
|
144
|
+
pause_form_confirm_msg: 'Nothing will fill this form while its workflow is paused, and its answers cannot be typed in.',
|
|
145
|
+
discard_draft_title: 'Discard this draft?',
|
|
146
|
+
discard_draft_confirm_msg: 'The changes in this draft will be deleted. The live version keeps running.',
|
|
147
|
+
discard_unpublished_confirm_msg: 'This workflow was never switched on, so discarding its draft deletes the workflow.',
|
|
148
|
+
remove_added_title: 'Remove what was added?',
|
|
149
|
+
remove_added_confirm_msg:
|
|
150
|
+
"The steps and rules added to this form's workflow will be deleted, with any draft. The form keeps filling from its logs, and its runs stay.",
|
|
151
|
+
fill_title: 'Fills the form from its logs',
|
|
152
|
+
fill_msg: 'Saves the answers the logs support and texts the person who logged what changed and what is missing. Always on.',
|
|
153
|
+
nothing_added: 'Nothing added',
|
|
154
|
+
form_paused_msg: 'Paused: nothing is filling this form.',
|
|
155
|
+
|
|
94
156
|
// Below is old but some may be useful
|
|
95
157
|
|
|
96
158
|
// Actions related
|
package/src/types/ai.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
// AI chat types
|
|
2
2
|
|
|
3
|
-
export type AIChatType = 'ORCHESTRATOR';
|
|
4
|
-
|
|
5
3
|
export type AIChatMessageType =
|
|
6
4
|
| 'MESSAGE'
|
|
7
5
|
| 'SMS'
|
|
@@ -39,12 +37,10 @@ export type AIEventErrorName =
|
|
|
39
37
|
export interface AIChatData {
|
|
40
38
|
activityOrder?: string;
|
|
41
39
|
id: string;
|
|
42
|
-
type: AIChatType | null;
|
|
43
40
|
organizationId: string | null;
|
|
44
41
|
agentNoteId?: string | null;
|
|
45
42
|
calDate: string | null;
|
|
46
43
|
summary: string;
|
|
47
|
-
userManagedSummary: boolean;
|
|
48
44
|
archivedAt: string | null;
|
|
49
45
|
createdAt: string;
|
|
50
46
|
updatedAt: string;
|
package/src/types/app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { AIChatLinkEvent } from '@jsb188/mday/types/linkedEntity.d.ts';
|
|
1
2
|
import { COLORS } from '../constants/app.ts';
|
|
2
|
-
import type { QueryResetTarget } from '../utils/queryReset.ts';
|
|
3
3
|
|
|
4
4
|
// Modal; App settings
|
|
5
5
|
|
|
@@ -42,49 +42,38 @@ export interface SimpleErrorType {
|
|
|
42
42
|
|
|
43
43
|
// Web Socket events
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
label?: string;
|
|
60
|
-
text: string;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Explicit single-record reads supported by oversized fragment recovery. */
|
|
64
|
-
export interface WSFragmentRecoveryTarget {
|
|
65
|
-
kind: 'AGENT_NOTE' | 'LOG_ENTRY';
|
|
66
|
-
organizationId: string;
|
|
45
|
+
/* What happened to a record (or, for 'touched', to some records of a type in a scope). */
|
|
46
|
+
export type DataChangeKind = 'updated' | 'added' | 'moved' | 'deleted' | 'touched';
|
|
47
|
+
|
|
48
|
+
/* One record change in a data update packet. */
|
|
49
|
+
export interface WSDataChange {
|
|
50
|
+
type: string; // DATA_TYPES key; narrowed to DataTypeKey by the server builders and the client dispatcher
|
|
51
|
+
kind: DataChangeKind;
|
|
52
|
+
id?: string; // Serialized record id; absent only for 'touched'
|
|
53
|
+
scope?: Record<string, string>; // Serialized parent ids named by DATA_TYPES[type].scope
|
|
54
|
+
data?: Record<string, unknown>; // Fields to merge into the cached record
|
|
55
|
+
partial?: true; // The record changed in ways `data` does not carry
|
|
56
|
+
rev?: string; // Decimal revision of this record; an older one is ignored
|
|
57
|
+
revKey?: string; // Revision fence shared by several records
|
|
58
|
+
append?: 'start' | 'end'; // Arrays in `data` are added to the cached arrays, not replaced
|
|
67
59
|
}
|
|
68
60
|
|
|
69
61
|
export interface WSDataUpdateObj {
|
|
70
62
|
id: string;
|
|
63
|
+
origin?: true; // This socket's own request caused these changes
|
|
64
|
+
changes?: WSDataChange[];
|
|
71
65
|
aiChatSubmission?: AIChatSubmissionWSObj;
|
|
72
|
-
|
|
73
|
-
messages?: ReactiveMessageObj[];
|
|
74
|
-
resetQueries?: QueryResetTarget[]; // Structured query reset targets
|
|
75
|
-
resetQueryRule?: ResetQueryRuleEnum; // Defaults to "IF_FRAGMENT_FOUND"
|
|
76
|
-
reactiveFragmentKeys?: string[]; // Fragment keys that are used to trigger reactivity
|
|
66
|
+
aiChatLinkEvent?: AIChatLinkEvent;
|
|
77
67
|
authorizationContextChanged?: boolean; // Private memory/disk cache must be discarded and auth reloaded
|
|
68
|
+
// Sheet journal packets only (Sheet, SheetTab, SheetManifest and SheetView fragments); every other record travels in `changes`
|
|
69
|
+
reactiveFragmentKeys?: string[]; // Sheet journal: further fragment keys whose observers are notified
|
|
78
70
|
fragments?:
|
|
79
71
|
| null
|
|
80
72
|
| ({
|
|
81
73
|
name: string;
|
|
82
74
|
dataId: string;
|
|
83
|
-
sequence?: string;
|
|
84
|
-
sequenceKey?: string;
|
|
85
|
-
recovery?: WSFragmentRecoveryTarget; // Fetch this record before applying; data is only an identity placeholder.
|
|
86
|
-
replaceId?: string; // Use this where client has a temporary ID that will be replaced by the server-side ID later
|
|
87
|
-
appendRule?: AppendRuleEnum | null;
|
|
75
|
+
sequence?: string; // Sheet journal: decimal revision; an older one is ignored
|
|
76
|
+
sequenceKey?: string; // Sheet journal: revision fence shared by several fragments
|
|
88
77
|
data: any;
|
|
89
78
|
} | null)[];
|
|
90
79
|
}
|
|
@@ -95,32 +84,6 @@ export interface AIChatSubmissionWSObj {
|
|
|
95
84
|
phase: 'RECEIVED';
|
|
96
85
|
}
|
|
97
86
|
|
|
98
|
-
export type OrchestratorArtifactKind = 'SHEET' | 'SHEET_TAB' | 'DATA_TABLE' | 'FIELD_DOC' | 'WORKFLOW';
|
|
99
|
-
export type OrchestratorArtifactAction = 'CREATED' | 'UPDATED' | 'DELETED';
|
|
100
|
-
|
|
101
|
-
/* One sheet, tab, table, form or workflow a Orchestrator tool call committed, sent to the account's watching tabs */
|
|
102
|
-
export interface OrchestratorArtifactWSObj {
|
|
103
|
-
aiChatId: string; // Serialized generic id
|
|
104
|
-
runId: string; // Durable ai_chat_runs id
|
|
105
|
-
callId: string; // Tool call id; the client's idempotency key
|
|
106
|
-
organizationId: string | null; // Serialized controller organization at tool time
|
|
107
|
-
toolName: string;
|
|
108
|
-
kind: OrchestratorArtifactKind;
|
|
109
|
-
action: OrchestratorArtifactAction;
|
|
110
|
-
sheetId?: string | null; // Serialized; SHEET and SHEET_TAB
|
|
111
|
-
sheetTabId?: string | null; // Serialized; SHEET_TAB, and SHEET when one tab is known (e.g. the first tab on create)
|
|
112
|
-
dataTableId?: string | null; // Serialized; DATA_TABLE
|
|
113
|
-
fieldDocId?: string | null; // Serialized; FIELD_DOC
|
|
114
|
-
fieldDocProgramId?: string | null; // Serialized; FIELD_DOC, the program whose page lists the form's documents
|
|
115
|
-
hasDraft?: boolean | null; // FIELD_DOC: whether the form currently has unpublished changes
|
|
116
|
-
draftStateAt?: string | null; // FIELD_DOC: when the server observed hasDraft, independent of the historical tool call time
|
|
117
|
-
workflowId?: string | null; // Serialized; WORKFLOW
|
|
118
|
-
active?: boolean | null; // WORKFLOW: whether new matching logs run it, when known
|
|
119
|
-
title?: string | null; // Sheet title, tab name, table, form or workflow title as stored when the event was built, else the call's
|
|
120
|
-
replayed?: boolean; // The tool result came from a durable receipt replay
|
|
121
|
-
at: string; // ISO timestamp of emission
|
|
122
|
-
}
|
|
123
|
-
|
|
124
87
|
export interface WSAppContextUpdateObj {
|
|
125
88
|
accountId: string;
|
|
126
89
|
updates: [any, any][];
|
package/src/types/auth.d.ts
CHANGED
|
@@ -79,6 +79,7 @@ export interface AccountSessionData {
|
|
|
79
79
|
*/
|
|
80
80
|
|
|
81
81
|
export interface AuthenticationData {
|
|
82
|
+
storageToken?: string | null;
|
|
82
83
|
token: string | null;
|
|
83
84
|
sessionBootstrapToken?: string | null;
|
|
84
85
|
cacheAuthorizationEpoch?: string | null;
|
|
@@ -90,5 +91,4 @@ export interface AuthenticationData {
|
|
|
90
91
|
hasPassword: boolean;
|
|
91
92
|
webVersion: string;
|
|
92
93
|
mobileVersion: string;
|
|
93
|
-
alertUpdatesOnMount: boolean;
|
|
94
94
|
}
|
package/src/utils/api.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { getENVVariable } from '../main.ts';
|
|
|
3
3
|
import type { ServerErrorObj } from '../types/app.d.ts';
|
|
4
4
|
|
|
5
5
|
let AUTH_TOKEN: string | null = null;
|
|
6
|
+
let STORAGE_TOKEN: string | null = null;
|
|
6
7
|
|
|
7
8
|
export type ManagedAccessTokenBinding = {
|
|
8
9
|
accountId: string;
|
|
@@ -252,10 +253,11 @@ export function getNewerRealtimeCapability(
|
|
|
252
253
|
* Global; save auth token to memory
|
|
253
254
|
*/
|
|
254
255
|
|
|
255
|
-
export function setAuthToken(token: string | null) {
|
|
256
|
+
export function setAuthToken(token: string | null, storageToken?: string | null) {
|
|
256
257
|
if (getENVVariable('IS_BROWSER')) {
|
|
257
258
|
// Only set auth token if it's browser; we don't want to share it across users
|
|
258
259
|
AUTH_TOKEN = token || null;
|
|
260
|
+
STORAGE_TOKEN = token && storageToken ? storageToken : null;
|
|
259
261
|
}
|
|
260
262
|
}
|
|
261
263
|
|
|
@@ -267,6 +269,13 @@ export function getAuthToken(): string | null {
|
|
|
267
269
|
return getENVVariable('IS_BROWSER') ? AUTH_TOKEN : null;
|
|
268
270
|
}
|
|
269
271
|
|
|
272
|
+
/*
|
|
273
|
+
* Read the asset credential paired with the current browser access token.
|
|
274
|
+
*/
|
|
275
|
+
export function getStorageToken(): string | null {
|
|
276
|
+
return getENVVariable('IS_BROWSER') ? STORAGE_TOKEN : null;
|
|
277
|
+
}
|
|
278
|
+
|
|
270
279
|
/**
|
|
271
280
|
* Helper; check if i18n exists for this error
|
|
272
281
|
*/
|
|
@@ -300,15 +309,10 @@ export function normalizeServerError(error?: any): ServerErrorObj {
|
|
|
300
309
|
gErr.errorCode && i18nErrCodeExists(gErr.errorCode),
|
|
301
310
|
);
|
|
302
311
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
} else {
|
|
308
|
-
statusCode = error.errors[0].statusCode;
|
|
309
|
-
errorCode = error.errors[0].errorCode;
|
|
310
|
-
errorValue = error.errors[0].variableWord;
|
|
311
|
-
}
|
|
312
|
+
const serverError = loggedError || error.errors[0];
|
|
313
|
+
statusCode = serverError.statusCode;
|
|
314
|
+
errorCode = serverError.errorCode == null ? undefined : String(serverError.errorCode);
|
|
315
|
+
errorValue = serverError.variableWord;
|
|
312
316
|
}
|
|
313
317
|
|
|
314
318
|
// Keep the returned error contract total even for malformed server payloads.
|