[AAE-3638] - update priority option (#6423)

This commit is contained in:
Silviu Popa
2020-12-04 19:42:34 +02:00
committed by GitHub
parent 31bac2da24
commit f39997b98b
8 changed files with 13 additions and 11 deletions

View File

@@ -1169,7 +1169,7 @@
{
"key": "0",
"value": "0",
"label": "ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NOT_SET"
"label": "ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NONE"
},
{
"key": "1",

View File

@@ -68,7 +68,7 @@ describe('Task Header cloud component', () => {
let groupInfo: any;
let testUser: any;
let unclaimedTask: any;
const priority = 0; // Not set
const priority = 0;
const description = 'descriptionTask';
const formatDate = 'MMM D, YYYY';
const dateTimeFormat = 'MMM D, Y, H:mm';
@@ -146,7 +146,7 @@ describe('Task Header cloud component', () => {
await expect(await taskHeaderCloudPage.getDescription())
.toEqual(isValueInvalid(basicCreatedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : basicCreatedTask.entry.description);
await expect(await taskHeaderCloudPage.getStatus()).toEqual('ASSIGNED');
await expect(await taskHeaderCloudPage.getPriority()).toEqual('Not set');
await expect(await taskHeaderCloudPage.getPriority()).toEqual('None');
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!basicCreatedTask.entry.category ?
CONSTANTS.TASK_DETAILS.NO_CATEGORY : basicCreatedTask.entry.category);
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(basicCreatedTask.entry.dueDate) ?
@@ -170,7 +170,7 @@ describe('Task Header cloud component', () => {
await expect(await taskHeaderCloudPage.getDescription())
.toEqual(isValueInvalid(completedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : completedTask.entry.description);
await expect(await taskHeaderCloudPage.getStatus()).toEqual('COMPLETED');
await expect(await taskHeaderCloudPage.getReadonlyPriority()).toEqual('Not set');
await expect(await taskHeaderCloudPage.getReadonlyPriority()).toEqual('None');
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!completedTask.entry.category ?
CONSTANTS.TASK_DETAILS.NO_CATEGORY : completedTask.entry.category);
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(completedTask.entry.dueDate) ?
@@ -194,7 +194,7 @@ describe('Task Header cloud component', () => {
await expect(await taskHeaderCloudPage.getDescription())
.toEqual(isValueInvalid(subTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : subTask.entry.description);
await expect(await taskHeaderCloudPage.getStatus()).toEqual('ASSIGNED');
await expect(await taskHeaderCloudPage.getPriority()).toEqual('Not set');
await expect(await taskHeaderCloudPage.getPriority()).toEqual('None');
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!subTask.entry.category ?
CONSTANTS.TASK_DETAILS.NO_CATEGORY : subTask.entry.category);
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(subTask.entry.dueDate) ? CONSTANTS.TASK_DETAILS.NO_DATE : subTaskCreatedDate);

View File

@@ -12,3 +12,4 @@
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 775 B

After

Width:  |  Height:  |  Size: 776 B

View File

@@ -95,7 +95,7 @@
"JSON_CELL": "Json",
"COMPLETED_BY": "Completed By",
"PRIORITY_VALUES": {
"NOT_SET": "Not set",
"NONE": "None",
"LOW": "Low",
"NORMAL": "Normal",
"HIGH": "High"

View File

@@ -27,7 +27,7 @@ export interface TaskPriorityOption {
}
export const DEFAULT_TASK_PRIORITIES: TaskPriorityOption[] = [
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NOT_SET', value: '0', key: '0' },
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NONE', value: '0', key: '0' },
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.LOW', value: '1', key: '1' },
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NORMAL', value: '2', key: '2' },
{ label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.HIGH', value: '3', key: '3' }

View File

@@ -95,7 +95,8 @@
</mat-checkbox>
</div>
<adf-cloud-date-range-filter *ngIf="taskFilterProperty.type === 'date-range'"
<adf-cloud-date-range-filter #dateRange
*ngIf="taskFilterProperty.type === 'date-range'"
[processFilterProperty]="taskFilterProperty"
[options]="taskFilterProperty.dateFilterOptions"
(dateTypeChange)="onDateTypeChange($event, taskFilterProperty)"

View File

@@ -135,7 +135,7 @@ describe('TaskHeaderCloudComponent', () => {
fixture.detectChanges();
const options: any = fixture.debugElement.queryAll(By.css('mat-option'));
expect(options[0].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NOT_SET');
expect(options[0].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NONE');
expect(options[1].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.LOW');
expect(options[2].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NORMAL');
expect(options[3].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.HIGH');

View File

@@ -187,12 +187,12 @@ export class DataTableComponentPage {
return 0;
}
if (a.toLocaleLowerCase() === 'not set') {
if (a.toLocaleLowerCase() === 'none') {
return -1;
}
if (a.toLocaleLowerCase() === 'low') {
if (b === 'not set') {
if (b === 'none') {
return 1;
} else {
return -1;