Skip to content

Commit

Permalink
fix(ExpandedAttributes): Translated label was forgotten for flexsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
JF-Cozy committed Mar 30, 2023
1 parent 2de18fe commit 46491bc
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions react/MuiCozyTheme/ListItem/ExpandedAttributes/helpers.js
Expand Up @@ -11,7 +11,18 @@ export const normalizeExpandedAttribute = attr =>
// attributes not considered as expanded attributes
export const notExpandedAttributes = {
'io.cozy.contacts': ['fullname', 'civility', 'note'],
'io.cozy.files': ['name', 'flexsearchProps:translated:qualificationLabel']
'io.cozy.files': [
'name',
'flexsearchProps:translated:qualificationLabel',
'flexsearchProps:translated:refTaxIncome',
'flexsearchProps:translated:contractType',
'flexsearchProps:translated:driverLicense',
'flexsearchProps:translated:paymentProofFamilyAllowance',
'flexsearchProps:translated:vehicleRegistration',
'flexsearchProps:translated:nationalIdCard',
'flexsearchProps:translated:bankDetails',
'flexsearchProps:translated:passport'
]
}

// attributes that we want to display if no attribute of the document is related to the search
Expand All @@ -30,16 +41,14 @@ export const defaultExpandedAttributes = {
'metadata.CObtentionDate',
'metadata.DObtentionDate',
'metadata.obtentionDate',
'metadata.issueDate',
'metadata.datetime',
'metadata.expirationDate',
'metadata.country',
'metadata.refTaxIncome',
'metadata.contractType'
]
}

export const hasAllElement = (arr1, arr2) => arr1.every(x => arr2.includes(x))
export const hasAllElement = (arr1, arr2) => arr1?.every(x => arr2.includes(x))

export const makeDefaultExpandedAttributes = (doc, expandedAttributes) => {
const doctype = doc?._type
Expand Down

0 comments on commit 46491bc

Please sign in to comment.