Skip to content

Commit

Permalink
Fix api and frontend issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed May 30, 2024
1 parent 9ab372c commit b876f54
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 26 deletions.
1 change: 0 additions & 1 deletion api/src/models/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const userSchema = new Schema<env.User>(
},
bio: {
type: String,
maxlength: 100,
trim: true,
},
location: {
Expand Down
16 changes: 8 additions & 8 deletions backend/src/assets/css/car-list.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ section.car-list .empty-list {
color: #333;
font-size: 12px;
margin: 0 1px 10px;
height: 730px;
min-height: 730px;
padding: 15px;
}

Expand All @@ -50,7 +50,7 @@ section.car-list .empty-list {
font-weight: 700;
text-size-adjust: none;
line-height: 1.3em;
word-break: break-all;
word-break: break-word;
display: inline;
font-size: 2em;
font-weight: 700;
Expand All @@ -59,7 +59,7 @@ section.car-list .empty-list {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
}
Expand Down Expand Up @@ -108,7 +108,7 @@ section.car-list .empty-list {
line-height: 1em;
white-space: nowrap;
margin-left: 5px;
word-break: break-all;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
width: 180px;
Expand Down Expand Up @@ -231,7 +231,7 @@ section.car-list .empty-list {
color: #333;
font-size: 12px;
margin-bottom: 10px;
height: 430px;
min-height: 430px;
width: 800px;
}

Expand All @@ -246,7 +246,7 @@ section.car-list .empty-list {
font-weight: 700;
text-size-adjust: none;
line-height: 1.3em;
word-break: break-all;
word-break: break-word;
display: inline;
font-size: 2em;
font-weight: 700;
Expand All @@ -255,7 +255,7 @@ section.car-list .empty-list {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
}
Expand Down Expand Up @@ -309,7 +309,7 @@ section.car-list .empty-list {
line-height: 1em;
white-space: nowrap;
margin-left: 5px;
word-break: break-all;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
width: 100px;
Expand Down
16 changes: 8 additions & 8 deletions backend/src/assets/css/supplier.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ div.supplier {
font-weight: 400;
margin-top: 10px;
color: #676767;
word-wrap: break-word;
}

.supplier div.col-1 .supplier-bio-link {
display: flex;
flex-direction: row;
justify-content: center;

overflow: hidden;
word-break: break-word;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-align: center;
padding: 0 10px;
}

.supplier div.col-1 .supplier-actions {
Expand Down Expand Up @@ -68,10 +72,6 @@ div.supplier {
justify-content: center;
}

.supplier div.col-1 .car-count {
display: none;
}

.supplier div.col-2 {
display: flex;
flex-direction: column;
Expand Down
2 changes: 2 additions & 0 deletions backend/src/lang/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const strings = new LocalizedStrings({
SEND_MESSAGE: 'Envoyer un message',
VERIFIED: 'Compte vérifié',
CAR: 'voiture',
CARS: 'voitures',
RESEND_ACTIVATION_LINK: "Renvoyer le lien d'activation du compte",
ACTIVATION_EMAIL_SENT: "E-mail d'activation envoyé.",
EMAIL_NOT_VALID: 'E-mail non valide',
Expand Down Expand Up @@ -135,6 +136,7 @@ const strings = new LocalizedStrings({
SEND_MESSAGE: 'Send a message',
VERIFIED: 'Verified account',
CAR: 'car',
CARS: 'cars',
RESEND_ACTIVATION_LINK: 'Resend account activation link',
ACTIVATION_EMAIL_SENT: 'Activation email sent.',
EMAIL_NOT_VALID: 'Invalid email address',
Expand Down
2 changes: 1 addition & 1 deletion backend/src/pages/Cars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Cars = () => {
{strings.NEW_CAR}
</Button>

{rowCount > 0 && <InfoBox value={`${rowCount} ${commonStrings.CAR}${rowCount > 1 ? 's' : ''}`} className="car-count" />}
{rowCount > 0 && <InfoBox value={`${rowCount} ${rowCount > 1 ? commonStrings.CARS : commonStrings.CAR}`} className="car-count" />}

<SupplierFilter suppliers={allSuppliers} onChange={handleSupplierFilterChange} className="filter" />

Expand Down
2 changes: 1 addition & 1 deletion backend/src/pages/Supplier.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ const Supplier = () => {
</Tooltip>
)}
</div>
{rowCount > 0 && <InfoBox value={`${rowCount} ${commonStrings.CAR}${rowCount > 1 ? 's' : ''}`} className="car-count" />}
{rowCount > 0 && <InfoBox value={`${rowCount} ${rowCount > 1 ? commonStrings.CARS : commonStrings.CAR}`} className="car-count" />}
</div>
<div className="col-2">
<CarList
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/assets/css/car-list.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ section.car-list article .btn-book {
color: #333;
font-size: 12px;
margin: 0 1px 10px;
height: 750px;
min-height: 750px;
padding: 15px;
max-width: 480px;
}
Expand All @@ -54,7 +54,7 @@ section.car-list article .btn-book {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
}
Expand Down Expand Up @@ -103,7 +103,7 @@ section.car-list article .btn-book {
line-height: 1em;
white-space: nowrap;
margin-left: 5px;
word-break: break-all;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
width: 200px;
Expand Down Expand Up @@ -246,7 +246,7 @@ section.car-list article .btn-book {
color: #333;
font-size: 12px;
margin-bottom: 10px;
height: 430px;
min-height: 430px;
width: 800px;
}

Expand All @@ -266,7 +266,7 @@ section.car-list article .btn-book {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
}
Expand Down Expand Up @@ -320,7 +320,7 @@ section.car-list article .btn-book {
line-height: 1em;
white-space: nowrap;
margin-left: 5px;
word-break: break-all;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
width: 200px;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/assets/css/checkout.css
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ div.booking div.booking-details div.booking-detail div.booking-detail-value span
margin-left: 5px;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
word-break: break-word;
width: 200px;
}

Expand Down

0 comments on commit b876f54

Please sign in to comment.