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
909de756
Commit
909de756
authored
3 years ago
by
Sébastien DA ROCHA
Browse files
Options
Downloads
Plain Diff
Merge branch 'redmine-issues/12028' into 'develop'
REDMINE_ISSUE-12028
See merge request
!108
parents
faaff510
5e76116b
No related branches found
No related tags found
1 merge request
!108
REDMINE_ISSUE-12028
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/store/modules/feature.js
+18
-0
18 additions, 0 deletions
src/store/modules/feature.js
src/views/feature/Feature_detail.vue
+30
-51
30 additions, 51 deletions
src/views/feature/Feature_detail.vue
src/views/feature/Feature_edit.vue
+1
-18
1 addition, 18 deletions
src/views/feature/Feature_edit.vue
with
49 additions
and
69 deletions
src/store/modules/feature.js
+
18
−
0
View file @
909de756
...
...
@@ -20,6 +20,24 @@ const feature = {
form
:
null
,
linkedFormset
:
[],
linked_features
:
[],
statusChoices
:
[
{
name
:
"
Brouillon
"
,
value
:
"
draft
"
,
},
{
name
:
"
Publié
"
,
value
:
"
published
"
,
},
{
name
:
"
Archivé
"
,
value
:
"
archived
"
,
},
{
name
:
"
En attente de publication
"
,
value
:
"
pending
"
,
},
],
},
mutations
:
{
SET_FEATURES
(
state
,
features
)
{
...
...
This diff is collapsed.
Click to expand it.
src/views/feature/Feature_detail.vue
+
30
−
51
View file @
909de756
...
...
@@ -72,17 +72,11 @@
<td>
<b>
<i
v-if=
"
field.field_type === 'boolean' && field.value === true
"
class=
"olive check icon"
></i>
<i
v-else-if=
"
field.field_type === 'boolean' &&
field.value === false
"
class=
"red times icon"
v-if=
"field.field_type === 'boolean'"
:class=
"[
'icon',
field.value ? 'olive check' : 'grey times',
]"
></i>
<span
v-else
>
{{
field
.
value
}}
...
...
@@ -98,11 +92,8 @@
<tr>
<td>
Statut
</td>
<td>
<i
v-if=
"feature.status"
:class=
"getIconLabelStatus(feature.status, 'icon')"
></i>
{{
getIconLabelStatus
(
feature
.
status
,
"
label
"
)
}}
<i
v-if=
"feature.status"
:class=
"['icon', statusIcon]"
></i>
{{
statusLabel
}}
</td>
</tr>
<tr>
...
...
@@ -144,20 +135,6 @@
<a
@
click=
"pushNgo(link)"
>
{{
link
.
feature_to
.
title
}}
</a>
(
{{
link
.
feature_to
.
display_creator
}}
-
{{
link
.
feature_to
.
created_on
}}
)
<!--
<router-link
:key=
"$route.fullPath"
:to=
"
{
name: 'details-signalement',
params: {
slug_type_signal: link.feature_to.feature_type_slug,
slug_signal: link.feature_to.feature_id,
},
}"
>
{{
link
.
feature_to
.
title
}}
</router-link
>
(
{{
link
.
feature_to
.
display_creator
}}
-
{{
link
.
feature_to
.
created_on
}}
)
-->
</td>
</tr>
</tbody>
...
...
@@ -414,7 +391,7 @@ export default {
computed
:
{
...
mapState
([
"
user
"
]),
...
mapGetters
([
"
permissions
"
]),
...
mapState
(
"
feature
"
,
[
"
linked_features
"
]),
...
mapState
(
"
feature
"
,
[
"
linked_features
"
,
"
statusChoices
"
]),
DJANGO_BASE_URL
:
function
()
{
return
this
.
$store
.
state
.
configuration
.
VUE_APP_DJANGO_BASE
;
},
...
...
@@ -432,6 +409,28 @@ export default {
}
return
false
;
},
statusIcon
()
{
switch
(
this
.
feature
.
status
)
{
case
"
archived
"
:
return
"
grey archive
"
;
case
"
pending
"
:
return
"
teal hourglass outline
"
;
case
"
published
"
:
return
"
olive check
"
;
case
"
draft
"
:
return
"
orange pencil alternate
"
;
default
:
return
""
;
}
},
statusLabel
()
{
const
status
=
this
.
statusChoices
.
find
(
(
el
)
=>
el
.
value
===
this
.
feature
.
status
);
return
status
?
status
.
name
:
""
;
},
},
filters
:
{
...
...
@@ -443,20 +442,6 @@ export default {
},
methods
:
{
getIconLabelStatus
(
status
,
type
)
{
if
(
status
===
"
archived
"
)
if
(
type
==
"
icon
"
)
return
"
grey archive icon
"
;
else
return
"
Archivé
"
;
else
if
(
status
===
"
pending
"
)
if
(
type
==
"
icon
"
)
return
"
teal hourglass outline icon
"
;
else
return
"
En attente de publication
"
;
else
if
(
status
===
"
published
"
)
if
(
type
==
"
icon
"
)
return
"
olive check icon
"
;
else
return
"
Publié
"
;
else
if
(
status
===
"
draft
"
)
if
(
type
==
"
icon
"
)
return
"
orange pencil alternate icon
"
;
else
return
"
Brouillon
"
;
},
pushNgo
(
link
)
{
this
.
$router
.
push
({
name
:
"
details-signalement
"
,
...
...
@@ -469,8 +454,6 @@ export default {
this
.
getFeatureAttachments
();
this
.
getLinkedFeatures
();
this
.
addFeatureToMap
();
//this.initMap();
//this.$router.go();
},
postComment
()
{
...
...
@@ -490,7 +473,6 @@ export default {
})
.
then
(()
=>
{
this
.
confirmComment
();
//this.getFeatureAttachments(); //* display new attachment from comment on the page
});
}
else
{
this
.
confirmComment
();
...
...
@@ -670,9 +652,6 @@ export default {
},
created
()
{
// if (!this.project) {
// this.$store.dispatch("GET_PROJECT_INFO", this.$route.params.slug);
// }
this
.
$store
.
commit
(
"
feature_type/SET_CURRENT_FEATURE_TYPE_SLUG
"
,
this
.
$route
.
params
.
slug_type_signal
...
...
This diff is collapsed.
Click to expand it.
src/views/feature/Feature_edit.vue
+
1
−
18
View file @
909de756
...
...
@@ -304,24 +304,6 @@ export default {
erreurUploadMessage
:
null
,
attachmentDataKey
:
0
,
linkedDataKey
:
0
,
statusChoices
:
[
{
name
:
"
Brouillon
"
,
value
:
"
draft
"
,
},
{
name
:
"
Publié
"
,
value
:
"
published
"
,
},
{
name
:
"
Archivé
"
,
value
:
"
archived
"
,
},
{
name
:
"
En attente de publication
"
,
value
:
"
pending
"
,
},
],
form
:
{
title
:
{
errors
:
[],
...
...
@@ -371,6 +353,7 @@ export default {
"
features
"
,
"
extra_form
"
,
"
linked_features
"
,
"
statusChoices
"
]),
field_title
()
{
...
...
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