Compare commits
2 Commits
b9375d66b6
...
92e4da4b93
| Author | SHA1 | Date | |
|---|---|---|---|
| 92e4da4b93 | |||
| 5978a96dd7 |
@@ -20,9 +20,12 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<label [for]="formFieldNames.date">
|
||||
Datum
|
||||
</label>
|
||||
<div class="flex gap-2 items-center">
|
||||
<label [for]="formFieldNames.date">
|
||||
Datum
|
||||
<app-required-marker />
|
||||
</label>
|
||||
</div>
|
||||
<p-datepicker [iconDisplay]="'input'"
|
||||
[firstDayOfWeek]="1"
|
||||
placeholder="Datum auswählen"
|
||||
|
||||
@@ -59,7 +59,7 @@ export class EditEntryComponent {
|
||||
|
||||
protected readonly formGroup = this.formBuilder.group({
|
||||
[this.formFieldNames.car]: [<Car | null>null, Validators.required],
|
||||
[this.formFieldNames.date]: [<Date | null>null],
|
||||
[this.formFieldNames.date]: [<Date>new Date(), Validators.required],
|
||||
[this.formFieldNames.mileage]: [
|
||||
<number | null>null,
|
||||
[Validators.required, Validators.min(1)],
|
||||
|
||||
@@ -6,19 +6,31 @@
|
||||
<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>{{ entry().dateTime | date:"dd.MM.yyyy" }}</div>
|
||||
<div class="flex gap-2 items-center">
|
||||
<ng-icon name="matCalendarMonthSharp" />
|
||||
<div>{{ entry().dateTime | date:"dd.MM.yyyy" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-4 sm:col-span-2 md:col-span-1 flex my-auto items-center justify-center">
|
||||
<div>{{ entry().car.name }}</div>
|
||||
<div class="flex gap-2 items-center">
|
||||
<ng-icon name="matDirectionsCarOutline" />
|
||||
<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 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">
|
||||
{{entry().amount }} ℓ
|
||||
<div class="flex gap-2 items-center">
|
||||
<ng-icon name="matLocalGasStationSharp" />
|
||||
<div>{{entry().amount }} ℓ</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,8 +4,14 @@ import { Component, DestroyRef, inject, input, output } from '@angular/core';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { NgIconComponent, provideIcons } from '@ng-icons/core';
|
||||
import {
|
||||
matDeleteSharp
|
||||
matCalendarMonthSharp,
|
||||
matDeleteSharp,
|
||||
matStraightenSharp,
|
||||
matLocalGasStationSharp,
|
||||
} from '@ng-icons/material-icons/sharp';
|
||||
import {
|
||||
matDirectionsCarOutline,
|
||||
} from '@ng-icons/material-icons/outline';
|
||||
import { ConsumptionClient } from '@vegasco-web/api/consumptions/consumption-client';
|
||||
import { Consumption } from '@vegasco-web/api/models/consumption';
|
||||
import { RoutingService } from '@vegasco-web/services/routing.service';
|
||||
@@ -28,6 +34,10 @@ import { catchError, EMPTY, Observable, tap, throwError } from 'rxjs';
|
||||
providers: [
|
||||
provideIcons({
|
||||
matDeleteSharp,
|
||||
matCalendarMonthSharp,
|
||||
matDirectionsCarOutline,
|
||||
matStraightenSharp,
|
||||
matLocalGasStationSharp,
|
||||
}),
|
||||
ConfirmationService,
|
||||
],
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
import { EntriesOverviewService } from './services/entries-overview.service';
|
||||
import { EntryCardComponent } from './components/entry-card/entry-card.component';
|
||||
import {
|
||||
matAddSharp
|
||||
matAddSharp,
|
||||
} from '@ng-icons/material-icons/sharp';
|
||||
import { NgIconComponent, provideIcons } from '@ng-icons/core';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user