hvp-shared 6.36.0 → 6.37.0

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.
@@ -11,3 +11,5 @@ export * from './qvet-catalog';
11
11
  export * from './qvet-warehouses';
12
12
  export * from './qvet-inventory';
13
13
  export * from './background-job.constants';
14
+ export * from './job-category.constants';
15
+ export * from './special-collaborators.constants';
@@ -27,3 +27,5 @@ __exportStar(require("./qvet-catalog"), exports);
27
27
  __exportStar(require("./qvet-warehouses"), exports);
28
28
  __exportStar(require("./qvet-inventory"), exports);
29
29
  __exportStar(require("./background-job.constants"), exports);
30
+ __exportStar(require("./job-category.constants"), exports);
31
+ __exportStar(require("./special-collaborators.constants"), exports);
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Job Category Constants
3
+ *
4
+ * Enum and groupings for classifying jobs by function.
5
+ * Used by shift validations and business rules instead of comparing job titles.
6
+ *
7
+ * @example
8
+ * // Check if a job is veterinary staff
9
+ * VET_CATEGORIES.includes(job.category)
10
+ */
11
+ /**
12
+ * Functional category for a job position.
13
+ *
14
+ * Decouples business logic from job titles so titles can be renamed
15
+ * without breaking shift validations or other rules.
16
+ */
17
+ export declare enum JobCategory {
18
+ MEDICAL_DIRECTOR = "MEDICAL_DIRECTOR",
19
+ VET = "VET",
20
+ VET_ASSISTANT = "VET_ASSISTANT",
21
+ TRAINEE = "TRAINEE",
22
+ RECEPTIONIST = "RECEPTIONIST",
23
+ ADMIN = "ADMIN",
24
+ ADVISOR = "ADVISOR"
25
+ }
26
+ /**
27
+ * Jobs that count as veterinarians for shift coverage rules.
28
+ * Includes directors and full vets.
29
+ */
30
+ export declare const VET_CATEGORIES: readonly JobCategory[];
31
+ /**
32
+ * All medical/clinical staff — vets + assistants + trainees.
33
+ * Used for total clinical headcount validations.
34
+ */
35
+ export declare const ALL_MEDICAL_CATEGORIES: readonly JobCategory[];
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ /**
3
+ * Job Category Constants
4
+ *
5
+ * Enum and groupings for classifying jobs by function.
6
+ * Used by shift validations and business rules instead of comparing job titles.
7
+ *
8
+ * @example
9
+ * // Check if a job is veterinary staff
10
+ * VET_CATEGORIES.includes(job.category)
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.ALL_MEDICAL_CATEGORIES = exports.VET_CATEGORIES = exports.JobCategory = void 0;
14
+ /**
15
+ * Functional category for a job position.
16
+ *
17
+ * Decouples business logic from job titles so titles can be renamed
18
+ * without breaking shift validations or other rules.
19
+ */
20
+ var JobCategory;
21
+ (function (JobCategory) {
22
+ JobCategory["MEDICAL_DIRECTOR"] = "MEDICAL_DIRECTOR";
23
+ JobCategory["VET"] = "VET";
24
+ JobCategory["VET_ASSISTANT"] = "VET_ASSISTANT";
25
+ JobCategory["TRAINEE"] = "TRAINEE";
26
+ JobCategory["RECEPTIONIST"] = "RECEPTIONIST";
27
+ JobCategory["ADMIN"] = "ADMIN";
28
+ JobCategory["ADVISOR"] = "ADVISOR";
29
+ })(JobCategory || (exports.JobCategory = JobCategory = {}));
30
+ /**
31
+ * Jobs that count as veterinarians for shift coverage rules.
32
+ * Includes directors and full vets.
33
+ */
34
+ exports.VET_CATEGORIES = [
35
+ JobCategory.MEDICAL_DIRECTOR,
36
+ JobCategory.VET,
37
+ ];
38
+ /**
39
+ * All medical/clinical staff — vets + assistants + trainees.
40
+ * Used for total clinical headcount validations.
41
+ */
42
+ exports.ALL_MEDICAL_CATEGORIES = [
43
+ ...exports.VET_CATEGORIES,
44
+ JobCategory.VET_ASSISTANT,
45
+ JobCategory.TRAINEE,
46
+ ];
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Special Collaborator Constants
3
+ *
4
+ * Codes for collaborators that have special shift validation rules.
5
+ * Replaces hardcoded "MAT" / "RGL" strings in frontend helpers.
6
+ */
7
+ /**
8
+ * Collaborator codes that are exempt from certain shift coverage rules
9
+ * (e.g., they may work supervised shifts without full vet coverage).
10
+ */
11
+ export declare const SUPERVISED_COLLABORATOR_CODES: readonly ["MAT", "RGL"];
12
+ export type SupervisedCollaboratorCode = (typeof SUPERVISED_COLLABORATOR_CODES)[number];
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * Special Collaborator Constants
4
+ *
5
+ * Codes for collaborators that have special shift validation rules.
6
+ * Replaces hardcoded "MAT" / "RGL" strings in frontend helpers.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.SUPERVISED_COLLABORATOR_CODES = void 0;
10
+ /**
11
+ * Collaborator codes that are exempt from certain shift coverage rules
12
+ * (e.g., they may work supervised shifts without full vet coverage).
13
+ */
14
+ exports.SUPERVISED_COLLABORATOR_CODES = ["MAT", "RGL"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "6.36.0",
3
+ "version": "6.37.0",
4
4
  "description": "Shared types and utilities for HVP backend and frontend",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",