Update models
This commit is contained in:
parent
2c3863eb00
commit
8d08df504d
|
|
@ -294,10 +294,6 @@ abstract class ExpenseEntity extends Object
|
|||
}
|
||||
}
|
||||
|
||||
if (isInvoiced && !multiselect) {
|
||||
actions.add(EntityAction.viewInvoice);
|
||||
}
|
||||
|
||||
if (userCompany.canCreate(EntityType.task) && !multiselect) {
|
||||
actions.add(EntityAction.clone);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,8 +70,6 @@ class EntityAction extends EnumClass {
|
|||
static const EntityAction newExpense = _$newExpense;
|
||||
static const EntityAction newProject = _$newProject;
|
||||
static const EntityAction newTask = _$newTask;
|
||||
static const EntityAction viewInvoice = _$viewInvoice;
|
||||
static const EntityAction viewQuote = _$viewQuote;
|
||||
static const EntityAction clientPortal = _$clientPortal;
|
||||
static const EntityAction newPayment = _$newPayment;
|
||||
static const EntityAction settings = _$settings;
|
||||
|
|
|
|||
|
|
@ -516,10 +516,6 @@ abstract class TaskEntity extends Object
|
|||
}
|
||||
|
||||
if (!multiselect) {
|
||||
if (isInvoiced) {
|
||||
actions.add(EntityAction.viewInvoice);
|
||||
}
|
||||
|
||||
if (userCompany.canCreate(EntityType.task)) {
|
||||
actions.add(EntityAction.clone);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -424,13 +424,6 @@ Future handleCreditAction(
|
|||
forceSafariVC: false, forceWebView: false);
|
||||
}
|
||||
break;
|
||||
case EntityAction.viewInvoice:
|
||||
viewEntityById(
|
||||
context: context,
|
||||
// TODO fix this
|
||||
// entityId: credit.creditInvoiceId,
|
||||
entityType: EntityType.invoice);
|
||||
break;
|
||||
case EntityAction.markSent:
|
||||
store.dispatch(MarkSentCreditRequest(
|
||||
snackBarCompleter<Null>(context, localization.markedCreditAsSent),
|
||||
|
|
|
|||
|
|
@ -288,12 +288,6 @@ void handleExpenseAction(
|
|||
..lineItems.addAll(items)));
|
||||
}
|
||||
break;
|
||||
case EntityAction.viewInvoice:
|
||||
viewEntityById(
|
||||
context: context,
|
||||
entityType: EntityType.invoice,
|
||||
entityId: expense.invoiceId);
|
||||
break;
|
||||
case EntityAction.restore:
|
||||
final message = expenseIds.length > 1
|
||||
? localization.restoredExpenses
|
||||
|
|
|
|||
|
|
@ -443,12 +443,6 @@ Future handleQuoteAction(
|
|||
forceSafariVC: false, forceWebView: false);
|
||||
}
|
||||
break;
|
||||
case EntityAction.viewInvoice:
|
||||
viewEntityById(
|
||||
context: context,
|
||||
entityId: quote.invoiceId,
|
||||
entityType: EntityType.invoice);
|
||||
break;
|
||||
case EntityAction.convert:
|
||||
store.dispatch(ConvertQuotes(
|
||||
snackBarCompleter<Null>(context, localization.convertedQuote),
|
||||
|
|
|
|||
|
|
@ -337,12 +337,6 @@ void handleTaskAction(
|
|||
..lineItems.addAll(items)));
|
||||
}
|
||||
break;
|
||||
case EntityAction.viewInvoice:
|
||||
viewEntityById(
|
||||
context: context,
|
||||
entityType: EntityType.invoice,
|
||||
entityId: task.invoiceId);
|
||||
break;
|
||||
case EntityAction.clone:
|
||||
createEntity(context: context, entity: task.clone);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class _ExpenseViewState extends State<ExpenseView>
|
|||
entity: expense,
|
||||
action1: EntityAction.clone,
|
||||
action2: expense.isInvoiced
|
||||
? EntityAction.viewInvoice
|
||||
? EntityAction.archive
|
||||
: EntityAction.newInvoice,
|
||||
)
|
||||
],
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class _TaskViewState extends State<TaskView>
|
|||
? EntityAction.start
|
||||
: EntityAction.resume,
|
||||
action2: task.isInvoiced
|
||||
? EntityAction.viewInvoice
|
||||
? EntityAction.archive
|
||||
: EntityAction.newInvoice,
|
||||
action1Enabled: !task.isInvoiced,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ IconData getEntityActionIcon(EntityAction entityAction) {
|
|||
return Icons.content_copy;
|
||||
case EntityAction.approve:
|
||||
return Icons.check_circle_outline;
|
||||
case EntityAction.viewInvoice:
|
||||
return Icons.insert_drive_file;
|
||||
case EntityAction.newInvoice:
|
||||
case EntityAction.newExpense:
|
||||
case EntityAction.newTask:
|
||||
|
|
|
|||
Loading…
Reference in New Issue