Production release May 2024 [EXPLORE] #40
|
@ -89,7 +89,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</span>
|
</span>
|
||||||
<ng-container *ngIf="status">
|
<ng-container *ngIf="status">
|
||||||
<span>{{status}}</span>
|
<span>{{status}} <ng-container *ngIf="currentDate <= endDate && currentDate >= startDate">(M{{calcCurrentMonth}})</ng-container></span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="date">
|
<ng-container *ngIf="date">
|
||||||
<span>{{date | date: 'dd MMM yyyy': 'UTC'}}</span>
|
<span>{{date | date: 'dd MMM yyyy': 'UTC'}}</span>
|
||||||
|
@ -364,4 +364,18 @@ export class EntityMetadataComponent {
|
||||||
this.projectsModal.open();
|
this.projectsModal.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get calcCurrentMonth() {
|
||||||
|
let currentDate = new Date(this.currentDate);
|
||||||
|
let startDate = new Date(this.startDate);
|
||||||
|
|
||||||
|
var months;
|
||||||
|
months = (currentDate.getFullYear() - startDate.getFullYear()) * 12;
|
||||||
|
months -= startDate.getMonth();
|
||||||
|
months += currentDate.getMonth();
|
||||||
|
if(startDate.getDate() > currentDate.getDate()) {
|
||||||
|
months--;
|
||||||
|
}
|
||||||
|
return months <= 0 ? 0 : months+1;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue