Add quota receipt aggregation and approved standup advisories

This commit is contained in:
kami
2026-07-26 20:39:21 +04:00
parent 3dfe97f4fd
commit 3e143cb703
5 changed files with 141 additions and 13 deletions
+2 -2
View File
@@ -94,7 +94,7 @@ func (s *Store) apply(e domain.Event) error {
return err
}
t := s.tasks[e.TaskID]
if e.Type == "QuotaReported" || e.Type == "StandupAdvisory" {
if e.Type == "QuotaReported" || e.Type == "StandupAdvisory" || e.Type == "ApprovalGranted" || e.Type == "ApprovalDenied" {
return nil
}
switch e.Type {
@@ -196,7 +196,7 @@ func (s *Store) Append(e domain.Event) error {
return domain.ErrConflict
}
}
global := e.Type == "QuotaReported" || e.Type == "StandupAdvisory"
global := e.Type == "QuotaReported" || e.Type == "StandupAdvisory" || e.Type == "ApprovalGranted" || e.Type == "ApprovalDenied"
if !taskExists && e.Type != "TaskCreated" && !global {
return domain.ErrNotFound
}