-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a367b8
commit 0ef653d
Showing
9 changed files
with
344 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// @flow | ||
|
||
import React, { type Element, type Node } from 'react'; | ||
|
||
import CatsPageLayout from '../src/cats/CatsPageLayout'; | ||
import LayoutApp from '../src/LayoutApp'; | ||
|
||
export default function CatsPage(): Node { | ||
return <CatsPageLayout />; | ||
} | ||
|
||
CatsPage.getLayout = (page: Element<typeof CatsPage>): Element<typeof LayoutApp> => ( | ||
<LayoutApp>{page}</LayoutApp> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// @flow | ||
|
||
import { Table } from '@adeira/sx-design'; | ||
import * as React from 'react'; | ||
import { graphql, useLazyLoadQuery } from '@adeira/relay'; | ||
import fbt from 'fbt'; | ||
|
||
import type { CatsPageQuery } from './__generated__/CatsPageQuery.graphql'; | ||
|
||
export default function CatsPage(): React.Node { | ||
const data = useLazyLoadQuery<CatsPageQuery>(graphql` | ||
query CatsPageQuery { | ||
cats { | ||
listAllCats { | ||
name | ||
} | ||
} | ||
} | ||
`); | ||
|
||
return ( | ||
<Table | ||
columns={[ | ||
{ | ||
Header: <fbt desc="order of the cat (table header)">Order</fbt>, | ||
accessor: 'col1', | ||
}, | ||
{ | ||
Header: <fbt desc="name of the cat (table header)">Name of the cat</fbt>, | ||
accessor: 'col2', | ||
}, | ||
{ | ||
Header: ( | ||
<fbt desc="date when the cat castration was performed (table header)"> | ||
Date of castration | ||
</fbt> | ||
), | ||
accessor: 'col3', | ||
}, | ||
{ | ||
Header: ( | ||
<fbt desc="date of the last deworming (table header)">Date of last deworming</fbt> | ||
), | ||
accessor: 'col4', | ||
}, | ||
{ | ||
Header: <fbt desc="date of the cat adoption (table header)">Date of adoption</fbt>, | ||
accessor: 'col5', | ||
}, | ||
]} | ||
data={data.cats.listAllCats.map((cat) => { | ||
return { | ||
col1: <em>todo</em>, | ||
col2: cat.name, | ||
col3: <em>todo</em>, | ||
col4: <em>todo</em>, | ||
col5: <em>todo</em>, | ||
}; | ||
})} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// @flow | ||
|
||
import fbt from 'fbt'; | ||
import * as React from 'react'; | ||
|
||
import LayoutPage from '../LayoutPage'; | ||
import CatsPage from './CatsPage'; | ||
|
||
export default function CatsPageLayout(): React.Node { | ||
return ( | ||
<LayoutPage | ||
isBeta={true} | ||
heading={<fbt desc="list of all our cats title">List of all our cats</fbt>} | ||
> | ||
<CatsPage /> | ||
</LayoutPage> | ||
); | ||
} |
124 changes: 124 additions & 0 deletions
124
src/abacus-backoffice/src/cats/__generated__/CatsPageQuery.graphql.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
15 changes: 3 additions & 12 deletions
15
src/abacus-backoffice/src/index/__generated__/IndexPageQuery.graphql.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.