Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: enable saving new quotes in visual builder#11

Merged
aruneshwisdm merged 0 commit into
mainfrom
fix/issue-3
Feb 25, 2026
Merged

fix: enable saving new quotes in visual builder#11
aruneshwisdm merged 0 commit into
mainfrom
fix/issue-3

Conversation

@aruneshwisdm

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes Quote Draft Not Saving in Visual Builder ("Failed to save quote") #3: Quote Draft Not Saving in Visual Builder ("Failed to save quote")
  • New quotes now call createQuote() when Save is clicked, then navigate to the edit URL
  • Added updateDocumentId() store action to set the real DB id after creation
  • Added client validation before save (quotes require a client)

Root Cause

The new quote builder page created documents with id: '' via resetDocument(). When clicking Save, handleSave() only called updateQuote() which failed because no DB record existed. The fix branches on document.id: if empty, calls createQuote() first, then transitions to the edit builder URL.

Files Modified

File Changes
apps/web/components/quotes/builder/builder-toolbar.tsx Import createQuote, modify handleSave() for new quote flow
apps/web/lib/stores/quote-builder-store.ts Add updateDocumentId() action

Test plan

  • Open /quotes/new/builder, add blocks, click Save → should create quote and navigate to edit URL
  • Open existing quote in builder, edit, click Save → should update (existing behavior preserved)
  • Try saving without a client selected → should show "Please select a client" toast
  • After saving new quote, verify auto-save works on the edit page
  • Verify Send button works after saving a new quote

🤖 Generated with Claude Code

@vercel

vercel Bot commented Feb 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quote-software Building Building Preview, Comment Feb 25, 2026 8:19am

Request Review

@aruneshwisdm aruneshwisdm merged this pull request into main Feb 25, 2026
1 of 2 checks passed
@aruneshwisdm aruneshwisdm deleted the fix/issue-3 branch February 25, 2026 13:54
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.

Quote Draft Not Saving in Visual Builder ("Failed to save quote")

1 participant