Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
ThaliApp
Commits
e0490a19
Commit
e0490a19
authored
Dec 14, 2017
by
Sébastiaan Versteeg
Browse files
Add fine confirmation message
parent
eff5b066
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/components/Event.js
View file @
e0490a19
...
...
@@ -15,14 +15,22 @@ import * as eventActions from '../actions/event';
import
*
as
registrationActions
from
'
../actions/registration
'
;
class
Event
extends
Component
{
cancelPrompt
=
pk
=>
Alert
.
alert
(
'
Cancel registration?
'
,
'
Are you sure you want to cancel your registration?
'
,
[
{
text
:
'
Dismiss
'
},
{
text
:
'
Cancel registration
'
,
onPress
:
()
=>
this
.
props
.
cancel
(
pk
)
},
],
);
cancelPrompt
=
(
pk
)
=>
{
const
cancelDeadlineDate
=
new
Date
(
this
.
props
.
data
.
cancel_deadline
);
let
message
=
'
Are you sure you want to cancel your registration?
'
;
if
(
this
.
props
.
data
.
cancel_deadline
!==
null
&&
cancelDeadlineDate
<=
new
Date
())
{
message
=
'
The deadline has passed, are you sure you want to cancel your registration and
'
+
` pay the full costs of €
${
this
.
props
.
data
.
fine
}
? You will not be able to undo this!`
;
}
return
Alert
.
alert
(
'
Cancel registration?
'
,
message
,
[
{
text
:
'
Dismiss
'
},
{
text
:
'
Cancel registration
'
,
onPress
:
()
=>
this
.
props
.
cancel
(
pk
)
},
],
);
};
eventDesc
=
(
data
)
=>
{
const
startDate
=
Moment
(
data
.
start
).
format
(
'
D MMM YYYY, HH:mm
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment