22/07/2024 - 21h
parent
618d156c22
commit
5f7abfa1a1
|
@ -1476,6 +1476,13 @@ const AddClassManual = (props) => {
|
|||
}
|
||||
|
||||
|
||||
if (mylocaltraining.recyclage_delai) {
|
||||
setp_detail_recyclage_delai(mylocaltraining.recyclage_delai);
|
||||
} else {
|
||||
p_detail_recyclage_delai("0");
|
||||
}
|
||||
|
||||
|
||||
document.getElementsByName("class_inscription_url")[0].value = "";
|
||||
if (mylocaltraining.class_inscription_url) {
|
||||
//document.getElementsByName("class_inscription_url")[0].value = mylocaltraining.class_inscription_url;
|
||||
|
@ -1635,6 +1642,8 @@ const AddClassManual = (props) => {
|
|||
var version = p_detail_version_catalogue;
|
||||
|
||||
|
||||
|
||||
|
||||
var mynote = document.getElementsByName("note")[0].value;
|
||||
var localmycpf = mycpf;
|
||||
var mycertif = mycertif;
|
||||
|
@ -1842,6 +1851,10 @@ const AddClassManual = (props) => {
|
|||
formData.append('categorie', mycategorie);
|
||||
formData.append('version', version);
|
||||
|
||||
formData.append('recyclage_delai', p_detail_recyclage_delai);
|
||||
formData.append('recyclage_periodicite', p_detail_recyclage_periodicite);
|
||||
|
||||
|
||||
formData.append('note', mynote);
|
||||
|
||||
formData.append('published', mypublier);
|
||||
|
@ -3201,6 +3214,8 @@ const AddClassManual = (props) => {
|
|||
|
||||
const [p_detail_version_catalogue, setp_detail_version_catalogue] = useState("");
|
||||
|
||||
const [p_detail_recyclage_delai, setp_detail_recyclage_delai] = useState("0");
|
||||
const [p_detail_recyclage_periodicite, setp_detail_recyclage_periodicite] = useState("mois");
|
||||
|
||||
const [p_detail_class_inscription_url, setp_detail_class_inscription_url] = useState("");
|
||||
const [p_detail_class_banner_img_url, setp_detail_class_banner_img_url] = useState("");
|
||||
|
@ -5207,6 +5222,25 @@ const AddClassManual = (props) => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
name="recyclage"
|
||||
label="Recyclage (mois)"
|
||||
type="number"
|
||||
inputProps={{ min: "0", max: "120", step: "1" }}
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_recyclage_delai}
|
||||
onChange={(e) => {
|
||||
setp_detail_recyclage_delai(e.target.value);
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* -- début champs specifiques **/}
|
||||
<div className="div_row" style={{ "border": 'none' }}>
|
||||
<hr />
|
||||
|
|
|
@ -268,6 +268,9 @@ const Apprenant = (props) => {
|
|||
{ field: 'presentiel', headerName: 'Présentiel', hide: false, flex: 1, minWidth: 50, maxWidth: 70 },
|
||||
{ field: 'distanciel', headerName: 'Distantiel', hide: false, flex: 1, minWidth: 50, maxWidth: 70 },
|
||||
|
||||
{ field: 'class_recyclage_delai', headerName: 'Recycl. Delai', hide: false, flex: 1, minWidth: 100, },
|
||||
{ field: 'class_recyclage_periodicite', headerName: 'Recycl. Perio', hide: false, flex: 1, minWidth: 100, },
|
||||
{ field: 'nb_jour_avant_recyclage', headerName: 'Jrs avant Recycl.', hide: false, flex: 1, minWidth: 100, },
|
||||
|
||||
|
||||
{
|
||||
|
@ -833,7 +836,7 @@ const Apprenant = (props) => {
|
|||
|
||||
|
||||
Disable_Detail_Apprenant_Fields();
|
||||
|
||||
submenu_detail_apprenant();
|
||||
|
||||
if (document.getElementById('detail_apprenant')) {
|
||||
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||
|
@ -3337,6 +3340,8 @@ const Apprenant = (props) => {
|
|||
|
||||
Get_Appenant_List_Suivi_Pedagogique(selected_apprenant_id);
|
||||
|
||||
submenu_detail_apprenant();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -7019,6 +7024,10 @@ const Apprenant = (props) => {
|
|||
client_rattachement_nom: JSON.parse(item).client_rattachement_nom,
|
||||
client_rattachement_id: JSON.parse(item).client_rattachement_id,
|
||||
|
||||
class_recyclage_delai: JSON.parse(item).class_recyclage_delai,
|
||||
class_recyclage_periodicite: JSON.parse(item).class_recyclage_periodicite,
|
||||
nb_jour_avant_recyclage: JSON.parse(item).nb_jour_avant_recyclage,
|
||||
|
||||
}
|
||||
))}
|
||||
|
||||
|
|
|
@ -207,6 +207,10 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
{ field: 'invoiced_ref', headerName: 'Num Fact.', minWidth: 100, flex: 1, maxWidth: 150, flex: 1, editable: false, hide: true, },
|
||||
{ field: 'invoiced_date', headerName: 'Date Fact.', minWidth: 100, flex: 1, maxWidth: 150, flex: 1, editable: false, hide: true, },
|
||||
|
||||
{ field: 'class_recyclage_delai', headerName: 'Recycl. Delai', hide: true, flex: 1, minWidth: 100, },
|
||||
{ field: 'class_recyclage_periodicite', headerName: 'Recycl. Perio', hide: true, flex: 1, minWidth: 100, },
|
||||
{ field: 'nb_jour_avant_recyclage', headerName: 'Jrs avant Recycl.', hide: false, flex: 1, minWidth: 100, },
|
||||
|
||||
|
||||
{
|
||||
field: "Detail", headerName: 'Voir détail',
|
||||
|
@ -728,6 +732,56 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const [Recyclage_Desactivation_api, setRecyclage_Desactivation_api] = useState();
|
||||
const [Recyclage_Desactivation_message, setRecyclage_Desactivation_message] = useState();
|
||||
const [Recyclage_Desactivation_result, setRecyclage_Desactivation_result] = useState();
|
||||
function Recyclage_Desactivation(list_inscription_id) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("tab_inscriptions_ids", list_inscription_id);
|
||||
|
||||
|
||||
setLoading(true);
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Inscription_Recyclage_Management_Done/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setLoading(false);
|
||||
//console.log(" In UpdateStagiaireData res.data.status = " + res.data.status);
|
||||
//console.log(" In UpdateStagiaireData res.data.message r_class = " + res.data.message);
|
||||
setRecyclage_Desactivation_api("true");
|
||||
setRecyclage_Desactivation_result(res.data.message);
|
||||
Getall_TrainingParticipant();
|
||||
alert(res.data.message);
|
||||
|
||||
|
||||
} else if (String(res.data.status) === String("Err_Connexion")) {
|
||||
setLoading(false);
|
||||
alert('Erreur: ' + res.data.message);
|
||||
history.push("/Connexion");
|
||||
}
|
||||
else {
|
||||
setLoading(false);
|
||||
setRecyclage_Desactivation_api("false");
|
||||
setRecyclage_Desactivation_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Recyclage_Desactivation : Not good man :( mysearchtext = ' + error);
|
||||
setRecyclage_Desactivation_api("false");
|
||||
alert(" Impossible de désactivier le recyclage");
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function handleClick_delete(event, cellValues) {
|
||||
// Recuperation du motif du refus :
|
||||
var nom = cellValues.row.nom;
|
||||
|
@ -5296,7 +5350,6 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
if (String(actionmass_ftion_val) === String("supprimer")) {
|
||||
Delete_LIST_Stagiaires(liste_session);
|
||||
|
||||
}
|
||||
|
||||
else if (String(actionmass_ftion_val) === String("convention")) {
|
||||
|
@ -5311,6 +5364,10 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
else if (String(actionmass_ftion_val) === String("exporter")) {
|
||||
Export_Inscriptions(liste_session);
|
||||
}
|
||||
else if (String(actionmass_ftion_val) === String("recyclage_disable")) {
|
||||
Recyclage_Desactivation(liste_session);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function Export_Inscriptions(tab_class) {
|
||||
|
@ -6222,6 +6279,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
{ "id": "0", "label": "Valider Insc.", "value": "valide_inscr" },
|
||||
{ "id": "1", "label": "Supprimer", "value": "supprimer" },
|
||||
{ "id": "2", "label": "Exporter", "value": "exporter" },
|
||||
{ "id": "3", "label": "Desactiver Recyclage", "value": "recyclage_disable" },
|
||||
]
|
||||
|
||||
|
||||
|
@ -7836,6 +7894,10 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
invoiced: JSON.parse(item).invoiced,
|
||||
invoiced_ref: JSON.parse(item).invoiced_ref,
|
||||
invoiced_date: JSON.parse(item).invoiced_date,
|
||||
|
||||
class_recyclage_delai: JSON.parse(item).class_recyclage_delai,
|
||||
class_recyclage_periodicite: JSON.parse(item).class_recyclage_periodicite,
|
||||
nb_jour_avant_recyclage: JSON.parse(item).nb_jour_avant_recyclage,
|
||||
}
|
||||
))}
|
||||
|
||||
|
@ -7955,7 +8017,9 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
if (String(value.value) === "supprimer"
|
||||
|| String(value.value) === "convention" || String(value.value) === "exporter" || String(value.value) === "valide_inscr") {
|
||||
|| String(value.value) === "convention" || String(value.value) === "exporter"
|
||||
|| String(value.value) === "valide_inscr"
|
||||
|| String(value.value) === "recyclage_disable") {
|
||||
setactionmass_ftion_val(value.value);
|
||||
}
|
||||
else {
|
||||
|
@ -7973,24 +8037,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
}
|
||||
/>
|
||||
|
||||
{/*<TextField
|
||||
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
inputProps={{ min: "0", max: "1", step: "1" }}
|
||||
disabled={false}
|
||||
className="block_en_mass_select"
|
||||
|
||||
value={actionmass_ftion_val}
|
||||
onChange={actionmass_ftion}
|
||||
>
|
||||
<MenuItem value="n/a" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Action </MenuItem>
|
||||
{/*<MenuItem value="convention" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Envoyer Convention </MenuItem>* /}
|
||||
<MenuItem value="supprimer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Supprimer </MenuItem>
|
||||
|
||||
</TextField>*/}
|
||||
{actionmass_ftion_val && <nav className='block_en_mass_bton_action'>
|
||||
<Popup
|
||||
trigger={<Button className="bton_enreg" style={{ "width": "90%" }}>
|
||||
|
@ -8029,6 +8076,11 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
<font> Confirmer l' <b> édition des conventions </b> en masse pour {selectionModel.length} lignes.
|
||||
</font>}
|
||||
|
||||
{String(actionmass_ftion_val) === "recyclage_disable" &&
|
||||
<font> Confirmer la <b> désactivation du recyclage </b> en masse pour {selectionModel.length} lignes.
|
||||
</font>}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
|
@ -9596,7 +9648,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
{String(participant_data_edit_mode) !== "1" && String(inscription_invoiced) !== "1" && <div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||
{String(participant_data_edit_mode) !== "1" && String(inscription_invoiced) !== "1" && <div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||
<Button variant="contained" className="bton_edit" onClick={EnableAttendeeDetailFields_Deja_Inscrit}>Editer
|
||||
</Button>
|
||||
</div>}
|
||||
|
@ -9607,8 +9659,8 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
{String(participant_data_edit_mode) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
||||
|
||||
{String(selected_id_status) !== "1" && (!p_detail_apprenant_id || String(p_detail_apprenant_id).trim().length <= 3) &&
|
||||
<Button variant="contained" className="bton_edit" onClick={EnableAttendeeDetailFields}>Editer
|
||||
</Button>}
|
||||
<Button variant="contained" className="bton_edit" onClick={EnableAttendeeDetailFields}>Editer
|
||||
</Button>}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue