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

Check that there is a company before trying to get name property #13473

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

snipe
Copy link
Owner

@snipe snipe commented Aug 16, 2023

This hopefully fixes some of the final issues in #12050. I've added some comments and made sure to check that the asset in question has a company before trying to pull the name property, and fixed it so that if you select to use a logo, it will try to use the company logo first, but if it can't find one and it can't find a label image from the branding settings, it should default to no logo.

In my print preview (we just moved so we don't have a working printer yet), I'm still seeing the black outline for the labels, and I'm not sure we want that if they actually print on the screen.

(The smiley is the company logo, the very tired me is a second company with an image, the snipe logo head is the overall "company label logo" - none of the other assets have companies and therefore fall back rot the generic logo)

Screenshot 2023-08-16 at 1 24 29 AM Screenshot 2023-08-16 at 1 16 19 AM

That serial number gets pretty hard to read, but I'm not sure what - if anything - we can do about that.

I'm probably going to merge this, just because it's acting a little funny for users on master, but I'd probably want @cram42's feedback to make sure all of the changes I made today align with the intent and his testing.

@what-the-diff
Copy link

what-the-diff bot commented Aug 16, 2023

PR Summary

  • Enhanced Rendering Method in Label View
    A new attribute, $assetData, has been introduced to the render() method in app/View/Label.php. This enhancement will facilitate more precise manipulation or utilization of asset data during the rendering process, improving the flexibility of this function.

  • Dynamic Logo Assignment
    A new condition within the render() method in app/View/Label.php allows for dynamic setting of the $logo variable. This adaptation means the logo can now vary based on certain conditions, permitting a more customized experience.

  • Added Title Adjustability
    Within the render() method in app/View/Label.php, we've added a new condition to set the variable $title. This addition makes the title of the rendering dynamic, allowing it to be updated based on different scenarios, thus providing a more interactive user experience.

  • Updated Checkbox Label
    The label text for a specific checkbox in resources/views/settings/labels.blade.php has been updated. This minor change clarifies the functionality of the checkbox, enabling users to better understand its purpose and use it more effectively.

@snipe snipe merged commit eacbde3 into develop Aug 16, 2023
5 checks passed
@snipe snipe mentioned this pull request Aug 16, 2023
10 tasks
Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

Looks good and works 👍🏾

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

2 participants