24/02/23 - 2323
parent
99474812e8
commit
ffe6a057cc
|
@ -288,8 +288,8 @@ const Formation = (props) => {
|
|||
<div className="div_row">
|
||||
|
||||
<div className="div_row_gauche" style={{ "marginTop": "5px" }}>
|
||||
{ props.formation.note && String(props.formation.note).length === 1 &&
|
||||
parseInt(String(props.formation.note)) <=5 &&
|
||||
{props.formation.note && String(props.formation.note).length === 1 &&
|
||||
parseInt(String(props.formation.note)) <= 5 &&
|
||||
|
||||
<Rating name="half-rating-read" defaultValue={props.formation.note} precision={0.5} readOnly />
|
||||
}
|
||||
|
@ -340,11 +340,26 @@ const Formation = (props) => {
|
|||
</div>
|
||||
}
|
||||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") &&
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && !props.formation.business_prices &&
|
||||
<div className="training_price">{props.formation.price} € HT
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && props.formation.business_prices &&
|
||||
<div className="training_price">
|
||||
<nav className="discounted_price">{String(props.formation.business_prices[0].discounted_price)} € HT</nav>
|
||||
<nav className="training_price_barre">
|
||||
{props.formation.price} € HT
|
||||
</nav>
|
||||
|
||||
<nav className="discount_block"> (- {String(props.formation.business_prices[0].discount)} % )
|
||||
</nav>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -145,6 +145,7 @@ function Pricing() {
|
|||
|
||||
const [isaddprice, setisaddprice] = useState();
|
||||
function handleAddPriceClick() {
|
||||
Clean_notification();
|
||||
setisaddprice("1");
|
||||
setiseditclientprice();
|
||||
Desable_new_prices_fields();
|
||||
|
@ -488,13 +489,14 @@ function Pricing() {
|
|||
const [Update_Price_result, setUpdate_Price_result] = useState("");
|
||||
const [Update_Price_message, setUpdate_Price_message] = useState("");
|
||||
|
||||
function Clean_notification(){
|
||||
function Clean_notification() {
|
||||
setRecord_new_Price_api("");
|
||||
setRecord_new_Price_result("");
|
||||
setRecord_new_Price_message("");
|
||||
setDelete_Price_api("");
|
||||
setUpdate_Price_api("");
|
||||
|
||||
|
||||
}
|
||||
|
||||
function Update_Price() {
|
||||
|
@ -749,14 +751,22 @@ function Pricing() {
|
|||
}
|
||||
|
||||
|
||||
function update_Price() {
|
||||
|
||||
}
|
||||
|
||||
function DataUpdated_exist_price() {
|
||||
|
||||
}
|
||||
|
||||
function cancel_update_price(){
|
||||
|
||||
setiseditclientprice();
|
||||
setisaddprice();
|
||||
Clean_notification();
|
||||
|
||||
GetAPrice_Data(currentlineprice_id);
|
||||
setiseditprice(false);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="pricing">
|
||||
|
||||
|
@ -775,6 +785,7 @@ function Pricing() {
|
|||
<div className="koUpdateData"> {Delete_Price_message}</div>}
|
||||
|
||||
{String(iseditclientprice) === "1" && <div>
|
||||
Modification du prix
|
||||
<Box alignItems="left" sx={{ '& > :not(style)': { m: 1 }, width: '100%', }} onChange={DataUpdated_exist_price}>
|
||||
|
||||
<TextField
|
||||
|
@ -811,8 +822,9 @@ function Pricing() {
|
|||
}}
|
||||
variant="standard"
|
||||
/>
|
||||
<div className="texte_area">
|
||||
Date Debut
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
<nav className="my_label"> Date Debut </nav>
|
||||
<DatePicker
|
||||
name="sessiondatedebut"
|
||||
id="sessiondatedebut"
|
||||
|
@ -831,7 +843,9 @@ function Pricing() {
|
|||
|
||||
/>
|
||||
</div>
|
||||
<div className="texte_area"> Date Fin
|
||||
|
||||
<div className="div_row_droite div_row_droite_adapt_date">
|
||||
<nav className="my_label"> Date Fin </nav>
|
||||
<DatePicker
|
||||
name="sessiondatefin"
|
||||
id="sessiondatefin"
|
||||
|
@ -849,29 +863,36 @@ function Pricing() {
|
|||
className="texte_area"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</Box>
|
||||
|
||||
<div className="div_row">
|
||||
</div>
|
||||
|
||||
<div className="div_row">
|
||||
|
||||
<div className="div_row_gauche">
|
||||
|
||||
{iseditprice && <Button variant="contained" className="bton_envoyer" onClick={Update_Price}>Mettre à jour le prix
|
||||
{iseditprice && <Button variant="contained" className="btn_enreg" onClick={Update_Price}>Mettre à jour le prix
|
||||
</Button>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row_droite">
|
||||
<div className="div_row_droite div_row_droite_adapt_date">
|
||||
|
||||
{!iseditprice && <Button variant="contained" className="bton_fermer" onClick={EditPrice}>Editer
|
||||
{!iseditprice && <Button variant="contained" className="btn_editer" onClick={EditPrice}>Editer
|
||||
</Button>}
|
||||
|
||||
{iseditprice && <Button variant="contained" className="bton_envoyer" onClick={"cancel_update"}>Annuler les modifications
|
||||
{iseditprice && <Button variant="contained" className="btn_editer" onClick={cancel_update_price}>Annuler les modifications
|
||||
</Button>}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row">
|
||||
<hr />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
@ -883,14 +904,19 @@ function Pricing() {
|
|||
<div className="koUpdateData"> {Record_new_Price_message}</div>}
|
||||
|
||||
{String(isaddprice) === "1" && <div>
|
||||
Creation d'un nouveau prix client
|
||||
<Box alignItems="left" sx={{ '& > :not(style)': { m: 1 }, width: '100%', }} onChange={DataUpdated}>
|
||||
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
<nav className="my_label"> Client </nav>
|
||||
{GetClient_Linked_result && <div className="field_droite">
|
||||
<select id="selected_client"
|
||||
name="selected_client"
|
||||
value={selectedlinked_client} onChange={changeselectedclient}
|
||||
className="texte_area"
|
||||
|
||||
style={{
|
||||
"width": "48%", "height": "3rem"
|
||||
"width": "90%", "height": "3rem"
|
||||
|
||||
}}>
|
||||
<option value=""> Choisir </option>
|
||||
|
@ -899,16 +925,17 @@ function Pricing() {
|
|||
))}
|
||||
</select>
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
<div className="div_row_droite div_row_droite_adapt_date">
|
||||
|
||||
<TextField
|
||||
label="Reduction (%)"
|
||||
name="new_discount"
|
||||
id="new_discount"
|
||||
className="texte_area"
|
||||
|
||||
value={new_discount_val}
|
||||
onChange={Change_new_discount_val}
|
||||
sx={{ m: 1, width: '48%' }}
|
||||
sx={{ m: 1, width: '90%' }}
|
||||
InputProps={{
|
||||
startAdornment: (
|
||||
<InputAdornment position="start">
|
||||
|
@ -917,12 +944,16 @@ function Pricing() {
|
|||
),
|
||||
}}
|
||||
variant="standard"
|
||||
style={{"marginLeft":"0px"}}
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
<nav className="my_label"> Date Debut </nav>
|
||||
|
||||
<div className="texte_area">
|
||||
Date Debut
|
||||
<DatePicker
|
||||
name="new_sessiondatedebut"
|
||||
id="new_sessiondatedebut"
|
||||
|
@ -941,7 +972,9 @@ function Pricing() {
|
|||
|
||||
/>
|
||||
</div>
|
||||
<div className="texte_area"> Date Fin
|
||||
<div className="div_row_droite div_row_droite_adapt_date">
|
||||
|
||||
<nav className="my_label"> Date Fin </nav>
|
||||
<DatePicker
|
||||
name="new_sessiondatefin"
|
||||
id="new_sessiondatefin"
|
||||
|
@ -958,37 +991,42 @@ function Pricing() {
|
|||
className="texte_area"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</Box>
|
||||
|
||||
<div className="div_row">
|
||||
</div>
|
||||
<div className="div_row">
|
||||
|
||||
<div className="div_row_gauche">
|
||||
|
||||
<Button variant="contained" className="bton_envoyer" onClick={Record_new_Price}>Enregistrer le prix
|
||||
<Button variant="contained" className="btn_enreg" onClick={Record_new_Price}>Enregistrer le prix
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="div_row_droite">
|
||||
|
||||
<Button variant="contained" className="bton_fermer" onClick={Close_Price_windows}>Fermer
|
||||
<Button variant="contained" className="btn_editer" onClick={Close_Price_windows}>Fermer
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row">
|
||||
<hr />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
<div className="div_row">
|
||||
<Button className="buton_add_price" onClick={handleAddPriceClick}> Ajouter un nouveau prix <AiOutlinePlusCircle /> </Button>
|
||||
<hr />
|
||||
<div className="div_row" style={{ "marginBottom": "0px", "marginTop": "1rem" }}>
|
||||
<Button className="buton_add_price" onClick={handleAddPriceClick}
|
||||
> Ajouter un nouveau prix <AiOutlinePlusCircle /> </Button>
|
||||
</div>
|
||||
|
||||
|
||||
<h3> Mes prix client </h3>
|
||||
Mes prix client
|
||||
{String(menu) === String("default") && GetClienPrices_result && GetClienPrices_result.length > 0 && <div>
|
||||
<div className="titre1">
|
||||
Les prix que vous accordez à vos clients
|
||||
|
|
|
@ -1375,6 +1375,7 @@ const Recherche_new_v2 = () => {
|
|||
}
|
||||
else {
|
||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/recherche_text_simple/";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1384,7 +1385,7 @@ const Recherche_new_v2 = () => {
|
|||
axios.post(myurl, form).then(res => {
|
||||
if (String(res.data.status) != String("false")) {
|
||||
//console.log(" In test res.data.status = " + res.data.status);
|
||||
//console.log(" In test res.data.message = " + res.data.message);
|
||||
console.log(" In test res.data.message = " + res.data.message);
|
||||
setmyApiResponse("True");
|
||||
setResult(res.data.message)
|
||||
|
||||
|
@ -1443,13 +1444,14 @@ const Recherche_new_v2 = () => {
|
|||
if (typeof (NewSearchText) === "undefined" || String(NewSearchText) === '') {
|
||||
crit_SearchText = "";
|
||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/get_all_class/";
|
||||
|
||||
|
||||
} else {
|
||||
clearsearchtext();
|
||||
crit_SearchText = NewSearchText;
|
||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/recherche_text_simple/";
|
||||
}
|
||||
|
||||
//alert(" crit_SearchText = " + crit_SearchText+" myurl = "+myurl);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1496,7 +1498,8 @@ const Recherche_new_v2 = () => {
|
|||
axios.post(myurl, form).then(res => {
|
||||
if (String(res.data.status) != String("false")) {
|
||||
//console.log(" In test res.data.status = " + res.data.status);
|
||||
//console.log(" In DisplayXfirstClas res.data.message = " + res.data.message);
|
||||
console.log(" In DisplayXfirstClas res.data.message = " + res.data.message);
|
||||
|
||||
setmyApiResponse("True");
|
||||
setResult(res.data.message)
|
||||
// textInput.current.focus();
|
||||
|
|
|
@ -1361,6 +1361,59 @@
|
|||
|
||||
}
|
||||
|
||||
.aaatraining_price_barre {
|
||||
color: #619e31;
|
||||
font-size: 1rem;
|
||||
font-family: "Quicksand", "Signika", sans-serif;
|
||||
text-align: left;
|
||||
letter-spacing: 1px;
|
||||
margin-bottom: 0.6rem !important;
|
||||
font-family: 'Albert Sans';
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
font-size: 18px;
|
||||
line-height: 22px;
|
||||
|
||||
|
||||
font-family: 'Albert Sans';
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
font-size: 18px;
|
||||
line-height: 22px;
|
||||
/* identical to box height */
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-feature-settings: 'liga' off;
|
||||
|
||||
/* Deep Blue */
|
||||
|
||||
color: #0A043C;
|
||||
|
||||
|
||||
/* Inside auto layout */
|
||||
|
||||
flex: none;
|
||||
order: 2;
|
||||
flex-grow: 0;
|
||||
text-decoration: line-through;
|
||||
|
||||
}
|
||||
|
||||
.discounted_price {
|
||||
font-weight: 600;
|
||||
font-size: 20px;
|
||||
color: #ff8c00;
|
||||
}
|
||||
|
||||
.training_price_barre {
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
color: #647585;
|
||||
text-decoration: line-through;
|
||||
margin-left: 2rem;
|
||||
}
|
||||
|
||||
.bton_inscris {
|
||||
position: relative;
|
||||
background: red;
|
||||
|
@ -1524,5 +1577,13 @@
|
|||
.row_formation_crit {
|
||||
min-height: 10rem !important;
|
||||
}
|
||||
|
||||
.discount_block{
|
||||
font-weight: 400;
|
||||
margin-left: 1rem;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
|
||||
// end media
|
||||
}
|
|
@ -5,6 +5,7 @@
|
|||
color: red;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.okUpdateData {
|
||||
font-size: small;
|
||||
color: green;
|
||||
|
@ -47,6 +48,7 @@
|
|||
color: red;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.okUpdateData {
|
||||
font-size: small;
|
||||
color: green;
|
||||
|
@ -86,6 +88,7 @@
|
|||
color: red;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.okUpdateData {
|
||||
font-size: small;
|
||||
color: green;
|
||||
|
@ -126,6 +129,7 @@
|
|||
color: red;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.okUpdateData {
|
||||
font-size: small;
|
||||
color: green;
|
||||
|
@ -137,7 +141,8 @@
|
|||
//border:0px solid black;
|
||||
border-width: 0.01rem;
|
||||
width: 100%;
|
||||
margin-bottom: 1rem;
|
||||
margin-bottom: 0px !important;
|
||||
margin-top: 0px !important;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
|
@ -157,20 +162,48 @@
|
|||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.buton_add_price{
|
||||
border-radius: 5px;
|
||||
font-size: small;
|
||||
.buton_add_price {
|
||||
border-radius: 10rem;
|
||||
padding: 0.3rem;
|
||||
width: 20%;
|
||||
background: #81BC3A;
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
border: none;
|
||||
|
||||
}
|
||||
|
||||
.texte_area{
|
||||
.texte_area {
|
||||
width: 48% !important;
|
||||
}
|
||||
|
||||
.btn_editer {
|
||||
width: 15rem;
|
||||
background-color: #212121 !important;
|
||||
color: white;
|
||||
border-radius: 10rem;
|
||||
}
|
||||
|
||||
.btn_enreg {
|
||||
width: 15rem;
|
||||
background-color: green !important;
|
||||
color: white;
|
||||
border-radius: 10rem;
|
||||
}
|
||||
|
||||
.my_label {
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: small;
|
||||
line-height: 1.4375em;
|
||||
letter-spacing: 0.00938em;
|
||||
}
|
||||
|
||||
.div_row_droite_adapt_date{
|
||||
padding-left: 1rem;
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue