10000 feat: add facilities feature by TCMeldrum · Pull Request #1020 · UserOfficeProject/user-office-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add facilities feature #1020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 28 commits into
base: develop
Choose a base branch
from
Draft

feat: add facilities feature #1020

wants to merge 28 commits into from

Conversation

TCMeldrum
Copy link
Contributor
@TCMeldrum TCMeldrum commented Apr 3, 2025

Description

This PR introduces the facilities feature to the application.

Motivation and Context

This feature was added to handle the association between users, instruments and facilities. It helps to streamline the assignment of users to specific facilities and instruments, improving the management and allocation of resources within the application.

Changes

  1. Added new tables to the database for handling the relationships between facilities, instruments and users.
  2. Added new data sources for facilities and updated the existing ones for proposals and reviews to accommodate the new feature.
  3. Updated the authorization classes to include the new facility role and its permissions.

How Has This Been Tested?

Fixes Jira Issue

https://jira.esss.lu.se/browse/

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@TCMeldrum TCMeldrum requested a review from a team as a code owner April 3, 2025 15:00
@TCMeldrum TCMeldrum requested review from ACLay and removed request for a team April 3, 2025 15:00
@jekabs-karklins jekabs-karklins self-requested a review April 4, 2025 09:38
@TCMeldrum TCMeldrum marked this pull request as draft April 7, 2025 13:15
@TCMeldrum TCMeldrum changed the title Facility feature wip feat: add facilities fearture Apr 11, 2025
@TCMeldrum TCMeldrum marked this pull request as ready for review April 15, 2025 10:51
Copy link
Contributor
@jekabs-karklins jekabs-karklins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tired running it locally, but the http://localhost:3000/Facility seems not to load
image
There is also no error in the console.

But I have a question
Is it intended that all users have at leas one facility?

const isAuthor = review.userID === agent?.id;
if (isAuthor) {
return true;
}

const currentRole = agent?.currentRole?.shortCode;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that currentRole is not used

@@ -494,6 +494,34 @@ export default class PostgresCallDataSource implements CallDataSource {

return records.map(createCallObject);
}

async getCallsByFacilityMember(user: number): Promise<Call[]> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be named userId, to be easier to differentiate from user object

@TCMeldrum
Copy link
Contributor Author

Right now it is set up so you have to be added to a facility to have one. Im not quiet sure how a deafult facility would work, at least for us. How would you see it working?

@jekabs-karklins
Copy link
Contributor

Right now it is set up so you have to be added to a facility to have one. Im not quiet sure how a deafult facility would work, at least for us. How would you see it working?

@TCMeldrum Would you be up for a quick catch-up call on Monday/Tuesday with me and @yoganandaness regarding this PR ?

@jekabs-karklins jekabs-karklins changed the title feat: add facilities fearture feat: add facilities feature Apr 25, 2025
@TCMeldrum
Copy link
Contributor Author

Right now it is set up so you have to be added to a facility to have one. Im not quiet sure how a deafult facility would work, at least for us. How would you see it working?

@TCMeldrum Would you be up for a quick catch-up call on Monday/Tuesday with me and @yoganandaness regarding this PR ?

Yeah sure, I'm free monday afternoon and all day Tuesday

@jekabs-karklins
Copy link
Contributor
jekabs-karklins commented Apr 28, 2025

Right now it is set up so you have to be added to a facility to have one. Im not quiet sure how a deafult facility would work, at least for us. How would you see it working?

@TCMeldrum Would you be up for a quick catch-up call on Monday/Tuesday with me and @yoganandaness regarding this PR ?

Yeah sure, I'm free monday afternoon and all day Tuesday

Hi @TCMeldrum would you be able for a quick chat tomorrow 10.00-10.30 CEST ?
https://teams.microsoft.com/l/meetup-join/19%3ameeting_NWYzYmEyZjYtNTRhYy00NmRkLWFiMzMtNzZiMTRmMWZjNDY0%40thread.v2/0?context=%7b%22Tid%22%3a%22a9ead30c-5c0f-4c3b-af05-d9e685cccc43%22%2c%22Oid%22%3a%222564168a-db9b-498b-831d-1ac8bb7a8670%22%7d

I have added a meeting, but let me know if I need to push it. Thanks

@TCMeldrum
Copy link
Contributor Author

Should be fine see you then

@yoganandaness
Copy link
Contributor
yoganandaness commented Apr 30, 2025

@TCMeldrum General question. Does a Facility Member need to be an Instrument Scientist as well in order to get assigned to a Facility?

@TCMeldrum
Copy link
Contributor Author

@TCMeldrum General question. Does a Facility Member need to be an Instrument Scientist as well in order to get assigned to a Facility?

Right now there is no validation on roles in order to be assigneded to a facility. For us I don't think all the people who will be assigned to facility will be instrument scientists just most of them.

@TCMeldrum
Copy link
Contributor Author

@yoganandaness @jekabs-karklins Any updates sorry?

@yoganandaness
Copy link
Contributor

@yoganandaness @jekabs-karklins Any updates sorry?

Hi. We have passed in the information to our User Officer Carina. She will be taking this up and get back to us. We will know if we find any refined approach once she gets back to us.

@TCMeldrum
Copy link
Contributor Author

@yoganandaness We have a call opening on the 20th which we would like this change for. If you think that we won't be able to get this in time then I have work around I would need to add that can be removed later.

@yoganandaness
Copy link
Contributor

@yoganandaness We have a call opening on the 20th which we would like this change for. If you think that we won't be able to get this in time then I have work around I would need to add that can be removed later.

Sure. I see the PR. Let me know once the PR is ready for review. I am extremely sorry for the inconvenience.

@TCMeldrum TCMeldrum marked this pull request as draft May 20, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0