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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Breadcrumbs.vue (-1 / +2 lines)
Lines 3-9 Link Here
3
        <ol class="breadcrumb">
3
        <ol class="breadcrumb">
4
            <template v-for="(item, idx) in breadcrumbs" v-bind:key="idx">
4
            <template v-for="(item, idx) in breadcrumbs" v-bind:key="idx">
5
                <NavigationItem
5
                <NavigationItem
6
                    v-if="idx < breadcrumbs.length - 1"
6
                    v-if="idx < breadcrumbs.length - 1 || item.breadcrumbFormat"
7
                    :item="item"
7
                    :item="item"
8
                    :params="params"
8
                    :params="params"
9
                ></NavigationItem>
9
                ></NavigationItem>
Lines 31-36 export default { Link Here
31
        const navigationStore = inject("navigationStore");
31
        const navigationStore = inject("navigationStore");
32
        const { breadcrumbs } = storeToRefs(navigationStore);
32
        const { breadcrumbs } = storeToRefs(navigationStore);
33
        const { params } = navigationStore;
33
        const { params } = navigationStore;
34
34
        return {
35
        return {
35
            breadcrumbs,
36
            breadcrumbs,
36
            params,
37
            params,
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/acquisitions.ts (-1 / +5 lines)
Lines 62-67 router.beforeEach((to, from) => { Link Here
62
    if (to.path === "/cgi-bin/koha/acqui/vendors.pl") {
62
    if (to.path === "/cgi-bin/koha/acqui/vendors.pl") {
63
        router.push({ name: "VendorList" });
63
        router.push({ name: "VendorList" });
64
    }
64
    }
65
    navigationStore.$patch({ current: to.matched, params: to.params || {} });
65
    navigationStore.$patch({
66
        current: to.matched,
67
        params: to.params || {},
68
        query: to.query || {},
69
    });
66
    removeMessages(); // This will actually flag the messages as displayed already
70
    removeMessages(); // This will actually flag the messages as displayed already
67
});
71
});
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js (+8 lines)
Lines 7-12 import VendorFormAdd from "../components/Vendors/VendorFormAdd.vue"; Link Here
7
7
8
import { $__ } from "../i18n";
8
import { $__ } from "../i18n";
9
9
10
const vendorSearchBreadcrumb = ({ match, query }) => {
11
    if (!query || !query.supplier) return match.meta.self;
12
    match.meta.self.title = $__("Search for vendor: %s").format(query.supplier);
13
    match.meta.self.disabled = true;
14
    return match.meta.self;
15
};
16
10
export const routes = [
17
export const routes = [
11
    {
18
    {
12
        path: "/cgi-bin/koha/acqui/acqui-home.pl",
19
        path: "/cgi-bin/koha/acqui/acqui-home.pl",
Lines 25-30 export const routes = [ Link Here
25
                title: $__("Vendors"),
32
                title: $__("Vendors"),
26
                icon: "fa fa-shopping-cart",
33
                icon: "fa fa-shopping-cart",
27
                is_end_node: true,
34
                is_end_node: true,
35
                breadcrumbFormat: vendorSearchBreadcrumb,
28
                children: [
36
                children: [
29
                    {
37
                    {
30
                        path: "",
38
                        path: "",
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/navigation.js (-3 / +13 lines)
Lines 12-17 export const useNavigationStore = defineStore("navigation", () => { Link Here
12
        },
12
        },
13
        current: null,
13
        current: null,
14
        params: {},
14
        params: {},
15
        query: {},
15
    });
16
    });
16
    const actions = {
17
    const actions = {
17
        setRoutes(routesDef) {
18
        setRoutes(routesDef) {
Lines 145-151 export const useNavigationStore = defineStore("navigation", () => { Link Here
145
                    .map(match => {
146
                    .map(match => {
146
                        let path = _getPath(match, params);
147
                        let path = _getPath(match, params);
147
                        const externalPath = path.includes(".pl");
148
                        const externalPath = path.includes(".pl");
148
                        const test = {
149
                        let {
150
                            meta: { self },
151
                        } = match;
152
                        if (self.breadcrumbFormat) {
153
                            self = self.breadcrumbFormat({
154
                                match: self,
155
                                params: store.params,
156
                                query: store.query,
157
                            });
158
                        }
159
                        const breadcrumbInfo = {
149
                            ...match.meta.self,
160
                            ...match.meta.self,
150
                            icon: null,
161
                            icon: null,
151
                            ...(externalPath
162
                            ...(externalPath
Lines 153-159 export const useNavigationStore = defineStore("navigation", () => { Link Here
153
                                : { path }),
164
                                : { path }),
154
                            children: null,
165
                            children: null,
155
                        };
166
                        };
156
                        return test;
167
                        return breadcrumbInfo;
157
                    });
168
                    });
158
                return matches;
169
                return matches;
159
            }
170
            }
160
- 

Return to bug 38010