14/07/2024 - 22h
parent
377297cf18
commit
23140c3c94
|
@ -37,7 +37,7 @@ import { PieChart } from '@mui/x-charts/PieChart';
|
|||
import fileDownload from 'js-file-download'
|
||||
const pieParams = { height: 200, margin: { right: 5 } };
|
||||
const palette = ['red', 'blue', 'green'];
|
||||
|
||||
|
||||
const Dashbord_Factures_Devis_Par_Periode = (props) => {
|
||||
const history = useHistory();
|
||||
const [isLoading, setLoading] = useState();
|
||||
|
|
|
@ -176,7 +176,7 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const [Remove_From_User_TBD_api, setRemove_From_User_TBD_api] = useState();
|
||||
const [Remove_From_User_TBD_message, setRemove_From_User_TBD_message] = useState();
|
||||
|
|
|
@ -3683,6 +3683,7 @@ const Employes = (props) => {
|
|||
"question_id": "",
|
||||
"label": "",
|
||||
"question_question": "",
|
||||
"question_type": "",
|
||||
};
|
||||
|
||||
new_data2.push(node);
|
||||
|
@ -5785,7 +5786,7 @@ const Employes = (props) => {
|
|||
|
||||
var local_class_id = "-";
|
||||
var local_related_collection = "ressource_humaine";
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Export_Excel_Survey_Stat_Data_For_Given_related_collection_id/" + stored_cookie + "/" +local_related_collection+"/"+ selected_id + "/" + date_from + "/" + date_to + "/" + selected_statistic_question_id + "/"+local_class_id+"/";
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Export_Excel_Survey_Stat_Data_For_Given_related_collection_id/" + stored_cookie + "/" + local_related_collection + "/" + selected_id + "/" + date_from + "/" + date_to + "/" + selected_statistic_question_id + "/" + local_class_id + "/";
|
||||
|
||||
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url);
|
||||
|
||||
|
@ -8533,7 +8534,7 @@ const Employes = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
|
||||
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
|
||||
<Button variant="outlined" onClick={submenu_statistiques} className="detail_class_submenu" id='statistiques' name='statistiques'>Statistiques </Button>
|
||||
|
||||
|
||||
</div>
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Ajouter un Employé </nav>
|
||||
|
||||
|
@ -9053,7 +9054,7 @@ const Employes = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
|
||||
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
|
||||
<Button variant="outlined" onClick={submenu_statistiques} className="detail_class_submenu" id='statistiques' name='statistiques'>Statistiques </Button>
|
||||
|
||||
|
||||
</div>
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Liste Affectations </nav>
|
||||
<div className="session_data">
|
||||
|
@ -9620,7 +9621,7 @@ const Employes = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
|
||||
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
|
||||
<Button variant="outlined" onClick={submenu_statistiques} className="detail_class_submenu" id='statistiques' name='statistiques'>Statistiques </Button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Droits d'accès système </nav>
|
||||
|
@ -9870,7 +9871,7 @@ const Employes = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
|
||||
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
|
||||
<Button variant="outlined" onClick={submenu_statistiques} className="detail_class_submenu" id='statistiques' name='statistiques'>Statistiques </Button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div style={{ height: 550, width: '100%', paddingRight: '1px', "marginLeft": "10px", "marginRight": "10px", }}>
|
||||
|
@ -9982,7 +9983,7 @@ const Employes = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
|
||||
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
|
||||
<Button variant="outlined" onClick={submenu_statistiques} className="detail_class_submenu" id='statistiques' name='statistiques'>Statistiques </Button>
|
||||
|
||||
|
||||
</div>
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Les pièces jointes </nav>
|
||||
|
||||
|
@ -10139,7 +10140,7 @@ const Employes = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
|
||||
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
|
||||
<Button variant="outlined" onClick={submenu_statistiques} className="detail_class_submenu" id='statistiques' name='statistiques'>Statistiques </Button>
|
||||
|
||||
|
||||
</div>
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Les Compétences </nav>
|
||||
<div className="session_data" style={{ "minHeight": '15rem', "paddingLeft": "10px", "paddingRight": "10px" }}>
|
||||
|
@ -10219,7 +10220,7 @@ const Employes = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
|
||||
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
|
||||
<Button variant="outlined" onClick={submenu_statistiques} className="detail_class_submenu" id='statistiques' name='statistiques'>Statistiques </Button>
|
||||
|
||||
|
||||
</div>
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Les evaluations </nav>
|
||||
|
||||
|
@ -10370,6 +10371,9 @@ const Employes = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
|
||||
<Button variant="outlined" onClick={submenu_statistiques} className="detail_class_submenu" id='statistiques' name='statistiques'>Statistiques </Button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Les Statitiques </nav>
|
||||
|
||||
|
||||
|
@ -10378,6 +10382,7 @@ const Employes = (props) => {
|
|||
<div className="session_caract">
|
||||
Choisir une question
|
||||
{New_Getall_Employee_Statistic_Question_List_result && New_Getall_Employee_Statistic_Question_List_result.length > 0 &&
|
||||
|
||||
<div style={{ width: '90%', }}>
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1097,11 +1097,16 @@ const Partner_Commande = (props) => {
|
|||
|
||||
if (mylocal_order.related_order_internal_ref) {
|
||||
setp_detail_header_order_header_ref_interne(mylocal_order.related_order_internal_ref);
|
||||
console.log(" ### mylocal_order.related_order_internal_ref = ", mylocal_order.related_order_internal_ref);
|
||||
} else {
|
||||
setp_detail_header_order_header_ref_interne("");
|
||||
}
|
||||
|
||||
if (mylocal_order.closure_reason) {
|
||||
setp_detail_comment_raison_cloture(mylocal_order.closure_reason);
|
||||
} else {
|
||||
setp_detail_comment_raison_cloture("");
|
||||
}
|
||||
|
||||
//document.getElementsByName("detail_header_ref_interne")[0].value = "";
|
||||
if (mylocal_order.order_header_ref_interne) {
|
||||
setp_detail_header_ref_interne(mylocal_order.order_header_ref_interne);
|
||||
|
@ -1874,6 +1879,9 @@ const Partner_Commande = (props) => {
|
|||
const [p_detail_header_ref_client, setp_detail_header_ref_client] = useState();
|
||||
const [p_detail_header_ref_interne, setp_detail_header_ref_interne] = useState();
|
||||
|
||||
const [p_detail_comment_raison_cloture, setp_detail_comment_raison_cloture] = React.useState("");
|
||||
|
||||
|
||||
const [p_detail_header_devis_date_validation, setp_detail_header_devis_date_validation] = useState();
|
||||
const [p_detail_header_devis_date_envoi, setp_detail_header_devis_date_envoi] = useState();
|
||||
|
||||
|
@ -3832,6 +3840,87 @@ const Partner_Commande = (props) => {
|
|||
{ "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres.
|
||||
]
|
||||
|
||||
const New_Option_Cloture_Devis = [
|
||||
{ "id": "4", "label": "Perte", "value": "4" },
|
||||
{ "id": "2", "label": "Cloture", "value": "2" },
|
||||
{ "id": "", "label": "", "value": "" },
|
||||
]
|
||||
const [Dialog_Cloture_Devis_open, setDialog_Cloture_Devis_open] = React.useState(false);
|
||||
|
||||
const Close_Dialog_Cloture_Devis_open = () => {
|
||||
setp_new_raison_cloture("");
|
||||
setp_new_comment_raison_cloture("");
|
||||
setDialog_Cloture_Devis_open(false);
|
||||
};
|
||||
|
||||
const [p_new_raison_cloture, setp_new_raison_cloture] = React.useState("");
|
||||
const [p_new_comment_raison_cloture, setp_new_comment_raison_cloture] = React.useState("");
|
||||
|
||||
|
||||
const [Closure_Given_Quotation_api, setClosure_Given_Quotation_api] = useState();
|
||||
const [Closure_Given_Quotation_message, setClosure_Given_Quotation_message] = useState();
|
||||
const [Closure_Given_Quotation_result, setClosure_Given_Quotation_result] = useState();
|
||||
function Closure_Given_Quotation() {
|
||||
var form = new FormData();
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("order_header_id", selected_id);
|
||||
form.append("order_header_status", setp_new_raison_cloture);
|
||||
form.append("closure_reason", setp_new_comment_raison_cloture);
|
||||
|
||||
|
||||
//console.log(" form == ", form);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Closure_Partner_Quotation_Header/";
|
||||
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Closure_Given_Quotation res.data.status = " + res.data.status);
|
||||
//console.log(" In Closure_Given_Quotation res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setClosure_Given_Quotation_api("true");
|
||||
setClosure_Given_Quotation_result(res.data.message);
|
||||
|
||||
Getall_Parter_Orders_No_Filter();
|
||||
|
||||
setOrder_data_changed("");
|
||||
setorder_data_edit_mode("");
|
||||
Display_Detail_Order_data(selected_id);
|
||||
Close_Dialog_Cloture_Devis_open();
|
||||
alert(res.data.message);
|
||||
|
||||
if (document.getElementById('myRef_head')) {
|
||||
var divh = document.getElementById('myRef_head').offsetTop;
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
disable_Order_Header_DetailFields();
|
||||
|
||||
}
|
||||
else {
|
||||
setClosure_Given_Quotation_api("false");
|
||||
setClosure_Given_Quotation_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
|
||||
setLoading(false);
|
||||
console.warn('UpdateStagiaireData : Not good man :( Closure_Given_Quotation = ' + error);
|
||||
setClosure_Given_Quotation_api("false");
|
||||
alert(" Impossible de faire la mise à jour");
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
|
||||
|
@ -3841,6 +3930,101 @@ const Partner_Commande = (props) => {
|
|||
</div>}
|
||||
|
||||
|
||||
{/****** Dialog pour cloturer un devis (gerer la perte d'un devis avec motif, ou simple cloture) */}
|
||||
|
||||
<Dialog
|
||||
open={Dialog_Cloture_Devis_open}
|
||||
onClose={Close_Dialog_Cloture_Devis_open}
|
||||
className="partner_commande"
|
||||
>
|
||||
|
||||
<DialogTitle> Cloture devis <font style={{ fontWeight: "700" }}> {String(p_detail_header_ref_interne)} </font> </DialogTitle>
|
||||
<DialogContent style={{ "minHeight": "20rem", "width":"30rem" }}>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > Raison Cloture
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="raison_cloture"
|
||||
id="raison_cloture"
|
||||
fullWidth
|
||||
options={New_Option_Cloture_Devis}
|
||||
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value.value) {
|
||||
setp_new_raison_cloture(value.value);
|
||||
|
||||
} else {
|
||||
setp_new_raison_cloture("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
{p_new_raison_cloture && String(p_new_raison_cloture) !== "" &&
|
||||
<div className="session_caract_Dialog_comment_2_lines" > Commentaire
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="comment_raison_cloture"
|
||||
id="comment_raison_cloture"
|
||||
|
||||
fullWidth
|
||||
|
||||
value={p_new_comment_raison_cloture}
|
||||
onChange={(e) => {
|
||||
setp_new_comment_raison_cloture(e.target.value);
|
||||
}
|
||||
}
|
||||
|
||||
//label="Commentaire"
|
||||
//variant="standard"
|
||||
multiline
|
||||
minRows={2}
|
||||
maxRows={2}
|
||||
rows={2}
|
||||
|
||||
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
|
||||
|
||||
<div className="div_row">
|
||||
{p_new_raison_cloture && String(p_new_raison_cloture) !== "" && <div className="div_row_gauche">
|
||||
<Button onClick={Closure_Given_Quotation} className="bton_enreg_dialog">Mettre à jour</Button>
|
||||
</div>}
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Close_Dialog_Cloture_Devis_open} className="bton_annule_dialog" >Annuler</Button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
||||
|
||||
{/****** Dialog pour cloturer un devis (gerer la perte d'un devis avec motif, ou simple cloture) */}
|
||||
|
||||
|
||||
|
||||
{/* Dialog pour gerer la signature digitale */}
|
||||
<Dialog
|
||||
|
@ -4673,29 +4857,7 @@ const Partner_Commande = (props) => {
|
|||
<div className="titre1"> Utilisez les filtres !</div>
|
||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
<div className="div_row_gauche texte_area_filter" >
|
||||
{/* <TextField
|
||||
name="filtre1"
|
||||
label="Choisir un champ"
|
||||
select
|
||||
sx={{ m: 1, width: '100%' }}
|
||||
value={p_filtre1}
|
||||
onChange={(e) => {
|
||||
setp_filtre1(e.target.value);
|
||||
|
||||
}}
|
||||
>
|
||||
<MenuItem value="ref_interne" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Ref. Interne </MenuItem>
|
||||
<MenuItem value="ref_externe" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Ref. Externe (chez le client) </MenuItem>
|
||||
<MenuItem value="client_nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom Client </MenuItem>
|
||||
<MenuItem value="formation" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Lié à la Formation (code externe) </MenuItem>
|
||||
<MenuItem value="code_session" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Lié à la session (code session) </MenuItem>
|
||||
|
||||
|
||||
</TextField>
|
||||
|
||||
*/}
|
||||
|
||||
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
||||
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="filtre1"
|
||||
id="filtre1"
|
||||
|
@ -4705,7 +4867,7 @@ const Partner_Commande = (props) => {
|
|||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_filtre1(value.value);
|
||||
}else{
|
||||
} else {
|
||||
setp_filtre1("");
|
||||
}
|
||||
|
||||
|
@ -4717,7 +4879,7 @@ const Partner_Commande = (props) => {
|
|||
/>
|
||||
}
|
||||
/>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
@ -4778,7 +4940,7 @@ const Partner_Commande = (props) => {
|
|||
{p_filtre2 &&
|
||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
<div className="div_row_gauche texte_area_filter">
|
||||
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
||||
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="filtre2"
|
||||
id="filtre2"
|
||||
|
@ -4861,7 +5023,7 @@ const Partner_Commande = (props) => {
|
|||
{p_filtre3 &&
|
||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
<div className="div_row_gauche texte_area_filter">
|
||||
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
||||
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="filtre3"
|
||||
id="filtre3"
|
||||
|
@ -5199,10 +5361,10 @@ const Partner_Commande = (props) => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
{String(order_data_edit_mode) !== "1" && <div className="session_caract"> Statut
|
||||
{String(order_data_edit_mode) !== "1" && <div className="session_caract"> Statut
|
||||
{p_detail_header_order_header_ref_interne && String(p_detail_header_order_header_ref_interne).length > 2 &&
|
||||
<a data-tooltip-id="ref_converted_order_1" data-tooltip-html={" La réf de la commande : " + `${p_detail_header_order_header_ref_interne}`}>
|
||||
<FcInfo />
|
||||
<FcInfo />
|
||||
</a>
|
||||
}
|
||||
<br />
|
||||
|
@ -6368,7 +6530,17 @@ const Partner_Commande = (props) => {
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>}
|
||||
</Popup>
|
||||
}
|
||||
{String(p_detail_header_statut_label).toLowerCase() !== "traité" &&
|
||||
String(p_detail_header_statut_label).toLowerCase() !== "facturé" &&
|
||||
String(selected_order_header_type) === "devis" &&
|
||||
<Button variant="outlined" className="detail_class_submenu bton_add_sous_menu_cmd_gauche" onClick={(e) => {
|
||||
|
||||
setp_new_comment_raison_cloture(p_detail_comment_raison_cloture);
|
||||
setDialog_Cloture_Devis_open(true);
|
||||
}} > Perdu </Button>
|
||||
}
|
||||
|
||||
<br /> <br />
|
||||
{String(p_detail_header_statut_label).toLowerCase() === "en cours" &&
|
||||
|
|
Loading…
Reference in New Issue