Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-bach committed Jun 4, 2024
1 parent 46134c0 commit 598918f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
8 changes: 6 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ X Update packages
X Deploy to AWS Amplify
X Update to codegen 5

... Add graphql operations type generation
... Build graphql queries/mutations
- Build accounts page

- Add actions to edit, delete account
- Build create action modal
... Add graphql operations type generation
... Build graphql queries/mutations

- Add environment variables to AppSync JS Resolvers/DynamoDB table
- Add Powertools for Lambda logging
Expand Down
15 changes: 7 additions & 8 deletions frontend/src/components/accounts/manage/add-account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import React from 'react';
export const AddAccount = () => {
const { isOpen, onOpen, onOpenChange } = useDisclosure();

const createAccount = () => {
console.log('Created Account');
};

return (
<div>
<>
Expand All @@ -16,19 +20,14 @@ export const AddAccount = () => {
<>
<ModalHeader className='flex flex-col gap-1'>Add Account</ModalHeader>
<ModalBody>
<Input label='Email' variant='bordered' />
<Input label='First Name' variant='bordered' />
<Input label='Last Name' variant='bordered' />
<Input label='Phone Number' variant='bordered' />

<Input label='Password' type='password' variant='bordered' />
<Input label='Confirm Password' type='password' variant='bordered' />
<Input label='Name' variant='bordered' />
<Input label='Type' variant='bordered' />
</ModalBody>
<ModalFooter>
<Button color='danger' variant='flat' onClick={onClose}>
Close
</Button>
<Button color='primary' onPress={onClose}>
<Button color='primary' onPress={createAccount}>
Add Account
</Button>
</ModalFooter>
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/accounts/manage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export const ManageAccounts: React.FC<ManageAccountsProps> = ({ accounts }) => {
{ name: 'Name', uid: 'name' },
{ name: 'Type', uid: 'type' },
{ name: 'Created At', uid: 'createdAt' },
{ name: 'Status', uid: 'status' },
{ name: 'Actions', uid: 'actions' },
],
accounts,
};
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/components/accounts/manage/render-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ export const RenderCell = (data: Props) => {
</div>
</div>
);
// case 'status':
// return (
// <Chip size='sm' variant='flat' color={cellValue === 'active' ? 'success' : cellValue === 'paused' ? 'danger' : 'warning'}>
// <span className='capitalize text-xs'>{cellValue}</span>
// </Chip>
// );

case 'status':
return (
// <Chip size='sm' variant='flat' color={cellValue === 'active' ? 'success' : cellValue === 'paused' ? 'danger' : 'warning'}>
<Chip size='sm' variant='flat' color='success'>
<span className='capitalize text-xs'>Active</span>
</Chip>
);
case 'actions':
return (
<div className='flex items-center gap-4'>
Expand Down

0 comments on commit 598918f

Please sign in to comment.