questionnaire for callins and uploads
This commit is contained in:
@@ -34,7 +34,6 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
const [clearRepForm, setClearRepForm] = useState(false);
|
||||
const [savingStatus, setSavingStatus] = useState(false);
|
||||
const [showQuestionnaireSection, setShowQuestionnaireSection] = useState(1);
|
||||
//const [questionnaireCount, setQuestionnaireCount] = useState(0);
|
||||
|
||||
const { data: session } = useSession();
|
||||
@@ -57,6 +56,8 @@ let MakeRepresentation = (props) => {
|
||||
handleSubmit,
|
||||
setRepresentationSubmitConfirmation,
|
||||
setRepresentationMessageSent,
|
||||
setShowQuestionnaireSection,
|
||||
showQuestionnaireSection,
|
||||
initialValues,
|
||||
} = props;
|
||||
const formObj = props.props.form;
|
||||
@@ -194,6 +195,8 @@ let MakeRepresentation = (props) => {
|
||||
? true
|
||||
: false;
|
||||
|
||||
isLPA && setRepresentationCapacity("lpa");
|
||||
|
||||
currentType == "searchResultsObj"
|
||||
? (casesObj = jsonpath(
|
||||
'$..[?(@.title=="' + caseReference + '")]',
|
||||
@@ -374,7 +377,15 @@ let MakeRepresentation = (props) => {
|
||||
};
|
||||
|
||||
const whichControl = () => {
|
||||
if (isLPA && _.isEmpty(currentView.representationCapacity)) {
|
||||
if (
|
||||
isLPA &&
|
||||
_.isEmpty(
|
||||
currentView.representationCapacity ||
|
||||
(currentView.caseReference.hasOwnProperty("repDetails") &&
|
||||
currentView.caseReference.repDetails
|
||||
.representationCapacity)
|
||||
)
|
||||
) {
|
||||
return (
|
||||
//setRepresentationCapacity("lpa"),
|
||||
<RepLPACapacitySelection
|
||||
@@ -396,7 +407,10 @@ let MakeRepresentation = (props) => {
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
switch (currentView.representationCapacity) {
|
||||
switch (
|
||||
currentView.representationCapacity ||
|
||||
currentView.caseReference.repDetails.representationCapacity
|
||||
) {
|
||||
case false:
|
||||
<RepCapacitySelection
|
||||
formObj={formObj}
|
||||
@@ -955,11 +969,7 @@ let MakeRepresentation = (props) => {
|
||||
if (currentView.representationSubmit != true) {
|
||||
if (_.isEmpty(currentView.representationCapacity)) {
|
||||
if (isLPA) {
|
||||
setRepresentationCapacity(
|
||||
values.representationCapacity
|
||||
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
|
||||
.toLowerCase()
|
||||
);
|
||||
setRepresentationCapacity("lpa");
|
||||
} else {
|
||||
setRepresentationCapacity(
|
||||
values.representationCapacity
|
||||
|
||||
Reference in New Issue
Block a user