diff --git a/spec/22/index.yaml b/spec/22/index.yaml index 365a14d..1ab35ff 100644 --- a/spec/22/index.yaml +++ b/spec/22/index.yaml @@ -33,3 +33,4 @@ specDef: - type: projects - type: team - type: schedule-candidates + - type: practical-info diff --git a/spec/22/practical-info.yaml b/spec/22/practical-info.yaml new file mode 100644 index 0000000..cdae4d4 --- /dev/null +++ b/spec/22/practical-info.yaml @@ -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 diff --git a/utils/plan.js b/utils/plan.js index 798b910..0e5eef2 100644 --- a/utils/plan.js +++ b/utils/plan.js @@ -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"), diff --git a/utils/schema/1/practical-info.yaml b/utils/schema/1/practical-info.yaml new file mode 100644 index 0000000..1a75403 --- /dev/null +++ b/utils/schema/1/practical-info.yaml @@ -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