Closed RihanaE closed 3 months ago
This is great! I will give a few comments here.
Can we add the level and group?
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
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.
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.
Added level and group
@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
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.
Hey @RihanaE Any update on this?
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.
Alright, I will handle the rest from now on.
✅ Deploy Preview for public-dashboard ready!
Toggle QR Code...
Use your smartphone camera to open QR code link.
To edit notification comments on pull requests, go to your Netlify site configuration.