xyz icon indicating copy to clipboard operation
xyz copied to clipboard

Admin view

Open cityremade opened this issue 1 year ago • 3 comments

Admin view redesign including mobile usability;

cityremade avatar Jul 02 '24 09:07 cityremade

The optional method param must end with a question mark. There must only be one get and one post application definition for the same endpoint.

app.get(`${process.env.DIR||''}/api/user/:method?`, api)

app.post(`${process.env.DIR||''}/api/user/:method?`, express.json({limit: '5mb'}), api)

The update method will now receive a req.body. I changed the put to update in the user view script.

image

The user add method should be extended to also check for a req.body.

The checks for the params.user must be first. The params user is the admin user.

image

dbauszus-glx avatar Jul 05 '24 13:07 dbauszus-glx

Various list of changes from me / Admins here :)

They were big fans of the changes so well done @cityremade ! 🥳

Main View

  1. Capitalise Email in the table header
  2. Below Show blocked accounts checkbox add text saying 'Click on an email in the table to make changes to the users permissions and roles'
  3. Make New Orange instead of red
  4. Make Awaiting Verification red - as it requires fixing

Form

  1. Capitalise Email
  2. Update tooltips on checkboxes - should all start 'Check the box to verify a user' 'Check the box to re-verify after password reset' 'Check the box to approve a user' 'Check the box to make user an administrator' 'Check the box to allow the user API privileges' 'Check the box to block the user'
  3. Option to pass in text about what User Roles are (perhaps an eye that expands).
  4. 'Account Expiry' instead of 'Account expires on'

simon-leech avatar Jul 10 '24 10:07 simon-leech

Looks really good @cityremade! 👏

One thought I had...should we make the Status column sortable (by clicking on the column header) or filterable so it's easier for the user to find all of the accounts which require action?

jfitzpatrick17 avatar Jul 10 '24 10:07 jfitzpatrick17

In order to use role description add roles object in the workspace: "roles": { "this role": { "label": "This is a label that explains what this role does" } }

cityremade avatar Jul 11 '24 18:07 cityremade

The user/put and user/add modules should be merged as they do the same.

create and update should be separate. I'd rather merge put + update;

cityremade avatar Jul 12 '24 11:07 cityremade

Can we add the ability to sort by the columns in the table?

Clicking on them does nothing

nope. Sorting was deliberately removed - now search filters are in place.

cityremade avatar Jul 12 '24 14:07 cityremade

Can we add the ability to sort by the columns in the table? Clicking on them does nothing

nope. Sorting was deliberately removed - now search filters are in place.

Why were they removed?

RobAndrewHurst avatar Jul 12 '24 14:07 RobAndrewHurst

Can we add the ability to sort by the columns in the table? Clicking on them does nothing

nope. Sorting was deliberately removed - now search filters are in place.

Why were they removed?

I also asked for this. I use this all the time in the current console to sort by when people have last logged in...

jfitzpatrick17 avatar Jul 12 '24 14:07 jfitzpatrick17

Looking good - thanks for all those changes!

I'm getting error on save error: column "re_verification" of relation "users" does not exist as i think it should be looking at the verified column when you re_verification?

Also i noticed on mobile the dialog text doesn't wrap so it gets lost off the page (see the word reset!) image

simon-leech avatar Jul 12 '24 14:07 simon-leech

Me thinks this is using an ACL table that is missing a column? It would have been part of #1264

RobAndrewHurst avatar Jul 12 '24 14:07 RobAndrewHurst

Me thinks this is using an ACL table that is missing a column? It would have been part of #1264

Not the case - in #1264 it had a conditional on the field before storing to the db. We need to put this back in as its uses the verified field on the db -there is no reverfication_field.

image

simon-leech avatar Jul 12 '24 14:07 simon-leech

We don't want to do these tests on private ACL's but on public ones. @cityremade Can you redeploy using the ACL on our neon instance?

RobAndrewHurst avatar Jul 12 '24 14:07 RobAndrewHurst

Me thinks this is using an ACL table that is missing a column? It would have been part of #1264

Not the case - in #1264 it had a conditional on the field before storing to the db. We need to put this back in as its uses the verified field on the db -there is no reverfication_field.

image

Nice pick up! :)

RobAndrewHurst avatar Jul 12 '24 14:07 RobAndrewHurst

so here it is, the pr containing only backend + pills changes that are needed for the new admin view to work https://github.com/GEOLYTIX/xyz/pull/1392

The new admin view template is now in public/mapp/admin_view.html I am keeping this pr in draft as I am still using it to redeploy the test app.

cityremade avatar Jul 24 '24 16:07 cityremade

Closing as the task has been split into 2 separate changes. This branch is no longer needed.

cityremade avatar Jul 26 '24 11:07 cityremade