diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index c57daa7..c61fa0f 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -6448,10 +6448,10 @@ const DisplayPartnerSession = (props) => { const [p_filtre2_value, setp_filtre2_value] = useState(""); function clean_all_filters() { - setp_filtre1(); - setp_filtre1_value(); - setp_filtre2(); - setp_filtre2_value(); + setp_filtre1(""); + setp_filtre1_value(""); + setp_filtre2(""); + setp_filtre2_value(""); setgridline_id(''); setsequence_gridline_id(""); diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js index 2d69900..1101c06 100644 --- a/src/components/DisplayPartnerStagiaires.js +++ b/src/components/DisplayPartnerStagiaires.js @@ -63,17 +63,17 @@ const DisplayPartnerStagiaires = (props) => { const [selectionModel, setSelectionModel] = React.useState([]); - const [p_filtre1, setp_filtre1] = useState(); - const [p_filtre1_value, setp_filtre1_value] = useState(); + const [p_filtre1, setp_filtre1] = useState(""); + const [p_filtre1_value, setp_filtre1_value] = useState(""); - const [p_filtre2, setp_filtre2] = useState(); - const [p_filtre2_value, setp_filtre2_value] = useState(); + const [p_filtre2, setp_filtre2] = useState(""); + const [p_filtre2_value, setp_filtre2_value] = useState(""); - const [p_filtre3, setp_filtre3] = useState(); - const [p_filtre3_value, setp_filtre3_value] = useState(); + const [p_filtre3, setp_filtre3] = useState(""); + const [p_filtre3_value, setp_filtre3_value] = useState(""); - const [p_filtre4, setp_filtre4] = useState(); - const [p_filtre4_value, setp_filtre4_value] = useState(); + const [p_filtre4, setp_filtre4] = useState(""); + const [p_filtre4_value, setp_filtre4_value] = useState(""); const filters = [ { value: 'code_session', label: 'Code Session' }, @@ -678,17 +678,17 @@ const DisplayPartnerStagiaires = (props) => { function clean_all_filters() { - setp_filtre1(); - setp_filtre1_value(); + setp_filtre1(""); + setp_filtre1_value(""); - setp_filtre2(); - setp_filtre2_value(); + setp_filtre2(""); + setp_filtre2_value(""); - setp_filtre3(); - setp_filtre3_value(); + setp_filtre3(""); + setp_filtre3_value(""); - setp_filtre4(); - setp_filtre4_value(); + setp_filtre4(""); + setp_filtre4_value(""); setgridline_id(''); setselected_row_data_json_age(''); @@ -5370,6 +5370,16 @@ const DisplayPartnerStagiaires = (props) => { ] + const New_Option_Filter = [ + { "id": "email", "label": "Email ", "value": "email" }, + { "id": "nom", "label": "Nom ", "value": "nom" }, + { "id": "code_session", "label": "Code Session", "value": "code_session" }, + { "id": "class_title", "label": "Titre Formation", "value": "class_title" }, + { "id": "client_nom", "label": "Lié au Client (nom client) ", "value": "client_nom" }, + { "id": "", "label": "", "value": "" }, + { "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres. + ] + return (
@@ -6266,7 +6276,29 @@ const DisplayPartnerStagiaires = (props) => {
Utilisez les filtres !
- 0 && (data).value === String(p_filtre1))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre1(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + {/* { Lié au Client (nom client)   - + */}
@@ -6333,8 +6365,8 @@ const DisplayPartnerStagiaires = (props) => {   { - setp_filtre1(); - setp_filtre1_value(); + setp_filtre1(""); + setp_filtre1_value(""); }} /> @@ -6346,7 +6378,30 @@ const DisplayPartnerStagiaires = (props) => { {p_filtre2 &&
- 0 && (data).value === String(p_filtre2))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre2(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + + {/* { Lié au Client (nom client)   - + */}
{String(p_filtre2).length > 2 && @@ -6414,8 +6469,8 @@ const DisplayPartnerStagiaires = (props) => {   { - setp_filtre2(); - setp_filtre2_value(); + setp_filtre2(""); + setp_filtre2_value(""); }} /> @@ -6428,7 +6483,31 @@ const DisplayPartnerStagiaires = (props) => { {p_filtre3 &&
- 0 && (data).value === String(p_filtre3))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre3(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + + {/* { Lié au Client (nom client)   - + */}
{String(p_filtre3).length > 2 && @@ -6494,8 +6573,8 @@ const DisplayPartnerStagiaires = (props) => {   { - setp_filtre3(); - setp_filtre3_value(); + setp_filtre3(""); + setp_filtre3_value(""); }} />
} @@ -6505,7 +6584,32 @@ const DisplayPartnerStagiaires = (props) => { {p_filtre4 &&
- 0 && (data).value === String(p_filtre4))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre4(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + + + {/* { Lié au Client (nom client)   - + */}
{String(p_filtre4).length > 2 && @@ -6562,8 +6666,8 @@ const DisplayPartnerStagiaires = (props) => {   { - setp_filtre4(); - setp_filtre4_value(); + setp_filtre4(""); + setp_filtre4_value(""); }} /> diff --git a/src/components/DisplayPartnerTrainingsPagination.js b/src/components/DisplayPartnerTrainingsPagination.js index e55f196..eddadaa 100644 --- a/src/components/DisplayPartnerTrainingsPagination.js +++ b/src/components/DisplayPartnerTrainingsPagination.js @@ -342,7 +342,7 @@ const DistplayPartnerTraningsPage = (props) => { } - + function Display_Colunm_text({ value }) { return ( @@ -402,19 +402,21 @@ const DistplayPartnerTraningsPage = (props) => { { field: 'zone_diffusion', headerName: 'zone_diffusion', hide: true, maxWidth: 1, editable: false, }, { field: 'internal_url', headerName: 'internal_url', hide: true, editable: false, }, - { field: 'external_code', headerName: 'Code Formation', minWidth: 150, flex: 1, maxWidth: 250, editable: false, renderCell: (params) => , }, - { field: 'title', headerName: 'Titre', minWidth: 300, flex: 1, editable: false, renderCell: (params) => , }, - { field: 'domain', headerName: 'Domaine', minWidth: 50, flex: 1, maxWidth: 150, hideable: true, editable: false, renderCell: (params) => , }, - { field: 'metier', headerName: 'Métier', minWidth: 50, flex: 1, maxWidth: 150, hideable: true, hide: true, editable: false, renderCell: (params) => , }, - { field: 'nb_session_formation', headerName: 'Nb Session', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", renderCell: (params) => , }, + { field: 'external_code', headerName: 'Code Formation', minWidth: 150, flex: 1, maxWidth: 250, editable: false, renderCell: (params) => , }, + { field: 'title', headerName: 'Titre', minWidth: 300, flex: 1, editable: false, renderCell: (params) => , }, + { field: 'domain', headerName: 'Domaine', minWidth: 50, flex: 1, maxWidth: 150, hideable: true, editable: false, renderCell: (params) => , }, + { field: 'metier', headerName: 'Métier', minWidth: 50, flex: 1, maxWidth: 150, hideable: true, hide: true, editable: false, renderCell: (params) => , }, + { field: 'nb_session_formation', headerName: 'Nb Session', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", renderCell: (params) => , }, { field: 'url', headerName: 'lien', minWidth: 20, hideable: true, hide: true, editable: false, }, { field: 'description', headerName: 'Description', hide: true, resizable: true, minWidth: 250, maxWidth: 300, flex: 1, renderCell: (params) => , }, - { field: 'price', headerName: 'Prix', minWidth: 50, flex: 1, maxWidth: 100, align: "center", resizable: true, hide: ismobilephone_columns_hide, editable: false, - renderCell: (params) => , }, + { + field: 'price', headerName: 'Prix', minWidth: 50, flex: 1, maxWidth: 100, align: "center", resizable: true, hide: ismobilephone_columns_hide, editable: false, + renderCell: (params) => , + }, { field: 'published', headerName: 'Publié', minWidth: 50, flex: 1, maxWidth: 100, align: "center", resizable: true, editable: false, - + renderCell: (cellValues) => { return ( @@ -1237,23 +1239,23 @@ const DistplayPartnerTraningsPage = (props) => { }) } - const [p_filtre1, setp_filtre1] = useState(); - const [p_filtre1_value, setp_filtre1_value] = useState(); + const [p_filtre1, setp_filtre1] = useState(""); + const [p_filtre1_value, setp_filtre1_value] = useState(""); - const [p_filtre2, setp_filtre2] = useState(); - const [p_filtre2_value, setp_filtre2_value] = useState(); + const [p_filtre2, setp_filtre2] = useState(""); + const [p_filtre2_value, setp_filtre2_value] = useState(""); - const [p_filtre3, setp_filtre3] = useState(); - const [p_filtre3_value, setp_filtre3_value] = useState(); + const [p_filtre3, setp_filtre3] = useState(""); + const [p_filtre3_value, setp_filtre3_value] = useState(""); function clean_all_filters() { - setp_filtre1(); - setp_filtre1_value(); - setp_filtre2(); - setp_filtre2_value(); + setp_filtre1(""); + setp_filtre1_value(""); + setp_filtre2(""); + setp_filtre2_value(""); - setp_filtre3(); - setp_filtre3_value(); + setp_filtre3(""); + setp_filtre3_value(""); GetAllClass_new_no_filter(); } @@ -1288,11 +1290,11 @@ const DistplayPartnerTraningsPage = (props) => { color: "black", fontSize: 16 }, - + [`& .${gridClasses.cell}`]: { py: 1, }, - + }; @@ -1460,6 +1462,14 @@ const DistplayPartnerTraningsPage = (props) => { { "id": "4", "label": "Supprimer", "value": "supprimer" }, ] + const New_Option_Filter = [ + { "id": "external_code", "label": "Code externe formation", "value": "external_code" }, + { "id": "title", "label": "Titre Formation ", "value": "title" }, + { "id": "certif", "label": "Certifiée", "value": "certif" }, + { "id": "", "label": "", "value": "" }, + { "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres. + ] + return (
@@ -1633,7 +1643,28 @@ const DistplayPartnerTraningsPage = (props) => {
Utilisez les filtres !
- 0 && (data).value === String(p_filtre1))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre1(value.value); + + } + + }} + + renderInput={(params) => + } + />} + {/* { Titre Formation   Certifiée   - + */}
{p_filtre1 && @@ -1692,20 +1723,40 @@ const DistplayPartnerTraningsPage = (props) => {   { - setp_filtre1(); - setp_filtre1_value(); + setp_filtre1(""); + setp_filtre1_value(""); }} />
} -
{p_filtre2 &&
- 0 && (data).value === String(p_filtre2))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre2(value.value); + + } + + }} + + renderInput={(params) => + } + />} + {/* { Titre Formation   Certifiée   - + */}
{String(p_filtre2).length > 3 && @@ -1769,8 +1820,8 @@ const DistplayPartnerTraningsPage = (props) => {   { - setp_filtre2(); - setp_filtre2_value(); + setp_filtre2(""); + setp_filtre2_value(""); }} /> @@ -1783,7 +1834,30 @@ const DistplayPartnerTraningsPage = (props) => { {p_filtre3 &&
- 0 && (data).value === String(p_filtre3))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre3(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + {/* { Titre Formation   Certifiée   - + */}
{String(p_filtre3).length > 3 && @@ -1835,8 +1909,8 @@ const DistplayPartnerTraningsPage = (props) => {   { - setp_filtre3(); - setp_filtre3_value(); + setp_filtre3(""); + setp_filtre3_value(""); }} />
} @@ -1910,7 +1984,7 @@ const DistplayPartnerTraningsPage = (props) => { backgroundColor: '#FBF2EF', color: 'black', }, - [`& .${gridClasses.cell}`]: { + [`& .${gridClasses.cell}`]: { py: 1, }, @@ -2008,10 +2082,10 @@ const DistplayPartnerTraningsPage = (props) => { }} getEstimatedRowHeight={() => 200} getRowHeight={() => "auto"} - + sx={datagridSx} - - + + />
diff --git a/src/components/Partner_Commande.js b/src/components/Partner_Commande.js index 2d504ac..082935d 100644 --- a/src/components/Partner_Commande.js +++ b/src/components/Partner_Commande.js @@ -92,9 +92,9 @@ const Partner_Commande = (props) => { }, }, { field: 'order_header_client_id', headerName: 'Client_Id', width: 150, hide: true, editable: false }, - { field: 'order_header_client_nom', headerName: 'Nom Client', width: 150, flex: 1 }, + { field: 'order_header_client_nom', headerName: 'Nom Client', width: 150, flex: 1 }, { field: 'order_header_vendeur_id', headerName: 'Vendeur Id', width: 150, hide: true, editable: false }, - { field: 'order_header_vendeur_nom_prenom', headerName: 'Vendeur', width: 150, flex: 1, editable: false }, + { field: 'order_header_vendeur_nom_prenom', headerName: 'Vendeur', width: 150, flex: 1, editable: false }, { field: 'order_header_date_cmd', headerName: 'Date', width: 150, hide: false, editable: false }, { field: 'order_header_date_expiration', headerName: 'Date Expiration', width: 150, hide: false, editable: false }, @@ -1156,6 +1156,7 @@ const Partner_Commande = (props) => { var local_id = JSON.parse(x)._id; var local_nom = JSON.parse(x).nom; var local_raison_sociale = JSON.parse(x).raison_sociale; + var local_cond_paiement_id = JSON.parse(x).invoice_condition_paiement_id; //--- var node = { @@ -1164,6 +1165,7 @@ const Partner_Commande = (props) => { "label": local_nom, "nom": local_nom, "raison_sociale": local_raison_sociale, + "invoice_condition_paiement_id": local_cond_paiement_id, }; new_data2.push(node); @@ -1538,7 +1540,7 @@ const Partner_Commande = (props) => { const [p_detail_header_vendeur_nom_id, setp_detail_header_vendeur_nom_id] = useState(); const [p_detail_header_type, setp_detail_header_type] = useState(); - const [p_detail_header_statut, setp_detail_header_statut] = useState(); + const [p_detail_header_statut, setp_detail_header_statut] = useState(""); const [p_detail_header_vendeur_id, setp_detail_header_vendeur_id] = useState(); const [p_detail_header_client_id, setp_detail_header_client_id] = useState(); const [p_detail_header_statut_label, setp_detail_header_statut_label] = useState(); @@ -2421,6 +2423,7 @@ const Partner_Commande = (props) => { //setOpen(false); }; + const [client_selected_paiement_ction_id, setclient_selected_paiement_ction_id] = useState(""); const [p_add_cmd_header_client_id, setp_add_cmd_header_client_id] = useState(""); const [p_add_cmd_header_description, setp_add_cmd_header_description] = useState(""); @@ -2431,7 +2434,7 @@ const Partner_Commande = (props) => { const [p_add_cmd_header_date_cmd, setp_add_cmd_header_date_cmd] = useState(new Date().toLocaleDateString('fr-FR')); const [p_add_cmd_header_date_expiration_cmd, setp_add_cmd_header_date_expiration_cmd] = useState(date_today_90j.toLocaleDateString('fr-FR')); const [p_add_cmd_header_order_type, setp_add_cmd_header_order_type] = useState(""); - const [p_add_cmd_header_order_location_type, setp_add_cmd_header_order_location_type] = useState(""); + const [p_add_cmd_header_order_location_type, setp_add_cmd_header_order_location_type] = useState("1"); const [p_add_cmd_header_ref_client, setp_add_cmd_header_ref_client] = useState(""); const [p_add_cmd_header_condition_paiement_id, setp_add_cmd_header_condition_paiement_id] = useState(""); @@ -2444,7 +2447,7 @@ const Partner_Commande = (props) => { setp_add_cmd_header_date_cmd(new Date().toLocaleDateString('fr-FR')); setp_add_cmd_header_date_expiration_cmd(date_today_90j.toLocaleDateString('fr-FR')); setp_add_cmd_header_order_type(); - setp_add_cmd_header_order_location_type(); + setp_add_cmd_header_order_location_type("1"); setp_add_cmd_header_ref_client(); setp_add_cmd_header_condition_paiement_id(""); @@ -3139,6 +3142,22 @@ const Partner_Commande = (props) => { } + const New_Status_Filter = [ + { "id": "0", "label": "Brouillon ", "value": "0" }, + { "id": "1", "label": "En cours ", "value": "1" }, + { "id": "2", "label": "Traité", "value": "2" }, + { "id": "-1", "label": "Annulé", "value": "-1" }, + { "id": "", "label": "", "value": "" }, + { "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres. + ] + + + const New_Emplacement_Filter = [ + { "id": "inter", "label": "Inter ", "value": "inter" }, + { "id": "intra", "label": "Intra ", "value": "intra" }, + { "id": "", "label": "", "value": "" }, + { "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres. + ] return ( @@ -3592,6 +3611,8 @@ const Partner_Commande = (props) => { setp_add_cmd_header_client_id(value._id); Get_Givent_Partner_Client_Data(value._id); + setclient_selected_paiement_ction_id(value.invoice_condition_paiement_id); + setp_add_cmd_header_condition_paiement_id(value.invoice_condition_paiement_id); } @@ -3741,19 +3762,20 @@ const Partner_Commande = (props) => {
Conditions Paiement
+ {New_Getall_Partner_Paiement_Condition_result && New_Getall_Partner_Paiement_Condition_result.length > 0 && (data).label === String(p_add_cmd_header_condition_paiement))[0].label} + value={New_Getall_Partner_Paiement_Condition_result.filter((data) => (data)._id === String(client_selected_paiement_ction_id))[0].label} options={New_Getall_Partner_Paiement_Condition_result} onChange={(event, value) => { - + if (value && value._id) { setp_add_cmd_header_condition_paiement_id(value._id); - + } }} @@ -3783,7 +3805,31 @@ const Partner_Commande = (props) => {
Emplacement
- 0 && (data).value === String(p_add_cmd_header_order_location_type))[0].label} + options={New_Emplacement_Filter} + onChange={(event, value) => { + if (value && value.value) { + + setp_add_cmd_header_order_location_type(value.value); + } + + }} + + renderInput={(params) => + } + />} + + + {/* { Intra   Autre   - + */}
Commentaire
@@ -4363,7 +4409,33 @@ const Partner_Commande = (props) => { />
} {String(order_data_edit_mode) === "1" && String(p_detail_header_type) === "commande" &&
Statut
- 0 && (data).value === String(p_detail_header_statut))[0].label} + options={New_Status_Filter} + onChange={(event, value) => { + if (value && value.value) { + + setp_detail_header_statut(value.value); + setOrder_data_changed("1"); + } + + }} + + renderInput={(params) => + } + />} + + + {/* { Brouillon    En cours   Traité   - Annulé   - + */}
} {String(order_data_edit_mode) === "1" && String(p_detail_header_type) === "devis" &&
Statut
- 0 && (data).value === String(p_detail_header_statut))[0].label} + options={New_Status_Filter} + onChange={(event, value) => { + if (value && value.value) { + + setp_detail_header_statut(value.value); + setOrder_data_changed("1"); + + + } + + }} + + renderInput={(params) => + } + />} + + {/* { En cours   Fermé   Annulé   - + */}
} @@ -5178,7 +5276,7 @@ const Partner_Commande = (props) => { } {String(p_detail_header_statut_label).toLowerCase() === "en cours" && - String(p_detail_header_type).toLowerCase() === "commande" && + String(p_detail_header_type).toLowerCase() === "commande" && } diff --git a/src/styles/components/_partner_commande.scss b/src/styles/components/_partner_commande.scss index f6fab17..03a094f 100644 --- a/src/styles/components/_partner_commande.scss +++ b/src/styles/components/_partner_commande.scss @@ -272,6 +272,7 @@ background: #d5f38f; color: black; width: 100%; + height: 3rem !important; } @@ -851,6 +852,7 @@ background: #d5f38f; color: black; width: 100%; + height: 3rem !important; } @@ -1458,6 +1460,7 @@ background: #d5f38f; color: black; width: 100%; + height: 3rem !important; } .bton_import_excel { @@ -1981,6 +1984,8 @@ background: #d5f38f; color: black; width: 25% !important; + height: 3rem !important; + } .bton_import_excel {