UI Verbesserungen in Web App, Passwort/Lektoren
This commit is contained in:
1 parent
692b9b6ef8
commit
d7113afa5f
23 files changed
+1340
-116
No files matched your search
@@ -98,6 +98,24 @@ func (s *Store) SpecialServices(ctx context.Context, tenantID string) ([]domain.
|
||||
return out, rows.Err()
|
||||
}
|
||||
|
||||
// LatestServiceDate returns the last date with planning data, if any.
|
||||
func (s *Store) LatestServiceDate(ctx context.Context, tenantID string) (*time.Time, error) {
|
||||
var value sql.NullString
|
||||
err := s.db.QueryRowContext(ctx,
|
||||
"SELECT MAX(date) FROM services WHERE tenant_id=?", tenantID).Scan(&value)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !value.Valid || value.String == "" {
|
||||
return nil, nil
|
||||
}
|
||||
date, ok := domain.DateFromKey(value.String)
|
||||
if !ok {
|
||||
return nil, nil
|
||||
}
|
||||
return &date, nil
|
||||
}
|
||||
|
||||
// ServiceCount returns the number of occurrences in a tenant.
|
||||
func (s *Store) ServiceCount(ctx context.Context, tenantID string) (int, error) {
|
||||
var count int
|
||||
|
||||
Reference in new issue
Block a user