stats4sd / holpa-platform

Data Platform for the HOLPA tool
0 stars 0 forks source link

Add filament-odk-link as Submodule #13

Closed dan-tang-ssd closed 2 weeks ago

dan-tang-ssd commented 3 weeks ago

This PR is submitted to add filament-odk-link as submodule, to fix #2

Please note that it is not yet ready for review. It is submitted as a progress update.


Hi @dave-mills , I did below items:

  1. Check tape-data-system PRs, it looks like filament-odk-link was added as submodule before the first PR.
  2. Check tape-giz PRs, it looks like filament-odk-link was added as submodule before the first PR.
  3. Setup filament-odk-link package as submodule.
  4. Follow filament-odk-link package readme file in Github

Questions:

  1. How to publish migration files from submodule?

Screen shots:

image

dan-tang-ssd commented 2 weeks ago

Here are some instructions for future reference.

For setting up submodule, after editing composer.json, needs to run comamnd "composer update" to actually install submodule to main repo. After running "composer update", follow filament-odk-link package readme file in Github to publish migration files, config file and views.

dan-tang-ssd commented 2 weeks ago

To add XlsformTemplate resource in admin panel, we need to add Model::unguard() in AppServiceProvider. So that filament-odk-link XlsformTemplate model can be created successfully.

To debug an error when creating a new Xlsform Template, install telescope, remove "livewire" from "ignore_paths" in config/telescope. HTTP requests sent from livewire to ODK central will be showed in telescope HTTP Client page.

Response from ODK central should update xlsform_templates.odk_id, which will be put between "forms" and "draft" in below link for ODK draft form:

without xlsform_templates.odk_id https://odk-test.stats4sdtest.online/v1/projects/924/forms//draft/fields?odata=true

with xlsform_templates.odk_id https://odk-test.stats4sdtest.online/v1/projects/924/forms/t30/draft/fields?odata=true


Screen shots:

image