@ttahub/common 2.1.2 → 2.1.3

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 CHANGED
@@ -21,9 +21,6 @@ Note: On Windows you will need to use `yarn add @ttahub/common@1.x.0` to update
21
21
 
22
22
  ## Versions
23
23
 
24
- ## 2.0.19
25
- Add "escapeHTML" function
26
-
27
24
  ## 1.4.0
28
25
  Add SUPPORT_TYPE
29
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttahub/common",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "The purpose of this package is to reduce code duplication between the frontend and backend projects.",
5
5
  "main": "src/index.js",
6
6
  "author": "",
package/src/constants.js CHANGED
@@ -311,7 +311,7 @@ const GOAL_STATUS = {
311
311
 
312
312
  exports.GOAL_STATUS = GOAL_STATUS;
313
313
 
314
- const SUPPORT_TYPES = [
314
+ const SUPPORT_TYPES = [
315
315
  'Introducing',
316
316
  'Planning',
317
317
  'Implementing',
@@ -333,3 +333,34 @@ const GROUP_SHARED_WITH = {
333
333
  };
334
334
 
335
335
  exports.GROUP_SHARED_WITH = GROUP_SHARED_WITH;
336
+
337
+ /**
338
+ * A list of reasons that a CLOSED goal can be reopened.
339
+ */
340
+ const REOPEN_CLOSED_REASONS = {
341
+ ACCIDENTALLY_CLOSED: 'Accidentally closed',
342
+ RECIPIENT_REQUEST: 'Recipient request to restart the work',
343
+ PS_REQUEST: 'PS request to restart the work',
344
+ NEW_RECIPIENT_STAFF_REQUEST: 'New recipient staff request similar work',
345
+ };
346
+
347
+ /**
348
+ * A list of reasons that a SUSPENDED goal can be reopened.
349
+ */
350
+ const REOPEN_SUSPENDED_REASONS = {};
351
+
352
+ /**
353
+ * REOPEN_REASONS is a map of FROM status to an array of
354
+ * possible TO statuses.
355
+ */
356
+ const REOPEN_REASONS = {
357
+ [GOAL_STATUS.CLOSED]: REOPEN_CLOSED_REASONS,
358
+ [GOAL_STATUS.SUSPENDED]: REOPEN_SUSPENDED_REASONS,
359
+
360
+ INFERRED: {
361
+ OBJECTIVE_REOPEN: 'Objective Reopen',
362
+ IMPORTED_FROM_SMARTSHEET: 'Imported from Smartsheet',
363
+ },
364
+ };
365
+
366
+ exports.REOPEN_REASONS = REOPEN_REASONS;
package/src/utils.js CHANGED
@@ -31,5 +31,5 @@ function determineMergeGoalStatus(statuses) {
31
31
  }
32
32
 
33
33
  module.exports = {
34
- determineMergeGoalStatus,
34
+ determineMergeGoalStatus
35
35
  }