{% import 'shared/componnents/_macros/_glyphicons.html.twig' as glyphicons %} {% import 'shared/componnents/_macros/_forms.html.twig' as forms %} {% set data = data ?? null %} {% set entity_name = entity_name ?? null %} {% set response_status = attribute(data, 'status') is defined ? data.status|show_choices : null %} {% set response_published = attribute(data, 'published') is defined ? data.published|show_choices : null %} {% set response_top_destination = attribute(data, 'topDestination') is defined ? data.topDestination|show_choices : null %} {% set response_main = attribute(data, 'main') is defined ? data.main|show_choices : null %} {% set response_percent = attribute(data, 'percent') is defined ? data.percent|show_choices : null %} {% set response_percent_price = attribute(data, 'percentPrice') is defined ? data.percentPrice|show_choices : null %} {% set response_percent_price_supplement = attribute(data, 'percentPriceSupplement') is defined ? data.percentPriceSupplement|show_choices : null %} {% set response_adult = attribute(data, 'adult') is defined ? data.adult|show_choices : null %} {% set response_child = attribute(data, 'child') is defined ? data.child|show_choices : null %} {% set response_early_booking = attribute(data, 'earlyBooking') is defined ? data.earlyBooking|show_choices : null %} {% set response_pay_commission = attribute(data, 'payCommission') is defined ? data.payCommission|show_choices : null %} {% set response_apply_to_child = attribute(data, 'applyToChild') is defined ? data.applyToChild|show_choices : null %} {% set response_mandatory_supplement = attribute(data, 'mandatorySupplement') is defined ? data.mandatorySupplement|show_choices : null %} {% if class_name(data, entity_name) %} {% if response_status %} {% set status = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'status', response_status['label'], response_status['text']) %} {% endif %} {% if response_published %} {% set published = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'published', response_published['label'], response_published['text']) %} {% endif %} {% if response_top_destination %} {% set topDestination = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'topDestination', response_top_destination['label'], response_top_destination['text']) %} {% endif %} {% if response_main %} {% set main = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'main', response_main['label'], response_main['text']) %} {% endif %} {% if response_percent %} {% set percent = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'percent', response_percent['label'], response_percent['text']) %} {% endif %} {% if response_percent_price %} {% set percent_price = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'percentPrice', response_percent_price['label'], response_percent_price['text']) %} {% endif %} {% if response_percent_price_supplement %} {% set percent_price_supplement = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'percentPriceSupplement', response_percent_price_supplement['label'], response_percent_price_supplement['text']) %} {% endif %} {% if response_adult %} {% set adult = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'adult', response_adult['label'], response_adult['text']) %} {% endif %} {% if response_child %} {% set child = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'child', response_child['label'], response_child['text']) %} {% endif %} {% if response_early_booking %} {% set early_booking = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'earlyBooking', response_early_booking['label'], response_early_booking['text']) %} {% endif %} {% if response_pay_commission %} {% set pay_commission = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'payCommission', response_pay_commission['label'], response_pay_commission['text']) %} {% endif %} {% if response_apply_to_child %} {% set apply_to_child = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'applyToChild', response_apply_to_child['label'], response_apply_to_child['text']) %} {% endif %} {% if response_mandatory_supplement %} {% set mandatory_supplement = glyphicons.label_choices(path('app_app_update_choices'), entity_name, data.id, 'mandatorySupplement', response_mandatory_supplement['label'], response_mandatory_supplement['text']) %} {% endif %} {% if (entity_name == 'SupplementType') or (entity_name == 'Pension') or (entity_name == 'Equipment') or (entity_name == 'Country') or (entity_name == 'Service') or (entity_name == 'City') or (entity_name == 'Location') or (entity_name == 'Hotel') or (entity_name == 'Supplement') or (entity_name == 'HotelPhoto') or (entity_name == 'HotelContract') or (entity_name == 'Promo') or (entity_name == 'Theme') or (entity_name == 'AgencyConfig') %} {{ data.name }} {% if entity_name == 'Hotel' %} {% for i in 1..data.star %} {% endfor %} {% endif %} {% if entity_name == 'Equipment' %} {{ data.category }} {% endif %} {{ status }} {% endif %} {% if entity_name == 'SupplementType' %} {{ data.type|displaySupplementType() }} {% endif %} {% if entity_name == 'Country' %} {{ data.code3 }} {{ data.code2 }} {% endif %} {% if entity_name == 'AgencyConfig' %} {{ data.beneficiary }} {{ data.bankName }} {{ data.rib }} {% endif %} {% if entity_name == 'Supplement' %} {{ data.code }} {% endif %} {% if entity_name == 'Theme' %} {{ data.slug }} {% for hotel in data.hotel %} {% endfor %} {% if data.document %}
{% endif %} {{ data.discount }} {{ data.btnText }} {{ data.description }} {% endif %} {% if entity_name == 'Room' %} {{ data.name }} {{ data.code }} {{ status }} {{ data.minPerson }} {{ data.maxPerson }} {{ data.minAdult }} {{ data.maxAdult }} {{ data.minChild }} {{ data.maxAdult }} {% endif %} {% if entity_name == 'Agency' %} {{ data.name }} {{ data.address }} / {{ data.postalCode }} {{ data.phone }} {{ data.emailInfo }}
{{ data.emailBooking }}
{{ data.emailManagement }} {{ status }} {{ main }} {% endif %} {% if entity_name == 'Hotel' %} {{ published }} {{ data.city.name }}, {{ data.address }} {% endif %} {% if entity_name == 'City' %} {{ topDestination }} {% endif %} {% if entity_name == 'HotelRoom' %} {{ data.room.name }} ({{ data.room.code }}) {% endif %} {% if entity_name == 'HotelEquipment' %} {{ data.equipment.name }} {% endif %} {% if entity_name == 'HotelService' %} {{ data.service.name }} {% endif %} {% if entity_name == 'HotelPension' %} {{ data.pension.name }} {% endif %} {% if entity_name == 'HotelPhoto' %} {{ main }}
{% endif %} {% if entity_name == 'HotelContact' %} {{ data.name }} {{ data.email }} {{ data.phonePrimary }} {{ data.phoneSecondary }} {{ data.type }} {{ data.position }} {% endif %} {% if entity_name == 'HotelContract' %} {{ data.type|contractType() }} {{ data.provider }} {{ 1 == data.commissionType ? 'Oui' : 'Non'}} {{ data.commissionPrice ?? 0 }} {{ data.market|contractMarket() }} {% endif %} {% if entity_name == 'HotelContractPeriod' %} {{ data.start|date('Y-m-d') }} {{ data.end|date('Y-m-d') }} {% endif %} {% if entity_name == 'HotelContractDisponibility' %} {{ data.start|date('Y-m-d') }} {% set room = data.hotelRoom.room %} {{ room.name ~' ('~ room.code ~ ')' }} {{ forms.input( 'number', data.id, 'HotelContractDisponibility', 'numberRooms', data.numberRooms, path('app_app_update_fields'), false ) }} {{ data.days }} {% endif %} {% if entity_name == 'HotelContractCommission' %} {% set start = data.start ? data.start : data.hotelContractPeriod %} {% set end = data.end ? data.start : data.hotelContractPeriod %} {% if data.start and data.end %} {{ data.start|date('Y-m-d') }} Au {{ data.end|date('Y-m-d') }} {% endif %} {% if data.hotelContractPeriod %} {{ data.hotelContractPeriod.start|date('Y-m-d') }} Au {{ data.hotelContractPeriod.end|date('Y-m-d') }} {% endif %} {% if data.start is null and data.hotelContractPeriod is null %} Période supprimée {% endif %} {% set room = data.hotelRoom.room %} {{ room.name ~' ('~ room.code ~ ')' }} {{ data.hotelPension.pension.name }} {{ forms.input( 'text', data.id, 'HotelContractCommission', 'price', data.price, path('app_app_update_fields'), false ) }} {{ percent_price }} {{ forms.input( 'text', data.id, 'HotelContractCommission', 'priceSupplement', data.priceSupplement, path('app_app_update_fields'), false ) }} {{ percent_price_supplement }} {% endif %} {% if entity_name == 'HotelContractAdult' %} {% set hotelContractPeriod = data.hotelContractPeriod %} {% if hotelContractPeriod is not null %} {{ hotelContractPeriod.start|date('Y-m-d') }} Au {{ hotelContractPeriod.end|date('Y-m-d') }} {% else %} Période supprimée {% endif %} {% set room = data.hotelRoom.room %} {{ room.name ~' ('~ room.code ~ ')' }} {{ data.hotelPension.pension.name }} {{ forms.input( 'text', data.id, 'HotelContractAdult', 'price', data.price, path('app_app_update_fields'), false ) }} {{ forms.input( 'text', data.id, 'HotelContractAdult', 'extendedBed1Price', data.extendedBed1Price, path('app_app_update_fields'), room.maxAdult > 2 ? false : true ) }} {{ forms.input( 'text', data.id, 'HotelContractAdult', 'extendedBed2Price', data.extendedBed2Price, path('app_app_update_fields'), room.maxAdult > 3 ? false : true ) }} {{ forms.input( 'text', data.id, 'HotelContractAdult', 'extendedBed3Price', data.extendedBed3Price, path('app_app_update_fields'), room.maxAdult > 4 ? false : true ) }} {{ forms.input( 'text', data.id, 'HotelContractAdult', 'extendedBed4Price', data.extendedBed4Price, path('app_app_update_fields'), room.maxAdult > 5 ? false : true ) }} {{ data.days }} {% endif %} {% if entity_name == 'HotelContractEarlyBooking' %} {{ data.start|date('Y-m-d') }} Au {{ data.end|date('Y-m-d') }} {{ data.hotelRoom ? data.hotelRoom.room.name ~' ('~ data.hotelRoom.room.code ~ ')' : '⚠️ Pas de chambre'}} {{ data.hotelPension ? data.hotelPension.pension.name : '⚠️ Pas de pension' }} {{ forms.input( 'number', data.id, 'HotelContractEarlyBooking', 'numberOfDays', data.numberOfDays, path('app_app_update_fields'), false ) }} {{ forms.input( 'text', data.id, 'HotelContractEarlyBooking', 'reduction', data.reduction, path('app_app_update_fields'), false ) }} {{ percent }} {% endif %} {% if entity_name == 'HotelContractMinimumStay' %} {{ data.start|date('Y-m-d') }} Au {{ data.end|date('Y-m-d') }} {{ data.hotelPension.pension.name }} {{ forms.input( 'number', data.id, 'HotelContractMinimumStay', 'numberOfDays', data.numberOfDays, path('app_app_update_fields'), false ) }} {% endif %} {% if entity_name == 'HotelContractStopSale' %} {{ data.start|date('Y-m-d') }} Au {{ data.end|date('Y-m-d') }} {{ data.hotelRoom ? data.hotelRoom.room.name ~ ' ('~ data.hotelRoom.room.code ~ ')' : '⚠️ Pas de chambre'}} {{ data.hotelPension ? data.hotelPension.pension.name : '⚠️ Pas de pension'}} {{ status }} {% endif %} {% if entity_name == 'HotelContractSupplement' %} {% set room = data.hotelRoom.room %} {% if data.hotelContractPeriod %} {{ data.hotelContractPeriod.start|date('Y-m-d') }} Au {{ data.hotelContractPeriod.end|date('Y-m-d') }} {% else %} Période supprimée {% endif %} {{ room.name ~' ('~ room.code ~ ')' }} {{ data.hotelPension.pension.name }} {{ data.supplementType.name }} {{ data.supplementType.displayType }} {{ forms.input( 'text', data.id, 'HotelContractSupplement', 'price', data.price, path('app_app_update_fields'), false ) }} {{ early_booking }} {{ pay_commission }} {{ apply_to_child }} {{ mandatory_supplement }} {{ status }} {{ data.days }} {% endif %} {% if entity_name == 'User' %} {% set photo_user = photoUser(data) %} {{ data.email }} {{ data.civility ~ '. ' ~ data.lastName ~ ' ' ~ data.firstName }} {{ data.roles[0]|libelleRoles }} {% endif %} {% if entity_name == 'HotelContractPromo' %} {{ data.start|date('Y-m-d') }} Au {{ data.end|date('Y-m-d') }} {% set room = data.hotelRoom.room %} {{ room.name }} ({{ room.code }}) {{ data.hotelPension.pension.name }} {{ data.promo.name }} {{ forms.input( 'string', data.id, 'HotelContractPromo', 'reduction', data.reduction, path('app_app_update_fields'), false ) }} {{ percent }} {{ adult }} {{ child }} {{ status }} {{ data.days }} {% endif %} {% if entity_name == 'HotelContractChild' %} {% set hotelContractPeriod = data.hotelContractPeriod %} {% if hotelContractPeriod is not null %} {{ hotelContractPeriod.start|date('Y-m-d') }} Au {{ hotelContractPeriod.end|date('Y-m-d') }} {% else %} Période supprimée {% endif %} {% set room = data.hotelRoom.room %} {{ room.name }} ({{ room.code }}) {{ data.hotelPension.pension.name }} {{ forms.input( 'string', data.id, 'HotelContractChild', 'reduction', data.reduction, path('app_app_update_fields'), false ) }} {{ percent }} {{ data.ageFrom }} - {{ data.ageTo }} {% if data.ageTo <= 1 %} (an) {% else %} (ans) {% endif %} {{ data.numberChild > 1 ? data.numberChild ~ ' ème' : data.numberChild ~ ' ère' }} enfant(s) {{ data.days }} {% endif %} {% if entity_name == 'Booking' %} {{ data.bookingNumber }} {{ data.voucherNumber }} {{ data.totalPrice|number_format(0, '.', ' ') }} TND
{% if data.status == 2 and data.paymentType %} Payé {% else %} En attente {% endif %} {% set hotelDetail = displayHotel(data.contractId) %} {% if hotelDetail %} {{ hotelDetail['hotelName'] ?? '' }} {% endif %} {{ data.civility ~ '. ' ~ data.firstName ~ ' ' ~ data.lastName }} {{ data.email }} {{ data.phone }} {{ data.beginDate|date('Y-m-d') }} Au {{ data.endDate|date('Y-m-d') }} {{ data.createdAt|date('Y-m-d H:i:m') }}
{% endif %} {% if entity_name == 'Contact' %} {{ data.fullName }} {{ data.email }} {{ data.phone }} {{ data.displayReason }} {{ data.description|raw }} {% endif %} {% if entity_name == 'HotelReviews' %} {{ data.fullName }} {{ data.title }} {{ data.message }} {{ data.notes }} {{ data.createdAt|date('Y-m-d H:i:s') }} {% endif %} {% if entity_name == 'ReservationRequest' %} {{ data.hotel }} {{ data.pension }} {% if data.firstRoom %} - {{ data.firstRoom }} {% endif %} {% if data.secondRoom %} - {{ data.secondRoom }} {% endif %} {% if data.thirdRoom %} - {{ data.thirdRoom }} {% endif %} {% if data.fourthRoom %} - {{ data.fourthRoom }} {% endif %} {% if data.fifthRoom %} - {{ data.fifthRoom }} {% endif %} {{ data.city }} {{ data.start|date('Y-m-d') }} {{ data.end|date('Y-m-d') }} {{ data.message|raw }} {{ data.fullName }} {{ data.email }} {{ data.phone }} {{ data.address }} {% endif %} {% if entity_name == 'ActivityLog' %} {% set user = data.user %} {{ user.civility ~ '. ' ~ user.lastName ~ ' ' ~ user.firstName }} {{ data.activityAt|date('Y-m-d H:i:s') }} {{ data.entityName }} {{ data.entityId }} {{ data.action }} {{ data.details }} {% endif %} {% endif %}