Commit 10247d87 authored by Martin Wortschack's avatar Martin Wortschack Committed by Filipa Lacerda

Productivity Analytics: Use options for stateless data in filter dropdowns component

parent adae8ca5
...@@ -12,14 +12,6 @@ export default { ...@@ -12,14 +12,6 @@ export default {
data() { data() {
return { return {
groupId: null, groupId: null,
groupsQueryParams: {
min_access_level: accessLevelReporter,
},
projectsQueryParams: {
per_page: projectsPerPage,
with_shared: false, // exclude forks
order_by: 'last_activity_at',
},
}; };
}, },
computed: { computed: {
...@@ -53,6 +45,14 @@ export default { ...@@ -53,6 +45,14 @@ export default {
}); });
}, },
}, },
groupsQueryParams: {
min_access_level: accessLevelReporter,
},
projectsQueryParams: {
per_page: projectsPerPage,
with_shared: false, // exclude forks
order_by: 'last_activity_at',
},
}; };
</script> </script>
...@@ -60,14 +60,14 @@ export default { ...@@ -60,14 +60,14 @@ export default {
<div class="dropdown-container d-flex flex-column flex-lg-row"> <div class="dropdown-container d-flex flex-column flex-lg-row">
<groups-dropdown-filter <groups-dropdown-filter
class="group-select" class="group-select"
:query-params="groupsQueryParams" :query-params="$options.groupsQueryParams"
@selected="onGroupSelected" @selected="onGroupSelected"
/> />
<projects-dropdown-filter <projects-dropdown-filter
v-if="showProjectsDropdownFilter" v-if="showProjectsDropdownFilter"
:key="groupId" :key="groupId"
class="project-select" class="project-select"
:query-params="projectsQueryParams" :query-params="$options.projectsQueryParams"
:group-id="groupId" :group-id="groupId"
@selected="onProjectsSelected" @selected="onProjectsSelected"
/> />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment