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

(-)a/api/v1/swagger/paths/acquisitions_vendors.yaml (-1 / +1 lines)
Lines 147-153 Link Here
147
          enum:
147
          enum:
148
            - aliases
148
            - aliases
149
            - baskets
149
            - baskets
150
            - subscriptions
150
            - subscriptions+count
151
            - interfaces
151
            - interfaces
152
            - contacts
152
            - contacts
153
            - contracts
153
            - contracts
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorList.vue (-5 / +5 lines)
Lines 62-68 export default { Link Here
62
            searchTerm: null,
62
            searchTerm: null,
63
            tableOptions: {
63
            tableOptions: {
64
                columns: this.getTableColumns(),
64
                columns: this.getTableColumns(),
65
                options: { embed: "aliases,baskets,subscriptions" },
65
                options: { embed: "aliases,baskets,subscriptions+count" },
66
                url: () => this.tableURL(),
66
                url: () => this.tableURL(),
67
                add_filters: true,
67
                add_filters: true,
68
                filters_options: {
68
                filters_options: {
Lines 85-92 export default { Link Here
85
                                should_display: row =>
85
                                should_display: row =>
86
                                    (!row.baskets ||
86
                                    (!row.baskets ||
87
                                        row.baskets.length === 0) &&
87
                                        row.baskets.length === 0) &&
88
                                    (!row.subscriptions ||
88
                                    (!row.subscriptions_count ||
89
                                        row.subscriptions.length === 0),
89
                                        row.subscriptions_count === 0),
90
                            },
90
                            },
91
                        },
91
                        },
92
                    ],
92
                    ],
Lines 234-246 export default { Link Here
234
                    searchable: false,
234
                    searchable: false,
235
                    orderable: false,
235
                    orderable: false,
236
                    render(data, type, row, meta) {
236
                    render(data, type, row, meta) {
237
                        return row.subscriptions.length
237
                        return row.subscriptions_count
238
                            ? '<a href="/cgi-bin/koha/serials/serials-search.pl?bookseller_filter=' +
238
                            ? '<a href="/cgi-bin/koha/serials/serials-search.pl?bookseller_filter=' +
239
                                  row.name +
239
                                  row.name +
240
                                  "&searched=1" +
240
                                  "&searched=1" +
241
                                  '" class="show">' +
241
                                  '" class="show">' +
242
                                  escape_str(
242
                                  escape_str(
243
                                      `${row.subscriptions.length} subscription(s)`
243
                                      `${row.subscriptions_count} subscription(s)`
244
                                  ) +
244
                                  ) +
245
                                  "</a>"
245
                                  "</a>"
246
                            : escape_str(__("No subscriptions"))
246
                            : escape_str(__("No subscriptions"))
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorSubscriptions.vue (-2 / +2 lines)
Lines 8-16 Link Here
8
            <a
8
            <a
9
                v-if="isUserPermitted('CAN_user_serials')"
9
                v-if="isUserPermitted('CAN_user_serials')"
10
                :href="`/cgi-bin/koha/serials/serials-search.pl?bookseller_filter=${vendor.name}&searched=1`"
10
                :href="`/cgi-bin/koha/serials/serials-search.pl?bookseller_filter=${vendor.name}&searched=1`"
11
                >{{ vendor.subscriptions.length }}</a
11
                >{{ vendor.subscriptions_count }}</a
12
            >
12
            >
13
            <span v-else>{{ vendor.subscriptions.length }}</span>
13
            <span v-else>{{ vendor.subscriptions_count }}</span>
14
        </p>
14
        </p>
15
    </fieldset>
15
    </fieldset>
16
</template>
16
</template>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/acquisition-api-client.js (-2 / +1 lines)
Lines 14-20 export class AcquisitionAPIClient extends HttpClient { Link Here
14
                    endpoint: "vendors/" + id,
14
                    endpoint: "vendors/" + id,
15
                    headers: {
15
                    headers: {
16
                        "x-koha-embed":
16
                        "x-koha-embed":
17
                            "aliases,subscriptions,interfaces,contacts,contracts",
17
                            "aliases,subscriptions+count,interfaces,contacts,contracts",
18
                    },
18
                    },
19
                }),
19
                }),
20
            getAll: (query, params) =>
20
            getAll: (query, params) =>
21
- 

Return to bug 38010