2626 :clear-search-on-blur =" () => false"
2727 :user-select =" true"
2828 :options =" options"
29- @search =" asyncFind"
30- >
29+ @search =" asyncFind" >
3130 <template #no-options =" { search } " >
3231 {{ search ?$t('dav', 'No results.') : $t('dav', 'Start typing.') }}
3332 </template >
5150</template >
5251
5352<script >
53+ import { getCurrentUser } from ' @nextcloud/auth'
54+ import { showError , showSuccess } from ' @nextcloud/dialogs'
55+ import { loadState } from ' @nextcloud/initial-state'
56+ import { generateOcsUrl } from ' @nextcloud/router'
57+ import { ShareType } from ' @nextcloud/sharing'
58+ import { formatDateAsYMD } from ' ../utils/date.js'
59+ import axios from ' @nextcloud/axios'
60+ import debounce from ' debounce'
61+ import logger from ' ../service/logger.js'
62+
5463import NcButton from ' @nextcloud/vue/dist/Components/NcButton.js'
5564import NcTextField from ' @nextcloud/vue/dist/Components/NcTextField.js'
5665import NcTextArea from ' @nextcloud/vue/dist/Components/NcTextArea.js'
5766import NcSelect from ' @nextcloud/vue/dist/Components/NcSelect.js'
5867import NcDateTimePickerNative from ' @nextcloud/vue/dist/Components/NcDateTimePickerNative.js'
59- import { generateOcsUrl } from ' @nextcloud/router'
60- import { getCurrentUser } from ' @nextcloud/auth'
61- import debounce from ' debounce'
62- import axios from ' @nextcloud/axios'
63- import { formatDateAsYMD } from ' ../utils/date.js'
64- import { loadState } from ' @nextcloud/initial-state'
65- import { showError , showSuccess } from ' @nextcloud/dialogs'
66- import { Type as ShareTypes } from ' @nextcloud/sharing'
67-
68- import logger from ' ../service/logger.js'
6968
7069export default {
7170 name: ' AbsenceForm' ,
@@ -74,17 +73,17 @@ export default {
7473 NcTextField,
7574 NcTextArea,
7675 NcDateTimePickerNative,
77- NcSelect
76+ NcSelect,
7877 },
7978 data () {
80- const { firstDay , lastDay , status , message , replacementUserId , replacementUserDisplayName } = loadState (' dav' , ' absence' , {})
79+ const { firstDay , lastDay , status , message , replacementUserId , replacementUserDisplayName } = loadState (' dav' , ' absence' , {})
8180 return {
8281 loading: false ,
8382 status: status ?? ' ' ,
8483 message: message ?? ' ' ,
8584 firstDay: firstDay ? new Date (firstDay) : new Date (),
8685 lastDay: lastDay ? new Date (lastDay) : null ,
87- replacementUserId: replacementUserId ,
86+ replacementUserId,
8887 replacementUser: replacementUserId ? { user: replacementUserId, displayName: replacementUserDisplayName } : null ,
8988 searchLoading: false ,
9089 options: [],
@@ -126,10 +125,10 @@ export default {
126125 return {
127126 user: result .uuid || result .value .shareWith ,
128127 displayName: result .name || result .label ,
129- subtitle: result .dsc | ' '
128+ subtitle: result .dsc | ' ' ,
130129 }
131130 },
132-
131+
133132 async asyncFind (query ) {
134133 this .searchLoading = true
135134 await this .debounceGetSuggestions (query .trim ())
@@ -142,7 +141,7 @@ export default {
142141 async getSuggestions (search ) {
143142
144143 const shareType = [
145- ShareTypes .SHARE_TYPE_USER ,
144+ ShareType .SHARE_TYPE_USER ,
146145 ]
147146
148147 let request = null
0 commit comments