branche_01062025
Cherif 2026-04-28 20:56:50 +02:00
parent 67832de175
commit 41623918dc
18 changed files with 3081 additions and 1704 deletions

File diff suppressed because it is too large Load Diff

View File

@ -12056,4 +12056,8 @@ width: 100%;
border: unset;
border-radius: 10px;
}
.fc-event-main{
word-wrap: break-word;
}
`;

View File

@ -2707,7 +2707,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
<Button variant="outlined" onClick={submenu_add_one_UE}
className="detail_class_submenu bton_add_session"
id='menu_import_participant' name='menu_import_participant'>Ajout 1 Module &nbsp;
id='menu_import_participant' name='menu_import_participant'>Ajout 1 UE &nbsp;
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
</Button>
</div>
@ -2720,7 +2720,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
{display_ue && String(display_ue) === "1" && String(add_one_ue) !== "1" && <div className="div_row">
<Button variant="outlined" onClick={submenu_detail} className="detail_class_submenu" id='detail_ue' name='detail_ue'>Détail UE</Button>
<Button variant="outlined" onClick={submenu_planif} className="detail_class_submenu" id='planification_ue' name='planification_ue'>Planification </Button>
<Button variant="outlined" onClick={submenu_planif} className="detail_class_submenu" id='planification_ue' name='planification_ue'>Plan Pédagogique </Button>
</div>}

View File

@ -2720,7 +2720,7 @@ const DisplayPartner_Module_Formation = (props) => {
{display_ue && String(display_ue) === "1" && String(add_one_ue) !== "1" && <div className="div_row">
<Button variant="outlined" onClick={submenu_detail} className="detail_class_submenu" id='detail_ue' name='detail_ue'>Détail UE</Button>
<Button variant="outlined" onClick={submenu_planif} className="detail_class_submenu" id='planification_ue' name='planification_ue'>Planification </Button>
<Button variant="outlined" onClick={submenu_planif} className="detail_class_submenu" id='planification_ue' name='planification_ue'>Plan Pédagogique </Button>
</div>}

File diff suppressed because it is too large Load Diff

View File

@ -9042,4 +9042,8 @@ width: 100%;
border: unset;
border-radius: 10px;
}
.fc-event-main{
word-wrap: break-word;
}
`;

View File

@ -5863,4 +5863,8 @@ width: 100%;
width: 100%;
}
.fc-event-main{
word-wrap: break-word;
}
`;

View File

@ -5933,4 +5933,8 @@ width: 100%;
width: 100%;
}
.fc-event-main{
word-wrap: break-word;
}
`;

View File

@ -1687,4 +1687,8 @@ const local_css = `
width: 100%;
}
.fc-event-main{
word-wrap: break-word;
}
`;

View File

@ -2001,4 +2001,8 @@ const local_css = `
width: 100%;
}
.fc-event-main{
word-wrap: break-word;
}
`;

View File

@ -1643,5 +1643,8 @@ const local_css = `
.react-datepicker-wrapper{
width: 100%;
}
.fc-event-main{
word-wrap: break-word;
}
`;

View File

@ -2978,4 +2978,8 @@ width: 100%;
width: 100%;
}
.fc-event-main{
word-wrap: break-word;
}
`;

View File

@ -1035,4 +1035,8 @@ const local_css = `
width: 100%;
}
.fc-event-main{
word-wrap: break-word;
}
`;

View File

@ -557,7 +557,7 @@ const Module_Session_Evaluation = (props) => {
var node = {
"_id": local_id,
"id": localid,
"label": local_nom + " - " + local_id,
"label": local_nom ,
"nom": local_nom,
"raison_sociale": local_raison_sociale,
"invoice_condition_paiement_id": local_cond_paiement_id,
@ -2749,8 +2749,7 @@ const Module_Session_Evaluation = (props) => {
&& selected_formulaire_type === "client_eval" &&
<div className="session_caract_Dialog"> <b> Choisir client ou financeur </b>
selected_formulaire_type = {selected_formulaire_type} --
selected_client_id = {selected_client_id}
<Autocomplete
disablePortal
name="event_dialog_formateur"

View File

@ -12,7 +12,7 @@ import fileDownload from 'js-file-download';
import { FcViewDetails, FcInfo } from "react-icons/fc";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import { LayersPlus } from 'lucide-react';
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcSearch } from "react-icons/fc";
@ -666,23 +666,28 @@ const Module_Session_Planification = (props) => {
const renderEventContent = (eventInfo) => {
// console.log(" TOTOTOTOTO ", eventInfo.event);
console.log(" TOTOTOTOTO ", eventInfo.event.extendedProps);
var local_grp = []
if (eventInfo.event.extendedProps.tab_grp_apprenant_ids) {
const new_data = eventInfo.event.extendedProps.tab_grp_apprenant_ids.map((x) => {
local_grp.push(x.code)
});
}
return (
<>
{eventInfo.event.extendedProps.local_mode_animation && String(eventInfo.event.extendedProps.local_mode_animation) === "1" &&
<i><b>{eventInfo.timeText} - Distanciel</b><br /></i>}
<i><b>{eventInfo.timeText} - Dist.</b> {local_grp.length > 0 && <b> | {local_grp.toString()} </b>} <hr style={{ margin: '1px' }} /></i>}
{eventInfo.event.extendedProps.local_mode_animation !== "1" &&
<i><b>{eventInfo.timeText}</b><br /></i>}
<i><b>{eventInfo.timeText}</b> {local_grp.length > 0 && <b> | {local_grp.toString()} <hr style={{ margin: '1px' }} /></b>}</i>}
<i>{eventInfo.event.title}</i><br />
<i>{eventInfo.event.extendedProps.grp_code}</i>
{String(eventInfo.event.extendedProps.local_tab_ressource_materiel).substring(0, 50).toUpperCase()}<br />
<i>{String(eventInfo.event.title).substring(0, 50)}</i>
{eventInfo.event.extendedProps.local_ue_titre && eventInfo.event.extendedProps.local_ue_titre !== "" &&
<i style={{ fontFamily: 'DM Sans', fontSize: '13px' }}><br />{eventInfo.event.extendedProps.local_ue_titre}</i>}
{/*eventInfo.event.extendedProps.local_ue_titre && eventInfo.event.extendedProps.local_ue_titre !== "" &&
<i style={{ fontFamily: 'DM Sans', fontSize: '13px' }}><br />{String(eventInfo.event.extendedProps.local_ue_titre).substring(0, 30)}</i>*/}
</>
)
@ -730,7 +735,7 @@ const Module_Session_Planification = (props) => {
setLoading(false);
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_List_Sequence_Ressource res.data.status = " + res.data.status);
//console.log(" In Getall_List_Sequence_Ressource res.data.message r_class = " + res.data.message);
// console.log(" In Getall_List_Sequence_Ressource res.data.message r_class = " + res.data.message);
setGetall_List_Sequence_Ressource_api("true");
setGetall_List_Sequence_Ressource_result(res.data.message);
@ -1563,7 +1568,7 @@ const Module_Session_Planification = (props) => {
setLoading(false);
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_Sequence_Of_Session res.data.status = " + res.data.status);
//console.log(" In Getall_Sequence_Of_Session res.data.message r_class = " + res.data.message);
// console.log(" In Getall_Sequence_Of_Session res.data.message r_class = " + res.data.message);
setGetall_Sequence_Of_Session_api("true");
setGetall_Sequence_Of_Session_result(res.data.message);
@ -1620,6 +1625,19 @@ const Module_Session_Planification = (props) => {
}
var local_tab_ressource_humaine = ""
if (JSON.parse(x).tab_ressource_humaine) {
local_tab_ressource_humaine = JSON.parse(x).tab_ressource_humaine;
}
var local_tab_ressource_materiel = ""
if (JSON.parse(x).tab_ressource_materiel) {
local_tab_ressource_materiel = JSON.parse(x).tab_ressource_materiel;
}
// Si il n'y pas de relief avec le groupe d'apprenant, on va introduire un relief avec la notion de présentiel et distantiel
if (local_session_color === "" && local_mode_animation === "1") {
// sequence en distantiel, on va mettre un code couleur
@ -1654,6 +1672,9 @@ const Module_Session_Planification = (props) => {
"liste_groupe_code": local_liste_groupe_code,
"local_last_emargement_request_date": local_last_emargement_request_date,
"local_tab_ressource_humaine": local_tab_ressource_humaine.toString(),
"local_tab_ressource_materiel": local_tab_ressource_materiel.toString(),
};
new_data2.push(node);
});
@ -1678,7 +1699,11 @@ const Module_Session_Planification = (props) => {
setLoading(false);
console.warn('Not good man :( Getall_Sequence_Of_Session = ', error);
setGetall_Sequence_Of_Session_api("false");
alert("Impossible de récuperer la liste des séquences")
//alert("Impossible de récuperer la liste des séquences")
setdisplay_alert_mysy("1");
setalert_message("Impossible de récuperer la liste des séquences");
setalert_type("error");
//setmyApimyApiMessage("")
})
}
@ -3001,7 +3026,81 @@ const Module_Session_Planification = (props) => {
setLoading(false);
console.warn('UpdateStagiaireData : Not good man :( Update_One_Sequence_Session = ' + error);
setUpdate_One_Sequence_Session_api("false");
alert(" Impossible de mettre à jour la séquence");
// alert(" Impossible de mettre à jour la séquence");
setdisplay_alert_mysy("1");
setalert_message(" Impossible de mettre à jour la séquence");
setalert_type("error");
})
}
const [Duplicate_Sequence_api, setDuplicate_Sequence_api] = useState();
const [Duplicate_Sequence_message, setDuplicate_Sequence_message] = useState();
const [Duplicate_Sequence_result, setDuplicate_Sequence_result] = useState();
const Duplicate_Sequence = event => {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("_id", selected_sequence_id);
//console.log(" form == ", form);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Duplique_Session_Sequence/";
setLoading(true);
axios.post(myurl, form).then(res => {
//console.log(" In Duplicate_Sequence res.data.status = " + res.data.status);
//console.log(" In Duplicate_Sequence res.data.message r_class = " + res.data.message);
setLoading(false);
if (String(res.data.status) === String("true")) {
setDuplicate_Sequence_api("true");
setDuplicate_Sequence_result(res.data.message);
Getall_Sequence_Of_Session(selected_session_id);
setp_detail_sequence_title("");
setp_detail_sequence_comment("");
setp_detail_mode_animation("");
setp_detail_sequence_volume_theorique("");
setp_detail_sequence_agenda("");
setp_detail_sequence_objectif("");
setsequence_startDate();
setsequence_endDate();
setupdate_sequence();
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("success");
Dialog_DIALOG_AGENDA_handleClose_buton();
Close_Dialog_Detail_seq_open();
}
else {
setDuplicate_Sequence_api("false");
setDuplicate_Sequence_message(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
setLoading(false);
// console.warn('UpdateStagiaireData : Not good man :( Duplicate_Sequence = ' + error);
setDuplicate_Sequence_api("false");
setdisplay_alert_mysy("1");
setalert_message(" Impossible de dupliquer la séquence");
setalert_type("error");
})
}
@ -4579,7 +4678,7 @@ const Module_Session_Planification = (props) => {
{<div className="session_caract_Dialog" style={{ textAlign: 'right' }} >
<Button variant="outlined" onClick={submenu_sequence_detail} className="detail_class_submenu" id='dialog_detail_seq_detail'
name='dialog_detail_seq_detail'>Détail</Button>
name='dialog_detail_seq_detail'>Détail </Button>
{String(selected_sequence_id).length <= 3 &&
<Button variant="outlined" onClick={submenu_sequence_ressource} className="detail_class_submenu" id='dialog_detail_seq_ressource'
@ -4913,7 +5012,6 @@ const Module_Session_Planification = (props) => {
<div className="session_caract_Dialog" style={{ width: '50%' }}> UE / Matière
{New_Getall_Class_List_UE_result && New_Getall_Class_List_UE_result.length > 0 && <Autocomplete
disablePortal
name="event_dialog_ue"
@ -6285,7 +6383,7 @@ const Module_Session_Planification = (props) => {
{<div className="session_caract_Dialog" style={{ textAlign: 'right' }} >
<Button variant="outlined" onClick={submenu_sequence_detail} className="detail_class_submenu" id='dialog_detail_seq_detail'
name='dialog_detail_seq_detail'>Détail</Button>
name='dialog_detail_seq_detail'>Détail </Button>
{String(selected_sequence_id).length <= 3 &&
<Button variant="outlined" onClick={submenu_sequence_ressource} className="detail_class_submenu" id='dialog_detail_seq_ressource'
@ -6314,6 +6412,15 @@ const Module_Session_Planification = (props) => {
&nbsp; <FcInfo />
</a></span>}
</Button>}
{String(selected_sequence_id).length > 3 && <span style={{ cursor: 'pointer' }} onClick={() => {
Duplicate_Sequence();
}}>
<Tooltip className="tooltip_css" id="tooltip_duplique" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_duplique" data-tooltip-html="Dupliquer la séquence">
<LayersPlus style={{ cursor: 'pointer', fontSize: '14px' }} />
</a>
</span>}
</div>}
@ -6475,7 +6582,6 @@ const Module_Session_Planification = (props) => {
{Dialog_seq_ressource_1_selected_ressource_id && <div className="div_row">
<div className="div_row_gauche">
&nbsp;
</div>
@ -6653,6 +6759,7 @@ const Module_Session_Planification = (props) => {
if (value && value._id) {
setp_detail_sequence_ue_id(value._id);
Get_List_Given_UE_Planif_lines(value._id);
setp_detail_sequence_title(New_Getall_Class_List_UE_result.filter((data) => (data)._id === String(value._id))[0].label);
} else {
setp_detail_sequence_ue_id("");
setNew_Get_List_Given_UE_Planif_lines_result([]);
@ -6917,7 +7024,7 @@ const Module_Session_Planification = (props) => {
{String(submenu_seq_dialog) !== "dialog_ressource" &&
<DialogActions>
<DialogActions>
<IconButton
autoFocus
@ -6930,77 +7037,76 @@ const Module_Session_Planification = (props) => {
</DialogActions>
}
<div className="div_row" style={{ marginBottom: '1rem' }}>
<div className="div_row_gauche" style={{textAlign:'left'}}>
<div className="div_row_gauche" style={{ textAlign: 'left' }}>
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Sequence_Session} className="bton_enreg_dialog" style={{ width: '40%', textAlign: 'right' }}>Mettre à jour</Button>}
{(!p_detail_event_id || String(p_detail_event_id) === "") && <Button onClick={Add_One_Sequence_Session} className="bton_enreg_dialog" style={{ width: '40%', textAlign: 'right' }}>Ajouter</Button>}
</div>
{String(submenu_seq_dialog) !== "dialog_ressource" && String(p_detail_sequence_session_id) === "" && String(p_detail_event_id) === "" &&
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Dialog_DIALOG_AGENDA_handleClose_buton} className="bton_annule_dialog" style={{ width: '50%', float: 'right' }}>Fermer</Button>
</div>}
{String(submenu_seq_dialog) !== "dialog_ressource" && String(p_detail_sequence_session_id) === "" && p_detail_event_id && String(p_detail_event_id) !== "" &&
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Dialog_DIALOG_AGENDA_handleClose_buton} className="bton_annule_dialog" style={{ width: '40%', float: 'left' }}>Fermer</Button>
<Popup
trigger={
{String(submenu_seq_dialog) !== "dialog_ressource" && String(p_detail_sequence_session_id) === "" && String(p_detail_event_id) === "" &&
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Dialog_DIALOG_AGENDA_handleClose_buton} className="bton_annule_dialog" style={{ width: '50%', float: 'right' }}>Fermer</Button>
</div>}
<Button className="bton_supprime_dialog" style={{ width: '40%', float: 'left' }}
onClick={(event) => {
}}
>
<CiTrash /> Supprimer
{String(submenu_seq_dialog) !== "dialog_ressource" && String(p_detail_sequence_session_id) === "" && p_detail_event_id && String(p_detail_event_id) !== "" &&
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Dialog_DIALOG_AGENDA_handleClose_buton} className="bton_annule_dialog" style={{ width: '40%', float: 'left' }}>Fermer</Button>
<Popup
trigger={
</Button>
<Button className="bton_supprime_dialog" style={{ width: '40%', float: 'left' }}
onClick={(event) => {
}}
>
<CiTrash /> Supprimer
}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
</Button>
En confirmant cette opération, la séquence sera <i><font color="red"> définitivement supprimée</font></i>. <br />
}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
Delete_Sequence_Session_Data(p_detail_event_id);
//console.log('modal closed ');
close();
}}> Valider </button>
En confirmant cette opération, la séquence sera <i><font color="red"> définitivement supprimée</font></i>. <br />
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup_annuler"
onClick={() => {
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
Delete_Sequence_Session_Data(p_detail_event_id);
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
</div>
)}
</Popup>
</div>}
)}
</Popup>
</div>}
</div>
{String(submenu_seq_dialog) === "dialog_ressource" && <DialogActions>
@ -7027,7 +7133,7 @@ const Module_Session_Planification = (props) => {
<div className="div_row" style={{ "border": "None", paddingRight: '10px' }}>
<div className="session_data" id='mysy_calendar' name="mysy_calendar">
<div className="session_data" id='mysy_calendar' name="mysy_calendar" >
@ -7320,10 +7426,10 @@ const Module_Session_Planification = (props) => {
&nbsp;
<div style={{ "width": "98%", "marginLeft": "5px", padding: '10px', fontFamily: 'DM Sans', fontSize: '14px' }} >
<div style={{ "width": "98%", "marginLeft": "5px", padding: '10px', fontFamily: 'DM Sans', fontSize: '14px', background: '#FFF' }} >
<FullCalendar
height={550}
height={750}
locales={allLocales}
locale={'fr'}
editable
@ -7344,12 +7450,12 @@ const Module_Session_Planification = (props) => {
slotMinTime={Partner_Debut_Journee}
slotMaxTime={Partner_Fin_Journee}
scrollTime='08:00'
slotDuration="00:30:00"
displayEventEnd={true}
eventContent={renderEventContent}
eventClick={handleEventClick}
eventChange={handleEventChange}
hiddenDays={[0]}
/>
</div>
@ -7895,6 +8001,25 @@ export default Module_Session_Planification;
const local_css = `
.react-datepicker-wrapper{
width: 100%;
}
.fc-event-main{
word-wrap: break-word;
}
.fc .fc-timegrid-slot {
height: 35px !important;
}
.fc .fc-timegrid-slot-label-cushion {
font-size: 13px;
font-weight: 700;
color: #475569;
}
.fc .fc-timegrid-axis-cushion {
font-size: 13px;
color: #64748b;
}
`;

View File

@ -13,7 +13,7 @@ import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
import ToggleSwitch_v2_mysy from "./ToggleSwitch_v2_mysy";
import excel_icone from "../mysy_img/excel_icone.png";
import participants from "../mysy_img/participants.png";
import Box from '@mui/material/Box';
@ -573,9 +573,175 @@ const Partner_Client = (props) => {
});
}
Get_List_Client_Groupe();
Get_List_Client_Type();
}, []);
const [New_Get_List_Client_Groupe_result, setNew_Get_List_Client_Groupe_result] = useState([]);
const [Get_List_Client_Groupe_api, setGet_List_Client_Groupe_api] = useState();
const [Get_List_Client_Groupe_message, setGet_List_Client_Groupe_message] = useState();
const [Get_List_Client_Groupe_result, setGet_List_Client_Groupe_result] = useState();
function Get_List_Client_Groupe(event) {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
const related_collection = "partner_client"
form.append("token", stored_cookie);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Groupe_Client/";
axios.post(myurl, form).then(res => {
//console.log(" In Get_List_Client_Groupe res.data.status = " + res.data.status);
// console.log(" In Get_List_Client_Groupe res.data.message r_class = " + res.data.message);
if (String(res.data.status) === String("true")) {
setGet_List_Client_Groupe_api("true");
setGet_List_Client_Groupe_result(res.data.message);
var new_data2 = [];
const new_data = res.data.message.map((x) => {
//---
var localid = JSON.parse(x).id;
var local_id = JSON.parse(x)._id;
var local_code = JSON.parse(x).code;
//---
var node = {
"_id": local_id,
"id": localid,
"label": local_code,
"code": local_code,
};
new_data2.push(node);
});
//---
var node = {
"_id": "",
"id": "",
"label": "",
"code": "",
};
new_data2.push(node);
if (new_data2.length > 0)
setNew_Get_List_Client_Groupe_result(new_data2);
}
else if (String(res.data.status) === String("Err_Connexion")) {
alert('Erreur: ' + res.data.message);
history.push("/Connexion");
}
else {
setGet_List_Client_Groupe_api("false");
setGet_List_Client_Groupe_message(res.data.message);
//alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
console.warn('Not good man :( Get_List_Client_Groupe = ', error);
setGet_List_Client_Groupe_api("false");
setdisplay_alert_mysy("1");
setalert_message(" Impossible de récupérer les groupes de clients");
setalert_type("error");
})
}
const [New_Get_List_Client_Type_result, setNew_Get_List_Client_Type_result] = useState([]);
const [Get_List_Client_Type_api, setGet_List_Client_Type_api] = useState();
const [Get_List_Client_Type_message, setGet_List_Client_Type_message] = useState();
const [Get_List_Client_Type_result, setGet_List_Client_Type_result] = useState();
function Get_List_Client_Type(event) {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
const related_collection = "partner_client"
form.append("token", stored_cookie);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Client_Type_List/";
axios.post(myurl, form).then(res => {
//console.log(" In Get_List_Client_Type res.data.status = " + res.data.status);
//console.log(" In Get_List_Client_Type res.data.message r_class = " + res.data.message);
if (String(res.data.status) === String("true")) {
setGet_List_Client_Type_api("true");
setGet_List_Client_Type_result(res.data.message);
var new_data2 = [];
const new_data = res.data.message.map((x) => {
//---
var localid = JSON.parse(x).id;
var local_id = JSON.parse(x)._id;
var local_code = JSON.parse(x).code;
//---
var node = {
"_id": local_id,
"id": localid,
"label": local_code,
"code": local_code,
};
new_data2.push(node);
});
//---
var node = {
"_id": "",
"id": "",
"label": "",
"code": "",
};
new_data2.push(node);
if (new_data2.length > 0)
setNew_Get_List_Client_Type_result(new_data2);
}
else if (String(res.data.status) === String("Err_Connexion")) {
alert('Erreur: ' + res.data.message);
history.push("/Connexion");
}
else {
setGet_List_Client_Type_api("false");
setGet_List_Client_Type_message(res.data.message);
//alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
console.warn('Not good man :( Get_List_Client_Type = ', error);
setGet_List_Client_Type_api("false");
//alert(" Impossible de récupérer les types de clients");
setdisplay_alert_mysy("1");
setalert_message(" Impossible de récupérer les types de clients");
setalert_type("error");
})
}
const [isLoading, setLoading] = useState();
const [part_client_file_name, setpart_client_file_name] = useState();
@ -810,9 +976,9 @@ const Partner_Client = (props) => {
const New_Option_Filter = [
{ "id": "nom", "label": "Nom / Raison Sociale / Tél / mail ", "value": "nom" },
{ "id": "groupe_client", "label": "Groupe Client ", "value": "groupe_client" },
{ "id": "type_client", "label": "Type Client", "value": "type_client" },
{ "id": "categorie", "label": "Categorie", "value": "categorie" },
{ "id": "type_client", "label": "Type Client ", "value": "type_client" },
{ "id": "typologie", "label": "Typologie", "value": "typologie" },
{ "id": "caracteristique", "label": "Caracteristiques", "value": "caracteristique" },
{ "id": "archive", "label": "Archive", "value": "archive" },
{ "id": "", "label": "", "value": "" },
{ "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres.
@ -824,15 +990,15 @@ const Partner_Client = (props) => {
]
const Type_Client_Option = [
{ "id": "entreprise", "label": "Société ", "value": "entreprise" },
{ "id": "particulier", "label": "Particulier", "value": "particulier" },
{ "id": "ppublic", "label": "P. Public", "value": "ppublic" },
const Categorie = [
{ "id": "1", "label": "Société ", "value": "1" },
{ "id": "0", "label": "Particulier", "value": "0" },
{ "id": "2", "label": "P. Public", "value": "2" },
{ "id": "", "label": "", "value": "" },
]
const Type_Client_Typologie = [
const categorie_Typologie = [
{ "id": "financeur", "label": "Financeur", "value": "financeur" },
{ "id": "fournisseur ", "label": "Fournisseur", "value": "fournisseur " },
{ "id": "client", "label": "Client ", "value": "client" },
@ -1190,9 +1356,9 @@ const Partner_Client = (props) => {
value={New_Option_Filter.filter((data) => (data).value === String(p_filtre1))[0].label}
options={New_Option_Filter}
onChange={(event, value) => {
setp_filtre1_value("");
if (value && value.value) {
setp_filtre1(value.value);
}
}}
@ -1208,7 +1374,8 @@ const Partner_Client = (props) => {
{String(p_filtre1) !== "archive" && String(p_filtre1) !== "type_client" && String(p_filtre1) !== "typologie" &&
{String(p_filtre1) !== "archive" && String(p_filtre1) !== "categorie" && String(p_filtre1) !== "typologie" && String(p_filtre1) !== "groupe_client" &&
String(p_filtre1) !== "type_client" &&
<div className="div_row_droite texte_area_filter_value" >
{p_filtre1 &&
@ -1269,17 +1436,17 @@ const Partner_Client = (props) => {
}
</div>}
{String(p_filtre1) === "type_client" && <div className="div_row_droite texte_area_filter_value" >
{String(p_filtre1) === "categorie" && <div className="div_row_droite texte_area_filter_value" >
{p_filtre1 &&
<Autocomplete
disablePortal
name="filtre1_value"
id="filtre1_value"
value={Type_Client_Option.filter((data) => (data).id === String(p_filtre1_value))[0].label}
value={Categorie.filter((data) => (data).id === String(p_filtre1_value))[0].label}
sx={{ float: "right" }}
className="disabled_style"
options={Type_Client_Option}
options={Categorie}
onChange={(event, value) => {
if (value && value.value) {
setp_filtre1_value(value.value);
@ -1302,11 +1469,11 @@ const Partner_Client = (props) => {
disablePortal
name="filtre1_value"
id="filtre1_value"
value={Type_Client_Typologie.filter((data) => (data).id === String(p_filtre1_value))[0].label}
value={categorie_Typologie.filter((data) => (data).id === String(p_filtre1_value))[0].label}
sx={{ float: "right" }}
className="disabled_style"
options={Type_Client_Typologie}
options={categorie_Typologie}
onChange={(event, value) => {
if (value && value.value) {
setp_filtre1_value(value.value);
@ -1323,6 +1490,60 @@ const Partner_Client = (props) => {
}
</div>}
{String(p_filtre1) === "groupe_client" && <div className="div_row_droite texte_area_filter_value" >
{p_filtre1 &&
<Autocomplete
disablePortal
name="filtre1_value"
id="filtre1_value"
value={New_Get_List_Client_Groupe_result.filter((data) => (data)._id === String(p_filtre1_value))[0].label}
sx={{ float: "right" }}
className="disabled_style"
options={New_Get_List_Client_Groupe_result}
onChange={(event, value) => {
if (value && value._id) {
setp_filtre1_value(value._id);
} else {
setp_filtre1_value("");
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>}
/>
}
</div>}
{String(p_filtre1) === "type_client" && <div className="div_row_droite texte_area_filter_value" >
{p_filtre1 &&
<Autocomplete
disablePortal
name="filtre1_value"
id="filtre1_value"
value={New_Get_List_Client_Type_result.filter((data) => (data)._id === String(p_filtre1_value))[0].label}
sx={{ float: "right" }}
className="disabled_style"
options={New_Get_List_Client_Type_result}
onChange={(event, value) => {
if (value && value._id) {
setp_filtre1_value(value._id);
} else {
setp_filtre1_value("");
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>}
/>
}
</div>}
{p_filtre1 && <div className='filter_bton_add'>
<Tooltip className="tooltip_css" id="my-tooltip01" style={{ "fontSize": "12px" }} />
@ -1357,6 +1578,7 @@ const Partner_Client = (props) => {
value={New_Option_Filter.filter((data) => (data).value === String(p_filtre2))[0].label}
options={New_Option_Filter}
onChange={(event, value) => {
setp_filtre2_value("");
if (value && value.value) {
setp_filtre2(value.value);
}
@ -1372,7 +1594,8 @@ const Partner_Client = (props) => {
</div>
<div className="div_row_droite texte_area_filter" >
{String(p_filtre2).length > 2 && String(p_filtre2) !== "archive" && String(p_filtre2) !== "type_client" && String(p_filtre2) !== "typologie" &&
{String(p_filtre2).length > 2 && String(p_filtre2) !== "archive" && String(p_filtre2) !== "categorie" && String(p_filtre2) !== "typologie" &&
String(p_filtre2) !== "groupe_client" && String(p_filtre2) !== "type_client" &&
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
@ -1423,16 +1646,16 @@ const Partner_Client = (props) => {
/>}
/>}
{String(p_filtre2).length > 3 && String(p_filtre2) === "type_client" &&
{String(p_filtre2).length > 3 && String(p_filtre2) === "categorie" &&
<Autocomplete
disablePortal
name="filtre2_value"
id="filtre2_value"
value={Type_Client_Option.filter((data) => (data).id === String(p_filtre2_value))[0].label}
value={Categorie.filter((data) => (data).id === String(p_filtre2_value))[0].label}
sx={{ float: "right" }}
className="disabled_style"
options={Type_Client_Option}
options={Categorie}
onChange={(event, value) => {
if (value && value.value) {
setp_filtre2_value(value.value);
@ -1451,11 +1674,11 @@ const Partner_Client = (props) => {
disablePortal
name="filtre2_value"
id="filtre2_value"
value={Type_Client_Typologie.filter((data) => (data).id === String(p_filtre2_value))[0].label}
value={categorie_Typologie.filter((data) => (data).id === String(p_filtre2_value))[0].label}
sx={{ float: "right" }}
className="disabled_style"
options={Type_Client_Typologie}
options={categorie_Typologie}
onChange={(event, value) => {
if (value && value.value) {
setp_filtre2_value(value.value);
@ -1469,6 +1692,52 @@ const Partner_Client = (props) => {
/>}
/>}
{String(p_filtre2).length > 3 && String(p_filtre2) === "groupe_client" &&
<Autocomplete
disablePortal
name="filtre2_value"
id="filtre2_value"
value={New_Get_List_Client_Groupe_result.filter((data) => (data)._id === String(p_filtre2_value))[0].label}
sx={{ float: "right" }}
className="disabled_style"
options={New_Get_List_Client_Groupe_result}
onChange={(event, value) => {
if (value && value._id) {
setp_filtre2_value(value._id);
} else {
setp_filtre2_value("");
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>}
/>}
{String(p_filtre2).length > 3 && String(p_filtre2) === "type_client" &&
<Autocomplete
disablePortal
name="filtre2_value"
id="filtre2_value"
value={New_Get_List_Client_Type_result.filter((data) => (data)._id === String(p_filtre2_value))[0].label}
sx={{ float: "right" }}
className="disabled_style"
options={New_Get_List_Client_Type_result}
onChange={(event, value) => {
if (value && value._id) {
setp_filtre2_value(value._id);
} else {
setp_filtre2_value("");
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>}
/>}
</div>

View File

@ -19,9 +19,53 @@ import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
import Autocomplete from '@mui/material/Autocomplete';
import { makeStyles } from "@material-ui/core/styles";
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
import { IconButton } from '@material-ui/core';
import Paper from '@material-ui/core/Paper';
import Draggable from 'react-draggable';
import Dialog from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogContentText from '@mui/material/DialogContentText';
import DialogTitle from '@mui/material/DialogTitle';
import ColorPicker from 'react-pick-color';
function PaperComponent(props) {
return (
<Draggable
handle="#draggable-dialog-title"
cancel={'[class*="MuiDialogContent-root"]'}
>
<Paper {...props} />
</Draggable>
);
}
const useStyles = makeStyles((theme) => ({
dialog: {
position: 'absolute',
// left: 10,
top: 400
},
paper: {
overflowY: 'unset',
},
customizedButton: {
position: 'absolute',
left: '95%',
top: '-2%',
backgroundColor: 'lightgray',
color: 'gray',
},
}));
const Partner_Config_Ftion_Initiale = (props) => {
const classes = useStyles();
const history = useHistory();
const [submenu, setsubmenu] = useState("type_eval");
const [rowss, setRows] = useState([]);
@ -688,6 +732,8 @@ const Partner_Config_Ftion_Initiale = (props) => {
const [p_detail_config_nom, setp_detail_config_nom] = useState("");
const [p_detail_config_description, setp_detail_config_description] = useState("");
const [p_detail_config_code_couleur, setp_detail_config_code_couleur] = useState("");
const [config_type_eval_edit_mode, setconfig_type_eval_edit_mode] = useState("");
const [config_type_eval_changed, setconfig_type_eval_changed] = useState("");
@ -828,7 +874,7 @@ const Partner_Config_Ftion_Initiale = (props) => {
setp_detail_config_code(line1[0].code);
setp_detail_config_nom(line1[0].nom);
setp_detail_config_description(line1[0].description);
setp_detail_config_code_couleur(line1[0].code_couleur);
if (document.getElementById('myRef')) {
@ -875,8 +921,6 @@ const Partner_Config_Ftion_Initiale = (props) => {
function Annule_Add_Type_Eval_DetailFields() {
if (selected_type_eval_id && selected_type_eval_id > 0) {
var line = JSON.parse(Getall_Parter_config_type_evaluation_result[selected_type_eval_id]);
@ -887,6 +931,7 @@ const Partner_Config_Ftion_Initiale = (props) => {
setp_detail_config_code(line.code);
setp_detail_config_nom(line.nom);
setp_detail_config_description(line.description);
setp_detail_config_code_couleur(line.code_couleur);
} else {
@ -943,6 +988,7 @@ const Partner_Config_Ftion_Initiale = (props) => {
form.append("base_authorized_type_evaluation_id", p_one_detail_config_code);
form.append("nom", p_one_detail_config_nom);
form.append("description", p_one_detail_config_description);
form.append("code_couleur", p_detail_config_code_couleur);
//console.log(" form == ", form);
@ -968,6 +1014,7 @@ const Partner_Config_Ftion_Initiale = (props) => {
setconfig_type_eval_edit_mode("");
setconfig_type_eval_changed("");
setdisplay_detail_type_eval("");
setp_detail_config_code_couleur("");
setadd_config_type_eval("");
setgridline_type_eval_id("");
@ -999,7 +1046,11 @@ const Partner_Config_Ftion_Initiale = (props) => {
setLoading(false);
console.warn('UpdateStagiaireData : Not good man :( Add_Config_Type_Eval = ' + error);
setAdd_Config_Type_Eval_api("false");
alert(" Impossible d'ajouter le paramétrage ");
//alert(" Impossible d'ajouter le paramétrage ");
setdisplay_alert_mysy("1");
setalert_message(" Impossible d'ajouter le paramétrage ");
setalert_type("error");
})
}
@ -1095,6 +1146,7 @@ const Partner_Config_Ftion_Initiale = (props) => {
form.append("base_authorized_type_evaluation_code", p_detail_config_code);
form.append("nom", p_detail_config_nom);
form.append("description", p_detail_config_description);
form.append("code_couleur", p_detail_config_code_couleur);
form.append("_id", selected_type_eval_id);
//console.log(" form == ", form);
@ -1117,6 +1169,7 @@ const Partner_Config_Ftion_Initiale = (props) => {
setp_detail_config_code("");
setp_detail_config_nom("");
setp_detail_config_description("");
setp_detail_config_code_couleur("");
setconfig_type_eval_edit_mode("");
setconfig_type_eval_changed("");
setdisplay_detail_type_eval("");
@ -1149,7 +1202,11 @@ const Partner_Config_Ftion_Initiale = (props) => {
setLoading(false);
console.warn('UpdateStagiaireData : Not good man :( Update_Config_Type_Eval = ' + error);
setUpdate_Config_Type_Eval_api("false");
alert(" Impossible de mettre à jour le paramétrage ");
// alert(" Impossible de mettre à jour le paramétrage ");
setdisplay_alert_mysy("1");
setalert_message(" Impossible de mettre à jour le paramétrage ");
setalert_type("error");
})
}
@ -1266,6 +1323,22 @@ const Partner_Config_Ftion_Initiale = (props) => {
setdisplay_alert_mysy("");
}
const [Dialog_GRP_COLOR_message, setDialog_GRP_COLOR_message] = React.useState(false);
const [Dialog_GRP_COLOR_open, setDialog_GRP_COLOR_open] = React.useState(false);
const [p_detail_color, setp_detail_color] = React.useState("#33b8ff");
const Dialog_GRP_COLOR_handleClose = () => {
};
const Dialog_GRP_COLOR_handleClose_buton = () => {
setDialog_GRP_COLOR_open(false);
};
return (
<div className="partner_ftion_initiale_configuration">
{isLoading && <div className="loader-container">
@ -1280,6 +1353,82 @@ const Partner_Config_Ftion_Initiale = (props) => {
clear_display_alert_mysy={clear_display_alert_mysy}
/>
}
{/*** Dialog pickup Color */}
<Dialog
open={Dialog_GRP_COLOR_open}
// onClose={Dialog_GRP_COLOR_handleClose}
static
onClose={() => null}
PaperProps={{
className: classes.paper, // Apply the paper style
style: {
overflowY: 'unset',
position: 'absolute',
//top: '5rem'
},
}}
hideBackdrop={true}
disableScrollLock
classes={{
paper: classes.dialog
}}
className="groupe_apprenant_dialog"
PaperComponent={PaperComponent}
aria-labelledby="draggable-dialog-title"
>
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title"> Choisir une couleur</DialogTitle>
<DialogContent className="DialogContent_color_pickup_width" >
<DialogContentText>
</DialogContentText>
<div className="session_caract"> Code couleur <br />
<ColorPicker
color="#3573CB"
theme={{
background: 'lightgrey',
inputBackground: 'grey',
borderColor: 'darkgrey',
borderRadius: '8px',
color: "#0a2a4d",
width: '100px'
}}
name="detail_grp_color"
id="detail_grp_color"
onChange={(color) => {
setconfig_type_eval_changed("1");
setp_detail_config_code_couleur(color.hex);
}
}
/>
</div>
</DialogContent>
<DialogActions>
<IconButton
autoFocus
onClick={Dialog_GRP_COLOR_handleClose_buton}
color="primary"
className={classes.customizedButton}
>
<CancelPresentationIcon />
</IconButton>
</DialogActions>
</Dialog>
{/*** Fin ajout pickup Color */}
{/*** FIN Affichage des messages d'alerte*/}
<h3 style={{ fontFamily: 'DM Sans' }}> Formation Initale configuration </h3>
@ -1289,15 +1438,6 @@ const Partner_Config_Ftion_Initiale = (props) => {
<Button variant="outlined" onClick={submenu_referentiel_padagogique} className="detail_class_submenu" id='referentiel_padagogique' name='referentiel_padagogique'>Référentiel pédag.</Button>
{/*
<Button variant="outlined" onClick={submenu_type_client} className="detail_class_submenu" id='type_client' name='type_client'>Type de clients </Button>
<Button variant="outlined" onClick={submenu_site} className="detail_class_submenu" id='site' name='site'>Sites de formation </Button>
<Button variant="outlined" onClick={submenu_condition_paiement} className="detail_class_submenu" id='condition_paiement' name='condition_paiement'>Conditions de paiement </Button>
<Button variant="outlined" onClick={submenu_etape_opportunite} className="detail_class_submenu" id='etape_opportunite' name='etape_opportunite'>Etapes d'opportunité </Button>
<Button variant="outlined" onClick={submenu_competence} className="detail_class_submenu" id='competence' name='competence'>Compétences </Button>
<Button variant="outlined" onClick={submenu_devis} className="detail_class_submenu" id='devis' name='devis'>Devis </Button>
*/
}
{/*** Type evaluation */}
{String(submenu) === "type_eval" && <div className="div_row" style={{ paddingRight: '10px' }}>
@ -1466,145 +1606,204 @@ const Partner_Config_Ftion_Initiale = (props) => {
{String(config_type_eval_edit_mode) !== "1" && <div>
<div className="session_caract"> Code 11<br />
<div className="div_row" >
<div className="Grid_1_col" >
<div className="Grid_2_col_sub_colone" style={{ minHeight: '10rem', padding: "0px" }}>
<div style={{ width: '100%', float: 'left' }}>
<div className="Grid_2_col_sub_colone_header">
Type évaluation
</div>
<div style={{
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%',
paddingLeft: '10px', flexWrap: 'wrap'
}}>
<div className="session_caract"> Code<br />
{New_Getall_Default_FI_Authorized_type_evaluation_result && New_Getall_Default_FI_Authorized_type_evaluation_result.length > 0 && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_config_code"
id="detail_config_code"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={New_Getall_Default_FI_Authorized_type_evaluation_result.filter((data) => (data)._id === String(p_detail_type_eval_base_authorized_type_evaluation_id))[0].label}
/>}
</div>
{New_Getall_Default_FI_Authorized_type_evaluation_result && New_Getall_Default_FI_Authorized_type_evaluation_result.length > 0 && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_config_code"
id="detail_config_code"
<div className="session_caract"> Nom <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_config_nom"
id="detail_config_nom"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_detail_config_nom}
value={New_Getall_Default_FI_Authorized_type_evaluation_result.filter((data) => (data)._id === String(p_detail_type_eval_base_authorized_type_evaluation_id))[0].label}
/>
/>}
</div>
<div className="session_caract"> Description <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_config_desc"
id="detail_config_desc"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_detail_config_description}
/>
</div>
{/*<div className="session_caract"> Code couleur &nbsp;
<nav className="disabled_style" style={{ backgroundColor: p_detail_color, borderRadius: '10px', paddingTop: '15px' }}
> &nbsp; Cliquer pour choisir </nav>
</div>*/}
</div>
</div>
</div>
</div>
</div>
<div className="session_caract"> Nom <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_config_nom"
id="detail_config_nom"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_detail_config_nom}
/>
</div>
<div className="session_caract"> Description <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_config_desc"
id="detail_config_desc"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_detail_config_description}
/>
</div>
</div>}
{String(config_type_eval_edit_mode) === "1" && <div>
<div className="session_caract"> Code<br />
<div className="div_row" >
<div className="Grid_1_col" >
<div className="Grid_2_col_sub_colone" style={{ minHeight: '10rem', padding: "0px" }}>
<div style={{ width: '100%', float: 'left' }}>
<div className="Grid_2_col_sub_colone_header">
Type évaluation
</div>
<div style={{
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%',
paddingLeft: '10px', flexWrap: 'wrap'
}}>
<div className="session_caract"> Code<br />
{New_Getall_Default_FI_Authorized_type_evaluation_result && New_Getall_Default_FI_Authorized_type_evaluation_result.length > 0 && <Autocomplete
disablePortal
name="detail_config_code"
id="detail_config_code"
className="disabled_style"
value={New_Getall_Default_FI_Authorized_type_evaluation_result.filter((data) => (data)._id === String(p_detail_type_eval_base_authorized_type_evaluation_id))[0].label}
options={New_Getall_Default_FI_Authorized_type_evaluation_result}
onChange={(event, value) => {
setconfig_type_eval_changed("1");
if (value && value._id) {
setp_detail_config_code(value._id);
}
else {
setp_detail_config_code("");
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>}
{New_Getall_Default_FI_Authorized_type_evaluation_result && New_Getall_Default_FI_Authorized_type_evaluation_result.length > 0 && <Autocomplete
disablePortal
name="detail_config_code"
id="detail_config_code"
className="disabled_style"
value={New_Getall_Default_FI_Authorized_type_evaluation_result.filter((data) => (data)._id === String(p_detail_type_eval_base_authorized_type_evaluation_id))[0].label}
options={New_Getall_Default_FI_Authorized_type_evaluation_result}
onChange={(event, value) => {
if (value && value._id) {
setp_detail_config_code(value._id);
}
else {
setp_detail_config_code("");
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>}
</div>
<div className="session_caract"> Nom <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_config_nom"
id="detail_config_nom"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_detail_config_nom}
onChange={(e) => {
setp_detail_config_nom(e.target.value);
setconfig_type_eval_changed("1");
}}
/>
</div>
<div className="session_caract"> Description <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_config_desc"
id="detail_config_desc"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_detail_config_description}
onChange={(e) => {
setp_detail_config_description(e.target.value);
setconfig_type_eval_changed("1");
}}
/>
</div>
{/*} <div className="session_caract"> Code couleur &nbsp;
<nav className="disabled_style" style={{ backgroundColor: p_detail_color, cursor: 'pointer', borderRadius: '10px', paddingTop: '15px' }} onClick={(event, value) => {
setDialog_GRP_COLOR_open(true)
}}
> &nbsp; Cliquer pour choisir </nav>
</div>*/}
</div>
</div>
</div>
</div>
</div>
<div className="session_caract"> Nom <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_config_nom"
id="detail_config_nom"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_detail_config_nom}
onChange={(e) => {
setp_detail_config_nom(e.target.value);
setconfig_type_eval_changed("1");
}}
/>
</div>
<div className="session_caract"> Description <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_config_desc"
id="detail_config_desc"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_detail_config_description}
onChange={(e) => {
setp_detail_config_description(e.target.value);
setconfig_type_eval_changed("1");
}}
/>
</div>
</div>}
@ -2239,10 +2438,116 @@ const Partner_Config_Ftion_Initiale = (props) => {
</div>
<style>{local_css}</style>
</div>
)
}
export default Partner_Config_Ftion_Initiale;
const local_css = `
:root {
--bg: #f6f8fb;
--card: #ffffff;
--text: #0f172a;
--muted: #64748b;
--border: #e5e7eb;
--shadow: 0 10px 25px rgba(2, 6, 23, .06);
--green-700: #0f6b53;
--green-600: #167a5e;
--green-100: #e9f7f1;
--blue-600: #2563eb;
--radius: 14px;
--radius-sm: 10px;
}
.Grid_2_col{
margin-top: 12px;
display:grid;
grid-template-columns: 1.2fr 1fr;
gap: 14px;
padding:5px;
}
.Grid_1_col{
margin-top: 12px;
display:grid;
grid-template-columns: 1fr;
gap: 14px;
padding:5px;
}
.Grid_2_col_sub_colone {
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 14px;
box-shadow: 0 6px 18px rgba(2,6,23,.04);
padding: 0px;
display: flex;
flex-direction: column;
gap: 14px;
}
.Grid_2_col_sub_colone_header {
background: #dbeafe;
border-top-right-radius: 10px;
border-top-left-radius: 10px;
text-align: center;
font-family: DM Sans;
font-weight: 700;
height: 2rem;
padding-top: 5px;
font-size: 15px;
}
.Grid_2_col_sub_colone_bottom_menu{
}
.card__header{
background: #e2e8f0;
font-size: small;
text-align: center;
}
.card__title{
display:flex;
align-items:center;
gap: 10px;
}
.card__icon{
width: 34px;
height: 34px;
display:grid;
place-items:center;
border-radius: 12px;
background:#eff6ff;
border:1px solid #dbeafe;
}
.card__header h2{
margin:0;
font-size: 15px;
letter-spacing: -0.01em;
}
.card__actions{ display:flex; align-items:center; gap:8px; }
.block_detail_action{
width: 100%;
float: left;
background: #fafafa;
padding: 10px;
border: unset;
border-radius: 10px;
}
.react-datepicker-wrapper{
width: 100%;
}
`;

View File

@ -0,0 +1,26 @@
import React from "react";
const ToggleSwitch_text_left = ({ label, checked }) => {
return (
<div className="toggleswitch">
<div className="container">
<nav style={{"width":"50%", "float":"left", "textAlign":'left',"paddingTop":'10px'}}>{label}{" "} </nav>
<nav style={{"width":"50%", "float":"right", "textAlign":'right', }}>
<div className="toggle-switch">
<input type="checkbox" className="checkbox"
name={label} id={label} checked={checked} />
<label className="label" htmlFor={label}>
<span className="inner" />
<span className="switch" />
</label>
</div>
</nav>
</div>
</div>
);
};
export default ToggleSwitch_text_left;