Skip to content

Commit

Permalink
add missing src/EntitlementBadges.svelte from template
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Jun 20, 2024
1 parent 8543e45 commit 903bd4a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/EntitlementBadges.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script>
import { dndzone } from "svelte-dnd-action";
import EntitlementBadge from "./EntitlementBadge.svelte";
import { Entitlement } from "./entitlement.mjs";
export let entitlements;
function handleDndConsider(e) {
entitlements = e.detail.items.map(i => new Entitlement(i.id));
}
function handleDndFinalize(e) {
entitlements = e.detail.items.map(i => new Entitlement(i.id));
}
</script>

<section
use:dndzone={{ type: "entitlement", items: entitlements }}
on:consider={handleDndConsider}
on:finalize={handleDndFinalize}
>
{#each entitlements as entitlement (entitlement.id)}
<EntitlementBadge {entitlement} />
{/each}
</section>

0 comments on commit 903bd4a

Please sign in to comment.