Release 2.4.0 (#4427)

* button to duplicate old timesheets, even those from lockdown period
* bump composer packages
* fixes tooltip remains in view #4426
* fix js error if all widgets were removed
* allow to open timesheet edit dialog from export listing
* css classes for timesheet context menu, so they can be hidden
* added flag to force a user to set password upon login
* enable lazy-ghost-objects to fix deprecation
* change user, username, internal_rate export column labels
* helper method to find user by displayname
* log improvements and format changes
* deactivate broken schema validation
This commit is contained in:
Kevin Papst
2023-11-19 16:05:43 +01:00
committed by GitHub
parent 9d8e5ecd7a
commit 20164295f8
27 changed files with 186 additions and 169 deletions

View File

@@ -51,7 +51,7 @@
{% if widget.hasForm() %}
{{ card_tool_button('configuration', {'title': 'settings', 'translation_domain': 'actions', 'class': 'modal-ajax-form', 'url': path('tasks_create')}) }}
{% endif %}
{{ card_tool_button('delete', {'title': 'widget_remove', 'translation_domain': 'actions', 'url': '#', 'onclick': "removeWidget('" ~ widget.id ~ "'); return false;"}) }}
{{ card_tool_button('delete', {'title': 'widget_remove', 'translation_domain': 'actions', 'url': '#', 'onclick': "removeWidget(this, '" ~ widget.id ~ "'); return false;"}) }}
</div>
</div>
<div class="card-body p-0">
@@ -89,6 +89,7 @@
resizeGrid();
});
{% if widgets|length > 0 %}
document.addEventListener('kimai.initialized', function() {
grid = GridStack.init({
'float': false,
@@ -110,10 +111,18 @@
document.dispatchEvent(new Event('dashboard.initialized'));
document.getElementById('dashboard-grid-container').style.visibility = 'visible';
});
{% endif %}
{% if form is defined %}
function removeWidget(widgetId)
function removeWidget(button, widgetId)
{
{# hackish way to remove tooltip, as we do not have a reference in the frontend to the bootstrap tooltip classes #}
const id = button.attributes['aria-describedBy'].value;
const tooltip = document.getElementById(id);
if (tooltip !== null) {
tooltip.remove();
}
const widget = document.querySelector('div[data-widget=' + widgetId + ']');
if (widget !== null) {
grid.removeWidget(widget);

View File

@@ -197,6 +197,7 @@
{% endif %}
{{ tables.datatable_header(tableName, columns, query) }}
{% set edit_route = is_granted('view_other_timesheet') ? 'admin_timesheet_edit' : 'timesheet_edit' %}
{% for entry in entries %}
{% set currency = entry.project.customer.currency %}
{% if entry.fixedRate is not null %}
@@ -204,7 +205,8 @@
{% else %}
{% set rate = entry.hourlyRate %}
{% endif %}
<tr>
<tr{%- if entry.type == 'timesheet' and is_granted('edit', entry) %}
class="modal-ajax-form open-edit" data-href="{{ path(edit_route, {'id': entry.id}) }}"{% endif -%}>
<td class="{{ tables.data_table_column_class(tableName, columns, 'avatar') }}">
{{ widgets.user_avatar(entry.user) }}
</td>

View File

@@ -9,9 +9,6 @@
<fieldset class="form-fieldset form-fieldset-light">
{{ form_row(form.alias) }}
{{ form_row(form.email) }}
{% if form.systemAccount is defined %}
{{ form_row(form.systemAccount) }}
{% endif %}
</fieldset>
<fieldset class="form-fieldset form-fieldset-light">