-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
base: develop
Are you sure you want to change the base?
Conversation
PR Summary
|
@@ -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; |
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'm not sure what this is doing - can you clarify?
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.
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.
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.
im not sure if this is bad practice, but if I should write a getter for it I will 👍
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.
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;
Can you try to catch this up to develop? Getting weird test failures... |
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.
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
orVALUE
in front of the QR code options now.QR Code option:
Updated the translation:
Scanning this QR codes returns just the asset tag:
Fixes #[sc-27118]
Type of change
Please delete options that are not relevant.
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 Configuration:
Checklist: