Implement DTOs, add managed state for schedule, export to txt
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
<script lang="ts">
|
||||
import type { CalendarDate } from "@internationalized/date";
|
||||
import { trace } from "@tauri-apps/plugin-log";
|
||||
import { Calendar, Popover } from "bits-ui";
|
||||
import { Button } from "$lib/components/ui/button/index.js";
|
||||
import { rota, steps } from "../../state.svelte.js";
|
||||
|
||||
@@ -321,7 +321,7 @@
|
||||
<div class="flex flex-col items-center space-y-2 px-4">
|
||||
<p class="text-[10px] font-black tracking-widest text-zinc-500 uppercase">Shift Types</p>
|
||||
<div class="flex gap-1">
|
||||
{#each ["OpenAsFirst", "OpenAsSecond", "Closed"] as type}
|
||||
{#each ["Closed", "OpenFirst", "OpenSecond"] as type}
|
||||
{@const active = resident.allowedTypes.includes(type)}
|
||||
<button
|
||||
type="button"
|
||||
@@ -348,14 +348,14 @@
|
||||
Reduced Workload
|
||||
</p>
|
||||
<button
|
||||
onclick={() => (resident.hasReducedLoad = !resident.hasReducedLoad)}
|
||||
onclick={() => (resident.reducedLoad = !resident.reducedLoad)}
|
||||
class="flex items-center gap-2 rounded-lg border px-3 py-1 transition-all hover:border-blue-200 hover:bg-white
|
||||
{resident.hasReducedLoad
|
||||
{resident.reducedLoad
|
||||
? 'border-green-200 bg-green-50 text-green-700'
|
||||
: 'border-zinc-200 bg-white text-zinc-500'}"
|
||||
>
|
||||
<div
|
||||
class="size-2 rounded-full {resident.hasReducedLoad
|
||||
class="size-2 rounded-full {resident.reducedLoad
|
||||
? 'animate-pulse bg-green-500'
|
||||
: 'bg-zinc-300'}"
|
||||
></div>
|
||||
|
||||
Reference in New Issue
Block a user