Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/components/Editor/FreeBusy/FreeBusy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,13 @@ export default {
}
},
},
watch: {
attendees(newVal) {
if (newVal.length === 0) {
this.$emit('close:no-attendees')
}
},
},
mounted() {
const calendar = this.$refs.freeBusyFullCalendar.getApi()
calendar.scrollToTime(this.scrollTime)
Expand Down
7 changes: 6 additions & 1 deletion src/components/Editor/Invitees/InviteesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
@remove-attendee="removeAttendee"
@add-attendee="addAttendee"
@update-dates="saveNewDate"
@close:no-attendees="closeFreeBusy(true)"
@close="closeFreeBusy" />
</div>
</div>
Expand All @@ -75,6 +76,7 @@
import {
showSuccess,
showError,
showWarning,
} from '@nextcloud/dialogs'
import { organizerDisplayName, removeMailtoPrefix } from '../../../utils/attendee.js'
import AccountMultipleIcon from 'vue-material-design-icons/AccountMultiple.vue'
Expand Down Expand Up @@ -405,7 +407,10 @@
openFreeBusy() {
this.showFreeBusyModel = true
},
closeFreeBusy() {
closeFreeBusy(showNoAttendeesToast = false) {
if (showNoAttendeesToast) {
showWarning(this.$t('calendar', 'Please add at least one attendee to use the "Find a time" feature.'))
}

Check warning on line 413 in src/components/Editor/Invitees/InviteesList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Invitees/InviteesList.vue#L413

Added line #L413 was not covered by tests
this.showFreeBusyModel = false
},
saveNewDate(dates) {
Expand Down
Loading