-
-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Agenda category CRUD operations (#2030)
* mutations and query added * interface added * svg & route added * completed with translation.json, components, graphql, reducers, App.tsx * test cases done mostly * translation.json added for all lang. * test added for reducers * test coverage improved for screen components * test coverage improved * code rabbit suggestion done --------- Co-authored-by: Peter Harrison <[email protected]>
- Loading branch information
1 parent
0d77178
commit 54a5f3f
Showing
32 changed files
with
2,326 additions
and
2 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
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
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
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,45 @@ | ||
import gql from 'graphql-tag'; | ||
|
||
/** | ||
* GraphQL mutation to create an agenda category. | ||
* | ||
* @param input - Name, Description, OrganizationID of the AgendaCategory. | ||
*/ | ||
|
||
export const CREATE_AGENDA_ITEM_CATEGORY_MUTATION = gql` | ||
mutation CreateAgendaCategory($input: CreateAgendaCategoryInput!) { | ||
createAgendaCategory(input: $input) { | ||
_id | ||
} | ||
} | ||
`; | ||
|
||
/** | ||
* GraphQL mutation to delete an agenda category. | ||
* | ||
* @param deleteAgendaCategoryId - The ID of the AgendaCategory to be deleted. | ||
*/ | ||
|
||
export const DELETE_AGENDA_ITEM_CATEGORY_MUTATION = gql` | ||
mutation DeleteAgendaCategory($deleteAgendaCategoryId: ID!) { | ||
deleteAgendaCategory(id: $deleteAgendaCategoryId) | ||
} | ||
`; | ||
|
||
/** | ||
* GraphQL mutation to update an agenda category. | ||
* | ||
* @param updateAgendaCategoryId - The ID of the AgendaCategory to be updated. | ||
* @param input - Updated Name, Description, OrganizationID of the AgendaCategory. | ||
*/ | ||
|
||
export const UPDATE_AGENDA_ITEM_CATEGORY_MUTATION = gql` | ||
mutation UpdateAgendaCategory( | ||
$updateAgendaCategoryId: ID! | ||
$input: UpdateAgendaCategoryInput! | ||
) { | ||
updateAgendaCategory(id: $updateAgendaCategoryId, input: $input) { | ||
_id | ||
} | ||
} | ||
`; |
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,23 @@ | ||
import gql from 'graphql-tag'; | ||
|
||
/** | ||
* GraphQL query to retrieve agenda category by id. | ||
* | ||
* @param agendaCategoryId - The ID of the category which is being retrieved. | ||
* @returns Agenda category associated with the id. | ||
*/ | ||
|
||
export const AGENDA_ITEM_CATEGORY_LIST = gql` | ||
query AgendaItemCategoriesByOrganization($organizationId: ID!) { | ||
agendaItemCategoriesByOrganization(organizationId: $organizationId) { | ||
_id | ||
name | ||
description | ||
createdBy { | ||
_id | ||
firstName | ||
lastName | ||
} | ||
} | ||
} | ||
`; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions
20
src/components/AgendaCategory/AgendaCategoryContainer.module.css
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,20 @@ | ||
.createModal { | ||
margin-top: 20vh; | ||
margin-left: 13vw; | ||
max-width: 80vw; | ||
} | ||
|
||
.titlemodal { | ||
color: var(--bs-gray-600); | ||
font-weight: 600; | ||
font-size: 20px; | ||
margin-bottom: 20px; | ||
padding-bottom: 5px; | ||
border-bottom: 3px solid var(--bs-primary); | ||
width: 65%; | ||
} | ||
|
||
.agendaCategoryOptionsButton { | ||
width: 24px; | ||
height: 24px; | ||
} |
Oops, something went wrong.