Change client portal to vendor portal for POs

This commit is contained in:
Hillel Coren 2022-08-04 19:02:19 +03:00
parent 35cf4edcf5
commit 3de53667d0
6 changed files with 17 additions and 2 deletions

View File

@ -1061,9 +1061,13 @@ abstract class InvoiceEntity extends Object
} }
if (!multiselect) { if (!multiselect) {
if (isPurchaseOrder) {
actions.add(EntityAction.vendorPortal);
} else {
actions.add(EntityAction.clientPortal); actions.add(EntityAction.clientPortal);
} }
} }
}
if (!isDeleted && multiselect) { if (!isDeleted && multiselect) {
actions.add(EntityAction.documents); actions.add(EntityAction.documents);

View File

@ -86,6 +86,7 @@ class EntityAction extends EnumClass {
static const EntityAction newVendor = _$newVendor; static const EntityAction newVendor = _$newVendor;
static const EntityAction newPurchaseOrder = _$newPurchaseOrder; static const EntityAction newPurchaseOrder = _$newPurchaseOrder;
static const EntityAction clientPortal = _$clientPortal; static const EntityAction clientPortal = _$clientPortal;
static const EntityAction vendorPortal = _$vendorPortal;
static const EntityAction newPayment = _$newPayment; static const EntityAction newPayment = _$newPayment;
static const EntityAction settings = _$settings; static const EntityAction settings = _$settings;
static const EntityAction refundPayment = _$refundPayment; static const EntityAction refundPayment = _$refundPayment;

View File

@ -52,6 +52,7 @@ const EntityAction _$newVendor = const EntityAction._('newVendor');
const EntityAction _$newPurchaseOrder = const EntityAction _$newPurchaseOrder =
const EntityAction._('newPurchaseOrder'); const EntityAction._('newPurchaseOrder');
const EntityAction _$clientPortal = const EntityAction._('clientPortal'); const EntityAction _$clientPortal = const EntityAction._('clientPortal');
const EntityAction _$vendorPortal = const EntityAction._('vendorPortal');
const EntityAction _$newPayment = const EntityAction._('newPayment'); const EntityAction _$newPayment = const EntityAction._('newPayment');
const EntityAction _$settings = const EntityAction._('settings'); const EntityAction _$settings = const EntityAction._('settings');
const EntityAction _$refundPayment = const EntityAction._('refundPayment'); const EntityAction _$refundPayment = const EntityAction._('refundPayment');
@ -164,6 +165,8 @@ EntityAction _$valueOf(String name) {
return _$newPurchaseOrder; return _$newPurchaseOrder;
case 'clientPortal': case 'clientPortal':
return _$clientPortal; return _$clientPortal;
case 'vendorPortal':
return _$vendorPortal;
case 'newPayment': case 'newPayment':
return _$newPayment; return _$newPayment;
case 'settings': case 'settings':
@ -268,6 +271,7 @@ final BuiltSet<EntityAction> _$values =
_$newVendor, _$newVendor,
_$newPurchaseOrder, _$newPurchaseOrder,
_$clientPortal, _$clientPortal,
_$vendorPortal,
_$newPayment, _$newPayment,
_$settings, _$settings,
_$refundPayment, _$refundPayment,

View File

@ -666,7 +666,7 @@ void handlePurchaseOrderAction(BuildContext context,
} }
} }
break; break;
case EntityAction.clientPortal: case EntityAction.vendorPortal:
launchUrl(Uri.parse(purchaseOrder.invitationSilentLink)); launchUrl(Uri.parse(purchaseOrder.invitationSilentLink));
break; break;
case EntityAction.sendEmail: case EntityAction.sendEmail:

View File

@ -16,6 +16,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = { static final Map<String, Map<String, String>> _localizedValues = {
'en': { 'en': {
// STARTER: lang key - do not remove comment // STARTER: lang key - do not remove comment
'vendor_portal': 'Vendor Portal',
'send_code': 'Send Code', 'send_code': 'Send Code',
'save_to_upload_documents': 'Save the record to upload documents', 'save_to_upload_documents': 'Save the record to upload documents',
'expense_tax_rates': 'Expense Tax Rates', 'expense_tax_rates': 'Expense Tax Rates',
@ -85271,6 +85272,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
_localizedValues[localeCode]['send_code'] ?? _localizedValues[localeCode]['send_code'] ??
_localizedValues['en']['send_code']; _localizedValues['en']['send_code'];
String get vendorPortal =>
_localizedValues[localeCode]['vendor_portal'] ??
_localizedValues['en']['vendor_portal'];
// STARTER: lang field - do not remove comment // STARTER: lang field - do not remove comment
String lookup(String key) { String lookup(String key) {

View File

@ -23,6 +23,7 @@ IconData getEntityActionIcon(EntityAction entityAction) {
case EntityAction.documents: case EntityAction.documents:
return Icons.download; return Icons.download;
case EntityAction.clientPortal: case EntityAction.clientPortal:
case EntityAction.vendorPortal:
return Icons.cloud_circle; return Icons.cloud_circle;
case EntityAction.clone: case EntityAction.clone:
case EntityAction.cloneToOther: case EntityAction.cloneToOther: