From ec9923dac8f4da5877c7b9de550fc0079bab25f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20Luna=20Hern=C3=A1ndez?= <42101656@uaz.edu.mx> Date: Tue, 5 Nov 2024 15:44:27 -0600 Subject: [PATCH 1/3] Reorganizacion de archivos --- web/public/index.html | 5 +- web/public/logotipo.png | Bin 0 -> 12368 bytes web/src/App.tsx | 7 +- .../admin_panel_navbar/admin_navbar.tsx | 173 ------------ .../admin_panel_place_list.tsx | 74 ----- .../admin_panel_poi_list.tsx | 157 ----------- .../admin_panel_poi_register.tsx | 205 -------------- .../admin_panel_poi_screen.tsx | 89 ------ .../admin_panel_poi_viewer.tsx | 176 ------------ .../admin_town_info/admin_town_info.tsx | 119 -------- .../confirmation_dialog.tsx | 40 --- .../image_dropzone/image_dropzone.tsx | 57 ---- .../loading_screen/loading_screen.tsx | 9 - .../multiple_images_dropzone.tsx | 51 ---- .../sa_panel_admin_list.tsx | 149 ---------- .../sa_panel_admin_register.tsx | 158 ----------- .../sa_panel_admin_screen.tsx | 50 ---- .../sa_panel_category_list.tsx | 102 ------- .../sa_panel_category_register.tsx | 60 ---- .../sa_panel_town_register.tsx | 163 ----------- .../sa_panel_town_screen.tsx | 50 ---- .../sidebar_header/sidebar_header.tsx | 18 -- web/src/constants/images_nuber.ts | 1 - web/src/constants/languages.ts | 4 - web/src/constants/roles.ts | 7 - web/src/constants/selected_panel.ts | 11 - web/src/context/auth_context.tsx | 68 ----- web/src/{ => core}/constants/api_routes.ts | 41 ++- web/src/{ => core}/constants/api_url.ts | 3 + web/src/core/constants/images_nuber.ts | 4 + web/src/core/constants/languages.ts | 7 + web/src/core/constants/roles.ts | 17 ++ web/src/core/constants/selected_panel.ts | 17 ++ web/src/core/context/auth_context.tsx | 92 ++++++ .../{ => core}/context/message_context.tsx | 25 +- web/src/core/errors/CustomError.ts | 26 ++ web/src/core/errors/UnautherizedError.ts | 56 ++++ web/src/core/router/login_route.tsx | 15 + web/src/core/router/protected_route.tsx | 26 ++ web/src/core/router/router.tsx | 30 ++ web/src/core/utils/Messages.ts | 36 +++ web/src/data/datasource/admin_datasource.ts | 55 ++++ .../api}/admin_datasource.ts | 49 +++- .../datasource/api/category_datasource.ts | 62 +++++ .../api}/entities/admin_form_values.ts | 13 +- .../data/datasource/api/entities/category.ts | 16 ++ web/src/data/datasource/api/entities/image.ts | 7 + .../api/entities/login_form_values.ts | 7 + .../datasource/api}/entities/place.ts | 27 +- .../datasource/api}/entities/poi.ts | 8 +- .../api}/entities/reset_password_values.ts | 3 + web/src/data/datasource/api/entities/state.ts | 8 + web/src/data/datasource/api/entities/town.ts | 12 + web/src/data/datasource/api/entities/user.ts | 223 +++++++++++++++ .../data/datasource/api/login_datasource.ts | 41 +++ .../data/datasource/api/place_datasource.ts | 128 +++++++++ web/src/data/datasource/api/poi_datasource.ts | 106 +++++++ .../data/datasource/api/town_datasource.ts | 115 ++++++++ .../data/datasource/category_datasource.ts | 26 ++ web/src/data/datasource/login_datasource.ts | 14 + web/src/data/datasource/place_datasource.ts | 34 +++ web/src/data/datasource/poi_datasource.ts | 35 +++ web/src/data/datasource/town_datasource.ts | 41 +++ .../datasources/prod/category_datasource.ts | 45 --- .../data/datasources/prod/login_datasource.ts | 30 -- .../data/datasources/prod/place_datasource.ts | 94 ------- .../data/datasources/prod/poi_datasource.ts | 70 ----- .../data/datasources/prod/town_datasource.ts | 86 ------ web/src/data/models/prod/AdminModel.ts | 8 - web/src/data/models/prod/CategoryModel.ts | 10 - web/src/data/models/prod/LoggedInUserModel.ts | 6 - web/src/data/models/prod/POIModel.ts | 24 -- web/src/data/models/prod/PlaceModel.ts | 55 ---- web/src/data/models/prod/StateModel.ts | 5 - web/src/data/models/prod/TownModel.ts | 16 -- .../repositories/prod/admin_repository.ts | 39 --- .../repositories/prod/category_repository.ts | 21 -- .../repositories/prod/login_repository.ts | 13 - .../repositories/prod/place_repository.ts | 24 -- .../data/repositories/prod/poi_repository.ts | 25 -- .../data/repositories/prod/town_repository.ts | 25 -- web/src/data/repository/admin_repository.ts | 74 +++++ .../data/repository/category_repository.ts | 39 +++ web/src/data/repository/login_repository.ts | 20 ++ web/src/data/repository/place_repository.ts | 46 +++ web/src/data/repository/poi_repository.ts | 47 ++++ web/src/data/repository/town_repository.ts | 56 ++++ web/src/domain/model/AdminModel.ts | 17 ++ web/src/domain/model/CategoryModel.ts | 21 ++ web/src/domain/model/LoggedInUserModel.ts | 24 ++ web/src/domain/model/POIModel.ts | 38 +++ web/src/domain/model/PlaceModel.ts | 77 +++++ web/src/domain/model/StateModel.ts | 11 + web/src/domain/model/TownModel.ts | 33 +++ web/src/domain/repository/admin_repository.ts | 58 ++++ .../domain/repository/category_repository.ts | 29 ++ web/src/domain/repository/login_repository.ts | 14 + web/src/domain/repository/place_repository.ts | 34 +++ web/src/domain/repository/poi_repository.ts | 35 +++ web/src/domain/repository/town_repository.ts | 42 +++ .../useCase/useAdmin.ts} | 27 +- .../domain/useCase/useAdminChangePassword.ts | 106 +++++++ .../useCase/useAdminHomePage.ts} | 49 ++-- .../useCase/useAdminTownInfo.ts} | 5 + web/src/domain/useCase/useCategory.ts | 145 ++++++++++ .../useCase/useDropzoneMultiplesImages.ts | 102 +++++++ web/src/domain/useCase/useGetStatesList.ts | 51 ++++ web/src/domain/useCase/useLogin.ts | 104 +++++++ .../useCase/usePasswordVisibility.ts} | 8 +- .../useCase/usePlace.ts} | 36 ++- .../useCase/usePointOfInterest.ts} | 172 +++++++----- .../useCase}/useResetPassword.ts | 15 +- .../useCase/useSuperadminHomePage.ts} | 46 +-- .../useTown.tsx => domain/useCase/useTown.ts} | 164 ++++++----- web/src/domain/useCase/useUserData.ts | 32 +++ web/src/domain/useCase/useWindowShow.ts | 22 ++ web/src/errors/CustomError.ts | 15 - web/src/errors/UnautherizedError.ts | 31 --- web/src/hooks/useAdminChangePassword.tsx | 88 ------ web/src/hooks/useCategory.tsx | 129 --------- web/src/hooks/useDropzoneMultiplesImages.tsx | 95 ------- web/src/hooks/useGetStatesList.tsx | 44 --- web/src/hooks/useLogin.tsx | 86 ------ web/src/hooks/useUserData.tsx | 21 -- web/src/hooks/useWindowShow.tsx | 12 - .../datasources/admin_datasource.ts | 15 - .../datasources/category_datasource.ts | 7 - .../datasources/login_datasource.ts | 6 - .../datasources/place_datasource.ts | 8 - .../datasources/poi_datasource.ts | 8 - .../datasources/town_datasource.ts | 10 - web/src/infraestructure/entities/category.ts | 10 - web/src/infraestructure/entities/image.ts | 4 - .../entities/login_form_values.ts | 4 - web/src/infraestructure/entities/state.ts | 5 - web/src/infraestructure/entities/town.ts | 9 - web/src/infraestructure/entities/user.ts | 189 ------------- .../repositories/admin_repository.ts | 15 - .../repositories/category_repository.ts | 7 - .../repositories/login_repository.ts | 6 - .../repositories/place_repository.ts | 8 - .../repositories/poi_repository.ts | 8 - .../repositories/town_repository.ts | 10 - .../pages/home/admin_page/admin_home_page.tsx | 97 ------- .../super_admin_home_page.tsx | 107 ------- .../admin/admin_panel_navbar/admin_navbar.tsx | 199 +++++++++++++ .../images/Admin-595b40b65ba036ed117d36fe.png | Bin .../assets/styles/style.css | 65 +++-- .../admin_panel_place_list.tsx | 90 ++++++ .../assets/css/styles.css | 0 .../admin_panel_place_register.tsx | 36 ++- .../assets/css/styles.css | 0 .../admin_panel_place_screen.tsx | 66 +++-- .../assets/css/styles.css | 0 .../admin_panel_poi_list.tsx | 187 +++++++++++++ .../assets/css/styles.css | 0 .../admin_panel_poi_register.tsx | 263 ++++++++++++++++++ .../assets/css/styles.css | 0 .../admin_panel_poi_screen.tsx | 116 ++++++++ .../assets/css/styles.css | 0 .../admin_panel_poi_viewer.tsx | 191 +++++++++++++ .../assets/css/styles.css | 0 .../admin/admin_town_info/admin_town_info.tsx | 147 ++++++++++ .../admin_town_info/assets/css/styles.css | 0 .../admin/panel/admin_home_page.tsx | 147 ++++++++++ .../admin/panel}/assets/styles/style.css | 0 .../assets/css/styles.css | 0 .../confirmation_dialog.tsx | 58 ++++ .../error_window/assets/css/styles.css | 0 .../components/error_window/error_window.tsx | 13 +- .../components/footer/assets/css/styles.css | 0 .../components/footer/footer.tsx | 9 + .../geocoding/assets/css/styles.css | 0 .../components/geocoding/geocoding_google.tsx | 15 +- .../components/geocoding/geocoding_mapbox.tsx | 7 +- .../image_dropzone/assets/css/styles.css | 0 .../image_dropzone/image_dropzone.tsx | 70 +++++ .../loading_screen/assets/css/styles.css | 0 .../loading_screen/loading_screen.tsx | 12 + .../loading_spinner/assets/css/styles.css | 0 .../loading_spinner/loading_spinner.tsx | 2 + .../components/map/map_google.tsx | 10 +- .../components/map/map_mapbox.tsx | 11 +- .../assets/css/styles.css | 0 .../multiple_images_dropzone.tsx | 50 ++++ .../assets/css/styles.css | 0 .../reset_password_window.tsx | 9 +- .../sidebar_header/assets/css/styles.css | 0 .../sidebar_header/sidebar_header.tsx | 23 ++ .../login}/login_page.tsx | 24 +- .../login}/styles/styles.css | 0 .../superadmin/panel}/assets/styles/style.css | 0 .../panel/super_admin_home_page.tsx | 146 ++++++++++ .../sa_panel_admin_list/assets/css/styles.css | 0 .../sa_panel_admin_list.tsx | 170 +++++++++++ .../assets/css/styles.css | 0 .../sa_panel_admin_register.tsx | 170 +++++++++++ .../assets/css/styles.css | 0 .../sa_panel_admin_screen.tsx | 67 +++++ .../assets/css/styles.css | 0 .../sa_panel_category_list.tsx | 119 ++++++++ .../assets/css/styles.css | 0 .../sa_panel_category_register.tsx | 61 ++++ .../assets/css/styles.css | 0 .../sa_panel_category_screen.tsx | 10 +- .../sa_panel_town_list/assets/css/styles.css | 0 .../sa_panel_town_list/sa_panel_town_list.tsx | 40 ++- .../sa_panel_town_register/css/styles.css | 40 +-- .../sa_panel_town_register.tsx | 194 +++++++++++++ .../sa_panel_town_screen/css/styles.css | 0 .../sa_panel_town_screen.tsx | 67 +++++ web/src/router/login_route.tsx | 10 - web/src/router/protected_route.tsx | 27 -- web/src/router/router.tsx | 28 -- web/src/utils/Messages.ts | 27 -- 215 files changed, 5781 insertions(+), 4092 deletions(-) create mode 100644 web/public/logotipo.png delete mode 100644 web/src/components/admin_panel_navbar/admin_navbar.tsx delete mode 100644 web/src/components/admin_panel_places/admin_panel_place_list/admin_panel_place_list.tsx delete mode 100644 web/src/components/admin_panel_poi/admin_panel_poi_list/admin_panel_poi_list.tsx delete mode 100644 web/src/components/admin_panel_poi/admin_panel_poi_register/admin_panel_poi_register.tsx delete mode 100644 web/src/components/admin_panel_poi/admin_panel_poi_screen/admin_panel_poi_screen.tsx delete mode 100644 web/src/components/admin_panel_poi/admin_panel_poi_viewer/admin_panel_poi_viewer.tsx delete mode 100644 web/src/components/admin_town_info/admin_town_info.tsx delete mode 100644 web/src/components/confirmation_dialog_box/confirmation_dialog.tsx delete mode 100644 web/src/components/image_dropzone/image_dropzone.tsx delete mode 100644 web/src/components/loading_screen/loading_screen.tsx delete mode 100644 web/src/components/multiple_images_dropzone/multiple_images_dropzone.tsx delete mode 100644 web/src/components/sa_panel_admin/sa_panel_admin_list/sa_panel_admin_list.tsx delete mode 100644 web/src/components/sa_panel_admin/sa_panel_admin_register/sa_panel_admin_register.tsx delete mode 100644 web/src/components/sa_panel_admin/sa_panel_admin_screen/sa_panel_admin_screen.tsx delete mode 100644 web/src/components/sa_panel_category/sa_panel_category_list/sa_panel_category_list.tsx delete mode 100644 web/src/components/sa_panel_category/sa_panel_category_register/sa_panel_category_register.tsx delete mode 100644 web/src/components/sa_panel_town/sa_panel_town_register/sa_panel_town_register.tsx delete mode 100644 web/src/components/sa_panel_town/sa_panel_town_screen/sa_panel_town_screen.tsx delete mode 100644 web/src/components/sidebar_header/sidebar_header.tsx delete mode 100644 web/src/constants/images_nuber.ts delete mode 100644 web/src/constants/languages.ts delete mode 100644 web/src/constants/roles.ts delete mode 100644 web/src/constants/selected_panel.ts delete mode 100644 web/src/context/auth_context.tsx rename web/src/{ => core}/constants/api_routes.ts (53%) rename web/src/{ => core}/constants/api_url.ts (62%) create mode 100644 web/src/core/constants/images_nuber.ts create mode 100644 web/src/core/constants/languages.ts create mode 100644 web/src/core/constants/roles.ts create mode 100644 web/src/core/constants/selected_panel.ts create mode 100644 web/src/core/context/auth_context.tsx rename web/src/{ => core}/context/message_context.tsx (50%) create mode 100644 web/src/core/errors/CustomError.ts create mode 100644 web/src/core/errors/UnautherizedError.ts create mode 100644 web/src/core/router/login_route.tsx create mode 100644 web/src/core/router/protected_route.tsx create mode 100644 web/src/core/router/router.tsx create mode 100644 web/src/core/utils/Messages.ts create mode 100644 web/src/data/datasource/admin_datasource.ts rename web/src/data/{datasources/prod => datasource/api}/admin_datasource.ts (58%) create mode 100644 web/src/data/datasource/api/category_datasource.ts rename web/src/{infraestructure => data/datasource/api}/entities/admin_form_values.ts (61%) create mode 100644 web/src/data/datasource/api/entities/category.ts create mode 100644 web/src/data/datasource/api/entities/image.ts create mode 100644 web/src/data/datasource/api/entities/login_form_values.ts rename web/src/{infraestructure => data/datasource/api}/entities/place.ts (69%) rename web/src/{infraestructure => data/datasource/api}/entities/poi.ts (76%) rename web/src/{infraestructure => data/datasource/api}/entities/reset_password_values.ts (62%) create mode 100644 web/src/data/datasource/api/entities/state.ts create mode 100644 web/src/data/datasource/api/entities/town.ts create mode 100644 web/src/data/datasource/api/entities/user.ts create mode 100644 web/src/data/datasource/api/login_datasource.ts create mode 100644 web/src/data/datasource/api/place_datasource.ts create mode 100644 web/src/data/datasource/api/poi_datasource.ts create mode 100644 web/src/data/datasource/api/town_datasource.ts create mode 100644 web/src/data/datasource/category_datasource.ts create mode 100644 web/src/data/datasource/login_datasource.ts create mode 100644 web/src/data/datasource/place_datasource.ts create mode 100644 web/src/data/datasource/poi_datasource.ts create mode 100644 web/src/data/datasource/town_datasource.ts delete mode 100644 web/src/data/datasources/prod/category_datasource.ts delete mode 100644 web/src/data/datasources/prod/login_datasource.ts delete mode 100644 web/src/data/datasources/prod/place_datasource.ts delete mode 100644 web/src/data/datasources/prod/poi_datasource.ts delete mode 100644 web/src/data/datasources/prod/town_datasource.ts delete mode 100644 web/src/data/models/prod/AdminModel.ts delete mode 100644 web/src/data/models/prod/CategoryModel.ts delete mode 100644 web/src/data/models/prod/LoggedInUserModel.ts delete mode 100644 web/src/data/models/prod/POIModel.ts delete mode 100644 web/src/data/models/prod/PlaceModel.ts delete mode 100644 web/src/data/models/prod/StateModel.ts delete mode 100644 web/src/data/models/prod/TownModel.ts delete mode 100644 web/src/data/repositories/prod/admin_repository.ts delete mode 100644 web/src/data/repositories/prod/category_repository.ts delete mode 100644 web/src/data/repositories/prod/login_repository.ts delete mode 100644 web/src/data/repositories/prod/place_repository.ts delete mode 100644 web/src/data/repositories/prod/poi_repository.ts delete mode 100644 web/src/data/repositories/prod/town_repository.ts create mode 100644 web/src/data/repository/admin_repository.ts create mode 100644 web/src/data/repository/category_repository.ts create mode 100644 web/src/data/repository/login_repository.ts create mode 100644 web/src/data/repository/place_repository.ts create mode 100644 web/src/data/repository/poi_repository.ts create mode 100644 web/src/data/repository/town_repository.ts create mode 100644 web/src/domain/model/AdminModel.ts create mode 100644 web/src/domain/model/CategoryModel.ts create mode 100644 web/src/domain/model/LoggedInUserModel.ts create mode 100644 web/src/domain/model/POIModel.ts create mode 100644 web/src/domain/model/PlaceModel.ts create mode 100644 web/src/domain/model/StateModel.ts create mode 100644 web/src/domain/model/TownModel.ts create mode 100644 web/src/domain/repository/admin_repository.ts create mode 100644 web/src/domain/repository/category_repository.ts create mode 100644 web/src/domain/repository/login_repository.ts create mode 100644 web/src/domain/repository/place_repository.ts create mode 100644 web/src/domain/repository/poi_repository.ts create mode 100644 web/src/domain/repository/town_repository.ts rename web/src/{hooks/useAdmin.tsx => domain/useCase/useAdmin.ts} (81%) create mode 100644 web/src/domain/useCase/useAdminChangePassword.ts rename web/src/{hooks/useAdminHomePage.tsx => domain/useCase/useAdminHomePage.ts} (57%) rename web/src/{hooks/useAdminTownInfo.tsx => domain/useCase/useAdminTownInfo.ts} (73%) create mode 100644 web/src/domain/useCase/useCategory.ts create mode 100644 web/src/domain/useCase/useDropzoneMultiplesImages.ts create mode 100644 web/src/domain/useCase/useGetStatesList.ts create mode 100644 web/src/domain/useCase/useLogin.ts rename web/src/{hooks/usePasswordVisibility.tsx => domain/useCase/usePasswordVisibility.ts} (61%) rename web/src/{hooks/usePlace.tsx => domain/useCase/usePlace.ts} (86%) rename web/src/{hooks/usePointOfInterest.tsx => domain/useCase/usePointOfInterest.ts} (50%) rename web/src/{hooks => domain/useCase}/useResetPassword.ts (90%) rename web/src/{hooks/useSuperadminHomePage.tsx => domain/useCase/useSuperadminHomePage.ts} (57%) rename web/src/{hooks/useTown.tsx => domain/useCase/useTown.ts} (51%) create mode 100644 web/src/domain/useCase/useUserData.ts create mode 100644 web/src/domain/useCase/useWindowShow.ts delete mode 100644 web/src/errors/CustomError.ts delete mode 100644 web/src/errors/UnautherizedError.ts delete mode 100644 web/src/hooks/useAdminChangePassword.tsx delete mode 100644 web/src/hooks/useCategory.tsx delete mode 100644 web/src/hooks/useDropzoneMultiplesImages.tsx delete mode 100644 web/src/hooks/useGetStatesList.tsx delete mode 100644 web/src/hooks/useLogin.tsx delete mode 100644 web/src/hooks/useUserData.tsx delete mode 100644 web/src/hooks/useWindowShow.tsx delete mode 100644 web/src/infraestructure/datasources/admin_datasource.ts delete mode 100644 web/src/infraestructure/datasources/category_datasource.ts delete mode 100644 web/src/infraestructure/datasources/login_datasource.ts delete mode 100644 web/src/infraestructure/datasources/place_datasource.ts delete mode 100644 web/src/infraestructure/datasources/poi_datasource.ts delete mode 100644 web/src/infraestructure/datasources/town_datasource.ts delete mode 100644 web/src/infraestructure/entities/category.ts delete mode 100644 web/src/infraestructure/entities/image.ts delete mode 100644 web/src/infraestructure/entities/login_form_values.ts delete mode 100644 web/src/infraestructure/entities/state.ts delete mode 100644 web/src/infraestructure/entities/town.ts delete mode 100644 web/src/infraestructure/entities/user.ts delete mode 100644 web/src/infraestructure/repositories/admin_repository.ts delete mode 100644 web/src/infraestructure/repositories/category_repository.ts delete mode 100644 web/src/infraestructure/repositories/login_repository.ts delete mode 100644 web/src/infraestructure/repositories/place_repository.ts delete mode 100644 web/src/infraestructure/repositories/poi_repository.ts delete mode 100644 web/src/infraestructure/repositories/town_repository.ts delete mode 100644 web/src/pages/home/admin_page/admin_home_page.tsx delete mode 100644 web/src/pages/home/super_admin_page/super_admin_home_page.tsx create mode 100644 web/src/presentation/admin/admin_panel_navbar/admin_navbar.tsx rename web/src/{components => presentation/admin}/admin_panel_navbar/assets/images/Admin-595b40b65ba036ed117d36fe.png (100%) rename web/src/{components => presentation/admin}/admin_panel_navbar/assets/styles/style.css (70%) create mode 100644 web/src/presentation/admin/admin_panel_places/admin_panel_place_list/admin_panel_place_list.tsx rename web/src/{components => presentation/admin}/admin_panel_places/admin_panel_place_list/assets/css/styles.css (100%) rename web/src/{components => presentation/admin}/admin_panel_places/admin_panel_place_register/admin_panel_place_register.tsx (91%) rename web/src/{components => presentation/admin}/admin_panel_places/admin_panel_place_register/assets/css/styles.css (100%) rename web/src/{components => presentation/admin}/admin_panel_places/admin_panel_place_screen/admin_panel_place_screen.tsx (53%) rename web/src/{components => presentation/admin}/admin_panel_places/admin_panel_place_screen/assets/css/styles.css (100%) create mode 100644 web/src/presentation/admin/admin_panel_poi/admin_panel_poi_list/admin_panel_poi_list.tsx rename web/src/{components => presentation/admin}/admin_panel_poi/admin_panel_poi_list/assets/css/styles.css (100%) create mode 100644 web/src/presentation/admin/admin_panel_poi/admin_panel_poi_register/admin_panel_poi_register.tsx rename web/src/{components => presentation/admin}/admin_panel_poi/admin_panel_poi_register/assets/css/styles.css (100%) create mode 100644 web/src/presentation/admin/admin_panel_poi/admin_panel_poi_screen/admin_panel_poi_screen.tsx rename web/src/{components => presentation/admin}/admin_panel_poi/admin_panel_poi_screen/assets/css/styles.css (100%) create mode 100644 web/src/presentation/admin/admin_panel_poi/admin_panel_poi_viewer/admin_panel_poi_viewer.tsx rename web/src/{components => presentation/admin}/admin_panel_poi/admin_panel_poi_viewer/assets/css/styles.css (100%) create mode 100644 web/src/presentation/admin/admin_town_info/admin_town_info.tsx rename web/src/{components => presentation/admin}/admin_town_info/assets/css/styles.css (100%) create mode 100644 web/src/presentation/admin/panel/admin_home_page.tsx rename web/src/{pages/home/admin_page => presentation/admin/panel}/assets/styles/style.css (100%) rename web/src/{ => presentation}/components/confirmation_dialog_box/assets/css/styles.css (100%) create mode 100644 web/src/presentation/components/confirmation_dialog_box/confirmation_dialog.tsx rename web/src/{ => presentation}/components/error_window/assets/css/styles.css (100%) rename web/src/{ => presentation}/components/error_window/error_window.tsx (59%) rename web/src/{ => presentation}/components/footer/assets/css/styles.css (100%) rename web/src/{ => presentation}/components/footer/footer.tsx (89%) rename web/src/{ => presentation}/components/geocoding/assets/css/styles.css (100%) rename web/src/{ => presentation}/components/geocoding/geocoding_google.tsx (75%) rename web/src/{ => presentation}/components/geocoding/geocoding_mapbox.tsx (84%) rename web/src/{ => presentation}/components/image_dropzone/assets/css/styles.css (100%) create mode 100644 web/src/presentation/components/image_dropzone/image_dropzone.tsx rename web/src/{ => presentation}/components/loading_screen/assets/css/styles.css (100%) create mode 100644 web/src/presentation/components/loading_screen/loading_screen.tsx rename web/src/{ => presentation}/components/loading_spinner/assets/css/styles.css (100%) rename web/src/{ => presentation}/components/loading_spinner/loading_spinner.tsx (57%) rename web/src/{ => presentation}/components/map/map_google.tsx (79%) rename web/src/{ => presentation}/components/map/map_mapbox.tsx (81%) rename web/src/{ => presentation}/components/multiple_images_dropzone/assets/css/styles.css (100%) create mode 100644 web/src/presentation/components/multiple_images_dropzone/multiple_images_dropzone.tsx rename web/src/{ => presentation}/components/reset_password_window/assets/css/styles.css (100%) rename web/src/{ => presentation}/components/reset_password_window/reset_password_window.tsx (91%) rename web/src/{ => presentation}/components/sidebar_header/assets/css/styles.css (100%) create mode 100644 web/src/presentation/components/sidebar_header/sidebar_header.tsx rename web/src/{pages/login_page => presentation/login}/login_page.tsx (80%) rename web/src/{pages/login_page => presentation/login}/styles/styles.css (100%) rename web/src/{pages/home/super_admin_page => presentation/superadmin/panel}/assets/styles/style.css (100%) create mode 100644 web/src/presentation/superadmin/panel/super_admin_home_page.tsx rename web/src/{components => presentation/superadmin}/sa_panel_admin/sa_panel_admin_list/assets/css/styles.css (100%) create mode 100644 web/src/presentation/superadmin/sa_panel_admin/sa_panel_admin_list/sa_panel_admin_list.tsx rename web/src/{components => presentation/superadmin}/sa_panel_admin/sa_panel_admin_register/assets/css/styles.css (100%) create mode 100644 web/src/presentation/superadmin/sa_panel_admin/sa_panel_admin_register/sa_panel_admin_register.tsx rename web/src/{components => presentation/superadmin}/sa_panel_admin/sa_panel_admin_screen/assets/css/styles.css (100%) create mode 100644 web/src/presentation/superadmin/sa_panel_admin/sa_panel_admin_screen/sa_panel_admin_screen.tsx rename web/src/{components => presentation/superadmin}/sa_panel_category/sa_panel_category_list/assets/css/styles.css (100%) create mode 100644 web/src/presentation/superadmin/sa_panel_category/sa_panel_category_list/sa_panel_category_list.tsx rename web/src/{components => presentation/superadmin}/sa_panel_category/sa_panel_category_register/assets/css/styles.css (100%) create mode 100644 web/src/presentation/superadmin/sa_panel_category/sa_panel_category_register/sa_panel_category_register.tsx rename web/src/{components => presentation/superadmin}/sa_panel_category/sa_panel_category_screen/assets/css/styles.css (100%) rename web/src/{components => presentation/superadmin}/sa_panel_category/sa_panel_category_screen/sa_panel_category_screen.tsx (76%) rename web/src/{components => presentation/superadmin}/sa_panel_town/sa_panel_town_list/assets/css/styles.css (100%) rename web/src/{components => presentation/superadmin}/sa_panel_town/sa_panel_town_list/sa_panel_town_list.tsx (77%) rename web/src/{components => presentation/superadmin}/sa_panel_town/sa_panel_town_register/css/styles.css (83%) create mode 100644 web/src/presentation/superadmin/sa_panel_town/sa_panel_town_register/sa_panel_town_register.tsx rename web/src/{components => presentation/superadmin}/sa_panel_town/sa_panel_town_screen/css/styles.css (100%) create mode 100644 web/src/presentation/superadmin/sa_panel_town/sa_panel_town_screen/sa_panel_town_screen.tsx delete mode 100644 web/src/router/login_route.tsx delete mode 100644 web/src/router/protected_route.tsx delete mode 100644 web/src/router/router.tsx delete mode 100644 web/src/utils/Messages.ts diff --git a/web/public/index.html b/web/public/index.html index aa069f27..babfdb0e 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -2,14 +2,13 @@ - + - - React App + Pueblos Magicos diff --git a/web/public/logotipo.png b/web/public/logotipo.png new file mode 100644 index 0000000000000000000000000000000000000000..35c0c715e3a96bc6456dc14ad0357c57e2ae7849 GIT binary patch literal 12368 zcmbVzbySp5_b%PtAuZiVNe?OA-3@{QQqnNAl+s<2QUfU664DI=NOuYhAkBU8`|euz zx9(r}{=tGdbKZUS+3$(HpXVW3Lrno2g8~B%4h~!KjjR?N96ZPK4;l*4;u8?>3H*Y0 z*HVy%s~&r?4}3tf2dRSK;A#^v?=6vm&*-ji4Bg@2Nb#S4;D?xCl5lX`+lsOvosVY6 zIX*f%`VCK1cpC7Uc;vEDL>efVEcxk07^*BsMcw91gh^!?DpQBzNhkAE(?1DeiD^Z5 zm#;d;jP^ZHR7Ii{TL@#+uymuP3$Xf3&{*hM(0Xeb|UUw_F%}a zd?J1w*?a4IC9(QPqQ11G#EuRPj27~GrUng6+lGpa3Bv0R28Yu|Sx9wDmThO7= zlW9Qkknpis41lgEL>x#UBt#4nFfADV|G#@z#z~ZJY@E7qgXz)LpOa%_lyNRK%)5a0 zG{IJ3?xRHmQ zLGpx@IO(GLfC;`TIo@CldZ(#tq`He>do~y|l!ZPUhg4-ysh;?;yeDAy?dDe*Sou7f z6+Vl>ukTn`IIVAEE*xjyc`2EyMkaDS*?nqX&Ypzmp0w<3GqAA`B0dBhlrtjnViIv| zrA`EV`{tfB zu*rvdp-0;*%2|N7H|W6RIG~y#dEcZ~zbv?}e+u(e1$-zb8|w8OW}cl$A9y7B@Ja*X zoL;hXg(v(_;gFR#=#e+1b>EhKxcRef)(v#UCX-k%|XV^dJ# zglSYFrC2unqXQ%8WU*I(YoVa~(f2^WYBS$r0dJy|jjKj^vQdTgN6Nd5qFbF*gomnY zG#AgNUEQ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@ID#;Wr$gItQ Q{{nzhlv9(fmbL)@FY<|%qW}N^ literal 0 HcmV?d00001 diff --git a/web/src/App.tsx b/web/src/App.tsx index 0c54f7ff..769ac63a 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -1,11 +1,10 @@ import { RouterProvider } from "react-router-dom"; import "./App.css"; -import { AuthContextProvider } from "./context/auth_context"; -import { MessageContextProvider } from "./context/message_context"; -import { router } from "./router/router"; +import { AuthContextProvider } from "./core/context/auth_context"; +import { MessageContextProvider } from "./core/context/message_context"; +import { router } from "./core/router/router"; import { ToastContainer } from "react-toastify"; - function App() { return (
diff --git a/web/src/components/admin_panel_navbar/admin_navbar.tsx b/web/src/components/admin_panel_navbar/admin_navbar.tsx deleted file mode 100644 index 81e61e3d..00000000 --- a/web/src/components/admin_panel_navbar/admin_navbar.tsx +++ /dev/null @@ -1,173 +0,0 @@ -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faEye, faEyeSlash, faSignOut, faUser, faWindowClose } from "@fortawesome/free-solid-svg-icons"; -import { Link } from "react-router-dom"; -import './assets/styles/style.css'; -import { UserRole } from "../../constants/roles"; -import { useUserData } from "../../hooks/useUserData"; -import { Dispatch, SetStateAction, useState } from "react"; -import { useAdminChangePassword } from "../../hooks/useAdminChangePassword"; -import { usePasswoordVisibility } from "../../hooks/usePasswordVisibility"; - -interface props{ - isWindowActive: boolean; - setIsWindowActive: Dispatch>; -} - -export const AdminPanelNavBar = ({isWindowActive, setIsWindowActive}:props) => { - const {user, handleLogout, setToggle, toggle, userData} = useUserData(); - const [changePasswordWindowActive, setChangePasswordWindowActive] = useState(false); - const setChangePasswordWindowVisibility = (visibility: boolean) => { - setIsWindowActive(visibility); - setChangePasswordWindowActive(visibility); - } - const {register, handleSubmit, errors, onSubmit} = useAdminChangePassword(setChangePasswordWindowVisibility); - const { - values: valuesPrevPassword, - handleClickShowPassword: handleClickShowPrevPassword, - handleMouseDownPassword: handleMouseDownPrevPassword - } = usePasswoordVisibility(); - const { - values: valuesNewPassword, - handleClickShowPassword: handleClickShowNewPassword, - handleMouseDownPassword: handleMouseDownNewPassword - } = usePasswoordVisibility(); - const { - values: valuesNewPasswordConfirm, - handleClickShowPassword: handleClickShowNewPasswordConfirm, - handleMouseDownPassword: handleMouseDownNewPasswordConfirm - } = usePasswoordVisibility(); - - - if(!user ){ - return null; - }else{ - if(user.role !== UserRole.ADMIN && user.role !== UserRole.SUPERADMIN){ - return null; - } - } - - return ( -
-
- { - isWindowActive - ? - setToggle(false) - : - setToggle(!toggle) - }} - style={ - isWindowActive - ? - {cursor: "auto"} - : - {cursor: "pointer"} - } - /> - {toggle && -
-
-
- -

{userData?.name}

-
-
- - {setChangePasswordWindowVisibility(true); setToggle(false);}} className="sub-menu-link"> - -

Cambiar contraseña

- - - - -

Cerrar sesión

- -
-
- } -
- { - changePasswordWindowActive && -
-
- Cambio de contraseña - setChangePasswordWindowVisibility(false)}/> -
- -
-
-
- -
- - -
-

{errors.prevPassword?.message}

-
- -
- -
- - -
-

{errors.newPassword?.message}

-
- -
- -
- - -
-

{errors.newPasswordConfirm?.message}

-
- -
- -
-
-
-
- } -
- ); -} \ No newline at end of file diff --git a/web/src/components/admin_panel_places/admin_panel_place_list/admin_panel_place_list.tsx b/web/src/components/admin_panel_places/admin_panel_place_list/admin_panel_place_list.tsx deleted file mode 100644 index 94aa6d31..00000000 --- a/web/src/components/admin_panel_places/admin_panel_place_list/admin_panel_place_list.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import DataTable, { TableColumn } from 'react-data-table-component'; -import { usePlace } from '../../../hooks/usePlace'; -import './assets/css/styles.css'; -import { Place } from '../../../infraestructure/entities/place'; -import { LoadingSpinner } from '../../loading_spinner/loading_spinner'; -import { faEdit } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Dispatch, SetStateAction, useEffect } from 'react'; - -interface props{ - idTown: number; - isWindowActive: boolean; - setWindowVisibility: (visibility: boolean) => void; - setActualPlace: Dispatch>; - setIsRegisterPane: Dispatch>; -} - -export const AdminPanelPlaceList = ({idTown, isWindowActive, setWindowVisibility, setActualPlace, setIsRegisterPane}: props) => { - const { - placeList, - pending, - updatePlacesByTown - } = usePlace(); - - const handleEditSelectedCategory = (place: Place) => { - setIsRegisterPane(false); - setActualPlace(place); - setWindowVisibility(true); - } - - useEffect(() => { - updatePlacesByTown(idTown); - },[]); - - const columns : TableColumn[] = [ - { - name: "Identificador", - selector: row => row.idPlace || 0 - }, - { - name: "Nombre", - selector: row => row.name, - sortable: true - }, - { - name: "Estado", - selector: row => row.available - }, - { - name: "Acciones", - cell: (row) => { - return ( - { - if(!isWindowActive){ - handleEditSelectedCategory(row); - } - }} - /> - ); - } - } - ]; - - return ( -
- - } - columns={columns} data={placeList} className="data_table"/> -
- ); -} \ No newline at end of file diff --git a/web/src/components/admin_panel_poi/admin_panel_poi_list/admin_panel_poi_list.tsx b/web/src/components/admin_panel_poi/admin_panel_poi_list/admin_panel_poi_list.tsx deleted file mode 100644 index 8250307c..00000000 --- a/web/src/components/admin_panel_poi/admin_panel_poi_list/admin_panel_poi_list.tsx +++ /dev/null @@ -1,157 +0,0 @@ -import DataTable, { TableColumn } from 'react-data-table-component'; -import { usePlace } from '../../../hooks/usePlace'; -import './assets/css/styles.css'; -import { LoadingSpinner } from '../../loading_spinner/loading_spinner'; -import { faEye } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Dispatch, SetStateAction, useEffect, useState } from 'react'; -import { usePointOfInterest } from '../../../hooks/usePointOfInterest'; -import { PointOfInterest } from '../../../infraestructure/entities/poi'; -import { LoadingScreen } from '../../loading_screen/loading_screen'; - -interface props{ - idTown: number; - isWindowActive: boolean; - setActualPoint: Dispatch>; - setWindowVisibilityViewer: (visibility: boolean) => void; - setBinaryData: Dispatch>; - setIsPDFViewerActive: Dispatch>; -} - -export const AdminPanelPoiList = ({idTown, isWindowActive, setActualPoint, setWindowVisibilityViewer, setBinaryData, - setIsPDFViewerActive -}: props) => { - const [isLoading, setIsLoading] = useState(false); - const [isPDFLoading, setIsPDFLoading] = useState(false); - const [printButtonActive, setPrintButtonActive] = useState(false); - const [selectedRows, setSelectedRows] = useState([]); - const [actualPlaceId, setActualPlaceId] = useState(0); - const {getPdfById} = usePointOfInterest(); - - const handleRowSelected = (selected: { allSelected: boolean; selectedCount: number; selectedRows: PointOfInterest[];}) => { - setSelectedRows(selected.selectedRows.map((element)=>{return element.idPoint || -1})); - } - - useEffect(()=>{ - if(selectedRows.length>0){ - setPrintButtonActive(true); - }else{ - setPrintButtonActive(false); - } - },[selectedRows]); - - const handleClickPrintButton = () => { - const fetchPdf = async () => { - setIsPDFLoading(true); - const res = await getPdfById(actualPlaceId, selectedRows); - if(res!==null){ - setIsPDFViewerActive(true); - setBinaryData(res); - } - setIsPDFLoading(false); - } - fetchPdf(); - } - - const { - placeList, - updatePlacesByTown - } = usePlace(); - - const { - pending, - updatePOIByPlace, - poiList - } = usePointOfInterest(); - - const handleViewSelectedPoint = (point: PointOfInterest) => { - setActualPoint(point); - setWindowVisibilityViewer(true); - } - - const columns : TableColumn[] = [ - { - name: "Identificador", - selector: row => row.idPoint || -1, - sortable: true - }, - { - name: "Nombre", - selector: row => row.name.substring(0,40), - sortable: true - }, - { - name: "Acciones", - cell: (row) => { - return ( - { - if(!isWindowActive){ - handleViewSelectedPoint(row); - } - }} - /> - ); - } - } - ]; - - useEffect(() => { - setIsLoading(true); - updatePlacesByTown(idTown); - setIsLoading(false); - },[]); - - const refreshList = (idPlace: number) => { - updatePOIByPlace(idPlace) - }; - - - if(isLoading) return - - return ( -
-
- Lugar - - -
-
- - } - onSelectedRowsChange={handleRowSelected} - columns={columns} data={poiList} selectableRows className="data_table" - /> -
- { - isPDFLoading && - } -
- ); -} \ No newline at end of file diff --git a/web/src/components/admin_panel_poi/admin_panel_poi_register/admin_panel_poi_register.tsx b/web/src/components/admin_panel_poi/admin_panel_poi_register/admin_panel_poi_register.tsx deleted file mode 100644 index 25b25c85..00000000 --- a/web/src/components/admin_panel_poi/admin_panel_poi_register/admin_panel_poi_register.tsx +++ /dev/null @@ -1,205 +0,0 @@ -import { faWindowClose } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { useEffect, useState} from "react"; -import "./assets/css/styles.css"; -import { languaguesList } from "../../../constants/languages"; -import { LoadingScreen } from "../../loading_screen/loading_screen"; -import { usePointOfInterest } from "../../../hooks/usePointOfInterest"; -import { EmptyPointOfInterest, PointOfInterest } from "../../../infraestructure/entities/poi"; -import { ImageDropzone } from "../../image_dropzone/image_dropzone"; -import { usePlace } from "../../../hooks/usePlace"; - -interface props { - setWindowVisibility: (visibility: boolean) => void; - idTown: number; - forceRenderList: () => void; - isRegister: boolean; - form?: PointOfInterest; -} - -export const AdminPanelPoiRegister = ({setWindowVisibility, idTown,forceRenderList, isRegister, form}: props) => { - const { - register, - errors, - setDescriptions, - setDirections, - descriptions, - directions, - setLanguageDescriptionIndexSelected, - handleSubmit, - onSubmitRegister, - getPointById, - setValue, - languageDescriptionIndexSelected, - languageDirectionsIndexSelected, - setLanguageDirectionsIndexSelected, - } = usePointOfInterest(forceRenderList, setWindowVisibility); - const [isLoading, setIsLoading] = useState(false); - const [preview, setPreview] = useState(null); - const [image, setImage] = useState(null); - const { - placeList, - updatePlacesByTown - } = usePlace(); - - useEffect(() => { - if(image){ - setValue('image', image, {shouldValidate: true}); - } - },[image]); - - useEffect(() => { - setIsLoading(true); - const fetchData = async () => { - await updatePlacesByTown(idTown); - if (!isRegister && form) { - const pointGetted = await getPointById(form.idPoint || 0); - if(pointGetted){ - setValue('idPoint', pointGetted.idPlace); - setValue('name', pointGetted.name); - setValue('contentEN', pointGetted.contentEN); - setValue('contentES', pointGetted.contentES); - setValue('directionsEN', pointGetted.directionsEN); - setValue('directionsES', pointGetted.directionsES); - } - } - }; - fetchData(); - setIsLoading(false); - },[]); - - return ( -
-
- Registra el punto de interés - setWindowVisibility(false)}/> -
-
- {isLoading - ? - - : -
-
-
-
- Nombre del punto de interés -
- -

{errors.name?.message}

-
- -
-
- Descripción del punto de interés - -
- { - languaguesList.map((language, index) => { - if(index===languageDescriptionIndexSelected){ - return ( -