{% extends "shared/frontend/base.html" %} {% block title %}{{ location.name }} - BMC Hub{% endblock %} {% block content %}

{{ location.name }}

{% if location.hierarchy %} {% endif %}
{% set type_label = { 'kompleks': 'Kompleks', 'bygning': 'Bygning', 'etage': 'Etage', 'rum': 'Rum', 'kantine': 'Kantine', 'moedelokale': 'Mødelokale', 'customer_site': 'Kundesite', 'vehicle': 'Køretøj' }.get(location.location_type, location.location_type) %} {% set type_color = { 'kompleks': '#0f4c75', 'bygning': '#1abc9c', 'etage': '#3498db', 'rum': '#e67e22', 'kantine': '#d35400', 'moedelokale': '#16a085', 'customer_site': '#9b59b6', 'vehicle': '#8e44ad' }.get(location.location_type, '#6c757d') %} {{ type_label }} {% if location.parent_location_id and location.parent_location_name %} {{ location.parent_location_name }} {% endif %} {% if location.is_active %} Aktiv {% else %} Inaktiv {% endif %}
Grundlæggende oplysninger

{{ location.name }}

{{ type_label }}

{% if location.customer_id and location.customer_name %} {{ location.customer_name }} {% else %} {% endif %}

{% if location.is_active %}Aktiv{% else %}Inaktiv{% endif %}

{% if location.phone %} {{ location.phone }} {% else %} {% endif %}

{% if location.email %} {{ location.email }} {% else %} {% endif %}

Adresse

{{ location.address_street | default('—') }}

{{ location.address_city | default('—') }}

{{ location.address_postal_code | default('—') }}

{{ location.address_country | default('DK') }}

Noter

{{ location.notes | default('') }}

Metadata

{{ location.created_at | default('—') }}

{{ location.updated_at | default('—') }}

Hierarki (træ)
{% if location.hierarchy or location.children %} {% else %} Ingen relationer registreret {% endif %}
Kontaktpersoner
{% if location.contacts %}
{% for contact in location.contacts %}
{{ contact.contact_name }}

{% if contact.role %}{{ contact.role }}{% endif %} {% if contact.is_primary %}Primær{% endif %}

{% if contact.contact_email %}

{{ contact.contact_email }}

{% endif %} {% if contact.contact_phone %}

{{ contact.contact_phone }}

{% endif %}
{% endfor %}
{% else %}

Ingen kontakter registreret

{% endif %}
Åbningstider
{% if location.operating_hours %}
{% for hours in location.operating_hours %} {% endfor %}
Dag Åbner Lukker Status Handlinger
{{ hours.day_name }} {{ hours.open_time | default('—') }} {{ hours.close_time | default('—') }} {% if hours.is_open %} Åben {% else %} Lukket {% endif %}
{% else %}

Ingen åbningstider registreret

{% endif %}
Tjenester
{% if location.services %}
{% for service in location.services %}
{{ service.service_name }}
{% if service.is_available %}Tilgængelig{% else %}Ikke tilgængelig{% endif %}
{% endfor %}
{% else %}

Ingen tjenester registreret

{% endif %}
Kapacitetssporing
{% if location.capacity %}
{% for cap in location.capacity %} {% set usage_pct = ((cap.used_capacity / cap.total_capacity) * 100) | int %}
{{ cap.capacity_type }}
{{ cap.used_capacity }} / {{ cap.total_capacity }}
{{ usage_pct }}% i brug
{% endfor %}
{% else %}

Ingen kapacitetsdata registreret

{% endif %}
Overordnet lokation
{% if location.parent_location_id and location.parent_location_name %} {{ location.parent_location_name }} {% else %} Ingen (øverste niveau) {% endif %}
Underlokationer
{% if location.children %} {% else %} Ingen underlokationer {% endif %}
Tilføj underlokation
Hierarki (træ)
{% if location.hierarchy or location.children %} {% else %} Ingen relationer registreret {% endif %}
Hardware på lokation
{% if location.hardware %}
{% for hw in location.hardware %}
{{ hw.brand }} {{ hw.model }}
{{ hw.asset_type }}{% if hw.serial_number %} · {{ hw.serial_number }}{% endif %}
{{ hw.status }}
{% endfor %}
{% else %} Ingen hardware registreret på denne lokation {% endif %}
Ændringshistorik
{% if location.audit_log %}
{% for entry in location.audit_log | reverse %}
{{ entry.event_type }}

{{ entry.created_at }}

{% if entry.user_id %} {{ entry.user_id }} {% endif %}
{% if entry.changes %}

{{ entry.changes }}

{% endif %}
{% endfor %}
{% else %}

Ingen historik tilgængelig

{% endif %}
{% endblock %} {% block scripts %} {% endblock %}