mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-16 12:15:31 +00:00
Bom optional (#227)
* Split part settings onto different screen * show_bom setting controls whether BOM information is displayed * linting
This commit is contained in:
@ -25,12 +25,6 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
||||
bool barcodeSounds = true;
|
||||
bool serverSounds = true;
|
||||
|
||||
// Part settings
|
||||
bool partShowParameters = true;
|
||||
|
||||
// Stock settings
|
||||
bool stockShowHistory = false;
|
||||
|
||||
bool reportErrors = true;
|
||||
bool strictHttps = false;
|
||||
|
||||
@ -44,16 +38,8 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
||||
}
|
||||
|
||||
Future <void> loadSettings() async {
|
||||
|
||||
// Load initial settings
|
||||
|
||||
barcodeSounds = await InvenTreeSettingsManager().getValue(INV_SOUNDS_BARCODE, true) as bool;
|
||||
serverSounds = await InvenTreeSettingsManager().getValue(INV_SOUNDS_SERVER, true) as bool;
|
||||
|
||||
partShowParameters = await InvenTreeSettingsManager().getValue(INV_PART_SHOW_PARAMETERS, true) as bool;
|
||||
|
||||
stockShowHistory = await InvenTreeSettingsManager().getValue(INV_STOCK_SHOW_HISTORY, false) as bool;
|
||||
|
||||
reportErrors = await InvenTreeSettingsManager().getValue(INV_REPORT_ERRORS, true) as bool;
|
||||
strictHttps = await InvenTreeSettingsManager().getValue(INV_STRICT_HTTPS, false) as bool;
|
||||
|
||||
@ -137,47 +123,6 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
||||
body: Container(
|
||||
child: ListView(
|
||||
children: [
|
||||
/* Part Settings */
|
||||
ListTile(
|
||||
title: Text(L10().part, style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
leading: FaIcon(FontAwesomeIcons.shapes),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().parameters),
|
||||
subtitle: Text(L10().parametersSettingDetail),
|
||||
leading: FaIcon(FontAwesomeIcons.thList),
|
||||
trailing: Switch(
|
||||
value: partShowParameters,
|
||||
onChanged: (bool value) {
|
||||
InvenTreeSettingsManager().setValue(INV_PART_SHOW_PARAMETERS, value);
|
||||
setState(() {
|
||||
partShowParameters = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
Divider(),
|
||||
/* Stock Settings */
|
||||
ListTile(
|
||||
title: Text(L10().stock,
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
leading: FaIcon(FontAwesomeIcons.boxes),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().stockItemHistory),
|
||||
subtitle: Text(L10().stockItemHistoryDetail),
|
||||
leading: FaIcon(FontAwesomeIcons.history),
|
||||
trailing: Switch(
|
||||
value: stockShowHistory,
|
||||
onChanged: (bool value) {
|
||||
InvenTreeSettingsManager().setValue(INV_STOCK_SHOW_HISTORY, value);
|
||||
setState(() {
|
||||
stockShowHistory = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
/* Sound Settings */
|
||||
Divider(height: 3),
|
||||
ListTile(
|
||||
|
Reference in New Issue
Block a user