Add run_template action

This commit is contained in:
Hillel Coren 2023-11-19 13:37:37 +02:00
parent 3c5c8dfc7e
commit 15416d5f3d
3 changed files with 14 additions and 0 deletions

View File

@ -135,6 +135,7 @@ class EntityAction extends EnumClass {
static const EntityAction setTaxCategory = _$setTaxCategory;
static const EntityAction eInvoice = _$eInvoice;
static const EntityAction unlink = _$unlink;
static const EntityAction runTemplate = _$runTemplate;
@override
String toString() {
@ -179,6 +180,10 @@ class EntityAction extends EnumClass {
String toApiParam() {
final value = toString();
if (this == EntityAction.runTemplate) {
return 'template';
}
if (this == EntityAction.sendEmail || this == EntityAction.bulkSendEmail) {
return 'email';
} else if (this == EntityAction.cancelInvoice) {

View File

@ -100,6 +100,7 @@ const EntityAction _$increasePrices = const EntityAction._('increasePrices');
const EntityAction _$setTaxCategory = const EntityAction._('setTaxCategory');
const EntityAction _$eInvoice = const EntityAction._('eInvoice');
const EntityAction _$unlink = const EntityAction._('unlink');
const EntityAction _$runTemplate = const EntityAction._('runTemplate');
EntityAction _$valueOf(String name) {
switch (name) {
@ -269,6 +270,8 @@ EntityAction _$valueOf(String name) {
return _$eInvoice;
case 'unlink':
return _$unlink;
case 'runTemplate':
return _$runTemplate;
default:
throw new ArgumentError(name);
}
@ -359,6 +362,7 @@ final BuiltSet<EntityAction> _$values =
_$setTaxCategory,
_$eInvoice,
_$unlink,
_$runTemplate,
]);
Serializer<EntityAction> _$entityActionSerializer =

View File

@ -18,6 +18,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = {
'en': {
// STARTER: lang key - do not remove comment
'run_template': 'Run Template',
'task_extension_banner': 'Add the Chrome extension to manage your tasks',
'watch_video': 'Watch Video',
'view_extension': 'View Extension',
@ -109995,6 +109996,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
_localizedValues[localeCode]!['view_extension'] ??
_localizedValues['en']!['view_extension']!;
String get runTemplate =>
_localizedValues[localeCode]!['run_template'] ??
_localizedValues['en']!['run_template']!;
// STARTER: lang field - do not remove comment
String lookup(String? key) {