From 74001bd0da663b0dec7b151447607d8eb46af572 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:13:45 -0700 Subject: [PATCH] Fix: wrap table header columns in row (#7832) --- src-ui/messages.xlf | 58 ++--- .../document-list.component.html | 202 +++++++++--------- .../document-list.component.spec.ts | 2 +- 3 files changed, 132 insertions(+), 130 deletions(-) diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index f5d270376..9b588ac6b 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -1042,7 +1042,7 @@ src/app/components/document-list/document-list.component.html - 211 + 212 src/app/data/document.ts @@ -1950,7 +1950,7 @@ src/app/components/document-list/document-list.component.html - 238 + 239 src/app/data/document.ts @@ -2752,7 +2752,7 @@ src/app/components/document-list/document-list.component.html - 193 + 194 src/app/components/document-list/filter-editor/filter-editor.component.html @@ -3341,7 +3341,7 @@ src/app/components/document-list/document-list.component.html - 247 + 248 src/app/data/document.ts @@ -5510,7 +5510,7 @@ src/app/components/document-list/document-list.component.html - 286 + 288 @@ -5525,7 +5525,7 @@ src/app/components/document-list/document-list.component.html - 321 + 323 @@ -5540,7 +5540,7 @@ src/app/components/document-list/document-list.component.html - 328 + 330 @@ -5830,7 +5830,7 @@ src/app/components/document-list/document-list.component.html - 190 + 191 src/app/components/document-list/filter-editor/filter-editor.component.ts @@ -5871,7 +5871,7 @@ src/app/components/document-list/document-list.component.html - 180 + 181 src/app/components/document-list/filter-editor/filter-editor.component.html @@ -5898,7 +5898,7 @@ src/app/components/document-list/document-list.component.html - 220 + 221 src/app/components/document-list/filter-editor/filter-editor.component.html @@ -5925,7 +5925,7 @@ src/app/components/document-list/document-list.component.html - 229 + 230 src/app/components/document-list/filter-editor/filter-editor.component.html @@ -6726,7 +6726,7 @@ src/app/components/document-list/document-list.component.html - 297 + 299 @@ -6939,14 +6939,14 @@ Sort by ASN src/app/components/document-list/document-list.component.html - 167 + 168 ASN src/app/components/document-list/document-list.component.html - 171 + 172 src/app/components/document-list/filter-editor/filter-editor.component.ts @@ -6965,28 +6965,28 @@ Sort by correspondent src/app/components/document-list/document-list.component.html - 176 + 177 Sort by title src/app/components/document-list/document-list.component.html - 185 + 186 Sort by owner src/app/components/document-list/document-list.component.html - 198 + 199 Owner src/app/components/document-list/document-list.component.html - 202 + 203 src/app/data/document.ts @@ -7001,49 +7001,49 @@ Sort by notes src/app/components/document-list/document-list.component.html - 207 + 208 Sort by document type src/app/components/document-list/document-list.component.html - 216 + 217 Sort by storage path src/app/components/document-list/document-list.component.html - 225 + 226 Sort by created date src/app/components/document-list/document-list.component.html - 234 + 235 Sort by added date src/app/components/document-list/document-list.component.html - 243 + 244 Sort by number of pages src/app/components/document-list/document-list.component.html - 252 + 253 Pages src/app/components/document-list/document-list.component.html - 256 + 257 src/app/data/document.ts @@ -7062,21 +7062,21 @@ Shared src/app/components/document-list/document-list.component.html - 259,261 + 260,262 Edit document src/app/components/document-list/document-list.component.html - 293 + 295 Yes src/app/components/document-list/document-list.component.html - 349 + 351 src/app/pipes/yes-no.pipe.ts @@ -7087,7 +7087,7 @@ No src/app/components/document-list/document-list.component.html - 349 + 351 src/app/pipes/yes-no.pipe.ts diff --git a/src-ui/src/app/components/document-list/document-list.component.html b/src-ui/src/app/components/document-list/document-list.component.html index 8ca8e111d..e70f4c710 100644 --- a/src-ui/src/app/components/document-list/document-list.component.html +++ b/src-ui/src/app/components/document-list/document-list.component.html @@ -160,111 +160,113 @@
- - @if (activeDisplayFields.includes(DisplayField.ASN)) { - - } - @if (activeDisplayFields.includes(DisplayField.CORRESPONDENT) && permissionService.currentUserCan(PermissionAction.View, PermissionType.Correspondent)) { - - } - @if (activeDisplayFields.includes(DisplayField.TITLE)) { - - } - @if (activeDisplayFields.includes(DisplayField.TAGS) && !activeDisplayFields.includes(DisplayField.TITLE)) { - - } - @if (activeDisplayFields.includes(DisplayField.OWNER) && permissionService.currentUserCan(PermissionAction.View, PermissionType.User)) { - - } - @if (activeDisplayFields.includes(DisplayField.NOTES) && notesEnabled) { - - } - @if (activeDisplayFields.includes(DisplayField.DOCUMENT_TYPE) && permissionService.currentUserCan(PermissionAction.View, PermissionType.DocumentType)) { - - } - @if (activeDisplayFields.includes(DisplayField.STORAGE_PATH) && permissionService.currentUserCan(PermissionAction.View, PermissionType.StoragePath)) { - - } - @if (activeDisplayFields.includes(DisplayField.CREATED)) { - - } - @if (activeDisplayFields.includes(DisplayField.ADDED)) { - - } - @if (activeDisplayFields.includes(DisplayField.PAGE_COUNT)) { + + + @if (activeDisplayFields.includes(DisplayField.ASN)) { + i18n>ASN } - @if (activeDisplayFields.includes(DisplayField.SHARED)) { - - } - @for (field of activeDisplayCustomFields; track field) { - - } + @if (activeDisplayFields.includes(DisplayField.CORRESPONDENT) && permissionService.currentUserCan(PermissionAction.View, PermissionType.Correspondent)) { + + } + @if (activeDisplayFields.includes(DisplayField.TITLE)) { + + } + @if (activeDisplayFields.includes(DisplayField.TAGS) && !activeDisplayFields.includes(DisplayField.TITLE)) { + + } + @if (activeDisplayFields.includes(DisplayField.OWNER) && permissionService.currentUserCan(PermissionAction.View, PermissionType.User)) { + + } + @if (activeDisplayFields.includes(DisplayField.NOTES) && notesEnabled) { + + } + @if (activeDisplayFields.includes(DisplayField.DOCUMENT_TYPE) && permissionService.currentUserCan(PermissionAction.View, PermissionType.DocumentType)) { + + } + @if (activeDisplayFields.includes(DisplayField.STORAGE_PATH) && permissionService.currentUserCan(PermissionAction.View, PermissionType.StoragePath)) { + + } + @if (activeDisplayFields.includes(DisplayField.CREATED)) { + + } + @if (activeDisplayFields.includes(DisplayField.ADDED)) { + + } + @if (activeDisplayFields.includes(DisplayField.PAGE_COUNT)) { + + } + @if (activeDisplayFields.includes(DisplayField.SHARED)) { + + } + @for (field of activeDisplayCustomFields; track field) { + + } + @for (d of list.documents; track trackByDocumentId($index, d)) { diff --git a/src-ui/src/app/components/document-list/document-list.component.spec.ts b/src-ui/src/app/components/document-list/document-list.component.spec.ts index ad85652b8..0a8faa4d3 100644 --- a/src-ui/src/app/components/document-list/document-list.component.spec.ts +++ b/src-ui/src/app/components/document-list/document-list.component.spec.ts @@ -302,7 +302,7 @@ describe('DocumentListComponent', () => { displayModeButtons[0].triggerEventHandler('change') fixture.detectChanges() expect(component.list.displayMode).toEqual('table') - expect(fixture.debugElement.queryAll(By.css('tr'))).toHaveLength(3) + expect(fixture.debugElement.queryAll(By.css('tr'))).toHaveLength(4) displayModeButtons[1].nativeElement.checked = true displayModeButtons[1].triggerEventHandler('change')
ASNCorrespondentTitleTagsOwnerNotesDocument typeStorage pathCreatedAdded
Pages - Shared - - {{getDisplayCustomFieldTitle(field)}} - CorrespondentTitleTagsOwnerNotesDocument typeStorage pathCreatedAddedPages + Shared + + {{getDisplayCustomFieldTitle(field)}} +