diff --git a/gca-admin-gurusoft-message-dashboard/src/App.vue b/gca-admin-gurusoft-message-dashboard/src/App.vue
index 02d8986..d11d61a 100644
--- a/gca-admin-gurusoft-message-dashboard/src/App.vue
+++ b/gca-admin-gurusoft-message-dashboard/src/App.vue
@@ -1,7 +1,6 @@
-
diff --git a/gca-admin-gurusoft-message-dashboard/src/components/OverlayPopup.vue b/gca-admin-gurusoft-message-dashboard/src/components/OverlayPopup.vue
new file mode 100644
index 0000000..42d9a6a
--- /dev/null
+++ b/gca-admin-gurusoft-message-dashboard/src/components/OverlayPopup.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/gca-admin-gurusoft-message-dashboard/src/components/SystemMessagesPage.vue b/gca-admin-gurusoft-message-dashboard/src/components/SystemMessagesPage.vue
index 631aa33..0e211a8 100644
--- a/gca-admin-gurusoft-message-dashboard/src/components/SystemMessagesPage.vue
+++ b/gca-admin-gurusoft-message-dashboard/src/components/SystemMessagesPage.vue
@@ -50,17 +50,9 @@
import {onMounted, ref} from 'vue';
import {initializeApi} from '../utils/api.js';
-const api = initializeApi(true);
+const api = initializeApi();
const messages = ref([]);
-const useMockedData = import.meta.env.VITE_USE_MOCK === "true";
-
-if (useMockedData) {
- import('bootstrap/dist/css/bootstrap.min.css')
- .then(() => console.log('Bootstrap CSS loaded!'))
- .catch(err => console.error('Error loading Bootstrap CSS:', err));
-}
-
onMounted(async () => {
messages.value = await api.getAllMessages();
});
diff --git a/gca-admin-gurusoft-message-dashboard/src/components/SystemMesssages.vue b/gca-admin-gurusoft-message-dashboard/src/components/SystemMesssages.vue
index ddd259b..d1b5a6d 100644
--- a/gca-admin-gurusoft-message-dashboard/src/components/SystemMesssages.vue
+++ b/gca-admin-gurusoft-message-dashboard/src/components/SystemMesssages.vue
@@ -7,7 +7,7 @@
-
@@ -50,17 +50,9 @@
import {ref, onMounted} from 'vue';
import {initializeApi} from '../utils/api.js';
-const api = initializeApi(true);
+const api = initializeApi();
const messages = ref([]);
-const useMockedData = import.meta.env.VITE_USE_MOCK === "true";
-
-if (useMockedData) {
- import('bootstrap/dist/css/bootstrap.min.css')
- .then(() => console.log('Bootstrap CSS loaded!'))
- .catch(err => console.error('Error loading Bootstrap CSS:', err));
-}
-
onMounted(async () => {
messages.value = await api.getAllMessages();
});
diff --git a/gca-admin-gurusoft-message-dashboard/src/components/TestPage.vue b/gca-admin-gurusoft-message-dashboard/src/components/TestPage.vue
new file mode 100644
index 0000000..b0d6838
--- /dev/null
+++ b/gca-admin-gurusoft-message-dashboard/src/components/TestPage.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+ System messages
+
+
+ System messages
+
+
+
+
+
diff --git a/gca-admin-gurusoft-message-dashboard/src/mocks/overlay_popup.json b/gca-admin-gurusoft-message-dashboard/src/mocks/overlay_popup.json
new file mode 100644
index 0000000..56a530b
--- /dev/null
+++ b/gca-admin-gurusoft-message-dashboard/src/mocks/overlay_popup.json
@@ -0,0 +1,12 @@
+{
+ "title": "Driftsmelding e-handel",
+ "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
+ "footer": "Vennlig hilsen",
+ "info": [
+ "Gurusoft AS",
+ "+47 123 45 678",
+ "support.ecommerce@gurusoft.no"
+ ]
+}
+
+
diff --git a/gca-admin-gurusoft-message-dashboard/src/router/index.js b/gca-admin-gurusoft-message-dashboard/src/router/index.js
index a05cafc..2e303de 100644
--- a/gca-admin-gurusoft-message-dashboard/src/router/index.js
+++ b/gca-admin-gurusoft-message-dashboard/src/router/index.js
@@ -1,11 +1,12 @@
import {createRouter, createWebHistory} from 'vue-router';
import SystemMessagesPage from '../components/SystemMessagesPage.vue';
import SystemMessages from '../components/SystemMesssages.vue';
-
+import TestPage from '../components/TestPage.vue';
const routes = [
- {path: '/', name: 'Home', component: SystemMessages},
- {path: '/systemmessagelist', name: 'MessagesPage', component: SystemMessagesPage}
+ {path: '/systemmessage', name: 'SystemMessage', component: SystemMessages},
+ {path: '/systemmessagelist', name: 'SystemMessageList', component: SystemMessagesPage},
+ {path: '/', name: 'TestPage', component: TestPage}
];
const router = createRouter({
diff --git a/gca-admin-gurusoft-message-dashboard/src/utils/api.js b/gca-admin-gurusoft-message-dashboard/src/utils/api.js
index 7e50f70..529b5c2 100644
--- a/gca-admin-gurusoft-message-dashboard/src/utils/api.js
+++ b/gca-admin-gurusoft-message-dashboard/src/utils/api.js
@@ -1,4 +1,5 @@
import mockSystemMessages from '../mocks/system_message.json';
+import mockOverlay from '../mocks/overlay_popup.json';
const createMockApi = () => {
return {
@@ -8,6 +9,11 @@ const createMockApi = () => {
return mockSystemMessages;
},
+ getOverlayPopup: async () => {
+ await new Promise(resolve => setTimeout(resolve, 300));
+ return mockOverlay;
+ },
+
// Get a single message by ID
getMessageById: async (id) => {
await new Promise(resolve => setTimeout(resolve, 200));
@@ -22,6 +28,6 @@ const createMockApi = () => {
};
};
-export const initializeApi = (useMockedData = true) => {
+export const initializeApi = () => {
return createMockApi();
};