Loading backend/src/pointOfInterest/PointOfInterest.service.ts +14 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,20 @@ export class PointOfInterestService { if (!place) { throw new BadRequestException('Place not found'); } const idPlace = place.idPlace; const points: getPointDto[] = await this.dataSource .getRepository(PointOfInterestTraduction) .createQueryBuilder('pointTrad') .leftJoin('pointTrad.idPoint', 'point') .select(['point.idPoint as idPoint', 'pointTrad.directions as directions', 'point.idPlace as idPlace']) .where('point.idPlace = :idPlace', { idPlace }) .andWhere('pointTrad.directions IS NULL') .getRawMany(); if (points.length > 0) { throw new BadRequestException('El ultimo punto ha sido registrado. Para agregar más, cambia el último punto'); } const createPointDto: CreatePointDto = { name: createPointAndTradDto.name, imageName: createPointAndTradDto.image, Loading backend/src/pointOfInterest/dto/create-pointAndTraduction.dto.ts +2 −2 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ export class CreatePointAndTradDto { @ApiProperty() contentES: string; @ApiProperty() directionsEN: string; directionsEN?: string; @ApiProperty() directionsES: string; directionsES?: string; } backend/src/pointOfInterest/dto/create-pointTrad.dto.ts +1 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,6 @@ export class CreatePointTradDto { language: LANGUAGES; idPoint: number; content: string; directions: string; directions?: string; audioName: string; } backend/src/pointOfInterest/dto/getPoint.dto.ts +1 −1 Original line number Diff line number Diff line Loading @@ -4,5 +4,5 @@ export class getPointDto { name: string; imageName: string; content: string; directions: string; directions?: string; } backend/src/visited/templates/visit_template.ts +3 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ export const visit_template = (places: string[]) => ` position: relative; display: flex; flex-direction: row; justify-content: center; align-items: center; height: 300px; width: 450px; gap: 10px; Loading @@ -29,7 +31,7 @@ export const visit_template = (places: string[]) => ` } .container .image { flex-grow: 1; max-width: 100%; max-width: 50%; height: 90%; border-radius: 10px; overflow: hidden; Loading Loading
backend/src/pointOfInterest/PointOfInterest.service.ts +14 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,20 @@ export class PointOfInterestService { if (!place) { throw new BadRequestException('Place not found'); } const idPlace = place.idPlace; const points: getPointDto[] = await this.dataSource .getRepository(PointOfInterestTraduction) .createQueryBuilder('pointTrad') .leftJoin('pointTrad.idPoint', 'point') .select(['point.idPoint as idPoint', 'pointTrad.directions as directions', 'point.idPlace as idPlace']) .where('point.idPlace = :idPlace', { idPlace }) .andWhere('pointTrad.directions IS NULL') .getRawMany(); if (points.length > 0) { throw new BadRequestException('El ultimo punto ha sido registrado. Para agregar más, cambia el último punto'); } const createPointDto: CreatePointDto = { name: createPointAndTradDto.name, imageName: createPointAndTradDto.image, Loading
backend/src/pointOfInterest/dto/create-pointAndTraduction.dto.ts +2 −2 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ export class CreatePointAndTradDto { @ApiProperty() contentES: string; @ApiProperty() directionsEN: string; directionsEN?: string; @ApiProperty() directionsES: string; directionsES?: string; }
backend/src/pointOfInterest/dto/create-pointTrad.dto.ts +1 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,6 @@ export class CreatePointTradDto { language: LANGUAGES; idPoint: number; content: string; directions: string; directions?: string; audioName: string; }
backend/src/pointOfInterest/dto/getPoint.dto.ts +1 −1 Original line number Diff line number Diff line Loading @@ -4,5 +4,5 @@ export class getPointDto { name: string; imageName: string; content: string; directions: string; directions?: string; }
backend/src/visited/templates/visit_template.ts +3 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ export const visit_template = (places: string[]) => ` position: relative; display: flex; flex-direction: row; justify-content: center; align-items: center; height: 300px; width: 450px; gap: 10px; Loading @@ -29,7 +31,7 @@ export const visit_template = (places: string[]) => ` } .container .image { flex-grow: 1; max-width: 100%; max-width: 50%; height: 90%; border-radius: 10px; overflow: hidden; Loading