Add icons in card
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-06-19 17:42:14 +02:00
parent 5978a96dd7
commit 92e4da4b93
3 changed files with 28 additions and 6 deletions

View File

@@ -6,19 +6,31 @@
<div class="grid grid-cols-4 gap-4"> <div class="grid grid-cols-4 gap-4">
<div class="col-span-4 sm:col-span-2 md:col-span-1 flex my-auto items-center justify-center"> <div class="col-span-4 sm:col-span-2 md:col-span-1 flex my-auto items-center justify-center">
<div class="flex gap-2 items-center">
<ng-icon name="matCalendarMonthSharp" />
<div>{{ entry().dateTime | date:"dd.MM.yyyy" }}</div> <div>{{ entry().dateTime | date:"dd.MM.yyyy" }}</div>
</div> </div>
</div>
<div class="col-span-4 sm:col-span-2 md:col-span-1 flex my-auto items-center justify-center"> <div class="col-span-4 sm:col-span-2 md:col-span-1 flex my-auto items-center justify-center">
<div class="flex gap-2 items-center">
<ng-icon name="matDirectionsCarOutline" />
<div>{{ entry().car.name }}</div> <div>{{ entry().car.name }}</div>
</div> </div>
<div class="col-span-4 sm:col-span-2 md:col-span-1 flex my-auto items-center justify-center">
{{entry().distance }} km
</div> </div>
<div class="col-span-4 sm:col-span-2 md:col-span-1 flex my-auto items-center justify-center"> <div class="col-span-4 sm:col-span-2 md:col-span-1 flex my-auto items-center justify-center">
{{entry().amount }} &#8467; <div class="flex gap-2 items-center">
<ng-icon name="matStraightenSharp" />
<div>{{entry().distance }} km</div>
</div>
</div>
<div class="col-span-4 sm:col-span-2 md:col-span-1 flex my-auto items-center justify-center">
<div class="flex gap-2 items-center">
<ng-icon name="matLocalGasStationSharp" />
<div>{{entry().amount }} &#8467;</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -4,8 +4,14 @@ import { Component, DestroyRef, inject, input, output } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { NgIconComponent, provideIcons } from '@ng-icons/core'; import { NgIconComponent, provideIcons } from '@ng-icons/core';
import { import {
matDeleteSharp matCalendarMonthSharp,
matDeleteSharp,
matStraightenSharp,
matLocalGasStationSharp,
} from '@ng-icons/material-icons/sharp'; } from '@ng-icons/material-icons/sharp';
import {
matDirectionsCarOutline,
} from '@ng-icons/material-icons/outline';
import { ConsumptionClient } from '@vegasco-web/api/consumptions/consumption-client'; import { ConsumptionClient } from '@vegasco-web/api/consumptions/consumption-client';
import { Consumption } from '@vegasco-web/api/models/consumption'; import { Consumption } from '@vegasco-web/api/models/consumption';
import { RoutingService } from '@vegasco-web/services/routing.service'; import { RoutingService } from '@vegasco-web/services/routing.service';
@@ -28,6 +34,10 @@ import { catchError, EMPTY, Observable, tap, throwError } from 'rxjs';
providers: [ providers: [
provideIcons({ provideIcons({
matDeleteSharp, matDeleteSharp,
matCalendarMonthSharp,
matDirectionsCarOutline,
matStraightenSharp,
matLocalGasStationSharp,
}), }),
ConfirmationService, ConfirmationService,
], ],

View File

@@ -19,7 +19,7 @@ import {
import { EntriesOverviewService } from './services/entries-overview.service'; import { EntriesOverviewService } from './services/entries-overview.service';
import { EntryCardComponent } from './components/entry-card/entry-card.component'; import { EntryCardComponent } from './components/entry-card/entry-card.component';
import { import {
matAddSharp matAddSharp,
} from '@ng-icons/material-icons/sharp'; } from '@ng-icons/material-icons/sharp';
import { NgIconComponent, provideIcons } from '@ng-icons/core'; import { NgIconComponent, provideIcons } from '@ng-icons/core';