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

Adds QR Code option to return only an {asset tag} #15721

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

Conversation

Godmartinz
Copy link
Collaborator

@Godmartinz Godmartinz commented Oct 23, 2024

Description

This adds an option to allow QR codes to link to an Asset tag with out a URL. this should streamline the ability to bulk audit and bulk checkout.

This also puts URL or VALUE in front of the QR code options now.

QR Code option:
image

Updated the translation:
image

Scanning this QR codes returns just the asset tag:
image

Fixes #[sc-27118]

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] 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?

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

  • Test A
  • Test B

Test Configuration:

  • PHP version:
  • MySQL version
  • Webserver version
  • OS version

Checklist:

@Godmartinz Godmartinz requested a review from snipe as a code owner October 23, 2024 19:25
Copy link

what-the-diff bot commented Oct 23, 2024

PR Summary

  • Modified Label Handling Code
    A change has been made in the way our system processes labels. Specifically, a new case has been added to handle "barcode2DTarget" when the target is set as 'asset_tag'. This change allows our system to use the base name of the asset tag route when the said case occurs.
  • Interface Update for Label Selection
    The user interface for label selection has been updated. A new option 'asset_tag' has been added in the dropdown where users select their label targets. This addition provides more options for users during their label selection process.

@Godmartinz Godmartinz requested review from marcusmoore and snipe and removed request for snipe October 23, 2024 19:25
@@ -125,6 +125,7 @@ public function render(callable $callback = null)
if (($barcode2DType != 'none') && (!is_null($barcode2DType))) {
switch ($settings->label2_2d_target) {
case 'ht_tag': $barcode2DTarget = route('ht/assetTag', $asset->asset_tag); break;
case 'asset_tag' : $barcode2DTarget = basename(route('ht/assetTag', $asset->asset_tag)); break;
Copy link
Owner

Choose a reason for hiding this comment

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

I'm not sure what this is doing - can you clarify?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

so ht_tag returns a url of blah.com/ht/{asset_tag}, and basename() returns the trailing name of the path. without writing another method or route we get the value we want here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

im not sure if this is bad practice, but if I should write a getter for it I will 👍

Copy link
Owner

Choose a reason for hiding this comment

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

so ht_tag returns a url of blah.com/ht/{asset_tag}, and basename() returns the trailing name of the path. without writing another method or route we get the value we want here.

I feel stupid for asking this, but if the info should just be an asset tag, wouldn't this work?

case 'asset_tag' : $barcode2DTarget = $asset->asset_tag; break;

@marcusmoore
Copy link
Collaborator

Can you try to catch this up to develop? Getting weird test failures...

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.

We probably want to change this wording for clarification that {asset_tag} is the asset tag itself and not a URL

CleanShot 2024-10-23 at 12 58 18@2x

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

Successfully merging this pull request may close these issues.

3 participants