Skip to content

Commit

Permalink
Code Refactoring v2 (#3592)
Browse files Browse the repository at this point in the history
* EventManagement refactored

* instanbul remove

* EventRegistrantsModal refractor

* event stats refactor

* GroupChat refractor

---------

Co-authored-by: JaiPannu-IITI <[email protected]>
  • Loading branch information
JaiPannu-IITI and JaiPannu-IITI authored Feb 15, 2025
1 parent 02400f3 commit 0920cd9
Show file tree
Hide file tree
Showing 163 changed files with 1,885 additions and 2,141 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

> `const` **MOCKS**: (\{ `request`: \{ `query`: `DocumentNode`; `variable`: \{ `allDay`: `undefined`; `description`: `undefined`; `endTime`: `undefined`; `id`: `string`; `isPublic`: `undefined`; `isRegisterable`: `undefined`; `location`: `undefined`; `recurring`: `undefined`; `startTime`: `undefined`; `title`: `undefined`; \}; \}; `result`: \{ `data`: \{ `removeEvent`: \{ `_id`: `string`; \}; `updateEvent`: `undefined`; \}; \}; \} \| \{ `request`: \{ `query`: `DocumentNode`; `variable`: \{ `allDay`: `boolean`; `description`: `string`; `endTime`: `string`; `id`: `string`; `isPublic`: `boolean`; `isRegisterable`: `boolean`; `location`: `string`; `recurring`: `boolean`; `startTime`: `string`; `title`: `string`; \}; \}; `result`: \{ `data`: \{ `removeEvent`: `undefined`; `updateEvent`: \{ `_id`: `string`; \}; \}; \}; \})[]
Defined in: [src/components/EventCalender/EventCalenderMocks.ts:43](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventCalender/EventCalenderMocks.ts#L43)
Defined in: [src/components/EventCalender/EventCalenderMocks.ts:47](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventCalender/EventCalenderMocks.ts#L47)
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

# Variable: eventData

> `const` **eventData**: (\{ `_id`: `string`; `allDay`: `boolean`; `description`: `string`; `endDate`: `string`; `endTime`: `string`; `isPublic`: `boolean`; `isRecurringEventException`: `boolean`; `isRegisterable`: `boolean`; `location`: `string`; `recurrenceRule`: `any`; `recurring`: `boolean`; `startDate`: `string`; `startTime`: `string`; `title`: `string`; `viewType`: [`ViewType`](../../../../screens/OrganizationEvents/OrganizationEvents/enumerations/ViewType.md); \} \| \{ `_id`: `string`; `allDay`: `boolean`; `description`: `string`; `endDate`: `string`; `endTime`: `string`; `isPublic`: `boolean`; `isRecurringEventException`: `boolean`; `isRegisterable`: `boolean`; `location`: `string`; `recurrenceRule`: `any`; `recurring`: `boolean`; `startDate`: `string`; `startTime`: `string`; `title`: `string`; `viewType`: `undefined`; \})[]
> `const` **eventData**: (\{ `_id`: `string`; `allDay`: `boolean`; `attendees`: `any`[]; `creator`: \{\}; `description`: `string`; `endDate`: `string`; `endTime`: `string`; `isPublic`: `boolean`; `isRecurringEventException`: `boolean`; `isRegisterable`: `boolean`; `location`: `string`; `recurrenceRule`: `any`; `recurring`: `boolean`; `startDate`: `string`; `startTime`: `string`; `title`: `string`; `viewType`: [`ViewType`](../../../../screens/OrganizationEvents/OrganizationEvents/enumerations/ViewType.md); \} \| \{ `_id`: `string`; `allDay`: `boolean`; `attendees`: `any`[]; `creator`: \{\}; `description`: `string`; `endDate`: `string`; `endTime`: `string`; `isPublic`: `boolean`; `isRecurringEventException`: `boolean`; `isRegisterable`: `boolean`; `location`: `string`; `recurrenceRule`: `any`; `recurring`: `boolean`; `startDate`: `string`; `startTime`: `string`; `title`: `string`; `viewType`: `undefined`; \})[]
Defined in: [src/components/EventCalender/EventCalenderMocks.ts:7](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventCalender/EventCalenderMocks.ts#L7)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> **default**(`props`, `deprecatedLegacyContext`?): `ReactNode`
Defined in: [src/components/EventCalender/Monthly/EventCalender.tsx:37](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventCalender/Monthly/EventCalender.tsx#L37)
Defined in: [src/components/EventCalender/Monthly/EventCalender.tsx:38](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventCalender/Monthly/EventCalender.tsx#L38)

## CSS Strategy Explanation:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> **default**(`props`, `deprecatedLegacyContext`?): `ReactNode`
Defined in: [src/components/EventCalender/Yearly/YearlyEventCalender.tsx:28](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventCalender/Yearly/YearlyEventCalender.tsx#L28)
Defined in: [src/components/EventCalender/Yearly/YearlyEventCalender.tsx:29](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventCalender/Yearly/YearlyEventCalender.tsx#L29)

Calendar component to display events for a selected year.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> **default**(): `JSX.Element`
Defined in: [src/components/EventManagement/EventAttendance/EventAttendance.tsx:34](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventManagement/EventAttendance/EventAttendance.tsx#L34)
Defined in: [src/components/EventManagement/EventAttendance/Attendance/EventAttendance.tsx:28](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventManagement/EventAttendance/Attendance/EventAttendance.tsx#L28)

Component to manage and display event attendance information
Includes filtering and sorting functionality for attendees
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

> **default**(`props`, `deprecatedLegacyContext`?): `ReactNode`
Defined in: [src/components/EventManagement/EventAttendance/AttendedEventList.tsx:16](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventManagement/EventAttendance/AttendedEventList.tsx#L16)
Defined in: [src/components/EventManagement/EventAttendance/AttendanceList/AttendedEventList.tsx:15](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventManagement/EventAttendance/AttendanceList/AttendedEventList.tsx#L15)

Component to display a list of events attended by a member

## Parameters

### props

`InterfaceEventsAttended`
`Partial`\<[`InterfaceEvent`](../../../../../../types/Event/interface/interfaces/InterfaceEvent.md)\>

### deprecatedLegacyContext?

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
[Admin Docs](/)

***

# Variable: MOCKDETAIL

> `const` **MOCKDETAIL**: `object`[]
Defined in: [src/components/EventManagement/EventAttendance/EventAttendanceMocks.ts:27](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventManagement/EventAttendance/EventAttendanceMocks.ts#L27)

## Type declaration

### request

> **request**: `object`
#### request.query

> **query**: `DocumentNode` = `EVENT_DETAILS`
#### request.variables

> **variables**: `object`
#### request.variables.id

> **id**: `string` = `'event123'`
### result

> **result**: `object`
#### result.data

> **data**: `object`
#### result.data.event

> **event**: `object` = `MOCKEVENT`
#### result.data.event.\_id

> **\_id**: `string` = `'event123'`
#### result.data.event.allDay

> **allDay**: `boolean` = `false`
#### result.data.event.attendees

> **attendees**: `object`[]
#### result.data.event.baseRecurringEvent

> **baseRecurringEvent**: `object`
#### result.data.event.baseRecurringEvent.\_id

> **\_id**: `string` = `'recurringEvent123'`
#### result.data.event.description

> **description**: `string` = `'This is a test event description'`
#### result.data.event.endDate

> **endDate**: `string` = `'2023-05-02'`
#### result.data.event.endTime

> **endTime**: `string` = `'17:00:00'`
#### result.data.event.location

> **location**: `string` = `'Test Location'`
#### result.data.event.organization

> **organization**: `object`
#### result.data.event.organization.\_id

> **\_id**: `string` = `'org456'`
#### result.data.event.organization.members

> **members**: `object`[]
#### result.data.event.recurring

> **recurring**: `boolean` = `true`
#### result.data.event.startDate

> **startDate**: `string` = `'2023-05-01'`
#### result.data.event.startTime

> **startTime**: `string` = `'09:00:00'`
#### result.data.event.title

> **title**: `string` = `'Test Event'`
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[Admin Docs](/)

***

# Variable: MOCKEVENT

> `const` **MOCKEVENT**: `object`
Defined in: [src/components/EventManagement/EventAttendance/EventAttendanceMocks.ts:3](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventManagement/EventAttendance/EventAttendanceMocks.ts#L3)

## Type declaration

### \_id

> **\_id**: `string` = `'event123'`
### allDay

> **allDay**: `boolean` = `false`
### attendees

> **attendees**: `object`[]
### baseRecurringEvent

> **baseRecurringEvent**: `object`
#### baseRecurringEvent.\_id

> **\_id**: `string` = `'recurringEvent123'`
### description

> **description**: `string` = `'This is a test event description'`
### endDate

> **endDate**: `string` = `'2023-05-02'`
### endTime

> **endTime**: `string` = `'17:00:00'`
### location

> **location**: `string` = `'Test Location'`
### organization

> **organization**: `object`
#### organization.\_id

> **\_id**: `string` = `'org456'`
#### organization.members

> **members**: `object`[]
### recurring

> **recurring**: `boolean` = `true`
### startDate

> **startDate**: `string` = `'2023-05-01'`
### startTime

> **startTime**: `string` = `'09:00:00'`
### title

> **title**: `string` = `'Test Event'`
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> `const` **MOCKS**: `object`[]
Defined in: [src/components/EventManagement/EventAttendance/Attendance.mocks.ts:3](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventManagement/EventAttendance/Attendance.mocks.ts#L3)
Defined in: [src/components/EventManagement/EventAttendance/EventAttendanceMocks.ts:41](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventManagement/EventAttendance/EventAttendanceMocks.ts#L41)

## Type declaration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> `const` **MOCKS\_ERROR**: `object`[]
Defined in: [src/components/EventManagement/EventAttendance/Attendance.mocks.ts:54](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventManagement/EventAttendance/Attendance.mocks.ts#L54)
Defined in: [src/components/EventManagement/EventAttendance/EventAttendanceMocks.ts:92](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/components/EventManagement/EventAttendance/EventAttendanceMocks.ts#L92)

## Type declaration

Expand Down

This file was deleted.

Loading

0 comments on commit 0920cd9

Please sign in to comment.