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