Skip to content

Commit

Permalink
[CreditMemo] Replace unnecessary custom ChannelFilter with the Sylius…
Browse files Browse the repository at this point in the history
… entity filter
  • Loading branch information
GSadee committed May 18, 2021
1 parent 1d0af81 commit 91f1e5a
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 116 deletions.
5 changes: 5 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### UPGRADE FROM 1.0.0-RC.9 TO 1.0.0-RC.10

1. `Sylius\RefundPlugin\Grid\Filter\ChannelFilter` and `Sylius\RefundPlugin\Form\Type\ChannelFilterType` services
have been removed and channel filter configuration in grid has been replaced by entity filter.

### UPGRADE FROM 1.0.0-RC.7 TO 1.0.0-RC.8

1. The `fully_refunded` state and the `refund` transition have been removed from `sylius_order` state machine.
Expand Down
1 change: 0 additions & 1 deletion features/filtering_credit_memos.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ Feature: Filtering credit memos
And I filter credit memos by "Web-US" channel
Then there should be 1 credit memo generated
And the only credit memo should be generated for order "#00000001"

35 changes: 0 additions & 35 deletions spec/Grid/Filter/ChannelFilterSpec.php

This file was deleted.

43 changes: 0 additions & 43 deletions src/Form/Type/ChannelFilterType.php

This file was deleted.

20 changes: 0 additions & 20 deletions src/Grid/Filter/ChannelFilter.php

This file was deleted.

7 changes: 3 additions & 4 deletions src/Resources/config/app/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ winzou_state_machine:
to: completed

sylius_grid:
templates:
filter:
credit_memo_channel: '@SyliusRefundPlugin/Grid/Filter/channel.html.twig'
grids:
sylius_refund_credit_memo:
driver:
Expand Down Expand Up @@ -125,8 +122,10 @@ sylius_grid:
type: date
label: sylius_refund.ui.issued_at
channel:
type: credit_memo_channel
type: entity
label: sylius.ui.channel
form_options:
class: "%sylius.model.channel.class%"

doctrine:
dbal:
Expand Down
9 changes: 0 additions & 9 deletions src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,6 @@
<argument type="service" id="sylius_refund.repository.credit_memo"/>
</service>

<service id="Sylius\RefundPlugin\Form\Type\ChannelFilterType">
<argument type="service" id="sylius.repository.channel" />
<tag name="form.type" />
</service>

<service id="Sylius\RefundPlugin\Grid\Filter\ChannelFilter">
<tag name="sylius.grid_filter" type="credit_memo_channel" form_type="Sylius\RefundPlugin\Form\Type\ChannelFilterType" />
</service>

<service id="sylius.order_processing.shipping_charges_processor" class="Sylius\RefundPlugin\OrderProcessor\ShippingChargesProcessor">
<argument type="service" id="sylius.factory.adjustment" />
<argument type="service" id="sylius.shipping_calculator" />
Expand Down
3 changes: 0 additions & 3 deletions src/Resources/views/Grid/Filter/channel.html.twig

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Behat/Page/Admin/CreditMemoIndexPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function downloadCreditMemo(int $index): void

public function filterByChannel(string $channelName): void
{
$this->getDocument()->find('css', '#criteria_channel_channel')->selectOption($channelName);
$this->getDocument()->find('css', '#criteria_channel')->selectOption($channelName);
}

public function hasCreditMemoWithOrderNumber(int $index, string $orderNumber): bool
Expand Down

0 comments on commit 91f1e5a

Please sign in to comment.