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
externe Matthieu
Géocontrib Frontend
Commits
29c696ba
Commit
29c696ba
authored
3 years ago
by
Timothee P
Browse files
Options
Downloads
Patches
Plain Diff
allow moderator to edit features & update feature data after edition
parent
6d6b27d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/store/modules/feature.js
+1
-0
1 addition, 0 deletions
src/store/modules/feature.js
src/views/feature/Feature_detail.vue
+22
-7
22 additions, 7 deletions
src/views/feature/Feature_detail.vue
with
23 additions
and
7 deletions
src/store/modules/feature.js
+
1
−
0
View file @
29c696ba
...
...
@@ -120,6 +120,7 @@ const feature = {
const
message
=
routeName
===
"
editer-signalement
"
?
"
Le signalement a été mis à jour
"
:
"
Le signalement a été crée
"
;
function
redirect
(
featureId
)
{
dispatch
(
"
GET_PROJECT_FEATURES
"
,
rootState
.
project_slug
)
commit
(
"
DISCARD_LOADER
"
,
null
,
{
root
:
true
})
router
.
push
({
name
:
"
details-signalement
"
,
...
...
This diff is collapsed.
Click to expand it.
src/views/feature/Feature_detail.vue
+
22
−
7
View file @
29c696ba
...
...
@@ -24,7 +24,8 @@
<router-link
v-if=
"
(permissions && permissions.can_update_feature) ||
isFeatureCreator
isFeatureCreator ||
isModerator
"
:to=
"
{
name: 'editer-signalement',
...
...
@@ -39,7 +40,9 @@
</router-link>
<!-- (permissions && permissions.can_delete_feature) || -->
<a
v-if=
"isFeatureCreator || permissions.is_project_super_contributor"
v-if=
"
isFeatureCreator || permissions.is_project_super_contributor
"
@
click=
"isCanceling = true"
id=
"feature-delete"
class=
"ui button button-hover-red"
...
...
@@ -386,14 +389,14 @@ export default {
},
computed
:
{
...
mapState
([
"
user
"
]),
...
mapGetters
([
"
permissions
"
]),
...
mapState
([
"
user
"
,
"
USER_LEVEL_PROJECTS
"
]),
...
mapGetters
([
"
permissions
"
,
"
project
"
]),
...
mapState
(
"
feature
"
,
[
"
linked_features
"
,
"
statusChoices
"
]),
DJANGO_BASE_URL
:
function
()
{
DJANGO_BASE_URL
()
{
return
this
.
$store
.
state
.
configuration
.
VUE_APP_DJANGO_BASE
;
},
feature
:
function
()
{
feature
()
{
const
result
=
this
.
$store
.
state
.
feature
.
features
.
find
(
(
el
)
=>
el
.
feature_id
===
this
.
$route
.
params
.
slug_signal
);
...
...
@@ -407,6 +410,13 @@ export default {
return
false
;
},
isModerator
()
{
return
this
.
USER_LEVEL_PROJECTS
&&
this
.
USER_LEVEL_PROJECTS
[
this
.
project
.
slug
]
===
"
Modérateur
"
?
true
:
false
;
},
statusIcon
()
{
switch
(
this
.
feature
.
status
)
{
case
"
archived
"
:
...
...
@@ -617,7 +627,12 @@ export default {
const
feature
=
response
.
data
;
if
(
feature
)
{
const
currentFeature
=
[
feature
];
const
featureGroup
=
mapUtil
.
addFeatures
(
currentFeature
,{},
true
,
this
.
$store
.
state
.
feature_type
.
feature_types
);
const
featureGroup
=
mapUtil
.
addFeatures
(
currentFeature
,
{},
true
,
this
.
$store
.
state
.
feature_type
.
feature_types
);
mapUtil
.
getMap
()
.
fitBounds
(
featureGroup
.
getBounds
(),
{
padding
:
[
25
,
25
]
});
...
...
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