Conversation
|
@Dnouv , Can you please review this PR and please let me know if any changes are required. |
Dnouv
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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.
We should not allow negative levels. WDYT?
There was a problem hiding this comment.
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.
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.
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