From ec2de90da478543885c1d9538ee3c4fe7f44fc8f Mon Sep 17 00:00:00 2001 From: Hanna Prinz Date: Mon, 23 Dec 2024 16:50:17 +0100 Subject: [PATCH] Use directive to trigger search with ctrl + enter shortcut in all searches (#2446) * General ctrl + enter solution using directives RISDEV-5819 --- .../src/components/ActiveCitationInput.vue | 2 +- .../DocumentUnitSearchEntryForm.vue | 23 +++------ .../components/EnsuingDecisionInputGroup.vue | 4 +- .../components/PreviousDecisionInputGroup.vue | 4 +- frontend/src/components/input/TextButton.vue | 2 +- .../PeriodicalEditionReferenceInput.vue | 6 ++- frontend/src/main.ts | 2 + .../periodical-evaluation/[editionId].vue | 2 +- .../src/utils/onSearchShortcutDirective.ts | 22 +++++++++ .../test/components/activeCitations.spec.ts | 21 +++++++- .../documentUnitCategories.spec.ts | 2 + .../documentUnit/documentUnitSearch.spec.ts | 48 +++++++++++++++++++ .../documentUnitSearchEntryForm.spec.ts | 8 +++- .../test/components/ensuingDecisions.spec.ts | 23 ++++++++- .../editionReferenceInput.spec.ts | 13 +++++ .../editionReferences.spec.ts | 2 + .../test/components/previousDecisions.spec.ts | 21 +++++++- frontend/test/routes/[documentNumber].spec.ts | 2 + frontend/test/routes/[editionId].spec.ts | 2 + 19 files changed, 180 insertions(+), 29 deletions(-) create mode 100644 frontend/src/utils/onSearchShortcutDirective.ts diff --git a/frontend/src/components/ActiveCitationInput.vue b/frontend/src/components/ActiveCitationInput.vue index 62c3f0330f..936b04718a 100644 --- a/frontend/src/components/ActiveCitationInput.vue +++ b/frontend/src/components/ActiveCitationInput.vue @@ -212,7 +212,7 @@ onMounted(() => {