Informations
Categorie
{% if service.category %}
{{ service.category.name }}
{% else %}
Sans categorie
{% endif %}
Type de service
{% if service.serviceType %}
{{ service.serviceType }}
{% else %}
Non defini
{% endif %}
Duree estimee
{% if service.estimatedDuration %}
{{ service.estimatedDuration }} min
{% else %}
Non definie
{% endif %}
{% if service.sku %}
SKU
{{ service.sku }}
{% endif %}
{% if service.description %}
Description
{{ service.description|nl2br }}
{% endif %}
{# Variantes #}
{% if service.variants is defined and service.variants|length > 0 %}
Actions
Modifier
Dupliquer
{% include 'components/pos/_confirm_modal.html.twig' with {
modal_id: 'dup-service',
title: 'Dupliquer le service',
message: 'Une copie de « ' ~ service.name ~ ' » sera creee avec un nouveau SKU. Confirmer ?',
action_url: path('manager_pos_services_duplicate', {id: service.id}),
csrf_token_name: 'duplicate_service_' ~ service.id,
confirm_label: 'Dupliquer',
confirm_color: 'purple',
} %}
Supprimer
{% include 'components/pos/_confirm_modal.html.twig' with {
modal_id: 'del-service',
title: 'Supprimer le service',
message: 'Supprimer « ' ~ service.name ~ ' » ? Cette action est irreversible.',
action_url: path('manager_pos_services_delete', {id: service.id}),
csrf_token_name: 'delete_service_' ~ service.id,
} %}
Historique ({{ serviceHistory|length }})
{% if serviceHistory|length > 0 %}
{% set actionColors = {
'created': 'emerald', 'updated': 'blue', 'deleted': 'red', 'price_changed': 'purple',
'sold': 'indigo', 'duplicated': 'purple', 'activated': 'green', 'deactivated': 'gray',
'variant_added': 'violet', 'variant_removed': 'rose',
} %}
{% set actionIcons = {
'created': 'fa-plus-circle', 'updated': 'fa-pen', 'deleted': 'fa-trash',
'price_changed': 'fa-tag', 'sold': 'fa-shopping-cart', 'duplicated': 'fa-copy',
'activated': 'fa-toggle-on', 'deactivated': 'fa-toggle-off',
'variant_added': 'fa-layer-group', 'variant_removed': 'fa-layer-group',
} %}
{% for entry in serviceHistory %}
{% set color = actionColors[entry.action]|default('gray') %}
{% set icon = actionIcons[entry.action]|default('fa-circle') %}
{{ entry.actionLabel }}
{{ entry.createdAt|date('d/m/Y H:i') }}
{% if entry.description %}
{{ entry.description }}
{% endif %}
{% if entry.user %}
{{ entry.user.fullName }}
{% else %}
Systeme
{% endif %}
{% endfor %}
{% else %}
Aucun historique pour ce service
{% endif %}