1 Commits
v1.0.0 ... dev

Author SHA1 Message Date
Jose
2dcd44a384 fix: collaborator detection in backend and frontend
modify: backend build script
revert: clean search bar on create/edit in frontend
update: API urls in frontend
2026-03-07 03:10:02 +01:00
9 changed files with 12 additions and 15 deletions

View File

@@ -6,5 +6,5 @@ cd ..
cd huertos/ || exit cd huertos/ || exit
mvn clean package mvn clean package
cd .. cd ..
scp core/target/core-*.jar root@huertosbellavista.es:/root/transfer scp core/target/core-*.jar root@159.69.155.167:/root/transfer
scp huertos/target/huertos-*.jar root@huertosbellavista.es:/root/transfer scp huertos/target/huertos-*.jar root@159.69.155.167:/root/transfer

View File

@@ -4,7 +4,7 @@ import es.huertosbellavista.backend.huertos.dto.DropdownDto;
import es.huertosbellavista.backend.huertos.dto.MemberDto; import es.huertosbellavista.backend.huertos.dto.MemberDto;
import es.huertosbellavista.backend.huertos.dto.MemberProfileDto; import es.huertosbellavista.backend.huertos.dto.MemberProfileDto;
import es.huertosbellavista.backend.huertos.dto.WaitlistCensoredDto; import es.huertosbellavista.backend.huertos.dto.WaitlistCensoredDto;
import net.miarma.backend.huertos.dto.*; import es.huertosbellavista.backend.huertos.dto.*;
import es.huertosbellavista.backend.huertos.dto.view.VIncomesWithInfoDto; import es.huertosbellavista.backend.huertos.dto.view.VIncomesWithInfoDto;
import es.huertosbellavista.backend.huertos.security.HuertosPrincipal; import es.huertosbellavista.backend.huertos.security.HuertosPrincipal;
import es.huertosbellavista.backend.huertos.service.MemberService; import es.huertosbellavista.backend.huertos.service.MemberService;

View File

@@ -3,7 +3,7 @@ package es.huertosbellavista.backend.huertos.controller;
import es.huertosbellavista.backend.huertos.dto.RequestCountDto; import es.huertosbellavista.backend.huertos.dto.RequestCountDto;
import es.huertosbellavista.backend.huertos.dto.RequestDto; import es.huertosbellavista.backend.huertos.dto.RequestDto;
import es.huertosbellavista.backend.huertos.dto.RequestWithMetadataDto; import es.huertosbellavista.backend.huertos.dto.RequestWithMetadataDto;
import net.miarma.backend.huertos.dto.*; import es.huertosbellavista.backend.huertos.dto.*;
import es.huertosbellavista.backend.huertos.mapper.RequestMapper; import es.huertosbellavista.backend.huertos.mapper.RequestMapper;
import es.huertosbellavista.backend.huertos.mapper.RequestWithMetadataMapper; import es.huertosbellavista.backend.huertos.mapper.RequestWithMetadataMapper;
import es.huertosbellavista.backend.huertos.model.Request; import es.huertosbellavista.backend.huertos.model.Request;

View File

@@ -178,7 +178,8 @@
.toList(); .toList();
return plotMembers.stream() return plotMembers.stream()
.anyMatch(dto -> dto.metadata().getType().equals((byte)3)); .anyMatch(dto -> dto.metadata().getType().equals((byte)3) ||
dto.metadata().getType().equals((byte)0));
} }
public Boolean hasGreenhouse(Integer memberNumber) { public Boolean hasGreenhouse(Integer memberNumber) {

View File

@@ -1,7 +1,7 @@
{ {
"apiConfig": { "apiConfig": {
"baseUrl": "https://api.miarma.net/v2/huertos", "baseUrl": "https://api.huertosbellavista.es/v2/huertos",
"coreUrl": "https://api.miarma.net/v2/core", "coreUrl": "https://api.huertosbellavista.es/v2/core",
"endpoints": { "endpoints": {
"auth": { "auth": {
"login": "/auth/login", "login": "/auth/login",

View File

@@ -146,7 +146,7 @@ const SocioCard = ({ identity, isNew = false, onCreate, onUpdate, onDelete, onCa
if (!(createMode || editMode)) return; if (!(createMode || editMode)) return;
const latestNumber = import.meta.env.MODE === 'production' ? const latestNumber = import.meta.env.MODE === 'production' ?
await getData("https://api.miarma.net/v2/huertos/users/latest-number", {}, false) await getData("https://api.huertosbellavista.es/v2/huertos/users/latest-number", {}, false)
: await getData("http://localhost:8081/v2/huertos/users/latest-number", {}, false); : await getData("http://localhost:8081/v2/huertos/users/latest-number", {}, false);
const nuevoNumero = latestNumber + 1; const nuevoNumero = latestNumber + 1;

View File

@@ -28,7 +28,7 @@ const NewUserForm = ({ onSubmit, userType, plotNumber, fieldErrors }) => {
try { try {
const latestNumber = import.meta.env.MODE === 'production' ? const latestNumber = import.meta.env.MODE === 'production' ?
await getData("https://api.miarma.net/v2/huertos/users/latest-number", {}, false) await getData("https://api.huertosbellavista.es/v2/huertos/users/latest-number", {}, false)
: await getData("http://localhost:8081/v2/huertos/users/latest-number", {}, false); : await getData("http://localhost:8081/v2/huertos/users/latest-number", {}, false);
setForm((prev) => ({ setForm((prev) => ({
...prev, ...prev,

View File

@@ -79,7 +79,7 @@ export const useData = (config, onError) => {
headers: getAuthHeaders(), headers: getAuthHeaders(),
params: current.params, params: current.params,
}); });
setData([...response.data]); setData(response.data);
} catch (err) { } catch (err) {
const error = handleAxiosError(err); const error = handleAxiosError(err);
setError(error); setError(error);

View File

@@ -133,8 +133,6 @@ const SociosContent = ({ reqConfig }) => {
setCreatingSocio(false); setCreatingSocio(false);
setTempSocio(null); setTempSocio(null);
setFieldErrors(null); setFieldErrors(null);
setSearchTerm("");
setFilters({...filters, todos: true});
} catch (err) { } catch (err) {
setTempSocio({ ...newSocio }); setTempSocio({ ...newSocio });
if (err?.status === 422 && err?.errors) { if (err?.status === 422 && err?.errors) {
@@ -146,9 +144,7 @@ const SociosContent = ({ reqConfig }) => {
const handleEditSubmit = async (updatedSocio, userId) => { const handleEditSubmit = async (updatedSocio, userId) => {
console.log(updatedSocio); console.log(updatedSocio);
try { try {
await putData(`${reqConfig.baseUrl}/${userId}`, updatedSocio, true); await putData(`${reqConfig.baseUrl}/${userId}`, updatedSocio, true);
setSearchTerm("");
setFilters({...filters, todos: true});
} catch (err) { } catch (err) {
if (err?.status === 422 && err?.errors) { if (err?.status === 422 && err?.errors) {
setFieldErrors(err.errors); setFieldErrors(err.errors);