mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
fix: code mort
This commit is contained in:
@ -80,7 +80,6 @@ export default function Page({ params: { locale } }) {
|
|||||||
const [currentSchoolHistoricalYearPage, setCurrentSchoolHistoricalYearPage] =
|
const [currentSchoolHistoricalYearPage, setCurrentSchoolHistoricalYearPage] =
|
||||||
useState(1);
|
useState(1);
|
||||||
const [searchTerm, setSearchTerm] = useState('');
|
const [searchTerm, setSearchTerm] = useState('');
|
||||||
const [alertPage, setAlertPage] = useState(false);
|
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const [activeTab, setActiveTab] = useState('currentYear');
|
const [activeTab, setActiveTab] = useState('currentYear');
|
||||||
const [totalCurrentYear, setTotalCurrentYear] = useState(0);
|
const [totalCurrentYear, setTotalCurrentYear] = useState(0);
|
||||||
@ -666,86 +665,10 @@ export default function Page({ params: { locale } }) {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const columnsSubscribed = [
|
|
||||||
{ name: t('studentName'), transform: (row) => row.student.last_name },
|
|
||||||
{ name: t('studentFistName'), transform: (row) => row.student.first_name },
|
|
||||||
{
|
|
||||||
name: t('lastUpdateDate'),
|
|
||||||
transform: (row) => row.updated_date_formated,
|
|
||||||
},
|
|
||||||
{ name: t('class'), transform: (row) => row.student.first_name },
|
|
||||||
{
|
|
||||||
name: t('registrationFileStatus'),
|
|
||||||
transform: (row) => (
|
|
||||||
<div className="flex justify-center items-center h-full">
|
|
||||||
<StatusLabel
|
|
||||||
status={row.status}
|
|
||||||
onChange={(newStatus) =>
|
|
||||||
updateStatusAction(row.student.id, newStatus)
|
|
||||||
}
|
|
||||||
showDropdown={false}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Actions',
|
|
||||||
transform: (row) => (
|
|
||||||
<DropdownMenu
|
|
||||||
buttonContent={
|
|
||||||
<MoreVertical
|
|
||||||
size={20}
|
|
||||||
className="text-gray-400 hover:text-gray-600"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
items={[
|
|
||||||
{
|
|
||||||
label: (
|
|
||||||
<>
|
|
||||||
<CheckCircle size={16} className="mr-2" /> Rattacher
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
onClick: () => openModalAssociationEleve(row.student),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: (
|
|
||||||
<>
|
|
||||||
<Archive size={16} className="mr-2 text-red-700" /> Archiver
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
onClick: () =>
|
|
||||||
archiveFicheInscription(
|
|
||||||
row.student.id,
|
|
||||||
row.student.last_name,
|
|
||||||
row.student.first_name
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
buttonClassName="text-gray-400 hover:text-gray-600"
|
|
||||||
menuClassName="absolute right-0 mt-2 w-48 bg-white border border-gray-200 rounded-md shadow-lg z-10 flex flex-col items-center"
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return <Loader />;
|
return <Loader />;
|
||||||
} else {
|
}
|
||||||
if (
|
|
||||||
registrationForms.length === 0 &&
|
|
||||||
registrationFormsDataHistorical.length === 0 &&
|
|
||||||
alertPage
|
|
||||||
) {
|
|
||||||
return (
|
|
||||||
<div className="p-8">
|
|
||||||
<AlertWithModal
|
|
||||||
title={t('information')}
|
|
||||||
message={t('no_records') + ' ' + t('create_first_record')}
|
|
||||||
buttonText={t('add_button')}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return (
|
return (
|
||||||
<div className="p-8">
|
<div className="p-8">
|
||||||
<div className="border-b border-gray-200 mb-6">
|
<div className="border-b border-gray-200 mb-6">
|
||||||
@ -895,5 +818,3 @@ export default function Page({ params: { locale } }) {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user