From baf4a4b7b27e6308666a7b1ef3f27d8e175f988e Mon Sep 17 00:00:00 2001 From: robin Date: Sat, 18 Nov 2023 16:54:11 +0000 Subject: [PATCH] fix --- frontend/src/lib/components/Pagebuilder/Module.svelte | 5 +++++ frontend/src/lib/components/widgets/boxlist.svelte | 7 ++++--- frontend/src/lib/components/widgets/iconBlock.svelte | 1 + frontend/src/lib/components/widgets/image.svelte | 3 +++ frontend/src/lib/components/widgets/persons.svelte | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/frontend/src/lib/components/Pagebuilder/Module.svelte b/frontend/src/lib/components/Pagebuilder/Module.svelte index edaa095..93bfb46 100644 --- a/frontend/src/lib/components/Pagebuilder/Module.svelte +++ b/frontend/src/lib/components/Pagebuilder/Module.svelte @@ -13,6 +13,11 @@ let module = $modules[col.moduleImport] || {} $: module = $modules[col.moduleImport] || {} + $: console.log( + "peron", + $team, + Object.values($team).filter((p) => p.personType == "employee") + ) {#if module.type == "iconCycleCircle"} diff --git a/frontend/src/lib/components/widgets/boxlist.svelte b/frontend/src/lib/components/widgets/boxlist.svelte index 3650b94..8a02a81 100644 --- a/frontend/src/lib/components/widgets/boxlist.svelte +++ b/frontend/src/lib/components/widgets/boxlist.svelte @@ -2,11 +2,12 @@ export let persons: Page[] let boxes = persons.map((p) => p.personPreview.name) const sortByFirstName = (a, b) => { - const nameA = a.name.split(" ")[0] // Extracts the first name from "First Last" - const nameB = b.name.split(" ")[0] - return nameA.localeCompare(nameB) + const nameA = a?.name?.split(" ")[0] // Extracts the first name from "First Last" + const nameB = b?.name?.split(" ")[0] + return nameA?.localeCompare(nameB) } boxes = boxes.sort(sortByFirstName) + $: console.log(boxes, "boxes", persons)
diff --git a/frontend/src/lib/components/widgets/iconBlock.svelte b/frontend/src/lib/components/widgets/iconBlock.svelte index 5d918dd..11b41c0 100644 --- a/frontend/src/lib/components/widgets/iconBlock.svelte +++ b/frontend/src/lib/components/widgets/iconBlock.svelte @@ -46,6 +46,7 @@ img { width: 75%; height: auto; + } .text { display: flex; diff --git a/frontend/src/lib/components/widgets/image.svelte b/frontend/src/lib/components/widgets/image.svelte index 8e34358..2e9a7ff 100644 --- a/frontend/src/lib/components/widgets/image.svelte +++ b/frontend/src/lib/components/widgets/image.svelte @@ -43,5 +43,8 @@ display: flex; justify-content: flex-start; gap: 20px; + img { + width: 48px; + } } diff --git a/frontend/src/lib/components/widgets/persons.svelte b/frontend/src/lib/components/widgets/persons.svelte index 63d0bc6..cbf137e 100644 --- a/frontend/src/lib/components/widgets/persons.svelte +++ b/frontend/src/lib/components/widgets/persons.svelte @@ -39,7 +39,7 @@ />
- {p.personPreview.name} + {p?.personPreview?.name}
{/each}