@forwardslashns/taskit-validation-messages 1.10.25 → 1.10.27
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.
- package/dist/validation/features/client-current-entity-statuses.validation-messages.d.ts +1 -1
- package/dist/validation/features/client-current-entity-statuses.validation-messages.js +2 -2
- package/dist/validation/features/client-templates.validation-messages.d.ts +78 -0
- package/dist/validation/features/client-templates.validation-messages.d.ts.map +1 -0
- package/dist/validation/features/client-templates.validation-messages.js +81 -0
- package/dist/validation/features/template-information.validation-messages.d.ts +6 -0
- package/dist/validation/features/template-information.validation-messages.d.ts.map +1 -1
- package/dist/validation/features/template-information.validation-messages.js +6 -0
- package/dist/validation/validation-messages.d.ts +84 -1
- package/dist/validation/validation-messages.d.ts.map +1 -1
- package/dist/validation/validation-messages.js +2 -0
- package/package.json +1 -1
- package/src/validation/features/client-current-entity-statuses.validation-messages.ts +2 -2
- package/src/validation/features/client-templates.validation-messages.ts +79 -0
- package/src/validation/features/template-information.validation-messages.ts +7 -0
- package/src/validation/validation-messages.ts +2 -0
|
@@ -121,7 +121,7 @@ export declare const CLIENT_CURRENT_ENTITY_STATUS: {
|
|
|
121
121
|
message: string;
|
|
122
122
|
affectedFields: never[];
|
|
123
123
|
};
|
|
124
|
-
|
|
124
|
+
CLIENT_COULD_NOT_BE_DELETED_CLIENT_TEMPLATES_EXIST: {
|
|
125
125
|
severity: "error";
|
|
126
126
|
message: string;
|
|
127
127
|
affectedFields: never[];
|
|
@@ -125,9 +125,9 @@ exports.CLIENT_CURRENT_ENTITY_STATUS = (0, validation_message_types_1.defineVali
|
|
|
125
125
|
message: `This client cannot be deleted because it has client relationships associated`,
|
|
126
126
|
affectedFields: [],
|
|
127
127
|
},
|
|
128
|
-
|
|
128
|
+
CLIENT_COULD_NOT_BE_DELETED_CLIENT_TEMPLATES_EXIST: {
|
|
129
129
|
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
130
|
-
message: `This client cannot be deleted because it has client
|
|
130
|
+
message: `This client cannot be deleted because it has client templates associated`,
|
|
131
131
|
affectedFields: [],
|
|
132
132
|
},
|
|
133
133
|
CLIENT_COULD_NOT_BE_DELETED_ADDITIONAL_INFORMATION_EXIST: {
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export declare const CLIENT_TEMPLATES: {
|
|
2
|
+
TEMPLATE_NOT_FOUND: {
|
|
3
|
+
severity: "error";
|
|
4
|
+
message: string;
|
|
5
|
+
affectedFields: string[];
|
|
6
|
+
};
|
|
7
|
+
RECURRENCE_NOT_FOUND: {
|
|
8
|
+
severity: "error";
|
|
9
|
+
message: string;
|
|
10
|
+
affectedFields: string[];
|
|
11
|
+
};
|
|
12
|
+
DEFAULT_STAFF_NOT_ACTIVE: {
|
|
13
|
+
severity: "error";
|
|
14
|
+
message: string;
|
|
15
|
+
affectedFields: string[];
|
|
16
|
+
};
|
|
17
|
+
CUSTOMER_CONTACT_INVALID: {
|
|
18
|
+
severity: "error";
|
|
19
|
+
message: string;
|
|
20
|
+
affectedFields: string[];
|
|
21
|
+
};
|
|
22
|
+
ENDING_BEFORE_STARTING: {
|
|
23
|
+
severity: "error";
|
|
24
|
+
message: string;
|
|
25
|
+
affectedFields: string[];
|
|
26
|
+
};
|
|
27
|
+
COMMISSION_RATE_OUT_OF_RANGE: {
|
|
28
|
+
severity: "error";
|
|
29
|
+
message: string;
|
|
30
|
+
affectedFields: string[];
|
|
31
|
+
};
|
|
32
|
+
AMOUNT_REQUIRED_WHEN_SEPARATELY_CHARGED: {
|
|
33
|
+
severity: "error";
|
|
34
|
+
message: string;
|
|
35
|
+
affectedFields: string[];
|
|
36
|
+
};
|
|
37
|
+
COMMISSION_RATE_REQUIRED_WHEN_SUBJECT_TO_COMMISSION: {
|
|
38
|
+
severity: "error";
|
|
39
|
+
message: string;
|
|
40
|
+
affectedFields: string[];
|
|
41
|
+
};
|
|
42
|
+
DAY_OF_MONTH_OUT_OF_RANGE: {
|
|
43
|
+
severity: "error";
|
|
44
|
+
message: string;
|
|
45
|
+
affectedFields: string[];
|
|
46
|
+
};
|
|
47
|
+
BILLING_MUST_BE_SEPARATELY_CHARGED: {
|
|
48
|
+
severity: "error";
|
|
49
|
+
message: string;
|
|
50
|
+
affectedFields: string[];
|
|
51
|
+
};
|
|
52
|
+
BILLING_MUST_BE_SUBJECT_TO_COMMISSION: {
|
|
53
|
+
severity: "error";
|
|
54
|
+
message: string;
|
|
55
|
+
affectedFields: string[];
|
|
56
|
+
};
|
|
57
|
+
PAYMENT_CANNOT_BE_SEPARATELY_CHARGED: {
|
|
58
|
+
severity: "error";
|
|
59
|
+
message: string;
|
|
60
|
+
affectedFields: string[];
|
|
61
|
+
};
|
|
62
|
+
PAYMENT_CANNOT_BE_SUBJECT_TO_COMMISSION: {
|
|
63
|
+
severity: "error";
|
|
64
|
+
message: string;
|
|
65
|
+
affectedFields: string[];
|
|
66
|
+
};
|
|
67
|
+
NEW_PRICE_REQUIRED_WHEN_PRICE_CHANGED: {
|
|
68
|
+
severity: "error";
|
|
69
|
+
message: string;
|
|
70
|
+
affectedFields: string[];
|
|
71
|
+
};
|
|
72
|
+
DELETE_BLOCKED_BY_GENERATED_TASKS: {
|
|
73
|
+
severity: "error";
|
|
74
|
+
message: string;
|
|
75
|
+
affectedFields: string[];
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=client-templates.validation-messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-templates.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/client-templates.validation-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4E3B,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLIENT_TEMPLATES = void 0;
|
|
4
|
+
const validation_message_types_1 = require("../validation-message.types");
|
|
5
|
+
exports.CLIENT_TEMPLATES = (0, validation_message_types_1.defineValidationFeatureMessages)({
|
|
6
|
+
TEMPLATE_NOT_FOUND: {
|
|
7
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
8
|
+
message: 'Selected template does not exist',
|
|
9
|
+
affectedFields: ['templateInfo.templateId'],
|
|
10
|
+
},
|
|
11
|
+
RECURRENCE_NOT_FOUND: {
|
|
12
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
13
|
+
message: 'Selected recurrence does not belong to selected template',
|
|
14
|
+
affectedFields: ['templateInfo.templateRecurrenceId'],
|
|
15
|
+
},
|
|
16
|
+
DEFAULT_STAFF_NOT_ACTIVE: {
|
|
17
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
18
|
+
message: 'Default staff must be active',
|
|
19
|
+
affectedFields: ['templateInfo.defaultStaffId'],
|
|
20
|
+
},
|
|
21
|
+
CUSTOMER_CONTACT_INVALID: {
|
|
22
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
23
|
+
message: 'Selected customer contact does not belong to the client',
|
|
24
|
+
affectedFields: ['billingAndPayments.customerContactId'],
|
|
25
|
+
},
|
|
26
|
+
ENDING_BEFORE_STARTING: {
|
|
27
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
28
|
+
message: 'Ending date cannot be earlier than starting date',
|
|
29
|
+
affectedFields: ['templateInfo.endingDate'],
|
|
30
|
+
},
|
|
31
|
+
COMMISSION_RATE_OUT_OF_RANGE: {
|
|
32
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
33
|
+
message: 'Commission rate must be between 0 and 100',
|
|
34
|
+
affectedFields: ['billingAndPayments.commissionRate'],
|
|
35
|
+
},
|
|
36
|
+
AMOUNT_REQUIRED_WHEN_SEPARATELY_CHARGED: {
|
|
37
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
38
|
+
message: 'Amount is required when template is separately charged',
|
|
39
|
+
affectedFields: ['billingAndPayments.amount'],
|
|
40
|
+
},
|
|
41
|
+
COMMISSION_RATE_REQUIRED_WHEN_SUBJECT_TO_COMMISSION: {
|
|
42
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
43
|
+
message: 'Commission rate is required when template is subject to commission',
|
|
44
|
+
affectedFields: ['billingAndPayments.commissionRate'],
|
|
45
|
+
},
|
|
46
|
+
DAY_OF_MONTH_OUT_OF_RANGE: {
|
|
47
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
48
|
+
message: 'Day of month must be between 1 and 31',
|
|
49
|
+
affectedFields: ['billingAndPayments.dayOfMonth'],
|
|
50
|
+
},
|
|
51
|
+
BILLING_MUST_BE_SEPARATELY_CHARGED: {
|
|
52
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
53
|
+
message: 'Billing templates must be separately charged',
|
|
54
|
+
affectedFields: ['billingAndPayments.isSeparatelyCharged'],
|
|
55
|
+
},
|
|
56
|
+
BILLING_MUST_BE_SUBJECT_TO_COMMISSION: {
|
|
57
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
58
|
+
message: 'Billing templates must be subject to commission',
|
|
59
|
+
affectedFields: ['billingAndPayments.isSubjectToCommission'],
|
|
60
|
+
},
|
|
61
|
+
PAYMENT_CANNOT_BE_SEPARATELY_CHARGED: {
|
|
62
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
63
|
+
message: 'Payment templates cannot be separately charged',
|
|
64
|
+
affectedFields: ['billingAndPayments.isSeparatelyCharged'],
|
|
65
|
+
},
|
|
66
|
+
PAYMENT_CANNOT_BE_SUBJECT_TO_COMMISSION: {
|
|
67
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
68
|
+
message: 'Payment templates cannot be subject to commission',
|
|
69
|
+
affectedFields: ['billingAndPayments.isSubjectToCommission'],
|
|
70
|
+
},
|
|
71
|
+
NEW_PRICE_REQUIRED_WHEN_PRICE_CHANGED: {
|
|
72
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
73
|
+
message: 'New price is required when price change is enabled',
|
|
74
|
+
affectedFields: ['billingAndPayments.newPrice'],
|
|
75
|
+
},
|
|
76
|
+
DELETE_BLOCKED_BY_GENERATED_TASKS: {
|
|
77
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
78
|
+
message: 'Client template cannot be deleted while generated tasks exist',
|
|
79
|
+
affectedFields: ['clientTemplateId'],
|
|
80
|
+
},
|
|
81
|
+
});
|
|
@@ -188,6 +188,12 @@ export declare const TEMPLATE_INFORMATION: {
|
|
|
188
188
|
params: string[];
|
|
189
189
|
affectedFields: string[];
|
|
190
190
|
};
|
|
191
|
+
FILES_UNDER_PARENT_STATE_MISMATCH: {
|
|
192
|
+
severity: "error";
|
|
193
|
+
message: string;
|
|
194
|
+
params: string[];
|
|
195
|
+
affectedFields: string[];
|
|
196
|
+
};
|
|
191
197
|
TAX_PAYMENT_FILING_REQUIRED: {
|
|
192
198
|
severity: "error";
|
|
193
199
|
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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Q/B,CAAC"}
|
|
@@ -192,6 +192,12 @@ exports.TEMPLATE_INFORMATION = (0, validation_message_types_1.defineValidationFe
|
|
|
192
192
|
params: ['parentName'],
|
|
193
193
|
affectedFields: ['filesUnder'],
|
|
194
194
|
},
|
|
195
|
+
FILES_UNDER_PARENT_STATE_MISMATCH: {
|
|
196
|
+
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
197
|
+
message: "{ParentFilingTemplateName} is set to {ParentFilingState} state, which conflicts with this filing template's state. Please select a different parent template or update the state before saving.",
|
|
198
|
+
params: ['ParentFilingTemplateName', 'ParentFilingState'],
|
|
199
|
+
affectedFields: ['filesUnder'],
|
|
200
|
+
},
|
|
195
201
|
TAX_PAYMENT_FILING_REQUIRED: {
|
|
196
202
|
severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
|
|
197
203
|
message: 'Tax payment filing is required',
|
|
@@ -405,7 +405,7 @@ export declare const VALIDATION_MESSAGES: {
|
|
|
405
405
|
message: string;
|
|
406
406
|
affectedFields: never[];
|
|
407
407
|
};
|
|
408
|
-
|
|
408
|
+
CLIENT_COULD_NOT_BE_DELETED_CLIENT_TEMPLATES_EXIST: {
|
|
409
409
|
severity: "error";
|
|
410
410
|
message: string;
|
|
411
411
|
affectedFields: never[];
|
|
@@ -1490,6 +1490,12 @@ export declare const VALIDATION_MESSAGES: {
|
|
|
1490
1490
|
params: string[];
|
|
1491
1491
|
affectedFields: string[];
|
|
1492
1492
|
};
|
|
1493
|
+
FILES_UNDER_PARENT_STATE_MISMATCH: {
|
|
1494
|
+
severity: "error";
|
|
1495
|
+
message: string;
|
|
1496
|
+
params: string[];
|
|
1497
|
+
affectedFields: string[];
|
|
1498
|
+
};
|
|
1493
1499
|
TAX_PAYMENT_FILING_REQUIRED: {
|
|
1494
1500
|
severity: "error";
|
|
1495
1501
|
message: string;
|
|
@@ -1917,5 +1923,82 @@ export declare const VALIDATION_MESSAGES: {
|
|
|
1917
1923
|
affectedFields: string[];
|
|
1918
1924
|
};
|
|
1919
1925
|
};
|
|
1926
|
+
readonly CLIENT_TEMPLATES: {
|
|
1927
|
+
TEMPLATE_NOT_FOUND: {
|
|
1928
|
+
severity: "error";
|
|
1929
|
+
message: string;
|
|
1930
|
+
affectedFields: string[];
|
|
1931
|
+
};
|
|
1932
|
+
RECURRENCE_NOT_FOUND: {
|
|
1933
|
+
severity: "error";
|
|
1934
|
+
message: string;
|
|
1935
|
+
affectedFields: string[];
|
|
1936
|
+
};
|
|
1937
|
+
DEFAULT_STAFF_NOT_ACTIVE: {
|
|
1938
|
+
severity: "error";
|
|
1939
|
+
message: string;
|
|
1940
|
+
affectedFields: string[];
|
|
1941
|
+
};
|
|
1942
|
+
CUSTOMER_CONTACT_INVALID: {
|
|
1943
|
+
severity: "error";
|
|
1944
|
+
message: string;
|
|
1945
|
+
affectedFields: string[];
|
|
1946
|
+
};
|
|
1947
|
+
ENDING_BEFORE_STARTING: {
|
|
1948
|
+
severity: "error";
|
|
1949
|
+
message: string;
|
|
1950
|
+
affectedFields: string[];
|
|
1951
|
+
};
|
|
1952
|
+
COMMISSION_RATE_OUT_OF_RANGE: {
|
|
1953
|
+
severity: "error";
|
|
1954
|
+
message: string;
|
|
1955
|
+
affectedFields: string[];
|
|
1956
|
+
};
|
|
1957
|
+
AMOUNT_REQUIRED_WHEN_SEPARATELY_CHARGED: {
|
|
1958
|
+
severity: "error";
|
|
1959
|
+
message: string;
|
|
1960
|
+
affectedFields: string[];
|
|
1961
|
+
};
|
|
1962
|
+
COMMISSION_RATE_REQUIRED_WHEN_SUBJECT_TO_COMMISSION: {
|
|
1963
|
+
severity: "error";
|
|
1964
|
+
message: string;
|
|
1965
|
+
affectedFields: string[];
|
|
1966
|
+
};
|
|
1967
|
+
DAY_OF_MONTH_OUT_OF_RANGE: {
|
|
1968
|
+
severity: "error";
|
|
1969
|
+
message: string;
|
|
1970
|
+
affectedFields: string[];
|
|
1971
|
+
};
|
|
1972
|
+
BILLING_MUST_BE_SEPARATELY_CHARGED: {
|
|
1973
|
+
severity: "error";
|
|
1974
|
+
message: string;
|
|
1975
|
+
affectedFields: string[];
|
|
1976
|
+
};
|
|
1977
|
+
BILLING_MUST_BE_SUBJECT_TO_COMMISSION: {
|
|
1978
|
+
severity: "error";
|
|
1979
|
+
message: string;
|
|
1980
|
+
affectedFields: string[];
|
|
1981
|
+
};
|
|
1982
|
+
PAYMENT_CANNOT_BE_SEPARATELY_CHARGED: {
|
|
1983
|
+
severity: "error";
|
|
1984
|
+
message: string;
|
|
1985
|
+
affectedFields: string[];
|
|
1986
|
+
};
|
|
1987
|
+
PAYMENT_CANNOT_BE_SUBJECT_TO_COMMISSION: {
|
|
1988
|
+
severity: "error";
|
|
1989
|
+
message: string;
|
|
1990
|
+
affectedFields: string[];
|
|
1991
|
+
};
|
|
1992
|
+
NEW_PRICE_REQUIRED_WHEN_PRICE_CHANGED: {
|
|
1993
|
+
severity: "error";
|
|
1994
|
+
message: string;
|
|
1995
|
+
affectedFields: string[];
|
|
1996
|
+
};
|
|
1997
|
+
DELETE_BLOCKED_BY_GENERATED_TASKS: {
|
|
1998
|
+
severity: "error";
|
|
1999
|
+
message: string;
|
|
2000
|
+
affectedFields: string[];
|
|
2001
|
+
};
|
|
2002
|
+
};
|
|
1920
2003
|
};
|
|
1921
2004
|
//# 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":"
|
|
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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_1 = require("./features/template-
|
|
|
28
28
|
const template_states_validation_messages_1 = require("./features/template-states.validation-messages");
|
|
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
|
+
const client_templates_validation_messages_1 = require("./features/client-templates.validation-messages");
|
|
31
32
|
exports.VALIDATION_MESSAGES = {
|
|
32
33
|
ACCOUNT_CATEGORIES: account_categories_validation_messages_1.ACCOUNT_CATEGORIES,
|
|
33
34
|
ACCOUNT_IDS: account_ids_validation_messages_1.ACCOUNT_IDS,
|
|
@@ -56,4 +57,5 @@ exports.VALIDATION_MESSAGES = {
|
|
|
56
57
|
TEMPLATE_STATES: template_states_validation_messages_1.TEMPLATE_STATES,
|
|
57
58
|
INCOME_ACCOUNTS: income_accounts_validation_messages_1.INCOME_ACCOUNTS,
|
|
58
59
|
TEMPLATE_RECURRENCE_SETTINGS: template_recurrence_settings_validation_messages_1.TEMPLATE_RECURRENCE_SETTINGS,
|
|
60
|
+
CLIENT_TEMPLATES: client_templates_validation_messages_1.CLIENT_TEMPLATES,
|
|
59
61
|
};
|
package/package.json
CHANGED
|
@@ -123,9 +123,9 @@ export const CLIENT_CURRENT_ENTITY_STATUS = defineValidationFeatureMessages({
|
|
|
123
123
|
message: `This client cannot be deleted because it has client relationships associated`,
|
|
124
124
|
affectedFields: [],
|
|
125
125
|
},
|
|
126
|
-
|
|
126
|
+
CLIENT_COULD_NOT_BE_DELETED_CLIENT_TEMPLATES_EXIST: {
|
|
127
127
|
severity: VALIDATION_SEVERITY.ERROR,
|
|
128
|
-
message: `This client cannot be deleted because it has client
|
|
128
|
+
message: `This client cannot be deleted because it has client templates associated`,
|
|
129
129
|
affectedFields: [],
|
|
130
130
|
},
|
|
131
131
|
CLIENT_COULD_NOT_BE_DELETED_ADDITIONAL_INFORMATION_EXIST: {
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validation-message.types';
|
|
2
|
+
|
|
3
|
+
export const CLIENT_TEMPLATES = defineValidationFeatureMessages({
|
|
4
|
+
TEMPLATE_NOT_FOUND: {
|
|
5
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
6
|
+
message: 'Selected template does not exist',
|
|
7
|
+
affectedFields: ['templateInfo.templateId'],
|
|
8
|
+
},
|
|
9
|
+
RECURRENCE_NOT_FOUND: {
|
|
10
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
11
|
+
message: 'Selected recurrence does not belong to selected template',
|
|
12
|
+
affectedFields: ['templateInfo.templateRecurrenceId'],
|
|
13
|
+
},
|
|
14
|
+
DEFAULT_STAFF_NOT_ACTIVE: {
|
|
15
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
16
|
+
message: 'Default staff must be active',
|
|
17
|
+
affectedFields: ['templateInfo.defaultStaffId'],
|
|
18
|
+
},
|
|
19
|
+
CUSTOMER_CONTACT_INVALID: {
|
|
20
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
21
|
+
message: 'Selected customer contact does not belong to the client',
|
|
22
|
+
affectedFields: ['billingAndPayments.customerContactId'],
|
|
23
|
+
},
|
|
24
|
+
ENDING_BEFORE_STARTING: {
|
|
25
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
26
|
+
message: 'Ending date cannot be earlier than starting date',
|
|
27
|
+
affectedFields: ['templateInfo.endingDate'],
|
|
28
|
+
},
|
|
29
|
+
COMMISSION_RATE_OUT_OF_RANGE: {
|
|
30
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
31
|
+
message: 'Commission rate must be between 0 and 100',
|
|
32
|
+
affectedFields: ['billingAndPayments.commissionRate'],
|
|
33
|
+
},
|
|
34
|
+
AMOUNT_REQUIRED_WHEN_SEPARATELY_CHARGED: {
|
|
35
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
36
|
+
message: 'Amount is required when template is separately charged',
|
|
37
|
+
affectedFields: ['billingAndPayments.amount'],
|
|
38
|
+
},
|
|
39
|
+
COMMISSION_RATE_REQUIRED_WHEN_SUBJECT_TO_COMMISSION: {
|
|
40
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
41
|
+
message: 'Commission rate is required when template is subject to commission',
|
|
42
|
+
affectedFields: ['billingAndPayments.commissionRate'],
|
|
43
|
+
},
|
|
44
|
+
DAY_OF_MONTH_OUT_OF_RANGE: {
|
|
45
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
46
|
+
message: 'Day of month must be between 1 and 31',
|
|
47
|
+
affectedFields: ['billingAndPayments.dayOfMonth'],
|
|
48
|
+
},
|
|
49
|
+
BILLING_MUST_BE_SEPARATELY_CHARGED: {
|
|
50
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
51
|
+
message: 'Billing templates must be separately charged',
|
|
52
|
+
affectedFields: ['billingAndPayments.isSeparatelyCharged'],
|
|
53
|
+
},
|
|
54
|
+
BILLING_MUST_BE_SUBJECT_TO_COMMISSION: {
|
|
55
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
56
|
+
message: 'Billing templates must be subject to commission',
|
|
57
|
+
affectedFields: ['billingAndPayments.isSubjectToCommission'],
|
|
58
|
+
},
|
|
59
|
+
PAYMENT_CANNOT_BE_SEPARATELY_CHARGED: {
|
|
60
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
61
|
+
message: 'Payment templates cannot be separately charged',
|
|
62
|
+
affectedFields: ['billingAndPayments.isSeparatelyCharged'],
|
|
63
|
+
},
|
|
64
|
+
PAYMENT_CANNOT_BE_SUBJECT_TO_COMMISSION: {
|
|
65
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
66
|
+
message: 'Payment templates cannot be subject to commission',
|
|
67
|
+
affectedFields: ['billingAndPayments.isSubjectToCommission'],
|
|
68
|
+
},
|
|
69
|
+
NEW_PRICE_REQUIRED_WHEN_PRICE_CHANGED: {
|
|
70
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
71
|
+
message: 'New price is required when price change is enabled',
|
|
72
|
+
affectedFields: ['billingAndPayments.newPrice'],
|
|
73
|
+
},
|
|
74
|
+
DELETE_BLOCKED_BY_GENERATED_TASKS: {
|
|
75
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
76
|
+
message: 'Client template cannot be deleted while generated tasks exist',
|
|
77
|
+
affectedFields: ['clientTemplateId'],
|
|
78
|
+
},
|
|
79
|
+
});
|
|
@@ -199,6 +199,13 @@ export const TEMPLATE_INFORMATION = defineValidationFeatureMessages({
|
|
|
199
199
|
params: ['parentName'],
|
|
200
200
|
affectedFields: ['filesUnder'],
|
|
201
201
|
},
|
|
202
|
+
FILES_UNDER_PARENT_STATE_MISMATCH: {
|
|
203
|
+
severity: VALIDATION_SEVERITY.ERROR,
|
|
204
|
+
message:
|
|
205
|
+
"{ParentFilingTemplateName} is set to {ParentFilingState} state, which conflicts with this filing template's state. Please select a different parent template or update the state before saving.",
|
|
206
|
+
params: ['ParentFilingTemplateName', 'ParentFilingState'],
|
|
207
|
+
affectedFields: ['filesUnder'],
|
|
208
|
+
},
|
|
202
209
|
TAX_PAYMENT_FILING_REQUIRED: {
|
|
203
210
|
severity: VALIDATION_SEVERITY.ERROR,
|
|
204
211
|
message: 'Tax payment filing is required',
|
|
@@ -25,6 +25,7 @@ import { TEMPLATE_ASSIGNMENTS } from './features/template-assignments.validation
|
|
|
25
25
|
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
|
+
import { CLIENT_TEMPLATES } from './features/client-templates.validation-messages';
|
|
28
29
|
|
|
29
30
|
export const VALIDATION_MESSAGES = {
|
|
30
31
|
ACCOUNT_CATEGORIES,
|
|
@@ -54,4 +55,5 @@ export const VALIDATION_MESSAGES = {
|
|
|
54
55
|
TEMPLATE_STATES,
|
|
55
56
|
INCOME_ACCOUNTS,
|
|
56
57
|
TEMPLATE_RECURRENCE_SETTINGS,
|
|
58
|
+
CLIENT_TEMPLATES,
|
|
57
59
|
} as const;
|