-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* delete unused file * fix validation for links * unecessary return * unfinished * delete unused folder * fix validation * fix double check on scopenote * fix: improve zod validation for concept * improve zod once again * add and reshape tests * fix test * add messages to notes and set title to red if scopenote too long * fix error messages for codelists --------- Co-authored-by: Emmanuel <[email protected]>
- Loading branch information
1 parent
09b92aa
commit 89caff6
Showing
22 changed files
with
381 additions
and
1,360 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,56 @@ | ||
import NoteOneLangEdition from './note-one-lang-edition'; | ||
import D from '../../deprecated-locales'; | ||
import { ClientSideError } from '../errors-bloc'; | ||
|
||
type NoteEditionTypes = { | ||
noteLg1: string; | ||
notes: any; | ||
noteLg1Name: string; | ||
noteLg2Name: string; | ||
handleChangeLg1: (value: string) => void; | ||
noteLg2: string; | ||
handleChangeLg2: (value: string) => void; | ||
maxLength: number; | ||
errorMessage: { errorMessage: string[]; fields: any }; | ||
}; | ||
export const NoteEdition = ({ | ||
noteLg1, | ||
notes, | ||
noteLg1Name, | ||
noteLg2Name, | ||
handleChangeLg1, | ||
noteLg2, | ||
handleChangeLg2, | ||
maxLength, | ||
errorMessage, | ||
}: Readonly<NoteEditionTypes>) => { | ||
const noteLg1 = notes[noteLg1Name]; | ||
const noteLg2 = notes[noteLg2Name]; | ||
return ( | ||
<div> | ||
<div className="row"> | ||
<div className="col-md-6"> | ||
<NoteOneLangEdition | ||
note={noteLg1} | ||
handleChange={handleChangeLg1} | ||
maxLength={maxLength} | ||
/> | ||
<> | ||
<NoteOneLangEdition | ||
note={noteLg1} | ||
handleChange={handleChangeLg1} | ||
maxLength={maxLength} | ||
/> | ||
<ClientSideError | ||
id="note-lg1-error" | ||
error={errorMessage?.fields[noteLg1Name]} | ||
></ClientSideError> | ||
</> | ||
</div> | ||
<div className="col-md-6"> | ||
<NoteOneLangEdition | ||
note={noteLg2} | ||
handleChange={handleChangeLg2} | ||
maxLength={maxLength} | ||
/> | ||
<> | ||
<NoteOneLangEdition | ||
note={noteLg2} | ||
handleChange={handleChangeLg2} | ||
maxLength={maxLength} | ||
/> | ||
<ClientSideError | ||
id="note-lg2-error" | ||
error={errorMessage?.fields[noteLg2Name]} | ||
></ClientSideError> | ||
</> | ||
</div> | ||
</div> | ||
{maxLength && ( | ||
<div className="row"> | ||
<div className="row text-center boldRed"> | ||
{maxLength} {D.scopeNoteChar} | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.