Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for Feature/s06 client user profile #50

Draft
wants to merge 29 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
31b45ca
Merge remote-tracking branch 'origin/develop' into fix/s04_all
FlorenceBuchelet Jan 21, 2025
7d26287
localization to location and groupSizeMax to group_size_max, removed …
FlorenceBuchelet Jan 21, 2025
321ae2a
Merge branch 'fix/s06_client_Button' into feature/s06_client_user-pro…
FlorenceBuchelet Jan 21, 2025
90e3835
abusive merge :) with too many branches
FlorenceBuchelet Jan 22, 2025
8c04205
worked on profile form
FlorenceBuchelet Jan 22, 2025
89946fe
stuck on an asynchronicity issue in useUser
FlorenceBuchelet Jan 22, 2025
cf998d2
Florian's conditionnal query to distinguish owner and trainer
FlorenceBuchelet Jan 23, 2025
1ce8c00
Merge remote-tracking branch 'origin/feature/s06_client_protected-rou…
FlorenceBuchelet Jan 23, 2025
a9fdfe5
added avatar to User
FlorenceBuchelet Jan 23, 2025
517579a
WIP update user
FlorenceBuchelet Jan 23, 2025
b72f9a1
update user in user resolvers
FlorenceBuchelet Jan 28, 2025
b226f4e
update user test
FlorenceBuchelet Jan 28, 2025
d6788fe
update user test doc
FlorenceBuchelet Jan 28, 2025
97c1297
update in resolver ok, working on form submission
FlorenceBuchelet Jan 28, 2025
0c445aa
added style to Button to simplify the form submission
FlorenceBuchelet Jan 28, 2025
8b9d6bb
update profil ok
FlorenceBuchelet Jan 29, 2025
7214f5e
Merge remote-tracking branch 'origin/develop' into feature/s06_client…
FlorenceBuchelet Jan 29, 2025
5172a85
added clearer BEM naming in profile, worked on the secondary nav in p…
FlorenceBuchelet Jan 31, 2025
75ebec3
working on a toggle in profile
FlorenceBuchelet Jan 31, 2025
e060a33
fix folder name for windows
Dolpheus89 Feb 3, 2025
dbd6d83
renaming
FlorenceBuchelet Feb 3, 2025
c07dbfe
Merge branch 'develop' into feature/s06_client_user-profile
FlorenceBuchelet Feb 3, 2025
d2fedc7
edit pre-merge
FlorenceBuchelet Feb 3, 2025
1f5f37e
Merge branch 'develop' into feature/s06_client_user-profile
FlorenceBuchelet Feb 3, 2025
7c7fd18
Merge remote-tracking branch 'origin/develop' into feature/s06_client…
FlorenceBuchelet Feb 4, 2025
5eb1555
Merge remote-tracking branch 'origin/develop' into feature/s06_client…
FlorenceBuchelet Feb 4, 2025
bd51cc5
merge with develop
FlorenceBuchelet Feb 4, 2025
996993e
Merge remote-tracking branch 'origin/develop' into feature/s06_client…
FlorenceBuchelet Feb 5, 2025
854578d
merge with develop
FlorenceBuchelet Feb 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/src/components/_atoms/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ export default function Button({
</button>
);
}

// TODO: repenser les boutons pour que le formulaires se soumette
44 changes: 44 additions & 0 deletions client/src/components/_atoms/SearchBar/SearchBar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@import "@style";

.searchbar {
background-color: $primary-dark;
display: flex;
flex-direction: row;
align-items: center;
gap: 0.5rem;
padding: 0.5rem;
border-radius: $atoms-radius;
font-size: $s;

& * {
color: $font-light;
background-color: inherit;
}

&__label {
display: none;
}

&__button {
border: none;
cursor: pointer;
line-height: 0;

&--icon {
height: 1rem;
width: 1rem;
margin-inline-start: 1rem;
}
}

&__input {
border: none;
width: 100%;
border-radius: $atoms-radius;

&:focus {
outline: $primary-dark solid 1px;
outline-offset: 1px;
}
}
}
42 changes: 42 additions & 0 deletions client/src/components/_atoms/SearchBar/SearchBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { Search } from "@/assets/icons/search";
import "./SearchBar.scss";

const handleSearch = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
const query = event.currentTarget.q.value;
// biome-ignore lint/suspicious/noConsoleLog: console.log
console.log("Recherche pour :", query);
};

function SearchBar() {
return (
<form
role="search"
aria-label="Rechercher sur le site"
className="searchbar"
onSubmit={handleSearch}
>
<label htmlFor="search-input" className="searchbar__label">
Rechercher
</label>
<button
type="submit"
aria-label="Valider la recherche"
className="searchbar__button"
>
<Search aria-hidden="true" className="searchbar__button--icon" />
</button>
<input
type="search"
id="search-input"
name="q"
placeholder="Rechercher..."
aria-label="Rechercher un contenu"
required
className="searchbar__input"
/>
</form>
);
}

export default SearchBar;
6 changes: 2 additions & 4 deletions client/src/graphQL/queries/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ export const GET_ALL_OWNERS = gql`
query GetAllOwners {
getAllOwners {
id
lastname
firstname
name
email
phone_number
city
Expand All @@ -19,8 +18,7 @@ export const GET_USER_BY_EMAIL = gql`
query GetUserByEmail($email: String!) {
getUserByEmail(email: $email) {
id
lastname
firstname
name
email
phone_number
city
Expand Down
1 change: 1 addition & 0 deletions client/src/layouts/WelcomePage/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function Footer() {
</div>
<div className="welcomepage__footer--contact">
<Button
style="button"
type="button"
style="button"
className="welcomepage__footer--button"
Expand Down
16 changes: 9 additions & 7 deletions client/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ import Contact from "@/pages/WelcomePage/Contact.tsx";
import DesignSystem from "@/pages/DesignSystem/DesignSystem.tsx";
import ErrorPage from "./pages/ErrorPage/ErrorPage.tsx";
import Homepage from "@/pages/Homepage/Homepage.tsx";
import Id from "@/pages/Trainer/Customers/id/Id.tsx";
import List from "@/pages/Trainer/Customers/List/List.tsx";
import Login from "@/pages/Login/Login.tsx";
import NewPassword from "./pages/Login/NewPassword.tsx";
import Planning from "./pages/Planning/Planning.tsx";
import NewPassword from "@/pages/Login/NewPassword.tsx";
import Profile from "@/pages/Profile/Profile.tsx";
import Registration from "./pages/Registration/Registration.tsx";
import ResetLink from "./pages/Login/ResetLink.tsx";
import ResetPassword from "./pages/Login/ResetPassword.tsx";
import Registration from "@/pages/Registration/Registration.tsx";
import ResetPassword from "@/pages/Login/ResetPassword.tsx";
import ResetLink from "@/pages/Login/ResetLink.tsx";
import Planning from "./pages/Planning/Planning.tsx";
import Services from "@/pages/WelcomePage/Services.tsx";
import TestFileUpload from "./components/TestFileUpload.tsx";

Expand Down Expand Up @@ -170,11 +172,11 @@ const router = createBrowserRouter([
children: [
{
index: true,
element: <p>customers List</p>,
element: <List />,
},
{
path: ":id",
element: <p>customers/:id</p>,
element: <Id />,
},
],
},
Expand Down
240 changes: 120 additions & 120 deletions client/src/pages/Profile/Profile.scss
Original file line number Diff line number Diff line change
@@ -1,120 +1,120 @@
@import "@style";
.profile {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 1fr;
grid-column-gap: 10px;
grid-row-gap: 0px;
&__form {
grid-area: 1 / 1 / 2 / 3;
background-color: $beige-200;
border-radius: $windows-radius;
display: flex;
flex-direction: column;
padding: 1rem;
margin: 1rem;
& label {
font-weight: $bold;
}
& input,
textarea {
padding-inline: 1rem;
}
& textarea {
resize: none;
height: 10rem;
overflow: auto;
overflow-wrap: break-word;
width: 100%;
}
&--title,
&--names {
display: flex;
}
&--title {
align-items: center;
gap: 1rem;
& h2 {
font-size: $xxl;
}
& img {
max-height: 11vh;
}
}
&--names {
display: flex;
width: 100%;
justify-content: space-between;
gap: 1rem;
& .textInput {
width: 50%;
}
}
&--button {
margin-block: 3rem;
width: fit-content;
align-self: flex-end;
}
}
&__nav {
grid-area: 1 / 3 / 2 / 4;
display: flex;
flex-direction: column;
margin-inline-end: 1rem;
&--button {
align-items: stretch;
}
}
}
@media screen and (max-width: $mobile) {
.profile {
display: block;
&__form {
&--title {
justify-content: space-between;
& h2 {
width: 70%;
font-size: $xl;
}
}
&--names {
flex-direction: column;
& .textInput {
width: 100%;
}
}
&--button {
width: 100%;
}
}
&__nav {
margin: 1rem;
& h3 {
display: none;
}
}
}
}
@import "@style";

.profile {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 1fr;
grid-column-gap: 10px;
grid-row-gap: 0px;

&__form {
grid-area: 1 / 1 / 2 / 3;
background-color: $beige-200;
border-radius: $windows-radius;
display: flex;
flex-direction: column;
padding: 1rem;
margin: 1rem;

& label {
font-weight: $bold;
}

& input,
textarea {
padding-inline: 1rem;
}

& textarea {
resize: none;
height: 10rem;
overflow: auto;
overflow-wrap: break-word;
width: 100%;
}

&--title,
&--names {
display: flex;
}

&--title {
align-items: center;
gap: 1rem;

& h2 {
font-size: $xxl;
}

& img {
max-height: 11vh;
}
}

&--names {
display: flex;
width: 100%;
justify-content: space-between;
gap: 1rem;

& .textInput {
width: 50%;
}
}

&--button {
margin-block: 3rem;
width: fit-content;
align-self: flex-end;
}
}

&__nav {
grid-area: 1 / 3 / 2 / 4;
display: flex;
flex-direction: column;
margin-inline-end: 1rem;

&--button {
align-items: stretch;
}
}
}

@media screen and (max-width: $mobile) {
.profile {
display: block;

&__form {

&--title {
justify-content: space-between;

& h2 {
width: 70%;
font-size: $xl;
}
}

&--names {
flex-direction: column;

& .textInput {
width: 100%;
}
}

&--button {
width: 100%;
}
}

&__nav {
margin: 1rem;

& h3 {
display: none;
}
}
}
}
Loading