25/03/2024 - 18h30
parent
57ad32b62a
commit
ac8e9c4ffd
|
@ -483,6 +483,11 @@ const AddClassManual = (props) => {
|
|||
const [field_description, setfield_description] = useState("");
|
||||
const [field_objectif, setfield_objectif] = useState("");
|
||||
const [field_programme, setfield_programme] = useState("");
|
||||
|
||||
const [field_methode_pedago, setfield_methode_pedago] = useState("");
|
||||
const [field_handicap, setfield_handicap] = useState("");
|
||||
|
||||
|
||||
const [field_prerequis, setfield_prerequis] = useState("");
|
||||
const [field_pourqui, setfield_pourqui] = useState("");
|
||||
const [field_mots_cle, setfield_mots_cle] = useState("");
|
||||
|
@ -544,6 +549,18 @@ const AddClassManual = (props) => {
|
|||
setfield_programme(mylocaltraining.programme);
|
||||
}
|
||||
|
||||
|
||||
if (mylocaltraining.methode_pedagogique) {
|
||||
//document.getElementsByName("programme")[0].value = mylocaltraining.programme;
|
||||
setfield_methode_pedago(mylocaltraining.methode_pedagogique);
|
||||
}
|
||||
|
||||
if (mylocaltraining.condition_handicape) {
|
||||
//document.getElementsByName("programme")[0].value = mylocaltraining.programme;
|
||||
setfield_handicap(mylocaltraining.condition_handicape);
|
||||
}
|
||||
|
||||
|
||||
if (mylocaltraining.pourqui) {
|
||||
//document.getElementsByName("programme")[0].value = mylocaltraining.programme;
|
||||
setfield_pourqui(mylocaltraining.pourqui);
|
||||
|
@ -812,6 +829,13 @@ const AddClassManual = (props) => {
|
|||
const editorRef_programme = useRef(null);
|
||||
const [editorRef_programme_limite, seteditorRef_programme] = useState(1000);
|
||||
|
||||
|
||||
const editorRef_methode_pedago = useRef(null);
|
||||
const [editorRef_methode_pedago_limite, seteditorRef_methode_pedago] = useState(1000);
|
||||
|
||||
const editorRef_handicap = useRef(null);
|
||||
const [editorRef_handicap_limite, seteditorRef_handicap_limite] = useState(1000);
|
||||
|
||||
const editorRef_prerequis = useRef(null);
|
||||
const editorRef_pourqui = useRef(null);
|
||||
const editorRef_mots_cle = useRef(null);
|
||||
|
@ -898,6 +922,32 @@ const AddClassManual = (props) => {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var methode_pedago = "";
|
||||
if (editorRef_methode_pedago.current) {
|
||||
methode_pedago = editorRef_methode_pedago.current.getContent();
|
||||
|
||||
if (parse(methode_pedago.replace(/(<([^>]+)>)/ig, '')).length > editorRef_methode_pedago_limite) {
|
||||
alert(" Champ 'Méthode pédagogique', limite depassée !")
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var handicap = "";
|
||||
if (editorRef_handicap.current) {
|
||||
handicap = editorRef_handicap.current.getContent();
|
||||
|
||||
if (parse(handicap.replace(/(<([^>]+)>)/ig, '')).length > editorRef_handicap_limite) {
|
||||
alert(" Champ 'Handicape', limite depassée !")
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var prerequis = "";
|
||||
if (editorRef_prerequis.current) {
|
||||
prerequis = editorRef_prerequis.current.getContent();
|
||||
|
@ -990,6 +1040,10 @@ const AddClassManual = (props) => {
|
|||
|
||||
formData.append('objectif', objectif);
|
||||
formData.append('programme', programme);
|
||||
|
||||
formData.append('methode_pedagogique', methode_pedago);
|
||||
formData.append('condition_handicape', handicap);
|
||||
|
||||
formData.append('prerequis', prerequis);
|
||||
|
||||
formData.append('description', description);
|
||||
|
@ -1493,6 +1547,11 @@ const AddClassManual = (props) => {
|
|||
setfield_description("");
|
||||
setfield_objectif("");
|
||||
setfield_programme("");
|
||||
|
||||
setfield_methode_pedago("");
|
||||
setfield_handicap("");
|
||||
|
||||
|
||||
setfield_prerequis("");
|
||||
setfield_mots_cle("");
|
||||
setfield_plus_produit("");
|
||||
|
@ -2732,6 +2791,68 @@ const AddClassManual = (props) => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div className="training_text">
|
||||
<div className="plus_produit_desabled">
|
||||
<div className="titre_training_text"> Méthode pédagogique (max 1000 caractères) </div>
|
||||
<Editor
|
||||
onInit={(evt, editor) => editorRef_methode_pedago.current = editor}
|
||||
initialValue={field_methode_pedago}
|
||||
onKeyUp={editor_keyup}
|
||||
onEditorChange={(newValue, editor) => {
|
||||
if (String(editor_tochange) === "1") {
|
||||
//alert(" change");
|
||||
DataUpdated();
|
||||
seteditor_tochange("");
|
||||
}
|
||||
}}
|
||||
init={{
|
||||
resize: false,
|
||||
height: 300,
|
||||
menubar: false,
|
||||
plugins: [
|
||||
'advlist autolink lists link image charmap print preview anchor',
|
||||
'searchreplace visualblocks code fullscreen',
|
||||
'insertdatetime media table paste code help wordcount'
|
||||
],
|
||||
|
||||
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px; }'
|
||||
}}
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="training_text">
|
||||
<div className="plus_produit_desabled">
|
||||
<div className="titre_training_text"> Condition handicape (max 1000 caractères) </div>
|
||||
<Editor
|
||||
onInit={(evt, editor) => editorRef_handicap.current = editor}
|
||||
initialValue={field_handicap}
|
||||
onKeyUp={editor_keyup}
|
||||
onEditorChange={(newValue, editor) => {
|
||||
if (String(editor_tochange) === "1") {
|
||||
//alert(" change");
|
||||
DataUpdated();
|
||||
seteditor_tochange("");
|
||||
}
|
||||
}}
|
||||
init={{
|
||||
resize: false,
|
||||
height: 300,
|
||||
menubar: false,
|
||||
plugins: [
|
||||
'advlist autolink lists link image charmap print preview anchor',
|
||||
'searchreplace visualblocks code fullscreen',
|
||||
'insertdatetime media table paste code help wordcount'
|
||||
],
|
||||
|
||||
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px; }'
|
||||
}}
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="training_text">
|
||||
<div className="plus_produit_desabled">
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { useRef, useState, useEffect } from "react";
|
|||
|
||||
import TextField from '@mui/material/TextField';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
|
||||
import fileDownload from 'js-file-download';
|
||||
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
|
||||
import Button from '@mui/material/Button';
|
||||
import axios from "axios";
|
||||
|
@ -11,9 +11,9 @@ import { getCookie, setCookie } from 'react-use-cookie';
|
|||
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
||||
|
||||
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
||||
import { GrUserAdmin, GrOrderedList } from "react-icons/gr";
|
||||
|
||||
import { Fab } from "@material-ui/core";
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
import { CiEdit, CiTrash } from "react-icons/ci";
|
||||
|
@ -191,6 +191,10 @@ const AddParnerClient = (props) => {
|
|||
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_piece_jointe").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_piece_jointe").style.color = "#3b3e40";
|
||||
|
||||
|
||||
|
||||
document.getElementById("submenu_donnee_client").style.background = "#104277";
|
||||
document.getElementById("submenu_donnee_client").style.color = "white";
|
||||
|
@ -236,6 +240,10 @@ const AddParnerClient = (props) => {
|
|||
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_piece_jointe").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_piece_jointe").style.color = "#3b3e40";
|
||||
|
||||
|
||||
document.getElementById("submenu_donnee_facturation").style.background = "#104277";
|
||||
document.getElementById("submenu_donnee_facturation").style.color = "white";
|
||||
|
||||
|
@ -281,6 +289,9 @@ const AddParnerClient = (props) => {
|
|||
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_piece_jointe").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_piece_jointe").style.color = "#3b3e40";
|
||||
|
||||
|
||||
document.getElementById("submenu_contact").style.background = "#104277";
|
||||
document.getElementById("submenu_contact").style.color = "white";
|
||||
|
@ -300,19 +311,7 @@ const AddParnerClient = (props) => {
|
|||
//Enable_invoice_fields();
|
||||
}
|
||||
|
||||
/*
|
||||
document.getElementById("submenu_factures").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_factures").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_stagiaires").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_stagiaires").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_devis").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_devis").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_cmd").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_cmd").style.color = "#3b3e40";
|
||||
*/
|
||||
|
||||
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
|
||||
|
@ -326,6 +325,8 @@ const AddParnerClient = (props) => {
|
|||
document.getElementById("submenu_contact").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_contact").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_piece_jointe").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_piece_jointe").style.color = "#3b3e40";
|
||||
|
||||
|
||||
document.getElementById("submenu_activite").style.background = "#104277";
|
||||
|
@ -334,6 +335,44 @@ const AddParnerClient = (props) => {
|
|||
|
||||
}
|
||||
|
||||
|
||||
async function submenu_piece_jointe() {
|
||||
|
||||
setsubmenu("submenu_piece_jointe");
|
||||
/*
|
||||
Ceci est super crade, fair eun wait de pour attendre l'afficage avant de desacitcation si on a desactiver, mais bon ... on avance.
|
||||
*/
|
||||
await sleep(5);
|
||||
if (String(formedit_mode_invoice) !== "1") {
|
||||
//Disable_invoice_fields();
|
||||
} else {
|
||||
//Enable_invoice_fields();
|
||||
}
|
||||
|
||||
|
||||
|
||||
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_donnee_client").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_donnee_client").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_contact").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_contact").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_activite").style.background = "#d8edfc";
|
||||
document.getElementById("submenu_activite").style.color = "#3b3e40";
|
||||
|
||||
document.getElementById("submenu_piece_jointe").style.background = "#104277";
|
||||
document.getElementById("submenu_piece_jointe").style.color = "white";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
async function submenu_devis() {
|
||||
setsubmenu("submenu_devis");
|
||||
/*
|
||||
|
@ -431,6 +470,12 @@ const AddParnerClient = (props) => {
|
|||
document.getElementById("submenu_donnee_facturation").style.background = "#104277";
|
||||
document.getElementById("submenu_donnee_facturation").style.color = "white";
|
||||
}
|
||||
|
||||
else if (String(submenu) === "submenu_piece_jointe") {
|
||||
document.getElementById("submenu_piece_jointe").style.background = "#104277";
|
||||
document.getElementById("submenu_piece_jointe").style.color = "white";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const [addcontact, setaddcontact] = useState("0");
|
||||
|
@ -617,6 +662,7 @@ const AddParnerClient = (props) => {
|
|||
useEffect(() => {
|
||||
Get_List_Client_Type();
|
||||
Getall_Partner_Paiement_Condition();
|
||||
Get_List_Of_All_PJ(props.client_id);
|
||||
|
||||
if (String(props.new_customer) !== "1") {
|
||||
setformedit_mode("0");
|
||||
|
@ -972,7 +1018,7 @@ const AddParnerClient = (props) => {
|
|||
}
|
||||
|
||||
setp_client_is_company("0");
|
||||
if (mylocalclient.is_company ) {
|
||||
if (mylocalclient.is_company) {
|
||||
setp_client_is_company(mylocalclient.is_company);
|
||||
}
|
||||
|
||||
|
@ -1114,7 +1160,7 @@ const AddParnerClient = (props) => {
|
|||
document.getElementsByName("client_siret")[0].value = "";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("client_type_id")) {
|
||||
if (document.getElementsByName("client_type_id") && document.getElementsByName("client_type_id")[0]) {
|
||||
document.getElementsByName("client_type_id")[0].value = "";
|
||||
}
|
||||
|
||||
|
@ -1179,7 +1225,7 @@ const AddParnerClient = (props) => {
|
|||
document.getElementsByName("client_siret")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("client_type_id")) {
|
||||
if (document.getElementsByName("client_type_id") && document.getElementsByName("client_type_id")[0]) {
|
||||
document.getElementsByName("client_type_id")[0].disabled = true;
|
||||
document.getElementsByName("client_type_id")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
@ -1248,7 +1294,7 @@ const AddParnerClient = (props) => {
|
|||
document.getElementsByName("client_siret")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("client_type_id")) {
|
||||
if (document.getElementsByName("client_type_id") && document.getElementsByName("client_type_id")[0]) {
|
||||
document.getElementsByName("client_type_id")[0].disabled = false;
|
||||
document.getElementsByName("client_type_id")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
@ -2480,6 +2526,332 @@ const AddParnerClient = (props) => {
|
|||
const [p_client_is_fournisseur, setp_client_is_fournisseur] = useState(false);
|
||||
const [p_client_is_client, setp_client_is_client] = useState(true);
|
||||
|
||||
const [isLoading, setLoading] = useState();
|
||||
|
||||
// -- Gestion pièces jointes
|
||||
|
||||
const [Download_one_attached_document_api, setDownload_one_attached_document_api] = useState();
|
||||
const [Download_one_attached_document_result, setDownload_one_attached_document_result] = useState();
|
||||
const [Download_one_attached_document_message, setDownload_one_attached_document_message] = useState();
|
||||
const Download_one_attached_document = (event) => {
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
|
||||
var nom_fiche_detaillee = "Fiche_Detaillee.pdf";
|
||||
var token = stored_cookie;
|
||||
var file_name = event.target.id;
|
||||
|
||||
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Stored_Downloaded_File/" + token + "/" + file_name;
|
||||
setLoading(true);
|
||||
|
||||
axios.get(url, { responseType: 'blob', },)
|
||||
.then((res) => {
|
||||
setLoading(false);
|
||||
fileDownload(res.data, nom_fiche_detaillee);
|
||||
setDownload_one_attached_document_api("true");
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.error('Error:', error);
|
||||
setDownload_one_attached_document_api("false");
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const editorRef_competence = useRef(null);
|
||||
const [editorRef_competence_limite, seteditorRef_competence_limite] = useState(800);
|
||||
|
||||
|
||||
const [file_1_name, setfile_1_name] = useState();
|
||||
|
||||
const [sessions_file_change_1_api, setsessions_file_change_1_api] = useState();
|
||||
const [sessions_file_change_1_result, setsessions_file_change_1_result] = useState();
|
||||
const [sessions_file_change_1_message, setsessions_file_change_1_message] = useState();
|
||||
const sessions_file_change_1 = event => {
|
||||
|
||||
const fileUploaded = event.target.files[0];
|
||||
let file_size = event.target.files[0].size;
|
||||
let file_type = event.target.files[0].type;
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("file_size = ", file_size, " file_type = ", file_type);
|
||||
if (file_size > 10000000) {
|
||||
alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
return;
|
||||
}
|
||||
|
||||
setfile_1_name(event.target.files[0]);
|
||||
const formData = new FormData();
|
||||
formData.append('File', fileUploaded);
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
//formData.append("token", stored_cookie);
|
||||
//formData.append("class_internal_url", internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
|
||||
return;
|
||||
|
||||
};
|
||||
|
||||
|
||||
const [file_2_name, setfile_2_name] = useState();
|
||||
|
||||
const [sessions_file_change_2_api, setsessions_file_change_2_api] = useState();
|
||||
const [sessions_file_change_2_result, setsessions_file_change_2_result] = useState();
|
||||
const [sessions_file_change_2_message, setsessions_file_change_2_message] = useState();
|
||||
const sessions_file_change_2 = event => {
|
||||
|
||||
const fileUploaded = event.target.files[0];
|
||||
let file_size = event.target.files[0].size;
|
||||
let file_type = event.target.files[0].type;
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("file_size = ", file_size, " file_type = ", file_type);
|
||||
if (file_size > 10000000) {
|
||||
alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
return;
|
||||
}
|
||||
|
||||
setfile_2_name(event.target.files[0]);
|
||||
const formData = new FormData();
|
||||
formData.append('File', fileUploaded);
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
//formData.append("token", stored_cookie);
|
||||
//formData.append("class_internal_url", internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
|
||||
return;
|
||||
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/Add_Update_SessionFormation_mass/",
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
|
||||
//console.log(" ## result['status'] = ", result['status'])
|
||||
if (String(result['status']) === String("true")) {
|
||||
//console.log('Success:', result['message']);
|
||||
setsessions_file_change_2_result(result['message']);
|
||||
setsessions_file_change_2_api("true");
|
||||
//GetCurrentClass_trainingsession();
|
||||
|
||||
}
|
||||
else {
|
||||
setsessions_file_change_2_message(result['message']);
|
||||
setsessions_file_change_2_api("false");
|
||||
}
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
setsessions_file_change_2_api("false");
|
||||
});
|
||||
};
|
||||
|
||||
const [Record_All_PJ_api, setRecord_All_PJ_api] = useState();
|
||||
const [Record_All_PJ_result, setRecord_All_PJ_result] = useState();
|
||||
const [Record_All_PJ_message, setRecord_All_PJ_message] = useState();
|
||||
function Record_All_PJ() {
|
||||
|
||||
if (!p_detail_one_file_to_download_type_name) {
|
||||
alert(" Vous devez donner un nom à la pièce jointe");
|
||||
return;
|
||||
}
|
||||
|
||||
if (file_1_name && file_1_name.name) {
|
||||
console.log(" ### Traitement de : ", file_1_name.name);
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('File', file_1_name);
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
formData.append("token", stored_cookie);
|
||||
formData.append("file_business_object", p_detail_one_file_to_download_type_name);
|
||||
formData.append("file_name", file_1_name.name);
|
||||
formData.append("status", "0");
|
||||
formData.append("object_owner_collection", "ressource_humaine");
|
||||
formData.append("object_owner_id", props.client_id);
|
||||
|
||||
//formData.append("class_internal_url", internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
|
||||
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/Store_User_Downloaded_File/",
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
|
||||
//console.log(" ## result['status'] = ", result['status'])
|
||||
if (String(result['status']) === String("true")) {
|
||||
//console.log('Success:', result['message']);
|
||||
setRecord_All_PJ_result(result['message']);
|
||||
setRecord_All_PJ_api("true");
|
||||
|
||||
Get_List_Of_All_PJ(props.client_id);
|
||||
setfile_1_name();
|
||||
setp_detail_one_file_to_download_type_name();
|
||||
//GetCurrentClass_trainingsession();
|
||||
alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée")
|
||||
|
||||
}
|
||||
else {
|
||||
setRecord_All_PJ_message(result['message']);
|
||||
setRecord_All_PJ_api("false");
|
||||
}
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(' Record_All_PJ Error:', error);
|
||||
setRecord_All_PJ_api("false");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (file_2_name && file_2_name.name) {
|
||||
console.log(" ### Traitement de : ", file_2_name.name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [Delete_one_attached_document_api, setDelete_one_attached_document_api] = useState();
|
||||
const [Delete_one_attached_document_result, setDelete_one_attached_document_result] = useState();
|
||||
const [Delete_one_attached_document_message, setDelete_one_attached_document_message] = useState();
|
||||
const Delete_one_attached_document = (event) => {
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
var formData = new FormData();
|
||||
var nom_fiche_detaillee = "Fiche_Detaillee.pdf";
|
||||
var file_name = event.target.id;
|
||||
|
||||
|
||||
formData.append("token", stored_cookie);
|
||||
formData.append("file_name", file_name);
|
||||
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/";
|
||||
|
||||
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/",
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
|
||||
//console.log(" ## result['status'] = ", result['status'])
|
||||
if (String(result['status']) === String("true")) {
|
||||
//console.log('Success:', result['message']);
|
||||
setDelete_one_attached_document_result(result['message']);
|
||||
setDelete_one_attached_document_api("true");
|
||||
Get_List_Of_All_PJ(props.client_id);
|
||||
alert(result['message'])
|
||||
|
||||
}
|
||||
else {
|
||||
setDelete_one_attached_document_message(result['message']);
|
||||
setDelete_one_attached_document_api("false");
|
||||
}
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(' Record_All_PJ Error:', error);
|
||||
setDelete_one_attached_document_api("false");
|
||||
alert(" Impossible de supprimer le document")
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
const [Get_List_Of_All_PJ_api, setGet_List_Of_All_PJ_api] = useState();
|
||||
const [Get_List_Of_All_PJ_result, setGet_List_Of_All_PJ_result] = useState();
|
||||
const [Get_List_Of_All_PJ_message, setGet_List_Of_All_PJ_message] = useState();
|
||||
function Get_List_Of_All_PJ(local_employee_id) {
|
||||
|
||||
const formData = new FormData();
|
||||
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
formData.append("token", stored_cookie);
|
||||
formData.append("object_owner_collection", "ressource_humaine");
|
||||
formData.append("object_owner_id", local_employee_id);
|
||||
|
||||
|
||||
//formData.append("class_internal_url", internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
|
||||
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files/",
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
|
||||
//console.log(" ## result['status'] = ", result['status'])
|
||||
if (String(result['status']) === String("true")) {
|
||||
//console.log('Message :', result['message']);
|
||||
setGet_List_Of_All_PJ_result(result['message']);
|
||||
setGet_List_Of_All_PJ_api("true");
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Of_All_PJ_message(result['message']);
|
||||
setGet_List_Of_All_PJ_api("false");
|
||||
}
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(' Get_List_Of_All_PJ Error:', error);
|
||||
setGet_List_Of_All_PJ_api("false");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Delete_file_1_name() {
|
||||
setfile_1_name();
|
||||
}
|
||||
|
||||
function Delete_file_2_name() {
|
||||
setfile_2_name();
|
||||
}
|
||||
|
||||
const [p_detail_one_file_to_download_type_name, setp_detail_one_file_to_download_type_name] = useState();
|
||||
|
||||
// -- end gestion pièces jointes
|
||||
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div className="add_partner_client">
|
||||
|
||||
|
@ -2890,6 +3262,8 @@ const AddParnerClient = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu client_menu" id='submenu_donnee_facturation' name='submenu_donnee_facturation'>Données Facturation</Button>
|
||||
<Button variant="outlined" onClick={submenu_contact} className="detail_submenu client_menu" id='submenu_contact' name='submenu_contact'>Contact & Adresses</Button>
|
||||
<Button variant="outlined" onClick={submenu_activite} className="detail_submenu client_menu" id='submenu_activite' name='submenu_activite'>Activité</Button>
|
||||
<Button variant="outlined" onClick={submenu_piece_jointe} className="detail_submenu client_menu" id='submenu_piece_jointe' name='submenu_piece_jointe'>Pièces Jointes</Button>
|
||||
|
||||
{/* <Button variant="outlined" onClick={submenu_devis} className="detail_submenu" id='submenu_devis' name='submenu_devis'>Devis</Button>
|
||||
<Button variant="outlined" onClick={submenu_cmd} className="detail_submenu" id='submenu_cmd' name='submenu_cmd'>Commandes</Button>
|
||||
<Button variant="outlined" onClick={submenu_factures} className="detail_submenu" id='submenu_factures' name='submenu_factures'>Factures</Button>
|
||||
|
@ -3924,6 +4298,148 @@ const AddParnerClient = (props) => {
|
|||
< PartnerClientActivite email={p_client_email} conntected_employee_id={props.conntected_employee_id} />
|
||||
</div>}
|
||||
|
||||
{String(submenu).trim() === "submenu_piece_jointe" && <div className="training_data">
|
||||
|
||||
|
||||
<div className="div_row">
|
||||
<div className="div_row" style={{ "padding": "5px" }}>
|
||||
|
||||
<div style={{ "fontSize": "12px" }}>
|
||||
<label htmlFor="upload-photo">
|
||||
<input
|
||||
style={{ display: "none" }}
|
||||
id="upload-photo"
|
||||
name="upload-photo"
|
||||
type="file"
|
||||
onChange={sessions_file_change_1}
|
||||
/>
|
||||
|
||||
<Fab
|
||||
color="secondary"
|
||||
size="small"
|
||||
component="span"
|
||||
aria-label="add"
|
||||
variant="extended"
|
||||
>
|
||||
<IoMdAddCircle /> <nav style={{ "fontSize": "12px" }}> Ajouter un fichier </nav>
|
||||
</Fab>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
{file_1_name && file_1_name.name &&
|
||||
<nav style={{ "fontSize": "12px" }}>
|
||||
<div className="session_caract">Nom du fichier <br />
|
||||
<TextField
|
||||
name="file_to_download_type_name"
|
||||
id="file_to_download_type_name"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_detail_one_file_to_download_type_name}
|
||||
onChange={(e) => {
|
||||
setp_detail_one_file_to_download_type_name(e.target.value);
|
||||
|
||||
}}
|
||||
/>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
Fichier : {file_1_name.name} <br /> <font style={{ "cursor": "pointer" }}
|
||||
onClick={Delete_file_1_name}> Supprimer <IoIosRemoveCircleOutline /> </font>
|
||||
</nav>}
|
||||
|
||||
{Record_All_PJ_api && String(Record_All_PJ_api) === "true" && <div className="okUpdateData"> Pièce jointe enregistrée </div>}
|
||||
|
||||
{Record_All_PJ_api && String(Record_All_PJ_api) === "false" && <div className="koUpdateData"> {Record_All_PJ_message} </div>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{file_1_name && file_1_name.name && <div className="div_row">
|
||||
|
||||
<div className="div_row_gauche">
|
||||
<Button variant="contained" onClick={Record_All_PJ}
|
||||
startIcon={<AiTwotoneSave />} className="bton_enreg">ENREGISTRER LA PIECE</Button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
{Get_List_Of_All_PJ_result && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
<div className="div_row">
|
||||
<b> Liste des pièces jointes </b> <br />
|
||||
<div className="div_row">
|
||||
{Get_List_Of_All_PJ_result && Get_List_Of_All_PJ_result.map((val) => (
|
||||
<div className="div_row_list_pj" >
|
||||
<nav style={{ "color": "green", "cursor": "pointer" }} onClick={Download_one_attached_document} name={(JSON.parse(val).file_name)} id={(JSON.parse(val).file_name)}> Télécharger <i> {(JSON.parse(val).file_business_object)}</i> </nav> <br />
|
||||
<Popup
|
||||
trigger={
|
||||
<nav style={{ "color": "red", "cursor": "pointer" }} > Supprimer</nav>
|
||||
|
||||
|
||||
}
|
||||
modal
|
||||
nested
|
||||
position="center center"
|
||||
>
|
||||
{close => (
|
||||
<div>
|
||||
<button className="gest_close" onClick={close}>
|
||||
×
|
||||
</button>
|
||||
<div className="gest_header"> MySy Information </div>
|
||||
<div className="gest_content">
|
||||
{' '}
|
||||
|
||||
En confirmant cette opération, la pièce jointe sera <i><font color="red"> définitivement supprimée</font></i>. <br />
|
||||
|
||||
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
|
||||
Delete_one_attached_document(event);
|
||||
close();
|
||||
}}
|
||||
name={(JSON.parse(val).file_name)} id={(JSON.parse(val).file_name)}
|
||||
> Valider </button>
|
||||
|
||||
</div>
|
||||
<div style={{ "width": "45%", "float": "right" }}>
|
||||
<button
|
||||
className="gest_bton_popup"
|
||||
onClick={() => {
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Annuler
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
</div>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="div_row" style={{
|
||||
"border": "None", "marginLeft": "auto", "marginLeft": "auto", "marginRight": "auto", "textAlign": "center",
|
||||
|
|
|
@ -747,7 +747,7 @@ const CRM_Opportunite = (props) => {
|
|||
const [p_detail_contact_email, setp_detail_contact_email] = useState();
|
||||
const [p_detail_contact_telephone, setp_detail_contact_telephone] = useState();
|
||||
|
||||
|
||||
|
||||
|
||||
const [p_detail_commentaire, setp_detail_commentaire] = useState();
|
||||
const [p_detail_vendeur_id, setp_detail_vendeur_id] = useState('');
|
||||
|
@ -1517,7 +1517,7 @@ const CRM_Opportunite = (props) => {
|
|||
|
||||
const New_Option_Filter = [
|
||||
{ "id": "titre", "label": "Titre ", "value": "titre" },
|
||||
// { "id": "vendeur_id", "label": "Vendeur ", "value": "vendeur_id" }, ==> a faire plus tard
|
||||
// { "id": "vendeur_id", "label": "Vendeur ", "value": "vendeur_id" }, ==> a faire plus tard
|
||||
{ "id": "revenu_cible_superieur", "label": "Revenu (Supérieur à ) ", "value": "revenu_cible_superieur" },
|
||||
{ "id": "revenu_cible_inferieur", "label": "Revenu (Inférieur à ) ", "value": "revenu_cible_inferieur" },
|
||||
{ "id": "date_fermeture_avant", "label": "Date fermeture (avant) ", "value": "date_fermeture_avant" },
|
||||
|
@ -1831,7 +1831,7 @@ const CRM_Opportunite = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1881,8 +1881,8 @@ const CRM_Opportunite = (props) => {
|
|||
|
||||
name="dialog_opport_comment"
|
||||
id="dialog_opport_comment"
|
||||
type="number"
|
||||
step="any"
|
||||
multiline
|
||||
rows={2}
|
||||
className="disabled_style"
|
||||
|
||||
value={p_detail_commentaire}
|
||||
|
|
|
@ -139,8 +139,13 @@ function ESign() {
|
|||
form.append("e_doc_id", selected_e_doc_id);
|
||||
form.append("secret_key_signature", selected_e_doc_secret);
|
||||
form.append("email_destinataire", selected_e_doc_email);
|
||||
form.append('signature_img', isimgclassSelected);
|
||||
|
||||
|
||||
//console.log(" isimgclassSelected #### = ", isimgclassSelected);
|
||||
|
||||
if (isimgclassSelected && String(isimgclassSelected).length > 50)
|
||||
form.append('signature_img', isimgclassSelected);
|
||||
else
|
||||
form.append('signature_img', "");
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
@ -493,7 +498,7 @@ function ESign() {
|
|||
</div>
|
||||
|
||||
<div style={{ width: "78%", "float": "right", marginRight: "1%" }}>
|
||||
|
||||
|
||||
{is_valide_e_document &&
|
||||
<div className="div_row">
|
||||
<div style={{ width: "80%", "marginLeft": "auto", "marginRight": "auto" }}>
|
||||
|
@ -550,7 +555,7 @@ function ESign() {
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -20,7 +20,7 @@ import { Tooltip } from 'react-tooltip'
|
|||
import add_plus from "../mysy_img/plus.png";
|
||||
import excel_icone from "../mysy_img/excel_icone.png";
|
||||
import participants from "../mysy_img/participants.png";
|
||||
import fileDownload from 'js-file-download'
|
||||
import fileDownload from 'js-file-download';
|
||||
import Popup from 'reactjs-popup';
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
|
||||
|
@ -927,6 +927,9 @@ const Employes = (props) => {
|
|||
setp_one_detail_linkedIn('');
|
||||
setp_one_detail_facebook('');
|
||||
setp_one_detail_twitter('');
|
||||
|
||||
setp_one_detail_competence('');
|
||||
|
||||
setp_one_detail_ismanager('0');
|
||||
|
||||
setp_one_detail_ismanager_label('');
|
||||
|
@ -983,6 +986,10 @@ const Employes = (props) => {
|
|||
const [p_detail_linkedIn, setp_detail_linkedIn] = useState("");
|
||||
const [p_detail_facebook, setp_detail_facebook] = useState("");
|
||||
const [p_detail_twitter, setp_detail_twitter] = useState("");
|
||||
|
||||
const [p_detail_competence, setp_detail_competence] = useState("");
|
||||
|
||||
|
||||
const [p_detail_ismanager, setp_detail_ismanager] = useState("0");
|
||||
const [p_detail_ismanager_label, setp_detail_ismanager_label] = useState("");
|
||||
const [p_detail_resp_hierarchie_nom, setp_detail_resp_hierarchie_nom] = useState("");
|
||||
|
@ -1024,6 +1031,10 @@ const Employes = (props) => {
|
|||
const [p_one_detail_linkedIn, setp_one_detail_linkedIn] = useState();
|
||||
const [p_one_detail_facebook, setp_one_detail_facebook] = useState();
|
||||
const [p_one_detail_twitter, setp_one_detail_twitter] = useState();
|
||||
|
||||
const [p_one_detail_competence, setp_one_detail_competence] = useState();
|
||||
|
||||
|
||||
const [p_one_detail_ismanager, setp_one_detail_ismanager] = useState();
|
||||
const [p_one_detail_ismanager_label, setp_one_detail_ismanager_label] = useState("0");
|
||||
const [p_one_detail_resp_hierarchie_nom, setp_one_detail_resp_hierarchie_nom] = useState();
|
||||
|
@ -1149,6 +1160,14 @@ const Employes = (props) => {
|
|||
}
|
||||
|
||||
|
||||
if (mylocal_employe.competence) {
|
||||
setfield_competence(mylocal_employe.competence);
|
||||
|
||||
} else {
|
||||
setfield_competence("");
|
||||
}
|
||||
|
||||
|
||||
if (mylocal_employe.profil) {
|
||||
setp_detail_profil(mylocal_employe.profil);
|
||||
} else {
|
||||
|
@ -1731,7 +1750,7 @@ const Employes = (props) => {
|
|||
document.getElementsByName("detail_ville")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("detail_civilite")[0]) {
|
||||
if (document.getElementsByName("detail_civilite") && document.getElementsByName("detail_civilite")[0]) {
|
||||
document.getElementsByName("detail_civilite")[0].disabled = true;
|
||||
document.getElementsByName("detail_civilite")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
@ -1787,6 +1806,12 @@ const Employes = (props) => {
|
|||
document.getElementsByName("detail_resp_hierarchie_id")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("detail_competence")[0]) {
|
||||
document.getElementsByName("detail_competence")[0].disabled = true;
|
||||
document.getElementsByName("detail_competence")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
|
||||
// Pour les champs spécifiques
|
||||
for (let i = 0; i < rows_champs_specifics.length; i++) {
|
||||
|
||||
|
@ -1803,9 +1828,10 @@ const Employes = (props) => {
|
|||
function Enable_Employee_DetailFields() {
|
||||
setemployee_data_edit_mode("1");
|
||||
|
||||
|
||||
document.getElementsByName("detail_nom")[0].disabled = false;
|
||||
document.getElementsByName("detail_nom")[0].style.backgroundColor = "#FFFFFF";
|
||||
if (document.getElementsByName("detail_nom") && document.getElementsByName("detail_nom")[0]) {
|
||||
document.getElementsByName("detail_nom")[0].disabled = false;
|
||||
document.getElementsByName("detail_nom")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
document.getElementsByName("detail_prenom")[0].disabled = false;
|
||||
document.getElementsByName("detail_prenom")[0].style.backgroundColor = "#FFFFFF";
|
||||
|
@ -1831,9 +1857,10 @@ const Employes = (props) => {
|
|||
document.getElementsByName("detail_ville")[0].disabled = false;
|
||||
document.getElementsByName("detail_ville")[0].style.backgroundColor = "#FFFFFF";
|
||||
|
||||
|
||||
document.getElementsByName("detail_civilite")[0].disabled = false;
|
||||
document.getElementsByName("detail_civilite")[0].style.backgroundColor = "#FFFFFF";
|
||||
if (document.getElementsByName("detail_civilite") && document.getElementsByName("detail_civilite")[0]) {
|
||||
document.getElementsByName("detail_civilite")[0].disabled = false;
|
||||
document.getElementsByName("detail_civilite")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
document.getElementsByName("detail_tel_mobile")[0].disabled = false;
|
||||
document.getElementsByName("detail_tel_mobile")[0].style.backgroundColor = "#FFFFFF";
|
||||
|
@ -1865,6 +1892,9 @@ const Employes = (props) => {
|
|||
document.getElementsByName("detail_resp_hierarchie_id")[0].disabled = false;
|
||||
document.getElementsByName("detail_resp_hierarchie_id")[0].style.backgroundColor = "#FFFFFF";
|
||||
|
||||
document.getElementsByName("detail_competence")[0].disabled = false;
|
||||
document.getElementsByName("detail_competence")[0].style.backgroundColor = "#FFFFFF";
|
||||
|
||||
// Pour les champs spécifiques
|
||||
for (let i = 0; i < rows_champs_specifics.length; i++) {
|
||||
|
||||
|
@ -1989,6 +2019,12 @@ const Employes = (props) => {
|
|||
form.append("twitter", "");
|
||||
|
||||
|
||||
if (field_competence)
|
||||
form.append("competence", field_competence);
|
||||
else
|
||||
form.append("competence", "");
|
||||
|
||||
|
||||
|
||||
if (p_detail_ismanager)
|
||||
form.append("ismanager", p_detail_ismanager);
|
||||
|
@ -2329,7 +2365,7 @@ const Employes = (props) => {
|
|||
|
||||
if (new_data2.length > 0) {
|
||||
setNew_Get_List_Managers_result(new_data2);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2349,6 +2385,16 @@ const Employes = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const [field_competence, setfield_competence] = useState("");
|
||||
const [field_one_competence, setfield_one_competence] = useState("");
|
||||
|
||||
function editor_competence_keyup() {
|
||||
//setsessionChanged(true);
|
||||
}
|
||||
|
||||
|
||||
const [isimgclassSelected, setisimgclassSelected] = useState(false);
|
||||
const [isimgclassSelected_recid, setisimgclassSelected_recid] = useState("");
|
||||
const [isimgclassSelectedfile, setisimgclassSelectedfile] = useState(false);
|
||||
|
@ -2690,6 +2736,14 @@ const Employes = (props) => {
|
|||
else
|
||||
form.append("twitter", "");
|
||||
|
||||
|
||||
if (field_one_competence)
|
||||
form.append("competence", field_one_competence);
|
||||
else
|
||||
form.append("competence", "");
|
||||
|
||||
|
||||
|
||||
if (p_one_detail_ismanager)
|
||||
form.append("ismanager", p_one_detail_ismanager);
|
||||
else
|
||||
|
@ -3793,6 +3847,10 @@ const Employes = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const editorRef_competence = useRef(null);
|
||||
const [editorRef_competence_limite, seteditorRef_competence_limite] = useState(800);
|
||||
|
||||
|
||||
const [file_1_name, setfile_1_name] = useState();
|
||||
|
||||
const [sessions_file_change_1_api, setsessions_file_change_1_api] = useState();
|
||||
|
@ -4940,23 +4998,23 @@ const Employes = (props) => {
|
|||
/>
|
||||
</div>}
|
||||
{String(p_detail_user_login).length < 2 &&
|
||||
<div className="session_caract_Dialog" > Login
|
||||
<TextField
|
||||
autoFocus
|
||||
margin="dense"
|
||||
id="new_login"
|
||||
//label="Prix Unitaire"
|
||||
<div className="session_caract_Dialog" > Login
|
||||
<TextField
|
||||
autoFocus
|
||||
margin="dense"
|
||||
id="new_login"
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_new_login}
|
||||
onChange={(e) => {
|
||||
setp_new_login(e.target.value);
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_new_login}
|
||||
onChange={(e) => {
|
||||
setp_new_login(e.target.value);
|
||||
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog" > Mot de passe
|
||||
<TextField
|
||||
|
@ -6075,7 +6133,7 @@ const Employes = (props) => {
|
|||
|
||||
/>}
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
{String(employee_data_edit_mode) === "1" && <div className="session_caract"> <b>Civilité </b><br />
|
||||
|
||||
|
@ -6447,32 +6505,6 @@ const Employes = (props) => {
|
|||
}
|
||||
/>
|
||||
|
||||
{/*<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_profil"
|
||||
id="detail_profil"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_profil}
|
||||
onChange={(e) => {
|
||||
setp_detail_profil(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
>
|
||||
{Get_List_RH_Profils_result &&
|
||||
Get_List_RH_Profils_result.map((myprofil) => (
|
||||
<MenuItem key={JSON.parse(myprofil).profil_nom} value={JSON.parse(myprofil).profil_nom}
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
|
||||
{JSON.parse(myprofil).profil_nom}
|
||||
|
||||
</MenuItem>
|
||||
))}
|
||||
</TextField>*/}
|
||||
</div>}
|
||||
|
||||
<div className="session_caract"> Fonction <br />
|
||||
|
@ -6577,37 +6609,39 @@ const Employes = (props) => {
|
|||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
{/* <TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_resp_hierarchie_id"
|
||||
id="detail_resp_hierarchie_id"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_resp_hierarchie_id}
|
||||
onChange={(e) => {
|
||||
setp_detail_resp_hierarchie_id(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
>
|
||||
{Get_List_Managers_result &&
|
||||
Get_List_Managers_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id !== selected_id).map((mymanager) => (
|
||||
<MenuItem key={JSON.parse(mymanager)._id} value={JSON.parse(mymanager)._id}
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
|
||||
{JSON.parse(mymanager).nom} {JSON.parse(mymanager).prenom}
|
||||
|
||||
</MenuItem>
|
||||
))}
|
||||
|
||||
</TextField>*/}
|
||||
</div>}
|
||||
{String(employee_data_edit_mode) === "1" && <div className="session_caract_Dialog_comment_2_lines" style={{ "paddingRight": "1rem" }}>
|
||||
Compétences<br />
|
||||
|
||||
<textarea
|
||||
rows={3}
|
||||
id="detail_competence"
|
||||
name="detail_competence"
|
||||
value={field_competence}
|
||||
className='form-control formInput'
|
||||
placeholder='Message'
|
||||
onChange={(e) => {
|
||||
setfield_competence(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
|
||||
}}
|
||||
></textarea>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(employee_data_edit_mode) !== "1" && <div className="session_caract_Dialog_comment_2_lines" style={{ "paddingRight": "1rem" }}>
|
||||
Compétences<br />
|
||||
<textarea
|
||||
rows={3}
|
||||
id="detail_competence"
|
||||
name="detail_competence"
|
||||
value={field_competence}
|
||||
className='form-control formInput'
|
||||
|
||||
></textarea>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{/* -- début champs specifiques **/}
|
||||
<div className="div_row">
|
||||
|
@ -7547,32 +7581,7 @@ const Employes = (props) => {
|
|||
}
|
||||
/>
|
||||
|
||||
{/* <TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="one_detail_profil"
|
||||
id="one_detail_profil"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_profil}
|
||||
onChange={(e) => {
|
||||
setp_one_detail_profil(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
>
|
||||
{Get_List_RH_Profils_result &&
|
||||
Get_List_RH_Profils_result.map((myprofil) => (
|
||||
<MenuItem key={JSON.parse(myprofil).profil_nom} value={JSON.parse(myprofil).profil_nom}
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
|
||||
{JSON.parse(myprofil).profil_nom}
|
||||
|
||||
</MenuItem>
|
||||
))}
|
||||
</TextField>*/}
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Fonction <br />
|
||||
|
@ -7620,27 +7629,6 @@ const Employes = (props) => {
|
|||
}
|
||||
/>
|
||||
|
||||
{/*<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="one_detail_ismanager"
|
||||
id="one_detail_ismanager"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_ismanager}
|
||||
onChange={(e) => {
|
||||
setp_one_detail_ismanager(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
>
|
||||
<MenuItem value="1" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Oui </MenuItem>
|
||||
<MenuItem value="0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Non </MenuItem>
|
||||
|
||||
</TextField>*/}
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Responsable (n+1) <br />
|
||||
|
@ -7667,36 +7655,25 @@ const Employes = (props) => {
|
|||
}
|
||||
/>
|
||||
|
||||
{String(employee_data_edit_mode) === "1" && <div className="session_caract_Dialog_comment_2_lines" style={{ "paddingRight": "1rem" }}>
|
||||
Compétences<br />
|
||||
|
||||
<textarea
|
||||
rows={3}
|
||||
id="one_detail_competence"
|
||||
name="one_detail_competence"
|
||||
value={field_one_competence}
|
||||
className='form-control formInput'
|
||||
placeholder='Message'
|
||||
onChange={(e) => {
|
||||
setfield_one_competence(e.target.value);
|
||||
|
||||
}}
|
||||
></textarea>
|
||||
|
||||
{/*<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="one_detail_resp_hierarchie_id"
|
||||
id="one_detail_resp_hierarchie_id"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_resp_hierarchie_id}
|
||||
onChange={(e) => {
|
||||
setp_one_detail_resp_hierarchie_id(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
>
|
||||
{Get_List_Managers_result &&
|
||||
Get_List_Managers_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id !== selected_id).map((mymanager) => (
|
||||
<MenuItem key={JSON.parse(mymanager)._id} value={JSON.parse(mymanager)._id}
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
|
||||
{JSON.parse(mymanager).nom} {JSON.parse(mymanager).prenom}
|
||||
|
||||
</MenuItem>
|
||||
))}
|
||||
|
||||
</TextField>*/}
|
||||
</div>}
|
||||
|
||||
=
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3131,6 +3131,8 @@ const Partner_Commande = (props) => {
|
|||
new_data2.push(node);
|
||||
|
||||
|
||||
//console.log(" ### new_data2 condition paiement = ", new_data2);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Getall_Partner_Paiement_Condition_result(new_data2);
|
||||
|
||||
|
@ -3791,6 +3793,7 @@ const Partner_Commande = (props) => {
|
|||
|
||||
if (value && value._id) {
|
||||
setp_add_cmd_header_condition_paiement_id(value._id);
|
||||
setclient_selected_paiement_ction_id(value._id);
|
||||
|
||||
}
|
||||
|
||||
|
@ -4555,7 +4558,7 @@ const Partner_Commande = (props) => {
|
|||
</div>
|
||||
|
||||
{String(order_data_edit_mode) === "1" && <div className="session_caract" >
|
||||
Conditions Paiement <br />
|
||||
Conditions Paiement <br />
|
||||
|
||||
|
||||
{New_Getall_Partner_Paiement_Condition_result && New_Getall_Partner_Paiement_Condition_result.length > 0 &&
|
||||
|
|
|
@ -2236,6 +2236,17 @@
|
|||
|
||||
}
|
||||
|
||||
.session_caract_Dialog_comment_2_lines {
|
||||
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
text-align: left;
|
||||
font-size: small;
|
||||
margin-bottom: 1rem !important;
|
||||
}
|
||||
|
||||
|
||||
// end media
|
||||
|
||||
.MuiDataGrid-cellContent {
|
||||
|
|
Loading…
Reference in New Issue