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

Ft enable xls parsing #252

Merged
merged 6 commits into from
Mar 28, 2024
Merged

Ft enable xls parsing #252

merged 6 commits into from
Mar 28, 2024

Conversation

khalifan-kfan
Copy link
Collaborator

Description

This PR enables the user to update the Enketo submission form, It mainly solves the issue #248

Discussion

#248

Screenshots / Videos

Screenshot 2024-03-27 at 12 14 20 Screenshot 2024-03-27 at 12 14 33

@github-actions github-actions bot added the App: Dashboard Updates related to Dashboard app label Mar 27, 2024
Copy link
Collaborator

@chrismclarke chrismclarke left a comment

Choose a reason for hiding this comment

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

Thanks @khalifan-kfan , lots of really great progress here considering all the extra work that's gone into the API endpoints.

I can confirm that the full process is working for me to upload an xls file and have it converted to XML and then enketo form.

I've added a couple minor additions,
96a7eef - this converts the HTTP request from subscriptions to promise using an rxjs utility method called firstValueFrom. This is useful in HTTP request where you know you are just going to receive a single response (instead of a stream of data), as you can then use more simple async-await structures. I've also added strong type definitions observerved from the responses

7572c4c - This implements the async-await syntax, and adds an extra method to delete the uploaded file if both steps of the conversion not fully successful (e.g. if an xls file has errors and can't be converted we won't store, so that a user can upload another version)

I also saw then note you made about using storage object ids. A good idea which I had previously tried using, although the challenge is supabase doesn't currently let you set the object id manually so it makes it impossible to import/export data as any time you create a new db all the storage object ids change and any tables referring to them break. So instead I just stored the bucket and folder names as variables to make it easier to retrieve the storage object path and populate as required.

But overall really nice work, there's still a few tasks we'll want to do as a follow-up (e.g. create new form entries, preview the form), I'll plan to create issue for those shortly and happy to merge here for now.

@chrismclarke chrismclarke merged commit 4793aa3 into main Mar 28, 2024
3 checks passed
@chrismclarke chrismclarke deleted the ft-enable-xls-parsing branch March 28, 2024 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App: Dashboard Updates related to Dashboard app
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants