diff --git a/components/elements/index.js b/components/elements/index.js
index 227023aa..fc653a3c 100644
--- a/components/elements/index.js
+++ b/components/elements/index.js
@@ -599,7 +599,6 @@ const RenderYesNo = ({
: delete docListObj[
"documentCheckList_" + id
];
- console.log(docListObj);
custom.setDocumentsList(docListObj);
}
}}
@@ -623,27 +622,70 @@ export function YesNofield(props) {
const router = useRouter();
let { t } = useTranslation();
- const { name, label, inline, validation } = props;
+ const {
+ name,
+ label,
+ inline,
+ form,
+ formProps,
+ validation,
+ parentFieldShowOnValue,
+ parentField,
+ } = props;
const yesNo = router.locale == "cy" ? ["Ydw", "Na"] : ["Yes", "No"];
const required = (value) => (value ? undefined : "Required");
+ var showIfHasParentShowValue =
+ parentField != false &&
+ !_.isEmpty(formProps[form]) &&
+ _.has(formProps[form].values, parentField) &&
+ parentFieldShowOnValue.indexOf(
+ formProps[form].values[parentField].toString()
+ ) > -1;
+
+ (showIfHasParentShowValue == parentField) != false &&
+ showIfHasParentShowValue;
+
return (
-
+ <>
+ {parentField != false ? (
+ showIfHasParentShowValue && (
+
+ )
+ ) : (
+
+ )}
+ >
);
}
@@ -792,12 +834,6 @@ export function Radiofield(props) {
(showIfHasParentShowValue == parentField) != false &&
showIfHasParentShowValue;
- // console.log(
- // datafieldname,
- // showIfHasParentShowValue,
- // formProps[form].values[parentField]
- // );
-
return (
<>
{parentField != false ? (
@@ -1209,6 +1245,7 @@ export function FileUploadField(props) {
errorMsg="Is required"
ticketnumber={props.ticketnumber}
documentTypeCode={props.documentTypeCode}
+ hint={props.hint}
/>
>
);
@@ -1340,6 +1377,7 @@ const rejectStyle = {
const RenderFileUpload = (field) => {
const files = field.input.value;
+ let { t } = useTranslation();
const style = useMemo(
() => ({
...baseStyle,
@@ -1435,6 +1473,22 @@ const RenderFileUpload = (field) => {
case "000010":
return "000010";
break;
+ case "000011":
+ return "000011";
+ break;
+ case "000012":
+ return "000012";
+ break;
+ case "000013":
+ return "000013";
+ break;
+ case "000014":
+ return "000014";
+ break;
+ case "000015":
+ return "000015";
+ break;
+
default:
return "000000";
}
@@ -1465,6 +1519,9 @@ const RenderFileUpload = (field) => {
>
{({ getRootProps, getInputProps }) => (
<>
+ {field.hint != false && (
+
{t(field.hint)}
+ )}
diff --git a/components/myportal.js b/components/myportal.js
index 9372e72e..9d0a9fcf 100644
--- a/components/myportal.js
+++ b/components/myportal.js
@@ -1,25 +1,17 @@
+import { signOut } from "next-auth/react";
+import useTranslation from "next-translate/useTranslation";
import Link from "next/link";
import { useRouter } from "next/router";
-import { useContext } from "react";
-import useTranslation from "next-translate/useTranslation";
+import { destroyCookie } from "nookies";
+import TimeOut from "../components/timeout";
+import AwaitingSubmission from "./myportal/awaitingsubmission";
+import Dns from "./myportal/dns";
import MakeNewAppeal from "./myportal/makenewappeal";
import MyCases from "./myportal/mycases";
-import SearchCases from "./myportal/searchcases";
-import AwaitingSubmission from "./myportal/awaitingsubmission";
import MyRepresentations from "./myportal/myrepresentations";
-import WatchedCases from "./myportal/watchedcases";
-import YourAccount from "./myportal/youraccount";
-import { parseCookies, setCookie, destroyCookie } from "nookies";
-import Dns from "./myportal/dns";
-
-import IdleTimer from "react-idle-timer";
-import TimeoutModal from "./timeout/timeoutmodal";
-import { useState } from "react";
-
-import TimeOut from "../components/timeout";
+import SearchCases from "./myportal/searchcases";
import UploadFile from "./myportal/uploadFile";
-
-import { useSession, signIn, signOut } from "next-auth/react";
+import WatchedCases from "./myportal/watchedcases";
const MyPortal = (props) => {
const { showFileUpload } = props;
@@ -28,33 +20,6 @@ const MyPortal = (props) => {
const router = useRouter();
const { locale } = router;
- // const [showModal, setShowModal] = useState(false);
- // const inactiveTimeOut = 1200; // in seconds
- // const reminderTimeout = 60; // in seconds
-
- // let idleTimer = null;
- // let logoutTimer = null;
-
- // let onIdle = () => {
- // togglePopup();
- // logoutTimer = setTimeout(() => {
- // handleLogout();
- // }, 1000 * reminderTimeout * 1);
- // };
-
- // let togglePopup = () => {
- // showModal == true ? setShowModal(false) : setShowModal(true);
- // };
-
- // let handleStayLoggedIn = () => {
- // if (logoutTimer) {
- // clearTimeout(logoutTimer);
- // logoutTimer = null;
- // }
- // idleTimer.reset();
- // togglePopup();
- // };
-
const handleLogout = () => {
console.log("////////////", "\n", "logout", "\n", "//////////");
destroyCookie({}, "pinsUser"),
@@ -63,7 +28,6 @@ const MyPortal = (props) => {
signOut({ callbackUrl: "/logout" });
};
- console.log("showFileUpload :", showFileUpload);
return (
<>
@@ -160,16 +124,6 @@ const MyPortal = (props) => {
- {/* {
- idleTimer = ref;
- }}
- element={document}
- stopOnIdle={true}
- onActive={console.log(" bbis active", idleTimer)}
- onIdle={onIdle}
- timeout={1000 * inactiveTimeOut * 1}
- /> */}
>
);
diff --git a/pages/myportal/index.js b/pages/myportal/index.js
index e2c3af4e..6c513cbd 100644
--- a/pages/myportal/index.js
+++ b/pages/myportal/index.js
@@ -1,4 +1,5 @@
import _ from "lodash";
+import { getSession, useSession } from "next-auth/react";
import useTranslation from "next-translate/useTranslation";
import Head from "next/head";
import { useRouter } from "next/router";
@@ -37,9 +38,6 @@ import {
setWatchedCases,
setWatchedCasesDetails,
} from "../../store/watchedCases/action";
-import { setCookie } from "nookies";
-
-import { getSession, useSession, signIn, signOut } from "next-auth/react";
const Home = (props) => {
const {
@@ -61,8 +59,6 @@ const Home = (props) => {
const { data: session } = useSession();
- console.log("eeee", process.env.SHOWFILEUPLOAD);
-
return (
diff --git a/store/appealType/action.js b/store/appealType/action.js
index 9b62da2c..eeb937e3 100644
--- a/store/appealType/action.js
+++ b/store/appealType/action.js
@@ -65,7 +65,6 @@ export const setFormComplete = (formComplete) => (dispatch) => {
};
export const setDocumentsList = (documentList) => (dispatch) => {
- console.log("here", documentList);
return dispatch({
type: appealTypeDataActionTypes.SETDOCUMENTLIST,
documentList: documentList,