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

Abdel log requested time off for blue squares #1471

Merged

Conversation

abdel-lall
Copy link
Contributor

@abdel-lall abdel-lall commented Oct 29, 2023

Description

1. Create a way to log requested time off for blue squares

a. Admin Login → Other Links → User Management → Need input option here
i. Should be an icon or other indicator in a column to the right of the “Pause” column
ii. Should allow me to input a person’s reason for requesting time off
iii. Should have the default date of the date of entry, but editable
iv. Should have the default time as 1 week to apply the reason, but be editable in case the reason is for multiple weeks

  1. Should expire/not apply again after the # of weeks input
    v. Need a way to set this to only apply for a future date if needed: Usually people request time off the week before but sometimes they request time off weeks in advance. So I need a way to indicate the function is not “active” until XX/XX date.
    vi. Should NOT stop them from getting a blue square. Instead, should function to add their reason and the date they stated it/requested the time off to their blue square email and square(s) when they get it:
  2. The blue square notice should still be mostly the same, but include: “XX/XX Request made for time off stating: “<whatever the Admin/Owner inputs>”
  3. This information should be reflected on their blue square added to their Profile Page too
  4. This should be conditional, meaning it should only apply these details IF they meet the requirements for getting a blue square
    vii. Needs permission on the Permissions Management page
    b. This is all needed because right now I input requests like this into my calendar and then have to go in each week and add the reasons manually. It takes time, only I can do it, and people don’t get any notice when I do this.

2. Create a Blue Square Reason Scheduler (This is a new function request)

a. If I know in advance that someone is going to get a blue square, I need a way to input it in their profile so that when the blue square is issued by the system, their reason is included/applied in a format that looks like this: 5/15 “Have family emergency and won’t be able to complete my hours”
i. I currently track this with my calendar and input the reasons on Sunday morning. This is time consuming and inefficient. It also won’t work with 200+ people being managed by people other than me.
ii. Date issued should default to the date I’m entering the above information but be editable
iii. Need a way to indicate to Manager/Mentor/Admin/Owner classes that the person has added a reason for b1eing gone that week and so they can see what that reason is.

  1. I’m thinking that making their name gray on the Leaderboard would be good.
  2. I think an easy way for them to see what the reason is would be to give them a blue square of a different color and apply it in advance so it can be viewed. Then when the system applies the blue square, it will change to the usual blue color
    iv. Their reason should be included in the email they get for the blue square Saturday night
    v. I should be able to schedule as many of these and for as far into the future as possible
    vi. 9/4 update: I was just looking at the details here again and I think and easiest way to do this all, since I’ll be the only one adding them for now, and then certain individuals given the permission in the future, would be to:
  3. Just/only allow them to be scheduled for a specific Sunday
  4. Show the ones already scheduled whenever someone opens that modal
  5. Not allow more than one to be scheduled for any Sunday
    b. It would also like to add a strikethrough to their name on the Leaderboard for the duration of the time they say they are going to be gone. This will remind anyone who sees that that person is not available.

Related PRS:

This frontend PR is related to the #592 backend PR.

How to test:

check into current branch

Test1: permissions:

permissions.mp4

Test2: add / update/ delete time-off requests

add-edit-delete.mp4

Test3: Indicators

Indicators.mp4

Test4: Blue square reason

Blue.square.reason.mp4

@ptrpengdev
Copy link
Contributor

Hi @abdel-lall , I tested the PR, and it worked as expected.

Verified: Permission message displayed.
image

  • Update User Permission on Time Off Req
    image

  • Add Time Off Request
    image

  • Edit Time Off Request
    image

  • Deletion
    image

Copy link
Contributor

@this-journey this-journey left a comment

Choose a reason for hiding this comment

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

Hello! I was attempting to complete the PR review, but ran into an issue where it isn't allowing me to save the request. I have attached a video for reference. Permissions is working as expected. I am receiving the proper errors for various scenarios, but it won't allow me to save the request.

PR.1471+592.mov

Copy link

@pika-chu11 pika-chu11 left a comment

Choose a reason for hiding this comment

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

Hi @abdel-lall , I have tested you PRs.
Here is the result:

  1. Time Request Function:
  • Log in as Owner

  • Under the "Other Link" -> "User Management"

    • I was able to Click the blue button on the column of "Requested Time Off" and it pops a popup asking for the Time off Request info(Date of leave, Duration of weeks, and reason).
    • I was unable to save the Time off Request after I filled out all the info. (I have tried changing the Date of leave/ Duration in weeks, but it was still unable to save).
  • Under the "Other Links" -> "Permissions Management"

    • I was able to assign the permission to the user.
  1. Permission Testing
  • Log in as Admin
    • Initially, I don't have the permission to request time off as expected.
    • After permission assigned by the Owner account, the popup "Add New Time Off Request" shows as the Owner side.
      • But the popup had the same issue as above described in Owner account. (Could not save the request).

Please watch the video for more details:

PR.1471.+.592.mp4

@abdel-lall
Copy link
Contributor Author

Hello @pika-chu11 @this-journey Add/Remove "Manage Time Off Requests" permission shouldn't be allowed for owner accounts. The Owner should have all the permissions. I added "Manage Time Off Requests" as Role permission to the Owner. Could you please test it again when you have a moment?

pshereen
pshereen previously approved these changes Jan 19, 2024
Copy link
Contributor

@pshereen pshereen left a comment

Choose a reason for hiding this comment

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

I logged as admin, I tried to take "Requested Time Off" but was not allowed.
Screenshot 2024-01-18 213947

Then I logged in as owner and gave permission for admin to "Manage Time Off Requests".
Logged in as admin, and admin was able to manage time off requests.

HGN.APP.1.mp4

Also admin was able to edit and delete time off requests.

HGN.APP.3.mp4

The time off request was showing on the dashboard.

HGN.APP.2.mp4

However, owner was not able to give time off and I assume it is meant to be like that. When I tried to give time off using owner account it was not getting saved, and no warning message was shown saying "You do not have permission to manage time-off requests." It will be better if the warning message was shown while owner tried to give time off.

Copy link
Contributor

@Sophie-lei Sophie-lei left a comment

Choose a reason for hiding this comment

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

Hey ! I test the PR for both BE and FE.
case 1
the permission working as expected. I logged in as a admin role.
Screenshot 2024-01-20 at 17 39 33
after allowing the request time off permission.

Screen.Recording.2024-01-20.at.17.41.51.mov

case 2 the edit/update/delete all works very well
https://github.com/OneCommunityGlobal/HighestGoodNetworkApp/assets/70113822/0424b69b-6e1e-4012-9671-f74d494561df
case 3 the indicater is also working as discribe.
Screenshot 2024-01-20 at 18 57 18
Screenshot 2024-01-20 at 18 57 01
case 4 This one has some problems for me. After I entered my email "sophie.leiyixiao@gmail" into the file as described . There is no email shown to my gmail account after I created the time off including today week.
Screenshot 2024-01-20 at 19 59 07
Screenshot 2024-01-20 at 19 57 53
Screenshot 2024-01-20 at 19 56 44
Screenshot 2024-01-20 at 19 58 30

Copy link

@X1aoZhang99 X1aoZhang99 left a comment

Choose a reason for hiding this comment

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

Hello Abdel,

I've recently tested your PR, and in addition to the issue mentioned by @Sophie-lei , I've noticed another minor problem. When I logged in as the owner, I found that while I could edit the Requested Time Off, I was unable to save the changes, which seems counterintuitive compared to the admin user's functionality. Please refer to the attached video.

Screen.Recording.2024-01-22.at.15.11.28.mov

Copy link
Contributor

@Renanluizssx Renanluizssx left a comment

Choose a reason for hiding this comment

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

Hi @abdel-lall, I logged in as the owner and navigated to Permissions Management. I enabled the admin account and successfully added the time off request, which worked well. However, I encountered an issue as I couldn't see the team members. Additionally, after adding the time off request, I didn't receive an email notification, despite following your steps to configure both the front-end and back-end. Here's a summary of my actions

2024-01-23-08-47-38.mov

Copy link

@SRamen1999 SRamen1999 left a comment

Choose a reason for hiding this comment

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

I've recently tested your PR. There are some problems I have encountered.

Firstly an owner account can give manage time off requests permissions and edit time off requests. But cannot make new time off requests.

Screen.Recording.2024-01-24.at.6.19.16.PM.mov

Admin accounts are able to edit and delete time off requests when given permission.

Screen.Recording.2024-01-24.at.6.09.39.PM.mov

Another issue I encountered is the time off request was not showing on the dashboard or any of the icons.
Screen Shot 2024-01-24 at 6 47 46 PM

Screen Shot 2024-01-24 at 6 45 09 PM

Lastly I didn't receive an email notification after following your instructions.
Screen Shot 2024-01-24 at 7 18 03 PM

Screen Shot 2024-01-24 at 7 14 46 PM Screen Shot 2024-01-24 at 7 14 30 PM Screen Shot 2024-01-24 at 7 14 09 PM

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.

10 participants