Skip to content

location edit#89

Open
riddhimatukliya wants to merge 4 commits intopclubiitk:devfrom
riddhimatukliya:dev
Open

location edit#89
riddhimatukliya wants to merge 4 commits intopclubiitk:devfrom
riddhimatukliya:dev

Conversation

@riddhimatukliya
Copy link
Copy Markdown

@riddhimatukliya riddhimatukliya commented Mar 21, 2026

Location Review Queue

Features

  • Fetches pending location requests from the server
  • Displays location details:
    • Name
    • Description
    • Latitude & Longitude
    • Contributor information
  • Admin actions:
    • Approve a location
    • Reject a location with a custom message

API Endpoints

  • GET /api/maps/newLocation → Fetch pending requests
  • POST /api/maps/location/:locationId → Update status

Behavior

  • Redirects unauthorized users to home
  • Displays loading and empty states
  • Shows toast notifications for success/error
  • Automatically refreshes data after actions

Edit Location

The Edit Location Drawer/Dialog allows admins to update existing location details.

Features

  • Responsive UI:
    • Desktop → Modal Dialog
    • Mobile → Bottom Drawer
  • Editable fields:
    • Name
    • Description
    • Category/Tag
    • Operating Hours
    • Contact Person
    • Contact Information

API Endpoint

  • PUT /api/maps/location/:locationId → Update location details

Behavior

  • Validates required fields before submission
  • Shows loading state during update
  • Displays success/error notifications
  • Closes UI and refreshes data on success

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.

I feel this change is not needed. This just adds complexity without benefit . Lets stick to the older version for now.

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.

This changes the default environment from prod to dev . That is okay for local testing, but it should not be merged because it can mis configure our production behavior

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.

See this PR is mixing multiple unrelated changes. We should keep one PR focused on one issue only.
If you feel there are separate fixes (config, auth ,etc.), split them into separate PRs.

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.

See here, ./db_data is a host path relative to docker-compose.yml, this means that DB files are stored on the host in db_data. Switching from bind mount(means the data is stored on our directory) to named volume(docker manages the storage in a bucket) changes local DB behavior for everyone. So its better to not change the default for now.

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.

No need to remove

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.

2 participants