stash
This commit is contained in:
parent
9ce700c388
commit
35be834799
8 changed files with 92 additions and 15 deletions
|
|
@ -56,13 +56,16 @@ const EXPANDED_ROUTE_BUILDERS = {
|
|||
itemDetailRoute(store.getters.identityHandleById[owner_identity_id], item_local_id),
|
||||
group_item: ({owner_group_id, item_local_id}) =>
|
||||
itemDetailRoute(store.getters.groupHandleById[owner_group_id], item_local_id),
|
||||
group: ({group_id}) => `/groups/${group_id}`,
|
||||
group: ({group_id}) => {
|
||||
const handle = store.getters.groupHandleById[group_id];
|
||||
return handle ? `/groups/${encodeHandleForUrl(handle)}` : null;
|
||||
},
|
||||
storage_location: ({storage_location_id}) => `/storage-locations/${storage_location_id}`,
|
||||
workflow: ({workflow_id}) => `/workflows/${workflow_id}`,
|
||||
};
|
||||
|
||||
// Kinds whose route needs identityHandleById/groupHandleById (from state.idmap); ShortId.vue only waits on an idmap fetch for these.
|
||||
export const NEEDS_IDMAP = new Set(['item', 'group_item']);
|
||||
export const NEEDS_IDMAP = new Set(['item', 'group_item', 'group']);
|
||||
|
||||
export function expandedRoute({kind, ...fields}) {
|
||||
const buildRoute = EXPANDED_ROUTE_BUILDERS[kind];
|
||||
|
|
@ -117,7 +120,7 @@ const routes = [{path: '/', component: Dashboard, meta: {requiresAuth: true}}, {
|
|||
component: GroupNew,
|
||||
meta: {requiresAuth: true}
|
||||
}, {
|
||||
path: '/groups/:id',
|
||||
path: '/groups/:handle',
|
||||
component: GroupDetail,
|
||||
meta: {requiresAuth: true},
|
||||
props: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue