24/02/23 - 2323

recette2
cherif 2023-02-24 23:23:15 +01:00
parent 99474812e8
commit ffe6a057cc
5 changed files with 454 additions and 304 deletions

View File

@ -288,11 +288,11 @@ 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 />
}
<Rating name="half-rating-read" defaultValue={props.formation.note} precision={0.5} readOnly />
}
</div>
<div className="div_row_droite div_row_droite_cpf">
<div className="block_cpf">
@ -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&nbsp;
</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&nbsp;
</nav>
<nav className="discount_block"> (- {String(props.formation.business_prices[0].discount)} % )
</nav>
</div>
}
</div>
@ -386,7 +401,7 @@ const Formation = (props) => {
{props.formation.duration} jr(s) &nbsp;
</div>}
{String(props.formation.duration_unit) === "mois" &&
{String(props.formation.duration_unit) === "mois" &&
<div className="criteres ftion_tab_droite">
{props.formation.duration} mois(s)
</div>}

View File

@ -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,67 +822,77 @@ function Pricing() {
}}
variant="standard"
/>
<div className="texte_area">
Date Debut
<DatePicker
name="sessiondatedebut"
id="sessiondatedebut"
selected={SessionstartDate}
onChange={(date) => {
var date_du = new Date(moment(date, "DD/MM/YYYY")).setHours(8, 0, 0);
setSessionstartDate(date_du);
setsessionChanged(true);
}
}
showTimeSelect={false}
filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="texte_area"
locale='fr-FR'
<div className="div_row">
<div className="div_row_gauche">
<nav className="my_label"> Date Debut </nav>
<DatePicker
name="sessiondatedebut"
id="sessiondatedebut"
selected={SessionstartDate}
onChange={(date) => {
var date_du = new Date(moment(date, "DD/MM/YYYY")).setHours(8, 0, 0);
setSessionstartDate(date_du);
setsessionChanged(true);
}
}
showTimeSelect={false}
filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="texte_area"
locale='fr-FR'
/>
/>
</div>
<div className="div_row_droite div_row_droite_adapt_date">
<nav className="my_label"> Date Fin </nav>
<DatePicker
name="sessiondatefin"
id="sessiondatefin"
selected={SessionendDate}
onChange={(date) => {
var date_au = new Date(moment(date, "DD/MM/YYYY")).setHours(8, 0, 0);
setSessionendDate(date_au);
setsessionChanged(true);
}
}
showTimeSelect={false}
filterTime={filterPassedTime_end}
dateFormat="dd/MM/yyyy"
className="texte_area"
/>
</div>
</div>
<div className="texte_area"> Date Fin
<DatePicker
name="sessiondatefin"
id="sessiondatefin"
selected={SessionendDate}
onChange={(date) => {
var date_au = new Date(moment(date, "DD/MM/YYYY")).setHours(8, 0, 0);
setSessionendDate(date_au);
setsessionChanged(true);
}
}
showTimeSelect={false}
filterTime={filterPassedTime_end}
dateFormat="dd/MM/yyyy"
className="texte_area"
/>
</div>
</Box>
<div className="div_row">&nbsp;
</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,112 +904,129 @@ 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}>
{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"
}}>
<option value=""> Choisir </option>
{GetClient_Linked_result.map((option) => (
<option value={JSON.parse(option).recid}>{JSON.parse(option).nom}</option>
))}
</select>
</div>}
<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}
style={{
"width": "90%", "height": "3rem"
<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%' }}
InputProps={{
startAdornment: (
<InputAdornment position="start">
<AccountCircle />
</InputAdornment>
),
}}
variant="standard"
/>
}}>
<option value=""> Choisir </option>
{GetClient_Linked_result.map((option) => (
<option value={JSON.parse(option).recid}>{JSON.parse(option).nom}</option>
))}
</select>
</div>}
</div>
<div className="div_row_droite div_row_droite_adapt_date">
<TextField
label="Reduction (%)"
name="new_discount"
id="new_discount"
value={new_discount_val}
onChange={Change_new_discount_val}
sx={{ m: 1, width: '90%' }}
InputProps={{
startAdornment: (
<InputAdornment position="start">
<AccountCircle />
</InputAdornment>
),
}}
variant="standard"
style={{"marginLeft":"0px"}}
/>
<div className="texte_area">
Date Debut
<DatePicker
name="new_sessiondatedebut"
id="new_sessiondatedebut"
selected={New_SessionstartDate}
onChange={(date) => {
var date_du = new Date(moment(date, "DD/MM/YYYY")).setHours(8, 0, 0);
setNew_SessionstartDate(date_du);
setsessionChanged(true);
}
}
showTimeSelect={false}
filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="texte_area"
locale='fr-FR'
/>
</div>
<div className="texte_area"> Date Fin
<DatePicker
name="new_sessiondatefin"
id="new_sessiondatefin"
selected={New_SessionendDate}
onChange={(date) => {
var date_au = new Date(moment(date, "DD/MM/YYYY")).setHours(8, 0, 0);
setNew_SessionendDate(date_au);
setsessionChanged(true);
}
}
showTimeSelect={false}
filterTime={filterPassedTime_end}
dateFormat="dd/MM/yyyy"
className="texte_area"
/>
</div>
</div>
<div className="div_row">
<div className="div_row_gauche">
<nav className="my_label"> Date Debut </nav>
<DatePicker
name="new_sessiondatedebut"
id="new_sessiondatedebut"
selected={New_SessionstartDate}
onChange={(date) => {
var date_du = new Date(moment(date, "DD/MM/YYYY")).setHours(8, 0, 0);
setNew_SessionstartDate(date_du);
setsessionChanged(true);
}
}
showTimeSelect={false}
filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="texte_area"
locale='fr-FR'
/>
</div>
<div className="div_row_droite div_row_droite_adapt_date">
<nav className="my_label"> Date Fin </nav>
<DatePicker
name="new_sessiondatefin"
id="new_sessiondatefin"
selected={New_SessionendDate}
onChange={(date) => {
var date_au = new Date(moment(date, "DD/MM/YYYY")).setHours(8, 0, 0);
setNew_SessionendDate(date_au);
setsessionChanged(true);
}
}
showTimeSelect={false}
filterTime={filterPassedTime_end}
dateFormat="dd/MM/yyyy"
className="texte_area"
/>
</div>
</div>
</Box>
<div className="div_row">&nbsp;
</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

View File

@ -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();

View File

@ -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
}

View File

@ -1,179 +1,212 @@
.pricing {
@media only screen and (max-width: 600px) {
.koUpdateData {
font-size: small;
color: red;
font-style: italic;
}
.okUpdateData {
font-size: small;
color: green;
font-style: italic;
}
@media only screen and (max-width: 600px) {
.koUpdateData {
font-size: small;
color: red;
font-style: italic;
}
.div_row {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 100%;
margin-bottom: 1rem;
border-radius: 1rem;
}
.okUpdateData {
font-size: small;
color: green;
font-style: italic;
}
.div_row_gauche {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.div_row {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 100%;
margin-bottom: 1rem;
border-radius: 1rem;
}
.div_row_droite {
float: right;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.div_row_gauche {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.div_row_droite {
float: right;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
}
@media only screen and (min-width: 601px) and (max-width: 991px) {
/*style petites-moyennes tablettes */
.koUpdateData {
font-size: small;
color: red;
font-style: italic;
}
.okUpdateData {
font-size: small;
color: green;
font-style: italic;
}
.div_row {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 100%;
margin-bottom: 1rem;
border-radius: 1rem;
}
.div_row_gauche {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.div_row_droite {
float: right;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.koUpdateData {
font-size: small;
color: red;
font-style: italic;
}
.okUpdateData {
font-size: small;
color: green;
font-style: italic;
}
.div_row {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 100%;
margin-bottom: 1rem;
border-radius: 1rem;
}
.div_row_gauche {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.div_row_droite {
float: right;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
}
@media only screen and (min-width: 1200px) {
.koUpdateData {
font-size: small;
color: red;
font-style: italic;
}
.okUpdateData {
font-size: small;
color: green;
font-style: italic;
}
.div_row {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 100%;
margin-bottom: 0px !important;
margin-top: 0px !important;
border-radius: 1rem;
}
.div_row_gauche {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.div_row_droite {
float: right;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.buton_add_price {
border-radius: 10rem;
padding: 0.3rem;
width: 20%;
background: #81BC3A;
float: right;
margin-right: 10px;
border: none;
}
@media only screen and (min-width: 601px) and (max-width: 991px) {
/*style petites-moyennes tablettes */
.koUpdateData {
font-size: small;
color: red;
font-style: italic;
}
.okUpdateData {
font-size: small;
color: green;
font-style: italic;
}
.div_row {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 100%;
margin-bottom: 1rem;
border-radius: 1rem;
}
.div_row_gauche {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.div_row_droite {
float: right;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.texte_area {
width: 48% !important;
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.koUpdateData {
font-size: small;
color: red;
font-style: italic;
}
.okUpdateData {
font-size: small;
color: green;
font-style: italic;
}
.div_row {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 100%;
margin-bottom: 1rem;
border-radius: 1rem;
}
.div_row_gauche {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.div_row_droite {
float: right;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.btn_editer {
width: 15rem;
background-color: #212121 !important;
color: white;
border-radius: 10rem;
}
@media only screen and (min-width: 1200px) {
.koUpdateData {
font-size: small;
color: red;
font-style: italic;
}
.okUpdateData {
font-size: small;
color: green;
font-style: italic;
}
.div_row {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 100%;
margin-bottom: 1rem;
border-radius: 1rem;
}
.div_row_gauche {
float: left;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.div_row_droite {
float: right;
//border:0px solid black;
border-width: 0.01rem;
width: 48%;
border-radius: 1rem;
}
.buton_add_price{
border-radius: 5px;
font-size: small;
padding: 0.3rem;
width: 20%;
background: #81BC3A;
float: right;
margin-right: 10px;
}
.texte_area{
width: 48% !important;
}
.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;
}
}
// End media
// End media
}