-
Couldn't load subscription status.
- Fork 13
Add customer edit modal with form validation #26
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
base: main
Are you sure you want to change the base?
Conversation
cgen-16dac2db171346809d46f3f94c25ff86
cgen-46e733651d3f4ed2b3b614df1cc1a22a
cgen-3ff1f4635d5c4cbf862f402b6ecdf3a2
|
You can tag me at @builderio-bot for anything you want me to fix or change |
src/crm/pages/Customers.tsx
Outdated
| const [totalRows, setTotalRows] = React.useState(0); | ||
| const [statsData, setStatsData] = React.useState(customerStatsData); | ||
| const [editModalOpen, setEditModalOpen] = React.useState(false); | ||
| const [selectedCustomer, setSelectedCustomer] = React.useState<User | null>(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@builderio-bot always use import { useState } from React and not React.useState throughout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will get right to work! You can track my progress in Builder.io
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Updated React import pattern across both files
Changes made:
src/crm/pages/Customers.tsx: Updated to import{ useState, useCallback, useMemo, useEffect }and use them directlysrc/crm/components/EditCustomerModal.tsx: Updated to import{ useState, useEffect }and use them directly
Both files now follow the proper React import pattern using destructured imports instead of React.useState, React.useEffect, etc.
cgen-def3171e72924199a789159f59afd88b
cgen-333e9d293a314ee981c266a178172b94
Purpose
Implement the customers tab dashboard functionality as requested in BUI-2303. The user wanted a three-dots menu that opens a modal for editing customer details through a form interface.
Code changes
Added EditCustomerModal component (
src/crm/components/EditCustomerModal.tsx):Enhanced Customers dashboard (
src/crm/pages/Customers.tsx):Key features:
gh pr checkout 26🔗 Edit in Builder.io
👀 Preview Link