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 43-49 Link Here
43
            <KohaTable
43
            <KohaTable
44
                ref="table"
44
                ref="table"
45
                v-bind="tableOptions"
45
                v-bind="tableOptions"
46
                @show="doShow"
46
                @show="goToResourceShow"
47
                @edit="goToResourceEdit"
47
                @edit="goToResourceEdit"
48
                @delete="doDelete"
48
                @delete="doDelete"
49
                @select="doSelect"
49
                @select="doSelect"
Lines 173-185 export default { Link Here
173
                error => {}
173
                error => {}
174
            )
174
            )
175
        },
175
        },
176
        doShow: function ({ agreement_id }, dt, event) {
177
            event.preventDefault()
178
            this.$router.push({
179
                name: "AgreementsShow",
180
                params: { agreement_id },
181
            })
182
        },
183
        doDelete: function (agreement, dt, event) {
176
        doDelete: function (agreement, dt, event) {
184
            this.setConfirmationDialog(
177
            this.setConfirmationDialog(
185
                {
178
                {
186
- 

Return to bug 37301