Skip to content
Snippets Groups Projects
Commit c0aeffc6 authored by Florent's avatar Florent
Browse files

add loader to project creation

parent ed6d3c66
No related branches found
No related tags found
1 merge request!67REDMINE_TICKET-11878: ajout d'un loader à la création d'un projet
Source diff could not be displayed: it is too large. Options to address this: view the blob.
<template>
<div class="fourteen wide column">
<div
:class="{active: loading}"
class="ui inverted dimmer"
>
<div class="ui text loader">
Projet en cours de création. Vous allez être redirigé.
</div>
</div>
<form id="form-project-edit" class="ui form">
<h1>
<span v-if="action === 'edit'"
......@@ -206,6 +214,7 @@ export default {
data() {
return {
loading: false,
action: "create",
levelPermissions: [
{ name: "Utilisateur anonyme", value: "anonymous" },
......@@ -376,6 +385,7 @@ export default {
};
if (this.action === "create" || this.action === "duplicate") {
this.loading = true;
await axios
.post(
`${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}projects/`,
......@@ -390,11 +400,13 @@ export default {
this.goBackNrefresh(response.data.slug);
}
}
this.loading = false;
})
.catch((error) => {
if (error.response.data.title[0]) {
this.errors.title.push(error.response.data.title[0]);
}
this.loading = false;
throw error;
});
} else if (this.action === "edit") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment