Merge branch 'dev' of github.com:DeimosPr4/katoikia-app into 51-us-54-ver-información-inquilino
This commit is contained in:
commit
ef53fa88b5
|
@ -0,0 +1,15 @@
|
|||
> Why do I have a folder named ".expo" in my project?
|
||||
|
||||
The ".expo" folder is created when an Expo project is started using "expo start" command.
|
||||
|
||||
> What do the files contain?
|
||||
|
||||
- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
|
||||
- "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
|
||||
- "settings.json": contains the server configuration that is used to serve the application manifest.
|
||||
|
||||
> Should I commit the ".expo" folder?
|
||||
|
||||
No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
|
||||
|
||||
Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"hostType": "lan",
|
||||
"lanType": "ip",
|
||||
"dev": true,
|
||||
"minify": false,
|
||||
"urlRandomness": null,
|
||||
"https": false
|
||||
}
|
141
mobile-ui/App.js
141
mobile-ui/App.js
|
@ -1,138 +1,27 @@
|
|||
import React from "react";
|
||||
import {
|
||||
Text,
|
||||
Link,
|
||||
HStack,
|
||||
Center,
|
||||
Heading,
|
||||
Switch,
|
||||
useColorMode,
|
||||
NativeBaseProvider,
|
||||
extendTheme,
|
||||
VStack,
|
||||
Box,
|
||||
FormControl,
|
||||
Input,
|
||||
Button,
|
||||
Image
|
||||
NativeBaseProvider
|
||||
} from "native-base";
|
||||
import NativeBaseIcon from "./components/NativeBaseIcon";
|
||||
import { Platform } from "react-native";
|
||||
import { NavigationContainer } from '@react-navigation/native';
|
||||
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
||||
import LogIn from "./components/LogIn";
|
||||
import Home from "./components/Home";
|
||||
import RecoverPassword from "./components/RecoverPassword";
|
||||
|
||||
// Define the config
|
||||
const config = {
|
||||
useSystemColorMode: false,
|
||||
initialColorMode: "dark",
|
||||
};
|
||||
|
||||
// extend the theme
|
||||
export const theme = extendTheme({ config,
|
||||
colors: {
|
||||
brown: "#D7A86E"
|
||||
} });
|
||||
|
||||
//const logo = require('./assets/')
|
||||
const Stack = createNativeStackNavigator();
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<NativeBaseProvider>
|
||||
<Center w="100%">
|
||||
<Box safeArea p="2" py="8" w="90%" maxW="290">
|
||||
{/* <Image source={{
|
||||
uri: logo.default.src
|
||||
}} width={500} height={500}
|
||||
alt="Katoikia logo" size="xl" /> */}
|
||||
|
||||
<Heading
|
||||
size="lg"
|
||||
fontWeight="600"
|
||||
color="coolGray.800"
|
||||
_dark={{
|
||||
color: "warmGray.50",
|
||||
}}
|
||||
>
|
||||
Bienvenido a Katoikia
|
||||
</Heading>
|
||||
<Heading
|
||||
mt="1"
|
||||
_dark={{
|
||||
color: "warmGray.200",
|
||||
}}
|
||||
color="coolGray.600"
|
||||
fontWeight="medium"
|
||||
size="xs"
|
||||
>
|
||||
Su app de comunidad de confianza
|
||||
</Heading>
|
||||
|
||||
<VStack space={3} mt="5">
|
||||
<FormControl>
|
||||
<FormControl.Label> Correo Electrónico</FormControl.Label>
|
||||
<Input />
|
||||
</FormControl>
|
||||
<FormControl>
|
||||
<FormControl.Label> Contraseña </FormControl.Label>
|
||||
<Input type="password" />
|
||||
<Link
|
||||
_text={{
|
||||
fontSize: "xs",
|
||||
fontWeight: "500",
|
||||
color: "indigo.500",
|
||||
}}
|
||||
alignSelf="flex-end"
|
||||
mt="1"
|
||||
>
|
||||
Recuperar contraseña
|
||||
|
||||
</Link>
|
||||
</FormControl>
|
||||
<Button mt="2" colorScheme="primary"
|
||||
>
|
||||
<Text>Continuar</Text>
|
||||
</Button>
|
||||
<HStack mt="6" justifyContent="center">
|
||||
{/* <Text
|
||||
fontSize="sm"
|
||||
color="coolGray.600"
|
||||
_dark={{
|
||||
color: "warmGray.200",
|
||||
}}
|
||||
>
|
||||
I'm a new user.
|
||||
</Text> */}
|
||||
<Link
|
||||
_text={{
|
||||
color: "warning.300",
|
||||
fontWeight: "medium",
|
||||
fontSize: "sm",
|
||||
}}
|
||||
href="#"
|
||||
>
|
||||
Regístrese aquí
|
||||
</Link>
|
||||
</HStack>
|
||||
</VStack>
|
||||
</Box>
|
||||
</Center>
|
||||
<NavigationContainer>
|
||||
<Stack.Navigator initialRouteName="LogIn">
|
||||
<Stack.Screen name="Inicio" component={LogIn} />
|
||||
<Stack.Screen name="Home" component={Home} />
|
||||
<Stack.Screen name="Password" component={RecoverPassword} />
|
||||
</Stack.Navigator>
|
||||
</NavigationContainer>
|
||||
|
||||
</NativeBaseProvider>
|
||||
);
|
||||
}
|
||||
|
||||
// Color Switch Component
|
||||
function ToggleDarkMode() {
|
||||
const { colorMode, toggleColorMode } = useColorMode();
|
||||
return (
|
||||
<HStack space={2} alignItems="center">
|
||||
<Text>Dark</Text>
|
||||
<Switch
|
||||
isChecked={colorMode === "light"}
|
||||
onToggle={toggleColorMode}
|
||||
aria-label={
|
||||
colorMode === "light" ? "switch to dark mode" : "switch to light mode"
|
||||
}
|
||||
/>
|
||||
<Text>Light</Text>
|
||||
</HStack>
|
||||
);
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
@ -0,0 +1,35 @@
|
|||
import React from "react";
|
||||
import {
|
||||
Text,
|
||||
HStack,
|
||||
IconButton,
|
||||
Box,
|
||||
StatusBar,
|
||||
Icon,
|
||||
MaterialIcons,
|
||||
Center
|
||||
} from "native-base";
|
||||
|
||||
export default function Home(){
|
||||
|
||||
return (
|
||||
<Center width={"100%"} marginTop={"auto"}>
|
||||
<StatusBar bg="#D7A86E" barStyle="light-content" />
|
||||
<Box safeAreaTop bg="#D7A86E" />
|
||||
<HStack bg="#D7A86E" px="2" py="4" justifyContent="space-between" alignItems="center" w="100%" maxW="100%">
|
||||
<HStack alignItems="center">
|
||||
<IconButton icon={<Icon size="sm" as={MaterialIcons} name="menu" color="white" />} />
|
||||
<Text color="white" fontSize="20" fontWeight="bold">
|
||||
Home
|
||||
</Text>
|
||||
</HStack>
|
||||
<HStack>
|
||||
<IconButton icon={<Icon as={MaterialIcons} name="favorite" size="sm" color="white" />} />
|
||||
<IconButton icon={<Icon as={MaterialIcons} name="search" size="sm" color="white" />} />
|
||||
<IconButton icon={<Icon as={MaterialIcons} name="more-vert" size="sm" color="white" />} />
|
||||
</HStack>
|
||||
</HStack>
|
||||
</Center>
|
||||
|
||||
)
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
import React from "react";
|
||||
import {
|
||||
Text,
|
||||
Link,
|
||||
View,
|
||||
Center,
|
||||
Heading,
|
||||
VStack,
|
||||
Box,
|
||||
FormControl,
|
||||
Input,
|
||||
Button,
|
||||
Image,
|
||||
TextInput
|
||||
} from "native-base";
|
||||
import logo from "../assets/logo-katoikia.png";
|
||||
import { Entypo } from '@expo/vector-icons';
|
||||
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
||||
|
||||
export default function LogIn({navigation}) {
|
||||
return (
|
||||
|
||||
|
||||
<Center w="100%">
|
||||
<Box safeArea p="2" py="8" w="90%" maxW="290">
|
||||
<Image source={
|
||||
logo
|
||||
} width={500} height={550}
|
||||
alt="Katoikia logo" size="xl" justifyContent="center" />
|
||||
|
||||
<Heading
|
||||
size="lg"
|
||||
fontWeight="600"
|
||||
color="coolGray.800"
|
||||
_dark={{
|
||||
color: "warmGray.50",
|
||||
}}
|
||||
>
|
||||
Bienvenido a Katoikia
|
||||
</Heading>
|
||||
<Heading
|
||||
mt="1"
|
||||
_dark={{
|
||||
color: "warmGray.200",
|
||||
}}
|
||||
color="coolGray.600"
|
||||
fontWeight="medium"
|
||||
size="xs"
|
||||
>
|
||||
Su app de comunidad de confianza
|
||||
</Heading>
|
||||
|
||||
<VStack space={3} mt="5">
|
||||
<FormControl>
|
||||
<FormControl.Label> Correo Electrónico </FormControl.Label>
|
||||
|
||||
<View>
|
||||
<Entypo name="email" size={20} color="grey" />
|
||||
<Input type="text" />
|
||||
</View>
|
||||
|
||||
</FormControl>
|
||||
<FormControl>
|
||||
<FormControl.Label> Contraseña </FormControl.Label>
|
||||
<View>
|
||||
<MaterialCommunityIcons name="form-textbox-password" size={20} color="grey" />
|
||||
<Input type="password" />
|
||||
</View>
|
||||
<Link
|
||||
_text={{
|
||||
fontSize: "xs",
|
||||
fontWeight: "500",
|
||||
color: "indigo.500",
|
||||
}}
|
||||
alignSelf="flex-end"
|
||||
mt="1"
|
||||
onPress={() => navigation.navigate('Password')}
|
||||
|
||||
>
|
||||
|
||||
Recuperar contraseña
|
||||
|
||||
</Link>
|
||||
</FormControl>
|
||||
<Button mt="2" colorScheme="primary" onPress={() => navigation.navigate('Home')}
|
||||
>
|
||||
<Text>Continuar</Text>
|
||||
</Button>
|
||||
|
||||
</VStack>
|
||||
</Box>
|
||||
</Center>
|
||||
);
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
import React from "react";
|
||||
import {
|
||||
Text,
|
||||
Link,
|
||||
Center,
|
||||
Heading,
|
||||
VStack,
|
||||
Box,
|
||||
FormControl,
|
||||
Input,
|
||||
Button
|
||||
} from "native-base";
|
||||
export default function RecoverPassword () {
|
||||
|
||||
return (
|
||||
<Center w="100%">
|
||||
<Box safeArea p="2" py="8" w="90%" maxW="290">
|
||||
<Heading
|
||||
size="lg"
|
||||
fontWeight="600"
|
||||
color="coolGray.800"
|
||||
_dark={{
|
||||
color: "warmGray.50",
|
||||
}}
|
||||
>
|
||||
Recupere su contraseña
|
||||
</Heading>
|
||||
<Heading
|
||||
mt="1"
|
||||
_dark={{
|
||||
color: "warmGray.200",
|
||||
}}
|
||||
color="coolGray.600"
|
||||
fontWeight="medium"
|
||||
size="xs"
|
||||
>
|
||||
Se le enviaran las instrucciones al correo electrónico
|
||||
</Heading>
|
||||
|
||||
<VStack space={3} mt="5">
|
||||
<FormControl>
|
||||
<FormControl.Label> Correo Electrónico</FormControl.Label>
|
||||
<Input />
|
||||
</FormControl>
|
||||
|
||||
<Button mt="2" colorScheme="primary" onPress={() => navigation.navigate('Home')}
|
||||
>
|
||||
<Text>Recuperar contraseña</Text>
|
||||
</Button>
|
||||
|
||||
</VStack>
|
||||
</Box>
|
||||
</Center>
|
||||
|
||||
)
|
||||
}
|
|
@ -9,13 +9,20 @@
|
|||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@react-native-community/masked-view": "^0.1.11",
|
||||
"@react-navigation/native": "^6.0.11",
|
||||
"@react-navigation/native-stack": "^6.7.0",
|
||||
"@react-navigation/stack": "^6.2.2",
|
||||
"expo": "^44.0.0",
|
||||
"expo-status-bar": "~1.2.0",
|
||||
"native-base": "3.4.0",
|
||||
"react": "17.0.1",
|
||||
"react-dom": "17.0.1",
|
||||
"react-native": "0.64.3",
|
||||
"react-native-gesture-handler": "~2.1.0",
|
||||
"react-native-reanimated": "~2.3.1",
|
||||
"react-native-safe-area-context": "3.3.2",
|
||||
"react-native-screens": "~3.10.1",
|
||||
"react-native-svg": "12.1.1",
|
||||
"react-native-web": "0.17.1"
|
||||
},
|
||||
|
@ -1810,6 +1817,17 @@
|
|||
"node": ">=0.1.95"
|
||||
}
|
||||
},
|
||||
"node_modules/@egjs/hammerjs": {
|
||||
"version": "2.0.17",
|
||||
"resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz",
|
||||
"integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==",
|
||||
"dependencies": {
|
||||
"@types/hammerjs": "^2.0.36"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@expo/config": {
|
||||
"version": "6.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@expo/config/-/config-6.0.6.tgz",
|
||||
|
@ -3490,6 +3508,16 @@
|
|||
"node": ">= 4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-native-community/masked-view": {
|
||||
"version": "0.1.11",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-community/masked-view/-/masked-view-0.1.11.tgz",
|
||||
"integrity": "sha512-rQfMIGSR/1r/SyN87+VD8xHHzDYeHaJq6elOSCAD+0iLagXkSI2pfA0LmSXP21uw5i3em7GkkRjfJ8wpqWXZNw==",
|
||||
"deprecated": "Repository was moved to @react-native-masked-view/masked-view",
|
||||
"peerDependencies": {
|
||||
"react": ">=16.0",
|
||||
"react-native": ">=0.57"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-native/assets": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-native/assets/-/assets-1.0.0.tgz",
|
||||
|
@ -3505,6 +3533,116 @@
|
|||
"resolved": "https://registry.npmjs.org/@react-native/polyfills/-/polyfills-1.0.0.tgz",
|
||||
"integrity": "sha512-0jbp4RxjYopTsIdLl+/Fy2TiwVYHy4mgeu07DG4b/LyM0OS/+lPP5c9sbnt/AMlnF6qz2JRZpPpGw1eMNS6A4w=="
|
||||
},
|
||||
"node_modules/@react-navigation/core": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-6.2.2.tgz",
|
||||
"integrity": "sha512-gEJ1gRqt1EIqRrnJIpSQ0wWJRue9maAQNKYrlQ0a/LSKErF3g6w+sD2wW4Bbb1yj88pGhKeuI4wdB9MVK766Pg==",
|
||||
"dependencies": {
|
||||
"@react-navigation/routers": "^6.1.1",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"nanoid": "^3.1.23",
|
||||
"query-string": "^7.0.0",
|
||||
"react-is": "^16.13.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-navigation/core/node_modules/escape-string-regexp": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-navigation/core/node_modules/react-is": {
|
||||
"version": "16.13.1",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||
},
|
||||
"node_modules/@react-navigation/elements": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-1.3.4.tgz",
|
||||
"integrity": "sha512-O0jICpjn3jskVo4yiWzZozmj7DZy1ZBbn3O7dbenuUjZSj/cscjwaapmZZFGcI/IMmjmx8UTKsybhCFEIbGf3g==",
|
||||
"peerDependencies": {
|
||||
"@react-navigation/native": "^6.0.0",
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-safe-area-context": ">= 3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-navigation/native": {
|
||||
"version": "6.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-6.0.11.tgz",
|
||||
"integrity": "sha512-z0YTB7Czdb9SNjxfzcFNB3Vym0qmUcxpiYGOOXX8PH0s+xlIs/w+2RVp6YAvAC48A30o7MMCYqy5OeR6lrtWHg==",
|
||||
"dependencies": {
|
||||
"@react-navigation/core": "^6.2.2",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"nanoid": "^3.1.23"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-navigation/native-stack": {
|
||||
"version": "6.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.7.0.tgz",
|
||||
"integrity": "sha512-03CuSwbBvP9+iXgjrTRRw+aog+KZXbhPzqCWVExzIWNOzf5/PJEcdtlm9KDrx2aHHDtDA6LRLKQA4UIlJOmNzA==",
|
||||
"dependencies": {
|
||||
"@react-navigation/elements": "^1.3.4",
|
||||
"warn-once": "^0.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/native": "^6.0.0",
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-safe-area-context": ">= 3.0.0",
|
||||
"react-native-screens": ">= 3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-navigation/native/node_modules/escape-string-regexp": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-navigation/routers": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-6.1.1.tgz",
|
||||
"integrity": "sha512-mWWj2yh4na/OBaE7bWrft4kdAtxnG8MlV6ph3Bi6tHqgcnxENX+dnQY6y0qg/6E7cmMlaJg5nAC5y4Enr5ir8A==",
|
||||
"dependencies": {
|
||||
"nanoid": "^3.1.23"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-navigation/stack": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/stack/-/stack-6.2.2.tgz",
|
||||
"integrity": "sha512-P9ZfmluOXNmbs7YdG1UWS1fAh87Yse9aX8TgqOz4FlHEm5q7g5eaM35QgWByt+wif3UiqE40D8wXpqRQvMgPWg==",
|
||||
"dependencies": {
|
||||
"@react-navigation/elements": "^1.3.4",
|
||||
"color": "^4.2.3",
|
||||
"warn-once": "^0.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/native": "^6.0.0",
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-gesture-handler": ">= 1.0.0",
|
||||
"react-native-safe-area-context": ">= 3.0.0",
|
||||
"react-native-screens": ">= 3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-stately/checkbox": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-stately/checkbox/-/checkbox-3.2.0.tgz",
|
||||
|
@ -3947,6 +4085,16 @@
|
|||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/hammerjs": {
|
||||
"version": "2.0.41",
|
||||
"resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.41.tgz",
|
||||
"integrity": "sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA=="
|
||||
},
|
||||
"node_modules/@types/invariant": {
|
||||
"version": "2.2.35",
|
||||
"resolved": "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.35.tgz",
|
||||
"integrity": "sha512-DxX1V9P8zdJPYQat1gHyY0xj3efl8gnMVjiM9iCY6y27lj+PoQWkgjt8jDqmovPqULkKVpKRg8J36iQiA+EtEg=="
|
||||
},
|
||||
"node_modules/@types/istanbul-lib-coverage": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz",
|
||||
|
@ -4843,6 +4991,18 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
|
||||
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1",
|
||||
"color-string": "^1.9.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
|
@ -4856,6 +5016,31 @@
|
|||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
|
||||
},
|
||||
"node_modules/color-string": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
||||
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
||||
"dependencies": {
|
||||
"color-name": "^1.0.0",
|
||||
"simple-swizzle": "^0.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/color/node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color/node_modules/color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"node_modules/colorette": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",
|
||||
|
@ -5860,6 +6045,11 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||
},
|
||||
"node_modules/fast-glob": {
|
||||
"version": "3.2.11",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
|
||||
|
@ -5929,6 +6119,14 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/filter-obj": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz",
|
||||
"integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/finalhandler": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
|
||||
|
@ -6306,6 +6504,19 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/hoist-non-react-statics": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
|
||||
"integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
|
||||
"dependencies": {
|
||||
"react-is": "^16.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/hoist-non-react-statics/node_modules/react-is": {
|
||||
"version": "16.13.1",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||
},
|
||||
"node_modules/http-errors": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
||||
|
@ -7960,6 +8171,11 @@
|
|||
"mkdirp": "bin/cmd.js"
|
||||
}
|
||||
},
|
||||
"node_modules/mockdate": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/mockdate/-/mockdate-3.0.5.tgz",
|
||||
"integrity": "sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ=="
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
|
@ -7975,6 +8191,17 @@
|
|||
"thenify-all": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
|
||||
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/nanomatch": {
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
|
||||
|
@ -8749,6 +8976,23 @@
|
|||
"once": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/query-string": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.1.tgz",
|
||||
"integrity": "sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w==",
|
||||
"dependencies": {
|
||||
"decode-uri-component": "^0.2.0",
|
||||
"filter-obj": "^1.1.0",
|
||||
"split-on-first": "^1.0.0",
|
||||
"strict-uri-encode": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/querystringify": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
||||
|
@ -8835,6 +9079,17 @@
|
|||
"react": "17.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react-freeze": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/react-freeze/-/react-freeze-1.0.3.tgz",
|
||||
"integrity": "sha512-ZnXwLQnGzrDpHBHiC56TXFXvmolPeMjTn1UOm610M4EXGzbEDR7oOIyS2ZiItgbs6eZc4oU/a0hpk8PrcKvv5g==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=17.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-is": {
|
||||
"version": "17.0.2",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
|
||||
|
@ -8898,6 +9153,18 @@
|
|||
"nullthrows": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-gesture-handler": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.1.3.tgz",
|
||||
"integrity": "sha512-y5W2MVB+J6vjIT/mUidDv0BqVRbWXn0cP7R2o6fsSYsHh9M0btT979+bCI7nPuhmRHjkhg5xCm4HNMIH0IQO4w==",
|
||||
"dependencies": {
|
||||
"@egjs/hammerjs": "^2.0.17",
|
||||
"hoist-non-react-statics": "^3.3.0",
|
||||
"invariant": "^2.2.4",
|
||||
"lodash": "^4.17.21",
|
||||
"prop-types": "^15.7.2"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-iphone-x-helper": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz",
|
||||
|
@ -8918,6 +9185,25 @@
|
|||
"react-native": ">=0.48.4"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-reanimated": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-2.3.3.tgz",
|
||||
"integrity": "sha512-uQofwsWUoKLY4QDgSdNbRxnqQDaQEPLLBNO9SP64JfQ2fDRJD5rjb4d3S29F0z9FqTnsWEwTL2Sl0spdx9xvHA==",
|
||||
"dependencies": {
|
||||
"@babel/plugin-transform-object-assign": "^7.10.4",
|
||||
"@types/invariant": "^2.2.35",
|
||||
"invariant": "^2.2.4",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
"mockdate": "^3.0.2",
|
||||
"react-native-screens": "^3.4.0",
|
||||
"string-hash-64": "^1.0.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-gesture-handler": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-safe-area-context": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-3.3.2.tgz",
|
||||
|
@ -8927,6 +9213,19 @@
|
|||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-screens": {
|
||||
"version": "3.10.2",
|
||||
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.10.2.tgz",
|
||||
"integrity": "sha512-bMKSpwMeqAoXBqTJiDEG1ogM1cMk66sEmpp/4dGqdX59v+OwMqPeTuBk37qaSuS7gPOFFKsNW2X3ymGvBT4iEw==",
|
||||
"dependencies": {
|
||||
"react-freeze": "^1.0.0",
|
||||
"warn-once": "^0.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-svg": {
|
||||
"version": "12.1.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.1.1.tgz",
|
||||
|
@ -9690,6 +9989,19 @@
|
|||
"plist": "^3.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-swizzle": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
||||
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
|
||||
"dependencies": {
|
||||
"is-arrayish": "^0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-swizzle/node_modules/is-arrayish": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
||||
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
|
||||
},
|
||||
"node_modules/sisteransi": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
|
||||
|
@ -9948,6 +10260,14 @@
|
|||
"integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==",
|
||||
"deprecated": "See https://github.com/lydell/source-map-url#deprecated"
|
||||
},
|
||||
"node_modules/split-on-first": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
|
||||
"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/split-string": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
|
||||
|
@ -10089,6 +10409,14 @@
|
|||
"node": ">= 0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/strict-uri-encode": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
|
||||
"integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/string_decoder": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
|
@ -10097,6 +10425,11 @@
|
|||
"safe-buffer": "~5.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/string-hash-64": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/string-hash-64/-/string-hash-64-1.0.3.tgz",
|
||||
"integrity": "sha512-D5OKWKvDhyVWWn2x5Y9b+37NUllks34q1dCDhk/vYcso9fmhs+Tl3KR/gE4v5UNj2UA35cnX4KdVVGkG1deKqw=="
|
||||
},
|
||||
"node_modules/string-width": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
|
@ -10643,6 +10976,11 @@
|
|||
"makeerror": "1.0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/warn-once": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.1.tgz",
|
||||
"integrity": "sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q=="
|
||||
},
|
||||
"node_modules/wcwidth": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||
|
@ -12132,6 +12470,14 @@
|
|||
"minimist": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"@egjs/hammerjs": {
|
||||
"version": "2.0.17",
|
||||
"resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz",
|
||||
"integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==",
|
||||
"requires": {
|
||||
"@types/hammerjs": "^2.0.36"
|
||||
}
|
||||
},
|
||||
"@expo/config": {
|
||||
"version": "6.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@expo/config/-/config-6.0.6.tgz",
|
||||
|
@ -13485,6 +13831,12 @@
|
|||
"ora": "^3.4.0"
|
||||
}
|
||||
},
|
||||
"@react-native-community/masked-view": {
|
||||
"version": "0.1.11",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-community/masked-view/-/masked-view-0.1.11.tgz",
|
||||
"integrity": "sha512-rQfMIGSR/1r/SyN87+VD8xHHzDYeHaJq6elOSCAD+0iLagXkSI2pfA0LmSXP21uw5i3em7GkkRjfJ8wpqWXZNw==",
|
||||
"requires": {}
|
||||
},
|
||||
"@react-native/assets": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-native/assets/-/assets-1.0.0.tgz",
|
||||
|
@ -13500,6 +13852,81 @@
|
|||
"resolved": "https://registry.npmjs.org/@react-native/polyfills/-/polyfills-1.0.0.tgz",
|
||||
"integrity": "sha512-0jbp4RxjYopTsIdLl+/Fy2TiwVYHy4mgeu07DG4b/LyM0OS/+lPP5c9sbnt/AMlnF6qz2JRZpPpGw1eMNS6A4w=="
|
||||
},
|
||||
"@react-navigation/core": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-6.2.2.tgz",
|
||||
"integrity": "sha512-gEJ1gRqt1EIqRrnJIpSQ0wWJRue9maAQNKYrlQ0a/LSKErF3g6w+sD2wW4Bbb1yj88pGhKeuI4wdB9MVK766Pg==",
|
||||
"requires": {
|
||||
"@react-navigation/routers": "^6.1.1",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"nanoid": "^3.1.23",
|
||||
"query-string": "^7.0.0",
|
||||
"react-is": "^16.13.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
|
||||
},
|
||||
"react-is": {
|
||||
"version": "16.13.1",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@react-navigation/elements": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-1.3.4.tgz",
|
||||
"integrity": "sha512-O0jICpjn3jskVo4yiWzZozmj7DZy1ZBbn3O7dbenuUjZSj/cscjwaapmZZFGcI/IMmjmx8UTKsybhCFEIbGf3g==",
|
||||
"requires": {}
|
||||
},
|
||||
"@react-navigation/native": {
|
||||
"version": "6.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-6.0.11.tgz",
|
||||
"integrity": "sha512-z0YTB7Czdb9SNjxfzcFNB3Vym0qmUcxpiYGOOXX8PH0s+xlIs/w+2RVp6YAvAC48A30o7MMCYqy5OeR6lrtWHg==",
|
||||
"requires": {
|
||||
"@react-navigation/core": "^6.2.2",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"nanoid": "^3.1.23"
|
||||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@react-navigation/native-stack": {
|
||||
"version": "6.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.7.0.tgz",
|
||||
"integrity": "sha512-03CuSwbBvP9+iXgjrTRRw+aog+KZXbhPzqCWVExzIWNOzf5/PJEcdtlm9KDrx2aHHDtDA6LRLKQA4UIlJOmNzA==",
|
||||
"requires": {
|
||||
"@react-navigation/elements": "^1.3.4",
|
||||
"warn-once": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"@react-navigation/routers": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-6.1.1.tgz",
|
||||
"integrity": "sha512-mWWj2yh4na/OBaE7bWrft4kdAtxnG8MlV6ph3Bi6tHqgcnxENX+dnQY6y0qg/6E7cmMlaJg5nAC5y4Enr5ir8A==",
|
||||
"requires": {
|
||||
"nanoid": "^3.1.23"
|
||||
}
|
||||
},
|
||||
"@react-navigation/stack": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-navigation/stack/-/stack-6.2.2.tgz",
|
||||
"integrity": "sha512-P9ZfmluOXNmbs7YdG1UWS1fAh87Yse9aX8TgqOz4FlHEm5q7g5eaM35QgWByt+wif3UiqE40D8wXpqRQvMgPWg==",
|
||||
"requires": {
|
||||
"@react-navigation/elements": "^1.3.4",
|
||||
"color": "^4.2.3",
|
||||
"warn-once": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"@react-stately/checkbox": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-stately/checkbox/-/checkbox-3.2.0.tgz",
|
||||
|
@ -13846,6 +14273,16 @@
|
|||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/hammerjs": {
|
||||
"version": "2.0.41",
|
||||
"resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.41.tgz",
|
||||
"integrity": "sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA=="
|
||||
},
|
||||
"@types/invariant": {
|
||||
"version": "2.2.35",
|
||||
"resolved": "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.35.tgz",
|
||||
"integrity": "sha512-DxX1V9P8zdJPYQat1gHyY0xj3efl8gnMVjiM9iCY6y27lj+PoQWkgjt8jDqmovPqULkKVpKRg8J36iQiA+EtEg=="
|
||||
},
|
||||
"@types/istanbul-lib-coverage": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz",
|
||||
|
@ -14551,6 +14988,30 @@
|
|||
"object-visit": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"color": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
|
||||
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1",
|
||||
"color-string": "^1.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
|
@ -14564,6 +15025,15 @@
|
|||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
|
||||
},
|
||||
"color-string": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
||||
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
||||
"requires": {
|
||||
"color-name": "^1.0.0",
|
||||
"simple-swizzle": "^0.2.2"
|
||||
}
|
||||
},
|
||||
"colorette": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",
|
||||
|
@ -15360,6 +15830,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||
},
|
||||
"fast-glob": {
|
||||
"version": "3.2.11",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
|
||||
|
@ -15423,6 +15898,11 @@
|
|||
"to-regex-range": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"filter-obj": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz",
|
||||
"integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ=="
|
||||
},
|
||||
"finalhandler": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
|
||||
|
@ -15704,6 +16184,21 @@
|
|||
"source-map": "^0.7.3"
|
||||
}
|
||||
},
|
||||
"hoist-non-react-statics": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
|
||||
"integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
|
||||
"requires": {
|
||||
"react-is": "^16.7.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-is": {
|
||||
"version": "16.13.1",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"http-errors": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
||||
|
@ -17044,6 +17539,11 @@
|
|||
"minimist": "^1.2.6"
|
||||
}
|
||||
},
|
||||
"mockdate": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/mockdate/-/mockdate-3.0.5.tgz",
|
||||
"integrity": "sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ=="
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
|
@ -17059,6 +17559,11 @@
|
|||
"thenify-all": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"nanoid": {
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
|
||||
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw=="
|
||||
},
|
||||
"nanomatch": {
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
|
||||
|
@ -17645,6 +18150,17 @@
|
|||
"once": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"query-string": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.1.tgz",
|
||||
"integrity": "sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w==",
|
||||
"requires": {
|
||||
"decode-uri-component": "^0.2.0",
|
||||
"filter-obj": "^1.1.0",
|
||||
"split-on-first": "^1.0.0",
|
||||
"strict-uri-encode": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"querystringify": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
||||
|
@ -17696,6 +18212,12 @@
|
|||
"scheduler": "^0.20.1"
|
||||
}
|
||||
},
|
||||
"react-freeze": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/react-freeze/-/react-freeze-1.0.3.tgz",
|
||||
"integrity": "sha512-ZnXwLQnGzrDpHBHiC56TXFXvmolPeMjTn1UOm610M4EXGzbEDR7oOIyS2ZiItgbs6eZc4oU/a0hpk8PrcKvv5g==",
|
||||
"requires": {}
|
||||
},
|
||||
"react-is": {
|
||||
"version": "17.0.2",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
|
||||
|
@ -17765,6 +18287,18 @@
|
|||
"nullthrows": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"react-native-gesture-handler": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.1.3.tgz",
|
||||
"integrity": "sha512-y5W2MVB+J6vjIT/mUidDv0BqVRbWXn0cP7R2o6fsSYsHh9M0btT979+bCI7nPuhmRHjkhg5xCm4HNMIH0IQO4w==",
|
||||
"requires": {
|
||||
"@egjs/hammerjs": "^2.0.17",
|
||||
"hoist-non-react-statics": "^3.3.0",
|
||||
"invariant": "^2.2.4",
|
||||
"lodash": "^4.17.21",
|
||||
"prop-types": "^15.7.2"
|
||||
}
|
||||
},
|
||||
"react-native-iphone-x-helper": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz",
|
||||
|
@ -17780,12 +18314,35 @@
|
|||
"react-native-iphone-x-helper": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"react-native-reanimated": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-2.3.3.tgz",
|
||||
"integrity": "sha512-uQofwsWUoKLY4QDgSdNbRxnqQDaQEPLLBNO9SP64JfQ2fDRJD5rjb4d3S29F0z9FqTnsWEwTL2Sl0spdx9xvHA==",
|
||||
"requires": {
|
||||
"@babel/plugin-transform-object-assign": "^7.10.4",
|
||||
"@types/invariant": "^2.2.35",
|
||||
"invariant": "^2.2.4",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
"mockdate": "^3.0.2",
|
||||
"react-native-screens": "^3.4.0",
|
||||
"string-hash-64": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"react-native-safe-area-context": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-3.3.2.tgz",
|
||||
"integrity": "sha512-yOwiiPJ1rk+/nfK13eafbpW6sKW0jOnsRem2C1LPJjM3tfTof6hlvV5eWHATye3XOpu2cJ7N+HdkUvUDGwFD2Q==",
|
||||
"requires": {}
|
||||
},
|
||||
"react-native-screens": {
|
||||
"version": "3.10.2",
|
||||
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.10.2.tgz",
|
||||
"integrity": "sha512-bMKSpwMeqAoXBqTJiDEG1ogM1cMk66sEmpp/4dGqdX59v+OwMqPeTuBk37qaSuS7gPOFFKsNW2X3ymGvBT4iEw==",
|
||||
"requires": {
|
||||
"react-freeze": "^1.0.0",
|
||||
"warn-once": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"react-native-svg": {
|
||||
"version": "12.1.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.1.1.tgz",
|
||||
|
@ -18384,6 +18941,21 @@
|
|||
"plist": "^3.0.5"
|
||||
}
|
||||
},
|
||||
"simple-swizzle": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
||||
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
|
||||
"requires": {
|
||||
"is-arrayish": "^0.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-arrayish": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
||||
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"sisteransi": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
|
||||
|
@ -18592,6 +19164,11 @@
|
|||
"resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
|
||||
"integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw=="
|
||||
},
|
||||
"split-on-first": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
|
||||
"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw=="
|
||||
},
|
||||
"split-string": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
|
||||
|
@ -18703,6 +19280,11 @@
|
|||
"resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
|
||||
"integrity": "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg=="
|
||||
},
|
||||
"strict-uri-encode": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
|
||||
"integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ=="
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
|
@ -18711,6 +19293,11 @@
|
|||
"safe-buffer": "~5.1.0"
|
||||
}
|
||||
},
|
||||
"string-hash-64": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/string-hash-64/-/string-hash-64-1.0.3.tgz",
|
||||
"integrity": "sha512-D5OKWKvDhyVWWn2x5Y9b+37NUllks34q1dCDhk/vYcso9fmhs+Tl3KR/gE4v5UNj2UA35cnX4KdVVGkG1deKqw=="
|
||||
},
|
||||
"string-width": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
|
@ -19111,6 +19698,11 @@
|
|||
"makeerror": "1.0.12"
|
||||
}
|
||||
},
|
||||
"warn-once": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.1.tgz",
|
||||
"integrity": "sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q=="
|
||||
},
|
||||
"wcwidth": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||
|
|
|
@ -17,13 +17,20 @@
|
|||
"eject": "expo eject"
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-native-community/masked-view": "^0.1.11",
|
||||
"@react-navigation/native": "^6.0.11",
|
||||
"@react-navigation/native-stack": "^6.7.0",
|
||||
"@react-navigation/stack": "^6.2.2",
|
||||
"expo": "^44.0.0",
|
||||
"expo-status-bar": "~1.2.0",
|
||||
"native-base": "3.4.0",
|
||||
"react": "17.0.1",
|
||||
"react-dom": "17.0.1",
|
||||
"react-native": "0.64.3",
|
||||
"react-native-gesture-handler": "~2.1.0",
|
||||
"react-native-reanimated": "~2.3.1",
|
||||
"react-native-safe-area-context": "3.3.2",
|
||||
"react-native-screens": "~3.10.1",
|
||||
"react-native-svg": "12.1.1",
|
||||
"react-native-web": "0.17.1"
|
||||
},
|
||||
|
|
|
@ -7156,4 +7156,11 @@
|
|||
.status.status--1 {
|
||||
background: #565656;
|
||||
color: #f7f9f7;
|
||||
}
|
||||
|
||||
|
||||
.login-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 66 KiB |
|
@ -1,6 +1,6 @@
|
|||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { Route, useLocation } from 'react-router-dom';
|
||||
import { BrowserRouter, Switch, Route, useLocation } from 'react-router-dom';
|
||||
import { CSSTransition } from 'react-transition-group';
|
||||
|
||||
import { AppTopbar } from './AppTopbar';
|
||||
|
@ -50,407 +50,483 @@ import './assets/demo/flags/flags.css';
|
|||
import './assets/demo/Demos.scss';
|
||||
import './assets/layout/layout.scss';
|
||||
import './App.scss';
|
||||
import LogIn from './components/LogIn';
|
||||
import { PrimeIcons } from 'primereact/api';
|
||||
import AreasComunes from './components/AreasComunes';
|
||||
import { useCookies } from "react-cookie";
|
||||
import LogInUser from './components/LogInUser';
|
||||
import Page404 from './components/Page404'
|
||||
|
||||
|
||||
const App = () => {
|
||||
const [layoutMode, setLayoutMode] = useState('static');
|
||||
const [layoutColorMode, setLayoutColorMode] = useState('light');
|
||||
const [inputStyle, setInputStyle] = useState('outlined');
|
||||
const [ripple, setRipple] = useState(true);
|
||||
const [staticMenuInactive, setStaticMenuInactive] = useState(false);
|
||||
const [overlayMenuActive, setOverlayMenuActive] = useState(false);
|
||||
const [mobileMenuActive, setMobileMenuActive] = useState(false);
|
||||
const [mobileTopbarMenuActive, setMobileTopbarMenuActive] = useState(false);
|
||||
const copyTooltipRef = useRef();
|
||||
const location = useLocation();
|
||||
const [layoutMode, setLayoutMode] = useState('static');
|
||||
const [layoutColorMode, setLayoutColorMode] = useState('light')
|
||||
const [inputStyle, setInputStyle] = useState('outlined');
|
||||
const [ripple, setRipple] = useState(true);
|
||||
const [staticMenuInactive, setStaticMenuInactive] = useState(false);
|
||||
const [overlayMenuActive, setOverlayMenuActive] = useState(false);
|
||||
const [mobileMenuActive, setMobileMenuActive] = useState(false);
|
||||
const [mobileTopbarMenuActive, setMobileTopbarMenuActive] = useState(false);
|
||||
const copyTooltipRef = useRef();
|
||||
const location = useLocation();
|
||||
const [cookies, setCookies] = useCookies();
|
||||
const [logged, setLogged] = useState()
|
||||
|
||||
PrimeReact.ripple = true;
|
||||
PrimeReact.ripple = true;
|
||||
|
||||
let menuClick = false;
|
||||
let mobileTopbarMenuClick = false;
|
||||
let menuClick = false;
|
||||
let mobileTopbarMenuClick = false;
|
||||
|
||||
useEffect(() => {
|
||||
if (mobileMenuActive) {
|
||||
addClass(document.body, 'body-overflow-hidden');
|
||||
} else {
|
||||
removeClass(document.body, 'body-overflow-hidden');
|
||||
}
|
||||
}, [mobileMenuActive]);
|
||||
useEffect(() => {
|
||||
if (mobileMenuActive) {
|
||||
addClass(document.body, 'body-overflow-hidden');
|
||||
} else {
|
||||
removeClass(document.body, 'body-overflow-hidden');
|
||||
}
|
||||
}, [mobileMenuActive]);
|
||||
|
||||
useEffect(() => {
|
||||
copyTooltipRef &&
|
||||
copyTooltipRef.current &&
|
||||
copyTooltipRef.current.updateTargetEvents();
|
||||
}, [location]);
|
||||
useEffect(() => {
|
||||
copyTooltipRef &&
|
||||
copyTooltipRef.current &&
|
||||
copyTooltipRef.current.updateTargetEvents();
|
||||
}, [location]);
|
||||
|
||||
const onInputStyleChange = (inputStyle) => {
|
||||
setInputStyle(inputStyle);
|
||||
};
|
||||
|
||||
const onRipple = (e) => {
|
||||
PrimeReact.ripple = e.value;
|
||||
setRipple(e.value);
|
||||
};
|
||||
|
||||
const onLayoutModeChange = (mode) => {
|
||||
setLayoutMode(mode);
|
||||
};
|
||||
|
||||
const onColorModeChange = (mode) => {
|
||||
setLayoutColorMode(mode);
|
||||
};
|
||||
|
||||
const onWrapperClick = (event) => {
|
||||
if (!menuClick) {
|
||||
setOverlayMenuActive(false);
|
||||
setMobileMenuActive(false);
|
||||
}
|
||||
|
||||
if (!mobileTopbarMenuClick) {
|
||||
setMobileTopbarMenuActive(false);
|
||||
}
|
||||
|
||||
mobileTopbarMenuClick = false;
|
||||
menuClick = false;
|
||||
};
|
||||
const onInputStyleChange = (inputStyle) => {
|
||||
setInputStyle(inputStyle);
|
||||
};
|
||||
|
||||
const onToggleMenuClick = (event) => {
|
||||
menuClick = true;
|
||||
const onRipple = (e) => {
|
||||
PrimeReact.ripple = e.value;
|
||||
setRipple(e.value);
|
||||
};
|
||||
|
||||
if (isDesktop()) {
|
||||
if (layoutMode === 'overlay') {
|
||||
if (mobileMenuActive === true) {
|
||||
setOverlayMenuActive(true);
|
||||
const onLayoutModeChange = (mode) => {
|
||||
setLayoutMode(mode);
|
||||
};
|
||||
|
||||
const onColorModeChange = (mode) => {
|
||||
setLayoutColorMode(mode);
|
||||
};
|
||||
|
||||
const onWrapperClick = (event) => {
|
||||
if (!menuClick) {
|
||||
setOverlayMenuActive(false);
|
||||
setMobileMenuActive(false);
|
||||
}
|
||||
|
||||
setOverlayMenuActive((prevState) => !prevState);
|
||||
setMobileMenuActive(false);
|
||||
} else if (layoutMode === 'static') {
|
||||
setStaticMenuInactive((prevState) => !prevState);
|
||||
}
|
||||
} else {
|
||||
setMobileMenuActive((prevState) => !prevState);
|
||||
if (!mobileTopbarMenuClick) {
|
||||
setMobileTopbarMenuActive(false);
|
||||
}
|
||||
|
||||
mobileTopbarMenuClick = false;
|
||||
menuClick = false;
|
||||
};
|
||||
|
||||
const onToggleMenuClick = (event) => {
|
||||
menuClick = true;
|
||||
|
||||
if (isDesktop()) {
|
||||
if (layoutMode === 'overlay') {
|
||||
if (mobileMenuActive === true) {
|
||||
setOverlayMenuActive(true);
|
||||
}
|
||||
|
||||
setOverlayMenuActive((prevState) => !prevState);
|
||||
setMobileMenuActive(false);
|
||||
} else if (layoutMode === 'static') {
|
||||
setStaticMenuInactive((prevState) => !prevState);
|
||||
}
|
||||
} else {
|
||||
setMobileMenuActive((prevState) => !prevState);
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
const onSidebarClick = () => {
|
||||
menuClick = true;
|
||||
};
|
||||
|
||||
const onMobileTopbarMenuClick = (event) => {
|
||||
mobileTopbarMenuClick = true;
|
||||
|
||||
setMobileTopbarMenuActive((prevState) => !prevState);
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
const onMobileSubTopbarMenuClick = (event) => {
|
||||
mobileTopbarMenuClick = true;
|
||||
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
const onMenuItemClick = (event) => {
|
||||
if (!event.item.items) {
|
||||
setOverlayMenuActive(false);
|
||||
setMobileMenuActive(false);
|
||||
}
|
||||
};
|
||||
const isDesktop = () => {
|
||||
return window.innerWidth >= 992;
|
||||
};
|
||||
|
||||
const menu2 = [
|
||||
{
|
||||
label: 'Inicio',
|
||||
items: [
|
||||
{ label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' },
|
||||
{ label: 'Administradores del sistema', icon: PrimeIcons.USERS, to: '/administradoresSistema' },
|
||||
{ label: 'Administradores de comunidad', icon: PrimeIcons.USERS, to: '/administradoresComunidad' },
|
||||
{ label: 'Comunidades', icon: PrimeIcons.BUILDING, to: '/comunidadesViviendas' },
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
const menu3 = [
|
||||
{
|
||||
label: 'Inicio',
|
||||
items: [
|
||||
{ label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' },
|
||||
{ label: 'Inquilinos', icon: PrimeIcons.USERS, to: '/inquilinos' },
|
||||
{ label: 'Guardas de seguridad', icon: PrimeIcons.LOCK, to: '/guardasSeguridad' },
|
||||
{
|
||||
label: 'Áreas Comunes de Comunidad',
|
||||
icon: PrimeIcons.BUILDING,
|
||||
to: '/areasComunes',
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
const menuLogin = [
|
||||
{
|
||||
label: 'Inicio',
|
||||
items: [
|
||||
{
|
||||
label: 'Inicio de sesion',
|
||||
icon: PrimeIcons.BUILDING,
|
||||
to: '/login'
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
function menu4() {
|
||||
if (cookies.type == '1') {
|
||||
return menu2;
|
||||
} else if (cookies.type == '2') {
|
||||
return menu3;
|
||||
} else {
|
||||
return menuLogin;
|
||||
}
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
const onSidebarClick = () => {
|
||||
menuClick = true;
|
||||
};
|
||||
|
||||
const onMobileTopbarMenuClick = (event) => {
|
||||
mobileTopbarMenuClick = true;
|
||||
|
||||
setMobileTopbarMenuActive((prevState) => !prevState);
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
const onMobileSubTopbarMenuClick = (event) => {
|
||||
mobileTopbarMenuClick = true;
|
||||
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
const onMenuItemClick = (event) => {
|
||||
if (!event.item.items) {
|
||||
setOverlayMenuActive(false);
|
||||
setMobileMenuActive(false);
|
||||
}
|
||||
};
|
||||
const isDesktop = () => {
|
||||
return window.innerWidth >= 992;
|
||||
};
|
||||
|
||||
const menu = [
|
||||
{
|
||||
label: 'Home',
|
||||
items: [
|
||||
{ label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' },
|
||||
const menu = [
|
||||
{
|
||||
label: 'Administradores del sistema',
|
||||
icon: PrimeIcons.USERS,
|
||||
to: '/administradoresSistema',
|
||||
label: 'Inicio',
|
||||
items:
|
||||
[
|
||||
{
|
||||
label: 'Administradores del sistema',
|
||||
icon: PrimeIcons.USERS,
|
||||
to: '/administradoresSistema',
|
||||
},
|
||||
{
|
||||
label: 'Administradores de comunidad',
|
||||
icon: PrimeIcons.USERS,
|
||||
to: '/administradoresComunidad',
|
||||
},
|
||||
{
|
||||
label: 'Guardas de seguridad',
|
||||
icon: PrimeIcons.LOCK,
|
||||
to: '/guardasSeguridad',
|
||||
},
|
||||
{
|
||||
label: 'Comunidades',
|
||||
icon: PrimeIcons.BUILDING,
|
||||
to: '/comunidadesViviendas',
|
||||
},
|
||||
{
|
||||
label: 'Inquilinos',
|
||||
icon: PrimeIcons.USER,
|
||||
to: '/inquilinos'
|
||||
},
|
||||
{
|
||||
label: 'Áreas Comunes de Comunidad',
|
||||
icon: PrimeIcons.BUILDING,
|
||||
to: '/areasComunes',
|
||||
},
|
||||
{ label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Administradores de comunidad',
|
||||
icon: PrimeIcons.USERS,
|
||||
to: '/administradoresComunidad',
|
||||
label: 'UI Components',
|
||||
icon: 'pi pi-fw pi-sitemap',
|
||||
items: [
|
||||
{
|
||||
label: 'Form Layout',
|
||||
icon: 'pi pi-fw pi-id-card',
|
||||
to: '/formlayout',
|
||||
},
|
||||
{ label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/input' },
|
||||
{
|
||||
label: 'Float Label',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
to: '/floatlabel',
|
||||
},
|
||||
{
|
||||
label: 'Invalid State',
|
||||
icon: 'pi pi-fw pi-exclamation-circle',
|
||||
to: 'invalidstate',
|
||||
},
|
||||
{ label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/button' },
|
||||
{ label: 'Table', icon: 'pi pi-fw pi-table', to: '/table' },
|
||||
{ label: 'List', icon: 'pi pi-fw pi-list', to: '/list' },
|
||||
{ label: 'Tree', icon: 'pi pi-fw pi-share-alt', to: '/tree' },
|
||||
{ label: 'Panel', icon: 'pi pi-fw pi-tablet', to: '/panel' },
|
||||
{ label: 'Overlay', icon: 'pi pi-fw pi-clone', to: '/overlay' },
|
||||
{ label: 'Media', icon: 'pi pi-fw pi-image', to: '/media' },
|
||||
{ label: 'Menu', icon: 'pi pi-fw pi-bars', to: '/menu' },
|
||||
{ label: 'Message', icon: 'pi pi-fw pi-comment', to: '/messages' },
|
||||
{ label: 'File', icon: 'pi pi-fw pi-file', to: '/file' },
|
||||
{ label: 'Chart', icon: 'pi pi-fw pi-chart-bar', to: '/chart' },
|
||||
{ label: 'Misc', icon: 'pi pi-fw pi-circle-off', to: '/misc' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Guardas de seguridad',
|
||||
icon: PrimeIcons.LOCK,
|
||||
to: '/guardasSeguridad',
|
||||
label: 'UI Blocks',
|
||||
items: [
|
||||
{
|
||||
label: 'Free Blocks',
|
||||
icon: 'pi pi-fw pi-eye',
|
||||
to: '/blocks',
|
||||
badge: 'NEW',
|
||||
},
|
||||
{
|
||||
label: 'All Blocks',
|
||||
icon: 'pi pi-fw pi-globe',
|
||||
url: 'https://www.primefaces.org/primeblocks-react',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Comunidades',
|
||||
icon: PrimeIcons.BUILDING,
|
||||
to: '/comunidadesViviendas',
|
||||
label: 'Icons',
|
||||
items: [{ label: 'PrimeIcons', icon: 'pi pi-fw pi-prime', to: '/icons' }],
|
||||
},
|
||||
{
|
||||
label: 'Inquilinos',
|
||||
icon: PrimeIcons.USER,
|
||||
to: '/inquilinos'
|
||||
label: 'Pages',
|
||||
icon: 'pi pi-fw pi-clone',
|
||||
items: [
|
||||
{ label: 'Crud', icon: 'pi pi-fw pi-user-edit', to: '/crud' },
|
||||
{ label: 'Timeline', icon: 'pi pi-fw pi-calendar', to: '/timeline' },
|
||||
{ label: 'Empty', icon: 'pi pi-fw pi-circle-off', to: '/empty' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Áreas Comunes de Comunidad',
|
||||
icon: PrimeIcons.BUILDING,
|
||||
to: '/areasComunes',
|
||||
label: 'Menu Hierarchy',
|
||||
icon: 'pi pi-fw pi-search',
|
||||
items: [
|
||||
{
|
||||
label: 'Submenu 1',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{
|
||||
label: 'Submenu 1.1',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{ label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-bookmark' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Submenu 1.2',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{ label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 1.2.2', icon: 'pi pi-fw pi-bookmark' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Submenu 2',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{
|
||||
label: 'Submenu 2.1',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{ label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 2.1.3', icon: 'pi pi-fw pi-bookmark' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Submenu 2.2',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{ label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 2.2.2', icon: 'pi pi-fw pi-bookmark' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{ label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'UI Components',
|
||||
icon: 'pi pi-fw pi-sitemap',
|
||||
items: [
|
||||
{
|
||||
label: 'Form Layout',
|
||||
icon: 'pi pi-fw pi-id-card',
|
||||
to: '/formlayout',
|
||||
},
|
||||
{ label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/input' },
|
||||
{
|
||||
label: 'Float Label',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
to: '/floatlabel',
|
||||
},
|
||||
{
|
||||
label: 'Invalid State',
|
||||
icon: 'pi pi-fw pi-exclamation-circle',
|
||||
to: 'invalidstate',
|
||||
},
|
||||
{ label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/button' },
|
||||
{ label: 'Table', icon: 'pi pi-fw pi-table', to: '/table' },
|
||||
{ label: 'List', icon: 'pi pi-fw pi-list', to: '/list' },
|
||||
{ label: 'Tree', icon: 'pi pi-fw pi-share-alt', to: '/tree' },
|
||||
{ label: 'Panel', icon: 'pi pi-fw pi-tablet', to: '/panel' },
|
||||
{ label: 'Overlay', icon: 'pi pi-fw pi-clone', to: '/overlay' },
|
||||
{ label: 'Media', icon: 'pi pi-fw pi-image', to: '/media' },
|
||||
{ label: 'Menu', icon: 'pi pi-fw pi-bars', to: '/menu' },
|
||||
{ label: 'Message', icon: 'pi pi-fw pi-comment', to: '/messages' },
|
||||
{ label: 'File', icon: 'pi pi-fw pi-file', to: '/file' },
|
||||
{ label: 'Chart', icon: 'pi pi-fw pi-chart-bar', to: '/chart' },
|
||||
{ label: 'Misc', icon: 'pi pi-fw pi-circle-off', to: '/misc' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'UI Blocks',
|
||||
items: [
|
||||
{
|
||||
label: 'Free Blocks',
|
||||
icon: 'pi pi-fw pi-eye',
|
||||
to: '/blocks',
|
||||
badge: 'NEW',
|
||||
},
|
||||
{
|
||||
label: 'All Blocks',
|
||||
icon: 'pi pi-fw pi-globe',
|
||||
url: 'https://www.primefaces.org/primeblocks-react',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Icons',
|
||||
items: [{ label: 'PrimeIcons', icon: 'pi pi-fw pi-prime', to: '/icons' }],
|
||||
},
|
||||
{
|
||||
label: 'Pages',
|
||||
icon: 'pi pi-fw pi-clone',
|
||||
items: [
|
||||
{ label: 'Crud', icon: 'pi pi-fw pi-user-edit', to: '/crud' },
|
||||
{ label: 'Timeline', icon: 'pi pi-fw pi-calendar', to: '/timeline' },
|
||||
{ label: 'Empty', icon: 'pi pi-fw pi-circle-off', to: '/empty' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Menu Hierarchy',
|
||||
icon: 'pi pi-fw pi-search',
|
||||
items: [
|
||||
{
|
||||
label: 'Submenu 1',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{
|
||||
label: 'Submenu 1.1',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{ label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-bookmark' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Submenu 1.2',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{ label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 1.2.2', icon: 'pi pi-fw pi-bookmark' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Submenu 2',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{
|
||||
label: 'Submenu 2.1',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{ label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 2.1.3', icon: 'pi pi-fw pi-bookmark' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Submenu 2.2',
|
||||
icon: 'pi pi-fw pi-bookmark',
|
||||
items: [
|
||||
{ label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-bookmark' },
|
||||
{ label: 'Submenu 2.2.2', icon: 'pi pi-fw pi-bookmark' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
];
|
||||
|
||||
const addClass = (element, className) => {
|
||||
if (element.classList) element.classList.add(className);
|
||||
else element.className += ' ' + className;
|
||||
};
|
||||
const addClass = (element, className) => {
|
||||
if (element.classList) element.classList.add(className);
|
||||
else element.className += ' ' + className;
|
||||
};
|
||||
|
||||
const removeClass = (element, className) => {
|
||||
if (element.classList) element.classList.remove(className);
|
||||
else
|
||||
element.className = element.className.replace(
|
||||
new RegExp(
|
||||
'(^|\\b)' + className.split(' ').join('|') + '(\\b|$)',
|
||||
'gi',
|
||||
),
|
||||
' ',
|
||||
);
|
||||
};
|
||||
const removeClass = (element, className) => {
|
||||
if (element.classList) element.classList.remove(className);
|
||||
else
|
||||
element.className = element.className.replace(
|
||||
new RegExp(
|
||||
'(^|\\b)' + className.split(' ').join('|') + '(\\b|$)',
|
||||
'gi',
|
||||
),
|
||||
' ',
|
||||
);
|
||||
};
|
||||
|
||||
const wrapperClass = classNames('layout-wrapper', {
|
||||
'layout-overlay': layoutMode === 'overlay',
|
||||
'layout-static': layoutMode === 'static',
|
||||
'layout-static-sidebar-inactive':
|
||||
staticMenuInactive && layoutMode === 'static',
|
||||
'layout-overlay-sidebar-active':
|
||||
overlayMenuActive && layoutMode === 'overlay',
|
||||
'layout-mobile-sidebar-active': mobileMenuActive,
|
||||
'p-input-filled': inputStyle === 'filled',
|
||||
'p-ripple-disabled': ripple === false,
|
||||
'layout-theme-light': layoutColorMode === 'light',
|
||||
});
|
||||
const wrapperClass = classNames('layout-wrapper', {
|
||||
'layout-overlay': layoutMode === 'overlay',
|
||||
'layout-static': layoutMode === 'static',
|
||||
'layout-static-sidebar-inactive':
|
||||
staticMenuInactive && layoutMode === 'static',
|
||||
'layout-overlay-sidebar-active':
|
||||
overlayMenuActive && layoutMode === 'overlay',
|
||||
'layout-mobile-sidebar-active': mobileMenuActive,
|
||||
'p-input-filled': inputStyle === 'filled',
|
||||
'p-ripple-disabled': ripple === false,
|
||||
'layout-theme-light': layoutColorMode === 'light',
|
||||
});
|
||||
|
||||
return (
|
||||
<div className={wrapperClass} onClick={onWrapperClick}>
|
||||
<Tooltip
|
||||
ref={copyTooltipRef}
|
||||
target=".block-action-copy"
|
||||
position="bottom"
|
||||
content="Copied to clipboard"
|
||||
event="focus"
|
||||
/>
|
||||
|
||||
<AppTopbar
|
||||
onToggleMenuClick={onToggleMenuClick}
|
||||
layoutColorMode={layoutColorMode}
|
||||
mobileTopbarMenuActive={mobileTopbarMenuActive}
|
||||
onMobileTopbarMenuClick={onMobileTopbarMenuClick}
|
||||
onMobileSubTopbarMenuClick={onMobileSubTopbarMenuClick}
|
||||
/>
|
||||
|
||||
<div className="layout-sidebar" onClick={onSidebarClick}>
|
||||
<AppMenu
|
||||
model={menu}
|
||||
onMenuItemClick={onMenuItemClick}
|
||||
layoutColorMode={layoutColorMode}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="layout-main-container">
|
||||
<div className="layout-main">
|
||||
<Route
|
||||
path="/"
|
||||
exact
|
||||
render={() => (
|
||||
<Dashboard colorMode={layoutColorMode} location={location} />
|
||||
)}
|
||||
/>
|
||||
<Route path="/formlayout" component={FormLayoutDemo} />
|
||||
<Route path="/input" component={InputDemo} />
|
||||
<Route path="/floatlabel" component={FloatLabelDemo} />
|
||||
<Route path="/invalidstate" component={InvalidStateDemo} />
|
||||
<Route path="/button" component={ButtonDemo} />
|
||||
<Route path="/table" component={TableDemo} />
|
||||
<Route path="/list" component={ListDemo} />
|
||||
<Route path="/tree" component={TreeDemo} />
|
||||
<Route path="/panel" component={PanelDemo} />
|
||||
<Route path="/overlay" component={OverlayDemo} />
|
||||
<Route path="/media" component={MediaDemo} />
|
||||
<Route path="/menu" component={MenuDemo} />
|
||||
<Route path="/messages" component={MessagesDemo} />
|
||||
<Route path="/blocks" component={BlocksDemo} />
|
||||
<Route path="/icons" component={IconsDemo} />
|
||||
<Route path="/file" component={FileDemo} />
|
||||
<Route
|
||||
path="/chart"
|
||||
render={() => (
|
||||
<ChartDemo colorMode={layoutColorMode} location={location} />
|
||||
)}
|
||||
/>
|
||||
<Route path="/misc" component={MiscDemo} />
|
||||
<Route path="/timeline" component={TimelineDemo} />
|
||||
<Route path="/crud" component={Crud} />
|
||||
<Route path="/empty" component={EmptyPage} />
|
||||
<Route path="/documentation" component={Documentation} />
|
||||
<Route
|
||||
path="/administradoresSistema"
|
||||
component={AdministradoresSistema}
|
||||
/>
|
||||
<Route
|
||||
path="/administradoresComunidad"
|
||||
component={AdministradoresComunidad}
|
||||
/>
|
||||
<Route path="/guardasSeguridad" component={GuardasSeguridad} />
|
||||
<Route path="/comunidadesViviendas" component={Communities} />
|
||||
<Route path="/inquilinos" component={Inquilinos} />
|
||||
<Route path="/InquilinosCompletar" component={InquilinosCompletar} />
|
||||
<Route path="/areasComunes" component={AreasComunes} />
|
||||
<Route path="/logIn" component={LogIn} />
|
||||
</div>
|
||||
return (
|
||||
|
||||
<AppFooter layoutColorMode={layoutColorMode} />
|
||||
</div>
|
||||
<BrowserRouter>
|
||||
<Switch>
|
||||
|
||||
<AppConfig
|
||||
rippleEffect={ripple}
|
||||
onRippleEffect={onRipple}
|
||||
inputStyle={inputStyle}
|
||||
onInputStyleChange={onInputStyleChange}
|
||||
layoutMode={layoutMode}
|
||||
onLayoutModeChange={onLayoutModeChange}
|
||||
layoutColorMode={layoutColorMode}
|
||||
onColorModeChange={onColorModeChange}
|
||||
/>
|
||||
<div className={wrapperClass} onClick={onWrapperClick}>
|
||||
|
||||
<CSSTransition
|
||||
classNames="layout-mask"
|
||||
timeout={{ enter: 200, exit: 200 }}
|
||||
in={mobileMenuActive}
|
||||
unmountOnExit
|
||||
>
|
||||
<div className="layout-mask p-component-overlay"></div>
|
||||
</CSSTransition>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
<Tooltip ref={copyTooltipRef} target=".block-action-copy" position="bottom" content="Copied to clipboard" event="focus" />
|
||||
|
||||
<AppTopbar onToggleMenuClick={onToggleMenuClick} layoutColorMode={layoutColorMode}
|
||||
mobileTopbarMenuActive={mobileTopbarMenuActive} onMobileTopbarMenuClick={onMobileTopbarMenuClick} onMobileSubTopbarMenuClick={onMobileSubTopbarMenuClick} />
|
||||
|
||||
<div className="layout-sidebar" onClick={onSidebarClick}>
|
||||
<AppMenu model={menu4()} onMenuItemClick={onMenuItemClick} layoutColorMode={layoutColorMode} />
|
||||
</div>
|
||||
|
||||
<div className="layout-main-container">
|
||||
<div className="layout-main">
|
||||
{(() => {
|
||||
if (!cookies.email) {
|
||||
return (
|
||||
<>
|
||||
|
||||
<Route path="/login" exact component={LogInUser} />
|
||||
|
||||
</>
|
||||
|
||||
)
|
||||
} else {
|
||||
|
||||
if (cookies.type == '1') {
|
||||
return (
|
||||
<>
|
||||
<Route path="/" exact render={() => <Dashboard colorMode={layoutColorMode} location={location} />} />
|
||||
<Route path="/administradoresSistema" component={AdministradoresSistema} />
|
||||
<Route path="/administradoresComunidad" component={AdministradoresComunidad} />
|
||||
<Route path="/comunidadesViviendas" component={Communities} />
|
||||
<Route to="*" exact component={Page404} />
|
||||
</>
|
||||
|
||||
)
|
||||
|
||||
} else if (cookies.type == '2') {
|
||||
return (
|
||||
<>
|
||||
<Route path="/" exact render={() => <Dashboard colorMode={layoutColorMode} location={location} />} />
|
||||
<Route path="/guardasSeguridad" component={GuardasSeguridad} />
|
||||
<Route path="/inquilinos" component={Inquilinos} />
|
||||
<Route path="/areasComunes" component={AreasComunes} />
|
||||
<Route to="*" exact component={Page404} />
|
||||
|
||||
</>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<Route path="/page404" exact component={Page404} />
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Route path="/" exact render={() => <Dashboard colorMode={layoutColorMode} location={location} />} />
|
||||
|
||||
<Route path="/formlayout" component={FormLayoutDemo} />
|
||||
<Route path="/input" component={InputDemo} />
|
||||
<Route path="/floatlabel" component={FloatLabelDemo} />
|
||||
<Route path="/invalidstate" component={InvalidStateDemo} />
|
||||
<Route path="/button" component={ButtonDemo} />
|
||||
<Route path="/table" component={TableDemo} />
|
||||
<Route path="/list" component={ListDemo} />
|
||||
<Route path="/tree" component={TreeDemo} />
|
||||
<Route path="/panel" component={PanelDemo} />
|
||||
<Route path="/overlay" component={OverlayDemo} />
|
||||
<Route path="/media" component={MediaDemo} />
|
||||
<Route path="/menu" component={MenuDemo} />
|
||||
<Route path="/messages" component={MessagesDemo} />
|
||||
{/*<Route path="/blocks" component={BlocksDemo} />*/}
|
||||
<Route path="/icons" component={IconsDemo} />
|
||||
<Route path="/file" component={FileDemo} />
|
||||
<Route path="/chart" render={() => <ChartDemo colorMode={layoutColorMode} location={location} />} />
|
||||
<Route path="/misc" component={MiscDemo} />
|
||||
<Route path="/timeline" component={TimelineDemo} />
|
||||
<Route path="/crud" component={Crud} />
|
||||
<Route path="/empty" component={EmptyPage} />
|
||||
<Route path="/documentation" component={Documentation} />
|
||||
|
||||
|
||||
</>
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
})()}
|
||||
|
||||
</div>
|
||||
|
||||
<AppFooter layoutColorMode={layoutColorMode} />
|
||||
</div>
|
||||
|
||||
<AppConfig />
|
||||
|
||||
<CSSTransition classNames="layout-mask" timeout={{ enter: 200, exit: 200 }} in={mobileMenuActive} unmountOnExit>
|
||||
<div className="layout-mask p-component-overlay"></div>
|
||||
</CSSTransition>
|
||||
</div>
|
||||
</Switch>
|
||||
</BrowserRouter>
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
|
|
@ -6,171 +6,161 @@ import { Ripple } from 'primereact/ripple';
|
|||
import { Badge } from 'primereact/badge';
|
||||
|
||||
const AppSubmenu = (props) => {
|
||||
const [activeIndex, setActiveIndex] = useState(null);
|
||||
const [activeIndex, setActiveIndex] = useState(null);
|
||||
|
||||
const onMenuItemClick = (event, item, index) => {
|
||||
//avoid processing disabled items
|
||||
if (item.disabled) {
|
||||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
const onMenuItemClick = (event, item, index) => {
|
||||
//avoid processing disabled items
|
||||
if (item.disabled) {
|
||||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
|
||||
//execute command
|
||||
if (item.command) {
|
||||
item.command({ originalEvent: event, item: item });
|
||||
}
|
||||
//execute command
|
||||
if (item.command) {
|
||||
item.command({ originalEvent: event, item: item });
|
||||
}
|
||||
|
||||
if (index === activeIndex) setActiveIndex(null);
|
||||
else setActiveIndex(index);
|
||||
if (index === activeIndex) setActiveIndex(null);
|
||||
else setActiveIndex(index);
|
||||
|
||||
if (props.onMenuItemClick) {
|
||||
props.onMenuItemClick({
|
||||
originalEvent: event,
|
||||
item: item,
|
||||
});
|
||||
}
|
||||
};
|
||||
if (props.onMenuItemClick) {
|
||||
props.onMenuItemClick({
|
||||
originalEvent: event,
|
||||
item: item,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const onKeyDown = (event) => {
|
||||
if (event.code === 'Enter' || event.code === 'Space') {
|
||||
event.preventDefault();
|
||||
event.target.click();
|
||||
}
|
||||
};
|
||||
const onKeyDown = (event) => {
|
||||
if (event.code === 'Enter' || event.code === 'Space') {
|
||||
event.preventDefault();
|
||||
event.target.click();
|
||||
}
|
||||
};
|
||||
|
||||
const renderLinkContent = (item) => {
|
||||
let submenuIcon = item.items && (
|
||||
<i className="pi pi-fw pi-angle-down menuitem-toggle-icon"></i>
|
||||
);
|
||||
let badge = item.badge && <Badge value={item.badge} />;
|
||||
const renderLinkContent = (item) => {
|
||||
let submenuIcon = item.items && (
|
||||
<i className="pi pi-fw pi-angle-down menuitem-toggle-icon"></i>
|
||||
);
|
||||
let badge = item.badge && <Badge value={item.badge} />;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<i className={item.icon}></i>
|
||||
<span>{item.label}</span>
|
||||
{submenuIcon}
|
||||
{badge}
|
||||
<Ripple />
|
||||
</React.Fragment>
|
||||
);
|
||||
};
|
||||
|
||||
const renderLink = (item, i) => {
|
||||
let content = renderLinkContent(item);
|
||||
|
||||
if (item.to) {
|
||||
return (
|
||||
<NavLink
|
||||
aria-label={item.label}
|
||||
onKeyDown={onKeyDown}
|
||||
role="menuitem"
|
||||
className="p-ripple"
|
||||
activeClassName="router-link-active router-link-exact-active"
|
||||
to={item.to}
|
||||
onClick={(e) => onMenuItemClick(e, item, i)}
|
||||
exact
|
||||
target={item.target}
|
||||
>
|
||||
{content}
|
||||
</NavLink>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<a
|
||||
tabIndex="0"
|
||||
aria-label={item.label}
|
||||
onKeyDown={onKeyDown}
|
||||
role="menuitem"
|
||||
href={item.url}
|
||||
className="p-ripple"
|
||||
onClick={(e) => onMenuItemClick(e, item, i)}
|
||||
target={item.target}
|
||||
>
|
||||
{content}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
let items =
|
||||
props.items &&
|
||||
props.items.map((item, i) => {
|
||||
let active = activeIndex === i;
|
||||
let styleClass = classNames(item.badgeStyleClass, {
|
||||
'layout-menuitem-category': props.root,
|
||||
'active-menuitem': active && !item.to,
|
||||
});
|
||||
|
||||
if (props.root) {
|
||||
return (
|
||||
<li className={styleClass} key={i} role="none">
|
||||
{props.root === true && (
|
||||
<React.Fragment>
|
||||
<div
|
||||
className="layout-menuitem-root-text"
|
||||
aria-label={item.label}
|
||||
<React.Fragment>
|
||||
<i className={item.icon}></i>
|
||||
<span>{item.label}</span>
|
||||
{submenuIcon}
|
||||
{badge}
|
||||
<Ripple />
|
||||
</React.Fragment>
|
||||
);
|
||||
};
|
||||
|
||||
const renderLink = (item, i) => {
|
||||
let content = renderLinkContent(item);
|
||||
|
||||
if (item.to) {
|
||||
return (
|
||||
<NavLink
|
||||
aria-label={item.label}
|
||||
onKeyDown={onKeyDown}
|
||||
role="menuitem"
|
||||
className="p-ripple"
|
||||
activeClassName="router-link-active router-link-exact-active"
|
||||
to={item.to}
|
||||
onClick={(e) => onMenuItemClick(e, item, i)}
|
||||
exact
|
||||
target={item.target}
|
||||
>
|
||||
{item.label}
|
||||
</div>
|
||||
<AppSubmenu
|
||||
items={item.items}
|
||||
onMenuItemClick={props.onMenuItemClick}
|
||||
/>
|
||||
</React.Fragment>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<li className={styleClass} key={i} role="none">
|
||||
{renderLink(item, i)}
|
||||
<CSSTransition
|
||||
classNames="layout-submenu-wrapper"
|
||||
timeout={{ enter: 1000, exit: 450 }}
|
||||
in={active}
|
||||
unmountOnExit
|
||||
>
|
||||
<AppSubmenu
|
||||
items={item.items}
|
||||
onMenuItemClick={props.onMenuItemClick}
|
||||
/>
|
||||
</CSSTransition>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
});
|
||||
{content}
|
||||
</NavLink>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<a
|
||||
tabIndex="0"
|
||||
aria-label={item.label}
|
||||
onKeyDown={onKeyDown}
|
||||
role="menuitem"
|
||||
href={item.url}
|
||||
className="p-ripple"
|
||||
onClick={(e) => onMenuItemClick(e, item, i)}
|
||||
target={item.target}
|
||||
>
|
||||
{content}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return items ? (
|
||||
<ul className={props.className} role="menu">
|
||||
{items}
|
||||
</ul>
|
||||
) : null;
|
||||
let items =
|
||||
props.items &&
|
||||
props.items.map((item, i) => {
|
||||
let active = activeIndex === i;
|
||||
let styleClass = classNames(item.badgeStyleClass, {
|
||||
'layout-menuitem-category': props.root,
|
||||
'active-menuitem': active && !item.to,
|
||||
});
|
||||
|
||||
if (props.root) {
|
||||
return (
|
||||
<li className={styleClass} key={i} role="none">
|
||||
{props.root === true && (
|
||||
<React.Fragment>
|
||||
<div
|
||||
className="layout-menuitem-root-text"
|
||||
aria-label={item.label}
|
||||
>
|
||||
{item.label}
|
||||
</div>
|
||||
<AppSubmenu
|
||||
items={item.items}
|
||||
onMenuItemClick={props.onMenuItemClick}
|
||||
/>
|
||||
</React.Fragment>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<li className={styleClass} key={i} role="none">
|
||||
{renderLink(item, i)}
|
||||
<CSSTransition
|
||||
classNames="layout-submenu-wrapper"
|
||||
timeout={{ enter: 1000, exit: 450 }}
|
||||
in={active}
|
||||
unmountOnExit
|
||||
>
|
||||
<AppSubmenu
|
||||
items={item.items}
|
||||
onMenuItemClick={props.onMenuItemClick}
|
||||
/>
|
||||
</CSSTransition>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
return items ? (
|
||||
<ul className={props.className} role="menu">
|
||||
{items}
|
||||
</ul>
|
||||
) : null;
|
||||
};
|
||||
|
||||
export const AppMenu = (props) => {
|
||||
return (
|
||||
<div className="layout-menu-container">
|
||||
<AppSubmenu
|
||||
items={props.model}
|
||||
className="layout-menu"
|
||||
onMenuItemClick={props.onMenuItemClick}
|
||||
root={true}
|
||||
role="menu"
|
||||
/>
|
||||
<a
|
||||
href="https://www.primefaces.org/primeblocks-react"
|
||||
className="block mt-3"
|
||||
>
|
||||
<img
|
||||
alt="primeblocks"
|
||||
className="w-full"
|
||||
src={
|
||||
props.layoutColorMode === 'light'
|
||||
? 'assets/layout/images/banner-primeblocks.png'
|
||||
: 'assets/layout/images/banner-primeblocks-dark.png'
|
||||
}
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
return (
|
||||
<div className="layout-menu-container">
|
||||
<AppSubmenu
|
||||
items={props.model}
|
||||
className="layout-menu"
|
||||
onMenuItemClick={props.onMenuItemClick}
|
||||
root={true}
|
||||
role="menu"
|
||||
/>
|
||||
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,46 +1,118 @@
|
|||
import React from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import classNames from 'classnames';
|
||||
import Cookies from 'universal-cookie';
|
||||
import { Button } from 'primereact/button';
|
||||
import { Menubar } from 'primereact/menubar';
|
||||
|
||||
const cookies = new Cookies();
|
||||
|
||||
export const AppTopbar = (props) => {
|
||||
return (
|
||||
<div className="layout-topbar">
|
||||
<Link to="/" className="layout-topbar-logo">
|
||||
<img src={'assets/layout/images/logo-dark.svg'} alt="logo" />
|
||||
<span>KATOIKIA</span>
|
||||
</Link>
|
||||
const [logged, setLogged] = useState(null);
|
||||
|
||||
{/* <button type="button" className="p-link layout-menu-button layout-topbar-button" onClick={props.onToggleMenuClick}>
|
||||
|
||||
function cerrarSesion() {
|
||||
cookies.remove('id', { path: "/" });
|
||||
cookies.remove('email', { path: "/" });
|
||||
cookies.remove('name', { path: "/" });
|
||||
cookies.remove('type', { path: "/" });
|
||||
cookies.remove('community_id', { path: "/" });
|
||||
window.location.href = '/login';
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (cookies.get('email')) {
|
||||
setLogged(true);
|
||||
} else {
|
||||
setLogged(false);
|
||||
};
|
||||
}, [])
|
||||
|
||||
|
||||
const buttonLogout = () => {
|
||||
return (
|
||||
<>
|
||||
<div className="my-2">
|
||||
<Button label="Cerrar Sesión"
|
||||
className="p-button-danger"
|
||||
onClick={cerrarSesion}
|
||||
disabled={logged} />
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const menuProfile = [
|
||||
{
|
||||
label: 'Perfil',
|
||||
icon: 'pi pi-user',
|
||||
items: [
|
||||
{
|
||||
label: 'Cerrar Sesion',
|
||||
icon: 'pi pi-fw pi-lock',
|
||||
}
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
return (
|
||||
<div className="layout-topbar">
|
||||
<Link to="/" className="layout-topbar-logo">
|
||||
<img src={'images/Logo_Katoikia.svg'} alt="logo" />
|
||||
<span>KATOIKIA</span>
|
||||
</Link>
|
||||
|
||||
{/* <button type="button" className="p-link layout-menu-button layout-topbar-button" onClick={props.onToggleMenuClick}>
|
||||
<i className="pi pi-bars"/>
|
||||
</button> */}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
className="p-link layout-topbar-menu-button layout-topbar-button"
|
||||
>
|
||||
<i className="pi pi-ellipsis-v" />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="p-link layout-topbar-menu-button layout-topbar-button"
|
||||
>
|
||||
<i className="pi pi-ellipsis-v" />
|
||||
</button>
|
||||
|
||||
<ul className="layout-topbar-menu lg:flex origin-top">
|
||||
{/* <li>
|
||||
<ul className="layout-topbar-menu lg:flex origin-top">
|
||||
{/* <li>
|
||||
<button className="p-link layout-topbar-button" onClick={props.onMobileSubTopbarMenuClick}>
|
||||
<i className="pi pi-calendar"/>
|
||||
<span>Events</span>
|
||||
</button>
|
||||
</li> */}
|
||||
{/* <li>
|
||||
{/* <li>
|
||||
<button className="p-link layout-topbar-button" onClick={props.onMobileSubTopbarMenuClick}>
|
||||
<i className="pi pi-cog"/>
|
||||
<span>Settings</span>
|
||||
</button>
|
||||
</li> */}
|
||||
<li>
|
||||
<button className="p-link layout-topbar-button">
|
||||
<i className="pi pi-user" />
|
||||
<span>Profile</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
<li className='mx-2' hidden={!logged}>
|
||||
<button className="p-link layout-topbar-button" >
|
||||
<i className="pi pi-user" />
|
||||
<span>Perfil</span>
|
||||
</button>
|
||||
</li>
|
||||
<li className='mx-2' hidden={!logged}>
|
||||
<button className="p-link layout-topbar-button" onClick={cerrarSesion} >
|
||||
<i className="pi pi-sign-out" />
|
||||
<span>Cerrar Sesión</span>
|
||||
</button>
|
||||
</li>
|
||||
{/*
|
||||
<Menubar model={menuProfile} ></Menubar>
|
||||
|
||||
|
||||
</li>
|
||||
<li hidden={!logged}>
|
||||
<div className="my-2" >
|
||||
<Button label="Cerrar Sesión"
|
||||
className="p-button-danger"
|
||||
onClick={cerrarSesion}
|
||||
/>
|
||||
</div>
|
||||
</li>*/}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
import React from 'react';
|
||||
import { InputText } from 'primereact/inputtext';
|
||||
|
||||
const LogIn = () => {
|
||||
return (
|
||||
<div className="grid">
|
||||
<div className="col-12">
|
||||
<div className="card">
|
||||
<h5>Iniciar Sesión</h5>
|
||||
<div className="p-fluid formgrid grid">
|
||||
<div className="field col-12">
|
||||
<label htmlFor="nombre">Correo electrónico</label>
|
||||
<InputText id="nombre" type="text" />
|
||||
</div>
|
||||
<div className="field col-12 ">
|
||||
<label htmlFor="apellidos">Contraseña</label>
|
||||
<InputText id="apellidos" type="text" />
|
||||
</div>
|
||||
|
||||
{/* <Button label="Registrar" onClick={registrarAdmin}></Button> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default LogIn;
|
||||
|
||||
/* image 1 */
|
|
@ -0,0 +1,226 @@
|
|||
import React, { Component, Fragment, useRef } from 'react';
|
||||
import Cookies from 'universal-cookie';
|
||||
import { InputText } from 'primereact/inputtext';
|
||||
import { Button } from 'primereact/button';
|
||||
import { Toast } from 'primereact/toast';
|
||||
|
||||
const baseUrl = "http://localhost:4000/user/loginUser";
|
||||
const cookies = new Cookies();
|
||||
|
||||
class LogInUser extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
form: {
|
||||
email: '',
|
||||
password: ''
|
||||
},
|
||||
errorEmail: false,
|
||||
errorPassword: false,
|
||||
logged: null
|
||||
}
|
||||
}
|
||||
|
||||
handleChange = async e => {
|
||||
await this.setState({
|
||||
form: {
|
||||
...this.state.form,
|
||||
[e.target.name]: e.target.value
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
validaciones = (data) => {
|
||||
let error = false;
|
||||
if (data.email == '') {
|
||||
this.setState({
|
||||
errorEmail: true
|
||||
})
|
||||
error = true;
|
||||
} else {
|
||||
this.setState({
|
||||
errorEmail: false
|
||||
})
|
||||
}
|
||||
if (data.password == '') {
|
||||
this.setState({
|
||||
errorPassword: true
|
||||
})
|
||||
error = true;
|
||||
} else {
|
||||
this.setState({
|
||||
errorPassword: false
|
||||
})
|
||||
}
|
||||
|
||||
return error;
|
||||
|
||||
}
|
||||
|
||||
iniciarSesion = async () => {
|
||||
const data = {
|
||||
email: this.state.form.email,
|
||||
password: this.state.form.password
|
||||
}
|
||||
|
||||
console.log(data);
|
||||
|
||||
if (!this.validaciones(data)) {
|
||||
this.setState({
|
||||
email: true,
|
||||
password: true
|
||||
})
|
||||
await fetch(baseUrl, {
|
||||
cache: 'no-cache',
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status != 201)
|
||||
console.log('Ocurrió un error con el servicio: ' + response.status);
|
||||
else return response.json();
|
||||
})
|
||||
.then(response => {
|
||||
console.log(response.message);
|
||||
|
||||
if (response.message) {
|
||||
const user = response.message;
|
||||
|
||||
if(user.user_type == '1' || user.user_type == '2'){
|
||||
cookies.set('id', user._id, { path: "/" });
|
||||
cookies.set('name', user.name, { path: "/" });
|
||||
cookies.set('email', user.email, { path: "/" });
|
||||
cookies.set('type', user.user_type, { path: "/" });
|
||||
if (user.user_type != '1') {
|
||||
cookies.set('community_id', user.community_id, { path: "/" });
|
||||
}
|
||||
// alert(`Bienvenido ${user.name}`);
|
||||
document.getElementById('notification').hidden = true;
|
||||
document.getElementById('notification2').hidden = false;
|
||||
|
||||
document.getElementById("message2").innerHTML = `Bienvenido ${user.name}`;
|
||||
|
||||
window.location.href = "/";
|
||||
}
|
||||
window.location.href = "/page404";
|
||||
|
||||
|
||||
} else {
|
||||
document.getElementById('notification2').hidden = true;
|
||||
document.getElementById('notification').hidden = false;
|
||||
|
||||
//alert('El usuario o la contraseña no son correctos');
|
||||
document.getElementById("message").innerHTML = "El usuario o la contraseña son incorrectos";
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (cookies.get('email')) {
|
||||
window.location.href = "/";
|
||||
}
|
||||
}
|
||||
|
||||
renderErrorMessage = (name) =>
|
||||
name === this.state.errorMessages.name && (
|
||||
<div className="error">{this.state.errorMessages.message}</div>
|
||||
);
|
||||
|
||||
errors = {
|
||||
email: "Correo requerido",
|
||||
pass: "Contraseña requerida"
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
||||
<Fragment>
|
||||
|
||||
|
||||
<div className="grid ">
|
||||
<div className="col-10 xl:col-8">
|
||||
<div id="notification" className="p-message p-message-error" hidden={true} >
|
||||
<div className="card">
|
||||
<h5 className='card-header' id="message">
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div id="notification2" className="p-message p-message-success" hidden={true} >
|
||||
<div className="card">
|
||||
<h5 className='card-header' id="message2">
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div className="col-10 xl:col-8">
|
||||
|
||||
<div className="card">
|
||||
<h5 className='card-header'>Iniciar Sesión</h5>
|
||||
<div className="p-fluid formgrid grid">
|
||||
|
||||
<div className="field col-12 md:col-12">
|
||||
<label htmlFor="email">Correo electrónico</label>
|
||||
<div className="p-0 col-12 md:col-12">
|
||||
<div className="p-inputgroup">
|
||||
<span className="p-inputgroup-addon p-button p-icon-input-khaki">
|
||||
<i className="pi pi-user"></i>
|
||||
</span>
|
||||
<InputText id="email"
|
||||
type="email"
|
||||
name="email"
|
||||
onChange={this.handleChange}
|
||||
placeholder='Correo electrónico'
|
||||
className={this.state.errorEmail ? 'p-invalid' : ''}
|
||||
|
||||
/>
|
||||
</div>
|
||||
{this.state.errorEmail && (
|
||||
<small className="p-invalid">Correo electrónico es requerido</small>
|
||||
)}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div className="field col-12 md:col-12">
|
||||
<label htmlFor="v">Contraseña</label>
|
||||
<div className="p-0 col-12 md:col-12">
|
||||
<div className="p-inputgroup">
|
||||
<span className="p-inputgroup-addon p-button p-icon-input-khaki">
|
||||
<i className="pi pi-lock"></i>
|
||||
</span>
|
||||
<InputText id="password"
|
||||
type="password"
|
||||
name="password"
|
||||
onChange={this.handleChange}
|
||||
placeholder='Contraseña'
|
||||
className={this.state.errorPassword ? 'p-invalid' : ''}
|
||||
/>
|
||||
</div>
|
||||
{this.state.errorPassword && (
|
||||
<small className="p-invalid">Contraseña es requerida</small>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button label="Iniciar sesión" type="button" onClick={() => this.iniciarSesion()}></Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default LogInUser;
|
|
@ -0,0 +1,20 @@
|
|||
import React from 'react';
|
||||
|
||||
|
||||
const Page404 = () => {
|
||||
|
||||
return (
|
||||
<div className="col-12 xl:col-12">
|
||||
<div className="card">
|
||||
<div className="surface-section px-4 py-8 md:px-6 lg:px-8">
|
||||
<div className="text-700 text-center">
|
||||
<div className="text-900 font-bold text-5xl mb-3">404</div>
|
||||
<div className="text-700 text-2xl mb-5">No se encuentra la página</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default React.memo(Page404)
|
|
@ -7,6 +7,8 @@ import { HashRouter } from 'react-router-dom';
|
|||
import ScrollToTop from './ScrollToTop';
|
||||
import { CookiesProvider } from "react-cookie";
|
||||
|
||||
|
||||
|
||||
ReactDOM.render(
|
||||
<HashRouter>
|
||||
<ScrollToTop>
|
||||
|
|
Loading…
Reference in New Issue