Skip to content

Commit

Permalink
fixup! feat: implement resources and rooms overview
Browse files Browse the repository at this point in the history
Signed-off-by: greta <gretadoci@gmail.com>
  • Loading branch information
GretaD committed Jul 8, 2024
1 parent 0f4eb1c commit 17655ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
14 changes: 7 additions & 7 deletions src/components/Editor/FreeBusy/RoomAvailabilityList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<NcDialog v-if="showDialog"
<NcDialog :show="showDialog"
size="large"
:name="t('calendar', 'Availability of rooms')"
@closing="handleClose">
:name="t('calendar', 'Availability of rooms')">
<div class="modal__content__header">
<h2>{{ t('calendar', 'Find a room') }}</h2>
<table>
Expand Down Expand Up @@ -78,11 +77,14 @@ export default {
type: Date,
required: true,
},
showDialog: {
type: Boolean,
default: true,
},
},
data() {
return {
showRoomAvailabilityModal: false,
showDialog: true,
selectedRooms: [],
}
},
Expand All @@ -108,11 +110,9 @@ export default {
this.selectedRooms = [room]
this.showRoomAvailabilityModal = true
},
handleClose() {
this.showDialog = false
},
closeFreeBusy() {
this.showRoomAvailabilityModal = false
this.$emit('update:showDialog', false)
},
},
}
Expand Down
9 changes: 5 additions & 4 deletions src/components/Editor/Resources/ResourceListSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
{{ t('calendar', 'Room availability') }}
</NcButton>

<RoomAvailabilityList v-if="showRoomAvailabilityModel"
<RoomAvailabilityList v-if="showRoomAvailabilityModal"
:calendar-object-instance="calendarObjectInstance"
:start-date="calendarObjectInstance.startDate"
:end-date="calendarObjectInstance.endDate" />
:end-date="calendarObjectInstance.endDate"
:show-dialog="showRoomAvailabilityModal" />
<NcSelect class="resource-search__multiselect"
:options="matches"
:searchable="true"
Expand Down Expand Up @@ -119,7 +120,7 @@ export default {
isAccessible: false,
hasProjector: false,
hasWhiteboard: false,
showRoomAvailabilityModel: false,
showRoomAvailabilityModal: false,
rooms: [],

Check warning on line 124 in src/components/Editor/Resources/ResourceListSearch.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Resources/ResourceListSearch.vue#L124

Added line #L124 was not covered by tests
}
},
Expand Down Expand Up @@ -147,7 +148,7 @@ export default {
},
methods: {
openRoomAvailability() {
this.showRoomAvailabilityModel = true
this.showRoomAvailabilityModal = true

Check warning on line 151 in src/components/Editor/Resources/ResourceListSearch.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Resources/ResourceListSearch.vue#L151

Added line #L151 was not covered by tests
},
findResources: debounce(async function(query) {
this.isLoading = true
Expand Down

0 comments on commit 17655ef

Please sign in to comment.