diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 7dad0ec..efaac85 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -82,6 +82,8 @@ import AccountTreeIcon from '@mui/icons-material/AccountTree'; import FormGroup from '@mui/material/FormGroup'; import Checkbox from '@mui/material/Checkbox'; +import ToggleSwitch_v2_mysy from "./ToggleSwitch_v2_mysy"; + import { GridToolbarContainer, GridToolbarExport, GridToolbarColumnsButton, @@ -200,6 +202,42 @@ const useStyles = makeStyles((theme) => ({ const DisplayPartnerSession = (props) => { + + const steps = [ + { key: "project", label: "En projet" }, + { key: "planned", label: "Planifié" }, + { key: "progress", label: "En cours" }, + { key: "done", label: "Terminé" }, + ]; + + function SessionSteps({ currentStep = "project" }) { + const currentIndex = New_Getall_Parter_OR_Default_Session_Steps_result.findIndex((step) => step.session_step_name === currentStep); + + return ( +
+ {New_Getall_Parter_OR_Default_Session_Steps_result && New_Getall_Parter_OR_Default_Session_Steps_result.length > 0 && +
+ {New_Getall_Parter_OR_Default_Session_Steps_result.map((step) => ( + + ))} +
} +
+ ); + } + registerLocale('fr', fr); const stored_cookie_session_display_view = getCookie('mysy_session_display_view'); const stored_cookie_session_data_row_grouped_by = getCookie('mysy_session_data_row_grouped_by'); @@ -3451,7 +3489,7 @@ const DisplayPartnerSession = (props) => { setkanban_colonne_width(tmp_val); } - // console.log(" 222 local_opport_chanel = ", local_opport_chanel); + // console.log(" 222 local_opport_chanel = ", local_opport_chanel); } else { setNew_Getall_Parter_Session_Steps_result([]); @@ -3591,7 +3629,7 @@ const DisplayPartnerSession = (props) => { setkanban_colonne_width(tmp_val); } - // console.log(" ### local_opport_chanel = ", local_opport_chanel); + // console.log(" ### local_opport_chanel = ", local_opport_chanel); } else { @@ -9862,20 +9900,15 @@ const DisplayPartnerSession = (props) => { value: '1', label: 'Actif', }, - { - value: '0', - label: 'Inactif', - }, - - { - value: '2', - label: 'Clôturer', - }, { value: '-1', label: 'Annulé', }, + { + value: '', + label: '', + }, ]; @@ -13837,6 +13870,8 @@ const DisplayPartnerSession = (props) => { { "id": "code_session", "label": "Code Session", "value": "code_session" }, { "id": "class_external_code", "label": "Ftion. Ref. Interne", "value": "class_external_code" }, { "id": "class_title", "label": "Titre Formation", "value": "class_title" }, + { "id": "client_name", "label": "Client (Nom / R.Sociale / Email / Tel)", "value": "client_name" }, + { "id": "session_etape", "label": "Session Etape", "value": "session_etape" }, { "id": "session_start_date", "label": "Date début session", "value": "session_start_date" }, { "id": "session_end_date", "label": "Date fin session", "value": "session_end_date" }, { "id": "archive", "label": "Archive", "value": "archive" }, @@ -15292,7 +15327,7 @@ const DisplayPartnerSession = (props) => { // console.log(" ### id = ", id, " ### local_step_name = ", local_step_name); - Update_Session_Formation_Only_Step(id, local_step_name); + Update_Session_Formation_Only_Step(id, local_step_name, "0"); } //eeeee */ @@ -15304,7 +15339,7 @@ const DisplayPartnerSession = (props) => { const [Update_Session_Formation_Only_Step_api, setUpdate_Session_Formation_Only_Step_api] = useState(); const [Update_Session_Formation_Only_Step_message, setUpdate_Session_Formation_Only_Step_message] = useState(); const [Update_Session_Formation_Only_Step_result, setUpdate_Session_Formation_Only_Step_result] = useState(); - function Update_Session_Formation_Only_Step(local_session_id, new_step) { + function Update_Session_Formation_Only_Step(local_session_id, new_step, from_line) { var form = new FormData(); //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); @@ -15343,11 +15378,19 @@ const DisplayPartnerSession = (props) => { } setLoading(false); } else { - Getall_TrainingSession(); - window.scrollTo({ - top: 0, - behavior: "smooth", - }); + + if (from_line === "1") { + Getall_TrainingSession(); + GetCurrentSession(selected_session_id, selected_internal_url); + } else { + + + Getall_TrainingSession(); + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + } } @@ -21555,7 +21598,7 @@ const DisplayPartnerSession = (props) => { - {String(p_filtre1) !== "archive" &&
+ {String(p_filtre1) !== "archive" && String(p_filtre1) !== "session_etape" &&
{p_filtre1 && {
} + {String(p_filtre1) === "session_etape" &&
+ {New_Option_Status && New_Option_Status.length > 0 && p_filtre1 && + (data).value === String(p_filtre1_value))[0].label} + sx={{ float: "right" }} + className="disabled_style" + + options={New_Option_Status} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre1_value(value.value); + } else { + setp_filtre1_value(""); + } + }} + renderInput={(params) => } + /> + + } + +
} + {p_filtre1 &&
@@ -21694,7 +21779,7 @@ const DisplayPartnerSession = (props) => {
- {String(p_filtre2).length > 2 && String(p_filtre2) !== "archive" && + {String(p_filtre2).length > 2 && String(p_filtre2) !== "archive" && String(p_filtre2) !== "session_etape" && { />} />} + {New_Option_Status && New_Option_Status.length > 0 && String(p_filtre2).length > 3 && String(p_filtre2) === "session_etape" && + (data).value === String(p_filtre2_value))[0].label} + sx={{ float: "right" }} + className="disabled_style" + + options={New_Option_Status} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre2_value(value.value); + } else { + setp_filtre2_value(""); + } + }} + renderInput={(params) => } + />} + +
@@ -22301,7 +22424,7 @@ const DisplayPartnerSession = (props) => { }} > - +
@@ -22315,7 +22438,7 @@ const DisplayPartnerSession = (props) => { > {String(index) === "0" &&
-
{channel.label} +
{channel.label}   ({tasks.filter(item => item.session_etape === channel.label).length})
@@ -22384,7 +22507,7 @@ const DisplayPartnerSession = (props) => { {String(index) !== "0" &&
-
{channel.label} +
{channel.label}   ({tasks.filter(item => item.session_etape === channel.label).length})
@@ -23886,6 +24009,20 @@ const DisplayPartnerSession = (props) => {
+
+ +   + +
+
+ +
+ +
+ +
+ +
@@ -31337,5 +31474,71 @@ width: 100%; margin-bottom: 10px; border: none; } + + + +.session-step-container { + width: 100%; + padding: 0px; + background: unset; + font-family: "DM Sans", Arial, Helvetica, sans-serif; + box-sizing: border-box; + padding-right: 10px; +} + +.session-step-title { + margin: 0 0 22px; + text-align: center; + color: #111111; + font-size: 24px; + font-weight: 500; +} + +.session-step-bar { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 4px; + width: 100%; +} + +.session-step-item { + height: 20px; + border: none; + border-radius: 26px; + background: #12323f; + color: #ffffff; + font-size: 12px; + font-weight: 400; + cursor: default; + transition: all 0.2s ease; + letter-spacing: 1px; +} + +.session-step-item.active { + background: #1bd900; + color: #ffffff; +} + +.session-step-item:hover { + filter: brightness(1.04); +} + +/* Responsive */ +@media (max-width: 700px) { + .session-step-bar { + grid-template-columns: 1fr 1fr; + } + + .session-step-title { + font-size: 20px; + } +} + +@media (max-width: 420px) { + .session-step-bar { + grid-template-columns: 1fr; + } +} +} `; diff --git a/src/components/Employes.js b/src/components/Employes.js index e3d5e5b..fbc8280 100644 --- a/src/components/Employes.js +++ b/src/components/Employes.js @@ -10667,7 +10667,7 @@ const Employes = (props) => { ))} columns={columns} - pageSize={10} + pageSize={15} className="datagridclass" onRowDoubleClick={(newSelectionModel) => { diff --git a/src/components/Partner_Commande.js b/src/components/Partner_Commande.js index 5da4f78..d4777ea 100644 --- a/src/components/Partner_Commande.js +++ b/src/components/Partner_Commande.js @@ -8033,11 +8033,11 @@ const Partner_Commande = (props) => {
-
+
  { ))} columns={columns} - pageSize={10} + pageSize={15} className="datagridclass" onRowDoubleClick={(newSelectionModel) => { @@ -8138,7 +8138,7 @@ const Partner_Commande = (props) => { } } - rowsPerPageOptions={[10]} + rowsPerPageOptions={[15]} //disableSelectionOnClick /* components={{ Toolbar: GridToolbar, @@ -9801,11 +9801,11 @@ const Partner_Commande = (props) => { } -
+
  { ))} columns={columns_order_lines} - pageSize={10} + pageSize={15} className="datagridclass" @@ -9901,7 +9901,7 @@ const Partner_Commande = (props) => { }} - rowsPerPageOptions={[10]} + rowsPerPageOptions={[15]} //disableSelectionOnClick components={{ Toolbar: GridToolbar, diff --git a/src/components/Partner_Config_Session_Steps.js b/src/components/Partner_Config_Session_Steps.js index 30e23a5..438d2e1 100644 --- a/src/components/Partner_Config_Session_Steps.js +++ b/src/components/Partner_Config_Session_Steps.js @@ -474,8 +474,12 @@ const Partner_Configuration_Session_Steps = (props) => { setdisplay_detail_config(); + setdisplay_alert_mysy("1"); + setalert_message(" Le document a été correctement supprimé."); + setalert_type("success"); + + - alert(" Le document a été correctement supprimé."); //myRef_head.current.scrollIntoView({ behavior: "smooth" }); if (document.getElementById('myRef_head')) { var divh = document.getElementById('myRef_head').offsetTop; @@ -510,6 +514,13 @@ const Partner_Configuration_Session_Steps = (props) => { const [selected_row_id_val, setselected_row_id_val] = React.useState(); function submenu_add_one_step() { + + setp_detail_config_point(""); + setp_detail_config_comment(""); + setp_detail_config_color(''); + setp_detail_config_valeur("") + + setdisplay_detail_config("0"); setconfig_data_edit_mode("1"); setadd_new_step('1'); @@ -519,35 +530,47 @@ const Partner_Configuration_Session_Steps = (props) => { function Annule_Order_DetailFields() { - var line = JSON.parse(rowss[selected_row_id_val]); - - setdisplay_detail_config("1"); - - var invoice_id = line._id; - setselected_id(invoice_id); - - var local_config_name = line.session_step_name; - setp_detail_config_point(local_config_name); - var local_config_value = line.session_step_sequence; - setp_detail_config_valeur(local_config_value); + if (display_detail_config === "1") { - var local_config_comment = line.session_step_comment; - setp_detail_config_comment(local_config_comment); + var line = JSON.parse(rowss[selected_row_id_val]); + + setdisplay_detail_config("1"); + + var invoice_id = line._id; + setselected_id(invoice_id); + + var local_config_name = line.session_step_name; + setp_detail_config_point(local_config_name); - setConfig_data_changed(); - setconfig_data_edit_mode(); + var local_config_value = line.session_step_sequence; + setp_detail_config_valeur(local_config_value); + + var local_config_comment = line.session_step_comment; + setp_detail_config_comment(local_config_comment); + + + setConfig_data_changed(); + setconfig_data_edit_mode(); + + Disable_Config_DetailFields(); + + if (document.getElementById('myRef')) { + var divh = document.getElementById('myRef').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + } else { + + setdisplay_detail_config(""); + setconfig_data_edit_mode(""); + setadd_new_step(''); - Disable_Config_DetailFields(); - if (document.getElementById('myRef')) { - var divh = document.getElementById('myRef').offsetTop; - window.scrollTo({ - top: divh, - behavior: "smooth", - }); } } @@ -632,7 +655,7 @@ const Partner_Configuration_Session_Steps = (props) => { inputBackground: 'grey', borderColor: 'darkgrey', borderRadius: '8px', - color: "#0a2a4d", + color: "#0a2a4d", width: '100px' }} name="detail_grp_color" @@ -693,7 +716,7 @@ const Partner_Configuration_Session_Steps = (props) => {

Votre configuration des étapes de session

-
+ {/*
Utilisez les filtres !
@@ -786,7 +809,7 @@ const Partner_Configuration_Session_Steps = (props) => {

-
+
*/}
@@ -978,7 +1001,7 @@ const Partner_Configuration_Session_Steps = (props) => {
} - {String(config_data_edit_mode) === "1" &&
Valeur de configuration
+ {String(config_data_edit_mode) === "1" &&
Numéro Séquence
{ InputLabelProps={{ shrink: true, }} + type="number" disabled={false} className="disabled_style" value={p_detail_config_valeur} @@ -999,13 +1023,13 @@ const Partner_Configuration_Session_Steps = (props) => { />
} - {String(config_data_edit_mode) !== "1" &&
Valeur de configuration
+ {String(config_data_edit_mode) !== "1" &&
Numéro Séquence
{
} -
Valeur de configuration
+
Numéro Séquence
{ {/*rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => ())*/}
-
+
  { ))} columns={columns} - pageSize={10} + pageSize={15} className="datagridclass" - rowsPerPageOptions={[10]} + rowsPerPageOptions={[15]} //disableSelectionOnClick /* components={{ Toolbar: GridToolbar, diff --git a/src/styles/components/_partner_configuration_technique.scss b/src/styles/components/_partner_configuration_technique.scss index 0b4d2a0..5a735d1 100644 --- a/src/styles/components/_partner_configuration_technique.scss +++ b/src/styles/components/_partner_configuration_technique.scss @@ -1655,7 +1655,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: pointer; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -2253,7 +2253,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: pointer; + cursor: default; font-style: italic; background-color: gray; font-weight: normal;