CreatorBaseInputs.svelte 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <script lang="ts">
  2. import type { WeekSelection } from "$lib/dbdata";
  3. export let topic: string;
  4. export let location: string;
  5. export let selectedWeek: number;
  6. export let duration: number;
  7. export let description: string;
  8. export let dueDate: string;
  9. export let weeks: WeekSelection[];
  10. export let changeWeek = function a(){};
  11. // TODO auto gen weeks
  12. </script>
  13. <div class="field border">
  14. <input bind:value={topic} id="topic" placeholder="Thema">
  15. <label for="topic">Thema</label>
  16. </div>
  17. <div class="field textarea border">
  18. <textarea id="description" bind:value={description} placeholder="Beschreibung"></textarea>
  19. <label for="description">Beschreibung</label>
  20. </div>
  21. <div class="field border">
  22. <input bind:value={dueDate} type="date" id="due-date" placeholder="">
  23. <label for="topic">Frist</label>
  24. </div>
  25. <div class="field border">
  26. <input bind:value={location} id="location" placeholder="Ort">
  27. <label for="location">Ort</label>
  28. </div>
  29. <div class="field label border">
  30. <select bind:value={selectedWeek} on:change={changeWeek} id="week">
  31. {#each weeks as currentWeek}
  32. <option value={currentWeek.yearWeek}>{currentWeek.week} KW ({currentWeek.start.toLocaleDateString()} - {currentWeek.end.toLocaleDateString()})</option>
  33. {/each}
  34. </select>
  35. <label for="week">Woche</label>
  36. </div>
  37. <div class="field border label">
  38. <select bind:value={duration} id="duration">
  39. <option value={15}>15 Minuten</option>
  40. <option value={20}>20 Minuten</option>
  41. <option value={30}>30 Minuten</option>
  42. <option value={45}>45 Minuten</option>
  43. <option value={60}>1 Stunde</option>
  44. </select>
  45. <label for="duration">Dauer</label>
  46. </div>