From 096a16e2fc6743529a2550f65f3ce5b69411b242 Mon Sep 17 00:00:00 2001 From: Pier Dolique Date: Thu, 7 Nov 2024 23:30:58 +0200 Subject: [PATCH] feat: Equipment details page Fixes #149 --- app/app.vue | 17 ++ app/assets/styles/_base.scss | 3 + app/components/PerdLink.vue | 15 +- app/components/PerdTable/PerdTable.vue | 4 +- app/components/PerdTag.vue | 51 +++++ app/components/checklists/ChecklistItem.vue | 12 +- app/components/equipment/AddEquipmentForm.vue | 2 +- app/components/equipment/EquipmentCard.vue | 9 +- app/components/equipment/EquipmentTable.vue | 10 +- app/components/layout/PageContent.vue | 2 +- .../manager/equipment/EquipmentCard.vue | 9 +- .../manager/equipment/EquipmentTable.vue | 10 +- app/pages/equipment/index.vue | 2 +- app/pages/equipment/item/[itemId].vue | 180 ++++++++++++++++++ app/pages/inventory.vue | 10 +- app/pages/manager/equipment/index.vue | 2 +- public/equipment-item-placeholder.webp | Bin 0 -> 26828 bytes server/api/equipment/items/[itemId].get.ts | 57 ++++++ server/api/equipment/{ => items}/index.get.ts | 0 .../api/equipment/{ => items}/index.post.ts | 0 .../equipment-drafts.get.ts} | 0 21 files changed, 367 insertions(+), 28 deletions(-) create mode 100644 app/components/PerdTag.vue create mode 100644 app/pages/equipment/item/[itemId].vue create mode 100644 public/equipment-item-placeholder.webp create mode 100644 server/api/equipment/items/[itemId].get.ts rename server/api/equipment/{ => items}/index.get.ts (100%) rename server/api/equipment/{ => items}/index.post.ts (100%) rename server/api/{equipment/drafts.get.ts => search/equipment-drafts.get.ts} (100%) diff --git a/app/app.vue b/app/app.vue index 4099cf0..812c2f3 100644 --- a/app/app.vue +++ b/app/app.vue @@ -64,5 +64,22 @@ cursor: not-allowed; } } + + // Reset default p styles + p { + margin: 0; + } + + // Reset default ul styles + ul { + margin: 0; + padding: 0; + margin-left: 2rem; + } + + // Reset default li styles + li { + line-height: 1.5em; + } } diff --git a/app/assets/styles/_base.scss b/app/assets/styles/_base.scss index 0048c5a..22f8699 100644 --- a/app/assets/styles/_base.scss +++ b/app/assets/styles/_base.scss @@ -193,6 +193,9 @@ } :root { + // Text + --text-color-secondary: color-mix(in oklch, var(--text), transparent 30%); + // Overlay --overlay-color-background: oklch(0 0 0 / 50%); --overlay-backdrop-filter: blur(4px); diff --git a/app/components/PerdLink.vue b/app/components/PerdLink.vue index 59ca9c7..d50cf1a 100644 --- a/app/components/PerdLink.vue +++ b/app/components/PerdLink.vue @@ -1,5 +1,5 @@ @@ -13,25 +13,22 @@ diff --git a/app/components/PerdTable/PerdTable.vue b/app/components/PerdTable/PerdTable.vue index e11560f..837e202 100644 --- a/app/components/PerdTable/PerdTable.vue +++ b/app/components/PerdTable/PerdTable.vue @@ -42,7 +42,7 @@ defineProps(); - diff --git a/app/components/PerdTag.vue b/app/components/PerdTag.vue new file mode 100644 index 0000000..a3b4e9e --- /dev/null +++ b/app/components/PerdTag.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/app/components/checklists/ChecklistItem.vue b/app/components/checklists/ChecklistItem.vue index 7d17933..d72fbfa 100644 --- a/app/components/checklists/ChecklistItem.vue +++ b/app/components/checklists/ChecklistItem.vue @@ -10,7 +10,16 @@ />
- {{ item.equipment.name}} + + {{ item.equipment.name }} + + + + {{ item.equipment.name}} +
-
+
{{ name }}
@@ -7,7 +10,7 @@
{{ formattedWeight }}
-
+ + + diff --git a/app/pages/inventory.vue b/app/pages/inventory.vue index b296853..ae3d0ad 100644 --- a/app/pages/inventory.vue +++ b/app/pages/inventory.vue @@ -22,9 +22,12 @@ :columns="columns" >