@careflair/common 1.0.21 → 1.0.22

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.
@@ -6,3 +6,4 @@ export * from "./enum";
6
6
  export * from "./video";
7
7
  export * from "./onboarding";
8
8
  export * from "./html";
9
+ export * from "./labels";
@@ -30,3 +30,5 @@ __exportStar(require("./video"), exports);
30
30
  __exportStar(require("./onboarding"), exports);
31
31
  // HTML sanitization utilities
32
32
  __exportStar(require("./html"), exports);
33
+ // Label helper utilities
34
+ __exportStar(require("./labels"), exports);
@@ -0,0 +1,4 @@
1
+ export declare const getSupportWorkerServiceLabel: (service: string) => string;
2
+ export declare const getGenderLabel: (gender: string) => string;
3
+ export declare const getPreferencesLabel: (preference: string) => string;
4
+ export declare const getAltCommunicationLabel: (altCommunication: string) => string;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAltCommunicationLabel = exports.getPreferencesLabel = exports.getGenderLabel = exports.getSupportWorkerServiceLabel = void 0;
4
+ const constants_1 = require("../constants");
5
+ const enums_1 = require("../enums");
6
+ const getSupportWorkerServiceLabel = (service) => {
7
+ return (constants_1.SupportWorkerServiceLabels[service] || service);
8
+ };
9
+ exports.getSupportWorkerServiceLabel = getSupportWorkerServiceLabel;
10
+ const getGenderLabel = (gender) => {
11
+ return (enums_1.GenderOfAttendanceEnum[gender] ||
12
+ gender);
13
+ };
14
+ exports.getGenderLabel = getGenderLabel;
15
+ const getPreferencesLabel = (preference) => {
16
+ const preferences = {
17
+ SOLE_TRADER: 'Sole Trader',
18
+ ORGANISATION: 'Organisation',
19
+ ORGANIZATION: 'Organization',
20
+ NDIS_REGISTERED: 'NDIS Registered',
21
+ RATE_NEGOTIABLE: 'Rate Negotiable',
22
+ };
23
+ return preferences[preference] || preference;
24
+ };
25
+ exports.getPreferencesLabel = getPreferencesLabel;
26
+ const getAltCommunicationLabel = (altCommunication) => {
27
+ return (constants_1.altCommunicationLabels[altCommunication] || altCommunication);
28
+ };
29
+ exports.getAltCommunicationLabel = getAltCommunicationLabel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@careflair/common",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Shared assets for CareFlair",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",