1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- /**
- * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
- */
- ?>
- <?php // @codingStandardsIgnoreFile ?>
- <?php /** @var \Temando\Shipping\Block\Adminhtml\Dispatch\Solve $block */ ?>
- <?php $failedShipments = $block->getFailedShipments() ?>
- <section class="admin__page-section">
- <h2><?= $block->escapeHtml(__('%1 Shipment(s) were not included in this dispatch', count($failedShipments))) ?></h2>
- <h3><?= $block->escapeHtml(__('Steps to find a solution')) ?></h3>
- <ol>
- <li><?= $block->escapeHtml(__('Review the errors below. If there is an issue which can be resolved with the carrier, please contact them directly.')) ?></li>
- <li><?= /* @noEscape */ __('Try <a href="%1">Create Dispatch</a> with the same Carrier and Location to re-attempt to dispatch these.', $block->escapeUrl($block->getNewUrl())) ?></li>
- <li><a href="<?= $block->escapeUrl($block->getShippingPortalUrl()) ?>"
- target="_blank" rel="noopener noreferrer"><?= $block->escapeHtml(__('Contact Magento Shipping Support')) ?></a>
- </li>
- </ol>
- <div class="admin__data-grid-wrap">
- <table class="data-grid">
- <thead>
- <tr>
- <th class="data-grid-th"><?= $block->escapeHtml(__('Magento Shipping ID'))?></th>
- <th class="data-grid-th"><?= $block->escapeHtml(__('Reason'))?></th>
- <th class="data-grid-th"><?= $block->escapeHtml(__('Action'))?></th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($failedShipments as $failedShipment) : ?>
- <tr class="data-row">
- <td><?= $block->escapeHtml($failedShipment->getData('shipment_id')) ?></td>
- <td>
- <?php $errors = $failedShipment->hasData('errors') ? $failedShipment->getData('errors') : []; ?>
- <?php foreach ($errors as $error) : ?>
- <p>
- <strong><?= $block->escapeHtml($error->getData('title')) ?></strong><br>
- <?= $block->escapeHtml($error->getData('detail')) ?>
- </p>
- <?php endforeach; ?>
- </td>
- <td>
- <?php $shipmentUrl = $block->getShipmentUrl($failedShipment->getShipmentId()) ?>
- <a href="<?= $block->escapeUrl($shipmentUrl) ?>"><?= $block->escapeHtml(__('View Shipment')) ?></a>
- </td>
- </tr>
- <?php endforeach; ?>
- </tbody>
- </table>
- </div>
- </section>
|