Practical info section

This commit is contained in:
tree 2022-05-27 03:16:35 +02:00
rodič 04014c99cf
revize 478a594cf5
4 změnil soubory, kde provedl 35 přidání a 6 odebrání

Zobrazit soubor

@ -33,3 +33,4 @@ specDef:
- type: projects
- type: team
- type: schedule-candidates
- type: practical-info

Zobrazit soubor

@ -0,0 +1,14 @@
- id: doprava
name: 'Doprava'
text: |
TBA
- id: jidlo-piti
name: 'Jídlo a pití'
text: |
TBA
- id: ubytovani
name: 'Ubytování'
text: |
TBA

Zobrazit soubor

@ -105,12 +105,10 @@ class UTXOPlanner {
const [dayNumber, period] = str.split("/");
const [start, end] = period.split("-");
const date = index.dates[Number(dayNumber) - 1];
const endDate = end > start
? date
: format(
new Date((new Date(date)).getTime() + (1000 * 60 * 60 * 24)),
"yyyy-MM-dd",
);
const endDate = end > start ? date : format(
new Date((new Date(date)).getTime() + (1000 * 60 * 60 * 24)),
"yyyy-MM-dd",
);
return {
start: parse(`${date} ${start}`, "yyyy-MM-dd HH:mm"),
end: parse(`${endDate} ${end}`, "yyyy-MM-dd HH:mm"),

Zobrazit soubor

@ -0,0 +1,16 @@
type: array
items:
type: object
additionalProperties: false
required:
- id
- name
- text
properties:
id:
type: string
pattern: "^[a-z0-9-]+$"
name:
type: string
text:
type: string