Fix invoice actions
This commit is contained in:
parent
22696e4859
commit
150a119455
|
|
@ -66,7 +66,7 @@ class InvoiceFields {
|
|||
}
|
||||
|
||||
abstract class InvoiceEntity extends Object
|
||||
with BaseEntity, SelectableEntity, CalculateInvoiceTotal
|
||||
with BaseEntity, SelectableEntity, CalculateInvoiceTotal, BelongsToClient
|
||||
implements Built<InvoiceEntity, InvoiceEntityBuilder> {
|
||||
factory InvoiceEntity(
|
||||
{String id, bool isQuote = false, AppState state, ClientEntity client}) {
|
||||
|
|
@ -148,6 +148,7 @@ abstract class InvoiceEntity extends Object
|
|||
|
||||
double get balance;
|
||||
|
||||
@override
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'client_id')
|
||||
String get clientId;
|
||||
|
|
@ -600,6 +601,7 @@ abstract class InvoiceItemEntity
|
|||
@BuiltValueField(wireName: 'tax_rate3')
|
||||
double get taxRate3;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'invoice_item_type_id')
|
||||
String get invoiceItemTypeId;
|
||||
|
||||
|
|
|
|||
|
|
@ -594,9 +594,6 @@ class _$InvoiceItemEntitySerializer
|
|||
'tax_rate3',
|
||||
serializers.serialize(object.taxRate3,
|
||||
specifiedType: const FullType(double)),
|
||||
'invoice_item_type_id',
|
||||
serializers.serialize(object.invoiceItemTypeId,
|
||||
specifiedType: const FullType(String)),
|
||||
'custom_value1',
|
||||
serializers.serialize(object.customValue1,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -610,6 +607,12 @@ class _$InvoiceItemEntitySerializer
|
|||
serializers.serialize(object.createdAt,
|
||||
specifiedType: const FullType(int)),
|
||||
];
|
||||
if (object.invoiceItemTypeId != null) {
|
||||
result
|
||||
..add('invoice_item_type_id')
|
||||
..add(serializers.serialize(object.invoiceItemTypeId,
|
||||
specifiedType: const FullType(String)));
|
||||
}
|
||||
if (object.customValue3 != null) {
|
||||
result
|
||||
..add('custom_value3')
|
||||
|
|
@ -1943,10 +1946,6 @@ class _$InvoiceItemEntity extends InvoiceItemEntity {
|
|||
if (taxRate3 == null) {
|
||||
throw new BuiltValueNullFieldError('InvoiceItemEntity', 'taxRate3');
|
||||
}
|
||||
if (invoiceItemTypeId == null) {
|
||||
throw new BuiltValueNullFieldError(
|
||||
'InvoiceItemEntity', 'invoiceItemTypeId');
|
||||
}
|
||||
if (customValue1 == null) {
|
||||
throw new BuiltValueNullFieldError('InvoiceItemEntity', 'customValue1');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class ProjectFields {
|
|||
}
|
||||
|
||||
abstract class ProjectEntity extends Object
|
||||
with BaseEntity, SelectableEntity
|
||||
with BaseEntity, SelectableEntity, BelongsToClient
|
||||
implements Built<ProjectEntity, ProjectEntityBuilder> {
|
||||
factory ProjectEntity({String id, AppState state}) {
|
||||
return _$ProjectEntity._(
|
||||
|
|
@ -86,6 +86,7 @@ abstract class ProjectEntity extends Object
|
|||
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@BuiltValueField(wireName: 'client_id')
|
||||
String get clientId;
|
||||
|
||||
|
|
|
|||
|
|
@ -115,6 +115,8 @@ class AuthRepository {
|
|||
];
|
||||
url += '?include=${includes.join(',')}&include_static=true';
|
||||
|
||||
//url += '?first_load=true&include_static=true';
|
||||
|
||||
dynamic response;
|
||||
|
||||
if (Config.DEMO_MODE) {
|
||||
|
|
|
|||
|
|
@ -241,6 +241,9 @@ class InvoiceNinjaAppState extends State<InvoiceNinjaApp> {
|
|||
final accentColor = convertHexStringToColor(state.accentColor) ??
|
||||
Colors.lightBlueAccent;
|
||||
final fontFamily = kIsWeb ? 'Roboto' : null;
|
||||
final pageTransitionsTheme = PageTransitionsTheme(builders: {
|
||||
TargetPlatform.android: ZoomPageTransitionsBuilder(),
|
||||
});
|
||||
Intl.defaultLocale = localeSelector(state);
|
||||
|
||||
return MaterialApp(
|
||||
|
|
@ -261,12 +264,14 @@ class InvoiceNinjaAppState extends State<InvoiceNinjaApp> {
|
|||
locale: AppLocalization.createLocale(localeSelector(state)),
|
||||
theme: state.prefState.enableDarkMode
|
||||
? ThemeData(
|
||||
pageTransitionsTheme: pageTransitionsTheme,
|
||||
brightness: Brightness.dark,
|
||||
accentColor: accentColor,
|
||||
textSelectionHandleColor: accentColor,
|
||||
fontFamily: fontFamily,
|
||||
)
|
||||
: ThemeData(fontFamily: fontFamily).copyWith(
|
||||
pageTransitionsTheme: pageTransitionsTheme,
|
||||
accentColor: accentColor,
|
||||
textSelectionColor: accentColor,
|
||||
primaryColor: const Color(0xFF117cc1),
|
||||
|
|
|
|||
Loading…
Reference in New Issue