feat: add reusable prompt dialogs for frontend forms

This commit is contained in:
cesnimda
2026-03-22 14:14:29 +01:00
parent 758d2c6a0b
commit abac48847c
6 changed files with 134 additions and 8 deletions
@@ -194,7 +194,7 @@ export default function JobDetailsDialog({ open, jobId, onClose }: Props) {
disabled={refreshingAi}
onClick={async () => {
if (!jobId) return;
if (!window.confirm("Overwrite the current summary and skills with a freshly generated version?")) return;
if (!(await confirmAction("Overwrite the current summary and skills with a freshly generated version?", { title: "Refresh AI summary", confirmLabel: "Refresh" }))) return;
setRefreshingAi(true);
try {
const res = await api.post<JobApplication>(`/jobapplications/${jobId}/refresh-ai`);