Skip to content

Events CRUD feature #3959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

gautam-divyanshu
Copy link
Member

@gautam-divyanshu gautam-divyanshu commented May 1, 2025

What kind of change does this PR introduce?

Issue Number:

Fixes #3587

Snapshots/Videos:

If relevant, did you update the documentation?

Summary

Does this PR introduce a breaking change?

Checklist

CodeRabbit AI Review

  • I have reviewed and addressed all critical issues flagged by CodeRabbit AI
  • I have implemented or provided justification for each non-critical suggestion
  • I have documented my reasoning in the PR comments where CodeRabbit AI suggestions were not implemented

Test Coverage

  • I have written tests for all new changes/features
  • I have verified that test coverage meets or exceeds 95%
  • I have run the test suite locally and all tests pass

Other information

Have you read the contributing guide?

Summary by CodeRabbit

  • New Features

    • Event creation, update, and deletion now use a simplified input structure with unified date-time fields and improved organization and creator details.
    • Event and organization queries now provide more detailed and paginated data, including member lists and expanded event attributes.
  • Bug Fixes

    • Improved event filtering and display logic based on user roles and organization membership.
    • Corrected date navigation and event rendering in calendar components.
  • Refactor

    • User roles are now handled via a dedicated enum for better type safety.
    • Event and organization interfaces restructured for clarity and consistency.
    • All recurrence and recurring event features have been removed for a streamlined experience.
  • Chores

    • Extensive cleanup of recurrence-related code, tests, and utilities.
    • Updated test data and mocks to align with new event and organization structures.
  • Documentation

    • Added and updated interface documentation for improved developer clarity.

Copy link
Contributor

coderabbitai bot commented May 1, 2025

"""

Walkthrough

This set of changes removes all logic, types, UI, and utilities related to recurring events and recurrence rules throughout the codebase. Event types, interfaces, and GraphQL schemas are refactored to eliminate recurrence-related fields, consolidating date and time fields into single DateTime properties. Event mutations and queries are updated to use unified input objects and return more detailed nested data. UI components, including event calendars and modals, are simplified to remove recurrence options and controls, and event filtering is updated to use a new UserRole enum and paginated organization members. All recurrence utility files and related test data are deleted or updated accordingly.

Changes

Files/Groups Change Summary
schema.graphql Refactored Event type: removed recurrence and flat fields, added paginated connections, unified date/time fields, changed mutation signatures to use input objects.
src/GraphQl/Mutations/mutations.ts Refactored event mutations to accept unified input objects, removed recurrence rule parameters, expanded returned nested entities.
src/GraphQl/Queries/Queries.ts Updated queries to new event schema: consolidated date/time fields, removed recurrence, added pagination, unified naming and input structures, removed redundant queries.
src/components/EventCalender/Monthly/EventCalender.tsx,
src/components/EventCalender/Yearly/YearlyEventCalender.tsx
Updated event filtering to use UserRole enum and paginated members, removed recurrence logic, improved date navigation and rendering.
src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx Updated test roles to use UserRole enum, removed recurrence properties from test data, updated organization structure.
src/components/EventListCard/EventListCard.tsx,
src/components/EventListCard/EventListCardProps.ts
Removed recurrence-related props and imports, added JSDoc for props interface, minor formatting.
src/components/EventListCard/Modal/Delete/EventListCardDeleteModal.tsx Removed support for recurring event deletion types, simplified modal to single deletion confirmation.
src/components/EventListCard/Modal/EventListCardModals.tsx Removed all recurrence-related logic, state, and UI; now only manages preview and delete modals.
src/components/EventListCard/Modal/Preview/EventListCardPreviewModal.tsx Removed all recurrence-related props and UI, centralized permission checks, simplified editability logic.
src/components/EventListCard/Modal/Update/EventListCardUpdateModal.tsx Deleted: Removed modal for updating recurring events.
src/components/EventManagement/Dashboard/EventDashboard.mocks.ts,
src/components/EventManagement/Dashboard/EventDashboard.spec.tsx,
src/components/EventManagement/Dashboard/EventDashboard.tsx
Updated event mocks, tests, and dashboard to new event schema, removed recurrence fields, updated field names, improved assertions and formatting.
src/components/EventManagement/EventAttendance/Statistics/EventStatistics.tsx Removed recurrence event type imports and related chart data customization.
src/components/LeftDrawerOrg/LeftDrawerOrg.tsx Added interface for organization data, updated query typing and pagination, improved error and loading states, refactored rendering logic.
src/components/OrganizationScreen/OrganizationScreen.spec.tsx,
src/components/OrganizationScreen/OrganizationScreen.tsx
Updated to use new paginated organization events query, removed old query.
src/components/RecurrenceOptions/RecurrenceOptions.tsx Deleted: Removed recurrence options dropdown and related logic.
src/screens/OrganizationEvents/OrganizationEvents.spec.tsx,
src/screens/OrganizationEvents/OrganizationEvents.tsx,
src/screens/OrganizationEvents/OrganizationEventsMocks.ts
Updated event creation and test data to new schema, removed recurrence logic and mocks, improved async test handling.
src/types/Event/interface.ts Removed all recurrence-related types and props, updated event and modal interfaces, added UserRole enum, updated organization members to paginated structure.
src/utils/recurrenceUtils/index.ts,
src/utils/recurrenceUtils/recurrenceConstants.ts,
src/utils/recurrenceUtils/recurrenceTypes.ts,
src/utils/recurrenceUtils/recurrenceUtilityFunctions.ts
Deleted: Removed all recurrence utility types, constants, and functions.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI
    participant GraphQL
    participant DB

    User->>UI: Initiate Event Create/Update/Delete
    UI->>GraphQL: send {input: EventInputObject}
    GraphQL->>DB: Create/Update/Delete Event (no recurrence)
    DB-->>GraphQL: Event data (id, name, startAt, endAt, etc.)
    GraphQL-->>UI: Event data (with nested creator, organization)
    UI-->>User: Show updated event info
Loading

Assessment against linked issues

Objective Addressed Explanation
Update schema and mutations to support Postgres migration for Events section (#3587)
Refactor event queries to match new Postgres schema with unified datetime fields (#3587)
Remove recurrence-related fields and logic from event types and UI components (#3587)
Simplify event mutations to use single input object and remove recurrence parameters (#3587)

Possibly related PRs

Suggested labels

ignore-sensitive-files-pr

Suggested reviewers

  • palisadoes
    """

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2317e7d and bdd24b4.

📒 Files selected for processing (3)
  • src/components/RecurrenceOptions/Modal/CustomRecurrence.spec.tsx (0 hunks)
  • src/components/RecurrenceOptions/Modal/CustomRecurrenceModal.tsx (0 hunks)
  • src/components/RecurrenceOptions/RecurrenceOptions.spec.tsx (0 hunks)
💤 Files with no reviewable changes (3)
  • src/components/RecurrenceOptions/Modal/CustomRecurrence.spec.tsx
  • src/components/RecurrenceOptions/RecurrenceOptions.spec.tsx
  • src/components/RecurrenceOptions/Modal/CustomRecurrenceModal.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyse Code With CodeQL (javascript)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

github-actions bot commented May 1, 2025

Our Pull Request Approval Process

Thanks for contributing!

Testing Your Code

Remember, your PRs won't be reviewed until these criteria are met:

  1. We don't merge PRs with poor code quality.
    1. Follow coding best practices such that CodeRabbit.ai approves your PR.
  2. We don't merge PRs with failed tests.
    1. When tests fail, click on the Details link to learn more.
    2. Write sufficient tests for your changes (CodeCov Patch Test). Your testing level must be better than the target threshold of the repository
    3. Tests may fail if you edit sensitive files. Ask to add the ignore-sensitive-files-pr label if the edits are necessary.
  3. We cannot merge PRs with conflicting files. These must be fixed.

Our policies make our code better.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 30

🔭 Outside diff range comments (20)
src/components/OrganizationScreen/OrganizationScreen.spec.tsx (1)

37-58: ⚠️ Potential issue

Mismatch between query structure and mock data.

The mock is using the new paginated query GET_ORGANIZATION_EVENTS_PG but still contains the old data structure. Based on the query definition, the data should follow a connection pattern with organization.events.edges.node structure, not a flat eventsByOrganization array.

This will cause test failures. Apply this correction:

request: { query: GET_ORGANIZATION_EVENTS_PG, variables: { id: '123' } },
result: {
  data: {
-    eventsByOrganization: [
-      {
-        _id: 'event123',
-        title: 'Test Event Title',
-        description: 'Test Description',
-        startDate: '2024-01-01',
-        endDate: '2024-01-02',
-        location: 'Test Location',
-        startTime: '09:00',
-        endTime: '17:00',
-        allDay: false,
-        recurring: false,
-        isPublic: true,
-        isRegisterable: true,
-      },
-    ],
+    organization: {
+      events: {
+        edges: [
+          {
+            node: {
+              id: 'event123',
+              name: 'Test Event Title',
+              description: 'Test Description',
+              startAt: '2024-01-01T09:00:00Z',
+              endAt: '2024-01-02T17:00:00Z',
+              location: 'Test Location',
+              allDay: false,
+              isPublic: true,
+              isRegisterable: true,
+              creator: {
+                id: 'creator123',
+                name: 'Creator Name'
+              }
+            },
+            cursor: 'cursor1'
+          }
+        ],
+        pageInfo: {
+          hasNextPage: false,
+          endCursor: 'cursor1'
+        }
+      }
+    }
  },
},
src/components/OrganizationScreen/OrganizationScreen.tsx (1)

111-127: 💡 Verification agent

🧩 Analysis chain

Data access needs to be updated for the new paginated structure.

The event lookup logic needs to be updated to work with the new connection-based data structure from the paginated query. The current implementation will fail as it expects the old flat array structure.

Run this script to verify the actual structure returned by the server:


🏁 Script executed:

#!/bin/bash
# Find places where the eventsData is being accessed to understand the expected structure
rg -A 5 -B 5 "eventsData\." src/components/OrganizationScreen/OrganizationScreen.tsx

# Find all usages of the new query to see if there are any working examples
rg "GET_ORGANIZATION_EVENTS_PG" --type ts

Length of output: 2019


🏁 Script executed:

#!/bin/bash
# Display the GET_ORGANIZATION_EVENTS_PG query to inspect its structure
rg -A10 -B1 "export const GET_ORGANIZATION_EVENTS_PG" -n src/GraphQl/Queries/Queries.ts

Length of output: 471


Update event lookup to use paginated connection structure

The GET_ORGANIZATION_EVENTS_PG query now returns

data.organization.events.edges[].node

—not a flat eventsByOrganization array. You’ll need to:

  • Drill into eventsData.organization.events.edges
  • Extract each node (which contains id, not _id)
  • Then .find() by node.id

For example, in src/components/OrganizationScreen/OrganizationScreen.tsx (lines ~111–127):

- if (isEventPath?.params.eventId && eventsData?.eventsByOrganization) {
-   const event = eventsData.eventsByOrganization.find(
-     (e: InterfaceEvent) => e._id === eventId,
-   );
+ if (
+   isEventPath?.params.eventId &&
+   eventsData?.organization?.events?.edges
+ ) {
+   const nodes = eventsData.organization.events.edges.map(edge => edge.node);
+   const event = nodes.find((e: { id: string }) => e.id === eventId);

Be sure to update:

  • The property name from _id to id
  • Any related typings (e.g. InterfaceEvent) to match node shape
src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx (2)

158-168: ⚠️ Potential issue

Duplicate test name → hard to spot failing case

There are two tests called “filters events correctly for ADMINISTRATOR role”.
Rename one of them (e.g., “filters events for ADMINISTRATOR when viewer is attendee”) to avoid Vitest’s duplicate-title warning.

🧰 Tools
🪛 ESLint

[error] 158-158: 'it' is not defined.

(no-undef)


194-214: 🧹 Nitpick (assertive)

Minor wording: “regular REGULAR”

-it('filters events correctly for regular REGULAR role', ...
+it('filters events correctly for REGULAR role', ...
🧰 Tools
🪛 ESLint

[error] 194-194: 'it' is not defined.

(no-undef)

src/screens/OrganizationEvents/OrganizationEventsMocks.ts (1)

18-34: 🛠️ Refactor suggestion

⚠️ Potential issue

List-query mocks still use deprecated fields

The schema refactor removed title, startDate, recurring, etc., yet these mocks still return them.
Tests relying on up-to-date data will start failing once the query’s TypeScript types are regenerated.

Suggested minimal update:

-          title: 'Event',
+          name: 'Event',
@@
-          startDate: '',
-          endDate: '',
+          startAt: '',
+          endAt: '',
@@
-          recurring: false,
-          recurrenceRule: null,
-          isRecurringEventException: false,
+          // recurrence fields removed by schema update

Apply the same cleanup in the block below (lines 50-66).

src/screens/OrganizationEvents/OrganizationEvents.tsx (1)

94-97: ⚠️ Potential issue

Incorrect Day.js parsing API usage will create invalid dates

dayjs() expects the format string as its second parameter, not an object.
Passing an object silently falls back to the default parser and may yield an invalid date that breaks the <TimePicker>.

-  return dayjs(dateTimeString, { format: 'YYYY-MM-DD HH:mm:ss' });
+  return dayjs(dateTimeString, 'YYYY-MM-DD HH:mm:ss');
🧰 Tools
🪛 Biome (1.9.4)

[error] 95-95: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)

src/components/EventListCard/Modal/Preview/EventListCardPreviewModal.tsx (2)

70-73: ⚠️ Potential issue

Same Day.js misuse as in OrganizationEvents

Replicate the fix here to keep both components consistent and bug-free.

-  return dayjs(dateTimeString, { format: 'YYYY-MM-DD HH:mm:ss' });
+  return dayjs(dateTimeString, 'YYYY-MM-DD HH:mm:ss');
🧰 Tools
🪛 Biome (1.9.4)

[error] 71-71: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)


101-107: 🧹 Nitpick (assertive)

Truncating the bound input value leads to data loss on edit

Displaying a shortened value inside a controlled <input> mutates the source of truth; users editing the field will overwrite the original text.

Consider either:

  1. Removing the truncation and letting the input scroll, or
  2. Showing the full value in a read-only <Form.Control plaintext> when !canEditEvent.

No diff provided because two alternative UX directions exist.

🧰 Tools
🪛 Biome (1.9.4)

[error] 104-104: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)

src/components/EventManagement/Dashboard/EventDashboard.tsx (2)

160-165: 🧹 Nitpick (assertive)

Add type="button" to non-form buttons

Without an explicit type, the default is "submit".
If this component is ever rendered inside a <form> (e.g. in a modal),
clicking the edit icon will inadvertently submit the parent form.

-<button
+<button
+  type="button"

124-155: 🧹 Nitpick (assertive)

Consider hiding placeholder KPI cards when data is unavailable

Rendering three separate “N/A” cards clutters the UI and may confuse users.
Either:

  • hide the cards until the corresponding fields are supplied by the API, or
  • display a short helper text such as “Metrics coming soon”.

No code change required now, but worth tracking.

src/components/EventCalender/Yearly/YearlyEventCalender.tsx (2)

229-248: 🧹 Nitpick (assertive)

Explicit button types required (accessibility & unintended form submit)

Both branches render <button> elements without a type attribute:

-<button
+<button type="button"

Apply to lines 229 and 244.
This addresses the Biome a11y/useButtonType error.

🧰 Tools
🪛 Biome (1.9.4)

[error] 240-240: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 229-233: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)


[error] 244-248: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)


142-178: 🧹 Nitpick (assertive)

Inefficient day-level event filtering inside render loop

events?.filter(...) is executed for every rendered day (≈ 42 × 12 = 504
times/year view). Pre-group events by date once (e.g. Map<string, Event[]>)
in useMemo or during setEvents, then look up with
map.get(dayjs(date).format('YYYY-MM-DD')) to cut repeated iterations.

This will noticeably improve performance on large data sets.

src/types/Event/interface.ts (3)

44-57: ⚠️ Potential issue

Type mismatch: userRole is declared as string instead of the new UserRole enum.

InterfaceEvent.userRole?: string should leverage the strongly-typed enum you just introduced. Leaving it as string nullifies the benefit of the enum and will break the comparison in filterData (userRole === UserRole.ADMINISTRATOR), which relies on a discriminated union.

-  userRole?: string;
+  userRole?: UserRole;

Apply the same change wherever a role appears (e.g. organisation members, props, helpers).


93-100: ⚠️ Potential issue

Prop leak – InterfaceCalendarProps.userRole still uses string.

The Calendar component is already comparing the value against UserRole.ADMINISTRATOR; therefore its prop should be typed as that enum to prevent invalid inputs.

-  userRole?: string;
+  userRole?: UserRole;

159-166: 🧹 Nitpick (assertive)

Stale prop name references removed recurrence feature.

recurringEventUpdateModalIsOpen & toggleRecurringEventUpdateModal still contain “Recurring”.
Since recurrence has been removed, rename these props to avoid confusion (e.g. eventUpdateModalIsOpen, toggleEventUpdateModal).

src/components/EventCalender/Monthly/EventCalender.tsx (2)

80-88: ⚠️ Potential issue

filterData signature mis-typed – userRole should be UserRole.

The function receives userRole?: string but later compares it to the enum, which will never be equal under strict type-checking. Update the parameter (and call sites) to:

-    userRole?: string,
+    userRole?: UserRole,

This also eliminates the need for // @ts-ignore style work-arounds elsewhere.


71-77: 🧹 Nitpick (assertive)

window.screen.width gives stale values on high-DPI/zoomed displays.

window.innerWidth is the canonical responsive measure; screen.width can stay constant under browser zoom. Replace both the initial state and the resize handler to use innerWidth.

src/GraphQl/Queries/Queries.ts (3)

316-328: ⚠️ Potential issue

Obsolete RECURRING_EVENTS query – backend fields were removed.

The recurrence feature is gone, yet this query still requests it. Keeping the query will break the build once the schema is updated.

Either delete the query or migrate callers to the new non-recurring endpoints.


824-877: ⚠️ Potential issue

ORGANIZATION_EVENT_CONNECTION_LIST still asks for legacy fields (startDate, recurring, …).

These fields no longer exist (startAt, endAt, etc.). Any component executing this query will fail at runtime.

Refactor or remove the query:

-      startDate
-      endDate
-      startTime
-      endTime
-      allDay
-      recurring
+      startAt
+      endAt
+      allDay

…and drop recurrenceRule / isRecurringEventException entirely.


494-508: 🧹 Nitpick (assertive)

Consistency: GET_ORGANIZATION_EVENTS_PG now includes allDay, location, isPublic, isRegisterable, but missing updatedAt.

Most event detail queries return both createdAt and updatedAt. Consider adding updatedAt for uniformity and UI refresh triggers.

♻️ Duplicate comments (2)
src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx (2)

173-192: Same duplicate-title issue as above

Change this title as well; otherwise only the second definition will be executed.

-it('filters events correctly for ADMINISTRATOR role', ...
+it('filters ADMINISTRATOR-created events for ADMINISTRATOR viewer', ...
🧰 Tools
🪛 ESLint

[error] 173-192: Test is used multiple times in the same describe(suite) block

(vitest/no-identical-title)


[error] 173-173: 'it' is not defined.

(no-undef)


305-325: Private-event test duplicates ADMINISTRATOR scenario title

Same duplicate-title issue; rename accordingly (e.g., “…with private events”).

🧰 Tools
🪛 ESLint

[error] 305-305: 'it' is not defined.

(no-undef)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6102f5 and 2317e7d.

⛔ Files ignored due to path filters (111)
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/ADD_ADMIN_MUTATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/ADD_MEMBER_MUTATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/CREATE_POST_MUTATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/DELETE_EVENT_MUTATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/DELETE_POST_MUTATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/DONATE_TO_ORGANIZATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/FORGOT_PASSWORD_MUTATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/GENERATE_OTP_MUTATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/GET_FILE_PRESIGNEDURL.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/LIKE_POST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/PRESIGNED_URL.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/REGISTER_EVENT.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/REMOVE_ADMIN_MUTATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/REMOVE_MEMBER_MUTATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/REMOVE_MEMBER_MUTATION_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/RESET_COMMUNITY.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/UNLIKE_POST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/UPDATE_COMMUNITY_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/UPDATE_EVENT_MUTATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/UPDATE_POST_MUTATION.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Mutations/mutations/variables/UPDATE_SESSION_TIMEOUT_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/ADMIN_LIST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/BLOCK_PAGE_MEMBER_LIST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/EVENT_ATTENDEES.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/EVENT_CHECKINS.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/EVENT_FEEDBACKS.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/EVENT_REGISTRANTS.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_COMMUNITY_DATA.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_COMMUNITY_DATA_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_COMMUNITY_SESSION_TIMEOUT_DATA_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_ORGANIZATION_BLOCKED_USERS_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_ORGANIZATION_DATA_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_ORGANIZATION_EVENTS.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_ORGANIZATION_EVENTS_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_ORGANIZATION_MEMBERS_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_ORGANIZATION_POSTS_COUNT_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_ORGANIZATION_POSTS_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_POSTS_BY_ORG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/GET_USER_BY_ID.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/IS_USER_BLOCKED.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/MEMBERSHIP_REQUEST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/MEMBERS_LIST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/MEMBERS_LIST_PG.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/ORGANIZATIONS_LIST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/ORGANIZATIONS_MEMBER_CONNECTION_LIST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/ORGANIZATION_DONATION_CONNECTION_LIST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/ORGANIZATION_EVENT_CONNECTION_LIST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/ORGANIZATION_EVENT_LIST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/RECURRING_EVENTS.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/SIGNIN_QUERY.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/USERS_CONNECTION_LIST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/USER_DETAILS.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/GraphQl/Queries/Queries/variables/USER_ORGANIZATION_LIST.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventCalender/Monthly/EventCalender/functions/default.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventCalender/Yearly/YearlyEventCalender/functions/default.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventListCard/EventListCard/functions/default.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventListCard/EventListCardProps/variables/props.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventListCard/Modal/Delete/EventListCardDeleteModal/functions/default.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventListCard/Modal/EventListCardModals/functions/default.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventListCard/Modal/Preview/EventListCardPreviewModal/functions/default.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventListCard/Modal/Update/EventListCardUpdateModal/functions/default.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventManagement/Dashboard/EventDashboard.mocks/variables/MOCKS_WITHOUT_TIME.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventManagement/Dashboard/EventDashboard.mocks/variables/MOCKS_WITH_TIME.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventManagement/Dashboard/EventDashboard/functions/default.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/EventManagement/EventAttendance/Statistics/EventStatistics/functions/AttendanceStatisticsModal.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/LeftDrawerOrg/LeftDrawerOrg/functions/default.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/components/RecurrenceOptions/RecurrenceOptions/functions/default.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/screens/OrganizationEvents/OrganizationEvents/enumerations/ViewType.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/screens/OrganizationEvents/OrganizationEvents/functions/default.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/screens/OrganizationEvents/OrganizationEventsMocks/variables/MOCKS.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/enumerations/UserRole.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfaceAttendanceStatisticsModalProps.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfaceCalendarProps.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfaceDeleteEventModalProps.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfaceEvent.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfaceEventHeaderProps.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfaceEventsAttendedMemberModalProps.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfaceIOrgList.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfaceMember.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfacePreviewEventModalProps.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfaceRecurringEvent.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfaceStatsModal.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/interfaces/InterfaceUpdateEventModalProps.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/variables/FilterPeriod.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/types/Event/interface/variables/Role.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/Days.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/allInstances.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/dayNames.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/daysOptions.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/endsAfter.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/endsNever.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/endsOn.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/frequencies.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/mondayToFriday.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/monthNames.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/recurrenceEndOptions.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/recurringEventMutationOptions.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/thisAndFollowingInstances.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/thisInstance.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceConstants/variables/weekDayOccurences.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceTypes/enumerations/Frequency.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceTypes/enumerations/RecurrenceEndOption.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceTypes/enumerations/RecurringEventMutationType.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceTypes/enumerations/WeekDays.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceTypes/interfaces/InterfaceRecurrenceRule.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceTypes/interfaces/InterfaceRecurrenceRuleState.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceUtilityFunctions/functions/getRecurrenceRuleText.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceUtilityFunctions/functions/getWeekDayOccurenceInMonth.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceUtilityFunctions/functions/hasRecurrenceRuleChanged.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceUtilityFunctions/functions/haveInstanceDatesChanged.md is excluded by !**/docs/docs/**
  • docs/docs/auto-docs/utils/recurrenceUtils/recurrenceUtilityFunctions/functions/isLastOccurenceOfWeekDay.md is excluded by !**/docs/docs/**
📒 Files selected for processing (29)
  • schema.graphql (4 hunks)
  • src/GraphQl/Mutations/mutations.ts (2 hunks)
  • src/GraphQl/Queries/Queries.ts (3 hunks)
  • src/components/EventCalender/Monthly/EventCalender.tsx (16 hunks)
  • src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx (9 hunks)
  • src/components/EventCalender/Yearly/YearlyEventCalender.tsx (9 hunks)
  • src/components/EventListCard/EventListCard.spec.tsx (0 hunks)
  • src/components/EventListCard/EventListCard.tsx (1 hunks)
  • src/components/EventListCard/EventListCardProps.ts (2 hunks)
  • src/components/EventListCard/Modal/Delete/EventListCardDeleteModal.tsx (2 hunks)
  • src/components/EventListCard/Modal/EventListCardModals.tsx (7 hunks)
  • src/components/EventListCard/Modal/Preview/EventListCardPreviewModal.tsx (15 hunks)
  • src/components/EventListCard/Modal/Update/EventListCardUpdateModal.tsx (0 hunks)
  • src/components/EventManagement/Dashboard/EventDashboard.mocks.ts (2 hunks)
  • src/components/EventManagement/Dashboard/EventDashboard.spec.tsx (1 hunks)
  • src/components/EventManagement/Dashboard/EventDashboard.tsx (6 hunks)
  • src/components/EventManagement/EventAttendance/Statistics/EventStatistics.tsx (0 hunks)
  • src/components/LeftDrawerOrg/LeftDrawerOrg.tsx (4 hunks)
  • src/components/OrganizationScreen/OrganizationScreen.spec.tsx (2 hunks)
  • src/components/OrganizationScreen/OrganizationScreen.tsx (2 hunks)
  • src/components/RecurrenceOptions/RecurrenceOptions.tsx (0 hunks)
  • src/screens/OrganizationEvents/OrganizationEvents.spec.tsx (6 hunks)
  • src/screens/OrganizationEvents/OrganizationEvents.tsx (14 hunks)
  • src/screens/OrganizationEvents/OrganizationEventsMocks.ts (2 hunks)
  • src/types/Event/interface.ts (3 hunks)
  • src/utils/recurrenceUtils/index.ts (0 hunks)
  • src/utils/recurrenceUtils/recurrenceConstants.ts (0 hunks)
  • src/utils/recurrenceUtils/recurrenceTypes.ts (0 hunks)
  • src/utils/recurrenceUtils/recurrenceUtilityFunctions.ts (0 hunks)
💤 Files with no reviewable changes (8)
  • src/components/EventListCard/EventListCard.spec.tsx
  • src/utils/recurrenceUtils/index.ts
  • src/utils/recurrenceUtils/recurrenceTypes.ts
  • src/components/EventManagement/EventAttendance/Statistics/EventStatistics.tsx
  • src/components/EventListCard/Modal/Update/EventListCardUpdateModal.tsx
  • src/components/RecurrenceOptions/RecurrenceOptions.tsx
  • src/utils/recurrenceUtils/recurrenceConstants.ts
  • src/utils/recurrenceUtils/recurrenceUtilityFunctions.ts
🧰 Additional context used
🧠 Learnings (5)
src/components/OrganizationScreen/OrganizationScreen.spec.tsx (1)
Learnt from: GlenDsza
PR: PalisadoesFoundation/talawa-admin#2397
File: src/screens/OrganizationActionItems/testObject.mocks.ts:184-402
Timestamp: 2024-11-01T12:54:20.857Z
Learning: In `src/screens/OrganizationActionItems/testObject.mocks.ts`, test failures are not dependent on the `createdAt` fields; hardcoded dates in `createdAt` fields do not cause test failures in this file.
src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx (1)
Learnt from: syedali237
PR: PalisadoesFoundation/talawa-admin#3712
File: src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx:156-238
Timestamp: 2025-02-24T14:08:23.162Z
Learning: In YearlyEventCalender component, event filtering based on user roles (SUPERADMIN, ADMIN, USER) is handled internally through the userRole prop, and separate test cases with role-specific data validate this filtering.
src/screens/OrganizationEvents/OrganizationEventsMocks.ts (1)
Learnt from: GlenDsza
PR: PalisadoesFoundation/talawa-admin#2397
File: src/screens/OrganizationActionItems/testObject.mocks.ts:184-402
Timestamp: 2024-11-01T12:54:20.857Z
Learning: In `src/screens/OrganizationActionItems/testObject.mocks.ts`, test failures are not dependent on the `createdAt` fields; hardcoded dates in `createdAt` fields do not cause test failures in this file.
src/components/EventCalender/Monthly/EventCalender.tsx (1)
Learnt from: syedali237
PR: PalisadoesFoundation/talawa-admin#3712
File: src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx:156-238
Timestamp: 2025-02-24T14:08:23.162Z
Learning: In YearlyEventCalender component, event filtering based on user roles (SUPERADMIN, ADMIN, USER) is handled internally through the userRole prop, and separate test cases with role-specific data validate this filtering.
src/components/EventCalender/Yearly/YearlyEventCalender.tsx (1)
Learnt from: syedali237
PR: PalisadoesFoundation/talawa-admin#3712
File: src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx:156-238
Timestamp: 2025-02-24T14:08:23.162Z
Learning: In YearlyEventCalender component, event filtering based on user roles (SUPERADMIN, ADMIN, USER) is handled internally through the userRole prop, and separate test cases with role-specific data validate this filtering.
🧬 Code Graph Analysis (9)
src/components/OrganizationScreen/OrganizationScreen.spec.tsx (1)
src/GraphQl/Queries/Queries.ts (1)
  • GET_ORGANIZATION_EVENTS_PG (493-522)
src/components/EventListCard/EventListCard.tsx (2)
src/types/Event/interface.ts (1)
  • InterfaceEvent (44-63)
src/components/EventListCard/EventListCardProps.ts (1)
  • props (7-164)
src/components/OrganizationScreen/OrganizationScreen.tsx (1)
src/GraphQl/Queries/Queries.ts (1)
  • GET_ORGANIZATION_EVENTS_PG (493-522)
src/components/EventManagement/Dashboard/EventDashboard.spec.tsx (1)
src/components/Advertisements/AdvertisementsMocks.ts (1)
  • wait (153-159)
src/components/EventListCard/Modal/EventListCardModals.tsx (1)
src/GraphQl/Mutations/mutations.ts (1)
  • REGISTER_EVENT (514-520)
src/screens/OrganizationEvents/OrganizationEvents.spec.tsx (1)
src/components/Advertisements/AdvertisementsMocks.ts (1)
  • wait (153-159)
src/screens/OrganizationEvents/OrganizationEvents.tsx (6)
src/GraphQl/Queries/Queries.ts (2)
  • GET_ORGANIZATION_EVENTS_PG (493-522)
  • GET_ORGANIZATION_DATA_PG (545-587)
src/utils/useLocalstorage.ts (1)
  • getItem (29-33)
src/GraphQl/Mutations/mutations.ts (1)
  • CREATE_EVENT_MUTATION (325-346)
src/screens/UserPortal/Events/Events.tsx (1)
  • events (75-451)
src/types/Event/interface.ts (1)
  • InterfaceEvent (44-63)
src/utils/errorHandler.tsx (1)
  • errorHandler (10-32)
src/components/LeftDrawerOrg/LeftDrawerOrg.tsx (2)
src/utils/useLocalstorage.ts (1)
  • getItem (29-33)
src/GraphQl/Queries/Queries.ts (1)
  • GET_ORGANIZATION_DATA_PG (545-587)
src/components/EventCalender/Yearly/YearlyEventCalender.tsx (3)
src/screens/UserPortal/Events/Events.tsx (1)
  • events (75-451)
src/types/Event/interface.ts (2)
  • InterfaceEvent (44-63)
  • InterfaceIOrgList (65-82)
src/components/EventCalender/EventCalenderMocks.ts (1)
  • eventData (7-45)
🪛 ESLint
src/components/EventListCard/EventListCard.tsx

[error] 46-46: 'JSX' is not defined.

(no-undef)

src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx

[error] 158-158: 'it' is not defined.

(no-undef)


[error] 173-192: Test is used multiple times in the same describe(suite) block

(vitest/no-identical-title)


[error] 173-173: 'it' is not defined.

(no-undef)


[error] 194-194: 'it' is not defined.

(no-undef)


[error] 305-305: 'it' is not defined.

(no-undef)

src/components/EventCalender/Monthly/EventCalender.tsx

[error] 13-13: tsdoc-param-tag-with-invalid-name: The @param block should be followed by a valid parameter name: The identifier cannot non-word characters

(tsdoc/syntax)


[error] 13-13: tsdoc-param-tag-with-invalid-type: The @param block should not include a JSDoc-style '{type}'

(tsdoc/syntax)


[error] 13-13: tsdoc-malformed-inline-tag: Expecting a TSDoc tag starting with "{@"

(tsdoc/syntax)


[error] 13-13: tsdoc-escape-right-brace: The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag

(tsdoc/syntax)


[error] 211-211: 'JSX' is not defined.

(no-undef)


[error] 225-225: 'JSX' is not defined.

(no-undef)


[error] 390-390: 'JSX' is not defined.

(no-undef)


[error] 417-417: 'JSX' is not defined.

(no-undef)

src/components/EventCalender/Yearly/YearlyEventCalender.tsx

[error] 13-13: tsdoc-param-tag-with-invalid-name: The @param block should be followed by a valid parameter name: The identifier cannot non-word characters

(tsdoc/syntax)


[error] 13-13: tsdoc-param-tag-with-invalid-type: The @param block should not include a JSDoc-style '{type}'

(tsdoc/syntax)


[error] 13-13: tsdoc-malformed-inline-tag: Expecting a TSDoc tag starting with "{@"

(tsdoc/syntax)


[error] 13-13: tsdoc-escape-right-brace: The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag

(tsdoc/syntax)


[error] 139-139: 'JSX' is not defined.

(no-undef)


[error] 140-140: 'JSX' is not defined.

(no-undef)

src/components/EventManagement/Dashboard/EventDashboard.tsx

[error] 49-49: 'JSX' is not defined.

(no-undef)

🪛 Biome (1.9.4)
src/components/EventListCard/Modal/EventListCardModals.tsx

[error] 113-113: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)


[error] 114-114: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)


[error] 115-115: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)


[error] 120-120: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)


[error] 121-121: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)


[error] 122-122: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)

src/components/EventCalender/Monthly/EventCalender.tsx

[error] 299-303: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

src/screens/OrganizationEvents/OrganizationEvents.tsx

[error] 217-217: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)


[error] 218-218: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)


[error] 219-219: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)


[error] 224-224: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)


[error] 225-225: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)


[error] 226-226: Use Number.parseInt instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

(lint/style/useNumberNamespace)

src/components/LeftDrawerOrg/LeftDrawerOrg.tsx

[error] 190-190: Avoid the words "image", "picture", or "photo" in img element alt text.

Screen readers announce img elements as "images", so it is not necessary to redeclare this in alternative text.

(lint/a11y/noRedundantAlt)


[error] 168-171: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)


[error] 174-177: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)


[error] 185-185: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)


[error] 226-232: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

src/components/EventCalender/Yearly/YearlyEventCalender.tsx

[error] 229-233: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)


[error] 244-248: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

🪛 GitHub Actions: PR Workflow
schema.graphql

[error] 1-1: Unauthorized change/delete detected for this file. To override, apply the 'ignore-sensitive-files-pr' label.

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (14)
src/components/OrganizationScreen/OrganizationScreen.spec.tsx (1)

10-10: Query import change is part of pagination migration.

The import statement has been updated to use the new paginated query GET_ORGANIZATION_EVENTS_PG instead of the deprecated ORGANIZATION_EVENT_LIST query, consistent with the changes in the implementation file.

src/components/OrganizationScreen/OrganizationScreen.tsx (1)

71-71: Query import updated for pagination.

The import has been updated to use the new paginated query GET_ORGANIZATION_EVENTS_PG instead of the previous ORGANIZATION_EVENT_LIST query.

src/components/EventListCard/EventListCard.tsx (2)

39-41: Added JSDoc comment for the interface.

Good addition of documentation for the InterfaceEventListCard interface which improves code readability and makes the purpose of the interface clear.


47-49: Improved formatting for useTranslation hook.

The formatting change for the useTranslation hook call improves readability by separating the namespace and keyPrefix parameters on different lines.

src/components/EventListCard/EventListCardProps.ts (2)

19-19: Recurrence-related properties removed.

The removal of recurring event properties aligns with the broader refactoring to eliminate recurrence functionality throughout the codebase.


115-115: Recurrence-related properties removed.

The removal of recurring event properties in this event object is consistent with the codebase-wide effort to remove recurrence functionality.

src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx (1)

70-101: Role strings inside mocks drift from new UserRole enum

'MEMBER' / 'ADMIN' literals will fail type-checking once those nodes are consumed.
Align with the enum to guarantee consistency:

- role: 'MEMBER',
+ role: UserRole.REGULAR,
...
- role: 'ADMIN',
+ role: UserRole.ADMINISTRATOR,

(Don’t forget the import.)

src/screens/OrganizationEvents/OrganizationEventsMocks.ts (1)

75-86: Great! variables now use the new input signature
No issues spotted here.

src/components/EventManagement/Dashboard/EventDashboard.spec.tsx (1)

78-82: Fragile time assertions – rely on semantic queries

toHaveTextContent('09:00') will fail if localisation, leading zeros, or AM/PM formats change.
Consider asserting on a normalised value or querying the underlying date object instead of raw text.
Example:

expect(dayjs(getByTestId('start-time').textContent).format('HH:mm'))
  .toBe('09:00')
src/screens/OrganizationEvents/OrganizationEvents.spec.tsx (1)

310-325: Manual modal handling indicates missing behaviour in the component

The test forcibly closes the modal because “automatic closing may not happen”.
That means either:

  1. The component is missing a onCompleted handler → bug, or
  2. The mock does not simulate the completion path correctly.

Investigate the root cause instead of patching the test; otherwise production code may leak the modal.

src/components/EventListCard/Modal/EventListCardModals.tsx (2)

175-183: GraphQL variable name differs from backend spec

You send { eventId }, but the mutation shown in mutations.ts expects id.
Confirm the server schema; mismatched names will result in Variable "$eventId" is not defined errors.

-variables: { eventId: eventListCardProps._id }
+variables: { id: eventListCardProps._id }

170-174: ⚠️ Potential issue

some() on possibly undefined attendees

eventListCardProps?.attendees is optional but later you assume it’s an array.
If the API stops sending this field the code will throw.

const isInitiallyRegistered = (eventListCardProps.attendees ?? []).some(

Likely an incorrect or invalid review comment.

src/GraphQl/Mutations/mutations.ts (1)

350-356: Missing success indicator on DELETE_EVENT_MUTATION

The mutation returns only id; consumers cannot distinguish between “event not
found” and “deleted”. Consider returning a boolean success or an
{ success, message } payload like other mutations (RejectMembershipRequest,
AcceptMembershipRequest).

schema.graphql (1)

260-289: Review the refactored Event type for nullability and schema consistency
You’ve unified date/time into startAt/endAt and replaced flat lists with paginated connections (agendaFolders, venues). A few follow-ups:

  1. allDay: Boolean is now nullable—should this remain optional or be made non-nullable (Boolean!) to avoid ambiguity?
  2. name: String is nullable, but your create/update inputs require name: String!. Consider aligning field-level nullability with input requirements.
  3. Verify that EventAgendaFoldersConnection and EventVenuesConnection types are defined and that your resolvers correctly handle pagination args.
  4. Ensure any deprecated fields (e.g., legacy title or recurrence-related fields) are fully removed to prevent confusion.

Comment on lines +107 to 109
const { data: eventsData } = useQuery(GET_ORGANIZATION_EVENTS_PG, {
variables: { id: orgId },
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Query migration incomplete - data structure mismatch.

While the query has been updated to use GET_ORGANIZATION_EVENTS_PG, the code still expects the old data structure with eventsData.eventsByOrganization. The new query returns data in a connection pattern with organization.events.edges containing nodes of event data.

This will cause runtime errors. Update the usage like this:

const { data: eventsData } = useQuery(GET_ORGANIZATION_EVENTS_PG, {
  variables: { id: orgId },
});

useEffect(() => {
-  if (isEventPath?.params.eventId && eventsData?.eventsByOrganization) {
+  if (isEventPath?.params.eventId && eventsData?.organization?.events?.edges) {
    const eventId = isEventPath.params.eventId;
-    const event = eventsData.eventsByOrganization.find(
-      (e: InterfaceEvent) => e._id === eventId,
+    const event = eventsData.organization.events.edges.find(
+      (edge: any) => edge.node.id === eventId,
    )?.node;

    if (!event) {
      console.warn(`Event with id ${eventId} not found`);
      setEventName(null);
      return;
    }
-    setEventName(event.title);
+    setEventName(event.name);


/**
* Props for the EventListCard component.
*/
interface InterfaceEventListCard extends InterfaceEvent {
refetchEvents?: () => void;
}

function eventListCard(props: InterfaceEventListCard): JSX.Element {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

ESLint error: 'JSX' is not defined.

The static analysis tool detected an undefined JSX type in the return type of the function.

This can be fixed by adding the correct import for React JSX types:

import React, { useState } from 'react';
+import type { JSX } from 'react';
import { useTranslation } from 'react-i18next';

Alternatively, you can use the React namespace:

-function eventListCard(props: InterfaceEventListCard): JSX.Element {
+function eventListCard(props: InterfaceEventListCard): React.JSX.Element {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function eventListCard(props: InterfaceEventListCard): JSX.Element {
import React, { useState } from 'react';
import type { JSX } from 'react';
import { useTranslation } from 'react-i18next';
// …
function eventListCard(props: InterfaceEventListCard): JSX.Element {
// existing implementation…
}
Suggested change
function eventListCard(props: InterfaceEventListCard): JSX.Element {
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
// …
function eventListCard(props: InterfaceEventListCard): React.JSX.Element {
// existing implementation…
}
🧰 Tools
🪛 ESLint

[error] 46-46: 'JSX' is not defined.

(no-undef)

Comment on lines 12 to 20
_id: 'event123',
title: 'Test Event',
id: 'event123',
name: 'Test Event',
description: 'Test Description',
startDate: '2024-01-01',
endDate: '2024-01-02',
startAt: '2024-01-01T09:00:00Z',
endAt: '2024-01-02T17:00:00Z',
startTime: '09:00:00',
endTime: '17:00:00',
allDay: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Remove legacy / duplicated event-key fields to keep mocks aligned with the new schema

The mock now contains both legacy and new-schema keys (_id and id, startTime/endTime and startAt/endAt).
Keeping both increases cognitive load and risks silent test-only “green” paths that will never happen in production where only the new keys are returned.

         _id: 'event123',
-        id: 'event123',
-        name: 'Test Event',
+        id: 'event123',          // keep either _id OR id – not both
+        name: 'Test Event',
@@
-        startAt: '2024-01-01T09:00:00Z',
-        endAt: '2024-01-02T17:00:00Z',
-        startTime: '09:00:00',
-        endTime: '17:00:00',
+        startAt: '2024-01-01T09:00:00Z',
+        endAt: '2024-01-02T17:00:00Z',
          allDay: false,

Do the same clean-up for MOCKS_WITHOUT_TIME.
If the UI still expects startTime/endTime, consider deriving them inside the component instead of storing redundant data in the mocks.


Let’s pull in the actual mock contents to confirm exactly which fields exist and where they need cleanup:


🏁 Script executed:

#!/bin/bash
# Locate and display the first 200 lines of the EventDashboard mocks file
file=$(fd --type f 'EventDashboard.mocks.ts')
echo "Found mock file at: $file"
sed -n '1,200p' "$file"

Length of output: 2029


Clean up duplicated event keys in mocks

The mocks currently include both legacy and new-schema fields (_id + id, startTime/endTime + startAt/endAt), which doesn’t reflect production responses and can mask real bugs. Please update both MOCKS_WITH_TIME and MOCKS_WITHOUT_TIME in src/components/EventManagement/Dashboard/EventDashboard.mocks.ts:

  • Remove the _id properties and keep only id.
  • Remove the redundant startTime/endTime and rely on startAt/endAt.
  • If the UI needs discrete time strings, derive them in the component rather than hard-coding them in mocks.

Proposed diffs:

--- a/src/components/EventManagement/Dashboard/EventDashboard.mocks.ts
+++ b/src/components/EventManagement/Dashboard/EventDashboard.mocks.ts
@@ export const MOCKS_WITH_TIME = [
-         _id: 'event123',
          id: 'event123',
@@
-        startTime: '09:00:00',
-        endTime: '17:00:00',
          startAt: '2024-01-01T09:00:00Z',
          endAt: '2024-01-02T17:00:00Z',
--- a/src/components/EventManagement/Dashboard/EventDashboard.mocks.ts
+++ b/src/components/EventManagement/Dashboard/EventDashboard.mocks.ts
@@ export const MOCKS_WITHOUT_TIME = [
-         _id: 'event123',
          id: 'event123',
@@
-        startTime: null,
-        endTime: null,
          startAt: '2024-01-01T00:00:00Z',
          endAt: '2024-01-02T00:00:00Z',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
_id: 'event123',
title: 'Test Event',
id: 'event123',
name: 'Test Event',
description: 'Test Description',
startDate: '2024-01-01',
endDate: '2024-01-02',
startAt: '2024-01-01T09:00:00Z',
endAt: '2024-01-02T17:00:00Z',
startTime: '09:00:00',
endTime: '17:00:00',
allDay: false,
// --- a/src/components/EventManagement/Dashboard/EventDashboard.mocks.ts
// +++ b/src/components/EventManagement/Dashboard/EventDashboard.mocks.ts
export const MOCKS_WITH_TIME = [
{
id: 'event123',
name: 'Test Event',
description: 'Test Description',
startAt: '2024-01-01T09:00:00Z',
endAt: '2024-01-02T17:00:00Z',
allDay: false,
},
// …other mocks
];
export const MOCKS_WITHOUT_TIME = [
{
id: 'event123',
name: 'Test Event',
description: 'Test Description',
startAt: '2024-01-01T00:00:00Z',
endAt: '2024-01-02T00:00:00Z',
allDay: false,
},
// …other mocks
];

Comment on lines +64 to 65
<Modal.Body>{t('deleteEventMsg')}</Modal.Body>
<Modal.Footer>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Improve UX by referencing the event name in the confirmation message

A generic “deleteEventMsg” gives users no reassurance that they are deleting the intended record—especially now that the recurrence options are gone (there is no second prompt).

-  <Modal.Body>{t('deleteEventMsg')}</Modal.Body>
+  <Modal.Body>
+    {t('deleteEventMsg', { name: eventListCardProps.name ?? eventListCardProps.title })}
+  </Modal.Body>

(Adjust the i18n key as needed.)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Modal.Body>{t('deleteEventMsg')}</Modal.Body>
<Modal.Footer>
<Modal.Body>
{t('deleteEventMsg', { name: eventListCardProps.name ?? eventListCardProps.title })}
</Modal.Body>
<Modal.Footer>

Comment on lines +11 to 13
import { BrowserRouter } from 'react-router-dom';
import { UserRole } from 'types/Event/interface';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Missing ESLint env → it / describe flagged as undefined

ESLint is complaining because the file is not in a recognised test environment.
Add the Vitest env header (or import the globals) to silence false positives:

+/* eslint-env vitest */

or

import { describe, it, expect, vi } from 'vitest';

Comment on lines +204 to 210
const timezoneString = `UTC${new Date().getTimezoneOffset() > 0 ? '-' : '+'}${String(
Math.floor(Math.abs(new Date().getTimezoneOffset()) / 60),
).padStart(
2,
'0',
)}:${String(Math.abs(new Date().getTimezoneOffset()) % 60).padStart(2, '0')}`;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Micro-optimisation: compute timezoneString once, not on every render.

new Date() plus formatting is executed on every render. Wrap it in useMemo with an empty dependency array to avoid needless work:

-  const timezoneString = `UTC${...}`;
+  const timezoneString = useMemo(() => {
+    const offset = new Date().getTimezoneOffset();
+    return `UTC${offset > 0 ? '-' : '+'}${String(Math.floor(Math.abs(offset) / 60)).padStart(2, '0')}:${String(Math.abs(offset) % 60).padStart(2, '0')}`;
+  }, []);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const timezoneString = `UTC${new Date().getTimezoneOffset() > 0 ? '-' : '+'}${String(
Math.floor(Math.abs(new Date().getTimezoneOffset()) / 60),
).padStart(
2,
'0',
)}:${String(Math.abs(new Date().getTimezoneOffset()) % 60).padStart(2, '0')}`;
const timezoneString = useMemo(() => {
const offset = new Date().getTimezoneOffset();
return `UTC${offset > 0 ? '-' : '+'}${String(Math.floor(Math.abs(offset) / 60)).padStart(2, '0')}:${String(Math.abs(offset) % 60).padStart(2, '0')}`;
}, []);

Comment on lines +2094 to +2105
input MutationCreateEventInput {
allDay: Boolean!
attachments: [Upload!]
description: String
endAt: DateTime!
isPublic: Boolean
isRegisterable: Boolean
location: String
name: String!
organizationId: ID!
startAt: DateTime!
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Harden MutationCreateEventInput nullability & defaults
Your new input is well scoped, but consider tightening:

  • Should optional booleans (isPublic, isRegisterable) default to false? If so, declare as Boolean! with default value.
  • attachments: [Upload!] is required—do you intend to always receive >0 uploads? If optional, wrap in attachments: [Upload!] and handle empty lists gracefully.
  • To prevent client confusion, add descriptions or default directives.

@@ -862,7 +862,7 @@
input: UpdateAgendaCategoryInput!
): AgendaCategory
updateCurrentUser(input: MutationUpdateCurrentUserInput!): UserPg
updateEvent(data: UpdateEventInput, id: ID!): Event!
updateEvent(data: MutationUpdateEventInput, id: ID!): Event!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consolidate/update the updateEvent argument pattern
Currently:

updateEvent(data: MutationUpdateEventInput, id: ID!): Event!

Recommendations:

  • Flip to use a single input named input to mirror createEvent, e.g.:
    updateEvent(input: MutationUpdateEventInput!): Event!
  • At minimum, make data: MutationUpdateEventInput! non-nullable for clarity.
    This will improve consistency across your mutations.

Comment on lines +2107 to +2117
input MutationUpdateEventInput {
id: ID!
name: String
description: String
startAt: DateTime
endAt: DateTime
allDay: Boolean
location: String
isPublic: Boolean
isRegisterable: Boolean
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Extend MutationUpdateEventInput to match feature set or simplify
Your update input covers core event fields, but:

  • If attachments can be modified, you may want attachments: [Upload!] here too.
  • The field name differs from the old title—ensure this naming is consistent across all types/queries.
  • Consider renaming the argument to input: MutationUpdateEventInput! per mutation convention.
  • Ensure id: ID! is the first or only non-input field if you keep dual-arg style.

data: EventInput!
recurrenceRuleData: RecurrenceRuleInput
): Event!
createEvent(input: MutationCreateEventInput!): Event
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Ensure createEvent return type is non-nullable
The mutation signature now accepts a single input object—which is great for future extensibility—but the return type is Event (nullable). For consistency with other create mutations (e.g., createVenue: Venue!), consider changing to:

-createEvent(input: MutationCreateEventInput!): Event
+createEvent(input: MutationCreateEventInput!): Event!
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
createEvent(input: MutationCreateEventInput!): Event
createEvent(input: MutationCreateEventInput!): Event!

@palisadoes palisadoes added the ignore-sensitive-files-pr The contributor has a legitimate reason for editiing protected files label May 3, 2025
@palisadoes
Copy link
Contributor

Please fix the linting

Copy link

This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.

@github-actions github-actions bot added the no-pr-activity No pull request activity label May 11, 2025
@palisadoes
Copy link
Contributor

@gautam-divyanshu Are you still working on this?

@palisadoes palisadoes added the MVP Needed for our 2025 MVP label May 18, 2025
@github-actions github-actions bot removed the no-pr-activity No pull request activity label May 19, 2025
@palisadoes
Copy link
Contributor

  1. Closing.
  2. Please reopen but use the develop branch
  3. The postgres code has been merged into the develop branch
  4. The develop-postgres branch no longer exists

@palisadoes palisadoes closed this May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-sensitive-files-pr The contributor has a legitimate reason for editiing protected files MVP Needed for our 2025 MVP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants