mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-15 19:55:27 +00:00
Project code support (#336)
* Determine if project codes are supported * Add helpers for boolean functions * Adds helper methods for generic "model" class - Will allow us to do some good refactoring * Refactor the refactor * Add debug support and getMap function * Major refactoring for model data accessors * Handle null values * Add sentry reporting if key is used incorrectly * Fix typo * Refactor createFromJson function * Add model for ProjectCode * Display and edit project code for purchase orders
This commit is contained in:
@ -15,6 +15,7 @@ import "package:inventree/l10.dart";
|
||||
|
||||
import "package:inventree/inventree/company.dart";
|
||||
import "package:inventree/inventree/part.dart";
|
||||
import "package:inventree/inventree/project_code.dart";
|
||||
import "package:inventree/inventree/sentry.dart";
|
||||
import "package:inventree/inventree/stock.dart";
|
||||
|
||||
@ -667,6 +668,13 @@ class APIFormField {
|
||||
height: 40
|
||||
)
|
||||
);
|
||||
case "projectcode":
|
||||
var project_code = InvenTreeProjectCode.fromJson(data);
|
||||
return ListTile(
|
||||
title: Text(project_code.code),
|
||||
subtitle: Text(project_code.description),
|
||||
leading: FaIcon(FontAwesomeIcons.list)
|
||||
);
|
||||
default:
|
||||
return ListTile(
|
||||
title: Text(
|
||||
|
Reference in New Issue
Block a user