View | Details | Raw Unified | Return to bug 10190
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersFormAdd.vue (+1 lines)
Lines 19-24 Link Here
19
                        :triggerNumber="newTriggerNumber - 1"
19
                        :triggerNumber="newTriggerNumber - 1"
20
                        :modal="true"
20
                        :modal="true"
21
                        :ruleBeingEdited="ruleBeingEdited"
21
                        :ruleBeingEdited="ruleBeingEdited"
22
                        :letters="letters"
22
                    />
23
                    />
23
                </div>
24
                </div>
24
                <fieldset class="rows">
25
                <fieldset class="rows">
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersList.vue (-1 / +6 lines)
Lines 92-97 Link Here
92
                        :triggerNumber="number"
92
                        :triggerNumber="number"
93
                        :categories="categories"
93
                        :categories="categories"
94
                        :itemTypes="itemTypes"
94
                        :itemTypes="itemTypes"
95
                        :letters="letters"
95
                    />
96
                    />
96
                </div>
97
                </div>
97
            </template>
98
            </template>
Lines 113-125 import ToolbarButton from "../../ToolbarButton.vue" Link Here
113
import { APIClient } from "../../../fetch/api-client.js"
114
import { APIClient } from "../../../fetch/api-client.js"
114
import TriggersTable from "./TriggersTable.vue"
115
import TriggersTable from "./TriggersTable.vue"
115
import { inject } from "vue"
116
import { inject } from "vue"
117
import { storeToRefs } from "pinia"
116
118
117
export default {
119
export default {
118
    setup() {
120
    setup() {
119
        const { splitCircRulesByTriggerNumber } = inject("circRulesStore")
121
        const circRulesStore = inject("circRulesStore")
122
        const { splitCircRulesByTriggerNumber } = circRulesStore
123
        const { letters } = storeToRefs(circRulesStore)
120
124
121
        return {
125
        return {
122
            splitCircRulesByTriggerNumber,
126
            splitCircRulesByTriggerNumber,
127
            letters,
123
        }
128
        }
124
    },
129
    },
125
    data() {
130
    data() {
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/TriggersTable.vue (-7 / +13 lines)
Lines 9-15 Link Here
9
                    {{ $__("Item type") }}
9
                    {{ $__("Item type") }}
10
                </th>
10
                </th>
11
                <th v-if="modal">
11
                <th v-if="modal">
12
                    {{ $__("Notice") }}
12
                    {{ $__("Rule") }}
13
                </th>
13
                </th>
14
                <th>
14
                <th>
15
                    {{ $__("Delay") }}
15
                    {{ $__("Delay") }}
Lines 114-124 Link Here
114
                        "
114
                        "
115
                    >
115
                    >
116
                        {{
116
                        {{
117
                            rule[
117
                            handleNotice(
118
                                "overdue_" +
118
                                rule[
119
                                    (modal ? i + 1 : triggerNumber) +
119
                                    "overdue_" +
120
                                    "_notice"
120
                                        (modal ? i + 1 : triggerNumber) +
121
                            ]
121
                                        "_notice"
122
                                ]
123
                            )
122
                        }}
124
                        }}
123
                    </td>
125
                    </td>
124
                    <td
126
                    <td
Lines 224-229 export default { Link Here
224
        "ruleBeingEdited",
226
        "ruleBeingEdited",
225
        "categories",
227
        "categories",
226
        "itemTypes",
228
        "itemTypes",
229
        "letters",
227
    ],
230
    ],
228
    methods: {
231
    methods: {
229
        handleContext(value, data, type, displayProperty = "name") {
232
        handleContext(value, data, type, displayProperty = "name") {
Lines 251-256 export default { Link Here
251
                        rule[`overdue_${number}_restrict`])
254
                        rule[`overdue_${number}_restrict`])
252
            )
255
            )
253
        },
256
        },
257
        handleNotice(notice) {
258
            const letter = this.letters.find(letter => letter.code === notice)
259
            return letter ? letter.name : notice
260
        },
254
    },
261
    },
255
}
262
}
256
</script>
263
</script>
257
- 

Return to bug 10190