feat: add missed salutation and website columns.

This commit is contained in:
Ahmed Bouhuolia
2020-11-09 11:29:28 +02:00
parent 63951f7071
commit 347bc672fe
4 changed files with 22 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ export default class ContactsController extends BaseController {
*/
get contactDTOSchema(): ValidationChain[] {
return [
check('salutation').optional().trim().escape(),
check('first_name').optional().trim().escape(),
check('last_name').optional().trim().escape(),
@@ -14,6 +15,7 @@ export default class ContactsController extends BaseController {
check('display_name').exists().trim().escape(),
check('email').optional().isEmail().trim().escape(),
check('website').optional().trim().escape(),
check('work_phone').optional().trim().escape(),
check('personal_phone').optional().trim().escape(),

View File

@@ -12,6 +12,7 @@ exports.up = function(knex) {
table.decimal('opening_balance', 13, 3).defaultTo(0);
table.date('opening_balance_at');
table.string('salutation').nullable();
table.string('first_name').nullable();
table.string('last_name').nullable();
table.string('company_name').nullable();
@@ -21,9 +22,10 @@ exports.up = function(knex) {
table.string('email').nullable();
table.string('work_phone').nullable();
table.string('personal_phone').nullable();
table.string('website').nullable();
table.string('billing_address1').nullable();
table.string('billing_address2').nullable();
table.string('billing_address_1').nullable();
table.string('billing_address_2').nullable();
table.string('billing_address_city').nullable();
table.string('billing_address_country').nullable();
table.string('billing_address_email').nullable();

View File

@@ -52,12 +52,14 @@ export interface IContact extends IContactAddress{
openingBalance: number,
openingBalanceAt: Date,
salutation: string,
firstName: string,
lastName: string,
companyName: string,
displayName: string,
email: string,
website: string,
workPhone: string,
personalPhone: string,
@@ -72,26 +74,30 @@ export interface IContactNewDTO {
openingBalance?: number,
openingBalanceAt?: string,
salutation?: string,
firstName?: string,
lastName?: string,
companyName?: string,
displayName: string,
website?: string,
email?: string,
workPhone?: string,
personalPhone?: string,
note?: string,
active: boolean,
active: boolean,
}
export interface IContactEditDTO {
contactType?: string,
salutation?: string,
firstName?: string,
lastName?: string,
companyName?: string,
displayName: string,
website?: string,
email?: string,
workPhone?: string,
personalPhone?: string,
@@ -113,11 +119,13 @@ export interface ICustomerNewDTO extends IContactAddressDTO {
openingBalance?: number,
openingBalanceAt?: string,
salutation?: string,
firstName?: string,
lastName?: string,
companyName?: string,
displayName: string,
website?: string,
email?: string,
workPhone?: string,
personalPhone?: string,
@@ -128,11 +136,13 @@ export interface ICustomerNewDTO extends IContactAddressDTO {
export interface ICustomerEditDTO extends IContactAddressDTO {
customerType: string,
salutation?: string,
firstName?: string,
lastName?: string,
companyName?: string,
displayName: string,
website?: string,
email?: string,
workPhone?: string,
personalPhone?: string,
@@ -152,11 +162,13 @@ export interface IVendorNewDTO extends IContactAddressDTO {
openingBalance?: number,
openingBalanceAt?: string,
salutation?: string,
firstName?: string,
lastName?: string,
companyName?: string,
displayName: string,
website?: string,
email?: string,
workPhone?: string,
personalPhone?: string,
@@ -165,11 +177,13 @@ export interface IVendorNewDTO extends IContactAddressDTO {
active?: boolean,
};
export interface IVendorEditDTO extends IContactAddressDTO {
salutation?: string,
firstName?: string,
lastName?: string,
companyName?: string,
displayName?: string,
website?: string,
email?: string,
workPhone?: string,
personalPhone?: string,