Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BO - Signalement] Enlever le "ne sait pas" pour les info non remplies #2194

Merged
merged 28 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
db56015
remove NC/Ne sait pas #2177 #2178 #2179
numew Feb 1, 2024
032d7ad
fix based on comments #2179
numew Feb 1, 2024
3e49560
Merge branch 'develop' into feature/2179-bo-ne-sait-pas
numew Feb 1, 2024
45db90e
fix getBailDpeEtatDesLieux #2179
numew Feb 2, 2024
19a01e4
fix bailleurBeneficiaireFsl #2179
numew Feb 2, 2024
cf48be6
add new constraint #2171
sfinx13 Jan 31, 2024
3db8181
add new constraint in draft request #2171
sfinx13 Jan 31, 2024
2ae4b51
fix typo #2172
sfinx13 Feb 1, 2024
fb94a95
apply mandatory constraint for nom et prenom occupant #2170
sfinx13 Feb 1, 2024
ad1f221
filter autocomplete by cp submitted #2172
sfinx13 Feb 1, 2024
904bd94
do not compute surrocupation if superficie is null #2160
sfinx13 Feb 1, 2024
9f43f8c
fix feedback #2163 #2160
sfinx13 Feb 1, 2024
84b8215
add suivis when edit signalement #2054
hmeneuvrier Jan 22, 2024
75938f3
changes based on comments #2054
hmeneuvrier Jan 26, 2024
d3f4c6f
delete unuseful param #2054
hmeneuvrier Jan 29, 2024
673b998
add suivi only if modif #2054
hmeneuvrier Jan 30, 2024
0f276c8
change listener #2054
hmeneuvrier Jan 30, 2024
e3b3e32
delete unused function #2054
hmeneuvrier Feb 1, 2024
8f5545c
normalize esabora errors #1967
numew Jan 31, 2024
d86c9ad
fix condition #1967
numew Feb 1, 2024
feef133
adaptation for desordres_logement_chauffage_type_aucun #2183
hmeneuvrier Feb 1, 2024
00b7a11
display type of chauffage #2166
hmeneuvrier Feb 1, 2024
815a775
add enum for ChauffateType #2166
hmeneuvrier Feb 1, 2024
35d9c75
fix test #2179
numew Feb 2, 2024
26d18bc
Merge branch 'develop' into feature/2179-bo-ne-sait-pas
numew Feb 2, 2024
1952a96
fix based on comment #2179
numew Feb 5, 2024
fc891f0
use enum #2179
numew Feb 6, 2024
da31b61
fix pas_assurance_logement #2179
numew Feb 6, 2024
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: 0 additions & 1 deletion src/Dto/Request/Signalement/CompositionLogementRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public function __construct(
private readonly ?string $type = null,
#[Assert\NotBlank(message: 'Merci de préciser le type de logement autre.', groups: ['TYPE_LOGEMENT_AUTRE'])]
private readonly ?string $typeLogementNatureAutrePrecision = null,
#[Assert\NotBlank(['message' => 'Merci de définir si il y a plusieurs pièces dans le logement'])]
private readonly ?string $typeCompositionLogement = null,
#[Assert\NotBlank(message: 'Merci de saisir la superficie du logement.', groups: ['LOCATAIRE', 'BAILLEUR_OCCUPANT'])]
#[Assert\Positive(message: 'Merci de saisir une information numérique dans le champs de superficie.')]
Expand Down
1 change: 0 additions & 1 deletion src/Dto/Request/Signalement/SituationFoyerRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
class SituationFoyerRequest
{
public function __construct(
#[Assert\NotBlank(['message' => 'Veuillez définir le champ logement social'])]
private readonly ?string $isLogementSocial = null,
#[Assert\NotBlank(['message' => 'Veuillez définir le champ demande relogement', 'groups' => ['LOCATAIRE', 'BAILLEUR_OCCUPANT', 'TIERS_PARTICULIER', 'TIERS_PRO']])]
private readonly ?string $isRelogement = null,
Expand Down
8 changes: 4 additions & 4 deletions src/Entity/Model/InformationProcedure.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public function setInfoProcedureBailleurPrevenu(?string $infoProcedureBailleurPr
return $this;
}

public function getInfoProcedureAssuranceContactee(): ?string
public function getInfoProcedureAssuranceContactee(bool $raw = true): ?string
{
return $this->infoProcedureAssuranceContactee;
return (!$raw && 'pas_assurance_logement' === $this->infoProcedureAssuranceContactee) ? 'Pas d\'assurance logement' : $this->infoProcedureAssuranceContactee;
}

public function setInfoProcedureAssuranceContactee(?string $infoProcedureAssuranceContactee): self
Expand All @@ -39,9 +39,9 @@ public function setInfoProcedureAssuranceContactee(?string $infoProcedureAssuran
return $this;
}

public function getInfoProcedureDepartApresTravaux(): ?string
public function getInfoProcedureDepartApresTravaux(bool $raw = true): ?string
{
return $this->infoProcedureDepartApresTravaux;
return (!$raw && 'nsp' === $this->infoProcedureDepartApresTravaux) ? 'Ne sait pas' : $this->infoProcedureDepartApresTravaux;
}

public function setInfoProcedureDepartApresTravaux(?string $infoProcedureDepartApresTravaux): self
Expand Down
8 changes: 4 additions & 4 deletions src/Entity/Model/SituationFoyer.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ public function setLogementSocialNumeroAllocataire(?string $logementSocialNumero
return $this;
}

public function getTravailleurSocialQuitteLogement(): ?string
public function getTravailleurSocialQuitteLogement(bool $raw = true): ?string
{
return $this->travailleurSocialQuitteLogement;
return (!$raw && 'nsp' === $this->travailleurSocialQuitteLogement) ? 'Ne sait pas' : $this->travailleurSocialQuitteLogement;
}

public function setTravailleurSocialQuitteLogement(?string $travailleurSocialQuitteLogement): self
Expand All @@ -113,9 +113,9 @@ public function setTravailleurSocialAccompagnement(?string $travailleurSocialAcc
return $this;
}

public function getTravailleurSocialAccompagnementDeclarant(): ?string
public function getTravailleurSocialAccompagnementDeclarant(bool $raw = true): ?string
{
return $this->travailleurSocialAccompagnementDeclarant;
return (!$raw && 'nsp' === $this->travailleurSocialAccompagnementDeclarant) ? 'Ne sait pas' : $this->travailleurSocialAccompagnementDeclarant;
}

public function setTravailleurSocialAccompagnementDeclarant(?string $travailleurSocialAccompagnementDeclarant): self
Expand Down
30 changes: 19 additions & 11 deletions src/Entity/Model/TypeCompositionLogement.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,16 @@ public function setTypeLogementCommoditesWcCuisine(?string $typeLogementCommodit
return $this;
}

public function getCompositionLogementPieceUnique(): ?string
public function getCompositionLogementPieceUnique(bool $raw = true): ?string
{
if (!$raw) {
return match ($this->compositionLogementPieceUnique) {
'piece_unique' => 'Pièce unique',
'plusieurs_pieces' => 'Plusieurs pièces',
default => $this->compositionLogementPieceUnique
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je ne comprends pas ce default ?

Copy link
Collaborator Author

@numew numew Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ca retourne la valeur brute (si elle n'est ni 'piece_unique' ni 'plusieurs_pieces') tu veux dire que ca ne devrait pas arriver ? j'ai préféré prévoir le cas

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'après https://docs.google.com/spreadsheets/d/1hvhNHY5ZS-MtgbEBo8WCUrj4aKExJqMxGANP3Z1zDEg/edit#gid=0, ça ne devrait pas arriver, mais je n'ai rien contre les précautions

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je serais d'accord quand on aura les restrictions coté serveur 😉

};
}

return $this->compositionLogementPieceUnique;
}

Expand All @@ -216,9 +224,9 @@ public function setCompositionLogementSuperficie(?string $compositionLogementSup
return $this;
}

public function getCompositionLogementHauteur(): ?string
public function getCompositionLogementHauteur(bool $raw = true): ?string
{
return $this->compositionLogementHauteur;
return (!$raw && 'nsp' === $this->compositionLogementHauteur) ? 'Ne sait pas' : $this->compositionLogementHauteur;
}

public function setCompositionLogementHauteur(?string $compositionLogementHauteur): self
Expand Down Expand Up @@ -264,9 +272,9 @@ public function setCompositionLogementEnfants(?string $compositionLogementEnfant
return $this;
}

public function getBailDpeBail(): ?string
public function getBailDpeBail(bool $raw = true): ?string
{
return $this->bailDpeBail;
return (!$raw && 'nsp' === $this->bailDpeBail) ? 'Ne sait pas' : $this->bailDpeBail;
}

public function setBailDpeBail(?string $bailDpeBail): self
Expand All @@ -276,9 +284,9 @@ public function setBailDpeBail(?string $bailDpeBail): self
return $this;
}

public function getBailDpeDpe(): ?string
public function getBailDpeDpe(bool $raw = true): ?string
{
return $this->bailDpeDpe;
return (!$raw && 'nsp' === $this->bailDpeDpe) ? 'Ne sait pas' : $this->bailDpeDpe;
}

public function setBailDpeDpe(?string $bailDpeDpe): self
Expand All @@ -288,9 +296,9 @@ public function setBailDpeDpe(?string $bailDpeDpe): self
return $this;
}

public function getBailDpeEtatDesLieux(): ?string
public function getBailDpeEtatDesLieux(bool $raw = true): ?string
{
return $this->bailDpeEtatDesLieux;
return (!$raw && 'nsp' === $this->bailDpeEtatDesLieux) ? 'Ne sait pas' : $this->bailDpeEtatDesLieux;
}

public function setBailDpeEtatDesLieux(?string $bailDpeEtatDesLieux): self
Expand All @@ -312,9 +320,9 @@ public function setBailDpeDateEmmenagement(?string $bailDpeDateEmmenagement): se
return $this;
}

public function getTypeLogementCommoditesPieceAVivre9m(): ?string
public function getTypeLogementCommoditesPieceAVivre9m(bool $raw = true): ?string
{
return $this->typeLogementCommoditesPieceAVivre9m;
return (!$raw && 'nsp' === $this->typeLogementCommoditesPieceAVivre9m) ? 'Ne sait pas' : $this->typeLogementCommoditesPieceAVivre9m;
}

public function setTypeLogementCommoditesPieceAVivre9m(?string $typeLogementCommoditesPieceAVivre9m): self
Expand Down
12 changes: 10 additions & 2 deletions src/Entity/Signalement.php
Original file line number Diff line number Diff line change
Expand Up @@ -2057,8 +2057,16 @@ public function setTelDeclarantSecondaire(?string $telDeclarantSecondaire): self
return $this;
}

public function getCiviliteOccupant(): ?string
{
public function getCiviliteOccupant(bool $raw = true): ?string
{
if (!$raw) {
return match ($this->civiliteOccupant) {
'mme' => 'Madame',
'mr' => 'Monsieur',
default => $this->civiliteOccupant
};
}

return $this->civiliteOccupant;
}

Expand Down
Loading
Loading