Skip to content

Add Event Edit Page#2080

Merged
steeevin88 merged 3 commits intodevfrom
khoa/editEventUI
Apr 18, 2026
Merged

Add Event Edit Page#2080
steeevin88 merged 3 commits intodevfrom
khoa/editEventUI

Conversation

@KhoaNguyen706
Copy link
Copy Markdown
Collaborator

@KhoaNguyen706 KhoaNguyen706 commented Apr 12, 2026

I changed these:

  • add Event Edit page ( just the same format with create page)
  • add the little button edit on the top right corner
  • Temporarily grant Admin permission for create and update event
  • Authorization will add later
  • currently enable the SCE events
    Before:
image We can edit registeration form too: image image after update event: image

@steeevin88
Copy link
Copy Markdown
Collaborator

did you test this? could you include screenshots

@KhoaNguyen706
Copy link
Copy Markdown
Collaborator Author

KhoaNguyen706 commented Apr 12, 2026

Yes, I did, It worked for mock data

Copy link
Copy Markdown
Collaborator

@steeevin88 steeevin88 left a comment

Choose a reason for hiding this comment

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

left a few comments, in general though im confused why we have mock functions? as opposed to testing with actual Clark

i know it'll take a few extra steps to create the account in local Clark, create event, etc... but i'd prefer to be extra and ensure things work

also, i don't think any of this stuff is gated. remember that anything SCEvents related on Clark shouldn't be made public yet... so we need to ensure your new page is gated. (even though technically it's true that accessing this page is hard b/c you'd need access to the gated Events page... we should still be thorough)

Comment thread src/APIFunctions/SCEvents.js Outdated
Comment thread src/Components/context/SceContext.js
Comment thread src/Components/context/SceContext.js
Comment thread src/Components/context/SceContext.js Outdated
Comment thread src/Pages/Events/CreateEventPage.js
Copy link
Copy Markdown
Collaborator

@steeevin88 steeevin88 left a comment

Choose a reason for hiding this comment

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

besides one more comment this LGTM!

just to make sure, this is gated right? if so feel free to merge

import { ApiResponse } from './ApiResponses';

const SCEVENTS_API_URL = 'http://localhost:8002';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove this

@steeevin88
Copy link
Copy Markdown
Collaborator

steeevin88 commented Apr 16, 2026

i think the edit event page isn't gated, let's add this:

...
const isSCEventsEnabled = config.SCEvents?.ENABLED;
...
  if (!isSCEventsEnabled) {
    return <Redirect to="/notfound" />;
  }

similar to this:

export default function EventsPage() {
const { user } = useSCE();
const [events, setEvents] = useState([]);
const [isLoading, setIsLoading] = useState(true);
const [hasError, setHasError] = useState(false);
const isSCEventsEnabled = config.SCEvents?.ENABLED;
const canCreateEvent = user?.accessLevel >= membershipState.OFFICER;
useEffect(() => {
if (!isSCEventsEnabled) {
return;
}
async function fetchEvents() {
setIsLoading(true);
setHasError(false);
const response = await getAllSCEvents();
if (!response.error) {
setEvents(Array.isArray(response.responseData) ? response.responseData : []);
} else {
setHasError(true);
}
setIsLoading(false);
}
fetchEvents();
}, [isSCEventsEnabled]);
if (!isSCEventsEnabled) {
return <Redirect to="/notfound" />;
}

obviously technically the edit page won't be accessible since the main SCEvents page isn't accessible + there will be no events, but we should be cautious regardless

Copy link
Copy Markdown
Collaborator

@steeevin88 steeevin88 left a comment

Choose a reason for hiding this comment

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

nice

Copy link
Copy Markdown

@c1ndytat c1ndytat left a comment

Choose a reason for hiding this comment

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

lgtm

@steeevin88 steeevin88 changed the title add Event Edit Page Add Event Edit Page Apr 18, 2026
@steeevin88 steeevin88 merged commit a53f28b into dev Apr 18, 2026
4 checks passed
@steeevin88 steeevin88 deleted the khoa/editEventUI branch April 18, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants