@ttahub/common 1.4.0 → 1.4.2
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 +44 -44
- package/package.json +1 -1
- package/src/index.js +32 -6
package/README.md
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
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
|
-
### 1.1.9/1.2.0
|
|
25
|
-
(Sorry for the multiple versions) Update the name of the const COLLABORATOR_TRAINING_REPORTS to POC_TRAINING_REPORTS
|
|
26
|
-
|
|
27
|
-
### 1.1.8
|
|
28
|
-
Reorder training report url param statuses so suspended is third tab and not second on TR landing
|
|
29
|
-
|
|
30
|
-
### 1.1.6/7
|
|
31
|
-
Add suspended as an option to training report URL params and status
|
|
32
|
-
|
|
33
|
-
### 1.1.4
|
|
34
|
-
Distinguish between training report url params and training report statuses
|
|
35
|
-
|
|
36
|
-
### 1.1.3
|
|
37
|
-
Add "event target populations"
|
|
38
|
-
|
|
39
|
-
### 1.1.2
|
|
40
|
-
#### 1.1.1
|
|
41
|
-
- Add COLLABORATOR_TRAINING_REPORTS permissions
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
+
### 1.1.9/1.2.0
|
|
25
|
+
(Sorry for the multiple versions) Update the name of the const COLLABORATOR_TRAINING_REPORTS to POC_TRAINING_REPORTS
|
|
26
|
+
|
|
27
|
+
### 1.1.8
|
|
28
|
+
Reorder training report url param statuses so suspended is third tab and not second on TR landing
|
|
29
|
+
|
|
30
|
+
### 1.1.6/7
|
|
31
|
+
Add suspended as an option to training report URL params and status
|
|
32
|
+
|
|
33
|
+
### 1.1.4
|
|
34
|
+
Distinguish between training report url params and training report statuses
|
|
35
|
+
|
|
36
|
+
### 1.1.3
|
|
37
|
+
Add "event target populations"
|
|
38
|
+
|
|
39
|
+
### 1.1.2
|
|
40
|
+
#### 1.1.1
|
|
41
|
+
- Add COLLABORATOR_TRAINING_REPORTS permissions
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -180,11 +180,12 @@ const USER_ROLES = [
|
|
|
180
180
|
];
|
|
181
181
|
exports.USER_ROLES = USER_ROLES;
|
|
182
182
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
'
|
|
186
|
-
'
|
|
187
|
-
'Recipient
|
|
183
|
+
// TODO: This is the deduped combination of GOAL_CLOSE_REASONS and GOAL_SUSPEND_REASONS
|
|
184
|
+
const CLOSE_SUSPEND_REASONS = [
|
|
185
|
+
'Duplicate goal',
|
|
186
|
+
'Key staff turnover / vacancies',
|
|
187
|
+
'Recipient is not responding',
|
|
188
|
+
'Recipient request',
|
|
188
189
|
'Regional Office request',
|
|
189
190
|
'TTA complete',
|
|
190
191
|
];
|
|
@@ -256,4 +257,29 @@ const ALERT_SIZES = {
|
|
|
256
257
|
SLIM: 'slim',
|
|
257
258
|
LARGE: 'large'
|
|
258
259
|
};
|
|
259
|
-
exports.ALERT_SIZES = ALERT_SIZES;
|
|
260
|
+
exports.ALERT_SIZES = ALERT_SIZES;
|
|
261
|
+
|
|
262
|
+
module.exports = {
|
|
263
|
+
RECIPIENT_PARTICIPANTS,
|
|
264
|
+
OTHER_ENTITY_PARTICIPANTS,
|
|
265
|
+
ALL_PARTICIPANTS,
|
|
266
|
+
TOPICS,
|
|
267
|
+
REASONS,
|
|
268
|
+
REPORT_STATUSES,
|
|
269
|
+
TRAINING_REPORT_STATUSES,
|
|
270
|
+
TRAINING_REPORT_STATUSES_URL_PARAMS,
|
|
271
|
+
EVENT_REPORT_STATUSES,
|
|
272
|
+
TARGET_POPULATIONS,
|
|
273
|
+
EVENT_TARGET_POPULATIONS,
|
|
274
|
+
USER_ROLES,
|
|
275
|
+
CLOSE_SUSPEND_REASONS,
|
|
276
|
+
GOAL_CLOSE_REASONS,
|
|
277
|
+
GOAL_SUSPEND_REASONS,
|
|
278
|
+
GOAL_SOURCES,
|
|
279
|
+
APPROVER_STATUSES,
|
|
280
|
+
SCOPE_IDS,
|
|
281
|
+
DECIMAL_BASE,
|
|
282
|
+
ALERT_STATUSES,
|
|
283
|
+
ALERT_VARIANTS,
|
|
284
|
+
ALERT_SIZES,
|
|
285
|
+
};
|