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 May 24, 2024
1 parent dc26705 commit 0f76ecc
Show file tree
Hide file tree
Showing 4 changed files with 395 additions and 19 deletions.
114 changes: 100 additions & 14 deletions src/components/Editor/FreeBusy/RoomAvailability.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,50 @@
<template>
<NcModal size="large"
<NcDialog size="large"
:name="t('calendar', 'Availability of rooms')"
@close="closeRoomAvailability">
@closing="$emit('close')">
<div class="modal__content__header">
<h2>{{ t('calendar', 'Find a room') }}</h2>
<div v-for="room in rooms" :key="room.id">
<p>{{ room.displayName }}</p>
<div>
<div v-for="room in rooms" :key="room.id">
<p>{{ room.displayName }}</p>
</div>
</div>
<div class="busy_button">
<NcButton @click="findRoomAvailiability">
{{ t('calendar',' Check room availability') }}
<NcButton @click="openRoomAvailability">
{{ t('calendar', 'Check room availability') }}
</NcButton>
</div>
<RoomAvailabilityModal v-if="showRoomAvailabilityModel"
:start-date="calendarObjectInstance.startDate"
:end-date="calendarObjectInstance.endDate"
:rooms="calendarObjectInstance.rooms"
:calendar-object-instance="calendarObjectInstance" />
</div>
</NcModal>
</NcDialog>
</template>
<script>

Check warning on line 25 in src/components/Editor/FreeBusy/RoomAvailability.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/FreeBusy/RoomAvailability.vue#L24-L25

Added lines #L24 - L25 were not covered by tests
import { NcModal, NcButton } from '@nextcloud/vue'
import { NcButton, NcDialog } from '@nextcloud/vue'
import RoomAvailabilityModal from './RoomAvailabilityModal.vue'
export default {
name: 'RoomAvailability',
components: {
NcModal,
NcButton,

Check warning on line 31 in src/components/Editor/FreeBusy/RoomAvailability.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/FreeBusy/RoomAvailability.vue#L30-L31

Added lines #L30 - L31 were not covered by tests
NcDialog,
RoomAvailabilityModal,
},
props: {
calendarObjectInstance: {

Check warning on line 36 in src/components/Editor/FreeBusy/RoomAvailability.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/FreeBusy/RoomAvailability.vue#L35-L36

Added lines #L35 - L36 were not covered by tests
type: Object,
required: true,
},
startDate: {
type: Date,
required: true,
},
endDate: {

Check warning on line 44 in src/components/Editor/FreeBusy/RoomAvailability.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/FreeBusy/RoomAvailability.vue#L41-L44

Added lines #L41 - L44 were not covered by tests
type: Date,
required: true,
},
},
data() {
return {
Expand All @@ -34,15 +57,78 @@ export default {
},
},
methods: {
closeRoomAvailability() {
this.showRoomAvailabilityModel = false
},
findRoomAvailiability() {
//
openRoomAvailability() {
this.showRoomAvailabilityModel = true
},
},
}
</script>
<style scoped lang="scss">
.icon-close {

Check warning on line 67 in src/components/Editor/FreeBusy/RoomAvailability.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/FreeBusy/RoomAvailability.vue#L66-L67

Added lines #L66 - L67 were not covered by tests
display: block;
height: 100%;
}
.modal__content {
padding: 50px;
//when the calendar is open, it's cut at the bottom, adding a margin fixes it
margin-bottom: 95px;
&__actions{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
&__select{
width: 260px;
}
&__date{
display: flex;
justify-content: space-between;
align-items: center;
& > *{
margin-left: 5px;
}
}

Check warning on line 90 in src/components/Editor/FreeBusy/RoomAvailability.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/FreeBusy/RoomAvailability.vue#L90

Added line #L90 was not covered by tests
}
&__header{
h3{
font-weight: 500;
}
margin-bottom: 20px;
&__attendees{
&__user-bubble{

Check warning on line 98 in src/components/Editor/FreeBusy/RoomAvailability.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/FreeBusy/RoomAvailability.vue#L98

Added line #L98 was not covered by tests
margin-right: 5px;
}
}
}
&__footer{
display: flex;
justify-content: space-between;
align-items: center;

Check warning on line 106 in src/components/Editor/FreeBusy/RoomAvailability.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/FreeBusy/RoomAvailability.vue#L105-L106

Added lines #L105 - L106 were not covered by tests
margin-top: 20px;
&__title{
h3{

Check warning on line 109 in src/components/Editor/FreeBusy/RoomAvailability.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/FreeBusy/RoomAvailability.vue#L108-L109

Added lines #L108 - L109 were not covered by tests
font-weight: 500;
}
&__timezone{
color: var(--color-text-lighter);
}
}
}
}
:deep(.vs__search ) {
text-overflow: ellipsis;
}
:deep(.mx-input) {
height: 38px !important;
}
</style>
<style lang="scss">
.blocking-event-free-busy {
// Show the blocking event above any other blocks, especially the *blocked for all* one
z-index: 3 !important;
}
.free-busy-block {
opacity: 0.7 !important;
}
</style>
Loading

0 comments on commit 0f76ecc

Please sign in to comment.