Skip to content

feat: Add/Edit dialogs for Customers, Suppliers, Products#1

Open
coder-contrib-bot wants to merge 1 commit into
mainfrom
claude-code/crud-dialogs/ki7f1edl
Open

feat: Add/Edit dialogs for Customers, Suppliers, Products#1
coder-contrib-bot wants to merge 1 commit into
mainfrom
claude-code/crud-dialogs/ki7f1edl

Conversation

@coder-contrib-bot
Copy link
Copy Markdown
Collaborator

Summary

  • Created suppliers data layer (suppliers_repository.dart + suppliers_provider.dart) — was completely missing
  • Added CustomerFormDialog with form validation, create/update API calls, and auto-refresh
  • Added SupplierFormDialog with same pattern
  • Added ProductFormDialog with toggles for meter-based, piece sale, and active status
  • Rewrote SuppliersPage from a text stub to a full list view with Add/Edit buttons
  • Wired up the previously empty onPressed: () {} callbacks in CustomersPage and ProductsPage
  • All dialogs support both Add (create) and Edit (update) modes via optional model param

How to use

After pulling this branch:

cd frontend
git pull origin claude-code/crud-dialogs/ki7f1edl
flutter run -d chrome

Click "Add Customer/Supplier/Product" buttons to open the form dialogs. Click the edit icon on any list item to edit.

Test plan

  • Open Customers page - click Add Customer - fill form - verify appears in list
  • Click edit icon on a customer - modify name - verify updated
  • Same flow for Suppliers page
  • Same flow for Products page
  • Verify validation (empty name shows error)
  • Verify error handling (disconnect backend - see error snackbar)

GIT_AUTHOR_NAME: Claude Code (AI Agent)
GIT_AUTHOR_EMAIL: noreply@anthropic.com
AI Agent: Claude (Opus 4.5)

- Create suppliers data layer (repository + provider)
- Add CustomerFormDialog with add/edit support
- Add SupplierFormDialog with add/edit support
- Add ProductFormDialog with add/edit support (includes category dropdown)
- Rewrite SuppliersPage with full list view and actions
- Wire up Add/Edit buttons in all three pages
- Add refresh capability to providers (invalidate on create/update)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant