changed role permission
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

This commit is contained in:
guwandyk committed 2026-09-26 16:34:28 +05:00
1 parent f0ecf23879
commit 323e131216
74 files changed
+2915 -4713

No files matched your search

+1 -1
View File
@@ -153,7 +153,7 @@ func (r *repository) activeCardsMetric(ctx context.Context, branchIds []int64, w
}
func (r *repository) activeCustomersMetric(ctx context.Context, branchIds []int64, win periodWindow) (dashboard.StatMetricDTO, error) {
where := " AND u.role = 'user' AND u.active = true"
where := " AND u.role_id = (SELECT id FROM roles WHERE code = 'user' AND deleted_at IS NULL) AND u.active = true"
var extra []interface{}
if len(branchIds) > 0 {
extra = append(extra, branchIds)