Skip to content

Commit 1eea6a4

Browse files
committed
feat(dref-translation): remove language mismatch bloker to edit and view
dref form
1 parent b2eec6b commit 1eea6a4

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

app/src/views/DrefApplicationForm/index.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,13 +609,14 @@ export function Component() {
609609
const disabled = fetchingDref || saveDrefPending;
610610

611611
// New DREFs can only be created in English
612-
const nonEnglishCreate = isNotDefined(drefId) && currentLanguage !== 'en';
612+
// const nonEnglishCreate = isNotDefined(drefId) && currentLanguage !== 'en';
613+
613614
const languageMismatch = isDefined(drefId)
614615
&& isDefined(drefResponse)
615616
&& currentLanguage !== drefResponse?.translation_module_original_language;
616-
const shouldHideForm = nonEnglishCreate
617-
|| languageMismatch
618-
|| fetchingDref
617+
618+
const shouldHideForm = fetchingDref
619+
// || nonEnglishCreate
619620
|| isDefined(drefResponseError);
620621

621622
return (
@@ -730,11 +731,11 @@ export function Component() {
730731
originalLanguage={drefResponse.translation_module_original_language}
731732
/>
732733
)}
733-
{nonEnglishCreate && (
734+
{/* nonEnglishCreate && (
734735
<NonEnglishFormCreationMessage
735736
title={strings.formNotAvailableInNonEnglishMessage}
736737
/>
737-
)}
738+
) */}
738739
{isDefined(drefResponseError) && (
739740
<FormFailedToLoadMessage
740741
title={strings.formLoadErrorTitle}

app/src/views/DrefFinalReportForm/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ export function Component() {
409409
const languageMismatch = isDefined(finalReportId)
410410
&& isDefined(finalReportResponse)
411411
&& currentLanguage !== finalReportResponse?.translation_module_original_language;
412-
const shouldHideForm = languageMismatch
413-
|| fetchingFinalReport
412+
413+
const shouldHideForm = fetchingFinalReport
414414
|| isDefined(finalReportResponseError);
415415

416416
return (

app/src/views/DrefOperationalUpdateForm/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,8 @@ export function Component() {
575575
const languageMismatch = isDefined(opsUpdateId)
576576
&& isDefined(drefResponse)
577577
&& currentLanguage !== opsUpdateResponse?.translation_module_original_language;
578-
const shouldHideForm = languageMismatch
579-
|| fetchingOpsUpdate
578+
579+
const shouldHideForm = fetchingOpsUpdate
580580
|| isDefined(opsUpdateResponseError);
581581

582582
return (

0 commit comments

Comments
 (0)