diff --git a/CHANGELOG.md b/CHANGELOG.md
index e64889817c2c970f01119974773e320799f8347c..cd9bb522eb2d1e0c29f2c41fa7b498e7cb2d861d 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,14 +14,14 @@
* Nouvelle interface de saisie des suivis de missions
* Adaptation de la partie paiement pour gérer les heures nocturnes/dimanches/jours fériés
* Plafonds applicables aux missions avec un nouveau périmètre par type de mission
-
-
+
+
* Gestion renforcée des taux de paiement
* Possibilité de gérer de nouveaux taux différents du taux légal de 42,86€
* Nouvelle interface d'administration des taux de paiement
* Les taux peuvent être indexés sur d'autres taux (le SMIC par exemple)
* Les taux peuvent être appliqués globalement, par mission, par statut, par élément pédagogique, selon le contexte
-
+
* Pièces justificatives
* Nouveau filtre permettant de ne demander des pièces que pour les étrangers
@@ -30,6 +30,9 @@
* Possibilité de contractualiser des heures de mission
* Possibilité d'avoir des états de sortie distincts pour les contrats et pour les avenants, par statut
+* Tag
+ * Possiblité de mettre des dates de début et de fin d'utilisation pour les tags
+
## Améliorations
@@ -40,6 +43,9 @@
* Il est possible de rentrer une date de retour sur un contrat après avoir téléversé le contrat sans avoir besoin de recharger la page
* Impossibilité de saisir des heures hors établissement (#51483)
+* Paris 1 : modification de la formule de calcul (#48148)
+* Rennes 2 : modification de la formule de calcul (#51135)
+* Filtrage des types d'intervention pour la saisie de service hors établissement (#51512)
diff --git a/README.md b/README.md
index ff48562d3517c61052f9f7128e4900c39d608e5e..408a13455c8be98b071519d9d3b3866474dacb99 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,13 @@
Organisation des Services d'Enseignement
+OSE permet :
+- d'organiser les services d'enseignements
+- de calculer le coût d'une offre de formation
+- de suivre les emplois étudiants
+
+Présentation rapide de l'application : http://ose.unicaen.fr/presentation
+
## Nouveautés
La [`Liste des changements`](CHANGELOG.md) vous permettra de savoir :
@@ -16,7 +23,7 @@ Une [`procédure d'installation`](INSTALL.md) est à votre disposition pour mett
La [`procédure de mise à jour`](UPDATE.md) vous indiquera comment mettre à niveau votre instance.
-## Documentation
+## Documentation technique
[`Documentation`](doc/doc.md).
diff --git a/config.local.php.default b/config.local.php.default
index 3a14d375083ab94bf7a59b1df2516653b7eccb02..0d6ae8a4c506969e32863fad808ee25b22e0a755 100755
--- a/config.local.php.default
+++ b/config.local.php.default
@@ -139,6 +139,12 @@ return [
/* Port d'accès au serveur */
'port' => 389,
+ /* Option d'utilisation de SSL (non définie par défaut)
+ * valeurs possibles : LDAP_OPT_X_TLS_NEVER, LDAP_OPT_X_TLS_HARD, LDAP_OPT_X_TLS_DEMAND, LDAP_OPT_X_TLS_ALLOW, LDAP_OPT_X_TLS_TRY
+ * @see https://docs.laminas.dev/laminas-authentication/adapter/ldap/
+ */
+ 'useSsl' => null,
+
/* bindRequiresDn */
'bindRequiresDn' => true,
diff --git a/config/autoload/unicaen-app.global.php b/config/autoload/unicaen-app.global.php
index ed5d118888344f6033019bd4f63f062edc7bb735..6dcd2739ffdea241ed8940a3d71ee22c754ffdfb 100755
--- a/config/autoload/unicaen-app.global.php
+++ b/config/autoload/unicaen-app.global.php
@@ -53,6 +53,7 @@ return [
'bindRequiresDn' => AppConfig::get('ldap', 'bindRequiresDn'),
'accountFilterFormat' => "(&(objectClass=" . AppConfig::get('ldap', 'loginObjectClass', 'posixAccount') . ")(" . AppConfig::get('ldap', 'loginAttribute') . "=%s))",
'port' => AppConfig::get('ldap', 'port'),
+ 'useSsl' => AppConfig::get('ldap', 'useSsl')
],
],
],
diff --git a/data/ddl/package/FORMULE_RENNES2/body.sql b/data/ddl/package/FORMULE_RENNES2/body.sql
index 30d193fa6f4461e6f845d59fef94439e29721c7d..96019d3addf3a662fa79ae9236b09614500dc281 100644
--- a/data/ddl/package/FORMULE_RENNES2/body.sql
+++ b/data/ddl/package/FORMULE_RENNES2/body.sql
@@ -186,12 +186,12 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_RENNES2 AS
- -- AA=IF([.$I20]="Référentiel";0;([.$AM20]+[.$AS20]+[.$AY20]+[.$BE20])*[.H20])
+ -- AA=IF([.$I20]="Référentiel";0;([.$AN20]+[.$AT20]+[.$AZ20]+[.$BF20])*[.H20])
WHEN 'AA' THEN
IF vh.volume_horaire_ref_id IS NOT NULL THEN
RETURN 0;
ELSE
- RETURN (cell('AM',l) + cell('AS',l) + cell('AY',l) + cell('BE',l)) * vh.taux_fc;
+ RETURN (cell('AN',l) + cell('AT',l) + cell('AZ',l) + cell('BF',l)) * vh.taux_fc;
END IF;
@@ -202,10 +202,10 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_RENNES2 AS
- -- AC=IF([.$I20]="Référentiel";[.$AM20]+[.$AS20]+[.$AY20]+[.$BE20];0)
+ -- AC=IF([.$I20]="Référentiel";([.$AN20]+[.$AT20]+[.$AZ20]+[.$BF20]);0)
WHEN 'AC' THEN
IF vh.volume_horaire_ref_id IS NOT NULL THEN
- RETURN cell('AM',l) + cell('AS',l) + cell('AY',l) + cell('BE',l);
+ RETURN (cell('AN',l) + cell('AT',l) + cell('AZ',l) + cell('BF',l));
ELSE
RETURN 0;
END IF;
@@ -264,7 +264,7 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_RENNES2 AS
- -- AI16=[.AI15]>=[.AH16]
+ -- AI16=IF([.AI15]>=[.AH16];1;0)
WHEN 'AI16' THEN
IF cell('AI15') >= cell('AH16') THEN
RETURN 1;
@@ -274,7 +274,7 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_RENNES2 AS
- -- AJ=IF(AND([.$E20]="Oui";[.$D20]<>"Oui";[.$A20]=i_structure_code;[.$O20]="Oui");IF(OR([.$AI$16];[.$I20]<>"Référentiel");[.$N20]*[.$AF20];0);0)
+ -- AJ=IF(AND([.$E20]="Oui";[.$D20]<>"Oui";[.$A20]=i_structure_code;[.$O20]="Oui");IF(OR([.$AI$16]=1;[.$I20]<>"Référentiel");[.$N20]*[.$AF20];0);0)
WHEN 'AJ' THEN
IF vh.service_statutaire AND NOT vh.structure_is_exterieur AND vh.structure_is_affectation AND vh.param_1 = 'Oui' THEN
IF cell('AI16') = 1 OR vh.volume_horaire_ref_id IS NULL THEN
@@ -342,7 +342,7 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_RENNES2 AS
- -- AP=IF(AND([.$E20]="Oui";[.$D20]<>"Oui";[.$A20]<>i_structure_code;[.$O20]="Oui");IF(OR([.$AI$16];[.$I20]<>"Référentiel");[.$N20]*[.$AF20];0);0)
+ -- AP=IF(AND([.$E20]="Oui";[.$D20]<>"Oui";[.$A20]<>i_structure_code;[.$O20]="Oui");IF(OR([.$AI$16]=1;[.$I20]<>"Référentiel");[.$N20]*[.$AF20];0);0)
WHEN 'AP' THEN
IF vh.service_statutaire AND NOT vh.structure_is_exterieur AND NOT vh.structure_is_affectation AND vh.param_1 = 'Oui' THEN
IF cell('AI16') = 1 OR vh.volume_horaire_ref_id IS NULL THEN
@@ -410,7 +410,7 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_RENNES2 AS
- -- AV=IF(AND([.$E20]="Oui";[.$D20]<>"Oui";[.$O20]<>"Oui");IF(OR([.$AI$16];[.$I20]<>"Référentiel");[.$N20]*[.$AF20];0);0)
+ -- AV=IF(AND([.$E20]="Oui";[.$D20]<>"Oui";[.$O20]<>"Oui");IF(OR([.$AI$16]=1;[.$I20]<>"Référentiel");[.$N20]*[.$AF20];0);0)
WHEN 'AV' THEN
IF vh.service_statutaire AND NOT vh.structure_is_exterieur AND vh.param_1 <> 'Oui' THEN
IF cell('AI16') = 1 OR vh.volume_horaire_ref_id IS NULL THEN
@@ -478,7 +478,7 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_RENNES2 AS
- -- BB=IF(AND([.$E20]="Oui";[.$D20]="Oui");IF(OR([.$AI$16];[.$I20]<>"Référentiel");[.$N20]*[.$AF20];0);0)
+ -- BB=IF(AND([.$E20]="Oui";[.$D20]="Oui");IF(OR([.$AI$16]=1;[.$I20]<>"Référentiel");[.$N20]*[.$AF20];0);0)
WHEN 'BB' THEN
IF vh.service_statutaire AND vh.structure_is_exterieur THEN
IF cell('AI16') = 1 OR vh.volume_horaire_ref_id IS NULL THEN
diff --git a/data/ddl/package/OSE_PARAMETRE/body.sql b/data/ddl/package/OSE_PARAMETRE/body.sql
index 8364160fc05f9578e3067d16dc0296a89ae73f1b..9218a01e864e1a23aa56ecc4ff78d1214b165dbe 100644
--- a/data/ddl/package/OSE_PARAMETRE/body.sql
+++ b/data/ddl/package/OSE_PARAMETRE/body.sql
@@ -9,6 +9,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE_PARAMETRE" AS
pourc_s1_pour_annee_civile FLOAT;
taux_conges_payes FLOAT;
horaire_nocturne VARCHAR2(5);
+ domaine_fonc_ens_ext NUMERIC;
+ regle_repart_annee_civ VARCHAR2(50);
+ taux_remu NUMERIC;
@@ -117,6 +120,47 @@ CREATE OR REPLACE PACKAGE BODY "OSE_PARAMETRE" AS
+ FUNCTION get_domaine_fonc_ens_ext RETURN NUMERIC IS
+ BEGIN
+ IF domaine_fonc_ens_ext IS NULL THEN
+ SELECT to_number(valeur) INTO domaine_fonc_ens_ext FROM parametre WHERE nom = 'domaine_fonctionnel_ens_ext';
+ END IF;
+
+ IF domaine_fonc_ens_ext = 0 THEN
+ RETURN NULL;
+ ELSE
+ RETURN domaine_fonc_ens_ext;
+ END IF;
+ END;
+
+
+
+ FUNCTION get_regle_repart_annee_civ RETURN VARCHAR2 IS
+ BEGIN
+ IF regle_repart_annee_civ IS NULL THEN
+ SELECT valeur INTO regle_repart_annee_civ FROM parametre WHERE nom = 'regle_repartition_annee_civile';
+ END IF;
+
+ RETURN regle_repart_annee_civ;
+ END;
+
+
+
+ FUNCTION get_taux_remu RETURN NUMERIC IS
+ BEGIN
+ IF taux_remu IS NULL THEN
+ SELECT to_number(valeur) INTO taux_remu FROM parametre WHERE nom = 'taux-remu';
+ END IF;
+
+ IF taux_remu = 0 THEN
+ RETURN NULL;
+ ELSE
+ RETURN taux_remu;
+ END IF;
+ END;
+
+
+
PROCEDURE CLEAR_CACHE IS
BEGIN
annee := NULL;
diff --git a/data/ddl/package/OSE_PARAMETRE/definition.sql b/data/ddl/package/OSE_PARAMETRE/definition.sql
index 8175d148b24e364cc30ee4163aa94ef6ef9047a9..451f0238efa6c6fb27c57d01ed881613990ec8de 100644
--- a/data/ddl/package/OSE_PARAMETRE/definition.sql
+++ b/data/ddl/package/OSE_PARAMETRE/definition.sql
@@ -9,6 +9,9 @@ CREATE OR REPLACE PACKAGE "OSE_PARAMETRE" AS
FUNCTION get_pourc_s1_annee_civ RETURN FLOAT;
FUNCTION get_taux_conges_payes RETURN FLOAT;
FUNCTION get_horaire_nocturne RETURN VARCHAR2;
+ FUNCTION get_domaine_fonc_ens_ext RETURN NUMERIC;
+ FUNCTION get_regle_repart_annee_civ RETURN VARCHAR2;
+ FUNCTION get_taux_remu RETURN NUMERIC;
PROCEDURE CLEAR_CACHE;
diff --git a/data/ddl/package/UNICAEN_TBL/body.sql b/data/ddl/package/UNICAEN_TBL/body.sql
index 5d89630027ff67a249f704a9ffe78fb30ed43184..62952fc8eee260532142b6b94ddafa680461ed1a 100644
--- a/data/ddl/package/UNICAEN_TBL/body.sql
+++ b/data/ddl/package/UNICAEN_TBL/body.sql
@@ -1476,7 +1476,7 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
COALESCE( ep.structure_id, i.structure_id ) structure_id,
mep.id mise_en_paiement_id,
mep.periode_paiement_id periode_paiement_id,
- COALESCE(mep.domaine_fonctionnel_id, e.domaine_fonctionnel_id, to_number(p.valeur)) domaine_fonctionnel_id,
+ COALESCE(mep.domaine_fonctionnel_id, e.domaine_fonctionnel_id, ose_parametre.get_domaine_fonc_ens_ext) domaine_fonctionnel_id,
frs.heures_compl_fi + frs.heures_compl_fc + frs.heures_compl_fa + frs.heures_compl_fc_majorees heures_a_payer,
COUNT(*) OVER(PARTITION BY frs.id) heures_a_payer_pond,
COALESCE(mep.heures,0) heures_demandees,
@@ -1485,22 +1485,19 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id) total_heures,
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id) * pea.pourc_exercice_aa total_heures_aa,
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id ORDER BY mep.id) cumul_heures,
- CASE WHEN p2.valeur = ''prorata'' THEN COALESCE(mep.heures,0) * pea.pourc_exercice_aa ELSE ose_divers.CALC_HEURES_AA(
+ CASE WHEN ose_parametre.get_regle_repart_annee_civ = ''prorata'' THEN COALESCE(mep.heures,0) * pea.pourc_exercice_aa ELSE ose_divers.CALC_HEURES_AA(
COALESCE(mep.heures,0), -- heures
pea.pourc_exercice_aa, -- pourc_exercice_aa
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id), -- total_heures
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id ORDER BY mep.id) -- cumul_heures
) END heures_aa,
- COALESCE(si.taux_remu_id, to_number(p3.valeur)) taux_remu_id,
- OSE_PAIEMENT.GET_TAUX_HORAIRE(COALESCE(si.taux_remu_id, to_number(p3.valeur)),COALESCE(pea.horaire_debut, a.date_debut)) taux_horaire,
+ COALESCE(ep.taux_remu_id, si.taux_remu_id, ose_parametre.get_taux_remu) taux_remu_id,
+ OSE_PAIEMENT.GET_TAUX_HORAIRE(COALESCE(ep.taux_remu_id, si.taux_remu_id, ose_parametre.get_taux_remu),COALESCE(pea.horaire_debut, a.date_debut)) taux_horaire,
1 taux_conges_payes
FROM
formule_resultat_service frs
JOIN type_volume_horaire tvh ON tvh.code = ''REALISE''
JOIN etat_volume_horaire evh ON evh.code = ''valide''
- JOIN parametre p ON p.nom = ''domaine_fonctionnel_ens_ext''
- JOIN parametre p2 ON p2.nom = ''regle_repartition_annee_civile''
- JOIN parametre p3 ON p3.nom = ''taux-remu''
JOIN formule_resultat fr ON fr.id = frs.formule_resultat_id
AND fr.type_volume_horaire_id = tvh.id
AND fr.etat_volume_horaire_id = evh.id
@@ -1554,21 +1551,19 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id) total_heures,
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id) * pea.pourc_exercice_aa total_heures_aa,
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id ORDER BY mep.id) cumul_heures,
- CASE WHEN p2.valeur = ''prorata'' THEN COALESCE(mep.heures,0) * pea.pourc_exercice_aa ELSE ose_divers.CALC_HEURES_AA(
+ CASE WHEN ose_parametre.get_regle_repart_annee_civ = ''prorata'' THEN COALESCE(mep.heures,0) * pea.pourc_exercice_aa ELSE ose_divers.CALC_HEURES_AA(
COALESCE(mep.heures,0), -- heures
pea.pourc_exercice_aa, -- pourc_exercice_aa
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id), -- total_heures
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id ORDER BY mep.id) -- cumul_heures
) END heures_aa,
- COALESCE(si.taux_remu_id, to_number(p3.valeur)) taux_remu_id,
- OSE_PAIEMENT.GET_TAUX_HORAIRE(COALESCE(si.taux_remu_id, to_number(p3.valeur)),COALESCE(pea.horaire_debut, a.date_debut)) taux_horaire,
+ COALESCE(si.taux_remu_id, ose_parametre.get_taux_remu) taux_remu_id,
+ OSE_PAIEMENT.GET_TAUX_HORAIRE(COALESCE(si.taux_remu_id, ose_parametre.get_taux_remu),COALESCE(pea.horaire_debut, a.date_debut)) taux_horaire,
1 taux_conges_payes
FROM
formule_resultat_service_ref frs
JOIN type_volume_horaire tvh ON tvh.code = ''REALISE''
JOIN etat_volume_horaire evh ON evh.code = ''valide''
- JOIN parametre p2 ON p2.nom = ''regle_repartition_annee_civile''
- JOIN parametre p3 ON p3.nom = ''taux-remu''
JOIN formule_resultat fr ON fr.id = frs.formule_resultat_id
AND fr.type_volume_horaire_id = tvh.id
AND fr.etat_volume_horaire_id = evh.id
@@ -1669,7 +1664,7 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
m.taux_remu_id
END, vhm.horaire_debut) taux_horaire,
- ose_parametre.get_taux_conges_payes taux_conges_payes
+ ose_parametre.get_taux_conges_payes+1 taux_conges_payes
FROM
tbl_mission tm
JOIN mission m ON m.id = tm.mission_id
@@ -2253,64 +2248,99 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
CASE WHEN p.heures > COALESCE(p.PLAFOND,ps.heures,0) + COALESCE(pd.heures, 0) + 0.05 THEN 1 ELSE 0 END depassement
FROM
(
- SELECT 10 PLAFOND_ID, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT 1 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
SELECT
- i.annee_id annee_id,
- type_volume_horaire_id,
- intervenant_id,
- heures,
- plafond
+ i.annee_id annee_id,
+ fr.type_volume_horaire_id type_volume_horaire_id,
+ fr.intervenant_id intervenant_id,
+ fr.heures_compl_fi + fr.heures_compl_fc + fr.heures_compl_fa + fr.heures_compl_referentiel heures
FROM
- (
- SELECT
- intervenant_id,
- type_volume_horaire_id,
- tranche,
- sum(heures) heures,
- least(min(plafond_tranche_mission), min(plafond_tranche)) plafond
- FROM
- (
- SELECT
- m.intervenant_id intervenant_id,
- vhm.type_volume_horaire_id type_volume_horaire_id,
- to_char( vhm.horaire_debut, ''YYYY-mm'' ) tranche,
- vhm.heures heures,
- ROUND(CASE to_char( vhm.horaire_debut, ''mm'' ) WHEN ''07'' THEN 150 WHEN ''08'' THEN 150 ELSE 67 END / 30 * (m.date_fin - m.date_debut),2) plafond_tranche_mission,
- CASE to_char( vhm.horaire_debut, ''mm'' ) WHEN ''07'' THEN 150 WHEN ''08'' THEN 150 ELSE 67 END plafond_tranche
- FROM
- volume_horaire_mission vhm
- JOIN type_volume_horaire tvh ON tvh.id = vhm.type_volume_horaire_id AND tvh.code = ''REALISE''
- JOIN mission m ON m.id = vhm.mission_id AND m.histo_destruction IS NULL
- WHERE
- vhm.histo_destruction IS NULL
- ) t
- GROUP BY
- intervenant_id,
- type_volume_horaire_id,
- tranche
- ) t
- JOIN intervenant i ON i.id = t.intervenant_id
+ intervenant i
+ JOIN statut si ON si.id = i.statut_id
+ JOIN etat_volume_horaire evh ON evh.code = ''saisi''
+ JOIN formule_resultat fr ON fr.intervenant_id = i.id AND fr.etat_volume_horaire_id = evh.id
+ ) p
+
+ UNION ALL
+
+ SELECT 2 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT
+ i.annee_id annee_id,
+ fr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ fr.total - fr.heures_compl_fc_majorees heures
+ FROM
+ intervenant i
+ JOIN etat_volume_horaire evh ON evh.code = ''saisi''
+ JOIN formule_resultat fr ON fr.intervenant_id = i.id AND fr.etat_volume_horaire_id = evh.id
+ JOIN statut si ON si.id = i.statut_id
+ ) p
+
+ UNION ALL
+
+ SELECT 4 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT
+ i.annee_id annee_id,
+ fr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ SUM(frvh.heures_compl_fi) heures
+ FROM
+ intervenant i
+ JOIN etat_volume_horaire evh ON evh.code = ''saisi''
+ JOIN formule_resultat fr ON fr.intervenant_id = i.id AND fr.etat_volume_horaire_id = evh.id
+ JOIN formule_resultat_vh frvh ON frvh.formule_resultat_id = fr.id
+ JOIN volume_horaire vh ON vh.id = frvh.volume_horaire_id
+ JOIN type_intervention ti ON ti.id = vh.type_intervention_id
+ JOIN statut si ON si.id = i.statut_id
WHERE
- heures > plafond
- AND rownum = 1
+ ti.regle_foad = 0
+ GROUP BY
+ fr.type_volume_horaire_id,
+ i.annee_id,
+ i.id,
+ i.statut_id
+ ) p
+
+ UNION ALL
+
+ SELECT 8 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT
+ i.annee_id annee_id,
+ fr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ fr.service_referentiel + fr.heures_compl_referentiel heures
+ FROM
+ intervenant i
+ JOIN etat_volume_horaire evh ON evh.code = ''saisi''
+ JOIN formule_resultat fr ON fr.intervenant_id = i.id AND fr.etat_volume_horaire_id = evh.id
+ JOIN statut si ON si.id = i.statut_id
) p
UNION ALL
SELECT 9 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
SELECT
- i.annee_id annee_id,
- vhm.type_volume_horaire_id type_volume_horaire_id,
- i.id intervenant_id,
- SUM(vhm.heures) heures
+ i.annee_id annee_id,
+ vh.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ SUM(vh.heures) heures
FROM
- volume_horaire_mission vhm
- JOIN mission m ON m.histo_destruction IS NULL AND m.id = vhm.mission_id
- JOIN intervenant i ON i.id = m.intervenant_id
+ volume_horaire vh
+ JOIN service s ON s.id = vh.service_id
+ JOIN intervenant i ON i.id = s.intervenant_id
+ JOIN statut si ON si.id = i.statut_id
WHERE
- vhm.histo_destruction IS NULL
+ vh.histo_destruction IS NULL
+ AND i.histo_destruction IS NULL
+ AND vh.motif_non_paiement_id IS NULL
+ AND si.code IN (''IMP'')
GROUP BY
- i.annee_id, vhm.type_volume_horaire_id, i.id
+ i.annee_id,
+ vh.type_volume_horaire_id,
+ i.id,
+ i.statut_id
+ HAVING
+ SUM(vh.heures) >= 0
) p
) p
JOIN intervenant i ON i.id = p.intervenant_id
@@ -2500,7 +2530,42 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
CASE WHEN p.heures > COALESCE(p.PLAFOND,ps.heures,0) + COALESCE(pd.heures, 0) + 0.05 THEN 1 ELSE 0 END depassement
FROM
(
- SELECT NULL PLAFOND_ID,NULL ANNEE_ID,NULL TYPE_VOLUME_HORAIRE_ID,NULL INTERVENANT_ID,NULL FONCTION_REFERENTIEL_ID,NULL HEURES,NULL PLAFOND,NULL PLAFOND_ETAT_ID,NULL DEROGATION FROM dual WHERE 0 = 1
+ SELECT 7 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT
+ i.annee_id annee_id,
+ vhr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ fr.id fonction_referentiel_id,
+ SUM(vhr.heures) heures
+ FROM
+ service_referentiel sr
+ JOIN intervenant i ON i.id = sr.intervenant_id
+ JOIN fonction_referentiel fr ON fr.id = sr.fonction_id
+ JOIN volume_horaire_ref vhr ON vhr.service_referentiel_id = sr.id AND vhr.histo_destruction IS NULL
+ WHERE
+ sr.histo_destruction IS NULL
+ GROUP BY
+ i.annee_id, vhr.type_volume_horaire_id, i.id, fr.id
+
+ UNION ALL
+
+ SELECT
+ i.annee_id annee_id,
+ vhr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ fr.id fonction_referentiel_id,
+ SUM(vhr.heures) heures
+ FROM
+ service_referentiel sr
+ JOIN intervenant i ON i.id = sr.intervenant_id
+ JOIN fonction_referentiel frf ON frf.id = sr.fonction_id
+ JOIN fonction_referentiel fr ON fr.id = frf.parent_id
+ JOIN volume_horaire_ref vhr ON vhr.service_referentiel_id = sr.id AND vhr.histo_destruction IS NULL
+ WHERE
+ sr.histo_destruction IS NULL
+ GROUP BY
+ i.annee_id, vhr.type_volume_horaire_id, i.id, fr.id
+ ) p
) p
JOIN intervenant i ON i.id = p.intervenant_id
LEFT JOIN plafond_referentiel ps ON ps.plafond_id = p.plafond_id AND ps.fonction_referentiel_id = p.fonction_referentiel_id AND ps.annee_id = i.annee_id AND ps.histo_destruction IS NULL
@@ -2597,7 +2662,23 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
CASE WHEN p.heures > COALESCE(p.PLAFOND,ps.heures,0) + COALESCE(pd.heures, 0) + 0.05 THEN 1 ELSE 0 END depassement
FROM
(
- SELECT NULL PLAFOND_ID,NULL ANNEE_ID,NULL TYPE_VOLUME_HORAIRE_ID,NULL INTERVENANT_ID,NULL STRUCTURE_ID,NULL HEURES,NULL PLAFOND,NULL PLAFOND_ETAT_ID,NULL DEROGATION FROM dual WHERE 0 = 1
+ SELECT 6 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT
+ i.annee_id annee_id,
+ vhr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ s.id structure_id,
+ SUM(vhr.heures) heures
+ FROM
+ service_referentiel sr
+ JOIN intervenant i ON i.id = sr.intervenant_id
+ JOIN structure s ON s.id = sr.structure_id
+ JOIN volume_horaire_ref vhr ON vhr.service_referentiel_id = sr.id AND vhr.histo_destruction IS NULL
+ WHERE
+ sr.histo_destruction IS NULL
+ GROUP BY
+ i.annee_id, vhr.type_volume_horaire_id, i.id, s.id
+ ) p
) p
JOIN intervenant i ON i.id = p.intervenant_id
LEFT JOIN plafond_structure ps ON ps.plafond_id = p.plafond_id AND ps.structure_id = p.structure_id AND ps.annee_id = i.annee_id AND ps.histo_destruction IS NULL
@@ -2691,7 +2772,64 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
CASE WHEN p.heures > COALESCE(p.PLAFOND,ps.heures,0) + COALESCE(pd.heures, 0) + 0.05 THEN 1 ELSE 0 END depassement
FROM
(
- SELECT NULL PLAFOND_ID,NULL ANNEE_ID,NULL TYPE_VOLUME_HORAIRE_ID,NULL INTERVENANT_ID,NULL ELEMENT_PEDAGOGIQUE_ID,NULL TYPE_INTERVENTION_ID,NULL HEURES,NULL PLAFOND,NULL PLAFOND_ETAT_ID,NULL DEROGATION FROM dual WHERE 0 = 1
+ SELECT 5 PLAFOND_ID, NULL PLAFOND_ETAT_ID, p.* FROM (
+ WITH c AS (
+ SELECT
+ vhe.element_pedagogique_id,
+ vhe.type_intervention_id,
+ MAX(vhe.heures) heures,
+ COALESCE( MAX(vhe.groupes), ROUND(SUM(t.groupes),10) ) groupes
+
+ FROM
+ volume_horaire_ens vhe
+ JOIN parametre p ON p.nom = ''scenario_charges_services''
+ LEFT JOIN tbl_chargens t ON t.element_pedagogique_id = vhe.element_pedagogique_id
+ AND t.type_intervention_id = vhe.type_intervention_id
+ AND t.scenario_id = to_number(p.valeur)
+ GROUP BY
+ vhe.element_pedagogique_id,
+ vhe.type_intervention_id
+ ), s AS (
+ SELECT
+ i.annee_id,
+ vh.type_volume_horaire_id,
+ s.intervenant_id,
+ s.element_pedagogique_id,
+ vh.type_intervention_id,
+ SUM(vh.heures) heures
+ FROM
+ volume_horaire vh
+ JOIN service s ON s.id = vh.service_id
+ AND s.element_pedagogique_id IS NOT NULL
+ AND s.histo_destruction IS NULL
+ JOIN intervenant i ON i.id = s.intervenant_id
+ AND i.histo_destruction IS NULL
+ WHERE
+ vh.histo_destruction IS NULL
+ GROUP BY
+ i.annee_id,
+ vh.type_volume_horaire_id,
+ s.intervenant_id,
+ s.element_pedagogique_id,
+ vh.type_intervention_id
+ )
+ SELECT
+ s.annee_id annee_id,
+ s.type_volume_horaire_id type_volume_horaire_id,
+ s.intervenant_id intervenant_id,
+ s.element_pedagogique_id element_pedagogique_id,
+ s.type_intervention_id type_intervention_id,
+ s.heures heures,
+ COALESCE(c.heures * c.groupes,0) plafond
+ FROM
+ s
+ JOIN type_intervention ti ON ti.id = s.type_intervention_id
+ JOIN element_pedagogique ep ON ep.id = s.element_pedagogique_id
+ LEFT JOIN c ON c.element_pedagogique_id = s.element_pedagogique_id
+ AND c.type_intervention_id = COALESCE(ti.type_intervention_maquette_id,ti.id)
+ WHERE
+ s.heures - COALESCE(c.heures * c.groupes,0) > 0
+ ) p
) p
JOIN intervenant i ON i.id = p.intervenant_id
LEFT JOIN plafond_statut ps ON 1 = 0
diff --git a/data/ddl/table/MISSION.php b/data/ddl/table/MISSION.php
index 61916c9b844d27f660782ba8fad454f277752da0..b0fc95eb35d402da372b069e3dd2bef9bdcb8ecd 100644
--- a/data/ddl/table/MISSION.php
+++ b/data/ddl/table/MISSION.php
@@ -177,6 +177,18 @@ return [
'position' => 2,
'commentaire' => NULL,
],
+ 'LIBELLE_MISSION' => [
+ 'name' => 'LIBELLE_MISSION',
+ 'type' => 'string',
+ 'bdd-type' => 'VARCHAR2',
+ 'length' => 4000,
+ 'scale' => NULL,
+ 'precision' => NULL,
+ 'nullable' => TRUE,
+ 'default' => NULL,
+ 'position' => 19,
+ 'commentaire' => NULL,
+ ],
'STRUCTURE_ID' => [
'name' => 'STRUCTURE_ID',
'type' => 'int',
diff --git a/data/ddl/table/STATUT.php b/data/ddl/table/STATUT.php
index 749f8de61a5d073e9f431d85c39691d6beb6d14a..1eef3f827fa78a085837f3d860e5fb2988cfa290 100644
--- a/data/ddl/table/STATUT.php
+++ b/data/ddl/table/STATUT.php
@@ -105,6 +105,30 @@ return [
'position' => 70,
'commentaire' => NULL,
],
+ 'CODE_INDEMNITE' => [
+ 'name' => 'CODE_INDEMNITE',
+ 'type' => 'string',
+ 'bdd-type' => 'VARCHAR2',
+ 'length' => 1000,
+ 'scale' => NULL,
+ 'precision' => NULL,
+ 'nullable' => TRUE,
+ 'default' => NULL,
+ 'position' => 96,
+ 'commentaire' => NULL,
+ ],
+ 'CODE_INDEMNITE_PRIME' => [
+ 'name' => 'CODE_INDEMNITE_PRIME',
+ 'type' => 'string',
+ 'bdd-type' => 'VARCHAR2',
+ 'length' => 1000,
+ 'scale' => NULL,
+ 'precision' => NULL,
+ 'nullable' => TRUE,
+ 'default' => NULL,
+ 'position' => 97,
+ 'commentaire' => NULL,
+ ],
'CONSEIL_ACA' => [
'name' => 'CONSEIL_ACA',
'type' => 'bool',
@@ -741,6 +765,30 @@ return [
'position' => 88,
'commentaire' => NULL,
],
+ 'MODE_CALCUL' => [
+ 'name' => 'MODE_CALCUL',
+ 'type' => 'string',
+ 'bdd-type' => 'VARCHAR2',
+ 'length' => 1000,
+ 'scale' => NULL,
+ 'precision' => NULL,
+ 'nullable' => TRUE,
+ 'default' => NULL,
+ 'position' => 94,
+ 'commentaire' => NULL,
+ ],
+ 'MODE_CALCUL_PRIME' => [
+ 'name' => 'MODE_CALCUL_PRIME',
+ 'type' => 'string',
+ 'bdd-type' => 'VARCHAR2',
+ 'length' => 1000,
+ 'scale' => NULL,
+ 'precision' => NULL,
+ 'nullable' => TRUE,
+ 'default' => NULL,
+ 'position' => 95,
+ 'commentaire' => NULL,
+ ],
'MODE_ENSEIGNEMENT_PREVISIONNEL' => [
'name' => 'MODE_ENSEIGNEMENT_PREVISIONNEL',
'type' => 'string',
@@ -1125,55 +1173,7 @@ return [
'position' => 4,
'commentaire' => NULL,
],
- 'MODE_CALCUL' => [
- 'name' => 'MODE_CALCUL',
- 'type' => 'string',
- 'bdd-type' => 'VARCHAR2',
- 'length' => 1000,
- 'scale' => NULL,
- 'precision' => NULL,
- 'nullable' => TRUE,
- 'default' => NULL,
- 'position' => 86,
- 'commentaire' => NULL,
- ],
- 'MODE_CALCUL_PRIME' => [
- 'name' => 'MODE_CALCUL_PRIME',
- 'type' => 'string',
- 'bdd-type' => 'VARCHAR2',
- 'length' => 1000,
- 'scale' => NULL,
- 'precision' => NULL,
- 'nullable' => TRUE,
- 'default' => NULL,
- 'position' => 86,
- 'commentaire' => NULL,
- ],
- 'CODE_INDEMNITE' => [
- 'name' => 'CODE_INDEMNITE',
- 'type' => 'string',
- 'bdd-type' => 'VARCHAR2',
- 'length' => 1000,
- 'scale' => NULL,
- 'precision' => NULL,
- 'nullable' => TRUE,
- 'default' => NULL,
- 'position' => 86,
- 'commentaire' => NULL,
- ],
- 'CODE_INDEMNITE_PRIME' => [
- 'name' => 'CODE_INDEMNITE_PRIME',
- 'type' => 'string',
- 'bdd-type' => 'VARCHAR2',
- 'length' => 1000,
- 'scale' => NULL,
- 'precision' => NULL,
- 'nullable' => TRUE,
- 'default' => NULL,
- 'position' => 86,
- 'commentaire' => NULL,
- ],
- 'TYPE_PAIE' => [
+ 'TYPE_PAIE' => [
'name' => 'TYPE_PAIE',
'type' => 'string',
'bdd-type' => 'VARCHAR2',
@@ -1182,7 +1182,7 @@ return [
'precision' => NULL,
'nullable' => TRUE,
'default' => NULL,
- 'position' => 86,
+ 'position' => 98,
'commentaire' => NULL,
],
'TYPE_PAIE_PRIME' => [
@@ -1194,7 +1194,7 @@ return [
'precision' => NULL,
'nullable' => TRUE,
'default' => NULL,
- 'position' => 86,
+ 'position' => 99,
'commentaire' => NULL,
],
],
diff --git a/data/ddl/table/TAG.php b/data/ddl/table/TAG.php
index 75860272c58bb358db7421be029992a7dfc7b26b..9a5f43d3de5e542b6b478dfd8cc39bb7e6697655 100644
--- a/data/ddl/table/TAG.php
+++ b/data/ddl/table/TAG.php
@@ -129,6 +129,30 @@ return [
'position' => 4,
'commentaire' => NULL,
],
+ 'DATE_DEBUT' => [
+ 'name' => 'DATE_DEBUT',
+ 'type' => 'date',
+ 'bdd-type' => 'DATE',
+ 'length' => 0,
+ 'scale' => NULL,
+ 'precision' => NULL,
+ 'nullable' => TRUE,
+ 'default' => NULL,
+ 'position' => 11,
+ 'commentaire' => NULL,
+ ],
+ 'DATE_FIN' => [
+ 'name' => 'DATE_FIN',
+ 'type' => 'date',
+ 'bdd-type' => 'DATE',
+ 'length' => 0,
+ 'scale' => NULL,
+ 'precision' => NULL,
+ 'nullable' => TRUE,
+ 'default' => NULL,
+ 'position' => 12,
+ 'commentaire' => NULL,
+ ],
],
];
diff --git a/data/ddl/view/V_IMPUTATION_BUDGETAIRE_SIHAM.sql b/data/ddl/view/V_IMPUTATION_BUDGETAIRE_SIHAM.sql
index b40c81004a08937ae9376064eb93732328997d0f..19daf2edc16a677d7ec4c4157fada8deb861b2c3 100644
--- a/data/ddl/view/V_IMPUTATION_BUDGETAIRE_SIHAM.sql
+++ b/data/ddl/view/V_IMPUTATION_BUDGETAIRE_SIHAM.sql
@@ -103,7 +103,7 @@ FROM (SELECT dep3.*,
i.numero_insee intervenant_numero_insee,
CASE
WHEN round(CASE WHEN th.code = 'fc_majorees' THEN mep.heures ELSE 0 END *
- a.taux_hetd, 2) > 0
+ mis.taux_horaire, 2) > 0
THEN '1542'
ELSE
CASE WHEN ti.code = 'P' THEN '="0204"' ELSE '="2251"' END
@@ -120,7 +120,7 @@ FROM (SELECT dep3.*,
CASE WHEN th.code = 'fc_majorees' THEN mep.heures ELSE 0 END fc_majorees,
mis.heures_aa exercice_aa,
mis.heures_ac exercice_ac,
- a.taux_hetd taux_horaire
+ mis.taux_horaire taux_horaire
FROM tbl_paiement mis
JOIN mise_en_paiement mep
ON mep.id = mis.mise_en_paiement_id AND mep.histo_destruction IS NULL
diff --git a/data/ddl/view/V_TBL_PAIEMENT.sql b/data/ddl/view/V_TBL_PAIEMENT.sql
index 5d0666f8649f932a6316df761b9cbf26506cae38..ea7feedb12bb7a8977689e0ea947a50e6a5af51f 100644
--- a/data/ddl/view/V_TBL_PAIEMENT.sql
+++ b/data/ddl/view/V_TBL_PAIEMENT.sql
@@ -34,7 +34,7 @@ SELECT
COALESCE( ep.structure_id, i.structure_id ) structure_id,
mep.id mise_en_paiement_id,
mep.periode_paiement_id periode_paiement_id,
- COALESCE(mep.domaine_fonctionnel_id, e.domaine_fonctionnel_id, to_number(p.valeur)) domaine_fonctionnel_id,
+ COALESCE(mep.domaine_fonctionnel_id, e.domaine_fonctionnel_id, ose_parametre.get_domaine_fonc_ens_ext) domaine_fonctionnel_id,
frs.heures_compl_fi + frs.heures_compl_fc + frs.heures_compl_fa + frs.heures_compl_fc_majorees heures_a_payer,
COUNT(*) OVER(PARTITION BY frs.id) heures_a_payer_pond,
COALESCE(mep.heures,0) heures_demandees,
@@ -43,22 +43,19 @@ SELECT
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id) total_heures,
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id) * pea.pourc_exercice_aa total_heures_aa,
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id ORDER BY mep.id) cumul_heures,
- CASE WHEN p2.valeur = 'prorata' THEN COALESCE(mep.heures,0) * pea.pourc_exercice_aa ELSE ose_divers.CALC_HEURES_AA(
+ CASE WHEN ose_parametre.get_regle_repart_annee_civ = 'prorata' THEN COALESCE(mep.heures,0) * pea.pourc_exercice_aa ELSE ose_divers.CALC_HEURES_AA(
COALESCE(mep.heures,0), -- heures
pea.pourc_exercice_aa, -- pourc_exercice_aa
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id), -- total_heures
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id ORDER BY mep.id) -- cumul_heures
) END heures_aa,
- COALESCE(si.taux_remu_id, to_number(p3.valeur)) taux_remu_id,
- OSE_PAIEMENT.GET_TAUX_HORAIRE(COALESCE(si.taux_remu_id, to_number(p3.valeur)),COALESCE(pea.horaire_debut, a.date_debut)) taux_horaire,
+ COALESCE(ep.taux_remu_id, si.taux_remu_id, ose_parametre.get_taux_remu) taux_remu_id,
+ OSE_PAIEMENT.GET_TAUX_HORAIRE(COALESCE(ep.taux_remu_id, si.taux_remu_id, ose_parametre.get_taux_remu),COALESCE(pea.horaire_debut, a.date_debut)) taux_horaire,
1 taux_conges_payes
FROM
formule_resultat_service frs
JOIN type_volume_horaire tvh ON tvh.code = 'REALISE'
JOIN etat_volume_horaire evh ON evh.code = 'valide'
- JOIN parametre p ON p.nom = 'domaine_fonctionnel_ens_ext'
- JOIN parametre p2 ON p2.nom = 'regle_repartition_annee_civile'
- JOIN parametre p3 ON p3.nom = 'taux-remu'
JOIN formule_resultat fr ON fr.id = frs.formule_resultat_id
AND fr.type_volume_horaire_id = tvh.id
AND fr.etat_volume_horaire_id = evh.id
@@ -112,21 +109,19 @@ SELECT
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id) total_heures,
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id) * pea.pourc_exercice_aa total_heures_aa,
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id ORDER BY mep.id) cumul_heures,
- CASE WHEN p2.valeur = 'prorata' THEN COALESCE(mep.heures,0) * pea.pourc_exercice_aa ELSE ose_divers.CALC_HEURES_AA(
+ CASE WHEN ose_parametre.get_regle_repart_annee_civ = 'prorata' THEN COALESCE(mep.heures,0) * pea.pourc_exercice_aa ELSE ose_divers.CALC_HEURES_AA(
COALESCE(mep.heures,0), -- heures
pea.pourc_exercice_aa, -- pourc_exercice_aa
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id), -- total_heures
SUM(COALESCE(mep.heures,0)) OVER (partition BY frs.id ORDER BY mep.id) -- cumul_heures
) END heures_aa,
- COALESCE(si.taux_remu_id, to_number(p3.valeur)) taux_remu_id,
- OSE_PAIEMENT.GET_TAUX_HORAIRE(COALESCE(si.taux_remu_id, to_number(p3.valeur)),COALESCE(pea.horaire_debut, a.date_debut)) taux_horaire,
+ COALESCE(si.taux_remu_id, ose_parametre.get_taux_remu) taux_remu_id,
+ OSE_PAIEMENT.GET_TAUX_HORAIRE(COALESCE(si.taux_remu_id, ose_parametre.get_taux_remu),COALESCE(pea.horaire_debut, a.date_debut)) taux_horaire,
1 taux_conges_payes
FROM
formule_resultat_service_ref frs
JOIN type_volume_horaire tvh ON tvh.code = 'REALISE'
JOIN etat_volume_horaire evh ON evh.code = 'valide'
- JOIN parametre p2 ON p2.nom = 'regle_repartition_annee_civile'
- JOIN parametre p3 ON p3.nom = 'taux-remu'
JOIN formule_resultat fr ON fr.id = frs.formule_resultat_id
AND fr.type_volume_horaire_id = tvh.id
AND fr.etat_volume_horaire_id = evh.id
@@ -157,99 +152,4 @@ FROM
JOIN fonction_referentiel fncr ON fncr.id = sr.fonction_id
LEFT JOIN mise_en_paiement mep ON mep.formule_res_service_ref_id = frs.id
AND mep.histo_destruction IS NULL
-) t
-
-UNION ALL
-
-SELECT
- t.annee_id,
- NULL service_id,
- NULL service_referentiel_id,
- NULL formule_res_service_id,
- NULL formule_res_service_ref_id,
- t.mission_id,
- t.intervenant_id,
- t.structure_id,
- mep.id mise_en_paiement_id,
- mep.periode_paiement_id periode_paiement_id,
- mep.domaine_fonctionnel_id domaine_fonctionnel_id,
- t.heures_a_payer,
- COUNT(*) OVER(PARTITION BY t.mission_id, t.taux_remu_id, t.taux_horaire) heures_a_payer_pond,
- COALESCE(mep.heures,0) heures_demandees,
- CASE WHEN mep.periode_paiement_id IS NULL THEN 0 ELSE mep.heures END heures_payees,
- ROUND(t.heures_aa / t.heures_a_payer,2) pourc_exercice_aa,
- 1 - ROUND(t.heures_aa / t.heures_a_payer,2) pourc_exercice_ac,
- t.heures_aa,
- t.heures_ac,
- t.taux_remu_id,
- t.taux_horaire,
- t.taux_conges_payes
-FROM
- (
- SELECT
- t.annee_id,
- t.mission_id,
- t.intervenant_id,
- t.structure_id,
- SUM(t.heures_a_payer) heures_a_payer,
- --CASE WHEN t.aa = 1 THEN SUM(t.heures_a_payer) / SUM(t.heures_a_payer) ELSE 0 END pourc_exercice_aa,
- -- SUM(t.heures_a_payer) / SUM(CASE WHEN t.aa = 0 THEN t.heures_a_payer ELSE 0 END) pourc_exercice_ac,
- SUM(CASE WHEN t.aa = 1 THEN t.heures_a_payer ELSE 0 END) heures_aa,
- SUM(CASE WHEN t.aa = 0 THEN t.heures_a_payer ELSE 0 END) heures_ac,
- t.taux_remu_id,
- t.taux_horaire,
- t.taux_conges_payes
- FROM
- (
- SELECT
- tm.annee_id annee_id,
- tm.mission_id mission_id,
- tm.intervenant_id intervenant_id,
- tm.structure_id structure_id,
- vhm.heures heures_a_payer,
- CASE WHEN to_number(TO_CHAR( vhm.horaire_debut, 'YYYY' )) = tm.annee_id THEN 1 ELSE 0 END aa,
- CASE WHEN
- TO_CHAR( vhm.horaire_debut, 'HH24:MI' ) >= ose_parametre.get_horaire_nocturne -- horaire nocturne
- OR jf.id IS NOT NULL -- jour ferie
- OR TO_CHAR(vhm.horaire_debut, 'DAY', 'NLS_DATE_LANGUAGE=FRENCH') = 'DIMANCHE' -- dimanche
- THEN
- COALESCE(m.taux_remu_majore_id, m.taux_remu_id)
- ELSE
- m.taux_remu_id
- END taux_remu_id,
- ose_paiement.get_taux_horaire(CASE WHEN
- TO_CHAR( vhm.horaire_debut, 'HH24:MI' ) >= ose_parametre.get_horaire_nocturne -- horaire nocturne
- OR jf.id IS NOT NULL -- jour ferie
- OR TO_CHAR(vhm.horaire_debut, 'DAY', 'NLS_DATE_LANGUAGE=FRENCH') = 'DIMANCHE' -- dimanche
- THEN
- COALESCE(m.taux_remu_majore_id, m.taux_remu_id)
- ELSE
- m.taux_remu_id
- END, vhm.horaire_debut) taux_horaire,
-
- ose_parametre.get_taux_conges_payes+1 taux_conges_payes
- FROM
- tbl_mission tm
- JOIN mission m ON m.id = tm.mission_id
- JOIN volume_horaire_mission vhm ON vhm.histo_destruction IS NULL AND vhm.mission_id = tm.mission_id
- JOIN type_volume_horaire tvh ON tvh.id = vhm.type_volume_horaire_id AND tvh.code ='REALISE'
- LEFT JOIN validation_vol_horaire_miss vvhm ON vvhm.volume_horaire_mission_id = vhm.id
- LEFT JOIN validation v ON v.id = vvhm.validation_id AND v.histo_destruction IS NULL
- LEFT JOIN jour_ferie jf ON TO_CHAR( jf.date_jour, 'dd/mm/YYYY' ) = TO_CHAR( vhm.horaire_debut, 'dd/mm/YYYY' )
- WHERE
- tm.valide = 1
- /*@INTERVENANT_ID=tm.intervenant_id*/ /*@ANNEE_ID=tm.annee_id*/
- AND (vhm.auto_validation = 1 OR v.id IS NOT NULL)
- ORDER BY
- vhm.horaire_debut
- ) t
- GROUP BY
- t.annee_id,
- t.mission_id,
- t.intervenant_id,
- t.structure_id,
- t.taux_remu_id,
- t.taux_horaire,
- t.taux_conges_payes
- ) t
- LEFT JOIN mise_en_paiement mep ON mep.mission_id = t.mission_id AND mep.histo_destruction IS NULL
\ No newline at end of file
+) t
\ No newline at end of file
diff --git a/data/ddl/view/V_TBL_PLAFOND_INTERVENANT.sql b/data/ddl/view/V_TBL_PLAFOND_INTERVENANT.sql
index 7e3a713bfc0fd9806bbdd95c2ead3a2f85d36265..9eb56b25bd468c92ffe340514f62472fab5952b8 100644
--- a/data/ddl/view/V_TBL_PLAFOND_INTERVENANT.sql
+++ b/data/ddl/view/V_TBL_PLAFOND_INTERVENANT.sql
@@ -15,64 +15,99 @@ SELECT
CASE WHEN p.heures > COALESCE(p.PLAFOND,ps.heures,0) + COALESCE(pd.heures, 0) + 0.05 THEN 1 ELSE 0 END depassement
FROM
(
- SELECT 10 PLAFOND_ID, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT 1 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
SELECT
- i.annee_id annee_id,
- type_volume_horaire_id,
- intervenant_id,
- heures,
- plafond
+ i.annee_id annee_id,
+ fr.type_volume_horaire_id type_volume_horaire_id,
+ fr.intervenant_id intervenant_id,
+ fr.heures_compl_fi + fr.heures_compl_fc + fr.heures_compl_fa + fr.heures_compl_referentiel heures
FROM
- (
- SELECT
- intervenant_id,
- type_volume_horaire_id,
- tranche,
- sum(heures) heures,
- least(min(plafond_tranche_mission), min(plafond_tranche)) plafond
- FROM
- (
- SELECT
- m.intervenant_id intervenant_id,
- vhm.type_volume_horaire_id type_volume_horaire_id,
- to_char( vhm.horaire_debut, 'YYYY-mm' ) tranche,
- vhm.heures heures,
- ROUND(CASE to_char( vhm.horaire_debut, 'mm' ) WHEN '07' THEN 150 WHEN '08' THEN 150 ELSE 67 END / 30 * (m.date_fin - m.date_debut),2) plafond_tranche_mission,
- CASE to_char( vhm.horaire_debut, 'mm' ) WHEN '07' THEN 150 WHEN '08' THEN 150 ELSE 67 END plafond_tranche
- FROM
- volume_horaire_mission vhm
- JOIN type_volume_horaire tvh ON tvh.id = vhm.type_volume_horaire_id AND tvh.code = 'REALISE'
- JOIN mission m ON m.id = vhm.mission_id AND m.histo_destruction IS NULL
- WHERE
- vhm.histo_destruction IS NULL
- ) t
- GROUP BY
- intervenant_id,
- type_volume_horaire_id,
- tranche
- ) t
- JOIN intervenant i ON i.id = t.intervenant_id
+ intervenant i
+ JOIN statut si ON si.id = i.statut_id
+ JOIN etat_volume_horaire evh ON evh.code = 'saisi'
+ JOIN formule_resultat fr ON fr.intervenant_id = i.id AND fr.etat_volume_horaire_id = evh.id
+ ) p
+
+ UNION ALL
+
+ SELECT 2 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT
+ i.annee_id annee_id,
+ fr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ fr.total - fr.heures_compl_fc_majorees heures
+ FROM
+ intervenant i
+ JOIN etat_volume_horaire evh ON evh.code = 'saisi'
+ JOIN formule_resultat fr ON fr.intervenant_id = i.id AND fr.etat_volume_horaire_id = evh.id
+ JOIN statut si ON si.id = i.statut_id
+ ) p
+
+ UNION ALL
+
+ SELECT 4 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT
+ i.annee_id annee_id,
+ fr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ SUM(frvh.heures_compl_fi) heures
+ FROM
+ intervenant i
+ JOIN etat_volume_horaire evh ON evh.code = 'saisi'
+ JOIN formule_resultat fr ON fr.intervenant_id = i.id AND fr.etat_volume_horaire_id = evh.id
+ JOIN formule_resultat_vh frvh ON frvh.formule_resultat_id = fr.id
+ JOIN volume_horaire vh ON vh.id = frvh.volume_horaire_id
+ JOIN type_intervention ti ON ti.id = vh.type_intervention_id
+ JOIN statut si ON si.id = i.statut_id
WHERE
- heures > plafond
- AND rownum = 1
+ ti.regle_foad = 0
+ GROUP BY
+ fr.type_volume_horaire_id,
+ i.annee_id,
+ i.id,
+ i.statut_id
+ ) p
+
+ UNION ALL
+
+ SELECT 8 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT
+ i.annee_id annee_id,
+ fr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ fr.service_referentiel + fr.heures_compl_referentiel heures
+ FROM
+ intervenant i
+ JOIN etat_volume_horaire evh ON evh.code = 'saisi'
+ JOIN formule_resultat fr ON fr.intervenant_id = i.id AND fr.etat_volume_horaire_id = evh.id
+ JOIN statut si ON si.id = i.statut_id
) p
UNION ALL
SELECT 9 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
SELECT
- i.annee_id annee_id,
- vhm.type_volume_horaire_id type_volume_horaire_id,
- i.id intervenant_id,
- SUM(vhm.heures) heures
+ i.annee_id annee_id,
+ vh.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ SUM(vh.heures) heures
FROM
- volume_horaire_mission vhm
- JOIN mission m ON m.histo_destruction IS NULL AND m.id = vhm.mission_id
- JOIN intervenant i ON i.id = m.intervenant_id
+ volume_horaire vh
+ JOIN service s ON s.id = vh.service_id
+ JOIN intervenant i ON i.id = s.intervenant_id
+ JOIN statut si ON si.id = i.statut_id
WHERE
- vhm.histo_destruction IS NULL
+ vh.histo_destruction IS NULL
+ AND i.histo_destruction IS NULL
+ AND vh.motif_non_paiement_id IS NULL
+ AND si.code IN ('IMP')
GROUP BY
- i.annee_id, vhm.type_volume_horaire_id, i.id
+ i.annee_id,
+ vh.type_volume_horaire_id,
+ i.id,
+ i.statut_id
+ HAVING
+ SUM(vh.heures) >= 0
) p
) p
JOIN intervenant i ON i.id = p.intervenant_id
diff --git a/data/ddl/view/V_TBL_PLAFOND_REFERENTIEL.sql b/data/ddl/view/V_TBL_PLAFOND_REFERENTIEL.sql
index 91e06882d0700d0f31c0e2936e2407255be9a3f9..8e0f9a00e33821a340bbfa925196ffa235a7cb27 100644
--- a/data/ddl/view/V_TBL_PLAFOND_REFERENTIEL.sql
+++ b/data/ddl/view/V_TBL_PLAFOND_REFERENTIEL.sql
@@ -16,7 +16,42 @@ SELECT
CASE WHEN p.heures > COALESCE(p.PLAFOND,ps.heures,0) + COALESCE(pd.heures, 0) + 0.05 THEN 1 ELSE 0 END depassement
FROM
(
- SELECT NULL PLAFOND_ID,NULL ANNEE_ID,NULL TYPE_VOLUME_HORAIRE_ID,NULL INTERVENANT_ID,NULL FONCTION_REFERENTIEL_ID,NULL HEURES,NULL PLAFOND,NULL PLAFOND_ETAT_ID,NULL DEROGATION FROM dual WHERE 0 = 1
+ SELECT 7 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT
+ i.annee_id annee_id,
+ vhr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ fr.id fonction_referentiel_id,
+ SUM(vhr.heures) heures
+ FROM
+ service_referentiel sr
+ JOIN intervenant i ON i.id = sr.intervenant_id
+ JOIN fonction_referentiel fr ON fr.id = sr.fonction_id
+ JOIN volume_horaire_ref vhr ON vhr.service_referentiel_id = sr.id AND vhr.histo_destruction IS NULL
+ WHERE
+ sr.histo_destruction IS NULL
+ GROUP BY
+ i.annee_id, vhr.type_volume_horaire_id, i.id, fr.id
+
+ UNION ALL
+
+ SELECT
+ i.annee_id annee_id,
+ vhr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ fr.id fonction_referentiel_id,
+ SUM(vhr.heures) heures
+ FROM
+ service_referentiel sr
+ JOIN intervenant i ON i.id = sr.intervenant_id
+ JOIN fonction_referentiel frf ON frf.id = sr.fonction_id
+ JOIN fonction_referentiel fr ON fr.id = frf.parent_id
+ JOIN volume_horaire_ref vhr ON vhr.service_referentiel_id = sr.id AND vhr.histo_destruction IS NULL
+ WHERE
+ sr.histo_destruction IS NULL
+ GROUP BY
+ i.annee_id, vhr.type_volume_horaire_id, i.id, fr.id
+ ) p
) p
JOIN intervenant i ON i.id = p.intervenant_id
LEFT JOIN plafond_referentiel ps ON ps.plafond_id = p.plafond_id AND ps.fonction_referentiel_id = p.fonction_referentiel_id AND ps.annee_id = i.annee_id AND ps.histo_destruction IS NULL
diff --git a/data/ddl/view/V_TBL_PLAFOND_STRUCTURE.sql b/data/ddl/view/V_TBL_PLAFOND_STRUCTURE.sql
index aa66f5f2403c57d34d6bab0f4ee053f26f6a849c..bcc562a00897ec9377914945254482cac0570425 100644
--- a/data/ddl/view/V_TBL_PLAFOND_STRUCTURE.sql
+++ b/data/ddl/view/V_TBL_PLAFOND_STRUCTURE.sql
@@ -16,7 +16,23 @@ SELECT
CASE WHEN p.heures > COALESCE(p.PLAFOND,ps.heures,0) + COALESCE(pd.heures, 0) + 0.05 THEN 1 ELSE 0 END depassement
FROM
(
- SELECT NULL PLAFOND_ID,NULL ANNEE_ID,NULL TYPE_VOLUME_HORAIRE_ID,NULL INTERVENANT_ID,NULL STRUCTURE_ID,NULL HEURES,NULL PLAFOND,NULL PLAFOND_ETAT_ID,NULL DEROGATION FROM dual WHERE 0 = 1
+ SELECT 6 PLAFOND_ID, NULL PLAFOND, NULL PLAFOND_ETAT_ID, p.* FROM (
+ SELECT
+ i.annee_id annee_id,
+ vhr.type_volume_horaire_id type_volume_horaire_id,
+ i.id intervenant_id,
+ s.id structure_id,
+ SUM(vhr.heures) heures
+ FROM
+ service_referentiel sr
+ JOIN intervenant i ON i.id = sr.intervenant_id
+ JOIN structure s ON s.id = sr.structure_id
+ JOIN volume_horaire_ref vhr ON vhr.service_referentiel_id = sr.id AND vhr.histo_destruction IS NULL
+ WHERE
+ sr.histo_destruction IS NULL
+ GROUP BY
+ i.annee_id, vhr.type_volume_horaire_id, i.id, s.id
+ ) p
) p
JOIN intervenant i ON i.id = p.intervenant_id
LEFT JOIN plafond_structure ps ON ps.plafond_id = p.plafond_id AND ps.structure_id = p.structure_id AND ps.annee_id = i.annee_id AND ps.histo_destruction IS NULL
diff --git a/data/ddl/view/V_TBL_PLAFOND_VOLUME_HORAIRE.sql b/data/ddl/view/V_TBL_PLAFOND_VOLUME_HORAIRE.sql
index c7cd9ee5463f82f4950af3e307c93186f477e99a..6e2e8171bddb6107e9538adc52579baeb9930901 100644
--- a/data/ddl/view/V_TBL_PLAFOND_VOLUME_HORAIRE.sql
+++ b/data/ddl/view/V_TBL_PLAFOND_VOLUME_HORAIRE.sql
@@ -13,7 +13,64 @@ SELECT
CASE WHEN p.heures > COALESCE(p.PLAFOND,ps.heures,0) + COALESCE(pd.heures, 0) + 0.05 THEN 1 ELSE 0 END depassement
FROM
(
- SELECT NULL PLAFOND_ID,NULL ANNEE_ID,NULL TYPE_VOLUME_HORAIRE_ID,NULL INTERVENANT_ID,NULL ELEMENT_PEDAGOGIQUE_ID,NULL TYPE_INTERVENTION_ID,NULL HEURES,NULL PLAFOND,NULL PLAFOND_ETAT_ID,NULL DEROGATION FROM dual WHERE 0 = 1
+ SELECT 5 PLAFOND_ID, NULL PLAFOND_ETAT_ID, p.* FROM (
+ WITH c AS (
+ SELECT
+ vhe.element_pedagogique_id,
+ vhe.type_intervention_id,
+ MAX(vhe.heures) heures,
+ COALESCE( MAX(vhe.groupes), ROUND(SUM(t.groupes),10) ) groupes
+
+ FROM
+ volume_horaire_ens vhe
+ JOIN parametre p ON p.nom = 'scenario_charges_services'
+ LEFT JOIN tbl_chargens t ON t.element_pedagogique_id = vhe.element_pedagogique_id
+ AND t.type_intervention_id = vhe.type_intervention_id
+ AND t.scenario_id = to_number(p.valeur)
+ GROUP BY
+ vhe.element_pedagogique_id,
+ vhe.type_intervention_id
+ ), s AS (
+ SELECT
+ i.annee_id,
+ vh.type_volume_horaire_id,
+ s.intervenant_id,
+ s.element_pedagogique_id,
+ vh.type_intervention_id,
+ SUM(vh.heures) heures
+ FROM
+ volume_horaire vh
+ JOIN service s ON s.id = vh.service_id
+ AND s.element_pedagogique_id IS NOT NULL
+ AND s.histo_destruction IS NULL
+ JOIN intervenant i ON i.id = s.intervenant_id
+ AND i.histo_destruction IS NULL
+ WHERE
+ vh.histo_destruction IS NULL
+ GROUP BY
+ i.annee_id,
+ vh.type_volume_horaire_id,
+ s.intervenant_id,
+ s.element_pedagogique_id,
+ vh.type_intervention_id
+ )
+ SELECT
+ s.annee_id annee_id,
+ s.type_volume_horaire_id type_volume_horaire_id,
+ s.intervenant_id intervenant_id,
+ s.element_pedagogique_id element_pedagogique_id,
+ s.type_intervention_id type_intervention_id,
+ s.heures heures,
+ COALESCE(c.heures * c.groupes,0) plafond
+ FROM
+ s
+ JOIN type_intervention ti ON ti.id = s.type_intervention_id
+ JOIN element_pedagogique ep ON ep.id = s.element_pedagogique_id
+ LEFT JOIN c ON c.element_pedagogique_id = s.element_pedagogique_id
+ AND c.type_intervention_id = COALESCE(ti.type_intervention_maquette_id,ti.id)
+ WHERE
+ s.heures - COALESCE(c.heures * c.groupes,0) > 0
+ ) p
) p
JOIN intervenant i ON i.id = p.intervenant_id
LEFT JOIN plafond_statut ps ON 1 = 0
diff --git a/data/ddl_columns_pos.php b/data/ddl_columns_pos.php
index 8334dc41019755bb60d9972b9ce823801eb8f19c..8b4f6ca8347b7fd064b08bdcee4a3a23c6481e31 100644
--- a/data/ddl_columns_pos.php
+++ b/data/ddl_columns_pos.php
@@ -1335,6 +1335,12 @@ return [
'MODE_ENSEIGNEMENT_PREVISIONNEL',
'MODE_ENSEIGNEMENT_REALISE',
'PAIEMENT',
+ 'MODE_CALCUL',
+ 'MODE_CALCUL_PRIME',
+ 'CODE_INDEMNITE',
+ 'CODE_INDEMNITE_PRIME',
+ 'TYPE_PAIE',
+ 'TYPE_PAIE_PRIME',
],
'STRUCTURE' => [
'ID',
@@ -2209,6 +2215,7 @@ return [
'ETUDIANTS_SUIVIS',
'TAUX_REMU_MAJORE_ID',
'HEURES_FORMATION',
+ 'LIBELLE_MISSION',
],
'MISSION_ETUDIANT' => [
'MISSION_ID',
diff --git a/front/Mission/Mission.vue b/front/Mission/Mission.vue
index 25144ee1173fc41a056be82703df1eff124e1529..8795edc9e42bfceb762fca601b26d95de22e98a4 100644
--- a/front/Mission/Mission.vue
+++ b/front/Mission/Mission.vue
@@ -1,12 +1,16 @@
<template>
- <div :id="mission.id" class="card" :class="{'bg-success':mission.valide,'bg-default':!mission.valide}">
+ <div :id="mission.id" :class="{'bg-success':mission.valide,'bg-default':!mission.valide}" class="card">
<form @submit.prevent="submitForm">
<div class="card-header card-header-h3">
- <h5>
- {{ mission.typeMission.libelle }}
+ <h5 v-if="mission.libelleMission">
+ {{ mission.libelleMission }}
<span class="float-end">Du <u-date :value="mission.dateDebut"/> au <u-date
:value="mission.dateFin"/></span>
</h5>
+ <h6 v-if="mission.libelleMission">{{ mission.typeMission.libelle }}</h6>
+ <h5 v-if="!mission.libelleMission">{{ mission.typeMission.libelle }}
+ <span class="float-end">Du <u-date :value="mission.dateDebut"/> au <u-date
+ :value="mission.dateFin"/></span></h5>
</div>
<div class="card-body">
<div class="row">
@@ -26,20 +30,22 @@
<div class="col-md-6">
<label class=" form-label">Taux majoré (dimanches/jours fériés)</label>
<div class="form-control">
- {{ mission.tauxRemuMajore ? mission.tauxRemuMajore.libelle : mission.tauxRemu ? 'Idem (' +mission.tauxRemu.libelle+')' : null }}
+ {{
+ mission.tauxRemuMajore ? mission.tauxRemuMajore.libelle : mission.tauxRemu ? 'Idem ('+mission.tauxRemu.libelle+')' : null
+ }}
</div>
</div>
<div class="col-md-7">
<label class=" form-label">Nombre d'heures prévisionnelles</label>
<div class="input-group mb-3">
<div class="form-control" v-html="heuresLib"></div>
- <button class="input-group-btn btn btn-secondary" data-bs-toggle="modal"
- :data-bs-target="`#details-${mission.id}`">
+ <button :data-bs-target="`#details-${mission.id}`" class="input-group-btn btn btn-secondary"
+ data-bs-toggle="modal">
Détails
</button>
</div>
</div>
- <div class="col-md-5" v-if="mission.typeMission.besoinFormation">
+ <div v-if="mission.typeMission.besoinFormation" class="col-md-5">
<label class=" form-label">Heures de formation prévues</label>
<div class="form-control">{{ mission.heuresFormation }}</div>
</div>
@@ -50,7 +56,7 @@
<div class="form-control">{{ mission.description }}</div>
</div>
</div>
- <div class="row" v-if="mission.typeMission.accompagnementEtudiants">
+ <div v-if="mission.typeMission.accompagnementEtudiants" class="row">
<div class="col-md-12">
<label class=" form-label">Etudiants suivis</label>
<div class="form-control">
@@ -72,22 +78,22 @@
<a v-if="mission.canValider"
:href="validerUrl"
class="btn btn-secondary"
- data-title="Validation de la mission"
data-content="Êtes-vous sur de vouloir valider la mission ?"
+ data-title="Validation de la mission"
@click.prevent="valider">Valider</a>
<a v-if="mission.canDevalider"
:href="devaliderUrl"
class="btn btn-danger"
- data-title="Dévalidation de la mission"
data-content="Êtes-vous sur de vouloir dévalider la mission ?"
+ data-title="Dévalidation de la mission"
@click.prevent="devalider">Dévalider</a>
<a v-if="mission.canSupprimer"
:href="supprimerUrl"
class="btn btn-danger"
- data-title="Suppression de la mission"
data-content="Êtes-vous sur de vouloir supprimer la mission ?"
+ data-title="Suppression de la mission"
@click.prevent="supprimer">Supprimer</a>
</div>
</div>
@@ -102,15 +108,15 @@
Créé le
<u-date :value="mission.histoCreation"/>
par
- <utilisateur :nom="mission.histoCreateur.displayName" :mail="mission.histoCreateur.email"/>
+ <utilisateur :mail="mission.histoCreateur.email" :nom="mission.histoCreateur.displayName"/>
</div>
<div>
<u-icon :name="mission.valide ? 'thumbs-up' : 'thumbs-down'"
:variant="mission.valide ? 'success' : 'info'"/>
{{ validationText }}
<utilisateur v-if="mission.validation && mission.validation.histoCreateur"
- :nom="mission.validation.histoCreateur.displayName"
- :mail="mission.validation.histoCreateur.email"/>
+ :mail="mission.validation.histoCreateur.email"
+ :nom="mission.validation.histoCreateur.displayName"/>
</div>
<div>
<u-icon :name="mission.contrat ? 'thumbs-up' : 'thumbs-down'"
@@ -145,8 +151,8 @@
<td>
<u-icon name="thumbs-up" variant="success"/>
Saisi par
- <utilisateur :nom="vh.histoCreateur.displayName"
- :mail="vh.histoCreateur.email"/>
+ <utilisateur :mail="vh.histoCreateur.email"
+ :nom="vh.histoCreateur.displayName"/>
le
<u-date :value="vh.histoCreation"/>
<br/>
@@ -156,31 +162,31 @@
vh.validation && vh.validation.id == null ? 'Autovalidé' : (!vh.validation ? 'à valider' : '')
}}
<span v-if="vh.validation && vh.validation.histoCreateur">
- Validé par <utilisateur :nom="vh.validation.histoCreateur.displayName"
- :mail="vh.validation.histoCreateur.email"/> le <u-date
+ Validé par <utilisateur :mail="vh.validation.histoCreateur.email"
+ :nom="vh.validation.histoCreateur.displayName"/> le <u-date
:value="vh.validation.histoCreation"/>
</span>
</td>
<td>
<a v-if="vh.canValider"
- class="btn btn-secondary"
:data-id="vh.id"
- data-title="Validation du volume horaire"
+ class="btn btn-secondary"
data-content="Êtes-vous sur de vouloir valider ce volume horaire ?"
+ data-title="Validation du volume horaire"
@click.prevent="volumeHoraireValider">Valider</a>
<a v-if="vh.canDevalider"
- class="btn btn-danger"
:data-id="vh.id"
- data-title="Dévalidation du volume horaire"
+ class="btn btn-danger"
data-content="Êtes-vous sur de vouloir dévalider ce volume horaire ?"
+ data-title="Dévalidation du volume horaire"
@click.prevent="volumeHoraireDevalider">Dévalider</a>
<a v-if="vh.canSupprimer"
- class="btn btn-danger"
:data-id="vh.id"
- data-title="Suppression du volume horaire"
+ class="btn btn-danger"
data-content="Êtes-vous sur de vouloir supprimer le volume horaire ?"
+ data-title="Suppression du volume horaire"
@click.prevent="volumeHoraireSupprimer">Supprimer</a>
</td>
</tr>
@@ -223,11 +229,11 @@ export default {
if (this.mission.heures === null || this.mission.heures === 0) {
return 'Aucune heure saisie';
} else if (this.mission.heures == this.mission.heuresValidees) {
- return Util.formattedHeures(this.mission.heures) + ' heures (validées)';
+ return Util.formattedHeures(this.mission.heures)+' heures (validées)';
} else if (this.mission.heuresValidees == 0) {
- return Util.formattedHeures(this.mission.heures) + ' heures (non validées)';
+ return Util.formattedHeures(this.mission.heures)+' heures (non validées)';
} else {
- return '<span class="bg-info">'+Util.formattedHeures(this.mission.heures) + '</span> heures (' + Util.formattedHeures(this.mission.heuresValidees) + ' validées)';
+ return '<span class="bg-info">'+Util.formattedHeures(this.mission.heures)+'</span> heures ('+Util.formattedHeures(this.mission.heuresValidees)+' validées)';
}
}
},
@@ -239,7 +245,7 @@ export default {
} else if (validation.id === null) {
return 'Autovalidée';
} else {
- return 'Validation du ' + Util.dateToString(validation.histoCreation) + ' par ';
+ return 'Validation du '+Util.dateToString(validation.histoCreation)+' par ';
}
},
saisie(event)
diff --git a/module/Application/config/tag.config.php b/module/Application/config/tag.config.php
index ff64c29cca234f6e7050f5018f9ddf4205dea0e8..bca191af1452eec61f5e8bcc61d14a3b608cbea8 100644
--- a/module/Application/config/tag.config.php
+++ b/module/Application/config/tag.config.php
@@ -2,6 +2,8 @@
namespace Application;
+use Application\Form\Tag\TagSaisieForm;
+use Application\Form\Tag\TagSaisieFormFactory;
use Application\Provider\Privilege\Privileges;
use UnicaenPrivilege\Guard\PrivilegeController;
@@ -100,9 +102,10 @@ return [
],
'view_helpers' => [
],
- 'form_elements' => [
- 'invokables' => [
- Form\Tag\TagSaisieForm::class => Form\Tag\TagSaisieForm::class,
- ],
+
+
+ 'forms' => [
+ TagSaisieForm::class => TagSaisieFormFactory::class,
],
+
];
diff --git a/module/Application/src/Controller/TagController.php b/module/Application/src/Controller/TagController.php
index 9fad948bd8c3c54b4769c757735b8145a14fc781..218dc65ccccb9fff3dd49d519fdeb4b17fa5f8bb 100644
--- a/module/Application/src/Controller/TagController.php
+++ b/module/Application/src/Controller/TagController.php
@@ -3,7 +3,7 @@
namespace Application\Controller;
use Application\Entity\Db\Tag;
-use Application\Form\Tag\Traits\TagSaisieFormAwareTrait;
+use Application\Form\Tag\TagSaisieFormAwareTrait;
use Application\Service\Traits\TagServiceAwareTrait;
use UnicaenApp\View\Model\MessengerViewModel;
@@ -13,7 +13,7 @@ class TagController extends AbstractController
use TagSaisieFormAwareTrait;
- public function indexAction()
+ public function indexAction ()
{
$this->em()->getFilters()->enable('historique')->init([
Tag::class,
@@ -25,19 +25,21 @@ class TagController extends AbstractController
}
- public function saisirAction()
+
+ public function saisirAction ()
{
/* @var $tag Tag */
- $tag = $this->getEvent()->getParam('tag');
+ $tag = $this->getEvent()->getParam('tag');
+ $form = $this->getFormTag();
- $form = $this->getFormTagSaisie();
if (empty($tag)) {
$title = 'Création d\'un nouveau tag';
- $tag = $this->getServiceTag()->newEntity();
+ $tag = $this->getServiceTag()->newEntity();
} else {
$title = 'Édition d\'un tag';
}
+
$form->bindRequestSave($tag, $this->getRequest(), function (Tag $tag) {
try {
$this->getServiceTag()->save($tag);
@@ -51,7 +53,8 @@ class TagController extends AbstractController
}
- public function supprimerAction()
+
+ public function supprimerAction ()
{
$tag = $this->getEvent()->getParam('tag');
diff --git a/module/Application/src/Entity/Db/Mapping/Application.Entity.Db.Tag.dcm.xml b/module/Application/src/Entity/Db/Mapping/Application.Entity.Db.Tag.dcm.xml
index 690e2b4f1ec06e036cc41e324d50082bb2a08056..1ab73fc243a921f1a93339f6687d60f690ccd0ae 100755
--- a/module/Application/src/Entity/Db/Mapping/Application.Entity.Db.Tag.dcm.xml
+++ b/module/Application/src/Entity/Db/Mapping/Application.Entity.Db.Tag.dcm.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<doctrine-mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Application\Entity\Db\Tag" table="TAG">
<indexes>
@@ -17,6 +17,9 @@
<field name="histoModification" type="datetime" column="HISTO_MODIFICATION" nullable="false"/>
<field name="libelleCourt" type="string" column="LIBELLE_COURT" length="50" nullable="false"/>
<field name="libelleLong" type="string" column="LIBELLE_LONG" length="200" nullable="false"/>
+ <field name="dateDebut" type="datetime" column="DATE_DEBUT" nullable="false"/>
+ <field name="dateFin" type="datetime" column="DATE_FIN" nullable="false"/>
+
<many-to-one field="histoModificateur" target-entity="Application\Entity\Db\Utilisateur">
<join-columns>
<join-column name="HISTO_MODIFICATEUR_ID" referenced-column-name="ID"/>
diff --git a/module/Application/src/Entity/Db/Tag.php b/module/Application/src/Entity/Db/Tag.php
index b13abc133646d1e414297ebb4cc037c11437767f..abdfb9f4689876d7341e69eafa858b3106ff3838 100755
--- a/module/Application/src/Entity/Db/Tag.php
+++ b/module/Application/src/Entity/Db/Tag.php
@@ -2,6 +2,7 @@
namespace Application\Entity\Db;
+use Laminas\Validator\Date;
use UnicaenApp\Entity\HistoriqueAwareInterface;
use UnicaenApp\Entity\HistoriqueAwareTrait;
@@ -9,28 +10,35 @@ class Tag implements HistoriqueAwareInterface
{
use HistoriqueAwareTrait;
- protected ?int $id = null;
+ protected ?int $id = null;
- protected ?string $code = null;
+ protected ?string $code = null;
- protected ?string $libelleCourt = null;
+ protected ?string $libelleCourt = null;
- protected ?string $libelleLong = null;
+ protected ?string $libelleLong = null;
+ private ?\DateTime $dateDebut = null;
- public function getId(): ?int
+ private ?\DateTime $dateFin = null;
+
+
+
+ public function getId (): ?int
{
return $this->id;
}
- public function getCode(): ?string
+
+ public function getCode (): ?string
{
return $this->code;
}
- public function setCode(?string $code): Tag
+
+ public function setCode (?string $code): Tag
{
$this->code = $code;
@@ -38,13 +46,38 @@ class Tag implements HistoriqueAwareInterface
}
- public function getLibelleCourt(): ?string
+
+ public function __toString (): string
+ {
+ return $this->getLibelleLong() ? : $this->getLibelleCourt();
+ }
+
+
+
+ public function getLibelleLong (): ?string
+ {
+ return $this->libelleLong;
+ }
+
+
+
+ public function setLibelleLong (?string $libelleLong): Tag
+ {
+ $this->libelleLong = $libelleLong;
+
+ return $this;
+ }
+
+
+
+ public function getLibelleCourt (): ?string
{
return $this->libelleCourt;
}
- public function setLibelleCourt(?string $libelleCourt): Tag
+
+ public function setLibelleCourt (?string $libelleCourt): Tag
{
$this->libelleCourt = $libelleCourt;
@@ -52,22 +85,35 @@ class Tag implements HistoriqueAwareInterface
}
- public function getLibelleLong(): ?string
+
+ public function getDateDebut (): ?\DateTime
{
- return $this->libelleLong;
+ return $this->dateDebut;
}
- public function setLibelleLong(?string $libelleLong): Tag
+
+ public function setDateDebut (?\DateTime $dateDebut): Tag
{
- $this->libelleLong = $libelleLong;
+ $this->dateDebut = $dateDebut;
return $this;
}
- public function __toString(): string
+
+ public function getDateFin (): ?\DateTime
{
- return $this->getLibelleLong() ?: $this->getLibelleCourt();
+ return $this->dateFin;
}
+
+
+
+ public function setDateFin (?\DateTime $dateFin): Tag
+ {
+ $this->dateFin = $dateFin;
+
+ return $this;
+ }
+
}
diff --git a/module/Application/src/Form/Tag/TagSaisieForm.php b/module/Application/src/Form/Tag/TagSaisieForm.php
index 64d6e8c934a35e9d38babf2a0b629fbb4ac18d36..980ec182d710094c15109372c6ac931716f9f7e6 100644
--- a/module/Application/src/Form/Tag/TagSaisieForm.php
+++ b/module/Application/src/Form/Tag/TagSaisieForm.php
@@ -4,6 +4,7 @@ namespace Application\Form\Tag;
use Application\Entity\Db\Tag;
use Application\Form\AbstractForm;
+use Application\Service\Traits\AnneeServiceAwareTrait;
/**
* Description of TagSaisieForm
@@ -12,14 +13,22 @@ use Application\Form\AbstractForm;
*/
class TagSaisieForm extends AbstractForm
{
+ use AnneeServiceAwareTrait;
- public function init()
+ public function init ()
{
$this->spec(Tag::class);
+
+
$this->build();
- $this->get('libelleCourt')->setLabel('Libellé court');
- $this->get('libelleLong')->setLabel('Libellé long');
+ $this->setLabels([
+ 'libelleCourt' => 'Libellé court',
+ 'libelleLong' => 'Libellé long',
+ 'dateDebut' => 'A partir de',
+ 'dateFin' => 'jusqu\'à',
+
+ ]);
$this->addSecurity();
$this->addSubmit();
diff --git a/module/Application/src/Form/Tag/TagSaisieFormAwareTrait.php b/module/Application/src/Form/Tag/TagSaisieFormAwareTrait.php
new file mode 100644
index 0000000000000000000000000000000000000000..bd93527b61048f98898de6a249be0f8befaf6a96
--- /dev/null
+++ b/module/Application/src/Form/Tag/TagSaisieFormAwareTrait.php
@@ -0,0 +1,38 @@
+<?php
+
+namespace Application\Form\Tag;
+
+
+/**
+ * Description of TagSaisieFormAwareTrait
+ *
+ */
+trait TagSaisieFormAwareTrait
+{
+ protected ?TagSaisieForm $formTag = null;
+
+
+
+ public function getFormTag (): ?TagSaisieForm
+ {
+ if (!empty($this->formTag)) {
+ return $this->formTag;
+ }
+
+ return \Application::$container->get('FormElementManager')->get(TagSaisieForm::class);
+ }
+
+
+
+ /**
+ * @param TagSaisieForm $formTag
+ *
+ * @return self
+ */
+ public function setFormTag (?TagSaisieForm $formTag)
+ {
+ $this->formTag = $formTag;
+
+ return $this;
+ }
+}
\ No newline at end of file
diff --git a/module/Application/src/Form/Tag/TagSaisieFormFactory.php b/module/Application/src/Form/Tag/TagSaisieFormFactory.php
new file mode 100644
index 0000000000000000000000000000000000000000..fa9d89edc3cc3aa929505a0c887533e4ddc2511d
--- /dev/null
+++ b/module/Application/src/Form/Tag/TagSaisieFormFactory.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Application\Form\Tag;
+
+use Psr\Container\ContainerInterface;
+
+
+/**
+ * Description of TagSaisieFormFactory
+ *
+ * @author Antony Le Courtes <antony.lecourtes at unicaen.fr>
+ */
+class TagSaisieFormFactory
+{
+
+ /**
+ * @param ContainerInterface $container
+ * @param string $requestedName
+ * @param array|null $options
+ *
+ * @return TagSaisieForm
+ */
+ public function __invoke (ContainerInterface $container, $requestedName, $options = null): TagSaisieForm
+ {
+ $form = new TagSaisieForm();
+
+ /* Injectez vos dépendances ICI */
+
+ return $form;
+ }
+}
\ No newline at end of file
diff --git a/module/Application/src/Form/Tag/Traits/TagSaisieFormAwareTrait.php b/module/Application/src/Form/Tag/Traits/TagSaisieFormAwareTrait.php
deleted file mode 100755
index a4b18d993f8d46b239f785bfb72d9e1dc186bebc..0000000000000000000000000000000000000000
--- a/module/Application/src/Form/Tag/Traits/TagSaisieFormAwareTrait.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-namespace Application\Form\Tag\Traits;
-
-use Application\Entity\Db\Tag;
-use Application\Form\Tag\TagSaisieForm;
-
-/**
- * Description of TagSaisieFormAwareTrait
- *
- * @author Antony Le Courtes <antony.lecourtes at unicaen.fr>
- */
-trait TagSaisieFormAwareTrait
-{
- protected ?TagSaisieForm $formTagSaisie = null;
-
-
- /**
- * @param TagSaisieForm $formTagSaisie
- *
- * @return self
- */
- public function setFormTagSaisie(?TagSaisieForm $formTagSaisie)
- {
- $this->formTagSaisie = $formTagSaisie;
-
- return $this;
- }
-
-
- public function getFormTagSaisie(): ?TagSaisieForm
- {
- if (!empty($this->formTagSaisie)) {
- return $this->formTagSaisie;
- }
-
- return \Application::$container->get('FormElementManager')->get(TagSaisieForm::class);
- }
-}
\ No newline at end of file
diff --git a/module/Application/src/Service/TagService.php b/module/Application/src/Service/TagService.php
index 1510a41b5aea7f60911b95657f406a244230dd3f..814bd09b55f83fae1cd588affc04fcf2a2088fb9 100755
--- a/module/Application/src/Service/TagService.php
+++ b/module/Application/src/Service/TagService.php
@@ -4,6 +4,7 @@ namespace Application\Service;
use Application\Entity\Db\Tag;
use Doctrine\ORM\QueryBuilder;
+use Laminas\Validator\Date;
/**
* Description of TagService
@@ -19,32 +20,50 @@ class TagService extends AbstractEntityService
* @return string
* @throws RuntimeException
*/
- public function getEntityClass()
+ public function getEntityClass ()
{
return Tag::class;
}
+
+
/**
* Retourne l'alias d'entité courante
*
* @return string
*/
- public function getAlias()
+ public function getAlias ()
{
return 'tag';
}
+
+
+ public function getListByDate (QueryBuilder $qb = null, $alias = null)
+ {
+ [$qb, $alias] = $this->initQuery($qb, $alias);
+ $qb->andWhere("$alias.histoDestruction is Null");
+ $qb->andWhere("CURRENT_TIMESTAMP() BETWEEN $alias.dateDebut AND $alias.dateFin");
+ $qb->addOrderBy("$alias.libelleLong");
+
+ return parent::getList($qb, $alias);
+ }
+
+
+
/**
* Retourne la liste des tags
*
* @param QueryBuilder|null $queryBuilder
+ *
* @return Tag[]
*/
- public function getList(QueryBuilder $qb = null, $alias = null)
+ public function getList (QueryBuilder $qb = null, $alias = null)
{
- list($qb, $alias) = $this->initQuery($qb, $alias);
+ [$qb, $alias] = $this->initQuery($qb, $alias);
$qb->andWhere("$alias.histoDestruction is Null");
$qb->addOrderBy("$alias.libelleLong");
+
return parent::getList($qb, $alias);
}
}
\ No newline at end of file
diff --git a/module/Application/view/application/tag/index.phtml b/module/Application/view/application/tag/index.phtml
index 5444d28f1c1961393f09d80e0e7a546ffd6732c3..04d3e2e9c8af2949b88a4ce54d899111926a2aed 100644
--- a/module/Application/view/application/tag/index.phtml
+++ b/module/Application/view/application/tag/index.phtml
@@ -2,6 +2,7 @@
/**
* @var $this \Application\View\Renderer\PhpRenderer
* @var $motifNonPaiements \Paiement\Entity\Db\MotifNonPaiement[]
+ * @var $fr \Application\Entity\Db\Tag
*/
use Application\Provider\Privilege\Privileges;
@@ -20,6 +21,8 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::MOTIF_NON_PAIE
<th style="word-wrap: break-word ; ">Code</th>
<th style="word-wrap: break-word ; ">Libelle Court</th>
<th style="word-wrap: break-word ; ">Libelle Long</th>
+ <th style="word-wrap: break-word ; ">A partir de</th>
+ <th style="word-wrap: break-word ; ">Jusqu'à</th>
<?php if ($canEdit) echo '<th>Actions</th>' ?>
</thead>
<tbody>
@@ -28,6 +31,8 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::MOTIF_NON_PAIE
<td style="word-wrap: break-word ; "><?= $fr->getCode() ?></td>
<td style="word-wrap: break-word ; "><?= $fr->getLibelleCourt() ?></td>
<td style="word-wrap: break-word ; "><?= $fr->getLibelleLong() ?></td>
+ <td style="word-wrap: break-word ; "><?= ($fr->getDateDebut() instanceof DateTime) ? $fr->getDateDebut()->format('d-m-Y') : '' ?></td>
+ <td style="word-wrap: break-word ; "><?= ($fr->getDateFin() instanceof DateTime) ? $fr->getDateFin()->format('d-m-Y') : '' ?></td>
<?php if ($canEdit) { ?>
<td style="text-align:center;width:1px;white-space: nowrap">
<a class="mod-ajax" data-submit-reload="true"
diff --git a/module/Application/view/error/index.phtml b/module/Application/view/error/index.phtml
index 0cf5097deb48d86841cc37fafc0a3b67a33aa775..7bde03257ea74b5c9544ab04fa29ae60315df32f 100755
--- a/module/Application/view/error/index.phtml
+++ b/module/Application/view/error/index.phtml
@@ -1,11 +1,10 @@
<?php
-$this->headTitle()->append($title = 'An error occurred');
+$this->headTitle()->append($title = 'Une erreur est survenue');
$details = AppConfig::get('global', 'affichageErreurs') && isset($this->exception) && ($this->exception instanceof Error || $this->exception instanceof Exception);
?>
<div class="alert alert-danger exception" role="alert">
- <i class="fas fa-triangle-exclamation"></i>
<h1><?= $this->translate($title) ?> :</h1>
<?= $this->exception->getMessage() ?>
<?php if ($details): ?>
@@ -21,7 +20,7 @@ $details = AppConfig::get('global', 'affichageErreurs') && isset($this->exceptio
<dt><?= $this->translate('Stack trace') ?>:</dt>
<dd>
<pre
- class="prettyprint linenums"><?= \UnicaenApp\Util::formatTraceString($this->exception->getTraceAsString()) ?></pre>
+ class="prettyprint linenums"><?= \UnicaenApp\Util::formatTraceString($this->exception->getTraceAsString()) ?></pre>
</dd>
</dl>
<?php
@@ -51,7 +50,7 @@ $details = AppConfig::get('global', 'affichageErreurs') && isset($this->exceptio
<dt><?= $this->translate('Stack trace') ?>:</dt>
<dd>
<pre
- class="prettyprint linenums"><?= \UnicaenApp\Util::formatTraceString($e->getTraceAsString()) ?></pre>
+ class="prettyprint linenums"><?= \UnicaenApp\Util::formatTraceString($e->getTraceAsString()) ?></pre>
</dd>
</dl>
</div>
diff --git a/module/Enseignement/src/Form/VolumeHoraireSaisieCalendaireForm.php b/module/Enseignement/src/Form/VolumeHoraireSaisieCalendaireForm.php
index 580e83782ad23113703bac09a272214f7f0cc77f..85fdc2567b1b54bfa4e08ac1926dcdb983a8e1b6 100644
--- a/module/Enseignement/src/Form/VolumeHoraireSaisieCalendaireForm.php
+++ b/module/Enseignement/src/Form/VolumeHoraireSaisieCalendaireForm.php
@@ -49,42 +49,8 @@ class VolumeHoraireSaisieCalendaireForm extends AbstractForm
protected $editTag = false;
- /**
- * @return MotifNonPaiement[]
- */
- protected function getMotifsNonPaiement()
- {
- $qb = $this->getServiceMotifNonPaiement()->finderByHistorique();
-
- return $this->getServiceMotifNonPaiement()->getList($qb);
- }
-
- /**
- * @return TypeIntervention[]
- */
- protected function getTypesIntervention()
- {
- $qb = $this->getServiceTypeIntervention()->finderByContext();
- $this->getServiceTypeIntervention()->finderByHistorique($qb);
-
- return $this->getServiceTypeIntervention()->getList($qb);
- }
-
-
- /**
- * @return Periode[]
- */
- protected function getPeriodes()
- {
- $qb = $this->getServicePeriode()->finderByHistorique();
- $this->getServicePeriode()->finderByEnseignement($qb);
-
- return $this->getServicePeriode()->getList($qb);
- }
-
-
- public function build()
+ public function build ()
{
$this->setAttributes([
'action' => $this->getCurrentUrl(),
@@ -180,7 +146,7 @@ class VolumeHoraireSaisieCalendaireForm extends AbstractForm
'options' => [
'label' => "Tag :",
'empty_option' => "Aucun tag",
- 'value_options' => Util::collectionAsOptions($this->getServiceTag()->getList()),
+ 'value_options' => Util::collectionAsOptions($this->getServiceTag()->getListByDate()),
'disable_inarray_validator' => true,
],
@@ -228,74 +194,119 @@ class VolumeHoraireSaisieCalendaireForm extends AbstractForm
}
+
/**
- * @return bool
+ * @return Periode[]
*/
- public function canViewMNP(): bool
+ protected function getPeriodes ()
{
- return $this->viewMNP;
+ $qb = $this->getServicePeriode()->finderByHistorique();
+ $this->getServicePeriode()->finderByEnseignement($qb);
+
+ return $this->getServicePeriode()->getList($qb);
}
+
/**
- * @param bool $viewMNP
- *
- * @return SaisieCalendaire
+ * @return TypeIntervention[]
*/
- public function setViewMNP(bool $viewMNP): self
+ protected function getTypesIntervention ()
{
- $this->viewMNP = $viewMNP;
+ $qb = $this->getServiceTypeIntervention()->finderByContext();
+ $this->getServiceTypeIntervention()->finderByHistorique($qb);
- return $this;
+ return $this->getServiceTypeIntervention()->getList($qb);
}
+
/**
* @return bool
*/
- public function canEditMNP(): bool
+ public function canEditMNP (): bool
{
return $this->editMNP;
}
+
+ /**
+ * @return MotifNonPaiement[]
+ */
+ protected function getMotifsNonPaiement ()
+ {
+ $qb = $this->getServiceMotifNonPaiement()->finderByHistorique();
+
+ return $this->getServiceMotifNonPaiement()->getList($qb);
+ }
+
+
+
/**
* @return bool
*/
- public function canViewTag(): bool
+ public function canEditTag (): bool
{
- return $this->viewTag;
+ return $this->editTag;
}
+
/**
- * @param bool $viewTag
+ * @return bool
+ */
+ public function canViewMNP (): bool
+ {
+ return $this->viewMNP;
+ }
+
+
+
+ /**
+ * @param bool $viewMNP
*
- * @return Saisie
+ * @return SaisieCalendaire
*/
- public function setViewTag(bool $viewTag): self
+ public function setViewMNP (bool $viewMNP): self
{
- $this->viewTag = $viewTag;
+ $this->viewMNP = $viewMNP;
return $this;
}
+
/**
* @return bool
*/
- public function canEditTag(): bool
+ public function canViewTag (): bool
{
- return $this->editTag;
+ return $this->viewTag;
}
+
+ /**
+ * @param bool $viewTag
+ *
+ * @return Saisie
+ */
+ public function setViewTag (bool $viewTag): self
+ {
+ $this->viewTag = $viewTag;
+
+ return $this;
+ }
+
+
+
/**
* @param bool $editTag
*
* @return Saisie
*/
- public function setEditTag(bool $editTag): self
+ public function setEditTag (bool $editTag): self
{
$this->editTag = $editTag;
@@ -303,12 +314,13 @@ class VolumeHoraireSaisieCalendaireForm extends AbstractForm
}
+
/**
* @param bool $editMNP
*
* @return SaisieCalendaire
*/
- public function setEditMNP(bool $editMNP): self
+ public function setEditMNP (bool $editMNP): self
{
$this->editMNP = $editMNP;
@@ -316,13 +328,14 @@ class VolumeHoraireSaisieCalendaireForm extends AbstractForm
}
+
/**
* Should return an array specification compatible with
* {@link Laminas\InputFilter\Factory::createInputFilter()}.
*
* @return array
*/
- public function getInputFilterSpecification()
+ public function getInputFilterSpecification ()
{
return [
'horaire-debut' => [
@@ -331,24 +344,24 @@ class VolumeHoraireSaisieCalendaireForm extends AbstractForm
'horaire-fin' => [
'required' => true,
'validators' => [[
- 'name' => 'Callback',
- 'options' => [
- 'messages' => [
- \Laminas\Validator\Callback::INVALID_VALUE => 'L\'horaire de fin doit être ultérieur à l\'horaire de début',
- ],
- 'callback' => function ($value, $context = []) {
- if (!$context['horaire-debut'] && $context['horaire-fin']) return true; // pas d'horaires de saisis
-
- $horaireDebut = DateTimeFromString::run($context['horaire-debut']);
- $horaireFin = DateTimeFromString::run($context['horaire-fin']);
- $deb = $horaireDebut->getTimestamp();
- $fin = $horaireFin->getTimestamp();
- $diff = $fin - $deb;
-
- return $diff >= 0;
- },
- ],
- ]],
+ 'name' => 'Callback',
+ 'options' => [
+ 'messages' => [
+ \Laminas\Validator\Callback::INVALID_VALUE => 'L\'horaire de fin doit être ultérieur à l\'horaire de début',
+ ],
+ 'callback' => function ($value, $context = []) {
+ if (!$context['horaire-debut'] && $context['horaire-fin']) return true; // pas d'horaires de saisis
+
+ $horaireDebut = DateTimeFromString::run($context['horaire-debut']);
+ $horaireFin = DateTimeFromString::run($context['horaire-fin']);
+ $deb = $horaireDebut->getTimestamp();
+ $fin = $horaireFin->getTimestamp();
+ $diff = $fin - $deb;
+
+ return $diff >= 0;
+ },
+ ],
+ ]],
],
'motif-non-paiement' => [
'required' => false,
@@ -391,6 +404,9 @@ class VolumeHoraireSaisieCalendaireForm extends AbstractForm
}
+
+
+
/**
*
*
@@ -406,31 +422,16 @@ class SaisieCalendaireHydrator implements HydratorInterface
private $data;
- private function getVal($key)
- {
- if (isset($this->data[$key])) {
- switch ($key) {
- case 'horaire-debut':
- case 'horaire-fin':
- return DateTimeFromString::run($this->data[$key]);
- default:
- return $this->data[$key];
- }
- } else {
- return null;
- }
- }
-
/**
* Hydrate $object with the provided $data.
*
- * @param array $data
+ * @param array $data
* @param VolumeHoraireListe $object
*
* @return object
*/
- public function hydrate(array $data, $object)
+ public function hydrate (array $data, $object)
{
@@ -441,28 +442,28 @@ class SaisieCalendaireHydrator implements HydratorInterface
$ancienHoraireDebut = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_DEBUT, $this->getVal('ancien-horaire-debut'));
- $horaireDebut = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_DEBUT, $this->getVal('horaire-debut'));
+ $horaireDebut = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_DEBUT, $this->getVal('horaire-debut'));
$object->setHoraireDebut($ancienHoraireDebut != $horaireDebut ? $ancienHoraireDebut : $horaireDebut);
$ancienHoraireFin = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_FIN, $this->getVal('ancien-horaire-fin'));
- $horaireFin = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_FIN, $this->getVal('horaire-fin'));
+ $horaireFin = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_FIN, $this->getVal('horaire-fin'));
$object->setHoraireFin($ancienHoraireFin != $horaireFin ? $ancienHoraireFin : $horaireFin);
$ancienTypeIntervention = $lfh->allToData(VolumeHoraireListe::FILTRE_TYPE_INTERVENTION, $this->getVal('ancien-type-intervention'));
- $typeIntervention = $lfh->allToData(VolumeHoraireListe::FILTRE_TYPE_INTERVENTION, $this->getVal('type-intervention'));
+ $typeIntervention = $lfh->allToData(VolumeHoraireListe::FILTRE_TYPE_INTERVENTION, $this->getVal('type-intervention'));
$object->setTypeIntervention($ancienTypeIntervention != $typeIntervention && $ancienTypeIntervention ? $ancienTypeIntervention : $typeIntervention);
$ancienPeriode = $lfh->allToData(VolumeHoraireListe::FILTRE_PERIODE, $this->getVal('ancien-periode'));
- $periode = $lfh->allToData(VolumeHoraireListe::FILTRE_PERIODE, $this->getVal('periode'));
+ $periode = $lfh->allToData(VolumeHoraireListe::FILTRE_PERIODE, $this->getVal('periode'));
$object->setPeriode($ancienPeriode != $periode && $ancienPeriode ? $ancienPeriode : $periode);
$ancienMotifNonPaiement = $lfh->allToData(VolumeHoraireListe::FILTRE_MOTIF_NON_PAIEMENT, $this->getVal('ancien-motif-non-paiement'));
- $motifNonPaiement = $lfh->allToData(VolumeHoraireListe::FILTRE_MOTIF_NON_PAIEMENT, $this->getVal('motif-non-paiement'));
+ $motifNonPaiement = $lfh->allToData(VolumeHoraireListe::FILTRE_MOTIF_NON_PAIEMENT, $this->getVal('motif-non-paiement'));
$object->setMotifNonPaiement($ancienMotifNonPaiement != $motifNonPaiement && $ancienMotifNonPaiement ? $ancienMotifNonPaiement : $motifNonPaiement);
$ancienTag = $lfh->allToData(VolumeHoraireListe::FILTRE_TAG, $this->getVal('ancien-tag'));
- $tag = $lfh->allToData(VolumeHoraireListe::FILTRE_TAG, $this->getVal('tag'));
+ $tag = $lfh->allToData(VolumeHoraireListe::FILTRE_TAG, $this->getVal('tag'));
$object->setTag($ancienTag != $tag && $ancienTag ? $ancienTag : $tag);
$heures = (float)$this->getVal('heures');
@@ -474,6 +475,24 @@ class SaisieCalendaireHydrator implements HydratorInterface
}
+
+ private function getVal ($key)
+ {
+ if (isset($this->data[$key])) {
+ switch ($key) {
+ case 'horaire-debut':
+ case 'horaire-fin':
+ return DateTimeFromString::run($this->data[$key]);
+ default:
+ return $this->data[$key];
+ }
+ } else {
+ return null;
+ }
+ }
+
+
+
/**
* Extract values from an object
*
@@ -481,7 +500,7 @@ class SaisieCalendaireHydrator implements HydratorInterface
*
* @return array
*/
- public function extract($object): array
+ public function extract ($object): array
{
$lfh = new ListeFilterHydrator();
$lfh->setEntityManager($this->getEntityManager());
@@ -509,23 +528,19 @@ class SaisieCalendaireHydrator implements HydratorInterface
/* Conversion des dates en objets */
if (isset($data['horaire-debut']) && $data['horaire-debut'] > 0) {
$data['horaire-debut'] = (new \DateTime)->setTimestamp($data['horaire-debut']);
- }
- else{
+ } else {
//Pour une meilleure gestion du datetime local, si pas d'horaire de début on set à la date du jour 00:00
$now = new \DateTime();
- $now->setTime(0,0);
+ $now->setTime(0, 0);
$data['horaire-debut'] = $now;
-
}
if (isset($data['horaire-fin']) && $data['horaire-fin'] > 0) {
$data['horaire-fin'] = (new \DateTime)->setTimestamp($data['horaire-fin']);
- }
- else{
+ } else {
//Pour une meilleure gestion du datetime local, si pas d'horaire de début on set à la date du jour 00:00
$now = new \DateTime();
- $now->setTime(0,0);
+ $now->setTime(0, 0);
$data['horaire-fin'] = $now;
-
}
return $data;
diff --git a/module/Enseignement/src/Form/VolumeHoraireSaisieForm.php b/module/Enseignement/src/Form/VolumeHoraireSaisieForm.php
index d61fa963d1a652c97da452b40c7568d055727857..a77d2e3193024e863ac8533d2a8516fb03fbea77 100755
--- a/module/Enseignement/src/Form/VolumeHoraireSaisieForm.php
+++ b/module/Enseignement/src/Form/VolumeHoraireSaisieForm.php
@@ -46,42 +46,8 @@ class VolumeHoraireSaisieForm extends AbstractForm
protected $editTag = false;
- /**
- * @return MotifNonPaiement[]
- */
- protected function getMotifsNonPaiement()
- {
- $qb = $this->getServiceMotifNonPaiement()->finderByHistorique();
-
- return $this->getServiceMotifNonPaiement()->getList($qb);
- }
-
-
- /**
- * @return TypeIntervention[]
- */
- protected function getTypesIntervention()
- {
- $qb = $this->getServiceTypeIntervention()->finderByContext();
- $this->getServiceTypeIntervention()->finderByHistorique($qb);
- return $this->getServiceTypeIntervention()->getList($qb);
- }
-
-
- /**
- * @return Periode[]
- */
- protected function getPeriodes()
- {
- $qb = $this->getServicePeriode()->finderByHistorique();
- $this->getServicePeriode()->finderByEnseignement($qb);
-
- return $this->getServicePeriode()->getList($qb);
- }
-
-
- public function build()
+ public function build ()
{
$this->setAttributes([
'action' => $this->getCurrentUrl(),
@@ -133,7 +99,7 @@ class VolumeHoraireSaisieForm extends AbstractForm
'options' => [
'label' => "Tag :",
'empty_option' => "Aucun tag",
- 'value_options' => Util::collectionAsOptions($this->getServiceTag()->getList()),
+ 'value_options' => Util::collectionAsOptions($this->getServiceTag()->getListByDate()),
],
'attributes' => [
'value' => "",
@@ -178,64 +144,93 @@ class VolumeHoraireSaisieForm extends AbstractForm
}
+
/**
* @return bool
*/
- public function canViewMNP(): bool
+ public function canEditMNP (): bool
{
- return $this->viewMNP;
+ return $this->editMNP;
}
+
/**
- * @param bool $viewMNP
- *
- * @return Saisie
+ * @return MotifNonPaiement[]
*/
- public function setViewMNP(bool $viewMNP): self
+ protected function getMotifsNonPaiement ()
{
- $this->viewMNP = $viewMNP;
+ $qb = $this->getServiceMotifNonPaiement()->finderByHistorique();
- return $this;
+ return $this->getServiceMotifNonPaiement()->getList($qb);
}
+
/**
* @return bool
*/
- public function canEditMNP(): bool
+ public function canEditTag (): bool
{
- return $this->editMNP;
+ return $this->editTag;
+ }
+
+
+
+ /**
+ * @return bool
+ */
+ public function canViewMNP (): bool
+ {
+ return $this->viewMNP;
}
+
+ /**
+ * @param bool $viewMNP
+ *
+ * @return Saisie
+ */
+ public function setViewMNP (bool $viewMNP): self
+ {
+ $this->viewMNP = $viewMNP;
+
+ return $this;
+ }
+
+
+
/**
* @param bool $editMNP
*
* @return Saisie
*/
- public function setEditMNP(bool $editMNP): self
+ public function setEditMNP (bool $editMNP): self
{
$this->editMNP = $editMNP;
return $this;
}
+
+
/**
* @return bool
*/
- public function canViewTag(): bool
+ public function canViewTag (): bool
{
return $this->viewTag;
}
+
/**
* @param bool $viewTag
*
* @return Saisie
*/
- public function setViewTag(bool $viewTag): self
+ public function setViewTag (bool $viewTag): self
{
$this->viewTag = $viewTag;
@@ -243,21 +238,13 @@ class VolumeHoraireSaisieForm extends AbstractForm
}
- /**
- * @return bool
- */
- public function canEditTag(): bool
- {
- return $this->editTag;
- }
-
/**
* @param bool $editTag
*
* @return Saisie
*/
- public function setEditTag(bool $editTag): self
+ public function setEditTag (bool $editTag): self
{
$this->editTag = $editTag;
@@ -265,13 +252,14 @@ class VolumeHoraireSaisieForm extends AbstractForm
}
+
/**
* Should return an array specification compatible with
* {@link Laminas\InputFilter\Factory::createInputFilter()}.
*
* @return array
*/
- public function getInputFilterSpecification()
+ public function getInputFilterSpecification ()
{
return [
'motif-non-paiement' => [
@@ -297,9 +285,38 @@ class VolumeHoraireSaisieForm extends AbstractForm
],
];
}
+
+
+
+ /**
+ * @return TypeIntervention[]
+ */
+ protected function getTypesIntervention ()
+ {
+ $qb = $this->getServiceTypeIntervention()->finderByContext();
+ $this->getServiceTypeIntervention()->finderByHistorique($qb);
+
+ return $this->getServiceTypeIntervention()->getList($qb);
+ }
+
+
+
+ /**
+ * @return Periode[]
+ */
+ protected function getPeriodes ()
+ {
+ $qb = $this->getServicePeriode()->finderByHistorique();
+ $this->getServicePeriode()->finderByEnseignement($qb);
+
+ return $this->getServicePeriode()->getList($qb);
+ }
}
+
+
+
/**
*
*
@@ -315,25 +332,16 @@ class SaisieHydrator implements HydratorInterface
private $data;
- private function getVal($key)
- {
- if (isset($this->data[$key])) {
- return $this->data[$key];
- } else {
- return null;
- }
- }
-
/**
* Hydrate $object with the provided $data.
*
- * @param array $data
+ * @param array $data
* @param VolumeHoraireListe $object
*
* @return object
*/
- public function hydrate(array $data, $object)
+ public function hydrate (array $data, $object)
{
@@ -349,11 +357,11 @@ class SaisieHydrator implements HydratorInterface
$object->setPeriode($periode);
$ancienMotifNonPaiement = $lfh->allToData(VolumeHoraireListe::FILTRE_MOTIF_NON_PAIEMENT, $this->getVal('ancien-motif-non-paiement'));
- $motifNonPaiement = $lfh->allToData(VolumeHoraireListe::FILTRE_MOTIF_NON_PAIEMENT, $this->getVal('motif-non-paiement'));
+ $motifNonPaiement = $lfh->allToData(VolumeHoraireListe::FILTRE_MOTIF_NON_PAIEMENT, $this->getVal('motif-non-paiement'));
$ancienTag = $lfh->allToData(VolumeHoraireListe::FILTRE_TAG, $this->getVal('ancien-tag'));
- $tag = $lfh->allToData(VolumeHoraireListe::FILTRE_TAG, $this->getVal('tag'));
-
+ $tag = $lfh->allToData(VolumeHoraireListe::FILTRE_TAG, $this->getVal('tag'));
+
$heures = (float)$this->getVal('heures');
$object->setMotifNonPaiement($motifNonPaiement);
@@ -365,6 +373,18 @@ class SaisieHydrator implements HydratorInterface
}
+
+ private function getVal ($key)
+ {
+ if (isset($this->data[$key])) {
+ return $this->data[$key];
+ } else {
+ return null;
+ }
+ }
+
+
+
/**
* Extract values from an object
*
@@ -372,7 +392,7 @@ class SaisieHydrator implements HydratorInterface
*
* @return array
*/
- public function extract($object): array
+ public function extract ($object): array
{
$lfh = new ListeFilterHydrator();
$lfh->setEntityManager($this->getEntityManager());
diff --git a/module/Enseignement/src/View/Helper/VolumeHoraire/ListeViewHelper.php b/module/Enseignement/src/View/Helper/VolumeHoraire/ListeViewHelper.php
index 6c119d44dc0968b8c095c63cd49c3596fc8ecfc8..b54e916d136b51beca98dc6ad50d84a027535e5a 100755
--- a/module/Enseignement/src/View/Helper/VolumeHoraire/ListeViewHelper.php
+++ b/module/Enseignement/src/View/Helper/VolumeHoraire/ListeViewHelper.php
@@ -57,36 +57,14 @@ class ListeViewHelper extends AbstractHtmlElement
protected $hasForbiddenPeriodes = false;
- /**
- *
- * @return boolean
- */
- public function getReadOnly()
- {
- return $this->readOnly || $this->forcedReadOnly;
- }
-
- /**
- *
- * @param boolean $readOnly
- *
- * @return self
- */
- public function setReadOnly($readOnly)
- {
- $this->readOnly = $readOnly;
-
- return $this;
- }
-
-
- public function hasForbiddenPeriodes()
+ public function hasForbiddenPeriodes ()
{
return $this->hasForbiddenPeriodes;
}
+
/**
* Helper entry point.
*
@@ -94,7 +72,7 @@ class ListeViewHelper extends AbstractHtmlElement
*
* @return self
*/
- final public function __invoke(VolumeHoraireListe $volumeHoraireListe)
+ final public function __invoke (VolumeHoraireListe $volumeHoraireListe)
{
/* Initialisation */
@@ -104,44 +82,31 @@ class ListeViewHelper extends AbstractHtmlElement
}
+
/**
* Retourne le code HTML généré par cette aide de vue.
*
* @return string
*/
- public function __toString()
+ public function __toString ()
{
return $this->render();
}
- public function getRefreshUrl()
- {
- $url = $this->getView()->url(
- 'volume-horaire/liste',
- [
- 'service' => $this->getVolumeHoraireListe()->getService()->getId(),
- ], ['query' => [
- 'read-only' => $this->getReadOnly() ? '1' : '0',
- 'type-volume-horaire' => $this->getVolumeHoraireListe()->getTypeVolumehoraire()->getId(),
- ]]);
-
- return $url;
- }
-
/**
* Génère le code HTML.
*
* @return string
*/
- public function render()
+ public function render ()
{
$this->hasForbiddenPeriodes = false;
- $canViewMNP = $this->getView()->isAllowed($this->getVolumeHoraireListe()->getService()->getIntervenant(), Privileges::MOTIF_NON_PAIEMENT_VISUALISATION);
- $canEditMNP = $this->getView()->isAllowed($this->getVolumeHoraireListe()->getService()->getIntervenant(), Privileges::MOTIF_NON_PAIEMENT_EDITION);
- $canViewTag = $this->getView()->isAllowed($this->getVolumeHoraireListe()->getService()->getIntervenant(), Privileges::TAG_VISUALISATION);
- $canEditTag = $this->getView()->isAllowed($this->getVolumeHoraireListe()->getService()->getIntervenant(), Privileges::TAG_EDITION);
+ $canViewMNP = $this->getView()->isAllowed($this->getVolumeHoraireListe()->getService()->getIntervenant(), Privileges::MOTIF_NON_PAIEMENT_VISUALISATION);
+ $canEditMNP = $this->getView()->isAllowed($this->getVolumeHoraireListe()->getService()->getIntervenant(), Privileges::MOTIF_NON_PAIEMENT_EDITION);
+ $canViewTag = $this->getView()->isAllowed($this->getVolumeHoraireListe()->getService()->getIntervenant(), Privileges::TAG_VISUALISATION);
+ $canEditTag = $this->getView()->isAllowed($this->getVolumeHoraireListe()->getService()->getIntervenant(), Privileges::TAG_EDITION);
$out = '<table class="table table-sm table-bordered volume-horaire">';
@@ -156,7 +121,7 @@ class ListeViewHelper extends AbstractHtmlElement
if ($canViewTag) {
$out .= "<th style=\"width:25%\">Tag</th>\n";
}
- $out .= "</tr>\n";
+ $out .= "</tr>\n";
$periodes = $this->getPeriodes();
foreach ($periodes as $periode) {
@@ -231,7 +196,6 @@ class ListeViewHelper extends AbstractHtmlElement
}
$out .= "</tr>\n";
}
-
}
}
$out .= '</table>' . "\n";
@@ -240,7 +204,76 @@ class ListeViewHelper extends AbstractHtmlElement
}
- protected function renderPeriode($periode)
+
+ /**
+ *
+ * @return VolumeHoraireListe
+ */
+ public function getVolumeHoraireListe ()
+ {
+ return $this->volumeHoraireListe;
+ }
+
+
+
+ public function setVolumeHoraireListe (VolumeHoraireListe $volumeHoraireListe)
+ {
+ $typeVolumeHoraire = $volumeHoraireListe->getTypeVolumeHoraire();
+ $this->volumeHoraireListe = $volumeHoraireListe;
+ $this->forcedReadOnly = !$this->getView()->isAllowed($volumeHoraireListe->getService(), $typeVolumeHoraire->getPrivilegeEnseignementEdition());
+ $this->typesIntervention = null;
+
+ return $this;
+ }
+
+
+
+ public function getTypesInterventions ()
+ {
+ if (!$this->typesIntervention) {
+ if ($this->getVolumeHoraireListe()->getService()->getElementPedagogique()) {
+ $tis = $this->getVolumeHoraireListe()->getService()->getElementPedagogique()->getTypeIntervention();
+ } else {
+ $qb = $this->getServiceTypeIntervention()->finderByContext();
+ $this->getServiceTypeIntervention()->finderByVisibleExterieur(true, $qb);
+ $this->getServiceTypeIntervention()->finderByHistorique($qb);
+ $tis = $this->getServiceTypeIntervention()->getList($qb);
+ }
+ $this->typesIntervention = [];
+ foreach ($tis as $ti) {
+ $this->typesIntervention[] = $ti;
+ }
+ uasort($this->typesIntervention, function ($a, $b) {
+ return $a->getordre() - $b->getOrdre();
+ });
+ }
+
+ return $this->typesIntervention;
+ }
+
+
+
+ public function getPeriodes ()
+ {
+ $vhl = $this->getVolumeHoraireListe()->createChild()
+ ->setTypeIntervention(false)
+ ->setPeriode(false);
+
+ $periodes = $this->getServiceService()->getPeriodes($vhl->getService());
+ $vhPeriodes = $vhl->getPeriodes();
+ foreach ($vhPeriodes as $periode) {
+ if (!isset($periodes[$periode->getId()])) $periodes[$periode->getId()] = $periode;
+ }
+ uasort($periodes, function ($a, $b) {
+ return ($a ? $a->getOrdre() : '') > ($b ? $b->getOrdre() : '') ? 1 : 0;
+ });
+
+ return $periodes;
+ }
+
+
+
+ protected function renderPeriode ($periode)
{
if (!$periode) return "Indéterminée";
$out = (string)$periode;
@@ -249,7 +282,8 @@ class ListeViewHelper extends AbstractHtmlElement
}
- public function renderHeures(VolumeHoraireListe $volumeHoraireListe, $readOnly = false)
+
+ public function renderHeures (VolumeHoraireListe $volumeHoraireListe, $readOnly = false)
{
$heures = $volumeHoraireListe->getHeures();
$heures = \UnicaenApp\Util::formattedNumber($heures);
@@ -273,7 +307,34 @@ class ListeViewHelper extends AbstractHtmlElement
}
- protected function renderMotifNonPaiement($motifNonPaiement)
+
+ /**
+ *
+ * @return boolean
+ */
+ public function getReadOnly ()
+ {
+ return $this->readOnly || $this->forcedReadOnly;
+ }
+
+
+
+ /**
+ *
+ * @param boolean $readOnly
+ *
+ * @return self
+ */
+ public function setReadOnly ($readOnly)
+ {
+ $this->readOnly = $readOnly;
+
+ return $this;
+ }
+
+
+
+ protected function renderMotifNonPaiement ($motifNonPaiement)
{
if (!empty($motifNonPaiement)) {
$out = $motifNonPaiement->getLibelleLong();
@@ -284,7 +345,9 @@ class ListeViewHelper extends AbstractHtmlElement
return $out;
}
- protected function renderTag($tag)
+
+
+ protected function renderTag ($tag)
{
/**
* @var Tag $tag
@@ -300,66 +363,19 @@ class ListeViewHelper extends AbstractHtmlElement
}
- /**
- *
- * @return VolumeHoraireListe
- */
- public function getVolumeHoraireListe()
- {
- return $this->volumeHoraireListe;
- }
-
- public function setVolumeHoraireListe(VolumeHoraireListe $volumeHoraireListe)
+ public function getRefreshUrl ()
{
- $typeVolumeHoraire = $volumeHoraireListe->getTypeVolumeHoraire();
- $this->volumeHoraireListe = $volumeHoraireListe;
- $this->forcedReadOnly = !$this->getView()->isAllowed($volumeHoraireListe->getService(), $typeVolumeHoraire->getPrivilegeEnseignementEdition());
- $this->typesIntervention = null;
-
- return $this;
- }
-
-
- public function getTypesInterventions()
- {
- if (!$this->typesIntervention) {
- if ($this->getVolumeHoraireListe()->getService()->getElementPedagogique()) {
- $tis = $this->getVolumeHoraireListe()->getService()->getElementPedagogique()->getTypeIntervention();
- } else {
- $qb = $this->getServiceTypeIntervention()->finderByContext();
- $this->getServiceTypeIntervention()->finderByHistorique($qb);
- $tis = $this->getServiceTypeIntervention()->getList($qb);
- }
- $this->typesIntervention = [];
- foreach ($tis as $ti) {
- $this->typesIntervention[] = $ti;
- }
- uasort($this->typesIntervention, function ($a, $b) {
- return $a->getordre() - $b->getOrdre();
- });
- }
-
- return $this->typesIntervention;
- }
-
-
- public function getPeriodes()
- {
- $vhl = $this->getVolumeHoraireListe()->createChild()
- ->setTypeIntervention(false)
- ->setPeriode(false);
-
- $periodes = $this->getServiceService()->getPeriodes($vhl->getService());
- $vhPeriodes = $vhl->getPeriodes();
- foreach ($vhPeriodes as $periode) {
- if (!isset($periodes[$periode->getId()])) $periodes[$periode->getId()] = $periode;
- }
- uasort($periodes, function ($a, $b) {
- return ($a ? $a->getOrdre() : '') > ($b ? $b->getOrdre() : '') ? 1 : 0;
- });
+ $url = $this->getView()->url(
+ 'volume-horaire/liste',
+ [
+ 'service' => $this->getVolumeHoraireListe()->getService()->getId(),
+ ], ['query' => [
+ 'read-only' => $this->getReadOnly() ? '1' : '0',
+ 'type-volume-horaire' => $this->getVolumeHoraireListe()->getTypeVolumehoraire()->getId(),
+ ]]);
- return $periodes;
+ return $url;
}
}
\ No newline at end of file
diff --git a/module/Intervenant/src/Controller/NoteController.php b/module/Intervenant/src/Controller/NoteController.php
index a70b291c3d49c6c37b0cd64f5049c86780ade031..d24d278a63901eb7fbb2763c1f44bb2a8a7ad481 100755
--- a/module/Intervenant/src/Controller/NoteController.php
+++ b/module/Intervenant/src/Controller/NoteController.php
@@ -22,7 +22,7 @@ class NoteController extends AbstractController
use MailerIntervenantFormAwareTrait;
use MailServiceAwareTrait;
- public function indexAction()
+ public function indexAction ()
{
$this->em()->getFilters()->enable('historique')->init([
Note::class,
@@ -32,10 +32,10 @@ class NoteController extends AbstractController
/* @var $intervenant \Application\Entity\Db\Intervenant */
if (!$intervenant) {
- throw new \Exception('Intervenant introuvable');
+ throw new \Exception();
}
- $notes = $this->getServiceNote()->getByIntervenant($intervenant, 'note');
+ $notes = $this->getServiceNote()->getByIntervenant($intervenant, 'note');
$emails = $this->getServiceNote()->getByIntervenant($intervenant, 'email');
$historique = $this->getServiceNote()->getHistoriqueIntervenant($intervenant);
@@ -45,21 +45,22 @@ class NoteController extends AbstractController
}
- public function saisirAction()
+
+ public function saisirAction ()
{
$intervenant = $this->getEvent()->getParam('intervenant');
- $note = $this->getEvent()->getParam('note');
- $form = $this->getFormNoteSaisie();
+ $note = $this->getEvent()->getParam('note');
+ $form = $this->getFormNoteSaisie();
if (empty($note)) {
$canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::INTERVENANT_NOTE_AJOUT));
- $title = 'Création d\'une nouvelle note intervenant';
- $note = $this->getServiceNote()->newEntity();
+ $title = 'Création d\'une nouvelle note intervenant';
+ $note = $this->getServiceNote()->newEntity();
$note->setIntervenant($intervenant);
} else {
$canEdit = $this->isAllowed($note, NoteAssertion::PRIV_EDITER_NOTE);
- $title = 'Édition d\'une note intervenant';
+ $title = 'Édition d\'une note intervenant';
}
@@ -82,21 +83,23 @@ class NoteController extends AbstractController
}
- public function voirAction()
+
+ public function voirAction ()
{
$intervenant = $this->getEvent()->getParam('intervenant');
- $note = $this->getEvent()->getParam('note');
- $title = 'Visualisation d\'une note intervenant';
+ $note = $this->getEvent()->getParam('note');
+ $title = 'Visualisation d\'une note intervenant';
return compact('intervenant', 'note', 'title');
}
- public function supprimerAction()
+
+ public function supprimerAction ()
{
$intervenant = $this->getEvent()->getParam('intervenant');
- $note = $this->getEvent()->getParam('note');
+ $note = $this->getEvent()->getParam('note');
$canDelete = $this->isAllowed($note, NoteAssertion::PRIV_SUPPRIMER_NOTE);
@@ -116,21 +119,22 @@ class NoteController extends AbstractController
}
- public function envoyerEmailAction()
+
+ public function envoyerEmailAction ()
{
$intervenant = $this->getEvent()->getParam('intervenant');
- $title = 'Rédiger un email à l\'intervenant';
+ $title = 'Rédiger un email à l\'intervenant';
$form = $this->getFormMailerIntervenant()->setIntervenant($intervenant)->initForm();
if ($this->getRequest()->isPost()) {
try {
- $data = $this->getRequest()->getPost();
- $from = $data['from'];
- $to = $data['to'];
+ $data = $this->getRequest()->getPost();
+ $from = $data['from'];
+ $to = $data['to'];
$subject = $data['subject'];
$content = $data['content'];
- $copy = $data['copy'];
+ $copy = $data['copy'];
$this->getServiceMail()->envoyerMail($from, $to, $subject, $content, $copy);
//Création d'une trace de l'envoi dans les notes de l'intervenant
$this->getServiceNote()->createNoteFromEmail($intervenant, $subject, $content);
@@ -139,6 +143,7 @@ class NoteController extends AbstractController
$this->flashMessenger()->addErrorMessage($this->translate($e));
}
}
+
return compact('intervenant', 'form', 'title');
}
}
diff --git a/module/Mission/src/Assertion/OffreEmploiAssertion.php b/module/Mission/src/Assertion/OffreEmploiAssertion.php
index e5915bda21d1b4cf4257ce89afa59b2dcea58fa3..baee71306a6d5830fc435a5fcbd481044611926c 100755
--- a/module/Mission/src/Assertion/OffreEmploiAssertion.php
+++ b/module/Mission/src/Assertion/OffreEmploiAssertion.php
@@ -215,6 +215,7 @@ class OffreEmploiAssertion extends AbstractAssertion implements EntityManagerAwa
protected function assertOffreEmploiSupprimer (Role $role, OffreEmploi $offre)
{
return $this->asserts([
+ !$offre->isValide(),
$this->haveRole(),
$this->assertOffreEmploi($role, $offre),
]);
diff --git a/module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Mission.dcm.xml b/module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Mission.dcm.xml
index ff9545a7abcf6350dea111a7a3dd5f6454727e1a..2b7d2d2ed8674dc2e2a605a1cb067f219416e0b9 100755
--- a/module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Mission.dcm.xml
+++ b/module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Mission.dcm.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<doctrine-mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Mission\Entity\Db\Mission" table="MISSION">
<id name="id" type="integer" column="ID">
@@ -24,8 +24,10 @@
<field name="dateFin" type="datetime" column="DATE_FIN" nullable="false"/>
<field name="heuresFormation" type="float" column="HEURES_FORMATION" precision="126" scale="0" nullable="true"/>
<field name="description" type="string" column="DESCRIPTION" length="4000" nullable="true"/>
+ <field name="libelleMission" type="string" column="LIBELLE_MISSIOn" length="4000" nullable="true"/>
+
<field name="etudiantsSuivis" type="string" column="ETUDIANTS_SUIVIS" length="4000" nullable="true"/>
- <one-to-many field="miseEnPaiement" target-entity="Paiement\Entity\Db\MiseEnPaiement" mapped-by="mission" />
+ <one-to-many field="miseEnPaiement" target-entity="Paiement\Entity\Db\MiseEnPaiement" mapped-by="mission"/>
<many-to-many field="etudiants" target-entity="Application\Entity\Db\Intervenant">
<join-table name="MISSION_ETUDIANT">
diff --git a/module/Mission/src/Entity/Db/Mission.php b/module/Mission/src/Entity/Db/Mission.php
index 01c06951386a87a75054ae3ce7ac2e2a5ef48e0a..806e632ac13558d9476fbb476bfaa89a3a41e32a 100755
--- a/module/Mission/src/Entity/Db/Mission.php
+++ b/module/Mission/src/Entity/Db/Mission.php
@@ -34,65 +34,78 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
use EntityManagerAwareTrait;
use ServiceAPayerTrait;
- protected ?TypeMission $typeMission = null;
+ protected ?TypeMission $typeMission = null;
- protected ?TauxRemu $tauxRemu = null;
+ protected ?TauxRemu $tauxRemu = null;
- protected ?TauxRemu $tauxRemuMajore = null;
+ protected ?TauxRemu $tauxRemuMajore = null;
- protected ?\DateTime $dateDebut = null;
+ protected ?\DateTime $dateDebut = null;
- protected ?\DateTime $dateFin = null;
+ protected ?\DateTime $dateFin = null;
- protected ?float $heuresFormation = null;
+ protected ?float $heuresFormation = null;
- protected ?string $description = null;
+ protected ?string $description = null;
- protected ?string $etudiantsSuivis = null;
+ protected ?string $libelleMission = null;
- protected bool $autoValidation = false;
+ protected ?string $etudiantsSuivis = null;
- private Collection $etudiants;
+ protected bool $autoValidation = false;
- private Collection $validations;
+ private Collection $etudiants;
- private Collection $volumesHoraires;
+ private Collection $validations;
+ private Collection $volumesHoraires;
- public function __construct()
+
+ public function __construct ()
{
- $this->etudiants = new ArrayCollection();
- $this->validations = new ArrayCollection();
+ $this->etudiants = new ArrayCollection();
+ $this->validations = new ArrayCollection();
$this->volumesHoraires = new ArrayCollection();
- $this->miseEnPaiement = new ArrayCollection();
- $this->centreCout = new ArrayCollection();
+ $this->miseEnPaiement = new ArrayCollection();
+ $this->centreCout = new ArrayCollection();
}
- public function __toString(): string
+ public function __toString (): string
{
return $this->getLibelleCourt() ?? '';
}
- public function getResourceId()
+ public function getLibelleCourt (): string
{
- return 'Mission';
+ return $this->getTypeMission()->getLibelle() . ' (' . $this->getStructure()->getLibelleCourt() . ')';
+ }
+
+
+
+ public function getLibelle (): string
+ {
+ return $this->getTypeMission()->getLibelle()
+ . ' / ' . $this->getLibelleMission()
+ . '(du ' . $this->getDateDebut()->format(Constants::DATE_FORMAT)
+ . ' au ' . $this->getDateFin()->format(Constants::DATE_FORMAT)
+ . ')';
}
- public function getTypeMission(): ?TypeMission
+ public function getTypeMission (): ?TypeMission
{
return $this->typeMission;
}
- public function setTypeMission(?TypeMission $typeMission): self
+ public function setTypeMission (?TypeMission $typeMission): self
{
$this->typeMission = $typeMission;
@@ -101,141 +114,149 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
- public function getTauxRemu(): ?TauxRemu
+ public function getLibelleMission (): ?string
{
- return $this->tauxRemu;
+ return $this->libelleMission;
}
- public function setTauxRemu(?TauxRemu $tauxRemu): self
+ public function setLibelleMission (?string $libelleMission): self
{
- $this->tauxRemu = $tauxRemu;
+ $this->libelleMission = $libelleMission;
return $this;
}
- public function getTauxRemuMajore(): ?TauxRemu
+ public function getDateDebut (): ?\DateTime
{
- return $this->tauxRemuMajore;
+ return $this->dateDebut;
}
- public function setTauxRemuMajore(?TauxRemu $tauxRemuMajore): self
+ public function setDateDebut (?\DateTime $dateDebut): self
{
- $this->tauxRemuMajore = $tauxRemuMajore;
+ $this->dateDebut = $dateDebut;
return $this;
}
- public function getDateDebut(): ?\DateTime
+ public function getDateFin (): ?\DateTime
{
- return $this->dateDebut;
+ return $this->dateFin;
}
- public function setDateDebut(?\DateTime $dateDebut): self
+ public function setDateFin (?\DateTime $dateFin): self
{
- $this->dateDebut = $dateDebut;
+ $this->dateFin = $dateFin;
return $this;
}
- public function getDateFin(): ?\DateTime
+ public function getResourceId ()
{
- return $this->dateFin;
+ return 'Mission';
}
- public function setDateFin(?\DateTime $dateFin): self
+ public function getTauxRemu (): ?TauxRemu
{
- $this->dateFin = $dateFin;
+ return $this->tauxRemu;
+ }
+
+
+
+ public function setTauxRemu (?TauxRemu $tauxRemu): self
+ {
+ $this->tauxRemu = $tauxRemu;
return $this;
}
- public function getHeuresFormation(): ?float
+ public function getTauxRemuMajore (): ?TauxRemu
{
- return $this->heuresFormation;
+ return $this->tauxRemuMajore;
}
- public function setHeuresFormation(?float $heuresFormation): self
+ public function setTauxRemuMajore (?TauxRemu $tauxRemuMajore): self
{
- $this->heuresFormation = $heuresFormation;
+ $this->tauxRemuMajore = $tauxRemuMajore;
return $this;
}
- public function getDescription(): ?string
+ public function getHeuresFormation (): ?float
{
- return $this->description;
+ return $this->heuresFormation;
}
- public function setDescription(?string $description): self
+ public function setHeuresFormation (?float $heuresFormation): self
{
- $this->description = $description;
+ $this->heuresFormation = $heuresFormation;
return $this;
}
- public function getEtudiantsSuivis(): ?string
+ public function getDescription (): ?string
{
- return $this->etudiantsSuivis;
+ return $this->description;
}
- public function setEtudiantsSuivis(?string $etudiantsSuivis): self
+ public function setDescription (?string $description): self
{
- $this->etudiantsSuivis = $etudiantsSuivis;
+ $this->description = $description;
+
return $this;
}
- public function isAutoValidation(): bool
+ public function getEtudiantsSuivis (): ?string
{
- return $this->autoValidation;
+ return $this->etudiantsSuivis;
}
- public function setAutoValidation(bool $autoValidation): self
+ public function setEtudiantsSuivis (?string $etudiantsSuivis): self
{
- $this->autoValidation = $autoValidation;
+ $this->etudiantsSuivis = $etudiantsSuivis;
return $this;
}
- public function getHeures(): ?float
+ public function getHeuresValidees (): float
{
- $heures = null;
+ $heures = 0;
/** @var VolumeHoraireMission[] $vhs */
$vhs = $this->volumesHoraires;
foreach ($vhs as $vh) {
- if ($vh->estNonHistorise() && $vh->getTypeVolumeHoraire()->isPrevu()) {
+ if ($vh->estNonHistorise() && $vh->getTypeVolumeHoraire()->isPrevu() && $vh->isValide()) {
if ($heures === null) {
$heures = 0;
}
@@ -248,14 +269,55 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
- public function getHeuresValidees(): float
+ public function isValide (): bool
{
- $heures = 0;
+ if ($this->isAutoValidation()) return true;
+
+ if ($validations = $this->getValidations()) {
+ foreach ($validations as $validation) {
+ if ($validation->estNonHistorise()) return true;
+ }
+ }
+
+ return false;
+ }
+
+
+
+ public function isAutoValidation (): bool
+ {
+ return $this->autoValidation;
+ }
+
+
+
+ public function setAutoValidation (bool $autoValidation): self
+ {
+ $this->autoValidation = $autoValidation;
+
+ return $this;
+ }
+
+
+
+ /**
+ * @return Collection|Validation[]
+ */
+ public function getValidations (): Collection
+ {
+ return $this->validations;
+ }
+
+
+
+ public function getHeures (): ?float
+ {
+ $heures = null;
/** @var VolumeHoraireMission[] $vhs */
$vhs = $this->volumesHoraires;
foreach ($vhs as $vh) {
- if ($vh->estNonHistorise() && $vh->getTypeVolumeHoraire()->isPrevu() && $vh->isValide()) {
+ if ($vh->estNonHistorise() && $vh->getTypeVolumeHoraire()->isPrevu()) {
if ($heures === null) {
$heures = 0;
}
@@ -268,9 +330,9 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
- public function setHeures(float $heures): self
+ public function setHeures (float $heures): self
{
- $oldHeures = $this->getHeures() ?: 0;
+ $oldHeures = $this->getHeures() ? : 0;
$newHeures = $heures - $oldHeures;
$prevu = $this->getEntityManager()
@@ -290,17 +352,26 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
+ public function addVolumeHoraire (VolumeHoraireMission $volumeHoraireMission): self
+ {
+ $this->volumesHoraires[] = $volumeHoraireMission;
+
+ return $this;
+ }
+
+
+
/**
* @return Collection|Intervenant[]
*/
- public function getEtudiants(): Collection
+ public function getEtudiants (): Collection
{
return $this->etudiants;
}
- public function addEtudiant(Intervenant $intervenant): self
+ public function addEtudiant (Intervenant $intervenant): self
{
$this->etudiants[] = $intervenant;
@@ -309,7 +380,7 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
- public function removeEtudiant(Intervenant $intervenant): self
+ public function removeEtudiant (Intervenant $intervenant): self
{
$this->etudiants->removeElement($intervenant);
@@ -318,17 +389,7 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
- /**
- * @return Collection|Validation[]
- */
- public function getValidations(): Collection
- {
- return $this->validations;
- }
-
-
-
- public function addValidation(Validation $validation): self
+ public function addValidation (Validation $validation): self
{
$this->validations[] = $validation;
foreach ($this->getVolumesHorairesPrevus() as $vh) {
@@ -342,34 +403,31 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
- public function removeValidation(Validation $validation): self
+ /**
+ * @return Collection|VolumeHoraireMission[]
+ */
+ public function getVolumesHorairesPrevus (): Collection
{
- $this->validations->removeElement($validation);
- foreach ($this->getVolumesHorairesPrevus() as $vh) {
- $vh->removeValidation($validation);
- }
-
- return $this;
+ return $this->volumesHoraires->filter(function (VolumeHoraireMission $vhm) {
+ return $vhm->getTypeVolumeHoraire()->isPrevu();
+ });
}
- public function isValide(): bool
+ public function removeValidation (Validation $validation): self
{
- if ($this->isAutoValidation()) return true;
-
- if ($validations = $this->getValidations()) {
- foreach ($validations as $validation) {
- if ($validation->estNonHistorise()) return true;
- }
+ $this->validations->removeElement($validation);
+ foreach ($this->getVolumesHorairesPrevus() as $vh) {
+ $vh->removeValidation($validation);
}
- return false;
+ return $this;
}
- public function getValidation(): ?Validation
+ public function getValidation (): ?Validation
{
if ($this->isAutoValidation()) {
return new Validation();
@@ -386,89 +444,70 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
- public function getLibelle(): string
+ public function removeVolumeHoraire (VolumeHoraireMission $volumeHoraireMission): self
{
- return $this->getTypeMission()->getLibelle()
- . '(du ' . $this->getDateDebut()->format(Constants::DATE_FORMAT)
- . ' au ' . $this->getDateFin()->format(Constants::DATE_FORMAT)
- . ')';
+ $this->volumesHoraires->removeElement($volumeHoraireMission);
+
+ return $this;
}
- public function getLibelleCourt(): string
+ public function hasContrat (): bool
{
- return $this->getTypeMission()->getLibelle() . ' (' . $this->getStructure()->getLibelleCourt() . ')';
- }
-
+ /** @var VolumeHoraireMission[] $vhs */
+ $vhs = $this->getVolumesHorairesPrevus();
+ foreach ($vhs as $vh) {
+ if ($vh->estNonHistorise() && $vh->getContrat() && $vh->getContrat()->estNonHistorise()) {
+ return true;
+ }
+ }
- /**
- * @return Collection|VolumeHoraireMission[]
- */
- public function getVolumesHorairesPrevus(): Collection
- {
- return $this->volumesHoraires->filter(function (VolumeHoraireMission $vhm) {
- return $vhm->getTypeVolumeHoraire()->isPrevu();
- });
+ return false;
}
- /**
- * @return Collection|VolumeHoraireMission[]
- */
- public function getVolumesHorairesRealises(): Collection
+ public function canSaisie (): bool
{
- return $this->volumesHoraires->filter(function (VolumeHoraireMission $vhm) {
- return $vhm->getTypeVolumeHoraire()->isRealise();
- });
+ return true;
}
- public function addVolumeHoraire(VolumeHoraireMission $volumeHoraireMission): self
+ public function canAddHeures (): bool
{
- $this->volumesHoraires[] = $volumeHoraireMission;
-
- return $this;
+ return true;
}
- public function removeVolumeHoraire(VolumeHoraireMission $volumeHoraireMission): self
+ public function canValider (): bool
{
- $this->volumesHoraires->removeElement($volumeHoraireMission);
-
- return $this;
+ return
+ !$this->isValide()
+ && $this->tauxRemu != null
+ && $this->getHeures() > 0;
}
- public function hasContrat(): bool
+ public function canDevalider (): bool
{
- /** @var VolumeHoraireMission[] $vhs */
- $vhs = $this->getVolumesHorairesPrevus();
-
- foreach ($vhs as $vh) {
- if ($vh->estNonHistorise() && $vh->getContrat() && $vh->getContrat()->estNonHistorise()) {
- return true;
- }
- }
-
- return false;
+ return $this->isValide() && !$this->hasSuivi();
}
- public function hasSuivi(): bool
+ public function hasSuivi (): bool
{
return $this->heuresRealisees() > 0;
}
- public function heuresRealisees(?bool $validees = null): float
+ public function heuresRealisees (?bool $validees = null): float
{
$vhs = $this->getVolumesHorairesRealises();
@@ -483,7 +522,6 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
} else {
$heures += $vh->getHeures();
}
-
}
}
@@ -492,45 +530,26 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
- public function canSaisie(): bool
- {
- return true;
- }
-
-
-
- public function canAddHeures(): bool
- {
- return true;
- }
-
-
-
- public function canValider(): bool
- {
- return
- !$this->isValide()
- && $this->tauxRemu != null
- && $this->getHeures() > 0;
- }
-
-
-
- public function canDevalider(): bool
+ /**
+ * @return Collection|VolumeHoraireMission[]
+ */
+ public function getVolumesHorairesRealises (): Collection
{
- return $this->isValide() && !$this->hasSuivi();
+ return $this->volumesHoraires->filter(function (VolumeHoraireMission $vhm) {
+ return $vhm->getTypeVolumeHoraire()->isRealise();
+ });
}
- public function canSupprimer(): bool
+ public function canSupprimer (): bool
{
return !$this->isValide();
}
- public function canAddSuivi(\DateTime $date): bool
+ public function canAddSuivi (\DateTime $date): bool
{
$dateOk = $this->getDateDebut() <= $date && $this->getDateFin() >= $date;
@@ -539,77 +558,77 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana
- public function getHeuresComplFi(): float
+ public function getHeuresComplFi (): float
{
return 0;
}
- public function getHeuresComplFc(): float
+ public function getHeuresComplFc (): float
{
return 0;
}
- public function getHeuresComplFcMajorees(): float
+ public function getHeuresComplFcMajorees (): float
{
return 0;
}
- public function getHeuresComplFa(): float
+ public function getHeuresComplFa (): float
{
return 0;
}
- public function getHeuresComplReferentiel(): float
+ public function getHeuresComplReferentiel (): float
{
return 0;
}
- public function getHeuresCompl(TypeHeures $typeHeures): float
+ public function getHeuresCompl (TypeHeures $typeHeures): float
{
return $this->heuresRealisees(true);
}
- public function getHeuresMission(): float
+ public function getHeuresMission (): float
{
return $this->heuresRealisees(true);
}
- public function getDefaultCentreCout(TypeHeures $typeHeures): ?CentreCout
+ public function getDefaultCentreCout (TypeHeures $typeHeures): ?CentreCout
{
return null;
}
- public function getDefaultDomaineFonctionnel(): ?DomaineFonctionnel
+ public function getDefaultDomaineFonctionnel (): ?DomaineFonctionnel
{
return null;
}
- public function isDomaineFonctionnelModifiable(): bool
+ public function isDomaineFonctionnelModifiable (): bool
{
return true;
}
- public function isPayable(): bool
+ public function isPayable (): bool
{
return $this->isValide();
}
diff --git a/module/Mission/src/Form/MissionForm.php b/module/Mission/src/Form/MissionForm.php
index 244fc4eb5284d4d0cca093503eafaf23fb1085ee..18c23bc8c3be2f49ee65bc93d74d8e33ca29243b 100755
--- a/module/Mission/src/Form/MissionForm.php
+++ b/module/Mission/src/Form/MissionForm.php
@@ -22,15 +22,15 @@ class MissionForm extends AbstractForm
use ContextServiceAwareTrait;
- public function init()
+ public function init ()
{
- $tmDql = "SELECT tm FROM " . TypeMission::class . " tm WHERE tm.histoDestruction IS NULL AND tm.annee = :annee";
+ $tmDql = "SELECT tm FROM " . TypeMission::class . " tm WHERE tm.histoDestruction IS NULL AND tm.annee = :annee";
$tmDqlParams = ['annee' => $this->getServiceContext()->getAnnee()];
/** @var TypeMission[] $typesMissions */
$typesMissions = $this->getEntityManager()->createQuery($tmDql)->setParameters($tmDqlParams)->getResult();
$tmAccEtu = [];
- $tmData = [];
+ $tmData = [];
foreach ($typesMissions as $typeMission) {
$tmData[$typeMission->getId()] = [
'accompagnementEtudiant' => $typeMission->isAccompagnementEtudiants(),
@@ -71,6 +71,7 @@ class MissionForm extends AbstractForm
'dateDebut' => 'Date de début',
'dateFin' => 'Date de fin',
'description' => 'Descriptif de la mission',
+ 'libelleMission' => 'Libelle mission',
'etudiantsSuivis' => 'Noms des étudiants suivis',
'heuresFormation' => 'Heures de formation prévues',
]);
@@ -80,7 +81,7 @@ class MissionForm extends AbstractForm
- public function editValide(): self
+ public function editValide (): self
{
$this->valide = true;
@@ -98,7 +99,7 @@ class MissionForm extends AbstractForm
- public function isValide(): bool
+ public function isValide (): bool
{
return $this->valide;
}
diff --git a/module/Mission/src/Service/MissionService.php b/module/Mission/src/Service/MissionService.php
index b413da7228bf489d3dd24ba72c9b75dbd00c57f6..612efdc759a5af0449e4a0960e88ff85eefb2a21 100755
--- a/module/Mission/src/Service/MissionService.php
+++ b/module/Mission/src/Service/MissionService.php
@@ -82,6 +82,8 @@ class MissionService extends AbstractEntityService
$properties = [
'id',
+ 'libelle',
+ 'libelleMission',
['typeMission', ['libelle', 'accompagnementEtudiants', 'besoinFormation']],
'dateDebut',
'dateFin',
@@ -172,7 +174,7 @@ class MissionService extends AbstractEntityService
$now = new \DateTime();
$now->modify('+10 minutes'); // tolérance de 10 minutes
- if ($vhm->getHoraireFin() > $now){
+ if ($vhm->getHoraireFin() > $now) {
throw new \Exception('Vous ne pouvez saisir de suivi avant qu\'il ne soit terminé');
}
}
@@ -198,6 +200,7 @@ class MissionService extends AbstractEntityService
$mission->setDescription($candidature->getOffre()->getDescription());
$mission->setStructure($candidature->getOffre()->getStructure());
$mission->setHeures($candidature->getOffre()->getNombreHeures());
+ $mission->setLibelleMission($candidature->getOffre()->getTitre());
$this->save($mission);
diff --git a/module/Mission/view/mission/saisie/saisie.phtml b/module/Mission/view/mission/saisie/saisie.phtml
index 49e8fd40483f077ac9a3dc29d6a7e78cacf8755f..024dbf5940d40ee4c0604446fcf32a60255af202 100644
--- a/module/Mission/view/mission/saisie/saisie.phtml
+++ b/module/Mission/view/mission/saisie/saisie.phtml
@@ -18,6 +18,7 @@ if ($form->has('structure')) {
echo $this->formControlGroup($form->get('structure'));
}
echo $this->formControlGroup($form->get('typeMission'));
+echo $this->formControlGroup($form->get('libelleMission'));
echo '<div class="row">';
echo '<div class="col-md-6">';
echo $this->formControlGroup($form->get('dateDebut'));
diff --git a/module/Paiement/src/Form/TauxValeurForm.php b/module/Paiement/src/Form/TauxValeurForm.php
index 5f7fb448619d34751928d8e48927535261eb5b65..f55cf84df819f69e58ca7a3ae3e9557cb1bd5182 100644
--- a/module/Paiement/src/Form/TauxValeurForm.php
+++ b/module/Paiement/src/Form/TauxValeurForm.php
@@ -11,12 +11,15 @@ class TauxValeurForm extends AbstractForm
{
use SchemaServiceAwareTrait;
- public function init()
+ public function init ()
{
$ignore = ['tauxRemu'];
$this->spec(TauxRemuValeur::class, $ignore);
- $this->build();
$this->addSecurity();
+ $this->build();
+ $this->setLabels([
+ 'dateEffet' => 'Date d\'effet',
+ ]);
$this->addSubmit();
return $this;
@@ -24,7 +27,7 @@ class TauxValeurForm extends AbstractForm
- public function bind($object, $flags = FormInterface::VALUES_NORMALIZED)
+ public function bind ($object, $flags = FormInterface::VALUES_NORMALIZED)
{
/* @var $object TauxRemuValeur */
parent::bind($object, $flags);
diff --git a/module/Paiement/view/paiement/taux-remu/saisir-valeur.phtml b/module/Paiement/view/paiement/taux-remu/saisir-valeur.phtml
index 1d6219f959723458a113f079f2ff117197a8b570..5cabbf8a3e2b21ebbf761941781bc628cc952ad1 100755
--- a/module/Paiement/view/paiement/taux-remu/saisir-valeur.phtml
+++ b/module/Paiement/view/paiement/taux-remu/saisir-valeur.phtml
@@ -3,5 +3,6 @@
* @var $this \Application\View\Renderer\PhpRenderer
*/
+echo '<h1 class="page-header">Modification de la valeur du taux</h1>';
echo $this->messenger()->addCurrentMessagesFromFlashMessenger();
echo $this->form($form);
\ No newline at end of file
diff --git a/module/Paiement/view/paiement/taux-remu/saisir.phtml b/module/Paiement/view/paiement/taux-remu/saisir.phtml
index ac28762d2c392f055cf83ceaa86f7de06e74155e..288710e050a0613f1ecc296fd0969447be04b785 100755
--- a/module/Paiement/view/paiement/taux-remu/saisir.phtml
+++ b/module/Paiement/view/paiement/taux-remu/saisir.phtml
@@ -3,5 +3,6 @@
* @var $this \Application\View\Renderer\PhpRenderer
*/
+echo '<h1 class="page-header">Saisie du taux</h1>';
echo $this->messenger()->addCurrentMessagesFromFlashMessenger();
echo $this->form($form);
diff --git a/module/PieceJointe/view/piece-jointe/piece-jointe/modifier-type-piece-jointe-statut.phtml b/module/PieceJointe/view/piece-jointe/piece-jointe/modifier-type-piece-jointe-statut.phtml
index d731c4a6bf95913990fc87fd6b3f1e1f7062335c..db281005ec10957563e6daaebfb0d83763215edd 100755
--- a/module/PieceJointe/view/piece-jointe/piece-jointe/modifier-type-piece-jointe-statut.phtml
+++ b/module/PieceJointe/view/piece-jointe/piece-jointe/modifier-type-piece-jointe-statut.phtml
@@ -47,18 +47,17 @@ echo $this->messenger()->addCurrentMessagesFromFlashMessenger();
</div>
</div>
<div class="row">
- <div class="col-md-6">
- <?= $this->formControlGroup($form->get('seuil-hetd')); ?>
- </div>
- <div class="col-md-6">
+ <div class="col-md-12">
<?= $this->formControlGroup($form->get('type-heure-hetd')); ?>
</div>
</div>
<div class="row">
- <div class="col-md-12">
+ <div class="col-md-6">
+ <?= $this->formControlGroup($form->get('seuil-hetd')); ?>
+ </div>
+ <div class="col-md-6">
<?= $this->formControlGroup($form->get('duree-vie')); ?>
</div>
-
</div>
<?= $this->formSubmit($form->get('submit')); ?>
diff --git a/module/Referentiel/src/Controller/ServiceReferentielController.php b/module/Referentiel/src/Controller/ServiceReferentielController.php
index d1c15c842c0d42936a3be72105d03baeb76867dc..0f85d965ae4aafbd023e65a90f51caf6f4abc836 100755
--- a/module/Referentiel/src/Controller/ServiceReferentielController.php
+++ b/module/Referentiel/src/Controller/ServiceReferentielController.php
@@ -150,7 +150,7 @@ class ServiceReferentielController extends AbstractController
}
$hFin = $entity->getVolumeHoraireReferentielListe()->getHeures();
$this->updateTableauxBord($intervenant);
- if (!$this->getProcessusPlafond()->endTransaction($service, $typeVolumeHoraire, $hFin < $hDeb)) {
+ if (!$this->getProcessusPlafond()->endTransaction($entity, $typeVolumeHoraire, $hFin < $hDeb)) {
$this->updateTableauxBord($intervenant);
}
} else {
diff --git a/public/dist/assets/main-217768f9.js b/public/dist/assets/main-217768f9.js
deleted file mode 100644
index dba6ead969ec19ced5715908868335d91134a704..0000000000000000000000000000000000000000
--- a/public/dist/assets/main-217768f9.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import{c as a,o as s,t as h,a as i,w as D,v as A,b as c,F as g,r as y,d as u,n as j,e as _,f as L,g as b,h as k,i as O,j as S,p as N,k as z,l as q,m as Y,q as J,s as Q,u as X,x as W}from"./vendor-aed55673.js";const x=(e,t)=>{const n=e.__vccOpts||e;for(const[m,l]of t)n[m]=l;return n},G={props:{valeur:{required:!0,type:Number}},computed:{affichage:function(){return Util.formattedHeures(this.valeur,!0)}}},Z=["innerHTML"];function K(e,t,n,m,l,r){return s(),a("span",{class:"heures",innerHTML:r.affichage},null,8,Z)}const ee=x(G,[["render",K]]),te=Object.freeze(Object.defineProperty({__proto__:null,default:ee},Symbol.toStringTag,{value:"Module"})),ie={name:"Utilisateur",props:{nom:String,mail:String}},ne=["href"];function re(e,t,n,m,l,r){return s(),a("a",{href:`mailto:${n.mail}`},h(n.nom),9,ne)}const se=x(ie,[["render",re]]),ae=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"})),oe={name:"UDate",props:{value:{required:!1,type:[String,Date]},format:{required:!1,type:String}},mounted(){this.formatted=this.formatage(this.value)},data(){return{formatted:void 0}},watch:{value:function(e){this.formatted=this.formatage(e)}},methods:{formatage(e){if(e===void 0)return;let t=new Date(e);const n=t.getFullYear(),m=(t.getMonth()+1).toString().padStart(2,"0"),l=t.getDate().toString().padStart(2,"0"),r=t.getHours().toString().padStart(2,"0"),d=t.getMinutes().toString().padStart(2,"0"),o=t.getSeconds().toString().padStart(2,"0");switch(this.format){case"datetime":return`${l}/${m}/${n} à ${r}:${d}`;case"time":return`${r}:${d}:${o}`}return`${l}/${m}/${n}`}}};function le(e,t,n,m,l,r){return h(l.formatted)}const w=x(oe,[["render",le]]),ue={name:"Recherche",data(){return{searchTerm:"",noResult:0,intervenants:[],checkedTypes:["vacataire","permanent","etudiant"]}},mixins:[Util],methods:{rechercher:function(e){this.searchTerm=e.currentTarget.value,this.searchTerm==""&&(this.noResult=0),this.searchTerm!=""&&this.reload()},urlFiche(e){return unicaenVue.url("intervenant/code:"+e+"/voir")},reload(){this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout(()=>{unicaenVue.axios.post(unicaenVue.url("intervenant/recherche-json"),{term:this.searchTerm}).then(e=>{let t=e.data,n=[];for(const m in t){if(t[m].typeIntervenantCode=="E"&&this.checkedTypes.includes("vacataire")){n.push(t[m]);continue}if(t[m].typeIntervenantCode=="P"&&this.checkedTypes.includes("permanent")){n.push(t[m]);continue}if(t[m].typeIntervenantCode=="S"&&this.checkedTypes.includes("etudiant")){n.push(t[m]);continue}}this.intervenants=n,this.intervenants.length==0?this.noResult=1:this.noResult=0}).catch(e=>{console.log(e.message)})},800)}}},de=i("h3",null,"Saisissez le nom suivi éventuellement du prénom (2 lettres minimum)",-1),ce={class:"intervenant-recherche"},me={class:"critere"},he=i("br",null,null,-1),fe=i("span",{class:"fw-bold"},"Types d'intervenant : ",-1),_e=i("br",null,null,-1),ve={key:0,class:"table table-bordered table-hover"},pe=i("thead",null,[i("tr",null,[i("th",{style:{width:"90px"}}),i("th",null,"Civilité"),i("th",null,"Nom"),i("th",null,"Prenom"),i("th",null,"Structure"),i("th",null,"Statut"),i("th",null,"Date de naissance"),i("th",null,"N° Personnel")])],-1),be=["title"],ge={style:{}},ye=["href"],xe=i("i",{class:"fas fa-eye"},null,-1),Ce={key:1,class:"table table-bordered table-hover"},Ve=i("thead",null,[i("tr",null,[i("th",{style:{width:"90px"}}),i("th",null,"Civilité"),i("th",null,"Nom"),i("th",null,"Prenom"),i("th",null,"Structure"),i("th",null,"Statut"),i("th",null,"Date de naissance"),i("th",null,"N° Personnel")])],-1),ke=i("tbody",null,[i("tr",null,[i("td",{colspan:"8",style:{"text-align":"center"}},"Aucun intervenant trouvé")])],-1),Se=[Ve,ke];function Me(e,t,n,m,l,r){const d=w;return s(),a(g,null,[de,i("div",ce,[i("div",me,[i("div",null,[i("input",{id:"term",class:"form-control input",placeholder:"votre recherche...",type:"text",onKeyup:t[0]||(t[0]=(...o)=>r.rechercher&&r.rechercher(...o))},null,32),he]),i("div",null,[fe,D(i("input",{"onUpdate:modelValue":t[1]||(t[1]=o=>l.checkedTypes=o),checked:"checked",name:"type[]",type:"checkbox",value:"permanent",onChange:t[2]||(t[2]=o=>r.reload())},null,544),[[A,l.checkedTypes]]),c(" Permanent "),D(i("input",{"onUpdate:modelValue":t[3]||(t[3]=o=>l.checkedTypes=o),checked:"checked",name:"type[]",type:"checkbox",value:"vacataire",onChange:t[4]||(t[4]=o=>r.reload())},null,544),[[A,l.checkedTypes]]),c(" Vacataire "),D(i("input",{"onUpdate:modelValue":t[5]||(t[5]=o=>l.checkedTypes=o),checked:"checked",name:"type[]",type:"checkbox",value:"etudiant",onChange:t[6]||(t[6]=o=>r.reload())},null,544),[[A,l.checkedTypes]]),c(" Etudiant ")]),_e])]),l.intervenants.length>0?(s(),a("table",ve,[pe,i("tbody",null,[(s(!0),a(g,null,y(l.intervenants,(o,f)=>(s(),a("tr",{class:j({"bg-danger":o.destruction!==null}),title:o.destruction!==null?"Fiche historisé":""},[i("td",ge,[i("a",{href:r.urlFiche(o.code)},[xe,c(" Fiche")],8,ye)]),i("td",null,h(o.civilite),1),i("td",null,h(o.nom),1),i("td",null,h(o.prenom),1),i("td",null,h(o.structure),1),i("td",null,h(o.statut),1),i("td",null,[_(d,{value:o["date-naissance"]},null,8,["value"])]),i("td",null,h(o["numero-personnel"]),1)],10,be))),256))])])):u("",!0),l.intervenants.length==0&&l.noResult==1?(s(),a("table",Ce,Se)):u("",!0)],64)}const Te=x(ue,[["render",Me]]),De=Object.freeze(Object.defineProperty({__proto__:null,default:Te},Symbol.toStringTag,{value:"Module"})),je={name:"UModal",props:{id:{required:!0,type:String},title:{required:!0,type:String}}},we=["id"],Ue={class:"modal-dialog"},Ae={class:"modal-content"},Re={class:"modal-header"},Ee={class:"modal-title"},Le=i("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),Oe={class:"modal-body"},qe={class:"modal-footer"},He=i("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"},"Fermer",-1);function Pe(e,t,n,m,l,r){return s(),a("div",{class:"modal fade",id:n.id,tabindex:"-1","aria-hidden":"true"},[i("div",Ue,[i("div",Ae,[i("div",Re,[i("h5",Ee,h(n.title),1),Le]),i("div",Oe,[L(e.$slots,"body")]),i("div",qe,[L(e.$slots,"footer"),He])])])],8,we)}const $e=x(je,[["render",Pe]]),Fe={name:"UIcon",props:{name:{required:!0,type:String},variant:{required:!1,type:String}}};function Be(e,t,n,m,l,r){return s(),a("i",{class:j(`fas fa-${n.name} text-${n.variant}`)},null,2)}const M=x(Fe,[["render",Be]]);const Ie={name:"Mission",props:{mission:{required:!0}},data(){return{validationText:this.calcValidation(this.mission.validation),saisieUrl:unicaenVue.url("mission/saisie/:mission",{mission:this.mission.id}),validerUrl:unicaenVue.url("mission/valider/:mission",{mission:this.mission.id}),devaliderUrl:unicaenVue.url("mission/devalider/:mission",{mission:this.mission.id}),supprimerUrl:unicaenVue.url("mission/supprimer/:mission",{mission:this.mission.id})}},watch:{"mission.validation"(e){this.validationText=this.calcValidation(e)}},computed:{heuresLib:function(){return this.mission.heures===null||this.mission.heures===0?"Aucune heure saisie":this.mission.heures==this.mission.heuresValidees?Util.formattedHeures(this.mission.heures)+" heures (validées)":this.mission.heuresValidees==0?Util.formattedHeures(this.mission.heures)+" heures (non validées)":'<span class="bg-info">'+Util.formattedHeures(this.mission.heures)+"</span> heures ("+Util.formattedHeures(this.mission.heuresValidees)+" validées)"}},methods:{calcValidation(e){return e===null?"A valider":e.id===null?"Autovalidée":"Validation du "+Util.dateToString(e.histoCreation)+" par "},saisie(e){modAjax(e.currentTarget,t=>{this.refresh()})},supprimer(e){popConfirm(e.currentTarget,t=>{this.$emit("supprimer",this.mission)})},valider(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},devalider(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},volumeHoraireSupprimer(e){e.currentTarget.href=unicaenVue.url("mission/volume-horaire/supprimer/:missionVolumeHoraire",{missionVolumeHoraire:e.currentTarget.dataset.id}),popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},volumeHoraireValider(e){e.currentTarget.href=unicaenVue.url("mission/volume-horaire/valider/:missionVolumeHoraire",{missionVolumeHoraire:e.currentTarget.dataset.id}),popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},volumeHoraireDevalider(e){e.currentTarget.href=unicaenVue.url("mission/volume-horaire/devalider/:missionVolumeHoraire",{missionVolumeHoraire:e.currentTarget.dataset.id}),popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},refresh(){unicaenVue.axios.get(unicaenVue.url("mission/get/:mission",{mission:this.mission.id})).then(e=>{this.$emit("refresh",e.data)})}}},V=e=>(N("data-v-27267625"),e=e(),z(),e),Ne=["id"],ze={class:"card-header card-header-h3"},Ye={class:"float-end"},Je={class:"card-body"},Qe={class:"row"},Xe={class:"col-md-8"},We={class:"row"},Ge={class:"col-md-12"},Ze=V(()=>i("label",{class:"form-label"},"Composante en charge du suivi",-1)),Ke={class:"form-control"},et={class:"row"},tt={class:"col-md-6"},it=V(()=>i("label",{class:"form-label"},"Taux de rémunération",-1)),nt={class:"form-control"},rt={class:"col-md-6"},st=V(()=>i("label",{class:"form-label"},"Taux majoré (dimanches/jours fériés)",-1)),at={class:"form-control"},ot={class:"col-md-7"},lt=V(()=>i("label",{class:"form-label"},"Nombre d'heures prévisionnelles",-1)),ut={class:"input-group mb-3"},dt=["innerHTML"],ct=["data-bs-target"],mt={key:0,class:"col-md-5"},ht=V(()=>i("label",{class:"form-label"},"Heures de formation prévues",-1)),ft={class:"form-control"},_t={class:"row"},vt={class:"col-md-12"},pt=V(()=>i("label",{class:"form-label"},"Descriptif de la mission",-1)),bt={class:"form-control"},gt={key:0,class:"row"},yt={class:"col-md-12"},xt=V(()=>i("label",{class:"form-label"},"Etudiants suivis",-1)),Ct={class:"form-control"},Vt=V(()=>i("div",{class:"row"},[i("div",{class:"col-md-12"}," ")],-1)),kt={class:"row"},St={class:"col-md-12"},Mt=["href"],Tt=["href"],Dt=["href"],jt=["href"],wt={class:"col-md-4"},Ut=V(()=>i("div",null,[i("label",{class:"form-label"},"Suivi")],-1)),At={class:"table table-bordered table-condensed"},Rt=V(()=>i("thead",null,[i("tr",null,[i("th",null,"Heures"),i("th",null,"Statut"),i("th",null,"Actions")])],-1)),Et={style:{"text-align":"right"}},Lt=V(()=>i("br",null,null,-1)),Ot={key:0},qt=["data-id"],Ht=["data-id"],Pt=["data-id"];function $t(e,t,n,m,l,r){const d=w,o=M,f=S("utilisateur"),C=S("u-heures"),p=$e;return s(),a(g,null,[i("div",{id:n.mission.id,class:j(["card",{"bg-success":n.mission.valide,"bg-default":!n.mission.valide}])},[i("form",{onSubmit:t[4]||(t[4]=b((...v)=>e.submitForm&&e.submitForm(...v),["prevent"]))},[i("div",ze,[i("h5",null,[c(h(n.mission.typeMission.libelle)+" ",1),i("span",Ye,[c("Du "),_(d,{value:n.mission.dateDebut},null,8,["value"]),c(" au "),_(d,{value:n.mission.dateFin},null,8,["value"])])])]),i("div",Je,[i("div",Qe,[i("div",Xe,[i("div",We,[i("div",Ge,[Ze,i("div",Ke,h(n.mission.structure.libelle),1)])]),i("div",et,[i("div",tt,[it,i("div",nt,h(n.mission.tauxRemu?n.mission.tauxRemu.libelle:null),1)]),i("div",rt,[st,i("div",at,h(n.mission.tauxRemuMajore?n.mission.tauxRemuMajore.libelle:n.mission.tauxRemu?"Idem ("+n.mission.tauxRemu.libelle+")":null),1)]),i("div",ot,[lt,i("div",ut,[i("div",{class:"form-control",innerHTML:r.heuresLib},null,8,dt),i("button",{class:"input-group-btn btn btn-secondary","data-bs-toggle":"modal","data-bs-target":`#details-${n.mission.id}`}," Détails ",8,ct)])]),n.mission.typeMission.besoinFormation?(s(),a("div",mt,[ht,i("div",ft,h(n.mission.heuresFormation),1)])):u("",!0)]),i("div",_t,[i("div",vt,[pt,i("div",bt,h(n.mission.description),1)])]),n.mission.typeMission.accompagnementEtudiants?(s(),a("div",gt,[i("div",yt,[xt,i("div",Ct,[i("pre",null,h(n.mission.etudiantsSuivis),1)])])])):u("",!0),Vt,i("div",kt,[i("div",St,[n.mission.canSaisie?(s(),a("a",{key:0,href:l.saisieUrl,class:"btn btn-primary",onClick:t[0]||(t[0]=b((...v)=>r.saisie&&r.saisie(...v),["prevent"]))},"Modifier",8,Mt)):u("",!0),n.mission.canValider?(s(),a("a",{key:1,href:l.validerUrl,class:"btn btn-secondary","data-title":"Validation de la mission","data-content":"Êtes-vous sur de vouloir valider la mission ?",onClick:t[1]||(t[1]=b((...v)=>r.valider&&r.valider(...v),["prevent"]))},"Valider",8,Tt)):u("",!0),n.mission.canDevalider?(s(),a("a",{key:2,href:l.devaliderUrl,class:"btn btn-danger","data-title":"Dévalidation de la mission","data-content":"Êtes-vous sur de vouloir dévalider la mission ?",onClick:t[2]||(t[2]=b((...v)=>r.devalider&&r.devalider(...v),["prevent"]))},"Dévalider",8,Dt)):u("",!0),n.mission.canSupprimer?(s(),a("a",{key:3,href:l.supprimerUrl,class:"btn btn-danger","data-title":"Suppression de la mission","data-content":"Êtes-vous sur de vouloir supprimer la mission ?",onClick:t[3]||(t[3]=b((...v)=>r.supprimer&&r.supprimer(...v),["prevent"]))},"Supprimer",8,jt)):u("",!0)])])]),i("div",wt,[Ut,i("div",null,[_(o,{name:"thumbs-up",variant:"success"}),c(" Créé le "),_(d,{value:n.mission.histoCreation},null,8,["value"]),c(" par "),_(f,{nom:n.mission.histoCreateur.displayName,mail:n.mission.histoCreateur.email},null,8,["nom","mail"])]),i("div",null,[_(o,{name:n.mission.valide?"thumbs-up":"thumbs-down",variant:n.mission.valide?"success":"info"},null,8,["name","variant"]),c(" "+h(l.validationText)+" ",1),n.mission.validation&&n.mission.validation.histoCreateur?(s(),k(f,{key:0,nom:n.mission.validation.histoCreateur.displayName,mail:n.mission.validation.histoCreateur.email},null,8,["nom","mail"])):u("",!0)]),i("div",null,[_(o,{name:n.mission.contrat?"thumbs-up":"thumbs-down",variant:n.mission.contrat?"success":"info"},null,8,["name","variant"]),c(" "+h(n.mission.contrat?"Contrat établi":"Pas de contrat"),1)]),i("div",null,h(n.mission.heuresRealisees)+" heure"+h(n.mission.heuresRealisees<2?"":"s")+" réalisée"+h(n.mission.heuresRealisees<2?"":"s"),1)])])])],32)],10,Ne),_(p,{id:`details-${n.mission.id}`,title:"Détail des heures prévisionnelles"},{body:O(()=>[i("table",At,[Rt,i("tbody",null,[(s(!0),a(g,null,y(n.mission.volumesHorairesPrevus,v=>(s(),a("tr",{key:v.id},[i("td",Et,[_(C,{valeur:v.heures},null,8,["valeur"])]),i("td",null,[_(o,{name:"thumbs-up",variant:"success"}),c(" Saisi par "),_(f,{nom:v.histoCreateur.displayName,mail:v.histoCreateur.email},null,8,["nom","mail"]),c(" le "),_(d,{value:v.histoCreation},null,8,["value"]),Lt,_(o,{name:v.valide?"thumbs-up":"thumbs-down",variant:v.valide?"success":"info"},null,8,["name","variant"]),c(" "+h(v.validation&&v.validation.id==null?"Autovalidé":v.validation?"":"à valider")+" ",1),v.validation&&v.validation.histoCreateur?(s(),a("span",Ot,[c(" Validé par "),_(f,{nom:v.validation.histoCreateur.displayName,mail:v.validation.histoCreateur.email},null,8,["nom","mail"]),c(" le "),_(d,{value:v.validation.histoCreation},null,8,["value"])])):u("",!0)]),i("td",null,[v.canValider?(s(),a("a",{key:0,class:"btn btn-secondary","data-id":v.id,"data-title":"Validation du volume horaire","data-content":"Êtes-vous sur de vouloir valider ce volume horaire ?",onClick:t[5]||(t[5]=b((...T)=>r.volumeHoraireValider&&r.volumeHoraireValider(...T),["prevent"]))},"Valider",8,qt)):u("",!0),v.canDevalider?(s(),a("a",{key:1,class:"btn btn-danger","data-id":v.id,"data-title":"Dévalidation du volume horaire","data-content":"Êtes-vous sur de vouloir dévalider ce volume horaire ?",onClick:t[6]||(t[6]=b((...T)=>r.volumeHoraireDevalider&&r.volumeHoraireDevalider(...T),["prevent"]))},"Dévalider",8,Ht)):u("",!0),v.canSupprimer?(s(),a("a",{key:2,class:"btn btn-danger","data-id":v.id,"data-title":"Suppression du volume horaire","data-content":"Êtes-vous sur de vouloir supprimer le volume horaire ?",onClick:t[7]||(t[7]=b((...T)=>r.volumeHoraireSupprimer&&r.volumeHoraireSupprimer(...T),["prevent"]))},"Supprimer",8,Pt)):u("",!0)])]))),128))])])]),footer:O(()=>[]),_:1},8,["id"])],64)}const H=x(Ie,[["render",$t],["__scopeId","data-v-27267625"]]),Ft=Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"})),Bt={components:{mission:H},props:{intervenant:{type:Number,required:!0},canAddMission:{type:Boolean,required:!0}},data(){return{missions:[],isMounted:!1,ajoutUrl:unicaenVue.url("mission/ajout/:intervenant",{intervenant:this.intervenant})}},mounted(){this.reload()},methods:{ajout(e){modAjax(e.currentTarget,t=>{this.reload()})},supprimer(e){this.reload()},refresh(e){let t=Util.json.indexById(this.missions,e.id);this.missions[t]=e,this.refreshPlafonds()},reload(){unicaenVue.axios.get(unicaenVue.url("mission/liste/:intervenant",{intervenant:this.intervenant})).then(e=>{this.missions=e.data,this.refreshPlafonds()})},refreshPlafonds(){this.isMounted?($(".plafonds").refresh(),$("#sidebar").refresh()):this.isMounted=!0}}},It=["href"];function Nt(e,t,n,m,l,r){const d=S("mission");return s(),a(g,null,[(s(!0),a(g,null,y(l.missions,o=>(s(),k(d,{onSupprimer:r.supprimer,onRefresh:r.refresh,key:o.id,mission:o},null,8,["onSupprimer","onRefresh","mission"]))),128)),n.canAddMission?(s(),a("a",{key:0,class:"btn btn-primary",href:l.ajoutUrl,onClick:t[0]||(t[0]=b((...o)=>r.ajout&&r.ajout(...o),["prevent"]))},"Ajout d'une nouvelle mission",8,It)):u("",!0)],64)}const zt=x(Bt,[["render",Nt]]),Yt=Object.freeze(Object.defineProperty({__proto__:null,default:zt},Symbol.toStringTag,{value:"Module"})),Jt={name:"ListeCandidatures.vue",props:{intervenant:{required:!0},canValiderCandidature:{type:Boolean,required:!1}},data(){return{candidatures:[],urlListeOffre:unicaenVue.url("offre-emploi")}},mounted(){this.reload()},methods:{reload(){unicaenVue.axios.get(unicaenVue.url("intervenant/:intervenant/get-candidatures",{intervenant:this.intervenant})).then(e=>{this.candidatures=e.data})},validerCandidature(e){popConfirm(e.target,t=>{this.reload()})},refuserCandidature(e){popConfirm(e.target,t=>{this.reload()})},urlOffre(e){return unicaenVue.url("offre-emploi/detail/:offre",{offre:e.offre.id})},urlAccepterCandidature:function(e){return unicaenVue.url("offre-emploi/accepter-candidature/:id",{id:e.id})},urlRefuserCandidature:function(e){return unicaenVue.url("offre-emploi/refuser-candidature/:id",{id:e.id})}}},Qt={class:"table table-bordered"},Xt=i("th",null,"Offre d'emploi",-1),Wt=i("th",null,"Composante",-1),Gt=i("th",null,"Etat",-1),Zt={key:0},Kt={key:0},ei={key:0,colspan:"4",style:{"text-align":"center"}},ti={key:1,colspan:"3",style:{"text-align":"center"}},ii={style:{"text-align":"center"}},ni=["href"],ri={style:{"text-align":"center"}},si={style:{"text-align":"center"}},ai={key:0,class:"badge rounded-pill bg-success"},oi={key:1,class:"badge rounded-pill bg-danger"},li={key:2,class:"badge rounded-pill bg-warning"},ui={key:0,style:{"text-align":"center"}},di=["href"],ci=["href"],mi=["href"];function hi(e,t,n,m,l,r){const d=M;return s(),a("div",null,[i("table",Qt,[i("thead",null,[i("tr",null,[Xt,Wt,Gt,n.canValiderCandidature?(s(),a("th",Zt,"Action")):u("",!0)])]),i("tbody",null,[l.candidatures.length==0?(s(),a("tr",Kt,[n.canValiderCandidature?(s(),a("td",ei,"Aucune candidature")):u("",!0),n.canValiderCandidature?u("",!0):(s(),a("td",ti,"Aucune candidature"))])):u("",!0),(s(!0),a(g,null,y(l.candidatures,o=>(s(),a("tr",{key:o.id},[i("td",ii,[i("a",{href:r.urlOffre(o)},h(o.offre.titre),9,ni)]),i("td",ri,h(o.offre.structure.libelleLong),1),i("td",si,[o.validation?(s(),a("span",ai,"Acceptée par "+h(o.validation.histoCreateur.displayName),1)):u("",!0),!o.validation&&o.motif!==null?(s(),a("span",oi,h(o.motif),1)):u("",!0),!o.validation&&o.motif===null?(s(),a("span",li,"En attente d'acceptation")):u("",!0)]),this.canValiderCandidature?(s(),a("td",ui,[o.validation?u("",!0):(s(),a("a",{key:0,href:r.urlAccepterCandidature(o),class:"btn btn-success","data-content":"Êtes vous sûr de vouloir accepter cette candidature ?","data-title":"Accepter la candidature",title:"Accepter la candidature",onClick:t[0]||(t[0]=b((...f)=>r.validerCandidature&&r.validerCandidature(...f),["prevent"]))},"Accepter ",8,di)),c(" "),i("a",{href:r.urlRefuserCandidature(o),class:"btn btn-danger","data-content":"Êtes vous sûr de vouloir refuser cette candidature ?","data-title":"Refuser la candidature",title:"Refuser la candidature",onClick:t[1]||(t[1]=b((...f)=>r.refuserCandidature&&r.refuserCandidature(...f),["prevent"]))},"Refuser ",8,ci)])):u("",!0)]))),128))])]),i("a",{href:l.urlListeOffre,class:"btn btn-primary",title:"Voir les offres d'emploi"},[_(d,{name:"eye"}),c(" Voir toutes les offres d'emploi ")],8,mi),c(" ")])}const fi=x(Jt,[["render",hi]]),_i=Object.freeze(Object.defineProperty({__proto__:null,default:fi},Symbol.toStringTag,{value:"Module"})),vi={name:"OffreEmploi.vue",props:{offre:{required:!0},utilisateur:{required:!1},extended:{type:Boolean,required:!1},canModifier:{type:Boolean,required:!1},canPostuler:{type:Boolean,required:!1},canValider:{type:Boolean,required:!1},canSupprimer:{type:Boolean,required:!1},canVoirCandidature:{type:Boolean,required:!1},canValiderCandidature:{type:Boolean,required:!1}},data(){return{saisirUrl:unicaenVue.url("offre-emploi/saisir/:offre",{offre:this.offre.id}),supprimerUrl:unicaenVue.url("offre-emploi/supprimer/:offre",{offre:this.offre.id}),validerUrl:unicaenVue.url("offre-emploi/valider/:offre",{offre:this.offre.id}),devaliderUrl:unicaenVue.url("offre-emploi/devalider/:offre",{offre:this.offre.id}),consulterUrl:unicaenVue.url("offre-emploi/detail/:offre",{offre:this.offre.id}),offreEmploiUrl:unicaenVue.url("offre-emploi"),postulerUrl:unicaenVue.url("offre-emploi/postuler/:id",{id:this.offre.id})}},computed:{isCandidat:function(){return!1},shortDesc:function(){let e=this.offre.description.substr(0,200);return this.offre.description.length>200&&(e+="..."),e},descriptionHtml:function(){return this.offre.description.replace(/(?:\r\n|\r|\n)/g,"<br />")},connectionLink:function(){let e="auth/connexion?redirect="+window.location.href;return unicaenVue.url(e)}},methods:{saisir(e){modAjax(e.target,t=>{this.refresh()})},urlVoir:function(e){return unicaenVue.url("intervenant/:code/voir",{code:"code:"+e.intervenant.code})},urlAccepterCandidature:function(e){return unicaenVue.url("offre-emploi/accepter-candidature/:id",{id:e.id})},urlRefuserCandidature:function(e){return unicaenVue.url("offre-emploi/refuser-candidature/:id",{id:e.id})},refresh(){unicaenVue.axios.get(unicaenVue.url("offre-emploi/get/:offreEmploi",{offreEmploi:this.offre.id})).then(e=>{this.$emit("refresh",e.data)})},supprimer(e){popConfirm(e.target,t=>{this.$emit("supprimer",this.offre)})},postuler(e){popConfirm(e.target,t=>{this.$emit("postuler",this.offre)})},valider(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},devalider(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},validerCandidature(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},refuserCandidature(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})}}},pi={key:0,class:"col"},bi={class:"card h-100"},gi={class:"card-header"},yi={class:"badge rounded-pill bg-info"},xi={key:0,class:"badge rounded-pill bg-success"},Ci={key:1,class:"badge rounded-pill bg-warning"},Vi={class:"card-body"},ki={class:"bg-light",style:{padding:"5px"}},Si=i("b",null,"Créée le : ",-1),Mi=i("br",null,null,-1),Ti=i("b",null,"Période à pourvoir : ",-1),Di=i("br",null,null,-1),ji=i("b",null,"Demandée par la composante :",-1),wi=i("br",null,null,-1),Ui=i("b",null,"Type de mission :",-1),Ai={class:"card-footer"},Ri={class:"d-grid gap-2 d-md-flex justify-content-md-end"},Ei=["href"],Li={key:1},Oi={class:"page-header"},qi={key:0,class:"alert alert-primary d-flex align-items-center",role:"alert"},Hi=i("i",{class:"fa-solid fa-user"},null,-1),Pi={class:"ms-2"},$i=["href"],Fi={key:1,class:"alert alert-primary d-flex align-items-center",role:"alert"},Bi=i("i",{class:"fa-solid fa-circle-xmark"},null,-1),Ii=i("div",{class:"ms-2"}," Vous n'avez pas les droits pour postuler à cette offre, merci de contacter votre administration de rattachement. ",-1),Ni=[Bi,Ii],zi={key:2,class:"alert alert-primary d-flex align-items-center",role:"alert"},Yi=i("i",{class:"fa-solid fa-circle-xmark"},null,-1),Ji=i("div",{class:"ms-2"}," Vous avez déjà postulé à cette offre. ",-1),Qi=[Yi,Ji],Xi={class:"bg-light",style:{padding:"10px"}},Wi=i("b",null,"Créée le : ",-1),Gi=i("br",null,null,-1),Zi=i("b",null,"Période à pourvoir : ",-1),Ki=i("br",null,null,-1),en=i("b",null,"Date limite de candidature :",-1),tn=i("br",null,null,-1),nn=i("b",null,"Demandé par la composante :",-1),rn=i("br",null,null,-1),sn=i("b",null,"Type de mission :",-1),an=i("br",null,null,-1),on=i("b",null,"Nombre d'heures pour la mission :",-1),ln=i("br",null,null,-1),un=i("b",null,"Nombre de postes à pourvoir :",-1),dn=i("br",null,null,-1),cn=["innerHTML"],mn=i("br",null,null,-1),hn={key:3},fn=i("h5",null,[i("strong",null,"Liste des candidats :")],-1),_n={class:"table table-bordered"},vn=i("th",null,"Intervenant",-1),pn=i("th",null,"Etat",-1),bn={key:0},gn={key:0},yn={key:0,colspan:"4",style:{"text-align":"center"}},xn={key:1,colspan:"3",style:{"text-align":"center"}},Cn=["href"],Vn={key:0,class:"badge rounded-pill bg-success"},kn={key:1,class:"badge rounded-pill bg-danger"},Sn={key:2,class:"badge rounded-pill bg-warning"},Mn={key:0},Tn=["href"],Dn=["href"],jn={class:"mt-5"},wn=["href"],Un=["href"],An=["href"],Rn=["href"],En=["href"],Ln=["href"];function On(e,t,n,m,l,r){const d=w,o=M;return s(),a(g,null,[this.extended?u("",!0):(s(),a("div",pi,[i("div",bi,[i("div",gi,[i("h4",null,h(n.offre.titre),1),i("span",yi,h(n.offre.nombreHeures)+" heure(s)",1),c(" "),n.offre.validation?(s(),a("span",xi,[c("Validée le "),_(d,{value:n.offre.validation.histoCreation},null,8,["value"]),c(" par "+h(n.offre.validation.histoCreateur.displayName),1)])):u("",!0),n.offre.validation?u("",!0):(s(),a("span",Ci," En attente de validation par la DRH")),c(" ")]),i("div",Vi,[i("p",ki,[Si,_(d,{value:n.offre.histoCreation},null,8,["value"]),c(" par "+h(n.offre.histoCreateur.displayName),1),Mi,Ti,c("du "),_(d,{value:n.offre.dateDebut},null,8,["value"]),c(" au "),_(d,{value:n.offre.dateFin},null,8,["value"]),Di,ji,c(" "+h(n.offre.structure.libelleCourt)+" ",1),wi,Ui,c(" "+h(n.offre.typeMission.libelle),1)]),c(" "+h(r.shortDesc),1)]),i("div",Ai,[i("div",Ri,[i("a",{href:l.consulterUrl,class:"btn btn-primary",title:"Consulter "},[_(o,{name:"eye"}),c(" Voir ")],8,Ei)])])])])),this.extended?(s(),a("div",Li,[i("h1",Oi,h(n.offre.titre),1),this.utilisateur?u("",!0):(s(),a("div",qi,[Hi,i("div",Pi,[c(" Vous devez "),i("a",{href:r.connectionLink,class:"text-decoration-underline alert-link"},"être identifé",8,$i),c(" pour pouvoir postuler. ")])])),!n.offre.canPostuler&&this.utilisateur?(s(),a("div",Fi,Ni)):u("",!0),r.isCandidat&&this.utilisateur?(s(),a("div",zi,Qi)):u("",!0),i("p",Xi,[Wi,_(d,{value:n.offre.histoCreation},null,8,["value"]),c(" par "+h(n.offre.histoCreateur.displayName),1),Gi,Zi,c("du "),_(d,{value:n.offre.dateDebut},null,8,["value"]),c(" au "),_(d,{value:n.offre.dateFin},null,8,["value"]),Ki,en,_(d,{value:n.offre.dateLimite},null,8,["value"]),tn,nn,c(" "+h(n.offre.structure.libelleCourt)+" ",1),rn,sn,c(" "+h(n.offre.typeMission.libelle)+" ",1),an,on,c(" "+h(n.offre.nombreHeures)+" heure(s) ",1),ln,un,c(" "+h(n.offre.nombrePostes)+" poste(s) ",1),dn]),i("p",{innerHTML:r.descriptionHtml},null,8,cn),mn,this.canValiderCandidature?(s(),a("div",hn,[fn,i("table",_n,[i("thead",null,[i("tr",null,[vn,pn,n.canValiderCandidature?(s(),a("th",bn,"Action")):u("",!0)])]),i("tbody",null,[n.offre.candidatures.length==0?(s(),a("tr",gn,[n.canValiderCandidature?(s(),a("td",yn,"Aucune candidature")):u("",!0),n.canValiderCandidature?u("",!0):(s(),a("td",xn,"Aucune candidature"))])):u("",!0),(s(!0),a(g,null,y(n.offre.candidatures,f=>(s(),a("tr",null,[i("td",null,[i("a",{href:r.urlVoir(f)},h(f.intervenant.prenom+" "+f.intervenant.nomUsuel),9,Cn)]),i("td",null,[f.validation?(s(),a("span",Vn,[c("Acceptée le "),_(d,{value:f.validation.histoCreation},null,8,["value"]),c(" par "+h(f.validation.histoCreateur.displayName),1)])):u("",!0),!f.validation&&f.motif!==null?(s(),a("span",kn,h(f.motif),1)):u("",!0),!f.validation&&f.motif===null?(s(),a("span",Sn,"En attente d'acceptation")):u("",!0)]),this.canValiderCandidature?(s(),a("td",Mn,[f.validation?u("",!0):(s(),a("a",{key:0,href:r.urlAccepterCandidature(f),class:"btn btn-success","data-content":"Êtes vous sûr de vouloir accepter cette candidature ?","data-title":"Accepter la candidature",title:"Accepter la candidature",onClick:t[0]||(t[0]=b((...C)=>r.validerCandidature&&r.validerCandidature(...C),["prevent"]))},"Accepter ",8,Tn)),c(" "),!f.motif&&f.validation?(s(),a("a",{key:1,href:r.urlRefuserCandidature(f),class:"btn btn-danger","data-content":"Êtes vous sûr de vouloir refuser cette candidature ?","data-title":"Refuser la candidature",title:"Refuser la candidature",onClick:t[1]||(t[1]=b((...C)=>r.refuserCandidature&&r.refuserCandidature(...C),["prevent"]))},"Refuser ",8,Dn)):u("",!0)])):u("",!0)]))),256))])])])):u("",!0),i("div",jn,[i("a",{href:l.offreEmploiUrl,class:"btn btn-secondary"},"Retour aux offres",8,wn),c(" "),this.canPostuler?(s(),a("a",{key:0,href:l.postulerUrl,class:"btn btn-primary","data-bs-original-title":"Vous devez être connecté pour postuler","data-bs-placement":"top","data-bs-toggle":"tooltip"},"Postuler",8,Un)):u("",!0),c(" "),n.offre.canModifier?(s(),a("a",{key:1,href:l.saisirUrl,class:"btn btn-primary",title:"Modifier",onClick:t[2]||(t[2]=b((...f)=>r.saisir&&r.saisir(...f),["prevent"]))},[_(o,{name:"pen-to-square"}),c(" Modifier ")],8,An)):u("",!0),c(" "),n.offre.validation&&n.offre.canValider?(s(),a("a",{key:2,href:l.devaliderUrl,class:"btn btn-danger",title:"Devalider",onClick:t[3]||(t[3]=b((...f)=>r.devalider&&r.devalider(...f),["prevent"]))},[_(o,{name:"thumbs-down"}),c(" Devalider ")],8,Rn)):u("",!0),c(" "),!n.offre.validation&&n.offre.canValider?(s(),a("a",{key:3,href:l.validerUrl,class:"btn btn-success",title:"Valider",onClick:t[4]||(t[4]=b((...f)=>r.valider&&r.valider(...f),["prevent"]))},[_(o,{name:"thumbs-up"}),c(" Valider ")],8,En)):u("",!0),c(" "),n.offre.canSupprimer?(s(),a("a",{key:4,href:l.supprimerUrl,class:"btn btn-danger","data-content":"Êtes-vous sur de vouloir supprimer l'offre ?","data-title":"Suppression de l'offre",title:"Supprimer",onClick:t[5]||(t[5]=b((...f)=>r.supprimer&&r.supprimer(...f),["prevent"]))},[_(o,{name:"trash"}),c(" Supprimer ")],8,Ln)):u("",!0)])])):u("",!0)],64)}const P=x(vi,[["render",On]]),qn=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"})),Hn={components:{offreEmploi:P},props:{id:{type:Number,required:!1},utilisateur:{required:!1},canModifier:{type:Boolean,required:!1},canPostuler:{type:Boolean,required:!1},canValider:{type:Boolean,required:!1},canVoirCandidature:{type:Boolean,required:!1},canValiderCandidature:{type:Boolean,required:!1},canSupprimer:{type:Boolean,required:!1}},data(){return{offres:[],ajoutUrl:unicaenVue.url("offre-emploi/saisir")}},mounted(){this.reload()},computed:{extended:function(){return!!this.id}},methods:{ajout(e){modAjax(e.target,t=>{this.reload()})},supprimer(){window.location.href=unicaenVue.url("offre-emploi")},refresh(e){let t=Util.json.indexById(this.offres,e.id);this.offres[t]=e},reload(){this.id?unicaenVue.axios.get(unicaenVue.url("offre-emploi/get/:offreEmploi",{offreEmploi:this.id})).then(e=>{this.offres=[e.data]}):unicaenVue.axios.get(unicaenVue.url("offre-emploi/liste")).then(e=>{this.offres=e.data})}}},Pn={key:0,class:"row row-cols-1 row-cols-md-2 g-4 mb-3"},$n={key:1},Fn=["href"],Bn={key:2};function In(e,t,n,m,l,r){const d=S("offreEmploi");return s(),a(g,null,[r.extended?u("",!0):(s(),a("div",Pn,[(s(!0),a(g,null,y(l.offres,o=>(s(),k(d,{key:o.id,canModifier:this.canModifier,canSupprimer:this.canSupprimer,canValider:this.canValider,canVoirCandidature:this.canVoirCandidature,offre:o,onRefresh:r.refresh,onSupprimer:r.supprimer},null,8,["canModifier","canSupprimer","canValider","canVoirCandidature","offre","onRefresh","onSupprimer"]))),128))])),r.extended?u("",!0):(s(),a("div",$n,[this.canModifier?(s(),a("a",{key:0,href:l.ajoutUrl,class:"btn btn-primary",onClick:t[0]||(t[0]=b((...o)=>r.ajout&&r.ajout(...o),["prevent"]))},"Ajouter une nouvelle offre",8,Fn)):u("",!0)])),r.extended?(s(),a("div",Bn,[(s(!0),a(g,null,y(l.offres,o=>(s(),k(d,{key:o.id,canModifier:this.canModifier,canPostuler:this.canPostuler,canSupprimer:this.canSupprimer,canValider:this.canValider,canValiderCandidature:this.canValiderCandidature,canVoirCandidature:this.canVoirCandidature,extended:r.extended,offre:o,utilisateur:this.utilisateur,onRefresh:r.refresh,onSupprimer:r.supprimer},null,8,["canModifier","canPostuler","canSupprimer","canValider","canValiderCandidature","canVoirCandidature","extended","offre","utilisateur","onRefresh","onSupprimer"]))),128))])):u("",!0)],64)}const Nn=x(Hn,[["render",In]]),zn=Object.freeze(Object.defineProperty({__proto__:null,default:Nn},Symbol.toStringTag,{value:"Module"}));const Yn={name:"UCalendar",props:{date:{type:Date,required:!0},events:{type:Array,required:!0},canAddEvent:{type:Boolean,required:!0,default:!0},addDateDebut:{type:String,required:!1},addDateFin:{type:String,required:!1}},data(){const e=new Date(this.date);return{mois:e.getMonth()+1,annee:e.getFullYear()}},computed:{listeJours(){const e=new Date(this.date);e.setDate(1),e.setMonth(e.getMonth()+1),e.setDate(e.getDate()-1);let t=e.getDate();return Array.from({length:t},(n,m)=>m+1)}},watch:{date:function(e,t){const n=new Date(this.date);this.mois=n.getMonth()+1,this.annee=n.getFullYear()},mois:function(e,t){const n=new Date(this.date);n.setMonth(e-1),this.$emit("changeDate",n)},annee:function(e,t){const n=new Date(this.date);n.setFullYear(e),this.$emit("changeDate",n)}},methods:{nomJour(e){const t=new Date(this.date);return t.setDate(e),t.toLocaleString("fr-FR",{weekday:"short"})},listeMois(){let e=[];const t=new Date;for(let n=1;n<=12;n++){t.setMonth(n-1);let m=t.toLocaleString("fr-FR",{month:"long"});e.push({id:n,libelle:m})}return e},listeAnnees(){const t=new Date().getFullYear(),n=1;let m=[];for(let l=t-n;l<=t+n;l++)m.push(l);return m},canAdd(e){if(!this.canAddEvent)return!1;let t=this.addDateDebut;t===void 0?t=new Date("2000-01-01"):t==="now"?t=new Date:t=new Date(t);let n=this.addDateFin;n===void 0?n=new Date("2500-01-01"):n==="now"?n=new Date:n=new Date(n);let m=new Date(this.date);return m.setDate(e),t=this.isoDateOnly(t),n=this.isoDateOnly(n),m=this.isoDateOnly(m),!(m<t||m>n)},addEvent(e){const t=new Date(this.date);t.setDate(e.currentTarget.dataset.jour),this.$emit("addEvent",t,e)},prevMois(){const e=new Date(this.date);e.setMonth(e.getMonth()-1),this.$emit("changeDate",e)},nextMois(){const e=new Date(this.date);e.setMonth(e.getMonth()+1),this.$emit("changeDate",e)},eventsByJour(e){const t=new Date(this.date);let n={};for(let m in this.events){let l=this.events[m];l.date.getFullYear()===t.getFullYear()&&l.date.getMonth()+1===t.getMonth()+1&&l.date.getDate()===e&&(n[m]=l)}return n},isoDateOnly(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),m=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${m}`}}},Jn={class:"calendar"},Qn={class:"recherche"},Xn={class:"recherche btn-group"},Wn=["value"],Gn=["value"],Zn={class:"table table-bordered table-hover table-sm"},Kn=["data-jour"],er={class:"nom-jour"},tr={class:"numero-jour"},ir={class:"num-jour badge bg-secondary rounded-circle"},nr={key:0},rr=["data-jour"];function sr(e,t,n,m,l,r){const d=M;return s(),a("div",Jn,[i("div",Qn,[i("div",Xn,[i("button",{class:"btn btn-light",id:"prevMois",onClick:t[0]||(t[0]=(...o)=>r.prevMois&&r.prevMois(...o)),title:"Mois précédant"},[_(d,{name:"chevron-left"})]),D(i("select",{class:"form-select btn btn-light",id:"otherMois","onUpdate:modelValue":t[1]||(t[1]=o=>l.mois=o)},[(s(!0),a(g,null,y(r.listeMois(),o=>(s(),a("option",{value:o.id},h(o.libelle),9,Wn))),256))],512),[[q,l.mois]]),D(i("select",{class:"form-select btn btn-light",id:"otherAnnee","onUpdate:modelValue":t[2]||(t[2]=o=>l.annee=o)},[(s(!0),a(g,null,y(r.listeAnnees(),o=>(s(),a("option",{value:o},h(o),9,Gn))),256))],512),[[q,l.annee]]),i("button",{class:"btn btn-light",id:"nextMois",onClick:t[3]||(t[3]=(...o)=>r.nextMois&&r.nextMois(...o)),title:"Mois suivant"},[_(d,{name:"chevron-right"})])])]),i("table",Zn,[(s(!0),a(g,null,y(r.listeJours,o=>(s(),a("tr",{"data-jour":o},[i("th",er,h(r.nomJour(o)),1),i("th",tr,[i("div",ir,h(o<10?"0"+o.toString():o),1)]),i("td",null,[(s(!0),a(g,null,y(r.eventsByJour(o),(f,C)=>(s(),a("div",{class:"event",style:Y("border-color:"+f.color+";background-color:"+f.bgcolor),key:C},[(s(),k(J(f.component),{event:f},null,8,["event"]))],4))),128)),r.canAdd(o)?(s(),a("div",nr,[i("button",{onClick:t[4]||(t[4]=(...f)=>r.addEvent&&r.addEvent(...f)),"data-jour":o,class:"btn btn-light btn-sm"},[_(d,{name:"plus"}),c(" Nouvel événement ")],8,rr)])):u("",!0)])],8,Kn))),256))])])}const ar=x(Yn,[["render",sr],["__scopeId","data-v-51bbc42d"]]);const or={name:"SuiviEvent",props:{event:{type:Object,required:!0}},data(){return{suivi:this.$parent.$parent,modifierUrl:unicaenVue.url("mission/suivi/modifier/:id",{id:this.event.id}),supprimerUrl:unicaenVue.url("mission/suivi/supprimer/:id",{id:this.event.id}),validerUrl:unicaenVue.url("mission/suivi/valider/:id",{id:this.event.id}),devaliderUrl:unicaenVue.url("mission/suivi/devalider/:id",{id:this.event.id})}},computed:{heureDebut(){return this.event.heureDebut.toString().replace(":","h")},heureFin(){return this.event.heureFin.toString().replace(":","h")},heures(){return Util.floatToString(this.event.heures)}},methods:{modifier(e){modAjax(e.currentTarget,t=>{this.suivi.refresh()})},supprimer(e){popConfirm(e.currentTarget,t=>{this.suivi.refresh()})},valider(e){unicaenVue.axios.get(this.validerUrl).then(t=>{this.suivi.refresh()})},devalider(e){popConfirm(e.currentTarget,t=>{this.suivi.refresh()})}}},lr={class:"event-content"},ur={class:"mission"},dr={key:0,class:"badge bg-success"},cr={class:"horaires"},mr={key:0,class:"badge bg-secondary"},hr={key:0,class:"description"},fr={class:"event-actions"},_r={class:"btn-group btn-group-sm"},vr=["data-url"],pr=["data-url"],br=["data-url"],gr=["data-url"];function yr(e,t,n,m,l,r){const d=M;return s(),a(g,null,[i("div",lr,[i("p",ur,[c(h(n.event.mission.libelleCourt)+" ",1),n.event.valide?(s(),a("span",dr,"Validé")):u("",!0)]),i("p",cr,[c(" de "+h(r.heureDebut)+" à "+h(r.heureFin)+", soit "+h(r.heures)+" heure"+h(r.heures<2?"":"s")+" ",1),n.event.formation?(s(),a("span",mr,"En formation")):u("",!0)]),n.event.description?(s(),a("p",hr,h(n.event.description),1)):u("",!0)]),i("div",fr,[i("div",_r,[n.event.canEdit?(s(),a("button",{key:0,class:"btn btn-light",onClick:t[0]||(t[0]=(...o)=>r.modifier&&r.modifier(...o)),title:"Modifier le suivi","data-url":l.modifierUrl},[_(d,{name:"pen-to-square"})],8,vr)):u("",!0),n.event.canValider?(s(),a("button",{key:1,class:"btn btn-light",onClick:t[1]||(t[1]=(...o)=>r.valider&&r.valider(...o)),title:"Valider le suivi","data-url":l.validerUrl},[_(d,{name:"check",class:"text-success"})],8,pr)):u("",!0),n.event.canDevalider?(s(),a("button",{key:2,class:"btn btn-light",onClick:t[2]||(t[2]=(...o)=>r.devalider&&r.devalider(...o)),title:"Dévalider le suivi","data-url":l.devaliderUrl,"data-content":"Voulez-vous vraiment dévalider ce suivi ?"},[_(d,{name:"xmark",class:"text-danger"})],8,br)):u("",!0),n.event.canSupprimer?(s(),a("button",{key:3,class:"btn btn-light",onClick:t[3]||(t[3]=(...o)=>r.supprimer&&r.supprimer(...o)),title:"Supprimer le suivi","data-url":l.supprimerUrl,"data-content":"Voulez-vous vraiment supprimer ce suivi ?"},[_(d,{name:"trash-can",class:"text-danger"})],8,gr)):u("",!0)])])],64)}const F=x(or,[["render",yr],["__scopeId","data-v-17cb1f29"]]),xr=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),Cr={name:"Suivi",props:{intervenant:{type:Number,required:!0},canAddMission:{type:Boolean,required:!0}},mounted(){this.refresh()},data(){return{date:new Date,isMounted:!1,suivi:[]}},methods:{changeDate(e){this.date=e},ajouter(e,t){const n={intervenant:this.intervenant,date:e.toISOString().slice(0,10)};t.currentTarget.dataset.url=unicaenVue.url("mission/suivi/ajout/:intervenant/:date",n),modAjax(t.currentTarget,m=>{this.refresh()})},refresh(){const e=["#e74c3c","#8e44ad","#3498db","#1abc9c","#2ecc71","#f1c40f","#e67e22","#d35400"];let t=0,n=[];unicaenVue.axios.get(unicaenVue.url("mission/suivi/liste/:intervenant",{intervenant:this.intervenant})).then(m=>{let l=[];for(let r in m.data){let d=m.data[r];n[d.mission.id]===void 0&&(n[d.mission.id]=e[t],t++),d.valide&&(d.bgcolor="#d0eddb"),d.color=n[d.mission.id],d.component=Q(F),d.date=new Date(d.date),d.intervenant=this.intervenant,l.push(d)}this.suivi=l,this.refreshPlafonds()})},refreshPlafonds(){this.isMounted?$(".plafonds").refresh():this.isMounted=!0}}};function Vr(e,t,n,m,l,r){const d=ar;return s(),k(d,{date:l.date,onChangeDate:r.changeDate,onAddEvent:r.ajouter,"can-add-event":n.canAddMission,addDateFin:"now",events:l.suivi},null,8,["date","onChangeDate","onAddEvent","can-add-event","events"])}const kr=x(Cr,[["render",Vr]]),Sr=Object.freeze(Object.defineProperty({__proto__:null,default:kr},Symbol.toStringTag,{value:"Module"})),Mr={name:"Taux",props:{taux:{required:!0},listeTaux:{required:!0}},data(){return{saisieUrl:unicaenVue.url("taux/saisir/:tauxRemu",{tauxRemu:this.taux.id}),supprimerUrl:unicaenVue.url("taux/supprimer/:tauxRemu",{tauxRemu:this.taux.id}),ajoutValeurUrl:unicaenVue.url("taux/saisir-valeur/:tauxRemu",{tauxRemu:this.taux.id})}},methods:{saisie(e){modAjax(e.target,t=>{this.$emit("refreshListe")})},ajoutValeur(e){modAjax(e.target,t=>{this.$emit("refreshListe")})},saisieValeur(e){e.currentTarget.href=unicaenVue.url("taux/saisir-valeur/:tauxRemu/:tauxRemuValeur",{tauxRemu:this.taux.id,tauxRemuValeur:e.currentTarget.dataset.id}),modAjax(e.currentTarget,t=>{this.$emit("refreshListe")})},refreshListe(e){this.$emit("refreshListe")},supprimer(e){popConfirm(e.target,t=>{this.$emit("refreshListe")})},supprimerValeur(e){e.currentTarget.href=unicaenVue.url("taux/supprimer-valeur/:tauxRemuValeur",{tauxRemuValeur:e.currentTarget.dataset.id}),popConfirm(e.currentTarget,t=>{this.$emit("refreshListe")})},refresh(e){unicaenVue.axios.get(unicaenVue.url("taux/get/:tauxRemu",{tauxRemu:e.id})).then(t=>{this.$emit("refresh",t.data)})}}},Tr={class:"card-header"},Dr={style:{display:"inline"}},jr={class:"float-end"},wr=["href"],Ur=["href"],Ar={class:"card-body"},Rr={key:0},Er=i("br",null,null,-1),Lr={class:""},Or={class:"row align-items-start"},qr={class:"col-md-6"},Hr={class:"col"},Pr=["data-id"],$r=["data-id"],Fr=["href"],Br={key:1,class:"row"},Ir={class:"col-md-7"},Nr=i("br",null,null,-1),zr={class:"row align-items-start"},Yr={class:"col-md-8"},Jr={class:"col-md-auto"},Qr=["data-id"],Xr=["data-id"],Wr=["href"],Gr={class:"col"},Zr=i("br",null,null,-1),Kr={key:0},es={key:0};function ts(e,t,n,m,l,r){const d=M,o=S("u-heures"),f=w,C=S("taux",!0);return s(),a(g,null,[i("div",{class:j(["card",{"ms-5":n.taux.tauxRemu}])},[i("div",Tr,[i("h3",Dr,h(n.taux.libelle)+" ("+h(n.taux.code)+")",1),i("div",jr,[n.taux.canEdit?(s(),a("a",{key:0,href:l.saisieUrl,class:"btn btn-primary",onClick:t[0]||(t[0]=b((...p)=>r.saisie&&r.saisie(...p),["prevent"]))},[_(d,{name:"pen-to-square"}),c(" Modifier")],8,wr)):u("",!0),c(" "),n.taux.canDelete?(s(),a("a",{key:1,href:l.supprimerUrl,class:"btn btn-danger",onClick:t[1]||(t[1]=b((...p)=>r.supprimer&&r.supprimer(...p),["prevent"]))},[_(d,{name:"trash-can"}),c(" Supprimer")],8,Ur)):u("",!0)])]),i("div",Ar,[n.taux.tauxRemu?u("",!0):(s(),a("div",Rr,[c(" Modification :"),Er,i("ul",null,[(s(!0),a(g,null,y(n.taux.tauxRemuValeurs,p=>(s(),a("div",{key:p.id},[i("li",Lr,[i("div",Or,[i("div",qr,[_(o,{valeur:p.valeur},null,8,["valeur"]),c("€/h à partir du "),_(f,{value:p.dateEffet},null,8,["value"])]),i("div",Hr,[n.taux.canEdit?(s(),a("a",{key:0,class:"text-primary",onClick:t[2]||(t[2]=b((...v)=>r.saisieValeur&&r.saisieValeur(...v),["prevent"])),"data-id":p.id},[_(d,{name:"pen-to-square"})],8,Pr)):u("",!0),c(" "),n.taux.canEdit?(s(),a("a",{key:1,class:"text-primary",onClick:t[3]||(t[3]=b((...v)=>r.supprimerValeur&&r.supprimerValeur(...v),["prevent"])),"data-id":p.id},[_(d,{name:"trash-can"})],8,$r)):u("",!0)])])])]))),128))]),n.taux.canEdit?(s(),a("a",{key:0,href:l.ajoutValeurUrl,class:"btn btn-primary btn-sm",onClick:t[4]||(t[4]=b((...p)=>r.ajoutValeur&&r.ajoutValeur(...p),["prevent"]))},[_(d,{name:"plus"}),c(" Ajouter une valeur ")],8,Fr)):u("",!0)])),n.taux.tauxRemu?(s(),a("div",Br,[i("div",Ir,[c(" Modification :"),Nr,i("ul",null,[(s(!0),a(g,null,y(n.taux.tauxRemuValeurs,p=>(s(),a("div",null,[i("li",null,[i("div",zr,[i("div",Yr,[c(" Coéfficient de "),_(o,{valeur:p.valeur},null,8,["valeur"]),c(" à partir du "),_(f,{value:p.dateEffet},null,8,["value"])]),i("div",Jr,[n.taux.canEdit?(s(),a("a",{key:0,class:"text-primary",onClick:t[5]||(t[5]=b((...v)=>r.saisieValeur&&r.saisieValeur(...v),["prevent"])),"data-id":p.id},[_(d,{name:"pen-to-square"})],8,Qr)):u("",!0),c(" "),n.taux.canEdit?(s(),a("a",{key:1,class:"text-primary",onClick:t[6]||(t[6]=b((...v)=>r.supprimerValeur&&r.supprimerValeur(...v),["prevent"])),"data-id":p.id},[_(d,{name:"trash-can"})],8,Xr)):u("",!0)])])])]))),256))]),n.taux.canEdit?(s(),a("a",{key:0,href:l.ajoutValeurUrl,class:"btn btn-primary btn-sm",onClick:t[7]||(t[7]=b((...p)=>r.ajoutValeur&&r.ajoutValeur(...p),["prevent"]))},[_(d,{name:"plus"})],8,Wr)):u("",!0)]),i("div",Gr,[c(" Valeurs calculées (indexées sur le taux "+h(n.taux.tauxRemu.libelle)+") : ",1),i("ul",null,[(s(!0),a(g,null,y(n.taux.tauxRemuValeursIndex,p=>(s(),a("div",null,[i("li",null,[_(o,{valeur:p.valeur},null,8,["valeur"]),c("€/h à partir du "),_(f,{value:p.date},null,8,["value"])])]))),256))]),Zr])])):u("",!0)])],2),n.taux.tauxRemu?u("",!0):(s(),a("div",Kr,[(s(!0),a(g,null,y(n.listeTaux,p=>(s(),a("div",{key:p},[p.tauxRemu&&p.tauxRemu.id===n.taux.id?(s(),a("div",es,[(s(),k(C,{onSupprimer:r.supprimer,onRefreshListe:r.refreshListe,key:n.taux.id,taux:p,listeTaux:n.listeTaux},null,8,["onSupprimer","onRefreshListe","taux","listeTaux"]))])):u("",!0)]))),128))]))],64)}const B=x(Mr,[["render",ts]]),is=Object.freeze(Object.defineProperty({__proto__:null,default:B},Symbol.toStringTag,{value:"Module"})),rs={components:{taux:B},props:{canEditTaux:{type:Boolean,required:!0}},data(){return{listeTaux:[],ajoutUrl:unicaenVue.url("taux/saisir")}},mounted(){this.reload()},methods:{ajout(e){modAjax(e.currentTarget,t=>{this.reload()})},supprimer(){this.reload()},refreshListe(){this.reload()},refresh(e){let t=Util.json.indexById(this.listeTaux,e.id);this.listeTaux[t]=e},reload(){unicaenVue.axios.get(unicaenVue.url("taux/liste-taux")).then(e=>{this.listeTaux=e.data})}}},ss=["href"];function as(e,t,n,m,l,r){const d=S("taux");return s(),a(g,null,[(s(!0),a(g,null,y(l.listeTaux,o=>(s(),a("div",null,[o.tauxRemu?u("",!0):(s(),k(d,{onSupprimer:r.supprimer,onRefreshListe:r.refreshListe,key:o.id,taux:o,listeTaux:l.listeTaux},null,8,["onSupprimer","onRefreshListe","taux","listeTaux"]))]))),256)),n.canEditTaux?(s(),a("a",{key:0,class:"btn btn-primary",href:l.ajoutUrl,onClick:t[0]||(t[0]=b((...o)=>r.ajout&&r.ajout(...o),["prevent"]))},"Ajout d'un nouveau taux",8,ss)):u("",!0)],64)}const os=x(rs,[["render",as]]),ls=Object.freeze(Object.defineProperty({__proto__:null,default:os},Symbol.toStringTag,{value:"Module"})),us={UHeures:"Application/UI/UHeures",Utilisateur:"Application/Utilisateur"};function ds(e){for(let t in e)for(let n in e[t])I(e[t][n],t)}function cs(){let e=document.getElementById("unicaen-vue-toast-container");return e||(e=document.createElement("div"),e.id="unicaen-vue-toast-container",e.classList.add("toast-container","position-fixed","top-0","end-0","p-3"),document.body.appendChild(e)),e}function ms(e){return e=hs(e),e=fs(e),e}function hs(e){const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector(".alert");return n?n.innerHTML:t.innerHTML}function fs(e){const t=document.createElement("div");return t.innerHTML=e,t.querySelectorAll("i.fas").forEach(m=>m.style.display="none"),t.innerHTML}function I(e,t){const n={info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-danger"},m={info:"info-circle",success:"check-circle",warning:"exclamation-circle",error:"exclamation-triangle"},l=document.createElement("button");l.classList.add("btn-close","btn-close-white","h5"),l.style.float="right",l.setAttribute("data-bs-dismiss","toast"),l.setAttribute("aria-label","Close");const r=document.createElement("i");r.classList.add("icon","fas",`fa-${m[t]}`),r.style.float="left",r.style.fontSize="26pt",r.style.paddingLeft=".4rem",r.style.marginTop=".4rem",r.style.paddingRight="1rem";const d=document.createElement("div");d.classList.add("toast-body"),d.innerHTML=ms(e);const o=document.createElement("div");o.appendChild(l),o.appendChild(r),o.appendChild(d);const f=document.createElement("div");f.classList.add("toast","text-white",n[t]?n[t]:"bg-secondary"),f.setAttribute("role","alert"),f.setAttribute("aria-live","assertive"),f.setAttribute("aria-atomic","true"),t==="error"&&e.length>500&&f.setAttribute("style","width:700px"),f.appendChild(o),cs().appendChild(f);const C={animation:!0,delay:t==="warning"?15e3:5e3,autohide:t!=="error"};new bootstrap.Toast(f,C).show()}const R={toast:I,toasts:ds};let U={...X};U.interceptors.request.use(e=>{if(e.submitter){let t=e.msg?e.msg:"Action en cours";e.popover!=null&&e.popover.dispose(),e.popover=new bootstrap.Popover(e.submitter,{content:`<div class="spinner-border text-primary" role="status">
- <span class="visually-hidden">Loading...</span>
-</div> `+t,html:!0,trigger:"focus"}),e.popover.show()}return e});U.interceptors.response.use(e=>{if(e.messages=e.data.messages,e.data=e.data.data,e.hasErrors=!!(e.messages&&e.messages.error&&e.messages.error.length>0),e.config.popover){var t=e.config.popover;let n="";for(ns in e.messages)for(mid in e.messages[ns])n+='<div class="alert fade show alert-'+(ns=="error"?"danger":ns)+'" role="alert">'+e.messages[ns][mid]+"</div>";n?(t._config.content=n,t.setContent(),setTimeout(()=>{t.dispose()},5e3)):t.dispose()}return e.messages&&R.toasts(e.messages),e},e=>{let t=e.response.data;e.response.status==403?t="<h4>403 - Accès interdit</h4><br />Vous n'êtes pas autorisé(e) à faire cette action.":t=e.response.data,R.toast(t,"error")});U.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const _s={uvAxios:U},E={axios:_s.uvAxios,flashMessenger:R,url:(e,t,n)=>{let m=window.__unicaenVueBaseUrl;if(t)for(let r in t)e=e.replace(`:${r}`,t[r]);let l=n?E.encodeUrlQueryParam(n):null;return m+e+(l?`?${l}`:"")},encodeUrlQueryParam:(e,t)=>{var n=[];for(var m in e)if(e.hasOwnProperty(m)){var l=e[m],r=t?t+"["+encodeURIComponent(m)+"]":encodeURIComponent(m);if(typeof l=="object"&&l!==null)n.push(E.encodeUrlQueryParam(l,r));else{var d=encodeURIComponent(l);n.push(r+"="+d)}}return n.join("&")}};window.unicaenVue=E;function vs(e,t){const n={};t===void 0&&(t={});for(const m in e){let r=m.slice(2,-4).replace("/","");n[r]=e[m].default}for(const m of document.getElementsByClassName("vue-app")){let l=W({template:m.innerHTML,components:n});if(t.beforeMount!==void 0&&t.beforeMount(l),t.autoloads!==void 0)for(const r in t.autoloads){let d=t.autoloads[r].replace("/","");l.component(r,n[d])}l.mount(m),t.afterMount!==void 0&&t.afterMount(l)}}const ps={init:vs},bs=Object.assign({"./Application/UI/UHeures.vue":te,"./Application/Utilisateur.vue":ae,"./Intervenant/Recherche.vue":De,"./Mission/Liste.vue":Yt,"./Mission/ListeCandidatures.vue":_i,"./Mission/ListeOffreEmploi.vue":zn,"./Mission/Mission.vue":Ft,"./Mission/OffreEmploi.vue":qn,"./Mission/Suivi.vue":Sr,"./Mission/SuiviEvent.vue":xr,"./Paiement/ListeTaux.vue":ls,"./Paiement/Taux.vue":is}),gs={autoloads:us};ps.init(bs,gs);
diff --git a/public/dist/assets/main-60550d9c.css b/public/dist/assets/main-4e3d9e0c.css
similarity index 89%
rename from public/dist/assets/main-60550d9c.css
rename to public/dist/assets/main-4e3d9e0c.css
index 6b92365702c019a2470209ece1565bc531c410f4..36b2b3238de3b7308fb33c1908c3f9f7955a1ff9 100644
--- a/public/dist/assets/main-60550d9c.css
+++ b/public/dist/assets/main-4e3d9e0c.css
@@ -1 +1 @@
-.card-header h5[data-v-27267625]{font-weight:500}.btn[data-v-27267625]{margin-left:2px;margin-right:2px}.table tr[data-v-51bbc42d]{background-color:#f4f4f4;border-left:1px #ddd solid;border-right:1px #ddd solid}.table-hover tr[data-v-51bbc42d]:hover{background-color:#f7f7f7}.recherche[data-v-51bbc42d]{text-align:center}.recherche .btn-group[data-v-51bbc42d]{box-shadow:none;margin:auto}.recherche select.btn[data-v-51bbc42d]{padding-right:3em}th.nom-jour[data-v-51bbc42d]{width:1%;padding-left:3px}th.numero-jour[data-v-51bbc42d]{width:1%;padding-right:.5em}.recherche[data-v-51bbc42d]{justify-content:center;padding-bottom:5px}.event[data-v-51bbc42d]{display:flex;justify-content:space-between;align-items:center;margin-bottom:3px;border-left:10px #bbb solid;border-right:10px #bbb solid}.event[data-v-51bbc42d]:hover{background-color:#fff}.event-content[data-v-17cb1f29]{flex-grow:1}.event-content.valide[data-v-17cb1f29]{background-color:#ff0}.event-content p[data-v-17cb1f29]{margin-bottom:.2rem}.event-content p.mission[data-v-17cb1f29]{font-weight:700}.event-content p.horaires[data-v-17cb1f29]{font-style:italic;font-weight:lighter}.event-actions[data-v-17cb1f29]{align-self:flex-start}
+.card-header h5[data-v-1735108d]{font-weight:500}.btn[data-v-1735108d]{margin-left:2px;margin-right:2px}.table tr[data-v-51bbc42d]{background-color:#f4f4f4;border-left:1px #ddd solid;border-right:1px #ddd solid}.table-hover tr[data-v-51bbc42d]:hover{background-color:#f7f7f7}.recherche[data-v-51bbc42d]{text-align:center}.recherche .btn-group[data-v-51bbc42d]{box-shadow:none;margin:auto}.recherche select.btn[data-v-51bbc42d]{padding-right:3em}th.nom-jour[data-v-51bbc42d]{width:1%;padding-left:3px}th.numero-jour[data-v-51bbc42d]{width:1%;padding-right:.5em}.recherche[data-v-51bbc42d]{justify-content:center;padding-bottom:5px}.event[data-v-51bbc42d]{display:flex;justify-content:space-between;align-items:center;margin-bottom:3px;border-left:10px #bbb solid;border-right:10px #bbb solid}.event[data-v-51bbc42d]:hover{background-color:#fff}.event-content[data-v-17cb1f29]{flex-grow:1}.event-content.valide[data-v-17cb1f29]{background-color:#ff0}.event-content p[data-v-17cb1f29]{margin-bottom:.2rem}.event-content p.mission[data-v-17cb1f29]{font-weight:700}.event-content p.horaires[data-v-17cb1f29]{font-style:italic;font-weight:lighter}.event-actions[data-v-17cb1f29]{align-self:flex-start}
diff --git a/public/dist/assets/main-ea1c4ffa.js b/public/dist/assets/main-ea1c4ffa.js
new file mode 100644
index 0000000000000000000000000000000000000000..994b7d5ff02b6a6379821ebf7bacb566be1c5a46
--- /dev/null
+++ b/public/dist/assets/main-ea1c4ffa.js
@@ -0,0 +1,3 @@
+import{c as a,o as r,t as h,a as i,w as D,v as A,b as c,F as g,r as y,d as u,n as j,e as _,f as L,g as b,h as k,i as O,j as S,p as N,k as z,l as q,m as Y,q as J,s as Q,u as X,x as W}from"./vendor-aed55673.js";const x=(e,t)=>{const n=e.__vccOpts||e;for(const[m,l]of t)n[m]=l;return n},G={props:{valeur:{required:!0,type:Number}},computed:{affichage:function(){return Util.formattedHeures(this.valeur,!0)}}},Z=["innerHTML"];function K(e,t,n,m,l,s){return r(),a("span",{class:"heures",innerHTML:s.affichage},null,8,Z)}const ee=x(G,[["render",K]]),te=Object.freeze(Object.defineProperty({__proto__:null,default:ee},Symbol.toStringTag,{value:"Module"})),ie={name:"Utilisateur",props:{nom:String,mail:String}},ne=["href"];function se(e,t,n,m,l,s){return r(),a("a",{href:`mailto:${n.mail}`},h(n.nom),9,ne)}const re=x(ie,[["render",se]]),ae=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"})),oe={name:"UDate",props:{value:{required:!1,type:[String,Date]},format:{required:!1,type:String}},mounted(){this.formatted=this.formatage(this.value)},data(){return{formatted:void 0}},watch:{value:function(e){this.formatted=this.formatage(e)}},methods:{formatage(e){if(e===void 0)return;let t=new Date(e);const n=t.getFullYear(),m=(t.getMonth()+1).toString().padStart(2,"0"),l=t.getDate().toString().padStart(2,"0"),s=t.getHours().toString().padStart(2,"0"),d=t.getMinutes().toString().padStart(2,"0"),o=t.getSeconds().toString().padStart(2,"0");switch(this.format){case"datetime":return`${l}/${m}/${n} à ${s}:${d}`;case"time":return`${s}:${d}:${o}`}return`${l}/${m}/${n}`}}};function le(e,t,n,m,l,s){return h(l.formatted)}const w=x(oe,[["render",le]]),ue={name:"Recherche",data(){return{searchTerm:"",noResult:0,intervenants:[],checkedTypes:["vacataire","permanent","etudiant"]}},mixins:[Util],methods:{rechercher:function(e){this.searchTerm=e.currentTarget.value,this.searchTerm==""&&(this.noResult=0),this.searchTerm!=""&&this.reload()},urlFiche(e){return unicaenVue.url("intervenant/code:"+e+"/voir")},reload(){this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout(()=>{unicaenVue.axios.post(unicaenVue.url("intervenant/recherche-json"),{term:this.searchTerm}).then(e=>{let t=e.data,n=[];for(const m in t){if(t[m].typeIntervenantCode=="E"&&this.checkedTypes.includes("vacataire")){n.push(t[m]);continue}if(t[m].typeIntervenantCode=="P"&&this.checkedTypes.includes("permanent")){n.push(t[m]);continue}if(t[m].typeIntervenantCode=="S"&&this.checkedTypes.includes("etudiant")){n.push(t[m]);continue}}this.intervenants=n,this.intervenants.length==0?this.noResult=1:this.noResult=0}).catch(e=>{console.log(e.message)})},800)}}},de=i("h3",null,"Saisissez le nom suivi éventuellement du prénom (2 lettres minimum)",-1),ce={class:"intervenant-recherche"},me={class:"critere"},he=i("br",null,null,-1),fe=i("span",{class:"fw-bold"},"Types d'intervenant : ",-1),_e=i("br",null,null,-1),ve={key:0,class:"table table-bordered table-hover"},pe=i("thead",null,[i("tr",null,[i("th",{style:{width:"90px"}}),i("th",null,"Civilité"),i("th",null,"Nom"),i("th",null,"Prenom"),i("th",null,"Structure"),i("th",null,"Statut"),i("th",null,"Date de naissance"),i("th",null,"N° Personnel")])],-1),be=["title"],ge={style:{}},ye=["href"],xe=i("i",{class:"fas fa-eye"},null,-1),Ce={key:1,class:"table table-bordered table-hover"},Ve=i("thead",null,[i("tr",null,[i("th",{style:{width:"90px"}}),i("th",null,"Civilité"),i("th",null,"Nom"),i("th",null,"Prenom"),i("th",null,"Structure"),i("th",null,"Statut"),i("th",null,"Date de naissance"),i("th",null,"N° Personnel")])],-1),ke=i("tbody",null,[i("tr",null,[i("td",{colspan:"8",style:{"text-align":"center"}},"Aucun intervenant trouvé")])],-1),Se=[Ve,ke];function Me(e,t,n,m,l,s){const d=w;return r(),a(g,null,[de,i("div",ce,[i("div",me,[i("div",null,[i("input",{id:"term",class:"form-control input",placeholder:"votre recherche...",type:"text",onKeyup:t[0]||(t[0]=(...o)=>s.rechercher&&s.rechercher(...o))},null,32),he]),i("div",null,[fe,D(i("input",{"onUpdate:modelValue":t[1]||(t[1]=o=>l.checkedTypes=o),checked:"checked",name:"type[]",type:"checkbox",value:"permanent",onChange:t[2]||(t[2]=o=>s.reload())},null,544),[[A,l.checkedTypes]]),c(" Permanent "),D(i("input",{"onUpdate:modelValue":t[3]||(t[3]=o=>l.checkedTypes=o),checked:"checked",name:"type[]",type:"checkbox",value:"vacataire",onChange:t[4]||(t[4]=o=>s.reload())},null,544),[[A,l.checkedTypes]]),c(" Vacataire "),D(i("input",{"onUpdate:modelValue":t[5]||(t[5]=o=>l.checkedTypes=o),checked:"checked",name:"type[]",type:"checkbox",value:"etudiant",onChange:t[6]||(t[6]=o=>s.reload())},null,544),[[A,l.checkedTypes]]),c(" Etudiant ")]),_e])]),l.intervenants.length>0?(r(),a("table",ve,[pe,i("tbody",null,[(r(!0),a(g,null,y(l.intervenants,(o,f)=>(r(),a("tr",{class:j({"bg-danger":o.destruction!==null}),title:o.destruction!==null?"Fiche historisé":""},[i("td",ge,[i("a",{href:s.urlFiche(o.code)},[xe,c(" Fiche")],8,ye)]),i("td",null,h(o.civilite),1),i("td",null,h(o.nom),1),i("td",null,h(o.prenom),1),i("td",null,h(o.structure),1),i("td",null,h(o.statut),1),i("td",null,[_(d,{value:o["date-naissance"]},null,8,["value"])]),i("td",null,h(o["numero-personnel"]),1)],10,be))),256))])])):u("",!0),l.intervenants.length==0&&l.noResult==1?(r(),a("table",Ce,Se)):u("",!0)],64)}const Te=x(ue,[["render",Me]]),De=Object.freeze(Object.defineProperty({__proto__:null,default:Te},Symbol.toStringTag,{value:"Module"})),je={name:"UModal",props:{id:{required:!0,type:String},title:{required:!0,type:String}}},we=["id"],Ue={class:"modal-dialog"},Ae={class:"modal-content"},Re={class:"modal-header"},Ee={class:"modal-title"},Le=i("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),Oe={class:"modal-body"},qe={class:"modal-footer"},He=i("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"},"Fermer",-1);function Pe(e,t,n,m,l,s){return r(),a("div",{class:"modal fade",id:n.id,tabindex:"-1","aria-hidden":"true"},[i("div",Ue,[i("div",Ae,[i("div",Re,[i("h5",Ee,h(n.title),1),Le]),i("div",Oe,[L(e.$slots,"body")]),i("div",qe,[L(e.$slots,"footer"),He])])])],8,we)}const Fe=x(je,[["render",Pe]]),Be={name:"UIcon",props:{name:{required:!0,type:String},variant:{required:!1,type:String}}};function $e(e,t,n,m,l,s){return r(),a("i",{class:j(`fas fa-${n.name} text-${n.variant}`)},null,2)}const M=x(Be,[["render",$e]]);const Ie={name:"Mission",props:{mission:{required:!0}},data(){return{validationText:this.calcValidation(this.mission.validation),saisieUrl:unicaenVue.url("mission/saisie/:mission",{mission:this.mission.id}),validerUrl:unicaenVue.url("mission/valider/:mission",{mission:this.mission.id}),devaliderUrl:unicaenVue.url("mission/devalider/:mission",{mission:this.mission.id}),supprimerUrl:unicaenVue.url("mission/supprimer/:mission",{mission:this.mission.id})}},watch:{"mission.validation"(e){this.validationText=this.calcValidation(e)}},computed:{heuresLib:function(){return this.mission.heures===null||this.mission.heures===0?"Aucune heure saisie":this.mission.heures==this.mission.heuresValidees?Util.formattedHeures(this.mission.heures)+" heures (validées)":this.mission.heuresValidees==0?Util.formattedHeures(this.mission.heures)+" heures (non validées)":'<span class="bg-info">'+Util.formattedHeures(this.mission.heures)+"</span> heures ("+Util.formattedHeures(this.mission.heuresValidees)+" validées)"}},methods:{calcValidation(e){return e===null?"A valider":e.id===null?"Autovalidée":"Validation du "+Util.dateToString(e.histoCreation)+" par "},saisie(e){modAjax(e.currentTarget,t=>{this.refresh()})},supprimer(e){popConfirm(e.currentTarget,t=>{this.$emit("supprimer",this.mission)})},valider(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},devalider(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},volumeHoraireSupprimer(e){e.currentTarget.href=unicaenVue.url("mission/volume-horaire/supprimer/:missionVolumeHoraire",{missionVolumeHoraire:e.currentTarget.dataset.id}),popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},volumeHoraireValider(e){e.currentTarget.href=unicaenVue.url("mission/volume-horaire/valider/:missionVolumeHoraire",{missionVolumeHoraire:e.currentTarget.dataset.id}),popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},volumeHoraireDevalider(e){e.currentTarget.href=unicaenVue.url("mission/volume-horaire/devalider/:missionVolumeHoraire",{missionVolumeHoraire:e.currentTarget.dataset.id}),popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},refresh(){unicaenVue.axios.get(unicaenVue.url("mission/get/:mission",{mission:this.mission.id})).then(e=>{this.$emit("refresh",e.data)})}}},V=e=>(N("data-v-1735108d"),e=e(),z(),e),Ne=["id"],ze={class:"card-header card-header-h3"},Ye={key:0},Je={class:"float-end"},Qe={key:1},Xe={key:2},We={class:"float-end"},Ge={class:"card-body"},Ze={class:"row"},Ke={class:"col-md-8"},et={class:"row"},tt={class:"col-md-12"},it=V(()=>i("label",{class:"form-label"},"Composante en charge du suivi",-1)),nt={class:"form-control"},st={class:"row"},rt={class:"col-md-6"},at=V(()=>i("label",{class:"form-label"},"Taux de rémunération",-1)),ot={class:"form-control"},lt={class:"col-md-6"},ut=V(()=>i("label",{class:"form-label"},"Taux majoré (dimanches/jours fériés)",-1)),dt={class:"form-control"},ct={class:"col-md-7"},mt=V(()=>i("label",{class:"form-label"},"Nombre d'heures prévisionnelles",-1)),ht={class:"input-group mb-3"},ft=["innerHTML"],_t=["data-bs-target"],vt={key:0,class:"col-md-5"},pt=V(()=>i("label",{class:"form-label"},"Heures de formation prévues",-1)),bt={class:"form-control"},gt={class:"row"},yt={class:"col-md-12"},xt=V(()=>i("label",{class:"form-label"},"Descriptif de la mission",-1)),Ct={class:"form-control"},Vt={key:0,class:"row"},kt={class:"col-md-12"},St=V(()=>i("label",{class:"form-label"},"Etudiants suivis",-1)),Mt={class:"form-control"},Tt=V(()=>i("div",{class:"row"},[i("div",{class:"col-md-12"}," ")],-1)),Dt={class:"row"},jt={class:"col-md-12"},wt=["href"],Ut=["href"],At=["href"],Rt=["href"],Et={class:"col-md-4"},Lt=V(()=>i("div",null,[i("label",{class:"form-label"},"Suivi")],-1)),Ot={class:"table table-bordered table-condensed"},qt=V(()=>i("thead",null,[i("tr",null,[i("th",null,"Heures"),i("th",null,"Statut"),i("th",null,"Actions")])],-1)),Ht={style:{"text-align":"right"}},Pt=V(()=>i("br",null,null,-1)),Ft={key:0},Bt=["data-id"],$t=["data-id"],It=["data-id"];function Nt(e,t,n,m,l,s){const d=w,o=M,f=S("utilisateur"),C=S("u-heures"),p=Fe;return r(),a(g,null,[i("div",{id:n.mission.id,class:j([{"bg-success":n.mission.valide,"bg-default":!n.mission.valide},"card"])},[i("form",{onSubmit:t[4]||(t[4]=b((...v)=>e.submitForm&&e.submitForm(...v),["prevent"]))},[i("div",ze,[n.mission.libelleMission?(r(),a("h5",Ye,[c(h(n.mission.libelleMission)+" ",1),i("span",Je,[c("Du "),_(d,{value:n.mission.dateDebut},null,8,["value"]),c(" au "),_(d,{value:n.mission.dateFin},null,8,["value"])])])):u("",!0),n.mission.libelleMission?(r(),a("h6",Qe,h(n.mission.typeMission.libelle),1)):u("",!0),n.mission.libelleMission?u("",!0):(r(),a("h5",Xe,[c(h(n.mission.typeMission.libelle)+" ",1),i("span",We,[c("Du "),_(d,{value:n.mission.dateDebut},null,8,["value"]),c(" au "),_(d,{value:n.mission.dateFin},null,8,["value"])])]))]),i("div",Ge,[i("div",Ze,[i("div",Ke,[i("div",et,[i("div",tt,[it,i("div",nt,h(n.mission.structure.libelle),1)])]),i("div",st,[i("div",rt,[at,i("div",ot,h(n.mission.tauxRemu?n.mission.tauxRemu.libelle:null),1)]),i("div",lt,[ut,i("div",dt,h(n.mission.tauxRemuMajore?n.mission.tauxRemuMajore.libelle:n.mission.tauxRemu?"Idem ("+n.mission.tauxRemu.libelle+")":null),1)]),i("div",ct,[mt,i("div",ht,[i("div",{class:"form-control",innerHTML:s.heuresLib},null,8,ft),i("button",{"data-bs-target":`#details-${n.mission.id}`,class:"input-group-btn btn btn-secondary","data-bs-toggle":"modal"}," Détails ",8,_t)])]),n.mission.typeMission.besoinFormation?(r(),a("div",vt,[pt,i("div",bt,h(n.mission.heuresFormation),1)])):u("",!0)]),i("div",gt,[i("div",yt,[xt,i("div",Ct,h(n.mission.description),1)])]),n.mission.typeMission.accompagnementEtudiants?(r(),a("div",Vt,[i("div",kt,[St,i("div",Mt,[i("pre",null,h(n.mission.etudiantsSuivis),1)])])])):u("",!0),Tt,i("div",Dt,[i("div",jt,[n.mission.canSaisie?(r(),a("a",{key:0,href:l.saisieUrl,class:"btn btn-primary",onClick:t[0]||(t[0]=b((...v)=>s.saisie&&s.saisie(...v),["prevent"]))},"Modifier",8,wt)):u("",!0),n.mission.canValider?(r(),a("a",{key:1,href:l.validerUrl,class:"btn btn-secondary","data-content":"Êtes-vous sur de vouloir valider la mission ?","data-title":"Validation de la mission",onClick:t[1]||(t[1]=b((...v)=>s.valider&&s.valider(...v),["prevent"]))},"Valider",8,Ut)):u("",!0),n.mission.canDevalider?(r(),a("a",{key:2,href:l.devaliderUrl,class:"btn btn-danger","data-content":"Êtes-vous sur de vouloir dévalider la mission ?","data-title":"Dévalidation de la mission",onClick:t[2]||(t[2]=b((...v)=>s.devalider&&s.devalider(...v),["prevent"]))},"Dévalider",8,At)):u("",!0),n.mission.canSupprimer?(r(),a("a",{key:3,href:l.supprimerUrl,class:"btn btn-danger","data-content":"Êtes-vous sur de vouloir supprimer la mission ?","data-title":"Suppression de la mission",onClick:t[3]||(t[3]=b((...v)=>s.supprimer&&s.supprimer(...v),["prevent"]))},"Supprimer",8,Rt)):u("",!0)])])]),i("div",Et,[Lt,i("div",null,[_(o,{name:"thumbs-up",variant:"success"}),c(" Créé le "),_(d,{value:n.mission.histoCreation},null,8,["value"]),c(" par "),_(f,{mail:n.mission.histoCreateur.email,nom:n.mission.histoCreateur.displayName},null,8,["mail","nom"])]),i("div",null,[_(o,{name:n.mission.valide?"thumbs-up":"thumbs-down",variant:n.mission.valide?"success":"info"},null,8,["name","variant"]),c(" "+h(l.validationText)+" ",1),n.mission.validation&&n.mission.validation.histoCreateur?(r(),k(f,{key:0,mail:n.mission.validation.histoCreateur.email,nom:n.mission.validation.histoCreateur.displayName},null,8,["mail","nom"])):u("",!0)]),i("div",null,[_(o,{name:n.mission.contrat?"thumbs-up":"thumbs-down",variant:n.mission.contrat?"success":"info"},null,8,["name","variant"]),c(" "+h(n.mission.contrat?"Contrat établi":"Pas de contrat"),1)]),i("div",null,h(n.mission.heuresRealisees)+" heure"+h(n.mission.heuresRealisees<2?"":"s")+" réalisée"+h(n.mission.heuresRealisees<2?"":"s"),1)])])])],32)],10,Ne),_(p,{id:`details-${n.mission.id}`,title:"Détail des heures prévisionnelles"},{body:O(()=>[i("table",Ot,[qt,i("tbody",null,[(r(!0),a(g,null,y(n.mission.volumesHorairesPrevus,v=>(r(),a("tr",{key:v.id},[i("td",Ht,[_(C,{valeur:v.heures},null,8,["valeur"])]),i("td",null,[_(o,{name:"thumbs-up",variant:"success"}),c(" Saisi par "),_(f,{mail:v.histoCreateur.email,nom:v.histoCreateur.displayName},null,8,["mail","nom"]),c(" le "),_(d,{value:v.histoCreation},null,8,["value"]),Pt,_(o,{name:v.valide?"thumbs-up":"thumbs-down",variant:v.valide?"success":"info"},null,8,["name","variant"]),c(" "+h(v.validation&&v.validation.id==null?"Autovalidé":v.validation?"":"à valider")+" ",1),v.validation&&v.validation.histoCreateur?(r(),a("span",Ft,[c(" Validé par "),_(f,{mail:v.validation.histoCreateur.email,nom:v.validation.histoCreateur.displayName},null,8,["mail","nom"]),c(" le "),_(d,{value:v.validation.histoCreation},null,8,["value"])])):u("",!0)]),i("td",null,[v.canValider?(r(),a("a",{key:0,"data-id":v.id,class:"btn btn-secondary","data-content":"Êtes-vous sur de vouloir valider ce volume horaire ?","data-title":"Validation du volume horaire",onClick:t[5]||(t[5]=b((...T)=>s.volumeHoraireValider&&s.volumeHoraireValider(...T),["prevent"]))},"Valider",8,Bt)):u("",!0),v.canDevalider?(r(),a("a",{key:1,"data-id":v.id,class:"btn btn-danger","data-content":"Êtes-vous sur de vouloir dévalider ce volume horaire ?","data-title":"Dévalidation du volume horaire",onClick:t[6]||(t[6]=b((...T)=>s.volumeHoraireDevalider&&s.volumeHoraireDevalider(...T),["prevent"]))},"Dévalider",8,$t)):u("",!0),v.canSupprimer?(r(),a("a",{key:2,"data-id":v.id,class:"btn btn-danger","data-content":"Êtes-vous sur de vouloir supprimer le volume horaire ?","data-title":"Suppression du volume horaire",onClick:t[7]||(t[7]=b((...T)=>s.volumeHoraireSupprimer&&s.volumeHoraireSupprimer(...T),["prevent"]))},"Supprimer",8,It)):u("",!0)])]))),128))])])]),footer:O(()=>[]),_:1},8,["id"])],64)}const H=x(Ie,[["render",Nt],["__scopeId","data-v-1735108d"]]),zt=Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"})),Yt={components:{mission:H},props:{intervenant:{type:Number,required:!0},canAddMission:{type:Boolean,required:!0}},data(){return{missions:[],isMounted:!1,ajoutUrl:unicaenVue.url("mission/ajout/:intervenant",{intervenant:this.intervenant})}},mounted(){this.reload()},methods:{ajout(e){modAjax(e.currentTarget,t=>{this.reload()})},supprimer(e){this.reload()},refresh(e){let t=Util.json.indexById(this.missions,e.id);this.missions[t]=e,this.refreshPlafonds()},reload(){unicaenVue.axios.get(unicaenVue.url("mission/liste/:intervenant",{intervenant:this.intervenant})).then(e=>{this.missions=e.data,this.refreshPlafonds()})},refreshPlafonds(){this.isMounted?($(".plafonds").refresh(),$("#sidebar").refresh()):this.isMounted=!0}}},Jt=["href"];function Qt(e,t,n,m,l,s){const d=S("mission");return r(),a(g,null,[(r(!0),a(g,null,y(l.missions,o=>(r(),k(d,{onSupprimer:s.supprimer,onRefresh:s.refresh,key:o.id,mission:o},null,8,["onSupprimer","onRefresh","mission"]))),128)),n.canAddMission?(r(),a("a",{key:0,class:"btn btn-primary",href:l.ajoutUrl,onClick:t[0]||(t[0]=b((...o)=>s.ajout&&s.ajout(...o),["prevent"]))},"Ajout d'une nouvelle mission",8,Jt)):u("",!0)],64)}const Xt=x(Yt,[["render",Qt]]),Wt=Object.freeze(Object.defineProperty({__proto__:null,default:Xt},Symbol.toStringTag,{value:"Module"})),Gt={name:"ListeCandidatures.vue",props:{intervenant:{required:!0},canValiderCandidature:{type:Boolean,required:!1}},data(){return{candidatures:[],urlListeOffre:unicaenVue.url("offre-emploi")}},mounted(){this.reload()},methods:{reload(){unicaenVue.axios.get(unicaenVue.url("intervenant/:intervenant/get-candidatures",{intervenant:this.intervenant})).then(e=>{this.candidatures=e.data})},validerCandidature(e){popConfirm(e.target,t=>{this.reload()})},refuserCandidature(e){popConfirm(e.target,t=>{this.reload()})},urlOffre(e){return unicaenVue.url("offre-emploi/detail/:offre",{offre:e.offre.id})},urlAccepterCandidature:function(e){return unicaenVue.url("offre-emploi/accepter-candidature/:id",{id:e.id})},urlRefuserCandidature:function(e){return unicaenVue.url("offre-emploi/refuser-candidature/:id",{id:e.id})}}},Zt={class:"table table-bordered"},Kt=i("th",null,"Offre d'emploi",-1),ei=i("th",null,"Composante",-1),ti=i("th",null,"Etat",-1),ii={key:0},ni={key:0},si={key:0,colspan:"4",style:{"text-align":"center"}},ri={key:1,colspan:"3",style:{"text-align":"center"}},ai={style:{"text-align":"center"}},oi=["href"],li={style:{"text-align":"center"}},ui={style:{"text-align":"center"}},di={key:0,class:"badge rounded-pill bg-success"},ci={key:1,class:"badge rounded-pill bg-danger"},mi={key:2,class:"badge rounded-pill bg-warning"},hi={key:0,style:{"text-align":"center"}},fi=["href"],_i=["href"],vi=["href"];function pi(e,t,n,m,l,s){const d=M;return r(),a("div",null,[i("table",Zt,[i("thead",null,[i("tr",null,[Kt,ei,ti,n.canValiderCandidature?(r(),a("th",ii,"Action")):u("",!0)])]),i("tbody",null,[l.candidatures.length==0?(r(),a("tr",ni,[n.canValiderCandidature?(r(),a("td",si,"Aucune candidature")):u("",!0),n.canValiderCandidature?u("",!0):(r(),a("td",ri,"Aucune candidature"))])):u("",!0),(r(!0),a(g,null,y(l.candidatures,o=>(r(),a("tr",{key:o.id},[i("td",ai,[i("a",{href:s.urlOffre(o)},h(o.offre.titre),9,oi)]),i("td",li,h(o.offre.structure.libelleLong),1),i("td",ui,[o.validation?(r(),a("span",di,"Acceptée par "+h(o.validation.histoCreateur.displayName),1)):u("",!0),!o.validation&&o.motif!==null?(r(),a("span",ci,h(o.motif),1)):u("",!0),!o.validation&&o.motif===null?(r(),a("span",mi,"En attente d'acceptation")):u("",!0)]),this.canValiderCandidature?(r(),a("td",hi,[o.validation?u("",!0):(r(),a("a",{key:0,href:s.urlAccepterCandidature(o),class:"btn btn-success","data-content":"Êtes vous sûr de vouloir accepter cette candidature ?","data-title":"Accepter la candidature",title:"Accepter la candidature",onClick:t[0]||(t[0]=b((...f)=>s.validerCandidature&&s.validerCandidature(...f),["prevent"]))},"Accepter ",8,fi)),c(" "),i("a",{href:s.urlRefuserCandidature(o),class:"btn btn-danger","data-content":"Êtes vous sûr de vouloir refuser cette candidature ?","data-title":"Refuser la candidature",title:"Refuser la candidature",onClick:t[1]||(t[1]=b((...f)=>s.refuserCandidature&&s.refuserCandidature(...f),["prevent"]))},"Refuser ",8,_i)])):u("",!0)]))),128))])]),i("a",{href:l.urlListeOffre,class:"btn btn-primary",title:"Voir les offres d'emploi"},[_(d,{name:"eye"}),c(" Voir toutes les offres d'emploi ")],8,vi),c(" ")])}const bi=x(Gt,[["render",pi]]),gi=Object.freeze(Object.defineProperty({__proto__:null,default:bi},Symbol.toStringTag,{value:"Module"})),yi={name:"OffreEmploi.vue",props:{offre:{required:!0},utilisateur:{required:!1},extended:{type:Boolean,required:!1},canModifier:{type:Boolean,required:!1},canPostuler:{type:Boolean,required:!1},canValider:{type:Boolean,required:!1},canSupprimer:{type:Boolean,required:!1},canVoirCandidature:{type:Boolean,required:!1},canValiderCandidature:{type:Boolean,required:!1}},data(){return{saisirUrl:unicaenVue.url("offre-emploi/saisir/:offre",{offre:this.offre.id}),supprimerUrl:unicaenVue.url("offre-emploi/supprimer/:offre",{offre:this.offre.id}),validerUrl:unicaenVue.url("offre-emploi/valider/:offre",{offre:this.offre.id}),devaliderUrl:unicaenVue.url("offre-emploi/devalider/:offre",{offre:this.offre.id}),consulterUrl:unicaenVue.url("offre-emploi/detail/:offre",{offre:this.offre.id}),offreEmploiUrl:unicaenVue.url("offre-emploi"),postulerUrl:unicaenVue.url("offre-emploi/postuler/:id",{id:this.offre.id})}},computed:{isCandidat:function(){return!1},shortDesc:function(){let e=this.offre.description.substr(0,200);return this.offre.description.length>200&&(e+="..."),e},descriptionHtml:function(){return this.offre.description.replace(/(?:\r\n|\r|\n)/g,"<br />")},connectionLink:function(){let e="auth/connexion?redirect="+window.location.href;return unicaenVue.url(e)}},methods:{saisir(e){modAjax(e.target,t=>{this.refresh()})},urlVoir:function(e){return unicaenVue.url("intervenant/:code/voir",{code:"code:"+e.intervenant.code})},urlAccepterCandidature:function(e){return unicaenVue.url("offre-emploi/accepter-candidature/:id",{id:e.id})},urlRefuserCandidature:function(e){return unicaenVue.url("offre-emploi/refuser-candidature/:id",{id:e.id})},refresh(){unicaenVue.axios.get(unicaenVue.url("offre-emploi/get/:offreEmploi",{offreEmploi:this.offre.id})).then(e=>{this.$emit("refresh",e.data)})},supprimer(e){popConfirm(e.target,t=>{this.$emit("supprimer",this.offre)})},postuler(e){popConfirm(e.target,t=>{this.$emit("postuler",this.offre)})},valider(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},devalider(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},validerCandidature(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})},refuserCandidature(e){popConfirm(e.currentTarget,t=>{this.$emit("refresh",t.data)})}}},xi={key:0,class:"col"},Ci={class:"card h-100"},Vi={class:"card-header"},ki={class:"badge rounded-pill bg-info"},Si={key:0,class:"badge rounded-pill bg-success"},Mi={key:1,class:"badge rounded-pill bg-warning"},Ti={class:"card-body"},Di={class:"bg-light",style:{padding:"5px"}},ji=i("b",null,"Créée le : ",-1),wi=i("br",null,null,-1),Ui=i("b",null,"Période à pourvoir : ",-1),Ai=i("br",null,null,-1),Ri=i("b",null,"Demandée par la composante :",-1),Ei=i("br",null,null,-1),Li=i("b",null,"Type de mission :",-1),Oi={class:"card-footer"},qi={class:"d-grid gap-2 d-md-flex justify-content-md-end"},Hi=["href"],Pi={key:1},Fi={class:"page-header"},Bi={key:0,class:"alert alert-primary d-flex align-items-center",role:"alert"},$i=i("i",{class:"fa-solid fa-user"},null,-1),Ii={class:"ms-2"},Ni=["href"],zi={key:1,class:"alert alert-primary d-flex align-items-center",role:"alert"},Yi=i("i",{class:"fa-solid fa-circle-xmark"},null,-1),Ji=i("div",{class:"ms-2"}," Vous n'avez pas les droits pour postuler à cette offre, merci de contacter votre administration de rattachement. ",-1),Qi=[Yi,Ji],Xi={key:2,class:"alert alert-primary d-flex align-items-center",role:"alert"},Wi=i("i",{class:"fa-solid fa-circle-xmark"},null,-1),Gi=i("div",{class:"ms-2"}," Vous avez déjà postulé à cette offre. ",-1),Zi=[Wi,Gi],Ki={class:"bg-light",style:{padding:"10px"}},en=i("b",null,"Créée le : ",-1),tn=i("br",null,null,-1),nn=i("b",null,"Période à pourvoir : ",-1),sn=i("br",null,null,-1),rn=i("b",null,"Date limite de candidature :",-1),an=i("br",null,null,-1),on=i("b",null,"Demandé par la composante :",-1),ln=i("br",null,null,-1),un=i("b",null,"Type de mission :",-1),dn=i("br",null,null,-1),cn=i("b",null,"Nombre d'heures pour la mission :",-1),mn=i("br",null,null,-1),hn=i("b",null,"Nombre de postes à pourvoir :",-1),fn=i("br",null,null,-1),_n=["innerHTML"],vn=i("br",null,null,-1),pn={key:3},bn=i("h5",null,[i("strong",null,"Liste des candidats :")],-1),gn={class:"table table-bordered"},yn=i("th",null,"Intervenant",-1),xn=i("th",null,"Etat",-1),Cn={key:0},Vn={key:0},kn={key:0,colspan:"4",style:{"text-align":"center"}},Sn={key:1,colspan:"3",style:{"text-align":"center"}},Mn=["href"],Tn={key:0,class:"badge rounded-pill bg-success"},Dn={key:1,class:"badge rounded-pill bg-danger"},jn={key:2,class:"badge rounded-pill bg-warning"},wn={key:0},Un=["href"],An=["href"],Rn={class:"mt-5"},En=["href"],Ln=["href"],On=["href"],qn=["href"],Hn=["href"],Pn=["href"];function Fn(e,t,n,m,l,s){const d=w,o=M;return r(),a(g,null,[this.extended?u("",!0):(r(),a("div",xi,[i("div",Ci,[i("div",Vi,[i("h4",null,h(n.offre.titre),1),i("span",ki,h(n.offre.nombreHeures)+" heure(s)",1),c(" "),n.offre.validation?(r(),a("span",Si,[c("Validée le "),_(d,{value:n.offre.validation.histoCreation},null,8,["value"]),c(" par "+h(n.offre.validation.histoCreateur.displayName),1)])):u("",!0),n.offre.validation?u("",!0):(r(),a("span",Mi," En attente de validation par la DRH")),c(" ")]),i("div",Ti,[i("p",Di,[ji,_(d,{value:n.offre.histoCreation},null,8,["value"]),c(" par "+h(n.offre.histoCreateur.displayName),1),wi,Ui,c("du "),_(d,{value:n.offre.dateDebut},null,8,["value"]),c(" au "),_(d,{value:n.offre.dateFin},null,8,["value"]),Ai,Ri,c(" "+h(n.offre.structure.libelleCourt)+" ",1),Ei,Li,c(" "+h(n.offre.typeMission.libelle),1)]),c(" "+h(s.shortDesc),1)]),i("div",Oi,[i("div",qi,[i("a",{href:l.consulterUrl,class:"btn btn-primary",title:"Consulter "},[_(o,{name:"eye"}),c(" Voir ")],8,Hi)])])])])),this.extended?(r(),a("div",Pi,[i("h1",Fi,h(n.offre.titre),1),this.utilisateur?u("",!0):(r(),a("div",Bi,[$i,i("div",Ii,[c(" Vous devez "),i("a",{href:s.connectionLink,class:"text-decoration-underline alert-link"},"être identifé",8,Ni),c(" pour pouvoir postuler. ")])])),!n.offre.canPostuler&&this.utilisateur?(r(),a("div",zi,Qi)):u("",!0),s.isCandidat&&this.utilisateur?(r(),a("div",Xi,Zi)):u("",!0),i("p",Ki,[en,_(d,{value:n.offre.histoCreation},null,8,["value"]),c(" par "+h(n.offre.histoCreateur.displayName),1),tn,nn,c("du "),_(d,{value:n.offre.dateDebut},null,8,["value"]),c(" au "),_(d,{value:n.offre.dateFin},null,8,["value"]),sn,rn,_(d,{value:n.offre.dateLimite},null,8,["value"]),an,on,c(" "+h(n.offre.structure.libelleCourt)+" ",1),ln,un,c(" "+h(n.offre.typeMission.libelle)+" ",1),dn,cn,c(" "+h(n.offre.nombreHeures)+" heure(s) ",1),mn,hn,c(" "+h(n.offre.nombrePostes)+" poste(s) ",1),fn]),i("p",{innerHTML:s.descriptionHtml},null,8,_n),vn,this.canValiderCandidature?(r(),a("div",pn,[bn,i("table",gn,[i("thead",null,[i("tr",null,[yn,xn,n.canValiderCandidature?(r(),a("th",Cn,"Action")):u("",!0)])]),i("tbody",null,[n.offre.candidatures.length==0?(r(),a("tr",Vn,[n.canValiderCandidature?(r(),a("td",kn,"Aucune candidature")):u("",!0),n.canValiderCandidature?u("",!0):(r(),a("td",Sn,"Aucune candidature"))])):u("",!0),(r(!0),a(g,null,y(n.offre.candidatures,f=>(r(),a("tr",null,[i("td",null,[i("a",{href:s.urlVoir(f)},h(f.intervenant.prenom+" "+f.intervenant.nomUsuel),9,Mn)]),i("td",null,[f.validation?(r(),a("span",Tn,[c("Acceptée le "),_(d,{value:f.validation.histoCreation},null,8,["value"]),c(" par "+h(f.validation.histoCreateur.displayName),1)])):u("",!0),!f.validation&&f.motif!==null?(r(),a("span",Dn,h(f.motif),1)):u("",!0),!f.validation&&f.motif===null?(r(),a("span",jn,"En attente d'acceptation")):u("",!0)]),this.canValiderCandidature?(r(),a("td",wn,[f.validation?u("",!0):(r(),a("a",{key:0,href:s.urlAccepterCandidature(f),class:"btn btn-success","data-content":"Êtes vous sûr de vouloir accepter cette candidature ?","data-title":"Accepter la candidature",title:"Accepter la candidature",onClick:t[0]||(t[0]=b((...C)=>s.validerCandidature&&s.validerCandidature(...C),["prevent"]))},"Accepter ",8,Un)),c(" "),!f.motif&&f.validation?(r(),a("a",{key:1,href:s.urlRefuserCandidature(f),class:"btn btn-danger","data-content":"Êtes vous sûr de vouloir refuser cette candidature ?","data-title":"Refuser la candidature",title:"Refuser la candidature",onClick:t[1]||(t[1]=b((...C)=>s.refuserCandidature&&s.refuserCandidature(...C),["prevent"]))},"Refuser ",8,An)):u("",!0)])):u("",!0)]))),256))])])])):u("",!0),i("div",Rn,[i("a",{href:l.offreEmploiUrl,class:"btn btn-secondary"},"Retour aux offres",8,En),c(" "),this.canPostuler?(r(),a("a",{key:0,href:l.postulerUrl,class:"btn btn-primary","data-bs-original-title":"Vous devez être connecté pour postuler","data-bs-placement":"top","data-bs-toggle":"tooltip"},"Postuler",8,Ln)):u("",!0),c(" "),n.offre.canModifier?(r(),a("a",{key:1,href:l.saisirUrl,class:"btn btn-primary",title:"Modifier",onClick:t[2]||(t[2]=b((...f)=>s.saisir&&s.saisir(...f),["prevent"]))},[_(o,{name:"pen-to-square"}),c(" Modifier ")],8,On)):u("",!0),c(" "),n.offre.validation&&n.offre.canValider?(r(),a("a",{key:2,href:l.devaliderUrl,class:"btn btn-danger",title:"Devalider",onClick:t[3]||(t[3]=b((...f)=>s.devalider&&s.devalider(...f),["prevent"]))},[_(o,{name:"thumbs-down"}),c(" Devalider ")],8,qn)):u("",!0),c(" "),!n.offre.validation&&n.offre.canValider?(r(),a("a",{key:3,href:l.validerUrl,class:"btn btn-success",title:"Valider",onClick:t[4]||(t[4]=b((...f)=>s.valider&&s.valider(...f),["prevent"]))},[_(o,{name:"thumbs-up"}),c(" Valider ")],8,Hn)):u("",!0),c(" "),n.offre.canSupprimer?(r(),a("a",{key:4,href:l.supprimerUrl,class:"btn btn-danger","data-content":"Êtes-vous sur de vouloir supprimer l'offre ?","data-title":"Suppression de l'offre",title:"Supprimer",onClick:t[5]||(t[5]=b((...f)=>s.supprimer&&s.supprimer(...f),["prevent"]))},[_(o,{name:"trash"}),c(" Supprimer ")],8,Pn)):u("",!0)])])):u("",!0)],64)}const P=x(yi,[["render",Fn]]),Bn=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"})),$n={components:{offreEmploi:P},props:{id:{type:Number,required:!1},utilisateur:{required:!1},canModifier:{type:Boolean,required:!1},canPostuler:{type:Boolean,required:!1},canValider:{type:Boolean,required:!1},canVoirCandidature:{type:Boolean,required:!1},canValiderCandidature:{type:Boolean,required:!1},canSupprimer:{type:Boolean,required:!1}},data(){return{offres:[],ajoutUrl:unicaenVue.url("offre-emploi/saisir")}},mounted(){this.reload()},computed:{extended:function(){return!!this.id}},methods:{ajout(e){modAjax(e.target,t=>{this.reload()})},supprimer(){window.location.href=unicaenVue.url("offre-emploi")},refresh(e){let t=Util.json.indexById(this.offres,e.id);this.offres[t]=e},reload(){this.id?unicaenVue.axios.get(unicaenVue.url("offre-emploi/get/:offreEmploi",{offreEmploi:this.id})).then(e=>{this.offres=[e.data]}):unicaenVue.axios.get(unicaenVue.url("offre-emploi/liste")).then(e=>{this.offres=e.data})}}},In={key:0,class:"row row-cols-1 row-cols-md-2 g-4 mb-3"},Nn={key:1},zn=["href"],Yn={key:2};function Jn(e,t,n,m,l,s){const d=S("offreEmploi");return r(),a(g,null,[s.extended?u("",!0):(r(),a("div",In,[(r(!0),a(g,null,y(l.offres,o=>(r(),k(d,{key:o.id,canModifier:this.canModifier,canSupprimer:this.canSupprimer,canValider:this.canValider,canVoirCandidature:this.canVoirCandidature,offre:o,onRefresh:s.refresh,onSupprimer:s.supprimer},null,8,["canModifier","canSupprimer","canValider","canVoirCandidature","offre","onRefresh","onSupprimer"]))),128))])),s.extended?u("",!0):(r(),a("div",Nn,[this.canModifier?(r(),a("a",{key:0,href:l.ajoutUrl,class:"btn btn-primary",onClick:t[0]||(t[0]=b((...o)=>s.ajout&&s.ajout(...o),["prevent"]))},"Ajouter une nouvelle offre",8,zn)):u("",!0)])),s.extended?(r(),a("div",Yn,[(r(!0),a(g,null,y(l.offres,o=>(r(),k(d,{key:o.id,canModifier:this.canModifier,canPostuler:this.canPostuler,canSupprimer:this.canSupprimer,canValider:this.canValider,canValiderCandidature:this.canValiderCandidature,canVoirCandidature:this.canVoirCandidature,extended:s.extended,offre:o,utilisateur:this.utilisateur,onRefresh:s.refresh,onSupprimer:s.supprimer},null,8,["canModifier","canPostuler","canSupprimer","canValider","canValiderCandidature","canVoirCandidature","extended","offre","utilisateur","onRefresh","onSupprimer"]))),128))])):u("",!0)],64)}const Qn=x($n,[["render",Jn]]),Xn=Object.freeze(Object.defineProperty({__proto__:null,default:Qn},Symbol.toStringTag,{value:"Module"}));const Wn={name:"UCalendar",props:{date:{type:Date,required:!0},events:{type:Array,required:!0},canAddEvent:{type:Boolean,required:!0,default:!0},addDateDebut:{type:String,required:!1},addDateFin:{type:String,required:!1}},data(){const e=new Date(this.date);return{mois:e.getMonth()+1,annee:e.getFullYear()}},computed:{listeJours(){const e=new Date(this.date);e.setDate(1),e.setMonth(e.getMonth()+1),e.setDate(e.getDate()-1);let t=e.getDate();return Array.from({length:t},(n,m)=>m+1)}},watch:{date:function(e,t){const n=new Date(this.date);this.mois=n.getMonth()+1,this.annee=n.getFullYear()},mois:function(e,t){const n=new Date(this.date);n.setMonth(e-1),this.$emit("changeDate",n)},annee:function(e,t){const n=new Date(this.date);n.setFullYear(e),this.$emit("changeDate",n)}},methods:{nomJour(e){const t=new Date(this.date);return t.setDate(e),t.toLocaleString("fr-FR",{weekday:"short"})},listeMois(){let e=[];const t=new Date;for(let n=1;n<=12;n++){t.setMonth(n-1);let m=t.toLocaleString("fr-FR",{month:"long"});e.push({id:n,libelle:m})}return e},listeAnnees(){const t=new Date().getFullYear(),n=1;let m=[];for(let l=t-n;l<=t+n;l++)m.push(l);return m},canAdd(e){if(!this.canAddEvent)return!1;let t=this.addDateDebut;t===void 0?t=new Date("2000-01-01"):t==="now"?t=new Date:t=new Date(t);let n=this.addDateFin;n===void 0?n=new Date("2500-01-01"):n==="now"?n=new Date:n=new Date(n);let m=new Date(this.date);return m.setDate(e),t=this.isoDateOnly(t),n=this.isoDateOnly(n),m=this.isoDateOnly(m),!(m<t||m>n)},addEvent(e){const t=new Date(this.date);t.setDate(e.currentTarget.dataset.jour),this.$emit("addEvent",t,e)},prevMois(){const e=new Date(this.date);e.setMonth(e.getMonth()-1),this.$emit("changeDate",e)},nextMois(){const e=new Date(this.date);e.setMonth(e.getMonth()+1),this.$emit("changeDate",e)},eventsByJour(e){const t=new Date(this.date);let n={};for(let m in this.events){let l=this.events[m];l.date.getFullYear()===t.getFullYear()&&l.date.getMonth()+1===t.getMonth()+1&&l.date.getDate()===e&&(n[m]=l)}return n},isoDateOnly(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),m=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${m}`}}},Gn={class:"calendar"},Zn={class:"recherche"},Kn={class:"recherche btn-group"},es=["value"],ts=["value"],is={class:"table table-bordered table-hover table-sm"},ss=["data-jour"],rs={class:"nom-jour"},as={class:"numero-jour"},os={class:"num-jour badge bg-secondary rounded-circle"},ls={key:0},us=["data-jour"];function ds(e,t,n,m,l,s){const d=M;return r(),a("div",Gn,[i("div",Zn,[i("div",Kn,[i("button",{class:"btn btn-light",id:"prevMois",onClick:t[0]||(t[0]=(...o)=>s.prevMois&&s.prevMois(...o)),title:"Mois précédant"},[_(d,{name:"chevron-left"})]),D(i("select",{class:"form-select btn btn-light",id:"otherMois","onUpdate:modelValue":t[1]||(t[1]=o=>l.mois=o)},[(r(!0),a(g,null,y(s.listeMois(),o=>(r(),a("option",{value:o.id},h(o.libelle),9,es))),256))],512),[[q,l.mois]]),D(i("select",{class:"form-select btn btn-light",id:"otherAnnee","onUpdate:modelValue":t[2]||(t[2]=o=>l.annee=o)},[(r(!0),a(g,null,y(s.listeAnnees(),o=>(r(),a("option",{value:o},h(o),9,ts))),256))],512),[[q,l.annee]]),i("button",{class:"btn btn-light",id:"nextMois",onClick:t[3]||(t[3]=(...o)=>s.nextMois&&s.nextMois(...o)),title:"Mois suivant"},[_(d,{name:"chevron-right"})])])]),i("table",is,[(r(!0),a(g,null,y(s.listeJours,o=>(r(),a("tr",{"data-jour":o},[i("th",rs,h(s.nomJour(o)),1),i("th",as,[i("div",os,h(o<10?"0"+o.toString():o),1)]),i("td",null,[(r(!0),a(g,null,y(s.eventsByJour(o),(f,C)=>(r(),a("div",{class:"event",style:Y("border-color:"+f.color+";background-color:"+f.bgcolor),key:C},[(r(),k(J(f.component),{event:f},null,8,["event"]))],4))),128)),s.canAdd(o)?(r(),a("div",ls,[i("button",{onClick:t[4]||(t[4]=(...f)=>s.addEvent&&s.addEvent(...f)),"data-jour":o,class:"btn btn-light btn-sm"},[_(d,{name:"plus"}),c(" Nouvel événement ")],8,us)])):u("",!0)])],8,ss))),256))])])}const cs=x(Wn,[["render",ds],["__scopeId","data-v-51bbc42d"]]);const ms={name:"SuiviEvent",props:{event:{type:Object,required:!0}},data(){return{suivi:this.$parent.$parent,modifierUrl:unicaenVue.url("mission/suivi/modifier/:id",{id:this.event.id}),supprimerUrl:unicaenVue.url("mission/suivi/supprimer/:id",{id:this.event.id}),validerUrl:unicaenVue.url("mission/suivi/valider/:id",{id:this.event.id}),devaliderUrl:unicaenVue.url("mission/suivi/devalider/:id",{id:this.event.id})}},computed:{heureDebut(){return this.event.heureDebut.toString().replace(":","h")},heureFin(){return this.event.heureFin.toString().replace(":","h")},heures(){return Util.floatToString(this.event.heures)}},methods:{modifier(e){modAjax(e.currentTarget,t=>{this.suivi.refresh()})},supprimer(e){popConfirm(e.currentTarget,t=>{this.suivi.refresh()})},valider(e){unicaenVue.axios.get(this.validerUrl).then(t=>{this.suivi.refresh()})},devalider(e){popConfirm(e.currentTarget,t=>{this.suivi.refresh()})}}},hs={class:"event-content"},fs={class:"mission"},_s={key:0,class:"badge bg-success"},vs={class:"horaires"},ps={key:0,class:"badge bg-secondary"},bs={key:0,class:"description"},gs={class:"event-actions"},ys={class:"btn-group btn-group-sm"},xs=["data-url"],Cs=["data-url"],Vs=["data-url"],ks=["data-url"];function Ss(e,t,n,m,l,s){const d=M;return r(),a(g,null,[i("div",hs,[i("p",fs,[c(h(n.event.mission.libelleCourt)+" ",1),n.event.valide?(r(),a("span",_s,"Validé")):u("",!0)]),i("p",vs,[c(" de "+h(s.heureDebut)+" à "+h(s.heureFin)+", soit "+h(s.heures)+" heure"+h(s.heures<2?"":"s")+" ",1),n.event.formation?(r(),a("span",ps,"En formation")):u("",!0)]),n.event.description?(r(),a("p",bs,h(n.event.description),1)):u("",!0)]),i("div",gs,[i("div",ys,[n.event.canEdit?(r(),a("button",{key:0,class:"btn btn-light",onClick:t[0]||(t[0]=(...o)=>s.modifier&&s.modifier(...o)),title:"Modifier le suivi","data-url":l.modifierUrl},[_(d,{name:"pen-to-square"})],8,xs)):u("",!0),n.event.canValider?(r(),a("button",{key:1,class:"btn btn-light",onClick:t[1]||(t[1]=(...o)=>s.valider&&s.valider(...o)),title:"Valider le suivi","data-url":l.validerUrl},[_(d,{name:"check",class:"text-success"})],8,Cs)):u("",!0),n.event.canDevalider?(r(),a("button",{key:2,class:"btn btn-light",onClick:t[2]||(t[2]=(...o)=>s.devalider&&s.devalider(...o)),title:"Dévalider le suivi","data-url":l.devaliderUrl,"data-content":"Voulez-vous vraiment dévalider ce suivi ?"},[_(d,{name:"xmark",class:"text-danger"})],8,Vs)):u("",!0),n.event.canSupprimer?(r(),a("button",{key:3,class:"btn btn-light",onClick:t[3]||(t[3]=(...o)=>s.supprimer&&s.supprimer(...o)),title:"Supprimer le suivi","data-url":l.supprimerUrl,"data-content":"Voulez-vous vraiment supprimer ce suivi ?"},[_(d,{name:"trash-can",class:"text-danger"})],8,ks)):u("",!0)])])],64)}const F=x(ms,[["render",Ss],["__scopeId","data-v-17cb1f29"]]),Ms=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),Ts={name:"Suivi",props:{intervenant:{type:Number,required:!0},canAddMission:{type:Boolean,required:!0}},mounted(){this.refresh()},data(){return{date:new Date,isMounted:!1,suivi:[]}},methods:{changeDate(e){this.date=e},ajouter(e,t){const n={intervenant:this.intervenant,date:e.toISOString().slice(0,10)};t.currentTarget.dataset.url=unicaenVue.url("mission/suivi/ajout/:intervenant/:date",n),modAjax(t.currentTarget,m=>{this.refresh()})},refresh(){const e=["#e74c3c","#8e44ad","#3498db","#1abc9c","#2ecc71","#f1c40f","#e67e22","#d35400"];let t=0,n=[];unicaenVue.axios.get(unicaenVue.url("mission/suivi/liste/:intervenant",{intervenant:this.intervenant})).then(m=>{let l=[];for(let s in m.data){let d=m.data[s];n[d.mission.id]===void 0&&(n[d.mission.id]=e[t],t++),d.valide&&(d.bgcolor="#d0eddb"),d.color=n[d.mission.id],d.component=Q(F),d.date=new Date(d.date),d.intervenant=this.intervenant,l.push(d)}this.suivi=l,this.refreshPlafonds()})},refreshPlafonds(){this.isMounted?$(".plafonds").refresh():this.isMounted=!0}}};function Ds(e,t,n,m,l,s){const d=cs;return r(),k(d,{date:l.date,onChangeDate:s.changeDate,onAddEvent:s.ajouter,"can-add-event":n.canAddMission,addDateFin:"now",events:l.suivi},null,8,["date","onChangeDate","onAddEvent","can-add-event","events"])}const js=x(Ts,[["render",Ds]]),ws=Object.freeze(Object.defineProperty({__proto__:null,default:js},Symbol.toStringTag,{value:"Module"})),Us={name:"Taux",props:{taux:{required:!0},listeTaux:{required:!0}},data(){return{saisieUrl:unicaenVue.url("taux/saisir/:tauxRemu",{tauxRemu:this.taux.id}),supprimerUrl:unicaenVue.url("taux/supprimer/:tauxRemu",{tauxRemu:this.taux.id}),ajoutValeurUrl:unicaenVue.url("taux/saisir-valeur/:tauxRemu",{tauxRemu:this.taux.id})}},methods:{saisie(e){modAjax(e.target,t=>{this.$emit("refreshListe")})},ajoutValeur(e){modAjax(e.target,t=>{this.$emit("refreshListe")})},saisieValeur(e){e.currentTarget.href=unicaenVue.url("taux/saisir-valeur/:tauxRemu/:tauxRemuValeur",{tauxRemu:this.taux.id,tauxRemuValeur:e.currentTarget.dataset.id}),modAjax(e.currentTarget,t=>{this.$emit("refreshListe")})},refreshListe(e){this.$emit("refreshListe")},supprimer(e){popConfirm(e.target,t=>{this.$emit("refreshListe")})},supprimerValeur(e){e.currentTarget.href=unicaenVue.url("taux/supprimer-valeur/:tauxRemuValeur",{tauxRemuValeur:e.currentTarget.dataset.id}),popConfirm(e.currentTarget,t=>{this.$emit("refreshListe")})},refresh(e){unicaenVue.axios.get(unicaenVue.url("taux/get/:tauxRemu",{tauxRemu:e.id})).then(t=>{this.$emit("refresh",t.data)})}}},As={class:"card-header"},Rs={style:{display:"inline"}},Es={class:"float-end"},Ls=["href"],Os=["href"],qs={class:"card-body"},Hs={key:0},Ps=i("br",null,null,-1),Fs={class:""},Bs={class:"row align-items-start"},$s={class:"col-md-6"},Is={class:"col"},Ns=["data-id"],zs=["data-id"],Ys=["href"],Js={key:1,class:"row"},Qs={class:"col-md-7"},Xs=i("br",null,null,-1),Ws={class:"row align-items-start"},Gs={class:"col-md-8"},Zs={class:"col-md-auto"},Ks=["data-id"],er=["data-id"],tr=["href"],ir={class:"col"},nr=i("br",null,null,-1),sr={key:0},rr={key:0};function ar(e,t,n,m,l,s){const d=M,o=S("u-heures"),f=w,C=S("taux",!0);return r(),a(g,null,[i("div",{class:j(["card",{"ms-5":n.taux.tauxRemu}])},[i("div",As,[i("h3",Rs,h(n.taux.libelle)+" ("+h(n.taux.code)+")",1),i("div",Es,[n.taux.canEdit?(r(),a("a",{key:0,href:l.saisieUrl,class:"btn btn-primary",onClick:t[0]||(t[0]=b((...p)=>s.saisie&&s.saisie(...p),["prevent"]))},[_(d,{name:"pen-to-square"}),c(" Modifier")],8,Ls)):u("",!0),c(" "),n.taux.canDelete?(r(),a("a",{key:1,href:l.supprimerUrl,class:"btn btn-danger",onClick:t[1]||(t[1]=b((...p)=>s.supprimer&&s.supprimer(...p),["prevent"]))},[_(d,{name:"trash-can"}),c(" Supprimer")],8,Os)):u("",!0)])]),i("div",qs,[n.taux.tauxRemu?u("",!0):(r(),a("div",Hs,[c(" Modification :"),Ps,i("ul",null,[(r(!0),a(g,null,y(n.taux.tauxRemuValeurs,p=>(r(),a("div",{key:p.id},[i("li",Fs,[i("div",Bs,[i("div",$s,[_(o,{valeur:p.valeur},null,8,["valeur"]),c("€/h à partir du "),_(f,{value:p.dateEffet},null,8,["value"])]),i("div",Is,[n.taux.canEdit?(r(),a("a",{key:0,class:"text-primary",onClick:t[2]||(t[2]=b((...v)=>s.saisieValeur&&s.saisieValeur(...v),["prevent"])),"data-id":p.id},[_(d,{name:"pen-to-square"})],8,Ns)):u("",!0),c(" "),n.taux.canEdit?(r(),a("a",{key:1,class:"text-primary",onClick:t[3]||(t[3]=b((...v)=>s.supprimerValeur&&s.supprimerValeur(...v),["prevent"])),"data-id":p.id},[_(d,{name:"trash-can"})],8,zs)):u("",!0)])])])]))),128))]),n.taux.canEdit?(r(),a("a",{key:0,href:l.ajoutValeurUrl,class:"btn btn-primary btn-sm",onClick:t[4]||(t[4]=b((...p)=>s.ajoutValeur&&s.ajoutValeur(...p),["prevent"]))},[_(d,{name:"plus"}),c(" Ajouter une valeur ")],8,Ys)):u("",!0)])),n.taux.tauxRemu?(r(),a("div",Js,[i("div",Qs,[c(" Modification :"),Xs,i("ul",null,[(r(!0),a(g,null,y(n.taux.tauxRemuValeurs,p=>(r(),a("div",null,[i("li",null,[i("div",Ws,[i("div",Gs,[c(" Coéfficient de "),_(o,{valeur:p.valeur},null,8,["valeur"]),c(" à partir du "),_(f,{value:p.dateEffet},null,8,["value"])]),i("div",Zs,[n.taux.canEdit?(r(),a("a",{key:0,class:"text-primary",onClick:t[5]||(t[5]=b((...v)=>s.saisieValeur&&s.saisieValeur(...v),["prevent"])),"data-id":p.id},[_(d,{name:"pen-to-square"})],8,Ks)):u("",!0),c(" "),n.taux.canEdit?(r(),a("a",{key:1,class:"text-primary",onClick:t[6]||(t[6]=b((...v)=>s.supprimerValeur&&s.supprimerValeur(...v),["prevent"])),"data-id":p.id},[_(d,{name:"trash-can"})],8,er)):u("",!0)])])])]))),256))]),n.taux.canEdit?(r(),a("a",{key:0,href:l.ajoutValeurUrl,class:"btn btn-primary btn-sm",onClick:t[7]||(t[7]=b((...p)=>s.ajoutValeur&&s.ajoutValeur(...p),["prevent"]))},[_(d,{name:"plus"})],8,tr)):u("",!0)]),i("div",ir,[c(" Valeurs calculées (indexées sur le taux "+h(n.taux.tauxRemu.libelle)+") : ",1),i("ul",null,[(r(!0),a(g,null,y(n.taux.tauxRemuValeursIndex,p=>(r(),a("div",null,[i("li",null,[_(o,{valeur:p.valeur},null,8,["valeur"]),c("€/h à partir du "),_(f,{value:p.date},null,8,["value"])])]))),256))]),nr])])):u("",!0)])],2),n.taux.tauxRemu?u("",!0):(r(),a("div",sr,[(r(!0),a(g,null,y(n.listeTaux,p=>(r(),a("div",{key:p},[p.tauxRemu&&p.tauxRemu.id===n.taux.id?(r(),a("div",rr,[(r(),k(C,{onSupprimer:s.supprimer,onRefreshListe:s.refreshListe,key:n.taux.id,taux:p,listeTaux:n.listeTaux},null,8,["onSupprimer","onRefreshListe","taux","listeTaux"]))])):u("",!0)]))),128))]))],64)}const B=x(Us,[["render",ar]]),or=Object.freeze(Object.defineProperty({__proto__:null,default:B},Symbol.toStringTag,{value:"Module"})),lr={components:{taux:B},props:{canEditTaux:{type:Boolean,required:!0}},data(){return{listeTaux:[],ajoutUrl:unicaenVue.url("taux/saisir")}},mounted(){this.reload()},methods:{ajout(e){modAjax(e.currentTarget,t=>{this.reload()})},supprimer(){this.reload()},refreshListe(){this.reload()},refresh(e){let t=Util.json.indexById(this.listeTaux,e.id);this.listeTaux[t]=e},reload(){unicaenVue.axios.get(unicaenVue.url("taux/liste-taux")).then(e=>{this.listeTaux=e.data})}}},ur=["href"];function dr(e,t,n,m,l,s){const d=S("taux");return r(),a(g,null,[(r(!0),a(g,null,y(l.listeTaux,o=>(r(),a("div",null,[o.tauxRemu?u("",!0):(r(),k(d,{onSupprimer:s.supprimer,onRefreshListe:s.refreshListe,key:o.id,taux:o,listeTaux:l.listeTaux},null,8,["onSupprimer","onRefreshListe","taux","listeTaux"]))]))),256)),n.canEditTaux?(r(),a("a",{key:0,class:"btn btn-primary",href:l.ajoutUrl,onClick:t[0]||(t[0]=b((...o)=>s.ajout&&s.ajout(...o),["prevent"]))},"Ajout d'un nouveau taux",8,ur)):u("",!0)],64)}const cr=x(lr,[["render",dr]]),mr=Object.freeze(Object.defineProperty({__proto__:null,default:cr},Symbol.toStringTag,{value:"Module"})),hr={UHeures:"Application/UI/UHeures",Utilisateur:"Application/Utilisateur"};function fr(e){for(let t in e)for(let n in e[t])I(e[t][n],t)}function _r(){let e=document.getElementById("unicaen-vue-toast-container");return e||(e=document.createElement("div"),e.id="unicaen-vue-toast-container",e.classList.add("toast-container","position-fixed","top-0","end-0","p-3"),document.body.appendChild(e)),e}function vr(e){return e=pr(e),e=br(e),e}function pr(e){const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector(".alert");return n?n.innerHTML:t.innerHTML}function br(e){const t=document.createElement("div");return t.innerHTML=e,t.querySelectorAll("i.fas").forEach(m=>m.style.display="none"),t.innerHTML}function I(e,t){const n={info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-danger"},m={info:"info-circle",success:"check-circle",warning:"exclamation-circle",error:"exclamation-triangle"},l=document.createElement("button");l.classList.add("btn-close","btn-close-white","h5"),l.style.float="right",l.setAttribute("data-bs-dismiss","toast"),l.setAttribute("aria-label","Close");const s=document.createElement("i");s.classList.add("icon","fas",`fa-${m[t]}`),s.style.float="left",s.style.fontSize="26pt",s.style.paddingLeft=".4rem",s.style.marginTop=".4rem",s.style.paddingRight="1rem";const d=document.createElement("div");d.classList.add("toast-body"),d.innerHTML=vr(e);const o=document.createElement("div");o.appendChild(l),o.appendChild(s),o.appendChild(d);const f=document.createElement("div");f.classList.add("toast","text-white",n[t]?n[t]:"bg-secondary"),f.setAttribute("role","alert"),f.setAttribute("aria-live","assertive"),f.setAttribute("aria-atomic","true"),t==="error"&&e.length>500&&f.setAttribute("style","width:700px"),f.appendChild(o),_r().appendChild(f);const C={animation:!0,delay:t==="warning"?15e3:5e3,autohide:t!=="error"};new bootstrap.Toast(f,C).show()}const R={toast:I,toasts:fr};let U={...X};U.interceptors.request.use(e=>{if(e.submitter){let t=e.msg?e.msg:"Action en cours";e.popover!=null&&e.popover.dispose(),e.popover=new bootstrap.Popover(e.submitter,{content:`<div class="spinner-border text-primary" role="status">
+ <span class="visually-hidden">Loading...</span>
+</div> `+t,html:!0,trigger:"focus"}),e.popover.show()}return e});U.interceptors.response.use(e=>{if(e.messages=e.data.messages,e.data=e.data.data,e.hasErrors=!!(e.messages&&e.messages.error&&e.messages.error.length>0),e.config.popover){var t=e.config.popover;let n="";for(ns in e.messages)for(mid in e.messages[ns])n+='<div class="alert fade show alert-'+(ns=="error"?"danger":ns)+'" role="alert">'+e.messages[ns][mid]+"</div>";n?(t._config.content=n,t.setContent(),setTimeout(()=>{t.dispose()},5e3)):t.dispose()}return e.messages&&R.toasts(e.messages),e},e=>{let t=e.response.data;e.response.status==403?t="<h4>403 - Accès interdit</h4><br />Vous n'êtes pas autorisé(e) à faire cette action.":t=e.response.data,R.toast(t,"error")});U.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const gr={uvAxios:U},E={axios:gr.uvAxios,flashMessenger:R,url:(e,t,n)=>{let m=window.__unicaenVueBaseUrl;if(t)for(let s in t)e=e.replace(`:${s}`,t[s]);let l=n?E.encodeUrlQueryParam(n):null;return m+e+(l?`?${l}`:"")},encodeUrlQueryParam:(e,t)=>{var n=[];for(var m in e)if(e.hasOwnProperty(m)){var l=e[m],s=t?t+"["+encodeURIComponent(m)+"]":encodeURIComponent(m);if(typeof l=="object"&&l!==null)n.push(E.encodeUrlQueryParam(l,s));else{var d=encodeURIComponent(l);n.push(s+"="+d)}}return n.join("&")}};window.unicaenVue=E;function yr(e,t){const n={};t===void 0&&(t={});for(const m in e){let s=m.slice(2,-4).replace("/","");n[s]=e[m].default}for(const m of document.getElementsByClassName("vue-app")){let l=W({template:m.innerHTML,components:n});if(t.beforeMount!==void 0&&t.beforeMount(l),t.autoloads!==void 0)for(const s in t.autoloads){let d=t.autoloads[s].replace("/","");l.component(s,n[d])}l.mount(m),t.afterMount!==void 0&&t.afterMount(l)}}const xr={init:yr},Cr=Object.assign({"./Application/UI/UHeures.vue":te,"./Application/Utilisateur.vue":ae,"./Intervenant/Recherche.vue":De,"./Mission/Liste.vue":Wt,"./Mission/ListeCandidatures.vue":gi,"./Mission/ListeOffreEmploi.vue":Xn,"./Mission/Mission.vue":zt,"./Mission/OffreEmploi.vue":Bn,"./Mission/Suivi.vue":ws,"./Mission/SuiviEvent.vue":Ms,"./Paiement/ListeTaux.vue":mr,"./Paiement/Taux.vue":or}),Vr={autoloads:hr};xr.init(Cr,Vr);
diff --git a/public/dist/manifest.json b/public/dist/manifest.json
index efa6520fdca5c1968af40fbde234cea2a28a36a5..7f72ad183f2babce7acbd5932343a676a003d240 100644
--- a/public/dist/manifest.json
+++ b/public/dist/manifest.json
@@ -3,14 +3,14 @@
"file": "assets/vendor-aed55673.js"
},
"main.css": {
- "file": "assets/main-60550d9c.css",
+ "file": "assets/main-4e3d9e0c.css",
"src": "main.css"
},
"main.js": {
"css": [
- "assets/main-60550d9c.css"
+ "assets/main-4e3d9e0c.css"
],
- "file": "assets/main-217768f9.js",
+ "file": "assets/main-ea1c4ffa.js",
"imports": [
"_vendor-aed55673.js"
],