Commit b2958ce4 authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Merge branch 'main' into 'main'

Se agrega la funcionalidad para imprimir el pdf

See merge request !67
parents ddebe6a5 9bd8be1e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@ export class PlaceService {
    place.name = updatePlaceReqDto.name;
    place.openAt = updatePlaceReqDto.openAt;
    place.imageName = updatePlaceReqDto.image.filename;
    place.address = updatePlaceReqDto.address;

    // Update categories
    const categories: Category[] = [];
+62 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
        "@types/react-dom": "^18.2.21",
        "@vis.gl/react-google-maps": "^1.1.0",
        "axios": "^1.6.8",
        "buffer": "^6.0.3",
        "react": "^18.2.0",
        "react-data-table-component": "^7.6.2",
        "react-dom": "^18.2.0",
@@ -5844,6 +5845,25 @@
      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
    },
    "node_modules/base64-js": {
      "version": "1.5.1",
      "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
      "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/sponsors/feross"
        },
        {
          "type": "patreon",
          "url": "https://www.patreon.com/feross"
        },
        {
          "type": "consulting",
          "url": "https://feross.org/support"
        }
      ]
    },
    "node_modules/batch": {
      "version": "0.6.1",
      "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
@@ -6018,6 +6038,29 @@
        "node-int64": "^0.4.0"
      }
    },
    "node_modules/buffer": {
      "version": "6.0.3",
      "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
      "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/sponsors/feross"
        },
        {
          "type": "patreon",
          "url": "https://www.patreon.com/feross"
        },
        {
          "type": "consulting",
          "url": "https://feross.org/support"
        }
      ],
      "dependencies": {
        "base64-js": "^1.3.1",
        "ieee754": "^1.2.1"
      }
    },
    "node_modules/buffer-from": {
      "version": "1.1.2",
      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
@@ -9590,6 +9633,25 @@
        "node": ">=4"
      }
    },
    "node_modules/ieee754": {
      "version": "1.2.1",
      "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
      "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/sponsors/feross"
        },
        {
          "type": "patreon",
          "url": "https://www.patreon.com/feross"
        },
        {
          "type": "consulting",
          "url": "https://feross.org/support"
        }
      ]
    },
    "node_modules/ignore": {
      "version": "5.3.1",
      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
    "@types/react-dom": "^18.2.21",
    "@vis.gl/react-google-maps": "^1.1.0",
    "axios": "^1.6.8",
    "buffer": "^6.0.3",
    "react": "^18.2.0",
    "react-data-table-component": "^7.6.2",
    "react-dom": "^18.2.0",
+9 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ import './App.css';
import { AuthContextProvider } from './context/auth_context';
import { MessageContextProvider } from './context/message_context';
import { router } from './router/router';
import { ToastContainer } from 'react-toastify';


function App() {
@@ -13,6 +14,14 @@ function App() {
          <RouterProvider router={router}/>
        </MessageContextProvider>
      </AuthContextProvider>
      <ToastContainer
            position='bottom-right'
            autoClose = {1000}
            hideProgressBar = {true}
            closeOnClick
            rtl={false}
            pauseOnFocusLoss
          />
    </div>
  );
}
+6 −6
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ export const AdminPanelPlaceRegister = ({setWindowVisibility, idTown, categories
  } = usePlace(forceRenderList, setWindowVisibility);
  const [clickedCategories, setClickedCategories] = useState<boolean[]>(new Array(categoriesList.length).fill(false));  
  const [isLoading, setIsLoading] = useState(false);
  const [actualPlace, setActualPlace] = useState<Place>(EmptyPlace);
  const [actualPlace, setActualPlace] = useState<Place | null>(null);
  const [openHourInput, setOpenHourInput] = useState('');
  const [closeHourInput, setCloseHourInput] = useState('');

@@ -126,7 +126,7 @@ export const AdminPanelPlaceRegister = ({setWindowVisibility, idTown, categories
          onClick={() => setWindowVisibility(false)}/>
      </div>
      <div className="place_register_body">
        {isLoading
        {isLoading || (!isRegister && actualPlace===null)
            ?
              <LoadingScreen/>
            :
@@ -223,7 +223,7 @@ export const AdminPanelPlaceRegister = ({setWindowVisibility, idTown, categories
                  >
                      {availableDaysList.map((option, index) => {
                        return (
                          <option key={index} selected={option.option===actualPlace.available} value={index}>{option.name}</option>
                          <option key={index} selected={option.option===actualPlace?.available} value={index}>{option.name}</option>
                        );
                      })}
                  </select>
@@ -237,13 +237,13 @@ export const AdminPanelPlaceRegister = ({setWindowVisibility, idTown, categories
                        Inicio
                        <input
                          type="date"
                          defaultValue={actualPlace.startDate?.toString().substring(0,10)}
                          defaultValue={actualPlace?.startDate?.toString().substring(0,10)}
                          {...register('startDate')}
                        />
                        Cierre
                        <input
                          type="date"
                          defaultValue={actualPlace.endDate?.toString().substring(0,10)}
                          defaultValue={actualPlace?.endDate?.toString().substring(0,10)}
                          {...register('endDate')}
                        />
                    </div>
@@ -277,7 +277,7 @@ export const AdminPanelPlaceRegister = ({setWindowVisibility, idTown, categories
              <p className="error">{errors.categoriesId?.message}</p>
            </div>

            <MultipleImagesDropzone setValue={setValue} imagesList={actualPlace.imagesList}/>
            <MultipleImagesDropzone setValue={setValue} imagesList={actualPlace?.imagesList}/>
            <p className="error">{errors.imagesList?.message}</p>
            <input type="submit"/>
          </div>
Loading