From b1cb09299e12a90692aceb34ea7c10529232c79e Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Tue, 22 Mar 2022 20:38:55 +0100 Subject: [PATCH] implement admin project approval page, visibility change modal --- frontend-new/TODO.md | 10 ++-- frontend-new/src/components/design/Link.vue | 4 +- .../modals/VisibilityChangerModal.vue | 60 +++++++++++++++++++ .../components/projects/AdminProjectList.vue | 40 +++++++++++++ .../src/components/ui/InputCheckbox.vue | 4 +- frontend-new/src/components/ui/InputRadio.vue | 40 +++++++++++++ .../src/components/ui/InputTextarea.vue | 23 +++++++ .../src/pages/admin/approval/projects.vue | 29 ++++++++- frontend-new/src/pages/admin/flags.vue | 3 +- frontend-new/src/store/backendData.ts | 6 +- frontend-new/src/types/generated/icons.d.ts | 2 + 11 files changed, 209 insertions(+), 12 deletions(-) create mode 100644 frontend-new/src/components/modals/VisibilityChangerModal.vue create mode 100644 frontend-new/src/components/projects/AdminProjectList.vue create mode 100644 frontend-new/src/components/ui/InputRadio.vue create mode 100644 frontend-new/src/components/ui/InputTextarea.vue diff --git a/frontend-new/TODO.md b/frontend-new/TODO.md index c3d3610c8..8ea79b7a1 100644 --- a/frontend-new/TODO.md +++ b/frontend-new/TODO.md @@ -217,7 +217,7 @@ once QA has passed, the checkboxes can be removed and the page can be ~~striked - flags - [x] fetch - [x] layout - - [x] functionality (cors error) + - [x] functionality - [x] design - [ ] qa - health @@ -253,10 +253,10 @@ once QA has passed, the checkboxes can be removed and the page can be ~~striked - [ ] qa - approval (empty) - projects - - [ ] fetch - - [ ] layout - - [ ] functionality - - [ ] design + - [x] fetch + - [x] layout + - [x] functionality + - [x] design - [ ] qa - versions - [ ] fetch diff --git a/frontend-new/src/components/design/Link.vue b/frontend-new/src/components/design/Link.vue index 632202ed3..81fed0986 100644 --- a/frontend-new/src/components/design/Link.vue +++ b/frontend-new/src/components/design/Link.vue @@ -7,10 +7,10 @@ const classes = "color-primary font-bold hover:(underline)"; diff --git a/frontend-new/src/components/modals/VisibilityChangerModal.vue b/frontend-new/src/components/modals/VisibilityChangerModal.vue new file mode 100644 index 000000000..7ddc4b531 --- /dev/null +++ b/frontend-new/src/components/modals/VisibilityChangerModal.vue @@ -0,0 +1,60 @@ + + + diff --git a/frontend-new/src/components/projects/AdminProjectList.vue b/frontend-new/src/components/projects/AdminProjectList.vue new file mode 100644 index 000000000..d92c093ba --- /dev/null +++ b/frontend-new/src/components/projects/AdminProjectList.vue @@ -0,0 +1,40 @@ + + + diff --git a/frontend-new/src/components/ui/InputCheckbox.vue b/frontend-new/src/components/ui/InputCheckbox.vue index 86dc61f5b..1bd3e2ed9 100644 --- a/frontend-new/src/components/ui/InputCheckbox.vue +++ b/frontend-new/src/components/ui/InputCheckbox.vue @@ -4,7 +4,7 @@ import { computed } from "vue"; const emit = defineEmits<{ (e: "update:modelValue", value: boolean | boolean[]): void; }>(); -const value = computed({ +const internalVal = computed({ get: () => props.modelValue, set: (v) => emit("update:modelValue", v), }); @@ -17,7 +17,7 @@ const props = defineProps<{