fixing error message when passwords do not match / fixing placeholder image

This commit is contained in:
orangecoding
2026-05-02 20:00:11 +02:00
parent d7ee4f6909
commit 3de82dfa41
7 changed files with 15 additions and 14 deletions

View File

@@ -58,7 +58,7 @@ export default async function userPlugin(fastify) {
const { username, password, password2, isAdmin, userId } = request.body;
if (password !== password2) {
return reply.code(400).send({ error: 'Passwords does not match' });
return reply.code(400).send({ error: 'Passwords do not match.' });
}
if (nullOrEmpty(username) || nullOrEmpty(password) || nullOrEmpty(password2)) {
return reply.code(400).send({ error: 'Username and password are mandatory.' });

View File

@@ -1,6 +1,6 @@
{
"name": "fredy",
"version": "21.1.0",
"version": "21.1.1",
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
"scripts": {
"prepare": "husky",

View File

@@ -47,7 +47,7 @@ export default function UserTable({ user = [], onUserRemoval, onUserEdit } = {})
{
title: 'Last login',
dataIndex: 'lastLogin',
render: (value) => format(value),
render: (value) => (value == null ? '---' : format(value)),
},
{
title: 'Jobs',

View File

@@ -13,5 +13,3 @@ export function format(ts, showSeconds = true) {
...(showSeconds ? { second: 'numeric' } : {}),
}).format(ts);
}
export const roundToHour = (ts) => Math.ceil(ts / (1000 * 60 * 60)) * (1000 * 60 * 60);

View File

@@ -335,16 +335,12 @@ export default function ListingDetail() {
<Row>
<Col span={24} lg={12}>
<div className="listing-detail__image-container">
<div
className={`listing-detail__image-container${!listing.image_url ? ' listing-detail__image-container--placeholder' : ''}`}
>
<Image
src={listing.image_url ?? no_image}
fallback={
<img
src={no_image}
alt="No image available"
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
/>
}
fallback={<img src={no_image} alt="No image available" />}
style={{ width: '100%', height: '100%' }}
preview={!!listing.image_url}
/>

View File

@@ -69,6 +69,13 @@
object-fit: cover !important;
display: block !important;
}
&--placeholder {
img,
.semi-image-img {
object-fit: contain !important;
}
}
}
&__address-link {

View File

@@ -59,7 +59,7 @@ const UserMutator = function UserMutator() {
navigate('/users');
} catch (error) {
console.error(error);
Toast.error(error.json.message);
Toast.error(error.json.error);
}
};