qsq
parent
1e6205b232
commit
d52e043fa7
|
|
@ -433,33 +433,19 @@ const Employes = (props) => {
|
|||
{ field: 'periodicite', headerName: 'Périodicité', flex: 1, minWidth: 150, hide: false, editable: false },
|
||||
{ field: 'comment', headerName: 'Commentaire', flex: 1, hide: true, width: 150, },
|
||||
|
||||
|
||||
|
||||
{
|
||||
field: "print", headerName: 'Impr.',
|
||||
field: "e-sign", headerName: 'Impr / E. Sign',
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
<>
|
||||
{String(props.check_user_acces_right("employe", "write")) === "1" && <Button
|
||||
onClick={(e) => {
|
||||
setselected_contrat_id(cellValues.row._id);
|
||||
setDialog_print_contrat_open(true);
|
||||
}}
|
||||
>
|
||||
<FcPrint />
|
||||
setEMPLOYEE_CONTRACT_modele_id("");
|
||||
settab_contrat_pieces_jointes_result([]);
|
||||
setselected_contrat_type("");
|
||||
|
||||
</Button>}
|
||||
</>
|
||||
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: "e-sign", headerName: 'E. Sign.',
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
<>
|
||||
{String(props.check_user_acces_right("employe", "write")) === "1" && <Button
|
||||
onClick={(e) => {
|
||||
setselected_contrat_id(cellValues.row._id);
|
||||
setDialog_signature_digitale_open(true);
|
||||
}}
|
||||
|
|
@ -6920,7 +6906,7 @@ const Employes = (props) => {
|
|||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": local_nom+" - "+local_type_doc,
|
||||
"label": local_nom + " - " + local_type_doc,
|
||||
"ref_interne": local_ref_interne,
|
||||
"nom": local_nom,
|
||||
"sujet": local_sujet,
|
||||
|
|
@ -7088,6 +7074,11 @@ const Employes = (props) => {
|
|||
const [Dialog_signature_digitale_open, setDialog_signature_digitale_open] = React.useState(false);
|
||||
function Dialog_signature_digitale_handle_change_participant_session(message) {
|
||||
setDialog_signature_digitale_message(message);
|
||||
|
||||
setEMPLOYEE_CONTRACT_modele_id("");
|
||||
settab_contrat_pieces_jointes_result([]);
|
||||
setselected_contrat_type("");
|
||||
|
||||
setDialog_signature_digitale_open(true);
|
||||
}
|
||||
|
||||
|
|
@ -7100,6 +7091,11 @@ const Employes = (props) => {
|
|||
setDialog_signature_digitale_open(false);
|
||||
setEMPLOYEE_CONTRACT_modele_id("");
|
||||
settab_contrat_pieces_jointes_result([]);
|
||||
|
||||
setEMPLOYEE_CONTRACT_modele_id("");
|
||||
settab_contrat_pieces_jointes_result([]);
|
||||
setselected_contrat_type("");
|
||||
|
||||
};
|
||||
|
||||
function Delete_Convention_Attached_Doc(event) {
|
||||
|
|
@ -7311,6 +7307,14 @@ const Employes = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const New_Option_Type_Document = [
|
||||
{ "id": "email", "label": "Email", "value": "email" },
|
||||
{ "id": "pdf", "label": "PDF", "value": "pdf" },
|
||||
]
|
||||
|
||||
|
||||
const [selected_contrat_type, setselected_contrat_type] = useState("");
|
||||
|
||||
|
||||
return (
|
||||
<div className="employes">
|
||||
|
|
@ -7368,37 +7372,163 @@ const Employes = (props) => {
|
|||
Envoi le contrat par email
|
||||
</DialogContentText>
|
||||
|
||||
{New_Option_Type_Document && New_Option_Type_Document.length > 0 && <div className="session_caract_Dialog" > <b>Type Document </b> <br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_type_contrat"
|
||||
id="event_dialog_type_contrat"
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 } }}
|
||||
fullWidth
|
||||
options={New_Option_Type_Document}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setselected_contrat_type(value.value)
|
||||
}
|
||||
|
||||
{String(partner_digital_signature_status) === "1" && <div className="session_caract_Dialog" >
|
||||
<div className="session_caract_Dialog" >
|
||||
<Tooltip className="tooltip_css" id="tooltip_signat_dig" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="tooltip_signat_dig" data-tooltip-html="Utiliser la fonctionnalité de signature électronique pour ce document ">
|
||||
<nav className="disabled_style" style={{ "height": '3rem', border: "none" }}
|
||||
onChange={(e) => {
|
||||
|
||||
if (local_partner_digital_signature_status === true)
|
||||
setlocal_partner_digital_signature_status(false)
|
||||
else {
|
||||
|
||||
setlocal_partner_digital_signature_status(true);
|
||||
}
|
||||
|
||||
}}
|
||||
id="toggleSwitchNav_1" name="toggleSwitchNav_1">
|
||||
<ToggleSwitch
|
||||
label="Signature Digiale" id="toggleSwitch_1" name="toggleSwitch_1" checked={local_partner_digital_signature_status} style={{ height: "2rem" }} />
|
||||
</nav>
|
||||
</a>
|
||||
setEMPLOYEE_CONTRACT_modele_id("");
|
||||
settab_contrat_pieces_jointes_result([]);
|
||||
|
||||
|
||||
</div>
|
||||
}}
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
<div>
|
||||
<div className="session_caract_Dialog" > <b>Choisir un modèle de contrat 02</b> <br />
|
||||
{selected_contrat_type && String(selected_contrat_type) === "email" && <>
|
||||
{String(partner_digital_signature_status) === "1" && <div className="session_caract_Dialog" >
|
||||
<div className="session_caract_Dialog" >
|
||||
<Tooltip className="tooltip_css" id="tooltip_signat_dig" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="tooltip_signat_dig" data-tooltip-html="Utiliser la fonctionnalité de signature électronique pour ce document ">
|
||||
<nav className="disabled_style" style={{ "height": '3rem', border: "none" }}
|
||||
onChange={(e) => {
|
||||
|
||||
if (local_partner_digital_signature_status === true)
|
||||
setlocal_partner_digital_signature_status(false)
|
||||
else {
|
||||
|
||||
setlocal_partner_digital_signature_status(true);
|
||||
}
|
||||
|
||||
}}
|
||||
id="toggleSwitchNav_1" name="toggleSwitchNav_1">
|
||||
<ToggleSwitch
|
||||
label="Signature Digiale" id="toggleSwitch_1" name="toggleSwitch_1" checked={local_partner_digital_signature_status} style={{ height: "2rem" }} />
|
||||
</nav>
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>}
|
||||
|
||||
<div>
|
||||
<div className="session_caract_Dialog" > <b>Choisir un modèle de contrat 02</b> <br />
|
||||
|
||||
{New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result && New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 } }}
|
||||
|
||||
name="event_dialog_contrat_modele"
|
||||
id="event_dialog_contrat_modele"
|
||||
fullWidth
|
||||
// options={New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result}
|
||||
options={New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result.filter((data) => (data).type_doc === "email")}
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setEMPLOYEE_CONTRACT_modele_id(value._id);
|
||||
|
||||
} else {
|
||||
setEMPLOYEE_CONTRACT_modele_id("");
|
||||
}
|
||||
}}
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<hr className="hr_break" />
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
|
||||
Pièces jointes
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "padding": "5px" }}>
|
||||
|
||||
{String(props.check_user_acces_right("commande", "write")) === "1" && <div style={{ "fontSize": "12px" }}>
|
||||
<label htmlFor="upload_convention_file">
|
||||
<input
|
||||
style={{ display: "none" }}
|
||||
id="upload_convention_file"
|
||||
name="upload_convention_file"
|
||||
type="file"
|
||||
onChange={sessions_file_change_1_convention}
|
||||
/>
|
||||
|
||||
<Fab
|
||||
color="secondary"
|
||||
size="small"
|
||||
component="span"
|
||||
aria-label="add"
|
||||
variant="extended"
|
||||
>
|
||||
<IoMdAddCircle /> <nav style={{ "fontSize": "12px" }}> Ajouter un fichier </nav>
|
||||
</Fab>
|
||||
|
||||
</label>
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{tab_contrat_pieces_jointes_result && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
|
||||
<div className="div_row">
|
||||
Liste des pièces jointes <br />
|
||||
{<div className="div_row">
|
||||
{tab_contrat_pieces_jointes_result && tab_contrat_pieces_jointes_result.map((val) => (
|
||||
<div className="div_row_list_pj_convention" >
|
||||
<nav style={{ "color": "orange", "cursor": "pointer" }}
|
||||
onClick={(e) => {
|
||||
Delete_Convention_Attached_Doc(e);
|
||||
}}
|
||||
name={val.name} id={val.name}> Supprimer {val.name} </nav> <br />
|
||||
|
||||
|
||||
</div>
|
||||
))}
|
||||
</div>}
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</>}
|
||||
|
||||
{selected_contrat_type && String(selected_contrat_type) === "pdf" && <>
|
||||
<div className="session_caract_Dialog" > Choisir un modèle de contrat 01<br />
|
||||
|
||||
{New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result && New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 } }}
|
||||
|
|
@ -7406,8 +7536,8 @@ const Employes = (props) => {
|
|||
name="event_dialog_contrat_modele"
|
||||
id="event_dialog_contrat_modele"
|
||||
fullWidth
|
||||
// options={New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result}
|
||||
options={New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result.filter((data) => (data).type_doc === "email")}
|
||||
// options={New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result}
|
||||
options={New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result.filter((data) => (data).type_doc === "pdf")}
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
|
|
@ -7422,78 +7552,10 @@ const Employes = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<hr className="hr_break" />
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
|
||||
Pièces jointes
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "padding": "5px" }}>
|
||||
|
||||
{String(props.check_user_acces_right("commande", "write")) === "1" && <div style={{ "fontSize": "12px" }}>
|
||||
<label htmlFor="upload_convention_file">
|
||||
<input
|
||||
style={{ display: "none" }}
|
||||
id="upload_convention_file"
|
||||
name="upload_convention_file"
|
||||
type="file"
|
||||
onChange={sessions_file_change_1_convention}
|
||||
/>
|
||||
|
||||
<Fab
|
||||
color="secondary"
|
||||
size="small"
|
||||
component="span"
|
||||
aria-label="add"
|
||||
variant="extended"
|
||||
>
|
||||
<IoMdAddCircle /> <nav style={{ "fontSize": "12px" }}> Ajouter un fichier </nav>
|
||||
</Fab>
|
||||
|
||||
</label>
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{tab_contrat_pieces_jointes_result && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
|
||||
<div className="div_row">
|
||||
Liste des pièces jointes <br />
|
||||
{<div className="div_row">
|
||||
{tab_contrat_pieces_jointes_result && tab_contrat_pieces_jointes_result.map((val) => (
|
||||
<div className="div_row_list_pj_convention" >
|
||||
<nav style={{ "color": "orange", "cursor": "pointer" }}
|
||||
onClick={(e) => {
|
||||
Delete_Convention_Attached_Doc(e);
|
||||
}}
|
||||
name={val.name} id={val.name}> Supprimer {val.name} </nav> <br />
|
||||
|
||||
|
||||
</div>
|
||||
))}
|
||||
</div>}
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</>}
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
|
|
@ -7507,7 +7569,7 @@ const Employes = (props) => {
|
|||
<CancelPresentationIcon />
|
||||
</IconButton>
|
||||
|
||||
<div className="div_row">
|
||||
{selected_contrat_type && String(selected_contrat_type) === "email" && <div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
<Button onClick={(e) => {
|
||||
|
||||
|
|
@ -7521,11 +7583,19 @@ const Employes = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Dialog_signature_digitale_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
|
||||
{selected_contrat_type && String(selected_contrat_type) === "pdf" && <div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
{EMPLOYEE_CONTRACT_modele_id && String(EMPLOYEE_CONTRACT_modele_id).length > 5 &&
|
||||
<Button className="bton_enreg_dialog" onClick={(e) => {
|
||||
handleClick_print_employee_contrat(selected_contrat_id);
|
||||
}}
|
||||
>Imprimer </Button>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
</DialogActions>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue