Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jdev-boarding
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jdev
jdev-boarding
Commits
a025bf64
Commit
a025bf64
authored
Jul 01, 2020
by
Chrystel Moreau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug pb inscription Agenda et Ajout formation ds agenda
parent
c3338791
Pipeline
#2776
passed with stages
in 5 minutes and 41 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
17 deletions
+23
-17
app/actions.php
app/actions.php
+1
-1
app/src/Action/DashboardAdminAgendaFormAction.php
app/src/Action/DashboardAdminAgendaFormAction.php
+3
-0
app/src/Action/DashboardParticipantParcoursFormationAction.php
...rc/Action/DashboardParticipantParcoursFormationAction.php
+10
-11
app/templates/dashboard_participant_parcours_agenda.twig
app/templates/dashboard_participant_parcours_agenda.twig
+3
-2
public/js/admin.js
public/js/admin.js
+4
-2
public/js/participant.js
public/js/participant.js
+2
-1
No files found.
app/actions.php
View file @
a025bf64
...
...
@@ -103,7 +103,7 @@ $container[App\Action\DashboardParticipantSessionsRefreshAction::class] = functi
};
$container
[
App\Action\DashboardParticipantParcoursFormationAction
::
class
]
=
function
(
$c
)
{
return
new
App\Action\DashboardParticipantParcoursFormationAction
(
$c
->
get
(
'view'
),
$c
->
get
(
'logger'
),
$c
->
get
(
'em'
));
return
new
App\Action\DashboardParticipantParcoursFormationAction
(
$c
->
get
(
'view'
),
$c
->
get
(
'logger'
),
$c
->
get
(
'em'
)
,
$c
->
get
(
'settings'
)
);
};
$container
[
App\Action\DashboardParticipantAgendaAction
::
class
]
=
function
(
$c
)
{
...
...
app/src/Action/DashboardAdminAgendaFormAction.php
View file @
a025bf64
...
...
@@ -46,6 +46,7 @@ final class DashboardAdminAgendaFormAction
if
(
$request
->
isGet
())
{
$formations
=
$this
->
getFormations
();
$agenda
=
null
;
$a
=
[
'page'
=>
'dashboard'
,
...
...
@@ -75,6 +76,7 @@ final class DashboardAdminAgendaFormAction
}
else
{
$salles
=
$this
->
getSalles
(
$debut
->
format
(
'Y-m-d H:i:s'
),
$fin
->
format
(
'Y-m-d H:i:s'
),
$quota
);
}
//$salle = $this->getSalleById($id_salle);
//$salles = array_merge(array($salle), $this->getSalles($debut->format('Y-m-d H:i:s'), $fin->format('Y-m-d H:i:s'),$quota));
$response
=
$response
->
write
(
json_encode
(
$salles
))
->
withHeader
(
'Content-type'
,
'application/json'
);
...
...
@@ -170,5 +172,6 @@ final class DashboardAdminAgendaFormAction
$dql
=
"SELECT s FROM App\Entity\Salle s WHERE s.id =
$id
"
;
$query
=
$this
->
em
->
createQuery
(
$dql
);
return
$query
->
getArrayResult
()[
0
];
//return $query->getArrayResult();
}
}
app/src/Action/DashboardParticipantParcoursFormationAction.php
View file @
a025bf64
...
...
@@ -22,12 +22,14 @@ final class DashboardParticipantParcoursFormationAction
private
$view
;
private
$logger
;
private
$em
;
private
$settings
;
public
function
__construct
(
Twig
$view
,
LoggerInterface
$logger
,
EntityManagerInterface
$em
)
public
function
__construct
(
Twig
$view
,
LoggerInterface
$logger
,
EntityManagerInterface
$em
,
$settings
)
{
$this
->
view
=
$view
;
$this
->
logger
=
$logger
;
$this
->
em
=
$em
;
$this
->
settings
=
$settings
;
}
public
function
__invoke
(
Request
$request
,
Response
$response
,
$args
)
...
...
@@ -85,15 +87,7 @@ final class DashboardParticipantParcoursFormationAction
'participant'
=>
$participant
,
];
// $a['pa_4_am'] = $this->getParcours('2017-07-04', '08:00:00', '13:00:00', $participant->getId());
// $a['pa_4_pm'] = $this->getParcours('2017-07-04', '12:00:00', '19:00:00', $participant->getId());
// $a['pa_5_am'] = $this->getParcours('2017-07-05', '08:00:00', '13:00:00', $participant->getId());
// $a['pa_5_pm'] = $this->getParcours('2017-07-05', '12:00:00', '19:00:00', $participant->getId());
// $a['pa_6_am'] = $this->getParcours('2017-07-06', '08:00:00', '13:00:00', $participant->getId());
// $a['pa_6_pm'] = $this->getParcours('2017-07-06', '12:00:00', '19:00:00', $participant->getId());
// $a['pa_7_am'] = $this->getParcours('2017-07-07', '08:00:00', '13:00:00', $participant->getId());
// $a['pa_7_pm'] = $this->getParcours('2017-07-07', '12:00:00', '19:00:00', $participant->getId());
// Attention chgt 2020 !!!!
$a
[
'pa_am'
][
0
]
=
$this
->
getParcours
(
$this
->
settings
[
'jdev'
][
'j1'
],
'08:00:00'
,
'13:00:00'
,
$participant
->
getId
());
$a
[
'pa_pm'
][
0
]
=
$this
->
getParcours
(
$this
->
settings
[
'jdev'
][
'j1'
],
'12:00:00'
,
'19:00:00'
,
$participant
->
getId
());
$a
[
'pa_am'
][
1
]
=
$this
->
getParcours
(
$this
->
settings
[
'jdev'
][
'j2'
],
'08:00:00'
,
'13:00:00'
,
$participant
->
getId
());
...
...
@@ -108,6 +102,7 @@ final class DashboardParticipantParcoursFormationAction
return
$response
;
}
private
function
getParticipant
(
$email
)
{
$participant
=
$this
->
em
->
getRepository
(
'App\Entity\Participant'
)
->
findOneBy
(
array
(
'email'
=>
$email
));
...
...
@@ -136,7 +131,8 @@ final class DashboardParticipantParcoursFormationAction
{
$date_debut
=
$jour
.
" "
.
$debut
;
$date_fin
=
$jour
.
" "
.
$fin
;
//$date_debut = "2020-07-06 " . $debut;
//$date_fin = "2020-07-06 " . $fin;
$dql
=
"SELECT pa FROM App\Entity\ParticipantAgenda pa LEFT JOIN pa.agenda a "
;
$dql
.
=
"WHERE pa.participant=
$id
"
;
$dql
.
=
"AND a.dateDebut between '
$date_debut
' and '
$date_fin
' and a.dateFin between '
$date_debut
' and '
$date_fin
'"
;
...
...
@@ -150,6 +146,9 @@ final class DashboardParticipantParcoursFormationAction
$date_fin
=
$jour
.
" "
.
$fin
;
$date_gtsoir
=
$jour
.
" 17:00:00"
;
//$date_debut = "2020-07-06 " . $debut;
//$date_fin = "2020-07-06 " . $fin;
//$date_gtsoir = "2020-07-06 17:00:00";
$dql
=
"SELECT pa FROM App\Entity\ParticipantAgenda pa LEFT JOIN pa.agenda a "
;
$dql
.
=
"WHERE pa.participant=
$id
"
;
$dql
.
=
"AND a.dateDebut between '
$date_debut
' and '
$date_fin
' and a.dateFin between '
$date_debut
' and '
$date_fin
'"
;
...
...
app/templates/dashboard_participant_parcours_agenda.twig
View file @
a025bf64
...
...
@@ -93,11 +93,12 @@
{%
set
prct
=
((
agenda.nb_inscrits
/
quota
)
*
100
)
|
round
%}
<span
class=
"badge badge-
{%
if
prct
<=
50
%}
vert
{%
elseif
prct
>
50
and
prct
<=
75
%}
orange
{%
else
%}
rouge
{%
endif
%}
"
>
{{
prct
}}
%
</span>
</td>
<td
class=
"text-center"
id=
"action_
{{
id_agenda
}}
"
>
<td
class=
"text-center"
id=
"action_
{{
id_agenda
}}
"
>
{%
if
agenda.check
==
0
%}
{%
set
gt_h_debut
=
agenda
[
'agenda'
]
.
getDateDebut
()
|
date
(
"H"
)
%}
{%
if
agenda
[
'agenda'
]
.
getFormation
()
.
getType
()
==
'Groupe de Travail'
and
gt_h_debut
>=
17
%}
{%
if
nbgt17
<
1
%}
{%
if
nbgt17
<
1
%}
<input
type=
"hidden"
id=
"vinscrit_
{{
id_agenda
}}
"
value=
"2"
>
{%
if
prct
<
100
%}
<a
href=
"dashboard-participant-parcours-formation?token=
{{
token
}}
&agenda=
{{
id_agenda
}}
&valid=true&jour=
{{
jour
}}
&debut=
{{
debut
}}
&fin=
{{
fin
}}
"
...
...
public/js/admin.js
View file @
a025bf64
...
...
@@ -1388,7 +1388,7 @@ $(document).ready(function() {
});
$
(
'
#datepicker,#fin-timepicker,#debut-timepicker
'
).
on
(
'
change
'
,
function
()
{
if
(
(
$
(
'
#debut-timepicker
'
).
val
()
!==
''
)
&&
(
$
(
'
#fin-timepicker
'
).
val
()
!==
''
)
&&
(
$
(
'
#datepicker
'
).
val
()
!==
''
)){
if
(
(
$
(
'
#debut-timepicker
'
).
val
()
!==
''
)
&&
(
$
(
'
#fin-timepicker
'
).
val
()
!==
''
)
&&
(
$
(
'
#datepicker
'
).
val
()
!==
''
)){
$
.
ajax
({
//url: "dashboard-admin-agenda-form?token="+$("#token").val()+"&agenda_id="+$('#agenda_id').val()+""a="+$('#quota').val()+"&jour="+$('#datepicker').val()+"&debut="+$('#debut-timepicker').val()+"&fin="+$('#fin-timepicker').val(),
url
:
"
dashboard-admin-agenda-form?token=
"
+
$
(
"
#token
"
).
val
()
+
"
"a=
"
+
$
(
'
#quota
'
).
val
()
+
"
&jour=
"
+
$
(
'
#datepicker
'
).
val
()
+
"
&debut=
"
+
$
(
'
#debut-timepicker
'
).
val
()
+
"
&fin=
"
+
$
(
'
#fin-timepicker
'
).
val
(),
...
...
@@ -1397,6 +1397,7 @@ $(document).ready(function() {
$
(
'
#salle option
'
).
remove
();
var
val_proj
=
0
;
//console.log(salles);
$
.
each
(
salles
,
function
(
key
,
val
)
{
val_proj
=
val
[
'
videoprojecteur
'
]?
1
:
0
;
$
(
'
#salle
'
).
append
(
$
(
'
<option></option>
'
,
{
...
...
@@ -1405,7 +1406,8 @@ $(document).ready(function() {
}));
});
},
error
:
function
()
{
error
:
function
(
xhr
,
ajaxOptions
,
thrownError
)
{
//console.log(xhr.responseText);
alert
(
'
PB recupérartion des salles
'
);
}
});
...
...
public/js/participant.js
View file @
a025bf64
...
...
@@ -199,7 +199,8 @@ $(document).ready(function(){
success
:
function
(
text
)
{
location
.
reload
();
},
error
:
function
()
{
error
:
function
(
xhr
,
ajaxOptions
,
thrownError
)
{
console
.
log
(
xhr
.
responseText
);
alert
(
'
PB inscription
'
);
}
});
...
...
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