Compare commits
2 Commits
b9375d66b6
...
92e4da4b93
| Author | SHA1 | Date | |
|---|---|---|---|
| 92e4da4b93 | |||
| 5978a96dd7 |
@@ -20,9 +20,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<label [for]="formFieldNames.date">
|
<div class="flex gap-2 items-center">
|
||||||
Datum
|
<label [for]="formFieldNames.date">
|
||||||
</label>
|
Datum
|
||||||
|
<app-required-marker />
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<p-datepicker [iconDisplay]="'input'"
|
<p-datepicker [iconDisplay]="'input'"
|
||||||
[firstDayOfWeek]="1"
|
[firstDayOfWeek]="1"
|
||||||
placeholder="Datum auswählen"
|
placeholder="Datum auswählen"
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export class EditEntryComponent {
|
|||||||
|
|
||||||
protected readonly formGroup = this.formBuilder.group({
|
protected readonly formGroup = this.formBuilder.group({
|
||||||
[this.formFieldNames.car]: [<Car | null>null, Validators.required],
|
[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]: [
|
[this.formFieldNames.mileage]: [
|
||||||
<number | null>null,
|
<number | null>null,
|
||||||
[Validators.required, Validators.min(1)],
|
[Validators.required, Validators.min(1)],
|
||||||
|
|||||||
@@ -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>{{ 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>
|
||||||
|
|
||||||
<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>{{ entry().car.name }}</div>
|
<div class="flex gap-2 items-center">
|
||||||
|
<ng-icon name="matDirectionsCarOutline" />
|
||||||
|
<div>{{ entry().car.name }}</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">
|
||||||
{{entry().distance }} km
|
<div class="flex gap-2 items-center">
|
||||||
|
<ng-icon name="matStraightenSharp" />
|
||||||
|
<div>{{entry().distance }} km</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">
|
||||||
{{entry().amount }} ℓ
|
<div class="flex gap-2 items-center">
|
||||||
|
<ng-icon name="matLocalGasStationSharp" />
|
||||||
|
<div>{{entry().amount }} ℓ</div>
|
||||||
|
</div>
|
||||||
</div>
|
</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 { 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,
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user