Live PDF preview
This commit is contained in:
parent
d0ded06513
commit
1853971744
|
|
@ -9,6 +9,7 @@ import 'package:invoiceninja_flutter/data/models/quote_model.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/forms/decorated_form_field.dart';
|
import 'package:invoiceninja_flutter/ui/app/forms/decorated_form_field.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/completers.dart';
|
import 'package:invoiceninja_flutter/utils/completers.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||||
|
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||||
|
|
||||||
// Project imports:
|
// Project imports:
|
||||||
|
|
@ -77,6 +78,10 @@ class _InvoiceDesignState extends State<InvoiceDesign>
|
||||||
|
|
||||||
int tabs = 6;
|
int tabs = 6;
|
||||||
|
|
||||||
|
if (true || isMobile(context)) {
|
||||||
|
tabs++;
|
||||||
|
}
|
||||||
|
|
||||||
[
|
[
|
||||||
EntityType.invoice,
|
EntityType.invoice,
|
||||||
EntityType.quote,
|
EntityType.quote,
|
||||||
|
|
@ -176,6 +181,7 @@ class _InvoiceDesignState extends State<InvoiceDesign>
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
tabs: [
|
tabs: [
|
||||||
Tab(text: localization.generalSettings),
|
Tab(text: localization.generalSettings),
|
||||||
|
Tab(text: localization.preview),
|
||||||
Tab(text: localization.clientDetails),
|
Tab(text: localization.clientDetails),
|
||||||
Tab(text: localization.companyDetails),
|
Tab(text: localization.companyDetails),
|
||||||
Tab(text: localization.companyAddress),
|
Tab(text: localization.companyAddress),
|
||||||
|
|
@ -206,7 +212,7 @@ class _InvoiceDesignState extends State<InvoiceDesign>
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 16, bottom: 10, left: 16),
|
padding: const EdgeInsets.only(right: 16, bottom: 10, left: 16),
|
||||||
child: AppButton(
|
child: AppButton(
|
||||||
label: localization.customizeAndPreview.toUpperCase(),
|
label: localization.customize.toUpperCase(),
|
||||||
iconData: Icons.settings,
|
iconData: Icons.settings,
|
||||||
onPressed: () => state.designState.customDesigns.isEmpty
|
onPressed: () => state.designState.customDesigns.isEmpty
|
||||||
? createEntity(
|
? createEntity(
|
||||||
|
|
@ -534,6 +540,7 @@ class _InvoiceDesignState extends State<InvoiceDesign>
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
_PdfPreview(),
|
||||||
/*
|
/*
|
||||||
ScrollableListView(
|
ScrollableListView(
|
||||||
padding: const EdgeInsets.all(10),
|
padding: const EdgeInsets.all(10),
|
||||||
|
|
@ -1044,3 +1051,12 @@ class _InvoiceDesignState extends State<InvoiceDesign>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class _PdfPreview extends StatelessWidget {
|
||||||
|
const _PdfPreview({Key key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Placeholder();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1126,7 +1126,6 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
'client_registration': 'Client Registration',
|
'client_registration': 'Client Registration',
|
||||||
'client_registration_help':
|
'client_registration_help':
|
||||||
'Enable clients to self register in the portal',
|
'Enable clients to self register in the portal',
|
||||||
'customize_and_preview': 'Customize & Preview',
|
|
||||||
'email_invoice': 'Email Invoice',
|
'email_invoice': 'Email Invoice',
|
||||||
'email_quote': 'Email Quote',
|
'email_quote': 'Email Quote',
|
||||||
'email_credit': 'Email Credit',
|
'email_credit': 'Email Credit',
|
||||||
|
|
@ -90947,9 +90946,6 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
String get emailPayment =>
|
String get emailPayment =>
|
||||||
_localizedValues[localeCode]['email_payment'] ?? '';
|
_localizedValues[localeCode]['email_payment'] ?? '';
|
||||||
|
|
||||||
String get customizeAndPreview =>
|
|
||||||
_localizedValues[localeCode]['customize_and_preview'] ?? '';
|
|
||||||
|
|
||||||
String get clientRegistration =>
|
String get clientRegistration =>
|
||||||
_localizedValues[localeCode]['client_registration'] ?? '';
|
_localizedValues[localeCode]['client_registration'] ?? '';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue