@ttahub/common 2.2.9 → 2.2.11
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/README.md +70 -64
- package/package.json +9 -9
- package/src/constants.js +426 -427
- package/src/index.js +12 -12
- package/src/utils.js +58 -58
- package/yarn-error.log +0 -45
package/README.md
CHANGED
|
@@ -1,64 +1,70 @@
|
|
|
1
|
-
# @ttahub/common
|
|
2
|
-
|
|
3
|
-
This is a CommonJS package and thus no build step is required.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
yarn add @ttahub/common
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Developers
|
|
12
|
-
|
|
13
|
-
Whenever changes to this package are made, you will need to:
|
|
14
|
-
|
|
15
|
-
- Bump the version in `package.json`.
|
|
16
|
-
- Publish the latest version of the package to npm by running `npm publish` in this directory. There is also a yarn task in the root of the TTAHUB app you can run ```yarn publish:common```
|
|
17
|
-
|
|
18
|
-
If your PR depends on the latest version of this package, please don't forget to run `yarn upgrade @ttahub/common` (in BE and FE) and commit the changes to `package.json` (all 3: ./package.json, ./frontend/package.json, ./packages/common/package.json) and `yarn.lock` (BE and FE).
|
|
19
|
-
|
|
20
|
-
Note: On Windows you will need to use `yarn add @ttahub/common@1.x.0` to update the package.json file's.
|
|
21
|
-
|
|
22
|
-
## Versions
|
|
23
|
-
|
|
24
|
-
# 2.2.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
# 2.2.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
# 2.2.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
### 1.1.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
### 1.1.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### 1.1.
|
|
57
|
-
Add
|
|
58
|
-
|
|
59
|
-
###
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
1
|
+
# @ttahub/common
|
|
2
|
+
|
|
3
|
+
This is a CommonJS package and thus no build step is required.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @ttahub/common
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Developers
|
|
12
|
+
|
|
13
|
+
Whenever changes to this package are made, you will need to:
|
|
14
|
+
|
|
15
|
+
- Bump the version in `package.json`.
|
|
16
|
+
- Publish the latest version of the package to npm by running `npm publish` in this directory. There is also a yarn task in the root of the TTAHUB app you can run ```yarn publish:common```
|
|
17
|
+
|
|
18
|
+
If your PR depends on the latest version of this package, please don't forget to run `yarn upgrade @ttahub/common` (in BE and FE) and commit the changes to `package.json` (all 3: ./package.json, ./frontend/package.json, ./packages/common/package.json) and `yarn.lock` (BE and FE).
|
|
19
|
+
|
|
20
|
+
Note: On Windows you will need to use `yarn add @ttahub/common@1.x.0` to update the package.json file's.
|
|
21
|
+
|
|
22
|
+
## Versions
|
|
23
|
+
|
|
24
|
+
# 2.2.11
|
|
25
|
+
Remove duplicate goal close reason.
|
|
26
|
+
|
|
27
|
+
# 2.2.10
|
|
28
|
+
Change the values for "why was the activity conducted?".
|
|
29
|
+
|
|
30
|
+
# 2.2.9
|
|
31
|
+
Added activity report "why was the activity conducted?" values.
|
|
32
|
+
|
|
33
|
+
# 2.2.7
|
|
34
|
+
Additional variations of disallowed ECLKC and HeadStart URLS.
|
|
35
|
+
|
|
36
|
+
# 2.2.3
|
|
37
|
+
Target population and reason changes
|
|
38
|
+
|
|
39
|
+
## 2.2.2
|
|
40
|
+
|
|
41
|
+
Change ECLKC to headstart.gov.
|
|
42
|
+
|
|
43
|
+
## 2.1.6
|
|
44
|
+
|
|
45
|
+
Remove constants related to ElasticSearch.
|
|
46
|
+
|
|
47
|
+
## 1.4.0
|
|
48
|
+
Add SUPPORT_TYPE
|
|
49
|
+
|
|
50
|
+
### 1.1.9/1.2.0
|
|
51
|
+
(Sorry for the multiple versions) Update the name of the const COLLABORATOR_TRAINING_REPORTS to POC_TRAINING_REPORTS
|
|
52
|
+
|
|
53
|
+
### 1.1.8
|
|
54
|
+
Reorder training report url param statuses so suspended is third tab and not second on TR landing
|
|
55
|
+
|
|
56
|
+
### 1.1.6/7
|
|
57
|
+
Add suspended as an option to training report URL params and status
|
|
58
|
+
|
|
59
|
+
### 1.1.4
|
|
60
|
+
Distinguish between training report url params and training report statuses
|
|
61
|
+
|
|
62
|
+
### 1.1.3
|
|
63
|
+
Add "event target populations"
|
|
64
|
+
|
|
65
|
+
### 1.1.2
|
|
66
|
+
#### 1.1.1
|
|
67
|
+
- Add COLLABORATOR_TRAINING_REPORTS permissions
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@ttahub/common",
|
|
3
|
-
"version": "2.2.
|
|
4
|
-
"description": "The purpose of this package is to reduce code duplication between the frontend and backend projects.",
|
|
5
|
-
"main": "src/index.js",
|
|
6
|
-
"author": "",
|
|
7
|
-
"license": "ISC",
|
|
8
|
-
"devDependencies": {}
|
|
9
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@ttahub/common",
|
|
3
|
+
"version": "2.2.11",
|
|
4
|
+
"description": "The purpose of this package is to reduce code duplication between the frontend and backend projects.",
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"author": "",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"devDependencies": {}
|
|
9
|
+
}
|
package/src/constants.js
CHANGED
|
@@ -1,427 +1,426 @@
|
|
|
1
|
-
const RECIPIENT_PARTICIPANTS = [
|
|
2
|
-
'CEO / CFO / Executive',
|
|
3
|
-
'Center Director / Site Director',
|
|
4
|
-
'Coach',
|
|
5
|
-
'Direct Service: Other',
|
|
6
|
-
'Family Service Worker / Case Manager',
|
|
7
|
-
'Fiscal Manager/Team',
|
|
8
|
-
'Governing Body / Tribal Council / Policy Council',
|
|
9
|
-
'Home Visitor',
|
|
10
|
-
'Manager / Coordinator / Specialist',
|
|
11
|
-
'Parent / Guardian',
|
|
12
|
-
'Program Director (HS / EHS)',
|
|
13
|
-
'Program Support / Administrative Assistant',
|
|
14
|
-
'Teacher / Infant-Toddler Caregiver',
|
|
15
|
-
'Volunteer',
|
|
16
|
-
];
|
|
17
|
-
exports.RECIPIENT_PARTICIPANTS = RECIPIENT_PARTICIPANTS;
|
|
18
|
-
|
|
19
|
-
const LANGUAGES = [
|
|
20
|
-
'English',
|
|
21
|
-
'Spanish',
|
|
22
|
-
];
|
|
23
|
-
exports.LANGUAGES = LANGUAGES;
|
|
24
|
-
|
|
25
|
-
const OTHER_ENTITY_PARTICIPANTS = [
|
|
26
|
-
'HSCO',
|
|
27
|
-
'Local or State Agency',
|
|
28
|
-
'OCC Regional Office',
|
|
29
|
-
'OHS Regional Office',
|
|
30
|
-
'Regional Head Start Association',
|
|
31
|
-
'Regional TTA Team / Specialists',
|
|
32
|
-
'State Early Learning System',
|
|
33
|
-
'State Head Start Association',
|
|
34
|
-
'Other',
|
|
35
|
-
];
|
|
36
|
-
exports.OTHER_ENTITY_PARTICIPANTS = OTHER_ENTITY_PARTICIPANTS;
|
|
37
|
-
|
|
38
|
-
const ALL_PARTICIPANTS = [
|
|
39
|
-
...RECIPIENT_PARTICIPANTS,
|
|
40
|
-
...OTHER_ENTITY_PARTICIPANTS,
|
|
41
|
-
];
|
|
42
|
-
exports.ALL_PARTICIPANTS = ALL_PARTICIPANTS;
|
|
43
|
-
|
|
44
|
-
const TOPICS = [
|
|
45
|
-
'Behavioral / Mental Health / Trauma',
|
|
46
|
-
'Child Screening and Assessment',
|
|
47
|
-
'CLASS: Classroom Organization',
|
|
48
|
-
'CLASS: Emotional Support',
|
|
49
|
-
'CLASS: Instructional Support',
|
|
50
|
-
'Coaching',
|
|
51
|
-
'Communication',
|
|
52
|
-
'Community and Self-Assessment',
|
|
53
|
-
'Culture & Language',
|
|
54
|
-
'Curriculum (Instructional or Parenting)',
|
|
55
|
-
'Data and Evaluation',
|
|
56
|
-
'Disabilities Services',
|
|
57
|
-
'ERSEA',
|
|
58
|
-
'Environmental Health and Safety / EPRR',
|
|
59
|
-
'Facilities',
|
|
60
|
-
'Family Support Services',
|
|
61
|
-
'Fatherhood / Male Caregiving',
|
|
62
|
-
'Fiscal / Budget',
|
|
63
|
-
'Five-Year Grant',
|
|
64
|
-
'Home Visiting',
|
|
65
|
-
'Human Resources',
|
|
66
|
-
'Leadership / Governance',
|
|
67
|
-
'Learning Environments',
|
|
68
|
-
'Nutrition',
|
|
69
|
-
'Ongoing Monitoring and Continuous Improvement',
|
|
70
|
-
'Oral Health',
|
|
71
|
-
'Parent and Family Engagement',
|
|
72
|
-
'Partnerships and Community Engagement',
|
|
73
|
-
'Physical Health and Screenings',
|
|
74
|
-
'Pregnancy Services / Expectant Families',
|
|
75
|
-
'Program Planning and Services',
|
|
76
|
-
'Quality Improvement Plan / QIP',
|
|
77
|
-
'Recordkeeping and Reporting',
|
|
78
|
-
'Safety Practices',
|
|
79
|
-
'Staff Wellness',
|
|
80
|
-
'Teaching / Caregiving Practices',
|
|
81
|
-
'Technology and Information Systems',
|
|
82
|
-
'Training and Professional Development',
|
|
83
|
-
'Transition Practices',
|
|
84
|
-
'Transportation',
|
|
85
|
-
];
|
|
86
|
-
exports.TOPICS = TOPICS;
|
|
87
|
-
|
|
88
|
-
const REASONS = [
|
|
89
|
-
'Below Competitive Threshold (CLASS)',
|
|
90
|
-
'Below Quality Threshold (CLASS)',
|
|
91
|
-
'Change in Scope',
|
|
92
|
-
'Child Incident',
|
|
93
|
-
'Complaint',
|
|
94
|
-
'Full Enrollment',
|
|
95
|
-
'New Recipient',
|
|
96
|
-
'New Director or Management',
|
|
97
|
-
'New Program Option',
|
|
98
|
-
'New Staff / Turnover',
|
|
99
|
-
'Ongoing Quality Improvement',
|
|
100
|
-
'Planning/Coordination',
|
|
101
|
-
'School Readiness Goals',
|
|
102
|
-
'Monitoring | Area of Concern',
|
|
103
|
-
'Monitoring | Noncompliance',
|
|
104
|
-
'Monitoring | Deficiency',
|
|
105
|
-
];
|
|
106
|
-
exports.REASONS = REASONS;
|
|
107
|
-
|
|
108
|
-
const DEPRECATED_REASONS = [
|
|
109
|
-
'COVID-19 response'
|
|
110
|
-
];
|
|
111
|
-
|
|
112
|
-
exports.DEPRECATED_REASONS = DEPRECATED_REASONS;
|
|
113
|
-
|
|
114
|
-
const REPORT_STATUSES = {
|
|
115
|
-
DRAFT: 'draft',
|
|
116
|
-
DELETED: 'deleted',
|
|
117
|
-
SUBMITTED: 'submitted',
|
|
118
|
-
APPROVED: 'approved',
|
|
119
|
-
NEEDS_ACTION: 'needs_action',
|
|
120
|
-
};
|
|
121
|
-
exports.REPORT_STATUSES = REPORT_STATUSES;
|
|
122
|
-
|
|
123
|
-
const TRAINING_REPORT_STATUSES = {
|
|
124
|
-
NOT_STARTED: 'Not started',
|
|
125
|
-
IN_PROGRESS: 'In progress',
|
|
126
|
-
COMPLETE: 'Complete',
|
|
127
|
-
SUSPENDED: 'Suspended',
|
|
128
|
-
};
|
|
129
|
-
exports.TRAINING_REPORT_STATUSES = TRAINING_REPORT_STATUSES;
|
|
130
|
-
|
|
131
|
-
const TRAINING_REPORT_STATUSES_URL_PARAMS = {
|
|
132
|
-
'not-started': TRAINING_REPORT_STATUSES.NOT_STARTED,
|
|
133
|
-
'in-progress': TRAINING_REPORT_STATUSES.IN_PROGRESS,
|
|
134
|
-
suspended: TRAINING_REPORT_STATUSES.SUSPENDED,
|
|
135
|
-
complete: TRAINING_REPORT_STATUSES.COMPLETE,
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
exports.TRAINING_REPORT_STATUSES_URL_PARAMS = TRAINING_REPORT_STATUSES_URL_PARAMS;
|
|
139
|
-
|
|
140
|
-
const EVENT_REPORT_STATUSES = {
|
|
141
|
-
IN_PROGRESS: 'In progress',
|
|
142
|
-
COMPLETE: 'Complete',
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
exports.EVENT_REPORT_STATUSES = EVENT_REPORT_STATUSES;
|
|
146
|
-
|
|
147
|
-
const TARGET_POPULATIONS = [
|
|
148
|
-
'Infants and Toddlers (ages birth to 3)',
|
|
149
|
-
'Preschool Children (ages 3-5)',
|
|
150
|
-
'Expectant families',
|
|
151
|
-
'Affected by Child Welfare Involvement',
|
|
152
|
-
'Affected by Disaster',
|
|
153
|
-
'Affected by Substance Use',
|
|
154
|
-
'Children Experiencing Homelessness',
|
|
155
|
-
'Children in Migrant and Seasonal Families',
|
|
156
|
-
'Children with Disabilities',
|
|
157
|
-
'Children with Special Health Care Needs',
|
|
158
|
-
'Dual-Language Learners',
|
|
159
|
-
'Program Staff',
|
|
160
|
-
];
|
|
161
|
-
exports.TARGET_POPULATIONS = TARGET_POPULATIONS;
|
|
162
|
-
|
|
163
|
-
const EVENT_TARGET_POPULATIONS = [
|
|
164
|
-
'Children/Families affected by traumatic events',
|
|
165
|
-
'Parents/Families impacted by health disparities',
|
|
166
|
-
];
|
|
167
|
-
|
|
168
|
-
exports.EVENT_TARGET_POPULATIONS = EVENT_TARGET_POPULATIONS;
|
|
169
|
-
|
|
170
|
-
const USER_ROLES = [
|
|
171
|
-
'Central Office',
|
|
172
|
-
'Other Federal Staff',
|
|
173
|
-
'National Center',
|
|
174
|
-
'Regional Program Manager',
|
|
175
|
-
'COR',
|
|
176
|
-
'Supervisory Program Specialist',
|
|
177
|
-
'Program Specialist',
|
|
178
|
-
'Grants Specialist',
|
|
179
|
-
'Customer Service Contract',
|
|
180
|
-
'TTAC',
|
|
181
|
-
'Admin. Assistant',
|
|
182
|
-
'Early Childhood Manager',
|
|
183
|
-
'Early Childhood Specialist',
|
|
184
|
-
'Family Engagement Specialist',
|
|
185
|
-
'Grantee Specialist Manager',
|
|
186
|
-
'Grantee Specialist',
|
|
187
|
-
'Health Specialist',
|
|
188
|
-
'System Specialist',
|
|
189
|
-
'Interim Management Team',
|
|
190
|
-
'Integrated Service Team',
|
|
191
|
-
'Grants Management Specialist',
|
|
192
|
-
];
|
|
193
|
-
exports.USER_ROLES = USER_ROLES;
|
|
194
|
-
|
|
195
|
-
const CLOSE_SUSPEND_REASONS = [
|
|
196
|
-
'Duplicate goal',
|
|
197
|
-
'Key staff turnover / vacancies',
|
|
198
|
-
'Recipient is not responding',
|
|
199
|
-
'Recipient request',
|
|
200
|
-
'Regional Office request',
|
|
201
|
-
'TTA complete',
|
|
202
|
-
];
|
|
203
|
-
|
|
204
|
-
exports.CLOSE_SUSPEND_REASONS = CLOSE_SUSPEND_REASONS;
|
|
205
|
-
|
|
206
|
-
const GOAL_CLOSE_REASONS = [
|
|
207
|
-
'
|
|
208
|
-
'
|
|
209
|
-
'
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
'
|
|
216
|
-
'Recipient
|
|
217
|
-
'
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
'
|
|
224
|
-
'
|
|
225
|
-
'
|
|
226
|
-
'
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
'
|
|
234
|
-
'Recipient requested',
|
|
235
|
-
'Regional Office requested',
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
'
|
|
284
|
-
'
|
|
285
|
-
'
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
'
|
|
293
|
-
'
|
|
294
|
-
'Program Specialist
|
|
295
|
-
'Program Specialist\'s
|
|
296
|
-
'
|
|
297
|
-
'
|
|
298
|
-
'RTTAPA
|
|
299
|
-
'
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
'New TTA
|
|
307
|
-
'
|
|
308
|
-
'
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
'
|
|
326
|
-
'
|
|
327
|
-
'
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
'
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
*
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
[GOAL_STATUS.
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
exports.TOTAL_HOURS_AND_RECIPIENT_GRAPH_TRACE_IDS = TOTAL_HOURS_AND_RECIPIENT_GRAPH_TRACE_IDS;
|
|
1
|
+
const RECIPIENT_PARTICIPANTS = [
|
|
2
|
+
'CEO / CFO / Executive',
|
|
3
|
+
'Center Director / Site Director',
|
|
4
|
+
'Coach',
|
|
5
|
+
'Direct Service: Other',
|
|
6
|
+
'Family Service Worker / Case Manager',
|
|
7
|
+
'Fiscal Manager/Team',
|
|
8
|
+
'Governing Body / Tribal Council / Policy Council',
|
|
9
|
+
'Home Visitor',
|
|
10
|
+
'Manager / Coordinator / Specialist',
|
|
11
|
+
'Parent / Guardian',
|
|
12
|
+
'Program Director (HS / EHS)',
|
|
13
|
+
'Program Support / Administrative Assistant',
|
|
14
|
+
'Teacher / Infant-Toddler Caregiver',
|
|
15
|
+
'Volunteer',
|
|
16
|
+
];
|
|
17
|
+
exports.RECIPIENT_PARTICIPANTS = RECIPIENT_PARTICIPANTS;
|
|
18
|
+
|
|
19
|
+
const LANGUAGES = [
|
|
20
|
+
'English',
|
|
21
|
+
'Spanish',
|
|
22
|
+
];
|
|
23
|
+
exports.LANGUAGES = LANGUAGES;
|
|
24
|
+
|
|
25
|
+
const OTHER_ENTITY_PARTICIPANTS = [
|
|
26
|
+
'HSCO',
|
|
27
|
+
'Local or State Agency',
|
|
28
|
+
'OCC Regional Office',
|
|
29
|
+
'OHS Regional Office',
|
|
30
|
+
'Regional Head Start Association',
|
|
31
|
+
'Regional TTA Team / Specialists',
|
|
32
|
+
'State Early Learning System',
|
|
33
|
+
'State Head Start Association',
|
|
34
|
+
'Other',
|
|
35
|
+
];
|
|
36
|
+
exports.OTHER_ENTITY_PARTICIPANTS = OTHER_ENTITY_PARTICIPANTS;
|
|
37
|
+
|
|
38
|
+
const ALL_PARTICIPANTS = [
|
|
39
|
+
...RECIPIENT_PARTICIPANTS,
|
|
40
|
+
...OTHER_ENTITY_PARTICIPANTS,
|
|
41
|
+
];
|
|
42
|
+
exports.ALL_PARTICIPANTS = ALL_PARTICIPANTS;
|
|
43
|
+
|
|
44
|
+
const TOPICS = [
|
|
45
|
+
'Behavioral / Mental Health / Trauma',
|
|
46
|
+
'Child Screening and Assessment',
|
|
47
|
+
'CLASS: Classroom Organization',
|
|
48
|
+
'CLASS: Emotional Support',
|
|
49
|
+
'CLASS: Instructional Support',
|
|
50
|
+
'Coaching',
|
|
51
|
+
'Communication',
|
|
52
|
+
'Community and Self-Assessment',
|
|
53
|
+
'Culture & Language',
|
|
54
|
+
'Curriculum (Instructional or Parenting)',
|
|
55
|
+
'Data and Evaluation',
|
|
56
|
+
'Disabilities Services',
|
|
57
|
+
'ERSEA',
|
|
58
|
+
'Environmental Health and Safety / EPRR',
|
|
59
|
+
'Facilities',
|
|
60
|
+
'Family Support Services',
|
|
61
|
+
'Fatherhood / Male Caregiving',
|
|
62
|
+
'Fiscal / Budget',
|
|
63
|
+
'Five-Year Grant',
|
|
64
|
+
'Home Visiting',
|
|
65
|
+
'Human Resources',
|
|
66
|
+
'Leadership / Governance',
|
|
67
|
+
'Learning Environments',
|
|
68
|
+
'Nutrition',
|
|
69
|
+
'Ongoing Monitoring and Continuous Improvement',
|
|
70
|
+
'Oral Health',
|
|
71
|
+
'Parent and Family Engagement',
|
|
72
|
+
'Partnerships and Community Engagement',
|
|
73
|
+
'Physical Health and Screenings',
|
|
74
|
+
'Pregnancy Services / Expectant Families',
|
|
75
|
+
'Program Planning and Services',
|
|
76
|
+
'Quality Improvement Plan / QIP',
|
|
77
|
+
'Recordkeeping and Reporting',
|
|
78
|
+
'Safety Practices',
|
|
79
|
+
'Staff Wellness',
|
|
80
|
+
'Teaching / Caregiving Practices',
|
|
81
|
+
'Technology and Information Systems',
|
|
82
|
+
'Training and Professional Development',
|
|
83
|
+
'Transition Practices',
|
|
84
|
+
'Transportation',
|
|
85
|
+
];
|
|
86
|
+
exports.TOPICS = TOPICS;
|
|
87
|
+
|
|
88
|
+
const REASONS = [
|
|
89
|
+
'Below Competitive Threshold (CLASS)',
|
|
90
|
+
'Below Quality Threshold (CLASS)',
|
|
91
|
+
'Change in Scope',
|
|
92
|
+
'Child Incident',
|
|
93
|
+
'Complaint',
|
|
94
|
+
'Full Enrollment',
|
|
95
|
+
'New Recipient',
|
|
96
|
+
'New Director or Management',
|
|
97
|
+
'New Program Option',
|
|
98
|
+
'New Staff / Turnover',
|
|
99
|
+
'Ongoing Quality Improvement',
|
|
100
|
+
'Planning/Coordination',
|
|
101
|
+
'School Readiness Goals',
|
|
102
|
+
'Monitoring | Area of Concern',
|
|
103
|
+
'Monitoring | Noncompliance',
|
|
104
|
+
'Monitoring | Deficiency',
|
|
105
|
+
];
|
|
106
|
+
exports.REASONS = REASONS;
|
|
107
|
+
|
|
108
|
+
const DEPRECATED_REASONS = [
|
|
109
|
+
'COVID-19 response'
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
exports.DEPRECATED_REASONS = DEPRECATED_REASONS;
|
|
113
|
+
|
|
114
|
+
const REPORT_STATUSES = {
|
|
115
|
+
DRAFT: 'draft',
|
|
116
|
+
DELETED: 'deleted',
|
|
117
|
+
SUBMITTED: 'submitted',
|
|
118
|
+
APPROVED: 'approved',
|
|
119
|
+
NEEDS_ACTION: 'needs_action',
|
|
120
|
+
};
|
|
121
|
+
exports.REPORT_STATUSES = REPORT_STATUSES;
|
|
122
|
+
|
|
123
|
+
const TRAINING_REPORT_STATUSES = {
|
|
124
|
+
NOT_STARTED: 'Not started',
|
|
125
|
+
IN_PROGRESS: 'In progress',
|
|
126
|
+
COMPLETE: 'Complete',
|
|
127
|
+
SUSPENDED: 'Suspended',
|
|
128
|
+
};
|
|
129
|
+
exports.TRAINING_REPORT_STATUSES = TRAINING_REPORT_STATUSES;
|
|
130
|
+
|
|
131
|
+
const TRAINING_REPORT_STATUSES_URL_PARAMS = {
|
|
132
|
+
'not-started': TRAINING_REPORT_STATUSES.NOT_STARTED,
|
|
133
|
+
'in-progress': TRAINING_REPORT_STATUSES.IN_PROGRESS,
|
|
134
|
+
suspended: TRAINING_REPORT_STATUSES.SUSPENDED,
|
|
135
|
+
complete: TRAINING_REPORT_STATUSES.COMPLETE,
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
exports.TRAINING_REPORT_STATUSES_URL_PARAMS = TRAINING_REPORT_STATUSES_URL_PARAMS;
|
|
139
|
+
|
|
140
|
+
const EVENT_REPORT_STATUSES = {
|
|
141
|
+
IN_PROGRESS: 'In progress',
|
|
142
|
+
COMPLETE: 'Complete',
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
exports.EVENT_REPORT_STATUSES = EVENT_REPORT_STATUSES;
|
|
146
|
+
|
|
147
|
+
const TARGET_POPULATIONS = [
|
|
148
|
+
'Infants and Toddlers (ages birth to 3)',
|
|
149
|
+
'Preschool Children (ages 3-5)',
|
|
150
|
+
'Expectant families',
|
|
151
|
+
'Affected by Child Welfare Involvement',
|
|
152
|
+
'Affected by Disaster',
|
|
153
|
+
'Affected by Substance Use',
|
|
154
|
+
'Children Experiencing Homelessness',
|
|
155
|
+
'Children in Migrant and Seasonal Families',
|
|
156
|
+
'Children with Disabilities',
|
|
157
|
+
'Children with Special Health Care Needs',
|
|
158
|
+
'Dual-Language Learners',
|
|
159
|
+
'Program Staff',
|
|
160
|
+
];
|
|
161
|
+
exports.TARGET_POPULATIONS = TARGET_POPULATIONS;
|
|
162
|
+
|
|
163
|
+
const EVENT_TARGET_POPULATIONS = [
|
|
164
|
+
'Children/Families affected by traumatic events',
|
|
165
|
+
'Parents/Families impacted by health disparities',
|
|
166
|
+
];
|
|
167
|
+
|
|
168
|
+
exports.EVENT_TARGET_POPULATIONS = EVENT_TARGET_POPULATIONS;
|
|
169
|
+
|
|
170
|
+
const USER_ROLES = [
|
|
171
|
+
'Central Office',
|
|
172
|
+
'Other Federal Staff',
|
|
173
|
+
'National Center',
|
|
174
|
+
'Regional Program Manager',
|
|
175
|
+
'COR',
|
|
176
|
+
'Supervisory Program Specialist',
|
|
177
|
+
'Program Specialist',
|
|
178
|
+
'Grants Specialist',
|
|
179
|
+
'Customer Service Contract',
|
|
180
|
+
'TTAC',
|
|
181
|
+
'Admin. Assistant',
|
|
182
|
+
'Early Childhood Manager',
|
|
183
|
+
'Early Childhood Specialist',
|
|
184
|
+
'Family Engagement Specialist',
|
|
185
|
+
'Grantee Specialist Manager',
|
|
186
|
+
'Grantee Specialist',
|
|
187
|
+
'Health Specialist',
|
|
188
|
+
'System Specialist',
|
|
189
|
+
'Interim Management Team',
|
|
190
|
+
'Integrated Service Team',
|
|
191
|
+
'Grants Management Specialist',
|
|
192
|
+
];
|
|
193
|
+
exports.USER_ROLES = USER_ROLES;
|
|
194
|
+
|
|
195
|
+
const CLOSE_SUSPEND_REASONS = [
|
|
196
|
+
'Duplicate goal',
|
|
197
|
+
'Key staff turnover / vacancies',
|
|
198
|
+
'Recipient is not responding',
|
|
199
|
+
'Recipient request',
|
|
200
|
+
'Regional Office request',
|
|
201
|
+
'TTA complete',
|
|
202
|
+
];
|
|
203
|
+
|
|
204
|
+
exports.CLOSE_SUSPEND_REASONS = CLOSE_SUSPEND_REASONS;
|
|
205
|
+
|
|
206
|
+
const GOAL_CLOSE_REASONS = [
|
|
207
|
+
'Recipient request',
|
|
208
|
+
'Regional Office request',
|
|
209
|
+
'TTA complete',
|
|
210
|
+
];
|
|
211
|
+
exports.GOAL_CLOSE_REASONS = GOAL_CLOSE_REASONS;
|
|
212
|
+
|
|
213
|
+
const GOAL_SUSPEND_REASONS = [
|
|
214
|
+
'Key staff turnover / vacancies',
|
|
215
|
+
'Recipient request',
|
|
216
|
+
'Recipient is not responding',
|
|
217
|
+
'Regional Office request',
|
|
218
|
+
];
|
|
219
|
+
exports.GOAL_SUSPEND_REASONS = GOAL_SUSPEND_REASONS;
|
|
220
|
+
|
|
221
|
+
const GOAL_SOURCES = [
|
|
222
|
+
'Federal monitoring issues, including CLASS and RANs',
|
|
223
|
+
'RTTAPA development',
|
|
224
|
+
'Recipient request',
|
|
225
|
+
'Regional office priority',
|
|
226
|
+
'Training event',
|
|
227
|
+
];
|
|
228
|
+
|
|
229
|
+
exports.GOAL_SOURCES = GOAL_SOURCES;
|
|
230
|
+
|
|
231
|
+
const ACTIVITY_REASONS = [
|
|
232
|
+
'Federal monitoring issues, including CLASS and RANs',
|
|
233
|
+
'Group event follow-up',
|
|
234
|
+
'Recipient requested',
|
|
235
|
+
'Regional Office requested',
|
|
236
|
+
];
|
|
237
|
+
|
|
238
|
+
exports.ACTIVITY_REASONS = ACTIVITY_REASONS;
|
|
239
|
+
|
|
240
|
+
const APPROVER_STATUSES = {
|
|
241
|
+
APPROVED: 'approved',
|
|
242
|
+
NEEDS_ACTION: 'needs_action',
|
|
243
|
+
};
|
|
244
|
+
exports.APPROVER_STATUSES = APPROVER_STATUSES;
|
|
245
|
+
|
|
246
|
+
const SCOPE_IDS = {
|
|
247
|
+
SITE_ACCESS: 1,
|
|
248
|
+
ADMIN: 2,
|
|
249
|
+
READ_WRITE_ACTIVITY_REPORTS: 3,
|
|
250
|
+
READ_REPORTS: 4,
|
|
251
|
+
READ_ACTIVITY_REPORTS: 4,
|
|
252
|
+
APPROVE_ACTIVITY_REPORTS: 5,
|
|
253
|
+
UNLOCK_APPROVED_REPORTS: 6,
|
|
254
|
+
READ_WRITE_TRAINING_REPORTS: 7,
|
|
255
|
+
POC_TRAINING_REPORTS: 9,
|
|
256
|
+
};
|
|
257
|
+
exports.SCOPE_IDS = SCOPE_IDS;
|
|
258
|
+
|
|
259
|
+
const DECIMAL_BASE = 10;
|
|
260
|
+
exports.DECIMAL_BASE = DECIMAL_BASE;
|
|
261
|
+
|
|
262
|
+
const ALERT_STATUSES = {
|
|
263
|
+
UNPUBLISHED: 'Unpublished',
|
|
264
|
+
PUBLISHED: 'Published'
|
|
265
|
+
};
|
|
266
|
+
exports.ALERT_STATUSES = ALERT_STATUSES;
|
|
267
|
+
|
|
268
|
+
const ALERT_VARIANTS = {
|
|
269
|
+
INFO: 'info',
|
|
270
|
+
EMERGENCY: 'emergency'
|
|
271
|
+
};
|
|
272
|
+
exports.ALERT_VARIANTS = ALERT_VARIANTS;
|
|
273
|
+
|
|
274
|
+
const ALERT_SIZES = {
|
|
275
|
+
STANDARD: 'standard',
|
|
276
|
+
SLIM: 'slim',
|
|
277
|
+
LARGE: 'large'
|
|
278
|
+
};
|
|
279
|
+
exports.ALERT_SIZES = ALERT_SIZES;
|
|
280
|
+
|
|
281
|
+
const COMMUNICATION_METHODS = [
|
|
282
|
+
'Email',
|
|
283
|
+
'Phone',
|
|
284
|
+
'In person',
|
|
285
|
+
'Virtual',
|
|
286
|
+
];
|
|
287
|
+
|
|
288
|
+
exports.COMMUNICATION_METHODS = COMMUNICATION_METHODS;
|
|
289
|
+
|
|
290
|
+
const COMMUNICATION_PURPOSES = [
|
|
291
|
+
'General Check-In',
|
|
292
|
+
'New TTA request',
|
|
293
|
+
'Program Specialist or Regional Office meeting',
|
|
294
|
+
'Program Specialist\'s Monthly contact',
|
|
295
|
+
'Program Specialist\'s site visit',
|
|
296
|
+
'Recipient question/feedback',
|
|
297
|
+
'RTTAPA updates',
|
|
298
|
+
'RTTAPA Initial Plan / New Recipient',
|
|
299
|
+
'TTA planning or scheduling',
|
|
300
|
+
];
|
|
301
|
+
|
|
302
|
+
exports.COMMUNICATION_PURPOSES = COMMUNICATION_PURPOSES;
|
|
303
|
+
|
|
304
|
+
const COMMUNICATION_RESULTS = [
|
|
305
|
+
'New TTA accepted',
|
|
306
|
+
'New TTA declined',
|
|
307
|
+
'RTTAPA declined',
|
|
308
|
+
'Next Steps identified',
|
|
309
|
+
];
|
|
310
|
+
|
|
311
|
+
exports.COMMUNICATION_RESULTS = COMMUNICATION_RESULTS;
|
|
312
|
+
|
|
313
|
+
const GOAL_STATUS = {
|
|
314
|
+
DRAFT: 'Draft',
|
|
315
|
+
NOT_STARTED: 'Not Started',
|
|
316
|
+
IN_PROGRESS: 'In Progress',
|
|
317
|
+
SUSPENDED: 'Suspended',
|
|
318
|
+
CLOSED: 'Closed',
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
exports.GOAL_STATUS = GOAL_STATUS;
|
|
322
|
+
|
|
323
|
+
const SUPPORT_TYPES = [
|
|
324
|
+
'Introducing',
|
|
325
|
+
'Planning',
|
|
326
|
+
'Implementing',
|
|
327
|
+
'Maintaining',
|
|
328
|
+
];
|
|
329
|
+
|
|
330
|
+
exports.SUPPORT_TYPES = SUPPORT_TYPES;
|
|
331
|
+
|
|
332
|
+
const EVENT_AUDIENCE = [
|
|
333
|
+
'Recipients',
|
|
334
|
+
'Regional office/TTA',
|
|
335
|
+
];
|
|
336
|
+
|
|
337
|
+
exports.EVENT_AUDIENCE = EVENT_AUDIENCE;
|
|
338
|
+
|
|
339
|
+
const GROUP_SHARED_WITH = {
|
|
340
|
+
EVERYONE: 'Everyone',
|
|
341
|
+
INDIVIDUALS: 'Individuals',
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
exports.GROUP_SHARED_WITH = GROUP_SHARED_WITH;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* A list of reasons that a CLOSED goal can be reopened.
|
|
348
|
+
*/
|
|
349
|
+
const REOPEN_CLOSED_REASONS = {
|
|
350
|
+
ACCIDENTALLY_CLOSED: 'Accidentally closed',
|
|
351
|
+
RECIPIENT_REQUEST: 'Recipient request to restart the work',
|
|
352
|
+
PS_REQUEST: 'PS request to restart the work',
|
|
353
|
+
NEW_RECIPIENT_STAFF_REQUEST: 'New recipient staff request similar work',
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* A list of reasons that a SUSPENDED goal can be reopened.
|
|
358
|
+
*/
|
|
359
|
+
const REOPEN_SUSPENDED_REASONS = {};
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* REOPEN_REASONS is a map of FROM status to an array of
|
|
363
|
+
* possible TO statuses.
|
|
364
|
+
*/
|
|
365
|
+
const REOPEN_REASONS = {
|
|
366
|
+
[GOAL_STATUS.CLOSED]: REOPEN_CLOSED_REASONS,
|
|
367
|
+
[GOAL_STATUS.SUSPENDED]: REOPEN_SUSPENDED_REASONS,
|
|
368
|
+
|
|
369
|
+
INFERRED: {
|
|
370
|
+
OBJECTIVE_REOPEN: 'Objective Reopen',
|
|
371
|
+
IMPORTED_FROM_SMARTSHEET: 'Imported from Smartsheet',
|
|
372
|
+
},
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
exports.REOPEN_REASONS = REOPEN_REASONS;
|
|
376
|
+
|
|
377
|
+
const DISALLOWED_URLS = [{
|
|
378
|
+
url: 'https://eclkc.ohs.acf.hhs.gov/professional-development/individualized-professional-development-ipd-portfolio/course-catalog',
|
|
379
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
380
|
+
}, {
|
|
381
|
+
url: 'https://eclkc.ohs.acf.hhs.gov/professional-development/individualized-professional-development-ipd-portfolio/individualized-professional-development-ipd-portfolio',
|
|
382
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
383
|
+
}, {
|
|
384
|
+
url: 'https://eclkc.ohs.acf.hhs.gov/cas/login',
|
|
385
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
386
|
+
},{
|
|
387
|
+
url: 'https://www.eclkc.ohs.acf.hhs.gov/professional-development/individualized-professional-development-ipd-portfolio/course-catalog',
|
|
388
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
389
|
+
}, {
|
|
390
|
+
url: 'https://www.eclkc.ohs.acf.hhs.gov/professional-development/individualized-professional-development-ipd-portfolio/individualized-professional-development-ipd-portfolio',
|
|
391
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
392
|
+
}, {
|
|
393
|
+
url: 'https://www.eclkc.ohs.acf.hhs.gov/cas/login',
|
|
394
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
395
|
+
}, {
|
|
396
|
+
url: 'https://headstart.gov/professional-development/individualized-professional-development-ipd-portfolio/course-catalog',
|
|
397
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
398
|
+
}, {
|
|
399
|
+
url: 'https://headstart.gov/professional-development/individualized-professional-development-ipd-portfolio/individualized-professional-development-ipd-portfolio',
|
|
400
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
401
|
+
}, {
|
|
402
|
+
url: 'https://headstart.gov/cas/login',
|
|
403
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
404
|
+
},{
|
|
405
|
+
url: 'https://www.headstart.gov/professional-development/individualized-professional-development-ipd-portfolio/course-catalog',
|
|
406
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
407
|
+
}, {
|
|
408
|
+
url: 'https://www.headstart.gov/professional-development/individualized-professional-development-ipd-portfolio/individualized-professional-development-ipd-portfolio',
|
|
409
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
410
|
+
}, {
|
|
411
|
+
url: 'https://www.headstart.gov/cas/login',
|
|
412
|
+
error: 'This link is no longer accepted in this field. Enter iPD courses used during your TTA session in the other field in this section.',
|
|
413
|
+
}
|
|
414
|
+
];
|
|
415
|
+
|
|
416
|
+
exports.DISALLOWED_URLS = DISALLOWED_URLS;
|
|
417
|
+
|
|
418
|
+
const VALID_URL_REGEX = /(?<url>(?<scheme>http(?:s)?):\/\/(?:(?<user>[a-zA-Z0-9._]+)(?:[:](?<password>[a-zA-Z0-9%._\+~#=]+))?[@])?(?:(?:www\.)?(?<host>[-a-zA-Z0-9%._\+~#=]{1,}\.[a-z]{2,6})|(?<ip>(?:[0-9]{1,3}\.){3}[0-9]{1,3}))(?:[:](?<port>[0-9]+))?(?:[\/](?<path>[-a-zA-Z0-9'@:%_\+.,~#&\/=()]*[-a-zA-Z0-9@:%_\+.~#&\/=()])?)?(?:[?](?<query>[-a-zA-Z0-9@:%_\+.~#&\/=()]*))*)/ig;
|
|
419
|
+
exports.VALID_URL_REGEX = VALID_URL_REGEX;
|
|
420
|
+
|
|
421
|
+
const TOTAL_HOURS_AND_RECIPIENT_GRAPH_TRACE_IDS = {
|
|
422
|
+
TRAINING: 'training',
|
|
423
|
+
TECHNICAL_ASSISTANCE: 'technical-assistance',
|
|
424
|
+
BOTH: 'both',
|
|
425
|
+
};
|
|
426
|
+
exports.TOTAL_HOURS_AND_RECIPIENT_GRAPH_TRACE_IDS = TOTAL_HOURS_AND_RECIPIENT_GRAPH_TRACE_IDS;
|
package/src/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const utils = require('./utils');
|
|
2
|
-
const constants = require('./constants');
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
Object.keys(constants).forEach(function (key) {
|
|
7
|
-
exports[key] = constants[key];
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
Object.keys(utils).forEach(function (key) {
|
|
11
|
-
exports[key] = utils[key];
|
|
12
|
-
});
|
|
1
|
+
const utils = require('./utils');
|
|
2
|
+
const constants = require('./constants');
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
Object.keys(constants).forEach(function (key) {
|
|
7
|
+
exports[key] = constants[key];
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
Object.keys(utils).forEach(function (key) {
|
|
11
|
+
exports[key] = utils[key];
|
|
12
|
+
});
|
package/src/utils.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
const { GOAL_STATUS, DISALLOWED_URLS, VALID_URL_REGEX } = require('./constants');
|
|
2
|
-
|
|
3
|
-
function isValidResourceUrl(attempted) {
|
|
4
|
-
try {
|
|
5
|
-
const httpOccurences = (attempted.match(/http/gi) || []).length;
|
|
6
|
-
if (
|
|
7
|
-
httpOccurences !== 1
|
|
8
|
-
|| DISALLOWED_URLS.some((disallowed) => disallowed.url === attempted)
|
|
9
|
-
) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const matches = [...attempted.matchAll(VALID_URL_REGEX)].map(({ groups }) => groups);
|
|
14
|
-
|
|
15
|
-
if (matches?.length !== 1) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const u = new URL(attempted);
|
|
20
|
-
return (u !== '');
|
|
21
|
-
} catch (e) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Given a list of goal statuses, determine the final status
|
|
28
|
-
* based on the criteria provided by OHS. Intended only
|
|
29
|
-
* to be used for merge goals
|
|
30
|
-
*
|
|
31
|
-
* Note that this should be kept in sync with the status predicted by
|
|
32
|
-
* the React component the user sees (FinalGoalCard)
|
|
33
|
-
*
|
|
34
|
-
* @param {string[]} statuses
|
|
35
|
-
* @returns string one of Object.values(GOAL_STATUS)
|
|
36
|
-
*/
|
|
37
|
-
function determineMergeGoalStatus(statuses) {
|
|
38
|
-
if (statuses.includes(GOAL_STATUS.IN_PROGRESS)) {
|
|
39
|
-
return GOAL_STATUS.IN_PROGRESS;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (statuses.includes(GOAL_STATUS.CLOSED)) {
|
|
43
|
-
return GOAL_STATUS.CLOSED;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (statuses.includes(GOAL_STATUS.SUSPENDED)) {
|
|
47
|
-
return GOAL_STATUS.SUSPENDED;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (statuses.includes(GOAL_STATUS.NOT_STARTED)) {
|
|
51
|
-
return GOAL_STATUS.NOT_STARTED;
|
|
52
|
-
}
|
|
53
|
-
return GOAL_STATUS.DRAFT;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
module.exports = {
|
|
57
|
-
determineMergeGoalStatus,
|
|
58
|
-
isValidResourceUrl,
|
|
1
|
+
const { GOAL_STATUS, DISALLOWED_URLS, VALID_URL_REGEX } = require('./constants');
|
|
2
|
+
|
|
3
|
+
function isValidResourceUrl(attempted) {
|
|
4
|
+
try {
|
|
5
|
+
const httpOccurences = (attempted.match(/http/gi) || []).length;
|
|
6
|
+
if (
|
|
7
|
+
httpOccurences !== 1
|
|
8
|
+
|| DISALLOWED_URLS.some((disallowed) => disallowed.url === attempted)
|
|
9
|
+
) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const matches = [...attempted.matchAll(VALID_URL_REGEX)].map(({ groups }) => groups);
|
|
14
|
+
|
|
15
|
+
if (matches?.length !== 1) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const u = new URL(attempted);
|
|
20
|
+
return (u !== '');
|
|
21
|
+
} catch (e) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Given a list of goal statuses, determine the final status
|
|
28
|
+
* based on the criteria provided by OHS. Intended only
|
|
29
|
+
* to be used for merge goals
|
|
30
|
+
*
|
|
31
|
+
* Note that this should be kept in sync with the status predicted by
|
|
32
|
+
* the React component the user sees (FinalGoalCard)
|
|
33
|
+
*
|
|
34
|
+
* @param {string[]} statuses
|
|
35
|
+
* @returns string one of Object.values(GOAL_STATUS)
|
|
36
|
+
*/
|
|
37
|
+
function determineMergeGoalStatus(statuses) {
|
|
38
|
+
if (statuses.includes(GOAL_STATUS.IN_PROGRESS)) {
|
|
39
|
+
return GOAL_STATUS.IN_PROGRESS;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (statuses.includes(GOAL_STATUS.CLOSED)) {
|
|
43
|
+
return GOAL_STATUS.CLOSED;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (statuses.includes(GOAL_STATUS.SUSPENDED)) {
|
|
47
|
+
return GOAL_STATUS.SUSPENDED;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (statuses.includes(GOAL_STATUS.NOT_STARTED)) {
|
|
51
|
+
return GOAL_STATUS.NOT_STARTED;
|
|
52
|
+
}
|
|
53
|
+
return GOAL_STATUS.DRAFT;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
module.exports = {
|
|
57
|
+
determineMergeGoalStatus,
|
|
58
|
+
isValidResourceUrl,
|
|
59
59
|
}
|
package/yarn-error.log
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
Arguments:
|
|
2
|
-
C:\Program Files\nodejs\node.exe C:\Users\Adam Levin\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js --cwd ./packages/common publish
|
|
3
|
-
|
|
4
|
-
PATH:
|
|
5
|
-
C:\Users\ADAMLE~1\AppData\Local\Temp\yarn--1691156345583-0.05828766129489682;C:\Develop\Repos\HHS-Head-Start-TTADP\node_modules\.bin;C:\Users\Adam Levin\AppData\Local\Yarn\Data\link\node_modules\.bin;C:\Users\Adam Levin\AppData\Local\Yarn\bin;C:\Program Files\libexec\lib\node_modules\npm\bin\node-gyp-bin;C:\Program Files\lib\node_modules\npm\bin\node-gyp-bin;C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Python311\Scripts\;C:\Python311\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\HashiCorp\Vagrant\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\SourceGear\Common\DiffMerge\;C:\Program Files (x86)\dotnet\;C:\ProgramData\chocolatey\bin;C:\Develop\Tools\Terraform\;C:\Program Files\Git\cmd;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\Users\Adam Levin\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\nodejs\;C:\Users\Adam Levin\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\Adam Levin\AppData\Local\Programs\Python\Python39\;C:\Users\Adam Levin\AppData\Local\Microsoft\WindowsApps;C:\Users\Adam Levin\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Git\bin;C:\Users\Adam Levin\AppData\Local\Microsoft\WindowsApps\;C:\Users\Adam Levin\.dotnet\tools;C:\Users\Adam Levin\AppData\Local\GitHubDesktop\bin;C:\Program Files\PostgreSQL\13\bin;c:\;C:\Program Files\ClamAV;C:\Users\Adam Levin\AppData\Roaming\nvm;C:\Users\Adam Levin\AppData\Roaming\npm;C:\Users\Adam Levin\AppData\Local\Keybase\
|
|
6
|
-
|
|
7
|
-
Yarn version:
|
|
8
|
-
1.22.10
|
|
9
|
-
|
|
10
|
-
Node version:
|
|
11
|
-
18.16.0
|
|
12
|
-
|
|
13
|
-
Platform:
|
|
14
|
-
win32 x64
|
|
15
|
-
|
|
16
|
-
Trace:
|
|
17
|
-
Error: canceled
|
|
18
|
-
at Interface.<anonymous> (C:\Users\Adam Levin\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:136216:13)
|
|
19
|
-
at Interface.emit (node:events:513:28)
|
|
20
|
-
at [_ttyWrite] [as _ttyWrite] (node:internal/readline/interface:1131:18)
|
|
21
|
-
at ReadStream.onkeypress (node:internal/readline/interface:270:20)
|
|
22
|
-
at ReadStream.emit (node:events:513:28)
|
|
23
|
-
at emitKeys (node:internal/readline/utils:357:14)
|
|
24
|
-
at emitKeys.next (<anonymous>)
|
|
25
|
-
at ReadStream.onData (node:internal/readline/emitKeypressEvents:64:36)
|
|
26
|
-
at ReadStream.emit (node:events:513:28)
|
|
27
|
-
at addChunk (node:internal/streams/readable:324:12)
|
|
28
|
-
|
|
29
|
-
npm manifest:
|
|
30
|
-
{
|
|
31
|
-
"name": "@ttahub/common",
|
|
32
|
-
"version": "1.3.0",
|
|
33
|
-
"description": "The purpose of this package is to reduce code duplication between the frontend and backend projects.",
|
|
34
|
-
"main": "src/index.js",
|
|
35
|
-
"author": "",
|
|
36
|
-
"license": "ISC",
|
|
37
|
-
"devDependencies": {}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
yarn manifest:
|
|
41
|
-
No manifest
|
|
42
|
-
|
|
43
|
-
Lockfile:
|
|
44
|
-
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
45
|
-
# yarn lockfile v1
|