{% extends 'layouts/app.html.twig' %} {% block title %}Realizacja #{{ fulfillment.id }} | Luminous{% endblock %} {% block app_content %} {% include 'partials/_flash_messages.html.twig' %} {% set order = fulfillment.salesOrder %} {% set latestAttempt = fulfillment.dispatchAttempts|first %}
precision_manufacturingRealizacja / #{{ fulfillment.id }}

{{ fulfillment.provider ? fulfillment.provider.name : 'Dostawca' }}

Zamówienie {{ order.externalReference ?: order.externalId }} · {{ fulfillment.createdAt ? fulfillment.createdAt|date('d.m.Y H:i') : '—' }}

Status: {{ fulfillment.statusCode }} Walidacja: {{ fulfillment.validationStatus }} Tryb: {{ fulfillment.dispatchMode }}
{% if fulfillment.duplicateOfFulfillment %}
content_copy

Nowa realizacja utworzona jako duplikat audytowy realizacji #{{ fulfillment.duplicateOfFulfillment.id }}.

{% endif %}
{% if fulfillment.provider %}receipt_longKolejka i logi{% endif %} arrow_backZamówienie
{% if fulfillment.needsRevalidation %}
sync_problem

Realizacja wymaga ponownej walidacji. Zamówienie, wariant, SKU, POD ART lub mockup zostały zmienione po utworzeniu snapshotu.

{% endif %} {% if fulfillment.lastError %}
error

{{ fulfillment.lastError }}

{% endif %} {% if fulfillment.validationErrorsJson %}
error
{% endif %} {% if fulfillment.validationWarningsJson %}
warning
{% endif %}
Pozycje

Snapshot realizacji

Mockup pochodzi wyłącznie z FulfillmentItem.mockupSnapshotJson. Podgląd nie wybiera aktualnego zdjęcia projektu ani galerii PrestaShop.

{% for item in fulfillment.items %} {% set sourceItem = item.salesOrderItem %} {% set mockup = item.mockupSnapshotJson|default(null) %} {% set mockupAssetId = mockup ? (mockup.mockup_asset_id|default(null)) : null %} {% set publication = mockupAssetId ? (mockup_publications_by_asset[mockupAssetId]|default(null)) : null %} {% set previewUrl = publication ? publication.publicUrl : (mockup ? (mockup.source_url|default(null)) : null) %}
{{ sourceItem ? sourceItem.name : 'Pozycja bez źródła' }} {{ item.productionVariantLabelSnapshot }} · {{ item.quantity }} szt.
{{ item.validationStatus }}
SKU dostawcy
{{ item.providerSkuSnapshot ?: 'Brak' }}
Wariant
{{ item.productionVariantCodeSnapshot ?: 'Brak' }}
Pozycja realizacji
#{{ item.id }}
{% if previewUrl %} Mockup pozycji {{ item.id }} {% else %} image_not_supportedBrak podglądu {% endif %}
Mockup snapshot {% if mockup %}
Asset
#{{ mockupAssetId ?: '—' }}
Źródło
{{ mockup.source_type|default('—') }}
ID PrestaShop
{{ mockup.external_image_id|default('—') ?: '—' }}
MIME
{{ mockup.mime_type|default('—') ?: '—' }}
Wymiary
{% if mockup.width|default(null) and mockup.height|default(null) %}{{ mockup.width }}×{{ mockup.height }} px{% else %}—{% endif %}
Snapshot
{{ mockup.captured_at|default('—') }}
{% else %}
error

Brak mockupu dla pozycji. Wysyłka do Snapwear będzie zablokowana.

{% endif %} {% if publication %}
public

Publikacja #{{ publication.id }}
{{ publication.availableAt ? 'aktywna' : 'unieważniona lub wygasła' }} {% if publication.publishedHash %}
SHA-256: {{ publication.publishedHash }}{% endif %}

Otwórz publiczny URL {% elseif mockup %}
hourglass_empty

Mockup nie został jeszcze opublikowany. Publikacja powstanie podczas budowania payloadu.

{% endif %}
POD ART-y i layouty {% for placement, art in item.artSnapshotJson %}
palette

{{ placement|upper }}: {{ art.label|default(null) ?: 'brak POD ART' }} {% if art.version|default(null) %} · v{{ art.version }}{% endif %}
{{ art.source|default('missing') }} {% if art.is_order_specific|default(false) %} · jednorazowy{% endif %} {% if art.width|default(null) and art.height|default(null) %} · {{ art.width }}×{{ art.height }} px{% endif %} {% if art.artwork_asset_id|default(null) %} · asset #{{ art.artwork_asset_id }}{% endif %}

{% if art.resolved|default(false) and art.project_id|default(null) and art.asset_id|default(null) %} Pobierz {% endif %}
{% else %}
error

Brak snapshotu POD ART.

{% endfor %}
{% if item.validationErrorsJson %}
error
    {% for error in item.validationErrorsJson %}
  • {{ error }}
  • {% endfor %}
{% endif %} {% if item.personalizationSnapshotJson %}
Personalizacja
{{ item.personalizationSnapshotJson|json_encode(constant('JSON_PRETTY_PRINT')) }}
{% endif %} {% if mockup %}
Surowy snapshot mockupu
{{ mockup|json_encode(constant('JSON_PRETTY_PRINT')) }}
{% endif %}
{% endfor %}
{% if fulfillment.dispatchAttempts|length > 0 %}
Techniczne

Próby wysyłki

Pełny request i response są dostępne wyłącznie tutaj. Globalne logi dostawcy zawierają tylko bezpieczną diagnostykę.

{% for attempt in fulfillment.dispatchAttempts %} {% set httpClass = attempt.mode == 'file_test' and attempt.status == 'success' ? 'ops-badge--success' : (attempt.responseCode and attempt.responseCode >= 200 and attempt.responseCode < 300 ? 'ops-badge--success' : (attempt.responseCode and attempt.responseCode >= 400 ? 'ops-badge--danger' : 'ops-badge--warning')) %} {% endfor %}
DataPróbaTrybTriggerHTTPStatusKomunikat
{{ attempt.startedAt ? attempt.startedAt|date('d.m.Y H:i:s') : '—' }} #{{ attempt.attemptNumber }}
ID {{ attempt.id }}
{{ attempt.mode }} {{ attempt.triggerType }}{% if attempt.retryOfAttempt %}
źródło #{{ attempt.retryOfAttempt.attemptNumber }}{% endif %}
{% if attempt.mode == 'file_test' and attempt.status == 'success' %}Plik zapisany{% elseif attempt.responseCode and attempt.responseCode >= 200 and attempt.responseCode < 300 %}HTTP {{ attempt.responseCode }} · Sukces{% elseif attempt.responseCode and attempt.responseCode >= 400 and attempt.responseCode < 500 %}HTTP {{ attempt.responseCode }} · Błąd żądania{% elseif attempt.responseCode and attempt.responseCode >= 500 %}HTTP {{ attempt.responseCode }} · Błąd dostawcy{% elseif attempt.transportError %}Brak HTTP · Błąd połączenia{% else %}—{% endif %} {{ attempt.status }} {{ (attempt.responseMessage ?: attempt.transportError ?: '—')|slice(0, 220) }}
Szczegóły próby #{{ attempt.attemptNumber }}
Job ID
{{ attempt.jobId ?: '—' }}
SHA-256
{{ attempt.requestHash ?: '—' }}
Pozycje
{{ attempt.payloadItemsCount }}
Czas requestu
{{ attempt.responseDurationMs is not null ? attempt.responseDurationMs ~ ' ms' : '—' }}
Outbox
{{ attempt.outboxRelativePath ?: '—' }}
Operator wymuszenia
{{ attempt.forceRequestedBy ? attempt.forceRequestedBy.displayName : '—' }}
Powód wymuszenia
{{ attempt.forceReason ?: '—' }}
Retry source
{{ attempt.retryOfAttempt ? '#' ~ attempt.retryOfAttempt.attemptNumber : '—' }}
Koniec
{{ attempt.finishedAt ? attempt.finishedAt|date('d.m.Y H:i:s') : '—' }}
{% if can_dispatch %} {% if attempt.transportError %}
wifi_off

{{ attempt.transportError }}

{% endif %} {% if attempt.requestPayloadRaw %}

Dokładny requestPayloadRaw

{{ attempt.requestPayloadRaw }}
{% endif %} {% if attempt.responseRaw is not null %}

Raw response

{{ attempt.responseRaw }}
{% endif %} {% if attempt.responsePayloadJson %}

Response JSON

{{ attempt.responsePayloadJson|json_encode(constant('JSON_PRETTY_PRINT')) }}
{% endif %} {% if attempt.itemDiagnosticsJson %}

Diagnostyka pozycji

{{ attempt.itemDiagnosticsJson|json_encode(constant('JSON_PRETTY_PRINT')) }}
{% endif %} {% else %}
lock

Pełny request, response i diagnostyka są dostępne wyłącznie operatorowi z uprawnieniem dispatchu.

{% endif %} {% if can_dispatch and attempt.requestPayloadRaw and not active_dispatch_attempt %}
warning

Ryzyko duplikatu. Ten sam payload mógł zostać już przyjęty przez dostawcę. Operacja zostanie zapisana w historii.

{% endif %}
{% endif %}
{% endblock %}