feat: Implement localization for excludeFromBilling label in diary components
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 44s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 44s
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
:checked="excludeFromBilling"
|
||||
@change="$emit('update:exclude-from-billing', $event.target.checked)"
|
||||
/>
|
||||
<span>Nicht abrechnen</span>
|
||||
<span>{{ $t('diary.excludeFromBilling') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit">{{ $t('diary.updateTimes') }}</button>
|
||||
|
||||
@@ -668,6 +668,7 @@
|
||||
"trainingDayChecklist": "Abschlusscheck",
|
||||
"trainingStart": "Trainingsbeginn",
|
||||
"trainingEnd": "Trainingsende",
|
||||
"excludeFromBilling": "Nicht abrechnen",
|
||||
"trainingWindow": "Trainingsfenster",
|
||||
"trainingWindowUnset": "Noch nicht gesetzt",
|
||||
"groupsLabel": "Gruppen",
|
||||
|
||||
@@ -659,6 +659,7 @@
|
||||
"trainingDayChecklist": "Completion checklist",
|
||||
"trainingStart": "Training start",
|
||||
"trainingEnd": "Training end",
|
||||
"excludeFromBilling": "Exclude from billing",
|
||||
"trainingWindow": "Training window",
|
||||
"trainingWindowUnset": "Not set yet",
|
||||
"groupsLabel": "Groups",
|
||||
|
||||
@@ -660,6 +660,7 @@
|
||||
"trainingDayChecklist": "Completion checklist",
|
||||
"trainingStart": "Training start",
|
||||
"trainingEnd": "Training end",
|
||||
"excludeFromBilling": "Exclude from billing",
|
||||
"trainingWindow": "Training window",
|
||||
"trainingWindowUnset": "Not set yet",
|
||||
"groupsLabel": "Groups",
|
||||
|
||||
@@ -660,6 +660,7 @@
|
||||
"trainingDayChecklist": "Completion checklist",
|
||||
"trainingStart": "Training start",
|
||||
"trainingEnd": "Training end",
|
||||
"excludeFromBilling": "Exclude from billing",
|
||||
"trainingWindow": "Training window",
|
||||
"trainingWindowUnset": "Not set yet",
|
||||
"groupsLabel": "Groups",
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<div>
|
||||
<label for="excludeFromBilling" style="display: inline-flex; align-items: center; gap: 0.4rem;">
|
||||
<input type="checkbox" id="excludeFromBilling" v-model="excludeFromBilling" />
|
||||
<span>Nicht abrechnen</span>
|
||||
<span>{{ $t('diary.excludeFromBilling') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit">{{ $t('diary.createDate') }}</button>
|
||||
@@ -97,7 +97,7 @@
|
||||
@update-training-times="updateTrainingTimes"
|
||||
@update:training-start="trainingStart = $event"
|
||||
@update:training-end="trainingEnd = $event"
|
||||
@update:exclude-from-billing="excludeFromBilling = $event"
|
||||
@update:exclude-from-billing="updateExcludeFromBillingImmediate"
|
||||
@edit-group="editGroup"
|
||||
@update-group-field="updateGroupField"
|
||||
@save-group="saveGroup"
|
||||
@@ -1880,6 +1880,26 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
async updateExcludeFromBillingImmediate(nextValue) {
|
||||
if (!this.date?.id) {
|
||||
this.excludeFromBilling = Boolean(nextValue);
|
||||
return;
|
||||
}
|
||||
const previousValue = Boolean(this.excludeFromBilling);
|
||||
this.excludeFromBilling = Boolean(nextValue);
|
||||
try {
|
||||
await apiClient.put(`/diary/${this.currentClub}`, {
|
||||
dateId: this.date.id,
|
||||
trainingStart: this.trainingStart || null,
|
||||
trainingEnd: this.trainingEnd || null,
|
||||
excludeFromBilling: this.excludeFromBilling,
|
||||
});
|
||||
} catch (error) {
|
||||
this.excludeFromBilling = previousValue;
|
||||
this.showInfo(this.$t('messages.error'), this.$t('diary.errorOccurred'), '', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
async loadMembers() {
|
||||
const response = await apiClient.get(`/clubmembers/get/${this.currentClub}/false`);
|
||||
// Erstelle ein neues Array, um Vue-Reaktivität sicherzustellen
|
||||
|
||||
Reference in New Issue
Block a user