-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
164 additions
and
2 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
47 changes: 47 additions & 0 deletions
47
frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte
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,47 @@ | ||
<script lang="ts"> | ||
import * as m from '$paraglide/messages'; | ||
import { safeTranslate } from '$lib/utils/i18n'; | ||
import Tile from './Tile.svelte'; | ||
const data = { | ||
ws1: [ | ||
{ title: safeTranslate(m.ebiosWs1_1()), status: 'done', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs1_2()), status: 'done', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs1_3()), status: 'to_do', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs1_4()), status: 'to_do', href: '#' } | ||
], | ||
ws2: [ | ||
{ title: safeTranslate(m.ebiosWs2_1()), status: 'to_do', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs2_2()), status: 'to_do', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs2_3()), status: 'to_do', href: '#' } | ||
], | ||
ws3: [ | ||
{ title: safeTranslate(m.ebiosWs3_1()), status: 'to_do', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs3_2()), status: 'to_do', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs3_3()), status: 'done', href: '#' } | ||
], | ||
ws4: [ | ||
{ title: safeTranslate(m.ebiosWs4_1()), status: 'to_do', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs4_2()), status: 'to_do', href: '#' } | ||
], | ||
ws5: [ | ||
{ title: safeTranslate(m.ebiosWs5_1()), status: 'done', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs5_2()), status: 'done', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs5_3()), status: 'to_do', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs5_4()), status: 'to_do', href: '#' }, | ||
{ title: safeTranslate(m.ebiosWs5_5()), status: 'done', href: '#' } | ||
] | ||
}; | ||
</script> | ||
|
||
<div class="h-screen w-full p-8"> | ||
<div | ||
class="card bg-white shadow-lg w-full h-full grid xl:grid-cols-3 lg:grid-cols-2 md:grid-cols-1 gap-8 p-8" | ||
> | ||
<Tile title={m.ebiosWs1()} accent_color="bg-pink-600" status="to_do" meta={data.ws1} /> | ||
<Tile title={m.ebiosWs2()} accent_color="bg-fuchsia-900" status="to_do" meta={data.ws2} /> | ||
<Tile title={m.ebiosWs3()} accent_color="bg-teal-500" status="to_do" meta={data.ws3} /> | ||
<Tile title={m.ebiosWs4()} accent_color="bg-yellow-600" status="to_do" meta={data.ws4} /> | ||
<Tile title={m.ebiosWs5()} accent_color="bg-red-500" status="to_do" meta={data.ws5} /> | ||
<Tile title={m.summary()} accent_color="bg-purple-800" status="to_do" /> | ||
</div> | ||
</div> |
63 changes: 63 additions & 0 deletions
63
frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte
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,63 @@ | ||
<script lang="ts"> | ||
import * as m from '$paraglide/messages'; | ||
import { safeTranslate } from '$lib/utils/i18n'; | ||
export let title = 'activity'; | ||
export let status = ''; | ||
export let meta = null; | ||
export let href = '#'; | ||
export let accent_color = ''; | ||
</script> | ||
|
||
<div class="p-5 {accent_color}"> | ||
<div class="rounded-lg bg-white p-4 flex flex-col justify-between h-full"> | ||
<div class="flex justify-between mb-2"> | ||
<div class="font-semibold">{title}</div> | ||
<div class="text-xl" title={safeTranslate(status)}> | ||
{#if status == 'to_do'} | ||
<i class="fa-solid fa-exclamation"></i> | ||
{:else if status == 'in_progress'} | ||
<i class="fa-solid fa-spinner"></i> | ||
{:else if status == 'done'} | ||
<i class="fa-solid fa-check"></i> | ||
{/if} | ||
</div> | ||
</div> | ||
{#if meta} | ||
<div class="flex mx-auto"> | ||
<div> | ||
<ol class="relative text-gray-500 border-s border-gray-200"> | ||
{#each meta as step, i} | ||
{#if step.status == 'done'} | ||
<li class="mb-10 ms-6"> | ||
<a href={step.href} class="hover:text-purple-800"> | ||
<span | ||
class="absolute flex items-center justify-center w-8 h-8 bg-green-200 rounded-full -start-4 ring-4 ring-white" | ||
> | ||
<i class="fa-solid fa-check"></i> | ||
</span> | ||
<h3 class="font-medium leading-tight">{m.activity()} {i + 1}</h3> | ||
<p class="text-sm">{step.title}</p> | ||
</a> | ||
</li> | ||
{:else} | ||
<li class="mb-10 ms-6"> | ||
<a href={step.href} class="hover:text-purple-800"> | ||
<span | ||
class="absolute flex items-center justify-center w-8 h-8 bg-gray-100 rounded-full -start-4 ring-4 ring-white" | ||
> | ||
<i class="fa-solid fa-clipboard-check"></i> | ||
</span> | ||
<h3 class="font-medium leading-tight">{m.activity()} {i + 1}</h3> | ||
<p class="text-sm">{step.title}</p> | ||
</a> | ||
</li> | ||
{/if} | ||
{/each} | ||
</ol> | ||
</div> | ||
</div> | ||
{/if} | ||
<div class="justify-end flex"></div> | ||
</div> | ||
</div> |
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