[#40] Bulk PDF export - frontend #91

Merged
mattn merged 1 commit from matt/40-batch-frontend into main 2023-02-22 16:41:48 +13:00
mattn commented 2023-02-21 17:03:37 +13:00 (Migrated from gitlab.catalyst.net.nz)
  • Attempts to make the existing components more reusable
  • Adds react-router to support / and /apply routes
  • / endpoint is existing functionality that provides tabular results at the end of its questionnaire
  • /apply endpoint is a modified questionnaire that submits the form to the backend for an admin to perform a bulk PDF export
  • The initial goal was to be able to add multiple habitats/zones in a single questionnaire but I've had to cut this due to our budget shrinking
* Attempts to make the existing components more reusable * Adds react-router to support / and /apply routes * / endpoint is existing functionality that provides tabular results at the end of its questionnaire * /apply endpoint is a modified questionnaire that submits the form to the backend for an admin to perform a bulk PDF export * The initial goal was to be able to add multiple habitats/zones in a single questionnaire but I've had to cut this due to our budget shrinking
mattn commented 2023-02-21 17:03:37 +13:00 (Migrated from gitlab.catalyst.net.nz)

assigned to @satoshi

assigned to @satoshi
satoshi commented 2023-02-22 14:46:09 +13:00 (Migrated from gitlab.catalyst.net.nz)

FilterContext not used outside this file, probably no need to export?

FilterContext not used outside this file, probably no need to export?
satoshi commented 2023-02-22 14:46:10 +13:00 (Migrated from gitlab.catalyst.net.nz)

StepContext not used outside this file, probably no need to export?

StepContext not used outside this file, probably no need to export?
satoshi commented 2023-02-22 14:46:10 +13:00 (Migrated from gitlab.catalyst.net.nz)

backVisible, nextVisible are not used (not passed as props in the component rendering), can be deleted?

`backVisible`, `nextVisible` are not used (not passed as props in the component rendering), can be deleted?
satoshi commented 2023-02-22 14:46:10 +13:00 (Migrated from gitlab.catalyst.net.nz)

There are some mismatches between file name, component name, and imported name e.g. this component is Map in its definition but imported as LocationSelectorMap here.

Not necessarily in this MR but it would be nice if they're fixed.

There are some mismatches between file name, component name, and imported name e.g. this component is `Map` in its definition but imported as `LocationSelectorMap` here. Not necessarily in this MR but it would be nice if they're fixed.
satoshi commented 2023-02-22 14:46:10 +13:00 (Migrated from gitlab.catalyst.net.nz)

Should be deleted if this is out of scope for this commit?

Should be deleted if this is out of scope for this commit?
satoshi commented 2023-02-22 14:46:11 +13:00 (Migrated from gitlab.catalyst.net.nz)

So /apply endpoint is for posting a single questionnaire and not bulk?

So /apply endpoint is for posting a single questionnaire and not bulk?
mattn commented 2023-02-22 15:13:11 +13:00 (Migrated from gitlab.catalyst.net.nz)

Yeah, sorry for my wording here. /apply endpoint is for posting a single questionnaire which persists in the backend. / is the existing endpoint and has no backend persistence (only GETs relevant data).

Yeah, sorry for my wording here. /apply endpoint is for posting a single questionnaire which persists in the backend. / is the existing endpoint and has no backend persistence (only GETs relevant data).
mattn commented 2023-02-22 15:14:15 +13:00 (Migrated from gitlab.catalyst.net.nz)

You're right. I will move this to another branch

You're right. I will move this to another branch
mattn commented 2023-02-22 15:21:44 +13:00 (Migrated from gitlab.catalyst.net.nz)

They're used on L52 and L53

const showBack = typeof(backVisible) === "boolean" ? backVisible : isStep(step - 1);
const showNext = typeof(nextVisible) === "boolean" ? nextVisible : isStep(step + 1);

and those vars are subsequently used for rendering, which I think is ok?

They're used on L52 and L53 ```javascript const showBack = typeof(backVisible) === "boolean" ? backVisible : isStep(step - 1); const showNext = typeof(nextVisible) === "boolean" ? nextVisible : isStep(step + 1); ``` and those vars are subsequently used for rendering, which I think is ok?
mattn commented 2023-02-22 15:23:02 +13:00 (Migrated from gitlab.catalyst.net.nz)

Will make a note in case there's more funding :)

Will make a note in case there's more funding :)
mattn commented 2023-02-22 15:24:01 +13:00 (Migrated from gitlab.catalyst.net.nz)

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/giscore/biosphere-capital/right-tree/-/merge_requests/46/diffs?diff_id=187410&start_sha=13903b287db6beaef85f6634464ca7ad9af2ea20#e94f7a7ba65a2151583c94da5043ecd46abe8ba0_35_35)
mattn commented 2023-02-22 15:24:01 +13:00 (Migrated from gitlab.catalyst.net.nz)

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/giscore/biosphere-capital/right-tree/-/merge_requests/46/diffs?diff_id=187410&start_sha=13903b287db6beaef85f6634464ca7ad9af2ea20#6a062dc454ebd5437c6d7e11040aa6939f16c52a_102_102)
mattn commented 2023-02-22 15:24:03 +13:00 (Migrated from gitlab.catalyst.net.nz)

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/giscore/biosphere-capital/right-tree/-/merge_requests/46/diffs?diff_id=187410&start_sha=13903b287db6beaef85f6634464ca7ad9af2ea20#b62d2cf6cc9d30862bed0f30539cb276af7ece88_58_50)
mattn commented 2023-02-22 15:24:04 +13:00 (Migrated from gitlab.catalyst.net.nz)

added 1 commit

  • c4ad0b6e - [#40] Bulk PDF export

Compare with previous version

added 1 commit <ul><li>c4ad0b6e - [#40] Bulk PDF export</li></ul> [Compare with previous version](/giscore/biosphere-capital/right-tree/-/merge_requests/46/diffs?diff_id=187410&start_sha=13903b287db6beaef85f6634464ca7ad9af2ea20)
satoshi commented 2023-02-22 15:37:58 +13:00 (Migrated from gitlab.catalyst.net.nz)

How does a user land on /apply page? It doesn't seem to have a link within the app. Presumably user who wants to use that form gets notified of the url?

How does a user land on `/apply` page? It doesn't seem to have a link within the app. Presumably user who wants to use that form gets notified of the url?
satoshi commented 2023-02-22 15:45:34 +13:00 (Migrated from gitlab.catalyst.net.nz)

Yeah they are used in this component but those props are not actually passed i.e. there are no *Step component that does

<StepperFooter nextVisible={false} />
Yeah they are used in this component but those props are not actually passed i.e. there are no `*Step` component that does ``` <StepperFooter nextVisible={false} /> ```
mattn commented 2023-02-22 15:52:52 +13:00 (Migrated from gitlab.catalyst.net.nz)

From my understanding, users are given the URL in a physical leaflet. Authorization for that endpoint is out-of-scope.

From my understanding, users are given the URL in a physical leaflet. Authorization for that endpoint is out-of-scope.
mattn commented 2023-02-22 16:03:24 +13:00 (Migrated from gitlab.catalyst.net.nz)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/giscore/biosphere-capital/right-tree/-/merge_requests/46/diffs?diff_id=187426&start_sha=c4ad0b6e99fe8e4a83e70375bf4e7c9924b98764#6a062dc454ebd5437c6d7e11040aa6939f16c52a_47_47)
mattn commented 2023-02-22 16:03:26 +13:00 (Migrated from gitlab.catalyst.net.nz)

added 1 commit

  • f33793d7 - [#40] Bulk PDF export

Compare with previous version

added 1 commit <ul><li>f33793d7 - [#40] Bulk PDF export</li></ul> [Compare with previous version](/giscore/biosphere-capital/right-tree/-/merge_requests/46/diffs?diff_id=187426&start_sha=c4ad0b6e99fe8e4a83e70375bf4e7c9924b98764)
mattn commented 2023-02-22 16:03:51 +13:00 (Migrated from gitlab.catalyst.net.nz)

Ah I understand now. Have now removed a few of the unused arguments 👍

Ah I understand now. Have now removed a few of the unused arguments :thumbsup:
satoshi commented 2023-02-22 16:39:44 +13:00 (Migrated from gitlab.catalyst.net.nz)

resolved all threads

resolved all threads
satoshi commented 2023-02-22 16:40:07 +13:00 (Migrated from gitlab.catalyst.net.nz)

Thanks, LGTM!

Thanks, LGTM!
satoshi commented 2023-02-22 16:40:10 +13:00 (Migrated from gitlab.catalyst.net.nz)

approved this merge request

approved this merge request
mattn commented 2023-02-22 16:41:24 +13:00 (Migrated from gitlab.catalyst.net.nz)

added 2 commits

Compare with previous version

added 2 commits <ul><li>3f9f816a - 1 commit from branch <code>main</code></li><li>9ac545a6 - [#40] Bulk PDF export</li></ul> [Compare with previous version](/giscore/biosphere-capital/right-tree/-/merge_requests/46/diffs?diff_id=187445&start_sha=f33793d746dbb945d68a3e5862c036f2ebad0f29)
mattn commented 2023-02-22 16:41:33 +13:00 (Migrated from gitlab.catalyst.net.nz)

Awesome, thanks for the feedback Satoshi

Awesome, thanks for the feedback Satoshi
mattn commented 2023-02-22 16:41:35 +13:00 (Migrated from gitlab.catalyst.net.nz)

resolved all threads

resolved all threads
mattn (Migrated from gitlab.catalyst.net.nz) merged commit into main 2023-02-22 16:41:48 +13:00
satoshi (Migrated from gitlab.catalyst.net.nz) approved these changes 2024-12-18 08:20:26 +13:00
Sign in to join this conversation.
No description provided.