mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 20:52:14 +01:00
add break time entries and simplified time tracker ui
This commit is contained in:
@@ -17,15 +17,18 @@ const queryClient = useQueryClient();
|
||||
const form = ref<{
|
||||
prevent_overlapping_time_entries: boolean;
|
||||
employees_can_manage_tasks: boolean;
|
||||
breaks_enabled: boolean;
|
||||
}>({
|
||||
prevent_overlapping_time_entries: false,
|
||||
employees_can_manage_tasks: false,
|
||||
breaks_enabled: false,
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
form.value.prevent_overlapping_time_entries =
|
||||
organization.value?.prevent_overlapping_time_entries ?? false;
|
||||
form.value.employees_can_manage_tasks = organization.value?.employees_can_manage_tasks ?? false;
|
||||
form.value.breaks_enabled = organization.value?.breaks_enabled ?? false;
|
||||
});
|
||||
|
||||
const mutation = useMutation({
|
||||
@@ -39,6 +42,7 @@ async function submit() {
|
||||
await mutation.mutateAsync({
|
||||
prevent_overlapping_time_entries: form.value.prevent_overlapping_time_entries,
|
||||
employees_can_manage_tasks: form.value.employees_can_manage_tasks,
|
||||
breaks_enabled: form.value.breaks_enabled,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -69,6 +73,10 @@ async function submit() {
|
||||
>Allow Employees to manage tasks</FieldLabel
|
||||
>
|
||||
</Field>
|
||||
<Field orientation="horizontal">
|
||||
<Checkbox id="breaksEnabled" v-model:checked="form.breaks_enabled" />
|
||||
<FieldLabel for="breaksEnabled">Allow tracking breaks</FieldLabel>
|
||||
</Field>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user