diff --git a/src/components/base/BaseButton.vue b/src/components/base/BaseButton.vue
index 602e7e1..27377a9 100644
--- a/src/components/base/BaseButton.vue
+++ b/src/components/base/BaseButton.vue
@@ -15,7 +15,7 @@
span.icon-container(
:class="rightIcon",
v-if="rightIcon"
- :style="{fontSize: iconRightSize + 'px'}"
+ :style="{fontSize: iconRightSize + 'px', marginLeft: marginLeftIcon + 'px'}"
)
@@ -50,6 +50,10 @@ export default {
type: Number,
default: 24,
},
+ marginLeftIcon: {
+ type: Number,
+ default: 0,
+ },
},
};
diff --git a/src/pages/calendar/TheCalendar.vue b/src/pages/calendar/TheCalendar.vue
index 84ee736..d2a0c5e 100644
--- a/src/pages/calendar/TheCalendar.vue
+++ b/src/pages/calendar/TheCalendar.vue
@@ -4,6 +4,7 @@
@width="changeWidth"
:team-data="employeesData"
:open-form-create="openFormCreateEvent"
+ :event-type="eventType"
)
calendar-schedule(
:owners-data="employeesData"
@@ -48,6 +49,12 @@ export default {
employeesData: [],
isOpenForm: false,
membersData: [],
+ eventType: [
+ { id: 1, label: "Встреча", color: "var(--bg-event-green-color)" },
+ { id: 2, label: "Планерка", color: "var(--bg-event-red-color)" },
+ { id: 3, label: "Интервью", color: "var(--bg-event-yellow-color)" },
+ { id: 4, label: "Важная работа", color: "var(--bg-event-blue-color)" },
+ ],
};
},
methods: {
diff --git a/src/pages/calendar/components/CalendarSidebar.vue b/src/pages/calendar/components/CalendarSidebar.vue
index e4b1070..080589c 100644
--- a/src/pages/calendar/components/CalendarSidebar.vue
+++ b/src/pages/calendar/components/CalendarSidebar.vue
@@ -1,77 +1,60 @@
.sidebar.flex.flex-col.bg-white(:class="openSidebar")
.sidebar-wrapper.h-full.my-13px.flex.flex-col.justify-between(:style="sidebarWidth")
- .sidebar-content.items-center.flex.flex-col.gap-y-8.px-4.py-19px(v-if="!isOpen")
- base-button(left-icon="icon-plus", rounded, :size="40", :icon-left-size="10" @click="openFormCreate" )
- .flex.flex-col.items-center(v-if="!isOpen")
- base-button(left-icon="icon-plus", rounded, :size="24", :icon-left-size="10", secondary )
- .flex.flex-col.gap-y-2.items-center.mt-4
- .event.flex.items-center.justify-center(v-for="event in events" :key="event.id")
- .event-type(:style="{ background: event.color }")
- .flex.flex-col.items-center.gap-y-2.justify-center
- base-button.mb-2(left-icon="icon-plus", rounded, :size="24", :icon-left-size="10", secondary )
- .team-card(v-for="teammate in teamData" :key="teammate.id")
- base-avatar(:size="32" :color="teammate.color")
- img(:src="teammate.avatar" alt="Team member" v-if="teammate.avatar")
- span(v-if="!teammate.avatar") {{`${teammate.last_name[0]}${teammate.first_name[0]}`}}
- .sidebar-content.items-center.flex.flex-col.gap-y-8.px-4.py-19px(v-else)
- base-button(right-icon="icon-plus", split, :size="40", :icon-right-size="10", @click="openFormCreate" ) Создать событие
- .flex.items-center.flex-col.gap-y-4
- .events-wrapper.flex.items-center.justify-between
- .flex {{ "Виды событий" }}
- base-button(left-icon="icon-plus", rounded, :size="24", :icon-left-size="10", secondary )
- .flex.flex-col.gap-y-2
- .relative.flex.items-center.gap-x-3.h-8(v-for="event in events")
- input.custom-input.py-2.pl-6.h-full.not-italic.font-medium.text-xxs(
- :placeholder="event.name"
- :key="event.id")
- .event-type(:style="{ background: event.color }")
- span.icon-edit.cursor-pointer
- .flex.flex-col.gap-y-4
- .events-wrapper.flex.items-center.justify-between
- .flex {{ "Команды" }}
- base-button(left-icon="icon-plus", rounded, :size="24", :icon-left-size="10", secondary )
- .box-team.flex.flex-col.gap-y-2
- .team-card.flex.items-center.justify-between.cursor-pointer(
- v-for="teammate in teamData"
- :key="teammate.id")
- .flex.items-center
- base-avatar(:size="32" :color="teammate.color")
- img(:src="teammate.avatar" alt="Team member" v-if="teammate.avatar")
- span(v-if="!teammate.avatar") {{`${teammate.last_name[0]}${teammate.first_name[0]}`}}
- .flex.ml-2.not-italic.font-medium.text-xxs {{ changeName(teammate.last_name, teammate.first_name, teammate.patronymic) }}
- span.icon-change-place.cursor-pointer.w-5.flex.items-center.justify-center.w-6.h-6
+ .sidebar-content.items-center.flex.flex-col.gap-y-8.px-4.py-19px
+ base-button(
+ left-icon="icon-plus",
+ rounded,
+ :size="40",
+ :icon-left-size="10",
+ @click="openFormCreate",
+ v-if="!isOpen"
+ )
+ base-button.w-full(
+ right-icon="icon-plus",
+ split,
+ :size="40",
+ :icon-right-size="10",
+ :marginLeftIcon="7",
+ @click="openFormCreate",
+ v-else
+ ) Создать событие
+ calendar-sidebar-event(:is-open="isOpen", :event-type="eventType")
+ calendar-sidebar-teammate(:team-data="teamData", :is-open="isOpen")
.button-wrapper.flex.justify-center.mb-23px
- base-button(left-icon="icon-long-arrow", rounded, :size="40", :icon-left-size="18", secondary, :style="{ transform: `rotate(${turnButton})`}", @click="changeSize")
+ base-button(
+ left-icon="icon-long-arrow",
+ rounded, :size="40",
+ :icon-left-size="18",
+ secondary,
+ :style="{ transform: `rotate(${turnButton})`}",
+ @click="changeSize"
+ )
@@ -126,83 +91,16 @@ export default {
.sidebar-wrapper
border-left: 2px solid var(--btn-blue-color-3)
-.button-plus
- max-height: 40px
- background: var(--btn-blue-color)
- color: var(--default-white)
-
-.event
- width: 32px
- height: 32px
- background: var(--bg-event-box-color)
- border-radius: 4px
-
-.event-type
- width: 16px
- height: 16px
- border-radius: 2px
-
-.avatar-wrapper
- width: 32px
- height: 32px
-
-.open-button
- width: 40px
- height: 40px
- max-height: 40px
-
-.button-styled
- max-height: 24px
- background: var(--btn-blue-color-1)
- color: var(--btn-blue-color)
-
.open-sidebar
.sidebar-content
- align-items: flex-end
- padding-left: 15px
- .event-type
- position: absolute
- width: 8px
- height: 16px
- top: 8px
- left: 8px
+ display: flex
+ flex-direction: column
+ row-gap: 32px
+ padding: 19px 16px
+ align-items: center
+ width: 232px
+
.button-wrapper
justify-content: end
padding-right: 16px
-
-.create-event
- width: 200px
- height: 40px
- border-radius: 4px
-
-.events-wrapper
- width: 200px
-
-.input-wrapper
- border: none
- background: var(--bg-event-box-color)
- height: 32px
- width: 169px
-
-.team-card
- border-radius: 16px
- &:hover
- background: var(--font-dark-blue-color)
- color: var(--default-white)
-
-.button
- width: 200px
-
-.custom-input
- border-radius: 4px
- width: 169px
- outline: none
- background-color: var(--bg-event-box-color)
- &::placeholder
- color: var(--font-dark-blue-color)
- &:focus
- background-color: var(--font-dark-blue-color)
- color: var(--default-white)
- &::placeholder
- color: var(--default-white)
diff --git a/src/pages/calendar/components/cells/CalendarSidebarEvent.vue b/src/pages/calendar/components/cells/CalendarSidebarEvent.vue
new file mode 100644
index 0000000..0678690
--- /dev/null
+++ b/src/pages/calendar/components/cells/CalendarSidebarEvent.vue
@@ -0,0 +1,76 @@
+
+ .flex.flex-col.items-center.w-full
+ .flex.flex-col.items-center(v-if="!isOpen")
+ base-button(left-icon="icon-plus", rounded, :size="24", :icon-left-size="10", secondary)
+ .flex.flex-col.gap-y-2.items-center.mt-4
+ .event.flex.items-center.justify-center(v-for="event in eventType" :key="event.id")
+ .event-type(:style="{ background: event.color }")
+ .flex.flex-col.gap-y-4.w-full(v-else)
+ .flex.items-center.justify-between
+ .flex.text-base.font-bold(:style="{ color: 'var(--font-dark-blue-color)' }") Виды событий
+ base-button(
+ v-if="isOpen",
+ left-icon="icon-plus",
+ rounded, :size="24",
+ :icon-left-size="10",
+ secondary
+ )
+ .flex.flex-col.gap-y-2
+ .relative.flex.items-center.gap-x-3.h-8(v-for="event in eventType")
+ input.custom-input.py-2.pl-6.h-full.not-italic.font-medium.text-xxs(
+ :placeholder="event.label"
+ :key="event.id"
+ )
+ .event-open(:style="{ background: event.color }")
+ span.icon-edit.cursor-pointer
+
+
+
+
+
diff --git a/src/pages/calendar/components/cells/CalendarSidebarTeammate.vue b/src/pages/calendar/components/cells/CalendarSidebarTeammate.vue
new file mode 100644
index 0000000..4b9a9df
--- /dev/null
+++ b/src/pages/calendar/components/cells/CalendarSidebarTeammate.vue
@@ -0,0 +1,64 @@
+
+ .flex.flex-col.items-center.gap-y-2.justify-center(v-if="!isOpen")
+ base-button.mb-2(left-icon="icon-plus", rounded, :size="24", :icon-left-size="10", secondary)
+ .team-card(v-for="teammate in teamData" :key="teammate.id")
+ base-avatar(:size="32", :color="teammate.color")
+ img(:src="teammate.avatar" alt="Team member" v-if="teammate.avatar")
+ span(v-if="!teammate.avatar") {{`${teammate.last_name[0]}${teammate.first_name[0]}`}}
+ .flex.flex-col.gap-y-4.w-full(v-else, :style="{ color: 'var(--font-dark-blue-color)' }")
+ .flex.items-center.justify-between
+ .flex.text-base.font-bold Команды
+ base-button(left-icon="icon-plus", rounded, :size="24", :icon-left-size="10", secondary)
+ .box-team.flex.flex-col.gap-y-2
+ .team-card.flex.items-center.justify-between.cursor-pointer(
+ v-for="teammate in teamData"
+ :key="teammate.id"
+ )
+ .flex.items-center
+ base-avatar(:size="32" :color="teammate.color")
+ img(:src="teammate.avatar" alt="Team member" v-if="teammate.avatar")
+ span(v-if="!teammate.avatar") {{`${teammate.last_name[0]}${teammate.first_name[0]}`}}
+ .flex.ml-2.not-italic.font-medium.text-xxs {{ changeName(teammate.last_name, teammate.first_name, teammate.patronymic) }}
+ span.icon-change-place.cursor-pointer.w-5.flex.items-center.justify-center.w-6.h-6
+
+
+
+
+