Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
cb3312a3
Commit
cb3312a3
authored
Mar 11, 2024
by
Yvon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5932-add-quartier-to-address-section
parent
7d1fb02a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
2 deletions
+75
-2
AdherentAdmin.php
src/Admin/AdherentAdmin.php
+3
-0
Geoloc.php
src/Entity/Geoloc.php
+30
-1
GeolocFormType.php
src/Form/Type/GeolocFormType.php
+9
-1
Version20240311161651.php
src/Migrations/Version20240311161651.php
+33
-0
No files found.
src/Admin/AdherentAdmin.php
View file @
cb3312a3
...
...
@@ -162,6 +162,9 @@ class AdherentAdmin extends AbstractAdmin
'with_latlon'
=>
false
,
'with_subterritory'
=>
$this
->
getConfigurationPool
()
->
getContainer
()
->
getParameter
(
'tav_env'
)
&&
$this
->
getConfigurationPool
()
->
getContainer
()
->
getParameter
(
'household_based_allowance'
),
'with_quartier'
=>
$this
->
getConfigurationPool
()
->
getContainer
()
->
getParameter
(
'tav_env'
)
&&
$this
->
getConfigurationPool
()
->
getContainer
()
->
getParameter
(
'household_based_allowance'
)
])
->
end
()
...
...
src/Entity/Geoloc.php
View file @
cb3312a3
...
...
@@ -73,7 +73,16 @@ class Geoloc
* @ORM\JoinColumn(name="subterritory_id", referencedColumnName="id", nullable=true)
*/
private
$subterritory
;
/**
* @var string|null
*
* @ORM\Column(name="quartier", type="string", length=255, nullable=true)
* @Groups({"read", "write"})
*/
private
$quartier
;
public
function
getId
()
{
return
$this
->
id
;
...
...
@@ -199,6 +208,26 @@ class Geoloc
return
$this
;
}
/**
* @return string|null
*/
public
function
getQuartier
()
:
?
string
{
return
$this
->
quartier
;
}
/**
* @param string|null $quartier
*
* @return Geoloc
*/
public
function
setQuartier
(
?
string
$quartier
)
{
$this
->
quartier
=
$quartier
;
return
$this
;
}
public
function
__toString
()
:
string
{
return
(
!
empty
(
$this
->
adresse
)
?
$this
->
adresse
:
''
)
.
' '
.
(
!
empty
(
$this
->
cpostal
)
?
$this
->
cpostal
:
''
)
.
' '
.
(
!
empty
(
$this
->
ville
)
?
$this
->
ville
:
''
);
...
...
src/Form/Type/GeolocFormType.php
View file @
cb3312a3
...
...
@@ -73,6 +73,13 @@ class GeolocFormType extends AbstractType
])
;
}
if
(
true
===
$options
[
'with_quartier'
])
{
$builder
->
add
(
'quartier'
,
TextType
::
class
,
[
'required'
=>
false
,
])
;
}
if
(
true
===
$options
[
'with_subterritory'
])
{
$builder
->
add
(
'subterritory'
,
EntityType
::
class
,
[
...
...
@@ -94,7 +101,8 @@ class GeolocFormType extends AbstractType
'data_class'
=>
Geoloc
::
class
,
'with_geoloc'
=>
true
,
'with_latlon'
=>
true
,
'with_subterritory'
=>
false
'with_subterritory'
=>
false
,
'with_quartier'
=>
false
]);
}
...
...
src/Migrations/Version20240311161651.php
0 → 100644
View file @
cb3312a3
<?php
declare
(
strict_types
=
1
);
namespace
DoctrineMigrations
;
use
Doctrine\DBAL\Schema\Schema
;
use
Doctrine\Migrations\AbstractMigration
;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final
class
Version20240311161651
extends
AbstractMigration
{
public
function
getDescription
()
:
string
{
return
''
;
}
public
function
up
(
Schema
$schema
)
:
void
{
// this up() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE geoloc ADD quartier VARCHAR(255) DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE prestataire CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\''
);
}
public
function
down
(
Schema
$schema
)
:
void
{
// this down() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE geoloc DROP quartier'
);
$this
->
addSql
(
'ALTER TABLE prestataire CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\''
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment