Skip to content
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

WMR RD View Setup #2387

Merged
merged 3 commits into from
Oct 10, 2024
Merged

WMR RD View Setup #2387

merged 3 commits into from
Oct 10, 2024

Conversation

Mrand03
Copy link

@Mrand03 Mrand03 commented Oct 8, 2024

Changes made in PR:

  • Changed the housing index.jsx to go to the RD View only if you are faculty ( We can change this when we make a group for RD's).
  • Created an RDView folder within the housing/components folder. This new folder is where all of the RDView components will go as well as where the index.jsx for the RD View is.
  • Created a card to edit documents in he RD View which has links to SharePoint and our room range program, as well as a dialog box that pops up when you click the edit button next to "RA/AC Task List". The code for the edit button is in a folder within RDView called components which will hold any components needed for the RD View.
  • The code to edit tasks is just the dialog box that pops up, you cannot type anything yet.

Copy link
Contributor

@dli505 dli505 left a comment

Choose a reason for hiding this comment

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

Yay Mya this looks really great! I added some quick comments, and if you could paste a screenshot of what the screen looks like that would look really awesome!

</Grid>
);
const Housing = () => {
const isFaculty = useAuthGroups(AuthGroup.Faculty);
Copy link
Contributor

Choose a reason for hiding this comment

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

I have an isFacStaff function that we can import...
import { Profile as profileType, isFacStaff as checkIsFacStaff } from 'services/user';
Hopefully this works?

const Housing = () => {
const isFaculty = useAuthGroups(AuthGroup.Faculty);

if (isFaculty) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If it does work then this would be isFacStaff instead I think

Again not sure if it does work but worth a try? If not then we can use the auth groups

const [open, setOpen] = useState(false);

return (
<div>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think in React instead of using divs we just use empty jsx fragments, like
<></>

@Mrand03
Copy link
Author

Mrand03 commented Oct 9, 2024

Hi Danya,

Thank you for your suggestions! I changed how we check if the user is faculty to what you suggested and it worked so we can use it. I also changed the div to <> </> and it caused no issues. Let me know if you have any other suggestions!

Copy link
Contributor

@dli505 dli505 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@dli505 dli505 changed the title RD View Setup WMR RD View Setup Oct 10, 2024
@dli505 dli505 merged commit b98b362 into gordon-cs:wheres-my-ra Oct 10, 2024
1 check passed
@Mrand03 Mrand03 self-assigned this Nov 12, 2024
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.

2 participants