Add Allegro shipment service and related components
- Implement AllegroShipmentService for managing shipment creation and status checks. - Create ShipmentController to handle shipment preparation and label downloading. - Introduce ShipmentPackageRepository for database interactions related to shipment packages. - Add methods for retrieving delivery services, creating shipments, checking creation status, and downloading labels. - Implement address validation and token management for Allegro API integration.
This commit is contained in:
@@ -193,6 +193,14 @@ a {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.mt-0 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.mt-4 {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.mt-12 {
|
||||
margin-top: 8px;
|
||||
}
|
||||
@@ -305,6 +313,24 @@ a {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.form-grid-2 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.form-grid-3 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.form-grid-4 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
@@ -924,6 +950,16 @@ a {
|
||||
font-size: 14px;
|
||||
color: #223247;
|
||||
line-height: 1.25;
|
||||
|
||||
&__delivery {
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
margin-bottom: 2px;
|
||||
max-width: 160px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.orders-products {
|
||||
@@ -979,15 +1015,56 @@ a {
|
||||
}
|
||||
}
|
||||
|
||||
.orders-image-trigger {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
cursor: zoom-in;
|
||||
.orders-image-hover-wrap {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: zoom-in;
|
||||
}
|
||||
|
||||
.orders-image-hover-popup {
|
||||
display: none;
|
||||
position: fixed;
|
||||
left: auto;
|
||||
top: auto;
|
||||
width: 350px;
|
||||
max-height: 350px;
|
||||
object-fit: contain;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
|
||||
border: 1px solid #dfe3ea;
|
||||
z-index: 100;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.orders-image-hover-wrap:hover .orders-image-hover-popup {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.activity-type-badge {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
background: #e2e8f0;
|
||||
color: #334155;
|
||||
|
||||
&--status_change { background: #dbeafe; color: #1e40af; }
|
||||
&--payment { background: #dcfce7; color: #166534; }
|
||||
&--invoice { background: #fef3c7; color: #92400e; }
|
||||
&--shipment { background: #e0e7ff; color: #3730a3; }
|
||||
&--message { background: #f3e8ff; color: #6b21a8; }
|
||||
&--document { background: #fce7f3; color: #9d174d; }
|
||||
&--import { background: #f1f5f9; color: #475569; }
|
||||
&--note { background: #ecfdf5; color: #065f46; }
|
||||
}
|
||||
|
||||
.text-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.orders-money {
|
||||
@@ -1152,6 +1229,23 @@ a {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.order-status-change {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.order-status-change__form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.order-status-change__select {
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.order-details-tabs {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
@@ -1613,6 +1707,107 @@ a {
|
||||
border: 1px solid #d9e0ea;
|
||||
}
|
||||
|
||||
.shipment-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.searchable-select {
|
||||
position: relative;
|
||||
|
||||
&__trigger {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
min-height: 34px;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 4px solid transparent;
|
||||
border-right: 4px solid transparent;
|
||||
border-top: 5px solid var(--c-text-muted, #6b7280);
|
||||
margin-left: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&--placeholder {
|
||||
color: var(--c-text-muted, #6b7280);
|
||||
}
|
||||
}
|
||||
|
||||
&__dropdown {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 100%;
|
||||
z-index: 50;
|
||||
max-height: 280px;
|
||||
overflow: auto;
|
||||
background: #fff;
|
||||
border: 1px solid var(--c-border);
|
||||
border-top: 0;
|
||||
border-radius: 0 0 8px 8px;
|
||||
box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
|
||||
|
||||
&.is-open {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&__search {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
border: none !important;
|
||||
border-bottom: 1px solid var(--c-border) !important;
|
||||
border-radius: 0 !important;
|
||||
box-shadow: none !important;
|
||||
font-size: 13px;
|
||||
background: #fff;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&__option {
|
||||
padding: 7px 10px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
color: var(--c-text-strong);
|
||||
|
||||
&:hover {
|
||||
background: #f1f5f9;
|
||||
}
|
||||
|
||||
&.is-selected {
|
||||
background: #edf2ff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.flash {
|
||||
padding: 10px 14px;
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
|
||||
&--success {
|
||||
background: #f0fdf4;
|
||||
border: 1px solid #bbf7d0;
|
||||
color: #166534;
|
||||
}
|
||||
|
||||
&--error {
|
||||
background: #fef2f2;
|
||||
border: 1px solid #fecaca;
|
||||
color: #b91c1c;
|
||||
}
|
||||
}
|
||||
|
||||
.content-tabs-card {
|
||||
margin-top: 0;
|
||||
}
|
||||
@@ -1733,6 +1928,10 @@ a {
|
||||
|
||||
.filters-grid,
|
||||
.form-grid,
|
||||
.form-grid-2,
|
||||
.form-grid-3,
|
||||
.form-grid-4,
|
||||
.shipment-grid,
|
||||
.statuses-form,
|
||||
.statuses-inline-form,
|
||||
.table-list-filters,
|
||||
|
||||
@@ -58,6 +58,12 @@
|
||||
background: #b91c1c;
|
||||
}
|
||||
|
||||
.btn--sm {
|
||||
min-height: 28px;
|
||||
padding: 3px 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.btn--block {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -90,6 +96,40 @@
|
||||
box-shadow: var(--focus-ring);
|
||||
}
|
||||
|
||||
.input {
|
||||
min-height: 34px;
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: 8px;
|
||||
padding: 5px 10px;
|
||||
font: inherit;
|
||||
color: var(--c-text-strong);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.input--sm {
|
||||
min-height: 28px;
|
||||
padding: 3px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.flash {
|
||||
padding: 8px 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.flash--success {
|
||||
border: 1px solid #b7ebcf;
|
||||
background: #f0fff6;
|
||||
color: #0f6b39;
|
||||
}
|
||||
|
||||
.flash--error {
|
||||
border: 1px solid #fed7d7;
|
||||
background: #fff5f5;
|
||||
color: var(--c-danger);
|
||||
}
|
||||
|
||||
.alert {
|
||||
padding: 12px 14px;
|
||||
border-radius: 8px;
|
||||
@@ -130,6 +170,11 @@
|
||||
.table-wrap {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
|
||||
&--visible {
|
||||
overflow: visible !important;
|
||||
overflow-x: visible !important;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
@@ -155,6 +200,12 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.table--details th:first-child,
|
||||
.table--details td:first-child {
|
||||
width: 36px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user