{% extends "aasrp/base.html" %}

{% load i18n %}

{% block page_title %}
    {% translate "My SRP requests" %} » {% translate "Ship Replacement" %}
{% endblock %}

{% block aasrp_body %}
    {% include "aasrp/partials/view-own-requests/user-srp-requests.html" with tab_name="tab-user-srp-requests" %}
    {% include "aasrp/modals/view-requests/request-details.html" %}
{% endblock %}

{% block extra_css %}
    {% include "bundles/datatables-css-bs5.html" %}
    {% include "aasrp/bundles/aa-srp-css.html" %}
    {% include "aasrp/bundles/aa-srp-form-css.html" %}
{% endblock %}

{% block extra_javascript %}
    {% translate "Ship" as translationShip %}
    {% translate "Request status" as translationRequestStatus %}
    {% translate "Character" as translationCharacter %}
    {% translate "Requestor" as translationRequestor %}
    {% translate "Additional information" as translationAdditionalInformation %}
    {% translate "Reject information" as translationRejectInformation %}

    <script>
        /**
         * Passing some setting to our JS
         */
        const aaSrpJsSettingsOverride = {
            url: {
                userSrpRequests: '{% url "aasrp:ajax_dashboard_user_srp_requests_data" %}'
            },
            translation: {
                filter: {
                    ship: '{{ translationShip|escapejs }}',
                    requestStatus: '{{ translationRequestStatus|escapejs }}',
                    character: '{{ translationCharacter|escapejs }}',
                },
                modal: {
                    srpDetails: {
                        body: {
                            requestor: '{{ translationRequestor|escapejs }}',
                            character: '{{ translationCharacter|escapejs }}',
                            ship: '{{ translationShip|escapejs }}',
                            additionalInformation: '{{ translationAdditionalInformation|escapejs }}',
                            rejectInformation: '{{ translationRejectInformation|escapejs }}',
                        }
                    }
                }
            }
        };
    </script>

    {% include "bundles/datatables-js-bs5.html" %}
    {% include "bundles/moment-js.html" with locale=True %}
    {% include "bundles/filterdropdown-js.html" %}
    {% include "aasrp/bundles/aa-srp-js.html" %}
    {% include "aasrp/bundles/my-srp-requests-js.html" %}
{% endblock %}
