Skip to content
代码片段 群组 项目
未验证 提交 513d8f6d 编辑于 作者: Deepika Guliani's avatar Deepika Guliani 提交者: GitLab
浏览文件

Merge branch '519208-add-frontend-support-for-wi-start-due-date-sorting' into 'master'

Add frontend support for sorting Work Item list by Start or Due dates

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/182173



Merged-by: default avatarDeepika Guliani <dguliani@gitlab.com>
Approved-by: default avatarDeepika Guliani <dguliani@gitlab.com>
Co-authored-by: default avatarKushal Pandya <kushal@gitlab.com>
No related branches found
No related tags found
2 合并请求!3031Merge per-main-jh to main-jh by luzhiyuan,!3030Merge per-main-jh to main-jh
...@@ -73,6 +73,8 @@ export const POPULARITY_DESC = 'POPULARITY_DESC'; ...@@ -73,6 +73,8 @@ export const POPULARITY_DESC = 'POPULARITY_DESC';
export const PRIORITY_ASC = 'PRIORITY_ASC'; export const PRIORITY_ASC = 'PRIORITY_ASC';
export const PRIORITY_DESC = 'PRIORITY_DESC'; export const PRIORITY_DESC = 'PRIORITY_DESC';
export const RELATIVE_POSITION_ASC = 'RELATIVE_POSITION_ASC'; export const RELATIVE_POSITION_ASC = 'RELATIVE_POSITION_ASC';
export const START_DATE_ASC = 'START_DATE_ASC';
export const START_DATE_DESC = 'START_DATE_DESC';
export const TITLE_ASC = 'TITLE_ASC'; export const TITLE_ASC = 'TITLE_ASC';
export const TITLE_DESC = 'TITLE_DESC'; export const TITLE_DESC = 'TITLE_DESC';
export const UPDATED_ASC = 'UPDATED_ASC'; export const UPDATED_ASC = 'UPDATED_ASC';
......
...@@ -2,6 +2,10 @@ import { __ } from '~/locale'; ...@@ -2,6 +2,10 @@ import { __ } from '~/locale';
import { import {
CREATED_ASC, CREATED_ASC,
CREATED_DESC, CREATED_DESC,
DUE_DATE_ASC,
DUE_DATE_DESC,
START_DATE_ASC,
START_DATE_DESC,
TITLE_ASC, TITLE_ASC,
TITLE_DESC, TITLE_DESC,
UPDATED_ASC, UPDATED_ASC,
...@@ -27,6 +31,22 @@ export const sortOptions = [ ...@@ -27,6 +31,22 @@ export const sortOptions = [
}, },
{ {
id: 3, id: 3,
title: __('Start date'),
sortDirection: {
ascending: START_DATE_ASC,
descending: START_DATE_DESC,
},
},
{
id: 4,
title: __('Due date'),
sortDirection: {
ascending: DUE_DATE_ASC,
descending: DUE_DATE_DESC,
},
},
{
id: 5,
title: __('Title'), title: __('Title'),
sortDirection: { sortDirection: {
ascending: TITLE_ASC, ascending: TITLE_ASC,
...@@ -38,6 +58,10 @@ export const sortOptions = [ ...@@ -38,6 +58,10 @@ export const sortOptions = [
export const urlSortParams = { export const urlSortParams = {
[CREATED_ASC]: 'created_asc', [CREATED_ASC]: 'created_asc',
[CREATED_DESC]: 'created_date', [CREATED_DESC]: 'created_date',
[DUE_DATE_ASC]: 'due_date_asc',
[DUE_DATE_DESC]: 'due_date_desc',
[START_DATE_ASC]: 'start_date_asc',
[START_DATE_DESC]: 'start_date_desc',
[TITLE_ASC]: 'title_asc', [TITLE_ASC]: 'title_asc',
[TITLE_DESC]: 'title_desc', [TITLE_DESC]: 'title_desc',
[UPDATED_ASC]: 'updated_asc', [UPDATED_ASC]: 'updated_asc',
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册