diff options
| author | Alberto Duarte Delgado <alberto@albertoduarte.com> | 2026-03-30 12:38:58 +0100 |
|---|---|---|
| committer | Alberto Duarte Delgado <alberto@albertoduarte.com> | 2026-03-30 12:38:58 +0100 |
| commit | 83fd8f35b080e364e667697c12d4ace7f06450df (patch) | |
| tree | 959d2241dedc03665de4218c96f309c6b964a29f /src | |
| parent | d05f9f62600ef0ec8cf496bc5a170a3e604a5453 (diff) | |
arquitectura base, sistema de archivos
Diffstat (limited to 'src')
| -rw-r--r-- | src/app/(auth)/_layout.tsx | 0 | ||||
| -rw-r--r-- | src/app/(auth)/login.tsx | 0 | ||||
| -rw-r--r-- | src/app/(auth)/register.tsx | 0 | ||||
| -rw-r--r-- | src/app/(auth)/welcome.tsx | 0 | ||||
| -rw-r--r-- | src/app/(protected)/_layout.tsx | 0 | ||||
| -rw-r--r-- | src/app/(protected)/home.tsx | 0 | ||||
| -rw-r--r-- | src/app/(protected)/offices/[officeId].tsx | 0 | ||||
| -rw-r--r-- | src/app/(protected)/offices/index.tsx | 0 | ||||
| -rw-r--r-- | src/app/(protected)/profile/index.tsx | 0 | ||||
| -rw-r--r-- | src/app/(protected)/reservations/create.tsx | 0 | ||||
| -rw-r--r-- | src/app/(protected)/reservations/index.tsx | 0 | ||||
| -rw-r--r-- | src/app/GuardarPersona.tsx | 34 | ||||
| -rw-r--r-- | src/app/GuardarProducto.tsx | 61 |
13 files changed, 0 insertions, 95 deletions
diff --git a/src/app/(auth)/_layout.tsx b/src/app/(auth)/_layout.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/(auth)/_layout.tsx diff --git a/src/app/(auth)/login.tsx b/src/app/(auth)/login.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/(auth)/login.tsx diff --git a/src/app/(auth)/register.tsx b/src/app/(auth)/register.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/(auth)/register.tsx diff --git a/src/app/(auth)/welcome.tsx b/src/app/(auth)/welcome.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/(auth)/welcome.tsx diff --git a/src/app/(protected)/_layout.tsx b/src/app/(protected)/_layout.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/(protected)/_layout.tsx diff --git a/src/app/(protected)/home.tsx b/src/app/(protected)/home.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/(protected)/home.tsx diff --git a/src/app/(protected)/offices/[officeId].tsx b/src/app/(protected)/offices/[officeId].tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/(protected)/offices/[officeId].tsx diff --git a/src/app/(protected)/offices/index.tsx b/src/app/(protected)/offices/index.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/(protected)/offices/index.tsx diff --git a/src/app/(protected)/profile/index.tsx b/src/app/(protected)/profile/index.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/(protected)/profile/index.tsx diff --git a/src/app/(protected)/reservations/create.tsx b/src/app/(protected)/reservations/create.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/(protected)/reservations/create.tsx diff --git a/src/app/(protected)/reservations/index.tsx b/src/app/(protected)/reservations/index.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/(protected)/reservations/index.tsx diff --git a/src/app/GuardarPersona.tsx b/src/app/GuardarPersona.tsx deleted file mode 100644 index 58b1d2d..0000000 --- a/src/app/GuardarPersona.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { StyleSheet, Text, View, Button} from 'react-native' -import React from 'react' -import { useSQLiteContext } from 'expo-sqlite'; -import { drizzle, useLiveQuery } from 'drizzle-orm/expo-sqlite'; -import { personas } from '../db/schema'; -import { SafeAreaView } from 'react-native-safe-area-context'; - - -const GuardarPersona = () => { - const db = useSQLiteContext(); - const drizzleDb = drizzle(db, { schema: { personas } }); - const { data: lista } = useLiveQuery(drizzleDb.select().from(personas)); - async function almacenarPersona(){ - let edadAleatoria = Math.trunc(Math.random()*100); - let nombreAleatorio = "persona_"+Math.trunc(Math.random()*10000); - await drizzleDb.insert(personas).values({ nombre: nombreAleatorio, edad: edadAleatoria }); - } - - return ( - <SafeAreaView style={{ flex: 1, justifyContent: 'flex-start', alignItems: 'center' }}> - <Text style={{fontSize: 24, fontWeight: 'bold', marginBottom: 20 }}>Guardar Persona</Text> - <Button title='Guardar Persona' onPress={almacenarPersona} /> - <View style={{marginTop:20, flex: 1}}> - <Text>Lista de personas guardadas:</Text> - {lista?.map((p)=><Text key={p.id}>{p.id} - {p.nombre} - {p.edad} años</Text>)} - </View> - - </SafeAreaView> - ) -} - -export default GuardarPersona - -const styles = StyleSheet.create({})
\ No newline at end of file diff --git a/src/app/GuardarProducto.tsx b/src/app/GuardarProducto.tsx deleted file mode 100644 index abdd8c1..0000000 --- a/src/app/GuardarProducto.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { StyleSheet, Text, View, Button, Alert} from 'react-native' -import React from 'react' -import { useSQLiteContext } from 'expo-sqlite'; -import { drizzle, useLiveQuery } from 'drizzle-orm/expo-sqlite'; -//import { personas, categorias, productos } from '../db/schema'; -import { SafeAreaView } from 'react-native-safe-area-context'; - - -const GuardarProducto = () => { - const db = useSQLiteContext(); - - /* - const drizzleDb = drizzle(db, { schema: { personas } }); - const { data: listaCategorias } = useLiveQuery(drizzleDb.select().from(categorias)); - const { data: listaProductos } = useLiveQuery(drizzleDb.select().from(productos)); - - async function almacenarCategoria(){ - let edadAleatoria = Math.trunc(Math.random()*100); - let nombreAleatorio = "categoria_"+Math.trunc(Math.random()*10000); - await drizzleDb.insert(categorias).values({ nombre: nombreAleatorio }); - } - - async function almacenarProducto(){ - let edadAleatoria = Math.trunc(Math.random()*100); - let nombreAleatorio = "producto_"+Math.trunc(Math.random()*10000); - let precioAleatorio = (Math.trunc(Math.random()*10000) ) / 100 - if( listaCategorias.length <= 0 ){ - Alert.alert("No hay categorías aún. No se guarda producto"); - return; - } - let posCategoria = Math.trunc(Math.random()*listaCategorias.length); - let idCategoria = listaCategorias[posCategoria].id; - - await drizzleDb.insert(productos).values({ nombre: nombreAleatorio, precio: precioAleatorio, categoriaId: idCategoria }); - } - */ - return ( - <SafeAreaView style={{ flex: 1, justifyContent: 'flex-start', alignItems: 'center' }}> - - - - {/* - <Text style={{fontSize: 24, fontWeight: 'bold', marginBottom: 20 }}>Guardar Categoría</Text> - <Button title='Guardar Categoria' onPress={almacenarCategoria} /> - <View style={{marginTop:20, flex: 1}}> - <Text>Lista de categorias guardadas:</Text> - {listaCategorias?.map((p)=><Text key={p.id}>{JSON.stringify(p)} </Text>)} - </View> - <Button title='Guardar Producto' onPress={almacenarProducto} /> - <View style={{marginTop:20, flex: 1}}> - <Text>Lista de productos guardadas:</Text> - {listaProductos?.map((p)=><Text key={p.id}>{JSON.stringify(p)}</Text>)} - </View> - */} - </SafeAreaView> - ) -} - -export default GuardarProducto - -const styles = StyleSheet.create({})
\ No newline at end of file |