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

make resposive of dashboard. #141

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion backend/database/database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ CREATE TABLE `user` (

LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES (1,'johny','demo','06 87 27 48 94','[email protected]','45 rue des cocotiers, Perpignan, 66100','$2b$05$qmUzhYqnfbiQyfY0NZXaueKkDbInhO4pzZGuLnTT5JAUq5BJgdbeK',0,'loremipsul-mdolor'
INSERT INTO `user` VALUES (1,'johny','demo','0687274894','[email protected]','45 rue des cocotiers, Perpignan, 66100','$2b$05$qmUzhYqnfbiQyfY0NZXaueKkDbInhO4pzZGuLnTT5JAUq5BJgdbeK',0,'loremipsul-mdolor'
),(
28,'erftgyhuj','rfghj','rftgyhuj','[email protected]','dcfvgbh','$2b$05$8K8lbcHYqN5jZqO8mFzLW.YC8n4yVcIjk8fyz18Ud/vgkMVmfhR/i',0,''
),(
Expand Down
20 changes: 5 additions & 15 deletions frontend/src/components/Dashboards/RowDash.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
.offerDash-item {
display: flex;
justify-content: space-between;
}

.offerDash-item {
display: flex;
background-color: var(--background-input);
display: grid;
grid-template-columns: repeat(5, 1fr);
margin-block: 10px;
padding: 5px 10px;
border-radius: 10px;
align-items: center;
background-color: var(--background-input);
border-radius: 10px;
}

.offerDash-item > p {
font-size: 14px;
}

.offerDash-item > p:nth-child(2) {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 70px;
width: 25%;
}

.icon-dash {
Expand Down
51 changes: 26 additions & 25 deletions frontend/src/components/Dashboards/RowDash2.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
.offerDash-item {
display: flex;
justify-content: space-between;
}

.offerDash-item {
display: flex;
background-color: var(--background-input);
.userDash-item {
display: grid;
grid-template-columns: repeat(7, 1fr);
margin-block: 10px;
padding: 5px 10px;
border-radius: 10px;
/* justify-content: center; */
align-items: center;
background-color: var(--background-input);
border-radius: 10px;
}

.offerDash-item > p {
.userDash-item > p {
font-size: 14px;
}

.offerDash-item > p:nth-child(2) {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 70px;
width: 14.2%;
}

.icon-dash {
Expand All @@ -30,23 +19,35 @@
}

@media screen and (min-width: 1200px) {
.offerDash-item > p {
.userDash-item > p {
font-size: 20px;
margin-block: 10px;
width: 14.2%;
}

.field-nbr {
max-width: 25px;
background-color: red;
}

.field-string {
max-width: 155px;
}

.offerDash-item > p:nth-child(1) {
white-space: initial;
min-width: 25px;
.field-long-string {
min-width: 210px;
}

.offerDash-item > p:nth-child(2) {
white-space: initial;
max-width: 100px;
.field-bool {
max-width: 25px;
margin-left: 75px;
}

.icon-dash {
flex-direction: row;
max-width: 65px;
margin-left: 50px;
background-color: red;
}

.icon-dash > button > i {
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/components/Dashboards/RowDash2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ function RowDash2() {
return (
<div className="rowDash-container">
{users.map((user) => (
<div key={user.id} className="offerDash-item">
<p className="array-box">{user.id}</p>
<p className="array-box">{user.lastname}</p>
<p className="array-box">{user.firstname}</p>
<p className="array-box">{user.phone}</p>
<p className="bigArray-box">{user.email}</p>
<p>{user.is_admin}</p>
<div key={user.id} className="userDash-item">
<p className="field-nbr">{user.id}</p>
<p className="field-string">{user.lastname}</p>
<p className="field-string">{user.firstname}</p>
<p className="field-string">{user.phone}</p>
<p className="field-long-string">{user.email}</p>
<p className="field-bool">{user.is_admin}</p>
<div className="icon-dash">
<button
type="button"
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/Dashboard/Dashboard3.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function Dashboard3() {
labelDash3="Prénoms"
labelDash4="Tel"
labelDash5="Email"
labelDash6="Administrateur"
labelDash7=" "
labelDash6="Admin"
labelDash7="Action"
/>
</div>
<RowDash2 />
Expand Down
Loading