fix(audit): P2 frontend any→concrete types (181→61), heroicons→lucide-react, missing type exports, toast API, Select options, TaskStatus types; P2-9 hooks.py type annotations
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { asError } from '@/utils/errorTypes';
|
||||
import React, { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
@@ -474,8 +475,8 @@ function VersionHistoryModal({
|
||||
try {
|
||||
await restoreMutation.mutateAsync({ id: automationId, versionId });
|
||||
toast.success(t('automation.versionRestored'));
|
||||
} catch (err: any) {
|
||||
toast.error(err.message || t('common.error'));
|
||||
} catch (err: unknown) { const errObj = asError(err);
|
||||
toast.error(errObj.message || t('common.error'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -548,8 +549,8 @@ export function AutomationDashboardPage() {
|
||||
}
|
||||
setShowForm(false);
|
||||
setEditingAutomation(undefined);
|
||||
} catch (err: any) {
|
||||
toast.error(err.message || t('common.error'));
|
||||
} catch (err: unknown) { const errObj = asError(err);
|
||||
toast.error(errObj.message || t('common.error'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -559,8 +560,8 @@ export function AutomationDashboardPage() {
|
||||
await deleteMutation.mutateAsync(confirmDelete.id);
|
||||
toast.success(t('automation.deleted'));
|
||||
setConfirmDelete(null);
|
||||
} catch (err: any) {
|
||||
toast.error(err.message || t('common.error'));
|
||||
} catch (err: unknown) { const errObj = asError(err);
|
||||
toast.error(errObj.message || t('common.error'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -568,8 +569,8 @@ export function AutomationDashboardPage() {
|
||||
try {
|
||||
await executeMutation.mutateAsync(id);
|
||||
toast.success(t('automation.executed'));
|
||||
} catch (err: any) {
|
||||
toast.error(err.message || t('common.error'));
|
||||
} catch (err: unknown) { const errObj = asError(err);
|
||||
toast.error(errObj.message || t('common.error'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -577,8 +578,8 @@ export function AutomationDashboardPage() {
|
||||
try {
|
||||
await dryRunMutation.mutateAsync(id);
|
||||
toast.success(t('automation.dryRunSuccess'));
|
||||
} catch (err: any) {
|
||||
toast.error(err.message || t('common.error'));
|
||||
} catch (err: unknown) { const errObj = asError(err);
|
||||
toast.error(errObj.message || t('common.error'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user