mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
refactor(dav): migrate UserAvailability to Typescript and script-setup
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
7bcb1b4a4c
commit
b856adee88
1 changed files with 15 additions and 26 deletions
|
|
@ -2,42 +2,31 @@
|
|||
- SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
||||
- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-->
|
||||
|
||||
<script setup lang="ts">
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import { t } from '@nextcloud/l10n'
|
||||
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
|
||||
import AbsenceForm from '../components/AbsenceForm.vue'
|
||||
import AvailabilityForm from '../components/AvailabilityForm.vue'
|
||||
|
||||
const hideAbsenceSettings = loadState('dav', 'hide_absence_settings', true)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<NcSettingsSection
|
||||
id="availability"
|
||||
:name="$t('dav', 'Availability')"
|
||||
:description="$t('dav', 'If you configure your working hours, other people will see when you are out of office when they book a meeting.')">
|
||||
:name="t('dav', 'Availability')"
|
||||
:description="t('dav', 'If you configure your working hours, other people will see when you are out of office when they book a meeting.')">
|
||||
<AvailabilityForm />
|
||||
</NcSettingsSection>
|
||||
<NcSettingsSection
|
||||
v-if="!hideAbsenceSettings"
|
||||
id="absence"
|
||||
:name="$t('dav', 'Absence')"
|
||||
:description="$t('dav', 'Configure your next absence period.')">
|
||||
:name="t('dav', 'Absence')"
|
||||
:description="t('dav', 'Configure your next absence period.')">
|
||||
<AbsenceForm />
|
||||
</NcSettingsSection>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
|
||||
import AbsenceForm from '../components/AbsenceForm.vue'
|
||||
import AvailabilityForm from '../components/AvailabilityForm.vue'
|
||||
|
||||
export default {
|
||||
name: 'UserAvailability',
|
||||
components: {
|
||||
NcSettingsSection,
|
||||
AbsenceForm,
|
||||
AvailabilityForm,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
hideAbsenceSettings: loadState('dav', 'hide_absence_settings', true),
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue