3
0

Make namespace name sortable to unbreak reporter modals

This commit is contained in:
Tomaž Jerman
2022-08-25 12:20:38 +02:00
parent 85e004910b
commit dac927ba4a
3 changed files with 6 additions and 1 deletions
+2
View File
@@ -538,6 +538,8 @@ var (
&dal.Attribute{
Ident: "Name",
Sortable: true,
Type: dal.TypeText{},
Store: &dal.CodecAlias{Ident: "name"},
+1 -1
View File
@@ -12,7 +12,7 @@ namespace: {
slug: { sortable: true, goType: "string" }
enabled: { goType: "bool" }
meta: { goType: "types.NamespaceMeta" }
name: {}
name: { sortable: true }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
+3
View File
@@ -7994,6 +7994,7 @@ func (Store) sortableComposeNamespaceFields() map[string]string {
"deleted_at": "deleted_at",
"deletedat": "deleted_at",
"id": "id",
"name": "name",
"slug": "slug",
"updated_at": "updated_at",
"updatedat": "updated_at",
@@ -8027,6 +8028,8 @@ func (s *Store) collectComposeNamespaceCursorValues(res *composeType.Namespace,
pkID = true
case "slug":
cur.Set(c.Column, res.Slug, c.Descending)
case "name":
cur.Set(c.Column, res.Name, c.Descending)
case "createdAt":
cur.Set(c.Column, res.CreatedAt, c.Descending)
case "updatedAt":