diff --git a/docker/initial-data.json b/docker/initial-data.json index 4c70f899b..4dd0ae44f 100644 --- a/docker/initial-data.json +++ b/docker/initial-data.json @@ -211,8 +211,7 @@ "poll_default_group_ids": [5], "projector_ids": [1], - "projection_ids": [], - "projectiondefault_ids": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + "all_projection_ids": [], "projector_message_ids": [], "projector_countdown_ids": [], "tag_ids": [], @@ -250,6 +249,40 @@ "user_ids": [1], "reference_projector_id": 1, + "default_$_projector_id": [ + "agenda_all_items", + "topics", + "list_of_speakers", + "current_list_of_speakers", + "motion", + "amendment", + "motion_block", + "assignment", + "user", + "mediafile", + "projector_message", + "projector_countdowns", + "assignment_poll", + "motion_poll", + "poll" + ], + "default_$agenda_all_items_projector_id": 1, + "default_$topics_projector_id": 1, + "default_$list_of_speakers_projector_id": 1, + "default_$current_list_of_speakers_projector_id": 1, + "default_$motion_projector_id": 1, + "default_$amendment_projector_id": 1, + "default_$motion_block_projector_id": 1, + "default_$assignment_projector_id": 1, + "default_$user_projector_id": 1, + "default_$mediafile_projector_id": 1, + "default_$projector_message_projector_id": 1, + "default_$projector_countdowns_projector_id": 1, + "default_$assignment_poll_projector_id": 1, + "default_$motion_poll_projector_id": 1, + "default_$poll_projector_id": 1, + "projection_ids": [], + "default_group_id": 1, "admin_group_id": 2 }], @@ -541,121 +574,49 @@ "show_header_footer": true, "show_title": true, "show_logo": true, + "show_clock": true, "current_projection_ids": [], - "current_element_ids": [], "preview_projection_ids": [], "history_projection_ids": [], "used_as_reference_projector_meeting_id": 1, - "projectiondefault_ids": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + + "used_as_default_$_in_meeting_id": [ + "agenda_all_items", + "topics", + "list_of_speakers", + "current_list_of_speakers", + "motion", + "amendment", + "motion_block", + "assignment", + "user", + "mediafile", + "projector_message", + "projector_countdowns", + "assignment_poll", + "motion_poll", + "poll" + ], + "used_as_default_$agenda_all_items_in_meeting_id": 1, + "used_as_default_$topics_in_meeting_id": 1, + "used_as_default_$list_of_speakers_in_meeting_id": 1, + "used_as_default_$current_list_of_speakers_in_meeting_id": 1, + "used_as_default_$motion_in_meeting_id": 1, + "used_as_default_$amendment_in_meeting_id": 1, + "used_as_default_$motion_block_in_meeting_id": 1, + "used_as_default_$assignment_in_meeting_id": 1, + "used_as_default_$user_in_meeting_id": 1, + "used_as_default_$mediafile_in_meeting_id": 1, + "used_as_default_$projector_message_in_meeting_id": 1, + "used_as_default_$projector_countdowns_in_meeting_id": 1, + "used_as_default_$assignment_poll_in_meeting_id": 1, + "used_as_default_$motion_poll_in_meeting_id": 1, + "used_as_default_$poll_in_meeting_id": 1, + "meeting_id": 1 }], "projection": [], -"projectiondefault": [ - { - "id": 1, - "name": "agenda_all_items", - "display_name": "Agenda", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 2, - "name": "topics", - "display_name": "Topics", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 3, - "name": "agenda_list_of_speakers", - "display_name": "List of speakers", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 4, - "name": "agenda_current_list_of_speakers", - "display_name": "Current list of speakers", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 5, - "name": "motions", - "display_name": "Motions", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 6, - "name": "motionBlocks", - "display_name": "Motion blocks", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 7, - "name": "assignments", - "display_name": "Elections", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 8, - "name": "users", - "display_name": "Participants", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 9, - "name": "mediafiles", - "display_name": "Files", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 10, - "name": "messages", - "display_name": "Messages", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 11, - "name": "countdowns", - "display_name": "Countdowns", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 12, - "name": "assignment_poll", - "display_name": "Assignment poll", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 13, - "name": "motion_poll", - "display_name": "Motion Poll", - - "projector_id": 1, - "meeting_id": 1 - }], "projector_message": [], "projector_countdown": [] } diff --git a/docs/datavalidator/check_json.py b/docs/datavalidator/check_json.py index 9fcd794a4..8769cc614 100644 --- a/docs/datavalidator/check_json.py +++ b/docs/datavalidator/check_json.py @@ -41,6 +41,12 @@ def check_string(value: Any) -> bool: return value is None or isinstance(value, str) +color_regex = re.compile("^#[0-9a-f]{6}$") + +def check_color(value: Any) -> bool: + return value is None or (isinstance(value, str) and color_regex.match(value)) + + def check_number(value: Any) -> bool: return value is None or isinstance(value, int) @@ -158,6 +164,8 @@ class Checker: checker = check_number_list elif field_type == "decimal(6)": checker = check_decimal + elif field_type == "color": + checker = check_color elif field_type in ( "JSON", "template", diff --git a/docs/example-data.json b/docs/example-data.json index 7858b6619..e5fc869fd 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -344,8 +344,7 @@ "poll_default_group_ids": [3], "projector_ids": [1, 2], - "projection_ids": [1, 2, 4], - "projectiondefault_ids": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + "all_projection_ids": [1, 2, 3, 4], "projector_message_ids": [1], "projector_countdown_ids": [1], "tag_ids": [1, 2, 3], @@ -384,6 +383,40 @@ "user_ids": [1, 2, 3], "reference_projector_id": 2, + "default_$_projector_id": [ + "agenda_all_items", + "topics", + "list_of_speakers", + "current_list_of_speakers", + "motion", + "amendment", + "motion_block", + "assignment", + "user", + "mediafile", + "projector_message", + "projector_countdowns", + "assignment_poll", + "motion_poll", + "poll" + ], + "default_$agenda_all_items_projector_id": 1, + "default_$topics_projector_id": 1, + "default_$list_of_speakers_projector_id": 2, + "default_$current_list_of_speakers_projector_id": 2, + "default_$motion_projector_id": 1, + "default_$amendment_projector_id": 1, + "default_$motion_block_projector_id": 1, + "default_$assignment_projector_id": 1, + "default_$user_projector_id": 1, + "default_$mediafile_projector_id": 1, + "default_$projector_message_projector_id": 1, + "default_$projector_countdowns_projector_id": 1, + "default_$assignment_poll_projector_id": 1, + "default_$motion_poll_projector_id": 1, + "default_$poll_projector_id": 1, + "projection_ids": [3], + "default_group_id": 1, "admin_group_id": 2 }], @@ -584,7 +617,6 @@ "child_ids": [14], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -604,7 +636,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -624,7 +655,6 @@ "child_ids": [], "tag_ids": [2], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -644,7 +674,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -664,7 +693,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -684,7 +712,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -704,7 +731,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -724,7 +750,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -744,7 +769,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -764,7 +788,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -784,7 +807,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -804,7 +826,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -824,7 +845,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -844,7 +864,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -864,7 +883,6 @@ "child_ids": [], "tag_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }], "list_of_speakers": [ @@ -875,7 +893,6 @@ "content_object_id": "motion/1", "speaker_ids": [11, 12, 13], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -885,7 +902,6 @@ "content_object_id": "motion/2", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -895,7 +911,6 @@ "content_object_id": "topic/1", "speaker_ids": [1, 2], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -905,7 +920,6 @@ "content_object_id": "topic/2", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -915,7 +929,6 @@ "content_object_id": "topic/3", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -925,7 +938,6 @@ "content_object_id": "topic/4", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -935,7 +947,6 @@ "content_object_id": "topic/5", "speaker_ids": [3, 4], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -945,7 +956,6 @@ "content_object_id": "topic/6", "speaker_ids": [5], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -955,7 +965,6 @@ "content_object_id": "topic/7", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -965,7 +974,6 @@ "content_object_id": "topic/8", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -975,7 +983,6 @@ "content_object_id": "assignment/1", "speaker_ids": [6, 7, 8], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -985,7 +992,6 @@ "content_object_id": "motion/3", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -995,7 +1001,6 @@ "content_object_id": "motion/4", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1005,7 +1010,6 @@ "content_object_id": "assignment/2", "speaker_ids": [9, 10], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1015,7 +1019,6 @@ "content_object_id": "motion_block/1", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1025,7 +1028,6 @@ "content_object_id": "mediafile/1", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1035,7 +1037,6 @@ "content_object_id": "mediafile/2", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1045,7 +1046,6 @@ "content_object_id": "mediafile/3", "speaker_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }], "speaker": [ @@ -1217,7 +1217,6 @@ "tag_ids": [], "option_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1231,7 +1230,6 @@ "tag_ids": [], "option_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1245,7 +1243,6 @@ "tag_ids": [], "option_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1259,7 +1256,6 @@ "tag_ids": [], "option_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1273,7 +1269,6 @@ "tag_ids": [], "option_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1287,7 +1282,6 @@ "tag_ids": [], "option_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1301,7 +1295,6 @@ "tag_ids": [], "option_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -1315,7 +1308,6 @@ "tag_ids": [], "option_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }], "motion": [ @@ -1361,7 +1353,6 @@ "tag_ids": [], "attachment_ids": [], "projection_ids": [], - "current_projector_ids": [], "personal_note_ids": [], "meeting_id": 1 }, @@ -1407,7 +1398,6 @@ "tag_ids": [1, 3], "attachment_ids": [], "projection_ids": [], - "current_projector_ids": [], "personal_note_ids": [1], "meeting_id": 1 }, @@ -1453,7 +1443,6 @@ "tag_ids": [3], "attachment_ids": [], "projection_ids": [], - "current_projector_ids": [], "personal_note_ids": [], "meeting_id": 1 }, @@ -1499,7 +1488,6 @@ "tag_ids": [], "attachment_ids": [2], "projection_ids": [2], - "current_projector_ids": [], "personal_note_ids": [], "meeting_id": 1 }], @@ -1591,7 +1579,6 @@ "agenda_item_id": 15, "list_of_speakers_id": 15, "projection_ids": [1], - "current_projector_ids": [], "meeting_id": 1 }], "motion_change_recommendation": [ @@ -1981,7 +1968,6 @@ "voted_ids": [], "entitled_group_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -2008,7 +1994,6 @@ "voted_ids": [], "entitled_group_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -2035,7 +2020,6 @@ "option_ids": [5], "global_option_id": 6, "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -2062,7 +2046,6 @@ "option_ids": [7, 8, 9], "global_option_id": 10, "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }, { @@ -2089,7 +2072,6 @@ "option_ids": [11, 12], "global_option_id": 13, "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }], "option": [ @@ -2384,7 +2366,6 @@ "tag_ids": [], "attachment_ids": [], "projection_ids": [4], - "current_projector_ids": [1], "meeting_id": 1 }, { @@ -2404,7 +2385,6 @@ "tag_ids": [2], "attachment_ids": [], "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }], "assignment_candidate": [ @@ -2466,7 +2446,6 @@ "child_ids": [3], "list_of_speakers_id": 16, "projection_ids": [], - "current_projector_ids": [], "attachment_ids": [], "used_as_logo_$_in_meeting_id": [], "used_as_font_$_in_meeting_id": [], @@ -2489,7 +2468,6 @@ "child_ids": [], "list_of_speakers_id": 17, "projection_ids": [], - "current_projector_ids": [], "attachment_ids": ["motion/4"], "used_as_logo_$_in_meeting_id": [], "used_as_font_$_in_meeting_id": [], @@ -2512,7 +2490,6 @@ "child_ids": [], "list_of_speakers_id": 18, "projection_ids": [], - "current_projector_ids": [], "attachment_ids": [], "used_as_logo_$_in_meeting_id": ["web_header"], "used_as_logo_$web_header_in_meeting_id": 1, @@ -2538,13 +2515,42 @@ "show_header_footer": true, "show_title": true, "show_logo": true, + "show_clock": true, - "current_projection_ids": [4], - "current_element_ids": ["assignment/1"], + "current_projection_ids": [3, 4], "preview_projection_ids": [1, 2], "history_projection_ids": [], "used_as_reference_projector_meeting_id": null, - "projectiondefault_ids": [1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + + "used_as_default_$_in_meeting_id": [ + "agenda_all_items", + "topics", + "motion", + "amendment", + "motion_block", + "assignment", + "user", + "mediafile", + "projector_message", + "projector_countdowns", + "assignment_poll", + "motion_poll", + "poll" + ], + "used_as_default_$agenda_all_items_in_meeting_id": 1, + "used_as_default_$topics_in_meeting_id": 1, + "used_as_default_$motion_in_meeting_id": 1, + "used_as_default_$amendment_in_meeting_id": 1, + "used_as_default_$motion_block_in_meeting_id": 1, + "used_as_default_$assignment_in_meeting_id": 1, + "used_as_default_$user_in_meeting_id": 1, + "used_as_default_$mediafile_in_meeting_id": 1, + "used_as_default_$projector_message_in_meeting_id": 1, + "used_as_default_$projector_countdowns_in_meeting_id": 1, + "used_as_default_$assignment_poll_in_meeting_id": 1, + "used_as_default_$motion_poll_in_meeting_id": 1, + "used_as_default_$poll_in_meeting_id": 1, + "meeting_id": 1 }, { @@ -2565,13 +2571,20 @@ "show_header_footer": true, "show_title": true, "show_logo": true, + "show_clock": true, "current_projection_ids": [], - "current_element_ids": [], "preview_projection_ids": [], "history_projection_ids": [], "used_as_reference_projector_meeting_id": 1, - "projectiondefault_ids": [2, 3], + + "used_as_default_$_in_meeting_id": [ + "list_of_speakers", + "current_list_of_speakers" + ], + "used_as_default_$list_of_speakers_in_meeting_id": 1, + "used_as_default_$current_list_of_speakers_in_meeting_id": 1, + "meeting_id": 1 }], "projection": [ @@ -2580,7 +2593,10 @@ "current_projector_id": null, "preview_projector_id": 1, "history_projector_id": null, - "element_id": "motion_block/1", + "content_object_id": "motion_block/1", + "stable": false, + "type": null, + "weight": 1, "options": {}, "meeting_id": 1 }, @@ -2589,149 +2605,45 @@ "current_projector_id": null, "preview_projector_id": 1, "history_projector_id": null, - "element_id": "motion/4", + "content_object_id": "motion/4", + "stable": false, + "type": null, + "weight": 2, "options": { "mode": "diff" }, "meeting_id": 1 }, + { + "id": 3, + "current_projector_id": 1, + "preview_projector_id": null, + "history_projector_id": null, + "content_object_id": "meeting/1", + "stable": true, + "type": "current-list-of-speakers", + "weight": 1, + "options": {}, + "meeting_id": 1 + }, { "id": 4, "current_projector_id": 1, "preview_projector_id": null, "history_projector_id": null, - "element_id": "assignment/1", + "content_object_id": "assignment/1", + "stable": false, + "type": null, + "weight": 1, "options": {}, "meeting_id": 1 }], -"projectiondefault": [ - { - "id": 1, - "name": "agenda_all_items", - "display_name": "Agenda", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 2, - "name": "topics", - "display_name": "Topics", - - "projector_id": 2, - "meeting_id": 1 - }, - { - "id": 3, - "name": "agenda_list_of_speakers", - "display_name": "List of speakers", - - "projector_id": 2, - "meeting_id": 1 - }, - { - "id": 4, - "name": "agenda_current_list_of_speakers", - "display_name": "Current list of speakers", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 5, - "name": "motions", - "display_name": "Motions", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 6, - "name": "motionBlocks", - "display_name": "Motion blocks", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 7, - "name": "assignments", - "display_name": "Elections", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 8, - "name": "users", - "display_name": "Participants", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 9, - "name": "mediafiles", - "display_name": "Files", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 10, - "name": "messages", - "display_name": "Messages", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 11, - "name": "countdowns", - "display_name": "Countdowns", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 12, - "name": "assignment_poll", - "display_name": "Assignment poll", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 13, - "name": "motion_poll", - "display_name": "Motion Poll", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 14, - "name": "poll", - "display_name": "Poll", - - "projector_id": 1, - "meeting_id": 1 - }, - { - "id": 15, - "name": "amendments", - "display_name": "Amendments", - - "projector_id": 1, - "meeting_id": 1 - }], "projector_message": [ { "id": 1, "message": "
Hi!
", "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }], "projector_countdown": [ @@ -2744,7 +2656,6 @@ "running": false, "projection_ids": [], - "current_projector_ids": [], "meeting_id": 1 }] } diff --git a/docs/models.yml b/docs/models.yml index 2cab5aaa0..7c167bd6d 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -11,6 +11,7 @@ # -