-
-
-
-
+ {/* Header with search, filter and Create Button */}
+
+
+
setSearchValue(e.target.value)}
+ onKeyUp={(e) => {
+ if (e.key === 'Enter') {
+ setSearchTerm(searchValue);
+ } else if (e.key === 'Backspace' && searchValue === '') {
+ setSearchTerm('');
+ }
+ }}
+ data-testid="searchBy"
+ />
+
+
+
+
+
+
-
+ {tCommon('searchBy', { item: '' })}
+
+
+ setSearchBy('assignee')}
+ data-testid="assignee"
>
-
-
-
- {orderBy === 'Latest' ? t('latest') : t('earliest')}
-
-
- handleSorting('Latest')}
- data-testid="latest"
- >
- {t('latest')}
-
- handleSorting('Earliest')}
- data-testid="earliest"
- >
- {t('earliest')}
-
-
-
-
-
+ setSearchBy('category')}
+ data-testid="category"
+ >
+ {t('category')}
+
+
+
+
+
-
+ {tCommon('sort')}
+
+
+ setSortBy('dueDate_DESC')}
+ data-testid="dueDate_DESC"
>
-
- {actionItemCategoryName === ''
- ? t('actionItemCategory')
- : actionItemCategoryName}
-
-
- {t('actionItemCategory')}
-
-
-
- {actionItemCategories?.map((category, index) => (
- {
- setActionItemCategoryId(category._id);
- setActionItemCategoryName(category.name);
- }}
- >
- {category.name}
-
- ))}
-
-
-
-
+ setSortBy('dueDate_ASC')}
+ data-testid="dueDate_ASC"
+ >
+ {t('earliestDueDate')}
+
+
+
+
+
-
+ {t('status')}
+
+
+ setStatus(null)}
+ data-testid="statusAll"
>
-
- {actionItemStatus === '' ? t('status') : actionItemStatus}
-
- {t('status')}
-
-
- handleStatusFilter('Active')}
- data-testid="activeActionItems"
- >
- {t('active')}
-
- handleStatusFilter('Completed')}
- data-testid="completedActionItems"
- >
- {t('completed')}
-
-
-
-
-
-
- {!actionItemCategoryName && !actionItemStatus && (
-
- {tCommon('noFiltersApplied')}
-
- )}
-
- {actionItemCategoryName !== '' && (
-
- {actionItemCategoryName}
- {
- setActionItemCategoryName('');
- setActionItemCategoryId('');
- }}
- data-testid="clearActionItemCategoryFilter"
- />
-
- )}
-
- {actionItemStatus !== '' && (
-
- {actionItemStatus}
- setActionItemStatus('')}
- data-testid="clearActionItemStatusFilter"
- />
-
- )}
-
-
-
+ {tCommon('all')}
+
+
setStatus(ItemStatus.Pending)}
+ data-testid="statusPending"
+ >
+ {tCommon('pending')}
+
+
setStatus(ItemStatus.Completed)}
+ data-testid="statusCompleted"
+ >
+ {tCommon('completed')}
+
+
+
+
+
+
-
+ {/* Table with Action Items */}
+
row._id}
+ slots={{
+ noRowsOverlay: () => (
+
+ {t('noActionItems')}
+
+ ),
+ }}
+ sx={dataGridStyle}
+ getRowClassName={() => `${styles.rowBackground}`}
+ autoHeight
+ rowHeight={65}
+ rows={actionItems.map((actionItem, index) => ({
+ id: index + 1,
+ ...actionItem,
+ }))}
+ columns={columns}
+ isRowSelectable={() => false}
+ />
-
-
+ {/* Item Modal (Create/Edit) */}
+
closeModal(ModalState.SAME)}
+ orgId={orgId}
+ actionItemsRefetch={actionItemsRefetch}
+ actionItem={actionItem}
+ editMode={modalMode === 'edit'}
+ />
+
+ closeModal(ModalState.DELETE)}
+ actionItem={actionItem}
+ actionItemsRefetch={actionItemsRefetch}
+ />
- {/* Create Modal */}
- closeModal(ModalState.STATUS)}
+ actionItemsRefetch={actionItemsRefetch}
/>
+
+ {/* View Modal */}
+ {actionItem && (
+ closeModal(ModalState.VIEW)}
+ item={actionItem}
+ />
+ )}
);
}
diff --git a/src/screens/OrganizationActionItems/OrganizationActionItemsErrorMocks.ts b/src/screens/OrganizationActionItems/OrganizationActionItemsErrorMocks.ts
deleted file mode 100644
index bedba6572b..0000000000
--- a/src/screens/OrganizationActionItems/OrganizationActionItemsErrorMocks.ts
+++ /dev/null
@@ -1,266 +0,0 @@
-import { CREATE_ACTION_ITEM_MUTATION } from 'GraphQl/Mutations/mutations';
-
-import {
- ACTION_ITEM_CATEGORY_LIST,
- ACTION_ITEM_LIST,
- MEMBERS_LIST,
-} from 'GraphQl/Queries/Queries';
-
-export const MOCKS_ERROR_ACTION_ITEM_CATEGORY_LIST_QUERY = [
- {
- request: {
- query: ACTION_ITEM_CATEGORY_LIST,
- variables: { organizationId: '123' },
- },
- error: new Error('Mock Graphql Error'),
- },
-];
-
-export const MOCKS_ERROR_MEMBERS_LIST_QUERY = [
- {
- request: {
- query: ACTION_ITEM_CATEGORY_LIST,
- variables: { organizationId: '123' },
- },
- result: {
- data: {
- actionItemCategoriesByOrganization: [
- {
- _id: 'actionItemCategory1',
- name: 'ActionItemCategory 1',
- isDisabled: false,
- },
- ],
- },
- },
- },
- {
- request: {
- query: MEMBERS_LIST,
- variables: { id: '123' },
- },
- error: new Error('Mock Graphql Error'),
- },
-];
-
-export const MOCKS_ERROR_ACTION_ITEM_LIST_QUERY = [
- {
- request: {
- query: ACTION_ITEM_CATEGORY_LIST,
- variables: { organizationId: '123' },
- },
- result: {
- data: {
- actionItemCategoriesByOrganization: [
- {
- _id: 'actionItemCategory1',
- name: 'ActionItemCategory 1',
- isDisabled: false,
- },
- ],
- },
- },
- },
- {
- request: {
- query: MEMBERS_LIST,
- variables: { id: '123' },
- },
- result: {
- data: {
- organizations: [
- {
- _id: '123',
- members: [
- {
- _id: 'user1',
- firstName: 'Harve',
- lastName: 'Lance',
- email: 'harve@example.com',
- image: '',
- organizationsBlockedBy: [],
- createdAt: '2024-02-14',
- },
- ],
- },
- ],
- },
- },
- },
- {
- request: {
- query: ACTION_ITEM_LIST,
- variables: { id: '123' },
- },
- error: new Error('Mock Graphql Error'),
- },
-];
-
-export const MOCKS_ERROR_MUTATIONS = [
- {
- request: {
- query: ACTION_ITEM_CATEGORY_LIST,
- variables: { organizationId: '123' },
- },
- result: {
- data: {
- actionItemCategoriesByOrganization: [
- {
- _id: 'actionItemCategory1',
- name: 'ActionItemCategory 1',
- isDisabled: false,
- },
- ],
- },
- },
- },
- {
- request: {
- query: MEMBERS_LIST,
- variables: { id: '123' },
- },
- result: {
- data: {
- organizations: [
- {
- _id: '123',
- members: [
- {
- _id: 'user1',
- firstName: 'Harve',
- lastName: 'Lance',
- email: 'harve@example.com',
- image: '',
- organizationsBlockedBy: [],
- createdAt: '2024-02-14',
- },
- ],
- },
- ],
- },
- },
- },
- {
- request: {
- query: ACTION_ITEM_LIST,
- variables: {
- organizationId: '123',
- orderBy: 'createdAt_DESC',
- actionItemCategoryId: '',
- isActive: false,
- isCompleted: false,
- },
- },
- result: {
- data: {
- actionItemsByOrganization: [
- {
- _id: 'actionItem1',
- assignee: {
- _id: 'user1',
- firstName: 'Harve',
- lastName: 'Lance',
- },
- actionItemCategory: {
- _id: 'actionItemCategory1',
- name: 'ActionItemCategory 1',
- },
- preCompletionNotes: 'Pre Completion Notes',
- postCompletionNotes: 'Post Completion Notes',
- assignmentDate: '2024-02-14',
- dueDate: '2024-02-21',
- completionDate: '2024-02-21',
- isCompleted: false,
- assigner: {
- _id: 'user0',
- firstName: 'Wilt',
- lastName: 'Shepherd',
- },
- event: {
- _id: 'event1',
- title: 'event 1',
- },
- creator: {
- _id: 'user0',
- firstName: 'Wilt',
- lastName: 'Shepherd',
- },
- },
- ],
- },
- },
- },
- {
- request: {
- query: ACTION_ITEM_LIST,
- variables: {
- organizationId: '123',
- eventId: 'event1',
- orderBy: 'createdAt_DESC',
- },
- },
- result: {
- data: {
- actionItemsByOrganization: [
- {
- _id: 'actionItem1',
- assignee: {
- _id: 'user1',
- firstName: 'Harve',
- lastName: 'Lance',
- },
- actionItemCategory: {
- _id: 'actionItemCategory1',
- name: 'ActionItemCategory 1',
- },
- preCompletionNotes: 'Pre Completion Notes',
- postCompletionNotes: 'Post Completion Notes',
- assignmentDate: '2024-02-14',
- dueDate: '2024-02-21',
- completionDate: '2024-02-21',
- isCompleted: false,
- assigner: {
- _id: 'user0',
- firstName: 'Wilt',
- lastName: 'Shepherd',
- },
- event: {
- _id: 'event1',
- title: 'event 1',
- },
- creator: {
- _id: 'user0',
- firstName: 'Wilt',
- lastName: 'Shepherd',
- },
- },
- ],
- },
- },
- },
- {
- request: {
- query: CREATE_ACTION_ITEM_MUTATION,
- variables: {
- actionItemCategoryId: 'actionItemCategory1',
- assigneeId: 'user1',
- preCompletionNotes: 'pre completion notes',
- dueDate: '2024-02-14',
- },
- },
- error: new Error('Mock Graphql Error'),
- },
- {
- request: {
- query: CREATE_ACTION_ITEM_MUTATION,
- variables: {
- eventId: 'event1',
- actionItemCategoryId: 'actionItemCategory1',
- assigneeId: 'user1',
- preCompletionNotes: 'pre completion notes',
- dueDate: '2024-02-14',
- },
- },
- error: new Error('Mock Graphql Error'),
- },
-];
diff --git a/src/screens/UserPortal/Campaigns/Campaigns.test.tsx b/src/screens/UserPortal/Campaigns/Campaigns.test.tsx
index 443d643cff..17b7eec4d5 100644
--- a/src/screens/UserPortal/Campaigns/Campaigns.test.tsx
+++ b/src/screens/UserPortal/Campaigns/Campaigns.test.tsx
@@ -155,14 +155,17 @@ describe('Testing User Campaigns Screen', () => {
it('Check if All details are rendered correctly', async () => {
renderCampaigns(link1);
+
+ const detailContainer = await screen.findByTestId('detailContainer1');
+ const detailContainer2 = await screen.findByTestId('detailContainer2');
await waitFor(() => {
- const detailContainer = screen.getByTestId('detailContainer1');
+ expect(detailContainer).toBeInTheDocument();
+ expect(detailContainer2).toBeInTheDocument();
expect(detailContainer).toHaveTextContent('School Campaign');
expect(detailContainer).toHaveTextContent('$22000');
expect(detailContainer).toHaveTextContent('2024-07-28');
expect(detailContainer).toHaveTextContent('2025-08-31');
expect(detailContainer).toHaveTextContent('Active');
- const detailContainer2 = screen.getByTestId('detailContainer2');
expect(detailContainer2).toHaveTextContent('Hospital Campaign');
expect(detailContainer2).toHaveTextContent('$9000');
expect(detailContainer2).toHaveTextContent('2024-07-28');
@@ -291,18 +294,6 @@ describe('Testing User Campaigns Screen', () => {
});
});
- it('Redirect to My Pledges screen', async () => {
- renderCampaigns(link1);
-
- const myPledgesBtn = await screen.findByText(cTranslations.myPledges);
- expect(myPledgesBtn).toBeInTheDocument();
- userEvent.click(myPledgesBtn);
-
- await waitFor(() => {
- expect(screen.getByTestId('pledgeScreen')).toBeInTheDocument();
- });
- });
-
it('open and closes add pledge modal', async () => {
renderCampaigns(link1);
@@ -318,4 +309,16 @@ describe('Testing User Campaigns Screen', () => {
expect(screen.queryByTestId('pledgeModalCloseBtn')).toBeNull(),
);
});
+
+ it('Redirect to My Pledges screen', async () => {
+ renderCampaigns(link1);
+
+ const myPledgesBtn = await screen.findByText(cTranslations.myPledges);
+ expect(myPledgesBtn).toBeInTheDocument();
+ userEvent.click(myPledgesBtn);
+
+ await waitFor(() => {
+ expect(screen.getByTestId('pledgeScreen')).toBeInTheDocument();
+ });
+ });
});
diff --git a/src/screens/UserPortal/Campaigns/CampaignsMocks.ts b/src/screens/UserPortal/Campaigns/CampaignsMocks.ts
index 7b91fac025..f64401bca5 100644
--- a/src/screens/UserPortal/Campaigns/CampaignsMocks.ts
+++ b/src/screens/UserPortal/Campaigns/CampaignsMocks.ts
@@ -1,6 +1,63 @@
import { USER_DETAILS } from 'GraphQl/Queries/Queries';
import { USER_FUND_CAMPAIGNS } from 'GraphQl/Queries/fundQueries';
+const userDetailsQuery = {
+ request: {
+ query: USER_DETAILS,
+ variables: {
+ id: 'userId',
+ },
+ },
+ result: {
+ data: {
+ user: {
+ user: {
+ _id: 'userId',
+ joinedOrganizations: [
+ {
+ _id: '6537904485008f171cf29924',
+ __typename: 'Organization',
+ },
+ ],
+ firstName: 'Harve',
+ lastName: 'Lance',
+ email: 'testuser1@example.com',
+ image: null,
+ createdAt: '2023-04-13T04:53:17.742Z',
+ birthDate: null,
+ educationGrade: null,
+ employmentStatus: null,
+ gender: null,
+ maritalStatus: null,
+ phone: null,
+ address: {
+ line1: 'Line1',
+ countryCode: 'CountryCode',
+ city: 'CityName',
+ state: 'State',
+ __typename: 'Address',
+ },
+ registeredEvents: [],
+ membershipRequests: [],
+ __typename: 'User',
+ },
+ appUserProfile: {
+ _id: '67078abd85008f171cf2991d',
+ adminFor: [],
+ isSuperAdmin: false,
+ appLanguageCode: 'en',
+ pluginCreationAllowed: true,
+ createdOrganizations: [],
+ createdEvents: [],
+ eventAdmin: [],
+ __typename: 'AppUserProfile',
+ },
+ __typename: 'UserData',
+ },
+ },
+ },
+};
+
export const MOCKS = [
{
request: {
@@ -173,62 +230,7 @@ export const MOCKS = [
},
},
},
- {
- request: {
- query: USER_DETAILS,
- variables: {
- id: 'userId',
- },
- },
- result: {
- data: {
- user: {
- user: {
- _id: 'userId',
- joinedOrganizations: [
- {
- _id: '6537904485008f171cf29924',
- __typename: 'Organization',
- },
- ],
- firstName: 'Harve',
- lastName: 'Lance',
- email: 'testuser1@example.com',
- image: null,
- createdAt: '2023-04-13T04:53:17.742Z',
- birthDate: null,
- educationGrade: null,
- employmentStatus: null,
- gender: null,
- maritalStatus: null,
- phone: null,
- address: {
- line1: 'Line1',
- countryCode: 'CountryCode',
- city: 'CityName',
- state: 'State',
- __typename: 'Address',
- },
- registeredEvents: [],
- membershipRequests: [],
- __typename: 'User',
- },
- appUserProfile: {
- _id: '67078abd85008f171cf2991d',
- adminFor: [],
- isSuperAdmin: false,
- appLanguageCode: 'en',
- pluginCreationAllowed: true,
- createdOrganizations: [],
- createdEvents: [],
- eventAdmin: [],
- __typename: 'AppUserProfile',
- },
- __typename: 'UserData',
- },
- },
- },
- },
+ userDetailsQuery,
];
export const EMPTY_MOCKS = [
@@ -249,62 +251,7 @@ export const EMPTY_MOCKS = [
},
},
},
- {
- request: {
- query: USER_DETAILS,
- variables: {
- id: 'userId',
- },
- },
- result: {
- data: {
- user: {
- user: {
- _id: 'userId',
- joinedOrganizations: [
- {
- _id: '6537904485008f171cf29924',
- __typename: 'Organization',
- },
- ],
- firstName: 'Harve',
- lastName: 'Lance',
- email: 'testuser1@example.com',
- image: null,
- createdAt: '2023-04-13T04:53:17.742Z',
- birthDate: null,
- educationGrade: null,
- employmentStatus: null,
- gender: null,
- maritalStatus: null,
- phone: null,
- address: {
- line1: 'Line1',
- countryCode: 'CountryCode',
- city: 'CityName',
- state: 'State',
- __typename: 'Address',
- },
- registeredEvents: [],
- membershipRequests: [],
- __typename: 'User',
- },
- appUserProfile: {
- _id: '67078abd85008f171cf2991d',
- adminFor: [],
- isSuperAdmin: false,
- appLanguageCode: 'en',
- pluginCreationAllowed: true,
- createdOrganizations: [],
- createdEvents: [],
- eventAdmin: [],
- __typename: 'AppUserProfile',
- },
- __typename: 'UserData',
- },
- },
- },
- },
+ userDetailsQuery,
];
export const USER_FUND_CAMPAIGNS_ERROR = [
@@ -321,4 +268,5 @@ export const USER_FUND_CAMPAIGNS_ERROR = [
},
error: new Error('Error fetching campaigns'),
},
+ userDetailsQuery,
];
diff --git a/src/screens/UserPortal/Pledges/Pledge.test.tsx b/src/screens/UserPortal/Pledges/Pledge.test.tsx
index ecdd25a1d3..3d5eef94c2 100644
--- a/src/screens/UserPortal/Pledges/Pledge.test.tsx
+++ b/src/screens/UserPortal/Pledges/Pledge.test.tsx
@@ -126,20 +126,6 @@ describe('Testing User Pledge Screen', () => {
});
});
- it('should render the Campaign Pledge screen with error', async () => {
- renderMyPledges(link2);
- await waitFor(() => {
- expect(screen.getByTestId('errorMsg')).toBeInTheDocument();
- });
- });
-
- it('renders the empty pledge component', async () => {
- renderMyPledges(link3);
- await waitFor(() =>
- expect(screen.getByText(translations.noPledges)).toBeInTheDocument(),
- );
- });
-
it('check if user image renders', async () => {
renderMyPledges(link1);
await waitFor(() => {
@@ -352,4 +338,18 @@ describe('Testing User Pledge Screen', () => {
expect(screen.queryByTestId('pledgeModalCloseBtn')).toBeNull(),
);
});
+
+ it('should render the Campaign Pledge screen with error', async () => {
+ renderMyPledges(link2);
+ await waitFor(() => {
+ expect(screen.getByTestId('errorMsg')).toBeInTheDocument();
+ });
+ });
+
+ it('renders the empty pledge component', async () => {
+ renderMyPledges(link3);
+ await waitFor(() =>
+ expect(screen.getByText(translations.noPledges)).toBeInTheDocument(),
+ );
+ });
});
diff --git a/src/screens/UserPortal/Pledges/PledgesMocks.ts b/src/screens/UserPortal/Pledges/PledgesMocks.ts
index 9aa3780fbd..c7666987ff 100644
--- a/src/screens/UserPortal/Pledges/PledgesMocks.ts
+++ b/src/screens/UserPortal/Pledges/PledgesMocks.ts
@@ -1,11 +1,64 @@
-import {
- CREATE_PlEDGE,
- DELETE_PLEDGE,
- UPDATE_PLEDGE,
-} from 'GraphQl/Mutations/PledgeMutation';
+import { DELETE_PLEDGE } from 'GraphQl/Mutations/PledgeMutation';
import { USER_DETAILS } from 'GraphQl/Queries/Queries';
import { USER_PLEDGES } from 'GraphQl/Queries/fundQueries';
+const userDetailsQuery = {
+ request: {
+ query: USER_DETAILS,
+ variables: {
+ id: 'userId',
+ },
+ },
+ result: {
+ data: {
+ user: {
+ user: {
+ _id: 'userId',
+ joinedOrganizations: [
+ {
+ _id: '6537904485008f171cf29924',
+ __typename: 'Organization',
+ },
+ ],
+ firstName: 'Harve',
+ lastName: 'Lance',
+ email: 'testuser1@example.com',
+ image: null,
+ createdAt: '2023-04-13T04:53:17.742Z',
+ birthDate: null,
+ educationGrade: null,
+ employmentStatus: null,
+ gender: null,
+ maritalStatus: null,
+ phone: null,
+ address: {
+ line1: 'Line1',
+ countryCode: 'CountryCode',
+ city: 'CityName',
+ state: 'State',
+ __typename: 'Address',
+ },
+ registeredEvents: [],
+ membershipRequests: [],
+ __typename: 'User',
+ },
+ appUserProfile: {
+ _id: '67078abd85008f171cf2991d',
+ adminFor: [],
+ isSuperAdmin: false,
+ appLanguageCode: 'en',
+ pluginCreationAllowed: true,
+ createdOrganizations: [],
+ createdEvents: [],
+ eventAdmin: [],
+ __typename: 'AppUserProfile',
+ },
+ __typename: 'UserData',
+ },
+ },
+ },
+};
+
export const MOCKS = [
{
request: {
@@ -501,62 +554,7 @@ export const MOCKS = [
},
},
},
- {
- request: {
- query: USER_DETAILS,
- variables: {
- id: 'userId',
- },
- },
- result: {
- data: {
- user: {
- user: {
- _id: 'userId',
- joinedOrganizations: [
- {
- _id: '6537904485008f171cf29924',
- __typename: 'Organization',
- },
- ],
- firstName: 'Harve',
- lastName: 'Lance',
- email: 'testuser1@example.com',
- image: null,
- createdAt: '2023-04-13T04:53:17.742Z',
- birthDate: null,
- educationGrade: null,
- employmentStatus: null,
- gender: null,
- maritalStatus: null,
- phone: null,
- address: {
- line1: 'Line1',
- countryCode: 'CountryCode',
- city: 'CityName',
- state: 'State',
- __typename: 'Address',
- },
- registeredEvents: [],
- membershipRequests: [],
- __typename: 'User',
- },
- appUserProfile: {
- _id: '67078abd85008f171cf2991d',
- adminFor: [],
- isSuperAdmin: false,
- appLanguageCode: 'en',
- pluginCreationAllowed: true,
- createdOrganizations: [],
- createdEvents: [],
- eventAdmin: [],
- __typename: 'AppUserProfile',
- },
- __typename: 'UserData',
- },
- },
- },
- },
+ userDetailsQuery,
];
export const EMPTY_MOCKS = [
@@ -577,6 +575,7 @@ export const EMPTY_MOCKS = [
},
},
},
+ userDetailsQuery,
];
export const USER_PLEDGES_ERROR = [
@@ -593,4 +592,5 @@ export const USER_PLEDGES_ERROR = [
},
error: new Error('Error fetching pledges'),
},
+ userDetailsQuery,
];
diff --git a/src/state/reducers/routesReducer.test.ts b/src/state/reducers/routesReducer.test.ts
index 8d8de8a5dd..8bdc1c069b 100644
--- a/src/state/reducers/routesReducer.test.ts
+++ b/src/state/reducers/routesReducer.test.ts
@@ -17,7 +17,6 @@ describe('Testing Routes reducer', () => {
{ name: 'Events', url: '/orgevents/undefined' },
{ name: 'Venues', url: '/orgvenues/undefined' },
{ name: 'Action Items', url: '/orgactionitems/undefined' },
- { name: 'Agenda Items Category', url: '/orgagendacategory/undefined' },
{ name: 'Posts', url: '/orgpost/undefined' },
{
name: 'Block/Unblock',
@@ -70,11 +69,6 @@ describe('Testing Routes reducer', () => {
comp_id: 'orgactionitems',
component: 'OrganizationActionItems',
},
- {
- name: 'Agenda Items Category',
- comp_id: 'orgagendacategory',
- component: 'OrganizationAgendaCategory',
- },
{ name: 'Posts', comp_id: 'orgpost', component: 'OrgPost' },
{ name: 'Block/Unblock', comp_id: 'blockuser', component: 'BlockUser' },
{
@@ -126,7 +120,6 @@ describe('Testing Routes reducer', () => {
{ name: 'Events', url: '/orgevents/orgId' },
{ name: 'Venues', url: '/orgvenues/orgId' },
{ name: 'Action Items', url: '/orgactionitems/orgId' },
- { name: 'Agenda Items Category', url: '/orgagendacategory/orgId' },
{ name: 'Posts', url: '/orgpost/orgId' },
{ name: 'Block/Unblock', url: '/blockuser/orgId' },
{ name: 'Advertisement', url: '/orgads/orgId' },
@@ -176,11 +169,6 @@ describe('Testing Routes reducer', () => {
comp_id: 'orgactionitems',
component: 'OrganizationActionItems',
},
- {
- name: 'Agenda Items Category',
- comp_id: 'orgagendacategory',
- component: 'OrganizationAgendaCategory',
- },
{ name: 'Posts', comp_id: 'orgpost', component: 'OrgPost' },
{ name: 'Block/Unblock', comp_id: 'blockuser', component: 'BlockUser' },
{
@@ -228,7 +216,6 @@ describe('Testing Routes reducer', () => {
{ name: 'Events', url: '/orgevents/undefined' },
{ name: 'Venues', url: '/orgvenues/undefined' },
{ name: 'Action Items', url: '/orgactionitems/undefined' },
- { name: 'Agenda Items Category', url: '/orgagendacategory/undefined' },
{ name: 'Posts', url: '/orgpost/undefined' },
{
name: 'Block/Unblock',
@@ -284,11 +271,6 @@ describe('Testing Routes reducer', () => {
comp_id: 'orgactionitems',
component: 'OrganizationActionItems',
},
- {
- name: 'Agenda Items Category',
- comp_id: 'orgagendacategory',
- component: 'OrganizationAgendaCategory',
- },
{ name: 'Posts', comp_id: 'orgpost', component: 'OrgPost' },
{ name: 'Block/Unblock', comp_id: 'blockuser', component: 'BlockUser' },
{
diff --git a/src/state/reducers/routesReducer.ts b/src/state/reducers/routesReducer.ts
index 878fe73099..5d50f5402d 100644
--- a/src/state/reducers/routesReducer.ts
+++ b/src/state/reducers/routesReducer.ts
@@ -77,11 +77,6 @@ const components: ComponentType[] = [
comp_id: 'orgactionitems',
component: 'OrganizationActionItems',
},
- {
- name: 'Agenda Items Category',
- comp_id: 'orgagendacategory',
- component: 'OrganizationAgendaCategory',
- },
{ name: 'Posts', comp_id: 'orgpost', component: 'OrgPost' },
{ name: 'Block/Unblock', comp_id: 'blockuser', component: 'BlockUser' },
{ name: 'Advertisement', comp_id: 'orgads', component: 'Advertisements' },
diff --git a/src/utils/interfaces.ts b/src/utils/interfaces.ts
index 99267d239c..1cec1e739b 100644
--- a/src/utils/interfaces.ts
+++ b/src/utils/interfaces.ts
@@ -11,6 +11,8 @@ export interface InterfaceActionItemCategoryInfo {
_id: string;
name: string;
isDisabled: boolean;
+ createdAt: string;
+ creator: { _id: string; firstName: string; lastName: string };
}
export interface InterfaceActionItemCategoryList {
@@ -23,18 +25,20 @@ export interface InterfaceActionItemInfo {
_id: string;
firstName: string;
lastName: string;
+ image: string | null;
};
assigner: {
_id: string;
firstName: string;
lastName: string;
+ image: string | null;
};
actionItemCategory: {
_id: string;
name: string;
};
preCompletionNotes: string;
- postCompletionNotes: string;
+ postCompletionNotes: string | null;
assignmentDate: Date;
dueDate: Date;
completionDate: Date;
@@ -42,12 +46,13 @@ export interface InterfaceActionItemInfo {
event: {
_id: string;
title: string;
- };
+ } | null;
creator: {
_id: string;
firstName: string;
lastName: string;
};
+ allotedHours: number | null;
}
export interface InterfaceActionItemList {
@@ -556,3 +561,8 @@ export interface InterfaceAgendaItemList {
export interface InterfaceMapType {
[key: string]: string;
}
+
+export interface InterfaceCustomFieldData {
+ type: string;
+ name: string;
+}