mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-14 08:37:00 +02:00
Fixed last places custom currency not showing
This commit is contained in:
parent
dd5aef123d
commit
c806bdc73f
3 changed files with 22 additions and 17 deletions
|
@ -431,7 +431,8 @@ class DapiController extends Controller
|
||||||
'registrar_id' => 'ph.registrar_id',
|
'registrar_id' => 'ph.registrar_id',
|
||||||
'description' => 'ph.description',
|
'description' => 'ph.description',
|
||||||
'amount' => 'ph.amount',
|
'amount' => 'ph.amount',
|
||||||
'registrar_name' => 'r.name'
|
'registrar_name' => 'r.name',
|
||||||
|
'currency' => 'r.currency'
|
||||||
];
|
];
|
||||||
|
|
||||||
// --- SORTING ---
|
// --- SORTING ---
|
||||||
|
@ -554,7 +555,8 @@ class DapiController extends Controller
|
||||||
ph.date,
|
ph.date,
|
||||||
ph.description,
|
ph.description,
|
||||||
ph.amount,
|
ph.amount,
|
||||||
r.name AS registrar_name
|
r.name AS registrar_name,
|
||||||
|
r.currency
|
||||||
";
|
";
|
||||||
|
|
||||||
$dataSql = "
|
$dataSql = "
|
||||||
|
@ -597,7 +599,8 @@ class DapiController extends Controller
|
||||||
'fromS' => 'st.fromS',
|
'fromS' => 'st.fromS',
|
||||||
'toS' => 'st.toS',
|
'toS' => 'st.toS',
|
||||||
'amount' => 'st.amount',
|
'amount' => 'st.amount',
|
||||||
'registrar_name' => 'r.name'
|
'registrar_name' => 'r.name',
|
||||||
|
'currency' => 'r.currency'
|
||||||
];
|
];
|
||||||
|
|
||||||
// --- SORTING ---
|
// --- SORTING ---
|
||||||
|
@ -724,7 +727,8 @@ class DapiController extends Controller
|
||||||
st.fromS,
|
st.fromS,
|
||||||
st.toS,
|
st.toS,
|
||||||
st.amount,
|
st.amount,
|
||||||
r.name AS registrar_name
|
r.name AS registrar_name,
|
||||||
|
r.currency
|
||||||
";
|
";
|
||||||
|
|
||||||
$dataSql = "
|
$dataSql = "
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
var table;
|
var table;
|
||||||
document.addEventListener("DOMContentLoaded", function(){
|
document.addEventListener("DOMContentLoaded", function(){
|
||||||
|
|
||||||
currency = "{{ currency }} ";
|
|
||||||
|
|
||||||
var searchTerm = ""; // global variable to hold the search term
|
var searchTerm = ""; // global variable to hold the search term
|
||||||
|
|
||||||
function updateSearchTerm(term) {
|
function updateSearchTerm(term) {
|
||||||
|
@ -73,11 +71,13 @@
|
||||||
{title:"{{ __('Registrar') }}", field:"registrar_name", resizable:false, headerSort:true, responsive:0},
|
{title:"{{ __('Registrar') }}", field:"registrar_name", resizable:false, headerSort:true, responsive:0},
|
||||||
{title:"{{ __('Date') }}", field:"date", resizable:false, headerSort:true, responsive:2},
|
{title:"{{ __('Date') }}", field:"date", resizable:false, headerSort:true, responsive:2},
|
||||||
{title:"{{ __('Description') }}", field:"description", resizable:false, headerSort:true, responsive:2, formatter:cell => (cell.getElement().setAttribute("title", cell.getValue() || ""), cell.getValue()?.length > 80 ? cell.getValue().substring(0, 80) + "..." : cell.getValue())},
|
{title:"{{ __('Description') }}", field:"description", resizable:false, headerSort:true, responsive:2, formatter:cell => (cell.getElement().setAttribute("title", cell.getValue() || ""), cell.getValue()?.length > 80 ? cell.getValue().substring(0, 80) + "..." : cell.getValue())},
|
||||||
{title:"{{ __('Amount') }}", field:"amount", resizable:false, headerSort:true, width:200, minWidth:100, responsive:0, formatter:"money", formatterParams:{
|
{title:"{{ __('Amount') }}", field:"amount", resizable:false, headerSort:true, width:200, minWidth:100, responsive:0, formatter:"money", formatterParams:function(cell){
|
||||||
|
return {
|
||||||
decimal: ".",
|
decimal: ".",
|
||||||
thousand: " ",
|
thousand: " ",
|
||||||
symbol:currency,
|
symbol: (cell.getRow().getData().currency || "$") + " ", // Ensures space after currency symbol
|
||||||
negativeSign:true,
|
negativeSign: true
|
||||||
|
};
|
||||||
}},
|
}},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
<script src="/assets/js/jspdf.plugin.autotable.min.js" defer></script>
|
<script src="/assets/js/jspdf.plugin.autotable.min.js" defer></script>
|
||||||
<script>
|
<script>
|
||||||
var table;
|
var table;
|
||||||
currency = "{{ currency }} ";
|
|
||||||
document.addEventListener("DOMContentLoaded", function(){
|
document.addEventListener("DOMContentLoaded", function(){
|
||||||
|
|
||||||
var searchTerm = ""; // global variable to hold the search term
|
var searchTerm = ""; // global variable to hold the search term
|
||||||
|
@ -80,11 +79,13 @@
|
||||||
{title:"{{ __('Length') }}", field:"length_in_months", resizable:false, download:false, headerSort:true, responsive:2},
|
{title:"{{ __('Length') }}", field:"length_in_months", resizable:false, download:false, headerSort:true, responsive:2},
|
||||||
{title:"{{ __('From') }}", field:"fromS", resizable:false, headerSort:true, download:false, responsive:2},
|
{title:"{{ __('From') }}", field:"fromS", resizable:false, headerSort:true, download:false, responsive:2},
|
||||||
{title:"{{ __('To') }}", field:"toS", resizable:false, headerSort:true, download:false, responsive:2},
|
{title:"{{ __('To') }}", field:"toS", resizable:false, headerSort:true, download:false, responsive:2},
|
||||||
{title:"{{ __('Amount') }}", field:"amount", resizable:false, headerSort:true, responsive:0, formatter:"money", formatterParams:{
|
{title:"{{ __('Amount') }}", field:"amount", resizable:false, headerSort:true, responsive:0, formatter:"money", formatterParams:function(cell){
|
||||||
|
return {
|
||||||
decimal: ".",
|
decimal: ".",
|
||||||
thousand: " ",
|
thousand: " ",
|
||||||
symbol:currency,
|
symbol: (cell.getRow().getData().currency || "$") + " ", // Ensures space after currency symbol
|
||||||
negativeSign:true,
|
negativeSign: true
|
||||||
|
};
|
||||||
}},
|
}},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue