Skip to content

Commit

Permalink
Added project filters in assignment tabs, closes #513
Browse files Browse the repository at this point in the history
  • Loading branch information
forough-jalili committed Jun 10, 2019
1 parent d645ba6 commit d1f6405
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 24 deletions.
9 changes: 5 additions & 4 deletions src/components/InProgressItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ export default {
{
label: 'Project',
className: 'project',
isSortingActive: this.inProgressNuggetsSortCriteria.field === 'projectTitle',
isSortingActive: this.inProgressNuggetsSortCriteria.field === 'projectId',
isFilteringActive: null,
field: 'projectTitle',
filteringItems: null
field: 'projectId',
filteringItems: this.projects
},
{
label: 'Priority',
Expand Down Expand Up @@ -279,7 +279,8 @@ export default {
'inProgressNuggetsSortCriteria',
'inProgressNuggetsFilters',
'issueBoarding',
'issueKind'
'issueKind',
'projects'
])
},
watch: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/NeedEstimateItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ export default {
{
label: 'Project',
className: 'project',
isSortingActive: this.needEstimateSortCriteria.field === 'projectTitle',
isSortingActive: this.needEstimateSortCriteria.field === 'projectId',
isFilteringActive: null,
field: 'projectTitle',
field: 'projectId',
filteringItems: null
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/components/NewlyAssigned.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ export default {
{
label: 'Project',
className: 'project',
isSortingActive: this.newlyAssignedSortCriteria.field === 'projectTitle',
isSortingActive: this.newlyAssignedSortCriteria.field === 'projectId',
isFilteringActive: null,
field: 'projectTitle',
field: 'projectId',
filteringItems: null
},
{
Expand Down
9 changes: 5 additions & 4 deletions src/components/UpcomingItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ export default {
{
label: 'Project',
className: 'project',
isSortingActive: this.upcomingNuggetsSortCriteria.field === 'projectTitle',
isSortingActive: this.upcomingNuggetsSortCriteria.field === 'projectId',
isFilteringActive: null,
field: 'projectTitle',
filteringItems: this.projectTitle
field: 'projectId',
filteringItems: this.projects
},
{
label: 'Priority',
Expand Down Expand Up @@ -276,7 +276,8 @@ export default {
'upcomingNuggetsSortCriteria',
'upcomingNuggetsFilters',
'issueKind',
'issueBoarding'
'issueBoarding',
'projects'
])
},
watch: {
Expand Down
24 changes: 12 additions & 12 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ function initialState () {
newlyAssignedFilters: {
issueBoarding: [],
issueKind: [],
projectTitle: [],
projectId: [],
priority: [],
phase: []
},
needEstimateFilters: {
issueBoarding: [],
issueKind: [],
projectTitle: [],
projectId: [],
priority: [],
phase: [],
responseTime: []
Expand All @@ -144,7 +144,7 @@ function initialState () {
startDate: [],
endDate: [],
hoursWorked: [],
projectTitle: [],
projectId: [],
priority: [],
phase: []
},
Expand All @@ -154,7 +154,7 @@ function initialState () {
startDate: [],
endDate: [],
hoursWorked: [],
projectTitle: [],
projectId: [],
priority: [],
phase: []
},
Expand Down Expand Up @@ -364,8 +364,8 @@ export default new Vuex.Store({
if (state.newlyAssignedFilters.issueKind.length) {
result.issueKind = `IN(${state.newlyAssignedFilters.issueKind.join(',')})`
}
if (state.newlyAssignedFilters.projectTitle.length) {
result.projectTitle = `IN(${state.newlyAssignedFilters.projectTitle.join(',')})`
if (state.newlyAssignedFilters.projectId.length) {
result.projectId = `IN(${state.newlyAssignedFilters.projectId.join(',')})`
}
if (state.newlyAssignedFilters.priority.length) {
result.priority = `IN(${state.newlyAssignedFilters.priority.join(',')})`
Expand All @@ -384,8 +384,8 @@ export default new Vuex.Store({
if (state.needEstimateFilters.issueKind.length) {
result.issueKind = `IN(${state.needEstimateFilters.issueKind.join(',')})`
}
if (state.needEstimateFilters.projectTitle.length) {
result.projectTitle = `IN(${state.needEstimateFilters.projectTitle.join(',')})`
if (state.needEstimateFilters.projectId.length) {
result.projectId = `IN(${state.needEstimateFilters.projectId.join(',')})`
}
if (state.needEstimateFilters.priority.length) {
result.priority = `IN(${state.needEstimateFilters.priority.join(',')})`
Expand Down Expand Up @@ -431,8 +431,8 @@ export default new Vuex.Store({
','
)})`
}
if (state.inProgressNuggetsFilters.projectTitle.length) {
result.projectTitle = `IN(${state.inProgressNuggetsFilters.projectTitle.join(
if (state.inProgressNuggetsFilters.projectId.length) {
result.projectId = `IN(${state.inProgressNuggetsFilters.projectId.join(
','
)})`
}
Expand Down Expand Up @@ -470,8 +470,8 @@ export default new Vuex.Store({
','
)})`
}
if (state.upcomingNuggetsFilters.projectTitle.length) {
result.projectTitle = `IN(${state.upcomingNuggetsFilters.projectTitle.join(',')})`
if (state.upcomingNuggetsFilters.projectId.length) {
result.projectId = `IN(${state.upcomingNuggetsFilters.projectId.join(',')})`
}
if (state.upcomingNuggetsFilters.priority.length) {
result.priority = `IN(${state.upcomingNuggetsFilters.priority.join(
Expand Down

0 comments on commit d1f6405

Please sign in to comment.