clean up svelte ui big time, and add beginnings of item stuff.
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-02-29 16:54:38 +01:00
parent e724eb57b5
commit bb13195f4b
42 changed files with 1051 additions and 504 deletions
+2 -12
View File
@@ -13,11 +13,11 @@ type ScoringService struct {
db database.Database
}
func (s *ScoringService) ScoreOne(ctx context.Context, period models.Period, log models.PeriodLog) (*models.Score, error) {
func (s *ScoringService) ScoreOne(ctx context.Context, period models.Period, log models.Log) (*models.Score, error) {
return s.scoreOne(ctx, period, log)
}
func (s *ScoringService) scoreOne(ctx context.Context, period models.Period, log models.PeriodLog) (*models.Score, error) {
func (s *ScoringService) scoreOne(ctx context.Context, period models.Period, log models.Log) (*models.Score, error) {
goal := period.Goal(log.GoalID)
if goal == nil {
return nil, slerrors.NotFound("Goal")
@@ -37,16 +37,6 @@ func (s *ScoringService) scoreOne(ctx context.Context, period models.Period, log
Amount: log.Amount,
}
if log.SubGoalID != "" {
subGoal := goal.SubGoal(log.SubGoalID)
if subGoal == nil {
return nil, slerrors.NotFound("Sub-Goal")
}
multiplier := subGoal.Multiplier
score.SubGoalMultiplier = &multiplier
}
if activity.DailyBonus > 0 {
isFirst := true
for _, log2 := range period.Logs {