aimee-RH commented on code in PR #528:
URL: https://github.com/apache/airavata-custos/pull/528#discussion_r3600884462
##########
web/src/features/core/users/schemas.ts:
##########
@@ -0,0 +1,69 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0.
+
+import { z } from "zod";
+import { zRole, zUser, zUserIdentity, zUserPrivilege, zUserRole } from
"@/generated/core/zod.gen";
+
+export const privilegeKeySchema = z.string().min(1);
Review Comment:
Solved
##########
web/src/app/(portal)/admin/users/management/UsersTable.tsx:
##########
@@ -191,26 +214,51 @@ export function UsersTable() {
</select>
</div>
+ {filtersActive ? (
+ <p className="text-sm text-muted-foreground">
+ Showing {filteredUsers.length} match{filteredUsers.length === 1 ? ""
: "es"} on this page;{" "}
+ {total} users total.
+ </p>
+ ) : null}
+
<DataTable
columns={columns}
rows={filteredUsers}
- rowKey={(row) => row.id ?? row.email ?? ""}
+ rowKey={(row) => row.id}
onRowClick={(row) => {
- if (row.id) expandedRow.collapseUnless(row.id);
- setSelectedId((prev) => (prev === row.id ? null : (row.id ?? null)));
+ expandedRow.collapseUnless(row.id);
+ setSelectedId((previous) => (previous === row.id ? null : row.id));
}}
rowClassName={(row) =>
- row.id && row.id === selectedId
- ? "bg-[color:var(--brand-tint)] hover:bg-[color:var(--brand-tint)]"
+ isCurrentUser(row)
+ ? "bg-[color:var(--custos-blue-50)]/40
hover:bg-[color:var(--custos-blue-50)]/60"
: undefined
}
empty={
<span className="text-sm text-muted-foreground">
- No users match the current filters.
+ {filtersActive ? "No users match on this page." : "No users
found."}
</span>
}
+ pagination={{
+ page,
+ pageSize,
+ total,
+ pageSizeOptions: [25],
Review Comment:
Solved
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]