From 87706d67d0df6c7df411ddb67d3789e23c77c93e Mon Sep 17 00:00:00 2001 From: Gytautas Date: Tue, 3 Sep 2024 15:04:18 +0300 Subject: [PATCH] fixed modal view --- src/Repository/MolLogRepository.php | 15 ++------ src/Repository/MolLogRepositoryInterface.php | 2 -- .../ReadOnlyRepositoryInterface.php | 35 +++++++++++++++++++ views/css/admin/logs/log.css | 13 ++++--- views/js/admin/logs/log.js | 13 ++++--- views/templates/admin/logs/log_modal.tpl | 12 +++---- .../admin/logs/severity_level_column.tpl | 13 +++---- .../templates/admin/logs/severity_levels.tpl | 13 +++---- 8 files changed, 70 insertions(+), 46 deletions(-) create mode 100644 src/Repository/ReadOnlyRepositoryInterface.php diff --git a/src/Repository/MolLogRepository.php b/src/Repository/MolLogRepository.php index 70b874602..4d0f9cd8d 100644 --- a/src/Repository/MolLogRepository.php +++ b/src/Repository/MolLogRepository.php @@ -13,6 +13,7 @@ namespace Mollie\Repository; use DusanKasan\Knapsack\Collection; +use Mollie\Subscription\Exception\NotImplementedException; if (!defined('_PS_VERSION_')) { exit; @@ -37,18 +38,8 @@ public function prune(int $daysToKeep): void ->realize(); } - public function findAll(int $langId = null): \PrestaShopCollection + public function findAll() { - // TODO: Implement findAll() method. - } - - public function findAllBy(array $keyValueCriteria, int $langId = null): ?\PrestaShopCollection - { - // TODO: Implement findAllBy() method. - } - - public function findOrFail(array $keyValueCriteria, int $langId = null): \ObjectModel - { - // TODO: Implement findOrFail() method. + throw new NotImplementedException('Find all not implemented'); } } diff --git a/src/Repository/MolLogRepositoryInterface.php b/src/Repository/MolLogRepositoryInterface.php index e1f06ddb8..5e2c0d618 100644 --- a/src/Repository/MolLogRepositoryInterface.php +++ b/src/Repository/MolLogRepositoryInterface.php @@ -12,8 +12,6 @@ namespace Mollie\Repository; -use Mollie\Shared\Infrastructure\Repository\ReadOnlyRepositoryInterface; - if (!defined('_PS_VERSION_')) { exit; } diff --git a/src/Repository/ReadOnlyRepositoryInterface.php b/src/Repository/ReadOnlyRepositoryInterface.php new file mode 100644 index 000000000..2597ebed9 --- /dev/null +++ b/src/Repository/ReadOnlyRepositoryInterface.php @@ -0,0 +1,35 @@ + + * @copyright Mollie B.V. + * @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md + * + * @see https://github.com/mollie/PrestaShop + * @codingStandardsIgnoreStart + */ + +namespace Mollie\Repository; + +use ObjectModel; +use PrestaShopCollection; + +if (!defined('_PS_VERSION_')) { + exit; +} + +interface ReadOnlyRepositoryInterface +{ + /** + * @return PrestaShopCollection + */ + public function findAll(); + + /** + * @param array $keyValueCriteria - e.g [ 'id_cart' => 5 ] + * + * @return ObjectModel|null + */ + public function findOneBy(array $keyValueCriteria); +} diff --git a/views/css/admin/logs/log.css b/views/css/admin/logs/log.css index ca01cd3bf..b87948e15 100755 --- a/views/css/admin/logs/log.css +++ b/views/css/admin/logs/log.css @@ -1,13 +1,12 @@ /** - * NOTICE OF LICENSE + * Mollie https://www.mollie.nl * - * @author Mastercard Inc. www.mastercard.com - * @copyright Copyright (c) permanent, Mastercard Inc. - * @license Apache-2.0 + * @author Mollie B.V. + * @copyright Mollie B.V. + * @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md * - * @see /LICENSE - * - * International Registered Trademark & Property of Mastercard Inc. + * @see https://github.com/mollie/PrestaShop + * @codingStandardsIgnoreStart */ .button { diff --git a/views/js/admin/logs/log.js b/views/js/admin/logs/log.js index 52a2da2d9..f36b101c8 100755 --- a/views/js/admin/logs/log.js +++ b/views/js/admin/logs/log.js @@ -1,13 +1,12 @@ /** - * NOTICE OF LICENSE + * Mollie https://www.mollie.nl * - * @author Mastercard Inc. www.mastercard.com - * @copyright Copyright (c) permanent, Mastercard Inc. - * @license Apache-2.0 + * @author Mollie B.V. + * @copyright Mollie B.V. + * @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md * - * @see /LICENSE - * - * International Registered Trademark & Property of Mastercard Inc. + * @see https://github.com/mollie/PrestaShop + * @codingStandardsIgnoreStart */ $(document).ready(function () { diff --git a/views/templates/admin/logs/log_modal.tpl b/views/templates/admin/logs/log_modal.tpl index 44427032c..85f936b7f 100755 --- a/views/templates/admin/logs/log_modal.tpl +++ b/views/templates/admin/logs/log_modal.tpl @@ -1,13 +1,13 @@ {** - * NOTICE OF LICENSE + * Mollie https://www.mollie.nl * - * @author Mastercard Inc. www.mastercard.com - * @copyright Copyright (c) permanent, Mastercard Inc. - * @license Apache-2.0 + * @author Mollie B.V. + * @copyright Mollie B.V. + * @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md * - * @see /LICENSE + * @see https://github.com/mollie/PrestaShop + * @codingStandardsIgnoreStart * - * International Registered Trademark & Property of Mastercard Inc. *}
+ * @copyright Mollie B.V. + * @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md * - * @see /LICENSE + * @see https://github.com/mollie/PrestaShop + * @codingStandardsIgnoreStart * - * International Registered Trademark & Property of Mastercard Inc. *} + {if $log_severity_level == $log_severity_level_informative} {l s='Informative only' mod='mollie'} ({$log_severity_level|intval}) {elseif $log_severity_level == $log_severity_level_warning} diff --git a/views/templates/admin/logs/severity_levels.tpl b/views/templates/admin/logs/severity_levels.tpl index 7b0a78a6b..3620ae32d 100755 --- a/views/templates/admin/logs/severity_levels.tpl +++ b/views/templates/admin/logs/severity_levels.tpl @@ -1,15 +1,16 @@ {** - * NOTICE OF LICENSE + * Mollie https://www.mollie.nl * - * @author Mastercard Inc. www.mastercard.com - * @copyright Copyright (c) permanent, Mastercard Inc. - * @license Apache-2.0 + * @author Mollie B.V. + * @copyright Mollie B.V. + * @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md * - * @see /LICENSE + * @see https://github.com/mollie/PrestaShop + * @codingStandardsIgnoreStart * - * International Registered Trademark & Property of Mastercard Inc. *} +