fix(frontend): Fix all type issues

This commit is contained in:
2025-11-15 08:40:09 +01:00
parent 1c8815d4ce
commit daf619d6eb
16 changed files with 88 additions and 56 deletions

View File

@@ -92,7 +92,7 @@ export const useNotification = () => {
try {
await markNotificationAsRead(notificationId, organizationId.value)
const index = notifications.value.findIndex((n) => n.id === notificationId)
if (index !== -1) {
if (index !== -1 && notifications.value[index]) {
notifications.value[index].isRead = true
}
// Remove from unread notifications

View File

@@ -10,7 +10,7 @@ export function useApplicationFormValidator() {
const highestComplianceNumber = Math.max(
...complianceStatusValues.map((complianceStatus) => Object.values(ComplianceStatus).indexOf(complianceStatus))
)
return Object.values(ComplianceStatus)[highestComplianceNumber]
return Object.values(ComplianceStatus)[highestComplianceNumber] ?? ComplianceStatus.NonCritical
}
function validateFormElements(formElements: FormElementDto[]): Map<FormElementId, ComplianceStatus> {

View File

@@ -3,7 +3,7 @@ export const isChecking = ref(false)
export const lastCheckTime = ref<Date | null>(null)
export function useServerHealth() {
const checkInterval = ref<NodeJS.Timeout | null>(null)
const checkInterval = ref<ReturnType<typeof setInterval> | null>(null)
const healthCheckUrl = '/api/actuator/health'
async function checkServerHealth(): Promise<boolean> {