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

frontend: fix mobile view of materialLists #3996

Merged
merged 2 commits into from
Oct 21, 2023

Conversation

BacLuc
Copy link
Contributor

@BacLuc BacLuc commented Oct 21, 2023

Fixes #3899
Navigate to the list of materiallists in the NavBottombar. Add new view for the list of materiallists
to navigate to the details of one materiallist.
Rename the views/admin/(,Admin)MaterialLists component to avoid name clash with the new component.
Add quick way to differentiate the target routes in the materialListRoute helper for the NavBottombar and NavTopbar.
May have been introduced in #3841.

Also add guard if camp is not loaded to materialListRoute.

Navigate to the list of materiallists in the NavBottombar.
Add new view for the list of materiallists
to navigate to the details of one materiallist.
Rename the views/admin/(,Admin)MaterialLists component to avoid name clash with
the new component.
Add quick way to differentiate the target routes in the materialListRoute helper
for the NavBottombar and NavTopbar.
May have been introduced in ecamp#3841.

Also add guard if camp is not loaded to materialListRoute.
@BacLuc BacLuc added the deploy! Creates a feature branch deployment for this PR label Oct 21, 2023
@BacLuc BacLuc temporarily deployed to feature-branch October 21, 2023 14:10 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Oct 21, 2023

Feature branch deployment currently inactive.

If the PR is still open, you can add the deploy! label to this PR to trigger a feature branch deployment.

frontend/src/router.js Outdated Show resolved Hide resolved
@@ -3,7 +3,7 @@ Show all material lists for a camp on mobile
-->
Copy link
Member

Choose a reason for hiding this comment

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

Update or delete the comment on the line above this

Comment on lines +7 to +15
<template v-if="!isGuest" #title-actions>
<DialogMaterialListCreate :camp="camp()">
<template #activator="{ on }">
<ButtonAdd class="mr-n2" height="32" v-on="on"
>{{ $tc('global.button.create') }}
</ButtonAdd>
</template>
</DialogMaterialListCreate>
</template>
Copy link
Member

Choose a reason for hiding this comment

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

So you actively decided to keep this button in this view?

Copy link
Member

Choose a reason for hiding this comment

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

I think this makes sense

Copy link
Member

@manuelmeister manuelmeister left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. I think my change requests can be done in the followup issue #3997

camp: campFromRoute(route),
}),
},
},
Copy link
Member

Choose a reason for hiding this comment

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

I think material/lists should move to the camp route object as a child. (But not material/all as it needs the sidebar.

Comment on lines +540 to 547
if (camp._meta.loading) return {}
if (typeof materialListOrRoute === 'string') {
return {
name: 'material/overview',
name: `material${materialListOrRoute}`,
params: { campId: camp.id, campTitle: slugify(camp.title) },
query,
}
}
Copy link
Member

Choose a reason for hiding this comment

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

/all and /lists should probably move to campRoute and have a route name prefix "camp/material/$1"

@carlobeltrame carlobeltrame temporarily deployed to feature-branch October 21, 2023 15:17 — with GitHub Actions Inactive
@carlobeltrame carlobeltrame added this pull request to the merge queue Oct 21, 2023
Merged via the queue into ecamp:devel with commit 4bd2315 Oct 21, 2023
28 checks passed
@BacLuc BacLuc deleted the frontend-material-route branch December 23, 2023 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy! Creates a feature branch deployment for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: slugify: string argument expected
3 participants