[int]
This commit is contained in:
parent
62af4bf485
commit
a9acb81f4a
7 changed files with 67 additions and 2 deletions
|
@ -42,6 +42,7 @@
|
|||
"events": [
|
||||
{
|
||||
"name": "Aufstand: Mieten",
|
||||
"public": false,
|
||||
"begin": {
|
||||
"timezone_shift": 2,
|
||||
"date": {"year": 2024, "month": 10, "day": 14},
|
||||
|
@ -57,6 +58,7 @@
|
|||
},
|
||||
{
|
||||
"name": "Aufstand: Waffen",
|
||||
"public": false,
|
||||
"begin": {
|
||||
"timezone_shift": 2,
|
||||
"date": {"year": 2024, "month": 10, "day": 21},
|
||||
|
@ -72,6 +74,7 @@
|
|||
},
|
||||
{
|
||||
"name": "Aufstand: Essen",
|
||||
"public": false,
|
||||
"begin": {
|
||||
"timezone_shift": 2,
|
||||
"date": {"year": 2024, "month": 11, "day": 28},
|
||||
|
@ -111,6 +114,7 @@
|
|||
"events": [
|
||||
{
|
||||
"name": "Feier: Bier",
|
||||
"public": false,
|
||||
"begin": {
|
||||
"timezone_shift": 2,
|
||||
"date": {"year": 2024, "month": 10, "day": 18},
|
||||
|
@ -126,6 +130,7 @@
|
|||
},
|
||||
{
|
||||
"name": "Feier: Schnapps",
|
||||
"public": false,
|
||||
"begin": {
|
||||
"timezone_shift": 2,
|
||||
"date": {"year": 2024, "month": 11, "day": 1},
|
||||
|
@ -161,6 +166,7 @@
|
|||
"events": [
|
||||
{
|
||||
"name": "Aufräumen: Flaschen",
|
||||
"public": false,
|
||||
"begin": {
|
||||
"timezone_shift": 2,
|
||||
"date": {"year": 2024, "month": 10, "day": 24},
|
||||
|
@ -200,6 +206,7 @@
|
|||
"events": [
|
||||
{
|
||||
"name": "Infostand",
|
||||
"public": false,
|
||||
"begin": {
|
||||
"timezone_shift": 2,
|
||||
"date": {"year": 2024, "month": 10, "day": 16},
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace _zeitbild.database
|
|||
/**
|
||||
*/
|
||||
const _compatible_revisions : Array<string> = [
|
||||
"r1",
|
||||
"r2",
|
||||
];
|
||||
|
||||
|
||||
|
|
|
@ -97,7 +97,17 @@ async function data_init(
|
|||
/*const event_ids : Array<_zeitbild.type_local_resource_event_id> = */await Promise.all(
|
||||
calendar_raw.resource.data.events
|
||||
.map(
|
||||
(event_raw : _zeitbild.type_event_object) => _zeitbild.service.resource.event_add(resource_id, event_raw)
|
||||
(event_raw : _zeitbild.type_event_object) => _zeitbild.service.resource.event_add(
|
||||
resource_id,
|
||||
{
|
||||
"name": event_raw["name"],
|
||||
"public": (event_raw["public"] ?? false),
|
||||
"begin": event_raw["begin"],
|
||||
"end": (event_raw["end"] ?? null),
|
||||
"location": (event_raw["location"] ?? null),
|
||||
"description": (event_raw["description"] ?? null),
|
||||
}
|
||||
)
|
||||
)
|
||||
);
|
||||
break;
|
||||
|
|
|
@ -217,6 +217,7 @@ namespace _zeitbild.repository.resource
|
|||
return {
|
||||
"local_resource_id": stuff.local_resource_id,
|
||||
"name": stuff.event.name,
|
||||
"public": stuff.event.public,
|
||||
"begin": encode_datetime(stuff.event.begin),
|
||||
"end": (
|
||||
(stuff.event.end === null)
|
||||
|
@ -271,6 +272,7 @@ namespace _zeitbild.repository.resource
|
|||
"local_resource_id": row["local_resource_id"],
|
||||
"event": {
|
||||
"name": row["name"],
|
||||
"public": row["public"],
|
||||
"begin": decode_datetime(row["begin"]),
|
||||
"end": (
|
||||
(row["end"] === null)
|
||||
|
|
44
source/repositories/sql/calendar_open.sql
Normal file
44
source/repositories/sql/calendar_open.sql
Normal file
|
@ -0,0 +1,44 @@
|
|||
SELECT
|
||||
id AS id,
|
||||
name AS name
|
||||
FROM
|
||||
calendars
|
||||
WHERE
|
||||
(
|
||||
resource_id
|
||||
IN
|
||||
(
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
resources
|
||||
WHERE
|
||||
(
|
||||
(
|
||||
(kind = 'local')
|
||||
AND
|
||||
(
|
||||
sub_id
|
||||
IN
|
||||
(
|
||||
SELECT
|
||||
local_resource_id
|
||||
FROM
|
||||
local_resource_events
|
||||
WHERE
|
||||
(public = TRUE)
|
||||
/*
|
||||
GROUP BY
|
||||
local_resource_id
|
||||
*/
|
||||
)
|
||||
)
|
||||
)
|
||||
OR
|
||||
(
|
||||
(kind = 'caldav')
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;
|
|
@ -342,6 +342,7 @@ namespace _zeitbild.service.calendar
|
|||
:
|
||||
"???"
|
||||
),
|
||||
"public": true, // todo?
|
||||
"begin": _zeitbild.helpers.ical_dt_to_own_datetime(vevent.dtstart),
|
||||
"end": (
|
||||
(vevent.dtend !== undefined)
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace _zeitbild
|
|||
*/
|
||||
export type type_event_object = {
|
||||
name : string;
|
||||
public : boolean;
|
||||
begin : lib_plankton.pit.type_datetime;
|
||||
end : (
|
||||
null
|
||||
|
|
Loading…
Add table
Reference in a new issue