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

74 manually onboard business from admin side #82

Closed

Conversation

joshualipton
Copy link
Collaborator

Closes issue #74

@joshualipton joshualipton linked an issue Apr 18, 2024 that may be closed by this pull request
Copy link
Member

@Madhu2244 Madhu2244 left a 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(() => {});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

????

Comment on lines 168 to 213
/* 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);
}
Copy link
Member

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

Comment on lines 610 to 619
<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>
Copy link
Member

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

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.

Manually Onboard Business from Admin Side
4 participants