feat: added form to add project and pending project section for admin, i forgot to push them
Some checks failed
Format / formatting (push) Successful in 5s
Build / build (push) Successful in 38s
CI / build (push) Failing after 8s
Format / formatting (pull_request) Successful in 5s

This commit is contained in:
Mohamed Maoulainine Maoulainine
2025-04-09 00:46:44 +02:00
parent b9647ce36e
commit 60290956ec
3 changed files with 282 additions and 10 deletions

View File

@ -1,8 +1,9 @@
<template>
<Header />
<error-wrapper></error-wrapper>
<div id="container">
<div id="container">
<div id="main">
<h3> Projet en cours </h3>
<ProjectComp
v-for="(project, index) in projects"
:key="index"
@ -10,11 +11,24 @@
:listName="project.members"
:projectLink="project.link"
/>
</div>
<div id ="main">
<h3> Projet en attente </h3>
<PendingProjectComponent
v-for="( project, index) in pendingProjects"
:key="index"
:projectName="project.name"
:creationDate="project.creationDate"
/>
</div>
</div>
<Agenda :projectRDV="rendezVous" />
</div>
<AddProjectForm/>
</template>
<script setup lang="ts">
@ -24,14 +38,15 @@ import { callApi } from "@/services/api";
import Header from "../components/HeaderComponent.vue";
import Agenda from "../components/Agenda.vue";
import ProjectComp from "../components/ProjectComponent.vue";
import PendingProjectComponent from "@/components/PendingProjectComponent.vue";
import AddProjectForm from "@/components/AddProjectForm.vue";
const PORT = "8081";
const URI = `http://localhost:${PORT}`;
const projects = ref<{ name: string; link: string; members: string[] }[]>([]);
//const projects = ref<{ name: string; link: string; members: string[] }[]>([]);
const fetchProjects = () => {
/* const fetchProjects = () => {
callApi(
`${URI}/admin/projects`,
async (response) => {
@ -71,10 +86,10 @@ const fetchProjects = () => {
};
onMounted(fetchProjects);
*/
/*const projects = ref([
const projects = ref([
{
name: "Projet Alpha",
link: "/canvas", // to test
@ -86,7 +101,13 @@ onMounted(fetchProjects);
members: ["David", "Eve", "Frank"],
},
]);
*/
const pendingProjects = ref ([
{ name: "l'eau", creationDate: "26-02-2024" },
{ name: "l'air", creationDate: "09-03-2023" },
])
const rendezVous = ref([
{ projectName: "Projet Alpha", date: "2025-03-10", lieu: "P106" },
{ projectName: "Projet Beta", date: "2025-04-15", lieu: "Td10" },