From d43997a7e670fc5a49221f7715c67091bca4ad38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Mon, 16 Dec 2024 11:58:59 +0100 Subject: [PATCH] I6528 2 (#461) * pkp/pkp-lib#6528 Bulk delete - Adjust permissions and the UI for improved accessibility * pkp/pkp-lib#6528 Hide disabled checkbox for non sr users * pkp/pkp-lib#6528 Improve accessibility to not announce the button icon * pkp/pkp-lib#6528 Disable the delete action instead of hiding it when no incomplete submission is listed * pkp/pkp-lib#6528 rename locale keys --- public/globals.js | 12 ++-- src/components/Button/Button.stories.js | 8 +++ src/components/Button/Button.vue | 4 +- .../DropdownActions/DropdownActions.vue | 13 +++- src/components/Table/TableCellSelect.vue | 1 + src/pages/dashboard/DashboardPage.vue | 10 +-- .../components/DashboardBulkActions.vue | 41 +++++++++++ .../components/DashboardBulkDeleteButton.vue | 18 ++--- .../DashboardTable/DashboardTable.vue | 11 ++- .../composables/useDashboardBulkDelete.js | 69 ++++++++++++------- src/pages/dashboard/dashboardPageStore.js | 14 ++-- 11 files changed, 140 insertions(+), 61 deletions(-) create mode 100644 src/pages/dashboard/components/DashboardBulkActions.vue diff --git a/public/globals.js b/public/globals.js index 95e566c52..3d90f042c 100644 --- a/public/globals.js +++ b/public/globals.js @@ -147,12 +147,12 @@ window.pkp = { 'acceptInvitation.verifyOrcid': 'Verify ORCID iD', 'admin.jobs.failed.action.redispatch': 'Try Again', 'admin.jobs.failed.action.redispatch.all': 'Requeue All Failed Jobs', - 'admin.submissions.incomplete.bulkDelete.body': - '##admin.submissions.incomplete.bulkDelete.body##', - 'admin.submissions.incomplete.bulkDelete.column.description': - '##admin.submissions.incomplete.bulkDelete.column.description##', - 'admin.submissions.incomplete.bulkDelete.confirm': - '##admin.submissions.incomplete.bulkDelete.confirm##', + 'dashboard.submissions.incomplete.bulkDelete.body': + '##dashboard.submissions.incomplete.bulkDelete.body##', + 'dashboard.submissions.incomplete.bulkDelete.column.description': + '##dashboard.submissions.incomplete.bulkDelete.column.description##', + 'dashboard.submissions.incomplete.bulkDelete.confirm': + '##dashboard.submissions.incomplete.bulkDelete.confirm##', 'admin.version': 'Version', 'article.article': 'Article', 'article.metadata': 'Metadata', diff --git a/src/components/Button/Button.stories.js b/src/components/Button/Button.stories.js index fe8e881b1..675224b8b 100644 --- a/src/components/Button/Button.stories.js +++ b/src/components/Button/Button.stories.js @@ -50,6 +50,14 @@ export const Warnable = { }, }; +export const WarnableDisabled = { + args: { + slot: 'Delete', + isWarnable: true, + isDisabled: true, + }, +}; + export const IsCompact = { args: { slot: 'Delete', diff --git a/src/components/Button/Button.vue b/src/components/Button/Button.vue index d10c3e25d..a6f860f81 100644 --- a/src/components/Button/Button.vue +++ b/src/components/Button/Button.vue @@ -12,7 +12,7 @@ @focus="emit('focus')" @blur="emit('blur')" > - +