<commit_before>{% trans_default_domain 'EnhavoShopBundle' %}
<div class="order-order">

    <div class="row">
        <div class="col-sm-4">{{ 'order.label.state'|trans([], 'EnhavoShopBundle') }}: {{ ('order.state.' ~ resource.state)|trans([], 'EnhavoShopBundle') }}</div>
        <div class="col-sm-4">{{ 'order.label.paymentState'|trans([], 'EnhavoShopBundle') }}: {{ ('order.paymentState.' ~ resource.paymentState)|trans([], 'EnhavoShopBundle') }}</div>
        <div class="col-sm-4">{{ 'order.label.shippingState'|trans([], 'EnhavoShopBundle') }}: {{ ('order.shippingState.' ~ resource.shippingState)|trans([], 'EnhavoShopBundle') }}</div>
    </div>

    <hr />
    <div class="row">
        <div class="col-sm-7">
            {% if resource.items|length %}
                <div class="itemlist-head">
                    <div class="row">
                        <div class="col-xs-2"></div>
                        <div class="col-xs-6">{{ 'order.label.product'|trans }}</div>
                        <div class="col-xs-2">{{ 'order.label.single_price'|trans }}</div>
                        <div class="col-xs-2">{{ 'order.label.price'|trans }}</div>
                    </div>
                </div>
                <ul class="itemlist">
                {% for item in resource.items %}
                    <li>
                        <div class="row">
                            <div class="col-xs-2">
                                {% if item.product and item.product.picture %}
                                    <div class="img">
                                        <img src="{{ media_url(item.product.picture, 'enhavoPreviewThumb') }}" />
                                    </div>
                                {% endif %}
                            </div>
                            <div class="col-xs-6">
                                <div class="item-title">
                                    {{ item.name }}
                                    <span class="item-quantity">x{{ item.quantity }}</span>
                                </div>
                            </div>
                            <div class="col-xs-2">
                                <div class="item-unit-price">
                                    <div class="details">
                                        <div>{{ 'order.label.unitPrice'|trans }}: {{ item.unitPrice|currency }}</div>
                                        <div>{{ 'order.label.unitTax'|trans }}: {{ item.unitTax|currency }}</div>
                                    </div>
                                    <div>{{ item.unitTotal|currency }}</div>
                                </div>
                            </div>
                            <div class="col-xs-2">
                                <div class="item-unit-price total">
                                    <div class="details">
                                        <div>{{ 'order.label.unitPrice'|trans }}: {{ item.unitPriceTotal|currency }}</div>
                                        <div>{{ 'order.label.unitTax'|trans }}: {{ item.taxTotal|currency }}</div>
                                    </div>
                                    <div>{{ item.total|currency }}</div>
                                </div>
                            </div>
                        </div>
                    </li>
                {% endfor %}
                </ul>
            {% endif %}
            <div class="row">
                <div class="col-xs-8">
                </div>
                <div class="col-xs-4">
                    <div class="order-sum">
                        <div>{{'order.label.unitPrice'|trans }}: {{ resource.unitPriceTotal|currency }}</div>
                        <div>
                            {% if resource.shippingTotal > 0 %}
                                {{ 'order.label.shipping'|trans }}: {{ resource.shippingTotal|currency }}
                            {% else %}
                                {{ 'order.label.freeShipping'|trans }}
                            {% endif %}
                        </div>
                        {% if resource.discountTotal != 0 %}
                            <div>{{ 'order.label.discount'|trans }}: {{ resource.discountTotal|currency }}</div>
                        {% endif %}
                        <div>
                            {{ 'order.label.salesTax'|trans }}.: {{ resource.taxTotal|currency }}
                        </div>
                        <div class="total">{{ 'order.label.sum'|trans }}: {{ resource.total|currency }}</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-5">
            <div><strong>{{ 'order.label.billingNumber'|trans }}:</strong> {{ resource.number }}</div>
            <div><strong>{{ 'order.label.orderedAt'|trans }}:</strong> {{ resource.checkoutCompletedAt|date }}</div>
            <div><strong>{{ 'order.label.eMail'|trans }}:</strong> {{ resource.customerEmail }}</div>
            <div><strong>{{ 'order.label.paymentMethod'|trans }}:</strong> </div>
            <div><strong>{{ 'order.label.shippingMethod'|trans }}:</strong> </div>
            <div class="address">

                {% if resource.shippingAddress %}
                    <div>
                        <div><strong>{{ 'order.label.shippingAddress'|trans }}</strong></div>
                        <div>{{ resource.shippingAddress.firstName }} {{ resource.shippingAddress.lastName }}</div>
                        {% if resource.shippingAddress.company %}
                            <div>{{ resource.shippingAddress.company }}</div>
                        {% endif %}
                        <div>{{ resource.shippingAddress.street }}</div>
                        <div>{{ resource.shippingAddress.postCode }} {{ resource.shippingAddress.city }}</div>
                        <div>{{ 'order.label.country'|trans }}: {{ resource.shippingAddress.countryCode|sylius_country_name }}</div>
                        {% if resource.shippingAddress.phoneNumber %}
                            <div>{{ 'order.label.phone'|trans }}: {{ resource.shippingAddress.phoneNumber }}</div>
                        {% endif %}
                    </div>
                {% endif %}

                {% if resource.billingAddress %}
                    <div>
                        <div><strong>{{ 'order.label.billingAddress'|trans }}</strong></div>
                        <div>{{ resource.billingAddress.firstName }} {{ resource.billingAddress.lastName }}</div>
                        {% if resource.billingAddress.company %}
                            <div>{{ resource.billingAddress.company }}</div>
                        {% endif %}
                        <div>{{ resource.billingAddress.street }}</div>
                        <div>{{ resource.billingAddress.postCode }} {{ resource.billingAddress.city }}</div>
                        <div>{{ 'order.label.country'|trans }}: {{ resource.billingAddress.countryCode|sylius_country_name }}</div>
                        {% if resource.billingAddress.phoneNumber %}
                            <div>{{ 'order.label.phone'|trans }}: {{ resource.billingAddress.phoneNumber }}</div>
                        {% endif %}
                    </div>
                {% endif %}

            </div>
        </div>
    </div>
</div><commit_msg>view for order admin page (#1616)<commit_after>{% trans_default_domain 'EnhavoShopBundle' %}
<div class="order-order">
    <div class="row">
        <div class="col-7">
            {% if resource.items|length %}
                <table class="table table-bordered table-striped">
                    <thead>
                    <th>
                        {{ 'order.label.product'|trans }}
                    </th>
                    <th>
                        {{ 'order.label.single_price'|trans }}
                    </th>
                    <th>
                        {{ 'order.label.price'|trans }}
                    </th>
                    </thead>
                    <tbody>
                    {% for item in resource.items %}
                        <tr>
                            <td>
                                {% if item.product and item.product.picture %}
                                    <div class="img">
                                        <img src="{{ media_url(item.product.picture, 'enhavoPreviewThumb') }}" />
                                    </div>
                                {% endif %}
                                {{ item.name }}
                                <span class="item-quantity">x{{ item.quantity }}</span>
                            </td>
                            <td>
                                <div class="item-unit-price">
                                    <div class="details" style="display: flex; gap: 5px; flex-wrap: wrap">
                                        <div style="display: flex; justify-content: space-between; width: 100%">
                                            <span>{{ 'order.label.unitPrice'|trans }}:</span><span>
                                                    {{ item.unitPrice|currency }}
                                                </span>
                                        </div>
                                        <div style="display: flex; justify-content: space-between; width: 100%">
                                                <span>
                                                    {{ 'order.label.unitTax'|trans }}:
                                                </span>
                                            <span>
                                                    {{ item.unitTax|currency }}
                                                </span>
                                        </div>
                                        <div style="display: flex; justify-content: flex-end; width: 100%">{{ item.unitTotal|currency }}</div>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <div class="item-unit-price">
                                    <div class="details" style="display: flex; gap: 5px; flex-wrap: wrap">
                                        <div style="display: flex; justify-content: space-between; width: 100%">
                                            <span>{{ 'order.label.unitPrice'|trans }}:</span><span>
                                                    {{ item.unitPriceTotal|currency }}
                                                </span>
                                        </div>
                                        <div style="display: flex; justify-content: space-between; width: 100%">
                                                <span>
                                                    {{ 'order.label.unitTax'|trans }}:
                                                </span>
                                            <span>
                                                    {{ item.taxTotal|currency }}
                                                </span>
                                        </div>
                                        <div style="display: flex; justify-content: flex-end; width: 100%">{{ item.total|currency }}</div>
                                    </div>
                                </div>
                            </td>

                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            {% endif %}
            <div class="row">
                <div class="col-4 col-md-6">
                </div>
                <div class="col-8 col-md-6">
                    <div class="order-sum">
                        <table class="table table-bordered" style="margin-top: 0">
                            <tbody>
                            <tr>
                                <td>
                                    {{'order.label.unitPrice'|trans }}:
                                </td>
                                <td>
                                    {{ resource.unitPriceTotal|currency }}
                                </td>
                            </tr>
                            <tr>
                                {% if resource.shippingTotal > 0 %}
                                    <td>
                                        {{ 'order.label.shipping'|trans }}:
                                    </td>
                                    <td>
                                        {{ resource.shippingTotal|currency }}
                                    </td>

                                {% else %}
                                    <td style="border-right: 0">
                                        {{ 'order.label.freeShipping'|trans }}
                                    </td>
                                {% endif %}
                            </tr>
                            {% if resource.discountTotal != 0 %}
                                <tr>
                                    <td>
                                        {{ 'order.label.discount'|trans }}:
                                    </td>
                                    <td>
                                        {{ resource.discountTotal|currency }}
                                    </td>
                                </tr>
                            {% endif %}
                            <tr>
                                <td>
                                    {{ 'order.label.salesTax'|trans }}.:
                                </td>
                                <td>
                                    {{ resource.taxTotal|currency }}
                                </td>
                            </tr>
                            <tr class="bordered">
                                <td>
                                    {{ 'order.label.sum'|trans }}:
                                </td>
                                <td>
                                    {{ resource.total|currency }}
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-5">
            <div class="row">
                <div class="col-12">
                    <table class="table table-bordered">
                        <tbody>
                        <tr>
                            <td>
                                {{ 'order.label.state'|trans([], 'EnhavoShopBundle') }}:
                            </td>
                            <td>
                                {{ ('order.state.' ~ resource.state)|trans([], 'EnhavoShopBundle') }}
                            </td>
                        </tr>
                        <tr>
                            <td>
                                {{ 'order.label.paymentState'|trans([], 'EnhavoShopBundle') }}:
                            </td>
                            <td>
                                {{ ('order.paymentState.' ~ resource.paymentState)|trans([], 'EnhavoShopBundle') }}
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>{{ 'order.label.shippingState'|trans([], 'EnhavoShopBundle') }}:</strong>
                            </td>
                            <td>
                                {{ ('order.shippingState.' ~ resource.shippingState)|trans([], 'EnhavoShopBundle') }}
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="row">
                <div class="col-12">
                    <table class="table table-bordered" style="margin-top: 0">
                        <tbody>
                        <tr>
                            <td>
                                {{ 'order.label.billingNumber'|trans }}:
                            </td>
                            <td>
                                {{ resource.number }}
                            </td>
                        </tr>
                        <tr>
                            <td>
                                {{ 'order.label.orderedAt'|trans }}:
                            </td>
                            <td>
                                {{ resource.checkoutCompletedAt|date }}
                            </td>
                        </tr>
                        <tr>
                            <td>
                                {{ 'order.label.eMail'|trans }}:
                            </td>
                            <td>
                                {{ resource.customerEmail }}
                            </td>
                        </tr>
                        <tr>
                            <td>
                                {{ 'order.label.paymentMethod'|trans }}:
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                {{ 'order.label.shippingMethod'|trans }}:
                            </td>
                            <td>

                            </td>
                        </tr>
                        </tbody>
                    </table>

                    <div class="address">
                        {% if resource.shippingAddress %}
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th style="border-bottom: 0">
                                        {{ 'order.label.shippingAddress'|trans }}
                                    </th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>
                                        <div>
                                            {{ resource.shippingAddress.firstName }} {{ resource.shippingAddress.lastName }}
                                        </div>
                                        {% if resource.shippingAddress.company %}
                                            <div>
                                                {{ resource.shippingAddress.company }}
                                            </div>
                                        {% endif %}
                                        <div>
                                            {{ resource.shippingAddress.street }}
                                        </div>
                                        <div>
                                            {{ resource.shippingAddress.postCode }} {{ resource.shippingAddress.city }}
                                        </div>
                                        <div>
                                            {{ resource.shippingAddress.countryCode|sylius_country_name }}
                                        </div>
                                        {% if resource.shippingAddress.phoneNumber %}
                                            <div>
                                                {{ 'order.label.phone'|trans }}: {{ resource.shippingAddress.phoneNumber }}
                                            </div>
                                        {% endif %}
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        {% endif %}

                        {% if resource.billingAddress %}
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th style="border-bottom: 0">
                                        {{ 'order.label.billingAddress'|trans }}
                                    </th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>
                                        <div>
                                            {{ resource.billingAddress.firstName }} {{ resource.billingAddress.lastName }}
                                        </div>
                                        {% if resource.billingAddress.company %}
                                            <div>
                                                {{ resource.billingAddress.company }}
                                            </div>
                                        {% endif %}
                                        <div>
                                            {{ resource.billingAddress.street }}
                                        </div>
                                        <div>
                                            {{ resource.billingAddress.postCode }} {{ resource.shippingAddress.city }}
                                        </div>
                                        <div>
                                            {{ resource.billingAddress.countryCode|sylius_country_name }}
                                        </div>
                                        {% if resource.billingAddress.phoneNumber %}
                                            <div>
                                                {{ 'order.label.phone'|trans }}: {{ resource.billingAddress.phoneNumber }}
                                            </div>
                                        {% endif %}
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{'fraction_non_alphanumeric': 0.11736039701345732, 'fraction_numerical': 0.0025931059149640096, 'mean_word_length': 0.6528485923298604, 'pattern_counts': {'":': 0, '<': 382, '<?xml version=': 0, '>': 384, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 215, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5995365', 'n_tokens_mistral': 4778, 'n_tokens_neox': 4340, 'n_words': 729}