Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
cooperatic-mlc
kohinos
Commits
19bb52a8
Commit
19bb52a8
authored
Apr 04, 2019
by
Julien Jorry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error date cotisation + remove bouton switch user + fix page list
parent
be1ee842
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
21 deletions
+13
-21
CotisationAdmin.php
src/Admin/CotisationAdmin.php
+10
-6
Flux.php
src/Entity/Flux.php
+1
-1
useradmin.html.twig
templates/block/useradmin.html.twig
+2
-14
No files found.
src/Admin/CotisationAdmin.php
View file @
19bb52a8
...
@@ -15,9 +15,11 @@ use Sonata\AdminBundle\Show\ShowMapper;
...
@@ -15,9 +15,11 @@ use Sonata\AdminBundle\Show\ShowMapper;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
use
Symfony\Component\Form\Extension\Core\Type\CheckboxType
;
use
Symfony\Component\Form\Extension\Core\Type\CheckboxType
;
use
Symfony\Component\Form\Extension\Core\Type\ChoiceType
;
use
Symfony\Component\Form\Extension\Core\Type\ChoiceType
;
use
Symfony\Component\Form\Extension\Core\Type\DateTimeType
;
use
Symfony\Component\Form\Extension\Core\Type\DateType
;
use
Symfony\Component\Form\Extension\Core\Type\DateType
;
use
Symfony\Component\Form\Extension\Core\Type\HiddenType
;
use
Symfony\Component\Form\Extension\Core\Type\HiddenType
;
use
Symfony\Component\Form\Extension\Core\Type\MoneyType
;
use
Symfony\Component\Form\Extension\Core\Type\MoneyType
;
use
Symfony\Component\Intl\DateFormatter\IntlDateFormatter
;
use
Symfony\Component\Security\Core\Security
;
use
Symfony\Component\Security\Core\Security
;
/**
/**
...
@@ -96,17 +98,19 @@ class CotisationAdmin extends AbstractAdmin
...
@@ -96,17 +98,19 @@ class CotisationAdmin extends AbstractAdmin
}
}
$formMapper
->
end
()
$formMapper
->
end
()
->
with
(
'Date'
,
[
'class'
=>
'col-md-4'
])
->
with
(
'Date'
,
[
'class'
=>
'col-md-4'
])
->
add
(
'cotisationInfos.debut'
,
DateType
::
class
,
array
(
->
add
(
'cotisationInfos.debut'
,
DateT
imeT
ype
::
class
,
array
(
'label'
=>
'Date de début'
,
'label'
=>
'Date de début'
,
'widget'
=>
'single_text'
,
'widget'
=>
'single_text'
,
'html5'
=>
false
,
// 'html5' => false,
'attr'
=>
[
'class'
=>
'js-datepicker'
],
'date_format'
=>
IntlDateFormatter
::
SHORT
,
// 'attr' => ['class' => 'js-datepicker'],
))
))
->
add
(
'cotisationInfos.fin'
,
DateType
::
class
,
array
(
->
add
(
'cotisationInfos.fin'
,
DateT
imeT
ype
::
class
,
array
(
'label'
=>
'Date de fin'
,
'label'
=>
'Date de fin'
,
'widget'
=>
'single_text'
,
'widget'
=>
'single_text'
,
'html5'
=>
false
,
// 'html5' => false,
'attr'
=>
[
'class'
=>
'js-datepicker'
],
'date_format'
=>
IntlDateFormatter
::
SHORT
,
// 'attr' => ['class' => 'js-datepicker'],
))
))
->
end
()
->
end
()
;
;
...
...
src/Entity/Flux.php
View file @
19bb52a8
...
@@ -297,6 +297,6 @@ abstract class Flux
...
@@ -297,6 +297,6 @@ abstract class Flux
if
(
empty
(
$this
->
getDestinataire
())
||
empty
(
$this
->
getExpediteur
())
||
empty
(
$this
->
getMontant
()))
{
if
(
empty
(
$this
->
getDestinataire
())
||
empty
(
$this
->
getExpediteur
())
||
empty
(
$this
->
getMontant
()))
{
return
"[FLUX] Visualisation impossible ! Destinataire / Expéditeur et/ou montant manquant(s) !"
;
return
"[FLUX] Visualisation impossible ! Destinataire / Expéditeur et/ou montant manquant(s) !"
;
}
}
return
$this
->
getCreatedAt
()
->
format
(
'd/m/Y H:i'
)
.
' | '
.
ucwords
(
$this
->
getParenttype
())
.
' : '
.
$this
->
getDestinataire
()
.
' => '
.
$this
->
getExpediteur
()
.
' ; '
.
$this
->
getMontant
()
.
'€'
;
return
(
$this
->
getCreatedAt
()
?
$this
->
getCreatedAt
()
->
format
(
'd/m/Y H:i'
)
.
' | '
:
''
)
.
ucwords
(
$this
->
getParenttype
())
.
' : '
.
$this
->
getDestinataire
()
.
' => '
.
$this
->
getExpediteur
()
.
' ; '
.
$this
->
getMontant
()
.
'€'
;
}
}
}
}
templates/block/useradmin.html.twig
View file @
19bb52a8
{# UNIQUEMENT POUR LES TESTS #}
{# UNIQUEMENT POUR LES TESTS #}
{%
if
app.environment
==
'dev'
and
is_granted
(
'ROLE_USER'
)
%}
{
#
% if app.environment == 'dev' and is_granted('ROLE_USER') %}
{
% set routeName = routeName|default('index')%}
{
% set routeName = routeName|default('index')%}
{
% if is_granted('ROLE_PREVIOUS_ADMIN') %}
{
% if is_granted('ROLE_PREVIOUS_ADMIN') %}
<div class='w-100 text-center mb-2'>
<div class='w-100 text-center mb-2'>
...
@@ -24,18 +24,6 @@
...
@@ -24,18 +24,6 @@
<a class='btn btn-xs m-1 btn-primary' href='
{{
path(routeName, [], true)}}?_switch_user=user_gestiongroupe'>
<a class='btn btn-xs m-1 btn-primary' href='
{{
path(routeName, [], true)}}?_switch_user=user_gestiongroupe'>
{{
'GESTION GROUPE'|trans }}
{{
'GESTION GROUPE'|trans }}
</a>
</a>
{# <span class="dropdown">
<a href="
#
" class='btn btn-xs m-1 btn-primary dropdown-toggle' id="dropdownMenuButton" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{{
'GESTION GROUPE'|trans }}
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{
% for groupe in getAllGroupes() %}
{
% for user in groupe.gestionnaires %}
<a class="dropdown-item" href="
{{
path(routeName, [], true)}}?_switch_user='
{{
user.username}}">
{{
groupe}} (
{{
user}})</a>
{
% endfor %}
{
% endfor %}
</div>
</span> #}
<a class='btn btn-xs m-1 btn-primary' href='
{{
path(routeName, [], true)}}?_switch_user=user_contact'>
<a class='btn btn-xs m-1 btn-primary' href='
{{
path(routeName, [], true)}}?_switch_user=user_contact'>
{{
'CONTACT'|trans }}
{{
'CONTACT'|trans }}
</a>
</a>
...
@@ -50,7 +38,7 @@
...
@@ -50,7 +38,7 @@
</a>
</a>
</div>
</div>
{
% endif %}
{
% endif %}
{%
endif
%}
{
% endif %
#
}
{# ACTIONS PRINCIPALES POUR CHAQUE UTILISATEUR CONNECTE #}
{# ACTIONS PRINCIPALES POUR CHAQUE UTILISATEUR CONNECTE #}
<div
id=
"accordion"
>
<div
id=
"accordion"
>
...
...
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