Skip to content

Commit 38310d8

Browse files
Merge 08ef05d into f891b4b
2 parents f891b4b + 08ef05d commit 38310d8

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-6
lines changed

src/app/modules/time-entries/components/calendar/calendar.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
[viewDate]="currentDate"
145145
[events]="timeEntriesAsEvent"
146146
[cellTemplate]="timeEntriesInsideMonthCalendarTemplate"
147+
[weekStartsOn]="WEEK_START_DAY"
147148
>
148149
</mwl-calendar-month-view>
149150
<mwl-calendar-week-view
@@ -152,6 +153,7 @@
152153
[events]="timeEntriesAsEvent"
153154
[hourSegmentHeight]="HALF_HOUR * VARIATION_HEIGHT"
154155
[eventTemplate]="timeEntriesInsideDaysCalendarTemplate"
156+
[weekStartsOn]="WEEK_START_DAY"
155157
>
156158
</mwl-calendar-week-view>
157159
<mwl-calendar-day-view

src/app/modules/time-entries/components/calendar/calendar.component.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ $activity-text-size: $max-lines-activity * $line-height-base;
7070
overflow-y: hidden;
7171
color: $primary-text;
7272
margin: 2px 6px 0px 5px;
73+
overflow-wrap: anywhere;
7374
background-color: $background-card-entry;
7475
border-left: 5px solid calculate-border-color($background-card-entry);
7576
-webkit-box-shadow: 0px 2px 5px 0px lighten($shadow-card-entry, 50%);
@@ -91,7 +92,7 @@ $activity-text-size: $max-lines-activity * $line-height-base;
9192
}
9293

9394
p.additional {
94-
overflow-wrap: break-word;
95+
overflow-wrap: anywhere;
9596
color: calculate-bold-text-color($primary-text);
9697
}
9798
}
@@ -154,13 +155,13 @@ $activity-text-size: $max-lines-activity * $line-height-base;
154155
}
155156
}
156157

157-
.btn-navigation{
158+
.btn-navigation {
158159
padding-left: 6px;
159160
padding-right: 6px;
160161
}
161162

162-
@media only screen and (min-width : 576px) and (max-width : 767px) {
163-
.currentDate{
163+
@media only screen and (min-width: 576px) and (max-width: 767px) {
164+
.currentDate {
164165
margin-left: 14px;
165166
p {
166167
margin: 0;

src/app/modules/time-entries/components/calendar/calendar.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
Output,
99
ViewChild,
1010
} from '@angular/core';
11-
import { CalendarEvent, CalendarView } from 'angular-calendar';
11+
import { CalendarEvent, CalendarView, DAYS_OF_WEEK } from 'angular-calendar';
1212
import { Observable } from 'rxjs';
1313
import * as moment from 'moment';
1414
import { DataSource } from '../../../shared/models/data-source.model';
@@ -28,6 +28,7 @@ export class CalendarComponent implements OnInit {
2828
readonly VARIATION_HEIGHT: number = 2;
2929
readonly VISIBLE_TARGETS_FOR_TIME_ENTRIES_DESCRIPTION: CalendarView[] = [CalendarView.Week, CalendarView.Day];
3030
readonly CALENDAR_VIEW_ENUM: typeof CalendarView = CalendarView;
31+
readonly WEEK_START_DAY = DAYS_OF_WEEK.MONDAY;
3132

3233
@ViewChild('scrollContainer') scrollContainer: ElementRef<HTMLElement>;
3334

src/app/modules/time-entries/pages/time-entries.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export class TimeEntriesComponent implements OnInit, OnDestroy {
3939
selectedMonthAsText: string;
4040
isActiveEntryOverlapping = false;
4141
readonly NO_DATA_MESSAGE: string = 'No data available in table';
42-
timeEntry: DataSource<Entry>;
4342
constructor(
4443
private store: Store<EntryState>,
4544
private toastrService: ToastrService,

src/styles.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,21 @@ Overwritten calendar style
4343
.cal-today:hover {
4444
background-color: darken($background-calendar-cell, 7%) !important;
4545
}
46+
47+
.cal-week-view .cal-day-headers {
48+
position: sticky;
49+
top: 0;
50+
z-index: 10;
51+
background: $background-calendar-cell;
52+
}
53+
54+
.cal-month-view .cal-header {
55+
position: sticky;
56+
top: 0;
57+
z-index: 10;
58+
background: $background-calendar-cell;
59+
}
60+
61+
.cal-header .cal-cell {
62+
border: 0.1px solid lighten($primary-text, 30%);
63+
}

0 commit comments

Comments
 (0)