mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 12:42:15 +01:00
fix 0 values do no update time entry, fix duplicate requests on time entry update
This commit is contained in:
@@ -17,7 +17,7 @@ const minutes = computed(() => {
|
||||
function updateMinutes(event: Event) {
|
||||
const target = event.target as HTMLInputElement;
|
||||
const newValue = target.value;
|
||||
if (parseInt(newValue)) {
|
||||
if (!isNaN(parseInt(newValue))) {
|
||||
model.value = dayjs(model.value)
|
||||
.utc()
|
||||
.set('minutes', parseInt(newValue))
|
||||
@@ -28,7 +28,7 @@ function updateMinutes(event: Event) {
|
||||
function updateHours(event: Event) {
|
||||
const target = event.target as HTMLInputElement;
|
||||
const newValue = target.value;
|
||||
if (parseInt(newValue)) {
|
||||
if (!isNaN(parseInt(newValue))) {
|
||||
model.value = dayjs(model.value)
|
||||
.utc()
|
||||
.set('hours', parseInt(newValue))
|
||||
|
||||
Reference in New Issue
Block a user