From 5f51a1008bc3cfa605e16aed6d181c6746edeff3 Mon Sep 17 00:00:00 2001 From: Mohamed Maoulainine Maoulainine Date: Thu, 20 Mar 2025 22:42:49 +0100 Subject: [PATCH] fix: fixing conflicts --- front/MyINPulse-front/fake_data/db.json | 10 + front/MyINPulse-front/fake_data/open.sh | 2 + .../src/components/canvas/CanvasItem.vue | 181 ++++++++++++++++++ .../src/components/canvas/HeaderCanvas.vue | 120 ++++++++++++ .../src/components/canvas/LeanCanvas.vue | 56 ++++++ .../src/components/canvas/style-project.css | 156 +++++++++++++++ .../MyINPulse-front/src/plugins/authStore.ts | 14 ++ 7 files changed, 539 insertions(+) create mode 100644 front/MyINPulse-front/fake_data/db.json create mode 100755 front/MyINPulse-front/fake_data/open.sh create mode 100644 front/MyINPulse-front/src/components/canvas/CanvasItem.vue create mode 100644 front/MyINPulse-front/src/components/canvas/HeaderCanvas.vue create mode 100644 front/MyINPulse-front/src/components/canvas/LeanCanvas.vue create mode 100644 front/MyINPulse-front/src/components/canvas/style-project.css create mode 100644 front/MyINPulse-front/src/plugins/authStore.ts diff --git a/front/MyINPulse-front/fake_data/db.json b/front/MyINPulse-front/fake_data/db.json new file mode 100644 index 0000000..8a5776e --- /dev/null +++ b/front/MyINPulse-front/fake_data/db.json @@ -0,0 +1,10 @@ +{ + "entrepreneurs": [ + { "id": 1, "name": "Alice", "email": "alice@example.com" }, + { "id": 2, "name": "Bob", "email": "bob@example.com" }, + { "id": 3, "name": "Charlie", "email": "charlie@example.com" } + ], + "data": [ + { "canva_data": "this is a fake data to test api" } + ] +} diff --git a/front/MyINPulse-front/fake_data/open.sh b/front/MyINPulse-front/fake_data/open.sh new file mode 100755 index 0000000..cd3b9b6 --- /dev/null +++ b/front/MyINPulse-front/fake_data/open.sh @@ -0,0 +1,2 @@ +#!/usr/bin/bash +json-server --watch db.json --port 5000 \ No newline at end of file diff --git a/front/MyINPulse-front/src/components/canvas/CanvasItem.vue b/front/MyINPulse-front/src/components/canvas/CanvasItem.vue new file mode 100644 index 0000000..729fef2 --- /dev/null +++ b/front/MyINPulse-front/src/components/canvas/CanvasItem.vue @@ -0,0 +1,181 @@ + + + + + + \ No newline at end of file diff --git a/front/MyINPulse-front/src/components/canvas/HeaderCanvas.vue b/front/MyINPulse-front/src/components/canvas/HeaderCanvas.vue new file mode 100644 index 0000000..8b08628 --- /dev/null +++ b/front/MyINPulse-front/src/components/canvas/HeaderCanvas.vue @@ -0,0 +1,120 @@ + + + + + + + diff --git a/front/MyINPulse-front/src/components/canvas/LeanCanvas.vue b/front/MyINPulse-front/src/components/canvas/LeanCanvas.vue new file mode 100644 index 0000000..a687982 --- /dev/null +++ b/front/MyINPulse-front/src/components/canvas/LeanCanvas.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/front/MyINPulse-front/src/components/canvas/style-project.css b/front/MyINPulse-front/src/components/canvas/style-project.css new file mode 100644 index 0000000..e505a15 --- /dev/null +++ b/front/MyINPulse-front/src/components/canvas/style-project.css @@ -0,0 +1,156 @@ +body { + font-family: Arial, sans-serif; + margin: 0; + padding: 10px; + } + + .row { + display: flex; + } + + .cell { + flex: 1; + border: 1px solid #ddd; + padding: 10px; + text-align: center; + background-color: #f1f1f1; + } + + .produit { + background-color: #f9e4e4; + } + + .marche { + background-color: #e4f1f9; + } + + .valeur { + background-color: #f9f4e4; + } + + h3 { + margin: 0; + font-size: 18px; + color: #333; + } + + p { + margin: 5px 0 0; + font-size: 14px; + } + + + body { + font-family: Arial, sans-serif; + margin: 0; + padding: 0; + background-color: #f9f9f9; + } + + h1 img { + height: 80px; + margin: 40px; + text-align: center; + } + + .row { + display: flex; + margin-bottom: 10px; + } + + #ade { + max-width: 1200px; + margin: 20px auto; + padding: 20px; + text-align: center; + background-color: #e8f5e9; + border: 2px solid #4caf50; + border-radius: 10px; + } + + #ade h3 { + color: #2e7d32; + } + + #ade p { + margin: 10px 0; + font-size: 16px; + color: #333; + } + header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px 20px; + background-color: #fff; + border-bottom: 2px solid #ddd; + } + + header img { + height: 60px; + } + + header .contact-menu { + position: relative; + } + + .contact-button, .return { + padding: 10px 15px; + border: none; + border-radius: 4px; + background-color: #2196f3; + color: #fff; + cursor: pointer; + } + + .contact-button:hover, .return:hover { + background-color: #1976d2; + } + + /* Dropdown styling */ + .contact-dropdown { + position: absolute; + right: 0; + top: 50px; + display: none; + flex-direction: column; + gap: 10px; + padding: 15px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 8px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + z-index: 10; + } + + .contact-dropdown button { + padding: 8px 12px; + border: none; + border-radius: 4px; + background-color: #4caf50; + color: #fff; + cursor: pointer; + } + + .contact-dropdown button:hover { + background-color: #388e3c; + } + + .return { + background-color: #f44336; + } + + .return:hover { + background-color: #d32f2f; + } + + .header-buttons { + display: flex; + align-items: center; + gap: 15px; + } + + + a{ + color: white; + } \ No newline at end of file diff --git a/front/MyINPulse-front/src/plugins/authStore.ts b/front/MyINPulse-front/src/plugins/authStore.ts new file mode 100644 index 0000000..1a5c06e --- /dev/null +++ b/front/MyINPulse-front/src/plugins/authStore.ts @@ -0,0 +1,14 @@ +// file: src/plugins/authStore.js + +import { useAuthStore } from "@/stores/authStore.ts"; +import keycloakService from '@/services/keycloak'; +// Setup auth store as a plugin so it can be accessed globally in our FE +const authStorePlugin = { + install(app: any, option: any) { + const store = useAuthStore(option.pinia); + app.config.globalProperties.$store = store; + keycloakService.CallInitStore(store); + } +} + +export default authStorePlugin; \ No newline at end of file