@forwardslashns/taskit-validation-messages 1.10.38 → 1.10.40

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.
@@ -0,0 +1,69 @@
1
+ export declare const CLIENT_TEMPLATE_ASSIGNMENTS: {
2
+ NAME_ALREADY_EXISTS_ON_CLIENT_TEMPLATE: {
3
+ severity: "error";
4
+ message: string;
5
+ affectedFields: string[];
6
+ };
7
+ CUSTOM_ASSIGNMENT_NOT_ALLOWED_FOR_TEMPLATE_TYPE: {
8
+ severity: "error";
9
+ message: string;
10
+ affectedFields: string[];
11
+ };
12
+ INHERITED_ASSIGNMENT_REFERENCE_REQUIRED: {
13
+ severity: "error";
14
+ message: string;
15
+ affectedFields: string[];
16
+ };
17
+ INHERITED_ASSIGNMENT_REFERENCE_INVALID: {
18
+ severity: "error";
19
+ message: string;
20
+ affectedFields: string[];
21
+ };
22
+ ORDER_NOT_CONSECUTIVE: {
23
+ severity: "error";
24
+ message: string;
25
+ params: string[];
26
+ affectedFields: string[];
27
+ };
28
+ INHERITED_ORDER_LOCKED: {
29
+ severity: "error";
30
+ message: string;
31
+ affectedFields: string[];
32
+ };
33
+ DELETE_BLOCKED_BY_GENERATED_TASKS: {
34
+ severity: "error";
35
+ message: string;
36
+ affectedFields: string[];
37
+ };
38
+ DELETE_BLOCKED_NOT_DELETABLE: {
39
+ severity: "error";
40
+ message: string;
41
+ affectedFields: string[];
42
+ };
43
+ ASSIGNMENT_NOT_FOUND: {
44
+ severity: "error";
45
+ message: string;
46
+ affectedFields: string[];
47
+ };
48
+ INVALID_STAFF: {
49
+ severity: "error";
50
+ message: string;
51
+ affectedFields: string[];
52
+ };
53
+ INVALID_ASSIGNMENT_TYPE: {
54
+ severity: "error";
55
+ message: string;
56
+ affectedFields: string[];
57
+ };
58
+ DEFAULT_STAFF_REQUIRED: {
59
+ severity: "error";
60
+ message: string;
61
+ affectedFields: string[];
62
+ };
63
+ DEFAULT_STAFF_NOT_ALLOWED_FOR_TODO: {
64
+ severity: "error";
65
+ message: string;
66
+ affectedFields: string[];
67
+ };
68
+ };
69
+ //# sourceMappingURL=client-template-assignments.validation-messages.d.ts.map
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEtC,CAAC"}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CLIENT_TEMPLATE_ASSIGNMENTS = void 0;
4
+ const validation_message_types_1 = require("../validation-message.types");
5
+ exports.CLIENT_TEMPLATE_ASSIGNMENTS = (0, validation_message_types_1.defineValidationFeatureMessages)({
6
+ NAME_ALREADY_EXISTS_ON_CLIENT_TEMPLATE: {
7
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
8
+ message: 'This name is already in use on this client template. Please enter a different name',
9
+ affectedFields: ['assignments.name'],
10
+ },
11
+ CUSTOM_ASSIGNMENT_NOT_ALLOWED_FOR_TEMPLATE_TYPE: {
12
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
13
+ message: 'Custom assignments are not allowed for this template type',
14
+ affectedFields: ['assignments'],
15
+ },
16
+ INHERITED_ASSIGNMENT_REFERENCE_REQUIRED: {
17
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
18
+ message: 'Inherited assignment must reference a valid template assignment',
19
+ affectedFields: ['assignments.templateAssignmentId'],
20
+ },
21
+ INHERITED_ASSIGNMENT_REFERENCE_INVALID: {
22
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
23
+ message: 'Referenced template assignment does not exist or does not belong to the template',
24
+ affectedFields: ['assignments.templateAssignmentId'],
25
+ },
26
+ ORDER_NOT_CONSECUTIVE: {
27
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
28
+ message: 'Assignment orders must be consecutive starting from 1. Expected orders: {expected}',
29
+ params: ['expected'],
30
+ affectedFields: ['assignments.order'],
31
+ },
32
+ INHERITED_ORDER_LOCKED: {
33
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
34
+ message: 'Inherited assignments cannot be reordered relative to each other',
35
+ affectedFields: ['assignments.order'],
36
+ },
37
+ DELETE_BLOCKED_BY_GENERATED_TASKS: {
38
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
39
+ message: 'This assignment cannot be deleted because it has generated tasks',
40
+ affectedFields: ['assignments'],
41
+ },
42
+ DELETE_BLOCKED_NOT_DELETABLE: {
43
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
44
+ message: 'This assignment is marked as not deletable',
45
+ affectedFields: ['assignments'],
46
+ },
47
+ ASSIGNMENT_NOT_FOUND: {
48
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
49
+ message: 'Assignment not found on this client template',
50
+ affectedFields: ['assignments.id'],
51
+ },
52
+ INVALID_STAFF: {
53
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
54
+ message: 'Invalid staff member',
55
+ affectedFields: ['assignments.defaultStaffId'],
56
+ },
57
+ INVALID_ASSIGNMENT_TYPE: {
58
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
59
+ message: 'Invalid assignment type',
60
+ affectedFields: ['assignments.assignmentTypeId'],
61
+ },
62
+ DEFAULT_STAFF_REQUIRED: {
63
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
64
+ message: 'Default staff is required',
65
+ affectedFields: ['assignments.defaultStaffId'],
66
+ },
67
+ DEFAULT_STAFF_NOT_ALLOWED_FOR_TODO: {
68
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
69
+ message: "Default staff cannot be set when the assignment type is 'To do'",
70
+ affectedFields: ['assignments.defaultStaffId'],
71
+ },
72
+ });
@@ -251,6 +251,59 @@ export declare const TEMPLATE_INFORMATION: {
251
251
  params: string[];
252
252
  affectedFields: string[];
253
253
  };
254
+ MAIN_FILING_REQUIRED: {
255
+ severity: "error";
256
+ message: string;
257
+ affectedFields: string[];
258
+ };
259
+ INVALID_MAIN_FILING: {
260
+ severity: "error";
261
+ message: string;
262
+ affectedFields: string[];
263
+ };
264
+ MAIN_FILING_MUST_BE_FILING_TYPE: {
265
+ severity: "error";
266
+ message: string;
267
+ affectedFields: string[];
268
+ };
269
+ MAIN_FILING_MUST_BE_INCOME_TAX: {
270
+ severity: "error";
271
+ message: string;
272
+ params: string[];
273
+ affectedFields: string[];
274
+ };
275
+ MAIN_FILING_MUST_FILE_SEPARATELY: {
276
+ severity: "error";
277
+ message: string;
278
+ params: string[];
279
+ affectedFields: string[];
280
+ };
281
+ MAIN_FILING_MUST_HAVE_ANNUAL_RECURRENCE: {
282
+ severity: "error";
283
+ message: string;
284
+ params: string[];
285
+ affectedFields: string[];
286
+ };
287
+ INVALID_TAX_PAYMENT_FILING_STATE: {
288
+ severity: "error";
289
+ message: string;
290
+ affectedFields: string[];
291
+ };
292
+ TAX_PAYMENT_FILING_STATE_DOES_NOT_BELONG_TO_FILING: {
293
+ severity: "error";
294
+ message: string;
295
+ affectedFields: string[];
296
+ };
297
+ TAX_PAYMENT_FILING_STATE_NOT_ALLOWED_WITH_SUB_ENTITY: {
298
+ severity: "error";
299
+ message: string;
300
+ affectedFields: string[];
301
+ };
302
+ TAX_PAYMENT_FILING_MUST_BE_SUB_ENTITY_OF_MAIN: {
303
+ severity: "error";
304
+ message: string;
305
+ affectedFields: string[];
306
+ };
254
307
  SETUP_TEMPLATE_MUST_BE_SETUP_TYPE: {
255
308
  severity: "error";
256
309
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"template-information.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/template-information.validation-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6R/B,CAAC"}
1
+ {"version":3,"file":"template-information.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/template-information.validation-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqV/B,CAAC"}
@@ -255,6 +255,59 @@ exports.TEMPLATE_INFORMATION = (0, validation_message_types_1.defineValidationFe
255
255
  params: ['FilingTemplateName', 'FilingTemplateAssociatedEntities'],
256
256
  affectedFields: ['taxPaymentFiling'],
257
257
  },
258
+ MAIN_FILING_REQUIRED: {
259
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
260
+ message: 'Main filing is required for tax payment templates',
261
+ affectedFields: ['taxPaymentFiling'],
262
+ },
263
+ INVALID_MAIN_FILING: {
264
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
265
+ message: 'The selected main filing does not exist',
266
+ affectedFields: ['taxPaymentFiling'],
267
+ },
268
+ MAIN_FILING_MUST_BE_FILING_TYPE: {
269
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
270
+ message: 'The selected main filing must be a Filing type template',
271
+ affectedFields: ['taxPaymentFiling'],
272
+ },
273
+ MAIN_FILING_MUST_BE_INCOME_TAX: {
274
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
275
+ message: 'A main filing must be an income tax filing. {MainFilingName} is set to {MainFilingFilingType}. Please select a filing template with filing type set to income tax.',
276
+ params: ['MainFilingName', 'MainFilingFilingType'],
277
+ affectedFields: ['taxPaymentFiling'],
278
+ },
279
+ MAIN_FILING_MUST_FILE_SEPARATELY: {
280
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
281
+ message: "Tax payments can only be associated with filings that file separately. {MainFilingName} is set as 'Filing under parent'. Please select a different filing template.",
282
+ params: ['MainFilingName'],
283
+ affectedFields: ['taxPaymentFiling'],
284
+ },
285
+ MAIN_FILING_MUST_HAVE_ANNUAL_RECURRENCE: {
286
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
287
+ message: 'Tax payments can only be associated with filings on an annual recurrence. {MainFilingName} is not set to recur annually. Please add an annual recurrence to {MainFilingName}, or select a different filing template.',
288
+ params: ['MainFilingName'],
289
+ affectedFields: ['taxPaymentFiling'],
290
+ },
291
+ INVALID_TAX_PAYMENT_FILING_STATE: {
292
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
293
+ message: 'The selected tax payment filing state does not exist',
294
+ affectedFields: ['taxPaymentFiling'],
295
+ },
296
+ TAX_PAYMENT_FILING_STATE_DOES_NOT_BELONG_TO_FILING: {
297
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
298
+ message: 'The selected tax payment filing state does not belong to the selected filing template',
299
+ affectedFields: ['taxPaymentFiling'],
300
+ },
301
+ TAX_PAYMENT_FILING_STATE_NOT_ALLOWED_WITH_SUB_ENTITY: {
302
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
303
+ message: 'A state filing option cannot be selected when a sub-entity filing is chosen',
304
+ affectedFields: ['taxPaymentFiling'],
305
+ },
306
+ TAX_PAYMENT_FILING_MUST_BE_SUB_ENTITY_OF_MAIN: {
307
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
308
+ message: 'The selected tax payment filing must be the main filing or a sub-entity filing of the main filing',
309
+ affectedFields: ['taxPaymentFiling'],
310
+ },
258
311
  SETUP_TEMPLATE_MUST_BE_SETUP_TYPE: {
259
312
  severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
260
313
  message: 'The selected associated setup template must be a Setup type template',
@@ -1555,6 +1555,59 @@ export declare const VALIDATION_MESSAGES: {
1555
1555
  params: string[];
1556
1556
  affectedFields: string[];
1557
1557
  };
1558
+ MAIN_FILING_REQUIRED: {
1559
+ severity: "error";
1560
+ message: string;
1561
+ affectedFields: string[];
1562
+ };
1563
+ INVALID_MAIN_FILING: {
1564
+ severity: "error";
1565
+ message: string;
1566
+ affectedFields: string[];
1567
+ };
1568
+ MAIN_FILING_MUST_BE_FILING_TYPE: {
1569
+ severity: "error";
1570
+ message: string;
1571
+ affectedFields: string[];
1572
+ };
1573
+ MAIN_FILING_MUST_BE_INCOME_TAX: {
1574
+ severity: "error";
1575
+ message: string;
1576
+ params: string[];
1577
+ affectedFields: string[];
1578
+ };
1579
+ MAIN_FILING_MUST_FILE_SEPARATELY: {
1580
+ severity: "error";
1581
+ message: string;
1582
+ params: string[];
1583
+ affectedFields: string[];
1584
+ };
1585
+ MAIN_FILING_MUST_HAVE_ANNUAL_RECURRENCE: {
1586
+ severity: "error";
1587
+ message: string;
1588
+ params: string[];
1589
+ affectedFields: string[];
1590
+ };
1591
+ INVALID_TAX_PAYMENT_FILING_STATE: {
1592
+ severity: "error";
1593
+ message: string;
1594
+ affectedFields: string[];
1595
+ };
1596
+ TAX_PAYMENT_FILING_STATE_DOES_NOT_BELONG_TO_FILING: {
1597
+ severity: "error";
1598
+ message: string;
1599
+ affectedFields: string[];
1600
+ };
1601
+ TAX_PAYMENT_FILING_STATE_NOT_ALLOWED_WITH_SUB_ENTITY: {
1602
+ severity: "error";
1603
+ message: string;
1604
+ affectedFields: string[];
1605
+ };
1606
+ TAX_PAYMENT_FILING_MUST_BE_SUB_ENTITY_OF_MAIN: {
1607
+ severity: "error";
1608
+ message: string;
1609
+ affectedFields: string[];
1610
+ };
1558
1611
  SETUP_TEMPLATE_MUST_BE_SETUP_TYPE: {
1559
1612
  severity: "error";
1560
1613
  message: string;
@@ -2029,5 +2082,73 @@ export declare const VALIDATION_MESSAGES: {
2029
2082
  affectedFields: string[];
2030
2083
  };
2031
2084
  };
2085
+ readonly CLIENT_TEMPLATE_ASSIGNMENTS: {
2086
+ NAME_ALREADY_EXISTS_ON_CLIENT_TEMPLATE: {
2087
+ severity: "error";
2088
+ message: string;
2089
+ affectedFields: string[];
2090
+ };
2091
+ CUSTOM_ASSIGNMENT_NOT_ALLOWED_FOR_TEMPLATE_TYPE: {
2092
+ severity: "error";
2093
+ message: string;
2094
+ affectedFields: string[];
2095
+ };
2096
+ INHERITED_ASSIGNMENT_REFERENCE_REQUIRED: {
2097
+ severity: "error";
2098
+ message: string;
2099
+ affectedFields: string[];
2100
+ };
2101
+ INHERITED_ASSIGNMENT_REFERENCE_INVALID: {
2102
+ severity: "error";
2103
+ message: string;
2104
+ affectedFields: string[];
2105
+ };
2106
+ ORDER_NOT_CONSECUTIVE: {
2107
+ severity: "error";
2108
+ message: string;
2109
+ params: string[];
2110
+ affectedFields: string[];
2111
+ };
2112
+ INHERITED_ORDER_LOCKED: {
2113
+ severity: "error";
2114
+ message: string;
2115
+ affectedFields: string[];
2116
+ };
2117
+ DELETE_BLOCKED_BY_GENERATED_TASKS: {
2118
+ severity: "error";
2119
+ message: string;
2120
+ affectedFields: string[];
2121
+ };
2122
+ DELETE_BLOCKED_NOT_DELETABLE: {
2123
+ severity: "error";
2124
+ message: string;
2125
+ affectedFields: string[];
2126
+ };
2127
+ ASSIGNMENT_NOT_FOUND: {
2128
+ severity: "error";
2129
+ message: string;
2130
+ affectedFields: string[];
2131
+ };
2132
+ INVALID_STAFF: {
2133
+ severity: "error";
2134
+ message: string;
2135
+ affectedFields: string[];
2136
+ };
2137
+ INVALID_ASSIGNMENT_TYPE: {
2138
+ severity: "error";
2139
+ message: string;
2140
+ affectedFields: string[];
2141
+ };
2142
+ DEFAULT_STAFF_REQUIRED: {
2143
+ severity: "error";
2144
+ message: string;
2145
+ affectedFields: string[];
2146
+ };
2147
+ DEFAULT_STAFF_NOT_ALLOWED_FOR_TODO: {
2148
+ severity: "error";
2149
+ message: string;
2150
+ affectedFields: string[];
2151
+ };
2152
+ };
2032
2153
  };
2033
2154
  //# sourceMappingURL=validation-messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validation-messages.d.ts","sourceRoot":"","sources":["../../src/validation/validation-messages.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BtB,CAAC"}
@@ -29,6 +29,7 @@ const template_states_validation_messages_1 = require("./features/template-state
29
29
  const income_accounts_validation_messages_1 = require("./features/income-accounts.validation-messages");
30
30
  const template_recurrence_settings_validation_messages_1 = require("./features/template-recurrence-settings.validation-messages");
31
31
  const client_templates_validation_messages_1 = require("./features/client-templates.validation-messages");
32
+ const client_template_assignments_validation_messages_1 = require("./features/client-template-assignments.validation-messages");
32
33
  exports.VALIDATION_MESSAGES = {
33
34
  ACCOUNT_CATEGORIES: account_categories_validation_messages_1.ACCOUNT_CATEGORIES,
34
35
  ACCOUNT_IDS: account_ids_validation_messages_1.ACCOUNT_IDS,
@@ -58,4 +59,5 @@ exports.VALIDATION_MESSAGES = {
58
59
  INCOME_ACCOUNTS: income_accounts_validation_messages_1.INCOME_ACCOUNTS,
59
60
  TEMPLATE_RECURRENCE_SETTINGS: template_recurrence_settings_validation_messages_1.TEMPLATE_RECURRENCE_SETTINGS,
60
61
  CLIENT_TEMPLATES: client_templates_validation_messages_1.CLIENT_TEMPLATES,
62
+ CLIENT_TEMPLATE_ASSIGNMENTS: client_template_assignments_validation_messages_1.CLIENT_TEMPLATE_ASSIGNMENTS,
61
63
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardslashns/taskit-validation-messages",
3
- "version": "1.10.38",
3
+ "version": "1.10.40",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "commonjs",
@@ -0,0 +1,70 @@
1
+ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validation-message.types';
2
+
3
+ export const CLIENT_TEMPLATE_ASSIGNMENTS = defineValidationFeatureMessages({
4
+ NAME_ALREADY_EXISTS_ON_CLIENT_TEMPLATE: {
5
+ severity: VALIDATION_SEVERITY.ERROR,
6
+ message: 'This name is already in use on this client template. Please enter a different name',
7
+ affectedFields: ['assignments.name'],
8
+ },
9
+ CUSTOM_ASSIGNMENT_NOT_ALLOWED_FOR_TEMPLATE_TYPE: {
10
+ severity: VALIDATION_SEVERITY.ERROR,
11
+ message: 'Custom assignments are not allowed for this template type',
12
+ affectedFields: ['assignments'],
13
+ },
14
+ INHERITED_ASSIGNMENT_REFERENCE_REQUIRED: {
15
+ severity: VALIDATION_SEVERITY.ERROR,
16
+ message: 'Inherited assignment must reference a valid template assignment',
17
+ affectedFields: ['assignments.templateAssignmentId'],
18
+ },
19
+ INHERITED_ASSIGNMENT_REFERENCE_INVALID: {
20
+ severity: VALIDATION_SEVERITY.ERROR,
21
+ message: 'Referenced template assignment does not exist or does not belong to the template',
22
+ affectedFields: ['assignments.templateAssignmentId'],
23
+ },
24
+ ORDER_NOT_CONSECUTIVE: {
25
+ severity: VALIDATION_SEVERITY.ERROR,
26
+ message: 'Assignment orders must be consecutive starting from 1. Expected orders: {expected}',
27
+ params: ['expected'],
28
+ affectedFields: ['assignments.order'],
29
+ },
30
+ INHERITED_ORDER_LOCKED: {
31
+ severity: VALIDATION_SEVERITY.ERROR,
32
+ message: 'Inherited assignments cannot be reordered relative to each other',
33
+ affectedFields: ['assignments.order'],
34
+ },
35
+ DELETE_BLOCKED_BY_GENERATED_TASKS: {
36
+ severity: VALIDATION_SEVERITY.ERROR,
37
+ message: 'This assignment cannot be deleted because it has generated tasks',
38
+ affectedFields: ['assignments'],
39
+ },
40
+ DELETE_BLOCKED_NOT_DELETABLE: {
41
+ severity: VALIDATION_SEVERITY.ERROR,
42
+ message: 'This assignment is marked as not deletable',
43
+ affectedFields: ['assignments'],
44
+ },
45
+ ASSIGNMENT_NOT_FOUND: {
46
+ severity: VALIDATION_SEVERITY.ERROR,
47
+ message: 'Assignment not found on this client template',
48
+ affectedFields: ['assignments.id'],
49
+ },
50
+ INVALID_STAFF: {
51
+ severity: VALIDATION_SEVERITY.ERROR,
52
+ message: 'Invalid staff member',
53
+ affectedFields: ['assignments.defaultStaffId'],
54
+ },
55
+ INVALID_ASSIGNMENT_TYPE: {
56
+ severity: VALIDATION_SEVERITY.ERROR,
57
+ message: 'Invalid assignment type',
58
+ affectedFields: ['assignments.assignmentTypeId'],
59
+ },
60
+ DEFAULT_STAFF_REQUIRED: {
61
+ severity: VALIDATION_SEVERITY.ERROR,
62
+ message: 'Default staff is required',
63
+ affectedFields: ['assignments.defaultStaffId'],
64
+ },
65
+ DEFAULT_STAFF_NOT_ALLOWED_FOR_TODO: {
66
+ severity: VALIDATION_SEVERITY.ERROR,
67
+ message: "Default staff cannot be set when the assignment type is 'To do'",
68
+ affectedFields: ['assignments.defaultStaffId'],
69
+ },
70
+ });
@@ -270,6 +270,62 @@ export const TEMPLATE_INFORMATION = defineValidationFeatureMessages({
270
270
  params: ['FilingTemplateName', 'FilingTemplateAssociatedEntities'],
271
271
  affectedFields: ['taxPaymentFiling'],
272
272
  },
273
+ MAIN_FILING_REQUIRED: {
274
+ severity: VALIDATION_SEVERITY.ERROR,
275
+ message: 'Main filing is required for tax payment templates',
276
+ affectedFields: ['taxPaymentFiling'],
277
+ },
278
+ INVALID_MAIN_FILING: {
279
+ severity: VALIDATION_SEVERITY.ERROR,
280
+ message: 'The selected main filing does not exist',
281
+ affectedFields: ['taxPaymentFiling'],
282
+ },
283
+ MAIN_FILING_MUST_BE_FILING_TYPE: {
284
+ severity: VALIDATION_SEVERITY.ERROR,
285
+ message: 'The selected main filing must be a Filing type template',
286
+ affectedFields: ['taxPaymentFiling'],
287
+ },
288
+ MAIN_FILING_MUST_BE_INCOME_TAX: {
289
+ severity: VALIDATION_SEVERITY.ERROR,
290
+ message:
291
+ 'A main filing must be an income tax filing. {MainFilingName} is set to {MainFilingFilingType}. Please select a filing template with filing type set to income tax.',
292
+ params: ['MainFilingName', 'MainFilingFilingType'],
293
+ affectedFields: ['taxPaymentFiling'],
294
+ },
295
+ MAIN_FILING_MUST_FILE_SEPARATELY: {
296
+ severity: VALIDATION_SEVERITY.ERROR,
297
+ message:
298
+ "Tax payments can only be associated with filings that file separately. {MainFilingName} is set as 'Filing under parent'. Please select a different filing template.",
299
+ params: ['MainFilingName'],
300
+ affectedFields: ['taxPaymentFiling'],
301
+ },
302
+ MAIN_FILING_MUST_HAVE_ANNUAL_RECURRENCE: {
303
+ severity: VALIDATION_SEVERITY.ERROR,
304
+ message:
305
+ 'Tax payments can only be associated with filings on an annual recurrence. {MainFilingName} is not set to recur annually. Please add an annual recurrence to {MainFilingName}, or select a different filing template.',
306
+ params: ['MainFilingName'],
307
+ affectedFields: ['taxPaymentFiling'],
308
+ },
309
+ INVALID_TAX_PAYMENT_FILING_STATE: {
310
+ severity: VALIDATION_SEVERITY.ERROR,
311
+ message: 'The selected tax payment filing state does not exist',
312
+ affectedFields: ['taxPaymentFiling'],
313
+ },
314
+ TAX_PAYMENT_FILING_STATE_DOES_NOT_BELONG_TO_FILING: {
315
+ severity: VALIDATION_SEVERITY.ERROR,
316
+ message: 'The selected tax payment filing state does not belong to the selected filing template',
317
+ affectedFields: ['taxPaymentFiling'],
318
+ },
319
+ TAX_PAYMENT_FILING_STATE_NOT_ALLOWED_WITH_SUB_ENTITY: {
320
+ severity: VALIDATION_SEVERITY.ERROR,
321
+ message: 'A state filing option cannot be selected when a sub-entity filing is chosen',
322
+ affectedFields: ['taxPaymentFiling'],
323
+ },
324
+ TAX_PAYMENT_FILING_MUST_BE_SUB_ENTITY_OF_MAIN: {
325
+ severity: VALIDATION_SEVERITY.ERROR,
326
+ message: 'The selected tax payment filing must be the main filing or a sub-entity filing of the main filing',
327
+ affectedFields: ['taxPaymentFiling'],
328
+ },
273
329
  SETUP_TEMPLATE_MUST_BE_SETUP_TYPE: {
274
330
  severity: VALIDATION_SEVERITY.ERROR,
275
331
  message: 'The selected associated setup template must be a Setup type template',
@@ -26,6 +26,7 @@ import { TEMPLATE_STATES } from './features/template-states.validation-messages'
26
26
  import { INCOME_ACCOUNTS } from './features/income-accounts.validation-messages';
27
27
  import { TEMPLATE_RECURRENCE_SETTINGS } from './features/template-recurrence-settings.validation-messages';
28
28
  import { CLIENT_TEMPLATES } from './features/client-templates.validation-messages';
29
+ import { CLIENT_TEMPLATE_ASSIGNMENTS } from './features/client-template-assignments.validation-messages';
29
30
 
30
31
  export const VALIDATION_MESSAGES = {
31
32
  ACCOUNT_CATEGORIES,
@@ -56,4 +57,5 @@ export const VALIDATION_MESSAGES = {
56
57
  INCOME_ACCOUNTS,
57
58
  TEMPLATE_RECURRENCE_SETTINGS,
58
59
  CLIENT_TEMPLATES,
60
+ CLIENT_TEMPLATE_ASSIGNMENTS,
59
61
  } as const;