-
Notifications
You must be signed in to change notification settings - Fork 40
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
Sponsor Form Added #118
base: main
Are you sure you want to change the base?
Sponsor Form Added #118
Conversation
@Dnouv , Can you please review this PR and please let me know if any changes are required. |
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.
Hey @ayush3160
Thanks for the PR. I have left some comments; please have a look, and let me know if you have any questions. Thank you!
export const getSponsorsDetails = async (eid,auth) => { | ||
const headers = { | ||
Accept: "application/vnd.api+json", | ||
Authorization: `JWT ${auth}`, | ||
}; | ||
const res = await axios.get(`${eventUrl}/v1/events/${eid}/sponsors`, { | ||
headers: headers, | ||
}); | ||
return res; | ||
} |
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.
We are using the same call on the EventDisplay page, and this would result in an error. Since the Event Display page does not requires the user to be logged in.
Also, if possible please reduce introducing new axios
calls, we are trying to move all the API calls, to native fetch
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 have added a new event details call similar to getEventDeatils but with the auth because to fetch the details of draft event we will need the auth.
<Button variant="primary" type="submit" onClick={handleSubmit} className="my-2"> | ||
Next | ||
</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.
If the user clicks on the "Next" button on the Basic detail form, the event is supposed to be saved as draft, so we need an "Publish" button (if the event is in draft state)
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 have added the Publish Event Button if the event is in the draft state
<Form.Control | ||
type="number" | ||
onChange={e => {props.handleChange(e,id)}} | ||
name="level" |
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.
We should not allow negative levels. WDYT?
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.
There was no such clarification in the Api documentation but I also think that the levels should be 0 or more than 0, So I have added that condition in the form.
</div> | ||
); | ||
}) | ||
: "No Sponsor found"} |
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.
This text should be something like greyed out or italic. To differentiate with other texts.
Or I would highly suggest having a toggle switch with title "Enable Sponsors," which by default will be toggled off, but when toggled on, it should show the question forms embedded inside the component, not as modal.
Thank you!
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 have changed the text in italic and also changed the color to grey.
Hey @ayush3160 Any updates? If there are, please let me know. Thank you! |
@Dnouv , I am really sorry for delaying this. Please have a look on the changes that I have made. Thanks You. |
fix #102 , I have implemented the sponsor details form. The revised flow of creating the event is as follow, At the time of creating a new event only the basic-detail form is accessible and after submitting the form , it will redirect to the edit event page of sponsor from where the user can add and edit the sponsors , speaker's etc.
Rocket.Chat_.Communications.Platform.You.Can.Fully.Trust.-.17.February.2023.mp4