qsd
parent
12769e0a1f
commit
6b915f833a
19
src/App.js
19
src/App.js
|
@ -99,12 +99,20 @@ function App() {
|
|||
|
||||
|
||||
const [isLoading, setLoading] = useState();
|
||||
|
||||
|
||||
const [mysy_domain, setmysy_domain] = useState(window.location.hostname.split('.')[0]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setLoading(true);
|
||||
let myurl = window.location.host;
|
||||
let myurl_pathname = window.location.pathname;
|
||||
|
||||
// console.log(" ### mysy_domain =", mysy_domain)
|
||||
|
||||
// console.log(" ### myurl =", myurl)
|
||||
// console.log(" ### window.location.hostname =", window.location.hostname)
|
||||
|
||||
var domain = myurl;
|
||||
if (domain.includes('://')) {
|
||||
|
@ -254,11 +262,16 @@ function App() {
|
|||
|
||||
*/}
|
||||
|
||||
<Route path="/" exact component={New_Home_Page_2025} />
|
||||
{/*** C'EST TRES TRES CRADE LES 2 LIGNES QUI SUIVENT MAIS C'EST POUR SE DEPANNER EN mode pompier */}
|
||||
|
||||
{String(mysy_domain).length > 5 && String(mysy_domain) !== "colasrail" && <Route path="/" exact component={New_Home_Page_2025} />}
|
||||
{String(mysy_domain) === "colasrail" && <Route path="/" exact component={Jmjformation_catalogue} />}
|
||||
|
||||
{/*** FINNN CRADDDDDDDE */}
|
||||
|
||||
|
||||
|
||||
<Route path="/jmjformation" exact component={Jmjformation_catalogue} />
|
||||
|
||||
|
||||
{/* Debut Migration */}
|
||||
<Route path="/Partner/:action/:orderid/:packs" exact component={Partner} />
|
||||
<Route path="/Partner/:action/:orderid" exact component={Partner} />
|
||||
|
|
|
@ -4106,6 +4106,10 @@ const DisplayPartnerPromotion = (props) => {
|
|||
setgridline_id('');
|
||||
setsequence_gridline_id("");
|
||||
|
||||
setent_account_automatic(false);
|
||||
setlms_account_automatic(false);
|
||||
|
||||
|
||||
//myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||
var divh = document.getElementById('myRef_add_session').offsetTop;
|
||||
window.scrollTo({
|
||||
|
@ -6271,9 +6275,8 @@ const DisplayPartnerPromotion = (props) => {
|
|||
setp_one_session_etape_label();
|
||||
|
||||
setp_one_titre("");
|
||||
|
||||
|
||||
|
||||
setent_account_automatic(false);
|
||||
setlms_account_automatic(false);
|
||||
|
||||
}
|
||||
|
||||
|
@ -7230,6 +7233,19 @@ const DisplayPartnerPromotion = (props) => {
|
|||
else if (String(mylocaltraining.session_status) === "false")
|
||||
setsessionStatus(false);
|
||||
|
||||
if (mylocaltraining.lms_account_automatic && String(mylocaltraining.lms_account_automatic) === "1") {
|
||||
setlms_account_automatic(true);
|
||||
} else {
|
||||
setlms_account_automatic(false);
|
||||
}
|
||||
|
||||
if (mylocaltraining.ent_account_automatic && String(mylocaltraining.ent_account_automatic) === "1") {
|
||||
setent_account_automatic(true);
|
||||
} else {
|
||||
setent_account_automatic(false);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Update 22/10/2023 :
|
||||
Gestion des champs spécifiques. ils commencent tous par 'my_'
|
||||
|
@ -21801,6 +21817,52 @@ const DisplayPartnerPromotion = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="separator">
|
||||
<nav className="separator_label">
|
||||
Configuration</nav>
|
||||
</div>
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%',
|
||||
paddingLeft: '10px', flexWrap: 'wrap'
|
||||
}}>
|
||||
<div className="session_caract"> Création automatique compte ENT <br />
|
||||
<Checkbox
|
||||
disabled={!edit_session_form}
|
||||
checked={ent_account_automatic}
|
||||
onChange={(event) => {
|
||||
setent_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Création automatique compte LMS <br />
|
||||
<Checkbox
|
||||
disabled={!edit_session_form}
|
||||
checked={lms_account_automatic}
|
||||
onChange={(event) => {
|
||||
setlms_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{/* -- début champs specifiques **/}
|
||||
|
||||
|
@ -21881,56 +21943,11 @@ const DisplayPartnerPromotion = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="separator">
|
||||
<nav className="separator_label">
|
||||
Configuration</nav>
|
||||
</div>
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%',
|
||||
paddingLeft: '10px', flexWrap: 'wrap'
|
||||
}}>
|
||||
<div className="session_caract"> Création automatique compte ENT <br />
|
||||
<Checkbox
|
||||
disabled={!edit_session_form}
|
||||
checked={ent_account_automatic}
|
||||
onChange={(event) => {
|
||||
setent_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Création automatique compte LMS <br />
|
||||
<Checkbox
|
||||
disabled={!edit_session_form}
|
||||
checked={lms_account_automatic}
|
||||
onChange={(event) => {
|
||||
setlms_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{sessionChanged && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
/!\ Pensez à enregistrer les modifications
|
||||
</div>}
|
||||
|
||||
{String(props.check_user_acces_right("session", "write")) === "1" && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
{String(props.check_user_acces_right("session", "write")) === "1" && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
|
||||
<div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||
|
||||
|
@ -22561,6 +22578,50 @@ const DisplayPartnerPromotion = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="separator">
|
||||
<nav className="separator_label">
|
||||
Configuration</nav>
|
||||
</div>
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%',
|
||||
paddingLeft: '10px', flexWrap: 'wrap'
|
||||
}}>
|
||||
<div className="session_caract"> Création automatique compte ENT <br />
|
||||
<Checkbox
|
||||
checked={ent_account_automatic}
|
||||
onChange={(event) => {
|
||||
setent_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Création automatique compte LMS <br />
|
||||
<Checkbox
|
||||
checked={lms_account_automatic}
|
||||
onChange={(event) => {
|
||||
setlms_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{/* -- début champs specifiques **/}
|
||||
|
||||
|
@ -26514,7 +26575,7 @@ const DisplayPartnerPromotion = (props) => {
|
|||
<br />
|
||||
<nav >Traitement en masse / Evaluation</nav><br />
|
||||
|
||||
|
||||
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
|
@ -26633,7 +26694,7 @@ const DisplayPartnerPromotion = (props) => {
|
|||
<div className="session_data">
|
||||
<br />
|
||||
<div className="div_row">
|
||||
{String(props.check_user_acces_right("session", "write")) === "1" && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
{String(props.check_user_acces_right("session", "write")) === "1" && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
|
||||
<div style={{ "fontSize": "12px" }}>
|
||||
<label htmlFor="upload-photo">
|
||||
|
@ -26710,7 +26771,7 @@ const DisplayPartnerPromotion = (props) => {
|
|||
{Get_List_Of_All_PJ_For_Session_result && Get_List_Of_All_PJ_For_Session_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 />
|
||||
{String(props.check_user_acces_right("session", "write")) === "1" && <Popup
|
||||
{String(props.check_user_acces_right("session", "write")) === "1" && <Popup
|
||||
trigger={
|
||||
<nav style={{ "color": "red", "cursor": "pointer" }} > Supprimer</nav>
|
||||
|
||||
|
|
|
@ -2279,7 +2279,7 @@ const DisplayPartnerSession = (props) => {
|
|||
setNew_Getall_TrainingSession_result_Timeline_Group(timeline_grp);
|
||||
}
|
||||
|
||||
setloading_datagrid(false);
|
||||
setloading_datagrid(false);
|
||||
}
|
||||
else {
|
||||
setGetall_TrainingSession_api("false");
|
||||
|
@ -2288,7 +2288,7 @@ const DisplayPartnerSession = (props) => {
|
|||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
setloading_datagrid(false);
|
||||
setloading_datagrid(false);
|
||||
}
|
||||
|
||||
setLoading(false);
|
||||
|
@ -2297,7 +2297,7 @@ const DisplayPartnerSession = (props) => {
|
|||
console.warn('Not good man :( Getall_TrainingSession = ', error);
|
||||
setGetall_TrainingSession_api("false");
|
||||
alert("Impossible de lancer la recherche");
|
||||
setloading_datagrid(false);
|
||||
setloading_datagrid(false);
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
@ -4108,6 +4108,9 @@ const DisplayPartnerSession = (props) => {
|
|||
setgridline_id('');
|
||||
setsequence_gridline_id("");
|
||||
|
||||
setent_account_automatic(false);
|
||||
setlms_account_automatic(false);
|
||||
|
||||
//myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||
var divh = document.getElementById('myRef_add_session').offsetTop;
|
||||
window.scrollTo({
|
||||
|
@ -6274,9 +6277,8 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
setp_one_titre("");
|
||||
|
||||
|
||||
|
||||
|
||||
setent_account_automatic(false);
|
||||
setlms_account_automatic(false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -6800,7 +6802,17 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
form.append("attestation_certif", "");
|
||||
form.append("type_session", "0");
|
||||
if (ent_account_automatic) {
|
||||
form.append("ent_account_automatic", "1");
|
||||
} else {
|
||||
form.append("ent_account_automatic", "0");
|
||||
}
|
||||
|
||||
if (lms_account_automatic) {
|
||||
form.append("lms_account_automatic", "1");
|
||||
} else {
|
||||
form.append("lms_account_automatic", "0");
|
||||
}
|
||||
|
||||
/*
|
||||
Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenaire
|
||||
|
@ -7201,17 +7213,23 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
if (mylocaltraining.lms_class_code) {
|
||||
setis_lms_class_code(mylocaltraining.lms_class_code);
|
||||
} else {
|
||||
setis_lms_class_code("")
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (mylocaltraining.titre) {
|
||||
setp_detail_titre(mylocaltraining.titre);
|
||||
} else {
|
||||
setp_detail_titre("");
|
||||
}
|
||||
|
||||
|
||||
if (mylocaltraining.title) {
|
||||
setselected_class_title(mylocaltraining.title);
|
||||
} else {
|
||||
setselected_class_title("")
|
||||
}
|
||||
|
||||
|
||||
|
@ -7249,6 +7267,20 @@ const DisplayPartnerSession = (props) => {
|
|||
else if (String(mylocaltraining.session_status) === "false")
|
||||
setsessionStatus(false);
|
||||
|
||||
|
||||
if (mylocaltraining.lms_account_automatic && String(mylocaltraining.lms_account_automatic) === "1") {
|
||||
setlms_account_automatic(true);
|
||||
} else {
|
||||
setlms_account_automatic(false);
|
||||
}
|
||||
|
||||
if (mylocaltraining.ent_account_automatic && String(mylocaltraining.ent_account_automatic) === "1") {
|
||||
setent_account_automatic(true);
|
||||
} else {
|
||||
setent_account_automatic(false);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Update 22/10/2023 :
|
||||
Gestion des champs spécifiques. ils commencent tous par 'my_'
|
||||
|
@ -21826,6 +21858,53 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="separator">
|
||||
<nav className="separator_label">
|
||||
Configuration</nav>
|
||||
</div>
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%',
|
||||
paddingLeft: '10px', flexWrap: 'wrap'
|
||||
}}>
|
||||
<div className="session_caract"> Création automatique compte ENT <br />
|
||||
<Checkbox
|
||||
disabled={!edit_session_form}
|
||||
checked={ent_account_automatic}
|
||||
onChange={(event) => {
|
||||
setent_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Création automatique compte LMS <br />
|
||||
<Checkbox
|
||||
disabled={!edit_session_form}
|
||||
checked={lms_account_automatic}
|
||||
onChange={(event) => {
|
||||
setlms_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{/* -- début champs specifiques **/}
|
||||
|
||||
|
@ -21901,47 +21980,6 @@ const DisplayPartnerSession = (props) => {
|
|||
{/* -- end champs specifiques **/}
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="separator">
|
||||
<nav className="separator_label">
|
||||
Configuration</nav>
|
||||
</div>
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%',
|
||||
paddingLeft: '10px', flexWrap: 'wrap'
|
||||
}}>
|
||||
<div className="session_caract"> Création automatique compte ENT <br />
|
||||
<Checkbox
|
||||
disabled={!edit_session_form}
|
||||
checked={ent_account_automatic}
|
||||
onChange={(event) => {
|
||||
setent_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Création automatique compte LMS <br />
|
||||
<Checkbox
|
||||
disabled={!edit_session_form}
|
||||
checked={lms_account_automatic}
|
||||
onChange={(event) => {
|
||||
setlms_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
@ -22586,13 +22624,57 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="separator">
|
||||
<nav className="separator_label">
|
||||
Configuration</nav>
|
||||
</div>
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%',
|
||||
paddingLeft: '10px', flexWrap: 'wrap'
|
||||
}}>
|
||||
<div className="session_caract"> Création automatique compte ENT <br />
|
||||
<Checkbox
|
||||
checked={ent_account_automatic}
|
||||
onChange={(event) => {
|
||||
setent_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Création automatique compte LMS <br />
|
||||
<Checkbox
|
||||
checked={lms_account_automatic}
|
||||
onChange={(event) => {
|
||||
setlms_account_automatic(event.target.checked);
|
||||
}
|
||||
}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{/* -- début champs specifiques **/}
|
||||
|
||||
{rows_champs_specifics &&
|
||||
rows_champs_specifics.length > 0 && <div class="separator">
|
||||
<nav className="separator_label">
|
||||
Champs spécifiques </nav>
|
||||
Champs spécifiques b</nav>
|
||||
</div>}
|
||||
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
|
|
Loading…
Reference in New Issue