Skip to content

Commit

Permalink
Abacus BO: display "cat dates" from GraphQL
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnzlml authored and kodiakhq[bot] committed Dec 24, 2021
1 parent dc6c86b commit 6f75e65
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 8 deletions.
11 changes: 7 additions & 4 deletions src/abacus-backoffice/src/cats/CatsPage.js
@@ -1,6 +1,6 @@
// @flow

import { Table } from '@adeira/sx-design';
import { MissingData, Table } from '@adeira/sx-design';
import * as React from 'react';
import { graphql, useLazyLoadQuery } from '@adeira/relay';
import fbt from 'fbt';
Expand All @@ -14,6 +14,9 @@ export default function CatsPage(): React.Node {
listAllCats {
order
name
dateOfCastration
dateOfDeworming
dateOfAdoption
}
}
}
Expand Down Expand Up @@ -53,9 +56,9 @@ export default function CatsPage(): React.Node {
return {
col1: `#${cat.order}`,
col2: cat.name,
col3: <em>todo</em>,
col4: <em>todo</em>,
col5: <em>todo</em>,
col3: cat.dateOfCastration ?? <MissingData />, // TODO: display with warning/error when around 4 months old
col4: cat.dateOfDeworming ?? <MissingData />, // TODO: display with warning/error
col5: cat.dateOfAdoption ?? <MissingData />,
};
})}
/>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6f75e65

Please sign in to comment.