qsdqs
parent
6b6910cac0
commit
35bc46c538
3
.env
3
.env
|
@ -8,7 +8,8 @@ REACT_APP_API_URL=http://localhost:5001/
|
||||||
REACT_APP_BASE_URL=http://localhost:3009/recherche-formation
|
REACT_APP_BASE_URL=http://localhost:3009/recherche-formation
|
||||||
REACT_APP_FRONT_URL=http://localhost:3009/
|
REACT_APP_FRONT_URL=http://localhost:3009/
|
||||||
REACT_APP_FRONT_URL_CANONICAL=localhost:3009/
|
REACT_APP_FRONT_URL_CANONICAL=localhost:3009/
|
||||||
REACT_APP_FRONT_URL_CANONICAL_BASE=http://
|
REACT_APP_PART_PUB_CATALOG_DOMAIN=localhost:3009/
|
||||||
|
|
||||||
REACT_APP_ENV=DEV
|
REACT_APP_ENV=DEV
|
||||||
GENERATE_SOURCEMAP=false
|
GENERATE_SOURCEMAP=false
|
||||||
REACT_APP_MAINTENANCE=1
|
REACT_APP_MAINTENANCE=1
|
25
src/App.js
25
src/App.js
|
@ -99,27 +99,40 @@ function App() {
|
||||||
|
|
||||||
const subdomain = domain.split('.')[0];
|
const subdomain = domain.split('.')[0];
|
||||||
|
|
||||||
// console.log(" subdomain 12 = ", subdomain);
|
console.log(" subdomain 12223 = ", subdomain);
|
||||||
|
var tab_reserved_subdomain = ['/dev', '/demo', 'demo', 'dev'];
|
||||||
|
|
||||||
if (tab_split.length > 1 && myurl_pathname) {
|
console.log(" domain 12223 = ", domain);
|
||||||
|
|
||||||
//console.log(" on est dans myurl_pathname = ", myurl_pathname);
|
if (tab_split.length > 1 && myurl_pathname && !tab_reserved_subdomain.includes(subdomain)) {
|
||||||
|
|
||||||
var tab_action = ['/moncatalog', '/Display-Partner-Catalog-Detail-formation'];
|
console.log(" on est dans myurl_pathname = ", myurl_pathname);
|
||||||
|
|
||||||
if (!tab_action.includes(myurl_pathname)) {
|
var tab_myurl_pathname = myurl_pathname.split('/');
|
||||||
|
|
||||||
|
console.log(" tab_myurl_pathname ", tab_myurl_pathname);
|
||||||
|
|
||||||
|
var tab_action = ['/moncatalog', '/Display-Partner-Catalog-Detail-formation', 'Display-Partner-Catalog-Detail-formation', 'moncatalog'];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (tab_myurl_pathname.length > 0 && !tab_action.includes(tab_myurl_pathname[1]) && !tab_reserved_subdomain.includes(subdomain)) {
|
||||||
console.log(' le traitement a faire est : ', myurl_pathname);
|
console.log(' le traitement a faire est : ', myurl_pathname);
|
||||||
var new_url = window.location.protocol + "//" + domain.split('.')[0] + "." + domain.split('.')[1] + "/moncatalog";
|
var new_url = window.location.protocol + "//" + domain.split('.')[0] + "." + domain.split('.')[1] + "/moncatalog";
|
||||||
//console.log(' new_url =', new_url);
|
console.log(' new_url =', new_url);
|
||||||
|
|
||||||
|
/*
|
||||||
window.open(
|
window.open(
|
||||||
new_url,
|
new_url,
|
||||||
'_self'
|
'_self'
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
console.log(" passs insite 12223 = ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -347,7 +347,7 @@ const Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
||||||
|
|
||||||
|
|
||||||
function Display(e) {
|
function Display(e) {
|
||||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class/";
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class_for_partner_catalog/";
|
||||||
var form = new FormData();
|
var form = new FormData();
|
||||||
form.append("internal_url", classId);
|
form.append("internal_url", classId);
|
||||||
|
|
||||||
|
|
|
@ -446,10 +446,6 @@ const Module_Email_Management = (props) => {
|
||||||
form.append("related_collection", props.related_collection);
|
form.append("related_collection", props.related_collection);
|
||||||
form.append("email_sujet", email_sujet);
|
form.append("email_sujet", email_sujet);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// pièce jointe
|
// pièce jointe
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1427,7 +1427,7 @@ const Mon_Catalogue_Public = () => {
|
||||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/get_all_class_Given_partner_owner_recid_No_Login/";
|
myurl = process.env.REACT_APP_API_URL + "myclass/api/get_all_class_Given_partner_owner_recid_No_Login/";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/recherche_text_simple/";
|
myurl = process.env.REACT_APP_API_URL + "myclass/api/recherche_text_simple_for_partner_catalog/";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1435,7 +1435,7 @@ const Mon_Catalogue_Public = () => {
|
||||||
axios.post(myurl, form).then(res => {
|
axios.post(myurl, form).then(res => {
|
||||||
if (String(res.data.status) != String("false")) {
|
if (String(res.data.status) != String("false")) {
|
||||||
//console.log(" In test res.data.status = " + res.data.status);
|
//console.log(" In test res.data.status = " + res.data.status);
|
||||||
console.log(" In test res.data.message = " + res.data.message);
|
//console.log(" In test res.data.message = " + res.data.message);
|
||||||
setmyApiResponse("True");
|
setmyApiResponse("True");
|
||||||
setResult(res.data.message)
|
setResult(res.data.message)
|
||||||
|
|
||||||
|
@ -1507,7 +1507,7 @@ const Mon_Catalogue_Public = () => {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
crit_SearchText = NewSearchText;
|
crit_SearchText = NewSearchText;
|
||||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/recherche_text_simple/";
|
myurl = process.env.REACT_APP_API_URL + "myclass/api/recherche_text_simple_for_partner_catalog/";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2605,8 +2605,12 @@ const Mon_Catalogue_Public = () => {
|
||||||
domain = url.split('://')[1];
|
domain = url.split('://')[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(" ### local_url_subdomain = ", local_url_subdomain);
|
||||||
|
|
||||||
const subdomain = domain.split('.')[0];
|
const subdomain = domain.split('.')[0];
|
||||||
|
|
||||||
|
console.log(" ### subdomain = ", subdomain);
|
||||||
|
|
||||||
var form = new FormData();
|
var form = new FormData();
|
||||||
|
|
||||||
form.append("subdomain", subdomain);
|
form.append("subdomain", subdomain);
|
||||||
|
@ -2617,7 +2621,7 @@ const Mon_Catalogue_Public = () => {
|
||||||
|
|
||||||
if (String(res.data.status) === "true") {
|
if (String(res.data.status) === "true") {
|
||||||
//console.log(" In Get_Subdomain_Partner_Data res.data.status = " + res.data.status);
|
//console.log(" In Get_Subdomain_Partner_Data res.data.status = " + res.data.status);
|
||||||
// console.log(" In Get_Subdomain_Partner_Data res.data.message r_class = " + res.data.message);
|
console.log(" In Get_Subdomain_Partner_Data res.data.message r_class = " + res.data.message);
|
||||||
setGet_Subdomain_Partner_Data_api("true");
|
setGet_Subdomain_Partner_Data_api("true");
|
||||||
setGet_Subdomain_Partner_Data_result(res.data.message);
|
setGet_Subdomain_Partner_Data_result(res.data.message);
|
||||||
|
|
||||||
|
@ -2695,7 +2699,7 @@ const Mon_Catalogue_Public = () => {
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.warn('Not good man :( Get_Subdomain_Partner_Data = ', error);
|
console.warn('Not good man :( Get_Subdomain_Partner_Data = ', error);
|
||||||
setGet_Subdomain_Partner_Data_api("false");
|
setGet_Subdomain_Partner_Data_api("false");
|
||||||
alert(" Impossible de recuperer les données du materiel");
|
alert(" Impossible de recuperer les données du sous domaine");
|
||||||
//setmyApimyApiMessage("")
|
//setmyApimyApiMessage("")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -947,18 +947,21 @@ const Recherche_new_v2 = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
console.log(" zzzzzzzzzzzzzzzzzz ");
|
||||||
|
|
||||||
// Verifier s'il y a un sous domaine
|
// Verifier s'il y a un sous domaine
|
||||||
var tab_split_sous_domain = window.location.host.split(".");
|
var tab_split_sous_domain = window.location.host.split(".");
|
||||||
|
|
||||||
if (tab_split_sous_domain.length > 2) {
|
if (tab_split_sous_domain.length > 2) {
|
||||||
var new_url = process.env.REACT_APP_FRONT_URL_CANONICAL_BASE + tab_split_sous_domain[0] + "." + process.env.REACT_APP_FRONT_URL_CANONICAL + "moncatalog";
|
var new_url = process.env.REACT_APP_FRONT_URL_CANONICAL_BASE + tab_split_sous_domain[0] + "." + process.env.REACT_APP_FRONT_URL_CANONICAL + "moncatalog";
|
||||||
window.open( String(new_url),
|
window.open(String(new_url),
|
||||||
'_self'
|
'_self'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
var ip = "";
|
var ip = "";
|
||||||
|
@ -1441,7 +1444,7 @@ const Recherche_new_v2 = () => {
|
||||||
axios.post(myurl, form).then(res => {
|
axios.post(myurl, form).then(res => {
|
||||||
if (String(res.data.status) != String("false")) {
|
if (String(res.data.status) != String("false")) {
|
||||||
//console.log(" In test res.data.status = " + res.data.status);
|
//console.log(" In test res.data.status = " + res.data.status);
|
||||||
console.log(" In test res.data.message = " + res.data.message);
|
//console.log(" In test res.data.message = " + res.data.message);
|
||||||
setmyApiResponse("True");
|
setmyApiResponse("True");
|
||||||
setResult(res.data.message)
|
setResult(res.data.message)
|
||||||
|
|
||||||
|
|
|
@ -241,6 +241,10 @@ function SignUp() {
|
||||||
telephone = document.getElementsByName("telephone")[0].value;
|
telephone = document.getElementsByName("telephone")[0].value;
|
||||||
|
|
||||||
formData.append("nom", raison_sociale);
|
formData.append("nom", raison_sociale);
|
||||||
|
|
||||||
|
var new_nom = (raison_sociale).replace(/[^0-9a-z]/gi, '').toLocaleLowerCase();
|
||||||
|
formData.append('subdomaine_catalog_pub', new_nom);
|
||||||
|
|
||||||
formData.append("telephone", telephone);
|
formData.append("telephone", telephone);
|
||||||
formData.append("contact_nom", contact_nom);
|
formData.append("contact_nom", contact_nom);
|
||||||
formData.append("contact_prenom", contact_prenom);
|
formData.append("contact_prenom", contact_prenom);
|
||||||
|
|
|
@ -1426,7 +1426,7 @@ const Subdomain_Recherche_new_v2 = () => {
|
||||||
axios.post(myurl, form).then(res => {
|
axios.post(myurl, form).then(res => {
|
||||||
if (String(res.data.status) != String("false")) {
|
if (String(res.data.status) != String("false")) {
|
||||||
//console.log(" In test res.data.status = " + res.data.status);
|
//console.log(" In test res.data.status = " + res.data.status);
|
||||||
console.log(" In test res.data.message = " + res.data.message);
|
// console.log(" In test res.data.message = " + res.data.message);
|
||||||
setmyApiResponse("True");
|
setmyApiResponse("True");
|
||||||
setResult(res.data.message)
|
setResult(res.data.message)
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@ import Autocomplete from '@mui/material/Autocomplete';
|
||||||
import 'react-tooltip/dist/react-tooltip.css'
|
import 'react-tooltip/dist/react-tooltip.css'
|
||||||
import { Tooltip } from 'react-tooltip'
|
import { Tooltip } from 'react-tooltip'
|
||||||
|
|
||||||
|
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
||||||
|
|
||||||
function UpdateParnterInfo(props) {
|
function UpdateParnterInfo(props) {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const [myApiResponse, setmyApiResponse] = useState("");
|
const [myApiResponse, setmyApiResponse] = useState("");
|
||||||
|
@ -701,6 +703,10 @@ function UpdateParnterInfo(props) {
|
||||||
formData.append('token', stored_user);
|
formData.append('token', stored_user);
|
||||||
formData.append('nom', nom);
|
formData.append('nom', nom);
|
||||||
|
|
||||||
|
var new_nom = (p_nom).replace(/[^0-9a-z]/gi, '').toLocaleLowerCase();
|
||||||
|
formData.append('subdomaine_catalog_pub', new_nom);
|
||||||
|
|
||||||
|
|
||||||
//formData.append('iscertitrace', mycertitrace);
|
//formData.append('iscertitrace', mycertitrace);
|
||||||
formData.append('isdatadock', mydatadock);
|
formData.append('isdatadock', mydatadock);
|
||||||
formData.append('isqualiopi', myqualiopi);
|
formData.append('isqualiopi', myqualiopi);
|
||||||
|
@ -1565,8 +1571,17 @@ function UpdateParnterInfo(props) {
|
||||||
setsubmenu("submenu_contact");
|
setsubmenu("submenu_contact");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [partner_catalog_pub_url, setpartner_catalog_pub_url] = useState("");
|
||||||
|
|
||||||
async function submenu_donnee_catalog_pub() {
|
async function submenu_donnee_catalog_pub() {
|
||||||
Get_Partner_Catalog_Pub_Config();
|
Get_Partner_Catalog_Pub_Config();
|
||||||
|
|
||||||
|
var new_nom = (p_nom).replace(/[^0-9a-z]/gi, '').toLocaleLowerCase();
|
||||||
|
var new_url = window.location.protocol + "//" + new_nom + "." + process.env.REACT_APP_PART_PUB_CATALOG_DOMAIN + "moncatalog";
|
||||||
|
|
||||||
|
setpartner_catalog_pub_url(new_url);
|
||||||
|
|
||||||
setsubmenu("submenu_donnee_catalog_pub");
|
setsubmenu("submenu_donnee_catalog_pub");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1783,7 +1798,7 @@ function UpdateParnterInfo(props) {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
if (String(res.data.status) === "true") {
|
if (String(res.data.status) === "true") {
|
||||||
//console.log(" In Get_Partner_Catalog_Pub_Config res.data.status = " + res.data.status);
|
//console.log(" In Get_Partner_Catalog_Pub_Config res.data.status = " + res.data.status);
|
||||||
//console.log(" In Get_Partner_Catalog_Pub_Config res.data.message r_class = " + res.data.message);
|
console.log(" In Get_Partner_Catalog_Pub_Config res.data.message r_class = " + res.data.message);
|
||||||
setGet_Partner_Catalog_Pub_Config_api("true");
|
setGet_Partner_Catalog_Pub_Config_api("true");
|
||||||
setGet_Partner_Catalog_Pub_Config_result(res.data.message);
|
setGet_Partner_Catalog_Pub_Config_result(res.data.message);
|
||||||
|
|
||||||
|
@ -2405,7 +2420,43 @@ function UpdateParnterInfo(props) {
|
||||||
{String(submenu).trim() === "submenu_donnee_catalog_pub" && <div className="training_data">
|
{String(submenu).trim() === "submenu_donnee_catalog_pub" && <div className="training_data">
|
||||||
<h3> Configuration du Catalog public </h3>
|
<h3> Configuration du Catalog public </h3>
|
||||||
|
|
||||||
|
|
||||||
<div className="partner_catalog_pub">
|
<div className="partner_catalog_pub">
|
||||||
|
<div className="titre1"> <b> Lien web (url) </b> </div>
|
||||||
|
<div className="div_row">
|
||||||
|
<TextField
|
||||||
|
name="config_url"
|
||||||
|
label="lien web (url) catalogue "
|
||||||
|
className="texte_area"
|
||||||
|
sx={{ m: 1, width: '48%' }}
|
||||||
|
InputProps={{
|
||||||
|
startAdornment: (
|
||||||
|
<InputAdornment position="start">
|
||||||
|
<LanguageIcon />
|
||||||
|
</InputAdornment>
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
value={partner_catalog_pub_url}
|
||||||
|
|
||||||
|
/> <Button
|
||||||
|
|
||||||
|
onClick={(event) => {
|
||||||
|
window.open(
|
||||||
|
String(partner_catalog_pub_url),
|
||||||
|
'_blank'
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
|
||||||
|
style={{ marginTop:'10px' }}
|
||||||
|
>
|
||||||
|
<OpenInNewIcon />
|
||||||
|
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div className="div_row">
|
||||||
|
<hr className="hr_break" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{String(submenu_catalog_pub) === String("design") &&
|
{String(submenu_catalog_pub) === String("design") &&
|
||||||
|
@ -2414,6 +2465,7 @@ function UpdateParnterInfo(props) {
|
||||||
<div style={{ "border": "None" }}>
|
<div style={{ "border": "None" }}>
|
||||||
|
|
||||||
<div className="div_row">
|
<div className="div_row">
|
||||||
|
<div className="titre1"> <b> Thème </b> </div>
|
||||||
|
|
||||||
{String(catalog_pub_config_edit) === "1" && <div>
|
{String(catalog_pub_config_edit) === "1" && <div>
|
||||||
<div className="session_caract">Choisir un exemple de thème : <br />
|
<div className="session_caract">Choisir un exemple de thème : <br />
|
||||||
|
@ -2520,7 +2572,9 @@ function UpdateParnterInfo(props) {
|
||||||
|
|
||||||
{String(catalog_pub_config_edit) !== "1" && <div>
|
{String(catalog_pub_config_edit) !== "1" && <div>
|
||||||
|
|
||||||
<div className="div_row"> Thème actuel <br />
|
<div className="div_row">
|
||||||
|
|
||||||
|
|
||||||
{selected_catalog_pub_theme_preview && <div className="session_caract">
|
{selected_catalog_pub_theme_preview && <div className="session_caract">
|
||||||
<img className="preview_certif" src={selected_catalog_pub_theme_preview} />
|
<img className="preview_certif" src={selected_catalog_pub_theme_preview} />
|
||||||
</div>}
|
</div>}
|
||||||
|
@ -2623,7 +2677,7 @@ function UpdateParnterInfo(props) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr className="hr_break" />
|
<hr className="hr_break" />
|
||||||
<div className="titre1"> Gestion Bannière </div>
|
<div className="titre1"> <b> Gestion Bannière </b> </div>
|
||||||
|
|
||||||
<div style={{ "border": "None" }}>
|
<div style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
@ -2712,7 +2766,7 @@ function UpdateParnterInfo(props) {
|
||||||
|
|
||||||
<hr className="hr_break" />
|
<hr className="hr_break" />
|
||||||
|
|
||||||
<div className="titre1"> Gestion LOGO </div>
|
<div className="titre1"> <b>Gestion LOGO </b> </div>
|
||||||
|
|
||||||
<div className="detail_class_submenu_data" style={{ "border": "None" }}>
|
<div className="detail_class_submenu_data" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue