mirror of
https://github.com/inventree/inventree-app.git
synced 2025-12-22 20:13:13 +00:00
Modern attachments (#505)
* Minimum API version is now 100 * Remove old API features - Anything below API v100 no longer supported * Reefactor attachment widget to support modern attachment API * Filter and display attachments correctly * Refactor
This commit is contained in:
@@ -106,7 +106,10 @@ class InvenTreeCompanyAttachment extends InvenTreeAttachment {
|
||||
String get REFERENCE_FIELD => "company";
|
||||
|
||||
@override
|
||||
String get URL => "company/attachment/";
|
||||
String get REF_MODEL_TYPE => "company";
|
||||
|
||||
@override
|
||||
String get URL => InvenTreeAPI().supportsModernAttachments ? "attachment/" : "company/attachment/";
|
||||
|
||||
@override
|
||||
InvenTreeModel createFromJson(Map<String, dynamic> json) => InvenTreeCompanyAttachment.fromJson(json);
|
||||
|
||||
Reference in New Issue
Block a user