Verified Commit d393155c authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix pizzas ordering with new payment api

parent 66c33099
...@@ -64,6 +64,7 @@ Object { ...@@ -64,6 +64,7 @@ Object {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
......
...@@ -198,7 +198,7 @@ describe('pizza saga', () => { ...@@ -198,7 +198,7 @@ describe('pizza saga', () => {
Authorization: 'Token token', Authorization: 'Token token',
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}, },
method: 'PUT', method: 'PATCH',
body: '{"product":1}', body: '{"product":1}',
}); });
})); }));
......
...@@ -118,6 +118,7 @@ I18n { ...@@ -118,6 +118,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -325,6 +326,7 @@ I18n { ...@@ -325,6 +326,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -535,6 +537,7 @@ I18n { ...@@ -535,6 +537,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -732,6 +735,7 @@ I18n { ...@@ -732,6 +735,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -939,6 +943,7 @@ I18n { ...@@ -939,6 +943,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -1141,6 +1146,7 @@ I18n { ...@@ -1141,6 +1146,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -1308,6 +1314,7 @@ I18n { ...@@ -1308,6 +1314,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -1508,6 +1515,7 @@ I18n { ...@@ -1508,6 +1515,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -1709,6 +1717,7 @@ I18n { ...@@ -1709,6 +1717,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -1929,6 +1938,7 @@ I18n { ...@@ -1929,6 +1938,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -2126,6 +2136,7 @@ I18n { ...@@ -2126,6 +2136,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -2332,6 +2343,7 @@ I18n { ...@@ -2332,6 +2343,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -2541,6 +2553,7 @@ I18n { ...@@ -2541,6 +2553,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -2738,6 +2751,7 @@ I18n { ...@@ -2738,6 +2751,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -2945,6 +2959,7 @@ I18n { ...@@ -2945,6 +2959,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -4049,6 +4064,7 @@ I18n { ...@@ -4049,6 +4064,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -4204,6 +4220,7 @@ I18n { ...@@ -4204,6 +4220,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -4402,6 +4419,7 @@ I18n { ...@@ -4402,6 +4419,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -4599,6 +4617,7 @@ I18n { ...@@ -4599,6 +4617,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -4806,6 +4825,7 @@ I18n { ...@@ -4806,6 +4825,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -5008,6 +5028,7 @@ I18n { ...@@ -5008,6 +5028,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -5175,6 +5196,7 @@ I18n { ...@@ -5175,6 +5196,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -5375,6 +5397,7 @@ I18n { ...@@ -5375,6 +5397,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -5576,6 +5599,7 @@ I18n { ...@@ -5576,6 +5599,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -5791,6 +5815,7 @@ I18n { ...@@ -5791,6 +5815,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -5988,6 +6013,7 @@ I18n { ...@@ -5988,6 +6013,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -6195,6 +6221,7 @@ I18n { ...@@ -6195,6 +6221,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -6397,6 +6424,7 @@ I18n { ...@@ -6397,6 +6424,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -6604,6 +6632,7 @@ I18n { ...@@ -6604,6 +6632,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -6801,6 +6830,7 @@ I18n { ...@@ -6801,6 +6830,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -7008,6 +7038,7 @@ I18n { ...@@ -7008,6 +7038,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
...@@ -8112,6 +8143,7 @@ I18n { ...@@ -8112,6 +8143,7 @@ I18n {
"No": "Nee", "No": "Nee",
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Number of registrations": "Aantal aanmeldingen", "Number of registrations": "Aantal aanmeldingen",
"Order": "Bestel",
"Price": "Prijs", "Price": "Prijs",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Queue position {{pos}}": "Wachtlijst positie {{pos}}", "Queue position {{pos}}": "Wachtlijst positie {{pos}}",
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"No": "Nee", "No": "Nee",
"Yes": "Ja", "Yes": "Ja",
"From": "Van", "From": "Van",
"Order": "Bestel",
"Until": "Tot", "Until": "Tot",
"Location": "Locatie", "Location": "Locatie",
"Price": "Prijs", "Price": "Prijs",
......
...@@ -7,6 +7,12 @@ import { apiRequest } from '../utils/url'; ...@@ -7,6 +7,12 @@ import { apiRequest } from '../utils/url';
import * as pizzaActions from '../actions/pizza'; import * as pizzaActions from '../actions/pizza';
import { tokenSelector } from '../selectors/session'; import { tokenSelector } from '../selectors/session';
export const Payment = {
NONE: 'no_payment',
CARD: 'card_payment',
CASH: 'cash_payment',
};
const NOT_FOUND = 404; const NOT_FOUND = 404;
const retrievePizzaInfo = function* retrievePizzaInfo() { const retrievePizzaInfo = function* retrievePizzaInfo() {
...@@ -71,7 +77,7 @@ const order = function* order(action) { ...@@ -71,7 +77,7 @@ const order = function* order(action) {
const { pk, hasOrder } = action.payload; const { pk, hasOrder } = action.payload;
const token = yield select(tokenSelector); const token = yield select(tokenSelector);
const data = { const data = {
method: hasOrder ? 'PUT' : 'POST', method: hasOrder ? 'PATCH' : 'POST',
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
'Content-Type': 'application/json', 'Content-Type': 'application/json',
......
...@@ -94,7 +94,6 @@ class EventAdminScreen extends Component { ...@@ -94,7 +94,6 @@ class EventAdminScreen extends Component {
containsSearchKey = (pk) => { containsSearchKey = (pk) => {
const name = this.cleanSearchTerm(this.state.registrations[pk].name); const name = this.cleanSearchTerm(this.state.registrations[pk].name);
console.log('name', name);
return name.indexOf(this.cleanSearchTerm(this.state.searchKey)) >= 0; return name.indexOf(this.cleanSearchTerm(this.state.searchKey)) >= 0;
}; };
......
...@@ -210,7 +210,7 @@ registration and pay the full costs of €{{ fine }}? You will not be able to un ...@@ -210,7 +210,7 @@ registration and pay the full costs of €{{ fine }}? You will not be able to un
</Text> </Text>
<Button <Button
color={Colors.magenta} color={Colors.magenta}
title="Bestel" title={t('Order')}
onPress={this.props.retrievePizzaInfo} onPress={this.props.retrievePizzaInfo}
/> />
</View>, </View>,
......
...@@ -73,6 +73,9 @@ class PizzaScreen extends Component { ...@@ -73,6 +73,9 @@ class PizzaScreen extends Component {
if (order) { if (order) {
const productInfo = this.getProductFromList(order.product, pizzaList); const productInfo = this.getProductFromList(order.product, pizzaList);
if (!productInfo) {
return null;
}
return ( return (
<CardSection sectionHeader={t('Current order')}> <CardSection sectionHeader={t('Current order')}>
...@@ -255,6 +258,7 @@ PizzaScreen.propTypes = { ...@@ -255,6 +258,7 @@ PizzaScreen.propTypes = {
order: PropTypes.shape({ order: PropTypes.shape({
pk: PropTypes.number.isRequired, pk: PropTypes.number.isRequired,
paid: PropTypes.bool.isRequired, paid: PropTypes.bool.isRequired,
payment: PropTypes.string.isRequired,
product: PropTypes.number.isRequired, product: PropTypes.number.isRequired,
name: PropTypes.string, name: PropTypes.string,
member: PropTypes.number, member: PropTypes.number,
......
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import * as pizzaActions from '../../../actions/pizza'; import * as pizzaActions from '../../../actions/pizza';
import { Payment } from '../../../sagas/pizza';
import PizzaScreen from './PizzaScreen'; import PizzaScreen from './PizzaScreen';
const mapStateToProps = state => ({ const mapStateToProps = state => ({
...@@ -7,7 +8,11 @@ const mapStateToProps = state => ({ ...@@ -7,7 +8,11 @@ const mapStateToProps = state => ({
loading: state.pizza.loading, loading: state.pizza.loading,
hasLoaded: state.pizza.hasLoaded, hasLoaded: state.pizza.hasLoaded,
event: state.pizza.event, 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, pizzaList: state.pizza.pizzaList,
}); });
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>17</string> <string>18</string>
<key>LSApplicationQueriesSchemes</key> <key>LSApplicationQueriesSchemes</key>
<array> <array>
<string>whatsapp</string> <string>whatsapp</string>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</dict> </dict>
</dict> </dict>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string/> <string></string>
<key>UIAppFonts</key> <key>UIAppFonts</key>
<array> <array>
<string>AntDesign.ttf</string> <string>AntDesign.ttf</string>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment