diff --git a/components/elements/index.js b/components/elements/index.js
index ae011265..8ddc18ab 100644
--- a/components/elements/index.js
+++ b/components/elements/index.js
@@ -621,6 +621,7 @@ const RenderYesNo = ({
export function YesNofield(props) {
const router = useRouter();
+ let { t } = useTranslation();
const { name, label, inline, validation } = props;
const yesNo = router.locale == "cy" ? ["Ydw", "Na"] : ["Yes", "No"];
@@ -773,6 +774,7 @@ export function Radiofield(props) {
const router = useRouter();
const required = (value) => (value ? undefined : "Required");
// console.log(props.options);
+ let { t } = useTranslation();
const fieldOptions = props.options
.slice(1, props.options.length - 1)
@@ -996,51 +998,142 @@ export function PickList(props) {
}
export function NumericField(props) {
- const { name, label, validation } = props;
+ const {
+ name,
+ label,
+ validation,
+ form,
+ formProps,
+ parentFieldShowOnValue,
+ parentField,
+ } = props;
const required = (value) => (value ? undefined : "Required");
+ //parentFieldShowOnValue
+ var showIfHasParentShowValue =
+ parentField != false &&
+ !_.isEmpty(formProps[form]) &&
+ _.has(formProps[form].values, parentField) &&
+ parentFieldShowOnValue.indexOf(
+ formProps[form].values[parentField].toString()
+ ) > -1;
+
+ (showIfHasParentShowValue == parentField) != false &&
+ showIfHasParentShowValue;
+
+ console.log("parentField:", parentField, showIfHasParentShowValue);
+
return (
-
-
-
+ <>
+ {parentField != false ? (
+ showIfHasParentShowValue && (
+
+
+
+ )
+ ) : (
+
+
+
+ )}
+ >
);
}
export function DecimalField(props) {
- const { name, label, validation } = props;
+ const {
+ name,
+ label,
+ validation,
+ form,
+ formProps,
+ parentFieldShowOnValue,
+ parentField,
+ } = props;
const required = (value) => (value ? undefined : "Required");
+ //parentFieldShowOnValue
+ var showIfHasParentShowValue =
+ parentField != false &&
+ !_.isEmpty(formProps[form]) &&
+ _.has(formProps[form].values, parentField) &&
+ parentFieldShowOnValue.indexOf(
+ formProps[form].values[parentField].toString()
+ ) > -1;
+
+ (showIfHasParentShowValue == parentField) != false &&
+ showIfHasParentShowValue;
+
+ console.log("parentField:", parentField, showIfHasParentShowValue);
+
return (
-
-
-
+ <>
+ {parentField != false ? (
+ showIfHasParentShowValue && (
+
+
+
+ )
+ ) : (
+
+
+
+ )}
+ >
);
}
diff --git a/components/newappeal/buildfield.js b/components/newappeal/buildfield.js
index 0f4e9a50..6244b143 100644
--- a/components/newappeal/buildfield.js
+++ b/components/newappeal/buildfield.js
@@ -149,7 +149,11 @@ export default function BuildField(props) {
);
break;
@@ -158,7 +162,11 @@ export default function BuildField(props) {
);
break;
diff --git a/components/newappeal/createCase.js b/components/newappeal/createCase.js
index 16382da1..b9aa1837 100644
--- a/components/newappeal/createCase.js
+++ b/components/newappeal/createCase.js
@@ -448,6 +448,8 @@ let CreateCase = (props) => {
delete values.confirmHASCAS;
+ console.log(appTypeCollection);
+
createNewCase(
appTypeCollection.appealTypeID,
values.lpaTypes,
diff --git a/data/formsxml/householderappealhas.xml b/data/formsxml/householderappealhas.xml
index d4bf0870..d9091e7d 100644
--- a/data/formsxml/householderappealhas.xml
+++ b/data/formsxml/householderappealhas.xml
@@ -21,30 +21,11 @@
-
+ |
-
+
-
-
- |
- |
-
- |
-
-
-
-
-
- |
-
-
- |
-
-
-
-
-
+
|
@@ -312,6 +293,14 @@
+
+ |
+
+
+
+
+ |
+
|
@@ -325,7 +314,7 @@
-
+
|
@@ -333,7 +322,7 @@
-
+
@@ -488,21 +477,45 @@
-
+ |
-
+
|
|
-
+ |
-
+
|
|
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
diff --git a/pages/api/endpoint/getappealtypesfornewappeal_api.js b/pages/api/endpoint/getappealtypesfornewappeal_api.js
index 2b561553..2ccf80e4 100644
--- a/pages/api/endpoint/getappealtypesfornewappeal_api.js
+++ b/pages/api/endpoint/getappealtypesfornewappeal_api.js
@@ -19,7 +19,15 @@ const ApiResponse = (req, res) => {
"attributevalue": 846040025,
},
{
- "value": "Householder and Minor Commercial Appeals - HAS/CAS",
+ "value": "Householder Appeals - HAS",
+ "stringmapid": "585d46a7-9138-ec11-aacb-00224800be9c",
+ "organizationid": "01191a4d-105f-eb11-aaba-00224800be9c",
+ "attributevalue@OData.Community.Display.V1.FormattedValue":
+ "846,040,004",
+ "attributevalue": 846040004,
+ },
+ {
+ "value": "Minor Commercial Appeals - CAS",
"stringmapid": "585d46a7-9138-ec11-aacb-00224800be9c",
"organizationid": "01191a4d-105f-eb11-aaba-00224800be9c",
"attributevalue@OData.Community.Display.V1.FormattedValue":