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

User department now visible in side pane of asset view page #13184

Merged
merged 5 commits into from
Jul 13, 2023

Conversation

akemidx
Copy link
Collaborator

@akemidx akemidx commented Jun 20, 2023

Department for a user is now visible in side pane when looking at an asset view.

Screenshot 2023-06-22 at 7 08 25 PM

Department is NOT visible on the index page as to reduce confusion, as we do not allow assets to be checked out to departments.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

tested locally

Checklist:

@akemidx akemidx requested a review from snipe as a code owner June 20, 2023 23:32
@what-the-diff
Copy link

what-the-diff bot commented Jun 20, 2023

PR Summary

  • Updated label in hardware view
    Changed the displayed text from 'current value' to 'git value' for better clarity.
  • Added department display
    Now shows the department name when an asset is assigned and the department information is available.

@snipe
Copy link
Owner

snipe commented Jun 22, 2023

Can you do me a solid and throw a screenshot in this PR summary?

@akemidx
Copy link
Collaborator Author

akemidx commented Jun 22, 2023

Can you do me a solid and throw a screenshot in this PR summary?

in the main post

Copy link
Owner

@snipe snipe left a comment

Choose a reason for hiding this comment

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

One teensie change

@@ -45,4 +45,5 @@
'alert_details' => 'Please see below for details.',
'custom_export' => 'Custom Export',
'mfg_warranty_lookup' => ':manufacturer Warranty Status Lookup',
'user_department' => 'User Department: ',
Copy link
Owner

Choose a reason for hiding this comment

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

We actually try not to include the colon in the translations these days and instead put it in the blade IIRC

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed. saw a few others that had this formatting. I didn't change them, but will make sure NEW translations put the colon on the blade

Copy link
Owner

Choose a reason for hiding this comment

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

Yeah, there are a few places where it's inconsistent :(

Copy link
Owner

@snipe snipe left a comment

Choose a reason for hiding this comment

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

One more small change

@@ -919,6 +919,10 @@
</li>
@endif

@if((isset($asset->assignedTo)) && ($asset->assignedTo->department!=''))
Copy link
Owner

Choose a reason for hiding this comment

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

I'd probably change this to:

@if((isset($asset->assignedTo)) && ($asset->assignedTo->department))

so that we're making sure that the dept actually exists

@brianhoganm
Copy link

Thank you for this line of code! Extremely helpful for our school to know which department our user (students in our case) belongs to when viewing assets. Would love to be able to also add Manager as well under the User Department. The Manager happens to be the "teacher's" name. @akemidx THANKS!!

@snipe snipe merged commit 4027ace into snipe:develop Jul 13, 2023
4 checks passed
@akemidx akemidx deleted the department_in_side_bar branch April 23, 2024 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants