From c35e5de4ee9c605a78feb5dbd06d9d4b82ed37df Mon Sep 17 00:00:00 2001 From: Rittik Dey Date: Tue, 10 Dec 2024 12:32:11 +0100 Subject: [PATCH] TEN-1008: Show FNR input field only for FSEDs --- .../Vedlegg/Attachments/Attachments.tsx | 45 +++++++++++-------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/src/applications/Vedlegg/Attachments/Attachments.tsx b/src/applications/Vedlegg/Attachments/Attachments.tsx index d106ac87..396df097 100644 --- a/src/applications/Vedlegg/Attachments/Attachments.tsx +++ b/src/applications/Vedlegg/Attachments/Attachments.tsx @@ -11,6 +11,7 @@ import {Attachment} from "../../../declarations/types"; import AttachmentsFromRinaTable from "./AttachmentsFromRinaTable"; import {Barn, F001Sed, ReplySed} from "../../../declarations/sed"; import {getFnr} from "../../../utils/fnr"; +import {isFSed} from "../../../utils/sed"; export interface AttachmentsProps { replySed: ReplySed | null | undefined @@ -184,15 +185,19 @@ const Attachments: React.FC = ({ - evt. - setFnrField(e.target.value)} - onBlur={(e) => setFnr(e.target.value)} - value={_fnrField} - /> + {isFSed(replySed) && + <> + evt. + setFnrField(e.target.value)} + onBlur={(e) => setFnr(e.target.value)} + value={_fnrField} + /> + + }