mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Enhance existing api_forms functionality
- Allow form to be created without an actual API endpoint - Useful for creating client-side forms without any server interaction
This commit is contained in:
parent
63bf88ac66
commit
02a9bbe3c6
3 changed files with 47 additions and 25 deletions
|
|
@ -258,6 +258,9 @@ class InvenTreeAPI {
|
|||
return plugins;
|
||||
}
|
||||
|
||||
// Test if the provided plugin mixin is supported by any active plugins
|
||||
bool supportsMixin(String mixin) => getPlugins(mixin: mixin).isNotEmpty;
|
||||
|
||||
// Getter for server version information
|
||||
String get version => _version;
|
||||
|
||||
|
|
@ -511,6 +514,8 @@ class InvenTreeAPI {
|
|||
return;
|
||||
}
|
||||
|
||||
print("Requesting plugin information");
|
||||
|
||||
// Request a list of plugins from the server
|
||||
final List<InvenTreeModel> results = await InvenTreePlugin().list();
|
||||
|
||||
|
|
@ -522,11 +527,8 @@ class InvenTreeAPI {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
print("Discovered ${_plugins.length} active plugins!");
|
||||
}
|
||||
|
||||
|
||||
bool checkPermission(String role, String permission) {
|
||||
/*
|
||||
* Check if the user has the given role.permission assigned
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue