diff --git a/package-lock.json b/package-lock.json index 7ae58d8..744bda1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,8 @@ "@material-ui/core": "^4.12.4", "@material/tooltip": "^14.0.0", "@mui/icons-material": "^5.4.2", - "@mui/material": "^5.14.1", + "@mui/lab": "^5.0.0-alpha.137", + "@mui/material": "^5.14.2", "@mui/x-data-grid": "^5.17.26", "@mui/x-date-pickers": "^5.0.0", "@mui/x-date-pickers-pro": "^5.0.0", @@ -5280,9 +5281,9 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.1.tgz", - "integrity": "sha512-mIa1WmDmNr1LoupV1Rbxt9bTFKMbIn10RHG1bnZ/FJCkAYpuU/D4n+R+ttiycgcZNngU++zyh/OQeJblzbQPzg==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.2.tgz", + "integrity": "sha512-x+c/MgDL1t/IIy5lDbMlrDouFG5DYZbl3DP4dbbuhlpPFBnE9glYwmJEee/orVHQpOPwLxCAIWQs+2DKSaBVWQ==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui" @@ -5313,14 +5314,55 @@ } } }, - "node_modules/@mui/material": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.1.tgz", - "integrity": "sha512-WtsgYuageTunLfxH3Ri+o1RuQTFImtRHxMcVNyD0Hhd2/znjW6KODNz0XfjvLRnNCAynBxZNiflcoIBW40h9PQ==", + "node_modules/@mui/lab": { + "version": "5.0.0-alpha.137", + "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.137.tgz", + "integrity": "sha512-bHfcfti9/GnB657QpTdlK1fc9gjkP3SC+NrXyb9NCr0rT5Cq7TEkBGXyY5wGUSCyHR3CrMvchkIsfG5sH/NJ9A==", "dependencies": { "@babel/runtime": "^7.22.6", "@mui/base": "5.0.0-beta.8", - "@mui/core-downloads-tracker": "^5.14.1", + "@mui/system": "^5.14.1", + "@mui/types": "^7.2.4", + "@mui/utils": "^5.14.1", + "clsx": "^1.2.1", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@mui/material": "^5.0.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/material": { + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.2.tgz", + "integrity": "sha512-TgNR4/YRL11RifsnMWNhITNCkGJYVz20SCvVJBBoU5Y/KhUNSSJxjDpEB8VrnY+sUsV0NigLCkHZJglfsiS3Pw==", + "dependencies": { + "@babel/runtime": "^7.22.6", + "@mui/base": "5.0.0-beta.8", + "@mui/core-downloads-tracker": "^5.14.2", "@mui/system": "^5.14.1", "@mui/types": "^7.2.4", "@mui/utils": "^5.14.1", @@ -49512,9 +49554,9 @@ } }, "@mui/core-downloads-tracker": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.1.tgz", - "integrity": "sha512-mIa1WmDmNr1LoupV1Rbxt9bTFKMbIn10RHG1bnZ/FJCkAYpuU/D4n+R+ttiycgcZNngU++zyh/OQeJblzbQPzg==" + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.2.tgz", + "integrity": "sha512-x+c/MgDL1t/IIy5lDbMlrDouFG5DYZbl3DP4dbbuhlpPFBnE9glYwmJEee/orVHQpOPwLxCAIWQs+2DKSaBVWQ==" }, "@mui/icons-material": { "version": "5.14.1", @@ -49524,14 +49566,29 @@ "@babel/runtime": "^7.22.6" } }, - "@mui/material": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.1.tgz", - "integrity": "sha512-WtsgYuageTunLfxH3Ri+o1RuQTFImtRHxMcVNyD0Hhd2/znjW6KODNz0XfjvLRnNCAynBxZNiflcoIBW40h9PQ==", + "@mui/lab": { + "version": "5.0.0-alpha.137", + "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.137.tgz", + "integrity": "sha512-bHfcfti9/GnB657QpTdlK1fc9gjkP3SC+NrXyb9NCr0rT5Cq7TEkBGXyY5wGUSCyHR3CrMvchkIsfG5sH/NJ9A==", "requires": { "@babel/runtime": "^7.22.6", "@mui/base": "5.0.0-beta.8", - "@mui/core-downloads-tracker": "^5.14.1", + "@mui/system": "^5.14.1", + "@mui/types": "^7.2.4", + "@mui/utils": "^5.14.1", + "clsx": "^1.2.1", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + } + }, + "@mui/material": { + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.2.tgz", + "integrity": "sha512-TgNR4/YRL11RifsnMWNhITNCkGJYVz20SCvVJBBoU5Y/KhUNSSJxjDpEB8VrnY+sUsV0NigLCkHZJglfsiS3Pw==", + "requires": { + "@babel/runtime": "^7.22.6", + "@mui/base": "5.0.0-beta.8", + "@mui/core-downloads-tracker": "^5.14.2", "@mui/system": "^5.14.1", "@mui/types": "^7.2.4", "@mui/utils": "^5.14.1", diff --git a/package.json b/package.json index a0be069..d53fc11 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "@material-ui/core": "^4.12.4", "@material/tooltip": "^14.0.0", "@mui/icons-material": "^5.4.2", - "@mui/material": "^5.14.1", + "@mui/lab": "^5.0.0-alpha.137", + "@mui/material": "^5.14.2", "@mui/x-data-grid": "^5.17.26", "@mui/x-date-pickers": "^5.0.0", "@mui/x-date-pickers-pro": "^5.0.0", diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js index ac79956..177bc83 100644 --- a/src/components/AddClassManual.js +++ b/src/components/AddClassManual.js @@ -1946,7 +1946,7 @@ const AddClassManual = (props) => {
- +


{/*isimgclassSelected && */} diff --git a/src/components/PartnerClient_Activite.js b/src/components/PartnerClient_Activite.js index 8c1ea08..334bae3 100644 --- a/src/components/PartnerClient_Activite.js +++ b/src/components/PartnerClient_Activite.js @@ -36,6 +36,20 @@ import fileDownload from 'js-file-download' import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5"; import { AiOutlineUserAdd } from "react-icons/ai"; +import Timeline from '@mui/lab/Timeline'; +import TimelineItem from '@mui/lab/TimelineItem'; +import TimelineSeparator from '@mui/lab/TimelineSeparator'; +import TimelineConnector from '@mui/lab/TimelineConnector'; +import TimelineContent from '@mui/lab/TimelineContent'; +import TimelineOppositeContent from '@mui/lab/TimelineOppositeContent'; +import TimelineDot from '@mui/lab/TimelineDot'; +import FastfoodIcon from '@mui/icons-material/Fastfood'; +import LaptopMacIcon from '@mui/icons-material/LaptopMac'; +import HotelIcon from '@mui/icons-material/Hotel'; +import RepeatIcon from '@mui/icons-material/Repeat'; +import Typography from '@mui/material/Typography'; + + const PartnerClientActivite = (props) => { const history = useHistory(); @@ -53,7 +67,7 @@ const PartnerClientActivite = (props) => { //clean_contact_set_values(); setaddactivite("1"); Clear_activite_P_fields(); - + } function Close_Activite() { @@ -166,8 +180,8 @@ const PartnerClientActivite = (props) => { var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Entity_Activite/"; axios.post(myurl, form).then(res => { - console.log(" In Get_List_Activite_Of_client_Part res.data.status = " + res.data.status); - console.log(" In Get_List_Activite_Of_client_Part res.data.message r_class = " + res.data.message); + //console.log(" In Get_List_Activite_Of_client_Part res.data.status = " + res.data.status); + //console.log(" In Get_List_Activite_Of_client_Part res.data.message r_class = " + res.data.message); if (String(res.data.status) === String("true")) { setGet_List_Activite_Of_client_Part_api("true"); @@ -468,7 +482,7 @@ const PartnerClientActivite = (props) => { - function Clear_activite_P_fields(){ + function Clear_activite_P_fields() { setp_activite_description(""); setp_activite_detail(""); setp_activite_deadline(""); @@ -504,7 +518,7 @@ const PartnerClientActivite = (props) => { return ( -
+
{String(addactivite) === "0" &&
@@ -515,18 +529,35 @@ const PartnerClientActivite = (props) => { {Get_List_Activite_Of_client_Part_result && String(Get_List_Activite_Of_client_Part_api) === "true" && Get_List_Activite_Of_client_Part_result.map((client) => ( - -
- description = {String(JSON.parse(client).description)}
- detail = {String(JSON.parse(client).detail)}
- type = {String(JSON.parse(client).type)}
- deadline = {String(JSON.parse(client).deadline)}
- - -
- - + + + + {String(JSON.parse(client).deadline)} + + + + + + + + + + + {String(JSON.parse(client).description)} + + + {String(JSON.parse(client).detail)}
+ {String(JSON.parse(client).type)}
+
+
+
))} + +
} @@ -581,7 +612,7 @@ const PartnerClientActivite = (props) => { disabled={false} className="disabled_style" value={setp_activite_deadline_label} - /> + />
} diff --git a/src/components/TestUrl.js b/src/components/TestUrl.js index 2af7c84..fe59585 100644 --- a/src/components/TestUrl.js +++ b/src/components/TestUrl.js @@ -48,6 +48,20 @@ import 'reactjs-popup/dist/index.css'; import Formation from "./Formation"; import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; +import Timeline from '@mui/lab/Timeline'; +import TimelineItem from '@mui/lab/TimelineItem'; +import TimelineSeparator from '@mui/lab/TimelineSeparator'; +import TimelineConnector from '@mui/lab/TimelineConnector'; +import TimelineContent from '@mui/lab/TimelineContent'; +import TimelineOppositeContent from '@mui/lab/TimelineOppositeContent'; +import TimelineDot from '@mui/lab/TimelineDot'; +import FastfoodIcon from '@mui/icons-material/Fastfood'; +import LaptopMacIcon from '@mui/icons-material/LaptopMac'; +import HotelIcon from '@mui/icons-material/Hotel'; +import RepeatIcon from '@mui/icons-material/Repeat'; +import Typography from '@mui/material/Typography'; + + import { CardElement, useStripe, @@ -622,7 +636,7 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa ["James Houston", "Test Corp", "Dallas", "TX"], ]; - function hellofoo(){ + function hellofoo() { alert(" hellooooooooo"); } @@ -632,9 +646,9 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa selectableRowsOnClick: true, customToolbar: () => { return ( - - - + + + ); }, @@ -679,30 +693,27 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa }, }, - MuiToolbar: { - styleOverrides: { - regular: { - minHeight: '8px', - } + MuiToolbar: { + styleOverrides: { + regular: { + minHeight: '8px', } - }, + } + }, - MuiTableRow: { - root: { - "&.MuiTableRow-hover": { - "&:hover": { - backgroundColor: "yellow", - } + MuiTableRow: { + root: { + "&.MuiTableRow-hover": { + "&:hover": { + backgroundColor: "yellow", } } } - - - - } - }); + + } + }); @@ -722,6 +733,58 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
+ + + + + 9:30 am + + + + + + + + + + + Eat + + Because you need strength + + + + + + 10:00 am + + + + + + + + + + + Code + + Because it's awesome! + + + + + +

cartouche formaion

@@ -733,9 +796,9 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa columns={columns} options={options11} /> - - Ajouter une ligne - + + Ajouter une ligne +
diff --git a/src/components/UpdatePartnerInfo.js b/src/components/UpdatePartnerInfo.js index ed01c2d..71c8b77 100644 --- a/src/components/UpdatePartnerInfo.js +++ b/src/components/UpdatePartnerInfo.js @@ -34,7 +34,6 @@ function UpdateParnterInfo() { const [mailfieldsdesabled, setmailfieldsdesabled] = useState(true); const [pwdfieldsdesabled, setpwdfieldsdesabled] = useState(true); - const [values, setValues] = React.useState({ password: '', showPassword: false, @@ -57,7 +56,7 @@ function UpdateParnterInfo() { - const [currentpawdvisible, setcurrentpawdvisible] = useState(false); + const [currentpawdvisible, setcurrentpawdvisible] = useState(false); const [newpawdvisible, setnewpawdvisible] = useState(false); const [confpwdvisible, setconfpwdvisible] = useState(false); const [updatemainmail, setupdatemainmail] = useState(); @@ -85,6 +84,7 @@ function UpdateParnterInfo() { desablesecurtymailfields(); desablesecurtypwdfields(); desablesecurtyInsertKeyfields(); + getPartnerImages(); }, []) @@ -163,10 +163,10 @@ function UpdateParnterInfo() { desablesecurtyInsertKeyfields(); document.getElementsByName("current_insert_key")[0].value = new_key; setinsert_key_updated(true); - }else if (String(result['status']) === String("Err_Connexion")) { + } else if (String(result['status']) === String("Err_Connexion")) { alert('Erreur: ' + result['message']); history.push("/Connexion"); - } + } }) @@ -375,14 +375,14 @@ function UpdateParnterInfo() { document.getElementsByName("num_nda")[0].style.backgroundColor = "#ECEFF1"; } - if (mylocaltraining.iscertitrace) { - setmycertitrace(mylocaltraining.iscertitrace); - } - else { - setmycertitrace("0"); - } + /* if (mylocaltraining.iscertitrace) { + setmycertitrace(mylocaltraining.iscertitrace); + } + else { + setmycertitrace("0"); + }*/ - if (mylocaltraining.iscertifvoltaire) { + if (mylocaltraining.iscertifvoltaire) { setmycertifvoltaire(mylocaltraining.iscertifvoltaire); } else { @@ -390,13 +390,13 @@ function UpdateParnterInfo() { } - - if (mylocaltraining.isbureaucertitrace) { - setmybureaucertitrace(mylocaltraining.isbureaucertitrace); - } - else { - setmybureaucertitrace("0"); - } + /* + if (mylocaltraining.isbureaucertitrace) { + setmybureaucertitrace(mylocaltraining.isbureaucertitrace); + } + else { + setmybureaucertitrace("0"); + }*/ if (mylocaltraining.isdatadock) { setmydatadock(mylocaltraining.isdatadock); @@ -494,6 +494,7 @@ function UpdateParnterInfo() { function annuler_change_user_data() { desablefield1(); getCurrentUserData(); + setuserformedited(""); } function desablefield1() { @@ -612,9 +613,9 @@ function UpdateParnterInfo() { setfields1desabled(false); window.scrollTo({ - top: 0, - behavior: "smooth", - }); + top: 0, + behavior: "smooth", + }); } @@ -694,6 +695,8 @@ function UpdateParnterInfo() { function RecordData() { + + const formData = new FormData(); const url = process.env.REACT_APP_API_URL + "myclass/api/update_partner_account/"; @@ -732,10 +735,10 @@ function UpdateParnterInfo() { var contact_tel = document.getElementsByName("contact_tel")[0].value; var contact_mail = document.getElementsByName("contact_mail")[0].value; - var mycertitrace = document.getElementsByName("iscertitrace")[0].value; - var mybureaucertitrace = document.getElementsByName("isbureaucertitrace")[0].value; + //var mycertitrace = document.getElementsByName("iscertitrace")[0].value; + //var mybureaucertitrace = document.getElementsByName("isbureaucertitrace")[0].value; - var mycertifvoltaire = document.getElementsByName("iscertifvoltaire")[0].value; + var mycertifvoltaire = document.getElementsByName("iscertifvoltaire")[0].value; var mydatadock = document.getElementsByName("isdatadock")[0].value; @@ -746,11 +749,11 @@ function UpdateParnterInfo() { formData.append('token', stored_user); formData.append('nom', nom); - formData.append('iscertitrace', mycertitrace); + //formData.append('iscertitrace', mycertitrace); formData.append('isdatadock', mydatadock); formData.append('isqualiopi', myqualiopi); - formData.append('isbureaucertitrace', mybureaucertitrace); - formData.append('iscertifvoltaire', mycertifvoltaire); + // formData.append('isbureaucertitrace', mybureaucertitrace); + formData.append('iscertifvoltaire', mycertifvoltaire); formData.append('website', website); formData.append('adr_city', adr_city); @@ -769,6 +772,15 @@ function UpdateParnterInfo() { formData.append('contact_mail', contact_mail); + // Recuperation de l'image logo & de l'image du cachet + formData.append('file_logo', isimgclassSelected); + formData.append('file_logo_recid', isimgclassSelected_recid); + + formData.append('file_cachet', isimgcachetSelected); + formData.append('file_cachet_recid', isimgcachetSelected_recid); + + + //console.log(" ### formData = ", formData); fetch( url, @@ -794,18 +806,68 @@ function UpdateParnterInfo() { console.error('Error:', error); setmyApiResponse("false"); window.scrollTo({ - top: 0, - behavior: "smooth", - }); + top: 0, + behavior: "smooth", + }); }); window.scrollTo({ - top: 0, - behavior: "smooth", - }); + top: 0, + behavior: "smooth", + }); }; + const [getPartnerImages_api, setgetPartnerImages_api] = useState(); + const [getPartnerImages_message, setgetPartnerImages_message] = useState(); + const [getPartnerImages_result, setgetPartnerImages_result] = useState(); + function getPartnerImages(e) { + var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedParnterImage_from_front/"; + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + + + axios.post(myurl, form).then(res => { + + //console.log(" getPartnerImages : In test res.data.status = " + res.data.status); + // console.log(" getPartnerImages: res.data.message.img = " + res.data.message); + + if (String(res.data.status) === "true") { + setgetPartnerImages_api("true"); + + var partner_logo_img = "data:image/png;base64," + JSON.parse(res.data.message).logo_img; + setisimgclassSelected(partner_logo_img); + setuserimgclassprofil(partner_logo_img); + setisimgclassSelected_recid(JSON.parse(res.data.message).logo_img_recid); + + var partner_cachet_img = "data:image/png;base64," + JSON.parse(res.data.message).cachet_img; + setisimgcachet(partner_cachet_img); + setisimgcachetSelected(partner_cachet_img); + setisimgcachetSelected_recid(JSON.parse(res.data.message).cachet_img_recid); + + } + else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + return; + } + else { + setgetPartnerImages_api("false"); + setgetPartnerImages_message(res.data.message) + + } + }).catch((error) => { + console.warn('getPartnerImages ee: Not good man :( = ', error); + setgetPartnerImages_api("false"); + setgetPartnerImages_message(" Impossible de recuperer les images/médias du partenaire") + }) + + } + + function handleChange(prop) { return (event) => { setValues({ ...values, [prop]: event.target.value }); @@ -1059,7 +1121,7 @@ function UpdateParnterInfo() { ]; - const certifvoltaire = [ + const certifvoltaire = [ { value: '1', label: 'Oui', @@ -1128,7 +1190,7 @@ function UpdateParnterInfo() { } - const [mycertifvoltaire, setmycertifvoltaire] = useState(""); + const [mycertifvoltaire, setmycertifvoltaire] = useState(""); const handleChangecertifvoltaire = (event) => { if (fields1desabled) { alert(" Vous devez cliquer sur 'Editer' pour activer les modifications"); @@ -1146,9 +1208,188 @@ function UpdateParnterInfo() { const [datamodification, setdatamodification] = useState("0"); function DataUpdated() { setdatamodification("1"); + } + + const [isimgclassdeleted, setisimgclassdeleted] = useState(""); + const [isimgclassdeleted_message, setisimgclassdeleted_message] = useState(""); + + function removeRecodedClassImage() { + var class_external_code = ""; + if (document.getElementsByName("external_code")[0].value && document.getElementsByName("external_code")[0].value.length > 3) { + class_external_code = document.getElementsByName("external_code")[0].value; + } else { + alert(" Vous devez saisir le code externe de la formation avant d'enregistrer une image. Le code externe prend au moins 3 caractères"); + return; + } + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("class_external_code", class_external_code); + form.append("type", "partner"); + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/DeleteRecodedClassImage/", + { + method: 'POST', + body: form, + } + ).then((response) => response.json()) + .then((result) => { + + //console.log(' removeRecodedClassImage : status:', result['status']); + //console.log('removeRecodedClassImage : Success:', result['message']); + + setisimgclassSelected(false); + + if (String(result['status']) === String("true")) { + setisimgclassdeleted("1"); + setuserimgclassprofil(""); + } + else if (String(result['status']) === String("Err_Connexion")) { + alert('Erreur: ' + result['message']); + history.push("/Connexion"); + return; + } + + else { + setisimgclassdeleted("0"); + setisimgclassdeleted_message(result['message']); + setisimgclassSelected(true); + } + + }) + .catch((error) => { + console.error('Error:'); + setisimgclassSelected(true); + setisimgclassdeleted("0"); + setisimgclassdeleted_message(result['message']); + }); } + const [isimgclassSaved, setisimgclassSaved] = useState(""); + const [isimgclassSaved_message, setisimgclassSaved_message] = useState(""); + function sendClassImage(e) { + + var class_external_code = ""; + if (document.getElementsByName("external_code")[0].value && document.getElementsByName("external_code")[0].value.length > 3) { + class_external_code = document.getElementsByName("external_code")[0].value; + } else { + alert(" Vous devez saisir le code externe de la formation avant d'enregistrer une image. Le code externe prend au moins 3 caractères"); + return; + } + + var formData = new FormData(); + formData.append('File', isimgclassSelected); + const stored_cookie = getCookie('tokenmysypart'); + formData.append("token", stored_cookie); + formData.append("class_external_code", class_external_code); + + formData.append("type", "partner"); + fetch( + process.env.REACT_APP_API_URL + "myclass/api/recordClassImage/", + { + method: 'POST', + body: formData, + } + ).then((response) => response.json()) + .then((result) => { + //console.log('status:', result['status']); + //console.log('Success:', result['message']); + setisimgclassSelected(false); + + if (String(result['status']) == String("true")) { + setisimgclassSaved("1"); + } + else { + setisimgclassSaved("0"); + setisimgclassSaved_message(result['message']); + setisimgclassSelected(true); + } + + }) + .catch((error) => { + console.error('Error:'); + setisimgclassSelected(true); + setisimgclassSaved("0"); + setisimgclassSaved_message(result['message']); + }); + }; + + const [isimgclassSelected, setisimgclassSelected] = useState(false); + const [isimgclassSelected_recid, setisimgclassSelected_recid] = useState(""); + const [isimgclassSelectedfile, setisimgclassSelectedfile] = useState(false); + + + const [userimgclassprofil, setuserimgclassprofil] = useState(); + const [userimgclassprofilchanged, setuserimgclassprofilchanged] = useState(""); + const imglogoclasschangeHandler = (event) => { + + + let file_size = event.target.files[0].size; + + //or if you like to have name and type + //console.log(event.target.files); + + let file_name = event.target.files[0].name; + let file_type = event.target.files[0].type; + + + + //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); + if (file_size > 1000000) { + alert("L'image ne doit pas depasser un 1 Méga octets"); + return; + } + setisimgclassSelected(event.target.files[0]); + setisimgclassSelectedfile(true); + + setuserimgclassprofil(URL.createObjectURL(event.target.files[0])); + setuserimgclassprofilchanged("1"); + }; + + const [isimgcachetSelected, setisimgcachetSelected] = useState(false); + const [isimgcachetSelected_recid, setisimgcachetSelected_recid] = useState(""); + const [isimgcachetSelectedfile, setisimgcachetSelectedfile] = useState(false); + + + const [isimgcachet, setisimgcachet] = useState(); + const [isimgcachetchanged, setisimgcachetchanged] = useState(""); + const imgcachetchangeHandler = (event) => { + + + + let file_size = event.target.files[0].size; + + //or if you like to have name and type + //console.log(event.target.files); + + let file_name = event.target.files[0].name; + let file_type = event.target.files[0].type; + + + + //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); + if (file_size > 1000000) { + alert("L'image ne doit pas depasser un 1 Méga octets"); + return; + } + setisimgcachetSelected(event.target.files[0]); + setisimgcachetSelectedfile(true); + + setisimgcachet(URL.createObjectURL(event.target.files[0])); + setisimgcachetchanged("1"); + }; + + + const [isimgcachetdeleted, setisimgcachetdeleted] = useState(""); + const [isimgcachetdeleted_message, setisimgcachetdeleted_message] = useState(""); + + const [isimgcachetSaved, setisimgcachetSaved] = useState(""); + const [isimgcachetSaved_message, setisimgcachetSaved_message] = useState(""); + return (
@@ -1358,6 +1599,81 @@ function UpdateParnterInfo() { variant="standard" /> +
 
+
+
Votre logo
+
+
+
+ +
+
+
+ {String(userformedited) === "1" && } + + {/*isimgclassSelected && */} + {isimgclassdeleted && String(isimgclassdeleted) === "1" && } + {isimgclassdeleted && String(isimgclassdeleted) === "0" && } + {isimgclassSelected && String(isimgclassSaved) === "0" && } +
+ +
+
+
  • + L'image doit etre carrée. +
  • +
  • + Les formats autorisés sont : ['jpg', 'jpeg', 'png', 'jpe', 'webp'] +
  • +
  • + Les dimensions recommandées: 128pixels X 128pixels -- 144pixels X 144pixels -- 168pixels X 168pixels
    + Les dimensions maximales sont de 256pixels X 256pixels +
  • +
  • + La taille de l'image ne doit pas depasser 1 mega octet +
  • +
    + +
    + +
    +
    Votre cachet
    +
    +
    +
    + +
    +
    +
    + {String(userformedited) === "1" && } + {/*isimgclassSelected && */} + {isimgcachetdeleted && String(isimgcachetdeleted) === "1" && } + {isimgcachetdeleted && String(isimgcachetdeleted) === "0" && } + {isimgcachetSelected && String(isimgcachetSaved) === "0" && } +
    + +
    +
    +
  • + L'image doit etre carrée. +
  • +
  • + Les formats autorisés sont : ['jpg', 'jpeg', 'png', 'jpe', 'webp'] +
  • +
  • + Les dimensions recommandées: 128pixels X 128pixels -- 144pixels X 144pixels -- 168pixels X 168pixels
    + Les dimensions maximales sont de 256pixels X 256pixels +
  • +
  • + La taille de l'image ne doit pas depasser 1 mega octet +
  • +
    + + +
    +
     
    Certification
    - ))} - + */} -
    -
    +
    - {pwdfieldsdesabled == false &&
    + {pwdfieldsdesabled == false &&
    @@ -1760,7 +2076,7 @@ function UpdateParnterInfo() {
    - {mailfieldsdesabled == false &&
    + {mailfieldsdesabled == false &&
    @@ -1769,8 +2085,8 @@ function UpdateParnterInfo() {
    } - {mailfieldsdesabled == true &&
    - + {mailfieldsdesabled == true &&
    +
    } diff --git a/src/styles/components/_addclassmanual.scss b/src/styles/components/_addclassmanual.scss index 0a88799..90ade7c 100644 --- a/src/styles/components/_addclassmanual.scss +++ b/src/styles/components/_addclassmanual.scss @@ -216,7 +216,7 @@ .bton_supprime_image_class { font-size: small; text-align: left; - margin-left: 5px; + margin-left: 0px; box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); padding: 5px; padding-left: 10px; @@ -569,7 +569,7 @@ .bton_supprime_image_class { font-size: small; text-align: left; - margin-left: 5px; + margin-left: 0px; box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); padding: 5px; padding-left: 10px; @@ -901,7 +901,7 @@ .img_class_logo { display: block; width: 168px; - height: 144px; + height: 168px; border-radius: 10px !important; border: 1px solid black; float: left; @@ -982,7 +982,7 @@ .bton_supprime_image_class { font-size: small; text-align: left; - margin-left: 5px; + margin-left: 0px; box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); padding: 5px; padding-left: 10px; @@ -1317,7 +1317,7 @@ .img_class_logo { display: block; width: 168px; - height: 144px; + height: 168px; border-radius: 10px !important; border: 1px solid black; float: left; @@ -1357,7 +1357,7 @@ font-size: small; padding-left: 0.2rem; } - + .bton_suppr2 { background: transparent; color: red; @@ -1398,7 +1398,7 @@ .bton_supprime_image_class { font-size: small; text-align: left; - margin-left: 5px; + margin-left: 0px; box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); padding: 5px; padding-left: 10px; diff --git a/src/styles/components/_addpartnerclient.scss b/src/styles/components/_addpartnerclient.scss index 8c4b4e8..bf69b58 100644 --- a/src/styles/components/_addpartnerclient.scss +++ b/src/styles/components/_addpartnerclient.scss @@ -191,7 +191,8 @@ margin-left: 10px !important; display: grid; height: 200px; - grid-template: repeat(2, 1fr) / repeat(2, 1fr); + //grid-template: repeat(2, 1fr) / repeat(2, 1fr); + grid-template-columns: auto auto auto auto; gap: 20px 10px; } @@ -211,6 +212,25 @@ box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); } + + .detail_activite { + + display: inline-block; + color: #444; + border: 1px solid #CCC; + background: #DDD; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + cursor: pointer; + vertical-align: middle; + padding: 5px; + text-align: left; + } + + .detail_activite:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .css-1v4ccyo { height: 3rem !important; } diff --git a/src/styles/components/_updateparnterinfo.scss b/src/styles/components/_updateparnterinfo.scss index 745d44d..cdd8d95 100644 --- a/src/styles/components/_updateparnterinfo.scss +++ b/src/styles/components/_updateparnterinfo.scss @@ -445,12 +445,12 @@ } .btn_modif { - width: 10rem; + width: 20rem; background-color: #212121 !important; } .btn_enreg { - width: 10rem; + width: 20rem; background-color: green !important; } @@ -483,12 +483,14 @@ border-radius: 1rem; //border-right: solid; border-radius: 0%; + text-align: left; } .div_row_droite { float: right; border-width: 0.01rem; width: 48%; + text-align: right; } .text_pwd_crit { @@ -502,6 +504,83 @@ font-style: italic; } + // add on 01/08/2023 + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: small; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + } + + .img_class_logo { + display: block; + width: 168px; + height: 168px; + border-radius: 10px !important; + border: 1px solid black; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 15rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 15rem; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + } .css-mnn31 {