-
Notifications
You must be signed in to change notification settings - Fork 35
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
B 21966 add rejected admin int #14694
base: integrationTesting
Are you sure you want to change the base?
Conversation
…arness and add ui.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I just finished some work for the requested office users and searching by transpo office (which is a requirement for this feature as well I see) and ran into searching nested object values through FetchMany
not being possible. Had to refactor.
Could you look at this PR and see how I did the list function and copy that over (except for change the status from REQUESTED
to REJECTED
)? I just don't want the next dev to have to refactor it when it could be tackled in this one.
Also, I don't think you need the deleted_on
column. We are hard deleting users, not soft.
Thoughts? Def welcome to hear them!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testing: success
code: looks good, but have comments
Ahh okay I'll get rid of the deleted_on column. But for the transportationOffice search we took that off the feature AC because Paul was gonna add it to a new feature(E-06352) to be handled. I want to say I can just add your changes to my PR here but we had a whole meeting about it so before I say yes let me just get some guidance from my scrum master. I think we can either add a new story to handle it on this feature or just add it on to this story's AC. |
…-dest-move B-22480 - fix issue with null Prime API call and AK destination moves
…tRequestIDInUseErrorFix B 22271 main office user account request id in use error fix
yea changing the font to match the others definitely cut out a good chunk of the white space. I removed those unused functions too. Idk what I was talking about earlier saying the testharness uses them because they don't lol But I was also just having issues with my environment lol |
One thing I saw while testing the functionality - should |
Was literally about to comment that while testing it. In the AC:
Looks like it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From GH discussion, need some small changes
Rejected roles
header should be Roles requested
per the BL AC
Given I am a MilMove Admin on the admin app,
When I select the "Rejected Office Users" menu item,
Then I will see a list of account requests in the status of Rejected, with the following fields: “email, first name, last name, Transportation Office, status, reason for rejection, rejected date, roles requested”
I'd also suggest removing the deleted_on
part of the AC as we are not deleting users when they are rejected, just status updates
Roles column needs to be sortable
-- Adds new columns to office_users table | ||
ALTER TABLE public.office_users | ||
ADD COLUMN IF NOT EXISTS rejected_on timestamptz; | ||
|
||
-- Comments on new columns | ||
COMMENT on COLUMN office_users.rejected_on IS 'Date requested office users were rejected.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the -- Comments on new columns
comment is not really necessary
// FetchAdminUserList uses the passed query builder to fetch a list of office users | ||
func (o *rejectedOfficeUserListFetcher) FetchRejectedOfficeUsersList(appCtx appcontext.AppContext, filters []services.QueryFilter, associations services.QueryAssociations, pagination services.Pagination, ordering services.QueryOrder) (models.OfficeUsers, error) { | ||
var rejectedUsers models.OfficeUsers | ||
err := o.builder.FetchMany(appCtx, &rejectedUsers, filters, associations, pagination, ordering) | ||
return rejectedUsers, err | ||
} | ||
|
||
// FetchAdminUserList uses the passed query builder to fetch a list of office users | ||
func (o *rejectedOfficeUserListFetcher) FetchRejectedOfficeUsersCount(appCtx appcontext.AppContext, filters []services.QueryFilter) (int, error) { | ||
var rejectedUsers models.OfficeUsers | ||
count, err := o.builder.Count(appCtx, &rejectedUsers, filters) | ||
return count, err | ||
} | ||
|
||
// NewAdminUserListFetcher returns an implementation of AdminUserListFetcher | ||
func NewRejectedOfficeUsersListFetcher(builder rejectedOfficeUsersListQueryBuilder) services.RejectedOfficeUserListFetcher { | ||
return &rejectedOfficeUserListFetcher{builder} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to fix your copy/pasta comments here
B-21966
Summary
This PR adds the Rejected Office users view on the admin page.
This also adds
rejected_on
anddeleted_on
columns to the office users table.Verification Steps for Reviewers
These are to be checked by a reviewer.
How to test
http://adminlocal:3000/system
.“email, first name, last name, Transportation Office, status, reason for rejection, rejected on, roles requested”
*Can use
RejectedOfficeUser
andRequestedOfficeUser
testharness to make needed usersFrontend
officeApp
class or custommin-width
styling is used to hide any states the would not be visible to the user.Backend
Database
Any new migrations/schema changes:
Screenshots
Rejected users Page with partial columns
Rejected users Page with remaining columns