Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ Section Order:

<!-- Your changes go here -->

### Changed

- Replaced deprecated templatetag

## [4.2.2] - 2026-03-11

### Changed
Expand Down
15 changes: 10 additions & 5 deletions aasrp/static/aasrp/javascript/view-requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $(document).ready(() => {
'use strict';

const element = {
srpRequestsTable: $('#tab_aasrp_srp_requests'),
srpRequestsTable: $('#table_aasrp_srp_requests'),
bulkActions: $('div.card-srp-request-bulk-actions'),
totalSrpCost: $('#srp-fleet-total-cost')
};
Expand Down Expand Up @@ -306,6 +306,7 @@ $(document).ready(() => {
title: aaSrpSettings.translation.changeSrpPayoutHeader,
type: 'number',
placement: 'top',
highlight: 'rgb(170 255 128)',
/**
* @returns {boolean}
*/
Expand Down Expand Up @@ -365,11 +366,11 @@ $(document).ready(() => {
/**
* Helper function: Refresh the Payout Amount field
*
* @param element
* @param valueField
* @param {int|string} newValue
* @private
*/
const _refreshSrpAmountField = (element, newValue) => {
const _refreshSrpAmountField = (valueField, newValue) => {
newValue = parseInt(newValue);

// Update payout value formatted
Expand All @@ -384,7 +385,7 @@ $(document).ready(() => {
});

// Update the element
element
valueField
.attr('data-value', newValue)
.addClass('srp-payout-amount-changed')
.html(newValueFormatted);
Expand All @@ -399,6 +400,8 @@ $(document).ready(() => {
totalSrpAmount += parseInt(payoutElement.getAttribute('data-value'));
});

console.log('Element Total Cost', element.totalSrpCost);

element.totalSrpCost.html(numberFormatter({
value: totalSrpAmount,
locales: aaSrpSettings.locale,
Expand All @@ -409,7 +412,7 @@ $(document).ready(() => {
}));

// Update copy to clipboard icon value
const copyToClipboard = element.parent().parent().find('.copy-to-clipboard-icon i');
const copyToClipboard = valueField.parent().parent().find('.copy-to-clipboard-icon i');
copyToClipboard.attr('data-clipboard-text', newValue);
};

Expand Down Expand Up @@ -443,6 +446,8 @@ $(document).ready(() => {
}
});

console.log('ELEMENT TOTAL COST', element.totalSrpCost);

// Update fleet total SRP amount
element.totalSrpCost.html(numberFormatter({
value: totalSrpAmount,
Expand Down
2 changes: 1 addition & 1 deletion aasrp/static/aasrp/javascript/view-requests.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aasrp/static/aasrp/javascript/view-requests.min.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load bootstrap %}
{% load django_bootstrap5 %}
{% load i18n %}

<!-- accept former rejected request modal -->
Expand All @@ -22,7 +22,7 @@
{% csrf_token %}

<fieldset class="aa-srp-request-form">
{{ forms.accept_rejected_request|bootstrap }}
{% bootstrap_field forms.accept_rejected_request.comment %}

{% include "aasrp/partials/form/required-field-hint.html" %}
</fieldset>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load bootstrap %}
{% load django_bootstrap5 %}
{% load i18n %}

<!-- accept request modal -->
Expand All @@ -21,9 +21,11 @@
<form autocomplete="off" method="post">
{% csrf_token %}

{{ forms.accept_request|bootstrap }}
<fieldset class="aa-srp-request-form">
{% bootstrap_field forms.accept_request.comment %}

{% include "aasrp/partials/form/required-field-hint.html" %}
{% include "aasrp/partials/form/required-field-hint.html" %}
</fieldset>
</form>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% load bootstrap %}
{% load i18n %}

<!-- bulk accept requests modal -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% load bootstrap %}
{% load i18n %}

<!-- bulk delete requests modal -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load bootstrap %}
{% load django_bootstrap5 %}
{% load i18n %}

<!-- reject request modal -->
Expand All @@ -22,7 +22,7 @@
{% csrf_token %}

<fieldset class="aa-srp-request-form">
{{ forms.reject_request|bootstrap }}
{% bootstrap_field forms.reject_request.comment %}

{% include "aasrp/partials/form/required-field-hint.html" %}
</fieldset>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

<div class="card-body">
<div class="table-responsive">
<table class="table table-striped table-aasrp table-srp-requests table-vertical-middle w-100" id="tab_aasrp_srp_requests">
<table class="table table-striped table-aasrp table-srp-requests table-vertical-middle w-100" id="table_aasrp_srp_requests">
<thead>
<tr>
<th class="w-auto">{% translate "Request time" %}</th>
Expand Down
Loading