Browse Source

Shorten date on mobile

pull/5337/head
Thomas Kaul 2 weeks ago
parent
commit
c26fb71e06
  1. 7
      libs/ui/src/lib/activities-table/activities-table.component.html
  2. 5
      libs/ui/src/lib/activities-table/activities-table.component.ts
  3. 3
      libs/ui/src/lib/value/value.component.ts

7
libs/ui/src/lib/activities-table/activities-table.component.html

@ -171,7 +171,12 @@
</th>
<td *matCellDef="let element" class="px-1" mat-cell>
<div class="d-flex">
{{ element.date | date: defaultDateFormat }}
<gf-value
[deviceType]="deviceType"
[isDate]="true"
[locale]="locale"
[value]="isLoading ? undefined : element.date"
/>
</div>
</td>
</ng-container>

5
libs/ui/src/lib/activities-table/activities-table.component.ts

@ -6,7 +6,7 @@ import {
DEFAULT_PAGE_SIZE,
TAG_ID_EXCLUDE_FROM_ANALYSIS
} from '@ghostfolio/common/config';
import { getDateFormatString, getLocale } from '@ghostfolio/common/helper';
import { getLocale } from '@ghostfolio/common/helper';
import { AssetProfileIdentifier } from '@ghostfolio/common/interfaces';
import { OrderWithAccount } from '@ghostfolio/common/types';
@ -128,7 +128,6 @@ export class GfActivitiesTableComponent
@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
public defaultDateFormat: string;
public displayedColumns = [];
public endOfToday = endOfToday();
public hasDrafts = false;
@ -175,8 +174,6 @@ export class GfActivitiesTableComponent
}
public ngOnChanges() {
this.defaultDateFormat = getDateFormatString(this.locale);
this.displayedColumns = [
'select',
'importStatus',

3
libs/ui/src/lib/value/value.component.ts

@ -22,6 +22,7 @@ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
})
export class GfValueComponent implements OnChanges {
@Input() colorizeSign = false;
@Input() deviceType: string;
@Input() icon = '';
@Input() isAbsolute = false;
@Input() isCurrency = false;
@ -118,7 +119,7 @@ export class GfValueComponent implements OnChanges {
{
day: '2-digit',
month: '2-digit',
year: 'numeric'
year: this.deviceType === 'mobile' ? '2-digit' : 'numeric'
}
);
} else {

Loading…
Cancel
Save