Revize 43d49a98
Přidáno uživatelem Jaroslav Hrubý před asi 2 roky(ů)
webapp/utils/alerts.ts | ||
---|---|---|
1 | 1 |
import Swal, { SweetAlertIcon, SweetAlertPosition } from 'sweetalert2'; |
2 | 2 |
import withReactContent from 'sweetalert2-react-content'; |
3 |
import { AxiosResponse } from 'axios'; |
|
3 | 4 |
|
4 | 5 |
const MySwal = withReactContent(Swal); |
5 | 6 |
|
... | ... | |
26 | 27 |
title: text, |
27 | 28 |
}); |
28 | 29 |
} |
30 |
|
|
31 |
export function ShowConfirmDelete(deleteAction: () => void, deleteSubjectLabel: string) { |
|
32 |
Swal.fire({ |
|
33 |
title: 'Opravdu si přejete smazat ' + deleteSubjectLabel + '?', |
|
34 |
showCancelButton: true, |
|
35 |
confirmButtonText: 'Smazat', |
|
36 |
}).then((result) => { |
|
37 |
if (result.isConfirmed) { |
|
38 |
deleteAction(); |
|
39 |
} |
|
40 |
}); |
|
41 |
} |
Také k dispozici: Unified diff
Modal windows for user edit, delete and assigned documents were implemented