diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b4b43ec..9b440295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). +## [3.3.2](https://github.com/packlink-dev/ecommerce_module_core/compare/v3.3.1...v3.3.2) - 2021-08-24 +### Changed +- Reverted Shopware code review changes. + ## [3.3.1](https://github.com/packlink-dev/ecommerce_module_core/compare/v3.3.0...v3.3.1) - 2021-08-23 **BREAKING CHANGES** ### Changed diff --git a/src/BusinessLogic/Brand/DTO/BrandConfiguration.php b/src/BusinessLogic/Brand/DTO/BrandConfiguration.php index 9f2d5a0d..4098f862 100644 --- a/src/BusinessLogic/Brand/DTO/BrandConfiguration.php +++ b/src/BusinessLogic/Brand/DTO/BrandConfiguration.php @@ -71,7 +71,7 @@ public function toArray() */ public static function fromArray(array $data) { - $result = new self(); + $result = new static(); $result->platformCode = $data['platform_code']; $result->shippingServiceSource = $data['shipping_service_source']; diff --git a/src/BusinessLogic/Controllers/DTO/DashboardStatus.php b/src/BusinessLogic/Controllers/DTO/DashboardStatus.php index 7655d12e..fcbbc3ce 100644 --- a/src/BusinessLogic/Controllers/DTO/DashboardStatus.php +++ b/src/BusinessLogic/Controllers/DTO/DashboardStatus.php @@ -54,18 +54,4 @@ class DashboardStatus extends FrontDto 'isWarehouseSet', 'isOrderStatusMappingsSet', ); - - /** - * Creates instance of this class. - * - * @param array $data - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create(array $data) - { - return new self(); - } } diff --git a/src/BusinessLogic/Controllers/DTO/ModuleState.php b/src/BusinessLogic/Controllers/DTO/ModuleState.php index d7158978..32c3f0c6 100644 --- a/src/BusinessLogic/Controllers/DTO/ModuleState.php +++ b/src/BusinessLogic/Controllers/DTO/ModuleState.php @@ -44,18 +44,4 @@ class ModuleState extends FrontDto protected static $fields = array( 'state', ); - - /** - * Creates instance of this class. - * - * @param array $data - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create(array $data) - { - return new self(); - } } diff --git a/src/BusinessLogic/Controllers/DTO/OnboardingState.php b/src/BusinessLogic/Controllers/DTO/OnboardingState.php index e1670773..c298865e 100644 --- a/src/BusinessLogic/Controllers/DTO/OnboardingState.php +++ b/src/BusinessLogic/Controllers/DTO/OnboardingState.php @@ -33,18 +33,4 @@ class OnboardingState extends FrontDto protected static $fields = array( 'state', ); - - /** - * Creates instance of this class. - * - * @param array $data - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create(array $data) - { - return new self(); - } } diff --git a/src/BusinessLogic/Controllers/DTO/RegistrationResponse.php b/src/BusinessLogic/Controllers/DTO/RegistrationResponse.php index 25bd8f69..d549f9a8 100644 --- a/src/BusinessLogic/Controllers/DTO/RegistrationResponse.php +++ b/src/BusinessLogic/Controllers/DTO/RegistrationResponse.php @@ -54,18 +54,4 @@ class RegistrationResponse extends FrontDto 'termsAndConditionsUrl', 'privacyPolicyUrl', ); - - /** - * Creates instance of this class. - * - * @param array $data - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create(array $data) - { - return new self(); - } } diff --git a/src/BusinessLogic/Controllers/DTO/ShippingMethodConfiguration.php b/src/BusinessLogic/Controllers/DTO/ShippingMethodConfiguration.php index c95e4e3c..72760e38 100644 --- a/src/BusinessLogic/Controllers/DTO/ShippingMethodConfiguration.php +++ b/src/BusinessLogic/Controllers/DTO/ShippingMethodConfiguration.php @@ -121,7 +121,7 @@ public function toArray() */ public static function fromArray(array $raw) { - $result = new self(); + $result = new static(); $result->id = $raw['id']; $result->activated = (bool)static::getDataValue($raw, 'activated', false); diff --git a/src/BusinessLogic/Country/Country.php b/src/BusinessLogic/Country/Country.php index 4676c156..bc665244 100644 --- a/src/BusinessLogic/Country/Country.php +++ b/src/BusinessLogic/Country/Country.php @@ -60,20 +60,6 @@ class Country extends FrontDto 'postal_code', ); - /** - * Creates instance of this class. - * - * @param array $data - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create(array $data) - { - return new self(); - } - /** * Transforms raw array data to its DTO. * diff --git a/src/BusinessLogic/Country/CountryService.php b/src/BusinessLogic/Country/CountryService.php index e7a22bb1..c921c044 100644 --- a/src/BusinessLogic/Country/CountryService.php +++ b/src/BusinessLogic/Country/CountryService.php @@ -34,18 +34,6 @@ class CountryService extends BaseService */ protected $brandConfigurationService; - /** - * Creates instance of this class. - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create() - { - return new self(); - } - /** * Returns a list of supported country DTOs. * diff --git a/src/BusinessLogic/Country/WarehouseCountryService.php b/src/BusinessLogic/Country/WarehouseCountryService.php index cdb12889..e71f25ec 100644 --- a/src/BusinessLogic/Country/WarehouseCountryService.php +++ b/src/BusinessLogic/Country/WarehouseCountryService.php @@ -23,18 +23,6 @@ class WarehouseCountryService extends CountryService */ protected static $instance; - /** - * Creates instance of this class. - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create() - { - return new self(); - } - /** * Returns a list of supported country DTOs. * diff --git a/src/BusinessLogic/DTO/BaseDto.php b/src/BusinessLogic/DTO/BaseDto.php index 14510487..857fb5cc 100644 --- a/src/BusinessLogic/DTO/BaseDto.php +++ b/src/BusinessLogic/DTO/BaseDto.php @@ -29,7 +29,9 @@ abstract public function toArray(); */ public static function fromArray(array $raw) { - return null; + throw new \BadMethodCallException( + 'Method "fromArray" not implemented! Given array: ' . print_r($raw, true) + ); } /** diff --git a/src/BusinessLogic/DTO/FrontDto.php b/src/BusinessLogic/DTO/FrontDto.php index df052ceb..785fea97 100644 --- a/src/BusinessLogic/DTO/FrontDto.php +++ b/src/BusinessLogic/DTO/FrontDto.php @@ -30,20 +30,6 @@ abstract class FrontDto extends DataTransferObject */ protected static $requiredFields = array(); - /** - * Creates instance of this class. - * - * @param array $data - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create(array $data) - { - return null; - } - /** * Transforms raw array data to its DTO. * @@ -57,7 +43,7 @@ public static function fromArray(array $raw) { static::validate($raw); - $result = static::create($raw); + $result = new static(); foreach ($raw as $field => $value) { if (property_exists(static::CLASS_NAME, $field)) { $result->$field = $value; diff --git a/src/BusinessLogic/DTO/ValidationError.php b/src/BusinessLogic/DTO/ValidationError.php index edc287bd..f90c18d7 100644 --- a/src/BusinessLogic/DTO/ValidationError.php +++ b/src/BusinessLogic/DTO/ValidationError.php @@ -47,18 +47,4 @@ class ValidationError extends FrontDto * @var array */ protected static $fields = array('code', 'field', 'message'); - - /** - * Creates instance of this class. - * - * @param array $data - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create(array $data) - { - return new self(); - } } diff --git a/src/BusinessLogic/Http/DTO/Package.php b/src/BusinessLogic/Http/DTO/Package.php index 2d49ee4c..6f06bebd 100644 --- a/src/BusinessLogic/Http/DTO/Package.php +++ b/src/BusinessLogic/Http/DTO/Package.php @@ -59,7 +59,7 @@ public function __construct($weight = 0.0, $width = 0.0, $height = 0.0, $length */ public static function defaultPackage() { - return new self(1, 10, 10, 10); + return new static(1, 10, 10, 10); } /** @@ -71,7 +71,7 @@ public static function defaultPackage() */ public static function fromArray(array $raw) { - $instance = new self(); + $instance = new static(); $instance->weight = static::getDataValue($raw, 'weight', 0.0); $instance->length = static::getDataValue($raw, 'length', 0.0); $instance->height = static::getDataValue($raw, 'height', 0.0); diff --git a/src/BusinessLogic/Http/DTO/ParcelInfo.php b/src/BusinessLogic/Http/DTO/ParcelInfo.php index 856fb792..19e2ec15 100644 --- a/src/BusinessLogic/Http/DTO/ParcelInfo.php +++ b/src/BusinessLogic/Http/DTO/ParcelInfo.php @@ -98,20 +98,6 @@ public static function defaultParcel() ); } - /** - * Creates instance of this class. - * - * @param array $data - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create(array $data) - { - return new self(); - } - /** * Generates validation errors for the payload. * diff --git a/src/BusinessLogic/Http/DTO/PostalCode.php b/src/BusinessLogic/Http/DTO/PostalCode.php index 968255bb..2a4bb9ff 100644 --- a/src/BusinessLogic/Http/DTO/PostalCode.php +++ b/src/BusinessLogic/Http/DTO/PostalCode.php @@ -51,7 +51,7 @@ class PostalCode extends DataTransferObject */ public static function fromArray(array $raw) { - $instance = new self(); + $instance = new static(); $instance->zipcode = !empty($raw['zipcode']) ? $raw['zipcode'] : ''; $instance->city = !empty($raw['city']['name']) ? $raw['city']['name'] : ''; diff --git a/src/BusinessLogic/Http/DTO/PostalZone.php b/src/BusinessLogic/Http/DTO/PostalZone.php index e72dcc40..6923ba9b 100644 --- a/src/BusinessLogic/Http/DTO/PostalZone.php +++ b/src/BusinessLogic/Http/DTO/PostalZone.php @@ -51,7 +51,7 @@ class PostalZone extends DataTransferObject */ public static function fromArray(array $raw) { - $instance = new self(); + $instance = new static(); $instance->id = static::getDataValue($raw, 'id'); $instance->name = static::getDataValue($raw, 'name'); diff --git a/src/BusinessLogic/Http/DTO/Shipment.php b/src/BusinessLogic/Http/DTO/Shipment.php index 6db420d7..25572c44 100644 --- a/src/BusinessLogic/Http/DTO/Shipment.php +++ b/src/BusinessLogic/Http/DTO/Shipment.php @@ -118,7 +118,7 @@ public function toArray() */ public static function fromArray(array $raw) { - $shipment = new self(); + $shipment = new static(); $date = static::getDataValue($raw, 'order_date'); if ($date) { $shipment->orderDate = \DateTime::createFromFormat('Y-m-d', $date); diff --git a/src/BusinessLogic/Http/DTO/ShipmentLabel.php b/src/BusinessLogic/Http/DTO/ShipmentLabel.php index b3f432b6..28e28969 100644 --- a/src/BusinessLogic/Http/DTO/ShipmentLabel.php +++ b/src/BusinessLogic/Http/DTO/ShipmentLabel.php @@ -58,7 +58,7 @@ public function __construct($link, $printed = false, $createTimestamp = 0) */ public static function fromArray(array $batchRaw) { - return new self( + return new static( static::getDataValue($batchRaw, 'link'), static::getDataValue($batchRaw, 'printed', false), static::getDataValue($batchRaw, 'createTime', 0) diff --git a/src/BusinessLogic/Http/DTO/ShippingService.php b/src/BusinessLogic/Http/DTO/ShippingService.php index c909a97b..5a9bafd7 100644 --- a/src/BusinessLogic/Http/DTO/ShippingService.php +++ b/src/BusinessLogic/Http/DTO/ShippingService.php @@ -89,7 +89,7 @@ public function toArray() */ public static function fromArray(array $raw) { - $instance = new self(); + $instance = new static(); $instance->id = (int)self::getDataValue($raw, 'service_id'); $instance->enabled = (bool)self::getDataValue($raw, 'enabled'); diff --git a/src/BusinessLogic/Http/DTO/ShippingServiceDetails.php b/src/BusinessLogic/Http/DTO/ShippingServiceDetails.php index 8d771e83..291d61c6 100644 --- a/src/BusinessLogic/Http/DTO/ShippingServiceDetails.php +++ b/src/BusinessLogic/Http/DTO/ShippingServiceDetails.php @@ -175,7 +175,7 @@ public function toArray() */ public static function fromArray(array $raw) { - $instance = new self(); + $instance = new static(); $instance->id = self::getDataValue($raw, 'id'); $instance->carrierName = self::getDataValue($raw, 'carrier_name'); diff --git a/src/BusinessLogic/Http/DTO/ShippingServiceSearch.php b/src/BusinessLogic/Http/DTO/ShippingServiceSearch.php index 37a065b3..a3fd16f4 100644 --- a/src/BusinessLogic/Http/DTO/ShippingServiceSearch.php +++ b/src/BusinessLogic/Http/DTO/ShippingServiceSearch.php @@ -119,7 +119,7 @@ public function toArray() */ public static function fromArray(array $raw) { - $instance = new self(); + $instance = new static(); $instance->serviceId = self::getDataValue($raw, 'service_id', null); $instance->fromCountry = self::getDataValue($raw, 'from[country]'); diff --git a/src/BusinessLogic/Http/DTO/SystemInfo.php b/src/BusinessLogic/Http/DTO/SystemInfo.php index 0504ea9b..caf49d3a 100644 --- a/src/BusinessLogic/Http/DTO/SystemInfo.php +++ b/src/BusinessLogic/Http/DTO/SystemInfo.php @@ -45,7 +45,7 @@ class SystemInfo extends DataTransferObject */ public static function fromArray(array $raw) { - $instance = new self(); + $instance = new static(); $instance->systemId = !empty($raw['system_id']) ? $raw['system_id'] : null; $instance->systemName = !empty($raw['system_name']) ? $raw['system_name'] : ''; diff --git a/src/BusinessLogic/Http/DTO/Tracking.php b/src/BusinessLogic/Http/DTO/Tracking.php index 3d2bf4f4..10d7897d 100644 --- a/src/BusinessLogic/Http/DTO/Tracking.php +++ b/src/BusinessLogic/Http/DTO/Tracking.php @@ -53,7 +53,7 @@ public function toArray() */ public static function fromArray(array $raw) { - $tracking = new self(); + $tracking = new static(); $tracking->timestamp = static::getDataValue($raw, 'timestamp'); $tracking->description = static::getDataValue($raw, 'description'); $tracking->city = static::getDataValue($raw, 'city'); diff --git a/src/BusinessLogic/Http/DTO/User.php b/src/BusinessLogic/Http/DTO/User.php index a2a6ce7f..0eb8e796 100644 --- a/src/BusinessLogic/Http/DTO/User.php +++ b/src/BusinessLogic/Http/DTO/User.php @@ -60,7 +60,7 @@ public function toArray() */ public static function fromArray(array $raw) { - $user = new self(); + $user = new static(); $user->firstName = static::getDataValue($raw, 'name'); $user->lastName = static::getDataValue($raw, 'surname'); diff --git a/src/BusinessLogic/Location/LocationService.php b/src/BusinessLogic/Location/LocationService.php index a23e53f5..3609011d 100644 --- a/src/BusinessLogic/Location/LocationService.php +++ b/src/BusinessLogic/Location/LocationService.php @@ -63,18 +63,6 @@ protected function __construct() $this->configuration = ServiceRegister::getService(Configuration::CLASS_NAME); } - /** - * Creates instance of this class. - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create() - { - return new self(); - } - /** * Returns array of locations for this shipping method. * diff --git a/src/BusinessLogic/Order/Objects/TrackingHistory.php b/src/BusinessLogic/Order/Objects/TrackingHistory.php index 7c398c23..9121b966 100644 --- a/src/BusinessLogic/Order/Objects/TrackingHistory.php +++ b/src/BusinessLogic/Order/Objects/TrackingHistory.php @@ -37,7 +37,7 @@ class TrackingHistory */ public static function fromArray(array $raw) { - $result = new self(); + $result = new static(); $result->setCity($raw['city']); $result->setDescription($raw['description']); $result->setTimestamp($raw['timestamp']); diff --git a/src/BusinessLogic/Order/OrderService.php b/src/BusinessLogic/Order/OrderService.php index a52b9407..f925b305 100644 --- a/src/BusinessLogic/Order/OrderService.php +++ b/src/BusinessLogic/Order/OrderService.php @@ -67,18 +67,6 @@ protected function __construct() $this->configuration = ServiceRegister::getService(Configuration::CLASS_NAME); } - /** - * Creates instance of this class. - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create() - { - return new self(); - } - /** * Prepares shipment draft object for order with provided unique identifier. * diff --git a/src/BusinessLogic/OrderShipmentDetails/Models/OrderShipmentDetails.php b/src/BusinessLogic/OrderShipmentDetails/Models/OrderShipmentDetails.php index c16a73a3..1b5fd498 100644 --- a/src/BusinessLogic/OrderShipmentDetails/Models/OrderShipmentDetails.php +++ b/src/BusinessLogic/OrderShipmentDetails/Models/OrderShipmentDetails.php @@ -113,20 +113,6 @@ class OrderShipmentDetails extends Entity */ private $deleted = false; - /** - * Creates instance of this class. - * - * @param array $data - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create(array $data) - { - return new self(); - } - /** * Returns entity configuration object. * diff --git a/src/BusinessLogic/OrderShipmentDetails/OrderShipmentDetailsService.php b/src/BusinessLogic/OrderShipmentDetails/OrderShipmentDetailsService.php index 26bae334..c300cf1b 100644 --- a/src/BusinessLogic/OrderShipmentDetails/OrderShipmentDetailsService.php +++ b/src/BusinessLogic/OrderShipmentDetails/OrderShipmentDetailsService.php @@ -45,18 +45,6 @@ public function __construct() $this->repository = new OrderShipmentDetailsRepository(); } - /** - * Creates instance of this class. - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create() - { - return new self(); - } - /** * Retrieves order shipment details. * diff --git a/src/BusinessLogic/Registration/RegistrationLegalPolicy.php b/src/BusinessLogic/Registration/RegistrationLegalPolicy.php index 89722407..f0d72041 100644 --- a/src/BusinessLogic/Registration/RegistrationLegalPolicy.php +++ b/src/BusinessLogic/Registration/RegistrationLegalPolicy.php @@ -68,20 +68,6 @@ class RegistrationLegalPolicy extends FrontDto 'marketing_calls', ); - /** - * Creates instance of this class. - * - * @param array $data - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create(array $data) - { - return new self(); - } - /** * Transforms raw array data to its DTO. * diff --git a/src/BusinessLogic/Registration/RegistrationRequest.php b/src/BusinessLogic/Registration/RegistrationRequest.php index 2ab2de5d..9805e1cd 100644 --- a/src/BusinessLogic/Registration/RegistrationRequest.php +++ b/src/BusinessLogic/Registration/RegistrationRequest.php @@ -164,20 +164,6 @@ class RegistrationRequest extends FrontDto 'UN', ); - /** - * Creates instance of this class. - * - * @param array $data - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create(array $data) - { - return new self(); - } - /** * Transforms raw array data to its DTO. * diff --git a/src/BusinessLogic/Registration/RegistrationService.php b/src/BusinessLogic/Registration/RegistrationService.php index cca59843..e999dc06 100644 --- a/src/BusinessLogic/Registration/RegistrationService.php +++ b/src/BusinessLogic/Registration/RegistrationService.php @@ -26,18 +26,6 @@ class RegistrationService extends BaseService */ protected static $instance; - /** - * Creates instance of this class. - * - * @return static - * - * @noinspection PhpDocSignatureInspection - */ - public static function create() - { - return new self(); - } - /** * Registers a new user on Packlink PRO. * diff --git a/src/BusinessLogic/Resources/LocationPicker/css/locationPicker.css b/src/BusinessLogic/Resources/LocationPicker/css/locationPicker.css index 4fe73f3a..b8eb0f1e 100644 --- a/src/BusinessLogic/Resources/LocationPicker/css/locationPicker.css +++ b/src/BusinessLogic/Resources/LocationPicker/css/locationPicker.css @@ -136,9 +136,7 @@ top: 16px; left: 15px; text-transform: uppercase; - font-weight: bold; - font-size: 16px; - font-family: Roboto, Arial, sans-serif; + font: bold 16px Roboto, Arial, sans-serif; color: #9b9b9b; pointer-events: none; white-space: nowrap; @@ -154,9 +152,7 @@ top: 12px; left: 15px; text-transform: uppercase; - font-weight: bold; - font-size: 12px; - font-family: Roboto, Arial, sans-serif; + font: bold 12px Roboto, Arial, sans-serif; color: #5d5d5d; pointer-events: none; transition: all .25s ease-in; @@ -188,7 +184,6 @@ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - pointer-events: none; } .lp-location-wrapper > *:not(.street) { @@ -204,6 +199,10 @@ width: 100%; } +.lp-location-wrapper > * { + pointer-events: none; +} + .lp-location-wrapper .excluded { pointer-events: all !important; } diff --git a/src/BusinessLogic/Resources/css/app.css b/src/BusinessLogic/Resources/css/app.css index 639b736e..ff5ac497 100644 --- a/src/BusinessLogic/Resources/css/app.css +++ b/src/BusinessLogic/Resources/css/app.css @@ -402,7 +402,7 @@ min-width: 24px; margin: 0; } -#pl-page .pl-icon-button span { +#pl-page .pl-icon-button i { font-size: 20px; width: auto; color: #2095f2; @@ -413,7 +413,7 @@ #pl-page .pl-icon-button:hover { cursor: pointer; } -#pl-page .pl-icon-button:hover span { +#pl-page .pl-icon-button:hover i { color: #fff; } #pl-page section { @@ -449,12 +449,9 @@ } #pl-page .pl-button-group { flex-direction: row; - padding-right: 10px; } #pl-page .pl-button-group button { border-radius: 0; - height: 56px; - min-width: 110px; } #pl-page .pl-button-group button:first-child { border-radius: 4px 0 0 4px; @@ -514,7 +511,7 @@ #pl-page .pl-form-group select { -moz-padding-start: 11px; } -#pl-page .pl-form-group span { +#pl-page .pl-form-group i { position: absolute; right: 10px; top: 28px; @@ -523,7 +520,7 @@ width: 24px; height: 24px; } -#pl-page .pl-form-group select + span { +#pl-page .pl-form-group select + i { cursor: default; pointer-events: none; } @@ -572,7 +569,7 @@ color: #fff; content: '\2713'; margin: 0; - font: bold 20px/24px pl-proxima-nova, sans-serif; + font: bold 20px/24px pl-proxima-nova; width: 20px; min-width: 20px; height: 20px; @@ -605,7 +602,7 @@ #pl-page .pl-alert .pl-alert-text { color: inherit; } -#pl-page .pl-alert span { +#pl-page .pl-alert i { color: inherit; margin-left: 20px; } @@ -701,7 +698,7 @@ cursor: pointer; z-index: 1; } -#pl-page .pl-modal-mask .pl-modal .pl-modal-close-button span { +#pl-page .pl-modal-mask .pl-modal .pl-modal-close-button i { color: #2095f2; font-weight: bold; } @@ -745,7 +742,7 @@ #pl-page .pl-error input, #pl-page .pl-error select { border: 1px solid #e63f3f !important; } -#pl-page .pl-error label, #pl-page .pl-error span { +#pl-page .pl-error label, #pl-page .pl-error i { color: #e63f3f; } #pl-page .pl-error .pl-error-message { @@ -856,6 +853,13 @@ #pl-page .pl-shipping-services-list-item .pl-service-buttons .pl-button:not(.pl-hidden) + .pl-button { margin-left: 10px; } +#pl-page .pl-button-group { + padding-right: 10px; +} +#pl-page .pl-button-group button { + height: 56px; + min-width: 110px; +} #pl-page pre { white-space: normal; } @@ -908,8 +912,10 @@ padding: 10px; } } +@media (min-width: 769px) and (max-width: 1280px) { +} #pl-page .material-icons { - font-family: 'Material Icons Outlined', sans-serif; + font-family: 'Material Icons Outlined'; font-weight: normal; font-style: normal; font-size: 24px; @@ -938,7 +944,7 @@ align-items: center; padding-bottom: 20px; } -#pl-page .pl-onboarding-overview-list .pl-list-item span { +#pl-page .pl-onboarding-overview-list .pl-list-item i { margin-right: 10px; } #pl-page .pl-onboarding-overview-list .pl-list-item + .pl-list-item { @@ -1023,7 +1029,7 @@ margin-right: -20px; font-weight: bold; } -#pl-page .pl-configuration-menu span { +#pl-page .pl-configuration-menu i { margin-left: 10px; } #pl-page .pl-configuration-page { @@ -1273,3 +1279,5 @@ display: flex; } } +@media (min-width: 769px) and (max-width: 1280px) { +} diff --git a/src/BusinessLogic/Resources/js/DefaultWarehouseController.js b/src/BusinessLogic/Resources/js/DefaultWarehouseController.js index 56fb6603..18b33c4a 100644 --- a/src/BusinessLogic/Resources/js/DefaultWarehouseController.js +++ b/src/BusinessLogic/Resources/js/DefaultWarehouseController.js @@ -174,7 +174,7 @@ if (!window.Packlink) { } }, true); - postalCodeInput.parentElement.querySelector('span').addEventListener('click', (event) => { + postalCodeInput.parentElement.querySelector('i').addEventListener('click', (event) => { event.stopPropagation(); postalCodeInput.focus(); }); diff --git a/src/BusinessLogic/Resources/js/EditServiceController.js b/src/BusinessLogic/Resources/js/EditServiceController.js index b1861e91..c3c4338f 100644 --- a/src/BusinessLogic/Resources/js/EditServiceController.js +++ b/src/BusinessLogic/Resources/js/EditServiceController.js @@ -322,20 +322,16 @@ if (!window.Packlink) { } for (let systemId in pricePolicyControllers) { - if (pricePolicyControllers.hasOwnProperty(systemId)) { - let fieldName = pricePolicyControllers[systemId].getExcludedFieldForValidation(); - if (fieldName !== null) { - excludedElementNames.push(fieldName); - } + let fieldName = pricePolicyControllers[systemId].getExcludedFieldForValidation(); + if (fieldName !== null) { + excludedElementNames.push(fieldName); } } if (validationService.validateForm(form, excludedElementNames) && validateMiconfiguredPolicies()) { let pricingPolicies = []; for (let systemId in pricePolicyControllers) { - if (pricePolicyControllers.hasOwnProperty(systemId)) { - pricingPolicies = pricingPolicies.concat(pricePolicyControllers[systemId].getSystemPricingPolicies()); - } + pricingPolicies = pricingPolicies.concat(pricePolicyControllers[systemId].getSystemPricingPolicies()); } serviceModel.activated = true; diff --git a/src/BusinessLogic/Resources/js/OnboardingOverviewController.js b/src/BusinessLogic/Resources/js/OnboardingOverviewController.js index cd1376a0..c66afbe7 100644 --- a/src/BusinessLogic/Resources/js/OnboardingOverviewController.js +++ b/src/BusinessLogic/Resources/js/OnboardingOverviewController.js @@ -60,7 +60,7 @@ if (!window.Packlink) { } const populateSegment = (segment, data, editState, infoProvider) => { - const icon = segment.querySelector('span'); + const icon = segment.querySelector('i'); const button = segment.querySelector('button'); const details = segment.querySelector('.pl-item-details'); diff --git a/src/BusinessLogic/Resources/js/OrderStatusMappingController.js b/src/BusinessLogic/Resources/js/OrderStatusMappingController.js index eca79902..def57b8b 100644 --- a/src/BusinessLogic/Resources/js/OrderStatusMappingController.js +++ b/src/BusinessLogic/Resources/js/OrderStatusMappingController.js @@ -88,9 +88,7 @@ if (!window.Packlink) { mappings = response.mappings; for (const status in statuses) { - if (statuses.hasOwnProperty(status)) { - mappingsDiv.appendChild(injectStatus(status, statuses[status], mappings[status], response.orderStatuses)); - } + mappingsDiv.appendChild(injectStatus(status, statuses[status], mappings[status], response.orderStatuses)); } btn.addEventListener('click', saveOrderStatusMappings, true); diff --git a/src/BusinessLogic/Resources/scss/app.scss b/src/BusinessLogic/Resources/scss/app.scss index 3c76ea32..b780e9f9 100644 --- a/src/BusinessLogic/Resources/scss/app.scss +++ b/src/BusinessLogic/Resources/scss/app.scss @@ -23,7 +23,7 @@ align-items: center; padding-bottom: 20px; - span { + i { margin-right: 10px; } @@ -128,7 +128,7 @@ margin-right: -20px; font-weight: bold; - span { + i { margin-left: 10px; } } @@ -464,4 +464,10 @@ } } } +} + +// tablet rules +@media (min-width: 769px) and (max-width: 1280px) { + #pl-page { + } } \ No newline at end of file diff --git a/src/BusinessLogic/Resources/scss/icons.scss b/src/BusinessLogic/Resources/scss/icons.scss index 59c266b8..25e42f64 100644 --- a/src/BusinessLogic/Resources/scss/icons.scss +++ b/src/BusinessLogic/Resources/scss/icons.scss @@ -2,7 +2,7 @@ //noinspection CssNoGenericFontName #pl-page .material-icons { - font-family: 'Material Icons Outlined', sans-serif; + font-family: 'Material Icons Outlined'; font-weight: normal; font-style: normal; font-size: 24px; diff --git a/src/BusinessLogic/Resources/scss/ui-controls.scss b/src/BusinessLogic/Resources/scss/ui-controls.scss index ceed7dc3..7038927e 100644 --- a/src/BusinessLogic/Resources/scss/ui-controls.scss +++ b/src/BusinessLogic/Resources/scss/ui-controls.scss @@ -113,7 +113,7 @@ min-width: $icon-button-size; margin: 0; - span { + i { font-size: 20px; width: auto; color: $color-blue; @@ -126,7 +126,7 @@ &:hover { cursor: pointer; - span { + i { color: $color-white; } } @@ -173,12 +173,9 @@ .pl-button-group { flex-direction: row; - padding-right: 10px; button { border-radius: 0; - height: $input-height; - min-width: 110px; &:first-child { border-radius: 4px 0 0 4px; @@ -250,7 +247,7 @@ -moz-padding-start: 11px; } - span { + i { position: absolute; right: 10px; top: $input-height/2; @@ -260,7 +257,7 @@ height: $icon-button-size; } - select + span { + select + i { cursor: default; pointer-events: none; } @@ -316,7 +313,7 @@ color: $color-white; content: '\2713'; margin: 0; - font: bold 20px/24px pl-proxima-nova, sans-serif; + font: bold 20px/24px pl-proxima-nova; width: $checkbox-size; min-width: $checkbox-size; height: $checkbox-size; @@ -356,7 +353,7 @@ color: inherit; } - span { + i { color: inherit; margin-left: 20px; } @@ -469,7 +466,7 @@ cursor: pointer; z-index: 1; - span { + i { color: $color-blue; font-weight: bold; } @@ -526,7 +523,7 @@ border: 1px solid $color-red !important; } - label, span { + label, i { color: $color-red; } @@ -664,6 +661,15 @@ } } + .pl-button-group { + padding-right: 10px; + + button { + height: $input-height; + min-width: 110px; + } + } + pre { white-space: normal; } @@ -745,3 +751,9 @@ } } } + +// tablet rules +@media (min-width: 769px) and (max-width: 1280px) { + #pl-page { + } +} diff --git a/src/BusinessLogic/Resources/templates/configuration.html b/src/BusinessLogic/Resources/templates/configuration.html index a7c9ac2f..00657bb3 100644 --- a/src/BusinessLogic/Resources/templates/configuration.html +++ b/src/BusinessLogic/Resources/templates/configuration.html @@ -2,17 +2,17 @@

{$configuration.menu}

- fact_check + fact_check
{$configuration.orderStatus}
- chevron_right + chevron_right
@@ -21,7 +21,7 @@

{$configuration.menu}

{$configuration.warehouse}
- chevron_right + chevron_right
{$configuration.menu}
{$configuration.parcel}
- chevron_right + chevron_right
diff --git a/src/BusinessLogic/Resources/templates/countries-selection-modal.html b/src/BusinessLogic/Resources/templates/countries-selection-modal.html index b6f41e8f..a7c267e4 100644 --- a/src/BusinessLogic/Resources/templates/countries-selection-modal.html +++ b/src/BusinessLogic/Resources/templates/countries-selection-modal.html @@ -5,7 +5,7 @@
{$shippingServices.atLeastOneCountry} - close + close
diff --git a/src/BusinessLogic/Resources/templates/default-parcel.html b/src/BusinessLogic/Resources/templates/default-parcel.html index dea72c21..f4ff6852 100644 --- a/src/BusinessLogic/Resources/templates/default-parcel.html +++ b/src/BusinessLogic/Resources/templates/default-parcel.html @@ -1,7 +1,7 @@

diff --git a/src/BusinessLogic/Resources/templates/default-warehouse.html b/src/BusinessLogic/Resources/templates/default-warehouse.html index 8b2ceee1..4899c44d 100644 --- a/src/BusinessLogic/Resources/templates/default-warehouse.html +++ b/src/BusinessLogic/Resources/templates/default-warehouse.html @@ -1,7 +1,7 @@

@@ -37,7 +37,7 @@

- expand_more + expand_more
@@ -46,7 +46,7 @@

data-required="true" autocomplete="no"/> - search + search

{$shippingServices.configureService}

@@ -34,7 +34,7 @@

{$shippingServices.configureService}

- expand_more + expand_more @@ -72,8 +72,8 @@

{$shippingServices.configureService}

{$shippingServices.configurePricePolicy}
- toggle_on - toggle_off + toggle_on + toggle_off
@@ -100,7 +100,7 @@

{$shippingServices.configureService}

- expand_more + expand_more diff --git a/src/BusinessLogic/Resources/templates/onboarding-overview.html b/src/BusinessLogic/Resources/templates/onboarding-overview.html index bc845339..01c226fe 100644 --- a/src/BusinessLogic/Resources/templates/onboarding-overview.html +++ b/src/BusinessLogic/Resources/templates/onboarding-overview.html @@ -7,7 +7,7 @@

- check + check
{$onboardingOverview.parcelDetails}
@@ -19,7 +19,7 @@

- check + check
{$onboardingOverview.senderAddress}
diff --git a/src/BusinessLogic/Resources/templates/order-status-mapping.html b/src/BusinessLogic/Resources/templates/order-status-mapping.html index 850e0b79..4f46b3e5 100644 --- a/src/BusinessLogic/Resources/templates/order-status-mapping.html +++ b/src/BusinessLogic/Resources/templates/order-status-mapping.html @@ -1,7 +1,7 @@

{$orderStatusMapping.title}

@@ -32,11 +32,11 @@

{$orderStatusMapping.title}

- chevron_right + chevron_right
- expand_more + expand_more
\ No newline at end of file diff --git a/src/BusinessLogic/Resources/templates/pick-shipping-services.html b/src/BusinessLogic/Resources/templates/pick-shipping-services.html index b762e1e3..98b4ecbc 100644 --- a/src/BusinessLogic/Resources/templates/pick-shipping-services.html +++ b/src/BusinessLogic/Resources/templates/pick-shipping-services.html @@ -1,12 +1,12 @@

{$shippingServices.pickShippingService}

diff --git a/src/BusinessLogic/Resources/templates/pricing-policy-modal.html b/src/BusinessLogic/Resources/templates/pricing-policy-modal.html index 15fb44b7..afb17037 100644 --- a/src/BusinessLogic/Resources/templates/pricing-policy-modal.html +++ b/src/BusinessLogic/Resources/templates/pricing-policy-modal.html @@ -11,7 +11,7 @@ - expand_more + expand_more @@ -57,7 +57,7 @@ - expand_more + expand_more diff --git a/src/BusinessLogic/Resources/templates/register-modal.html b/src/BusinessLogic/Resources/templates/register-modal.html index 0d0ba103..e0cdf2ac 100644 --- a/src/BusinessLogic/Resources/templates/register-modal.html +++ b/src/BusinessLogic/Resources/templates/register-modal.html @@ -1,7 +1,7 @@
- search + search