From 1ccb50cb0659c74b5ee00993b2a79713c588b7b7 Mon Sep 17 00:00:00 2001 From: Cherif Date: Wed, 16 Jul 2025 20:04:52 +0200 Subject: [PATCH] 16/07/2025 - 20h --- src/components/AddClassManual.js | 333 ++++++++++++++- src/components/AddPartnerClient.js | 2 +- src/components/DisplayDetailClass_new_v2.js | 4 +- src/components/DisplayDetailClass_new_v3.js | 4 +- src/components/DisplayPartnerPromotion.js | 24 +- src/components/DisplayPartnerSession.js | 24 +- src/components/Display_Action_And_Class.js | 4 +- ...play_Partner_Catalog_DetailClass_new_v2.js | 385 +++++++++++------- .../Ent_Student_Affichage_Ftion_Grid.js | 2 +- src/components/Inscription_Information.js | 6 +- ...on_Partner_Catalog_Special_JMJFormation.js | 4 +- ...play_Partner_Catalog_DetailClass_new_v2.js | 4 +- .../Jmjformation_Catalogue_Public.js | 2 +- src/components/Module_Editique.js | 51 +-- src/components/Module_Ent_Mes_Formations.js | 2 +- .../Module_Session_Notes_Classement.js | 65 ++- src/components/Mon_Catalogue_Public.js | 4 +- src/components/New_C_Formation_2025.js | 15 +- src/components/Partner.js | 4 +- src/components/UpdatePartnerInfo.js | 2 +- .../new_detail_formation_2025.js | 364 ++++++++++------- .../new_s_detail_formation_2025.css | 72 +++- 22 files changed, 973 insertions(+), 404 deletions(-) diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js index 16f0cda..12e1f00 100644 --- a/src/components/AddClassManual.js +++ b/src/components/AddClassManual.js @@ -14,9 +14,9 @@ import { Editor } from '@tinymce/tinymce-react'; import { IoArrowUndoCircle } from "react-icons/io5"; import { GrUserAdmin, GrOrderedList } from "react-icons/gr"; import parse from 'html-react-parser'; -import fileDownload from 'js-file-download' -import 'react-tooltip/dist/react-tooltip.css' -import { Tooltip } from 'react-tooltip' +import fileDownload from 'js-file-download'; +import 'react-tooltip/dist/react-tooltip.css'; +import { Tooltip } from 'react-tooltip'; import Popup from 'reactjs-popup'; import 'reactjs-popup/dist/index.css'; import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; @@ -1771,6 +1771,7 @@ const AddClassManual = (props) => { if (mylocaltraining._id) { setselected_class_id(mylocaltraining._id); Get_List_Of_All_PJ(mylocaltraining._id); + Get_Class_Catalogue_File(mylocaltraining._id); } //document.getElementsByName("external_code")[0].value = mylocaltraining.external_code; @@ -3838,6 +3839,96 @@ const AddClassManual = (props) => { }; + // Cette fonction permet d'enregister la fiche catalogue d'une formation + const [Record_Class_Catalogue_File_api, setRecord_Class_Catalogue_File_api] = useState(); + const [Record_Class_Catalogue_File_result, setRecord_Class_Catalogue_File_result] = useState(); + const [Record_Class_Catalogue_File_message, setRecord_Class_Catalogue_File_message] = useState(); + + function Record_Class_Catalogue_File() { + + if (!p_detail_one_file_to_download_type_name) { + //alert(" Vous devez donner un nom à la pièce jointe"); + setdisplay_alert_mysy("1"); + setalert_message("Vous devez donner un nom à la pièce jointe"); + setalert_type("error"); + return; + } + + if (file_1_name && file_1_name.name) { + //console.log(" ### Traitement de : ", file_1_name.name); + + const formData = new FormData(); + formData.append('File', file_1_name); + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + formData.append("token", stored_cookie); + formData.append("file_business_object", p_detail_one_file_to_download_type_name); + formData.append("file_name", file_1_name.name); + formData.append("status", "0"); + formData.append("object_owner_collection", "myclass"); + formData.append("object_owner_id", selected_class_id); + formData.append("type_document", "catalogue_file"); + + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + + setLoading(true); + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Store_User_Downloaded_File/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + setLoading(false); + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("true")) { + //console.log('Success:', result['message']); + setRecord_Class_Catalogue_File_result(result['message']); + setRecord_Class_Catalogue_File_api("true"); + + // Get_List_Of_All_PJ(selected_class_id); + setfile_1_name(); + setp_detail_one_file_to_download_type_name(); + //GetCurrentClass_trainingsession(); + // alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée") + setdisplay_alert_mysy("1"); + setalert_message(" La pièce jointe " + file_1_name.name + " a été bien enregistrée"); + setalert_type("success"); + + } + else { + setRecord_Class_Catalogue_File_message(result['message']); + setRecord_Class_Catalogue_File_api("false"); + //alert(result['message']); + setdisplay_alert_mysy("1"); + setalert_message(result['message']); + setalert_type("error"); + } + + }) + .catch((error) => { + setLoading(false); + console.error(' Record_Class_Catalogue_File Error:', error); + setRecord_Class_Catalogue_File_api("false"); + // alert(" Impossible d'ajouter la pièce jointe"); + setdisplay_alert_mysy("1"); + setalert_message("Impossible d'ajouter la pièce jointe"); + setalert_type("error"); + }); + + } + + + } + + + + const [add_one_eu_to_class, setadd_one_eu_to_class] = useState(""); const [Record_All_PJ_api, setRecord_All_PJ_api] = useState(); @@ -3892,6 +3983,7 @@ const AddClassManual = (props) => { setRecord_All_PJ_api("true"); Get_List_Of_All_PJ(selected_class_id); + Get_Class_Catalogue_File(selected_class_id); setfile_1_name(); setp_detail_one_file_to_download_type_name(); //GetCurrentClass_trainingsession(); @@ -3961,6 +4053,7 @@ const AddClassManual = (props) => { setDelete_one_attached_document_result(result['message']); setDelete_one_attached_document_api("true"); Get_List_Of_All_PJ(selected_class_id); + Get_Class_Catalogue_File(selected_class_id); // alert(result['message']); setdisplay_alert_mysy("1"); setalert_message(result['message']); @@ -3997,8 +4090,66 @@ const AddClassManual = (props) => { } + + + const [Get_Class_Catalogue_File_api, setGet_Class_Catalogue_File_api] = useState(); + const [Get_Class_Catalogue_File_result, setGet_Class_Catalogue_File_result] = useState([]); + const [Get_Class_Catalogue_File_message, setGet_Class_Catalogue_File_message] = useState(); + + function Get_Class_Catalogue_File(local_employee_id) { + + const formData = new FormData(); + + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + formData.append("token", stored_cookie); + formData.append("filter_object_owner_collection", "myclass"); + formData.append("filter_object_owner_id", local_employee_id); + formData.append("filter_type_document", "catalogue_file"); + + + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + setLoading(true); + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files_With_Filter/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + setLoading(false); + + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("true")) { + //console.log('Message :', result['message']); + setGet_Class_Catalogue_File_result(result['message']); + setGet_Class_Catalogue_File_api("true"); + + } + else { + setGet_Class_Catalogue_File_message(result['message']); + setGet_Class_Catalogue_File_api("false"); + } + + }) + .catch((error) => { + setLoading(false); + console.error(' Get_Class_Catalogue_File Error:', error); + setGet_Class_Catalogue_File_api("false"); + }); + + } + + + + const [Get_List_Of_All_PJ_api, setGet_List_Of_All_PJ_api] = useState(); - const [Get_List_Of_All_PJ_result, setGet_List_Of_All_PJ_result] = useState(); + const [Get_List_Of_All_PJ_result, setGet_List_Of_All_PJ_result] = useState([]); const [Get_List_Of_All_PJ_message, setGet_List_Of_All_PJ_message] = useState(); function Get_List_Of_All_PJ(local_employee_id) { @@ -5575,6 +5726,7 @@ const AddClassManual = (props) => { {String(props.formation_initiale) !== "1" &&
+ {String(props.mytrainingclass.ref).trim() !== "" && }
} @@ -7321,7 +7473,7 @@ const AddClassManual = (props) => { resize: false, height: 300, menubar: true, - plugins: [ + plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', @@ -7381,7 +7533,7 @@ const AddClassManual = (props) => { resize: false, height: 300, menubar: true, - plugins: [ + plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', @@ -7479,7 +7631,7 @@ const AddClassManual = (props) => { resize: false, height: 300, menubar: true, - plugins: [ + plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', @@ -7516,7 +7668,7 @@ const AddClassManual = (props) => { resize: false, height: 300, menubar: true, - plugins: [ + plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', @@ -7554,7 +7706,7 @@ const AddClassManual = (props) => { resize: false, height: 300, menubar: true, - plugins: [ + plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', @@ -7614,7 +7766,7 @@ const AddClassManual = (props) => { resize: false, height: 300, menubar: true, - plugins: [ + plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', @@ -7650,7 +7802,7 @@ const AddClassManual = (props) => { resize: false, height: 300, menubar: true, - plugins: [ + plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', @@ -7686,7 +7838,7 @@ const AddClassManual = (props) => { resize: false, height: 300, menubar: true, - plugins: [ + plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', @@ -7745,7 +7897,7 @@ const AddClassManual = (props) => { resize: false, height: 300, menubar: true, - plugins: [ + plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', @@ -7804,7 +7956,7 @@ const AddClassManual = (props) => { resize: false, height: 300, menubar: true, - plugins: [ + plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', @@ -7930,16 +8082,155 @@ const AddClassManual = (props) => { */} - - - } + {String(props.check_user_acces_right("formation", "write")) === "1" &&
+ + Fiche catalogue
+ {String(props.check_user_acces_right("formation", "write")) === "1" &&
+ + {Get_Class_Catalogue_File_result && Get_Class_Catalogue_File_result.length <= 0 &&
+ +
} + {file_1_name && file_1_name.name && + } + + {Record_Class_Catalogue_File_api && String(Record_Class_Catalogue_File_api) === "true" &&
Pièce jointe enregistrée
} + + {Record_Class_Catalogue_File_api && String(Record_Class_Catalogue_File_api) === "false" &&
{Record_Class_Catalogue_File_message}
} + + +
} + + + {file_1_name && file_1_name.name &&
+ +
+ +
+ + +
} + + {Get_Class_Catalogue_File_result &&
+
+ +
+ {Get_Class_Catalogue_File_result && Get_Class_Catalogue_File_result.map((val) => ( +
+ + + + + {String(props.check_user_acces_right("formation", "write")) === "1" && Supprimer + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + En confirmant cette opération, la pièce jointe sera définitivement supprimée.
+ + +
+
+
+ + +
+
+ +
+
+
+ )} +
} + +
+ ))} +
+
+
} + + +
}
@@ -7950,7 +8241,7 @@ const AddClassManual = (props) => { 2 - Image Bannière
3 - L'image par defaut du métier dans le système "> -
Image de profil
+
Image de profil

@@ -7966,7 +8257,7 @@ const AddClassManual = (props) => {
}
- {String(props.check_user_acces_right("formation", "write")) === "1" &&
+ {String(props.check_user_acces_right("formation", "write")) === "1" &&
  • L'image doit etre carrée.
  • diff --git a/src/components/AddPartnerClient.js b/src/components/AddPartnerClient.js index 4f4b42a..60f6bf0 100644 --- a/src/components/AddPartnerClient.js +++ b/src/components/AddPartnerClient.js @@ -4774,7 +4774,7 @@ const AddParnerClient = (props) => { />
    -
    Conditions Paiement aa
    +
    Conditions Paiement
    {/*String(formedit_mode_invoice) !== "1" && { {DetailTraining["pourqui"] &&
    - Pour Qui ? + Pour Qui
    {DetailTraining["pourqui"] &&
    @@ -2146,7 +2146,7 @@ const DisplayDetailClass_new_v2 = (props) => { {DetailTraining["pourqui"] && String(DetailTraining["pourqui"]).length > 2 &&
    - Pour Qui ? + Pour Qui
    {DetailTraining["pourqui"] &&
    {parse(String(DetailTraining["pourqui"]))} diff --git a/src/components/DisplayDetailClass_new_v3.js b/src/components/DisplayDetailClass_new_v3.js index 5d31d7c..eeec597 100644 --- a/src/components/DisplayDetailClass_new_v3.js +++ b/src/components/DisplayDetailClass_new_v3.js @@ -1836,7 +1836,7 @@ const DisplayDetailClass_new_v3 = (props) => { {DetailTraining["pourqui"] &&
    - Pour Qui ? + Pour Qui
    {DetailTraining["pourqui"] &&
    @@ -2242,7 +2242,7 @@ const DisplayDetailClass_new_v3 = (props) => { {DetailTraining["pourqui"] && String(DetailTraining["pourqui"]).length > 2 &&
    - Pour Qui ? + Pour Qui
    {DetailTraining["pourqui"] &&
    {parse(String(DetailTraining["pourqui"]))} diff --git a/src/components/DisplayPartnerPromotion.js b/src/components/DisplayPartnerPromotion.js index f295e3f..eb1f65b 100644 --- a/src/components/DisplayPartnerPromotion.js +++ b/src/components/DisplayPartnerPromotion.js @@ -15,7 +15,7 @@ import { Tooltip } from 'react-tooltip' import TextareaAutosize from '@mui/material/TextareaAutosize'; import excel_icone from "../mysy_img/excel_icone.png"; import participants from "../mysy_img/participants.png"; -import fileDownload from 'js-file-download' +import fileDownload from 'js-file-download'; import Popup from 'reactjs-popup'; import 'reactjs-popup/dist/index.css'; import { FcSearch } from "react-icons/fc"; @@ -883,7 +883,7 @@ const DisplayPartnerPromotion = (props) => { setAnchorEl(null); if (option && String(option) === "Mise à jour") { - setdialogOpen_supp(true); + setdialogOpen_update(true); } else if (option && String(option) === "Valider Insc.") { @@ -905,8 +905,8 @@ const DisplayPartnerPromotion = (props) => { {/*** GESTION Dialog menu pour la mise à jour */} - {dialogOpen_supp && null} @@ -936,7 +936,7 @@ const DisplayPartnerPromotion = (props) => {
    -
    MySy Information
    @@ -950,7 +950,7 @@ const DisplayPartnerPromotion = (props) => {
    @@ -959,7 +959,7 @@ const DisplayPartnerPromotion = (props) => { className="gest_bton_popup_annuler" onClick={() => { // console.log('modal closed '); - Dialog_menuitem_close_supp(); + Dialog_menuitem_close_update(); }} > Annuler @@ -1213,6 +1213,10 @@ const DisplayPartnerPromotion = (props) => { + const [dialogOpen_update, setdialogOpen_update] = useState(false); + const Dialog_menuitem_close_update = () => { + setdialogOpen_update(false) + }; const [working_cellValues, setworking_cellValues] = useState(false); @@ -5230,6 +5234,7 @@ const DisplayPartnerPromotion = (props) => { setLoading(false); if (String(res.data.status) === String("true")) { + Get_List_Partner_Clients(); //console.log(" In Invoice_Session_Formation_By_Selected_Inscrit res.data.status = " + res.data.status); //console.log(" In Invoice_Session_Formation_By_Selected_Inscrit res.data.message r_class = " + res.data.message); setInvoice_Session_Formation_By_Selected_Inscrit_api("true"); @@ -12307,8 +12312,8 @@ const DisplayPartnerPromotion = (props) => { } var url = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Convention_From_Session_For_Selected_Inscrit_By_PDF/" + stored_cookie + "/" + selected_session_id + "/" + selected_convention_id + "/" + tab_my_inscription_ids; - console.log(" ### tab_my_inscription_ids = ", tab_my_inscription_ids); - console.log(" ### url = ", url); + // console.log(" ### tab_my_inscription_ids = ", tab_my_inscription_ids); + // console.log(" ### url = ", url); @@ -26386,6 +26391,7 @@ const DisplayPartnerPromotion = (props) => { {String(selected_session_invoiced_statut) !== "1" && String(selected_session_invoiced_statut) !== "2" &&
    MySy Information
    @@ -953,7 +953,7 @@ const DisplayPartnerSession = (props) => {
    @@ -962,7 +962,7 @@ const DisplayPartnerSession = (props) => { className="gest_bton_popup_annuler" onClick={() => { // console.log('modal closed '); - Dialog_menuitem_close_supp(); + Dialog_menuitem_close_update(); }} > Annuler @@ -1217,6 +1217,12 @@ const DisplayPartnerSession = (props) => { + const [dialogOpen_update, setdialogOpen_update] = useState(false); + const Dialog_menuitem_close_update = () => { + setdialogOpen_update(false) + }; + + const [working_cellValues, setworking_cellValues] = useState(false); const [dialogOpen_supp, setdialogOpen_supp] = useState(false); @@ -3812,6 +3818,7 @@ const DisplayPartnerSession = (props) => { } function submenu_preinscrit() { + Get_List_Partner_Clients(); setsubmenu("preinscrit"); GetListePreinscrit(selected_session_id, selected_internal_url); @@ -3819,6 +3826,7 @@ const DisplayPartnerSession = (props) => { } function submenu_inscrit() { + Get_List_Partner_Clients(); setsubmenu("inscrit"); GetListeInscrit(selected_session_id, selected_internal_url); @@ -5243,6 +5251,7 @@ const DisplayPartnerSession = (props) => { setLoading(false); if (String(res.data.status) === String("true")) { + Get_List_Partner_Clients(); //console.log(" In Invoice_Session_Formation_By_Selected_Inscrit res.data.status = " + res.data.status); //console.log(" In Invoice_Session_Formation_By_Selected_Inscrit res.data.message r_class = " + res.data.message); setInvoice_Session_Formation_By_Selected_Inscrit_api("true"); @@ -17820,7 +17829,7 @@ const DisplayPartnerSession = (props) => { -
    yyyChoisir un modèle d'émargement +
    Choisir un modèle d'émargement { {String(selected_session_invoiced_statut) !== "1" && String(selected_session_invoiced_statut) !== "2" && + + } +
    } diff --git a/src/components/Mon_Catalogue_Public.js b/src/components/Mon_Catalogue_Public.js index f290961..155f5f3 100644 --- a/src/components/Mon_Catalogue_Public.js +++ b/src/components/Mon_Catalogue_Public.js @@ -3,7 +3,7 @@ import { useForm } from "react-hook-form"; import axios from "axios"; import Formation_Partner_Catalog from "./Formation_Partner_Catalog"; import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa'; - + import { IoAppsSharp, IoListSharp } from "react-icons/io5"; import Formation_Grid_2Col from "./Formation_Grid_2Col"; import Pagination from "./TestPagination"; @@ -4877,7 +4877,7 @@ const Mon_Catalogue_Public = (props) => {
    -
    +
    diff --git a/src/components/New_C_Formation_2025.js b/src/components/New_C_Formation_2025.js index 3eaf185..301a574 100644 --- a/src/components/New_C_Formation_2025.js +++ b/src/components/New_C_Formation_2025.js @@ -1,7 +1,7 @@ import React, { useState, useEffect } from "react"; import { useHistory } from "react-router-dom"; - + import { useCookies } from "react-cookie"; import { confirmAlert } from 'react-confirm-alert'; @@ -23,7 +23,7 @@ import axios from "axios"; import Rating from '@mui/material/Rating'; import parse from 'html-react-parser' import { CiLocationOn } from "react-icons/ci"; - + const New_C_Formation_2025 = (props) => { const [userconnected, setuserconnected] = useState("0"); const [partnerconnected, setpartnerconnected] = useState("0"); @@ -265,11 +265,12 @@ const New_C_Formation_2025 = (props) => { display: 'flex', flexDirection: 'column', }, + image: { maxWidth: '100%', height: '200px', overflow: 'hidden', - marginTop: '-2rem' + margin: "auto", }, content: { @@ -420,7 +421,7 @@ const New_C_Formation_2025 = (props) => { {/*props.formation.institut_formation &&
    Dispensé par :
    {String(props.formation.institut_formation)}
    */}
    } - +
    @@ -441,8 +442,8 @@ const New_C_Formation_2025 = (props) => {

    {props.formation.business_prices[0].discounted_price}€ HT  - {props.formation.price} € HT   - ({props.formation.business_prices[0].discount} %)

    + {props.formation.price} € HT   + ({props.formation.business_prices[0].discount} %)

    }

    {String(parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))).substring(0, 80)}...

    @@ -472,7 +473,7 @@ const New_C_Formation_2025 = (props) => {
    - +
    ) diff --git a/src/components/Partner.js b/src/components/Partner.js index 727b4f0..84bb74c 100644 --- a/src/components/Partner.js +++ b/src/components/Partner.js @@ -1967,8 +1967,8 @@ const Partner = (props) => { {String(menu) !== "affichage" && }> CATALOGUE } {String(menu) === "affichage" && }> CATALOGUE } - {String(formation_initiale) === "1" && String(menu) !== "mes_ue" && }> UNIT. ENSEI. } - {String(formation_initiale) === "1" && String(menu) === "mes_ue" && }> UNIT. ENSEI. } + {String(menu) !== "mes_ue" && }> UNIT. ENSEI. } + {String(menu) === "mes_ue" && }> UNIT. ENSEI. } {String(menu) !== "domaine_categorie_metier" && }> CARACTERISTIQUES } {String(menu) === "domaine_categorie_metier" && }> CARACTERISTIQUES } diff --git a/src/components/UpdatePartnerInfo.js b/src/components/UpdatePartnerInfo.js index 50919ff..b559713 100644 --- a/src/components/UpdatePartnerInfo.js +++ b/src/components/UpdatePartnerInfo.js @@ -2708,7 +2708,7 @@ function UpdateParnterInfo(props) { }).catch((error) => { setLoading(false); - console.warn('UpdateStagiaireData : Not good man :( Add_Update_Catalog_Pub_Banniere = ' + error); + console.warn('Add_Update_Catalog_Pub_Banniere : Not good man :( Add_Update_Catalog_Pub_Banniere = ' + error); setAdd_Update_Catalog_Pub_Banniere_api("false"); alert(" Impossible de mettre à jour la bannière "); diff --git a/src/components/detail_formation_automatic_files/new_detail_formation_2025.js b/src/components/detail_formation_automatic_files/new_detail_formation_2025.js index 68a0124..ca5e0b9 100644 --- a/src/components/detail_formation_automatic_files/new_detail_formation_2025.js +++ b/src/components/detail_formation_automatic_files/new_detail_formation_2025.js @@ -4,7 +4,7 @@ import { useParams } from 'react-router-dom' import axios from "axios"; import { FcInfo } from "react-icons/fc"; import 'reactjs-popup/dist/index.css'; - +import fileDownload from 'js-file-download'; import { Helmet } from "react-helmet"; import 'react-slideshow-image/dist/styles.css' import 'react-tooltip/dist/react-tooltip.css' @@ -360,6 +360,56 @@ const New_C_Detail_Formation_2025 = (props) => { } + const [Get_Class_Catalogue_File_api, setGet_Class_Catalogue_File_api] = useState(); + const [Get_Class_Catalogue_File_result, setGet_Class_Catalogue_File_result] = useState([]); + const [Get_Class_Catalogue_File_message, setGet_Class_Catalogue_File_message] = useState(); + + function Get_Class_Catalogue_File(class_id) { + + const formData = new FormData(); + + formData.append("filter_object_owner_collection", "myclass"); + formData.append("filter_object_owner_id", class_id); + formData.append("filter_type_document", "catalogue_file"); + + + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files_With_Filter_No_Token/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("true")) { + //console.log('Message :', result['message']); + setGet_Class_Catalogue_File_result(result['message']); + setGet_Class_Catalogue_File_api("true"); + + } + else { + setGet_Class_Catalogue_File_message(result['message']); + setGet_Class_Catalogue_File_api("false"); + } + + }) + .catch((error) => { + + console.error(' Get_Class_Catalogue_File Error:', error); + setGet_Class_Catalogue_File_api("false"); + }); + + } + + + + function Display(e) { var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class/"; @@ -484,6 +534,9 @@ const New_C_Detail_Formation_2025 = (props) => { getClassImage_no_token(JSON.parse(res.data.message)._id, JSON.parse(res.data.message).external_code); + Get_Class_Catalogue_File(JSON.parse(res.data.message)._id); + + if (JSON.parse(res.data.message).note) { setratingvalue(JSON.parse(res.data.message).note); } @@ -559,136 +612,139 @@ const New_C_Detail_Formation_2025 = (props) => { //console.log("nb_partner_certificat = ", JSON.parse(res.data.message).nb_partner_certificat); - - if (window.screen.width < 601) { - - var decalage_pr_certificat = parseInt(String(JSON.parse(res.data.message).nb_partner_certificat)) * 150; - //console.log("decalage_pr_certificat = ", decalage_pr_certificat); - - var local_val = parseInt(String(JSON.parse(res.data.message).nb_pave_a_afficher)); - - //console.log("### local_val = ", local_val) - if (local_val >= 5) { - //console.log(" ON PASSE  au MAX") - var local_tmp_val = 2300 + decalage_pr_certificat; - var local_main_h_px = 4000 + decalage_pr_certificat; - //console.log("### local_tmp_val = ", local_tmp_val, " local_main_h_px = ",local_main_h_px); - local_tmp = local_tmp_val + "px"; - main_h_px = local_main_h_px + "px"; - - if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { - - var local_tmp_val = 2800 + decalage_pr_certificat; - var local_main_h_px = 4500 + decalage_pr_certificat; - local_tmp = local_tmp_val + "px"; - main_h_px = local_main_h_px + "px"; - } - - } else { - //console.log(" ON PASSE  au MIN"); - var local_tmp_val = 2100 + decalage_pr_certificat; - var local_main_h_px = 4800 + decalage_pr_certificat; - - local_tmp = local_tmp_val + "px"; - main_h_px = local_main_h_px + "px"; - - if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { - var local_tmp_val = 2600 + decalage_pr_certificat; - var local_main_h_px = 5300 + decalage_pr_certificat; - local_tmp = local_tmp_val + "px"; - main_h_px = local_main_h_px + "px"; - } - } - // document.getElementById('mob_block_cross_sell_cat').style.top = local_tmp; - //document.getElementById('mobile').style.height = main_h_px; - - } - - if (window.screen.width >= 601 && window.screen.width <= 991) { - - var local_val = parseInt(String(JSON.parse(res.data.message).nb_pave_a_afficher)); - if (local_val >= 5) { - //console.log(" ON PASSE  au MAX") - local_tmp = "2000px"; - main_h_px = "2700px"; - - if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { - local_tmp = "2500px"; - main_h_px = "3200px"; - } - - } else { - console.log(" ON PASSE  au MIN"); - local_tmp = "1700px"; - main_h_px = "2500px"; - - if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { - local_tmp = "2200px"; - main_h_px = "3000px"; - } - - } - document.getElementById('block_crossell_meme_orga').style.top = local_tmp; - document.getElementById('desktop').style.height = main_h_px; - - - } - - if (window.screen.width >= 992 && window.screen.width <= 1199) { - - var local_val = parseInt(String(JSON.parse(res.data.message).nb_pave_a_afficher)); - if (local_val >= 5) { - console.log(" ON PASSE  au MAX") - local_tmp = "2000px"; - main_h_px = "2800px"; - - if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { - local_tmp = "2500px"; - main_h_px = "3200px"; - } - - } else { - console.log(" ON PASSE  au MIN"); - local_tmp = "1700px"; - main_h_px = "2500px"; - - if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { - local_tmp = "2200px"; - main_h_px = "3000px"; - } - - } - document.getElementById('block_crossell_meme_orga').style.top = local_tmp; - document.getElementById('desktop').style.height = main_h_px; - } - - if (window.screen.width >= 1200) { - var local_val = parseInt(String(JSON.parse(res.data.message).nb_pave_a_afficher)); - if (local_val >= 5) { - console.log(" ON PASSE  au MAX") - local_tmp = "2000px"; - main_h_px = "2800px"; - - if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { - local_tmp = "2500px"; - main_h_px = "3200px"; - } - - } else { - //console.log(" ON PASSE  au MIN"); - local_tmp = "1700px"; - main_h_px = "2500px"; - - if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { - local_tmp = "2300px"; - main_h_px = "3000px"; - } - } - - document.getElementById('block_crossell_meme_orga').style.top = local_tmp; - document.getElementById('desktop').style.height = main_h_px; - } - + /* + if (window.screen.width < 601) { + + var decalage_pr_certificat = parseInt(String(JSON.parse(res.data.message).nb_partner_certificat)) * 150; + //console.log("decalage_pr_certificat = ", decalage_pr_certificat); + + var local_val = parseInt(String(JSON.parse(res.data.message).nb_pave_a_afficher)); + + //console.log("### local_val = ", local_val) + if (local_val >= 5) { + //console.log(" ON PASSE  au MAX") + var local_tmp_val = 2300 + decalage_pr_certificat; + var local_main_h_px = 4000 + decalage_pr_certificat; + //console.log("### local_tmp_val = ", local_tmp_val, " local_main_h_px = ",local_main_h_px); + local_tmp = local_tmp_val + "px"; + main_h_px = local_main_h_px + "px"; + + if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { + + var local_tmp_val = 2800 + decalage_pr_certificat; + var local_main_h_px = 4500 + decalage_pr_certificat; + local_tmp = local_tmp_val + "px"; + main_h_px = local_main_h_px + "px"; + } + + } else { + //console.log(" ON PASSE  au MIN"); + var local_tmp_val = 2100 + decalage_pr_certificat; + var local_main_h_px = 4800 + decalage_pr_certificat; + + local_tmp = local_tmp_val + "px"; + main_h_px = local_main_h_px + "px"; + + if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { + var local_tmp_val = 2600 + decalage_pr_certificat; + var local_main_h_px = 5300 + decalage_pr_certificat; + local_tmp = local_tmp_val + "px"; + main_h_px = local_main_h_px + "px"; + } + } + // document.getElementById('mob_block_cross_sell_cat').style.top = local_tmp; + //document.getElementById('mobile').style.height = main_h_px; + + } + + if (window.screen.width >= 601 && window.screen.width <= 991) { + + var local_val = parseInt(String(JSON.parse(res.data.message).nb_pave_a_afficher)); + if (local_val >= 5) { + //console.log(" ON PASSE  au MAX") + local_tmp = "2000px"; + main_h_px = "2700px"; + + if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { + local_tmp = "2500px"; + main_h_px = "3200px"; + } + + } else { + console.log(" ON PASSE  au MIN"); + local_tmp = "1700px"; + main_h_px = "2500px"; + + if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { + local_tmp = "2200px"; + main_h_px = "3000px"; + } + + } + document.getElementById('block_crossell_meme_orga').style.top = local_tmp; + document.getElementById('desktop').style.height = main_h_px; + + + } + + if (window.screen.width >= 992 && window.screen.width <= 1199) { + + var local_val = parseInt(String(JSON.parse(res.data.message).nb_pave_a_afficher)); + if (local_val >= 5) { + console.log(" ON PASSE  au MAX") + local_tmp = "2000px"; + main_h_px = "2800px"; + + if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { + local_tmp = "2500px"; + main_h_px = "3200px"; + } + + } else { + console.log(" ON PASSE  au MIN"); + local_tmp = "1700px"; + main_h_px = "2500px"; + + if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { + local_tmp = "2200px"; + main_h_px = "3000px"; + } + + } + document.getElementById('block_crossell_meme_orga').style.top = local_tmp; + document.getElementById('desktop').style.height = main_h_px; + } + + if (window.screen.width >= 1200) { + var local_val = parseInt(String(JSON.parse(res.data.message).nb_pave_a_afficher)); + if (local_val >= 5) { + console.log(" ON PASSE  au MAX") + local_tmp = "2000px"; + main_h_px = "2800px"; + + if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { + local_tmp = "2500px"; + main_h_px = "3200px"; + } + + } else { + //console.log(" ON PASSE  au MIN"); + local_tmp = "1700px"; + main_h_px = "2500px"; + + if (String(action).toLowerCase() === "information" || String(action).toLowerCase() === "inscription") { + local_tmp = "2300px"; + main_h_px = "3000px"; + } + } + + if (document.getElementById('block_crossell_meme_orga')) { + document.getElementById('block_crossell_meme_orga').style.top = local_tmp; + } + document.getElementById('desktop').style.height = main_h_px; + } + + */ } } @@ -1211,6 +1267,32 @@ const New_C_Detail_Formation_2025 = (props) => { } + const [Download_one_attached_document_no_token_api, setDownload_one_attached_document_no_token_api] = useState(); + const [Download_one_attached_document_no_token_result, setDownload_one_attached_document_no_token_result] = useState(); + const [Download_one_attached_document_no_token_message, setDownload_one_attached_document_no_token_message] = useState(); + + const Download_one_attached_document_no_token = (event) => { + + var nom_fiche_detaillee = "Fiche_catalogue.pdf"; + var file_name = event.target.id; + + + var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Stored_Downloaded_File_From_Id_WITHOUT_TOKEN/" + file_name; + + //console.log(" ### url = ", url); + + + axios.get(url, { responseType: 'blob', },) + .then((res) => { + fileDownload(res.data, nom_fiche_detaillee); + setDownload_one_attached_document_no_token_api("true"); + }).catch((error) => { + console.error('Error:', error); + setDownload_one_attached_document_no_token_api("false"); + + }); + } + /// ---- @@ -1890,12 +1972,12 @@ const New_C_Detail_Formation_2025 = (props) => {
    -
    +
    {DetailTraining["pourqui"] &&
    - Pour Qui ? + Pour Qui
    {DetailTraining["pourqui"] &&
    @@ -1915,7 +1997,7 @@ const New_C_Detail_Formation_2025 = (props) => { {DetailTraining["prerequis"] &&
    - Pré-requis + Pré-requis
    {DetailTraining["prerequis"] &&
    @@ -2162,6 +2244,16 @@ const New_C_Detail_Formation_2025 = (props) => {
    + {Get_Class_Catalogue_File_result && Get_Class_Catalogue_File_result.length > 0 &&
    + + + +
    } + +
    Description @@ -2330,7 +2422,7 @@ const New_C_Detail_Formation_2025 = (props) => { {DetailTraining["pourqui"] && String(DetailTraining["pourqui"]).length > 2 &&
    - Pour Qui ? + Pour Qui
    {DetailTraining["pourqui"] &&
    {parse(String(DetailTraining["pourqui"]))} @@ -2344,7 +2436,7 @@ const New_C_Detail_Formation_2025 = (props) => { {DetailTraining["prerequis"] && String(DetailTraining["prerequis"]).length > 2 &&
    - Pré-requis + Pré-requis
    {DetailTraining["prerequis"] &&
    {parse(String(DetailTraining["prerequis"]))} diff --git a/src/components/detail_formation_automatic_files/new_s_detail_formation_2025.css b/src/components/detail_formation_automatic_files/new_s_detail_formation_2025.css index d4e2745..7d8fd19 100644 --- a/src/components/detail_formation_automatic_files/new_s_detail_formation_2025.css +++ b/src/components/detail_formation_automatic_files/new_s_detail_formation_2025.css @@ -63,6 +63,42 @@ } + + .row_download_fiche { + width: 100%; + margin-bottom: 40px; + font-family: "DM Sans"; + text-align: right; + } + + + .bton_download_fiche { + width: auto; + min-width: 10rem; + padding: 10px; + padding-top: 10px; + padding-bottom: 10px; + + height: auto; + font-family: 'DM Sans'; + font-style: normal; + font-weight: 500; + font-size: 12px; + line-height: 120%; + text-transform: uppercase; + font-feature-settings: 'liga' off; + color: #0AA690; + float: right; + text-align: center; + border-radius: 5px; + margin-right: 10px; + padding-top: 5px; + padding-bottom: 5px; + border: 1px solid #E2E9FB; + cursor: pointer; + } + + @media only screen and (max-width: 600px) { .nob_new_content_1 {} @@ -1513,7 +1549,7 @@ min-height: 8rem; overflow: auto; padding: 10px; - font-family: "DM sans"; + font-family: "DM sans" !important; font-size: 16px; line-height: 180%; min-height: 15rem; @@ -1523,7 +1559,7 @@ min-height: 8rem; overflow: auto; padding: 10px; - font-family: "DM sans"; + font-family: "DM sans" !important; font-size: 16px; line-height: 180%; min-height: 15rem; @@ -1533,7 +1569,7 @@ min-height: 8rem; overflow: auto; padding: 10px; - font-family: "DM sans"; + font-family: "DM sans" !important; font-size: 16px; line-height: 180%; min-height: 15rem; @@ -1543,7 +1579,7 @@ min-height: 8rem; overflow: auto; padding: 10px; - font-family: "DM sans"; + font-family: "DM sans" !important; font-size: 16px; line-height: 120%; min-height: 15rem; @@ -1554,7 +1590,7 @@ min-height: 8rem; overflow: auto; padding: 10px; - font-family: "DM sans"; + font-family: "DM sans" !important; font-size: 16px; line-height: 180%; min-height: 15rem; @@ -6886,7 +6922,7 @@ height: 24px; - font-family: 'Albert Sans'; + font-family: 'Inter' !important; font-style: normal; font-weight: 700; font-size: 20px; @@ -6911,7 +6947,7 @@ .block_info_page_pave_title_desc_desc { width: 100%; - font-family: Roboto, Verdana, Georgia, Arial, 'Times New Roman'; + font-family: 'Inter' !important; font-style: normal; font-weight: 500; font-size: 16px; @@ -6922,7 +6958,7 @@ /* Bold Grey */ - color: #4B4B4B; + color: #4B4B4B !important; /* Inside auto layout */ @@ -6934,7 +6970,7 @@ } .programme_block { - font-family: 'Inter'; + font-family: 'Inter' !important; font-style: normal; font-weight: 400; font-size: 16px; @@ -6943,7 +6979,7 @@ font-feature-settings: 'liga' off; /* Foundation /Blue-Grey/Normal */ - color: #4B5162; + color: #4B5162 !important; /* Inside auto layout */ @@ -6955,7 +6991,7 @@ } .description_block { - font-family: 'Inter'; + font-family: 'Inter' !important; font-style: normal; font-weight: 400; font-size: 16px; @@ -6964,7 +7000,7 @@ font-feature-settings: 'liga' off; /* Foundation /Blue-Grey/Normal */ - color: #4B5162; + color: #4B5162 !important; /* Inside auto layout */ @@ -6977,7 +7013,7 @@ } .objectif_block { - font-family: 'Inter'; + font-family: 'Inter' !important; font-style: normal; font-weight: 400; font-size: 16px; @@ -6986,7 +7022,7 @@ font-feature-settings: 'liga' off; /* Foundation /Blue-Grey/Normal */ - color: #4B5162; + color: #4B5162 !important; /* Inside auto layout */ @@ -7002,7 +7038,7 @@ min-height: 5rem; overflow: auto; padding: 10px; - font-family: 'Inter'; + font-family: 'Inter' !important; font-style: normal; font-weight: 400; font-size: 16px; @@ -7011,7 +7047,7 @@ font-feature-settings: 'liga' off; /* Foundation /Blue-Grey/Normal */ - color: #4B5162; + color: #4B5162 !important; /* Inside auto layout */ @@ -7023,7 +7059,7 @@ .pourqui_block { - font-family: 'Inter'; + font-family: 'Inter' !important; font-style: normal; font-weight: 400; font-size: 16px; @@ -7032,7 +7068,7 @@ font-feature-settings: 'liga' off; /* Foundation /Blue-Grey/Normal */ - color: #4B5162; + color: #4B5162 !important; /* Inside auto layout */