diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 34e0cfa..a90dd2a 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -42,12 +42,23 @@ import 'reactjs-popup/dist/index.css'; import { BsEye, BsFileText } from "react-icons/bs"; import { AiOutlineEdit } from "react-icons/ai"; import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc"; +import DatePicker from "react-datepicker"; +import "react-datepicker/dist/react-datepicker.css"; +import ToggleSwitch from "./ToggleSwitch"; +import { format } from 'date-fns' +import moment from "moment"; const DisplayPartnerSession = (props) => { const history = useHistory(); const [submenu, setsubmenu] = useState(""); const [rowss, setRows] = useState([]); const [actionmass_preinsc_val, setactionmass_preinsc_val] = useState(); + const [one_SessionstartDateInscription, setone_SessionstartDateInscription] = useState(); + const [one_SessionendDateInscription, setone_SessionendDateInscription] = useState(); + const [one_SessionendDate, setone_SessionendDate] = useState(); + const [one_SessionstartDate, setone_SessionstartDate] = useState(); + const [one_urlpreview_certif, setone_urlpreview_certif] = useState(); + const [one_field_contenu_ftion, setone_field_contenu_ftion] = useState(""); const columns = [ { field: 'id', headerName: 'id', hide: true }, @@ -92,7 +103,7 @@ const DisplayPartnerSession = (props) => { - + + +
+ + +
+ + } +
+   +
+ + } + + + {String(Edite_session) === "1" &&
+ +
+ +
Choisir une formation *
+ + + {selected_internal_url} + + + +
+
Code Session
+ +
+ +
Session à la demande* (0 = Non, 1 = Oui)
+ + + +
+ +
+ Date Debut + { + setSessionstartDate(date); + setsessionChanged(true); + } + } + showTimeSelect={false} + filterTime={filterPassedTime_start} + dateFormat="dd/MM/yyyy" + className="disabled_style" + locale='fr-FR' + + /> +
+ + +
Date Fin + { + setSessionendDate(date); + setsessionChanged(true); + } + } + showTimeSelect={false} + filterTime={filterPassedTime_end} + dateFormat="dd/MM/yyyy" + className="disabled_style" + /> +
+ + +
Date Debut des inscriptions * + { + setSessionstartDateInscription(date); + setsessionChanged(true); + } + + } + showTimeSelect={false} + //filterTime={filterPassedTime_start} + dateFormat="dd/MM/yyyy" + className="disabled_style" + locale='fr-FR' + + /> +
+ + +
Date Fin des inscriptions * + { + setSessionendDateInscription(date); + setsessionChanged(true); + } + } + showTimeSelect={false} + //filterTime={filterPassedTime_end} + dateFormat="dd/MM/yyyy" + className="disabled_style" + /> +
+ + +
Présentiel *(0 = Non, 1 = Oui)
+ + + +
+ +
A distance*(0 = Non, 1 = Oui)
+ + + +
+ + {String(reduction_session) === "0" &&
+
Adresse
+ +
+
Code postal
+ +
+
Ville
+ +
+ +
Formateur
+ +
+ +
Code Formation LMS + (le code créé dans le LMS) + +
+ + +
Nombre participants *
+ +
+ +
Prix session
+ +
+ + + + + +
+ {!fields1desabled &&
Choisir un modèle d'attestation : + + + + +
} + {fields1desabled &&
Le modèle d'attestation : + + + +
} + +
Contenu de la formation (max 800 caractères)
+ (à afficher sur l'attestation) + {!fields1desabled &&
} + {!fields1desabled &&
} + + editorRef_contenu_ftion.current = editor} + initialValue={field_contenu_ftion} + onKeyUp={editor_contenu_ftion_keyup} + disabled={fields1desabled} + + init={{ + resize: false, + + height: 200, + menubar: false, + plugins: [ + 'advlist autolink lists link image charmap print preview anchor', + 'searchreplace visualblocks code fullscreen', + 'insertdatetime media table paste code help wordcount' + ], + toolbar: false, + content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:12px; }' + }} + /> +
+
+ + +
+   +
+ + + + + {
+ +
+ + {sessionChanged && selected_code_session && + } +
+ +
+ {!sessionChanged && selected_code_session && fields1desabled && + } + + {((sessionChanged && selected_code_session) || !fields1desabled) && + } + +
+ +
} + +
} + +
+   +
+ +
+ +
}
-
+
{ className="datagridclass" rowsPerPageOptions={[10]} - disableSelectionOnClick + //disableSelectionOnClick components={{ Toolbar: GridToolbar, }} @@ -1422,10 +3215,12 @@ const DisplayPartnerSession = (props) => {
 
-
  traitement de la session selected_code_session = {selected_code_session} et selected_internal_url = {selected_internal_url} + +
+ + +
- - {selected_code_session && selected_internal_url &&
- -
-
- Afficher les preinscrit et les inscrits -
{String(submenu) === String("preinscrit") &&
diff --git a/src/components/GestionAdministrative.js b/src/components/GestionAdministrative.js index 1681dd8..1fcfe30 100644 --- a/src/components/GestionAdministrative.js +++ b/src/components/GestionAdministrative.js @@ -1747,7 +1747,7 @@ function GestionAdministrative(props) { const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); form.append("class_internal_url", internal_url); - form.append("formation_session_id", localsession_id); + form.append("code_session", localsession_id); var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetSessionFormation/"; diff --git a/src/styles/components/_addclassmanual.scss b/src/styles/components/_addclassmanual.scss index 90ade7c..2fb18aa 100644 --- a/src/styles/components/_addclassmanual.scss +++ b/src/styles/components/_addclassmanual.scss @@ -1593,6 +1593,3 @@ line-height: 1.2rem !important; } -.css-6hp17o-MuiList-root-MuiMenu-list{ - width: 50%; -} \ No newline at end of file diff --git a/src/styles/components/_addpartnerclient.scss b/src/styles/components/_addpartnerclient.scss index febcf27..8967608 100644 --- a/src/styles/components/_addpartnerclient.scss +++ b/src/styles/components/_addpartnerclient.scss @@ -630,7 +630,7 @@ margin: 5px !important; margin-bottom: 1rem !important; } - + .bton_suppr { background: transparent; color: red; diff --git a/src/styles/components/_displaypartnersession.scss b/src/styles/components/_displaypartnersession.scss index 48ed70c..d0441b0 100644 --- a/src/styles/components/_displaypartnersession.scss +++ b/src/styles/components/_displaypartnersession.scss @@ -27,7 +27,7 @@ animation-duration: 10ms; height: 3rem !important; padding: 0 !important; - } + } @media screen and (max-width: 600px) { .okUpdateData { @@ -313,6 +313,56 @@ } + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 100%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + } @media only screen and (min-width: 601px) and (max-width: 991px) { @@ -587,6 +637,57 @@ .icon_excel { width: 6%; } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 80%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + } @media only screen and (min-width: 992px) and (max-width: 1199px) { @@ -863,6 +964,56 @@ width: 6%; } + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 65%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: right; + height: 2.5rem; + width: 65%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 65%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 65%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + } @media only screen and (min-width: 1200px) { @@ -1223,6 +1374,55 @@ .css-qiwgdb { padding: 6px !important; } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 40%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: black; + margin-left: 10px; + margin-right: 10px; + } } option { @@ -1250,8 +1450,15 @@ top: -13px; } + .MuiMenu-paper { + max-width: 30% !important; + } + } +.MuiMenu-paper { + max-width: 30% !important; +} .tox-statusbar { display: none !important; @@ -1314,7 +1521,6 @@ - .react-datepicker__input-container { width: 110%; } \ No newline at end of file diff --git a/src/styles/components/_global_mysy_css.scss b/src/styles/components/_global_mysy_css.scss new file mode 100644 index 0000000..70eb3c0 --- /dev/null +++ b/src/styles/components/_global_mysy_css.scss @@ -0,0 +1,17 @@ + + +.css-14lo706 { + padding-right: 0.5rem !important; +} + +.css-1jy569b-MuiFormLabel-root-MuiInputLabel-root { + margin-left: 0px !important; +} + +.css-1knaqv7-MuiButtonBase-root-MuiButton-root { + min-width: 10rem !important +} + +.Mui-selected{ + background-color:#ccccff !important; +} \ No newline at end of file diff --git a/src/styles/index.scss b/src/styles/index.scss index ee6668a..94b5784 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -72,17 +72,5 @@ @import "./components/displaypartnersession"; @import "./components/partner_client_securite_data"; +@import "./components/global_mysy_css"; - - -.css-14lo706 { - padding-right: 0.5rem !important; -} - -.css-1jy569b-MuiFormLabel-root-MuiInputLabel-root { - margin-left: 0px !important; -} - -.css-1knaqv7-MuiButtonBase-root-MuiButton-root { - min-width: 10rem !important -} \ No newline at end of file