Skip to content

Commit

Permalink
Shares CRUD updates: hide user field, indicate expiration is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbedard committed Sep 10, 2024
1 parent c89c4ec commit 2abedc9
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions frontend/src/shares.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const shareFilters = [
<ReferenceInput source="resource_id" label="Resource" reference="resources">
<SelectInput optionText="name" />
</ReferenceInput>,
<ReferenceInput source="user_id" label="User" reference="users" />,
];

export const ShareList = () => (
Expand All @@ -21,9 +20,6 @@ export const ShareList = () => (
<ReferenceField source="resource_id" reference="resources" link="show">
<TextField source="name" />
</ReferenceField>
<ReferenceField source="user_id" reference="users">
<TextField source="name" />
</ReferenceField>
<BooleanField source="is_revoked" />
</Datagrid>
</List>
Expand All @@ -36,10 +32,7 @@ export const ShareShow = () => (
<ReferenceField source="resource_id" reference="resources" link="show">
<TextField source="name" />
</ReferenceField>
<ReferenceField source="user_id" reference="users">
<TextField source="name" />
</ReferenceField>
<DateField source="expiration_dt" showTime locales="UTC" />
<DateField source="expiration_dt" label="Expires On" showTime locales="UTC" />
<BooleanField source="is_revoked" />
</SimpleShowLayout>
</Show>
Expand All @@ -51,10 +44,7 @@ export const ShareEdit = () => (
<ReferenceInput source="resource_id" label="Resource" reference="resources">
<SelectInput optionText="name" />
</ReferenceInput>
<ReferenceInput source="user_id" label="User" reference="users">
<SelectInput optionText="name" />
</ReferenceInput>
<DateTimeInput source="expiration_dt" />
<DateTimeInput source="expiration_dt" label="Expires On (Optional)" />
<BooleanInput source="is_revoked" />
</SimpleForm>
</Edit>
Expand All @@ -66,10 +56,7 @@ export const ShareCreate = () => (
<ReferenceInput source="resource_id" label="Resource" reference="resources">
<SelectInput optionText="name" />
</ReferenceInput>
<ReferenceInput source="user_id" label="User" reference="users">
<SelectInput optionText="name" />
</ReferenceInput>
<DateTimeInput source="expiration_dt" />
<DateTimeInput source="expiration_dt" label="Expires On (Optional)" />
</SimpleForm>
</Create>
);

0 comments on commit 2abedc9

Please sign in to comment.