diff --git a/INSIGHTSAPI/INSIGHTSAPI/celery.py b/INSIGHTSAPI/INSIGHTSAPI/celery.py index 01d6a71..74e1b8e 100644 --- a/INSIGHTSAPI/INSIGHTSAPI/celery.py +++ b/INSIGHTSAPI/INSIGHTSAPI/celery.py @@ -10,3 +10,5 @@ app.config_from_object("django.conf:settings", namespace="CELERY") app.autodiscover_tasks(["INSIGHTSAPI"]) + +app.log.setup() \ No newline at end of file diff --git a/INSIGHTSAPI/INSIGHTSAPI/settings.py b/INSIGHTSAPI/INSIGHTSAPI/settings.py index 525d7c7..ebcd16a 100644 --- a/INSIGHTSAPI/INSIGHTSAPI/settings.py +++ b/INSIGHTSAPI/INSIGHTSAPI/settings.py @@ -392,7 +392,7 @@ def str_to_bool(value: str) -> bool: # LDAP configuration AUTH_LDAP_SERVER_URI = "ldap://CYC-SERVICES.COM.CO:389" AUTH_LDAP_BIND_DN = "CN=StaffNet,OU=TECNOLOGÍA,OU=BOGOTA,DC=CYC-SERVICES,DC=COM,DC=CO" -AUTH_LDAP_BIND_PASSWORD = os.getenv("AdminLDAPPassword") +AUTH_LDAP_BIND_PASSWORD = os.environ["AdminLDAPPassword"] # AUTH_LDAP_USER_SEARCH = LDAPSearch( # "OU=BOGOTA,DC=CYC-SERVICES,DC=COM,DC=CO", # Search base diff --git a/INSIGHTSAPI/services/tests.py b/INSIGHTSAPI/services/tests.py index 82463bb..2c31639 100644 --- a/INSIGHTSAPI/services/tests.py +++ b/INSIGHTSAPI/services/tests.py @@ -9,6 +9,7 @@ from django.test import TestCase, Client, override_settings from django.urls import reverse from django.conf import settings +from django.core.cache import cache from users.models import User from services.models import Answer from hierarchy.models import Area, JobPosition @@ -140,6 +141,9 @@ def test_send_report_ethical_line_with_contact(self): class HolidayTest(TestCase): """Test for holidays.""" + def setUp(self): + cache.clear() + def test_holiday(self): """Test that the holiday is a holiday.""" self.assertTrue(holidays.Colombia().get("2022-01-01")) @@ -152,7 +156,7 @@ def test_get_holidays(self): """Test that the holidays are retrieved.""" response = self.client.get("/services/holidays/2024/") self.assertEqual(response.status_code, 200, response.data) - self.assertEqual(response.data, holidays.CO(years=range(2024, 2026)).items()) + self.assertEqual(response.data, list(holidays.CO(years=range(2024, 2026)).items())) class QuestionTest(BaseTestCase): diff --git a/INSIGHTSAPI/services/views.py b/INSIGHTSAPI/services/views.py index b2c53df..81a21c6 100644 --- a/INSIGHTSAPI/services/views.py +++ b/INSIGHTSAPI/services/views.py @@ -4,6 +4,7 @@ import os import holidays from rest_framework.response import Response +from django.http import JsonResponse from django.views.decorators.cache import cache_page, cache_control from rest_framework.decorators import api_view, permission_classes from rest_framework.permissions import AllowAny @@ -88,7 +89,7 @@ def get_holidays(request, year): except ValueError: return Response({"error": "El año debe ser un número"}, status=400) # Get the holidays of the year and the next year - holidays_year = holidays.CO(years=range(year, year + 2)).items() + holidays_year = list(holidays.CO(years=range(year, year + 2)).items()) return Response(holidays_year, status=200) diff --git a/INSIGHTSAPI/vacation/serializers.py b/INSIGHTSAPI/vacation/serializers.py index 1c0c1a7..ceb8b58 100644 --- a/INSIGHTSAPI/vacation/serializers.py +++ b/INSIGHTSAPI/vacation/serializers.py @@ -128,6 +128,16 @@ def validate(self, attrs): raise serializers.ValidationError( "No puedes crear una solicitud para este usuario." ) + else: + # Update + if ( + self.instance.manager_approbation + and "status" in attrs + and attrs["status"] == "CANCELADA" + ): + raise serializers.ValidationError( + "No puedes cancelar una solicitud que ya ha sido aprobada por tu jefe." + ) return attrs def create(self, validated_data): diff --git a/INSIGHTSAPI/vacation/templates/vacation_request.html b/INSIGHTSAPI/vacation/templates/vacation_request.html index 09c9759..ea76545 100644 --- a/INSIGHTSAPI/vacation/templates/vacation_request.html +++ b/INSIGHTSAPI/vacation/templates/vacation_request.html @@ -9,14 +9,13 @@ html, body { height: 100%; - margin: 0; - padding: 0; + margin: -100px 10px 0px 10px; font-family: 'Helvetica Neue', Arial, sans-serif; color: #333; line-height: 1.6; - background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), - url('https://insights-api.cyc-bpo.com/static/images/just_logo.png') no-repeat center center; - background-size: cover; + text-align: center; + align-items: center; + font-size: 20px; display: flex; justify-content: center; } @@ -26,7 +25,6 @@ } .header { - text-align: center; margin-top: 80px; margin-bottom: 40px; } @@ -38,26 +36,14 @@ letter-spacing: 1px; } - .content p { - margin-bottom: 15px; - font-size: 18px; - text-align: justify; - } - .signature { - margin-top: 30px; + margin-top: 200px; text-align: center; } .signature p { margin: 5px 0; - } - - .signature-line { - margin: 150px 0 10px 0; - padding-top: 10px; - font-size: 18px; - font-style: italic; + text-align: left; } .footer { @@ -66,23 +52,6 @@ text-align: center; color: #777; } - - @media print { - body { - padding: 0; - margin: 0; - height: auto; - background: none; - } - - .card { - margin: 0; - padding: 20px; - box-shadow: none; - width: 100%; - height: auto; - } - } @@ -93,10 +62,11 @@

Estimado (a) Gestión Humana

CYC SERVICES S.A.S.

+

Ref. Solicitud de vacaciones disfrutadas


Por la presente le solicito se me conceda {{ vacation.duration }} días de mi periodo vacacional - comprendido para el año {{ vacation.start_date|date:"Y" }}, + comprendido para el año {{ vacation.start_date|date:"Y" }}.

Los días tomados serán a partir del {{ vacation.start_date }} hasta el día {{ vacation.end_date }}, para diff --git a/INSIGHTSAPI/vacation/tests.py b/INSIGHTSAPI/vacation/tests.py index aa52eb6..6b00962 100644 --- a/INSIGHTSAPI/vacation/tests.py +++ b/INSIGHTSAPI/vacation/tests.py @@ -170,7 +170,7 @@ def test_vacation_list_manager(self): Q(user__job_position__rank__lt=self.user.job_position.rank) & Q(user__area=self.user.area) ) - ) + ).order_by("-created_at") serializer = VacationRequestSerializer(vacation_requests, many=True) self.assertEqual(response.data, serializer.data) self.assertEqual(response.status_code, status.HTTP_200_OK) @@ -289,10 +289,12 @@ def test_vacation_owner_cancel_approved(self): reverse("vacation-detail", kwargs={"pk": vacation_object.pk}), {"status": "CANCELADA"}, ) - self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST, response.data) self.assertEqual( - response.data["non_field_errors"][0], - "No puedes cancelar una solicitud aprobada.", + response.status_code, status.HTTP_400_BAD_REQUEST, response.data + ) + self.assertEqual( + str(response.data["non_field_errors"][0]), + "No puedes cancelar una solicitud que ya ha sido aprobada por tu jefe.", ) def test_vacation_cancel_no_owner(self): diff --git a/INSIGHTSAPI/vacation/views.py b/INSIGHTSAPI/vacation/views.py index 4bece80..bef5069 100644 --- a/INSIGHTSAPI/vacation/views.py +++ b/INSIGHTSAPI/vacation/views.py @@ -19,7 +19,7 @@ class VacationRequestViewSet(viewsets.ModelViewSet): - queryset = VacationRequest.objects.all().select_related("user", "uploaded_by") + queryset = VacationRequest.objects.all().select_related("user", "uploaded_by").order_by("-created_at") serializer_class = VacationRequestSerializer permission_classes = [IsAuthenticated] @@ -291,15 +291,7 @@ def partial_update(self, request, *args, **kwargs): and request.user == self.get_object().user and request.data["status"] == "CANCELADA" ): - if self.get_object().manager_approbation: - return Response( - { - "detail": "No puedes cancelar una solicitud de vacaciones aprobada." - }, - status=status.HTTP_400_BAD_REQUEST, - ) - else: - return super().partial_update(request, *args, **kwargs) + return super().partial_update(request, *args, **kwargs) return Response( {"detail": "You do not have permission to perform this action."}, diff --git a/package.json b/package.json index 6e0d0b9..3c64794 100644 --- a/package.json +++ b/package.json @@ -16,10 +16,11 @@ "@mui/lab": "5.0.0-alpha.173", "@mui/material": "^5.16.7", "@mui/x-data-grid": "^7.16.0", - "@sentry/react": "^8.29.0", + "@sentry/react": "^8.30.0", "@sentry/vite-plugin": "^2.22.4", "cally": "^0.7.1", "depcheck": "^1.4.7", + "embla-carousel-autoplay": "^8.2.1", "formik": "^2.4.6", "lodash": "^4.17.21", "node-fetch": "^3.3.2", @@ -36,6 +37,7 @@ "devDependencies": { "@types/react": "^18.3.5", "@vitejs/plugin-react": "^4.3.1", + "rollup-plugin-visualizer": "^5.12.0", "vite": "^5.4.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d9038c..24f1282 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,8 +24,8 @@ dependencies: specifier: ^7.16.0 version: 7.16.0(@emotion/react@11.13.3)(@emotion/styled@11.13.0)(@mui/material@5.16.7)(@mui/system@5.16.7)(@types/react@18.3.5)(react-dom@18.3.1)(react@18.3.1) '@sentry/react': - specifier: ^8.29.0 - version: 8.29.0(react@18.3.1) + specifier: ^8.30.0 + version: 8.30.0(react@18.3.1) '@sentry/vite-plugin': specifier: ^2.22.4 version: 2.22.4 @@ -35,6 +35,12 @@ dependencies: depcheck: specifier: ^1.4.7 version: 1.4.7 + embla-carousel-autoplay: + specifier: ^8.2.1 + version: 8.2.1(embla-carousel@8.2.1) + embla-carousel-react: + specifier: ^8.2.1 + version: 8.2.1(react@18.3.1) formik: specifier: ^2.4.6 version: 2.4.6(react@18.3.1) @@ -79,6 +85,9 @@ devDependencies: '@vitejs/plugin-react': specifier: ^4.3.1 version: 4.3.1(vite@5.4.3) + rollup-plugin-visualizer: + specifier: ^5.12.0 + version: 5.12.0 vite: specifier: ^5.4.3 version: 5.4.3 @@ -1064,42 +1073,42 @@ packages: dev: true optional: true - /@sentry-internal/browser-utils@8.29.0: - resolution: {integrity: sha512-6HpyQkaqPvK6Lnigjlarq/LDYgXT2OBNf24RK7z0ipJSxSIpmtelfzHbnwWYnypNDXfTDdPm97fZEenQHryYJA==} + /@sentry-internal/browser-utils@8.30.0: + resolution: {integrity: sha512-pwX+awNWaxSOAsBLVLqc1+Hw+Fm1Nci9mbKFA6Ed5YzCG049PnBVQwugpmx2dcyyCqJpORhcIqb9jHdCkYmCiA==} engines: {node: '>=14.18'} dependencies: - '@sentry/core': 8.29.0 - '@sentry/types': 8.29.0 - '@sentry/utils': 8.29.0 + '@sentry/core': 8.30.0 + '@sentry/types': 8.30.0 + '@sentry/utils': 8.30.0 dev: false - /@sentry-internal/feedback@8.29.0: - resolution: {integrity: sha512-yAL5YMEFk4XaeVRUGEguydahRzaQrNPAaWRv6k+XRzCv9CGBhxb14KXQc9X/penlauMFcDfgelCPKcTqcf6wDw==} + /@sentry-internal/feedback@8.30.0: + resolution: {integrity: sha512-ParFRxQY6helxkwUDmro77Wc5uSIC6rZos88jYMrYwFmoTJaNWf4lDzPyECfdSiSYyzSMZk4dorSUN85Ul7DCg==} engines: {node: '>=14.18'} dependencies: - '@sentry/core': 8.29.0 - '@sentry/types': 8.29.0 - '@sentry/utils': 8.29.0 + '@sentry/core': 8.30.0 + '@sentry/types': 8.30.0 + '@sentry/utils': 8.30.0 dev: false - /@sentry-internal/replay-canvas@8.29.0: - resolution: {integrity: sha512-W2YbZRvp2lYC50V51fNLcnoIiK1Km4vSc+v6SL7c//lv2qpyumoUAAIDKY+14s8Lgt1RsR6rfZhfheD4O/6WSQ==} + /@sentry-internal/replay-canvas@8.30.0: + resolution: {integrity: sha512-y/QqcvchhtMlVA6eOZicIfTxtZarazQZJuFW0018ynPxBTiuuWSxMCLqduulXUYsFejfD8/eKHb3BpCIFdDYjg==} engines: {node: '>=14.18'} dependencies: - '@sentry-internal/replay': 8.29.0 - '@sentry/core': 8.29.0 - '@sentry/types': 8.29.0 - '@sentry/utils': 8.29.0 + '@sentry-internal/replay': 8.30.0 + '@sentry/core': 8.30.0 + '@sentry/types': 8.30.0 + '@sentry/utils': 8.30.0 dev: false - /@sentry-internal/replay@8.29.0: - resolution: {integrity: sha512-Xgv/eYucsm7GaGKms2ClQ02NpD07MxjoTjp1/vYZm0H4Q08dVphVZrQp7hL1oX/VD9mb5SFyyKuuIRqIu7S8RA==} + /@sentry-internal/replay@8.30.0: + resolution: {integrity: sha512-/KFre+BrovPCiovgAu5N1ErJtkDVzkJA5hV3Jw011AlxRWxrmPwu6+9sV9/rn3tqYAGyq6IggYqeIOHhLh1Ihg==} engines: {node: '>=14.18'} dependencies: - '@sentry-internal/browser-utils': 8.29.0 - '@sentry/core': 8.29.0 - '@sentry/types': 8.29.0 - '@sentry/utils': 8.29.0 + '@sentry-internal/browser-utils': 8.30.0 + '@sentry/core': 8.30.0 + '@sentry/types': 8.30.0 + '@sentry/utils': 8.30.0 dev: false /@sentry/babel-plugin-component-annotate@2.22.4: @@ -1107,17 +1116,17 @@ packages: engines: {node: '>= 14'} dev: false - /@sentry/browser@8.29.0: - resolution: {integrity: sha512-aKTy4H/3RI0q9LIeepesjWGlGNeh4HGFfwQjzHME8gcWCQ5LSlzYX4U+hu2yp7r1Jfd9MUTFfOuuLih2HGLGsQ==} + /@sentry/browser@8.30.0: + resolution: {integrity: sha512-M+tKqawH9S3CqlAIcqdZcHbcsNQkEa9MrPqPCYvXco3C4LRpNizJP2XwBiGQY2yK+fOSvbaWpPtlI938/wuRZQ==} engines: {node: '>=14.18'} dependencies: - '@sentry-internal/browser-utils': 8.29.0 - '@sentry-internal/feedback': 8.29.0 - '@sentry-internal/replay': 8.29.0 - '@sentry-internal/replay-canvas': 8.29.0 - '@sentry/core': 8.29.0 - '@sentry/types': 8.29.0 - '@sentry/utils': 8.29.0 + '@sentry-internal/browser-utils': 8.30.0 + '@sentry-internal/feedback': 8.30.0 + '@sentry-internal/replay': 8.30.0 + '@sentry-internal/replay-canvas': 8.30.0 + '@sentry/core': 8.30.0 + '@sentry/types': 8.30.0 + '@sentry/utils': 8.30.0 dev: false /@sentry/bundler-plugin-core@2.22.4: @@ -1126,7 +1135,7 @@ packages: dependencies: '@babel/core': 7.25.2 '@sentry/babel-plugin-component-annotate': 2.22.4 - '@sentry/cli': 2.36.0 + '@sentry/cli': 2.36.1 dotenv: 16.4.5 find-up: 5.0.0 glob: 9.3.5 @@ -1137,16 +1146,16 @@ packages: - supports-color dev: false - /@sentry/cli-darwin@2.36.0: - resolution: {integrity: sha512-+vqJN7wycr7Tt/UICHNtctfDnmISwMqox2Izhb29+nh2j+xsEwHBTdlVolw8e5rb97Sm/sGG+0msSlPUBF4f1g==} + /@sentry/cli-darwin@2.36.1: + resolution: {integrity: sha512-JOHQjVD8Kqxm1jUKioAP5ohLOITf+Dh6+DBz4gQjCNdotsvNW5m63TKROwq2oB811p+Jzv5304ujmN4cAqW1Ww==} engines: {node: '>=10'} os: [darwin] requiresBuild: true dev: false optional: true - /@sentry/cli-linux-arm64@2.36.0: - resolution: {integrity: sha512-stFAgqpDN2sy0B4lB8hq1R2cWZAxeeqTYvJHiNBTUDuEUrTS3HxTftXgX28cBXHKjFanTC58jraw5dfm8KjRUA==} + /@sentry/cli-linux-arm64@2.36.1: + resolution: {integrity: sha512-R//3ZEkbzvoStr3IA7nxBZNiBYyxOljOqAhgiTnejXHmnuwDzM3TBA2n5vKPE/kBFxboEBEw0UTzTIRb1T0bgw==} engines: {node: '>=10'} cpu: [arm64] os: [linux, freebsd] @@ -1154,8 +1163,8 @@ packages: dev: false optional: true - /@sentry/cli-linux-arm@2.36.0: - resolution: {integrity: sha512-Nc6yOFTJrTbTyX8H2f/uEJSZ0uK0YQ955UzV8mqbcQpycEzMD1kkxidu3AauT9fNJlzwx5rx4UGmHSjZkzFhAw==} + /@sentry/cli-linux-arm@2.36.1: + resolution: {integrity: sha512-gvEOKN0fWL2AVqUBKHNXPRZfJNvKTs8kQhS8cQqahZGgZHiPCI4BqW45cKMq+ZTt1UUbLmt6khx5Dz7wi+0i5A==} engines: {node: '>=10'} cpu: [arm] os: [linux, freebsd] @@ -1163,8 +1172,8 @@ packages: dev: false optional: true - /@sentry/cli-linux-i686@2.36.0: - resolution: {integrity: sha512-Liis5qyDcnmq5X4B1M5vOH/3vO7uvLF1dXwLRGCrrsA8olDh/v9cMMNcG7n7GfkVbvf6PPg32JiJ0SwG7ZL2ZA==} + /@sentry/cli-linux-i686@2.36.1: + resolution: {integrity: sha512-R7sW5Vk/HacVy2YgQoQB+PwccvFYf2CZVPSFSFm2z7MEfNe77UYHWUq+sjJ4vxWG6HDWGVmaX0fjxyDkE01JRA==} engines: {node: '>=10'} cpu: [x86, ia32] os: [linux, freebsd] @@ -1172,8 +1181,8 @@ packages: dev: false optional: true - /@sentry/cli-linux-x64@2.36.0: - resolution: {integrity: sha512-myzppIE+008jKZdDzkNIHm0FdIk94l6GNk0A3XYh7r9S/sTMWaxq6u6CR2aqDX1X18Ksh7kxHhMnKep4Fd+TqQ==} + /@sentry/cli-linux-x64@2.36.1: + resolution: {integrity: sha512-UMr3ik8ksA7zQfbzsfwCb+ztenLnaeAbX94Gp+bzANZwPfi/vVHf2bLyqsBs4OyVt9SPlN1bbM/RTGfMjZ3JOw==} engines: {node: '>=10'} cpu: [x64] os: [linux, freebsd] @@ -1181,8 +1190,8 @@ packages: dev: false optional: true - /@sentry/cli-win32-i686@2.36.0: - resolution: {integrity: sha512-as/TKSH1evLKMkziRQklpKjwwVuqs1LST/Od544XISbGwUPtMTP9rOyzc3zxT2LI9dfSshJP/wRWru2oytBGkg==} + /@sentry/cli-win32-i686@2.36.1: + resolution: {integrity: sha512-CflvhnvxPEs5GWQuuDtYSLqPrBaPbcSJFlBuUIb+8WNzRxvVfjgw1qzfZmkQqABqiy/YEsEekllOoMFZAvCcVA==} engines: {node: '>=10'} cpu: [x86, ia32] os: [win32] @@ -1190,8 +1199,8 @@ packages: dev: false optional: true - /@sentry/cli-win32-x64@2.36.0: - resolution: {integrity: sha512-9Adpiadr/mMWkNQaWDy3hL6P0WV1P1fYzZiQxSh0xRkRCbyV27LKeJvVjhmGiZOlygZFzksZW9qNDd4d6BmEXQ==} + /@sentry/cli-win32-x64@2.36.1: + resolution: {integrity: sha512-wWqht2xghcK3TGnooHZSzA3WSjdtno/xFjZLvWmw38rblGwgKMxLZnlxV6uDyS+OJ6CbfDTlCRay/0TIqA0N8g==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -1199,8 +1208,8 @@ packages: dev: false optional: true - /@sentry/cli@2.36.0: - resolution: {integrity: sha512-GraZSztW394hxI1btVDYGyGkM2Wr7UK4vItBIm62xh7rpNkX7Ia4nWUC9inuzK5THEk4GbF/F89J3mb8QJt47g==} + /@sentry/cli@2.36.1: + resolution: {integrity: sha512-gzK5uQKDWKhyH5udoB5+oaUNrS//urWyaXgKvHKz4gFfl744HuKY9dpLPP2nMnf0zLGmGM6xJnMXLqILq0mtxw==} engines: {node: '>= 10'} hasBin: true requiresBuild: true @@ -1211,50 +1220,50 @@ packages: proxy-from-env: 1.1.0 which: 2.0.2 optionalDependencies: - '@sentry/cli-darwin': 2.36.0 - '@sentry/cli-linux-arm': 2.36.0 - '@sentry/cli-linux-arm64': 2.36.0 - '@sentry/cli-linux-i686': 2.36.0 - '@sentry/cli-linux-x64': 2.36.0 - '@sentry/cli-win32-i686': 2.36.0 - '@sentry/cli-win32-x64': 2.36.0 + '@sentry/cli-darwin': 2.36.1 + '@sentry/cli-linux-arm': 2.36.1 + '@sentry/cli-linux-arm64': 2.36.1 + '@sentry/cli-linux-i686': 2.36.1 + '@sentry/cli-linux-x64': 2.36.1 + '@sentry/cli-win32-i686': 2.36.1 + '@sentry/cli-win32-x64': 2.36.1 transitivePeerDependencies: - encoding - supports-color dev: false - /@sentry/core@8.29.0: - resolution: {integrity: sha512-scMbZaJ0Ov8NPgWn86EdjhyTLrhvRVbTxjg0imJAvhIvRbblH3xyqye/17Qnk2fOp8TNDOl7TBZHi0NCFQ5HUw==} + /@sentry/core@8.30.0: + resolution: {integrity: sha512-CJ/FuWLw0QEKGKXGL/nm9eaOdajEcmPekLuHAuOCxID7N07R9l9laz3vFbAkUZ97GGDv3sYrJZgywfY3Moropg==} engines: {node: '>=14.18'} dependencies: - '@sentry/types': 8.29.0 - '@sentry/utils': 8.29.0 + '@sentry/types': 8.30.0 + '@sentry/utils': 8.30.0 dev: false - /@sentry/react@8.29.0(react@18.3.1): - resolution: {integrity: sha512-ux+9rNHx2ZyWC94OBb5K1HFQU/v64gL/n3co9e/3cD9nUnqXMJuw/IofiwD1fv6nfdWECLU50A1OtXhA9/c+XQ==} + /@sentry/react@8.30.0(react@18.3.1): + resolution: {integrity: sha512-ktQjXs87jdsxW0YrHci3sb6zcSzhMECWnrTVU/KGZF8UoDsk4P4xRCknijd2SSmDIjSkwzUAANR43UkCi4BTQg==} engines: {node: '>=14.18'} peerDependencies: react: ^16.14.0 || 17.x || 18.x || 19.x dependencies: - '@sentry/browser': 8.29.0 - '@sentry/core': 8.29.0 - '@sentry/types': 8.29.0 - '@sentry/utils': 8.29.0 + '@sentry/browser': 8.30.0 + '@sentry/core': 8.30.0 + '@sentry/types': 8.30.0 + '@sentry/utils': 8.30.0 hoist-non-react-statics: 3.3.2 react: 18.3.1 dev: false - /@sentry/types@8.29.0: - resolution: {integrity: sha512-j4gX3ctzgD4xVWllXAhm6M+kHFEvrFoUPFq60X/pgkjsWCocGuhtNfB0rW43ICG8hCnlz8IYl7O7b8V8qY7SPg==} + /@sentry/types@8.30.0: + resolution: {integrity: sha512-kgWW2BCjBmVlSQRG32GonHEVyeDbys74xf9mLPvynwHTgw3+NUlNAlEdu05xnb2ow4bCTHfbkS5G1zRgyv5k4Q==} engines: {node: '>=14.18'} dev: false - /@sentry/utils@8.29.0: - resolution: {integrity: sha512-nb93/m3SjQChQJFqJj3oNW3Rz/12yrT7jypTCire3c2hpYWG2uR5n8VY9UUMTA6HLNvdom6tckK7p3bXGXlF0w==} + /@sentry/utils@8.30.0: + resolution: {integrity: sha512-wZxU2HWlzsnu8214Xy7S7cRIuD6h8Z5DnnkojJfX0i0NLooepZQk2824el1Q13AakLb7/S8CHSHXOMnCtoSduw==} engines: {node: '>=14.18'} dependencies: - '@sentry/types': 8.29.0 + '@sentry/types': 8.30.0 dev: false /@sentry/vite-plugin@2.22.4: @@ -1347,46 +1356,46 @@ packages: - supports-color dev: true - /@vue/compiler-core@3.5.3: - resolution: {integrity: sha512-adAfy9boPkP233NTyvLbGEqVuIfK/R0ZsBsIOW4BZNfb4BRpRW41Do1u+ozJpsb+mdoy80O20IzAsHaihRb5qA==} + /@vue/compiler-core@3.5.4: + resolution: {integrity: sha512-oNwn+BAt3n9dK9uAYvI+XGlutwuTq/wfj4xCBaZCqwwVIGtD7D6ViihEbyYZrDHIHTDE3Q6oL3/hqmAyFEy9DQ==} dependencies: '@babel/parser': 7.25.6 - '@vue/shared': 3.5.3 + '@vue/shared': 3.5.4 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.1 dev: false - /@vue/compiler-dom@3.5.3: - resolution: {integrity: sha512-wnzFArg9zpvk/811CDOZOadJRugf1Bgl/TQ3RfV4nKfSPok4hi0w10ziYUQR6LnnBAUlEXYLUfZ71Oj9ds/+QA==} + /@vue/compiler-dom@3.5.4: + resolution: {integrity: sha512-yP9RRs4BDLOLfldn6ah+AGCNovGjMbL9uHvhDHf5wan4dAHLnFGOkqtfE7PPe4HTXIqE7l/NILdYw53bo1C8jw==} dependencies: - '@vue/compiler-core': 3.5.3 - '@vue/shared': 3.5.3 + '@vue/compiler-core': 3.5.4 + '@vue/shared': 3.5.4 dev: false - /@vue/compiler-sfc@3.5.3: - resolution: {integrity: sha512-P3uATLny2tfyvMB04OQFe7Sczteno7SLFxwrOA/dw01pBWQHB5HL15a8PosoNX2aG/EAMGqnXTu+1LnmzFhpTQ==} + /@vue/compiler-sfc@3.5.4: + resolution: {integrity: sha512-P+yiPhL+NYH7m0ZgCq7AQR2q7OIE+mpAEgtkqEeH9oHSdIRvUO+4X6MPvblJIWcoe4YC5a2Gdf/RsoyP8FFiPQ==} dependencies: '@babel/parser': 7.25.6 - '@vue/compiler-core': 3.5.3 - '@vue/compiler-dom': 3.5.3 - '@vue/compiler-ssr': 3.5.3 - '@vue/shared': 3.5.3 + '@vue/compiler-core': 3.5.4 + '@vue/compiler-dom': 3.5.4 + '@vue/compiler-ssr': 3.5.4 + '@vue/shared': 3.5.4 estree-walker: 2.0.2 magic-string: 0.30.11 postcss: 8.4.45 source-map-js: 1.2.1 dev: false - /@vue/compiler-ssr@3.5.3: - resolution: {integrity: sha512-F/5f+r2WzL/2YAPl7UlKcJWHrvoZN8XwEBLnT7S4BXwncH25iDOabhO2M2DWioyTguJAGavDOawejkFXj8EM1w==} + /@vue/compiler-ssr@3.5.4: + resolution: {integrity: sha512-acESdTXsxPnYr2C4Blv0ggx5zIFMgOzZmYU2UgvIff9POdRGbRNBHRyzHAnizcItvpgerSKQbllUc9USp3V7eg==} dependencies: - '@vue/compiler-dom': 3.5.3 - '@vue/shared': 3.5.3 + '@vue/compiler-dom': 3.5.4 + '@vue/shared': 3.5.4 dev: false - /@vue/shared@3.5.3: - resolution: {integrity: sha512-Jp2v8nylKBT+PlOUjun2Wp/f++TfJVFjshLzNtJDdmFJabJa7noGMncqXRM1vXGX+Yo2V7WykQFNxusSim8SCA==} + /@vue/shared@3.5.4: + resolution: {integrity: sha512-L2MCDD8l7yC62Te5UUyPVpmexhL9ipVnYRw9CsWfm/BGRL5FwDX4a25bcJ/OJSD3+Hx+k/a8LDKcG2AFdJV3BA==} dev: false /acorn@8.12.1: @@ -1407,7 +1416,6 @@ packages: /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - dev: false /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} @@ -1420,7 +1428,6 @@ packages: engines: {node: '>=8'} dependencies: color-convert: 2.0.1 - dev: false /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} @@ -1503,8 +1510,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001659 - electron-to-chromium: 1.5.18 + caniuse-lite: 1.0.30001660 + electron-to-chromium: 1.5.19 node-releases: 2.0.18 update-browserslist-db: 1.1.0(browserslist@4.23.3) @@ -1528,8 +1535,8 @@ packages: engines: {node: '>=10'} dev: false - /caniuse-lite@1.0.30001659: - resolution: {integrity: sha512-Qxxyfv3RdHAfJcXelgf0hU4DFUVXBGTjqrBUZLUh8AtlGnsDo+CnncYtTd95+ZKfnANUOzxyIQCuU/UeBZBYoA==} + /caniuse-lite@1.0.30001660: + resolution: {integrity: sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==} /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} @@ -1569,7 +1576,8 @@ packages: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 - dev: false + dev: true + /clsx@2.1.1: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} @@ -1586,14 +1594,12 @@ packages: engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 - dev: false /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: false /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -1644,7 +1650,8 @@ packages: /define-lazy-prop@2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} - dev: false + dev: true + /depcheck@1.4.7: resolution: {integrity: sha512-1lklS/bV5chOxwNKA/2XUUk/hPORp8zihZsXflr8x0kLwmcZ9Y9BsS6Hs3ssvA+2wUVbG0U2Ciqvm1SokNjPkA==} @@ -1653,7 +1660,7 @@ packages: dependencies: '@babel/parser': 7.25.6 '@babel/traverse': 7.25.6 - '@vue/compiler-sfc': 3.5.3 + '@vue/compiler-sfc': 3.5.4 callsite: 1.0.0 camelcase: 6.3.0 cosmiconfig: 7.1.0 @@ -1699,12 +1706,41 @@ packages: engines: {node: '>=12'} dev: false - /electron-to-chromium@1.5.18: - resolution: {integrity: sha512-1OfuVACu+zKlmjsNdcJuVQuVE61sZOLbNM4JAQ1Rvh6EOj0/EUKhMJjRH73InPlXSh8HIJk1cVZ8pyOV/FMdUQ==} + /electron-to-chromium@1.5.19: + resolution: {integrity: sha512-kpLJJi3zxTR1U828P+LIUDZ5ohixyo68/IcYOHLqnbTPr/wdgn4i1ECvmALN9E16JPA6cvCG5UG79gVwVdEK5w==} + + /embla-carousel-autoplay@8.2.1(embla-carousel@8.2.1): + resolution: {integrity: sha512-jhE2aNz5pbmICVkz3XyB3uACgkk4YvbnOZeMcoeIMjfycierQvmcice107w73kYaPrQSzCrHLNkKNmq9eA2iOQ==} + peerDependencies: + embla-carousel: 8.2.1 + dependencies: + embla-carousel: 8.2.1 + dev: false + + /embla-carousel-react@8.2.1(react@18.3.1): + resolution: {integrity: sha512-YKtARk101mp00Zb6UAFkkvK+5XRo92LAtO9xLFeDnQ/XU9DqFhKnRy1CedRRj0/RSk6MTFDx3MqOQue3gJj9DA==} + peerDependencies: + react: ^16.8.0 || ^17.0.1 || ^18.0.0 + dependencies: + embla-carousel: 8.2.1 + embla-carousel-reactive-utils: 8.2.1(embla-carousel@8.2.1) + react: 18.3.1 + dev: false + + /embla-carousel-reactive-utils@8.2.1(embla-carousel@8.2.1): + resolution: {integrity: sha512-LXMVOOyv09ZKRxRQXYMX1FpVGcypsuxdcidNcNlBQUN2mK7hkmjVFQwwhfnnY39KMi88XYnYPBgMxfTe0vxSrA==} + peerDependencies: + embla-carousel: 8.2.1 + dependencies: + embla-carousel: 8.2.1 + dev: false + + /embla-carousel@8.2.1: + resolution: {integrity: sha512-9mTDtyMZJhFuuW5pixhTT4iLiJB1l3dH3IpXUKCsgLlRlHCiySf/wLKy5xIAzmxIsokcQ50xea8wi7BCt0+Rxg==} + dev: false /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: false /entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} @@ -1890,7 +1926,6 @@ packages: /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - dev: false /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} @@ -2010,7 +2045,8 @@ packages: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} hasBin: true - dev: false + dev: true + /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} @@ -2020,7 +2056,6 @@ packages: /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} - dev: false /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} @@ -2044,7 +2079,8 @@ packages: engines: {node: '>=8'} dependencies: is-docker: 2.2.1 - dev: false + dev: true + /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -2226,7 +2262,8 @@ packages: define-lazy-prop: 2.0.0 is-docker: 2.2.1 is-wsl: 2.2.0 - dev: false + dev: true + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} @@ -2292,7 +2329,6 @@ packages: /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - dev: false /please-upgrade-node@3.2.0: resolution: {integrity: sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==} @@ -2456,7 +2492,6 @@ packages: /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} - dev: false /require-package-name@2.0.1: resolution: {integrity: sha512-uuoJ1hU/k6M0779t3VMVIYpb2VMJk05cehCaABFhXaibcbvfgR8wKiozLjVFSzJPmQMRqIcO0HMyTFqfV09V6Q==} @@ -2507,7 +2542,8 @@ packages: picomatch: 2.3.1 source-map: 0.7.4 yargs: 17.7.2 - dev: false + dev: true + /rollup@4.21.2: resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} @@ -2567,7 +2603,7 @@ packages: /source-map@0.7.4: resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} engines: {node: '>= 8'} - dev: false + dev: true /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -2580,14 +2616,12 @@ packages: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - dev: false /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 - dev: false /style-value-types@4.1.4: resolution: {integrity: sha512-LCJL6tB+vPSUoxgUBt9juXIlNJHtBMy8jkXzUJSBzeHWdBu6lhzHqCvLVkXFGsFIlNa2ln1sQHya/gzaFmB2Lg==} @@ -2756,12 +2790,10 @@ packages: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 - dev: false /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - dev: false /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -2779,7 +2811,8 @@ packages: /yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} - dev: false + dev: true + /yargs@16.2.0: resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} @@ -2805,7 +2838,8 @@ packages: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 21.1.1 - dev: false + dev: true + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} diff --git a/src/components/pages/Home.jsx b/src/components/pages/Home.jsx index 2d03c9b..4ef7cdb 100644 --- a/src/components/pages/Home.jsx +++ b/src/components/pages/Home.jsx @@ -6,6 +6,7 @@ import CarouselComponent from "../shared/Carousel"; import SnackbarAlert from "../common/SnackBarAlert"; import { handleError } from "../../assets/handleError"; import { PersonalInformationContext } from "../../context/PersonalInformation.jsx"; +import { EmblaCarousel } from "../shared/EmblaCarousel.jsx"; // Material-UI import { Typography, Box, Container, useMediaQuery, Card, List, ListItem, ListItemAvatar, ListItemText, Avatar } from "@mui/material"; @@ -25,15 +26,15 @@ import mapProcess from "../../images/home-carousel/process-map.png"; import coexistence from "../../images/home-carousel/coexistence.png"; import electricityCampaign from "../../images/home-carousel/electricity-campaign.png"; import depression from "../../images/home-carousel/depression.png"; +import passwords from "../../images/home-carousel/passwords.png"; import lockers from "../../images/home-carousel/lockers.png"; -import passwords from "../../images/home-carousel/password.png"; const benefits = [{ image: realBenefit2, title: "Beneficio 2" }]; const homeImages = [ - { image: lockers }, { image: passwords }, + { image: lockers }, { image: electricityCampaign }, { image: depression }, { image: coexistence }, @@ -166,10 +167,12 @@ const Home = () => { return ( <> - + {/* + */} + + - { width: 100, type: "actions", cellClassName: "actions", - getActions: ({id}) => { + getActions: ({ id }) => { return [ { reader.onload = (evt) => { const bstr = evt.target.result; - const workbook = XLSX.read(bstr, { type: "binary" }); + const workbook = read(bstr, { type: "binary" }); const worksheetName = workbook.SheetNames[0]; const worksheet = workbook.Sheets[worksheetName]; - const data = XLSX.utils.sheet_to_csv(worksheet, { header: 1 }); + const data = utils.sheet_to_csv(worksheet, { header: 1 }); setPreviewRows(csvToJSON(data)); }; diff --git a/src/components/shared/EmblaCarousel.jsx b/src/components/shared/EmblaCarousel.jsx new file mode 100644 index 0000000..40ccec9 --- /dev/null +++ b/src/components/shared/EmblaCarousel.jsx @@ -0,0 +1,26 @@ +import React from "react"; +import useEmblaCarousel from "embla-carousel-react"; +import depression from "../../images/home-carousel/depression.png"; +import brothers from "../../images/home-carousel/brothers.png"; +import water from "../../images/home-carousel/water.png"; +import Autoplay from "embla-carousel-autoplay"; + +export function EmblaCarousel() { + const [emblaRef] = useEmblaCarousel({ loop: true }, [Autoplay({ delay: 4000, stopOnInteraction: false })]); + + return ( +

+
+
+ depression +
+
+ brothers +
+
+ water +
+
+
+ ); +} diff --git a/vite.config.js b/vite.config.js index 81cac8c..e821ade 100644 --- a/vite.config.js +++ b/vite.config.js @@ -54,4 +54,5 @@ export default defineConfig({ }, }, }, -}); \ No newline at end of file +}); +