Добавила CalendarSchedule, прокинула пропсы

This commit is contained in:
Daria Golova
2022-10-14 13:44:55 +03:00
parent 2232e1bec7
commit be7c4fd8b6
4 changed files with 97 additions and 21 deletions

View File

@@ -0,0 +1,51 @@
<template lang="pug">
.schedule.ml-2
calendar-header(
:currentDate="currentDate"
@previous-date="previousDate"
@next-date="nextDate"
@selected-layout="selectedLayout")
calendar-column(:info="columnInfo")
</template>
<script>
import CalendarHeader from "./CalendarHeader.vue";
import CalendarColumn from "./CalendarColumn.vue";
import teamMemberAvatar from "@/assets/images/team-member.svg";
export default {
name: "CalendarSchedule",
components: { CalendarHeader, CalendarColumn },
props: {
currentDate: {
type: Object,
default() {
return {};
},
},
},
data() {
return {
columnInfo: {
name: "Захарова А.О.",
avatar: teamMemberAvatar,
},
};
},
methods: {
previousDate() {
this.$emit("previous-date");
},
nextDate() {
this.$emit("next-date");
},
selectedLayout(option) {
this.$emit("selected-layout", option);
},
},
};
</script>
<style lang="sass" scoped>
.schedule
width: 100%
</style>