-
-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Hi @MrHertal,
Thank you for the great work on react-admin-amplify. And I am currently building a prototype application based on it.
I was wondering if you could shed some lights on how to implement a filter of dropdown box that can be used to list only the active, inactive, or all drivers respectively for the following Driver type,
type Driver
@model(timestamps:{createdAt: "createdOn", updatedAt: "updatedOn"})
@auth(rules: [
{allow: private}
])
@key(name: "byFirstName", fields: ["firstName", "id"], queryField: "driversByFirstName")
@key(name: "byLastName", fields: ["lastName", "id"], queryField: "driversByLastName") {
id: ID!
firstName: String!
lastName: String!
startDate: AWSDateTime!
endDate: AWSDateTime!
}
- the query should return all the drivers by default
- if the active option is selected in the dropdown filter, the query should return all active drivers where the current date is between the startDate and endDate, i.e., startDate < currentDate < endDate
- if the inactive option is selected in the dropdown filter, the query should return all inactive drivers where the current date is outside the startDate and endDate, i.e. currentDate < startDate || current > endDate
Is the above filter currently supported in react-admin-amplify? If not, what would be the best way to have this implemented?
Thanks in advance
Ray
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels