From 27f575c2d1ffbc23bb7ed640ec66c37c453edbaf Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 8 Dec 2024 20:34:16 -0800 Subject: [PATCH 1/2] Fix some strings --- src-ui/messages.xlf | 15 ++++----------- .../workflow-edit-dialog.component.html | 6 +++--- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 73b67b5b3..be1b9d7f2 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -4412,8 +4412,8 @@ 121 - - Set scheduled trigger offset and which field to use. + + Set scheduled trigger offset and which date field to use. src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 123 @@ -4426,13 +4426,6 @@ 126 - - Use 0 for immediate. - - src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html - 126 - - Relative to @@ -4440,8 +4433,8 @@ 129 - - Delay custom field + + Custom field src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 133 diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html index 042729f2f..7cbb6b6f2 100644 --- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html +++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html @@ -120,17 +120,17 @@ @if (formGroup.get('type').value === WorkflowTriggerType.Scheduled) { -

Set scheduled trigger offset and which field to use.

+

Set scheduled trigger offset and which date field to use.

- +
@if (formGroup.get('schedule_date_field').value === 'custom_field') {
- +
}
From 8574d28c6fc5499407acb8b25ba880a46f70082f Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 8 Dec 2024 21:23:41 -0800 Subject: [PATCH 2/2] Fix: hide other filtering buttons, fix e2e test paths --- src-ui/e2e/admin/settings.spec.ts | 3 ++- src-ui/e2e/dashboard/dashboard.spec.ts | 9 +++++---- src-ui/e2e/document-detail/document-detail.spec.ts | 5 +++-- src-ui/e2e/document-list/document-list.spec.ts | 13 +++++++------ src-ui/e2e/permissions/global-permissions.spec.ts | 3 ++- .../filter-editor/filter-editor.component.html | 6 +++--- 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src-ui/e2e/admin/settings.spec.ts b/src-ui/e2e/admin/settings.spec.ts index e90bd7d82..ed651fd5d 100644 --- a/src-ui/e2e/admin/settings.spec.ts +++ b/src-ui/e2e/admin/settings.spec.ts @@ -1,6 +1,7 @@ import { test, expect } from '@playwright/test' +import path from 'node:path' -const REQUESTS_HAR = 'e2e/admin/requests/api-settings.har' +const REQUESTS_HAR = path.join(__dirname, 'requests/api-settings.har') test('should activate / deactivate save button when settings change', async ({ page, diff --git a/src-ui/e2e/dashboard/dashboard.spec.ts b/src-ui/e2e/dashboard/dashboard.spec.ts index 7d397c459..f062b63e7 100644 --- a/src-ui/e2e/dashboard/dashboard.spec.ts +++ b/src-ui/e2e/dashboard/dashboard.spec.ts @@ -1,9 +1,10 @@ import { test, expect } from '@playwright/test' +import path from 'node:path' -const REQUESTS_HAR1 = 'e2e/dashboard/requests/api-dashboard1.har' -const REQUESTS_HAR2 = 'e2e/dashboard/requests/api-dashboard2.har' -const REQUESTS_HAR3 = 'e2e/dashboard/requests/api-dashboard3.har' -const REQUESTS_HAR4 = 'e2e/dashboard/requests/api-dashboard4.har' +const REQUESTS_HAR1 = path.join(__dirname, 'requests/api-dashboard1.har') +const REQUESTS_HAR2 = path.join(__dirname, 'requests/api-dashboard2.har') +const REQUESTS_HAR3 = path.join(__dirname, 'requests/api-dashboard3.har') +const REQUESTS_HAR4 = path.join(__dirname, 'requests/api-dashboard4.har') test('dashboard inbox link', async ({ page }) => { await page.routeFromHAR(REQUESTS_HAR1, { notFound: 'fallback' }) diff --git a/src-ui/e2e/document-detail/document-detail.spec.ts b/src-ui/e2e/document-detail/document-detail.spec.ts index 7f5b28c47..39e503fff 100644 --- a/src-ui/e2e/document-detail/document-detail.spec.ts +++ b/src-ui/e2e/document-detail/document-detail.spec.ts @@ -1,7 +1,8 @@ import { test, expect } from '@playwright/test' +import path from 'node:path' -const REQUESTS_HAR = 'e2e/document-detail/requests/api-document-detail.har' -const REQUESTS_HAR2 = 'e2e/document-detail/requests/api-document-detail2.har' +const REQUESTS_HAR = path.join(__dirname, 'requests/api-document-detail.har') +const REQUESTS_HAR2 = path.join(__dirname, 'requests/api-document-detail2.har') test('should activate / deactivate save button when changes are saved', async ({ page, diff --git a/src-ui/e2e/document-list/document-list.spec.ts b/src-ui/e2e/document-list/document-list.spec.ts index 7cacdfcd0..d624a92ad 100644 --- a/src-ui/e2e/document-list/document-list.spec.ts +++ b/src-ui/e2e/document-list/document-list.spec.ts @@ -1,11 +1,12 @@ import { test, expect } from '@playwright/test' +import path from 'node:path' -const REQUESTS_HAR1 = 'e2e/document-list/requests/api-document-list1.har' -const REQUESTS_HAR2 = 'e2e/document-list/requests/api-document-list2.har' -const REQUESTS_HAR3 = 'e2e/document-list/requests/api-document-list3.har' -const REQUESTS_HAR4 = 'e2e/document-list/requests/api-document-list4.har' -const REQUESTS_HAR5 = 'e2e/document-list/requests/api-document-list5.har' -const REQUESTS_HAR6 = 'e2e/document-list/requests/api-document-list6.har' +const REQUESTS_HAR1 = path.join(__dirname, 'requests/api-document-list1.har') +const REQUESTS_HAR2 = path.join(__dirname, 'requests/api-document-list2.har') +const REQUESTS_HAR3 = path.join(__dirname, 'requests/api-document-list3.har') +const REQUESTS_HAR4 = path.join(__dirname, 'requests/api-document-list4.har') +const REQUESTS_HAR5 = path.join(__dirname, 'requests/api-document-list5.har') +const REQUESTS_HAR6 = path.join(__dirname, 'requests/api-document-list6.har') test('basic filtering', async ({ page }) => { await page.routeFromHAR(REQUESTS_HAR1, { notFound: 'fallback' }) diff --git a/src-ui/e2e/permissions/global-permissions.spec.ts b/src-ui/e2e/permissions/global-permissions.spec.ts index 69c6f94d1..5cbc0df46 100644 --- a/src-ui/e2e/permissions/global-permissions.spec.ts +++ b/src-ui/e2e/permissions/global-permissions.spec.ts @@ -1,6 +1,7 @@ import { test, expect } from '@playwright/test' +import path from 'node:path' -const REQUESTS_HAR = 'e2e/permissions/requests/api-global-permissions.har' +const REQUESTS_HAR = path.join(__dirname, 'requests/api-global-permissions.har') test('should not allow user to edit settings', async ({ page }) => { await page.routeFromHAR(REQUESTS_HAR, { notFound: 'fallback' }) diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html index 39e51a123..da789aaf6 100644 --- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html +++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html @@ -35,7 +35,7 @@
- @if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.Tag)) { + @if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.Tag) && tags.length > 0) { } - @if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.Correspondent)) { + @if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.Correspondent) && correspondents.length > 0) { } - @if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.DocumentType)) { + @if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.DocumentType) && documentTypes.length > 0) {