feat(smartTag): added sort priority between multiple sorting #853

Merged
carlosjr merged 3 commits from 3528-smartTable_sort_priority into dev 2022-01-20 09:47:32 +00:00
2 changed files with 6 additions and 2 deletions
Showing only changes of commit 52d7b4f600 - Show all commits

View File

@ -96,9 +96,10 @@ describe('Component smartTable', () => {
expect(firstSortCriteria.field).toEqual('id'); expect(firstSortCriteria.field).toEqual('id');
expect(firstSortCriteria.sortType).toEqual('ASC'); expect(firstSortCriteria.sortType).toEqual('ASC');
expect(firstSortCriteria.priority).toEqual(1);
}); });
it('should insert two new objects to the controller sortCriteria with a sortType values of "ASC" and "DESC"', () => { it('should add new entries to the controller sortCriteria with a sortType values of "ASC" and "DESC"', () => {
const element = document.createElement('div'); const element = document.createElement('div');
controller.model = {order: 'test1, id DESC'}; controller.model = {order: 'test1, id DESC'};
controller.columns = [ controller.columns = [
@ -114,8 +115,10 @@ describe('Component smartTable', () => {
expect(firstSortCriteria.field).toEqual('test1'); expect(firstSortCriteria.field).toEqual('test1');
expect(firstSortCriteria.sortType).toEqual('ASC'); expect(firstSortCriteria.sortType).toEqual('ASC');
expect(firstSortCriteria.priority).toEqual(1);
expect(secondSortCriteria.field).toEqual('id'); expect(secondSortCriteria.field).toEqual('id');
expect(secondSortCriteria.sortType).toEqual('DESC'); expect(secondSortCriteria.sortType).toEqual('DESC');
expect(firstSortCriteria.priority).toEqual(2);
}); });
}); });

View File

@ -119,5 +119,6 @@
"The PDF document does not exists": "The PDF document does not exists. Try regenerating it from 'Regenerate invoice PDF' option", "The PDF document does not exists": "The PDF document does not exists. Try regenerating it from 'Regenerate invoice PDF' option",
"This item is not available": "This item is not available", "This item is not available": "This item is not available",
"Deny buy request": "Purchase request for ticket id [{{ticketId}}]({{{url}}}) has been rejected. Reason: {{observation}}", "Deny buy request": "Purchase request for ticket id [{{ticketId}}]({{{url}}}) has been rejected. Reason: {{observation}}",
"The type of business must be filled in basic data": "The type of business must be filled in basic data" "The type of business must be filled in basic data": "The type of business must be filled in basic data",
"The worker has hours recorded that day": "The worker has hours recorded that day"
} }