@forwardslashns/taskit-validation-messages 1.10.81 → 1.10.82

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.
@@ -65,10 +65,5 @@ export declare const CLIENT_TEMPLATE_ASSIGNMENTS: {
65
65
  message: string;
66
66
  affectedFields: string[];
67
67
  };
68
- FINAL_ASSIGNMENT_CANNOT_BE_MODIFIED: {
69
- severity: "error";
70
- message: string;
71
- affectedFields: string[];
72
- };
73
68
  };
74
69
  //# sourceMappingURL=client-template-assignments.validation-messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-template-assignments.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/client-template-assignments.validation-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEtC,CAAC"}
1
+ {"version":3,"file":"client-template-assignments.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/client-template-assignments.validation-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEtC,CAAC"}
@@ -69,9 +69,4 @@ exports.CLIENT_TEMPLATE_ASSIGNMENTS = (0, validation_message_types_1.defineValid
69
69
  message: "Default staff cannot be set when the assignment type is 'To do'",
70
70
  affectedFields: ['assignments.defaultStaffId'],
71
71
  },
72
- FINAL_ASSIGNMENT_CANNOT_BE_MODIFIED: {
73
- severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
74
- message: "The 'Final' assignment cannot be modified.",
75
- affectedFields: ['assignments'],
76
- },
77
72
  });
@@ -163,6 +163,11 @@ export declare const TASKS: {
163
163
  message: string;
164
164
  affectedFields: string[];
165
165
  };
166
+ TEMPLATE_ID_REQUIRED: {
167
+ severity: "error";
168
+ message: string;
169
+ affectedFields: string[];
170
+ };
166
171
  ASSIGNED_STAFF_NOT_FOUND: {
167
172
  severity: "error";
168
173
  message: string;
@@ -190,7 +195,12 @@ export declare const TASKS: {
190
195
  message: string;
191
196
  affectedFields: never[];
192
197
  };
193
- CANNOT_MODIFY_FINAL_ASSIGNMENT: {
198
+ TEMPLATE_NOT_ELIGIBLE_FOR_TASK_FROM_TEMPLATE: {
199
+ severity: "error";
200
+ message: string;
201
+ affectedFields: string[];
202
+ };
203
+ TEMPLATE_ENTITY_TYPE_MISMATCH: {
194
204
  severity: "error";
195
205
  message: string;
196
206
  params: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"tasks.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/tasks.validation-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiNhB,CAAC"}
1
+ {"version":3,"file":"tasks.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/tasks.validation-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6NhB,CAAC"}
@@ -167,6 +167,11 @@ exports.TASKS = (0, validation_message_types_1.defineValidationFeatureMessages)(
167
167
  message: 'Due date is required.',
168
168
  affectedFields: ['dueDate'],
169
169
  },
170
+ TEMPLATE_ID_REQUIRED: {
171
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
172
+ message: 'Template is required.',
173
+ affectedFields: ['templateId'],
174
+ },
170
175
  ASSIGNED_STAFF_NOT_FOUND: {
171
176
  severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
172
177
  message: 'Staff member {staffId} does not exist.',
@@ -194,10 +199,15 @@ exports.TASKS = (0, validation_message_types_1.defineValidationFeatureMessages)(
194
199
  message: 'Assignments cannot be re-imported once this task has been closed.',
195
200
  affectedFields: [],
196
201
  },
197
- CANNOT_MODIFY_FINAL_ASSIGNMENT: {
202
+ TEMPLATE_NOT_ELIGIBLE_FOR_TASK_FROM_TEMPLATE: {
203
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
204
+ message: 'Selected template is not available for creating a task from template. Please choose a different template.',
205
+ affectedFields: ['templateId'],
206
+ },
207
+ TEMPLATE_ENTITY_TYPE_MISMATCH: {
198
208
  severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
199
- message: 'Assignment "{assignmentName}" is final and cannot be modified.',
200
- params: ['assignmentName'],
201
- affectedFields: ['assignments'],
209
+ message: "This template applies to {templateEntityTypes}, and the client's entity type is {clientEntityType}. Please select a different template.",
210
+ params: ['templateEntityTypes', 'clientEntityType'],
211
+ affectedFields: ['templateId'],
202
212
  },
203
213
  });
@@ -115,10 +115,5 @@ export declare const TEMPLATE_ASSIGNMENTS: {
115
115
  message: string;
116
116
  affectedFields: string[];
117
117
  };
118
- FINAL_ASSIGNMENT_CANNOT_BE_MODIFIED: {
119
- severity: "error";
120
- message: string;
121
- affectedFields: string[];
122
- };
123
118
  };
124
119
  //# sourceMappingURL=template-assignments.validation-messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"template-assignments.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/template-assignments.validation-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2H/B,CAAC"}
1
+ {"version":3,"file":"template-assignments.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/template-assignments.validation-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsH/B,CAAC"}
@@ -119,9 +119,4 @@ exports.TEMPLATE_ASSIGNMENTS = (0, validation_message_types_1.defineValidationFe
119
119
  message: "An assignment named 'Final' must be marked as final.",
120
120
  affectedFields: ['name', 'isFinal'],
121
121
  },
122
- FINAL_ASSIGNMENT_CANNOT_BE_MODIFIED: {
123
- severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
124
- message: "The 'Final' assignment cannot be modified.",
125
- affectedFields: ['assignments'],
126
- },
127
122
  });
@@ -1808,11 +1808,6 @@ export declare const VALIDATION_MESSAGES: {
1808
1808
  message: string;
1809
1809
  affectedFields: string[];
1810
1810
  };
1811
- FINAL_ASSIGNMENT_CANNOT_BE_MODIFIED: {
1812
- severity: "error";
1813
- message: string;
1814
- affectedFields: string[];
1815
- };
1816
1811
  };
1817
1812
  readonly TEMPLATE_STATES: {
1818
1813
  TEMPLATE_STATE_NOT_FOUND: {
@@ -2434,11 +2429,6 @@ export declare const VALIDATION_MESSAGES: {
2434
2429
  message: string;
2435
2430
  affectedFields: string[];
2436
2431
  };
2437
- FINAL_ASSIGNMENT_CANNOT_BE_MODIFIED: {
2438
- severity: "error";
2439
- message: string;
2440
- affectedFields: string[];
2441
- };
2442
2432
  };
2443
2433
  readonly TASKS: {
2444
2434
  NOT_FOUND: {
@@ -2605,6 +2595,11 @@ export declare const VALIDATION_MESSAGES: {
2605
2595
  message: string;
2606
2596
  affectedFields: string[];
2607
2597
  };
2598
+ TEMPLATE_ID_REQUIRED: {
2599
+ severity: "error";
2600
+ message: string;
2601
+ affectedFields: string[];
2602
+ };
2608
2603
  ASSIGNED_STAFF_NOT_FOUND: {
2609
2604
  severity: "error";
2610
2605
  message: string;
@@ -2632,7 +2627,12 @@ export declare const VALIDATION_MESSAGES: {
2632
2627
  message: string;
2633
2628
  affectedFields: never[];
2634
2629
  };
2635
- CANNOT_MODIFY_FINAL_ASSIGNMENT: {
2630
+ TEMPLATE_NOT_ELIGIBLE_FOR_TASK_FROM_TEMPLATE: {
2631
+ severity: "error";
2632
+ message: string;
2633
+ affectedFields: string[];
2634
+ };
2635
+ TEMPLATE_ENTITY_TYPE_MISMATCH: {
2636
2636
  severity: "error";
2637
2637
  message: string;
2638
2638
  params: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardslashns/taskit-validation-messages",
3
- "version": "1.10.81",
3
+ "version": "1.10.82",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "commonjs",
@@ -67,9 +67,4 @@ export const CLIENT_TEMPLATE_ASSIGNMENTS = defineValidationFeatureMessages({
67
67
  message: "Default staff cannot be set when the assignment type is 'To do'",
68
68
  affectedFields: ['assignments.defaultStaffId'],
69
69
  },
70
- FINAL_ASSIGNMENT_CANNOT_BE_MODIFIED: {
71
- severity: VALIDATION_SEVERITY.ERROR,
72
- message: "The 'Final' assignment cannot be modified.",
73
- affectedFields: ['assignments'],
74
- },
75
70
  });
@@ -176,6 +176,11 @@ export const TASKS = defineValidationFeatureMessages({
176
176
  message: 'Due date is required.',
177
177
  affectedFields: ['dueDate'],
178
178
  },
179
+ TEMPLATE_ID_REQUIRED: {
180
+ severity: VALIDATION_SEVERITY.ERROR,
181
+ message: 'Template is required.',
182
+ affectedFields: ['templateId'],
183
+ },
179
184
  ASSIGNED_STAFF_NOT_FOUND: {
180
185
  severity: VALIDATION_SEVERITY.ERROR,
181
186
  message: 'Staff member {staffId} does not exist.',
@@ -203,10 +208,17 @@ export const TASKS = defineValidationFeatureMessages({
203
208
  message: 'Assignments cannot be re-imported once this task has been closed.',
204
209
  affectedFields: [],
205
210
  },
206
- CANNOT_MODIFY_FINAL_ASSIGNMENT: {
211
+ TEMPLATE_NOT_ELIGIBLE_FOR_TASK_FROM_TEMPLATE: {
212
+ severity: VALIDATION_SEVERITY.ERROR,
213
+ message:
214
+ 'Selected template is not available for creating a task from template. Please choose a different template.',
215
+ affectedFields: ['templateId'],
216
+ },
217
+ TEMPLATE_ENTITY_TYPE_MISMATCH: {
207
218
  severity: VALIDATION_SEVERITY.ERROR,
208
- message: 'Assignment "{assignmentName}" is final and cannot be modified.',
209
- params: ['assignmentName'],
210
- affectedFields: ['assignments'],
219
+ message:
220
+ "This template applies to {templateEntityTypes}, and the client's entity type is {clientEntityType}. Please select a different template.",
221
+ params: ['templateEntityTypes', 'clientEntityType'],
222
+ affectedFields: ['templateId'],
211
223
  },
212
224
  });
@@ -118,9 +118,4 @@ export const TEMPLATE_ASSIGNMENTS = defineValidationFeatureMessages({
118
118
  message: "An assignment named 'Final' must be marked as final.",
119
119
  affectedFields: ['name', 'isFinal'],
120
120
  },
121
- FINAL_ASSIGNMENT_CANNOT_BE_MODIFIED: {
122
- severity: VALIDATION_SEVERITY.ERROR,
123
- message: "The 'Final' assignment cannot be modified.",
124
- affectedFields: ['assignments'],
125
- },
126
121
  });