Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

when last non-working day found, then return a day after it as the last working day

bsatarnejadf351d76c218f
diff --git a/frontend/src/app/shared/components/show-changes/show-changes.component.html b/frontend/src/app/shared/components/show-changes/show-changes.component.html
index eada31b4810..ef071f092e4 100644
--- a/frontend/src/app/shared/components/show-changes/show-changes.component.html
+++ b/frontend/src/app/shared/components/show-changes/show-changes.component.html
@@ -28,58 +28,55 @@
class="spot-container op-show-changes-modal--body"
>
<spot-form-field
- [label]="text.show_changes_since">
+ [label]="text.show_changes_since">
- <div slot="input">
- <select class="op-show-changes-modal--filter"
- (change)="filterChange($event.target.value)"
- >
- <option
- *ngFor="let availableValue of showChangesAvailableValues"
- [value]="availableValue.value">
- {{availableValue.title}}
- </option>
- </select>
-
- </div>
- <span slot="description"
- > {{ dropDownDescription }} </span>
+ <div slot="input">
+ <select class="op-show-changes-modal--filter"
+ (change)="filterChange($event.target.value)"
+ >
+ <option
+ *ngFor="let availableValue of showChangesAvailableValues"
+ [value]="availableValue.value">
+ {{availableValue.title}}
+ </option>
+ </select>
+
+ </div>
+ <span slot="description"> {{ dropDownDescription }} </span>
</spot-form-field>
-
<spot-form-field
- [label]="text.time"
- *ngIf="filterSelected"
- class="op-show-changes-modal--time">
+ [label]="text.time"
+ *ngIf="filterSelected"
+ class="op-show-changes-modal--time">
- <input
+ <input
slot="input"
(change)="timeChange($event.target.value)"
type="time"
class="op-show-changes-modal--time-input"/>
- <div
- slot="input"
- class="op-show-changes-modal--time-help spot-body-small"
- >
- <span class="">{{text.timeZone}}</span>
+ <div
+ slot="input"
+ class="op-show-changes-modal--time-help spot-body-small"
+ >
+ <span class="">{{text.timeZone}}</span>
- <spot-tooltip
+ <spot-tooltip
class="op-show-changes-modal--time-tooltip"
[alignment]="tooltipPosition"
[disabled]="false"
[light]="true">
-
- <span class="spot-icon spot-icon_help1" slot="trigger"></span>
-
- <span slot="body" class="spot-body-small op-show-changes-modal--time-tooltip-body">{{ text.help_description }}</span>
-
- </spot-tooltip>
- </div>
+
+ <span class="spot-icon spot-icon_help1" slot="trigger"></span>
+ <span slot="body" class="spot-body-small op-show-changes-modal--time-tooltip-body">{{ text.help_description }}</span>
+
+ </spot-tooltip>
+ </div>
- <span slot="description"
- *ngIf="timeZoneSelected"
- [textContent]="text.time_description()"></span>
+ <span slot="description"
+ *ngIf="timeZoneSelected"
+ [textContent]="text.time_description()"></span>
</spot-form-field>
<div class="spot-action-bar">
diff --git a/frontend/src/app/shared/components/show-changes/show-changes.component.ts b/frontend/src/app/shared/components/show-changes/show-changes.component.ts
index 7171126f477..647019e906b 100644
--- a/frontend/src/app/shared/components/show-changes/show-changes.component.ts
+++ b/frontend/src/app/shared/components/show-changes/show-changes.component.ts
@@ -201,6 +201,7 @@ export class OpShowChangesComponent extends UntilDestroyedMixin implements After
yesterday.setDate(today.getDate() - 1);
while (lastWorkingDay === '') {
if (this.isNonWorkingDay(yesterday) || this.weekdaysService.isNonWorkingDay(yesterday)) {
+ yesterday.setDate(yesterday.getDate() + 1);
lastWorkingDay = moment(yesterday).format('ddd, YYYY-MM-DD');
this.selectedDate = moment(yesterday).format('YYYY-MM-DD');
this.daysNumber = moment(yesterday).diff(moment(today), 'days');