feature/page-admin
Eric 4 years ago
commit 39e2ed4fce

@ -1,7 +1,2 @@
{ {
"workbench.colorCustomizations": {
"activityBar.background": "#521342",
"titleBar.activeBackground": "#731B5D",
"titleBar.activeForeground": "#FDF8FC"
}
} }

@ -23,11 +23,9 @@ const Footer = () => {
</Link> </Link>
</div> </div>
<div className="col-sm-6 col-md-3"> <div className="col-sm-6 col-md-3">
<ul className="nav flex-column justify-content-md-around align-content-center"> <ul className="nav flex-column justify-content-md-around align-content-center">
<li className="nav-item px-2"> <li className="nav-item px-2">
<p>18 rue Léon Frot, 75 011 Paris</p> <p>18 rue Léon Frot, 75 011 Paris</p>
</li> </li>
<li className="nav-item px-2"> <li className="nav-item px-2">
<p>01.65.38.94.23</p> <p>01.65.38.94.23</p>
@ -65,8 +63,8 @@ const Footer = () => {
</ul> </ul>
</div> </div>
</div> </div>
<p className="text-center">Thé Tip Top © 2022 - projet fictif pour lequel aucun réel <p className="text-center">Thé Tip Top © 2022 - projet fictif pour lequel aucun réel
achat ou aucune réservation ne pourrait être effectué.</p> achat ou aucune réservation ne pourrait être effectué.</p>
</div> </div>
</div> </div>
</footer> </footer>

31
package-lock.json generated

@ -20,7 +20,6 @@
"next": "13.0.2", "next": "13.0.2",
"next-auth": "4.16.4", "next-auth": "4.16.4",
"nodemailer": "^6.8.0", "nodemailer": "^6.8.0",
"nprogress": "^0.2.0",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-hook-form": "^7.39.2", "react-hook-form": "^7.39.2",
@ -28,7 +27,6 @@
"react-markdown": "8.0.3", "react-markdown": "8.0.3",
"react-spinners": "^0.13.7", "react-spinners": "^0.13.7",
"react-toastify": "^9.1.1", "react-toastify": "^9.1.1",
"usehooks-ts": "^2.9.1",
"yup": "^0.32.11", "yup": "^0.32.11",
"yup-phone": "^1.3.2" "yup-phone": "^1.3.2"
}, },
@ -2419,11 +2417,6 @@
"which": "bin/which" "which": "bin/which"
} }
}, },
"node_modules/nprogress": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz",
"integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA=="
},
"node_modules/oauth": { "node_modules/oauth": {
"version": "0.9.15", "version": "0.9.15",
"resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",
@ -3519,19 +3512,6 @@
"react": "^16.8.0 || ^17.0.0 || ^18.0.0" "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
} }
}, },
"node_modules/usehooks-ts": {
"version": "2.9.1",
"resolved": "https://registry.npmjs.org/usehooks-ts/-/usehooks-ts-2.9.1.tgz",
"integrity": "sha512-2FAuSIGHlY+apM9FVlj8/oNhd+1y+Uwv5QNkMQz1oSfdHk4PXo1qoCw9I5M7j0vpH8CSWFJwXbVPeYDjLCx9PA==",
"engines": {
"node": ">=16.15.0",
"npm": ">=8"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/uuid": { "node_modules/uuid": {
"version": "8.3.2", "version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
@ -5322,11 +5302,6 @@
} }
} }
}, },
"nprogress": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz",
"integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA=="
},
"oauth": { "oauth": {
"version": "0.9.15", "version": "0.9.15",
"resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",
@ -6051,12 +6026,6 @@
"integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==",
"requires": {} "requires": {}
}, },
"usehooks-ts": {
"version": "2.9.1",
"resolved": "https://registry.npmjs.org/usehooks-ts/-/usehooks-ts-2.9.1.tgz",
"integrity": "sha512-2FAuSIGHlY+apM9FVlj8/oNhd+1y+Uwv5QNkMQz1oSfdHk4PXo1qoCw9I5M7j0vpH8CSWFJwXbVPeYDjLCx9PA==",
"requires": {}
},
"uuid": { "uuid": {
"version": "8.3.2", "version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",

@ -23,7 +23,6 @@
"next": "13.0.2", "next": "13.0.2",
"next-auth": "4.16.4", "next-auth": "4.16.4",
"nodemailer": "^6.8.0", "nodemailer": "^6.8.0",
"nprogress": "^0.2.0",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-hook-form": "^7.39.2", "react-hook-form": "^7.39.2",
@ -31,7 +30,6 @@
"react-markdown": "8.0.3", "react-markdown": "8.0.3",
"react-spinners": "^0.13.7", "react-spinners": "^0.13.7",
"react-toastify": "^9.1.1", "react-toastify": "^9.1.1",
"usehooks-ts": "^2.9.1",
"yup": "^0.32.11", "yup": "^0.32.11",
"yup-phone": "^1.3.2" "yup-phone": "^1.3.2"
}, },

@ -26,8 +26,6 @@ import Link from "next/link";
import { TfiInfoAlt } from 'react-icons/tfi' import { TfiInfoAlt } from 'react-icons/tfi'
import { TfiGift } from 'react-icons/tfi' import { TfiGift } from 'react-icons/tfi'
import { toast } from "react-toastify"; import { toast } from "react-toastify";
import { Token } from "nodemailer/lib/xoauth2"; import { Token } from "nodemailer/lib/xoauth2";
import { isGeneratorFunction } from "util/types"; import { isGeneratorFunction } from "util/types";
@ -35,7 +33,6 @@ import { UserProps } from "../types/user";
import { UserGainProps } from "../types/userGain"; import { UserGainProps } from "../types/userGain";
import { Gain, Produit, User } from "@prisma/client"; import { Gain, Produit, User } from "@prisma/client";
type FormData = { type FormData = {
email: string; email: string;
name: string; name: string;
@ -172,12 +169,9 @@ const MonCompte = (props: Props) => {
<link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
</Head> </Head>
<div className={`${style['masthead']} d-flex justify-content-center align-items-center text-center`}> <div className={`${style['masthead']} d-flex justify-content-center align-items-center text-center`}>
<div className="container align-items-center d-flex flex-column"> <div className="container align-items-center d-flex flex-column">
<div className={`${style['bloc-content']} col-12 col-md-12`}> <div className={`${style['bloc-content']} col-12 col-md-12`}>
<div className="row"> <div className="row">
<div className="col-md-6 col-sm-12"> <div className="col-md-6 col-sm-12">
<hr /> <hr />
@ -185,14 +179,12 @@ const MonCompte = (props: Props) => {
<hr /> <hr />
<form onSubmit={handleSubmit(onSubmit)}> <form onSubmit={handleSubmit(onSubmit)}>
<div className="form-group"> <div className="form-group">
<div className="form-group row"> <div className="form-group row">
<label htmlFor="staticEmail" className="col-sm-3 col-form-label">Email :</label> <label htmlFor="staticEmail" className="col-sm-3 col-form-label">Email :</label>
<div className="col-sm-9"> <div className="col-sm-9">
<input type="text" readOnly className="form-control-plaintext text-sm-center" id="staticEmail" value={session?.user.email || ''} /> <input type="text" readOnly className="form-control-plaintext text-sm-center" id="staticEmail" value={session?.user.email || ''} />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="form-group row">
<label htmlFor="inputName" className="col-sm-3 col-form-label">Nom :</label> <label htmlFor="inputName" className="col-sm-3 col-form-label">Nom :</label>
<div className="col-sm-9"> <div className="col-sm-9">
@ -200,7 +192,6 @@ const MonCompte = (props: Props) => {
<div className="invalid-feedback alert alert-danger mt-2">{errors.name?.message}</div> <div className="invalid-feedback alert alert-danger mt-2">{errors.name?.message}</div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="form-group row">
<label htmlFor="surname" className="col-sm-3 col-form-label">Prenom :</label> <label htmlFor="surname" className="col-sm-3 col-form-label">Prenom :</label>
<div className="col-sm-9"> <div className="col-sm-9">
@ -208,7 +199,6 @@ const MonCompte = (props: Props) => {
<div className="invalid-feedback alert alert-danger mt-2">{errors.surname?.message}</div> <div className="invalid-feedback alert alert-danger mt-2">{errors.surname?.message}</div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="form-group row">
<label htmlFor="address" className="col-sm-3 col-form-label">Adresse :</label> <label htmlFor="address" className="col-sm-3 col-form-label">Adresse :</label>
<div className="col-sm-9"> <div className="col-sm-9">
@ -216,7 +206,6 @@ const MonCompte = (props: Props) => {
<div className="invalid-feedback alert alert-danger mt-2">{errors.address?.message}</div> <div className="invalid-feedback alert alert-danger mt-2">{errors.address?.message}</div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="form-group row">
<label htmlFor="zipCode" className="col-sm-3 col-form-label">Code postale :</label> <label htmlFor="zipCode" className="col-sm-3 col-form-label">Code postale :</label>
<div className="col-sm-9"> <div className="col-sm-9">
@ -224,7 +213,6 @@ const MonCompte = (props: Props) => {
<div className="invalid-feedback alert alert-danger mt-2">{errors.zipCode?.message}</div> <div className="invalid-feedback alert alert-danger mt-2">{errors.zipCode?.message}</div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="form-group row">
<label htmlFor="phoneNumber" className="col-sm-3 col-form-label">Téléphone :</label> <label htmlFor="phoneNumber" className="col-sm-3 col-form-label">Téléphone :</label>
<div className="col-sm-9"> <div className="col-sm-9">
@ -232,7 +220,6 @@ const MonCompte = (props: Props) => {
<div className="invalid-feedback alert alert-danger mt-2">{errors.phoneNumber?.message}</div> <div className="invalid-feedback alert alert-danger mt-2">{errors.phoneNumber?.message}</div>
</div> </div>
</div> </div>
<div className="form-group"> <div className="form-group">
<button <button
type="submit" type="submit"
@ -242,7 +229,6 @@ const MonCompte = (props: Props) => {
</button> </button>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<div className="col-md-6 col-sm-12"> <div className="col-md-6 col-sm-12">
@ -273,19 +259,8 @@ const MonCompte = (props: Props) => {
</table> </table>
} }
</div> </div>
</div> </div>
</div > </div >
</div> </div>
</div > </div >
</>) </>)

@ -4,7 +4,7 @@ import Head from "next/head";
import style from '../styles/ToutSavoir.module.css' import style from '../styles/ToutSavoir.module.css'
import test from '../public/images/coffret-the-PhotoRoom.webp'; import test from '../public/images/tea-with-three-jars.webp';
import prisma from "../lib/prisma"; import prisma from "../lib/prisma";
import Link from "next/link"; import Link from "next/link";
@ -67,16 +67,19 @@ const ToutSavoir = ({ produits }: Props) => {
return <div className="col-6 col-lg-3 d-flex justify-content-center my-2 my-lg-3" key={produit.id}> return <div className="col-6 col-lg-3 d-flex justify-content-center my-2 my-lg-3" key={produit.id}>
<div className={`${style.aCard} card`}> <div className={`${style.aCard} card`}>
<div className="d-flex justify-content-center p-3"> <div className="d-flex justify-content-center p-3">
<Image <Image
className="card-img-top" src={produit.image} className="card-img-top" src={produit.image}
width="286" width="286"
height="180" height="180"
alt="produit" alt="produit"
/> />
</div> </div>
<div className="card-body"> <div className="card-body d-flex flex-column h-100">
<h5 className="card-title">{produit.nomProduit}</h5> <h5 className="card-title">{produit.nomProduit}</h5>
<p className="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> <p className="card-text d-flex flex-column h-100">{produit.description}
<br />
<b className="mt-auto pt-2">Prix conseillé : {produit.prixTtc} €</b>
</p>
</div> </div>
</div> </div>
</div> </div>

@ -53,7 +53,7 @@ model User {
updatedAt DateTime @updatedAt @map(name: "updated_at") updatedAt DateTime @updatedAt @map(name: "updated_at")
accounts Account[] accounts Account[]
sessions Session[] sessions Session[]
gains Gain[] gains Gain[]
role Role @default(USER) role Role @default(USER)
@@map(name: "users") @@map(name: "users")
@ -77,11 +77,12 @@ model Gain {
} }
model Produit { model Produit {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
nomProduit String? nomProduit String?
prixTtc Int? prixTtc Int?
image String? image String?
refGain Gain[] description String?
refGain Gain[]
} }
enum Role { enum Role {

@ -1,28 +1,33 @@
import { Prisma } from "@prisma/client"; import { Prisma } from "@prisma/client";
export const produitsData: Prisma.ProduitCreateInput[] = [ export const produitsData: Prisma.ProduitCreateInput[] = [
{ {
nomProduit: 'Grand coffret découverte', nomProduit: 'Grand coffret découverte',
prixTtc: 69, prixTtc: 69,
image: '/images/cadeau.webp', image: '/images/coffret-degustation.webp',
}, description: "Une version XXL de notre fameux coffret découverte. Faites découvrir à vos invités leur saveur de thé préféré !"
{ },
nomProduit: 'Coffret découverte', {
prixTtc: 39, nomProduit: 'Coffret découverte',
image: '/images/cadeau.webp', prixTtc: 39,
}, image: '/images/coffret-degustation2.webp',
{ description: "Ce coffret élégant vous permettra de découvrir les différentes saveurs de la gamme de Thé Tip Top. Offrez à votre palais de nouveaux horizons de saveurs. Découvrez avec ce coffret votre parfum préféré !"
nomProduit: 'Thé signature', },
prixTtc: 10, {
image: '/images/cadeau.webp', nomProduit: 'Thé signature',
}, prixTtc: 10,
{ image: '/images/the-signature.webp',
nomProduit: 'Thé détox', description: "Le grand incontournable de notre gamme, le thé signature représente ce que Thé Tip Top souhaite vous transmettre : plus qu'un goût subtil et savoureux, c'est une expérience de saveur qui s'ouvre à vous !"
prixTtc: 6, },
image: '/images/cadeau.webp', {
}, nomProduit: 'Thé détox',
{ prixTtc: 6,
nomProduit: 'Infuseur à thé', image: '/images/the-detox.webp',
prixTtc: 3, description: "Notre thé détox soutient l’élimination des déchets et purifie le corps des toxines accumulées. Il lutte contre la rétention d’eau. Pour chasser les toxines, il n’y a pas mieux !"
image: '/images/cadeau.webp', },
}] {
nomProduit: 'Infuseur à thé',
prixTtc: 3,
image: '/images/infuseur.webp',
description: "Préparer un bon thé chaud ou glacé de façon rapide et ludique. Profiter d'une infusion parfaite : L’infuseur permet aux feuilles de thé de se déployer librement, pleinement et de libérer ainsi toutes les molécules aromatiques au contact de l’eau. "
}]

@ -21,7 +21,6 @@
bottom: 100%; bottom: 100%;
position: fixed; position: fixed;
z-index: 9001; z-index: 9001;
top: 0; top: 0;
left: 0; left: 0;
background-color: rgb(0, 0, 0); background-color: rgb(0, 0, 0);
@ -70,9 +69,6 @@
} }
@media screen and (max-height: 450px) { @media screen and (max-height: 450px) {
.overlay a { .overlay a {
font-size: 20px font-size: 20px
} }

@ -1,8 +1,31 @@
.aCard { .aCard {
width:200px; /* width:200px; */
max-width: 300px;
} }
.aCard img { .aCard img {
width:fit-content; width: fit-content;
block-size: -moz-fit-content; block-size: -moz-fit-content;
max-width: 100%; max-width: 100%;
} }
.aCard img,
.grosLot img {
height: fit-content;
}
.grosLot img {
border-radius: 0.375rem;
}
@media (min-width: 992px) {
.explicationContainer {
--padding-x: 15%;
padding-left: var(--padding-x);
padding-right: var(--padding-x);
}
.aCard div {
min-height: 205px;
}
}

@ -8,7 +8,7 @@ body {
font-size: small; font-size: small;
} }
body{ body {
background-image: url(/images/pageprincipale.webp); background-image: url(/images/pageprincipale.webp);
background-size: cover; background-size: cover;
background-position: 50% 50%; background-position: 50% 50%;
@ -16,14 +16,22 @@ body{
background-attachment: fixed; background-attachment: fixed;
} }
.layout-container{ @media (min-width: 992px) {
display : table;
html,
body {
font-size: medium;
}
}
.layout-container {
display: table;
width: 100%; width: 100%;
position:relative; position: relative;
min-height:100vh; min-height: 100vh;
} }
.body-content{ .body-content {
display: table-row-group; display: table-row-group;
} }
@ -56,3 +64,7 @@ a:hover {
--bs-btn-disabled-bg: var(--color2); --bs-btn-disabled-bg: var(--color2);
--bs-btn-disabled-border-color: var(--color2); --bs-btn-disabled-border-color: var(--color2);
} }
.link {
text-decoration: underline;
}
Loading…
Cancel
Save