|
2 | 2 | - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors |
3 | 3 | - SPDX-License-Identifier: AGPL-3.0-or-later |
4 | 4 | --> |
5 | | -<template> |
6 | | - <div> |
7 | | - <CalendarAvailability |
8 | | - :slots.sync="slots" |
9 | | - :loading="loading" |
10 | | - :l10n-to="t('dav', 'to')" |
11 | | - :l10n-delete-slot="t('dav', 'Delete slot')" |
12 | | - :l10n-empty-day="t('dav', 'No working hours set')" |
13 | | - :l10n-add-slot="t('dav', 'Add slot')" |
14 | | - :l10n-week-day-list-label="t('dav', 'Weekdays')" |
15 | | - :l10n-monday="t('dav', 'Monday')" |
16 | | - :l10n-tuesday="t('dav', 'Tuesday')" |
17 | | - :l10n-wednesday="t('dav', 'Wednesday')" |
18 | | - :l10n-thursday="t('dav', 'Thursday')" |
19 | | - :l10n-friday="t('dav', 'Friday')" |
20 | | - :l10n-saturday="t('dav', 'Saturday')" |
21 | | - :l10n-sunday="t('dav', 'Sunday')" |
22 | | - :l10n-start-picker-label="(dayName) => t('dav', 'Pick a start time for {dayName}', { dayName })" |
23 | | - :l10n-end-picker-label="(dayName) => t('dav', 'Pick a end time for {dayName}', { dayName })" /> |
24 | | - |
25 | | - <NcCheckboxRadioSwitch v-model="automated"> |
26 | | - {{ t('dav', 'Automatically set user status to "Do not disturb" outside of availability to mute all notifications.') }} |
27 | | - </NcCheckboxRadioSwitch> |
28 | | - |
29 | | - <NcButton |
30 | | - :disabled="loading || saving" |
31 | | - variant="primary" |
32 | | - @click="save"> |
33 | | - {{ t('dav', 'Save') }} |
34 | | - </NcButton> |
35 | | - </div> |
36 | | -</template> |
37 | 5 |
|
38 | 6 | <script setup lang="ts"> |
39 | 7 | import { CalendarAvailability } from '@nextcloud/calendar-availability-vue' |
40 | 8 | import { getCapabilities } from '@nextcloud/capabilities' |
41 | | -import { |
42 | | - showError, |
43 | | - showSuccess, |
44 | | -} from '@nextcloud/dialogs' |
| 9 | +import { showError, showSuccess } from '@nextcloud/dialogs' |
45 | 10 | import { loadState } from '@nextcloud/initial-state' |
46 | 11 | import { t } from '@nextcloud/l10n' |
47 | 12 | import { onMounted, ref } from 'vue' |
@@ -106,6 +71,39 @@ async function save() { |
106 | 71 | } |
107 | 72 | </script> |
108 | 73 |
|
| 74 | +<template> |
| 75 | + <div> |
| 76 | + <CalendarAvailability |
| 77 | + v-model:slots="slots" |
| 78 | + :loading="loading" |
| 79 | + :l10n-to="t('dav', 'to')" |
| 80 | + :l10n-delete-slot="t('dav', 'Delete slot')" |
| 81 | + :l10n-empty-day="t('dav', 'No working hours set')" |
| 82 | + :l10n-add-slot="t('dav', 'Add slot')" |
| 83 | + :l10n-week-day-list-label="t('dav', 'Weekdays')" |
| 84 | + :l10n-monday="t('dav', 'Monday')" |
| 85 | + :l10n-tuesday="t('dav', 'Tuesday')" |
| 86 | + :l10n-wednesday="t('dav', 'Wednesday')" |
| 87 | + :l10n-thursday="t('dav', 'Thursday')" |
| 88 | + :l10n-friday="t('dav', 'Friday')" |
| 89 | + :l10n-saturday="t('dav', 'Saturday')" |
| 90 | + :l10n-sunday="t('dav', 'Sunday')" |
| 91 | + :l10n-start-picker-label="(dayName) => t('dav', 'Pick a start time for {dayName}', { dayName })" |
| 92 | + :l10n-end-picker-label="(dayName) => t('dav', 'Pick a end time for {dayName}', { dayName })" /> |
| 93 | + |
| 94 | + <NcCheckboxRadioSwitch v-model="automated"> |
| 95 | + {{ t('dav', 'Automatically set user status to "Do not disturb" outside of availability to mute all notifications.') }} |
| 96 | + </NcCheckboxRadioSwitch> |
| 97 | + |
| 98 | + <NcButton |
| 99 | + :disabled="loading || saving" |
| 100 | + variant="primary" |
| 101 | + @click="save"> |
| 102 | + {{ t('dav', 'Save') }} |
| 103 | + </NcButton> |
| 104 | + </div> |
| 105 | +</template> |
| 106 | + |
109 | 107 | <style lang="scss" scoped> |
110 | 108 | :deep(.availability-day) { |
111 | 109 | padding: 0 10px 0 10px; |
|
0 commit comments