I'm trying to chain some backend calls to process a file, but the entire workflow needs some input from the user midway. I'm not sure how to pause the execution until the user clicks a button to "Continue" after working with a modal.
So the process is as follows:
- User selects a file which triggers an event to upload some data.
- I get the response from the previous call, open up a modal with a form. I need to pause here.
- Fill the form, click "Continue" button to resume promise chain.
- Trigger another call to submit more info to another endpoint.
So each of these steps relate to an HTTP request, using axios, but I'm having a hard time understanding how to chain the promises.
Right now I have something like:
onFileSelected(event) {
  // code here
  axios
    .post("")
    .then((res) => {
      // Here I need to open the modal, and wait for the button click
    })
    .then(() => {
      anotherMethod();
    });
}
 
     
    