Commit 9965db91 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch 'tr-oncall-schedule-fix-width-calc' into 'master'

Fix on-call schedule timeline width calculation

See merge request gitlab-org/gitlab!58973
parents cbf25c52 04de4bdd
<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