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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-widget.js (-2 / +5 lines)
Lines 39-45 export function useBaseWidget(widgetConfig, emit) { Link Here
39
        const savedSettings = localStorage.getItem(
39
        const savedSettings = localStorage.getItem(
40
            "widget-" + widgetConfig.id + "-settings"
40
            "widget-" + widgetConfig.id + "-settings"
41
        );
41
        );
42
        return savedSettings || null;
42
        return JSON.parse(savedSettings) || null;
43
    };
43
    };
44
44
45
    onBeforeMount(() => {
45
    onBeforeMount(() => {
Lines 65-70 export function useBaseWidget(widgetConfig, emit) { Link Here
65
        onMounted(() => {
65
        onMounted(() => {
66
            if (widgetConfig.display === "dashboard") {
66
            if (widgetConfig.display === "dashboard") {
67
                callback?.();
67
                callback?.();
68
                const savedSettings = getWidgetSavedSettings();
69
                if (savedSettings) {
70
                    settings.value = savedSettings;
71
                }
68
            }
72
            }
69
        });
73
        });
70
    }
74
    }
71
- 

Return to bug 39320