update element
This commit is contained in:
@@ -221,7 +221,7 @@ async function getEnrollment(id: string) {
|
||||
const r = await fetch(`/~/api/enrollments/${id}`, {
|
||||
method: 'GET'
|
||||
})
|
||||
await new Promise((r) => setTimeout(r, 100))
|
||||
await new Promise((r) => setTimeout(r, 150))
|
||||
|
||||
return (await r.json()) as {
|
||||
cancel_policy?: any
|
||||
@@ -383,15 +383,15 @@ function RemoveDedupItem({
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Tem certeza absoluta?</AlertDialogTitle>
|
||||
<AlertDialogDescription className="space-y-2.5">
|
||||
<p>
|
||||
<AlertDialogDescription>
|
||||
Esta ação não pode ser desfeita. Isso remove a proteção contra
|
||||
duplicação permanentemente desta matrícula.
|
||||
</p>
|
||||
{daysRemaining && (
|
||||
<p>Proteção contra duplicação válida até {daysRemaining}</p>
|
||||
)}
|
||||
</AlertDialogDescription>
|
||||
{daysRemaining && (
|
||||
<AlertDialogDescription>
|
||||
Proteção contra duplicação válida até {daysRemaining}
|
||||
</AlertDialogDescription>
|
||||
)}
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter className="*:cursor-pointer">
|
||||
<AlertDialogCancel>Cancelar</AlertDialogCancel>
|
||||
@@ -410,6 +410,7 @@ function CancelItem({
|
||||
id,
|
||||
cancelPolicy,
|
||||
lock,
|
||||
onSuccess,
|
||||
...props
|
||||
}: ItemProps & {
|
||||
cancelPolicy?: object
|
||||
@@ -431,9 +432,9 @@ function CancelItem({
|
||||
|
||||
if (r.ok) {
|
||||
toast.info('A matrícula foi cancelada')
|
||||
}
|
||||
|
||||
setOpen(false)
|
||||
onSuccess?.()
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user