From 97bf20cc1de55227f2c02bf2eb0fba28d09def50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20Voskuhl?= <juergen.voskuhl@itcv-software.com>
Date: Fri, 29 Sep 2023 00:08:18 +0200
Subject: [PATCH] Relopcate PageheaderCard.tsx

---
 components/ServiceTag.tsx                      | 18 ++++++++++++++++++
 .../it-standards}/PageHeaderCard.tsx           |  0
 components/it-standards/ServiceTag.tsx         | 16 ----------------
 3 files changed, 18 insertions(+), 16 deletions(-)
 create mode 100644 components/ServiceTag.tsx
 rename {pages/standards/components => components/it-standards}/PageHeaderCard.tsx (100%)
 delete mode 100644 components/it-standards/ServiceTag.tsx

diff --git a/components/ServiceTag.tsx b/components/ServiceTag.tsx
new file mode 100644
index 0000000..797487e
--- /dev/null
+++ b/components/ServiceTag.tsx
@@ -0,0 +1,18 @@
+import Chip from '@/components/Chip'
+import { Tag } from 'types/content/'
+import { translateLabel, translateTag } from '@/lib/utils/labelHelper'
+
+type ServiceTagOptions = {
+  tag: Tag,
+  style: string
+}
+
+const formatLabel = (tag: Tag) => {
+    return `${translateLabel(tag.name)}: ${translateTag(tag)}`
+}
+
+export default ({ tag, style }: ServiceTagOptions) => {
+    return (
+        <Chip text={formatLabel(tag)} style={`${style} capitalize ${tag.name == 'label' && tag.value == 'external' ? 'hidden' : ''}`} />
+    )
+}
diff --git a/pages/standards/components/PageHeaderCard.tsx b/components/it-standards/PageHeaderCard.tsx
similarity index 100%
rename from pages/standards/components/PageHeaderCard.tsx
rename to components/it-standards/PageHeaderCard.tsx
diff --git a/components/it-standards/ServiceTag.tsx b/components/it-standards/ServiceTag.tsx
deleted file mode 100644
index 922da9f..0000000
--- a/components/it-standards/ServiceTag.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Tag } from 'types/content/'
-import LifecyclePicture from '@/components/it-standards/LifecyclePicture'
-
-type ServiceTagOptions = {
-  tag: Tag,
-  style: string
-}
-
-export default ({ tag, style }: ServiceTagOptions) => {
-    /* beim tag 'status' soll das zugehĂśrige Lebenszyklus-Bild ausgegeben werden */
-    if (tag.name == 'status') {
-        return (
-            <LifecyclePicture {...tag } />
-        )
-    }
-}
-- 
GitLab