building out category form
This commit is contained in:
parent
759086f7c5
commit
2c6d0c1d0c
3 changed files with 16 additions and 4 deletions
|
|
@ -7,8 +7,11 @@
|
|||
<mat-card-content>
|
||||
<div class="category-list">
|
||||
@for (category of categories(); track category.id) {
|
||||
<div>
|
||||
{{ category.name }}
|
||||
<!-- TODO: Convert to form...-->
|
||||
<div class="category-item">
|
||||
<div>{{ category.name }}</div>
|
||||
|
||||
<button matIconButton><mat-icon>edit</mat-icon></button>
|
||||
</div>
|
||||
}
|
||||
@if (!categories().length) {
|
||||
|
|
|
|||
|
|
@ -15,5 +15,10 @@
|
|||
.category-list {
|
||||
padding-top: 1rem;
|
||||
display: grid;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.category-item {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
import { Component, computed } from '@angular/core';
|
||||
import { CategoryService } from '../../../services/category.service';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
selector: 'app-categories',
|
||||
imports: [
|
||||
MatCardModule
|
||||
MatCardModule,
|
||||
MatIconModule,
|
||||
MatButtonModule
|
||||
],
|
||||
templateUrl: './categories.component.html',
|
||||
styleUrl: './categories.component.scss'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue