maj
This commit is contained in:
10
js/index.js
10
js/index.js
@@ -15,7 +15,9 @@ function display_projects() {
|
||||
<th>${global_project_list[i].name}</th>
|
||||
<th>${formatDate(global_project_list[i].start_date)}</th>
|
||||
<th>${global_project_list[i].status}</th>
|
||||
<th><button class="project_detail btn btn-primary">détails de ${global_project_list[i].name}</button></th>
|
||||
<th><button class="project_detail btn btn-primary">détails de ${
|
||||
global_project_list[i].name
|
||||
}</button></th>
|
||||
</tr>`;
|
||||
}
|
||||
table.innerHTML = datas;
|
||||
@@ -30,16 +32,16 @@ function display_projects() {
|
||||
});
|
||||
buttons[i].addEventListener("onclick", (event) => {
|
||||
// Send data to API and then navigate to projet_detail.html page
|
||||
current_project=change_current_project(i);
|
||||
current_project = change_current_project(i);
|
||||
});
|
||||
}
|
||||
}
|
||||
getAllProject()
|
||||
.then(project_list => {
|
||||
.then((project_list) => {
|
||||
global_project_list = project_list;
|
||||
// Call the next function here
|
||||
display_projects();
|
||||
})
|
||||
.catch(error => {
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user