removed errors from missing translations
refresh in audit log
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
|
||||
<button @click="loadAuditLog" class="btn-refresh" :disabled="isLoading">
|
||||
<span v-if="isLoading">⏳</span>
|
||||
<span v-else">🔄</span>
|
||||
<span v-else>🔄</span>
|
||||
{{ $t('audit.refresh', 'Aktualisieren') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
|
||||
<!-- Audit Log -->
|
||||
<AuditLogView
|
||||
ref="auditLog"
|
||||
v-if="character"
|
||||
:character="character"
|
||||
/>
|
||||
@@ -172,6 +173,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refreshAuditLog() {
|
||||
// Refresh the audit log after EP or gold changes
|
||||
if (this.$refs.auditLog && this.$refs.auditLog.loadAuditLog) {
|
||||
this.$refs.auditLog.loadAuditLog();
|
||||
}
|
||||
},
|
||||
|
||||
async addExperience() {
|
||||
if (!this.experienceAmount || this.experienceAmount <= 0 || this.isLoading) return;
|
||||
|
||||
@@ -266,6 +274,9 @@ export default {
|
||||
this.$set(this.character, 'erfahrungsschatz', { value: newValue });
|
||||
}
|
||||
|
||||
// Refresh the audit log to show the change
|
||||
this.refreshAuditLog();
|
||||
|
||||
// Emit event to parent component to refresh character data
|
||||
this.$emit('character-updated');
|
||||
|
||||
@@ -308,6 +319,9 @@ export default {
|
||||
this.$set(this.character, 'vermoegen', { goldstücke: newValue, silberstücke: 0, kupferstücke: 0 });
|
||||
}
|
||||
|
||||
// Refresh the audit log to show the change
|
||||
this.refreshAuditLog();
|
||||
|
||||
// Emit event to parent component to refresh character data
|
||||
this.$emit('character-updated');
|
||||
|
||||
|
||||
@@ -644,7 +644,7 @@ export default {
|
||||
});
|
||||
|
||||
// API-Endpunkt für verfügbare Belohnungsarten
|
||||
const response = await this.$api.get(`/api/characters/${this.character.id}/reward-types`, {
|
||||
const response = await API.get(`/api/characters/${this.character.id}/reward-types`, {
|
||||
params: {
|
||||
learning_type: this.learningType,
|
||||
skill_name: this.skill.name,
|
||||
@@ -751,7 +751,7 @@ export default {
|
||||
reward: this.selectedRewardType
|
||||
};
|
||||
|
||||
const response = await this.$api.post(`/api/characters/lerncost-new`, requestData);
|
||||
const response = await API.post(`/api/characters/lerncost-new`, requestData);
|
||||
|
||||
console.log('Learning costs API response:', response.data);
|
||||
|
||||
@@ -1003,7 +1003,7 @@ export default {
|
||||
break;
|
||||
}
|
||||
|
||||
const response = await this.$api.post(endpoint, requestData);
|
||||
const response = await API.post(endpoint, requestData);
|
||||
|
||||
console.log(`${this.learningType} erfolgreich ausgeführt:`, response.data);
|
||||
alert(`${this.learningType === 'spell' ? 'Zauber' : 'Fertigkeit'} "${this.skill.name}" erfolgreich ${this.learningType === 'learn' ? 'gelernt' : 'auf Stufe ' + finalLevel + ' verbessert'} (${this.selectedLevels.length} Level)!`);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<span class="icon">📚</span>
|
||||
</button>
|
||||
<button
|
||||
@click="showAddDialog"
|
||||
@click="openAddDialog"
|
||||
class="btn-add"
|
||||
title="Fertigkeit hinzufügen"
|
||||
>
|
||||
@@ -239,6 +239,7 @@
|
||||
|
||||
<!-- Neue Dialog-Komponente für detailliertes Fertigkeiten-Lernen -->
|
||||
<SkillImproveDialog
|
||||
v-if="selectedSkillToLearn"
|
||||
:character="character"
|
||||
:skill="selectedSkillToLearn"
|
||||
:isVisible="showDetailedLearnDialog"
|
||||
@@ -676,7 +677,7 @@ export default {
|
||||
this.showImproveSelectionDialog = true;
|
||||
},
|
||||
|
||||
showAddDialog() {
|
||||
openAddDialog() {
|
||||
this.closeDialogs();
|
||||
this.showAddDialog = true;
|
||||
},
|
||||
|
||||
@@ -347,5 +347,32 @@ export default {
|
||||
apRollTooltip: 'AP würfeln: 3d6 + Modifikator je nach Klasse',
|
||||
bRollTooltip: 'B würfeln: 1d6 + Modifikator je nach Rasse'
|
||||
}
|
||||
},
|
||||
audit: {
|
||||
title: 'Änderungsprotokoll',
|
||||
filter_by_field: 'Filter nach Feld',
|
||||
all_fields: 'Alle Felder',
|
||||
experience_points: 'Erfahrungspunkte',
|
||||
gold: 'Gold',
|
||||
silver: 'Silber',
|
||||
copper: 'Kupfer',
|
||||
filter_by_date: 'Zeitraum',
|
||||
all_time: 'Alle Zeit',
|
||||
today: 'Heute',
|
||||
this_week: 'Diese Woche',
|
||||
this_month: 'Dieser Monat',
|
||||
custom_range: 'Benutzerdefiniert',
|
||||
group_by_date: 'Nach Datum gruppieren',
|
||||
refresh: 'Aktualisieren',
|
||||
loading: 'Lädt...',
|
||||
statistics: 'Statistiken',
|
||||
no_entries: 'Keine Einträge',
|
||||
total_changes: 'Gesamtänderungen',
|
||||
ep_spent: 'EP ausgegeben',
|
||||
ep_gained: 'EP erhalten',
|
||||
gold_spent: 'Gold ausgegeben',
|
||||
gold_gained: 'Gold erhalten',
|
||||
reason: 'Grund',
|
||||
notes: 'Notizen'
|
||||
}
|
||||
}
|
||||
@@ -347,5 +347,32 @@ export default {
|
||||
apRollTooltip: 'Roll AP: 3d6 + modifier based on class',
|
||||
bRollTooltip: 'Roll B: 1d6 + modifier based on race'
|
||||
}
|
||||
},
|
||||
audit: {
|
||||
title: 'Audit Log',
|
||||
filter_by_field: 'Filter by Field',
|
||||
all_fields: 'All Fields',
|
||||
experience_points: 'Experience Points',
|
||||
gold: 'Gold',
|
||||
silver: 'Silver',
|
||||
copper: 'Copper',
|
||||
filter_by_date: 'Time Period',
|
||||
all_time: 'All Time',
|
||||
today: 'Today',
|
||||
this_week: 'This Week',
|
||||
this_month: 'This Month',
|
||||
custom_range: 'Custom Range',
|
||||
group_by_date: 'Group by Date',
|
||||
refresh: 'Refresh',
|
||||
loading: 'Loading...',
|
||||
statistics: 'Statistics',
|
||||
no_entries: 'Keine Einträge',
|
||||
total_changes: 'Gesamtänderungen',
|
||||
ep_spent: 'EP ausgegeben',
|
||||
ep_gained: 'EP erhalten',
|
||||
gold_spent: 'Gold ausgegeben',
|
||||
gold_gained: 'Gold erhalten',
|
||||
reason: 'Reason',
|
||||
notes: 'Notes'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user