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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/BaseResource.vue (+15 lines)
Lines 9-14 export default { Link Here
9
        return { ...props, setConfirmationDialog, setMessage, setError }
9
        return { ...props, setConfirmationDialog, setMessage, setError }
10
    },
10
    },
11
    methods: {
11
    methods: {
12
        /**
13
         * Navigates to the show page of the given resource.
14
         *
15
         * @param {Object} resource - The resource to navigate to
16
         * @return {void}
17
         */
18
        goToResourceShow: function (resource, dt, event) {
19
            event?.preventDefault()
20
            this.$router.push({
21
                name: this.show_component,
22
                params: { [this.id_attr]: resource[this.id_attr] },
23
            })
24
        },
25
12
        /**
26
        /**
13
         * Navigates to the edit page of the given resource.
27
         * Navigates to the edit page of the given resource.
14
         *
28
         *
Lines 40-45 export default { Link Here
40
    props: {
54
    props: {
41
        resource_name: String,
55
        resource_name: String,
42
        id_attr: String,
56
        id_attr: String,
57
        show_component: String,
43
        add_component: String,
58
        add_component: String,
44
        edit_component: String,
59
        edit_component: String,
45
    },
60
    },
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementResource.vue (+1 lines)
Lines 8-13 export default { Link Here
8
            ...BaseResource.setup({
8
            ...BaseResource.setup({
9
                resource_name: "agreement",
9
                resource_name: "agreement",
10
                id_attr: "agreement_id",
10
                id_attr: "agreement_id",
11
                show_component: "AgreementsShow",
11
                add_component: "AgreementsFormAdd",
12
                add_component: "AgreementsFormAdd",
12
                edit_component: "AgreementsFormAddEdit",
13
                edit_component: "AgreementsFormAddEdit",
13
            }),
14
            }),
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue (-9 / +1 lines)
Lines 45-51 Link Here
45
                v-bind="tableOptions"
45
                v-bind="tableOptions"
46
                :searchable_additional_fields="searchable_additional_fields"
46
                :searchable_additional_fields="searchable_additional_fields"
47
                :searchable_av_options="searchable_av_options"
47
                :searchable_av_options="searchable_av_options"
48
                @show="doShow"
48
                @show="goToResourceShow"
49
                @edit="goToResourceEdit"
49
                @edit="goToResourceEdit"
50
                @delete="doDelete"
50
                @delete="doDelete"
51
                @select="doSelect"
51
                @select="doSelect"
Lines 222-234 export default { Link Here
222
                    })
222
                    })
223
                })
223
                })
224
        },
224
        },
225
        doShow: function ({ agreement_id }, dt, event) {
226
            event.preventDefault()
227
            this.$router.push({
228
                name: "AgreementsShow",
229
                params: { agreement_id },
230
            })
231
        },
232
        doDelete: function (agreement, dt, event) {
225
        doDelete: function (agreement, dt, event) {
233
            this.setConfirmationDialog(
226
            this.setConfirmationDialog(
234
                {
227
                {
235
- 

Return to bug 37301