mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -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>
|
<template>
|
||||||
<Page wide>
|
<Page wide>
|
||||||
<NotFound v-if="!$isGranted('panel') && !$isGranted('external')" />
|
<NotFound v-if="!$isGranted('panel') && !$isGranted('external')" />
|
||||||
<div v-else>
|
<form @submit="save" v-else>
|
||||||
<p class="d-flex justify-content-between">
|
<p class="d-flex justify-content-between">
|
||||||
<nuxt-link to="/admin">
|
<nuxt-link to="/admin">
|
||||||
<Icon v="user-cog" />
|
<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"
|
class="form-control form-control-sm"
|
||||||
style="min-width: 3rem"
|
style="min-width: 3rem"
|
||||||
:disabled="dt(year, +m) < closed || dt(year, +m) > max"
|
:disabled="dt(year, +m) < closed || dt(year, +m) > max"
|
||||||
|
required
|
||||||
@focus="focusMonth = m;focusArea = areas.indexOf(area)"
|
@focus="focusMonth = m;focusArea = areas.indexOf(area)"
|
||||||
@keydown="cellKeydown"
|
@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="">
|
<input id="notes" v-model="transferDetails.notes" type="text" class="form-control" placeholder="">
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<button type="button" class="btn btn-primary" :disabled="!transferMethod" @click="save">
|
<button type="submit" class="btn btn-primary" :disabled="!transferMethod">
|
||||||
<Icon v="save" />
|
<Icon v="save" />
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</form>
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
@ -46,7 +46,7 @@ const hoursSummary = computed((): Record<string, number> => {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (const h of Object.values(timesheet[parseInt(year)][month])) {
|
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