add generic msg
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
CircleXIcon,
|
||||
ClockAlertIcon,
|
||||
ClockCheckIcon,
|
||||
ClockIcon,
|
||||
EllipsisIcon,
|
||||
PlusIcon,
|
||||
RocketIcon,
|
||||
@@ -218,6 +219,22 @@ function Timeline({
|
||||
events: any[]
|
||||
children: (props: any) => ReactNode
|
||||
}) {
|
||||
if (events.length === 0) {
|
||||
return (
|
||||
<Empty className="border border-dashed">
|
||||
<EmptyHeader>
|
||||
<EmptyMedia variant="icon">
|
||||
<ClockIcon />
|
||||
</EmptyMedia>
|
||||
<EmptyTitle>Nenhum agendamento aqui</EmptyTitle>
|
||||
<EmptyDescription>
|
||||
Ainda não há agendamentos. Quando houver, eles aparecerão aqui.
|
||||
</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{events.map(([run_at, items], index) => (
|
||||
@@ -285,6 +302,28 @@ function Scheduled({ items = [] }) {
|
||||
function Executed({ items = [] }) {
|
||||
return (
|
||||
<ItemGroup>
|
||||
{items.length === 0 ? (
|
||||
<Empty className="border border-dashed">
|
||||
<EmptyHeader>
|
||||
<EmptyMedia variant="icon">
|
||||
<BanIcon />
|
||||
</EmptyMedia>
|
||||
<EmptyTitle>Nenhum agendamento ainda</EmptyTitle>
|
||||
<EmptyDescription>
|
||||
Agende a matrícula dos seus colaboradores de forma rápida e
|
||||
organizada.
|
||||
</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
<EmptyContent>
|
||||
<Button asChild>
|
||||
<Link to="../enrollments/add">
|
||||
<PlusIcon /> Agendar
|
||||
</Link>
|
||||
</Button>
|
||||
</EmptyContent>
|
||||
</Empty>
|
||||
) : null}
|
||||
|
||||
{items.map(({ course, user, created_at }, index) => (
|
||||
<Fragment key={index}>
|
||||
<Item className="max-lg:px-0 max-lg:first:pt-0 max-lg:last:pb-0">
|
||||
|
||||
Reference in New Issue
Block a user