HABTec / public-dashboard

0 stars 1 forks source link

Added OrgUnit Filter Component #22

Closed RihanaE closed 3 months ago

netlify[bot] commented 3 months ago

Deploy Preview for public-dashboard ready!

Name Link
Latest commit 98c1e4a278fcf615062f580fcb35ade5f2c7f65d
Latest deploy log https://app.netlify.com/sites/public-dashboard/deploys/668513521e73ab0008eaa1a9
Deploy Preview https://deploy-preview-22--public-dashboard.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

redet-G commented 3 months ago

This is great! I will give a few comments here.

redet-G commented 3 months ago

Can we add the level and group? image

redet-G commented 3 months ago

OrgUnit group API https://hmis-staging.moh.gov.et/api/organisationUnitGroups?paging=false Organisation Unit level API https://hmis-staging.moh.gov.et/api/organisationUnitLevels

RihanaE commented 3 months ago

There is CORS (Cross-Origin Resource Sharing) policy issue.

“ Access to fetch at 'https://hmis-staging.moh.gov.et/dhis-web-commons/security/login.action' (redirected from 'https://hmis-staging.moh.gov.et/api/organisationUnitGroups?paging=false') from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. "

On 26 Jun 2024, at 09:57, Redet Getachew @.***> wrote:

OrgUnit group API https://hmis-staging.moh.gov.et/api/organisationUnitGroups?paging=false Organisation Unit level API https://hmis-staging.moh.gov.et/api/organisationUnitLevels

— Reply to this email directly, view it on GitHub https://github.com/HABTec/public-dashboard/pull/22#issuecomment-2190955647, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2QWLTARKFKZYF2MXBQWPI3ZJJQ57AVCNFSM6AAAAABJ3OXYN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJQHE2TKNRUG4. You are receiving this because you authored the thread.

RihanaE commented 3 months ago

Leave it. I change the base api and it works.

On 26 Jun 2024, at 10:32, Rihana Ersanu @.***> wrote:

There is CORS (Cross-Origin Resource Sharing) policy issue.

“ Access to fetch at 'https://hmis-staging.moh.gov.et/dhis-web-commons/security/login.action' (redirected from 'https://hmis-staging.moh.gov.et/api/organisationUnitGroups?paging=false') from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. "

On 26 Jun 2024, at 09:57, Redet Getachew @.***> wrote:

OrgUnit group API https://hmis-staging.moh.gov.et/api/organisationUnitGroups?paging=false Organisation Unit level API https://hmis-staging.moh.gov.et/api/organisationUnitLevels

— Reply to this email directly, view it on GitHub https://github.com/HABTec/public-dashboard/pull/22#issuecomment-2190955647, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2QWLTARKFKZYF2MXBQWPI3ZJJQ57AVCNFSM6AAAAABJ3OXYN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJQHE2TKNRUG4. You are receiving this because you authored the thread.

RihanaE commented 3 months ago

Added level and group

redet-G commented 3 months ago

@RihanaE Can you find a way to memorize the request results and not fetch them from the API every time we reexpand the tree items? perhaps we may use useMemo hook

RihanaE commented 3 months ago

Okay I will

On 26 Jun 2024, at 15:23, Redet Getachew @.***> wrote:

@RihanaE https://github.com/RihanaE Can you find a way to memorize the request results and not fetch them from the API every time we reexpand the tree items? perhaps we may use useMemo hook

— Reply to this email directly, view it on GitHub https://github.com/HABTec/public-dashboard/pull/22#issuecomment-2191557080, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2QWLTGW5IZQVMNYO6KJPQ3ZJKXFLAVCNFSM6AAAAABJ3OXYN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJRGU2TOMBYGA. You are receiving this because you were mentioned.

redet-G commented 3 months ago

Hey @RihanaE Any update on this?

RihanaE commented 3 months ago

I added a way to memorise the request result by using useMemo and I am waiting your review feedback.

On 1 Jul 2024, at 15:30, Redet Getachew @.***> wrote:

Hey @RihanaE https://github.com/RihanaE Any update on this?

— Reply to this email directly, view it on GitHub https://github.com/HABTec/public-dashboard/pull/22#issuecomment-2200020541, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2QWLTBR6H6VAT3VYEUYCRDZKFDYFAVCNFSM6AAAAABJ3OXYN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBQGAZDANJUGE. You are receiving this because you were mentioned.

redet-G commented 3 months ago

Alright, I will handle the rest from now on.