From 95ad5a66bf78cac4332ecb62bad15052cdb8a122 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 14 Aug 2024 14:56:09 +0000 Subject: [PATCH] Bug 10190: Add letter names to tables Sponsored-by: Glasgow Colleges Library Group Signed-off-by: George Harkins --- .../CirculationTriggersFormAdd.vue | 1 + .../CirculationTriggersList.vue | 7 ++++++- .../CirculationTriggers/TriggersTable.vue | 19 +++++++++++++------ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersFormAdd.vue index ac331a26c00..fac7b534fc3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersFormAdd.vue @@ -19,6 +19,7 @@ :triggerNumber="newTriggerNumber - 1" :modal="true" :ruleBeingEdited="ruleBeingEdited" + :letters="letters" />
diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersList.vue index f464cbb8833..27c0511c8a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersList.vue @@ -92,6 +92,7 @@ :triggerNumber="number" :categories="categories" :itemTypes="itemTypes" + :letters="letters" /> @@ -113,13 +114,17 @@ import ToolbarButton from "../../ToolbarButton.vue" import { APIClient } from "../../../fetch/api-client.js" import TriggersTable from "./TriggersTable.vue" import { inject } from "vue" +import { storeToRefs } from "pinia" export default { setup() { - const { splitCircRulesByTriggerNumber } = inject("circRulesStore") + const circRulesStore = inject("circRulesStore") + const { splitCircRulesByTriggerNumber } = circRulesStore + const { letters } = storeToRefs(circRulesStore) return { splitCircRulesByTriggerNumber, + letters, } }, data() { diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/TriggersTable.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/TriggersTable.vue index 69f0df003a6..da01a45e943 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/TriggersTable.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/TriggersTable.vue @@ -9,7 +9,7 @@ {{ $__("Item type") }} - {{ $__("Notice") }} + {{ $__("Rule") }} {{ $__("Delay") }} @@ -114,11 +114,13 @@ " > {{ - rule[ - "overdue_" + - (modal ? i + 1 : triggerNumber) + - "_notice" - ] + handleNotice( + rule[ + "overdue_" + + (modal ? i + 1 : triggerNumber) + + "_notice" + ] + ) }} letter.code === notice) + return letter ? letter.name : notice + }, }, } -- 2.47.0