04/07/23 - 17h
parent
7a373b681c
commit
05345acd66
|
@ -312,8 +312,12 @@ function Abonnement(props) {
|
||||||
if (String(result['status']) === String("true")) {
|
if (String(result['status']) === String("true")) {
|
||||||
settestval(true);
|
settestval(true);
|
||||||
desablefield1();
|
desablefield1();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -919,6 +919,11 @@ const AddClassManual = (props) => {
|
||||||
setisimgclassdeleted("1");
|
setisimgclassdeleted("1");
|
||||||
setuserimgclassprofil("");
|
setuserimgclassprofil("");
|
||||||
}
|
}
|
||||||
|
else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setisimgclassdeleted("0");
|
setisimgclassdeleted("0");
|
||||||
setisimgclassdeleted_message(result['message']);
|
setisimgclassdeleted_message(result['message']);
|
||||||
|
|
|
@ -189,8 +189,11 @@ const ButtonHilight = () => {
|
||||||
|
|
||||||
function part_logout_confirmation() {
|
function part_logout_confirmation() {
|
||||||
/* si c'est une connexion partner qui est active */
|
/* si c'est une connexion partner qui est active */
|
||||||
|
alert(" deccc");
|
||||||
|
console.log(" ### AVANNN deconnexion iciiii");
|
||||||
if (typeof (stored_part) != "undefined") {
|
if (typeof (stored_part) != "undefined") {
|
||||||
setpartCookie("tokenmysypart", "");
|
console.log(" ### deconnexion iciiii");
|
||||||
|
setpartCookie("tokenmysypart", "", { path: '/' });
|
||||||
}
|
}
|
||||||
history.push("/recherche-formation");
|
history.push("/recherche-formation");
|
||||||
}
|
}
|
||||||
|
|
|
@ -869,7 +869,11 @@ function CheckOut(props) {
|
||||||
setaddfacturationinfo_response(result['message']);
|
setaddfacturationinfo_response(result['message']);
|
||||||
setfields1desabled(true);
|
setfields1desabled(true);
|
||||||
setokcommande("");
|
setokcommande("");
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setaddfacturationinfo_response("");
|
setaddfacturationinfo_response("");
|
||||||
setfields1desabled(false);
|
setfields1desabled(false);
|
||||||
|
|
|
@ -914,7 +914,7 @@ const DisplayDetailClass_new_v2 = (props) => {
|
||||||
function part_logout_confirmation() {
|
function part_logout_confirmation() {
|
||||||
/* si c'est une connexion partner qui est active */
|
/* si c'est une connexion partner qui est active */
|
||||||
if (typeof (stored_part) != "undefined") {
|
if (typeof (stored_part) != "undefined") {
|
||||||
setCookie_part("tokenmysypart", "");
|
setCookie_part("tokenmysypart", "", { path: '/' });
|
||||||
}
|
}
|
||||||
history.push("/recherche-formation");
|
history.push("/recherche-formation");
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,12 @@ import tick_ko from "../mysy_img/tick_KO.png";
|
||||||
import { AiFillCloseCircle, } from "react-icons/ai";
|
import { AiFillCloseCircle, } from "react-icons/ai";
|
||||||
import parse from 'html-react-parser'
|
import parse from 'html-react-parser'
|
||||||
import { BsEye, BsFileText } from "react-icons/bs";
|
import { BsEye, BsFileText } from "react-icons/bs";
|
||||||
|
import { useHistory } from "react-router-dom";
|
||||||
|
|
||||||
const DistplayPartnerTraningsPage = (props) => {
|
const DistplayPartnerTraningsPage = (props) => {
|
||||||
|
|
||||||
|
|
||||||
|
const history = useHistory();
|
||||||
const [myApiResponse, setmyApiResponse] = useState("false");
|
const [myApiResponse, setmyApiResponse] = useState("false");
|
||||||
const filters = [
|
const filters = [
|
||||||
{ value: 'external_code', label: 'Code Formation' },
|
{ value: 'external_code', label: 'Code Formation' },
|
||||||
|
@ -33,8 +36,42 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
|
|
||||||
|
|
||||||
function handleClick(event, cellValues) {
|
function handleClick(event, cellValues) {
|
||||||
Edittraining(event, cellValues);
|
|
||||||
//console.log(cellValues);
|
var url = process.env.REACT_APP_API_URL + "myclass/api/check_partner_token_validity_v2/";
|
||||||
|
|
||||||
|
var formData = new FormData();
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
formData.append("token", stored_cookie);
|
||||||
|
fetch(
|
||||||
|
url,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
console.log(' isValidToken ==> Success:', result['message'], "result['status'] = ", result['status']);
|
||||||
|
|
||||||
|
if (String(result['status']) !== String("true")) {
|
||||||
|
alert("La session de connexion n'est pas valide");
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
Edittraining(event, cellValues);
|
||||||
|
//console.log(cellValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const [selectionModel, setSelectionModel] = React.useState([]);
|
const [selectionModel, setSelectionModel] = React.useState([]);
|
||||||
|
@ -210,23 +247,95 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
|
|
||||||
|
|
||||||
function Visualiser(event, cellValues) {
|
function Visualiser(event, cellValues) {
|
||||||
// On ne visualise que les formations publiées
|
|
||||||
if( cellValues.row.published !== "1" ){
|
|
||||||
alert(" Vous devez publier la formation pour la visualiser ");
|
var url = process.env.REACT_APP_API_URL + "myclass/api/check_partner_token_validity_v2/";
|
||||||
return;
|
|
||||||
}
|
var formData = new FormData();
|
||||||
window.open(
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
"/Display-Detail-formation/" + cellValues.row.internal_url,
|
formData.append("token", stored_cookie);
|
||||||
'_blank'
|
fetch(
|
||||||
);
|
url,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
console.log(' isValidToken ==> Success:', result['message'], "result['status'] = ", result['status']);
|
||||||
|
|
||||||
|
if (String(result['status']) !== String("true")) {
|
||||||
|
alert("La session de connexion n'est pas valide");
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
// On ne visualise que les formations publiées
|
||||||
|
if (cellValues.row.published !== "1") {
|
||||||
|
alert(" Vous devez publier la formation pour la visualiser ");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.open(
|
||||||
|
"/Display-Detail-formation/" + cellValues.row.internal_url,
|
||||||
|
'_blank'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function handleClickManagement(event, cellValues) {
|
function handleClickManagement(event, cellValues) {
|
||||||
window.open(
|
|
||||||
"/GestionAdministrative/" + cellValues.row.internal_url,
|
// Verification de la validité du token avant action.
|
||||||
'_blank'
|
var url = process.env.REACT_APP_API_URL + "myclass/api/check_partner_token_validity_v2/";
|
||||||
);
|
|
||||||
|
var formData = new FormData();
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
formData.append("token", stored_cookie);
|
||||||
|
fetch(
|
||||||
|
url,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
console.log(' isValidToken ==> Success:', result['message'], "result['status'] = ", result['status']);
|
||||||
|
|
||||||
|
if (String(result['status']) !== String("true")) {
|
||||||
|
alert("La session de connexion n'est pas valide");
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
else if (String(result['status']) === String("true")) {
|
||||||
|
window.open(
|
||||||
|
"/GestionAdministrative/" + cellValues.row.internal_url,
|
||||||
|
'_blank'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Fin verification
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -280,6 +389,43 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Fonction de verification de la validité d'un token.
|
||||||
|
function isValidToken() {
|
||||||
|
|
||||||
|
var url = process.env.REACT_APP_API_URL + "myclass/api/check_partner_token_validity_v2/";
|
||||||
|
|
||||||
|
var formData = new FormData();
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
formData.append("token", stored_cookie);
|
||||||
|
fetch(
|
||||||
|
url,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
console.log(' isValidToken ==> Success:', result['message'], "result['status'] = ", result['status']);
|
||||||
|
|
||||||
|
if (String(result['status']) !== String("true")) {
|
||||||
|
alert("La session de connexion n'est pas valide");
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function Unpublish_class(tab_class) {
|
function Unpublish_class(tab_class) {
|
||||||
|
|
||||||
var url = process.env.REACT_APP_API_URL + "myclass/api/unpublish_class/";
|
var url = process.env.REACT_APP_API_URL + "myclass/api/unpublish_class/";
|
||||||
|
@ -451,7 +597,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
<div className='detail_training'>
|
<div className='detail_training'>
|
||||||
<TrainingForm mytrainingclass={{
|
<TrainingForm mytrainingclass={{
|
||||||
'ref': reftrainingtoupdate, 'class_external_code': externalcodetraining_toupdate
|
'ref': reftrainingtoupdate, 'class_external_code': externalcodetraining_toupdate
|
||||||
}} ispending={props.ispending} currentpack={props.currentpack} closeTrainingForm={closeTrainingForm}/>
|
}} ispending={props.ispending} currentpack={props.currentpack} closeTrainingForm={closeTrainingForm} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,12 @@ import { FcAddImage } from "react-icons/fc";
|
||||||
import add_plus from "../mysy_img/plus.png";
|
import add_plus from "../mysy_img/plus.png";
|
||||||
import excel_icone from "../mysy_img/excel_icone.png";
|
import excel_icone from "../mysy_img/excel_icone.png";
|
||||||
import participants from "../mysy_img/participants.png";
|
import participants from "../mysy_img/participants.png";
|
||||||
|
import { useHistory } from "react-router-dom";
|
||||||
|
|
||||||
|
|
||||||
function GestionAdministrative(props) {
|
function GestionAdministrative(props) {
|
||||||
|
|
||||||
|
const history = useHistory();
|
||||||
const { internal_url } = useParams();
|
const { internal_url } = useParams();
|
||||||
const [mypresence, setmypresence] = useState("");
|
const [mypresence, setmypresence] = useState("");
|
||||||
const [mypublished, setmypublished] = useState("");
|
const [mypublished, setmypublished] = useState("");
|
||||||
|
@ -2059,7 +2060,7 @@ function GestionAdministrative(props) {
|
||||||
if (document.getElementsByName("one_presentiel")[0])
|
if (document.getElementsByName("one_presentiel")[0])
|
||||||
document.getElementsByName("one_presentiel")[0].value = "";
|
document.getElementsByName("one_presentiel")[0].value = "";
|
||||||
|
|
||||||
if (document.getElementsByName("one_session_ondemande")[0])
|
if (document.getElementsByName("one_session_ondemande")[0])
|
||||||
document.getElementsByName("one_session_ondemande")[0].value = "";
|
document.getElementsByName("one_session_ondemande")[0].value = "";
|
||||||
|
|
||||||
if (document.getElementsByName("one_distantiel")[0])
|
if (document.getElementsByName("one_distantiel")[0])
|
||||||
|
@ -2479,7 +2480,11 @@ function GestionAdministrative(props) {
|
||||||
GetListeEmargement(mysession);
|
GetListeEmargement(mysession);
|
||||||
GetListeEvaluation(mysession);
|
GetListeEvaluation(mysession);
|
||||||
submenu_inscrit();
|
submenu_inscrit();
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setliste_participants_file_change_message(result['message']);
|
setliste_participants_file_change_message(result['message']);
|
||||||
setliste_participants_file_change_api("false");
|
setliste_participants_file_change_api("false");
|
||||||
|
@ -2535,7 +2540,11 @@ function GestionAdministrative(props) {
|
||||||
setResend_LMS_Credentials_result(result['message']);
|
setResend_LMS_Credentials_result(result['message']);
|
||||||
setResend_LMS_Credentials_api("true");
|
setResend_LMS_Credentials_api("true");
|
||||||
alert(" Les identifiants de connexion ont été correctement envoyés")
|
alert(" Les identifiants de connexion ont été correctement envoyés")
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setResend_LMS_Credentials_message(result['message']);
|
setResend_LMS_Credentials_message(result['message']);
|
||||||
setResend_LMS_Credentials_api("false");
|
setResend_LMS_Credentials_api("false");
|
||||||
|
@ -2588,7 +2597,11 @@ function GestionAdministrative(props) {
|
||||||
//console.log('Success:', result['message']);
|
//console.log('Success:', result['message']);
|
||||||
setResend_LMS_Credentials_With_Email_result(result['message']);
|
setResend_LMS_Credentials_With_Email_result(result['message']);
|
||||||
setResend_LMS_Credentials_With_Email_api("true");
|
setResend_LMS_Credentials_With_Email_api("true");
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setResend_LMS_Credentials_With_Email_message(result['message']);
|
setResend_LMS_Credentials_With_Email_message(result['message']);
|
||||||
setResend_LMS_Credentials_With_Email_api("false");
|
setResend_LMS_Credentials_With_Email_api("false");
|
||||||
|
@ -2689,7 +2702,12 @@ function GestionAdministrative(props) {
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
|
|
||||||
//console.log(" ## result['status'] = ", result['status'])
|
//console.log(" ## result['status'] = ", result['status'])
|
||||||
if (String(result['status']) === String("true")) {
|
if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (String(result['status']) === String("true")) {
|
||||||
//console.log('Success:', result['message']);
|
//console.log('Success:', result['message']);
|
||||||
setliste_sessions_file_change_result(result['message']);
|
setliste_sessions_file_change_result(result['message']);
|
||||||
setliste_sessions_file_change_api("true");
|
setliste_sessions_file_change_api("true");
|
||||||
|
@ -2698,12 +2716,12 @@ function GestionAdministrative(props) {
|
||||||
alert(" Les sessions ont été correctement importées");
|
alert(" Les sessions ont été correctement importées");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setliste_sessions_file_change_message(result['message']);
|
setliste_sessions_file_change_message(result['message']);
|
||||||
setliste_sessions_file_change_api("false");
|
setliste_sessions_file_change_api("false");
|
||||||
alert('Erreur: '+result['message']);
|
alert('Erreur: ' + result['message']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -3999,16 +4017,16 @@ function GestionAdministrative(props) {
|
||||||
<div className="field_droite">
|
<div className="field_droite">
|
||||||
<select id="session_liste" value={mysession} onChange={handleChangeSession} className="selectsession">
|
<select id="session_liste" value={mysession} onChange={handleChangeSession} className="selectsession">
|
||||||
<option value="" className="select_option_css">Choisir</option>
|
<option value="" className="select_option_css">Choisir</option>
|
||||||
|
|
||||||
|
|
||||||
{GetCurrentClass_trainingsession_result &&
|
{GetCurrentClass_trainingsession_result &&
|
||||||
GetCurrentClass_trainingsession_result.map((session) => (
|
GetCurrentClass_trainingsession_result.map((session) => (
|
||||||
|
|
||||||
|
|
||||||
<option value={(JSON.parse(session).formation_session_id)} className="select_option_css">
|
<option value={(JSON.parse(session).formation_session_id)} className="select_option_css">
|
||||||
{(JSON.parse(session).session_ondemande) === "1" && " A la Demande - "}
|
{(JSON.parse(session).session_ondemande) === "1" && " A la Demande - "}
|
||||||
{( !JSON.parse(session).session_ondemande || JSON.parse(session).session_ondemande === "0" ) &&
|
{(!JSON.parse(session).session_ondemande || JSON.parse(session).session_ondemande === "0") &&
|
||||||
(JSON.parse(session).date_debut).substring(0, 10)+ " au "+ (JSON.parse(session).date_fin).substring(0, 10)}
|
(JSON.parse(session).date_debut).substring(0, 10) + " au " + (JSON.parse(session).date_fin).substring(0, 10)}
|
||||||
|
|
||||||
|
|
||||||
{/*(JSON.parse(session).date_debut).substring(0, 10)} au {(JSON.parse(session).date_fin).substring(0, 10) */} -
|
{/*(JSON.parse(session).date_debut).substring(0, 10)} au {(JSON.parse(session).date_fin).substring(0, 10) */} -
|
||||||
|
|
|
@ -15,8 +15,8 @@ const Header = () => {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const stored_user = getCookie('tokenmysych');
|
const stored_user = getCookie('tokenmysych');
|
||||||
const stored_part = getCookie('tokenmysypart');
|
const stored_part = getCookie('tokenmysypart');
|
||||||
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']);
|
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych'], { path: '/' });
|
||||||
const [partcookie, setpartCookie, removepartCookie] = useCookies(['tokenmysypart']);
|
const [partcookie, setpartCookie, removepartCookie] = useCookies(['tokenmysypart'], { path: '/' });
|
||||||
|
|
||||||
|
|
||||||
const [PartnerMenu, setPartnerMenu] = React.useState(null);
|
const [PartnerMenu, setPartnerMenu] = React.useState(null);
|
||||||
|
@ -137,8 +137,9 @@ const Header = () => {
|
||||||
|
|
||||||
function part_logout_confirmation() {
|
function part_logout_confirmation() {
|
||||||
/* si c'est une connexion partner qui est active */
|
/* si c'est une connexion partner qui est active */
|
||||||
|
|
||||||
if (typeof (stored_part) != "undefined") {
|
if (typeof (stored_part) != "undefined") {
|
||||||
setpartCookie("tokenmysypart", "");
|
setpartCookie("tokenmysypart", "", { path: '/' });
|
||||||
}
|
}
|
||||||
history.push("/recherche-formation");
|
history.push("/recherche-formation");
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,7 +292,11 @@ function HebergementLms(props) {
|
||||||
setSend_logo_Img_api("true");
|
setSend_logo_Img_api("true");
|
||||||
alert(" La mise à jour du logo a été correctement effectuée. ");
|
alert(" La mise à jour du logo a été correctement effectuée. ");
|
||||||
|
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setSend_logo_Img_api("false");
|
setSend_logo_Img_api("false");
|
||||||
setSend_logo_Img_message(result['message']);
|
setSend_logo_Img_message(result['message']);
|
||||||
|
@ -429,7 +433,11 @@ function HebergementLms(props) {
|
||||||
setSendBackground_Img_api("true");
|
setSendBackground_Img_api("true");
|
||||||
alert(" L'image bannière a été correctement mise à jour")
|
alert(" L'image bannière a été correctement mise à jour")
|
||||||
|
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setSendBackground_Img_api("false");
|
setSendBackground_Img_api("false");
|
||||||
setSendBackground_Img_message(result['message']);
|
setSendBackground_Img_message(result['message']);
|
||||||
|
|
|
@ -379,7 +379,7 @@ const ListeArticles = (props) => {
|
||||||
function part_logout_confirmation() {
|
function part_logout_confirmation() {
|
||||||
/* si c'est une connexion partner qui est active */
|
/* si c'est une connexion partner qui est active */
|
||||||
if (typeof (stored_part) != "undefined") {
|
if (typeof (stored_part) != "undefined") {
|
||||||
setpartCookie("tokenmysypart", "");
|
setpartCookie("tokenmysypart", "", { path: '/' });
|
||||||
}
|
}
|
||||||
history.push("/recherche-formation");
|
history.push("/recherche-formation");
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,11 @@ const Partner = (props) => {
|
||||||
setapiexcelimportmessage(result['status']);
|
setapiexcelimportmessage(result['status']);
|
||||||
if (String(result['status']) === String("true")) {
|
if (String(result['status']) === String("true")) {
|
||||||
sethandleSubmission_api("true");
|
sethandleSubmission_api("true");
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
sethandleSubmission_api("false");
|
sethandleSubmission_api("false");
|
||||||
sethandleSubmission_message(result['message']);
|
sethandleSubmission_message(result['message']);
|
||||||
|
|
|
@ -35,7 +35,7 @@ function PartnerSignIn() {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
|
||||||
function logout_partner_confirmation() {
|
function logout_partner_confirmation() {
|
||||||
setCookie("tokenmysypart", "");
|
setCookie("tokenmysypart", "", { path: '/' });
|
||||||
}
|
}
|
||||||
|
|
||||||
function Logout_Partenaire() {
|
function Logout_Partenaire() {
|
||||||
|
@ -129,7 +129,7 @@ function PartnerSignIn() {
|
||||||
|
|
||||||
if (String(val) === String("true")) {
|
if (String(val) === String("true")) {
|
||||||
|
|
||||||
setCookie("tokenmysypart", result['message']);
|
setCookie("tokenmysypart", result['message'], { path: '/' });
|
||||||
history.push("/Partner");
|
history.push("/Partner");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -127,7 +127,7 @@ function PartnerSignIn() {
|
||||||
|
|
||||||
if (String(val) === String("true")) {
|
if (String(val) === String("true")) {
|
||||||
sessionStorage.setItem("token", result['message']);
|
sessionStorage.setItem("token", result['message']);
|
||||||
setCookie("tokenmysypart", result['message']);
|
setCookie("tokenmysypart", result['message'], { path: '/' });
|
||||||
history.push("/Partner");
|
history.push("/Partner");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -131,7 +131,7 @@ function PartnerSignIn() {
|
||||||
|
|
||||||
if (String(val) === String("true")) {
|
if (String(val) === String("true")) {
|
||||||
sessionStorage.setItem("token", result['message']);
|
sessionStorage.setItem("token", result['message']);
|
||||||
setCookie("tokenmysypart", result['message']);
|
setCookie("tokenmysypart", result['message'], { path: '/' });
|
||||||
history.push("/Partner");
|
history.push("/Partner");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -164,7 +164,11 @@ function PaymentMethode(props) {
|
||||||
if (String(result['status']) === String("true")) {
|
if (String(result['status']) === String("true")) {
|
||||||
setpaymentadded("1");
|
setpaymentadded("1");
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setpaymentadded("0");
|
setpaymentadded("0");
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,11 @@ function PaymentMethodeNoConnect(props) {
|
||||||
|
|
||||||
setpaymentadded("1");
|
setpaymentadded("1");
|
||||||
|
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
|
||||||
setpaymentadded("0");
|
setpaymentadded("0");
|
||||||
|
|
|
@ -147,7 +147,11 @@ function PaymentMethodeNoConnect(props) {
|
||||||
|
|
||||||
if (String(result['status']) === String("true")) {
|
if (String(result['status']) === String("true")) {
|
||||||
setpaymentadded("1");
|
setpaymentadded("1");
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setpaymentadded("0");
|
setpaymentadded("0");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1780,7 +1780,7 @@ const Recherche = () => {
|
||||||
function part_logout_confirmation() {
|
function part_logout_confirmation() {
|
||||||
/* si c'est une connexion partner qui est active */
|
/* si c'est une connexion partner qui est active */
|
||||||
if (typeof (stored_part) != "undefined") {
|
if (typeof (stored_part) != "undefined") {
|
||||||
setpartCookie("tokenmysypart", "");
|
setpartCookie("tokenmysypart", "", { path: '/' });
|
||||||
}
|
}
|
||||||
history.push("/recherche-formation");
|
history.push("/recherche-formation");
|
||||||
}
|
}
|
||||||
|
|
|
@ -379,7 +379,7 @@ const RechercheArticles = (props) => {
|
||||||
function part_logout_confirmation() {
|
function part_logout_confirmation() {
|
||||||
/* si c'est une connexion partner qui est active */
|
/* si c'est une connexion partner qui est active */
|
||||||
if (typeof (stored_part) != "undefined") {
|
if (typeof (stored_part) != "undefined") {
|
||||||
setpartCookie("tokenmysypart", "");
|
setpartCookie("tokenmysypart", "", { path: '/' });
|
||||||
}
|
}
|
||||||
history.push("/recherche-formation");
|
history.push("/recherche-formation");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1688,7 +1688,7 @@ const Recherche_new = () => {
|
||||||
function part_logout_confirmation() {
|
function part_logout_confirmation() {
|
||||||
/* si c'est une connexion partner qui est active */
|
/* si c'est une connexion partner qui est active */
|
||||||
if (typeof (stored_part) != "undefined") {
|
if (typeof (stored_part) != "undefined") {
|
||||||
setpartCookie("tokenmysypart", "");
|
setpartCookie("tokenmysypart", "", { path: '/' });
|
||||||
}
|
}
|
||||||
history.push("/recherche-formation");
|
history.push("/recherche-formation");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1688,7 +1688,7 @@ const Recherche_new = () => {
|
||||||
function part_logout_confirmation() {
|
function part_logout_confirmation() {
|
||||||
/* si c'est une connexion partner qui est active */
|
/* si c'est une connexion partner qui est active */
|
||||||
if (typeof (stored_part) != "undefined") {
|
if (typeof (stored_part) != "undefined") {
|
||||||
setpartCookie("tokenmysypart", "");
|
setpartCookie("tokenmysypart", "", { path: '/' });
|
||||||
}
|
}
|
||||||
history.push("/recherche-formation");
|
history.push("/recherche-formation");
|
||||||
}
|
}
|
||||||
|
|
|
@ -2075,7 +2075,7 @@ const Recherche_new_v2 = () => {
|
||||||
function part_logout_confirmation() {
|
function part_logout_confirmation() {
|
||||||
/* si c'est une connexion partner qui est active */
|
/* si c'est une connexion partner qui est active */
|
||||||
if (typeof (stored_part) != "undefined") {
|
if (typeof (stored_part) != "undefined") {
|
||||||
setpartCookie("tokenmysypart", "");
|
setpartCookie("tokenmysypart", "", { path: '/' });
|
||||||
}
|
}
|
||||||
history.push("/recherche-formation");
|
history.push("/recherche-formation");
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,8 @@ import VisibilityOff from '@mui/icons-material/VisibilityOff';
|
||||||
|
|
||||||
function SignIn() {
|
function SignIn() {
|
||||||
const [isconnected, setisconnected] = useState("");
|
const [isconnected, setisconnected] = useState("");
|
||||||
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']);
|
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych'], { path: '/' });
|
||||||
const [cookie_part, setCookie_part, removeCookie_part] = useCookies(['tokenmysypart']);
|
const [cookie_part, setCookie_part, removeCookie_part] = useCookies(['tokenmysypart'], { path: '/' });
|
||||||
const [retval, setretval] = useState("0");
|
const [retval, setretval] = useState("0");
|
||||||
const [myApimyApiMessage, setmyApimyApiMessage] = useState("");
|
const [myApimyApiMessage, setmyApimyApiMessage] = useState("");
|
||||||
const [initpasswd, setinitpasswd] = useState();
|
const [initpasswd, setinitpasswd] = useState();
|
||||||
|
@ -171,7 +171,7 @@ function SignIn() {
|
||||||
|
|
||||||
if (String(partner_connexion) === String("partner")) {
|
if (String(partner_connexion) === String("partner")) {
|
||||||
|
|
||||||
setCookie("tokenmysypart", JSON.parse(result['message']).token);
|
setCookie("tokenmysypart", JSON.parse(result['message']).token, { path: '/' });
|
||||||
//setCookie("tokenmysypart", result['message']);
|
//setCookie("tokenmysypart", result['message']);
|
||||||
history.push("/Partner");
|
history.push("/Partner");
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,11 @@ function UpdateParnterInfo() {
|
||||||
desablesecurtyInsertKeyfields();
|
desablesecurtyInsertKeyfields();
|
||||||
document.getElementsByName("current_insert_key")[0].value = new_key;
|
document.getElementsByName("current_insert_key")[0].value = new_key;
|
||||||
setinsert_key_updated(true);
|
setinsert_key_updated(true);
|
||||||
}
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|
|
@ -92,7 +92,11 @@ function UpdateUserGoals(props) {
|
||||||
});
|
});
|
||||||
{ window.location.reload() }
|
{ window.location.reload() }
|
||||||
|
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setrecorddata_api("false");
|
setrecorddata_api("false");
|
||||||
setrecorddata_api_message(result['message']);
|
setrecorddata_api_message(result['message']);
|
||||||
|
|
|
@ -342,7 +342,11 @@ function UpdateUserInfo() {
|
||||||
if (String(result['status']) === String("true")) {
|
if (String(result['status']) === String("true")) {
|
||||||
settestval("true");
|
settestval("true");
|
||||||
desablefield1();
|
desablefield1();
|
||||||
}
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|
|
@ -21,7 +21,7 @@ import MenuItem from '@mui/material/MenuItem';
|
||||||
|
|
||||||
|
|
||||||
function UpdateUserProfil(props) {
|
function UpdateUserProfil(props) {
|
||||||
|
const history = useHistory();
|
||||||
const [myclasslevel, setmyclasslevel] = useState("n/a");
|
const [myclasslevel, setmyclasslevel] = useState("n/a");
|
||||||
const [fiedsupdated, setfiedsupdated] = useState(false);
|
const [fiedsupdated, setfiedsupdated] = useState(false);
|
||||||
|
|
||||||
|
@ -95,10 +95,11 @@ function UpdateUserProfil(props) {
|
||||||
if (String(result['status']) === String("true")) {
|
if (String(result['status']) === String("true")) {
|
||||||
setrecorddata_api("true");
|
setrecorddata_api("true");
|
||||||
setrecorddata_api_result(result['message']);
|
setrecorddata_api_result(result['message']);
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
setrecorddata_api("false");
|
setrecorddata_api("false");
|
||||||
setrecorddata_api_message(result['message']);
|
setrecorddata_api_message(result['message']);
|
||||||
|
|
|
@ -163,7 +163,11 @@ function UpgradeToPro() {
|
||||||
alert(String(result['message']));
|
alert(String(result['message']));
|
||||||
setmyApiResponse("1");
|
setmyApiResponse("1");
|
||||||
|
|
||||||
|
}else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
//alert(" GRR "+String(result['message']+ " result['status'] = "+ result['status']));
|
//alert(" GRR "+String(result['message']+ " result['status'] = "+ result['status']));
|
||||||
setisconnected("false");
|
setisconnected("false");
|
||||||
|
|
|
@ -167,7 +167,7 @@ function SignIn() {
|
||||||
|
|
||||||
if (String(val) === String("true")) {
|
if (String(val) === String("true")) {
|
||||||
if (String(menucompte) === String("partner")) {
|
if (String(menucompte) === String("partner")) {
|
||||||
setCookie("tokenmysypart", result['message']);
|
setCookie("tokenmysypart", result['message'], { path: '/' });
|
||||||
history.push("/Partner");
|
history.push("/Partner");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue