chore: application prettier

This commit is contained in:
Luc SORIGNET
2025-04-15 19:37:47 +02:00
parent dd0884bbce
commit f7666c894b
174 changed files with 10609 additions and 8760 deletions

View File

@ -22,25 +22,25 @@ const StatusLabel = ({ status, onChange, showDropdown = true, parent }) => {
{ value: 7, label: 'En attente SEPA' },
];
const currentStatus = statusOptions.find(option => option.value === status);
const currentStatus = statusOptions.find((option) => option.value === status);
// Définir les couleurs en fonction du statut
const getStatusClass = () => {
if (parent) {
return (
status === 2 && 'bg-orange-50 text-orange-600' ||
status === 3 && 'bg-purple-50 text-purple-600' ||
status === 7 && 'bg-yellow-50 text-yellow-600'
(status === 2 && 'bg-orange-50 text-orange-600') ||
(status === 3 && 'bg-purple-50 text-purple-600') ||
(status === 7 && 'bg-yellow-50 text-yellow-600')
);
}
return (
status === 1 && 'bg-blue-50 text-blue-600' ||
status === 2 && 'bg-orange-50 text-orange-600' ||
status === 3 && 'bg-purple-50 text-purple-600' ||
status === 4 && 'bg-red-50 text-red-600' ||
status === 5 && 'bg-green-50 text-green-600' ||
status === 6 && 'bg-red-50 text-red-600' ||
status === 7 && 'bg-yellow-50 text-yellow-600'
(status === 1 && 'bg-blue-50 text-blue-600') ||
(status === 2 && 'bg-orange-50 text-orange-600') ||
(status === 3 && 'bg-purple-50 text-purple-600') ||
(status === 4 && 'bg-red-50 text-red-600') ||
(status === 5 && 'bg-green-50 text-green-600') ||
(status === 6 && 'bg-red-50 text-red-600') ||
(status === 7 && 'bg-yellow-50 text-yellow-600')
);
};
@ -51,10 +51,13 @@ const StatusLabel = ({ status, onChange, showDropdown = true, parent }) => {
buttonContent={
<>
{currentStatus ? currentStatus.label : 'Statut inconnu'}
<ChevronUp size={16} className={`transform transition-transform duration-200 ${dropdownOpen ? 'rotate-180' : 'rotate-90'}`} />
<ChevronUp
size={16}
className={`transform transition-transform duration-200 ${dropdownOpen ? 'rotate-180' : 'rotate-90'}`}
/>
</>
}
items={statusOptions.map(option => ({
items={statusOptions.map((option) => ({
label: option.label,
onClick: () => onChange(option.value),
}))}
@ -64,7 +67,9 @@ const StatusLabel = ({ status, onChange, showDropdown = true, parent }) => {
setDropdownOpen={setDropdownOpen}
/>
) : (
<div className={`w-[150px] flex items-center justify-center gap-2 px-2 py-2 rounded-md text-sm text-center font-medium ${getStatusClass()}`}>
<div
className={`w-[150px] flex items-center justify-center gap-2 px-2 py-2 rounded-md text-sm text-center font-medium ${getStatusClass()}`}
>
{currentStatus ? currentStatus.label : 'Statut inconnu'}
</div>
)}
@ -72,4 +77,4 @@ const StatusLabel = ({ status, onChange, showDropdown = true, parent }) => {
);
};
export default StatusLabel;
export default StatusLabel;