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

Added EULAs in print user's assets #14769

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

mauro-miatello
Copy link
Contributor

Added EULAs when we want to print all assets assigned to a users and ask him/her to sign.

Description

When we assign assets to a user after on-boarding we deliver a sheet with all his/her assets and ask to sign for confirmation. But there are no EULAs on it, so I added them for each category of asset provided. Hope this can be useful for all users.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Assigned more assets of the same category to be sure not to have EULAs replicated
  • Assigned assets of a category with no EULA to be sure no errors occur
  • Assigned assets of a category with default EULA to be sure no errors occur

Test Configuration:

  • PHP version: 8.0.30
  • MySQL version: MariaDB 10.3.38
  • Webserver version: Apache 2.4.58
  • OS version: Ubuntu 20.04.6 LTS

Checklist:

Added EULAs when we want to print all assets assigned to a users and ask him/her to sign.
Copy link

what-the-diff bot commented May 26, 2024

PR Summary:

  • Task Fix depreciation math #1: Introduction of a conditional block
    This block is set up to establish a variable called $eulas before each section of the loop within the table row (<tr>...</tr>).

  • Task Ability for admin to check out an asset to a user #2: Expanding the $eulas via various items
    Several lines have been added in the loop block to enhance the value of $eulas array from different sources (such as $asset, $license, $accessory and $consumables). The condition has to be met for these elements to be added.

  • Task Add reports - depreciation, people with no assets, etc #3: Presentation of $eulas content
    A new HTML segment has been designed to showcase what is within the $eulas, in a tabular row format. To keep the content from repeating, the $eulas array is made unique before its display.

  • Task Add category back to Models blade/controller #4: Code refinement
    There were minor adjustments to clean up the code by removing excess spacing and commented segments, leading to less clutter and more readable code.

@mauro-miatello
Copy link
Contributor Author

this in an example of how it appears
image

@snipe
Copy link
Owner

snipe commented May 27, 2024

Thanks for this! I think we'd need to either make this a setting or at least make it be show/hideable in the print view. For folks who have a lot of assets with different EULAs, that could start to eat up a LOT of printer pages.

@mauro-miatello
Copy link
Contributor Author

@snipe I agree, I will try to add the show/hide option

Added a show/hide button and simplified code. Also, I have reduced the signing area because it exceeded A4 format.
@mauro-miatello
Copy link
Contributor Author

I've added a button show/hide
image

Also, I have reduced a while the signing area because it exceeded ISO A4 format.

@@ -352,25 +359,44 @@ class="snipe-table table table-striped inventory"
</table>
@endif

<p></p>
<div class="pull-right">
<button class="btn btn-default" type="button" data-toggle="collapse" data-target="#eula-row" aria-expanded="false" aria-controls="eula-row" title="EULAs">
Copy link
Owner

Choose a reason for hiding this comment

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

Will this button show up on the print version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@snipe I was in doubt if hide or not but I have seen that the other 2 buttons in the page are printable, so I didn't use a different behavior, but I prefer to hide them. So if you agree I hide all 3 buttons with the property hidden-print

the button added to print EULAs is hidden when printing
@mauro-miatello
Copy link
Contributor Author

@snipe I've hidden the button from print. I didn't change the other 2 buttons because they are in the bootstrap table and I suppose that changing them means changing in all application and I don't know if it is what you desire

@mauro-miatello
Copy link
Contributor Author

@snipe let me know if there is something else to fix, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants