Compare commits
No commits in common. "a4eebb944f55da8e87cc899eebada0bd3fd37aa8" and "f76e7fd97f62d9b41ecbabc3334c2c1876be253d" have entirely different histories.
a4eebb944f
...
f76e7fd97f
8 changed files with 7 additions and 21 deletions
|
@ -50,7 +50,6 @@ jobs:
|
||||||
id: e2etest
|
id: e2etest
|
||||||
run: |
|
run: |
|
||||||
pnpm run build -l silent
|
pnpm run build -l silent
|
||||||
npx playwright install chromium
|
|
||||||
pnpm run test:e2e
|
pnpm run test:e2e
|
||||||
- name: 💢 Upload E2E report
|
- name: 💢 Upload E2E report
|
||||||
if: ${{ failure() && steps.e2etest.conclusion == 'failure' }}
|
if: ${{ failure() && steps.e2etest.conclusion == 'failure' }}
|
||||||
|
|
|
@ -8,14 +8,12 @@
|
||||||
import { toastError, toastInfo } from "$lib/shared/util/toast";
|
import { toastError, toastInfo } from "$lib/shared/util/toast";
|
||||||
|
|
||||||
import Icon from "$lib/components/ui/Icon.svelte";
|
import Icon from "$lib/components/ui/Icon.svelte";
|
||||||
import { getSavedFilters } from "$lib/stores";
|
import { savedFilters } from "$lib/stores";
|
||||||
|
|
||||||
import Chip from "./SavedFilterChip.svelte";
|
import Chip from "./SavedFilterChip.svelte";
|
||||||
|
|
||||||
export let view: string;
|
export let view: string;
|
||||||
|
|
||||||
const savedFilters = getSavedFilters();
|
|
||||||
|
|
||||||
$: filters = $savedFilters[view] ?? [];
|
$: filters = $savedFilters[view] ?? [];
|
||||||
|
|
||||||
function getQuery(): string {
|
function getQuery(): string {
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
><a
|
><a
|
||||||
class="btn btn-xs btn-primary btn-id"
|
class="btn btn-xs btn-primary"
|
||||||
aria-label="Eintrag anzeigen"
|
aria-label="Eintrag anzeigen"
|
||||||
href="/patient/{patient.id}">{patient.id}</a
|
href="/patient/{patient.id}">{patient.id}</a
|
||||||
></td
|
></td
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { getContext } from "svelte";
|
|
||||||
import { derived, writable, type Writable } from "svelte/store";
|
import { derived, writable, type Writable } from "svelte/store";
|
||||||
|
|
||||||
import type { SavedFilter } from "$lib/shared/model";
|
import type { SavedFilter } from "$lib/shared/model";
|
||||||
|
@ -7,6 +6,4 @@ import type { SavedFilter } from "$lib/shared/model";
|
||||||
export const screenWidth = writable(0);
|
export const screenWidth = writable(0);
|
||||||
export const screenWidthSmall = derived(screenWidth, ($mainWidth) => $mainWidth < 500);
|
export const screenWidthSmall = derived(screenWidth, ($mainWidth) => $mainWidth < 500);
|
||||||
|
|
||||||
// Context key: "savedFilters"
|
export const savedFilters: Writable<Record<string, SavedFilter[]>> = writable({});
|
||||||
export type SavedFilters = Writable<Record<string, SavedFilter[]>>;
|
|
||||||
export const getSavedFilters: () => SavedFilters = () => getContext("savedFilters");
|
|
||||||
|
|
|
@ -3,22 +3,16 @@
|
||||||
import type { LayoutData } from "./$types";
|
import type { LayoutData } from "./$types";
|
||||||
|
|
||||||
import { mdiAccount, mdiHome } from "@mdi/js";
|
import { mdiAccount, mdiHome } from "@mdi/js";
|
||||||
import { setContext } from "svelte";
|
|
||||||
import { writable } from "svelte/store";
|
|
||||||
|
|
||||||
import { defaultFilterUrl, defaultVisitUrl } from "$lib/shared/util";
|
import { defaultFilterUrl, defaultVisitUrl } from "$lib/shared/util";
|
||||||
|
|
||||||
import Icon from "$lib/components/ui/Icon.svelte";
|
import Icon from "$lib/components/ui/Icon.svelte";
|
||||||
import NavLink from "$lib/components/ui/NavLink.svelte";
|
import NavLink from "$lib/components/ui/NavLink.svelte";
|
||||||
import type { SavedFilters } from "$lib/stores";
|
import { savedFilters } from "$lib/stores";
|
||||||
|
|
||||||
export let data: LayoutData;
|
export let data: LayoutData;
|
||||||
|
|
||||||
const savedFilters: SavedFilters = writable();
|
|
||||||
|
|
||||||
$: savedFilters.set(data.savedFilters);
|
$: savedFilters.set(data.savedFilters);
|
||||||
|
|
||||||
setContext("savedFilters", savedFilters);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="navbar-outer">
|
<div class="navbar-outer">
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
|
|
||||||
import { defaultFilterUrl } from "$lib/shared/util";
|
import { defaultFilterUrl } from "$lib/shared/util";
|
||||||
|
|
||||||
import { getSavedFilters } from "$lib/stores";
|
import { savedFilters } from "$lib/stores";
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
|
||||||
const savedFilters = getSavedFilters();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
{#each data.rooms as room (room.id)}
|
{#each data.rooms as room (room.id)}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a class="btn btn-sm btn-id" href="/room/{room.id}">{room.name}</a></td>
|
<td><a class="btn btn-sm" href="/room/{room.id}">{room.name}</a></td>
|
||||||
<td>{room.station.name}</td>
|
<td>{room.station.name}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
{#each data.stations as station (station.id)}
|
{#each data.stations as station (station.id)}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class="btn btn-sm btn-id" href="/station/{station.id}">{station.name}</a>
|
<a class="btn btn-sm" href="/station/{station.id}">{station.name}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
Loading…
Reference in a new issue