mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-22 11:52:21 +01:00
Merge branch 'pre_inscription' into staging
This commit is contained in:
commit
7340758f13
@ -1,6 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { react2angular } from 'react2angular';
|
import { react2angular } from 'react2angular';
|
||||||
|
import _ from 'lodash';
|
||||||
import { Reservation } from '../../models/reservation';
|
import { Reservation } from '../../models/reservation';
|
||||||
import FormatLib from '../../lib/format';
|
import FormatLib from '../../lib/format';
|
||||||
import { IApplication } from '../../models/application';
|
import { IApplication } from '../../models/application';
|
||||||
@ -44,14 +45,20 @@ export const EventReservationItem: React.FC<EventReservationItemProps> = ({ rese
|
|||||||
* Return the pre-registration status
|
* Return the pre-registration status
|
||||||
*/
|
*/
|
||||||
const preRegistrationStatus = () => {
|
const preRegistrationStatus = () => {
|
||||||
if (!reservation.is_valid && !reservation.canceled_at && !reservation.is_paid) {
|
if (!_.isBoolean(reservation.is_valid) && !reservation.canceled_at && !reservation.is_paid) {
|
||||||
return t('app.logged.event_reservation_item.in_the_process_of_validation');
|
return t('app.logged.event_reservation_item.in_the_process_of_validation');
|
||||||
} else if (reservation.is_valid && !reservation.canceled_at && !reservation.is_paid) {
|
} else if (reservation.is_valid && !reservation.canceled_at && !reservation.is_paid && reservation.reservable.amount !== 0) {
|
||||||
return t('app.logged.event_reservation_item.settle_your_payment');
|
return t('app.logged.event_reservation_item.settle_your_payment');
|
||||||
} else if (reservation.is_paid && !reservation.canceled_at) {
|
} else if (reservation.is_valid && !reservation.canceled_at && !reservation.is_paid && reservation.reservable.amount === 0) {
|
||||||
|
return t('app.logged.event_reservation_item.registered');
|
||||||
|
} else if (!reservation.is_valid && !reservation.canceled_at) {
|
||||||
|
return t('app.logged.event_reservation_item.not_validated');
|
||||||
|
} else if (reservation.is_paid && !reservation.canceled_at && reservation.reservable.amount !== 0) {
|
||||||
return t('app.logged.event_reservation_item.paid');
|
return t('app.logged.event_reservation_item.paid');
|
||||||
|
} else if (reservation.is_paid && !reservation.canceled_at && reservation.reservable.amount === 0) {
|
||||||
|
return t('app.logged.event_reservation_item.present');
|
||||||
} else if (reservation.canceled_at) {
|
} else if (reservation.canceled_at) {
|
||||||
return t('app.logged.event_reservation_item.paid');
|
return t('app.logged.event_reservation_item.canceled');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,7 +27,8 @@ export interface Reservation {
|
|||||||
slots_reservations_attributes: Array<SlotsReservation>,
|
slots_reservations_attributes: Array<SlotsReservation>,
|
||||||
reservable?: {
|
reservable?: {
|
||||||
id: number,
|
id: number,
|
||||||
name: string
|
name: string,
|
||||||
|
amount?: number
|
||||||
},
|
},
|
||||||
nb_reserve_places?: number,
|
nb_reserve_places?: number,
|
||||||
tickets_attributes?: Array<{
|
tickets_attributes?: Array<{
|
||||||
|
@ -49,6 +49,9 @@ en:
|
|||||||
settle_your_payment: "Come to the reception desk to settle"
|
settle_your_payment: "Come to the reception desk to settle"
|
||||||
paid: "Paid"
|
paid: "Paid"
|
||||||
canceled: "Canceled"
|
canceled: "Canceled"
|
||||||
|
registered: "Registered"
|
||||||
|
not_validated: "Not validated"
|
||||||
|
present: "Present"
|
||||||
dashboard:
|
dashboard:
|
||||||
#dashboard: public profile
|
#dashboard: public profile
|
||||||
profile:
|
profile:
|
||||||
|
@ -49,6 +49,9 @@ fr:
|
|||||||
settle_your_payment: "Venez régler à l'accueil"
|
settle_your_payment: "Venez régler à l'accueil"
|
||||||
paid: "Payé"
|
paid: "Payé"
|
||||||
canceled: "Annulé"
|
canceled: "Annulé"
|
||||||
|
registered: "Inscrit"
|
||||||
|
not_validated: "Non validé"
|
||||||
|
present: "Présent"
|
||||||
dashboard:
|
dashboard:
|
||||||
#dashboard: public profile
|
#dashboard: public profile
|
||||||
profile:
|
profile:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user