diff --git a/src/Entity/Lengow/Action/ActionEntity.php b/src/Entity/Lengow/Action/ActionEntity.php index 1402491..61e6948 100644 --- a/src/Entity/Lengow/Action/ActionEntity.php +++ b/src/Entity/Lengow/Action/ActionEntity.php @@ -52,14 +52,14 @@ class ActionEntity extends Entity protected $state; /** - * @var DateTimeInterface|null + * @var \DateTimeInterface|null */ - protected $createdAt; + protected ?\DateTimeInterface $createdAt = null; /** - * @var DateTimeInterface|null + * @var \DateTimeInterface|null */ - protected $updatedAt; + protected ?\DateTimeInterface $updatedAt = null; /** * @return ShopwareOrderEntity diff --git a/src/Entity/Lengow/Order/OrderEntity.php b/src/Entity/Lengow/Order/OrderEntity.php index 4eb835d..a94f0a2 100644 --- a/src/Entity/Lengow/Order/OrderEntity.php +++ b/src/Entity/Lengow/Order/OrderEntity.php @@ -163,14 +163,14 @@ class OrderEntity extends Entity protected $message; /** - * @var DateTimeInterface|null + * @var \DateTimeInterface|null */ - protected $createdAt; + protected ?\DateTimeInterface $createdAt = null; /** - * @var DateTimeInterface|null + * @var \DateTimeInterface|null */ - protected $updatedAt; + protected ?\DateTimeInterface $updatedAt = null; /** * @var DateTimeInterface|null diff --git a/src/Entity/Lengow/OrderError/OrderErrorEntity.php b/src/Entity/Lengow/OrderError/OrderErrorEntity.php index 79a238e..31bc10f 100644 --- a/src/Entity/Lengow/OrderError/OrderErrorEntity.php +++ b/src/Entity/Lengow/OrderError/OrderErrorEntity.php @@ -42,14 +42,14 @@ class OrderErrorEntity extends Entity protected $mail; /** - * @var DateTimeInterface|null + * @var \DateTimeInterface|null */ - protected $createdAt; + protected ?\DateTimeInterface $createdAt = null; /** - * @var DateTimeInterface|null + * @var \DateTimeInterface|null */ - protected $updatedAt; + protected ?\DateTimeInterface $updatedAt = null; /** * @return LengowOrderEntity diff --git a/src/Entity/Lengow/OrderLine/OrderLineEntity.php b/src/Entity/Lengow/OrderLine/OrderLineEntity.php index 1962736..364156e 100644 --- a/src/Entity/Lengow/OrderLine/OrderLineEntity.php +++ b/src/Entity/Lengow/OrderLine/OrderLineEntity.php @@ -33,14 +33,14 @@ class OrderLineEntity extends Entity protected $orderLineId; /** - * @var DateTimeInterface|null + * @var \DateTimeInterface|null */ - protected $createdAt; + protected ?\DateTimeInterface $createdAt = null; /** - * @var DateTimeInterface|null + * @var \DateTimeInterface|null */ - protected $updatedAt; + protected ?\DateTimeInterface $updatedAt = null; /** * @return ShopwareOrderEntity diff --git a/src/Entity/Lengow/Product/ProductEntity.php b/src/Entity/Lengow/Product/ProductEntity.php index f795cde..d66fa74 100644 --- a/src/Entity/Lengow/Product/ProductEntity.php +++ b/src/Entity/Lengow/Product/ProductEntity.php @@ -26,9 +26,9 @@ class ProductEntity extends Entity protected $salesChannel; /** - * @var DateTimeInterface + * @var \DateTimeInterface|null */ - protected $createdAt; + protected ?\DateTimeInterface $createdAt = null; /** * @return string @@ -63,17 +63,17 @@ public function setSalesChannel(ShopwareSalesChannelEntity $salesChannel): void } /** - * @return DateTimeInterface + * @return \DateTimeInterface|null */ - public function getCreatedAt(): DateTimeInterface + public function getCreatedAt(): ?DateTimeInterface { return $this->createdAt; } /** - * @param DateTimeInterface $createdAt + * @param \DateTimeInterface|null $createdAt */ - public function setCreatedAt(DateTimeInterface $createdAt): void + public function setCreatedAt(?DateTimeInterface $createdAt): void { $this->createdAt = $createdAt; } diff --git a/src/Entity/Lengow/Settings/SettingsEntity.php b/src/Entity/Lengow/Settings/SettingsEntity.php index 2984d29..314cad1 100644 --- a/src/Entity/Lengow/Settings/SettingsEntity.php +++ b/src/Entity/Lengow/Settings/SettingsEntity.php @@ -32,14 +32,14 @@ class SettingsEntity extends Entity protected $value; /** - * @var DateTimeInterface + * @var \DateTimeInterface|null */ - protected $createdAt; + protected ?\DateTimeInterface $createdAt = null; /** - * @var DateTimeInterface + * @var \DateTimeInterface|null */ - protected $updatedAt; + protected ?\DateTimeInterface $updatedAt = null; /** * @return ShopwareSalesChannelEntity|null @@ -90,33 +90,33 @@ public function setValue(?string $value): void } /** - * @return DateTimeInterface + * @return \DateTimeInterface|null */ - public function getCreatedAt(): DateTimeInterface + public function getCreatedAt(): ?DateTimeInterface { return $this->createdAt; } /** - * @param DateTimeInterface $createdAt + * @param \DateTimeInterface|null $createdAt */ - public function setCreatedAt(DateTimeInterface $createdAt): void + public function setCreatedAt(?DateTimeInterface $createdAt): void { $this->createdAt = $createdAt; } /** - * @return DateTimeInterface + * @return \DateTimeInterface|null */ - public function getUpdatedAt(): DateTimeInterface + public function getUpdatedAt(): ?DateTimeInterface { return $this->updatedAt; } /** - * @param DateTimeInterface $updatedAt + * @param \DateTimeInterface|null $updatedAt */ - public function setUpdatedAt(DateTimeInterface $updatedAt): void + public function setUpdatedAt(?DateTimeInterface $updatedAt): void { $this->updatedAt = $updatedAt; } diff --git a/src/EntityExtension/Extension/ProductExtension.php b/src/EntityExtension/Extension/ProductExtension.php index 8d86619..ec67e0d 100644 --- a/src/EntityExtension/Extension/ProductExtension.php +++ b/src/EntityExtension/Extension/ProductExtension.php @@ -31,4 +31,12 @@ public function getDefinitionClass(): string { return ProductDefinition::class; } + + /** + * @return string + */ + public function getEntityName(): string + { + return 'product'; + } } \ No newline at end of file diff --git a/src/LengowConnector.php b/src/LengowConnector.php index 5d37428..11ba1d9 100644 --- a/src/LengowConnector.php +++ b/src/LengowConnector.php @@ -70,9 +70,9 @@ public function uninstall(UninstallContext $uninstallContext): void if (!$uninstallContext->keepUserData()) { $connection = $this->container->get(Connection::class); - $connection->executeUpdate('DROP TABLE IF EXISTS `lengow_order`, `lengow_order_line`, `lengow_order_error`, `lengow_action`, `lengow_settings`, `lengow_product`;'); + $connection->executeStatement('DROP TABLE IF EXISTS `lengow_order`, `lengow_order_line`, `lengow_order_error`, `lengow_action`, `lengow_settings`, `lengow_product`;'); - $connection->executeUpdate(' + $connection->executeStatement(' DELETE FROM state_machine_transition WHERE to_state_id = ( SELECT id FROM state_machine_state WHERE technical_name = "lengow_technical_error" @@ -81,7 +81,7 @@ public function uninstall(UninstallContext $uninstallContext): void ); '); - $connection->executeUpdate(' + $connection->executeStatement(' DELETE FROM state_machine_state WHERE technical_name = "lengow_technical_error"; '); @@ -106,6 +106,7 @@ private function addPaymentMethod(Context $context): void // payment handler will be selected by the identifier 'handlerIdentifier' => LengowPayment::class, 'name' => 'Lengow payment', + 'technicalName' => 'lengow_payment', 'description' => 'Lengow payment, DO NOT activate NOR delete', 'pluginId' => $pluginId, 'afterOrderEnabled' => false, diff --git a/src/Migration/Migration1606313662Init.php b/src/Migration/Migration1606313662Init.php index e833daa..7a49156 100644 --- a/src/Migration/Migration1606313662Init.php +++ b/src/Migration/Migration1606313662Init.php @@ -21,7 +21,7 @@ public function update(Connection $connection): void * order (FK order_id) * sales_channel (FK sales_channel_id) */ - $connection->executeUpdate(' + $connection->executeStatement(' CREATE TABLE IF NOT EXISTS `lengow_order` ( `id` BINARY(16) NOT NULL, `order_id` BINARY(16) NULL DEFAULT NULL, @@ -73,7 +73,7 @@ public function update(Connection $connection): void * order (FK order_id) * product (FK product_id) */ - $connection->executeUpdate(' + $connection->executeStatement(' CREATE TABLE IF NOT EXISTS `lengow_order_line` ( `id` BINARY(16) NOT NULL, `order_id` BINARY(16) NOT NULL, @@ -91,7 +91,7 @@ public function update(Connection $connection): void * this table reference another lengow table : * lengow_order (FK lengow_order_id) */ - $connection->executeUpdate(' + $connection->executeStatement(' CREATE TABLE IF NOT EXISTS `lengow_order_error` ( `id` BINARY(16) NOT NULL, `lengow_order_id` BINARY(16) NOT NULL, @@ -111,7 +111,7 @@ public function update(Connection $connection): void * this table reference 1 shopware base table : * order (FK order_id) */ - $connection->executeUpdate(' + $connection->executeStatement(' CREATE TABLE IF NOT EXISTS `lengow_action` ( `id` BINARY(16) NOT NULL, `order_id` BINARY(16) NOT NULL, @@ -133,7 +133,7 @@ public function update(Connection $connection): void * this table reference 1 shopware base table : * sales_channel (FK sales_channel_id) */ - $connection->executeUpdate(' + $connection->executeStatement(' CREATE TABLE IF NOT EXISTS `lengow_settings` ( `id` BINARY(16) NOT NULL, `sales_channel_id` BINARY(16) NULL DEFAULT NULL, @@ -153,7 +153,7 @@ public function update(Connection $connection): void * product (FK product_id) * sales_channel (FK sales_channel_id) */ - $connection->executeUpdate(' + $connection->executeStatement(' CREATE TABLE IF NOT EXISTS `lengow_product` ( `id` BINARY(16) NOT NULL, `product_id` BINARY(16) NOT NULL, @@ -171,7 +171,7 @@ public function update(Connection $connection): void * order state are linked to state_machine (order.state here) */ $StateUuid = Uuid::randomHex(); // Generate new uuid for insert - $connection->executeUpdate(' + $connection->executeStatement(' INSERT IGNORE INTO state_machine_state VALUES ( UNHEX("' . $StateUuid . '"), "lengow_technical_error", @@ -197,7 +197,7 @@ public function update(Connection $connection): void */ $uuid = Uuid::randomHex(); // Generate new uuid for insert $availableStateUuid = Uuid::fromBytesToHex($state['id']); - $connection->executeUpdate(' + $connection->executeStatement(' INSERT IGNORE INTO state_machine_transition VALUES ( UNHEX("' . $uuid . '"), "technical_error", @@ -219,7 +219,7 @@ public function update(Connection $connection): void '); } $uuid = Uuid::randomHex(); // Generate new uuid for insert - $connection->executeUpdate(' + $connection->executeStatement(' INSERT IGNORE INTO state_machine_transition VALUES ( UNHEX("' . $uuid . '"), "cancel_technical_error", @@ -252,7 +252,7 @@ public function update(Connection $connection): void foreach ($languageAvailable as $language) { $languageId = Uuid::fromBytesToHex($language['id']); if ($languageId) { - $connection->executeUpdate(' + $connection->executeStatement(' INSERT IGNORE INTO state_machine_state_translation VALUES ( UNHEX("' . $languageId . '"), ( @@ -272,7 +272,7 @@ public function update(Connection $connection): void public function updateDestructive(Connection $connection): void { - $connection->executeUpdate(' + $connection->executeStatement(' DROP TABLE IF EXISTS `lengow_settings`, `lengow_product`, diff --git a/src/Migration/Migration1624606589Update102.php b/src/Migration/Migration1624606589Update102.php index ce75256..3122447 100644 --- a/src/Migration/Migration1624606589Update102.php +++ b/src/Migration/Migration1624606589Update102.php @@ -15,7 +15,7 @@ public function getCreationTimestamp(): int public function update(Connection $connection): void { // modifying the value field to be able to store JSON data - $connection->executeUpdate('ALTER TABLE `lengow_settings` CHANGE `value` `value` TEXT NULL DEFAULT NULL'); + $connection->executeStatement('ALTER TABLE `lengow_settings` CHANGE `value` `value` TEXT NULL DEFAULT NULL'); } public function updateDestructive(Connection $connection): void diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-action-button/lgw-action-button.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-action-button/lgw-action-button.html.twig index 1ca564e..9d2f0a1 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-action-button/lgw-action-button.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-action-button/lgw-action-button.html.twig @@ -1,21 +1,19 @@ {% block lgw_action_button %} - +
+ + {{ buttonContent }} + + {{ tooltipTitle }} +
    +
  • + {{ error }} +
  • +
+
+
+ +
{% endblock %} \ No newline at end of file diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-action-label/lgw-action-label.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-action-label/lgw-action-label.html.twig index a7b9529..2736973 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-action-label/lgw-action-label.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-action-label/lgw-action-label.html.twig @@ -1,10 +1,8 @@ {% block lgw_action_label %} - +
+ + {{ labelContent }} + + +
{% endblock %} \ No newline at end of file diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-catalog-select/index.js b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-catalog-select/index.js index 0f6b28a..a6a9fc9 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-catalog-select/index.js +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-catalog-select/index.js @@ -1,8 +1,7 @@ -import template from './lgw-catalog-select.hmtl.twig'; +import template from './lgw-catalog-select.html.twig'; import './lgw-catalog-select.scss'; const { Component } = Shopware; -const { mapState } = Shopware.Component.getComponentHelper(); Component.register('lgw-catalog-select', { template, @@ -39,7 +38,20 @@ Component.register('lgw-catalog-select', { }, computed: { - ...mapState('lgwConnection', ['catalogList', 'catalogSelected', 'catalogSelectionChanged']) + catalogList() { + const state = Shopware.State.get('lgwConnection'); + return state && state.catalogList ? state.catalogList : []; + }, + + catalogSelected() { + const state = Shopware.State.get('lgwConnection'); + return state && state.catalogSelected ? state.catalogSelected : {}; + }, + + catalogSelectionChanged() { + const state = Shopware.State.get('lgwConnection'); + return state && state.catalogSelectionChanged ? state.catalogSelectionChanged : false; + } }, watch: { diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-catalog-select/lgw-catalog-select.hmtl.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-catalog-select/lgw-catalog-select.hmtl.twig deleted file mode 100644 index c7fa557..0000000 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-catalog-select/lgw-catalog-select.hmtl.twig +++ /dev/null @@ -1,16 +0,0 @@ -{% block lgw_catalog_select %} - -{% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-catalog-select/lgw-catalog-select.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-catalog-select/lgw-catalog-select.html.twig new file mode 100644 index 0000000..db3392d --- /dev/null +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-catalog-select/lgw-catalog-select.html.twig @@ -0,0 +1,14 @@ +{% block lgw_catalog_select %} +
+

{{ salesChannel.name }}

+ + +
+{% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-conditional-string-field/lgw-conditional-string-field.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-conditional-string-field/lgw-conditional-string-field.html.twig index e37c2df..32cbc68 100755 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-conditional-string-field/lgw-conditional-string-field.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-conditional-string-field/lgw-conditional-string-field.html.twig @@ -1,28 +1,26 @@ {% block lgw_conditional_string_field %} - +
+ + + + + + +
{% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-country-icon/lgw-country-icon.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-country-icon/lgw-country-icon.html.twig index f7c9293..c8e20f9 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-country-icon/lgw-country-icon.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-country-icon/lgw-country-icon.html.twig @@ -1,12 +1,10 @@ {% block lgw_country_icon %} - +
+ + +
{% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-debug-warning/lgw-debug-warning.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-debug-warning/lgw-debug-warning.html.twig index 0babfa3..44a2807 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-debug-warning/lgw-debug-warning.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-debug-warning/lgw-debug-warning.html.twig @@ -1,5 +1,3 @@ {% block lengow_debug_warning %} - + Debug mode {% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-description-list-element/lgw-description-list-element.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-description-list-element/lgw-description-list-element.html.twig index 5209566..32ba42e 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-description-list-element/lgw-description-list-element.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-description-list-element/lgw-description-list-element.html.twig @@ -1,23 +1,21 @@ {% block lgw_description_list_element %} - +
+
{{ title }}
+
+ +
+ {{ formatDate(content) }} +
+
+ + {{ value }} + +
+ + {{ content }} + +
+
{% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-footer/lgw-footer.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-footer/lgw-footer.html.twig index ef5280c..cd91df5 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-footer/lgw-footer.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-footer/lgw-footer.html.twig @@ -1,24 +1,22 @@ {% block lgw_footer %} - + {% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-free-trial-warning/lgw-free-trial-warning.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-free-trial-warning/lgw-free-trial-warning.html.twig index 30e574f..446909f 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-free-trial-warning/lgw-free-trial-warning.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-free-trial-warning/lgw-free-trial-warning.html.twig @@ -1,12 +1,10 @@ {% block lgw_free_trial_warning %} - + + {{ $tc('lengow-connector.global.trial_1') }} + {{ dayLeft }} + {{ $tc('lengow-connector.global.trial_2') }} + + {{ $tc('lengow-connector.global.upgrade_account') }} + + {% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-lockable-string-field/lgw-lockable-string-field.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-lockable-string-field/lgw-lockable-string-field.html.twig index dcd1b39..f93b7ec 100755 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-lockable-string-field/lgw-lockable-string-field.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-lockable-string-field/lgw-lockable-string-field.html.twig @@ -1,22 +1,20 @@ {% block lgw_lockable_string_field %} - +
+ + + + +
{% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-order-state-label/lgw-order-state-label.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-order-state-label/lgw-order-state-label.html.twig index 29be9bd..0185ae3 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-order-state-label/lgw-order-state-label.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-order-state-label/lgw-order-state-label.html.twig @@ -1,7 +1,5 @@ {% block lgw_order_state_label %} - + + {{ orderStateTranslation }} + {% endblock %} \ No newline at end of file diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-order-type-icon/lgw-order-type-icon.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-order-type-icon/lgw-order-type-icon.html.twig index 9614b43..1840b60 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-order-type-icon/lgw-order-type-icon.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-order-type-icon/lgw-order-type-icon.html.twig @@ -1,7 +1,5 @@ {% block lgw_order_type_icon %} - +
+ +
{% endblock %} \ No newline at end of file diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-update-modal/lgw-update-modal.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-update-modal/lgw-update-modal.html.twig index 5aa1874..fd8383b 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-update-modal/lgw-update-modal.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-update-modal/lgw-update-modal.html.twig @@ -1,73 +1,71 @@ {% block lgw_update_modal %} - + + {% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-update-warning/lgw-update-warning.html.twig b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-update-warning/lgw-update-warning.html.twig index abf6960..77edc96 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/component/lgw-update-warning/lgw-update-warning.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/component/lgw-update-warning/lgw-update-warning.html.twig @@ -1,12 +1,10 @@ {% block lgw_update_warning %} - + + {{ $tc('lengow-connector.global.new_version_available_1') }} + {{ version }} + {{ $tc('lengow-connector.global.new_version_available_2') }} + + {% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/page/lgw-order-list/lgw-order-list.html.twig b/src/Resources/app/administration/src/module/lengow-connector/page/lgw-order-list/lgw-order-list.html.twig index 9ff80ef..f820c9e 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/page/lgw-order-list/lgw-order-list.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/page/lgw-order-list/lgw-order-list.html.twig @@ -45,9 +45,9 @@

{{ $tc('lengow-connector.order.no_report_sent') }} - + {{ $tc('lengow-connector.order.change_this') }} - +

diff --git a/src/Resources/app/administration/src/module/lengow-connector/page/lgw-product-list/lgw-product-list.html.twig b/src/Resources/app/administration/src/module/lengow-connector/page/lgw-product-list/lgw-product-list.html.twig index d88e6d8..bea8d17 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/page/lgw-product-list/lgw-product-list.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/page/lgw-product-list/lgw-product-list.html.twig @@ -66,10 +66,9 @@
@@ -155,10 +154,9 @@ {% endblock %} @@ -227,7 +225,6 @@ :options="isActiveOptions" :label="$tc('lengow-connector.product.filter.active_filter_label')" @update:value="onActiveFilter" - @change="onActiveFilter" > {% endblock %} @@ -237,7 +234,6 @@ :options="isWithStockOptions" :label="$tc('lengow-connector.product.filter.stock_filter_label')" @update:value="onStockFilter" - @change="onStockFilter" > {% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/page/lgw-toolbox/index.js b/src/Resources/app/administration/src/module/lengow-connector/page/lgw-toolbox/index.js index 9aeb6c4..5de08ec 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/page/lgw-toolbox/index.js +++ b/src/Resources/app/administration/src/module/lengow-connector/page/lgw-toolbox/index.js @@ -3,7 +3,6 @@ import './lgw-toolbox.scss'; import lgwToolboxState from './state'; const { Component } = Shopware; -const { mapGetters } = Shopware.Component.getComponentHelper(); Component.register('lgw-toolbox', { template, @@ -35,7 +34,9 @@ Component.register('lgw-toolbox', { }, computed: { - ...mapGetters('lgwToolbox', ['isLoading']) + isLoading() { + return Shopware.State.getters['lgwToolbox/isLoading']; + } }, methods: { diff --git a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-catalog/index.js b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-catalog/index.js index b42eacb..44ab8e8 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-catalog/index.js +++ b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-catalog/index.js @@ -5,7 +5,6 @@ const { Filter, Data: { Criteria } } = Shopware; -const { mapState } = Shopware.Component.getComponentHelper(); Component.register('lgw-connection-catalog', { template, @@ -30,7 +29,20 @@ Component.register('lgw-connection-catalog', { }, computed: { - ...mapState('lgwConnection', ['catalogList', 'catalogSelected', 'optionIsLoading']), + catalogList() { + const state = Shopware.State.get('lgwConnection'); + return state && state.catalogList ? state.catalogList : []; + }, + + catalogSelected() { + const state = Shopware.State.get('lgwConnection'); + return state && state.catalogSelected ? state.catalogSelected : []; + }, + + optionIsLoading() { + const state = Shopware.State.get('lgwConnection'); + return state && state.optionIsLoading ? state.optionIsLoading : false; + }, assetFilter() { return Filter.getByName('asset'); diff --git a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-cms/index.js b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-cms/index.js index 54fe6e0..1225374 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-cms/index.js +++ b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-cms/index.js @@ -8,8 +8,6 @@ const { Data: { Criteria } } = Shopware; -const { mapState } = Shopware.Component.getComponentHelper(); - Component.register('lgw-connection-cms', { template, @@ -40,7 +38,12 @@ Component.register('lgw-connection-cms', { assetFilter() { return Filter.getByName('asset'); }, - ...mapState('lgwConnection', ['catalogList']), + + catalogList() { + const state = Shopware.State.get('lgwConnection'); + return state && state.catalogList ? state.catalogList : []; + }, + lengowConfigRepository() { return this.repositoryFactory.create('lengow_settings'); } diff --git a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-cms/lgw-connection-cms.html.twig b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-cms/lgw-connection-cms.html.twig index 63c0c7b..9ba2328 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-cms/lgw-connection-cms.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-cms/lgw-connection-cms.html.twig @@ -73,9 +73,9 @@

- + {{ $tc('lengow-connector.connection.cms.success_button_catalog') }} - +
{% endblock %} @@ -93,9 +93,9 @@

- + {{ $tc('lengow-connector.connection.cms.success_button') }} - +
{% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-home/lgw-connection-home.html.twig b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-home/lgw-connection-home.html.twig index b213615..d60e9a6 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-home/lgw-connection-home.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-connection-home/lgw-connection-home.html.twig @@ -23,9 +23,9 @@ {{ $tc('lengow-connector.connection.home.description_fourth') }}

- + {{ $tc('lengow-connector.connection.home.button') }} - +

{{ $tc('lengow-connector.connection.home.no_account') }} diff --git a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-dashboard-free-trial/lgw-dashboard-free-trial.html.twig b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-dashboard-free-trial/lgw-dashboard-free-trial.html.twig index 6a1f80c..43e192a 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-dashboard-free-trial/lgw-dashboard-free-trial.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-dashboard-free-trial/lgw-dashboard-free-trial.html.twig @@ -1,38 +1,36 @@ {% block lgw_dashboard_free_trial %} - +

{% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-dashboard-home/lgw-dashboard-home.html.twig b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-dashboard-home/lgw-dashboard-home.html.twig index 8208503..64fb1c7 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-dashboard-home/lgw-dashboard-home.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-dashboard-home/lgw-dashboard-home.html.twig @@ -1,71 +1,69 @@ {% block lgw_dashboard_home %} - + {% endblock %} diff --git a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-setting-export/index.js b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-setting-export/index.js index 287af3f..008327b 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-setting-export/index.js +++ b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-setting-export/index.js @@ -18,7 +18,7 @@ Component.register('lgw-setting-export', { default: {} }, onSaveSettings: { - type: Object, + type: Function, required: true } }, @@ -109,10 +109,15 @@ Component.register('lgw-setting-export', { salesChannelId: salesChannel.id, salesChannelName: salesChannel.name, name: shippingMethod.name, - value: shippingMethod.id + value: shippingMethod.id, + label: shippingMethod.name }]; }); }); + }, + + getShippingMethodsForSalesChannel(salesChannelId) { + return this.shippingMethods.filter(method => method.salesChannelId === salesChannelId); } } }); diff --git a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-setting-export/lgw-setting-export.html.twig b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-setting-export/lgw-setting-export.html.twig index 5a5ece5..e200c51 100644 --- a/src/Resources/app/administration/src/module/lengow-connector/view/lgw-setting-export/lgw-setting-export.html.twig +++ b/src/Resources/app/administration/src/module/lengow-connector/view/lgw-setting-export/lgw-setting-export.html.twig @@ -11,9 +11,8 @@ @@ -25,9 +24,8 @@ @@ -44,19 +42,14 @@ :text="$tc('lengow-connector.setting.lengow_export_setting.shipping.description')" :width="200" tooltipPosition="right"/> - - - +