fix
All checks were successful
deploy to production / deploy (push) Successful in 29s

This commit is contained in:
Robin Grenzdörfer 2023-11-18 16:54:11 +00:00
parent c0209910e2
commit baf4a4b7b2
5 changed files with 14 additions and 4 deletions

View File

@ -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")
)
</script>
{#if module.type == "iconCycleCircle"}

View File

@ -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)
</script>
<div class="boxList">

View File

@ -46,6 +46,7 @@
img {
width: 75%;
height: auto;
}
.text {
display: flex;

View File

@ -43,5 +43,8 @@
display: flex;
justify-content: flex-start;
gap: 20px;
img {
width: 48px;
}
}
</style>

View File

@ -39,7 +39,7 @@
/>
</div>
<div class="text">
{p.personPreview.name}
{p?.personPreview?.name}
</div>
</button>
{/each}