Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Géocontrib Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GéoContrib
Géocontrib Frontend
Commits
c0aeffc6
Commit
c0aeffc6
authored
3 years ago
by
Florent
Browse files
Options
Downloads
Patches
Plain Diff
add loader to project creation
parent
ed6d3c66
No related branches found
No related tags found
1 merge request
!67
REDMINE_TICKET-11878: ajout d'un loader à la création d'un projet
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
package-lock.json
+92
-14988
92 additions, 14988 deletions
package-lock.json
src/views/project/Project_edit.vue
+12
-0
12 additions, 0 deletions
src/views/project/Project_edit.vue
with
104 additions
and
14988 deletions
package-lock.json
+
92
−
14988
View file @
c0aeffc6
This diff is collapsed.
Click to expand it.
src/views/project/Project_edit.vue
+
12
−
0
View file @
c0aeffc6
<
template
>
<
template
>
<div
class=
"fourteen wide column"
>
<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"
>
<form
id=
"form-project-edit"
class=
"ui form"
>
<h1>
<h1>
<span
v-if=
"action === 'edit'"
<span
v-if=
"action === 'edit'"
...
@@ -206,6 +214,7 @@ export default {
...
@@ -206,6 +214,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
action
:
"
create
"
,
action
:
"
create
"
,
levelPermissions
:
[
levelPermissions
:
[
{
name
:
"
Utilisateur anonyme
"
,
value
:
"
anonymous
"
},
{
name
:
"
Utilisateur anonyme
"
,
value
:
"
anonymous
"
},
...
@@ -376,6 +385,7 @@ export default {
...
@@ -376,6 +385,7 @@ export default {
};
};
if
(
this
.
action
===
"
create
"
||
this
.
action
===
"
duplicate
"
)
{
if
(
this
.
action
===
"
create
"
||
this
.
action
===
"
duplicate
"
)
{
this
.
loading
=
true
;
await
axios
await
axios
.
post
(
.
post
(
`
${
this
.
$store
.
state
.
configuration
.
VUE_APP_DJANGO_API_BASE
}
projects/`
,
`
${
this
.
$store
.
state
.
configuration
.
VUE_APP_DJANGO_API_BASE
}
projects/`
,
...
@@ -390,11 +400,13 @@ export default {
...
@@ -390,11 +400,13 @@ export default {
this
.
goBackNrefresh
(
response
.
data
.
slug
);
this
.
goBackNrefresh
(
response
.
data
.
slug
);
}
}
}
}
this
.
loading
=
false
;
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
if
(
error
.
response
.
data
.
title
[
0
])
{
if
(
error
.
response
.
data
.
title
[
0
])
{
this
.
errors
.
title
.
push
(
error
.
response
.
data
.
title
[
0
]);
this
.
errors
.
title
.
push
(
error
.
response
.
data
.
title
[
0
]);
}
}
this
.
loading
=
false
;
throw
error
;
throw
error
;
});
});
}
else
if
(
this
.
action
===
"
edit
"
)
{
}
else
if
(
this
.
action
===
"
edit
"
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment