Skip to content
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

feat: Edit Project Feature Implementation #224

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

atrincas
Copy link
Collaborator

@atrincas atrincas commented Jan 13, 2025

Edit Project Feature Implementation

Overview

This PR introduces the ability to edit existing custom projects and includes refactoring of the project form components for better code organization and reusability.

Key Changes

  • Added edit project functionality with a new route /projects/[id]/edit
  • Implemented edit project links in project details, header, and summary views
  • Refactored form components to handle both create and edit flows:
    • Consolidated form logic into reusable components
    • Created unified CustomProjectForm component
    • Added form utilities for handling default values and submissions
  • Updated schema imports to use custom-project.schema.ts instead of create-custom-project.schema.ts
  • Added proper percentage value handling for numeric inputs
  • Improved project data prefetching with new utility functions
  • Improved navigation matching for project routes
  • Enabled the "edit-project" feature flag

Testing Notes

  • Verify both create and edit flows work as expected
  • Test percentage value inputs (especially loss rates)
  • Confirm navigation between project views
  • Check error handling for form submissions

Jira

TBCCT-225

Copy link

vercel bot commented Jan 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tnc-blue-carbon-cost-tool-ghps ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2025 8:56pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants