feat: added form to add project and pending project section for admin, i forgot to push them
This commit is contained in:
@ -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" },
|
||||
|
Reference in New Issue
Block a user