mirror of
https://github.com/inventree/inventree-app.git
synced 2026-11-29 00:34: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
@@ -210,6 +210,10 @@ abstract class RefreshableState<T extends StatefulWidget> extends State<T>
|
||||
// Whether to display the "pk" (primary key / ID) value of the loaded model
|
||||
bool showPk = false;
|
||||
|
||||
// Whether to display the "history" (audit log) for the loaded model
|
||||
// Requires both the app setting, and server support for the audit log
|
||||
bool showHistory = false;
|
||||
|
||||
// Helper function to return API instance
|
||||
InvenTreeAPI get api => InvenTreeAPI();
|
||||
|
||||
@@ -251,6 +255,9 @@ abstract class RefreshableState<T extends StatefulWidget> extends State<T>
|
||||
});
|
||||
|
||||
showPk = await InvenTreeSettingsManager().getBool(INV_SHOW_PK, false);
|
||||
showHistory =
|
||||
api.supportsAuditLog &&
|
||||
await InvenTreeSettingsManager().getBool(INV_SHOW_HISTORY, false);
|
||||
|
||||
await request(context);
|
||||
|
||||
|
||||
Reference in new issue
Block a user