-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Small UI tweaks and redirects when asset model is invalid #14808
Conversation
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
PR Summary
|
Ah, right - the tooltips don't work because it's a link, not a button. Derp. I'll fix. |
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Building upon the great work by @Godmartinz in #14740 that allows users to now select their destination on checkout (which we should probably add to audit as well), I cleaned up that UI a little bit to make the drop-down a little more consistent with the rest of the UI, and also did some checks to make sure the model for the asset is valid. It has happened before that someone has manually edited the database data and the model_id is either blank or is invalid, so this throws a nice error message warning people that they have to update that, but also redirects them to the edit page. Belt and suspenders and all that.
The reason why this matters is because auditing, checking in and checking out all touch the asset's model (OOP model, not asset model), and we don't provide the asset model drop-down on those pages, so the user gets an error as it tries to update the asset on checkin/checkout/audit, but there's no meaningful error message on the screen since we have no asset model field displayed.
Current Checkin/Checkout Screen with the newly introduced "pick your destination"
Redirect page asset view
This hasn't changed much except for the greyed out buttons. These would always redirect if you clicked on them before, but this is better visual feedback
Checkin screen if model is invalid
I've centered this as well. We have the checkout screen on the left-side so that we can populate the right side with information on the other things checked out to that target, and I had originally made the container boxes left-aligned for consistency, but the layout looks much better centered here and we don't have any reason for right side content.
Normal Checkout Screen
Checkout screen if model is invalid
Audit screen when the asset model is invalid
My tooltips on the hardware view page are not showing up for some reason, but I'll look into that a bit later.