diff --git a/server.js b/server.js index 54901f7..aa803bc 100644 --- a/server.js +++ b/server.js @@ -515,8 +515,8 @@ export function clientsServer() { results: [ { id: "6faa6bb6-1de6-422c-a401-1b35cd455303", - start: "2022-10-24T20:23:49Z", - end: "2022-10-24T21:23:53Z", + start: "2022-10-25T11:15:49Z", + end: "2022-10-25T12:00:53Z", kind: "call", subkind: null, description: "", @@ -542,7 +542,7 @@ export function clientsServer() { first_name: "Ольга", patronymic: "Александровна", }, - role: null, + role: "owner", }, { id: "f941a0c6-c750-4f79-92c0-d7a19354e422", @@ -552,14 +552,14 @@ export function clientsServer() { first_name: "Егор", patronymic: "Сергеевич", }, - role: "owner", + role: null, }, ], }, { id: "6faa6bb6-1de6-422c-a401-1b35cd455303", - start: "2022-10-24T15:23:49Z", - end: "2022-10-24T16:23:53Z", + start: "2022-10-25T13:00:49Z", + end: "2022-10-25T13:30:53Z", kind: "call", subkind: null, description: "", @@ -599,63 +599,10 @@ export function clientsServer() { }, ], }, - { - id: "7faa7bb7-2de6-422c-a401-1b35cd455303", - start: "2022-10-23T10:00:00Z", - end: "2022-10-23T11:10:00Z", - kind: "call", - subkind: null, - description: "", - location: null, - members: [ - { - id: "b0509f9a-e824-4bb3-a260-2b32dae9bc81", - person: { - id: "14ff401c-2b7b-4d9a-9159-720c74d8b23c", - last_name: "Гагарин", - first_name: "Юрий", - patronymic: "Алексеевич", - }, - role: null, - }, - { - id: "a9239f9a-e824-4bb3-a260-2b32dae9bc76", - person: { - id: "15ff465c-2b7b-4d9a-9159-720c74d8b56d", - last_name: "Елесеевская", - first_name: "Татьяна", - patronymic: "Ивановна", - }, - role: "primary", - }, - ], - employees: [ - { - id: "f941a0c6-c734-4f79-92c2-d7a5674459e422", - employee: { - id: "db831a15-e876-481f-a658-6325de7c311e", - last_name: "Константинопольская", - first_name: "Юлия", - patronymic: "Викторовна", - }, - role: null, - }, - { - id: "f941a0c6-c750-4f79-92c0-d7a19354e422", - employee: { - id: "db541a67-e836-481f-a653-6325de7c567e", - last_name: "Захарова", - first_name: "Ольга", - patronymic: "Александровна", - }, - role: "owner", - }, - ], - }, { id: "2faa7bb2-2de6-422c-a401-1b35cd455223", - start: "2022-10-24T10:00:00Z", - end: "2022-10-24T11:10:00Z", + start: "2022-10-25T15:00:00Z", + end: "2022-10-25T16:10:00Z", kind: "call", subkind: null, description: "", @@ -695,10 +642,11 @@ export function clientsServer() { }, ], }, + { - id: "2faa7bb2-2de6-422c-a401-1b35cd455223", - start: "2022-10-24T10:00:00Z", - end: "2022-10-24T11:10:00Z", + id: "2faa5ff2-2de6-422c-a401-1b35cd455223", + start: "2022-10-25T17:10:00Z", + end: "2022-10-25T18:00:00Z", kind: "call", subkind: null, description: "", @@ -717,14 +665,14 @@ export function clientsServer() { ], employees: [ { - id: "f451a0c3-c734-4f73-91c2-d7a5674459e422", + id: "f941a0c6-c734-4f79-92c2-d7a5674459e422", employee: { - id: "dv841a15-e867-331f-a658-6325de7c311e", - last_name: "Коломойцев", - first_name: "Илья", - patronymic: "Петрович", + id: "db831a15-e876-481f-a658-6325de7c311e", + last_name: "Константинопольская", + first_name: "Юлия", + patronymic: "Викторовна", }, - role: "owner", + role: null, }, { id: "f941a0c6-c750-4f79-92c0-d7a19354e422", @@ -734,7 +682,7 @@ export function clientsServer() { first_name: "Ольга", patronymic: "Александровна", }, - role: null, + role: "owner", }, ], }, diff --git a/src/pages/calendar/TheCalendar.vue b/src/pages/calendar/TheCalendar.vue index 80b3176..993f61d 100644 --- a/src/pages/calendar/TheCalendar.vue +++ b/src/pages/calendar/TheCalendar.vue @@ -26,8 +26,8 @@ export default { calendarLayout: "", currentDate: moment(), timeInformation: { - dayStartTime: "8:00", - dayEndTime: "18:00", + dayStartTime: "0:00", + dayEndTime: "20:00", }, eventsData: [], team: [ diff --git a/src/pages/calendar/components/CalendarBackground.vue b/src/pages/calendar/components/CalendarBackground.vue index 8f8521b..8417ee5 100644 --- a/src/pages/calendar/components/CalendarBackground.vue +++ b/src/pages/calendar/components/CalendarBackground.vue @@ -1,22 +1,25 @@ @@ -23,6 +24,13 @@ export default { props: { ownerData: Object, dayEvents: Array, + dayEndTime: Number, + dayStartTime: Number, + }, + data() { + return { + pixelsPerHour: 62, + }; }, computed: { ownerName() { @@ -34,6 +42,33 @@ export default { } return null; }, + pixelsPerMinute() { + return this.pixelsPerHour / 60; + }, + }, + methods: { + eventCardPosition(startTime, endTime) { + let start = startTime + .slice(11, -4) + .split(":") + .map((elem) => parseInt(elem, 10)); + let end = endTime.slice(11, -6); + let position = + (start[0] - this.dayStartTime) * this.pixelsPerHour + + start[1] * this.pixelsPerMinute; + if ( + parseInt(start[0], 10) < this.dayStartTime || + parseInt(end, 10) > this.dayEndTime + ) { + return { + top: "0px", + visibility: "hidden", + }; + } + return { + top: `${position}px`, + }; + }, }, }; @@ -45,6 +80,16 @@ export default { .header height: 48px + position: sticky + top: 0px + z-index: 5 + width: inherit + border-right: 1px solid var(--border-light-grey-color) + background-color: var(--default-white) + +.body + position: relative + z-index: 3 .avatar-wrapper width: 32px diff --git a/src/pages/calendar/components/CalendarEventCard.vue b/src/pages/calendar/components/CalendarEventCard.vue index f68a318..b698740 100644 --- a/src/pages/calendar/components/CalendarEventCard.vue +++ b/src/pages/calendar/components/CalendarEventCard.vue @@ -47,8 +47,8 @@ export default { border-radius: 4px background-color: var(--bg-event-yellow-color) color: var(--font-black-color) - position: relative - z-index: 2 + position: absolute + z-index: 3 .header width: 100% diff --git a/src/pages/calendar/components/CalendarSchedule.vue b/src/pages/calendar/components/CalendarSchedule.vue index ccf047e..99848d9 100644 --- a/src/pages/calendar/components/CalendarSchedule.vue +++ b/src/pages/calendar/components/CalendarSchedule.vue @@ -1,5 +1,5 @@