Commit 7d90752f authored by Diego Correa's avatar Diego Correa
Browse files

Merge branch pueblosmagicosconia:main into main

parents d3ac1740 235fe434
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -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,
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ export class CreatePointAndTradDto {
  @ApiProperty()
  contentES: string;
  @ApiProperty()
  directionsEN: string;
  directionsEN?: string;
  @ApiProperty()
  directionsES: string;
  directionsES?: string;
}
+1 −1
Original line number Diff line number Diff line
@@ -4,6 +4,6 @@ export class CreatePointTradDto {
  language: LANGUAGES;
  idPoint: number;
  content: string;
  directions: string;
  directions?: string;
  audioName: string;
}
+1 −1
Original line number Diff line number Diff line
@@ -4,5 +4,5 @@ export class getPointDto {
  name: string;
  imageName: string;
  content: string;
  directions: string;
  directions?: string;
}
+3 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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