-
Notifications
You must be signed in to change notification settings - Fork 0
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
74 manually onboard business from admin side #82
Conversation
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.
take a look at the comments i left
getBusinessContactResponse(); | ||
}, [backend]);*/ | ||
|
||
useEffect(() => {}); |
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.
????
/* CHANGE FOR THIS PAGE WHEN WE REACH BACKEND | ||
const updateContactInfo = async () => { | ||
try { | ||
await backend.put(`/business/${BUSINESS_ID}`, { | ||
business_name: businessContactInfo.businessName, | ||
contact_name: `${businessContactInfo.firstName} ${businessContactInfo.lastName}`, | ||
contact_phone: businessContactInfo.phoneNumber, | ||
primary_email: businessContactInfo.email, | ||
website: businessContactInfo.website, | ||
street: businessContactInfo.street, | ||
zip: businessContactInfo.zip, | ||
city: businessContactInfo.city, | ||
state: businessContactInfo.state, | ||
business_hours: businessContactInfo.business_hours, | ||
}); | ||
} catch (error) { | ||
console.error('Error updating data:', error); | ||
} | ||
|
||
}; | ||
|
||
useEffect(() => { | ||
const getBusinessContactResponse = async () => { | ||
try { | ||
const businessContactResponse = await backend.get(`/business/${BUSINESS_ID}`); | ||
const businessContact = businessContactResponse.data[0]; | ||
const name = businessContact.contact_name.split(' '); | ||
const firstName = name[0]; | ||
const lastName = name[1]; | ||
|
||
setBusinessContactInfo({ | ||
businessName: businessContact.name, | ||
phoneNumber: businessContact.contact_phone, | ||
email: businessContact.primary_email, | ||
website: businessContact.website, | ||
street: businessContact.street, | ||
firstName: firstName, | ||
lastName: lastName, | ||
city: businessContact.city, | ||
state: businessContact.state, | ||
zip: businessContact.zip_code, | ||
business_hours: businessContact.business_hours, | ||
}); | ||
} catch (error) { | ||
console.error('Error fetching data:', error); | ||
} |
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.
can you explain this more in detail? not really understanding what the comment is referring to. but delete if we don't need it
<Button | ||
color="black" | ||
bg="gray.100" | ||
variant="solid" | ||
width={'21.5%'} | ||
marginRight={'1%'} | ||
onClick={addNewBusiness} // CHANGE THIS TO DO WHAT A CANCEL BUTTON IS SUPPOSED TO DO | ||
> | ||
Cancel | ||
</Button> |
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.
comment these lines of code out, we can get rid of the cancel button
Closes issue #74