From 837cde7bd6eccb20ad646e27343e4419769b4e0a Mon Sep 17 00:00:00 2001 From: Joe Arndt Date: Wed, 25 Feb 2026 15:57:12 -0600 Subject: [PATCH] resetting category component to baseline --- .../categories/categories.component.html | 43 ++++--------------- .../categories/categories.component.scss | 20 ++------- .../categories/categories.component.ts | 27 +----------- 3 files changed, 14 insertions(+), 76 deletions(-) diff --git a/src/app/components/metadata/categories/categories.component.html b/src/app/components/metadata/categories/categories.component.html index 366e582..9534c08 100644 --- a/src/app/components/metadata/categories/categories.component.html +++ b/src/app/components/metadata/categories/categories.component.html @@ -1,44 +1,17 @@

Categories

- - - New Category - - @if (!!newCategory()) { - - } - -
- - - - - - - - - - - - - @for (category of categories(); track category.id) { - - {{ category.name }} - - } - @if (!categories().length) { - - - - - } - + @for (category of categories(); track category.id) { +
{{ category.name }}
+ } + @if (!categories().length) { +
+ No categories to display +
+ }
diff --git a/src/app/components/metadata/categories/categories.component.scss b/src/app/components/metadata/categories/categories.component.scss index 2e129f2..85a72d5 100644 --- a/src/app/components/metadata/categories/categories.component.scss +++ b/src/app/components/metadata/categories/categories.component.scss @@ -21,20 +21,8 @@ } } -//.add-category { -// display: flex; -// align-items: baseline; -// gap: 0.5rem; -//} - -//.category-list { -// display: grid; -// gap: 1rem; -// justify-content: center; -//} -.category-item { - padding: 1rem; -} -mat-form-field { - width: 400px; +.category-list { + display: grid; + gap: 1rem; + justify-content: center; } diff --git a/src/app/components/metadata/categories/categories.component.ts b/src/app/components/metadata/categories/categories.component.ts index c3eb6e1..3028dbd 100644 --- a/src/app/components/metadata/categories/categories.component.ts +++ b/src/app/components/metadata/categories/categories.component.ts @@ -1,24 +1,11 @@ -import {Component, computed, effect, model} from '@angular/core'; +import { Component, computed } from '@angular/core'; import { CategoryService } from '../../../services/category.service'; import { DividerComponent } from '../../divider/divider.component'; -import {MatFormField, MatInput, MatLabel} from '@angular/material/input'; -import {FormsModule} from '@angular/forms'; -import {MatList, MatListItem} from '@angular/material/list'; -import {MatIconButton} from '@angular/material/button'; -import {MatIcon} from '@angular/material/icon'; @Component({ selector: 'app-categories', imports: [ DividerComponent, - MatInput, - MatFormField, - MatLabel, - FormsModule, - // MatList, - // MatListItem, - MatIconButton, - MatIcon ], templateUrl: './categories.component.html', styleUrl: './categories.component.scss' @@ -26,15 +13,5 @@ import {MatIcon} from '@angular/material/icon'; export class CategoriesComponent { protected categories = computed(() => this.categoryService.categories()); - public newCategory = model(''); - - public constructor(private readonly categoryService: CategoryService) { - effect(() => { - console.log(this.newCategory()); - }); - } - - public addClick(): void { - console.log('add clicked'); - } + public constructor(private readonly categoryService: CategoryService) { } }