-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
| Q | A | --------------- | ----- | Branch? | 2.0 | Bug fix? | yes | New feature? | no | Related tickets | ### 1. Added condition for refund payments and now it will not be visible if there are no refund payments available. Payments without refund transactions: ![image](https://github.com/user-attachments/assets/e7d7c913-bd45-4e3e-999e-35c8de17209b) Payments with refund transactions: ![image](https://github.com/user-attachments/assets/29351366-3c51-43a8-8d86-0f7ffdabc303) ### 2. Textarea Reduced comment textarea heght: ![image](https://github.com/user-attachments/assets/773c26d6-ea48-4274-a365-d75af794932b)
- Loading branch information
Showing
14 changed files
with
46 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
import './js/refund-button'; | ||
|
||
import './styles/main.scss'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import 'refund'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
textarea.refund-comment { | ||
min-height: 4rem; | ||
height: 4rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
templates/admin/credit_memo/show/content/sections/memo_details/table.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<table class="table mb-0"> | ||
{% hook 'table' %} | ||
</table> | ||
<div class="table-responsive"> | ||
<table class="table mb-0"> | ||
{% hook 'table' %} | ||
</table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% set order = hookable_metadata.context.resource %} | ||
{% set refund_payments = get_all_refund_payments_by_order(order) %} | ||
|
||
<div class="card mb-3" {{ sylius_test_html_attribute('payments') }}> | ||
{% hook 'payments' with { refund_payments } %} | ||
</div> |
10 changes: 7 additions & 3 deletions
10
templates/admin/order/content/sections/payments/refund_header.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<div class="card-header"> | ||
{% hook 'refund_header' %} | ||
</div> | ||
{% set refund_payments = hookable_metadata.context.refund_payments %} | ||
|
||
{% if refund_payments|length > 0 %} | ||
<div class="card-header border-top"> | ||
{% hook 'refund_header' %} | ||
</div> | ||
{% endif %} |
15 changes: 6 additions & 9 deletions
15
templates/admin/order/content/sections/payments/refund_items.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
{% set order = hookable_metadata.context.resource %} | ||
{% set refund_payments = get_all_refund_payments_by_order(order) %} | ||
{% set refund_payments = hookable_metadata.context.refund_payments %} | ||
|
||
<div class="py-3"> | ||
{% if order.hasPayments %} | ||
{% if refund_payments|length > 0 %} | ||
<div class="py-3"> | ||
<div class="table-responsive"> | ||
<table class="table table-vcenter table-borderless table-sm card-table"> | ||
<tbody> | ||
{% for refund_payment in refund_payments %} | ||
<tr {{ sylius_test_html_attribute('refund') }}> | ||
{% hook 'refund_item' with { resource: order, refund_payment } %} | ||
{% hook 'refund_item' with { refund_payment } %} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% else %} | ||
<span class="px-3 text-secondary italic" {{ sylius_test_html_attribute('no-payments') }}>{{ 'sylius.ui.no_payments'|trans }}</span> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endif %} |
4 changes: 2 additions & 2 deletions
4
templates/admin/order/refund/content/sections/form/fields/comment.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<div class="col-12 col-md-6"> | ||
<div class="col-12 col-md-6 mb-3 mb-md-0"> | ||
<div class="field"> | ||
<label for="sylius-refund-comment" class="form-label">{{ 'sylius.ui.comment'|trans }}</label> | ||
<textarea rows="3" name="sylius_refund_comment" id="sylius-refund-comment" class="form-control" style="height: 8rem;"></textarea> | ||
<textarea rows="3" name="sylius_refund_comment" id="sylius-refund-comment" class="form-control refund-comment"></textarea> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ encore_entry_link_tags('app-admin-entry', null, 'app.admin') }} |