Commit 04de4bdd authored by Tristan Read's avatar Tristan Read Committed by Olena Horal-Koretska

Fix on-call schedule timeline width calculation

parent 8d1e9432
<script> <script>
import { GlResizeObserverDirective } from '@gitlab/ui'; import { GlResizeObserverDirective } from '@gitlab/ui';
import { PRESET_TYPES } from 'ee/oncall_schedules/constants'; import { PRESET_TYPES, TIMELINE_CELL_WIDTH } from 'ee/oncall_schedules/constants';
import updateTimelineWidthMutation from 'ee/oncall_schedules/graphql/mutations/update_timeline_width.mutation.graphql'; import updateTimelineWidthMutation from 'ee/oncall_schedules/graphql/mutations/update_timeline_width.mutation.graphql';
import DaysHeaderItem from './preset_days/days_header_item.vue'; import DaysHeaderItem from './preset_days/days_header_item.vue';
import WeeksHeaderItem from './preset_weeks/weeks_header_item.vue'; import WeeksHeaderItem from './preset_weeks/weeks_header_item.vue';
...@@ -37,7 +37,8 @@ export default { ...@@ -37,7 +37,8 @@ export default {
this.$apollo.mutate({ this.$apollo.mutate({
mutation: updateTimelineWidthMutation, mutation: updateTimelineWidthMutation,
variables: { variables: {
timelineWidth: this.$refs.timelineHeaderWrapper.offsetWidth, timelineWidth:
this.$refs.timelineHeaderWrapper.getBoundingClientRect().width - TIMELINE_CELL_WIDTH,
}, },
}); });
}, },
......
---
title: Fix the oncall schedule timeline width calc
merge_request: 58973
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment