Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e8348ec
Add main phone and main address form type for default display in gene…
Jul 6, 2017
990dca7
Add count on organizations or individuals tab
Jul 7, 2017
b18d3f3
Add missing translations
Jul 7, 2017
536f5f0
Fix bug when editing organization (address had wrong fields)
Jul 7, 2017
ae47d63
Stylefix
Jul 7, 2017
c30884b
Add unique check of organism email
Jul 7, 2017
b78f67f
Remove unused class Contact
Jul 7, 2017
8248345
Sort circle list in Organism
Jul 10, 2017
545ab1f
Stylefix
Jul 10, 2017
ba6fe25
Add type on circle for grouping feature
Jul 10, 2017
99c327c
WIP fake email
Jul 11, 2017
f408d8e
Add FOSJsRouting
Jul 11, 2017
7ec70ef
Merge branch 'wip-lisem' of https://github.com/libre-informatique/CRM…
Jul 11, 2017
a92fb89
Add FosJsRouting
Jul 11, 2017
27d76de
Merge branch 'wip-lisem' of https://github.com/libre-informatique/CRM…
Jul 11, 2017
2b1a2fc
Add FosJsRouting
Jul 11, 2017
1e37511
Remove unexpected dump
Jul 12, 2017
1353750
Remove code generator on create
Jul 12, 2017
29a2538
Check code not empty only if not new
Jul 12, 2017
e7ca555
Stylefix
Jul 12, 2017
d36a577
Remove unexpected console.info
Jul 13, 2017
361d5f9
Add default phone and address form
Jul 13, 2017
3553b9f
Reorder position form
Jul 13, 2017
b33c9dc
add space for concat
Jul 17, 2017
31e546a
Add trait HasCircle
Jul 17, 2017
98a917a
Merge branch 'wip-lisem' of https://github.com/libre-informatique/CRM…
Jul 17, 2017
6176457
Fix Style
Jul 17, 2017
7894a6e
Merge branch 'master' into wip-lisem
PapsOu Jul 18, 2017
e441456
Merge branch 'master' of github.com:libre-informatique/CRMBundle into…
Jul 18, 2017
3471c76
WIP : sorting of organism with name + first/lastname
Jul 20, 2017
c17f244
Add correct sorting with name, firstname, lastname
Jul 20, 2017
a7b0371
Add field name on show field template
Jul 20, 2017
b605815
Stylefix
Jul 20, 2017
0c630e5
Remove unused show link on addresses
Jul 20, 2017
99c3b0d
Add example about how to paramterize class name
Jul 25, 2017
0072bcb
Merge branch 'master' of github.com:libre-informatique/CRMBundle into…
Jul 26, 2017
fb7e37c
Add type field in configuration for circles
Jul 27, 2017
d01a7bd
Adapt for Sylius Interface Update
Jul 31, 2017
a3373be
Check if adresse exist before trying to show it (maybe not well done …
Aug 2, 2017
c55bdfc
set arrow align
Aug 4, 2017
dd5b164
Fix wrong check fo crm list code fields
Aug 21, 2017
0b50d38
Add fulltextName in search indexes
Aug 28, 2017
e886fcb
stylefix
Aug 28, 2017
ff40431
Move SearchIndex in configuration
Aug 29, 2017
ec1c13e
Remove static callback for organism fullname filter
Sep 1, 2017
35b3512
Add organism filter callback as service
Sep 1, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ $finder = PhpCsFixer\Finder::create()
$config = PhpCsFixer\Config::create()
->setRules(array(
'@Symfony' => true,
'binary_operator_spaces' => ['align_double_arrow' => true],
'concat_space' => ['spacing'=>'one']
))
->setFinder($finder);
Expand Down
13 changes: 0 additions & 13 deletions src/Admin/OrganismAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,4 @@ private function handlePositions($object)
}
}
}

public static function filterNameCallback($queryBuilder, $alias, $field, $value)
{
if (!$value['value']) {
return;
}
$queryBuilder->orWhere($queryBuilder->expr()->like($alias . '.name', ':value'));
$queryBuilder->orWhere($queryBuilder->expr()->like($alias . '.firstname', ':value'));
$queryBuilder->orWhere($queryBuilder->expr()->like($alias . '.lastname', ':value'));
$queryBuilder->setParameter('value', $value['value']);

return true;
}
}
1 change: 1 addition & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function getConfigTreeBuilder()
->scalarNode('description')->defaultNull()->end()
->scalarNode('createdAt')->defaultNull()->end()
->scalarNode('updatedAt')->defaultNull()->end()
->scalarNode('type')->defaultNull()->end()
->booleanNode('translatable')->defaultFalse()->end()
->end()
->end()
Expand Down
104 changes: 47 additions & 57 deletions src/Entity/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

/**
* Address.
* https://github.com/Sylius/Sylius/issues/8345 & https://ocramius.github.io/blog/fluent-interfaces-are-evil/
*/
class Address implements AddressInterface, VCardableInterface
{
Expand Down Expand Up @@ -106,11 +107,11 @@ public function initAddress()
public function __toString()
{
return sprintf(
'%s %s, %s %s',
$this->getFirstName(),
$this->getLastName(),
$this->getStreet(),
$this->getCountryCode()
'%s %s, %s %s',
$this->getFirstName(),
$this->getLastName(),
$this->getStreet(),
$this->getCountryCode()
);
}

Expand All @@ -119,37 +120,34 @@ public function __toString()
*
* @param string $firstName
*
* @return Address
*/
public function setFirstName($firstName)
public function setFirstName(?string $firstName): void
{
$this->firstName = $firstName;

return $this;
}

/**
* Get firstName.
*
* @return string
*/
public function getFirstName()
public function getFirstName(): ?string
{
return $this->firstName;
}

/**
* {@inheritdoc}
*/
public function getLastName()
public function getLastName(): ?string
{
return $this->lastName;
}

/**
* {@inheritdoc}
*/
public function setLastName($lastName)
public function setLastName(?string $lastName): void
{
$this->lastName = $lastName;
}
Expand All @@ -159,21 +157,18 @@ public function setLastName($lastName)
*
* @param string $postCode
*
* @return Address
*/
public function setPostCode($postCode)
public function setPostCode(?string $postCode): void
{
$this->postCode = $postCode;

return $this;
}

/**
* Get postCode.
*
* @return string
*/
public function getPostCode()
public function getPostCode(): ?string
{
return $this->postCode;
}
Expand All @@ -183,21 +178,18 @@ public function getPostCode()
*
* @param string $street
*
* @return Address
*/
public function setStreet($street)
public function setStreet(?string $street): void
{
$this->street = $street;

return $this;
}

/**
* Get street.
*
* @return string
*/
public function getStreet()
public function getStreet(): ?string
{
return $this->street;
}
Expand All @@ -207,21 +199,18 @@ public function getStreet()
*
* @param string $city
*
* @return Address
*/
public function setCity($city)
public function setCity(?string $city): void
{
$this->city = $city;

return $this;
}

/**
* Get city.
*
* @return string
*/
public function getCity()
public function getCity(): ?string
{
return $this->city;
}
Expand All @@ -231,21 +220,18 @@ public function getCity()
*
* @param string $countryCode
*
* @return Address
*/
public function setCountryCode($countryCode = null)
public function setCountryCode(?string $countryCode = null): void
{
$this->countryCode = $countryCode;

return $this;
}

/**
* Get countryCode.
*
* @return string
*/
public function getCountryCode()
public function getCountryCode(): ?string
{
return $this->countryCode;
}
Expand All @@ -255,21 +241,18 @@ public function getCountryCode()
*
* @param string $provinceCode
*
* @return Address
*/
public function setProvinceCode($provinceCode = null)
public function setProvinceCode(?string $provinceCode = null): void
{
$this->provinceCode = $provinceCode;

return $this;
}

/**
* Get provinceCode.
*
* @return string
*/
public function getProvinceCode()
public function getProvinceCode(): ?string
{
return $this->provinceCode;
}
Expand All @@ -279,21 +262,18 @@ public function getProvinceCode()
*
* @param string $provinceName
*
* @return Address
*/
public function setProvinceName($provinceName = null)
public function setProvinceName(?string $provinceName = null): void
{
$this->provinceName = $provinceName;

return $this;
}

/**
* Get provinceName.
*
* @return string
*/
public function getProvinceName()
public function getProvinceName(): ?string
{
return $this->provinceName;
}
Expand All @@ -303,37 +283,42 @@ public function getProvinceName()
*
* @param bool $npai
*
* @return Address
*/
public function setNpai($npai)
{
$this->npai = $npai;

return $this;
}

/**
* Is npai.
*
* @return bool
*/
public function isNpai()
{
return $this->npai;
}

/**
* Get npai.
*
* @return bool
*/
public function getNpai()
{
return $this->npai;
/* for retrocomp only */
return $this->isNpai();
}

/**
* Set vcardUid.
*
* @param string $vcardUid
*
* @return Address
*/
public function setVcardUid($vcardUid)
{
$this->vcardUid = $vcardUid;

return $this;
}

/**
Expand All @@ -351,13 +336,20 @@ public function getVcardUid()
*
* @param bool $confirmed
*
* @return Address
*/
public function setConfirmed($confirmed)
{
$this->confirmed = $confirmed;
}

return $this;
/**
* Is confirmed.
*
* @return bool
*/
public function isConfirmed()
{
return $this->confirmed;
}

/**
Expand All @@ -367,29 +359,27 @@ public function setConfirmed($confirmed)
*/
public function getConfirmed()
{
return $this->confirmed;
/* for retrocomp only */
return $this->isConfirmed();
}

/**
* Set organism.
*
* @param \Librinfo\CRMBundle\Entity\Organism $organism
*
* @return Address
*/
public function setOrganism(\Librinfo\CRMBundle\Entity\Organism $organism = null)
public function setOrganism(\Librinfo\CRMBundle\Entity\Organism $organism = null): void
{
$this->organism = $organism;

return $this;
}

/**
* Get organism.
*
* @return \Librinfo\CRMBundle\Entity\Organism
*/
public function getOrganism()
public function getOrganism(): ?\Librinfo\CRMBundle\Entity\Organism
{
return $this->organism;
}
Expand Down
1 change: 0 additions & 1 deletion src/Entity/AddressSearchIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@

class AddressSearchIndex extends SearchIndexEntity
{
public static $fields = ['lastName', 'firstName', 'postCode', 'street', 'city', 'countryCode', 'provinceCode', 'provinceName'];
}
3 changes: 0 additions & 3 deletions src/Entity/OrganismSearchIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@

class OrganismSearchIndex extends SearchIndexEntity
{
// TODO: this should go in the organism.orm.yml mapping file :
// find a way to override Doctrine ORM YamlDriver and ClassMetadata classes
public static $fields = ['name', 'firstname', 'lastname', 'description', 'email', 'url'];
}
3 changes: 0 additions & 3 deletions src/Entity/PositionSearchIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@

class PositionSearchIndex extends SearchIndexEntity
{
// TODO: this should go in the organism.orm.yml mapping file :
// find a way to override Doctrine ORM YamlDriver and ClassMetadata classes
public static $fields = ['label', 'description', 'email', 'department'];
}
Loading