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
d393155c
Verified
Commit
d393155c
authored
May 30, 2019
by
Sébastiaan Versteeg
Browse files
Fix pizzas ordering with new payment api
parent
66c33099
Changes
10
Hide whitespace changes
Inline
Side-by-side
__tests__/assets/locales/__snapshots__/index.js.spec.js.snap
View file @
d393155c
...
...
@@ -64,6 +64,7 @@ Object {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
__tests__/sagas/pizza.spec.js
View file @
d393155c
...
...
@@ -198,7 +198,7 @@ describe('pizza saga', () => {
Authorization
:
'
Token token
'
,
'
Content-Type
'
:
'
application/json
'
,
},
method
:
'
P
UT
'
,
method
:
'
P
ATCH
'
,
body
:
'
{"product":1}
'
,
});
}));
...
...
__tests__/utils/__snapshots__/i18n.spec.js.snap
View file @
d393155c
...
...
@@ -118,6 +118,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -325,6 +326,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -535,6 +537,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -732,6 +735,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -939,6 +943,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -1141,6 +1146,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -1308,6 +1314,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -1508,6 +1515,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -1709,6 +1717,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -1929,6 +1938,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -2126,6 +2136,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -2332,6 +2343,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -2541,6 +2553,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -2738,6 +2751,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -2945,6 +2959,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -4049,6 +4064,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -4204,6 +4220,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -4402,6 +4419,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -4599,6 +4617,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -4806,6 +4825,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -5008,6 +5028,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -5175,6 +5196,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -5375,6 +5397,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -5576,6 +5599,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -5791,6 +5815,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -5988,6 +6013,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -6195,6 +6221,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -6397,6 +6424,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -6604,6 +6632,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -6801,6 +6830,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -7008,6 +7038,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
@@ -8112,6 +8143,7 @@ I18n {
"No": "Nee",
"No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...
...
app/assets/locales/nl/app/ui/screens/events/EventScreen.json
View file @
d393155c
...
...
@@ -4,6 +4,7 @@
"No"
:
"Nee"
,
"Yes"
:
"Ja"
,
"From"
:
"Van"
,
"Order"
:
"Bestel"
,
"Until"
:
"Tot"
,
"Location"
:
"Locatie"
,
"Price"
:
"Prijs"
,
...
...
app/sagas/pizza.js
View file @
d393155c
...
...
@@ -7,6 +7,12 @@ import { apiRequest } from '../utils/url';
import
*
as
pizzaActions
from
'
../actions/pizza
'
;
import
{
tokenSelector
}
from
'
../selectors/session
'
;
export
const
Payment
=
{
NONE
:
'
no_payment
'
,
CARD
:
'
card_payment
'
,
CASH
:
'
cash_payment
'
,
};
const
NOT_FOUND
=
404
;
const
retrievePizzaInfo
=
function
*
retrievePizzaInfo
()
{
...
...
@@ -71,7 +77,7 @@ const order = function* order(action) {
const
{
pk
,
hasOrder
}
=
action
.
payload
;
const
token
=
yield
select
(
tokenSelector
);
const
data
=
{
method
:
hasOrder
?
'
P
UT
'
:
'
POST
'
,
method
:
hasOrder
?
'
P
ATCH
'
:
'
POST
'
,
headers
:
{
Accept
:
'
application/json
'
,
'
Content-Type
'
:
'
application/json
'
,
...
...
app/ui/screens/events/EventAdminScreen.js
View file @
d393155c
...
...
@@ -94,7 +94,6 @@ class EventAdminScreen extends Component {
containsSearchKey
=
(
pk
)
=>
{
const
name
=
this
.
cleanSearchTerm
(
this
.
state
.
registrations
[
pk
].
name
);
console
.
log
(
'
name
'
,
name
);
return
name
.
indexOf
(
this
.
cleanSearchTerm
(
this
.
state
.
searchKey
))
>=
0
;
};
...
...
app/ui/screens/events/EventScreen.js
View file @
d393155c
...
...
@@ -210,7 +210,7 @@ registration and pay the full costs of €{{ fine }}? You will not be able to un
<
/Text
>
<
Button
color
=
{
Colors
.
magenta
}
title
=
"
Bestel
"
title
=
{
t
(
'
Order
'
)}
onPress
=
{
this
.
props
.
retrievePizzaInfo
}
/
>
<
/View>
,
...
...
app/ui/screens/pizza/PizzaScreen.js
View file @
d393155c
...
...
@@ -73,6 +73,9 @@ class PizzaScreen extends Component {
if
(
order
)
{
const
productInfo
=
this
.
getProductFromList
(
order
.
product
,
pizzaList
);
if
(
!
productInfo
)
{
return
null
;
}
return
(
<
CardSection
sectionHeader
=
{
t
(
'
Current order
'
)}
>
...
...
@@ -255,6 +258,7 @@ PizzaScreen.propTypes = {
order
:
PropTypes
.
shape
({
pk
:
PropTypes
.
number
.
isRequired
,
paid
:
PropTypes
.
bool
.
isRequired
,
payment
:
PropTypes
.
string
.
isRequired
,
product
:
PropTypes
.
number
.
isRequired
,
name
:
PropTypes
.
string
,
member
:
PropTypes
.
number
,
...
...
app/ui/screens/pizza/PizzaScreenConnector.js
View file @
d393155c
import
{
connect
}
from
'
react-redux
'
;
import
*
as
pizzaActions
from
'
../../../actions/pizza
'
;
import
{
Payment
}
from
'
../../../sagas/pizza
'
;
import
PizzaScreen
from
'
./PizzaScreen
'
;
const
mapStateToProps
=
state
=>
({
...
...
@@ -7,7 +8,11 @@ const mapStateToProps = state => ({
loading
:
state
.
pizza
.
loading
,
hasLoaded
:
state
.
pizza
.
hasLoaded
,
event
:
state
.
pizza
.
event
,
order
:
state
.
pizza
.
order
,
order
:
state
.
pizza
.
order
&&
{
...
state
.
pizza
.
order
,
paid
:
state
.
pizza
.
order
.
paid
!==
undefined
?
state
.
pizza
.
order
.
paid
:
state
.
pizza
.
order
.
payment
!==
Payment
.
NONE
,
},
pizzaList
:
state
.
pizza
.
pizzaList
,
});
...
...
ios/ThaliApp/Info.plist
View file @
d393155c
...
...
@@ -21,7 +21,7 @@
<key>
CFBundleSignature
</key>
<string>
????
</string>
<key>
CFBundleVersion
</key>
<string>
1
7
</string>
<string>
1
8
</string>
<key>
LSApplicationQueriesSchemes
</key>
<array>
<string>
whatsapp
</string>
...
...
@@ -41,7 +41,7 @@
</dict>
</dict>
<key>
NSLocationWhenInUseUsageDescription
</key>
<string
/
>
<string
></string
>
<key>
UIAppFonts
</key>
<array>
<string>
AntDesign.ttf
</string>
...
...
Write
Preview
Markdown
is supported
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