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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorContracts.vue (-26 / +20 lines)
Lines 23-28 export default { Link Here
23
        return {
23
        return {
24
            isUserPermitted,
24
            isUserPermitted,
25
            table_id,
25
            table_id,
26
            escape_str,
26
        }
27
        }
27
    },
28
    },
28
    methods: {
29
    methods: {
Lines 51-57 export default { Link Here
51
                            data: "contractname",
52
                            data: "contractname",
52
                            searchable: false,
53
                            searchable: false,
53
                            orderable: false,
54
                            orderable: false,
54
                            render(data, type, row, meta) {
55
                            render: function (data, type, row, meta) {
55
                                return (
56
                                return (
56
                                    `<a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=${row.booksellerid}&contractnumber=${row.contractnumber}">` +
57
                                    `<a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=${row.booksellerid}&contractnumber=${row.contractnumber}">` +
57
                                    escape_str(row.contractname) +
58
                                    escape_str(row.contractname) +
Lines 77-106 export default { Link Here
77
                            searchable: false,
78
                            searchable: false,
78
                            orderable: false,
79
                            orderable: false,
79
                        },
80
                        },
80
                        ...(isUserPermitted(
81
                        {
81
                            "CAN_user_acquisition_contracts_manage"
82
                            title: __("Actions"),
82
                        )
83
                            data: "contractnumber",
83
                            ? [
84
                            searchable: false,
84
                                  {
85
                            orderable: false,
85
                                      title: __("Actions"),
86
                            render: function (data, type, row, meta) {
86
                                      data: "contractnumber",
87
                                return (
87
                                      searchable: false,
88
                                    `<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=${row.contractnumber}&booksellerid=${row.booksellerid}"><i class="fa-solid fa-pencil" aria-hidden="true"></i>` +
88
                                      orderable: false,
89
                                    " " +
89
                                      render(data, type, row, meta) {
90
                                    __("Edit") +
90
                                          return (
91
                                    "</a>" +
91
                                              `<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=${row.contractnumber}&booksellerid=${row.booksellerid}"><i class="fa-solid fa-pencil" aria-hidden="true"></i>` +
92
                                    `<a style="margin-left: 5px;" class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&contractnumber=${row.contractnumber}&booksellerid=${row.booksellerid}"><i class="fa-solid fa-trash-can" aria-hidden="true"></i>` +
92
                                              " " +
93
                                    " " +
93
                                              __("Edit") +
94
                                    __("Delete") +
94
                                              "</a>" +
95
                                    "</a>"
95
                                              `<a style="margin-left: 5px;" class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&contractnumber=${row.contractnumber}&booksellerid=${row.booksellerid}"><i class="fa-solid fa-trash-can" aria-hidden="true"></i>` +
96
                                )
96
                                              " " +
97
                            },
97
                                              __("Delete") +
98
                        },
98
                                              "</a>"
99
                                          )
100
                                      },
101
                                  },
102
                              ]
103
                            : []),
104
                    ],
99
                    ],
105
                })
100
                })
106
            )
101
            )
107
- 

Return to bug 38010