Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Leaderboard
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Bouquet
Leaderboard
Commits
a1712d93
You need to sign in or sign up before continuing.
Commit
a1712d93
authored
Feb 17, 2021
by
Thomas Bouquet
Browse files
Options
Downloads
Patches
Plain Diff
Tentative fix form
parent
e6a960ae
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_thomas/src/App.js
+1
-1
1 addition, 1 deletion
front_thomas/src/App.js
front_thomas/src/components/Login/KilometrageTest.js
+104
-0
104 additions, 0 deletions
front_thomas/src/components/Login/KilometrageTest.js
with
105 additions
and
1 deletion
front_thomas/src/App.js
+
1
−
1
View file @
a1712d93
...
@@ -7,7 +7,7 @@ import Classement from './components/Classement';
...
@@ -7,7 +7,7 @@ import Classement from './components/Classement';
import
HumaCS
from
'
./components/HumaCS
'
;
import
HumaCS
from
'
./components/HumaCS
'
;
import
Partenaires
from
"
./components/Partenaires
"
;
import
Partenaires
from
"
./components/Partenaires
"
;
import
Leaderboard
from
'
./components/LeaderboardSB
'
;
import
Leaderboard
from
'
./components/LeaderboardSB
'
;
import
Formulaire
from
"
./components/Login/Kilometrage
"
;
import
Formulaire
from
"
./components/Login/Kilometrage
Test
"
;
import
Gestion
from
"
./components/Login/Gestion
"
;
import
Gestion
from
"
./components/Login/Gestion
"
;
import
MonHumaviron
from
"
./components/Login/MonHumaviron
"
;
import
MonHumaviron
from
"
./components/Login/MonHumaviron
"
;
import
ReactiveNavbar
from
"
./components/ReactiveNavbar
"
;
import
ReactiveNavbar
from
"
./components/ReactiveNavbar
"
;
...
...
This diff is collapsed.
Click to expand it.
front_thomas/src/components/Login/KilometrageTest.js
0 → 100644
+
104
−
0
View file @
a1712d93
import
React
,{
useState
,
Component
}
from
"
react
"
;
import
{
MDBRow
,
MDBCol
,
MDBInput
,
MDBBtn
,
MDBCard
,
MDBCardBody
,
MDBModalFooter
,
MDBIcon
,
MDBContainer
}
from
'
mdbreact
'
;
import
SearchNom
from
"
./Autocomplete/Nom
"
;
import
SearchAsso
from
"
./Autocomplete/Association
"
;
import
axios
from
'
axios
'
;
class
Kilometrage
extends
Component
{
smallStyle
=
{
fontSize
:
'
0.8rem
'
};
nom
=
""
;
asso
=
""
;
dist
=
""
;
unlock
=
(
!
(
nom
==
""
))
&&
(
!
(
asso
==
""
))
&&
(
!
(
dist
==
""
));
addScore
=
()
=>
{
axios
.
post
(
'
/api/admin/new_score
'
,
{
score
:
this
.
dist
,
equipe
:
this
.
asso
,
participant
:
this
.
nom
})
.
then
(()
=>
{
alert
(
"
Score ajouté
"
);
window
.
location
=
'
/Gestion
'
;
},
(
error
)
=>
{
console
.
log
(
error
);
});
};
render
()
{
return
(
<>
<
MDBContainer
className
=
"
mt-4
"
>
<
MDBRow
>
<
MDBCol
xs
=
"
6
"
sm
=
"
6
"
md
=
"
6
"
lg
=
"
6
"
xl
=
"
6
"
className
=
"
mx-auto mt-3
"
>
<
MDBCard
>
<
MDBCardBody
className
=
"
mx-3
"
>
<
div
className
=
"
text-center
"
>
<
h3
className
=
"
dark-grey-text mb-5
"
><
strong
>
Entrer
un
kilométrage
<
/strong></
h3
>
<
/div
>
<
MDBRow
>
<
MDBCol
lg
=
"
1
"
middle
size
=
"
2
"
>
<
MDBIcon
icon
=
"
user-alt
"
className
=
"
mr-1
"
/>
<
/MDBCol
>
<
MDBCol
lg
=
"
11
"
size
=
"
10
"
>
<
SearchNom
handleChange
=
{(
e
)
=>
{
this
.
nom
=
e
}}
/
>
<
/MDBCol
>
<
/MDBRow
>
<
MDBRow
>
&
nbsp
;
<
/MDBRow
>
<
MDBRow
>
<
MDBCol
lg
=
"
1
"
middle
size
=
"
2
"
>
<
MDBIcon
icon
=
"
users
"
className
=
"
mr-1
"
/>
<
/MDBCol
>
<
MDBCol
lg
=
"
11
"
size
=
"
10
"
>
<
SearchAsso
handleChange
=
{(
e
)
=>
{
this
.
asso
=
e
}}
/
>
<
/MDBCol
>
<
/MDBRow
>
<
MDBRow
>
&
nbsp
;
<
/MDBRow
>
{
/*<SearchNom />
<SearchAsso />
<MDBInput label="Nom" icon="user" group type="text" validate error="wrong" success="right"/>
<MDBInput label="Association" icon="users" group type="text" validate containerClass="mb-0"/>
<MDBAutocomplete label="Your country" clear data={countries}/>*/
}
<
MDBRow
>
<
MDBCol
lg
=
"
1
"
middle
size
=
"
2
"
>
<
div
className
=
"
form-group
"
>
<
MDBIcon
icon
=
"
flag-checkered
"
className
=
"
mr-1
"
/>
<
/div
>
<
/MDBCol
>
<
MDBCol
lg
=
"
11
"
size
=
"
10
"
>
<
div
className
=
"
form-group
"
>
<
input
type
=
"
integer
"
className
=
"
form-control
"
id
=
"
formGroupExampleInput
"
placeholder
=
"
Distance parcourue (m)
"
onChange
=
{(
e
)
=>
{
this
.
dist
=
e
}}
/
>
<
/div
>
{
/*<MDBInput label="Distance parcourue" group type="integer" validate containerClass="mb-0" onChange={(e) => {setDist(e)}}/>*/
}
<
/MDBCol
>
<
/MDBRow
>
<
div
className
=
"
text-center pt-3 mb-3
"
>
<
MDBBtn
type
=
"
button
"
icon
=
"
send
"
gradient
=
"
blue
"
rounded
disabled
=
{
this
.
unlock
}
className
=
"
btn-block z-depth-1a
"
><
MDBIcon
icon
=
"
paper-plane
"
className
=
"
ml-1
"
onClick
=
{
addScore
()}
/> Envoyer</
MDBBtn
>
<
/div
>
<
/MDBCardBody
>
<
/MDBCard
>
<
/MDBCol
>
<
/MDBRow
>
<
MDBRow
>
<
br
/>
<
/MDBRow
>
<
/MDBContainer
>
<
/
>
);
}
}
export
default
Kilometrage
;
\ No newline at end of file
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