Skip to content

Commit

Permalink
fix: createdAt in history
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud AMBROSELLI committed Sep 14, 2023
1 parent fda576d commit f57108c
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 36 deletions.
20 changes: 11 additions & 9 deletions dashboard/src/components/ActionModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -758,15 +758,17 @@ function ActionHistory({ action }) {
</tr>
);
})}
<tr key={action.createdAt} className="tw-cursor-default">
<td>{dayjsInstance(action.createdAt).format('DD/MM/YYYY HH:mm')}</td>
<td>
<UserName id={action.user} />
</td>
<td className="tw-max-w-prose">
<p>Création de l'action</p>
</td>
</tr>
{!!action?.createdAt && (
<tr key={action.createdAt} className="tw-cursor-default">
<td>{dayjsInstance(action.createdAt).format('DD/MM/YYYY HH:mm')}</td>
<td>
<UserName id={action.user} />
</td>
<td className="tw-max-w-prose">
<p>Création de l'action</p>
</td>
</tr>
)}
</tbody>
</table>
</div>
Expand Down
20 changes: 11 additions & 9 deletions dashboard/src/components/ConsultationModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,15 +654,17 @@ function ConsultationHistory({ consultation }) {
</tr>
);
})}
<tr key={consultation.createdAt} className="tw-cursor-default">
<td>{dayjsInstance(consultation.createdAt).format('DD/MM/YYYY HH:mm')}</td>
<td>
<UserName id={consultation.user} />
</td>
<td className="tw-max-w-prose">
<p>Création de la consultation</p>
</td>
</tr>
{consultation?.createdAt && (
<tr key={consultation.createdAt} className="tw-cursor-default">
<td>{dayjsInstance(consultation.createdAt).format('DD/MM/YYYY HH:mm')}</td>
<td>
<UserName id={consultation.user} />
</td>
<td className="tw-max-w-prose">
<p>Création de la consultation</p>
</td>
</tr>
)}
</tbody>
</table>
</div>
Expand Down
20 changes: 11 additions & 9 deletions dashboard/src/scenes/person/components/PersonHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,17 @@ export default function PersonHistory({ person }) {
</tr>
);
})}
<tr key={person.createdAt} className="tw-cursor-default">
<td>{dayjsInstance(person.createdAt).format('DD/MM/YYYY HH:mm')}</td>
<td>
<UserName id={person.user} />
</td>
<td className="tw-max-w-prose">
<p>Création de la personne</p>
</td>
</tr>
{person?.createdAt && (
<tr key={person.createdAt} className="tw-cursor-default">
<td>{dayjsInstance(person.createdAt).format('DD/MM/YYYY HH:mm')}</td>
<td>
<UserName id={person.user} />
</td>
<td className="tw-max-w-prose">
<p>Création de la personne</p>
</td>
</tr>
)}
</tbody>
</table>
</div>
Expand Down
20 changes: 11 additions & 9 deletions dashboard/src/scenes/person/components/TreatmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,15 +521,17 @@ function TreatmentHistory({ treatment }) {
</tr>
);
})}
<tr key={treatment.createdAt} className="tw-cursor-default">
<td>{dayjsInstance(treatment.createdAt).format('DD/MM/YYYY HH:mm')}</td>
<td>
<UserName id={treatment.user} />
</td>
<td className="tw-max-w-prose">
<p>Création du traitement</p>
</td>
</tr>
{!!treatment?.createdAt && (
<tr key={treatment.createdAt} className="tw-cursor-default">
<td>{dayjsInstance(treatment.createdAt).format('DD/MM/YYYY HH:mm')}</td>
<td>
<UserName id={treatment.user} />
</td>
<td className="tw-max-w-prose">
<p>Création du traitement</p>
</td>
</tr>
)}
</tbody>
</table>
</div>
Expand Down

0 comments on commit f57108c

Please sign in to comment.