Skip to content

Commit 47434cb

Browse files
committed
#AC3023-DHL Migration from V6.2 to V10: UI required changes
1 parent 0853bf1 commit 47434cb

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup_content.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</div>
3131
</div>
3232
<div class="admin__control-table-wrapper admin__page-subsection">
33-
<table class="data-table admin__control-table">
33+
<table class="data-table admin__control-table admin__control-table">
3434
<thead>
3535
<tr>
3636
<th class="col-type"><?= $block->escapeHtml(__('Type')) ?></th>
@@ -46,9 +46,9 @@
4646
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none', 'th.col-custom') ?>
4747
<?php endif ?>
4848
<th class="col-total-weight"><?= $block->escapeHtml(__('Total Weight')) ?></th>
49-
<th class="col-length"><?= $block->escapeHtml(__('Length')) ?></th>
50-
<th class="col-width"><?= $block->escapeHtml(__('Width')) ?></th>
51-
<th class="col-height"><?= $block->escapeHtml(__('Height')) ?></th>
49+
<th class="col-length _required"><span><?= $block->escapeHtml(__('Length')) ?></span></th>
50+
<th class="col-width _required"><span><?= $block->escapeHtml(__('Width')) ?></span></th>
51+
<th class="col-height _required"><span><?= $block->escapeHtml(__('Height')) ?></span></th>
5252
<th>&nbsp;</th>
5353
<?php if ($block->getDeliveryConfirmationTypes()): ?>
5454
<th class="col-signature"><?= $block->escapeHtml(__('Signature Confirmation')) ?></th>

app/code/Magento/Shipping/view/adminhtml/web/order/packaging.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ define(['prototype'], function () {
7171
if (this.packagesContent.childElements().length == 0) {
7272
this.newPackage();
7373
}
74+
const allowedPackageTypes = ["N","D"];
75+
76+
if (!Object.values(this.customizableContainers).some(packageType => allowedPackageTypes.includes(packageType))) {
77+
$('packaging_window').select(
78+
'th.col-length,th.col-width,th.col-height'
79+
).forEach(element => {
80+
element.classList.remove('_required')
81+
});
82+
}
7483
jQuery(this.window).modal('openModal');
7584
},
7685

@@ -270,7 +279,7 @@ define(['prototype'], function () {
270279
});
271280
}
272281

273-
return result = $$('[id^="package_block_"] input').collect(function (element) {
282+
return result = $$('[id^="package_block_"] input').collect(function (element) {
274283
return this.validateElement(element);
275284
}, this).all();
276285
},

0 commit comments

Comments
 (0)