oss-slu / esp

MIT License
0 stars 5 forks source link

Download search results as Word document #75

Open SiriChandanaGarimella opened 1 month ago

SiriChandanaGarimella commented 1 month ago

Is your feature request related to a problem? Please describe. Currently, users cannot download the search results as a Word document. Additionally, the specify_lines field value is shown as [object Object] instead of the actual value in the API request payload.

Describe the solution you'd like

  1. Implement functionality to download search results as a Word document when clicking the "Download Output" button in http://localhost:3000/temp path. (It should work as it is currently working in 'http://localhost:3000/orca')
  2. Fix the display of the specify_lines field to show the actual value instead of [object Object].
    • Steps to reproduce this issue:
      1. Run the application and navigate to https://localhost:3000/temp
      2. Choose the ORCA log file as the input and upload it.
      3. Provide the following search inputs:
        • Search term (e.g., "CARTESIAN COORDINATES (A.U.)") and click on 'Enter'
        • Lines specified (e.g., FIRST 5)
        • Number of sections (e.g., 1, 2)
      4. Click on F12 and open the developer tools
      5. Navigate to the Network tab in the developer tools
      6. Click on Download Output in the UI
      7. In the Network tab, click on find-sections API and navigate to the Payload tab. Check the value of 'specify_lines' in the Request Payload.
      8. Open a new browser tab, navigate to https://localhost:3000/, and repeat the above steps from 2-7 with the same inputs.
      9. Observe the difference in the specify_lines parameter value.
image

Acceptance Criteria

  1. When the "Download Output" button is clicked, a Word document (.docx) is downloaded containing the search results.
  2. The downloaded document should be properly formatted and readable in Microsoft Word and other compatible applications.
  3. The specify_lines field in the UI should display the actual selected value (e.g., "FIRST 5") instead of [object Object].
  4. The content of the Word document should accurately reflect the search results and specified parameters.

Additional Context This issue should be the continuation of the issue https://github.com/oss-slu/esp/issues/62