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
40eee2a0
Commit
40eee2a0
authored
3 years ago
by
Timothee P
Browse files
Options
Downloads
Patches
Plain Diff
improve feature_type_detail
parent
52f291a8
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/components/ImportTask.vue
+100
-58
100 additions, 58 deletions
src/components/ImportTask.vue
src/views/feature_type/Feature_type_detail.vue
+5
-6
5 additions, 6 deletions
src/views/feature_type/Feature_type_detail.vue
with
105 additions
and
64 deletions
src/components/ImportTask.vue
+
100
−
58
View file @
40eee2a0
<
template
>
<div
id=
"table-imports"
>
<table
class=
"ui collapsing celled table"
>
<thead>
<tr>
<th>
Fichiers importés
</th>
<th>
Status
</th>
</tr>
</thead>
<tbody>
<tr
:key=
"importFile.created_on"
v-for=
"importFile in data"
>
<td>
<h4
class=
"ui header"
>
<div
:data-tooltip=
"dataTooltipMsg(importFile.geojson_file_name)"
>
{{
importFile
.
geojson_file_name
|
subString
}}
<div
class=
"sub header"
>
ajouté le
{{
importFile
.
created_on
|
setDate
}}
</div>
</div>
</h4>
</td>
<thead>
<tr>
<th>
Fichiers importés
</th>
<th>
Status
</th>
</tr>
</thead>
<tbody>
<tr
:key=
"importFile.created_on"
v-for=
"importFile in data"
>
<td>
<h4
class=
"ui header"
>
<div
:data-tooltip=
"importFile.geojson_file_name"
>
{{
importFile
.
geojson_file_name
|
subString
}}
<div
class=
"sub header"
>
ajouté le
{{
importFile
.
created_on
|
setDate
}}
</div>
</div>
</h4>
</td>
<td>
<span
v-if=
"importFile.infos"
:data-tooltip=
"dataTooltipMsg(importFile.infos)"
class=
"ui icon"
>
<i
v-if=
"importFile.status == 'processing'"
class=
"orange hourglass half icon"
></i>
<i
v-else-if=
"importFile.status == 'finished'"
class=
"green check circle outline icon"
></i>
<i
v-else-if=
"importFile.status == 'failed'"
class=
"red x icon"
></i>
<i
v-else
class=
"red ban icon"
></i>
</span>
<span
v-if=
"importFile.status == 'pending'"
data-tooltip=
"Statut en attente. Clickez pour rafraichir."
>
<i
class=
"orange sync icon"
v-on:click=
"reloadPage()"
<td>
<span
v-if=
"importFile.infos"
:data-tooltip=
"dataTooltipMsg(importFile.infos)"
class=
"ui icon"
>
<i
v-if=
"importFile.status == 'processing'"
class=
"orange hourglass half icon"
></i>
<i
v-else-if=
"importFile.status == 'finished'"
class=
"green check circle outline icon"
></i>
<i
v-else-if=
"importFile.status == 'failed'"
class=
"red x icon"
></i>
<i
v-else
class=
"red ban icon"
></i>
</span>
<span
v-if=
"importFile.status == 'pending'"
data-tooltip=
"Statut en attente. Clickez pour rafraichir."
>
<i
v-on:click=
"fetchImports()"
:class=
"['orange icon', ready ? 'sync' : 'hourglass half']"
/>
</span>
</span>
</td>
</tr>
</tbody>
</tr>
</tbody>
</table>
</div>
</
template
>
<
script
>
export
default
{
data
:
function
()
{
data
()
{
return
{
open
:
false
,
}
},
props
:
[
'
data
'
],
filters
:{
setDate
:
function
(
value
){
ready
:
true
,
};
},
props
:
[
"
data
"
],
filters
:
{
setDate
:
function
(
value
)
{
let
date
=
new
Date
(
value
);
let
d
=
date
.
toLocaleDateString
(
'
fr
'
,
{
year
:
'
numeric
'
,
month
:
'
long
'
,
day
:
'
numeric
'
,
let
d
=
date
.
toLocaleDateString
(
"
fr
"
,
{
year
:
"
numeric
"
,
month
:
"
long
"
,
day
:
"
numeric
"
,
});
return
d
return
d
;
},
subString
:
function
(
value
)
{
return
value
.
substring
(
0
,
27
)
+
"
..
"
;
},
subString
:
function
(
value
){
return
value
.
substring
(
0
,
27
)
+
"
..
"
}
},
methods
:{
dataTooltipMsg
(
msg
){
return
msg
;
watch
:
{
data
(
newValue
)
{
if
(
newValue
)
{
this
.
ready
=
true
;
}
},
reloadPage
()
{
this
.
$router
.
go
()
},
methods
:
{
fetchImports
()
{
this
.
$store
.
dispatch
(
"
feature_type/GET_IMPORTS
"
,
this
.
$route
.
params
.
feature_type_slug
);
//* show that the action was triggered, could be improved with animation (doesn't work)
this
.
ready
=
false
;
},
},
}
}
;
</
script
>
<
style
scoped
>
...
...
@@ -79,13 +109,25 @@ export default {
cursor
:
pointer
;
}
#table-imports
{
padding-top
:
1em
#table-imports
{
padding-top
:
1em
;
}
/*
td{
text-overflow: ellipsis;
} */
@keyframes
rotateIn
{
from
{
transform
:
rotate3d
(
0
,
0
,
1
,
-200deg
);
opacity
:
0
;
}
to
{
transform
:
translate3d
(
0
,
0
,
0
);
opacity
:
1
;
}
}
.rotateIn
{
animation-name
:
rotateIn
;
transform-origin
:
center
;
animation
:
2s
;
}
</
style
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/views/feature_type/Feature_type_detail.vue
+
5
−
6
View file @
40eee2a0
...
...
@@ -58,12 +58,12 @@
<div
class=
"ui styled accordion"
>
<div
@
click=
"showImport = !showImport"
:class=
"['title',
{ active: showImport }]"
:class=
"['title',
{ active:
!
showImport }]"
>
<i
class=
"dropdown icon"
></i>
Importer des signalements
</div>
<div
:class=
"['content',
{ active: showImport }]">
<div
:class=
"['content',
{ active:
!
showImport }]">
<div
id=
"form-import-features"
class=
"ui form"
>
<div
class=
"field"
>
<label
class=
"ui icon button"
for=
"json_file"
>
...
...
@@ -93,13 +93,13 @@
</div>
</div>
<div
@
click=
"show
Ex
port = !show
Ex
port"
:class=
"['title',
{ active: show
Ex
port }]"
@
click=
"show
Im
port = !show
Im
port"
:class=
"['title',
{ active: show
Im
port }]"
>
<i
class=
"dropdown icon"
></i>
Exporter les signalements
</div>
<div
:class=
"['content',
{ active: show
Ex
port }]">
<div
:class=
"['content',
{ active: show
Im
port }]">
<p>
Vous pouvez télécharger l'ensemble des signalements ayant le
statut publiés pour ce type.
...
...
@@ -206,7 +206,6 @@ export default {
size
:
0
,
},
showImport
:
false
,
showExport
:
true
,
};
},
...
...
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