+
+
+
+
+ {
+ setselectionModel_sequence_new_planification(newSelectionModel);
+
+ }}
+ selectionModel={selectionModel_sequence_new_planification}
+
+ localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
+ rows={new_planification_lines.map((item, index) => (
+ {
+ id: index,
+ _id: (item)._id,
+ sequence_start: format((item).start, 'dd/MM/yyyy HH:mm'),
+ sequence_end: format((item).end, 'dd/MM/yyyy HH:mm'),
+ session_id: (item).id,
+ sequence_title: (item).title,
+ agenda: (item).local_agenda,
+ objectif: (item).local_objectif,
+ commentaire: (item).local_comment,
+
+ grp_apprenant_id: (item).grp_apprenant_id,
+ ue_id: (item).local_ue_id,
+ unite_enseignement_planif_id: (item).local_ue_planif_line_id,
+ type: (item).local_type,
+
+ grp_apprenant_code: (item).grp_apprenant_code,
+
+
+
+ }
+ ))}
+
+ columns={columns_sequence_new_planification}
+ pageSize={10}
+ className="datagridclass"
+
+ onRowDoubleClick={(newSelectionModel) => {
+ /*
+ setsequence_gridline_id(newSelectionModel.row.id);
+ setselected_detail_sequence_title(newSelectionModel.row.sequence_title);
+ setselected_sequence_startDate(newSelectionModel.row.sequence_start);
+ setselected_sequence_endDate(newSelectionModel.row.sequence_end);
+
+ setp_detail_sequence_agenda(newSelectionModel.row.agenda);
+ setp_detail_sequence_objectif(newSelectionModel.row.objectif);
+ setp_detail_sequence_comment(newSelectionModel.row.commentaire);
+
+
+ Getall_List_Sequence_Ressource(newSelectionModel.row._id);
+
+ setselected_sequence_id(newSelectionModel.row._id);
+ setdisplay_detail_sequence("1");
+
+ if (document.getElementById('myRef_seq_ressource')) {
+ var divh = document.getElementById('myRef_seq_ressource').offsetTop;
+ window.scrollTo({
+ top: divh,
+ behavior: "smooth",
+ });
+ }
+
+ */ }}
+
+
+
+ rowsPerPageOptions={[10]}
+ //disableSelectionOnClick
+ components={{
+ Toolbar: GridToolbar,
+ }}
+ //sx={datagridSx}
+ getCellClassName={(params) => {
+ //field === 'distantiel'
+ if (params.field === 'distantiel' && String(params.value) === "1") {
+ return 'cell--distantiel';
+ }
+ if (params.field === "presentiel" && String(params.value) == "1") {
+ return 'cell--presentiel';
+ }
+
+
+ //field === "etape"
+ if (params.field === "etape" && String(params.value) == "0") {
+ return 'cell--etape--projet';
+ }
+
+ if (params.field === "etape" && String(params.value) == "1") {
+ return 'cell--etape--planification';
+ }
+
+ if (params.field === "etape" && String(params.value) == "2") {
+ return 'cell--etape--planifie';
+ }
+
+ if (params.field === "etape" && String(params.value) == "3") {
+ return 'cell--etape--termine';
+ }
+
+ if (params.field === "etape" && String(params.value) == "4") {
+ return 'cell--etape--facture';
+ }
+
+ if (params.field === "etape" && String(params.value) == "-1") {
+ return 'cell--etape--annule';
+ }
+
+ }}
+ getRowClassName={(params) => {
+
+ // Pour la gestion de la couleur de zone double cliquée
+ if (String(params.row.id) === String(sequence_gridline_id)) {
+ return 'line--statut--selected';
+ }
+
+
+
+ }}
+
+ />
+
+
+
+
+
+
+
+
}
+
+
+
+ {display_view && String(display_view) === "planning" &&
+
+
Affichage planning
+
+
+
+
+ }
+ //plugins={[timeGridPlugin]}
+ plugins={[timeGridPlugin, daygridPlugin, interactionPlugin]}
+ views={["dayGridMonth", "dayGridWeek", "dayGridDay"]}
+ slotMinTime={Partner_Debut_Journee}
+ slotMaxTime={Partner_Fin_Journee}
+ scrollTime='08:00'
+ displayEventEnd={true}
+ eventContent={renderEventContent}
+ eventClick={handleEventClick}
+
+
+ />
+
+
+
+
+
+
+
+
+
+
+
+