Skip to content
Snippets Groups Projects
Commit e57c7dd7 authored by julien.debray's avatar julien.debray
Browse files

tmp main front

parent d07d349d
No related branches found
No related tags found
1 merge request!14ajout de la page de consultation des rendez-vous coter pro avec la possibilité...
This diff is collapsed.
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
} }
} }
.card-grid { .card-grid-2 {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
/* column-gap: 10%; espacement entre les cartes */ /* column-gap: 10%; espacement entre les cartes */
...@@ -45,8 +45,10 @@ ...@@ -45,8 +45,10 @@
margin-top: 5%; margin-top: 5%;
} }
button:disabled, button:disabled:hover { .card-grid-3 {
background-color: #ddd; display: grid;
color: #aaa; grid-template-columns: repeat(3, 1fr);
cursor: not-allowed; /* column-gap: 10%; espacement entre les cartes */
gap: 20px;
margin-top: 5%;
} }
import React, { useState } from "react"; import React, { useState } from "react";
import { Link, redirect } from 'react-router-dom'; import { Redirect } from "react-router";
export default function Deconnexion(props) { export default function Deconnexion(props) {
props.setIsLogged(false); props.setIsLogged(false);
...@@ -9,10 +9,5 @@ export default function Deconnexion(props) { ...@@ -9,10 +9,5 @@ export default function Deconnexion(props) {
props.setFirstName(""); props.setFirstName("");
props.setMail(""); props.setMail("");
return ( window.location.href = "/accueil";
<div>
<h1>Vous êtes déconnecté.</h1>
<Link to="/">Retour à la page de connexion</Link>
</div>
);
} }
...@@ -120,7 +120,7 @@ const Inscription = () => { ...@@ -120,7 +120,7 @@ const Inscription = () => {
}; };
fetch('http://localhost:3001/inscription', options) fetch('http://localhost:3001/inscription', options)
.then(res => console.log(res)); .then(res => window.location.href = "/");
} }
}; };
......
...@@ -29,7 +29,7 @@ const ListeComptes = (props) => { ...@@ -29,7 +29,7 @@ const ListeComptes = (props) => {
return ( return (
<div> <div>
<h2>Liste des comptes</h2> <h2>Liste des comptes</h2>
<div className="card-grid"> <div className="card-grid-2">
{comptes.map(compte => ( {comptes.map(compte => (
<AccountCard <AccountCard
updateAccountStatus={updateAccountStatus} updateAccountStatus={updateAccountStatus}
......
...@@ -7,7 +7,7 @@ export default function Index(props) { ...@@ -7,7 +7,7 @@ export default function Index(props) {
const isAdmin = props.isAdmin === 1 ? true : false; const isAdmin = props.isAdmin === 1 ? true : false;
return ( return (
<div> <div>
<div className=" bg-indigo-700 rounded-r shadow sm:hidden flex justify-between w-full p-6 border-b border-transparent sm:border-gray-200 "> <div className=" rounded-r shadow sm:hidden flex justify-between w-full p-6 border-b border-transparent sm:border-gray-200 ">
<button className="flex text-white hover:text-indigo-200 focus:outline-none focus:text-indigo-200 justify-between space-x-3"> <button className="flex text-white hover:text-indigo-200 focus:outline-none focus:text-indigo-200 justify-between space-x-3">
<svg width={34} height={34} viewBox="0 0 877 1067" version="1.1" xmlns="http://www.w3.org/2000/svg"> <svg width={34} height={34} viewBox="0 0 877 1067" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g id="#38df40ff"> <g id="#38df40ff">
...@@ -40,7 +40,7 @@ export default function Index(props) { ...@@ -40,7 +40,7 @@ export default function Index(props) {
</div> </div>
</div> </div>
<div id="Main" className={`${show ? "-translate-x-full" : "translate-x-0"} bg-indigo-700 transform sm:translate-x-0 shadow sm:rounded-r fixed h-full top-22 sm:z-20 ease-in-out transition duration-500 flex justify-start items-start w-full sm:w-64 flex-col `}> <div id="Main" className={`${show ? "-translate-x-full" : "translate-x-0"} bg-indigo-700 transform sm:translate-x-0 shadow sm:rounded-r fixed h-full top-22 sm:z-20 ease-in-out transition duration-500 flex justify-start items-start w-full sm:w-64 flex-col `} style={{backgroundColor: "#2f27f8"}}>
<button className="hidden focus:outline-none hover:text-indigo-200 focus:text-indigo-200 text-white sm:flex justify-start p-6 space-x-3 w-full"> <button className="hidden focus:outline-none hover:text-indigo-200 focus:text-indigo-200 text-white sm:flex justify-start p-6 space-x-3 w-full">
<svg width={100} height={100} viewBox="0 0 877 1067" version="1.1" xmlns="http://www.w3.org/2000/svg"> <svg width={100} height={100} viewBox="0 0 877 1067" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g id="#38df40ff"> <g id="#38df40ff">
......
...@@ -131,7 +131,8 @@ function PriseRendezVous(props) { ...@@ -131,7 +131,8 @@ function PriseRendezVous(props) {
fetch("http://127.0.0.1:3001/prendre-rdv", options) fetch("http://127.0.0.1:3001/prendre-rdv", options)
.then((res) => { .then((res) => {
if (res.status === 200) { if (res.status === 200) {
envoyerEmailConfirmation() envoyerEmailConfirmation();
window.location.href = "/accueil";
} }
}) })
.catch(function (error) { .catch(function (error) {
...@@ -181,6 +182,7 @@ function PriseRendezVous(props) { ...@@ -181,6 +182,7 @@ function PriseRendezVous(props) {
/> />
) : null} ) : null}
</div> </div>
<div>
{creneauxBoutique.map((creneau) => {creneauxBoutique.map((creneau) =>
CreneauCard({ CreneauCard({
choisirCreneau, choisirCreneau,
...@@ -188,6 +190,7 @@ function PriseRendezVous(props) { ...@@ -188,6 +190,7 @@ function PriseRendezVous(props) {
disponible: creneau.disponible, disponible: creneau.disponible,
}) })
)} )}
</div>
{creneau ? ( {creneau ? (
<div className="place-items-start w-full col-span-3"> <div className="place-items-start w-full col-span-3">
<h4 className="m-4 text-3xl font-extrabold leading-none tracking-tight text-left"> <h4 className="m-4 text-3xl font-extrabold leading-none tracking-tight text-left">
......
...@@ -8,12 +8,8 @@ function accountCard({ ...@@ -8,12 +8,8 @@ function accountCard({
let btnText = isAdmin === 1 ? "Passer client" : "Passer admin"; let btnText = isAdmin === 1 ? "Passer client" : "Passer admin";
const myStyle = {
display: "inline-flex"
};
return ( return (
<div className="max-w-sm rounded overflow-hidden shadow-lg"> <div className=" rounded overflow-hidden shadow-lg">
<div className="px-6 pt-2"> <div className="px-6 pt-2">
<div className="font-bold text-xl mb-2"></div> <div className="font-bold text-xl mb-2"></div>
<p className="text-gray-700 text-base">{surname} {name}</p> <p className="text-gray-700 text-base">{surname} {name}</p>
......
...@@ -6,17 +6,12 @@ function BoutiqueCard({ choisirCreneau, Heure, disponible }) { ...@@ -6,17 +6,12 @@ function BoutiqueCard({ choisirCreneau, Heure, disponible }) {
} }
return ( return (
<div className="max-w-sm rounded overflow-hidden shadow-lg col-span-1 m-2 w-full"> <div className="max-w-sm rounded overflow-hidden shadow-lg" onClick={() => handleSelect(Heure)}>
<div className="px-3 py-4" onClick={() => handleSelect(Heure)}> <div className="px-3 py-4 pt-2" onClick={() => handleSelect(Heure)}>
<div className={"font-bold text-xl"}>{Heure}</div> <div className={"font-bold text-xl"}>{Heure}</div>
</div> </div>
{disponible ? ( {disponible ? (
<button <p></p>
onClick={() => handleSelect(Heure)}
className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mb-2"
>
Sélectionner
</button>
) : ( ) : (
<p>Indisponible</p> <p>Indisponible</p>
)} )}
......
...@@ -24,7 +24,7 @@ function RendezVous({lieu, date, heure, desc, supr, id, idClient, visibility}) { ...@@ -24,7 +24,7 @@ function RendezVous({lieu, date, heure, desc, supr, id, idClient, visibility}) {
return ( return (
// <div id={id} className="container border border-2 mt-4 "> // <div id={id} className="container border border-2 mt-4 ">
<div id={id} className="container max-w-sm rounded overflow-hidden shadow-lg mt-4"> <div id={id} className="container max-w-sm rounded overflow-hidden shadow-lg mt-4 mr-5">
<div className="text-center"> <div className="text-center">
<div className="row"> <div className="row">
<div className="col"> <div className="col">
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment