ohc.networkContributors

Personal Learning Dashboard (Beta)

ayush-seth

Ayush Seth

Contributor

Graduate attribute
Graduate attribute
Graduate attribute
Graduate attribute
Graduate attribute
Graduate attribute
Graduate attribute
Graduate attribute
Graduate attribute
Graduate attribute
Graduate attribute
Graduate attribute
Graduate attribute
Graduate attribute

Graduate Attributes

Learn More

Individual Skills

Graduate attribute

Creative thinking

Graduate attribute

Problem Solving

Graduate attribute

Practical/Professional Skills

Team Skills

Graduate attribute

Communication Skills

Graduate attribute

Collaboration

Graduate attribute

Community Engagement

Graduate attribute

Leadership

Graduate attribute

Learn How to Learn

Graduate attribute

Skills to apply digital & technology solutions

Graduate attribute

Critical Thinking

Advanced Skills

Graduate attribute

Autonomy And Responsibility

Graduate attribute

Empathy

Graduate attribute

Value inculcation

Graduate attribute

Multicultural Competence

Cultural Skills

Short Bio

Still waiting for this

Learning Activity

MonWedFriJulAugSepOctNovDecJanFebMarAprMayJun
16 contributions in the last year
LessMore

Highlights

Pull Request
3
Reviews
2
Feed
0

Contributions

  • reviewed a pull request on coronasafe/care_fe
  • reviewed a pull request on coronasafe/care_fe
  • opened a pull request on coronasafe/care_fe
  • merged a pull request on coronasafe/care_fe
    https://github.com/coronasafe/care_fe/pull/6663
  • pr_collaborated
    show delete user button only for stateAdmin
    November 22, 2023 at 3:35:47 AM
  • Shared a comment on an issue in coronasafe/care_fe on November 21, 2023 at 9:08:08 PM

    Is this up for grabs? How should the UI look?

    https://github.com/coronasafe/care_fe/issues/6684#issuecomment-1821681798

  • opened a pull request on coronasafe/care_fe
    Hide location filter unless facility is selectedNovember 21, 2023 at 10:10:18 AM
  • Shared a comment on an issue in coronasafe/care_fe on November 20, 2023 at 9:01:09 PM

    I need more info to work here, are we talking about the `Location` input in this section in the `Patients` page? - What does it mean "only one facility is selected"? Where do I select the facility? - "Make the location filter appear...", should the whole `Geography` section be hidden? or just the `Location` input? <img width="1497" alt="image" src="https://github.com/coronasafe/care_fe/assets/24858182/51e2a9dd-3000-4ee6-b6f9-e51b4b5fcc81">

    https://github.com/coronasafe/care_fe/issues/6671#issuecomment-1819797021

  • Shared a comment on an issue in coronasafe/care_fe on November 20, 2023 at 1:16:20 PM

    I would like to take it up

    https://github.com/coronasafe/care_fe/issues/6671#issuecomment-1819046772

  • Shared a comment on an issue in coronasafe/care_fe on November 18, 2023 at 9:54:48 AM

    This is a bigger problem at its core with how route protection and login is being handled and just replacing `window.location.href =` with `navigate()` is not going to solve these issues. For ex. when I am logged out and I navigate to `/shifting/board`, instead of being redirected to `/login` I stay on `/shifting/board` and in those cases, after logging in, it does `window.location.href = window.location.pathname.toString()`, using `navigate` here won't do anything because the path does not change, you have to reload the whole page. Same goes for any other url.

    https://github.com/coronasafe/care_fe/issues/6665#issuecomment-1817463174

  • Shared a comment on an issue in coronasafe/care_fe on November 18, 2023 at 9:40:06 AM

    Any reason this project is using [raviger](https://github.com/kyeotic/raviger) which barely anyone has ever heard of and has not been updated since 2022 instead of using the industry standard [React Router](https://github.com/remix-run/react-router)?

    https://github.com/coronasafe/care_fe/issues/6665#issuecomment-1817458427

  • Shared a comment on an issue in coronasafe/care_fe on November 17, 2023 at 4:36:46 PM

    I can pick this up if still required

    https://github.com/coronasafe/care_fe/issues/6503#issuecomment-1816739173

  • Shared a comment on an issue in coronasafe/care_fe on November 17, 2023 at 4:33:21 PM

    @rithviknishad is this under the same category? Only state admin should see this button?

    https://github.com/coronasafe/care_fe/issues/6608#issuecomment-1816734216

  • opened a pull request on coronasafe/care_fe
    show delete user button only for stateAdminNovember 17, 2023 at 4:10:33 PM
  • Shared a comment on an issue in coronasafe/care_fe on November 17, 2023 at 3:49:18 PM

    cool, I can take this up. Can you assign it to me? @rithviknishad

    https://github.com/coronasafe/care_fe/issues/6660#issuecomment-1816668248

  • Shared a comment on an issue in coronasafe/care_fe on November 17, 2023 at 3:06:48 PM

    This is the function that controls the visibility of the delete button ```typescript const showDelete = (user: any) => { const STATE_ADMIN_LEVEL = USER_TYPES.indexOf("StateAdmin"); const STATE_READ_ONLY_ADMIN_LEVEL = USER_TYPES.indexOf("StateReadOnlyAdmin"); const DISTRICT_ADMIN_LEVEL = USER_TYPES.indexOf("DistrictAdmin"); const level = USER_TYPES.indexOf(user.user_type); const currentUserLevel = USER_TYPES.indexOf(authUser.user_type); if (user.is_superuser) return true; if (currentUserLevel >= STATE_ADMIN_LEVEL) return user.state_object?.id === authUser.state; if ( currentUserLevel < STATE_READ_ONLY_ADMIN_LEVEL && currentUserLevel >= DISTRICT_ADMIN_LEVEL && currentUserLevel > level ) return facilityData?.district_object_id === authUser.district; return false; }; ``` Reproducing the issue, I can see that the delete button is visible because the 3rd `if` condition is evaluating to `true` which because `currentUserLevel > level` which implies that the `authUser` should be able to delete `user` and they also belong to the same `district`. Which makes me think something is wrong on the backend here? Since the logic for showing the button seems to be right. How can I find out why exactly the backend API is failing?

    https://github.com/coronasafe/care_fe/issues/6660#issuecomment-1816593105

More to come in the coming days...!