mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-06 09:46:51 +02:00
Actual field parsing for last_followup
This commit is contained in:
parent
9c8ca60f3c
commit
cf2fb41bc7
@ -331,7 +331,13 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<script src="{% static 'helpdesk/vendor/timeline3/js/timeline.js' %}"></script>
|
<script src="{% static 'helpdesk/vendor/timeline3/js/timeline.js' %}"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
window.helpdesk_settings = {
|
||||||
|
LANGUAGE_CODE: "{{ helpdesk_settings.LANGUAGE_CODE|default:'en-US' }}",
|
||||||
|
NO_FOLLOWUP_TEXT: "{{ helpdesk_settings.TRANSLATIONS.No_followup_found|default:'No followup found' }}"
|
||||||
|
};
|
||||||
|
|
||||||
function get_url(row) {
|
function get_url(row) {
|
||||||
return "{% url 'helpdesk:view' 1234 %}".replace(/1234/, row.id.toString());
|
return "{% url 'helpdesk:view' 1234 %}".replace(/1234/, row.id.toString());
|
||||||
}
|
}
|
||||||
@ -419,11 +425,10 @@
|
|||||||
{
|
{
|
||||||
data: "last_followup",
|
data: "last_followup",
|
||||||
render: function (data, type, row) {
|
render: function (data, type, row) {
|
||||||
let locale = window.django_settings ? window.django_settings.LANGUAGE_CODE : 'en-US'; // Default to en-US if settings are not found
|
let locale = window.helpdesk_settings.LANGUAGE_CODE;
|
||||||
|
|
||||||
if (isNaN(Date.parse(data))) {
|
if (isNaN(Date.parse(data))) {
|
||||||
let noFollowup = window.django_settings && window.django_settings.TRANSLATIONS && window.django_settings.TRANSLATIONS['No followup found'] ? window.django_settings.TRANSLATIONS['No followup found'] : "No followup found";
|
return window.helpdesk_settings.NO_FOLLOWUP_TEXT;
|
||||||
return noFollowup;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let date = new Date(data);
|
let date = new Date(data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user