removed more strings

fixed issue with skill level display
This commit is contained in:
2026-02-01 16:46:57 +01:00
parent e1a146e03f
commit 66bbfd901a
3 changed files with 16 additions and 14 deletions
+7 -7
View File
@@ -26,7 +26,7 @@ type Magisch struct {
type LookupList struct { type LookupList struct {
ID uint `gorm:"primaryKey" json:"id"` //`gorm:"default:uuid_generate_v3()"` // db func ID uint `gorm:"primaryKey" json:"id"` //`gorm:"default:uuid_generate_v3()"` // db func
GameSystem string `gorm:"column:game_system;index;default:midgard" json:"game_system"` GameSystem string `gorm:"column:game_system;index" json:"game_system"`
Name string `gorm:"type:varchar(255);index" json:"name"` Name string `gorm:"type:varchar(255);index" json:"name"`
Beschreibung string `json:"beschreibung"` Beschreibung string `json:"beschreibung"`
Quelle string `json:"quelle"` // Deprecated: Für Rückwärtskompatibilität Quelle string `json:"quelle"` // Deprecated: Für Rückwärtskompatibilität
@@ -35,7 +35,7 @@ type LookupList struct {
} }
type LearnCost struct { type LearnCost struct {
GameSystem string `gorm:"column:game_system;index;default:midgard" json:"game_system"` GameSystem string `gorm:"column:game_system;index" json:"game_system"`
GameSystemId uint `json:"game_system_id,omitempty"` GameSystemId uint `json:"game_system_id,omitempty"`
Stufe int `json:"stufe"` Stufe int `json:"stufe"`
LE int `json:"le"` LE int `json:"le"`
@@ -47,7 +47,7 @@ type LearnCost struct {
type Skill struct { type Skill struct {
ID uint `gorm:"primaryKey" json:"id"` ID uint `gorm:"primaryKey" json:"id"`
GameSystem string `gorm:"column:game_system;index;default:midgard" json:"game_system"` GameSystem string `gorm:"column:game_system;index" json:"game_system"`
GameSystemId uint `json:"game_system_id,omitempty"` GameSystemId uint `json:"game_system_id,omitempty"`
Name string `gorm:"type:varchar(255);index" json:"name"` Name string `gorm:"type:varchar(255);index" json:"name"`
Beschreibung string `json:"beschreibung"` Beschreibung string `json:"beschreibung"`
@@ -69,7 +69,7 @@ type WeaponSkill struct {
type Spell struct { type Spell struct {
ID uint `gorm:"primaryKey" json:"id"` ID uint `gorm:"primaryKey" json:"id"`
GameSystem string `gorm:"column:game_system;index;default:midgard" json:"game_system"` GameSystem string `gorm:"column:game_system;index" json:"game_system"`
GameSystemId uint `json:"game_system_id,omitempty"` GameSystemId uint `json:"game_system_id,omitempty"`
Name string `gorm:"type:varchar(255);index" json:"name"` Name string `gorm:"type:varchar(255);index" json:"name"`
Beschreibung string `json:"beschreibung"` Beschreibung string `json:"beschreibung"`
@@ -92,7 +92,7 @@ type Spell struct {
type Equipment struct { type Equipment struct {
ID uint `gorm:"primaryKey" json:"id"` ID uint `gorm:"primaryKey" json:"id"`
GameSystem string `gorm:"column:game_system;index;default:midgard" json:"game_system"` GameSystem string `gorm:"column:game_system;index" json:"game_system"`
GameSystemId uint `json:"game_system_id,omitempty"` GameSystemId uint `json:"game_system_id,omitempty"`
Name string `gorm:"type:varchar(255);index" json:"name"` Name string `gorm:"type:varchar(255);index" json:"name"`
Beschreibung string `json:"beschreibung"` Beschreibung string `json:"beschreibung"`
@@ -125,7 +125,7 @@ type Transportation struct {
type Believe struct { type Believe struct {
ID uint `gorm:"primaryKey" json:"id"` ID uint `gorm:"primaryKey" json:"id"`
GameSystem string `gorm:"column:game_system;index;default:midgard" json:"game_system"` GameSystem string `gorm:"column:game_system;index" json:"game_system"`
Name string `gorm:"type:varchar(255);index" json:"name"` Name string `gorm:"type:varchar(255);index" json:"name"`
Beschreibung string `json:"beschreibung"` Beschreibung string `json:"beschreibung"`
Quelle string `json:"quelle"` // Deprecated: Für Rückwärtskompatibilität Quelle string `json:"quelle"` // Deprecated: Für Rückwärtskompatibilität
@@ -137,7 +137,7 @@ type Believe struct {
// MiscLookup represents miscellaneous lookup values like gender, race, origin, etc. // MiscLookup represents miscellaneous lookup values like gender, race, origin, etc.
type MiscLookup struct { type MiscLookup struct {
ID uint `gorm:"primaryKey" json:"id"` ID uint `gorm:"primaryKey" json:"id"`
GameSystem string `gorm:"column:game_system;index;default:midgard" json:"game_system"` GameSystem string `gorm:"column:game_system;index" json:"game_system"`
GameSystemId uint `json:"game_system_id,omitempty"` GameSystemId uint `json:"game_system_id,omitempty"`
Key string `gorm:"column:key;type:varchar(50);index;not null" json:"key"` Key string `gorm:"column:key;type:varchar(50);index;not null" json:"key"`
Value string `gorm:"type:varchar(255);not null" json:"value"` Value string `gorm:"type:varchar(255);not null" json:"value"`
+6 -6
View File
@@ -20,7 +20,7 @@ type Source struct {
Description string `json:"description,omitempty"` // Beschreibung des Werks Description string `json:"description,omitempty"` // Beschreibung des Werks
IsCore bool `json:"is_core"` // Ist es ein Grundregelwerk? IsCore bool `json:"is_core"` // Ist es ein Grundregelwerk?
IsActive bool `json:"is_active"` // Ist das Werk aktiv/verfügbar? IsActive bool `json:"is_active"` // Ist das Werk aktiv/verfügbar?
GameSystem string `gorm:"index;default:midgard" json:"game_system"` GameSystem string `gorm:"index" json:"game_system"`
GameSystemId uint `json:"game_system_id,omitempty"` GameSystemId uint `json:"game_system_id,omitempty"`
} }
@@ -31,7 +31,7 @@ type CharacterClass struct {
Name string `gorm:"unique;not null" json:"name"` // z.B. "Hexer", "Magier", "Krieger" Name string `gorm:"unique;not null" json:"name"` // z.B. "Hexer", "Magier", "Krieger"
Description string `json:"description,omitempty"` // Optional: Beschreibung der Klasse Description string `json:"description,omitempty"` // Optional: Beschreibung der Klasse
SourceID uint `gorm:"not null;index" json:"source_id"` // Verweis auf das Quellenbuch SourceID uint `gorm:"not null;index" json:"source_id"` // Verweis auf das Quellenbuch
GameSystem string `gorm:"index;default:midgard" json:"game_system"` GameSystem string `gorm:"index" json:"game_system"`
GameSystemId uint `json:"game_system_id,omitempty"` GameSystemId uint `json:"game_system_id,omitempty"`
Source Source `gorm:"foreignKey:SourceID;constraint:OnUpdate:CASCADE,OnDelete:RESTRICT" json:"source"` Source Source `gorm:"foreignKey:SourceID;constraint:OnUpdate:CASCADE,OnDelete:RESTRICT" json:"source"`
Quelle string `gorm:"index;size:3;default:KOD" json:"quelle,omitempty"` // Optional: Quelle der Kategorie, falls abweichend Quelle string `gorm:"index;size:3;default:KOD" json:"quelle,omitempty"` // Optional: Quelle der Kategorie, falls abweichend
@@ -42,7 +42,7 @@ type SkillCategory struct {
ID uint `gorm:"primaryKey" json:"id"` ID uint `gorm:"primaryKey" json:"id"`
Name string `gorm:"unique;not null" json:"name"` // z.B. "Alltag", "Kampf", "Waffen" Name string `gorm:"unique;not null" json:"name"` // z.B. "Alltag", "Kampf", "Waffen"
SourceID uint `gorm:"not null;index" json:"source_id"` // Verweis auf das Quellenbuch SourceID uint `gorm:"not null;index" json:"source_id"` // Verweis auf das Quellenbuch
GameSystem string `gorm:"index;default:midgard" json:"game_system"` GameSystem string `gorm:"index" json:"game_system"`
GameSystemId uint `json:"game_system_id,omitempty"` GameSystemId uint `json:"game_system_id,omitempty"`
Source Source `gorm:"foreignKey:SourceID;constraint:OnUpdate:CASCADE,OnDelete:RESTRICT" json:"source"` Source Source `gorm:"foreignKey:SourceID;constraint:OnUpdate:CASCADE,OnDelete:RESTRICT" json:"source"`
Quelle string `gorm:"index;size:3;default:KOD" json:"quelle,omitempty"` // Optional: Quelle der Kategorie, falls abweichend Quelle string `gorm:"index;size:3;default:KOD" json:"quelle,omitempty"` // Optional: Quelle der Kategorie, falls abweichend
@@ -53,7 +53,7 @@ type SkillDifficulty struct {
ID uint `gorm:"primaryKey" json:"id"` ID uint `gorm:"primaryKey" json:"id"`
Name string `gorm:"unique;not null" json:"name"` // z.B. "leicht", "normal", "schwer", "sehr schwer" Name string `gorm:"unique;not null" json:"name"` // z.B. "leicht", "normal", "schwer", "sehr schwer"
Description string `json:"description,omitempty"` // Optional: Beschreibung Description string `json:"description,omitempty"` // Optional: Beschreibung
GameSystem string `gorm:"index;default:midgard" json:"game_system"` GameSystem string `gorm:"index" json:"game_system"`
GameSystemId uint `json:"game_system_id,omitempty"` GameSystemId uint `json:"game_system_id,omitempty"`
} }
@@ -63,7 +63,7 @@ type SpellSchool struct {
Name string `gorm:"unique;not null" json:"name"` // z.B. "Beherrschen", "Bewegen", "Erkennen" Name string `gorm:"unique;not null" json:"name"` // z.B. "Beherrschen", "Bewegen", "Erkennen"
Description string `json:"description,omitempty"` // Optional: Beschreibung Description string `json:"description,omitempty"` // Optional: Beschreibung
SourceID uint `gorm:"not null;index" json:"source_id"` // Verweis auf das Quellenbuch SourceID uint `gorm:"not null;index" json:"source_id"` // Verweis auf das Quellenbuch
GameSystem string `gorm:"index;default:midgard" json:"game_system"` GameSystem string `gorm:"index" json:"game_system"`
GameSystemId uint `json:"game_system_id,omitempty"` GameSystemId uint `json:"game_system_id,omitempty"`
Source Source `gorm:"foreignKey:SourceID;constraint:OnUpdate:CASCADE,OnDelete:RESTRICT" json:"source"` Source Source `gorm:"foreignKey:SourceID;constraint:OnUpdate:CASCADE,OnDelete:RESTRICT" json:"source"`
Quelle string `gorm:"index;size:3;default:KOD" json:"quelle,omitempty"` // Optional: Quelle der Kategorie, falls abweichend Quelle string `gorm:"index;size:3;default:KOD" json:"quelle,omitempty"` // Optional: Quelle der Kategorie, falls abweichend
@@ -98,7 +98,7 @@ type SpellLevelLECost struct {
ID uint `gorm:"primaryKey" json:"id"` ID uint `gorm:"primaryKey" json:"id"`
Level int `gorm:"uniqueIndex;not null" json:"level"` // Zauber-Stufe (1-12) Level int `gorm:"uniqueIndex;not null" json:"level"` // Zauber-Stufe (1-12)
LERequired int `gorm:"not null" json:"le_required"` // Benötigte Lerneinheiten LERequired int `gorm:"not null" json:"le_required"` // Benötigte Lerneinheiten
GameSystem string `gorm:"index;default:midgard" json:"game_system"` GameSystem string `gorm:"index" json:"game_system"`
GameSystemId uint `json:"game_system_id,omitempty"` GameSystemId uint `json:"game_system_id,omitempty"`
} }
@@ -130,7 +130,7 @@
@click="selectLevel(level)" @click="selectLevel(level)"
> >
<div class="level-header"> <div class="level-header">
<span class="level-target">{{ skill?.fertigkeitswert || 0 }} {{ level.targetLevel }}</span> <span class="level-target">{{ level.startLevel }} {{ level.targetLevel }}</span>
<span class="level-cost" v-if="selectedRewardType === 'default'">{{ level.epCost }} EP + {{ level.goldCost }} GS</span> <span class="level-cost" v-if="selectedRewardType === 'default'">{{ level.epCost }} EP + {{ level.goldCost }} GS</span>
<span class="level-cost" v-else-if="selectedRewardType === 'noGold'">{{ level.epCost }} EP</span> <span class="level-cost" v-else-if="selectedRewardType === 'noGold'">{{ level.epCost }} EP</span>
<span class="level-cost" v-else-if="selectedRewardType === 'halveepnoGold'">{{ Math.floor(level.epCost / 2) }} EP</span> <span class="level-cost" v-else-if="selectedRewardType === 'halveepnoGold'">{{ Math.floor(level.epCost / 2) }} EP</span>
@@ -507,6 +507,7 @@ export default {
} }
return { return {
startLevel: Math.max(cost.target_level - 1, 0),
targetLevel: cost.target_level, targetLevel: cost.target_level,
epCost: cost.ep, epCost: cost.ep,
goldCost: cost.gold_cost, goldCost: cost.gold_cost,
@@ -581,6 +582,7 @@ export default {
} }
this.availableLevels.push({ this.availableLevels.push({
startLevel: targetLevel - 1,
targetLevel, targetLevel,
epCost, epCost,
goldCost, goldCost,