fix(frontend): Fix all type issues
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user