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] || {} let module = $modules[col.moduleImport] || {}
$: module = $modules[col.moduleImport] || {} $: module = $modules[col.moduleImport] || {}
$: console.log(
"peron",
$team,
Object.values($team).filter((p) => p.personType == "employee")
)
</script> </script>
{#if module.type == "iconCycleCircle"} {#if module.type == "iconCycleCircle"}

View File

@ -2,11 +2,12 @@
export let persons: Page[] export let persons: Page[]
let boxes = persons.map((p) => p.personPreview.name) let boxes = persons.map((p) => p.personPreview.name)
const sortByFirstName = (a, b) => { const sortByFirstName = (a, b) => {
const nameA = a.name.split(" ")[0] // Extracts the first name from "First Last" const nameA = a?.name?.split(" ")[0] // Extracts the first name from "First Last"
const nameB = b.name.split(" ")[0] const nameB = b?.name?.split(" ")[0]
return nameA.localeCompare(nameB) return nameA?.localeCompare(nameB)
} }
boxes = boxes.sort(sortByFirstName) boxes = boxes.sort(sortByFirstName)
$: console.log(boxes, "boxes", persons)
</script> </script>
<div class="boxList"> <div class="boxList">

View File

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

View File

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

View File

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