mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-27 21:16:48 +00:00
Long sn fix (#499)
* Improve tasks.py - Works from any subdir now * Update stock detail display * FIx width of "serial" column in stock item list
This commit is contained in:
parent
7575ba0136
commit
715cd06946
@ -467,7 +467,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||||||
title: Text("${widget.item.partName}"),
|
title: Text("${widget.item.partName}"),
|
||||||
subtitle: Text("${widget.item.partDescription}"),
|
subtitle: Text("${widget.item.partDescription}"),
|
||||||
leading: InvenTreeAPI().getThumbnail(widget.item.partImage),
|
leading: InvenTreeAPI().getThumbnail(widget.item.partImage),
|
||||||
trailing: Text(
|
trailing: widget.item.isSerialized() ? null : Text(
|
||||||
widget.item.quantityString(),
|
widget.item.quantityString(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
@ -548,7 +548,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10().serialNumber),
|
title: Text(L10().serialNumber),
|
||||||
leading: FaIcon(FontAwesomeIcons.hashtag),
|
leading: FaIcon(FontAwesomeIcons.hashtag),
|
||||||
trailing: Text("${widget.item.serialNumber}"),
|
subtitle: Text("${widget.item.serialNumber}"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -133,14 +133,17 @@ class _PaginatedStockItemListState extends PaginatedSearchState<PaginatedStockIt
|
|||||||
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text("${item.partName}"),
|
title: Text("${item.partName}"),
|
||||||
subtitle: Text("${item.locationPathString}"),
|
subtitle: Text(item.locationPathString),
|
||||||
leading: InvenTreeAPI().getThumbnail(item.partThumbnail),
|
leading: InvenTreeAPI().getThumbnail(item.partThumbnail),
|
||||||
trailing: Text("${item.displayQuantity}",
|
trailing: SizedBox(
|
||||||
style: TextStyle(
|
width: 48,
|
||||||
fontWeight: FontWeight.bold,
|
child: Text("${item.displayQuantity}",
|
||||||
fontSize: 16,
|
style: TextStyle(
|
||||||
color: InvenTreeAPI().StockStatus.color(item.status),
|
fontWeight: FontWeight.bold,
|
||||||
),
|
fontSize: 14,
|
||||||
|
color: InvenTreeAPI().StockStatus.color(item.status),
|
||||||
|
),
|
||||||
|
)
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(context, MaterialPageRoute(builder: (context) => StockDetailWidget(item)));
|
Navigator.push(context, MaterialPageRoute(builder: (context) => StockDetailWidget(item)));
|
||||||
|
8
tasks.py
8
tasks.py
@ -1,5 +1,6 @@
|
|||||||
"""Invoke tasks for building the app"""
|
"""Invoke tasks for building the app"""
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
from invoke import task
|
from invoke import task
|
||||||
|
|
||||||
@ -13,8 +14,13 @@ def clean(c):
|
|||||||
@task
|
@task
|
||||||
def translate(c):
|
def translate(c):
|
||||||
"""Update translation files"""
|
"""Update translation files"""
|
||||||
|
|
||||||
|
here = os.path.dirname(__file__)
|
||||||
|
l10_dir = os.path.join(here, 'lib', 'l10n')
|
||||||
|
l10_dir = os.path.abspath(l10_dir)
|
||||||
|
|
||||||
python = 'python3' if sys.platform.lower() == 'darwin' else 'python'
|
python = 'python3' if sys.platform.lower() == 'darwin' else 'python'
|
||||||
c.run(f"cd lib/l10n && {python} collect_translations.py")
|
c.run(f"cd {l10_dir} && {python} collect_translations.py")
|
||||||
|
|
||||||
|
|
||||||
@task(pre=[clean, translate])
|
@task(pre=[clean, translate])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user