-
- @for (time of times(); track $index) {
-
- {{ time }}
-
- }
-
-
- @for (row of rowsByNr; track $index) {
-
- }
-
-
+
+
+
+
+ @for (time of times(); track $index) {
+
+ {{ time }}
+
+ }
+
+
+ @for (row of rowsByNr; track $index) {
+
+ }
+
+
+ @for (day of daysToShow(); track $index) {
+
+
+ }
+
+
+ @if (workStartEnd()) {
+
+
{{ T.F.SCHEDULE.START | translate }}
+
+
+
{{ T.F.SCHEDULE.END | translate }}
+
+ }
+
+ @if (currentTimeRow() !== null) {
+
+ }
+
+
+ @for (ev of safeEvents(); track ev.id) {
+ @if (isDraggableSE(ev)) {
+
+ } @else {
+
+ }
+ }
+
+
+ @for (beyondBudgetDay of safeBeyondBudget(); track i; let i = $index) {
+ @if (beyondBudgetDay.length > 0) {
+
+
+ @for (ev of beyondBudgetDay; track ev.id) {
+ @if (isDraggableSE(ev)) {
+
+ } @else {
+
+ }
+ }
+
+ }
+ }
+
+ @if (
+ (!isTaskDragActive() || isCtrlPressed()) && newTaskPlaceholder();
+ as newTaskPlaceholder
+ ) {
+
+
+ }
+
+ @if (isDragging() && currentDragEvent() && dragPreviewStyle()) {
+
+ @if (dragPreviewLabel()) {
+
+ {{ dragPreviewLabel() }}
+
+ }
+
+ }
@if (showShiftKeyInfo()) {
diff --git a/src/app/features/schedule/schedule-week/schedule-week.component.scss b/src/app/features/schedule/schedule-week/schedule-week.component.scss
index 74731e8a9..766f16e58 100644
--- a/src/app/features/schedule/schedule-week/schedule-week.component.scss
+++ b/src/app/features/schedule/schedule-week/schedule-week.component.scss
@@ -18,33 +18,6 @@
// Enable horizontal scroll when viewport is too small for 7 days
&[data-horizontal-scroll] {
- .horizontal-scroll-wrapper {
- overflow-x: scroll; // Always show horizontal scrollbar
- overflow-y: visible; // Allow vertical content to extend
-
- // Match app's standard scrollbar styling
- scrollbar-width: 4px;
- scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
-
- &::-webkit-scrollbar {
- height: 8px; // Slightly taller than standard for horizontal
- }
-
- &::-webkit-scrollbar-track {
- background: var(--scrollbar-track);
- border-radius: 4px;
- }
-
- &::-webkit-scrollbar-thumb {
- background: var(--scrollbar-thumb);
- border-radius: 16px;
-
- &:hover {
- background: var(--scrollbar-thumb-hover);
- }
- }
- }
-
.week-header {
// Remove left/right constraints to allow horizontal scrolling
left: auto;
diff --git a/src/app/features/schedule/schedule-week/schedule-week.component.ts b/src/app/features/schedule/schedule-week/schedule-week.component.ts
index 5cf1e50df..79a58a9b2 100644
--- a/src/app/features/schedule/schedule-week/schedule-week.component.ts
+++ b/src/app/features/schedule/schedule-week/schedule-week.component.ts
@@ -33,9 +33,6 @@ import { formatMonthDay } from '../../../util/format-month-day.util';
import { ScheduleWeekDragService } from './schedule-week-drag.service';
import { calculatePlaceholderForGridMove } from './schedule-week-placeholder.util';
import { truncate } from '../../../util/truncate';
-import { fromEvent } from 'rxjs';
-import { debounceTime, map, startWith } from 'rxjs/operators';
-import { toSignal } from '@angular/core/rxjs-interop';
const D_HOURS = 24;
@@ -61,7 +58,7 @@ const D_HOURS = 24;
'[class.is-not-dragging]': '!isDragging()',
'[class.is-resizing-event]': 'isAnyEventResizing()',
'[class]': 'dragEventTypeClass()',
- '[attr.data-horizontal-scroll]': 'shouldEnableHorizontalScroll()',
+ '[attr.data-horizontal-scroll]': 'isHorizontalScrollMode() || null',
},
})
export class ScheduleWeekComponent implements OnInit, AfterViewInit, OnDestroy {
@@ -69,21 +66,8 @@ export class ScheduleWeekComponent implements OnInit, AfterViewInit, OnDestroy {
private _dateTimeFormatService = inject(DateTimeFormatService);
private _translateService = inject(TranslateService);
- private _windowSize = toSignal(
- fromEvent(window, 'resize').pipe(
- startWith({ width: window.innerWidth }),
- debounceTime(50),
- map(() => ({ width: window.innerWidth })),
- ),
- { initialValue: { width: window.innerWidth } },
- );
-
- shouldEnableHorizontalScroll = computed(() => {
- // Enable scroll when viewport is smaller than what's needed for 7 days
- return this._windowSize().width < 1900;
- });
-
isInPanel = input
(false);
+ isHorizontalScrollMode = input(false);
events = input([]);
beyondBudget = input([]);
daysToShow = input([]);
diff --git a/src/app/features/schedule/schedule/schedule.component.html b/src/app/features/schedule/schedule/schedule.component.html
index 29d16ac40..29d615dd8 100644
--- a/src/app/features/schedule/schedule/schedule.component.html
+++ b/src/app/features/schedule/schedule/schedule.component.html
@@ -30,7 +30,10 @@