Release 2.35.1 (#5509)

do not trigger changes on empty time fields or empty duration
This commit is contained in:
Kevin Papst
2025-05-31 15:29:43 +02:00
committed by GitHub
parent 0420eb27c7
commit 12190141d7
6 changed files with 21 additions and 9 deletions

View File

@@ -144,6 +144,10 @@ export default class KimaiTimesheetForm extends KimaiFormPlugin {
_parseBeginTime() _parseBeginTime()
{ {
if (this._beginTime.value === '') {
return;
}
let newBeginTime = this._formatTimeForParsing(this._beginTime.value, this._beginTime.dataset['format']); let newBeginTime = this._formatTimeForParsing(this._beginTime.value, this._beginTime.dataset['format']);
if (newBeginTime !== this._beginTime.value) { if (newBeginTime !== this._beginTime.value) {
this._beginTime.value = newBeginTime; this._beginTime.value = newBeginTime;
@@ -153,6 +157,10 @@ export default class KimaiTimesheetForm extends KimaiFormPlugin {
_parseEndTime() _parseEndTime()
{ {
if (this._endTime.value === '') {
return;
}
let newEndTime = this._formatTimeForParsing(this._endTime.value, this._endTime.dataset['format']); let newEndTime = this._formatTimeForParsing(this._endTime.value, this._endTime.dataset['format']);
if (newEndTime !== this._endTime.value) { if (newEndTime !== this._endTime.value) {
this._endTime.value = newEndTime; this._endTime.value = newEndTime;
@@ -162,6 +170,10 @@ export default class KimaiTimesheetForm extends KimaiFormPlugin {
_parseDuration() _parseDuration()
{ {
if (this._duration.value === '') {
return;
}
this._setDurationAsString(this._getParsedDuration()); this._setDurationAsString(this._getParsedDuration());
} }
@@ -446,14 +458,14 @@ export default class KimaiTimesheetForm extends KimaiFormPlugin {
/** /**
* Ruleset: * Ruleset:
* - invalid duration => skip * - invalid or empty duration => skip
* - if begin and end are empty: set begin to now and end to duration * - if begin and end are empty: set begin to now and end to duration
* - if begin is empty and end is not empty: set begin to end minus duration * - if begin is empty and end is not empty: set begin to end minus duration
* - if begin is not empty and end is empty and duration is > 0 (running records = 0): set end to begin plus duration * - if begin is not empty and end is empty and duration is > 0 (running records = 0): set end to begin plus duration
*/ */
_changedDuration() _changedDuration()
{ {
if (!this._isDurationConnected()) { if (!this._isDurationConnected() || this._duration.value === '') {
return; return;
} }

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@
"app": { "app": {
"js": [ "js": [
"/build/runtime.6c399d29.js", "/build/runtime.6c399d29.js",
"/build/app.f98f56cc.js" "/build/app.6bb53337.js"
], ],
"css": [ "css": [
"/build/app.0416ea92.css" "/build/app.0416ea92.css"
@@ -72,7 +72,7 @@
}, },
"integrity": { "integrity": {
"/build/runtime.6c399d29.js": "sha384-/rm616f12czi8l/27GvWXtb3g608vJZf2XTUKxqCRI4tsa2vUHP+BW90edTok5zC", "/build/runtime.6c399d29.js": "sha384-/rm616f12czi8l/27GvWXtb3g608vJZf2XTUKxqCRI4tsa2vUHP+BW90edTok5zC",
"/build/app.f98f56cc.js": "sha384-YWrfaZO6uvTBk94Q/zlqG56vaP68xEWYD1YunerAX1rMJcRMFSzi8fp7TVGeJm78", "/build/app.6bb53337.js": "sha384-ZcwEys2VjhW4jwH/pU+/W06vG7rBounyirdkC+TCA4PyMn2QsENR6FIcNoJEpF5X",
"/build/app.0416ea92.css": "sha384-JAIO6+B/vmV8IlpsmQ+zkfO4JsvdKTMsZZaDg6EMlZxkMZ5K3cpEK0mo24D/Wgkh", "/build/app.0416ea92.css": "sha384-JAIO6+B/vmV8IlpsmQ+zkfO4JsvdKTMsZZaDg6EMlZxkMZ5K3cpEK0mo24D/Wgkh",
"/build/app-rtl.7a875ca7.js": "sha384-T7gLI61h9dGeMgzo63vKu4GiDOeLPct9zSUHrceNbhSwIdUmSSNoZ1+d7fKhJJ4/", "/build/app-rtl.7a875ca7.js": "sha384-T7gLI61h9dGeMgzo63vKu4GiDOeLPct9zSUHrceNbhSwIdUmSSNoZ1+d7fKhJJ4/",
"/build/app-rtl.0848906b.css": "sha384-O26Xw3P/NSea5iT6lt5v2RaZ6+jP06hf9vYD2pUJbkFSCLGU1iGXnobP25dWjUs/", "/build/app-rtl.0848906b.css": "sha384-O26Xw3P/NSea5iT6lt5v2RaZ6+jP06hf9vYD2pUJbkFSCLGU1iGXnobP25dWjUs/",

View File

@@ -1,6 +1,6 @@
{ {
"build/app.css": "/build/app.0416ea92.css", "build/app.css": "/build/app.0416ea92.css",
"build/app.js": "/build/app.f98f56cc.js", "build/app.js": "/build/app.6bb53337.js",
"build/app-rtl.css": "/build/app-rtl.0848906b.css", "build/app-rtl.css": "/build/app-rtl.0848906b.css",
"build/app-rtl.js": "/build/app-rtl.7a875ca7.js", "build/app-rtl.js": "/build/app-rtl.7a875ca7.js",
"build/export-pdf.css": "/build/export-pdf.d8a6c23b.css", "build/export-pdf.css": "/build/export-pdf.d8a6c23b.css",

View File

@@ -17,11 +17,11 @@ final class Constants
/** /**
* The current release version * The current release version
*/ */
public const VERSION = '2.35.0'; public const VERSION = '2.35.1';
/** /**
* The current release: major * 10000 + minor * 100 + patch * The current release: major * 10000 + minor * 100 + patch
*/ */
public const VERSION_ID = 23500; public const VERSION_ID = 23501;
/** /**
* The software name * The software name
*/ */