mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 06:40:31 +00:00
fix: Display country name
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.576.0",
|
||||
"@aws-sdk/s3-request-presigner": "^3.583.0",
|
||||
"@bigcapital/utils": "*",
|
||||
"@casl/ability": "^5.4.3",
|
||||
"@hapi/boom": "^7.4.3",
|
||||
"@lemonsqueezy/lemonsqueezy.js": "^2.2.0",
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
organizationAddressTextFormat,
|
||||
} from '@/utils/address-text-format';
|
||||
import BaseModel from 'models/Model';
|
||||
import { findByIsoCountryCode } from '@bigcapital/utils';
|
||||
import { getUploadedObjectUri } from '../../services/Attachments/utils';
|
||||
|
||||
export default class TenantMetadata extends BaseModel {
|
||||
@@ -70,6 +71,8 @@ export default class TenantMetadata extends BaseModel {
|
||||
* @returns {string}
|
||||
*/
|
||||
public get addressTextFormatted() {
|
||||
const addressCountry = findByIsoCountryCode(this.location);
|
||||
|
||||
return organizationAddressTextFormat(defaultOrganizationAddressFormat, {
|
||||
organizationName: this.name,
|
||||
address1: this.address?.address1,
|
||||
@@ -78,7 +81,7 @@ export default class TenantMetadata extends BaseModel {
|
||||
city: this.address?.city,
|
||||
postalCode: this.address?.postalCode,
|
||||
phone: this.address?.phone,
|
||||
country: 'United State',
|
||||
country: addressCountry?.name ?? '',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user