Update
This commit is contained in:
rodič
0131e019d8
revize
34e0b04c8d
|
@ -1,6 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { formatCET } from "$lib/utils.js";
|
import { formatCET } from "$lib/utils.js";
|
||||||
import { parse } from "date-fns";
|
|
||||||
|
|
||||||
export let item;
|
export let item;
|
||||||
export let e;
|
export let e;
|
||||||
|
@ -10,11 +9,11 @@
|
||||||
? bundle.spec.stages.find((s) => s.id === item.stage)
|
? bundle.spec.stages.find((s) => s.id === item.stage)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
const start = typeof(item.period.start) === 'string' ? new Date(item.period.start) : item.period.start
|
$: start = typeof(item.period.start) === 'string' ? new Date(item.period.start) : item.period.start
|
||||||
const end = typeof(item.period.end) === 'string' ? new Date(item.period.end) : item.period.end
|
$: end = typeof(item.period.end) === 'string' ? new Date(item.period.end) : item.period.end
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="font-semibold">
|
<div class="font-semibold">
|
||||||
{formatCET(start, "yyyy-MM-dd") === "2022-06-04" ? "SO" : "NE"}
|
{formatCET(start, "yyyy-MM-dd") === "2022-06-04" ? "SO" : "NE"}
|
||||||
{formatCET(start, "HH:mm")}-{formatCET(end, "HH:mm")} ({stage ? stage.name : "n/a"})
|
{formatCET(start, "HH:mm")}-{formatCET(end, "HH:mm")} ({stage ? stage.name : "n/a"}) @{item.id}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import { format, compareAsc, compareDesc } from "date-fns";
|
import { format, compareAsc, compareDesc } from "date-fns";
|
||||||
|
|
||||||
|
const TZoffset = (new Date()).getTimezoneOffset()
|
||||||
|
|
||||||
export function formatCET (...args) {
|
export function formatCET (...args) {
|
||||||
|
|
||||||
const TZoffset = new Date().getTimezoneOffset()
|
|
||||||
if (TZoffset !== -120) {
|
if (TZoffset !== -120) {
|
||||||
const co = (120-(-TZoffset))
|
const co = (120-(-TZoffset))
|
||||||
args[0] = args[0].getTime() + (co*60*1000)
|
args[0] = args[0].getTime() + (co*60*1000)
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
import { format, compareAsc, compareDesc } from "date-fns";
|
import { format, compareAsc, compareDesc } from "date-fns";
|
||||||
import { formatCET } from '$lib/utils.js';
|
import { formatCET } from '$lib/utils.js';
|
||||||
import { bundle, userData, loadInfo, schedulePref } from "$lib/stores.js";
|
import { bundle, userData, loadInfo, schedulePref } from "$lib/stores.js";
|
||||||
import { cs } from "date-fns/locale/index.js";
|
|
||||||
import { parsePeriod } from "$lib/periods.js";
|
import { parsePeriod } from "$lib/periods.js";
|
||||||
import SvelteMarkdown from "svelte-markdown";
|
import SvelteMarkdown from "svelte-markdown";
|
||||||
import SvelteTooltip from "$lib/SvelteTooltip.svelte";
|
import SvelteTooltip from "$lib/SvelteTooltip.svelte";
|
||||||
|
@ -408,7 +407,7 @@
|
||||||
{#if st.name}
|
{#if st.name}
|
||||||
{st.name}
|
{st.name}
|
||||||
{:else}
|
{:else}
|
||||||
{formatCET(new Date(st.date), "iiii d.M.y", { locale: cs })}
|
{formatCET(new Date(st.date), "iiii d.M.y")}
|
||||||
{/if}
|
{/if}
|
||||||
</h2>
|
</h2>
|
||||||
<div class="inline-block ml-2 text-sm font-normal my-auto print:hidden">
|
<div class="inline-block ml-2 text-sm font-normal my-auto print:hidden">
|
||||||
|
@ -433,7 +432,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th
|
<th
|
||||||
class="xl:w-16 top-0 sticky bg-white uppercase text-sm px-0.5 text-custom-blue"
|
class="xl:w-16 top-0 sticky bg-white uppercase text-sm px-0.5 text-custom-blue"
|
||||||
>{formatCET(new Date(st.date), "iiiiii", { locale: cs })}<br
|
>{formatCET(new Date(st.date), "iiiiii")}<br
|
||||||
/>{formatCET(new Date(st.date), "d.M.")}</th
|
/>{formatCET(new Date(st.date), "d.M.")}</th
|
||||||
>
|
>
|
||||||
{#each activeStages($bundle, $bundle.spec.stages, st, plan) as stage}
|
{#each activeStages($bundle, $bundle.spec.stages, st, plan) as stage}
|
||||||
|
|
|
@ -232,8 +232,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
{#each ids as id}
|
{#each ids.map(id => $bundle.spec.events.find(e => e.id === id)) as ev}
|
||||||
<Event event={$bundle.spec.events.find((e) => e.id === id)} hideDate="true" />
|
<Event event={ev} />
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<!--div class="mt-4">
|
<!--div class="mt-4">
|
||||||
|
|
Načítá se…
Odkázat v novém úkolu