sdfsd
parent
41873af9db
commit
a6a62132b0
|
@ -26,7 +26,7 @@ import Modules_Mes_Documents from "./Modules_Mes_Documents";
|
||||||
import Intranet_Mes_Stagiaires from "./Intranet_Mes_Stagiaires";
|
import Intranet_Mes_Stagiaires from "./Intranet_Mes_Stagiaires";
|
||||||
|
|
||||||
function Account() {
|
function Account() {
|
||||||
const [menu, setmenu] = useState("affichage");
|
const [menu, setmenu] = useState("mes_stagiaires");
|
||||||
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']);
|
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']);
|
||||||
const [result, setResult] = useState("");
|
const [result, setResult] = useState("");
|
||||||
const [myApiResponse, setmyApiResponse] = useState("");
|
const [myApiResponse, setmyApiResponse] = useState("");
|
||||||
|
|
|
@ -3670,11 +3670,11 @@ const options_menu_vertical = [
|
||||||
{rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => (<nav style={{ "textAlign": 'right', 'marginRight': '15px', "fontWeight": "600", "fontSize": "15px", "paddingTop": "2px" }}> {parseFloat(String(val.somme_header_ca_ht)).toLocaleString()} (€) / {val.nb_header_invoice} Factures </nav>))}
|
{rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => (<nav style={{ "textAlign": 'right', 'marginRight': '15px', "fontWeight": "600", "fontSize": "15px", "paddingTop": "2px" }}> {parseFloat(String(val.somme_header_ca_ht)).toLocaleString()} (€) / {val.nb_header_invoice} Factures </nav>))}
|
||||||
|
|
||||||
<div style={{ "border": "None" }}>
|
<div style={{ "border": "None" }}>
|
||||||
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
<div style={{ height: 650, width: '100%', paddingRight: '5px' }}>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
height: 500,
|
height: 600,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
paddingRight: '1px',
|
paddingRight: '1px',
|
||||||
|
|
||||||
|
|
|
@ -7887,11 +7887,11 @@ function ExportMenuItem(props) {
|
||||||
|
|
||||||
<div style={{ "border": "None", paddingRight: '10px' }}>
|
<div style={{ "border": "None", paddingRight: '10px' }}>
|
||||||
|
|
||||||
{(!display_stagiaire_with_alert || display_stagiaire_with_alert !== true) && <div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
{(!display_stagiaire_with_alert || display_stagiaire_with_alert !== true) && <div style={{ height: 750, width: '100%', paddingRight: '5px' }}>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
height: 500,
|
height: 600,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
paddingRight: '1px',
|
paddingRight: '1px',
|
||||||
|
|
||||||
|
@ -8117,12 +8117,12 @@ function ExportMenuItem(props) {
|
||||||
|
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
{(display_stagiaire_with_alert && display_stagiaire_with_alert === true) && <div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
{(display_stagiaire_with_alert && display_stagiaire_with_alert === true) && <div style={{ height: 650, width: '100%', paddingRight: '5px' }}>
|
||||||
|
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
height: 500,
|
height: 600,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
paddingRight: '1px',
|
paddingRight: '1px',
|
||||||
|
|
||||||
|
@ -10882,11 +10882,11 @@ function ExportMenuItem(props) {
|
||||||
<div className="session_data">
|
<div className="session_data">
|
||||||
<div style={{ "border": "None", paddingRight: '10px' }}>
|
<div style={{ "border": "None", paddingRight: '10px' }}>
|
||||||
|
|
||||||
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
<div style={{ height: 650, width: '100%', paddingRight: '5px' }}>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
height: 500,
|
height: 650,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
paddingRight: '1px',
|
paddingRight: '1px',
|
||||||
|
|
||||||
|
|
|
@ -480,8 +480,7 @@ const Modules_Mes_Documents = (props) => {
|
||||||
{ "id": "filter_file_business_object", "label": "Nom Document", "value": "filter_file_business_object" },
|
{ "id": "filter_file_business_object", "label": "Nom Document", "value": "filter_file_business_object" },
|
||||||
{ "id": "filter_type_document", "label": "Type Document", "value": "filter_type_document" },
|
{ "id": "filter_type_document", "label": "Type Document", "value": "filter_type_document" },
|
||||||
{ "id": "filter_nom_client", "label": "Nom Client", "value": "filter_nom_client" },
|
{ "id": "filter_nom_client", "label": "Nom Client", "value": "filter_nom_client" },
|
||||||
{ "id": "date_create_start_date", "label": "Crée après (jj/mm/aaaa) ", "value": "date_create_start_date" },
|
{ "id": "date_creation", "label": "Date Création (jj/mm/aaaa) ", "value": "date_creation" },
|
||||||
{ "id": "date_create_end_date", "label": "Crée avant (jj/mm/aaaa)", "value": "date_create_end_date" },
|
|
||||||
{ "id": "filter_formation_external_code", "label": "Lié a la Formation (code externe)", "value": "filter_formation_external_code" },
|
{ "id": "filter_formation_external_code", "label": "Lié a la Formation (code externe)", "value": "filter_formation_external_code" },
|
||||||
{ "id": "filter_session_code", "label": "Lié a la session (code session)", "value": "filter_session_code" },
|
{ "id": "filter_session_code", "label": "Lié a la session (code session)", "value": "filter_session_code" },
|
||||||
{ "id": "", "label": "", "value": "" },
|
{ "id": "", "label": "", "value": "" },
|
||||||
|
@ -764,6 +763,10 @@ const Modules_Mes_Documents = (props) => {
|
||||||
const [Get_All_Documents_With_Filter_result, setGet_All_Documents_With_Filter_result] = useState();
|
const [Get_All_Documents_With_Filter_result, setGet_All_Documents_With_Filter_result] = useState();
|
||||||
function Get_All_Documents_With_Filter() {
|
function Get_All_Documents_With_Filter() {
|
||||||
|
|
||||||
|
console.log(" ### p_date_au = ", p_date_au, " ### p_date_du = ", p_date_du);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setgridline_id("");
|
setgridline_id("");
|
||||||
|
|
||||||
var form = new FormData();
|
var form = new FormData();
|
||||||
|
@ -795,19 +798,32 @@ const Modules_Mes_Documents = (props) => {
|
||||||
var filtre2_value = "";
|
var filtre2_value = "";
|
||||||
var filtre3_value = "";
|
var filtre3_value = "";
|
||||||
|
|
||||||
|
|
||||||
// Recuperation des valeurs de filtres
|
// Recuperation des valeurs de filtres
|
||||||
|
|
||||||
if (p_filtre1_value) {
|
if (p_filtre1 && String(p_filtre1) === "date_creation") {
|
||||||
|
form.append("date_create_start_date", String(p_date_du));
|
||||||
|
form.append("date_create_end_date", String(p_date_au));
|
||||||
|
}
|
||||||
|
else if (p_filtre1_value && p_filtre1 && String(p_filtre1) !== "date_creation") {
|
||||||
filtre1_value = p_filtre1_value;
|
filtre1_value = p_filtre1_value;
|
||||||
form.append(filtre1, filtre1_value);
|
form.append(filtre1, filtre1_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_filtre2_value) {
|
if (p_filtre2 && String(p_filtre2) === "date_creation") {
|
||||||
|
form.append("date_create_start_date", String(p_date_du));
|
||||||
|
form.append("date_create_end_date", String(p_date_au));
|
||||||
|
}
|
||||||
|
else if (p_filtre2 && String(p_filtre2) !== "date_creation") {
|
||||||
filtre2_value = p_filtre2_value;
|
filtre2_value = p_filtre2_value;
|
||||||
form.append(filtre2, filtre2_value);
|
form.append(filtre2, filtre2_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_filtre3_value) {
|
if (p_filtre3_value && p_filtre3 && String(p_filtre3) === "date_creation") {
|
||||||
|
form.append("date_create_start_date", String(p_date_du));
|
||||||
|
form.append("date_create_end_date", String(p_date_au));
|
||||||
|
}
|
||||||
|
else if (p_filtre3_value && p_filtre3 && String(p_filtre3) !== "date_creation") {
|
||||||
filtre3_value = p_filtre3_value;
|
filtre3_value = p_filtre3_value;
|
||||||
form.append(filtre3, filtre3_value);
|
form.append(filtre3, filtre3_value);
|
||||||
}
|
}
|
||||||
|
@ -822,8 +838,6 @@ const Modules_Mes_Documents = (props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files_With_Filter/";
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files_With_Filter/";
|
||||||
|
|
||||||
axios.post(myurl, form).then(res => {
|
axios.post(myurl, form).then(res => {
|
||||||
|
@ -850,6 +864,9 @@ const Modules_Mes_Documents = (props) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const [p_date_du, setp_date_du] = useState(new Date().toLocaleDateString('fr-FR'));
|
||||||
|
const [p_date_au, setp_date_au] = useState(new Date().toLocaleDateString('fr-FR'));
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* IMPORTANT
|
* IMPORTANT
|
||||||
* Ce module permet d'afficher et telecharger tous les documents qui sont dans la collection 'download_files', c'est à dire :
|
* Ce module permet d'afficher et telecharger tous les documents qui sont dans la collection 'download_files', c'est à dire :
|
||||||
|
@ -905,7 +922,7 @@ const Modules_Mes_Documents = (props) => {
|
||||||
|
|
||||||
|
|
||||||
<div className="div_row_droite texte_area_filter_value" >
|
<div className="div_row_droite texte_area_filter_value" >
|
||||||
{p_filtre1 && String(p_filtre1) !== "filter_type_document" &&
|
{p_filtre1 && String(p_filtre1) !== "filter_type_document" && String(p_filtre1) !== "date_creation" &&
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
required
|
required
|
||||||
|
@ -959,6 +976,54 @@ const Modules_Mes_Documents = (props) => {
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{p_filtre1 && String(p_filtre1) === "date_creation" &&
|
||||||
|
<div className="disabled_style autocomplete_float_right">
|
||||||
|
|
||||||
|
<div style={{ width: "45%", float: "left", textAlign: "left" }}>
|
||||||
|
<DatePicker
|
||||||
|
name="date_du"
|
||||||
|
id="date_du"
|
||||||
|
selected={new Date(moment(p_date_du, "DD/MM/YYYY"))}
|
||||||
|
onChange={(date) => {
|
||||||
|
setp_date_du(format(date, 'd/MM/yyyy'));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showTimeSelect={false}
|
||||||
|
dateFormat="dd/MM/yyyy"
|
||||||
|
className="disabled_style enable_style datepicker_complement"
|
||||||
|
locale='fr-FR'
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div style={{ width: "5%", float: "left", textAlign: "center", paddingTop: "20px", fontSize: "12px" }}>
|
||||||
|
Au
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div style={{ width: "45%", float: "right", textAlign: "right" }}>
|
||||||
|
|
||||||
|
<DatePicker
|
||||||
|
name="date_du"
|
||||||
|
id="date_du"
|
||||||
|
selected={new Date(moment(p_date_au, "DD/MM/YYYY"))}
|
||||||
|
onChange={(date) => {
|
||||||
|
setp_date_au(format(date, 'd/MM/yyyy'));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showTimeSelect={false}
|
||||||
|
dateFormat="dd/MM/yyyy"
|
||||||
|
className="disabled_style enable_style datepicker_complement"
|
||||||
|
locale='fr-FR'
|
||||||
|
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{p_filtre1 && <div className='filter_bton_add'>
|
{p_filtre1 && <div className='filter_bton_add'>
|
||||||
|
@ -1219,11 +1284,11 @@ const Modules_Mes_Documents = (props) => {
|
||||||
|
|
||||||
|
|
||||||
<div style={{ "border": "None" }}>
|
<div style={{ "border": "None" }}>
|
||||||
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
<div style={{ height: 650, width: '100%', paddingRight: '5px' }}>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
height: 500,
|
height: 600,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
paddingRight: '1px',
|
paddingRight: '1px',
|
||||||
|
|
||||||
|
|
|
@ -1284,7 +1284,7 @@ const Partner = (props) => {
|
||||||
if (String(res.data.status) === String("true")) {
|
if (String(res.data.status) === String("true")) {
|
||||||
setGetPartnerNameFromToken_api_result(true);
|
setGetPartnerNameFromToken_api_result(true);
|
||||||
//console.log(" In GetPartnerNameFromToken res.data.status = " + res.data.status);
|
//console.log(" In GetPartnerNameFromToken res.data.status = " + res.data.status);
|
||||||
console.log(" In GetPartnerNameFromToken res.data.message = " + res.data.message);
|
// console.log(" In GetPartnerNameFromToken res.data.message = " + res.data.message);
|
||||||
setparntername(JSON.parse(res.data.message).nom);
|
setparntername(JSON.parse(res.data.message).nom);
|
||||||
|
|
||||||
setconntected_employee_email(JSON.parse(res.data.message).email);
|
setconntected_employee_email(JSON.parse(res.data.message).email);
|
||||||
|
|
|
@ -41,6 +41,7 @@ import Module_Attestation_Formation from "./Module_Attestation_Formation";
|
||||||
import Module_Email_Management from "./Module_Email_Management";
|
import Module_Email_Management from "./Module_Email_Management";
|
||||||
import ReactPlayer from "react-player";
|
import ReactPlayer from "react-player";
|
||||||
import ReactAudioPlayer from 'react-audio-player';
|
import ReactAudioPlayer from 'react-audio-player';
|
||||||
|
import AudioPlayer from 'react-audio-player';
|
||||||
import Paper from '@material-ui/core/Paper';
|
import Paper from '@material-ui/core/Paper';
|
||||||
|
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
import { makeStyles } from '@material-ui/core/styles';
|
||||||
|
@ -51,7 +52,7 @@ import { IconButton } from '@material-ui/core';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import Draggable from 'react-draggable';
|
import Draggable from 'react-draggable';
|
||||||
|
|
||||||
|
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||||
import { useDemoData } from '@mui/x-data-grid-generator';
|
import { useDemoData } from '@mui/x-data-grid-generator';
|
||||||
|
|
||||||
import SignatureCanvas from 'react-signature-canvas';
|
import SignatureCanvas from 'react-signature-canvas';
|
||||||
|
@ -73,6 +74,7 @@ import * as XLSX from 'xlsx';
|
||||||
//import SpeechRecognition, { useSpeechRecognition } from 'react-speech-recognition';
|
//import SpeechRecognition, { useSpeechRecognition } from 'react-speech-recognition';
|
||||||
import useSound from 'use-sound';
|
import useSound from 'use-sound';
|
||||||
|
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
paper: {
|
paper: {
|
||||||
overflowY: 'unset',
|
overflowY: 'unset',
|
||||||
|
@ -890,66 +892,120 @@ const TestUrl_New = (props) => {
|
||||||
|
|
||||||
setblob_recorded_file(audio.attributes.src.nodeValue);
|
setblob_recorded_file(audio.attributes.src.nodeValue);
|
||||||
|
|
||||||
|
console.log(" ### Envoie du fichier audio au server ");
|
||||||
|
send_audio_file_to_server_blob(audio.attributes.src.nodeValue);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
async function send_audi_blob(e) {
|
|
||||||
|
|
||||||
const audioBlob = await fetch(blob_recorded_file).then((r) => r.blob());
|
const [collection_instruction_id, setcollection_instruction_id] = React.useState("");
|
||||||
|
|
||||||
|
async function send_audio_file_to_server_blob(file_audio) {
|
||||||
|
|
||||||
|
const audioBlob = await fetch(file_audio).then((r) => r.blob());
|
||||||
const audiofile = new File([audioBlob], "audiofile.mp3", {
|
const audiofile = new File([audioBlob], "audiofile.mp3", {
|
||||||
type: "audio/mp3",
|
type: "audio/mp3",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
var formData = new FormData();
|
var formData = new FormData();
|
||||||
formData.append("file", audiofile);
|
formData.append("file", audiofile);
|
||||||
|
|
||||||
|
var api_url = process.env.REACT_APP_API_URL + "myclass/api/mysy_openai_get_voice_file/";
|
||||||
|
/*
|
||||||
|
Verifier si on a une instruction en cours. si c'est le cas on fait appeler une api differente
|
||||||
|
|
||||||
|
*/
|
||||||
|
if (collection_instruction_id && String(collection_instruction_id).length > 5) {
|
||||||
|
console.log(" #### une instruction est en cours : _id = ", collection_instruction_id);
|
||||||
|
api_url = process.env.REACT_APP_API_URL + "myclass/api/mysy_openai_confirme_voice_instruction_api/";
|
||||||
|
formData.append("instruction_id", collection_instruction_id);
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
formData.append("token", stored_cookie);
|
||||||
|
|
||||||
|
// On efface l'_id de l'instruction en cours
|
||||||
|
setcollection_instruction_id("");
|
||||||
|
|
||||||
|
console.log(" #### formData = ", formData);
|
||||||
|
}
|
||||||
|
|
||||||
fetch(
|
fetch(
|
||||||
process.env.REACT_APP_API_URL + "myclass/api/Get_Audio_File/",
|
api_url,
|
||||||
{
|
{
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: formData,
|
body: formData,
|
||||||
}
|
}
|
||||||
).then((response) => response.json())
|
).then((response) => response.json())
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
//console.log('Success:', result['message']);
|
setLoading(false);
|
||||||
|
console.log('send_audio_file_to_server_blob status == :', result['status']);
|
||||||
|
console.log('send_audio_file_to_server_blob message == :', result['message']);
|
||||||
|
console.log('send_audio_file_to_server_blob collection_instruction_id == :', result['collection_instruction_id']);
|
||||||
|
console.log('send_audio_file_to_server_blob result == :', result);
|
||||||
//setisimgSelected(false);
|
//setisimgSelected(false);
|
||||||
|
|
||||||
|
|
||||||
|
if (String(result['status']) === "true") {
|
||||||
|
//alert(" L'instruction a été correctement transferée au serveur");
|
||||||
|
if (JSON.parse(result['message']).document_mp3) {
|
||||||
|
var document_mp3 = "data:audio/mp3;base64," + JSON.parse(result['message']).document_mp3;
|
||||||
|
let local_audio_file = new Audio(document_mp3);
|
||||||
|
local_audio_file.play();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result['collection_instruction_id']) {
|
||||||
|
setcollection_instruction_id(result['collection_instruction_id']);
|
||||||
|
}else{
|
||||||
|
setcollection_instruction_id("");
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
alert(" ERRR : L'instruction N'a PAS été correctement transferée au serveur");
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
console.error('Error - send_audi_blob:');
|
console.error('Error - send_audi_blob:');
|
||||||
// setisimgSelected(true);
|
// setisimgSelected(true);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const [audi_file, setaudi_file] = React.useState("");
|
|
||||||
const audioRef = useRef(null);
|
|
||||||
function Get_and_launch_audio_file() {
|
function Get_and_launch_audio_file() {
|
||||||
|
|
||||||
var filedetail = "audio.mp3"
|
var url = process.env.REACT_APP_API_URL + "myclass/api/mysy_openai_get_voice_file/";
|
||||||
|
|
||||||
var url = process.env.REACT_APP_API_URL + "myclass/api/send_mysy_openai_to_voice_file/";
|
axios.post(url).then(res => {
|
||||||
|
|
||||||
var fileName = "cherifffff.mp3";
|
if (String(res.data.status) === "true") {
|
||||||
axios.get(url, { responseType: 'blob', },)
|
if (JSON.parse(res.data.message).document_mp3) {
|
||||||
.then((res) => {
|
var document_mp3 = "data:audio/mp3;base64," + JSON.parse(res.data.message).document_mp3;
|
||||||
fileDownload(res.data, filedetail);
|
let local_audio_file = new Audio(document_mp3);
|
||||||
|
local_audio_file.play();
|
||||||
|
|
||||||
const url = window.URL.createObjectURL(new Blob([res]));
|
}
|
||||||
const link = document.createElement("a");
|
|
||||||
link.href = url;
|
|
||||||
link.download = fileName || "downloaded-file";
|
|
||||||
document.body.appendChild(link);
|
|
||||||
|
|
||||||
console.log(" ### link = ", link);
|
} else {
|
||||||
|
// lire un message d'erreur
|
||||||
|
console.log(" returrrr FALSE");
|
||||||
|
}
|
||||||
|
|
||||||
link.click();
|
}).catch((error) => {
|
||||||
|
|
||||||
document.body.removeChild(link);
|
console.warn('Get_and_launch_audio_file ee: Not good man :( = ', error);
|
||||||
window.URL.revokeObjectURL(url);
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let audio = new Audio("/audio2.mp3");
|
||||||
|
const lecture_fichier_local = () => {
|
||||||
|
audio.play()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const [blob_recorded_file, setblob_recorded_file] = React.useState("");
|
const [blob_recorded_file, setblob_recorded_file] = React.useState("");
|
||||||
const [playbackRate, setPlaybackRate] = React.useState(0.75);
|
const [playbackRate, setPlaybackRate] = React.useState(0.75);
|
||||||
|
@ -959,7 +1015,6 @@ const TestUrl_New = (props) => {
|
||||||
|
|
||||||
|
|
||||||
const handleClick_play = async () => {
|
const handleClick_play = async () => {
|
||||||
console.log(" iiiiiiiiiiii ");
|
|
||||||
|
|
||||||
// var path = "blob:http://localhost:3009/5b14dae1-d402-47cd-b71b-fa3938563265";
|
// var path = "blob:http://localhost:3009/5b14dae1-d402-47cd-b71b-fa3938563265";
|
||||||
// var path = "audio.mp3";
|
// var path = "audio.mp3";
|
||||||
|
@ -980,9 +1035,16 @@ const TestUrl_New = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const [isLoading, setLoading] = useState();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="testurl_new">
|
<div className="testurl_new">
|
||||||
|
|
||||||
|
{isLoading && <div className="loader-container">
|
||||||
|
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>testurl_new</title>
|
<title>testurl_new</title>
|
||||||
<meta name="description" content="{this.metaDetails.description}" />
|
<meta name="description" content="{this.metaDetails.description}" />
|
||||||
|
@ -1170,42 +1232,37 @@ const TestUrl_New = (props) => {
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<button onClick={display_data}> display data </button>
|
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2> enregistrement audio </h2> <br />
|
<h2> enregistrement audio </h2> <br />
|
||||||
|
|
||||||
|
|
||||||
|
< div >
|
||||||
|
<button onClick={lecture_fichier_local}>Playiiii</button>
|
||||||
|
</div >
|
||||||
|
|
||||||
|
<div style={{ width: '50%', margin: 'auto' }}>
|
||||||
|
collection_instruction_id = '{collection_instruction_id}' <br />
|
||||||
|
{ String(collection_instruction_id).length > 5 && <nav> Confirmation instruction en cours</nav>}
|
||||||
|
{ String(collection_instruction_id).length <= 5 && <nav> Enregistrer une instruction </nav>}
|
||||||
|
|
||||||
<AudioRecorder
|
<AudioRecorder
|
||||||
onRecordingComplete={(blob) => addAudioElement(blob)}
|
onRecordingComplete={(blob) => addAudioElement(blob)}
|
||||||
recorderControls={recorderControls}
|
recorderControls={recorderControls}
|
||||||
// downloadOnSavePress={true}
|
// downloadOnSavePress={true}
|
||||||
downloadFileExtension="mp3"
|
downloadFileExtension="mp3"
|
||||||
showVisualizer={true}
|
showVisualizer="false"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<button onClick={recorderControls.stopRecording}>Stop recording</button>
|
<button onClick={recorderControls.stopRecording}>Stop recording</button>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
file = {blob_recorded_file} <br />
|
file = {blob_recorded_file} <br />
|
||||||
<button onClick={send_audi_blob}> envoyer fichier</button><br />
|
<button onClick={send_audio_file_to_server_blob}> envoyer fichier</button><br />
|
||||||
<button onClick={Get_and_launch_audio_file}> recuperer un fichier audio yy</button><br />
|
<button onClick={Get_and_launch_audio_file}> recuperer un fichier audio yy</button><br />
|
||||||
|
|
||||||
<audio ref={audioRef} controls >
|
|
||||||
<source src="blob:audio.mp3" type="audio/mp3" />
|
|
||||||
Your browser does not support the audio element.
|
|
||||||
</audio>
|
|
||||||
aaa
|
|
||||||
<ReactAudioPlayer
|
|
||||||
src="blob:audio.mp3"
|
|
||||||
autoPlay={true}
|
|
||||||
controls
|
|
||||||
/> bb
|
|
||||||
<ReactAudioPlayer
|
|
||||||
src={"blob:audio.mp3"}
|
|
||||||
controls
|
|
||||||
preload="none"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2319,6 +2319,11 @@
|
||||||
|
|
||||||
.autocomplete_float_right {
|
.autocomplete_float_right {
|
||||||
float: right !important;
|
float: right !important;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.datepicker_complement{
|
||||||
|
margin: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disabled_style_with_visualiser_icone {
|
.disabled_style_with_visualiser_icone {
|
||||||
|
|
|
@ -2171,6 +2171,27 @@
|
||||||
|
|
||||||
// end media
|
// end media
|
||||||
|
|
||||||
|
.loader-container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
//justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
left: -5%;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1;
|
||||||
|
top: 0px;
|
||||||
|
background: white;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mysy_spinner {
|
||||||
|
border-radius: 5px;
|
||||||
|
//border: 1px solid black;
|
||||||
|
opacity: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.css-1v4ccyo {
|
.css-1v4ccyo {
|
||||||
height: 3.5rem !important;
|
height: 3.5rem !important;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue