-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor door access query and fix overflow design
- Loading branch information
1 parent
f897744
commit 57b62d6
Showing
4 changed files
with
164 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script lang="ts"> | ||
import type { MemberDoorPolicies } from "$lib/utils/member"; | ||
export let doorAccess: MemberDoorPolicies; | ||
</script> | ||
|
||
<div class="my-2 text-xl font-bold">Dörraccess</div> | ||
{#each doorAccess as doorPolicy (doorPolicy.name + doorPolicy.startDate + doorPolicy.endDate)} | ||
<div | ||
class="my-2 flex items-center justify-between gap-4 rounded-lg bg-base-200 p-3" | ||
> | ||
<div class="flex flex-col"> | ||
<span class="font-semibold">{doorPolicy.name}</span> | ||
{#if doorPolicy.startDate != null || doorPolicy.endDate != null} | ||
<span class="text-nowrap text-[0.5rem] font-semibold opacity-50"> | ||
{doorPolicy.startDate?.toLocaleDateString("sv-SE") ?? ""} | ||
- | ||
{doorPolicy.endDate?.toLocaleDateString("sv-SE") ?? ""} | ||
</span> | ||
{/if} | ||
</div> | ||
<div class="flex flex-1 flex-col items-stretch overflow-hidden text-right"> | ||
<div class="flex flex-col text-xs font-bold opacity-50"> | ||
{#each doorPolicy.roles as role (role)} | ||
<span class="overflow-hidden text-ellipsis whitespace-nowrap" | ||
>{role}</span | ||
> | ||
{/each} | ||
</div> | ||
</div> | ||
</div> | ||
{/each} |