Añadir Menu Gestion de SAIS Gestion de baterias y gestion de personas

This commit is contained in:
2026-07-31 09:27:31 +02:00
parent 3cd4fc4b53
commit 2fc7ad3f52
21 changed files with 1095 additions and 278 deletions
+23 -7
View File
@@ -4,8 +4,10 @@ Android application developed in Kotlin using Jetpack Compose that scans barcode
## 🚀 Features
- **Instant Scan**: The camera opens automatically upon application startup.
- **Connection Status**: Real-time indicator at the top showing if the app can reach the MariaDB server.
- **Instant Scan**: The camera opens when adding a new SAI.
- **Multi-Entity Management**: Dedicated sections for SAIs, Batteries, and People.
- **CRUD Operations**: Add, View, and Delete records for all managed entities.
- **Connection Status**: Real-time indicator on the home screen.
- **Visual Overlay**: Centered scanning guide with a red line to help align barcodes.
- **ML Kit Integration**: High-performance barcode detection (HD 720p analysis).
- **Confirmation Flow**: Scanned results are shown in a popup dialog before saving.
@@ -31,13 +33,27 @@ The app features a professional scanning interface:
## ⚙️ Configuration
### 1. Database Setup
Ensure your MariaDB database has a table named `scans`. You can use the following SQL:
Ensure your MariaDB database has the following tables:
```sql
CREATE TABLE scans (
id INT AUTO_INCREMENT PRIMARY KEY,
barcode VARCHAR(255) NOT NULL,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
-- Table for SAIs
CREATE TABLE SAIs (
id_sai INT AUTO_INCREMENT PRIMARY KEY,
ns VARCHAR(255) NOT NULL
);
-- Table for Batteries
CREATE TABLE baterias (
id_bateria INT AUTO_INCREMENT PRIMARY KEY,
modelo VARCHAR(255) NOT NULL,
estado VARCHAR(255) NOT NULL
);
-- Table for People
CREATE TABLE personas (
id_persona INT AUTO_INCREMENT PRIMARY KEY,
nombre VARCHAR(255) NOT NULL,
puesto VARCHAR(255) NOT NULL
);
```