diff --git a/package.json b/package.json index 0d6071b..c49ee28 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "test:unit:once": "vitest --environment jsdom run --outputFile.junit=target/testResults.xml --reporter=junit --reporter=default", "generate:api": "rm -r -f src/generated-sources && openapi-generator-cli generate", "license:check": "licensee --production --errors-only", - "license:list": "licensee --production || true" + "license:list": "licensee --production || true", + "lint:test:package": "npm run lint && npm run test:unit:once && npm run package" }, "engines": { "node": "18.18.0", diff --git a/src/components/ParticipantList.vue b/src/components/ParticipantList.vue index 3581455..d11fdfe 100644 --- a/src/components/ParticipantList.vue +++ b/src/components/ParticipantList.vue @@ -18,8 +18,8 @@ Licensed under the Elastic License 2.0. */ import { Participant, StudyGroup, - StudyStatus, StudyRole, + StudyStatus, } from '../generated-sources/openapi'; import MoreTable from './shared/MoreTable.vue'; import ConfirmDialog from 'primevue/confirmdialog'; @@ -364,6 +364,7 @@ Licensed under the Elastic License 2.0. */ } const menu = ref(); + function toggleButtonMenu(event: MouseEvent): void { menu.value.toggle(event); } diff --git a/src/components/dialog/StudyDialog.vue b/src/components/dialog/StudyDialog.vue index 864bba5..81ca4af 100644 --- a/src/components/dialog/StudyDialog.vue +++ b/src/components/dialog/StudyDialog.vue @@ -245,12 +245,7 @@ Licensed under the Elastic License 2.0. */ :placeholder="$t('study.placeholder.durationInput')" :auto-resize="true" :min="0" - @input=" - (event) => { - console.log(event); - clearError('duration'); - } - " + @input="clearError('duration')" /> {{ $t('scheduler.frequency.days') }} diff --git a/src/components/shared/RelativeScheduler.vue b/src/components/shared/RelativeScheduler.vue index 1cae249..4067d4d 100644 --- a/src/components/shared/RelativeScheduler.vue +++ b/src/components/shared/RelativeScheduler.vue @@ -45,7 +45,7 @@ ); const endOffset = ref({ - value: schedule.dtend?.offset?.value ?? 2, + value: schedule.dtend?.offset?.value ?? 1, unit: DurationUnitEnum.Day, }); const endTime = ref( diff --git a/src/i18n/de.json b/src/i18n/de.json index 61826cc..87f2534 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -1063,7 +1063,7 @@ "endAfter": "Bitte geben Sie den Offset zum Enddatum ein.", "notValid": "Die eingegebenen Werte sind ungültig.", "repetitionTooLong": "Wiederholungen dürfen das Studienende nicht überschreiten. Das maximale Intervall beträgt {repValue} {repUnit}.", - "repetitionEndTooLong": "Das Ende der Wiederholungen darf die Studiendauer von {durValue} {durUnit} nicht überschreiten." + "repetitionEndTooLong": "Das Ende der Wiederholungen darf die verbleibende Studiendauer von {durValue} {durUnit} nicht überschreiten." }, "cannotRepeat": "Das Datenerhebungs-Event kann nicht erneut stattfinden, da dies über das Ende der Studie hinausgehen würde." } diff --git a/src/i18n/en.json b/src/i18n/en.json index 1c18096..3469845 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -1063,7 +1063,7 @@ "endAfter": "Fill in the offset to the end date.", "notValid": "Values entered are not valid", "repetitionTooLong": "Repetitions must not exceed the end of the study. The maximum interval is {repValue} {repUnit}.", - "repetitionEndTooLong": "The end of repetitions must not exceed the study duration of {durValue} {durUnit}." + "repetitionEndTooLong": "The end of repetitions must not exceed the remaining study duration of {durValue} {durUnit}." }, "cannotRepeat": "The observation cannot occur again as it would exceed the end of the study." } diff --git a/src/utils/relativeScheduleUtils.ts b/src/utils/relativeScheduleUtils.ts index a2a3e93..4aa0316 100644 --- a/src/utils/relativeScheduleUtils.ts +++ b/src/utils/relativeScheduleUtils.ts @@ -114,7 +114,7 @@ export const correctEventRepetition = ( let frequencyEndError: ErrorValue | undefined; const timeRemaining = - maxDurationInMinutes - (valueToMinutes(offsetStart) - minutesInDay); + maxDurationInMinutes - (valueToMinutes(offsetEnd) - minutesInDay); if (frequencyEndInMinutes > timeRemaining) { correctedFrequencyEnd = minutesToDuration(timeRemaining, frequencyEnd.unit); frequencyEndInMinutes = timeRemaining;