mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-13 10:45:29 +00:00
Print label key (#491)
* We now use the plugin key for printing labels * Bump API version for modern label printing * Fix typo
This commit is contained in:
@ -59,7 +59,7 @@ Future<void> selectAndPrintLabel(
|
||||
for (var plugin in plugins) {
|
||||
plugin_options.add({
|
||||
"display_name": plugin.humanName,
|
||||
"value": InvenTreeAPI().supportsModenLabelPrinting ? plugin.pk : plugin.key
|
||||
"value": plugin.key,
|
||||
});
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ Future<void> selectAndPrintLabel(
|
||||
|
||||
showLoadingOverlay(context);
|
||||
|
||||
if (InvenTreeAPI().supportsModenLabelPrinting) {
|
||||
if (InvenTreeAPI().supportsModernLabelPrinting) {
|
||||
|
||||
// Modern label printing API uses a POST request to a single API endpoint.
|
||||
await InvenTreeAPI().post(
|
||||
@ -178,7 +178,7 @@ Future<List<Map<String, dynamic>>> getLabelTemplates(
|
||||
|
||||
String url = "/label/template/";
|
||||
|
||||
if (InvenTreeAPI().supportsModenLabelPrinting) {
|
||||
if (InvenTreeAPI().supportsModernLabelPrinting) {
|
||||
data["model_type"] = labelType;
|
||||
} else {
|
||||
// Legacy label printing API endpoint
|
||||
|
Reference in New Issue
Block a user