From 50eb165417da16608b7186eb46213d41487ddd33 Mon Sep 17 00:00:00 2001 From: willkrakow Date: Wed, 19 Jan 2022 20:01:05 -0500 Subject: [PATCH] Add manufacturer field to item. Add manufacturer column to CategoryTable --- components/CategoryTable.module.scss | 10 +++++++--- components/CategoryTable.tsx | 3 ++- types/item.ts | 4 +++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/components/CategoryTable.module.scss b/components/CategoryTable.module.scss index e0f1ba6..346c939 100644 --- a/components/CategoryTable.module.scss +++ b/components/CategoryTable.module.scss @@ -82,15 +82,19 @@ .ItemName { font-weight: 700; - width: 25%; + width: 15%; a { text-decoration: underline; } } +.ItemManufacturer { + width: 13%; +} + .ItemDescription { - width: 42%; + width: 33%; } .ItemPrice { @@ -99,7 +103,7 @@ } .ItemWorn { - width: 42px; + width: 30px; text-align: right; } diff --git a/components/CategoryTable.tsx b/components/CategoryTable.tsx index 251b46f..8cb16ae 100644 --- a/components/CategoryTable.tsx +++ b/components/CategoryTable.tsx @@ -9,7 +9,7 @@ type Props = { export const CategoryTable: FC = ({ data, compact }) => { const { category, items } = data; - + return (
@@ -39,6 +39,7 @@ export const CategoryTable: FC = ({ data, compact }) => { item.name )}
+
{item.manufacturer}
{item.product_name}
{item.price && diff --git a/types/item.ts b/types/item.ts index 4c26fd4..49cef39 100644 --- a/types/item.ts +++ b/types/item.ts @@ -10,6 +10,7 @@ export interface BaseItem { price?: string; product_url?: string; notes?: string; + manufacturer?: string; } export interface Item extends BaseItem { @@ -58,5 +59,6 @@ export enum ItemConstants { name = 200, product_name = 500, notes = 500, - product_url = 500 + product_url = 500, + manufacturer = 200 }