-
-
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
Added custom field option to view assets #12096
Added custom field option to view assets #12096
Conversation
Signed-off-by: snipe <[email protected]>
…needed Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
Signed-off-by: snipe <[email protected]>
…_in_user_view column 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]>
|
I think this is awesome! However, I really wish that users can see assets
assigned to their location. This would be a huge for our teachers to see
what Chromebooks/Tablets the students have. Thanks!
…On Thu, Nov 10, 2022 at 11:57 AM what-the-diff[bot] < ***@***.***> wrote:
- Added a new column to the custom_fields table called
display_in_user_view
- Updated CustomFieldsController, ViewAssetsController and
CustomFieldsTransformer with logic for this field
- Created migration file 2022-11-07 134348 add display to user in
custom fields php which adds the new column to the database
- Updated general lang files with translations for this feature
(en/admin/custom fields)
- Added sortable to the table headers
- Moved email column from 3rd position to 8th position
- Changed order of columns in thead and tbody tags for consistency
with each other, as well as added a new visible/hidden column between
unique and db_field (display_in_user) view
- Removed unnecessary tag around "Visible To User" text since it is
already hidden by default on small screens using Bootstrap's responsive
utility classes
—
Reply to this email directly, view it on GitHub
<#12096 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2FP6U24PH6XQCH53Z2KRO3WHUZQZANCNFSM6AAAAAAR42JOQA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I also forgot to mention that when users view their profile. There is a
blue link to their location (see below). They can click on it but they
can't view any assets. HOWEVER....they can click on print assigned assets.
They can see all of the assets that way. So, either there is a small flaw
to that or this may be something in the works???
[image: image.png]
After they click on the location they can't view anything. I would love it
if they can view the current location. This would be AMAZING!!! I think if
there was a policy to allow users to view current locations would be very
beneficial.
[image: image.png]
…On Thu, Nov 10, 2022 at 2:36 PM Brian Hogan ***@***.***> wrote:
I think this is awesome! However, I really wish that users can see assets
assigned to their location. This would be a huge for our teachers to see
what Chromebooks/Tablets the students have. Thanks!
On Thu, Nov 10, 2022 at 11:57 AM what-the-diff[bot] <
***@***.***> wrote:
>
> - Added a new column to the custom_fields table called
> display_in_user_view
> - Updated CustomFieldsController, ViewAssetsController and
> CustomFieldsTransformer with logic for this field
> - Created migration file 2022-11-07 134348 add display to user in
> custom fields php which adds the new column to the database
> - Updated general lang files with translations for this feature
> (en/admin/custom fields)
> - Added sortable to the table headers
> - Moved email column from 3rd position to 8th position
> - Changed order of columns in thead and tbody tags for consistency
> with each other, as well as added a new visible/hidden column between
> unique and db_field (display_in_user) view
> - Removed unnecessary tag around "Visible To User" text since it is
> already hidden by default on small screens using Bootstrap's responsive
> utility classes
>
> —
> Reply to this email directly, view it on GitHub
> <#12096 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/A2FP6U24PH6XQCH53Z2KRO3WHUZQZANCNFSM6AAAAAAR42JOQA>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Signed-off-by: snipe <[email protected]>
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.
This looks like it could be a really handy feature, and I do like the code cleanup as well. I had one small concern, but I'm not sure I'm correct on that one. Anyways, nice work, and thank you!
@@ -206,11 +217,13 @@ | |||
$('#field_encrypted').on('ifChecked', function(event){ | |||
$("#encrypt_warning").show(); | |||
$("#show_in_email").hide(); | |||
$("#display_in_user_view").hide(); |
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 feel like we also need to enforce that these settings are forced to be set to zero when the field is encrypted.
My concern is - let's say you are creating a custom field, and you click 'show in email' and 'display in user view'. Then you click 'encrypt' - will it save 'show in email' as 1 still, even though the field is hidden? I'm not exactly sure.
Signed-off-by: snipe <[email protected]>
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.
Perfect, love it! Thank you!
That sounds like a different issue - it really just shouldn't be linked. A regular user shouldn't be able to see locations. |
This PR allows you to set the visibility on a custom field for the user with that asset checked out to them when they go to
View Assigned Assets
in their profile section.This also adds a new column to the custom fields interface to show whether the field is displayed to the user or not.
Note: This does NOT currently display fields that are encrypted and doesn't currently handle any fancy formatting like dates, etc.