mirror of
https://github.com/inventree/inventree-app.git
synced 2026-11-28 00:08:59 +00:00
Audit log (#899)
* Check if the backend supports auditlog info * Change from stockhistory to auditlog - Removes support for legacy stockhistory tracking - Now uses AuditLog * Update release notes
This commit is contained in:
1 parent
3a228dfc1f
commit
edd7fafb6d
24 files changed
+488
-214
No files matched your search
@@ -36,6 +36,7 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
||||
bool enableLabelPrinting = true;
|
||||
bool darkMode = false;
|
||||
bool showPk = false;
|
||||
bool showHistory = false;
|
||||
|
||||
int screenOrientation = SCREEN_ORIENTATION_SYSTEM;
|
||||
|
||||
@@ -77,6 +78,10 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
||||
as bool;
|
||||
showPk =
|
||||
await InvenTreeSettingsManager().getValue(INV_SHOW_PK, false) as bool;
|
||||
showHistory = await InvenTreeSettingsManager().getBool(
|
||||
INV_SHOW_HISTORY,
|
||||
false,
|
||||
);
|
||||
|
||||
darkMode = AdaptiveTheme.of(context).mode.isDark;
|
||||
|
||||
@@ -211,6 +216,20 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().history),
|
||||
subtitle: Text(L10().historyDetail),
|
||||
leading: Icon(TablerIcons.history),
|
||||
trailing: Switch(
|
||||
value: showHistory,
|
||||
onChanged: (bool value) {
|
||||
InvenTreeSettingsManager().setValue(INV_SHOW_HISTORY, value);
|
||||
setState(() {
|
||||
showHistory = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
child: ListTile(
|
||||
title: Text(L10().orientation),
|
||||
|
||||
@@ -11,7 +11,6 @@ class InvenTreeStockSettingsWidget extends StatefulWidget {
|
||||
class _InvenTreeStockSettingsState extends State<InvenTreeStockSettingsWidget> {
|
||||
_InvenTreeStockSettingsState();
|
||||
|
||||
bool stockShowHistory = false;
|
||||
bool stockShowTests = false;
|
||||
bool stockConfirmScan = false;
|
||||
|
||||
@@ -22,10 +21,6 @@ class _InvenTreeStockSettingsState extends State<InvenTreeStockSettingsWidget> {
|
||||
}
|
||||
|
||||
Future<void> loadSettings() async {
|
||||
stockShowHistory = await InvenTreeSettingsManager().getBool(
|
||||
INV_STOCK_SHOW_HISTORY,
|
||||
false,
|
||||
);
|
||||
stockShowTests = await InvenTreeSettingsManager().getBool(
|
||||
INV_STOCK_SHOW_TESTS,
|
||||
true,
|
||||
@@ -47,23 +42,6 @@ class _InvenTreeStockSettingsState extends State<InvenTreeStockSettingsWidget> {
|
||||
body: Container(
|
||||
child: ListView(
|
||||
children: [
|
||||
ListTile(
|
||||
title: Text(L10().stockItemHistory),
|
||||
subtitle: Text(L10().stockItemHistoryDetail),
|
||||
leading: Icon(TablerIcons.history),
|
||||
trailing: Switch(
|
||||
value: stockShowHistory,
|
||||
onChanged: (bool value) {
|
||||
InvenTreeSettingsManager().setValue(
|
||||
INV_STOCK_SHOW_HISTORY,
|
||||
value,
|
||||
);
|
||||
setState(() {
|
||||
stockShowHistory = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().testResults),
|
||||
subtitle: Text(L10().testResultsDetail),
|
||||
|
||||
Reference in new issue
Block a user