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
35eb30a0
Commit
35eb30a0
authored
Feb 28, 2022
by
Julien Jorry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Admin prestataire liste : Add idmlc under raison
parent
9543d7ec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
PrestataireAdmin.php
src/Admin/PrestataireAdmin.php
+8
-6
Prestataire.php
src/Entity/Prestataire.php
+7
-1
No files found.
src/Admin/PrestataireAdmin.php
View file @
35eb30a0
...
@@ -507,12 +507,12 @@ class PrestataireAdmin extends AbstractAdmin
...
@@ -507,12 +507,12 @@ class PrestataireAdmin extends AbstractAdmin
'advanced_filter'
=>
false
,
'advanced_filter'
=>
false
,
])
])
->
add
(
'createdAt'
,
'doctrine_orm_datetime_range'
,
[
->
add
(
'createdAt'
,
'doctrine_orm_datetime_range'
,
[
'field_type'
=>
DateTimeRangePickerType
::
class
,
'field_type'
=>
DateTimeRangePickerType
::
class
,
'label'
=>
'Date de création'
'label'
=>
'Date de création'
,
])
])
->
add
(
'updatedAt'
,
'doctrine_orm_datetime_range'
,
[
->
add
(
'updatedAt'
,
'doctrine_orm_datetime_range'
,
[
'field_type'
=>
DateTimeRangePickerType
::
class
,
'field_type'
=>
DateTimeRangePickerType
::
class
,
'label'
=>
'Date de mise à jour'
'label'
=>
'Date de mise à jour'
,
])
])
->
add
(
'typeprestataire'
,
null
,
[
->
add
(
'typeprestataire'
,
null
,
[
'label'
=>
'Type'
,
'label'
=>
'Type'
,
...
@@ -692,7 +692,9 @@ class PrestataireAdmin extends AbstractAdmin
...
@@ -692,7 +692,9 @@ class PrestataireAdmin extends AbstractAdmin
}
}
}
}
$listMapper
$listMapper
->
addIdentifier
(
'raison'
)
->
addIdentifier
(
'raisonAndIdmlc'
,
'html'
,
[
'label'
=>
'Raison'
,
])
->
add
(
'groupe'
,
null
,
[
->
add
(
'groupe'
,
null
,
[
'label'
=>
'Groupe'
,
'label'
=>
'Groupe'
,
'sortable'
=>
true
,
'sortable'
=>
true
,
...
@@ -845,7 +847,7 @@ class PrestataireAdmin extends AbstractAdmin
...
@@ -845,7 +847,7 @@ class PrestataireAdmin extends AbstractAdmin
$datagrid
->
buildPager
();
$datagrid
->
buildPager
();
$query
=
$datagrid
->
getQuery
();
$query
=
$datagrid
->
getQuery
();
$query
->
select
(
'DISTINCT '
.
current
(
$query
->
getRootAliases
()));
$query
->
select
(
'DISTINCT '
.
current
(
$query
->
getRootAliases
()));
$query
->
setFirstResult
(
$firstResult
);
$query
->
setFirstResult
(
$firstResult
);
$query
->
setMaxResults
(
$maxResult
);
$query
->
setMaxResults
(
$maxResult
);
...
...
src/Entity/Prestataire.php
View file @
35eb30a0
...
@@ -670,8 +670,9 @@ class Prestataire extends AccountableObject implements AccountableInterface
...
@@ -670,8 +670,9 @@ class Prestataire extends AccountableObject implements AccountableInterface
public
function
getUsersString
()
public
function
getUsersString
()
{
{
return
join
(
' - '
,
array_map
(
function
(
$user
)
{
return
join
(
' - '
,
array_map
(
function
(
$user
)
{
$return
=
$user
->
getName
()
.
(
$user
->
getEmail
()
==
$user
->
getName
()
?
''
:
(
':'
.
$user
->
getEmail
()));
$return
=
$user
->
getName
()
.
(
$user
->
getEmail
()
==
$user
->
getName
()
?
''
:
(
':'
.
$user
->
getEmail
()));
$return
.=
'['
.
implode
(
', '
,
$user
->
getPossiblegroups
()
->
toArray
())
.
']'
;
$return
.=
'['
.
implode
(
', '
,
$user
->
getPossiblegroups
()
->
toArray
())
.
']'
;
return
$return
;
return
$return
;
},
$this
->
users
->
getValues
()));
},
$this
->
users
->
getValues
()));
}
}
...
@@ -1049,6 +1050,11 @@ class Prestataire extends AccountableObject implements AccountableInterface
...
@@ -1049,6 +1050,11 @@ class Prestataire extends AccountableObject implements AccountableInterface
return
$this
;
return
$this
;
}
}
public
function
getRaisonAndIdmlc
()
:
?
string
{
return
$this
->
getRaison
()
.
(
$this
->
getIdmlc
()
?
'<br/>('
.
$this
->
getIdmlc
()
.
')'
:
''
);
}
public
function
__toString
()
:
string
public
function
__toString
()
:
string
{
{
return
$this
->
raison
?
$this
->
raison
:
'Prestataire '
.
$this
->
id
;
return
$this
->
raison
?
$this
->
raison
:
'Prestataire '
.
$this
->
id
;
...
...
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