Added website field to client CSV import

This commit is contained in:
Hillel Coren 2016-07-04 21:33:50 +03:00
parent d051ae70ef
commit aba50f66dc
2 changed files with 7 additions and 0 deletions

View File

@ -85,6 +85,10 @@ class Client extends EntityModel
* @var string
*/
public static $fieldCountry = 'country';
/**
* @var string
*/
public static $fieldWebsite = 'website';
/**
* @return array
@ -101,6 +105,7 @@ class Client extends EntityModel
Client::$fieldPostalCode,
Client::$fieldCountry,
Client::$fieldNotes,
Client::$fieldWebsite,
Contact::$fieldFirstName,
Contact::$fieldLastName,
Contact::$fieldPhone,
@ -126,6 +131,7 @@ class Client extends EntityModel
'zip|postal|code' => 'postal_code',
'country' => 'country',
'note' => 'notes',
'site|website' => 'website',
];
}

View File

@ -27,6 +27,7 @@ class ClientTransformer extends BaseTransformer
'state' => $this->getString($data, 'state'),
'postal_code' => $this->getString($data, 'postal_code'),
'private_notes' => $this->getString($data, 'notes'),
'website' => $this->getString($data, 'website'),
'contacts' => [
[
'first_name' => $this->getString($data, 'first_name'),