mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: hook up preferences branding form
This commit is contained in:
@@ -118,8 +118,8 @@ export default class OrganizationController extends BaseController {
|
||||
check('address.phone').optional().isString().trim(),
|
||||
|
||||
// # Branding
|
||||
check('primary_color').optional().isHexColor().trim(),
|
||||
check('logo_key').optional().isString().trim(),
|
||||
check('primary_color').optional({ nullable: true }).isHexColor().trim(),
|
||||
check('logo_key').optional({ nullable: true }).isString().trim(),
|
||||
|
||||
check('tax_number').optional({ nullable: true }).isString().trim(),
|
||||
];
|
||||
|
||||
@@ -41,4 +41,18 @@ export default class TenantMetadata extends BaseModel {
|
||||
static get tableName() {
|
||||
return 'tenants_metadata';
|
||||
}
|
||||
|
||||
/**
|
||||
* Virtual attributes.
|
||||
*/
|
||||
static get virtualAttributes() {
|
||||
return ['logoUri'];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public get logoUri() {
|
||||
return this.logoKey ? `https://bigcapital.sfo3.digitaloceanspaces.com/${this.logoKey}` : null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user