@@ -44,6 +44,8 @@ function AssignmentsList() {
44
44
const searchableText = `
45
45
${ person . firstName ?. toLowerCase ( ) || '' }
46
46
${ person . lastName ?. toLowerCase ( ) || '' }
47
+ ${ person . email ?. toLowerCase ( ) || '' }
48
+ ${ person . phone ?. toLowerCase ( ) || '' }
47
49
${ person . affiliations ?. map ( aff => aff . name ?. toLowerCase ( ) ) . join ( ' ' ) || '' }
48
50
${ roomData . floor ?. toString ( ) . toLowerCase ( ) || '' }
49
51
${ roomData . number ?. toString ( ) . toLowerCase ( ) || '' }
@@ -151,7 +153,7 @@ function RoomAssignmentsTable({ assignments }) {
151
153
152
154
return (
153
155
< table className = "table table-striped table-bordered" >
154
- < thead className = "table-dark" >
156
+ < thead className = "table-dark" >
155
157
< tr >
156
158
< th scope = "col" > Piano</ th >
157
159
< th scope = "col" > Stanza</ th >
@@ -162,7 +164,7 @@ function RoomAssignmentsTable({ assignments }) {
162
164
< tbody >
163
165
{ assignments . map ( ( assignment ) => {
164
166
const { person, room, startDate, endDate } = assignment ;
165
- const { firstName, lastName, affiliations } = person ;
167
+ const { firstName, lastName, affiliations, email , phone } = person ;
166
168
const roomData = room [ 0 ] || { } ;
167
169
168
170
const period =
@@ -174,12 +176,16 @@ function RoomAssignmentsTable({ assignments }) {
174
176
? `Fino al ${ myDateFormat ( endDate ) } `
175
177
: "" ;
176
178
179
+ const affiliationNames = affiliations . map ( ( aff ) => aff . name ) . join ( ", " ) ;
180
+ const contactDetails = [ phone , email ] . filter ( Boolean ) . join ( " | " ) ;
181
+
177
182
return (
178
183
< tr key = { assignment . _id } >
179
184
< td > { roomData . floor } </ td >
180
185
< td > { roomData . number } </ td >
181
186
< td >
182
- { firstName } { lastName } ({ affiliations . map ( ( aff ) => aff . name ) . join ( ", " ) } )
187
+ { firstName } { lastName } ({ affiliationNames }
188
+ { contactDetails ? `, ${ contactDetails } ` : "" } )
183
189
</ td >
184
190
< td > { period } </ td >
185
191
</ tr >
0 commit comments