heartraite 1.0.49 → 1.0.51

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.
@@ -5,8 +5,8 @@ export declare enum CASkipReason {
5
5
  OTHER_REASON = "other_reason"
6
6
  }
7
7
  export declare enum CAStatus {
8
- NOT_STARTED = "not started",
9
- IN_PROGRESS = "in progress",
8
+ NOT_STARTED = "not_started",
9
+ IN_PROGRESS = "in_progress",
10
10
  ERROR = "error",
11
11
  SUCCESS = "success"
12
12
  }
@@ -10,8 +10,8 @@ var CASkipReason;
10
10
  })(CASkipReason || (exports.CASkipReason = CASkipReason = {}));
11
11
  var CAStatus;
12
12
  (function (CAStatus) {
13
- CAStatus["NOT_STARTED"] = "not started";
14
- CAStatus["IN_PROGRESS"] = "in progress";
13
+ CAStatus["NOT_STARTED"] = "not_started";
14
+ CAStatus["IN_PROGRESS"] = "in_progress";
15
15
  CAStatus["ERROR"] = "error";
16
16
  CAStatus["SUCCESS"] = "success";
17
17
  })(CAStatus || (exports.CAStatus = CAStatus = {}));
@@ -1,4 +1,5 @@
1
- import { CASkipReason, Gender, PLSAgeInterval, PLSRelationshipDuration, PLSRelationshipStatus } from "../enum";
1
+ import { CASkipReason, FeedbackAgreement, Gender, PLSAgeInterval, PLSRelationshipDuration, PLSRelationshipStatus } from "../enum";
2
+ export declare const translateFeedbackAgreement: (agreement: FeedbackAgreement) => string;
2
3
  export declare const translateCASkipReason: (reason: CASkipReason) => string;
3
4
  export declare function translateGender(gender: Gender): string;
4
5
  export declare function translateAgeInterval(ageInterval: PLSAgeInterval): string;
@@ -1,11 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.translateCASkipReason = void 0;
3
+ exports.translateCASkipReason = exports.translateFeedbackAgreement = void 0;
4
4
  exports.translateGender = translateGender;
5
5
  exports.translateAgeInterval = translateAgeInterval;
6
6
  exports.translateRelationshipDuration = translateRelationshipDuration;
7
7
  exports.translateRelationshipStatus = translateRelationshipStatus;
8
8
  const enum_1 = require("../enum");
9
+ const translateFeedbackAgreement = (agreement) => {
10
+ switch (agreement) {
11
+ case enum_1.FeedbackAgreement.YES:
12
+ return "Ja";
13
+ case enum_1.FeedbackAgreement.NO:
14
+ return "Nej";
15
+ case enum_1.FeedbackAgreement.PARTIAL:
16
+ return "Delvis";
17
+ default:
18
+ return "Ogiltigt avtal";
19
+ }
20
+ };
21
+ exports.translateFeedbackAgreement = translateFeedbackAgreement;
9
22
  const translateCASkipReason = (reason) => {
10
23
  switch (reason) {
11
24
  case enum_1.CASkipReason.NOT_RELEVANT:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -6,8 +6,8 @@ export enum CASkipReason {
6
6
  }
7
7
 
8
8
  export enum CAStatus {
9
- NOT_STARTED = "not started",
10
- IN_PROGRESS = "in progress",
9
+ NOT_STARTED = "not_started",
10
+ IN_PROGRESS = "in_progress",
11
11
  ERROR = "error",
12
12
  SUCCESS = "success",
13
13
  }
@@ -1,11 +1,27 @@
1
1
  import {
2
2
  CASkipReason,
3
+ FeedbackAgreement,
3
4
  Gender,
4
5
  PLSAgeInterval,
5
6
  PLSRelationshipDuration,
6
7
  PLSRelationshipStatus,
7
8
  } from "../enum";
8
9
 
10
+ export const translateFeedbackAgreement = (
11
+ agreement: FeedbackAgreement
12
+ ): string => {
13
+ switch (agreement) {
14
+ case FeedbackAgreement.YES:
15
+ return "Ja";
16
+ case FeedbackAgreement.NO:
17
+ return "Nej";
18
+ case FeedbackAgreement.PARTIAL:
19
+ return "Delvis";
20
+ default:
21
+ return "Ogiltigt avtal";
22
+ }
23
+ };
24
+
9
25
  export const translateCASkipReason = (reason: CASkipReason): string => {
10
26
  switch (reason) {
11
27
  case CASkipReason.NOT_RELEVANT: