This commit is contained in:
Edgar Méndez Mendoza 2025-10-15 12:08:31 -06:00
parent c222b66cef
commit 617c4a3a65
8 changed files with 56 additions and 70 deletions

0
install.sh Executable file → Normal file
View File

0
src/components/Holos/Inbox.vue Executable file → Normal file
View File

0
src/components/Holos/Inbox/Item.vue Executable file → Normal file
View File

0
src/components/Holos/Inbox/ItemTitle.vue Executable file → Normal file
View File

0
src/components/Holos/Inbox/Menu/Item.vue Executable file → Normal file
View File

0
src/components/Holos/Inbox/Menu/Static.vue Executable file → Normal file
View File

0
src/controllers/PrintController.js Executable file → Normal file
View File

View File

@ -15,6 +15,7 @@ import IconButton from '@Holos/Button/Icon.vue';
import Button from '@Holos/Button/Button.vue';
import GoogleIcon from '@Shared/GoogleIcon.vue';
import Badge from '@Components/ui/Tags/Badge.vue';
/** Definiciones */
const route = useRoute();
const router = useRouter();
@ -247,12 +248,12 @@ onMounted(() => {
<div class="space-y-1">
<p class="text-sm font-medium text-gray-600 dark:text-gray-400">Ubicación</p>
<p class="text-base text-gray-900 dark:text-gray-100">
{{ warehouse.address || 'Guadalajara, Zona Industrial' }}
{{ warehouse.address || 'Sin dirección' }}
</p>
</div>
<!-- Categoría -->
<div class="space-y-2">
<div class="space-y-2" v-if="warehouse.classifications && warehouse.classifications.length">
<p class="text-sm font-medium text-gray-600 dark:text-gray-400">Clasificaciones</p>
<div class="flex flex-wrap gap-2">
<span v-for="classification in warehouse.classifications" :key="classification.id"
@ -262,7 +263,7 @@ onMounted(() => {
</div>
</div>
<div class="space-y-2">
<div class="space-y-2" v-if="warehouse.classifications && warehouse.classifications.length">
<p class="text-sm font-medium text-gray-600 dark:text-gray-400">Subclasificaciones</p>
<div class="flex flex-wrap gap-2">
<span v-for="child in getAllChildren(warehouse.classifications)" :key="child.id"
@ -275,12 +276,9 @@ onMounted(() => {
<!-- Estado -->
<div class="space-y-2">
<p class="text-sm font-medium text-gray-600 dark:text-gray-400">Estado</p>
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium"
:class="warehouse.is_active
? 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200'
: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200'">
<Badge :color="warehouse.is_active ? 'green' : 'red'">
{{ warehouse.is_active ? 'Activo' : 'Inactivo' }}
</span>
</Badge>
</div>
</div>
@ -323,6 +321,55 @@ onMounted(() => {
</CardContent>
</Card>
<!-- Stock by Products -->
<Card>
<CardHeader>
<CardTitle class="flex items-center space-x-2">
<GoogleIcon class="w-6 h-6 text-primary" name="inventory" />
<span>Stock por Productos</span>
</CardTitle>
<CardDescription>
Inventario actual de productos en este almacén
</CardDescription>
</CardHeader>
<CardContent>
<div v-for="warehouseStock in stockByWarehouse" :key="warehouseStock.warehouse" class="space-y-4">
<h4
class="font-semibold text-gray-900 dark:text-gray-100 border-b border-gray-200 dark:border-gray-700 pb-2">
{{ warehouseStock.warehouse }}
</h4>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
<div v-for="product in warehouseStock.products" :key="product.code"
class="bg-gray-50 dark:bg-gray-800 rounded-lg p-4 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">
<div class="flex items-center justify-between mb-2">
<span
class="text-xs font-mono text-gray-500 bg-white dark:bg-gray-900 px-2 py-1 rounded">
{{ product.code }}
</span>
<span class="text-sm font-bold text-gray-900 dark:text-gray-100">
{{ product.stock }} unidades
</span>
</div>
<h5 class="font-medium text-gray-900 dark:text-gray-100 mb-2 text-sm">
{{ product.name }}
</h5>
<div class="flex items-center justify-between">
<span class="text-xs text-gray-600 dark:text-gray-400">Valor total:</span>
<span class="text-sm font-semibold text-green-600 dark:text-green-400">
{{ formatCurrency(product.value) }}
</span>
</div>
</div>
</div>
</div>
</CardContent>
</Card>
<!-- Recent Movements -->
<Card>
<CardHeader>
@ -389,68 +436,7 @@ onMounted(() => {
</CardContent>
</Card>
<!-- Stock by Products -->
<Card>
<CardHeader>
<CardTitle class="flex items-center space-x-2">
<GoogleIcon class="w-6 h-6 text-primary" name="inventory" />
<span>Stock por Productos</span>
</CardTitle>
<CardDescription>
Inventario actual de productos en este almacén
</CardDescription>
</CardHeader>
<CardContent>
<div v-for="warehouseStock in stockByWarehouse" :key="warehouseStock.warehouse" class="space-y-4">
<h4
class="font-semibold text-gray-900 dark:text-gray-100 border-b border-gray-200 dark:border-gray-700 pb-2">
{{ warehouseStock.warehouse }}
</h4>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
<div v-for="product in warehouseStock.products" :key="product.code"
class="bg-gray-50 dark:bg-gray-800 rounded-lg p-4 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">
<div class="flex items-center justify-between mb-2">
<span
class="text-xs font-mono text-gray-500 bg-white dark:bg-gray-900 px-2 py-1 rounded">
{{ product.code }}
</span>
<span class="text-sm font-bold text-gray-900 dark:text-gray-100">
{{ product.stock }} unidades
</span>
</div>
<h5 class="font-medium text-gray-900 dark:text-gray-100 mb-2 text-sm">
{{ product.name }}
</h5>
<div class="flex items-center justify-between">
<span class="text-xs text-gray-600 dark:text-gray-400">Valor total:</span>
<span class="text-sm font-semibold text-green-600 dark:text-green-400">
{{ formatCurrency(product.value) }}
</span>
</div>
<!-- Progress bar for stock level -->
<div class="mt-3">
<div
class="flex items-center justify-between text-xs text-gray-600 dark:text-gray-400 mb-1">
<span>Stock</span>
<span>{{ Math.round((product.stock / 100) * 100) }}%</span>
</div>
<div class="w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2">
<div class="h-2 rounded-full transition-all duration-300" :class="product.stock > 50 ? 'bg-green-500' :
product.stock > 20 ? 'bg-yellow-500' : 'bg-red-500'"
:style="`width: ${Math.min(100, (product.stock / 100) * 100)}%`">
</div>
</div>
</div>
</div>
</div>
</div>
</CardContent>
</Card>
</div>
</div>