From 3fb5bac9d50b20a927e3c3754914d44e1ec3e16a Mon Sep 17 00:00:00 2001 From: ThomasCast3 <91255859+ThomasCast3@users.noreply.github.com> Date: Fri, 16 Jun 2023 11:28:58 +0200 Subject: [PATCH 1/4] correction store cours --- .../src/components/RessourcesComponents/AddCourse.vue | 2 +- front-end/src/store/interfaces/cours.interface.ts | 1 + front-end/src/store/modules/course.store.ts | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/front-end/src/components/RessourcesComponents/AddCourse.vue b/front-end/src/components/RessourcesComponents/AddCourse.vue index 57b0f23b..288e2723 100644 --- a/front-end/src/components/RessourcesComponents/AddCourse.vue +++ b/front-end/src/components/RessourcesComponents/AddCourse.vue @@ -77,7 +77,7 @@ export default { project: [], site: '', teacherId: '', - languages: [], + languages: [], languageSuggest: [], showSuggest: false, dateFormat: 'yyyy-MM-dd HH:mm', diff --git a/front-end/src/store/interfaces/cours.interface.ts b/front-end/src/store/interfaces/cours.interface.ts index 78287a1a..62561aaf 100644 --- a/front-end/src/store/interfaces/cours.interface.ts +++ b/front-end/src/store/interfaces/cours.interface.ts @@ -25,6 +25,7 @@ export interface Course { messages: Array; projects: Array; retro: string; + files: string; } export interface Group { diff --git a/front-end/src/store/modules/course.store.ts b/front-end/src/store/modules/course.store.ts index 67641f04..8d1cc933 100644 --- a/front-end/src/store/modules/course.store.ts +++ b/front-end/src/store/modules/course.store.ts @@ -12,16 +12,21 @@ export const useCoursStore = defineStore('course', { { _id: '', tag: '', - classTag: '', + classId: '', picture: '', language: '', createdAt: null, periodStart: null, periodEnd: null, presence: [], - project: [], + projects: [], site: '', teacherId: '', + files: '', + groups: [], + isLocked: false, + messages: [], + retro: '', }, ], oneItems: {}, From 45ece9657280e3c4017d5a0d91eeac6d751c240c Mon Sep 17 00:00:00 2001 From: ThomasCast3 <91255859+ThomasCast3@users.noreply.github.com> Date: Fri, 16 Jun 2023 13:48:56 +0200 Subject: [PATCH 2/4] ajout lien vers doc --- .../OpenHousesDetails.vue | 29 ++++++++++++++++--- front-end/src/components/blog/AddArticles.vue | 2 +- .../src/store/interfaces/article.interface.ts | 1 + front-end/src/store/modules/article.store.ts | 1 + 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/front-end/src/components/RessourcesComponents/OpenHousesDetails.vue b/front-end/src/components/RessourcesComponents/OpenHousesDetails.vue index 3baa1114..2c281d4b 100644 --- a/front-end/src/components/RessourcesComponents/OpenHousesDetails.vue +++ b/front-end/src/components/RessourcesComponents/OpenHousesDetails.vue @@ -21,7 +21,7 @@ Lien
- +
-

Contenu du cours

-
    +

    Contenu du cours

    + -

    Groupes

    -
      +

      + Groupes (Dashboard) +

      +
      • Groupe {{ index + 1 }}

      +

      Rétro

      +
        +
        + +
        +
-
-

- Contenu du cours -

-
- -
+
+
@@ -76,8 +83,11 @@ import { computed, onMounted } from 'vue'; import { useCoursStore } from '@/store/modules/course.store'; import { useRouter } from 'vue-router'; + import Board from '@/components/common/svg/Board.vue'; import Clipboard from '@/components/common/svg/Clipboard.vue'; +import ArrowLeft from '@/components/common/svg/ArrowLeft.vue'; +import Book from '@/components/common/svg/Book.vue'; // get store const course = useCoursStore(); @@ -90,35 +100,28 @@ const router = useRouter(); const courses = [ { id: 1, - title: 'Cours 1', - description: 'Description du cours 1', + title: 'Backlog', + description: 'Backlog de la semaine', open: false, files: [ - { id: 1, name: 'Fichier 1', url: '#' }, - { id: 2, name: 'Fichier 2', url: '#' }, - { id: 3, name: 'Fichier 3', url: '#' }, + { + id: 1, + name: 'Fichier 1', + url: 'https://cdn.discordapp.com/attachments/892146093872259113/1119231010777870388/BacklogPGP-1.pdf', + }, ], }, { id: 2, - title: 'Cours 2', - description: 'Description du cours 2', + title: 'Image', + description: 'PHP', open: false, files: [ - { id: 4, name: 'Fichier 4', url: '#' }, - { id: 5, name: 'Fichier 5', url: '#' }, - { id: 6, name: 'Fichier 6', url: '#' }, - ], - }, - { - id: 3, - title: 'Cours 3', - description: 'Description du cours 3', - open: false, - files: [ - { id: 7, name: 'Fichier 7', url: '#' }, - { id: 8, name: 'Fichier 8', url: '#' }, - { id: 9, name: 'Fichier 9', url: '#' }, + { + id: 2, + name: 'Fichier 4', + url: 'https://cdn.discordapp.com/attachments/892146093872259113/1119231656885239930/K8DkEqSzlXEAAAAASUVORK5CYII.png', + }, ], }, ]; @@ -149,6 +152,10 @@ onMounted(async () => { await getCourseById(_id.value); }); +const toggleCourse = (course) => { + course.open = !course.open; +}; + const goToProject = (canva) => { router.push(`/app/agility/project/${canva._id}`); }; @@ -156,6 +163,10 @@ const goToProject = (canva) => { const goToRetro = (retro) => { router.push(`/app/retrospective/${retro.slug}`); }; + +const returnToCourse = () => { + router.push(`/app/ressource/cours/`); +};