Allow rescheduling of manually scheduled parent work package (clamps) in gantt view

pull/8561/head
Aleix Suau 4 years ago
parent d3c74c0ec9
commit 1b1be75b44
  1. 3
      frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts
  2. 5
      frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell-mouse-handler.ts
  3. 2
      frontend/src/global_styles/content/work_packages/timelines/elements/_bar.sass

@ -396,7 +396,8 @@ export class TimelineCellRenderer {
let selectionMode = renderInfo.viewParams.activeSelectionMode;
// Cannot edit the work package if it has children
if (!wp.isLeaf && !selectionMode) {
// and it is not on 'Manual scheduling' mode
if (!wp.isLeaf && !selectionMode && !wp.scheduleManually) {
bar.classList.add('-readonly');
} else {
bar.classList.remove('-readonly');

@ -108,9 +108,10 @@ export function registerWorkPackageMouseHandler(this:void,
workPackageTimeline.disableViewParamsCalculation = true;
mouseDownStartDay = getCursorOffsetInDaysFromLeft(renderInfo, ev);
// If this wp is a parent element, changing it is not allowed.
// If this wp is a parent element, changing it is not allowed
// if it is not on 'Manual scheduling' mode
// But adding a relation to it is.
if (!renderInfo.workPackage.isLeaf && !renderInfo.viewParams.activeSelectionMode) {
if (!renderInfo.workPackage.isLeaf && !renderInfo.viewParams.activeSelectionMode && !renderInfo.workPackage.scheduleManually) {
return;
}

@ -26,7 +26,7 @@
max-width: 20%
height: 100%
&:hover .timeline-element--bg:not(.-clamp-style)
&:hover .timeline-element--bg:not(.-readonly)
&~.leftHandle,
&~.rightHandle
background-color: rgba(1, 1, 1, 0.2)

Loading…
Cancel
Save