mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Use the new API notation for external URL ('link')
This commit is contained in:
parent
fbd52e1414
commit
65d955bcc6
2 changed files with 3 additions and 2 deletions
|
|
@ -45,7 +45,8 @@ class InvenTreeModel {
|
|||
|
||||
int get parentId => jsondata['parent'] ?? -1;
|
||||
|
||||
String get link => jsondata['URL'] ?? '';
|
||||
// Legacy API provided external link as "URL", while newer API uses "link"
|
||||
String get link => jsondata['link'] ?? jsondata['URL'] ?? '';
|
||||
|
||||
// Create a new object from JSON data (not a constructor!)
|
||||
InvenTreeModel createFromJson(Map<String, dynamic> json) {
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ class _PartDisplayState extends State<PartDisplayWidget> {
|
|||
tiles.add(
|
||||
Card(
|
||||
child: ListTile(
|
||||
title: Text("In Stock"),
|
||||
title: Text("Stock"),
|
||||
leading: FaIcon(FontAwesomeIcons.boxes),
|
||||
trailing: Text("${part.inStock}"),
|
||||
onTap: null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue