Release 1.20.3 (#3340)

* fix edit timesheet link
* fix drag & drop creates record for wrong user
* fix search with multiple bindings
* hide user switcher in calendar if there is only one user to choose
* make quick entry responsive for mobile-only users
* mark invoices as exported by default
* fix serialization deprecation warning
* fix duration calculation for fixed rate entries
* updated composer packages
* fix checkbox for horizontal forms
* support pdfContext for PDF invoice templates
This commit is contained in:
Kevin Papst
2022-06-11 13:25:50 +02:00
committed by GitHub
parent b46fdcefad
commit f8cb8900d6
19 changed files with 412 additions and 361 deletions

View File

@@ -69,12 +69,14 @@
{% set calendarSelector = '#timesheet_calendar' %}
{% set createParams = '' %}
{% set createRoute = 'timesheet_create' %}
{% set editRoute = 'timesheet_edit' %}
{% set canDelete = is_granted('delete_own_timesheet') %}
{% set canCreate = is_granted('create_own_timesheet') %}
{% set canEdit = is_granted('edit_own_timesheet') %}
{% if user != app.user %}
{% set createParams = '&user=' ~ user.id %}
{% set createRoute = 'admin_timesheet_create' %}
{% set editRoute = 'admin_timesheet_edit' %}
{% set canDelete = is_granted('delete_other_timesheet') %}
{% set canCreate = is_granted('create_other_timesheet') %}
{% set canEdit = is_granted('edit_other_timesheet') %}
@@ -303,6 +305,7 @@
let source = entry.parentElement;
let plainData = entry.dataset.entry;
let data = JSON.parse(plainData);
data.user = {{ user.id }};
let urlReplacer = JSON.parse(source.dataset.routeReplacer);
let apiUrl = source.dataset.route;
@@ -491,7 +494,7 @@
jsEvent.preventDefault();
return;
}
let editUrl = '{{ path('timesheet_edit', {id: '-XX-'}) }}'.replace('-XX-', eventObj.id);
let editUrl = '{{ path(editRoute, {id: '-XX-'}) }}'.replace('-XX-', eventObj.id);
kimai.getPlugin('modal').openUrlInModal(editUrl);
},
{% if not is_punch_mode %}

View File

@@ -16,7 +16,7 @@
{% block box_title %}
{{ form_widget(form.date) }}
{% endblock %}
{% block box_body_class %}no-padding{% endblock %}
{% block box_body_class %}no-padding table-responsive{% endblock %}
{% block box_footer %}
<input type="submit" value="{{ 'action.save'|trans }}" class="btn btn-primary" />
<button type="button" class="btn btn-success add-item-link" data-collection-prototype="{{ form.rows.vars.id }}" data-collection-holder="ts-collection">