{% extends 'Layout/base.html.twig' %}{% block body %} <div class="row mb-1 mt-0"> <div class="col-12"> <div class="email-container bg-transparent"> <div class="inbox-rightbar"> <div class="btn-group mb-2"> {% if app.user.isRecipient %} {% if not app.user.avoidUserForCreateNewInquiries %} <button type="button" class="btn btn-success" onclick="window.location.href = '{{ path('client_inquiry_new') }}'"><i class="uil uil-plus"></i> {{ 'inquiry.add'|trans }}</button> {% endif %} {% if folder != 'chosen' and folder != 'archived' %} <button type="button" class="btn btn-light move-to-archive" data-toggle="tooltip" data-html="true" data-placement="top" title="" data-original-title="ARCHIWIZUJ! Wskazówka:<br/>Zapytania, których wiesz że już na pewno NIE będziesz zamawiał przenieś do folderu Archiwum. Zaznacz je po lewej stronie w kwadracie a następnie kliknij poniższy przycisk „Archiwizuj” Dzięki temu będziesz mieć porządek :) "> <i class="uil uil-archive-alt"></i> </button> {% endif %} {% endif %} {% if folder is not defined %} {% set folder='unknown' %} {% endif %} </div> <div class="mt-2">{# <h5 class="mt-3 mb-2 font-size-16">{{ 'menu.new'|trans }}</h5>#} <ul class="message-list"> {% if entities|length == 0 %} <h5 class="mt-3 mb-2 font-size-16">{{ 'common.no_results'|trans }}</h5> {% else %} {% for inquiry in entities %} {% set lowestPrice = 99999999 %} {% set highestPrice = 0 %} {% set chosenOfferId = null %} {% set chosenOffer = null %} {% set showOthersOffer = false %} {% set countShowOthersOffers = 0 %} {% for offer in inquiry.offers %} {% if offer.totalPrice > highestPrice %} {% set highestPrice = offer.totalPrice %} {% endif %} {% if offer.totalPrice < lowestPrice %} {% set lowestPrice = offer.totalPrice %} {% endif %} {% if offer.chosen %} {% set chosenOfferId = offer.id %} {% set chosenOffer = offer %} {% endif %} {% endfor %} <li entity-id="{{ inquiry.id }}" class="unread search-item-row" data-search-data="{{ inquiry.make }} {{ inquiry.model }} {{ inquiry.registrationNumber }} {{ inquiry.vin }} {{ inquiry.notices }}" style="{% if loop.index % 2 == 0 %} background-color: #dddddd {% endif %}"> <div class="row col-12"> <div class="col-mail col-mail-1 col-mail-car" style="width: 160px !important;"> <div class="checkbox-wrapper-mail"> <input type="checkbox" id="chk{{ inquiry.id }}" class="listCheckboxes" name="ids[]" value="{{ inquiry.id }}"> <label for="chk{{ inquiry.id }}" class="toggle"></label> </div> <span data-toggle="tooltip" title="" data-original-title=" Utworzono dnia <br>{{ inquiry.createdAt|date('Y-m-d H:i') }} {% if chosenOffer is not null %} {% if chosenOffer.chooseDate is not null %}<br> {{ 'offer.chooseDate'|trans }} <br>{{ chosenOffer.chooseDate|date('Y-m-d H:i') }} {% endif %} {% if chosenOffer.orderedDate is not null %}<br> {{ 'offer.orderConfirmationDate'|trans }} <br>{{ chosenOffer.orderedDate|date('Y-m-d H:i') }} {% endif %} {% if chosenOffer.sendDate is not null %}<br> {{ 'offer.sendConfirmationDate'|trans }}: <br>{{ chosenOffer.sendDate|date('Y-m-d H:i') }} {% endif %} {% endif %} " data-html="true"><i class="fa fa-calendar-alt"></i></span> {% if chosenOffer is not null and chosenOffer.partsOrdered and (app.user.id == inquiry.recipient.id or app.user.id == chosenOffer.supplier.id) %} <span data-toggle="tooltip" title="" data-original-title="Potwierdzono zamówienie części"><i class="fa fa-check text-success"></i></span> {% endif %} {% if chosenOffer is not null and not chosenOffer.partsOrdered and (app.user.id == inquiry.recipient.id or app.user.id == chosenOffer.supplier.id) %} <a href="{{ path('client_offer_details', {'id': chosenOffer.id}) }}" data-toggle="tooltip" title="" data-original-title="Oczekuje na potwierdzenie zamówienia częsci przez Dostawcę"> <i class="fa fa-exclamation text-danger"></i> </a> {% endif %} {% if inquiry.isPartsReceived and (app.user.id == inquiry.recipient.id or app.user.id == chosenOffer.supplier.id) %} <span data-toggle="tooltip" title="" data-original-title="Potwierdzenie otrzymanie części"><i class="fa fa-check text-success"></i></span> {% endif %} {% if inquiry.isPartsIssued and (app.user.id == inquiry.recipient.id or app.user.id == chosenOffer.supplier.id) %} <span data-toggle="tooltip" title="" data-original-title="Potwierdzone wydanie części do naprawy"><i class="fa fa-check text-success"></i></span> {% endif %} {% if unreadPrivateMessages['privateMessages'][inquiry.id] is defined %} <a href="{{ path('client_offer_details', {'id': unreadPrivateMessages['privateMessages'][inquiry.id][0]['offer_id']}) }}#comments" style="animation: blinker 1s linear infinite; color: red;"> <span data-toggle="tooltip" title="" data-original-title=" {% if unreadPrivateMessages['privateMessages'][inquiry.id] is defined %}Oczekujące prywatne wiadomości: {{ unreadPrivateMessages['privateMessages'][inquiry.id]|length }}{% endif %}" > <i class="fa fa-envelope fa-2x"></i> </span> </a> {% endif %} </div> {% if app.request.attributes.get('_route') == 'supplier_inquiry_won' or app.request.attributes.get('_route') == 'client_inquiry_chosen' %} <div class="col-mail col-mail-1 col-mail-car" style="width: 95px !important; line-height: 16px !important; padding-top: 17px !important;"> <span data-toggle="tooltip" title="" data-original-title="Data zamówienia"> {{ inquiry.createdAt|date('d.m.Y') }}<br/> {{ inquiry.createdAt|date('H:i') }}<br/> </span> </div> {% endif %} <div class="col-mail col-mail-1 col-mail-car nowrap-mobile"> <a href="{{ path('client_inquiry_details', {id : inquiry.id}) }}" class="title">{{ inquiry.make }} {{ inquiry.model }}</a> </div> <span class="col-span-center" onclick="window.location.href = '{{ path('client_inquiry_details', {id : inquiry.id}) }}'"> <div class="col-mail col-mail-1 mt-2 col-mail-registration-number">{# {% if lastPrivateMessages[inquiry.id] is defined %}#}{# <span data-toggle="tooltip" data-html="true" title="" data-original-title="{{ lastPrivateMessages[inquiry.id]|raw }}">#}{# {% endif %}#} <div class="board-box"> <div class="license-plate plate-small"> <div class="blue-stripe"> <span class="stars">*</span><span class="PL">|</span> </div> <div class="license-plate-number"> {{ inquiry.registrationNumber }} </div> </div> </div>{# {% if lastPrivateMessages[inquiry.id] is defined %}#}{# </span>#}{# {% endif %}#} </div> <div class="col-mail col-mail-1 mt-2 col-mail-recipient" data-toggle="tooltip" title="" data-original-title=" {% if folder == 'chosen' and app.user.id == inquiry.recipient.id %} {{ chosenOffer.supplier }} (NIP: {% if chosenOffer.supplier.nip is defined and chosenOffer.supplier.nip is not null %}{{ chosenOffer.supplier.nip }}{% endif %}) {% else %} {{ inquiry.recipient }} (NIP: {% if inquiry.recipient.nip is defined and inquiry.recipient.nip is not null %}{{ inquiry.recipient.nip }}{% endif %}) {% endif %} "> {% if folder == 'chosen' and app.user.id == inquiry.recipient.id %} <p class="recipient">{{ chosenOffer.supplier }}</p> {% else %} <p class="recipient">{{ inquiry.recipient }}</p> {% endif %} </div> {% set supplierAddress = null %} {% if chosenOffer is not null %} {% for address in chosenOffer.supplier.addresses %} {% if address.defaultAddress %} {% set supplierAddress = address %} {% endif %} {% endfor %} {% endif %} <div class="col-mail col-mail-1 mt-2 col-mail-address" data-toggle="tooltip" title="" data-original-title=" {% if folder == 'chosen' and app.user.id == inquiry.recipient.id %} {% if supplierAddress is not null %} {{ supplierAddress.street }} {{ supplierAddress.propertyNumber }}, {{ supplierAddress.zipCode }} {{ supplierAddress.city }} {% endif %} {% else %} {% if inquiry.customerAddress is null %} {% if inquiry.recipient.street is not null %} {{ inquiry.recipient.street }} {% endif %} {% if inquiry.recipient.propertyNumber is not null %} {{ inquiry.recipient.propertyNumber }} {% endif %} {% else %} {% if inquiry.customerAddress.street is not null %} {{ inquiry.customerAddress.street }} {% endif %} {% if inquiry.customerAddress.propertyNumber is not null %} {{ inquiry.customerAddress.propertyNumber }} {% endif %} {% endif %} {% endif %} "> <p class="address"> {% if folder == 'chosen' and app.user.id == inquiry.recipient.id %} {% set recipientAddress = '' %} {% if inquiry.customerAddress is not null %} {% set recipientAddress = inquiry.customerAddress.city ~ '+' ~ inquiry.customerAddress.street ~ '+' ~ inquiry.customerAddress.propertyNumber %} {% endif %} {% if supplierAddress is not null %} {{ supplierAddress.street }} {{ supplierAddress.propertyNumber }}<br/> {{ supplierAddress.zipCode }} {{ supplierAddress.city }} {% if loggedAddressForGoogleMaps != supplierAddress.city~'+'~supplierAddress.street~'+'~supplierAddress.propertyNumber %} <br/><a target="_blank" href="https://www.google.com/maps/dir/?api=1&origin={{ recipientAddress }}&destination={{ supplierAddress.city }}+{{ supplierAddress.street }}+{{ supplierAddress.propertyNumber }}">Zobacz trasę</a> {% endif %} {% endif %} {% else %} {% if inquiry.customerAddress is null %} {% if inquiry.recipient.street is not null %} {{ inquiry.recipient.street }} {% endif %} {% if inquiry.recipient.propertyNumber is not null %} {{ inquiry.recipient.propertyNumber }} {% endif %} {% else %} {% if inquiry.customerAddress.street is not null %} {{ inquiry.customerAddress.street }} {% endif %} {% if inquiry.customerAddress.propertyNumber is not null %} {{ inquiry.customerAddress.propertyNumber }} {% endif %} {% endif %} {% endif %} </p> </div> </span> <div class="col-mail-center"> {% set loggedSupplierInquiryCount = 0 %} {% if app.user.showOtherOffers %} {% for offer in inquiry.offers %} {% set loggedSupplierInquiryCount = loggedSupplierInquiryCount + 1 %} {% endfor %} {% else %} {% for offer in inquiry.offers %} {% if (app.user.isSupplier and offer.supplier.id == app.user.id) or (app.user.isRecipient) %} {% set loggedSupplierInquiryCount = loggedSupplierInquiryCount + 1 %} {% endif %} {% endfor %} {% endif %} <div class="col-mail col-mail-offer-discussion"> {% if app.user.isRecipient or (app.user.isSupplier and app.user.showOtherOffers) %} {% if loggedSupplierInquiryCount > 0 %} <button class="btn text-success" type="button" aria-controls="offerBox{{ inquiry.id }}" onclick="$('#offerBox{{ inquiry.id }}').collapse('toggle')" data-toggle="tooltip" title="" data-original-title="{% trans %}offer.offers{% endtrans %} ({{ inquiry.offers|length }})"> <i class="fa fa-file-alt"></i> <span> {% trans %}offer.offers{% endtrans %} ({{ inquiry.offers|length }}) </span> </button> {% else %} <button class="btn text-secondary disabled" type="button" data-toggle="tooltip" title="" data-original-title="{% trans %}offer.no_offers{% endtrans %}"> <i class="fa fa-file-alt"></i> </button> {% endif %} {% endif %} {% if app.user.isSupplier %} {% set suppliersOffer = false %} {% for offer in inquiry.offers %} {% if offer.supplier.id == app.user.id %} {% set suppliersOffer = offer %} {% endif %} {% endfor %} {% if suppliersOffer %} <button onclick="window.location.href = '{{ path('client_offer_details', {id : suppliersOffer.id}) }}'" class="btn text-success" data-toggle="tooltip" title="" data-original-title="{% trans %}offer.supplierShow{% endtrans %}"> <i class="fa fa-file-alt"></i> <span> {{ 'offer.offer'|trans }} </span> </button> {% else %} {% if inquiry.expirationDate|date('U') > "now -30 days"|date('U') and not inquiry.archived and app.user.id != inquiry.recipient.id and lost is not defined %} <button class="btn text-primary" type="button" onclick="window.location.href = '{{ path('supplier_make_offer', {id : inquiry.id}) }}#newOffer'" data-toggle="tooltip" title="" data-original-title="{% trans %}offer.makeOffer{% endtrans %}"> <i class="fa fa-file-alt"></i> <span> {{ 'offer.makeOffer'|trans }} </span> </button> {% endif %} {% endif %} {% if inquiry.recipient.id != app.user.id and app.request.attributes.get('_route') != 'supplier_inquiry_latest' and suppliersOffer and suppliersOffer is not null %} {% if app.request.attributes.get('_route') == 'supplier_inquiry_during' or app.request.attributes.get('_route') == 'supplier_inquiry_won' or app.request.attributes.get('_route') == 'supplier_inquiry_lost' %} <button class="btn text-primary" type="button" onclick="window.location.href = '{{ path('client_offer_details', {'id': suppliersOffer.id }) }}#comments'" data-toggle="tooltip" title="" data-original-title="Napisz wiadomość prywatną do odbiorcy"> <i class="fa fa-envelope"></i> <span> Napisz wiadomość </span> </button> {% else %} <button class="btn text-primary" type="button" onclick="window.location.href = '{{ path('client_private_message_customer_index', {inquiryId: inquiry.id, id: inquiry.recipient.id}) }}'" data-toggle="tooltip" title="" data-original-title="Napisz wiadomość prywatną do odbiorcy"> <i class="fa fa-envelope"></i> <span> Napisz wiadomość </span> </button> {% endif %} {% endif %} </a> {% endif %} </div> <div class="col-mail"> <div class="date"> {% if inquiry.expirationDate|date('U') > "now"|date('U') %} {% set difference = date(inquiry.expirationDate).diff(date("now")) %} {% set seconds = difference.d * 24 * 3600 + difference.h * 3600 + difference.i * 60 + difference.s %} <input type="hidden" class="[ inquiry-counter-data ]" data-counter-id="inquiry-counter-{{ inquiry.id }}" value="{{ seconds }}"> <span id="inquiry-counter-{{ inquiry.id }}" data-toggle="tooltip" data-original-title="Czas do końca zapytania">{% if difference.d != 0 %}{{ difference.d }}d{% endif %} {% if difference.h != 0 %}{{ difference.h }}h{% endif%} {{ difference.i }}m</span> {% if app.request.attributes.get('_route') == 'supplier_inquiry_latest' %} <a href="#" data-toggle="tooltip" data-placement="top" data-html="true" title="" data-original-title="Potrzebujesz więcej czasu na zrobienie wyceny? <br/>Kliknij i przedłuż o 3 godziny." data-inquiry-id="{{ inquiry.id }}" class="btn btn-success [ add-time-to-inquiry ]"><i class="uil uil-plus"></i> Potrzebuję czasu</a> {% endif %} {% else %} {% trans %}inquiry.finished{% endtrans %} {% endif %} </div> </div> {% if folder == 'won' %} <div class="col-mail" style="padding-left: 10px;"> {% if inquiry.buyerStatus == '' %} <span style="color: grey" class="show-status-select" id="show-status-select-{{ inquiry.id }}" data-inquiry-id="{{ inquiry.id }}"> Zmień status... </span> {% else %} <span class="show-status-select" id="show-status-select-{{ inquiry.id }}" data-inquiry-id="{{ inquiry.id }}" style=" {% if inquiry.buyerStatus == 'OK' %} color: green; {% elseif inquiry.buyerStatus == 'W trakcie' %} color: saddlebrown; {% elseif inquiry.buyerStatus == 'Anulowane' %} color: red; {% endif %} "> {{ inquiry.buyerStatus }} </span> {% endif %} <select class="select-change-inquiry-buyer-status d-none" id="select-change-inquiry-buyer-status-{{ inquiry.id }}" data-inquiry-id="{{ inquiry.id }}"> <option value=""></option> <option value="OK" {% if inquiry.buyerStatus == 'OK' %}selected{% endif %}>OK</option> <option value="W trakcie" {% if inquiry.buyerStatus == 'W trakcie' %}selected{% endif %}>W trakcie</option> <option value="Anulowane" {% if inquiry.buyerStatus == 'Anulowane' %}selected{% endif %}>Anulowane</option> </select> </div> {% endif %} {% if folder == 'chosen' %} <div class="col-mail" style="padding-left: 10px;"> {% if inquiry.sellerStatus == '' %} <span style="color: grey" class="show-status-select-chosen" id="show-status-select-chosen-{{ inquiry.id }}" data-inquiry-id="{{ inquiry.id }}"> Zmień status... </span> {% else %} <span class="show-status-select-chosen" id="show-status-select-chosen-{{ inquiry.id }}" data-inquiry-id="{{ inquiry.id }}" style=" {% if inquiry.sellerStatus == 'OK' %} color: green; {% elseif inquiry.sellerStatus == 'W trakcie' %} color: saddlebrown; {% elseif inquiry.sellerStatus == 'Anulowane' %} color: red; {% endif %} "> {{ inquiry.sellerStatus }} </span> {% endif %} <select class="select-change-inquiry-seller-status d-none" id="select-change-inquiry-seller-status-{{ inquiry.id }}" data-inquiry-id="{{ inquiry.id }}"> <option value=""></option> <option value="OK" {% if inquiry.sellerStatus == 'OK' %}selected{% endif %}>OK</option> <option value="W trakcie" {% if inquiry.sellerStatus == 'W trakcie' %}selected{% endif %}>W trakcie</option> <option value="Anulowane" {% if inquiry.sellerStatus == 'Anulowane' %}selected{% endif %}>Anulowane</option> </select> </div> {% endif %} </div> </div> </li> <div class="collapse offerBoxCollapse" id="offerBox{{ inquiry.id }}" data-search-data="{{ inquiry.make }} {{ inquiry.model }} {{ inquiry.registrationNumber }} {{ inquiry.vin }} {{ inquiry.notices }}"> <div class="card card-body"> <div class="table-responsive"> <table class="table table-bordered table-centered"> <thead> <tr> <th scope="col" class="text-center">#</th> {% if app.user.showOtherOffersBeforePurchase %} <th scope="col">{{ 'offer.offerent'|trans }}</th> <th scope="col">Adres oddziału</th> {% endif %} <th scope="col" class="text-center">{% trans %}common.date{% endtrans %}</th> <th scope="col" class="text-center">{% trans %}offer.retail_net_price{% endtrans %}</th> <th scope="col" class="text-center">{% trans %}offer.discount{% endtrans %}</th> <th scope="col" class="text-center">{% trans %}offer.net_price{% endtrans %}</th> <th scope="col" class="text-center">{% trans %}offer.supply{% endtrans %}</th> <th scope="col" class="text-center">{% trans %}offer.plannedDeliveryTime{% endtrans %}</th> <th scope="col" class="text-center">{% trans %}offer.net_sum{% endtrans %}</th> <th scope="col" class="text-center"></th> </tr> </thead> <tbody> {% if app.user.showOtherOffers %} {% for offer in inquiry.offers %} {% if offer.supplier.id != app.user.id %} {% set countShowOthersOffers = countShowOthersOffers + 1 %} {% endif %} {% endfor %} {% if countShowOthersOffers > 0 %} {% set showOthersOffer = true %} {% else %} {% set showOthersOffer = false %} {% endif %} {% else %} {% set showOthersOffer = false %} {% endif %} {% for offer in inquiry.offers %} {% if (app.user.isSupplier and offer.supplier.id == app.user.id) or (app.user.isRecipient and inquiry.recipient.id == app.user.id) or showOthersOffer %} <tr {% if chosenOfferId == offer.id %} class="table-success"{% elseif offer.isRejected %} class="table-danger"{% endif %} {% if showOthersOffer %}data-action="Pokazuj inne"{% endif %}> <td> {{ loop.index }} </td> {% if app.user.showOtherOffersBeforePurchase %} <td> {% if (app.user.dontShowCompanyNameOtherOffers or app.user.showOnlyRetailPriceAndDeliveryDate) and app.user.id != offer.supplier.id and inquiry.recipient.id != app.user.id %} --- {% else %} {{ offer.supplier }} {% endif %} </td> <td> {% if (app.user.dontShowCompanyNameOtherOffers or app.user.showOnlyRetailPriceAndDeliveryDate) and app.user.id != offer.supplier.id and inquiry.recipient.id != app.user.id %} --- {% else %} {% set supplierAddress = null %} {% for address in offer.supplier.addresses %} {% if address.defaultAddress %} {% set supplierAddress = address %} {% endif %} {% endfor %} {% set recipientAddress = '' %} {% if inquiry.customerAddress is not null %} {% set recipientAddress = inquiry.customerAddress.city ~ '+' ~ inquiry.customerAddress.street ~ '+' ~ inquiry.customerAddress.propertyNumber %} {% endif %} {% if supplierAddress is not null %} {{ supplierAddress.street }} {{ supplierAddress.propertyNumber }}, {{ supplierAddress.zipCode }} {{ supplierAddress.city }} {% if loggedAddressForGoogleMaps != supplierAddress.city~'+'~supplierAddress.street~'+'~supplierAddress.propertyNumber %} <br/><a target="_blank" href="https://www.google.com/maps/dir/?api=1&origin={{ recipientAddress }}&destination={{ supplierAddress.city }}+{{ supplierAddress.street }}+{{ supplierAddress.propertyNumber }}">Zobacz trasę</a> {% endif %} {% endif %} {% if offer.contactPerson is defined and offer.contactPerson is not null %} <br/><strong>Os. kontaktowa:</strong> {{ offer.contactPerson.name }} <br/><strong>tel.:</strong> {{ offer.contactPerson.phoneNumber }} {% endif %} <br/><strong>e-mail:</strong> {{ offer.supplier.username }} {% endif %} </td> {% endif %} <td class="text-right"> {% if app.user.showOnlyRetailPriceAndDeliveryDate and app.user.id != offer.supplier.id and inquiry.recipient.id != app.user.id %} --- {% else %} {{ offer.createdAt|date('Y-m-d H:i') }} {% endif %} </td> <td class="text-right"> {{ offer.retailPrice|number_format(2, ',', ' ') }} zł </td> <td class="text-right"> {% if app.user.showOnlyRetailPriceAndDeliveryDate and app.user.id != offer.supplier.id and inquiry.recipient.id != app.user.id %} --- {% else %} {{ offer.discount }} % {% endif %} </td> <td class="text-right"> {% if app.user.showOnlyRetailPriceAndDeliveryDate and app.user.id != offer.supplier.id and inquiry.recipient.id != app.user.id %} --- {% else %} {{ offer.priceAfterDiscount|number_format(2, ',', '') }} zł {% endif %} </td> <td class="text-right"> {% if app.user.showOnlyRetailPriceAndDeliveryDate and app.user.id != offer.supplier.id and inquiry.recipient.id != app.user.id %} --- {% else %} {{ offer.deliveryPrice|number_format(2, ',', ' ') }} zł {% endif %} </td> <td class="text-center"> {{ offer.deliveryTime|date('Y-m-d') }} </td> {% if app.user.canGetNotificationsAboutBetterOffer %} <td class="text-right {% if offer.totalPrice == lowestPrice %} text-success {% elseif offer.totalPrice == highestPrice %} text-danger {% endif %}"> {% else %} <td class="text-right"> {% endif %} {% if app.user.showOnlyRetailPriceAndDeliveryDate and app.user.id != offer.supplier.id and inquiry.recipient.id != app.user.id %} --- {% else %} <strong>{{ offer.totalPrice|number_format(2, ',', ' ') }} zł</strong> {% endif %} {% if offer.seenByRecipient %} <span class="badge badge-success">Odczytano</span> {% else %} <span class="badge badge-warning">Nie odczytano</span> {% endif %} </td> <td> <div class="row mb-1"> <div class="col-md-7"> <a href="{{ path('client_offer_details', {id : offer.id}) }}" class="btn btn-light btn-sm" style="background-color: #ffd966;width: 95px;"> Szczegóły... </a> </div> <div class="col-md-5"> {% if offer.state == 'complete' %} <span class="badge badge-success">{% trans %}offer.state_short_complete{% endtrans %}</span> {% else %} <span class="badge badge-warning">{% trans %}offer.state_short_partial{% endtrans %}</span> {% endif %} {% if offer.partsOrdered %} <span data-toggle="tooltip" title="" data-original-title="{{ 'offer.messages.partsOrderedBySupplier'|trans }}"> <i class="fa fa-truck"></i> </span> {% endif %} </div> </div> <div class="row mb-1"> <div class="col-md-7"> <span style="white-space: nowrap;"> <a href="#" class="btn btn-light btn-sm [ show-private-message-popup ] " data-offer-id="{{ offer.id }}" style="width: 95px;"> Wiadomość </a> {% if unreadPrivateMessagesForOffers[offer.id] is defined or unreadMessagesForOffersForRecipient[offer.id] is defined %} <a href="{{ path('client_offer_details', {'id': offer.id}) }}#comments" style="animation: blinker 1s linear infinite; color: red;"> <span data-toggle="tooltip" title=""> <i class="fa fa-envelope fa-lg"></i> </span> </a> {% endif %} </span> </div> <div class="col-md-5"> {% if chosenOfferId == offer.id %} <span class="badge badge-success">{% trans %}offer.choosed{% endtrans %}</span> {% endif %} </div> </div> {% if chosenOfferId == null and not offer.isRejected %} {% if (app.user.isRecipient and inquiry.recipient.id == app.user.id) %} {% if offer.totalPrice == 0 %} <span style="animation: blinker 1s linear infinite;"> <small style="color: red; font-weight: bold;">Wycena na 0,00 zł? Pamiętaj, sprawdz szczegóły!</small> </span> {% endif %} <div class="row mb-1"> <div class="col-md-12"> <button class="btn btn-light btn-sm [ offer-choose-button offer-choose-button-{{ inquiry.id }} ]" data-offer-id="{{ offer.id }}" data-inquiry-id="{{ inquiry.id }}" data-offer-cost="{{ offer.totalPrice|number_format(2, ',', ' ') }}" data-all-parts="1" style="background-color: #92d050; font-weight: bold;"> Kup-zamów KOMPLET części z tej oferty </button> </div> </div> <div class="row mb-1"> <div class="col-md-12"> <button class="btn btn-light btn-sm [ offer-choose-button offer-choose-button-{{ inquiry.id }} ]" data-offer-id="{{ offer.id }}" data-inquiry-id="{{ inquiry.id }}" data-offer-cost="{{ offer.totalPrice|number_format(2, ',', ' ') }}" data-all-parts="0" style="background-color: #92d050; font-weight: bold;"> Kup-zamów WYBRANE części z tej oferty </button> </div> </div> {% endif %} {% endif %} </td> </tr> {% endif %} {% endfor %} </tbody> </table> </div> </div> </div> {% endfor %} {% endif %} </ul> </div> </div> <div class="clearfix"></div> {% if count is defined and limit is defined and page is defined and routing is defined %} {% set maxPage = (count / limit)|round(0, 'ceil') %} {% if maxPage > 1 %} <nav aria-label="Stronicowanie"> <ul class="pagination"> <li class="page-item {% if page == 1 %} disabled {% endif %}"> <a class="page-link" href="{{ path(routing, {page: page - 1}) }}">Poprzednia</a> </li> {% for pageNumber in 1..maxPage %} <li class="page-item {% if pageNumber == page %} active {% endif %}"> <a class="page-link" href="{{ path(routing, {page: pageNumber}) }}">{{ pageNumber }}</a> </li> {% endfor %} <li class="page-item" {% if page == maxPage %} disabled {% endif %}> <a class="page-link" href="{{ path(routing, {page: page + 1}) }}">Następna</a> </li> </ul> </nav> {% endif %} {% endif %} </div> </div> </div>{% endblock %}