Skip to content

Commit

Permalink
fix: changed searchyby input in document form - Ref gestion-de-projet…
Browse files Browse the repository at this point in the history
…#2354
  • Loading branch information
ManelleG committed Dec 2, 2024
1 parent 8446bb8 commit e1ef5c9
Showing 1 changed file with 10 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type DocumentDataType = CommonCriteriaData &
WithEncounterStatusDataType & {
type: CriteriaType.DOCUMENTS
search: string
searchBy: string // SearchByTypes.TEXT | SearchByTypes.DESCRIPTION
searchBy: LabelObject[] | null
docType: LabelObject[] | null
docStatuses: LabelObject[] | null
}
Expand All @@ -35,7 +35,7 @@ export const form: () => CriteriaForm<DocumentDataType> = () => ({
encounterEndDate: null,
encounterStatus: [],
search: '',
searchBy: 'TEXT', // Default to SearchByTypes.TEXT
searchBy: [{ id: SearchByTypes.TEXT, label: 'Titre du document' }],
docType: null,
docStatuses: null
},
Expand Down Expand Up @@ -65,28 +65,16 @@ export const form: () => CriteriaForm<DocumentDataType> = () => ({
},
{
valueKey: 'searchBy',
type: 'radioChoice',
type: 'autocomplete',
label: 'Rechercher dans :',
choices: [
{ id: 'TEXT', label: 'Corps du document' },
{ id: 'DESCRIPTION', label: 'Titre du document' }
]
valueSetId: 'docSearchBy',
singleChoice: true,
valueSetData: [
{ id: SearchByTypes.TEXT, label: 'Corps du document' },
{ id: SearchByTypes.DESCRIPTION, label: 'Titre du document' }
],
noOptionsText: 'Veuillez sélectionner le type de recherche désiré'
},
// {
// valueKey: 'searchBy',
// type: 'autocomplete',
// label: 'Rechercher dans :',
// valueSetId: 'docSearchBy',
// singleChoice: true,
// valueSetData: [
// { id: SearchByTypes.TEXT, label: 'Corps du document' },
// { id: SearchByTypes.DESCRIPTION, label: 'Titre du document' }
// ],
// noOptionsText: 'Veuillez sélectionner le type de recherche désiré'
// // buildInfo: {
// // // fhirKey: SearchByTypes.TEXT
// // }
// },
{
valueKey: 'search',
type: 'textWithCheck',
Expand Down

0 comments on commit e1ef5c9

Please sign in to comment.