feat(political-office): enhance political office benefits and salary computation
All checks were successful
Deploy to production / deploy (push) Successful in 3m6s
All checks were successful
Deploy to production / deploy (push) Successful in 3m6s
- Added a new hierarchyLevel field to PoliticalOfficeType for better categorization of political roles. - Updated computePoliticalDailySalaryPayout function to incorporate hierarchy level in salary calculations, allowing for more dynamic salary adjustments based on office rank. - Modified SQL scripts to reflect changes in political office benefits, ensuring compatibility with the new salary structure. - Enhanced localization files to support updated benefit descriptions and salary formats across multiple languages. - Improved UI components to display the new salary calculations and benefits accurately in the PoliticsView.
This commit is contained in:
@@ -874,6 +874,8 @@ import apiClient from '@/utils/axios.js';
|
||||
const debugLog = () => {};
|
||||
const LESSON_STATE_VERSION = 1;
|
||||
const VOCAB_REPEAT_INTERVALS = [1, 2, 4];
|
||||
/** Mindest-Erfolgsquote im Vokabeltrainer (gesamt), damit die Kapitel-Prüfung freigeschaltet wird. */
|
||||
const EXERCISE_UNLOCK_MIN_SUCCESS_PERCENT = 70;
|
||||
|
||||
export default {
|
||||
name: 'VocabLessonView',
|
||||
@@ -991,6 +993,9 @@ export default {
|
||||
const unlockTarget = this.trainerNewFocusTarget + Math.ceil((this.effectiveExercises?.length || 0) * 0.25);
|
||||
return Math.max(6, Math.min(140, unlockTarget));
|
||||
},
|
||||
exerciseUnlockMinSuccessPercent() {
|
||||
return EXERCISE_UNLOCK_MIN_SUCCESS_PERCENT;
|
||||
},
|
||||
currentReviewShare() {
|
||||
if (!this.hasPreviousVocab) {
|
||||
return 0;
|
||||
@@ -1018,10 +1023,15 @@ export default {
|
||||
if (this.trainableLessonVocab.length === 0 && this.prepItems.length > 0) {
|
||||
return this.$t('socialnetwork.vocab.courses.exerciseUnlockHintAfterPrep');
|
||||
}
|
||||
const core = this.$t('socialnetwork.vocab.courses.exerciseUnlockHintTrainerCore', {
|
||||
newTarget: this.trainerNewFocusTarget,
|
||||
attempts: this.trainerExerciseUnlockAttempts,
|
||||
rate: this.exerciseUnlockMinSuccessPercent
|
||||
});
|
||||
if (this.hasPreviousVocab) {
|
||||
return `Lerne zuerst die neuen Inhalte der Lektion und arbeite dich durch ungefähr ${this.trainerExerciseUnlockAttempts} Trainerfragen. Ältere Vokabeln werden dabei nach und nach zugemischt.`;
|
||||
return `${core} ${this.$t('socialnetwork.vocab.courses.exerciseUnlockHintTrainerMixSuffix')}`;
|
||||
}
|
||||
return `Arbeite zuerst durch ungefähr ${this.trainerExerciseUnlockAttempts} Trainerfragen aus dieser Lektion. Danach wird die Kapitel-Prüfung freigeschaltet.`;
|
||||
return core;
|
||||
},
|
||||
/** Für Wiederholungslektionen: Übungen aus vorherigen Lektionen (Kapitelprüfung). Sonst: eigene Grammatik-Übungen. */
|
||||
effectiveExercises() {
|
||||
@@ -1697,7 +1707,11 @@ export default {
|
||||
: 0;
|
||||
const currentLessonReady = this.vocabTrainerCurrentAttempts >= this.trainerNewFocusTarget;
|
||||
|
||||
if (currentLessonReady && this.vocabTrainerTotalAttempts >= minimumAttempts && successRate >= 70) {
|
||||
if (
|
||||
currentLessonReady
|
||||
&& this.vocabTrainerTotalAttempts >= minimumAttempts
|
||||
&& successRate >= EXERCISE_UNLOCK_MIN_SUCCESS_PERCENT
|
||||
) {
|
||||
this.exercisePreparationCompleted = true;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user