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

(-)a/acqui/vendors.pl (-1 / +2 lines)
Lines 48-54 $template->param( Link Here
48
    user_permissions => $user_permissions,
48
    user_permissions => $user_permissions,
49
    currencies       => Koha::Acquisition::Currencies->search->unblessed,
49
    currencies       => Koha::Acquisition::Currencies->search->unblessed,
50
    gst_values       => \@gst_values,
50
    gst_values       => \@gst_values,
51
    edifact          => C4::Context->preference('EDIFACT')
51
    edifact          => C4::Context->preference('EDIFACT'),
52
    erm_module       => C4::Context->preference('ERMModule')
52
);
53
);
53
54
54
output_html_with_http_headers $query, $cookie, $template->output;
55
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendors.tt (+1 lines)
Lines 33-38 Link Here
33
        const currencies = [% To.json(currencies) | $raw %];
33
        const currencies = [% To.json(currencies) | $raw %];
34
        const gstValues = [% To.json(gst_values) | $raw %];
34
        const gstValues = [% To.json(gst_values) | $raw %];
35
        const edifact = [% To.json(edifact) | $raw %];
35
        const edifact = [% To.json(edifact) | $raw %];
36
        const ermModule = [% To.json(erm_module) | $raw %];
36
    </script>
37
    </script>
37
38
38
39
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue (+7 lines)
Lines 234-239 export default { Link Here
234
            if (this.filters.by_expired)
234
            if (this.filters.by_expired)
235
                url +=
235
                url +=
236
                    "?max_expiration_date=" + this.filters.max_expiration_date
236
                    "?max_expiration_date=" + this.filters.max_expiration_date
237
238
            const vendorId = this.$route.query.vendor_id
239
            if (vendorId) {
240
                url = this.filters.by_expired
241
                    ? url + "&vendor_id=" + vendorId
242
                    : url + "?vendor_id=" + vendorId
243
            }
237
            return url
244
            return url
238
        },
245
        },
239
        filter_table: async function () {
246
        filter_table: async function () {
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormAdd.vue (-2 / +2 lines)
Lines 152-163 import { storeToRefs } from "pinia" Link Here
152
export default {
152
export default {
153
    setup() {
153
    setup() {
154
        const AVStore = inject("AVStore")
154
        const AVStore = inject("AVStore")
155
        const { av_license_types, av_license_statuses, av_user_roles } =
155
        const { av_license_statuses, av_license_types, av_user_roles } =
156
            storeToRefs(AVStore)
156
            storeToRefs(AVStore)
157
157
158
        return {
158
        return {
159
            av_license_types,
160
            av_license_statuses,
159
            av_license_statuses,
160
            av_license_types,
161
            av_user_roles,
161
            av_user_roles,
162
            max_allowed_packet,
162
            max_allowed_packet,
163
        }
163
        }
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue (-1 / +10 lines)
Lines 69-75 export default { Link Here
69
            searchable_av_options: [],
69
            searchable_av_options: [],
70
            tableOptions: {
70
            tableOptions: {
71
                columns: this.getTableColumns(),
71
                columns: this.getTableColumns(),
72
                url: this.getResourceTableUrl(),
72
                url: this.tableURL(),
73
                options: { embed: "vendor,extended_attributes,+strings" },
73
                options: { embed: "vendor,extended_attributes,+strings" },
74
                table_settings: this.license_table_settings,
74
                table_settings: this.license_table_settings,
75
                add_filters: true,
75
                add_filters: true,
Lines 113-118 export default { Link Here
113
                error => {}
113
                error => {}
114
            )
114
            )
115
        },
115
        },
116
        tableURL() {
117
            let url = this.getResourceTableUrl()
118
119
            const vendorId = this.$route.query.vendor_id
120
            if (vendorId) {
121
                url += "?vendor_id=" + vendorId
122
            }
123
            return url
124
        },
116
        async getSearchableAdditionalFields() {
125
        async getSearchableAdditionalFields() {
117
            const client = APIClient.additional_fields
126
            const client = APIClient.additional_fields
118
            await client.additional_fields.getAll("license").then(
127
            await client.additional_fields.getAll("license").then(
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue (+24 lines)
Lines 68-73 Link Here
68
                    >{{ $__("Uncertain prices") }}</a
68
                    >{{ $__("Uncertain prices") }}</a
69
                >
69
                >
70
            </li>
70
            </li>
71
            <li v-if="ermModule && (erm || isUserPermitted('CAN_user_erm'))">
72
                <a
73
                    :href="`/cgi-bin/koha/erm/agreements?vendor_id=${vendorId}`"
74
                    >{{ $__("ERM agreements") }}</a
75
                >
76
            </li>
77
            <li v-if="ermModule && (erm || isUserPermitted('CAN_user_erm'))">
78
                <a :href="`/cgi-bin/koha/erm/licenses?vendor_id=${vendorId}`">{{
79
                    $__("ERM licenses")
80
                }}</a>
81
            </li>
71
        </ul>
82
        </ul>
72
    </div>
83
    </div>
73
</template>
84
</template>
Lines 96-117 export default { Link Here
96
        issuemanage: {
107
        issuemanage: {
97
            type: String,
108
            type: String,
98
        },
109
        },
110
        ermmodule: {
111
            type: String,
112
        },
113
        erm: {
114
            type: String,
115
        },
99
    },
116
    },
100
    setup() {
117
    setup() {
101
        const permissionsStore = inject("permissionsStore")
118
        const permissionsStore = inject("permissionsStore")
102
        const { isUserPermitted } = permissionsStore
119
        const { isUserPermitted } = permissionsStore
103
        const navigationStore = inject("navigationStore")
120
        const navigationStore = inject("navigationStore")
104
        const { params } = storeToRefs(navigationStore)
121
        const { params } = storeToRefs(navigationStore)
122
        const vendorStore = inject("vendorStore")
123
        const { config } = storeToRefs(vendorStore)
105
124
106
        return {
125
        return {
107
            isUserPermitted,
126
            isUserPermitted,
108
            params,
127
            params,
128
            config,
109
        }
129
        }
110
    },
130
    },
111
    data() {
131
    data() {
112
        const vendorId = this.vendorid ? this.vendorid : this.params.vendor_id
132
        const vendorId = this.vendorid ? this.vendorid : this.params.vendor_id
133
        const ermModule = this.ermmodule
134
            ? this.ermmodule
135
            : this.config.settings.ermModule
113
        return {
136
        return {
114
            vendorId,
137
            vendorId,
138
            ermModule,
115
        }
139
        }
116
    },
140
    },
117
}
141
}
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue (-1 / +1 lines)
Lines 97-102 export default { Link Here
97
            this.loaded()
97
            this.loaded()
98
            this.userPermissions = userPermissions
98
            this.userPermissions = userPermissions
99
            this.config.settings.edifact = edifact
99
            this.config.settings.edifact = edifact
100
            this.config.settings.ermModule = ermModule
100
            this.vendorStore.currencies = currencies
101
            this.vendorStore.currencies = currencies
101
            this.vendorStore.gstValues = gstValues.map(gv => {
102
            this.vendorStore.gstValues = gstValues.map(gv => {
102
                return {
103
                return {
103
- 

Return to bug 38208