Schedule send
This commit is contained in:
parent
43a9df00e5
commit
9ae280f3b7
|
|
@ -75,11 +75,11 @@ abstract class ScheduleEntity extends Object
|
|||
ScheduleEntity._();
|
||||
|
||||
static const TEMPLATE_EMAIL_STATEMENT = 'email_statement';
|
||||
static const TEMPLATE_SCHEDULE_ENTITY = 'schedule_entity';
|
||||
static const TEMPLATE_EMAIL_RECORD = 'email_record';
|
||||
|
||||
static const TEMPLATES = [
|
||||
TEMPLATE_EMAIL_STATEMENT,
|
||||
TEMPLATE_SCHEDULE_ENTITY,
|
||||
TEMPLATE_EMAIL_RECORD,
|
||||
];
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ Future handleCreditAction(
|
|||
createEntity(
|
||||
context: context,
|
||||
entity: ScheduleEntity().rebuild((b) => b
|
||||
..template = ScheduleEntity.TEMPLATE_SCHEDULE_ENTITY
|
||||
..template = ScheduleEntity.TEMPLATE_EMAIL_RECORD
|
||||
..parameters.entityType = EntityType.credit.apiValue
|
||||
..parameters.entityId = credit.id));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -659,7 +659,7 @@ void handleInvoiceAction(BuildContext context, List<BaseEntity> invoices,
|
|||
createEntity(
|
||||
context: context,
|
||||
entity: ScheduleEntity().rebuild((b) => b
|
||||
..template = ScheduleEntity.TEMPLATE_SCHEDULE_ENTITY
|
||||
..template = ScheduleEntity.TEMPLATE_EMAIL_RECORD
|
||||
..parameters.entityType = EntityType.invoice.apiValue
|
||||
..parameters.entityId = invoice.id));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -752,7 +752,7 @@ void handlePurchaseOrderAction(BuildContext context,
|
|||
createEntity(
|
||||
context: context,
|
||||
entity: ScheduleEntity().rebuild((b) => b
|
||||
..template = ScheduleEntity.TEMPLATE_SCHEDULE_ENTITY
|
||||
..template = ScheduleEntity.TEMPLATE_EMAIL_RECORD
|
||||
..parameters.entityType = EntityType.purchaseOrder.apiValue
|
||||
..parameters.entityId = purchaseOrder.id));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -603,7 +603,7 @@ Future handleQuoteAction(
|
|||
createEntity(
|
||||
context: context,
|
||||
entity: ScheduleEntity().rebuild((b) => b
|
||||
..template = ScheduleEntity.TEMPLATE_SCHEDULE_ENTITY
|
||||
..template = ScheduleEntity.TEMPLATE_EMAIL_RECORD
|
||||
..parameters.entityType = EntityType.quote.apiValue
|
||||
..parameters.entityId = quote.id));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -170,11 +170,7 @@ class _ScheduleEditState extends State<ScheduleEdit> {
|
|||
items: ScheduleEntity.TEMPLATES
|
||||
.map((entry) => DropdownMenuItem(
|
||||
value: entry,
|
||||
child: Text(entry ==
|
||||
ScheduleEntity
|
||||
.TEMPLATE_SCHEDULE_ENTITY
|
||||
? localization.emailRecord
|
||||
: localization.lookup(entry)),
|
||||
child: Text(localization.lookup(entry)),
|
||||
))
|
||||
.toList()),
|
||||
DatePicker(
|
||||
|
|
@ -190,7 +186,7 @@ class _ScheduleEditState extends State<ScheduleEdit> {
|
|||
: null,
|
||||
),
|
||||
if (schedule.template !=
|
||||
ScheduleEntity.TEMPLATE_SCHEDULE_ENTITY) ...[
|
||||
ScheduleEntity.TEMPLATE_EMAIL_RECORD) ...[
|
||||
AppDropdownButton<String>(
|
||||
labelText: localization.frequency,
|
||||
value: schedule.frequencyId,
|
||||
|
|
@ -334,7 +330,7 @@ class _ScheduleEditState extends State<ScheduleEdit> {
|
|||
],
|
||||
)
|
||||
] else if (schedule.template ==
|
||||
ScheduleEntity.TEMPLATE_SCHEDULE_ENTITY) ...[
|
||||
ScheduleEntity.TEMPLATE_EMAIL_RECORD) ...[
|
||||
FormCard(
|
||||
children: [
|
||||
AppDropdownButton<String>(
|
||||
|
|
|
|||
|
|
@ -41,9 +41,7 @@ class ScheduleListItem extends StatelessWidget {
|
|||
|
||||
final filterMatch = filter != null && filter.isNotEmpty
|
||||
? schedule.matchesFilterValue(filter)
|
||||
: (schedule.template == ScheduleEntity.TEMPLATE_SCHEDULE_ENTITY
|
||||
? localization.emailRecord
|
||||
: localization.lookup(schedule.template)) +
|
||||
: localization.lookup(schedule.template) +
|
||||
(schedule.frequencyId.isEmpty
|
||||
? ''
|
||||
: ' • ' +
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
'en': {
|
||||
// STARTER: lang key - do not remove comment
|
||||
'email_record': 'Email Record',
|
||||
'schedule_entity': 'Schedule Entity',
|
||||
'invoice_product_columns': 'Invoice Product Columns',
|
||||
'quote_product_columns': 'Quote Product Columns',
|
||||
'minimum_payment_amount': 'Minimum Payment Amount',
|
||||
|
|
@ -97399,10 +97398,6 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
_localizedValues[localeCode]['quote_product_columns'] ??
|
||||
_localizedValues['en']['quote_product_columns'];
|
||||
|
||||
String get scheduleEntity =>
|
||||
_localizedValues[localeCode]['schedule_entity'] ??
|
||||
_localizedValues['en']['schedule_entity'];
|
||||
|
||||
String get emailRecord =>
|
||||
_localizedValues[localeCode]['email_record'] ??
|
||||
_localizedValues['en']['email_record'];
|
||||
|
|
|
|||
Loading…
Reference in New Issue