mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'bugfix/activity-fix-location-visibility' into issue279_accompanying_period_validation
This commit is contained in:
commit
b1b9acc686
@ -12,6 +12,7 @@ and this project adheres to
|
||||
|
||||
<!-- write down unreleased development here -->
|
||||
* [person] add validator for accompanying period with a test on social issues (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/76)
|
||||
* [activity] fix visibility for location
|
||||
|
||||
## Test releases
|
||||
|
||||
|
@ -163,16 +163,6 @@ class ActivityType
|
||||
*/
|
||||
private int $personVisible = self::FIELD_REQUIRED;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
private string $placeLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
private int $placeVisible = self::FIELD_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
@ -406,16 +396,6 @@ class ActivityType
|
||||
return $this->personVisible;
|
||||
}
|
||||
|
||||
public function getPlaceLabel(): string
|
||||
{
|
||||
return $this->placeLabel;
|
||||
}
|
||||
|
||||
public function getPlaceVisible(): int
|
||||
{
|
||||
return $this->placeVisible;
|
||||
}
|
||||
|
||||
public function getReasonsLabel(): string
|
||||
{
|
||||
return $this->reasonsLabel;
|
||||
@ -688,20 +668,6 @@ class ActivityType
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setPlaceLabel(string $placeLabel): self
|
||||
{
|
||||
$this->placeLabel = $placeLabel;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setPlaceVisible(int $placeVisible): self
|
||||
{
|
||||
$this->placeVisible = $placeVisible;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setReasonsLabel(string $reasonsLabel): self
|
||||
{
|
||||
$this->reasonsLabel = $reasonsLabel;
|
||||
|
@ -143,7 +143,7 @@ class ActivityType extends AbstractType
|
||||
|
||||
return array_map(
|
||||
fn (string $id): ?SocialIssue => $this->om->getRepository(SocialIssue::class)->findOneBy(['id' => (int) $id]),
|
||||
explode(',', (string) $socialIssuesAsString)
|
||||
explode(',', $socialIssuesAsString)
|
||||
);
|
||||
}
|
||||
));
|
||||
@ -169,7 +169,7 @@ class ActivityType extends AbstractType
|
||||
|
||||
return array_map(
|
||||
fn (string $id): ?SocialAction => $this->om->getRepository(SocialAction::class)->findOneBy(['id' => (int) $id]),
|
||||
explode(',', (string) $socialActionsAsString)
|
||||
explode(',', $socialActionsAsString)
|
||||
);
|
||||
}
|
||||
));
|
||||
|
@ -55,7 +55,7 @@ class ActivityTypeType extends AbstractType
|
||||
]);
|
||||
|
||||
$fields = [
|
||||
'persons', 'user', 'date', 'place', 'persons',
|
||||
'persons', 'user', 'date', 'location', 'persons',
|
||||
'thirdParties', 'durationTime', 'travelTime', 'attendee',
|
||||
'reasons', 'comment', 'sentReceived', 'documents',
|
||||
'emergency', 'socialIssues', 'socialActions', 'users',
|
||||
|
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\Migrations\Activity;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20211207152023 extends AbstractMigration
|
||||
{
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->throwIrreversibleMigrationException('placevisible and placelabel could not be created');
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'DROP place visible and place label, which are replaced by location';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE activitytype DROP placevisible');
|
||||
$this->addSql('ALTER TABLE activitytype DROP placelabel');
|
||||
}
|
||||
}
|
@ -146,8 +146,8 @@ User visible: Visibilité du champ Utilisateur
|
||||
User label: Libellé du champ Utilisateur
|
||||
Date visible: Visibilité du champ Date
|
||||
Date label: Libellé du champ Date
|
||||
Place visible: Visibilité du champ Lieu
|
||||
Place label: Libellé du champ Lieu
|
||||
Location visible: Visibilité du champ Lieu
|
||||
Location label: Libellé du champ Lieu
|
||||
Third parties visible: Visibilité du champ Tiers
|
||||
Third parties label: Libellé du champ Tiers
|
||||
Duration time visible: Visibilité du champ Durée
|
||||
|
Loading…
x
Reference in New Issue
Block a user