20/06/2025 -18h
parent
35f4b013e5
commit
79b37eb530
|
@ -975,7 +975,7 @@ const Partner_Commande = (props) => {
|
|||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("related_collection", "quotation");
|
||||
form.append("tab_related_collection", "quotation");
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Partner_Basic_Setup/";
|
||||
|
||||
|
@ -7993,7 +7993,7 @@ const Partner_Commande = (props) => {
|
|||
{String(order_data_edit_mode) !== "1" && <div className="session_caract">
|
||||
<Tooltip className="tooltip_css" id="info_relance_1" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="info_relance_1" data-tooltip-html="Le devis sera envoyé tous les X jours, tant qu'il est encours et non expiré ">
|
||||
Fréquence Relance (en jour) <FcInfo /> </a> <br />
|
||||
Fréquence de relance (en jour) <FcInfo /> </a> <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -8014,7 +8014,7 @@ const Partner_Commande = (props) => {
|
|||
{String(order_data_edit_mode) === "1" && New_Option_Frequence_Relance && <div className="session_caract">
|
||||
<Tooltip className="tooltip_css" id="info_relance_1" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="info_relance_1" data-tooltip-html="Le devis sera envoyé tous les X jours, tant qu'il est encours et non expiré ">
|
||||
Fréquence Relance (en jour) <FcInfo /> </a> <br />
|
||||
Fréquence de relance (en jour) <FcInfo /> </a> <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
|
|
@ -118,6 +118,19 @@ const Partner_Configuration_Technique = (props) => {
|
|||
const columns_quotation = [
|
||||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{ field: 'id', headerName: 'id', hide: true },
|
||||
{ field: 'related_collection', headerName: 'Cible', flex: 1, hide: false, editable: false,
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
|
||||
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}>
|
||||
{String(cellValues.row.related_collection) === "quotation" && "Devis"}
|
||||
{String(cellValues.row.related_collection) === "survey" && "Questionnaires"}
|
||||
|
||||
</div>
|
||||
|
||||
);
|
||||
},
|
||||
},
|
||||
{ field: 'config_name', headerName: 'Nom Configuration', flex: 1, hide: false, editable: false },
|
||||
{ field: 'config_value', headerName: 'Valeur config', flex: 1, hide: false, editable: false },
|
||||
]
|
||||
|
@ -788,7 +801,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("related_collection", "");
|
||||
form.append("tab_related_collection", "");
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Partner_Basic_Setup/";
|
||||
|
||||
|
@ -831,7 +844,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("related_collection", "quotation");
|
||||
form.append("tab_related_collection", "quotation,survey");
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Partner_Basic_Setup/";
|
||||
|
||||
|
@ -1059,7 +1072,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Getall_Partner_Competence_List res.data.status = " + res.data.status);
|
||||
// console.log(" In Getall_Partner_Competence_List res.data.message r_class = " + res.data.message);
|
||||
// console.log(" In Getall_Partner_Competence_List res.data.message r_class = " + res.data.message);
|
||||
setGetall_Partner_Competence_List_api("true");
|
||||
setGetall_Partner_Competence_List_result(res.data.message);
|
||||
|
||||
|
@ -1125,6 +1138,8 @@ const Partner_Configuration_Technique = (props) => {
|
|||
|
||||
const [selected_row_id_val, setselected_row_id_val] = React.useState();
|
||||
|
||||
const [selected_row__id, setselected_row__id] = React.useState("");
|
||||
|
||||
const [selected_site_ftion_id, setselected_site_ftion_id] = React.useState("");
|
||||
|
||||
|
||||
|
@ -1227,6 +1242,8 @@ const Partner_Configuration_Technique = (props) => {
|
|||
const [p_detail_quotation_config_point, setp_detail_quotation_config_point] = useState("");
|
||||
const [config_quotation_data_edit_mode, setconfig_quotation_data_edit_mode] = useState("");
|
||||
|
||||
const [p_detail_quotation_config_related_collection, setp_detail_quotation_config_related_collection] = useState("");
|
||||
|
||||
|
||||
|
||||
const [p_detail_doc_automatic_courrier_template_type_document_id, setp_detail_doc_automatic_courrier_template_type_document_id] = useState("");
|
||||
|
@ -1249,16 +1266,15 @@ const Partner_Configuration_Technique = (props) => {
|
|||
|
||||
setconfig_quotation_data_edit_mode("1");
|
||||
|
||||
if (document.getElementsByName("detail_config_point")[0]) {
|
||||
document.getElementsByName("detail_config_point")[0].disabled = false;
|
||||
document.getElementsByName("detail_config_point")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("detail_config_valeur")[0]) {
|
||||
document.getElementsByName("detail_config_valeur")[0].disabled = false;
|
||||
document.getElementsByName("detail_config_valeur")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1266,16 +1282,14 @@ const Partner_Configuration_Technique = (props) => {
|
|||
|
||||
setconfig_data_edit_mode("1");
|
||||
|
||||
if (document.getElementsByName("detail_config_point")[0]) {
|
||||
document.getElementsByName("detail_config_point")[0].disabled = false;
|
||||
document.getElementsByName("detail_config_point")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("detail_config_valeur")[0]) {
|
||||
document.getElementsByName("detail_config_valeur")[0].disabled = false;
|
||||
document.getElementsByName("detail_config_valeur")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function Disable_Config_DetailFields() {
|
||||
|
@ -1293,6 +1307,12 @@ const Partner_Configuration_Technique = (props) => {
|
|||
document.getElementsByName("detail_config_valeur")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("detail_config_cible")[0]) {
|
||||
document.getElementsByName("detail_config_cible")[0].disabled = true;
|
||||
document.getElementsByName("detail_config_cible")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const [selected_quotation_id, setselected_quotation_id] = useState("");
|
||||
|
@ -1312,6 +1332,8 @@ const Partner_Configuration_Technique = (props) => {
|
|||
var local_config_value = line.config_value;
|
||||
setp_detail_quotation_config_valeur(local_config_value);
|
||||
|
||||
setp_detail_quotation_config_related_collection(line.related_collection);
|
||||
|
||||
Disable_Config_DetailFields();
|
||||
|
||||
if (document.getElementById('myRef')) {
|
||||
|
@ -1340,6 +1362,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
var local_config_value = line.config_value;
|
||||
setp_detail_quotation_config_valeur(local_config_value);
|
||||
|
||||
|
||||
Disable_Config_DetailFields();
|
||||
|
||||
setConfig_quotation_data_changed("");
|
||||
|
@ -1459,6 +1482,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
form.append("config_name", p_detail_config_point);
|
||||
form.append("config_value", p_detail_config_valeur);
|
||||
form.append("related_collection", "");
|
||||
form.append("config_id", selected_row__id);
|
||||
|
||||
//console.log(" form == ", form);
|
||||
|
||||
|
@ -1529,7 +1553,8 @@ const Partner_Configuration_Technique = (props) => {
|
|||
form.append("token", stored_cookie);
|
||||
form.append("config_name", p_detail_quotation_config_point);
|
||||
form.append("config_value", p_detail_quotation_config_valeur);
|
||||
form.append("related_collection", "quotation");
|
||||
form.append("related_collection", p_detail_quotation_config_related_collection);
|
||||
form.append("config_id", selected_row__id);
|
||||
|
||||
//console.log(" form == ", form);
|
||||
|
||||
|
@ -1555,6 +1580,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
setp_detail_quotation_config_point("");
|
||||
setconfig_quotation_data_edit_mode("");
|
||||
setdisplay_detail_quotation_config("");
|
||||
setp_detail_quotation_config_related_collection("");
|
||||
|
||||
|
||||
// alert(res.data.message)
|
||||
|
@ -2360,6 +2386,12 @@ const Partner_Configuration_Technique = (props) => {
|
|||
{ "id": "", "label": "", "value": "" },
|
||||
]
|
||||
|
||||
const New_Config_related_collection_targer = [
|
||||
{ "id": "survey", "label": "Questionnaire", "value": "survey" },
|
||||
{ "id": "quotation", "label": "Devis", "value": "quotation" },
|
||||
{ "id": "", "label": "", "value": "" },
|
||||
]
|
||||
|
||||
const [Dialog_site_ftion_1_message, setDialog_site_ftion_1_message] = React.useState(false);
|
||||
const [Dialog_site_ftion_1_open, setDialog_site_ftion_1_open] = React.useState(false);
|
||||
|
||||
|
@ -3623,7 +3655,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
<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>
|
||||
<Button variant="outlined" onClick={submenu_devis} className="detail_class_submenu" id='devis' name='devis'>Relances </Button>
|
||||
|
||||
<Button variant="outlined" onClick={submenu_automatic_doc} className="detail_class_submenu" id='devis' name='devis'>Courrier Auto </Button>
|
||||
|
||||
|
@ -3714,6 +3746,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
|
||||
onRowDoubleClick={(newSelectionModel) => {
|
||||
setgridline_id(newSelectionModel.row.id);
|
||||
setselected_row__id(newSelectionModel.row._id)
|
||||
|
||||
handleClick_edit_config_From_Line(newSelectionModel.row.id);
|
||||
|
||||
|
@ -3796,45 +3829,8 @@ const Partner_Configuration_Technique = (props) => {
|
|||
</div>
|
||||
|
||||
{display_detail_config && String(display_detail_config) === "1" && <div className="div_row">
|
||||
{config_data_edit_mode && String(config_data_edit_mode) === "1" &&
|
||||
<div className="session_caract"> Point de configuration<br />
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="detail_config_point"
|
||||
id="detail_config_point"
|
||||
className="disabled_style"
|
||||
value={New_Config_Point.filter((data) => (data).label === String(p_detail_config_point))[0].label}
|
||||
options={New_Config_Point}
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value.value && value.value === "signature_digital") {
|
||||
alert(" Vos droits d'accès ne vous permettent pas modifier la configuration : 'signature_digital'");
|
||||
return;
|
||||
}
|
||||
if (value && value.value) {
|
||||
setp_detail_config_point(value.value);
|
||||
setConfig_data_changed("1");
|
||||
} else {
|
||||
setp_detail_config_point("");
|
||||
setConfig_data_changed("1");
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
{String(config_data_edit_mode) !== "1" &&
|
||||
<div className="session_caract"> Point de configuration<br />
|
||||
|
||||
<div className="session_caract"> Point de configuration<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -3850,9 +3846,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
|
||||
|
||||
/>
|
||||
|
||||
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
{String(config_data_edit_mode) === "1" && <div className="session_caract"> Valeur de configuration<br />
|
||||
<TextField
|
||||
|
@ -4946,11 +4940,12 @@ const Partner_Configuration_Technique = (props) => {
|
|||
/*if (newSelectionModel.length === 1)
|
||||
handleClick_edit_config_From_Line(newSelectionModel);*/
|
||||
if (newSelectionModel.length !== 1) {
|
||||
setp_detail_quotation_config_valeur();
|
||||
setConfig_quotation_data_changed();
|
||||
setp_detail_quotation_config_point();
|
||||
setconfig_quotation_data_edit_mode();
|
||||
setdisplay_detail_quotation_config();
|
||||
setp_detail_quotation_config_valeur("");
|
||||
setConfig_quotation_data_changed("");
|
||||
setp_detail_quotation_config_point("");
|
||||
setconfig_quotation_data_edit_mode("");
|
||||
setdisplay_detail_quotation_config("");
|
||||
setp_detail_quotation_config_related_collection("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
@ -4963,6 +4958,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
_id: JSON.parse(item)._id,
|
||||
config_name: JSON.parse(item).config_name,
|
||||
config_value: JSON.parse(item).config_value,
|
||||
related_collection: JSON.parse(item).related_collection,
|
||||
}
|
||||
))}
|
||||
|
||||
|
@ -4972,6 +4968,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
|
||||
onRowDoubleClick={(newSelectionModel) => {
|
||||
setgridline_quotation_id(newSelectionModel.row.id);
|
||||
setselected_row__id(newSelectionModel.row._id)
|
||||
handleClick_edit_config_quotation_From_Line(newSelectionModel.row.id);
|
||||
|
||||
}}
|
||||
|
@ -5053,45 +5050,25 @@ const Partner_Configuration_Technique = (props) => {
|
|||
</div>
|
||||
|
||||
{display_detail_quotation_config && String(display_detail_quotation_config) === "1" && <div className="div_row">
|
||||
{config_quotation_data_edit_mode && String(config_quotation_data_edit_mode) === "1" &&
|
||||
New_Config_Quotation_Point &&
|
||||
<div className="session_caract"> Point de configuration<br />
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="detail_config_point"
|
||||
id="detail_config_point"
|
||||
className="disabled_style"
|
||||
value={New_Config_Quotation_Point.filter((data) => (data).value === String(p_detail_quotation_config_point))[0].label}
|
||||
options={New_Config_Quotation_Point}
|
||||
onChange={(event, value) => {
|
||||
<div className="session_caract"> Cible<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_config_cible"
|
||||
id="detail_config_cible"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_quotation_config_related_collection}
|
||||
|
||||
if (value && value.value) {
|
||||
setp_detail_quotation_config_point(value.value);
|
||||
setConfig_quotation_data_changed("1");
|
||||
/>
|
||||
</div>
|
||||
|
||||
} else {
|
||||
setp_detail_quotation_config_point("");
|
||||
setConfig_quotation_data_changed("1");
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
{String(config_quotation_data_edit_mode) !== "1" &&
|
||||
<div className="session_caract"> Point de configuration<br />
|
||||
<div className="session_caract"> Point de configuration<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -5108,8 +5085,9 @@ const Partner_Configuration_Technique = (props) => {
|
|||
/>
|
||||
|
||||
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
|
||||
{String(config_quotation_data_edit_mode) === "1" && String(p_detail_quotation_config_point) !== "frequence_relance_auto" &&
|
||||
<div className="session_caract"> Valeur de configuration<br />
|
||||
<TextField
|
||||
|
@ -5136,7 +5114,7 @@ const Partner_Configuration_Technique = (props) => {
|
|||
<div className="session_caract">
|
||||
<Tooltip className="tooltip_css" id="info_relance_1" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="info_relance_1" data-tooltip-html="Le devis sera envoyé tous les X jours, tant qu'il est encours et non expiré ">
|
||||
Fréquence Relance (en jour) <FcInfo /> </a>
|
||||
Fréquence de relance (en jour) <FcInfo /> </a>
|
||||
<br />
|
||||
|
||||
<TextField
|
||||
|
|
Loading…
Reference in New Issue