mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 03:57:47 -04:00
(admin) avoid empty strings in timesheets
This commit is contained in:
parent
efcd383c1a
commit
746ec76a3f
@ -153,7 +153,7 @@ const sumCells = (area: typeof areas[number] | undefined, month: keyof typeof mo
|
||||
<template>
|
||||
<Page wide>
|
||||
<NotFound v-if="!$isGranted('panel') && !$isGranted('external')" />
|
||||
<div v-else>
|
||||
<form @submit="save" v-else>
|
||||
<p class="d-flex justify-content-between">
|
||||
<nuxt-link to="/admin">
|
||||
<Icon v="user-cog" />
|
||||
@ -212,6 +212,7 @@ const sumCells = (area: typeof areas[number] | undefined, month: keyof typeof mo
|
||||
class="form-control form-control-sm"
|
||||
style="min-width: 3rem"
|
||||
:disabled="dt(year, +m) < closed || dt(year, +m) > max"
|
||||
required
|
||||
@focus="focusMonth = m;focusArea = areas.indexOf(area)"
|
||||
@keydown="cellKeydown"
|
||||
>
|
||||
@ -289,10 +290,10 @@ const sumCells = (area: typeof areas[number] | undefined, month: keyof typeof mo
|
||||
<input id="notes" v-model="transferDetails.notes" type="text" class="form-control" placeholder="">
|
||||
</div>
|
||||
</section>
|
||||
<button type="button" class="btn btn-primary" :disabled="!transferMethod" @click="save">
|
||||
<button type="submit" class="btn btn-primary" :disabled="!transferMethod">
|
||||
<Icon v="save" />
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</Page>
|
||||
</template>
|
||||
|
@ -46,7 +46,7 @@ const hoursSummary = computed((): Record<string, number> => {
|
||||
continue;
|
||||
}
|
||||
for (const h of Object.values(timesheet[parseInt(year)][month])) {
|
||||
hours += h;
|
||||
hours += parseInt(h as any);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user