Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate admin interface into user landing page #130

Merged
merged 42 commits into from
Oct 29, 2024

Conversation

MaHaWo
Copy link
Collaborator

@MaHaWo MaHaWo commented Oct 24, 2024

  • integrate the admin page into the user landing page when the logged in user is a superuser
  • adjust some language related issues. Still open: locales is a read-only store and cannot be repopulated upon language deletion => deleted language stays visible in frontend even though it's deleted from the database.
  • remove separate login logic for Admin
  • make use of user questions from database and remove separate datastructure for user questions. The adjustment logic is still in there, however:
    • The current datastructure for DataInput is used in many places, which are not all connected to the backend yet
    • We don´t have the ChildrenQuestions yet, nor a common base question model, on which the choice of datastructure depends.
  • change UserAnswer model to accept additionalAnswer: str instead of 'having the 'non_standard' flag.
  • sorry for reformatting changes, I'm not entirely sure how they crept in...

@MaHaWo MaHaWo changed the title Fix userquestions in admin Integrate admin interface into user landing page Oct 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 9.01639% with 111 lines in your changes missing coverage. Please review.

Project coverage is 26.12%. Comparing base (83b2e59) to head (7679af8).

Files with missing lines Patch % Lines
frontend/src/lib/components/UserDataInput.svelte 0.00% 40 Missing and 1 partial ⚠️
frontend/src/lib/stores/userStore.ts 0.00% 17 Missing and 1 partial ⚠️
frontend/src/lib/components/UserLandingPage.svelte 0.00% 15 Missing ⚠️
.../lib/components/Admin/EditUserQuestionModal.svelte 0.00% 13 Missing ⚠️
frontend/src/lib/components/UserProfile.svelte 0.00% 9 Missing ⚠️
frontend/src/lib/stores/componentStore.ts 0.00% 4 Missing and 1 partial ⚠️
...ntend/src/lib/components/Admin/InputPreview.svelte 0.00% 4 Missing ⚠️
frontend/src/lib/components/UserLogin.svelte 0.00% 4 Missing ⚠️
...tend/src/lib/components/Admin/UserQuestions.svelte 0.00% 1 Missing ⚠️
...tend/src/lib/components/DataInput/RadioList.svelte 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            main     #130       +/-   ##
==========================================
+ Coverage   7.36%   26.12%   +18.75%     
==========================================
  Files         73       92       +19     
  Lines       2689     3369      +680     
  Branches     120      119        -1     
==========================================
+ Hits         198      880      +682     
+ Misses      2424     2423        -1     
+ Partials      67       66        -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MaHaWo MaHaWo force-pushed the fix-userquestions-in-admin branch from 3f1d12e to d16f637 Compare October 25, 2024 09:43
@MaHaWo MaHaWo requested a review from lkeegan October 28, 2024 15:37
Copy link
Member

@lkeegan lkeegan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, some minor suggestions

mondey_backend/src/mondey_backend/models/questions.py Outdated Show resolved Hide resolved
mondey_backend/src/mondey_backend/routers/admin.py Outdated Show resolved Hide resolved
Copy link

@MaHaWo MaHaWo merged commit 1ed8ef3 into main Oct 29, 2024
5 checks passed
@MaHaWo MaHaWo deleted the fix-userquestions-in-admin branch October 29, 2024 14:53
MaHaWo added a commit that referenced this pull request Oct 29, 2024
commit 1ed8ef3
Merge: 83b2e59 7679af8
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 15:53:23 2024 +0100

    Merge pull request #130 from ssciwr/fix-userquestions-in-admin

    Integrate admin interface into user landing page

commit 7679af8
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Tue Oct 29 13:31:01 2024 +0000

    update openapi.json & openapi-ts client, run pnpm format

commit c28089c
Merge: 03f911a 5b737fc
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:30:15 2024 +0100

    Merge branch 'fix-userquestions-in-admin' of github.com:ssciwr/mondey into fix-userquestions-in-admin

commit 03f911a
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:30:11 2024 +0100

    add autocomplete to formdata

commit 5b737fc
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:29:50 2024 +0100

    Update mondey_backend/src/mondey_backend/models/questions.py

    Co-authored-by: Liam Keegan <[email protected]>

commit b7fe5e8
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:22:25 2024 +0100

    Update mondey_backend/src/mondey_backend/routers/admin.py

    Co-authored-by: Liam Keegan <[email protected]>

commit a5892fe
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:22:07 2024 +0100

    Update frontend/src/lib/components/Admin/EditUserQuestionModal.svelte

    use localization in question modal

    Co-authored-by: Liam Keegan <[email protected]>

commit 57dfce2
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:11:44 2024 +0100

    remove debug logout

commit 0a6b213
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:09:19 2024 +0100

    fix error in loop

commit fb7ba48
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 17:00:24 2024 +0100

    update lock file

commit e9e27d2
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:58:27 2024 +0100

    fix conflict

commit c0cb20a
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:53:55 2024 +0100

    generate code anew

commit 1230ead
Merge: 3418a85 83b2e59
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:53:15 2024 +0100

    Merge branch 'main' into fix-userquestions-in-admin

commit 3418a85
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:44:10 2024 +0100

    remove researchpage

commit 687a573
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Mon Oct 28 15:34:59 2024 +0000

    update openapi.json & openapi-ts client, run pnpm format

commit f11d80d
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:28:55 2024 +0100

    remove comment

commit 52c8d61
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:28:16 2024 +0100

    remove comments

commit 1d44371
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Mon Oct 28 15:02:16 2024 +0000

    update openapi.json & openapi-ts client, run pnpm format

commit 36ddf78
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:41:15 2024 +0100

    adjust language label

commit df5667c
Merge: 66b6e45 5fac037
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:27:35 2024 +0100

    Merge branch 'main' into fix-userquestions-in-admin

commit 66b6e45
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:14:12 2024 +0100

    remove langStore

commit 43f3f5c
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:11:18 2024 +0100

    remove langstore

commit 732a9c9
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:09:19 2024 +0100

    add translations from main

commit c125a48
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:08:43 2024 +0100

    remove languages

commit 2fb1c6a
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:04:02 2024 +0100

    add localechooser from main

commit 24ca1f5
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:02:39 2024 +0100

    add master i18n

commit 2c321ec
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 14:40:46 2024 +0100

    fix python tests

commit 8295bb2
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 14:34:08 2024 +0100

    fix userProfile

commit f3bb815
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 14:13:41 2024 +0100

    fix language indexing problem

commit 96e2215
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 13:46:51 2024 +0100

    fix bug in data reading, work on fixing languages

commit e32011c
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 07:35:03 2024 +0100

    make datainput simpler

commit b99aa08
Author: Harald Mack <[email protected]>
Date:   Sun Oct 27 22:02:47 2024 +0100

    update to svelte 5, use runes mode for datainput

commit 2a2f018
Author: Harald Mack <[email protected]>
Date:   Fri Oct 25 16:56:11 2024 +0200

    work on simplifying datastructure

commit b424001
Author: Harald Mack <[email protected]>
Date:   Fri Oct 25 16:19:20 2024 +0200

    add fields

commit 11965f0
Author: Harald Mack <[email protected]>
Date:   Fri Oct 25 16:02:58 2024 +0200

    work on integrating necessary datastructure everywhere

commit d16f637
Author: Harald Mack <[email protected]>
Date:   Fri Oct 25 11:43:36 2024 +0200

    fix json creation for userquestion

commit 3c8a66b
Author: Harald Mack <[email protected]>
Date:   Fri Oct 25 11:34:26 2024 +0200

    correct language indexing

commit 9499dae
Author: Harald Mack <[email protected]>
Date:   Thu Oct 24 21:11:16 2024 +0200

    start fising lang_id issue

commit 13abba3
Author: Harald Mack <[email protected]>
Date:   Thu Oct 24 20:30:20 2024 +0200

    fix error

commit 7a744dd
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Thu Oct 24 13:57:52 2024 +0000

    update openapi.json & openapi-ts client, run pnpm format

commit bfb39eb
Author: Harald Mack <[email protected]>
Date:   Thu Oct 24 13:34:15 2024 +0200

    work on making editing of questions usable

commit 4025b92
Author: Harald Mack <[email protected]>
Date:   Thu Oct 24 11:18:53 2024 +0200

    add elements for logged out user, delete separate verify component

commit 6722542
Author: Harald Mack <[email protected]>
Date:   Thu Oct 24 11:11:32 2024 +0200

    include admin page into userlandingpage, add admin component instead of route,
MaHaWo added a commit that referenced this pull request Oct 29, 2024
commit 1ed8ef3
Merge: 83b2e59 7679af8
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 15:53:23 2024 +0100

    Merge pull request #130 from ssciwr/fix-userquestions-in-admin

    Integrate admin interface into user landing page

commit 7679af8
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Tue Oct 29 13:31:01 2024 +0000

    update openapi.json & openapi-ts client, run pnpm format

commit c28089c
Merge: 03f911a 5b737fc
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:30:15 2024 +0100

    Merge branch 'fix-userquestions-in-admin' of github.com:ssciwr/mondey into fix-userquestions-in-admin

commit 03f911a
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:30:11 2024 +0100

    add autocomplete to formdata

commit 5b737fc
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:29:50 2024 +0100

    Update mondey_backend/src/mondey_backend/models/questions.py

    Co-authored-by: Liam Keegan <[email protected]>

commit b7fe5e8
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:22:25 2024 +0100

    Update mondey_backend/src/mondey_backend/routers/admin.py

    Co-authored-by: Liam Keegan <[email protected]>

commit a5892fe
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:22:07 2024 +0100

    Update frontend/src/lib/components/Admin/EditUserQuestionModal.svelte

    use localization in question modal

    Co-authored-by: Liam Keegan <[email protected]>

commit 57dfce2
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:11:44 2024 +0100

    remove debug logout

commit 0a6b213
Author: Harald Mack <[email protected]>
Date:   Tue Oct 29 14:09:19 2024 +0100

    fix error in loop

commit fb7ba48
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 17:00:24 2024 +0100

    update lock file

commit e9e27d2
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:58:27 2024 +0100

    fix conflict

commit c0cb20a
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:53:55 2024 +0100

    generate code anew

commit 1230ead
Merge: 3418a85 83b2e59
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:53:15 2024 +0100

    Merge branch 'main' into fix-userquestions-in-admin

commit 3418a85
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:44:10 2024 +0100

    remove researchpage

commit 687a573
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Mon Oct 28 15:34:59 2024 +0000

    update openapi.json & openapi-ts client, run pnpm format

commit f11d80d
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:28:55 2024 +0100

    remove comment

commit 52c8d61
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 16:28:16 2024 +0100

    remove comments

commit 1d44371
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Mon Oct 28 15:02:16 2024 +0000

    update openapi.json & openapi-ts client, run pnpm format

commit 36ddf78
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:41:15 2024 +0100

    adjust language label

commit df5667c
Merge: 66b6e45 5fac037
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:27:35 2024 +0100

    Merge branch 'main' into fix-userquestions-in-admin

commit 66b6e45
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:14:12 2024 +0100

    remove langStore

commit 43f3f5c
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:11:18 2024 +0100

    remove langstore

commit 732a9c9
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:09:19 2024 +0100

    add translations from main

commit c125a48
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:08:43 2024 +0100

    remove languages

commit 2fb1c6a
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:04:02 2024 +0100

    add localechooser from main

commit 24ca1f5
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 15:02:39 2024 +0100

    add master i18n

commit 2c321ec
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 14:40:46 2024 +0100

    fix python tests

commit 8295bb2
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 14:34:08 2024 +0100

    fix userProfile

commit f3bb815
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 14:13:41 2024 +0100

    fix language indexing problem

commit 96e2215
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 13:46:51 2024 +0100

    fix bug in data reading, work on fixing languages

commit e32011c
Author: Harald Mack <[email protected]>
Date:   Mon Oct 28 07:35:03 2024 +0100

    make datainput simpler

commit b99aa08
Author: Harald Mack <[email protected]>
Date:   Sun Oct 27 22:02:47 2024 +0100

    update to svelte 5, use runes mode for datainput

commit 2a2f018
Author: Harald Mack <[email protected]>
Date:   Fri Oct 25 16:56:11 2024 +0200

    work on simplifying datastructure

commit b424001
Author: Harald Mack <[email protected]>
Date:   Fri Oct 25 16:19:20 2024 +0200

    add fields

commit 11965f0
Author: Harald Mack <[email protected]>
Date:   Fri Oct 25 16:02:58 2024 +0200

    work on integrating necessary datastructure everywhere

commit d16f637
Author: Harald Mack <[email protected]>
Date:   Fri Oct 25 11:43:36 2024 +0200

    fix json creation for userquestion

commit 3c8a66b
Author: Harald Mack <[email protected]>
Date:   Fri Oct 25 11:34:26 2024 +0200

    correct language indexing

commit 9499dae
Author: Harald Mack <[email protected]>
Date:   Thu Oct 24 21:11:16 2024 +0200

    start fising lang_id issue

commit 13abba3
Author: Harald Mack <[email protected]>
Date:   Thu Oct 24 20:30:20 2024 +0200

    fix error

commit 7a744dd
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Date:   Thu Oct 24 13:57:52 2024 +0000

    update openapi.json & openapi-ts client, run pnpm format

commit bfb39eb
Author: Harald Mack <[email protected]>
Date:   Thu Oct 24 13:34:15 2024 +0200

    work on making editing of questions usable

commit 4025b92
Author: Harald Mack <[email protected]>
Date:   Thu Oct 24 11:18:53 2024 +0200

    add elements for logged out user, delete separate verify component

commit 6722542
Author: Harald Mack <[email protected]>
Date:   Thu Oct 24 11:11:32 2024 +0200

    include admin page into userlandingpage, add admin component instead of route,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants