Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Oct 28, 2023
2 parents 1eb028e + 16ccd02 commit be49790
Show file tree
Hide file tree
Showing 19 changed files with 155 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
rm ./public/index.html
git add .
git commit -m 'Admin Portal - Hosted'
#git push
git push
cd ..
#sentry-cli --auth-token ${{secrets.sentry_auth_token}} --url ${{secrets.sentry_url}} releases --project ${{secrets.sentry_project}} --org ${{secrets.sentry_org}} files $SENTRY_RELEASE upload-sourcemaps . --ext dart --rewrite
Expand Down
8 changes: 8 additions & 0 deletions lib/data/models/client_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,14 @@ abstract class ClientContactEntity extends Object
}
}

String get emailOrFullName {
if (email.isNotEmpty) {
return email;
} else {
return fullName;
}
}

String get fullNameWithEmail {
String name = fullName;

Expand Down
2 changes: 2 additions & 0 deletions lib/data/models/company_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class CompanyFields {
static const String email = 'email';
static const String address1 = 'address1';
static const String address2 = 'address2';
static const String city = 'city';
static const String postalCode = 'postal_code';
static const String country = 'country';
static const String vatNumber = 'vat_number';
static const String idNumber = 'id_number';
Expand Down
2 changes: 1 addition & 1 deletion lib/data/models/entities.dart
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ class EmailTemplate extends EnumClass {
static const EmailTemplate payment = _$payment_email;
static const EmailTemplate payment_partial = _$payment_partial_email;
static const EmailTemplate credit = _$credit_email;
static const EmailTemplate purchase_order = _$purchase_order;
static const EmailTemplate statement = _$statement_email;
static const EmailTemplate reminder1 = _$reminder1_email;
static const EmailTemplate reminder2 = _$reminder2_email;
Expand All @@ -293,7 +294,6 @@ class EmailTemplate extends EnumClass {
static const EmailTemplate custom1 = _$custom1_email;
static const EmailTemplate custom2 = _$custom2_email;
static const EmailTemplate custom3 = _$custom3_email;
static const EmailTemplate purchase_order = _$purchase_order;

static BuiltSet<EmailTemplate> get values => _$templateValues;

Expand Down
8 changes: 4 additions & 4 deletions lib/data/models/entities.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/data/models/invoice_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ abstract class InvoiceEntity extends Object
final settings = getClientSettings(state, client);

double exchangeRate = 1;
if ((client?.currencyId ?? '').isNotEmpty) {
if (state != null && (client?.currencyId ?? '').isNotEmpty) {
exchangeRate = getExchangeRate(
state!.staticState.currencyMap,
state.staticState.currencyMap,
fromCurrencyId: state.company.currencyId,
toCurrencyId: client!.currencyId,
);
Expand Down
4 changes: 4 additions & 0 deletions lib/data/models/settings_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,8 @@ abstract class SettingsEntity
return emailSubjectReminder3;
case EmailTemplate.reminder_endless:
return emailSubjectReminderEndless;
case EmailTemplate.statement:
return emailSubjectStatement;
case EmailTemplate.custom1:
return emailSubjectCustom1;
case EmailTemplate.custom2:
Expand Down Expand Up @@ -917,6 +919,8 @@ abstract class SettingsEntity
return emailBodyReminder3;
case EmailTemplate.reminder_endless:
return emailBodyReminderEndless;
case EmailTemplate.statement:
return emailBodyStatement;
case EmailTemplate.custom1:
return emailBodyCustom1;
case EmailTemplate.custom2:
Expand Down
12 changes: 12 additions & 0 deletions lib/data/models/vendor_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ abstract class VendorContactEntity extends Object
customValue3: '',
customValue4: '',
link: '',
password: '',
);
}

Expand Down Expand Up @@ -585,6 +586,8 @@ abstract class VendorContactEntity extends Object

String get phone;

String get password;

@BuiltValueField(wireName: 'custom_value1')
String get customValue1;

Expand Down Expand Up @@ -613,6 +616,14 @@ abstract class VendorContactEntity extends Object
}
}

String get emailOrFullName {
if (email.isNotEmpty) {
return email;
} else {
return fullName;
}
}

String get fullNameWithEmail {
String name = fullName;

Expand Down Expand Up @@ -665,6 +676,7 @@ abstract class VendorContactEntity extends Object
static void _initializeBuilder(VendorContactEntityBuilder builder) => builder
..sendEmail = true
..link = ''
..password = ''
..customValue1 = ''
..customValue2 = ''
..customValue3 = ''
Expand Down
29 changes: 25 additions & 4 deletions lib/data/models/vendor_model.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 0 additions & 37 deletions lib/generated_plugin_registrant.dart

This file was deleted.

6 changes: 5 additions & 1 deletion lib/redux/ui/pref_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ abstract class PrefState implements Built<PrefState, PrefStateBuilder> {
persistData: false,
persistUI: true,
enableNativeBrowser: false,
donwloadsFolder: '',
statementIncludes: BuiltList(<String>[kStatementIncludePayments]),
companyPrefs: BuiltMap<String, CompanyPrefState>(),
sortFields: BuiltMap<EntityType, PrefStateSortField>(),
Expand Down Expand Up @@ -175,6 +176,8 @@ abstract class PrefState implements Built<PrefState, PrefStateBuilder> {

double get textScaleFactor;

String get donwloadsFolder;

BuiltMap<EntityType, PrefStateSortField> get sortFields;

bool get enableDarkMode => darkModeType == kBrightnessSytem
Expand Down Expand Up @@ -284,7 +287,8 @@ abstract class PrefState implements Built<PrefState, PrefStateBuilder> {
..darkModeType = kBrightnessSytem
..colorTheme = kColorThemeLight
..darkColorTheme = kColorThemeDark
..enableDarkModeSystem = false;
..enableDarkModeSystem = false
..donwloadsFolder = '';

static Serializer<PrefState> get serializer => _$prefStateSerializer;
}
Expand Down
Loading

0 comments on commit be49790

Please sign in to comment.