IO-1943 Enter again bill functionality bugfix.

This commit is contained in:
Patrick Fic
2022-06-27 16:17:45 -07:00
parent 54ebc2e25b
commit 2a1c046dd6
5 changed files with 49 additions and 1 deletions

View File

@@ -2063,6 +2063,32 @@
</concept_node>
</children>
</folder_node>
<folder_node>
<name>validation</name>
<children>
<concept_node>
<name>atleastone</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
</children>
</folder_node>
</children>
</folder_node>
<folder_node>

View File

@@ -552,7 +552,20 @@ export function BillEnterModalLinesComponent({
});
return (
<Form.List name="billlines">
<Form.List
name="billlines"
rules={[
{
validator: async (_, billlines) => {
if (!billlines || billlines.length < 1) {
return Promise.reject(
new Error(t("billlines.validation.atleastone"))
);
}
},
},
]}
>
{(fields, { add, remove, move }) => {
return (
<>

View File

@@ -136,6 +136,9 @@
"other": "-- Not On Estimate --",
"reconciled": "Reconciled!",
"unreconciled": "Unreconciled"
},
"validation": {
"atleastone": "At least one bill line must be entered."
}
},
"bills": {

View File

@@ -136,6 +136,9 @@
"other": "",
"reconciled": "",
"unreconciled": ""
},
"validation": {
"atleastone": ""
}
},
"bills": {

View File

@@ -136,6 +136,9 @@
"other": "",
"reconciled": "",
"unreconciled": ""
},
"validation": {
"atleastone": ""
}
},
"bills": {