Skip to content

Commit

Permalink
Adjust grid element type, relax grid user operation condition
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Dec 1, 2023
1 parent 9b40f78 commit db72fc3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Grid/GridElements/GridBoolean.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { faCheck, faTimes } from "@fortawesome/free-solid-svg-icons";
interface Props {
value?: string;
value?: boolean;
}
defineProps<Props>();
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Grid/GridElements/GridText.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
interface Props {
text?: string;
text?: string | number;
}
defineProps<Props>();
</script>
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Grid/configs/adminUsers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ describe("AdminUsers", () => {
const fieldEmail = fields[0];
expect(fieldEmail.key).toBe("email");
expect(fieldEmail.type).toBe("operations");
for (const deleted of [true, false]) {
expect(fieldEmail.condition({ deleted })).toBe(!deleted);
for (const purged of [true, false]) {
expect(fieldEmail.condition({ purged })).toBe(!purged);
}
const ops = fieldEmail.operations;
const titles = [
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Grid/configs/adminUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const fields: FieldArray = [
key: "email",
title: "Email",
type: "operations",
condition: (data: UserEntry) => !data.deleted && !data.purged,
condition: (data: UserEntry) => !data.purged,
operations: [
{
title: "Manage Information",
Expand Down

0 comments on commit db72fc3

Please sign in to comment.