feat: Add Hungarian translations for event type management, introduce max_slot_count column, and adjust post-submission navigation.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<form [formGroup]="filterForm" class="p-4 bg-base-200 rounded-lg shadow">
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 items-end">
|
||||
<div class="form-control"><label class="label"><span class="label-text">SearchTerm</span></label>
|
||||
<input type="text" formControlName="term" class="input input-bordered w-full" placeholder="Search term" /></div>
|
||||
<div class="form-control"><label class="label"><span class="label-text">Keresés</span></label>
|
||||
<input type="text" formControlName="term" class="input input-bordered w-full" placeholder="Keresés" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="card bg-base-100 shadow-xl max-w-2xl mx-auto">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title text-3xl">
|
||||
{{ isEditMode ? 'Edit' : 'Create' }} EventType
|
||||
{{ isEditMode ? 'Frissítés' : 'Létrehozás' }} Esemény típus
|
||||
</h2>
|
||||
|
||||
<form [formGroup]="form" (ngSubmit)="onSubmit()" class="space-y-4 mt-4">
|
||||
@@ -28,9 +28,9 @@
|
||||
</div>
|
||||
|
||||
<div class="card-actions justify-end mt-6">
|
||||
<a routerLink="/event-type" class="btn btn-ghost">Cancel</a>
|
||||
<a routerLink="/event-type" class="btn btn-ghost">Vissza</a>
|
||||
<button type="submit" class="btn btn-primary" [disabled]="form.invalid">
|
||||
{{ isEditMode ? 'Update' : 'Create' }}
|
||||
{{ isEditMode ? 'Frissítés' : 'Létrehozás' }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -105,7 +105,7 @@ export class EventTypeFormComponent implements OnInit {
|
||||
}
|
||||
|
||||
action$.subscribe({
|
||||
next: () => this.router.navigate(['/event-type']),
|
||||
next: () => this.router.navigate(['/event-type/table']),
|
||||
error: (err) => console.error('Failed to save event-type', err)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -13,19 +13,21 @@
|
||||
<table class="table w-full">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>name</th>
|
||||
<th>description</th>
|
||||
<th>color</th>
|
||||
<th class="text-right">Actions</th>
|
||||
<th>Azonosító</th>
|
||||
<th>Név</th>
|
||||
<th>Leírás</th>
|
||||
<th>Szín</th>
|
||||
<th>Férőhelyek</th>
|
||||
<th class="text-right">Műveletek</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let item of response.data" class="hover">
|
||||
<td>{{ item.id }}</td>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.description }}</td>
|
||||
<td>{{ item.color }}</td>
|
||||
<td>{{ item.id }}</td>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.description }}</td>
|
||||
<td>{{ item.color }}</td>
|
||||
<td>{{ item.max_slot_count }}</td>
|
||||
<td class="text-right space-x-2">
|
||||
<a [routerLink]="['/event-type', item.id]" class="btn btn-sm btn-ghost">Részletek</a>
|
||||
<a [routerLink]="['/event-type', item.id, 'edit']" class="btn btn-sm btn-ghost">Módosítás</a>
|
||||
@@ -33,7 +35,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="response.data.length === 0">
|
||||
<td colspan="5" class="text-center">No event-type found.</td>
|
||||
<td colspan="6" class="text-center">Nem található eseménytípusok.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -42,14 +44,10 @@
|
||||
<!-- Pagination Controls -->
|
||||
<div *ngIf="response.meta.totalPages > 1" class="flex justify-center mt-4">
|
||||
<div class="join">
|
||||
<button
|
||||
class="join-item btn"
|
||||
(click)="changePage(response.meta.currentPage - 1)"
|
||||
<button class="join-item btn" (click)="changePage(response.meta.currentPage - 1)"
|
||||
[disabled]="response.meta.currentPage === 1">«</button>
|
||||
<button class="join-item btn">Page {{ response.meta.currentPage }} of {{ response.meta.totalPages }}</button>
|
||||
<button
|
||||
class="join-item btn"
|
||||
(click)="changePage(response.meta.currentPage + 1)"
|
||||
<button class="join-item btn">Oldal {{ response.meta.currentPage }} of {{ response.meta.totalPages }}</button>
|
||||
<button class="join-item btn" (click)="changePage(response.meta.currentPage + 1)"
|
||||
[disabled]="response.meta.currentPage === response.meta.totalPages">»</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -60,7 +60,7 @@ export class EventTypeTableComponent implements OnInit {
|
||||
columns: [
|
||||
{
|
||||
attribute: 'name',
|
||||
headerCell: true,
|
||||
headerCell: { value: 'Név' },
|
||||
valueCell: {
|
||||
styleClass: ctx => 'w-[1%]',
|
||||
value: item => item?.name,
|
||||
@@ -68,14 +68,14 @@ export class EventTypeTableComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
attribute: 'description',
|
||||
headerCell: true,
|
||||
headerCell: { value: 'Leírás' },
|
||||
valueCell: {
|
||||
value: item => item?.description,
|
||||
},
|
||||
},
|
||||
{
|
||||
attribute: 'color',
|
||||
headerCell: true,
|
||||
headerCell: { value: 'Szín' },
|
||||
valueCell: {
|
||||
styleClass: ctx => 'w-[1%]',
|
||||
value: item => item?.color,
|
||||
@@ -85,9 +85,16 @@ export class EventTypeTableComponent implements OnInit {
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
attribute: 'max_slot_count',
|
||||
headerCell: { value: 'Férőhelyek' },
|
||||
valueCell: {
|
||||
value: item => item?.max_slot_count,
|
||||
},
|
||||
},
|
||||
{
|
||||
attribute: 'actions',
|
||||
headerCell: { value: 'Actions' },
|
||||
headerCell: { value: 'Műveletek' },
|
||||
valueCell: {
|
||||
styleClass: ctx => 'w-[1%]',
|
||||
component: GenericActionColumn,
|
||||
|
||||
Reference in New Issue
Block a user