Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
API Toucan
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Damien Armillon
API Toucan
Commits
bd50e6f8
Commit
bd50e6f8
authored
6 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
Le modal de suppression existe
parent
38adb6a6
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
front/src/ModalSuppression.js
+24
-0
24 additions, 0 deletions
front/src/ModalSuppression.js
front/src/ToucanLine.js
+19
-3
19 additions, 3 deletions
front/src/ToucanLine.js
with
43 additions
and
3 deletions
front/src/ModalSuppression.js
0 → 100644
+
24
−
0
View file @
bd50e6f8
import
React
,
{
Component
}
from
'
react
'
import
{
Modal
,
Button
,
Image
,
Grid
}
from
'
semantic-ui-react
'
class
ModalSupression
extends
Component
{
state
=
{
hihi
:
true
};
render
()
{
return
(
<
Modal
open
=
{
this
.
props
.
open
}
size
=
"
tiny
"
onClose
=
{()
=>
this
.
props
.
closeModal
()}
>
<
Modal
.
Header
style
=
{{
textAlign
:
"
center
"
}}
>
Veux
tu
vraiment
supprimer
ce
Toucan
?
<
/Modal.Header
>
<
Modal
.
Content
>
<
Image
centered
src
=
{
`/toucan/img/
${
this
.
props
.
imageId
}
`
}
size
=
"
medium
"
/>
<
/Modal.Content
>
<
Modal
.
Actions
style
=
{{
textAlign
:
"
center
"
}}
>
<
Button
negative
>
Supprimer
le
Toucan
<
/Button
>
<
Button
positive
>
Laisser
le
Toucan
là
où
il
est
<
/Button
>
<
/Modal.Actions
>
<
/Modal
>
)
}
}
export
default
ModalSupression
\ No newline at end of file
This diff is collapsed.
Click to expand it.
front/src/ToucanLine.js
+
19
−
3
View file @
bd50e6f8
import
React
,
{
Component
}
from
'
react
'
import
React
,
{
Component
}
from
'
react
'
import
{
Table
,
Image
,
Button
}
from
'
semantic-ui-react
'
import
{
Table
,
Image
,
Button
,
Modal
}
from
'
semantic-ui-react
'
import
ModalSuppression
from
'
./ModalSuppression
'
class
ToucanLine
extends
Component
{
class
ToucanLine
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
isModalOpen
:
false
}
this
.
closeModal
=
this
.
closeModal
.
bind
(
this
)
}
date
(
time
){
date
(
time
){
const
dateObject
=
new
Date
(
time
)
const
dateObject
=
new
Date
(
time
)
const
year
=
dateObject
.
getFullYear
();
const
year
=
dateObject
.
getFullYear
();
...
@@ -10,11 +18,14 @@ class ToucanLine extends Component {
...
@@ -10,11 +18,14 @@ class ToucanLine extends Component {
return
(
`
${
day
+
1
}
/
${
month
+
1
}
/
${
year
}
`
)
return
(
`
${
day
+
1
}
/
${
month
+
1
}
/
${
year
}
`
)
}
}
closeModal
()
{
this
.
setState
({
isModalOpen
:
false
})
}
render
(){
render
(){
return
(
return
(
<
Table
.
Row
>
<
Table
.
Row
>
<
Table
.
Cell
>
<
Table
.
Cell
>
{
console
.
log
(
this
.
props
.
toucan
[
"
_id
"
])}
<
a
href
=
{
`http://localhost:8000/toucan/pdf/
${
this
.
props
.
toucan
[
"
_id
"
]}
`
}
>
<
a
href
=
{
`http://localhost:8000/toucan/pdf/
${
this
.
props
.
toucan
[
"
_id
"
]}
`
}
>
<
Image
<
Image
src
=
{
`/toucan/img/
${
this
.
props
.
toucan
[
"
_id
"
]}
`
}
src
=
{
`/toucan/img/
${
this
.
props
.
toucan
[
"
_id
"
]}
`
}
...
@@ -29,7 +40,12 @@ class ToucanLine extends Component {
...
@@ -29,7 +40,12 @@ class ToucanLine extends Component {
{
this
.
date
(
this
.
props
.
toucan
.
date
)}
{
this
.
date
(
this
.
props
.
toucan
.
date
)}
<
/Table.Cell
>
<
/Table.Cell
>
<
Table
.
Cell
style
=
{{
width
:
"
fit-content
"
}}
>
<
Table
.
Cell
style
=
{{
width
:
"
fit-content
"
}}
>
<
Button
negative
icon
=
"
cancel
"
/>
<
Button
negative
icon
=
"
cancel
"
onClick
=
{()
=>
this
.
setState
({
isModalOpen
:
true
})}
/
>
<
ModalSuppression
open
=
{
this
.
state
.
isModalOpen
}
imageId
=
{
this
.
props
.
toucan
[
"
_id
"
]}
closeModal
=
{
this
.
closeModal
}
/
>
<
/Table.Cell
>
<
/Table.Cell
>
<
/Table.Row
>
<
/Table.Row
>
)
)
...
...
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