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é...
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -37,7 +37,7 @@
}
}
.card-grid {
.card-grid-2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
/* column-gap: 10%; espacement entre les cartes */
......@@ -45,8 +45,10 @@
margin-top: 5%;
}
button:disabled, button:disabled:hover {
background-color: #ddd;
color: #aaa;
cursor: not-allowed;
.card-grid-3 {
display: grid;
grid-template-columns: repeat(3, 1fr);
/* column-gap: 10%; espacement entre les cartes */
gap: 20px;
margin-top: 5%;
}
import React, { useState } from "react";
import { Link, redirect } from 'react-router-dom';
import { Redirect } from "react-router";
export default function Deconnexion(props) {
props.setIsLogged(false);
......@@ -9,10 +9,5 @@ export default function Deconnexion(props) {
props.setFirstName("");
props.setMail("");
return (
<div>
<h1>Vous êtes déconnecté.</h1>
<Link to="/">Retour à la page de connexion</Link>
</div>
);
window.location.href = "/accueil";
}
......@@ -120,7 +120,7 @@ const Inscription = () => {
};
fetch('http://localhost:3001/inscription', options)
.then(res => console.log(res));
.then(res => window.location.href = "/");
}
};
......
......@@ -29,7 +29,7 @@ const ListeComptes = (props) => {
return (
<div>
<h2>Liste des comptes</h2>
<div className="card-grid">
<div className="card-grid-2">
{comptes.map(compte => (
<AccountCard
updateAccountStatus={updateAccountStatus}
......
......@@ -7,7 +7,7 @@ export default function Index(props) {
const isAdmin = props.isAdmin === 1 ? true : false;
return (
<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">
<svg width={34} height={34} viewBox="0 0 877 1067" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g id="#38df40ff">
......@@ -40,7 +40,7 @@ export default function Index(props) {
</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">
<svg width={100} height={100} viewBox="0 0 877 1067" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g id="#38df40ff">
......
......@@ -131,7 +131,8 @@ function PriseRendezVous(props) {
fetch("http://127.0.0.1:3001/prendre-rdv", options)
.then((res) => {
if (res.status === 200) {
envoyerEmailConfirmation()
envoyerEmailConfirmation();
window.location.href = "/accueil";
}
})
.catch(function (error) {
......@@ -181,6 +182,7 @@ function PriseRendezVous(props) {
/>
) : null}
</div>
<div>
{creneauxBoutique.map((creneau) =>
CreneauCard({
choisirCreneau,
......@@ -188,6 +190,7 @@ function PriseRendezVous(props) {
disponible: creneau.disponible,
})
)}
</div>
{creneau ? (
<div className="place-items-start w-full col-span-3">
<h4 className="m-4 text-3xl font-extrabold leading-none tracking-tight text-left">
......
......@@ -8,12 +8,8 @@ function accountCard({
let btnText = isAdmin === 1 ? "Passer client" : "Passer admin";
const myStyle = {
display: "inline-flex"
};
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="font-bold text-xl mb-2"></div>
<p className="text-gray-700 text-base">{surname} {name}</p>
......
......@@ -6,17 +6,12 @@ function BoutiqueCard({ choisirCreneau, Heure, disponible }) {
}
return (
<div className="max-w-sm rounded overflow-hidden shadow-lg col-span-1 m-2 w-full">
<div className="px-3 py-4" onClick={() => handleSelect(Heure)}>
<div className="max-w-sm rounded overflow-hidden shadow-lg" onClick={() => handleSelect(Heure)}>
<div className="px-3 py-4 pt-2" onClick={() => handleSelect(Heure)}>
<div className={"font-bold text-xl"}>{Heure}</div>
</div>
{disponible ? (
<button
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></p>
) : (
<p>Indisponible</p>
)}
......
......@@ -24,7 +24,7 @@ function RendezVous({lieu, date, heure, desc, supr, id, idClient, visibility}) {
return (
// <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="row">
<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