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