Se puso la tabla de tripulacion en el tab cont
This commit is contained in:
@@ -205,21 +205,21 @@
|
||||
<Card.Root
|
||||
class="overflow-hidden border shadow-sm {showForm ? 'lg:col-span-7 xl:col-span-8' : ''}"
|
||||
>
|
||||
<Card.Header class="border-b bg-muted/30 pb-4">
|
||||
<Card.Header class="border-b bg-muted/30 p-2 px-3">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="rounded-lg bg-primary/10 p-2">
|
||||
<Users class="h-5 w-5 text-primary" />
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="rounded-md bg-primary/10 p-1.5">
|
||||
<Users class="h-4 w-4 text-primary" />
|
||||
</div>
|
||||
<div>
|
||||
<Card.Title class="text-lg font-semibold tracking-tight">Tripulación</Card.Title>
|
||||
<Card.Description class="text-xs">Conductores y personal activo</Card.Description>
|
||||
<Card.Title class="text-base font-bold tracking-tight">Tripulación</Card.Title>
|
||||
<Card.Description class="text-xs">Personal activo</Card.Description>
|
||||
</div>
|
||||
</div>
|
||||
{#if !showForm}
|
||||
<Button onclick={handleAdd} size="sm" class="h-9 gap-2">
|
||||
<Plus class="h-4 w-4" />
|
||||
Nuevo Miembro
|
||||
<Button onclick={handleAdd} size="sm" class="h-7 gap-1.5 px-3 text-xs">
|
||||
<Plus class="h-3.5 w-3.5" />
|
||||
Nuevo
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -228,13 +228,13 @@
|
||||
<div class="min-h-[300px] overflow-x-auto">
|
||||
<table class="w-full text-left text-sm">
|
||||
<thead
|
||||
class="border-b bg-muted/50 text-[11px] font-bold tracking-wider text-muted-foreground uppercase"
|
||||
class="border-b bg-muted/50 text-xs font-bold tracking-wider text-muted-foreground uppercase"
|
||||
>
|
||||
<tr>
|
||||
<th class="px-6 py-3">Nombre</th>
|
||||
<th class="px-6 py-3">Tipo</th>
|
||||
<th class="px-6 py-3 {showForm ? 'hidden xl:table-cell' : ''}">Ubicación</th>
|
||||
<th class="w-[80px] px-6 py-3 text-right"></th>
|
||||
<th class="px-4 py-2">Nombre</th>
|
||||
<th class="px-4 py-2">Tipo</th>
|
||||
<th class="px-4 py-2 {showForm ? 'hidden xl:table-cell' : ''}">Ubicación</th>
|
||||
<th class="w-[80px] px-4 py-2 text-right"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y">
|
||||
@@ -258,13 +258,13 @@
|
||||
? 'bg-primary/5'
|
||||
: ''}"
|
||||
>
|
||||
<td class="px-6 py-3 font-medium">
|
||||
<td class="px-4 py-2 text-sm font-medium">
|
||||
{driver.driver_name}
|
||||
</td>
|
||||
<td class="px-6 py-3">
|
||||
<td class="px-4 py-2">
|
||||
<Badge
|
||||
variant="outline"
|
||||
class="text-[10px] font-bold uppercase {typeLabels[
|
||||
class="h-5 text-[10px] font-bold uppercase {typeLabels[
|
||||
driver.driver_type as keyof typeof typeLabels
|
||||
]?.color || ''}"
|
||||
>
|
||||
@@ -273,7 +273,7 @@
|
||||
</Badge>
|
||||
</td>
|
||||
<td
|
||||
class="px-6 py-3 text-muted-foreground {showForm
|
||||
class="px-4 py-2 text-muted-foreground {showForm
|
||||
? 'hidden xl:table-cell'
|
||||
: ''}"
|
||||
>
|
||||
@@ -282,25 +282,23 @@
|
||||
{driver.city || ''}, {driver.country || ''}
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-6 py-3 text-right">
|
||||
<div
|
||||
class="flex justify-end gap-1 opacity-100 transition-opacity group-hover:opacity-100 lg:opacity-0"
|
||||
>
|
||||
<td class="px-4 py-2 text-right">
|
||||
<div class="flex justify-end gap-1">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-8 w-8"
|
||||
class="h-7 w-7"
|
||||
onclick={() => handleEdit(i)}
|
||||
>
|
||||
<Pencil class="h-3.5 w-3.5" />
|
||||
<Pencil class="h-3 w-3" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-8 w-8 text-destructive"
|
||||
class="h-7 w-7 text-destructive"
|
||||
onclick={() => handleDelete(i)}
|
||||
>
|
||||
<Trash2 class="h-3.5 w-3.5" />
|
||||
<Trash2 class="h-3 w-3" />
|
||||
</Button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -690,43 +690,43 @@
|
||||
<div class="mx-auto max-w-[1400px] pb-48">
|
||||
<Tabs.Root bind:value={activeTab}>
|
||||
<!-- Top Fields (Global across tabs) -->
|
||||
<Card.Root class="mb-6 border-primary/5 shadow-sm">
|
||||
<Card.Content class="p-6">
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-4">
|
||||
<div class="space-y-2">
|
||||
<Label class="text-xs font-bold text-muted-foreground uppercase"
|
||||
<Card.Root class="mb-2.5 border-primary/5 shadow-sm">
|
||||
<Card.Content class="p-2.5 py-1.5">
|
||||
<div class="grid grid-cols-1 gap-2.5 md:grid-cols-4">
|
||||
<div class="space-y-0.5">
|
||||
<Label class="text-[8px] font-bold text-muted-foreground uppercase"
|
||||
>Número de Manifiesto</Label
|
||||
>
|
||||
<div class="relative">
|
||||
<Package class="absolute top-2.5 left-3 h-4 w-4 text-muted-foreground" />
|
||||
<Package class="absolute top-1.5 left-2 h-3 w-3 text-muted-foreground" />
|
||||
<Input
|
||||
bind:value={formData.manifest_number}
|
||||
class="bg-muted/20 pl-9 font-mono"
|
||||
class="h-7 bg-muted/20 pl-7 font-mono text-[10px]"
|
||||
placeholder="MAN-000"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-y-2">
|
||||
<Label class="text-xs font-bold text-muted-foreground uppercase"
|
||||
<div class="space-y-0.5">
|
||||
<Label class="text-[8px] font-bold text-muted-foreground uppercase"
|
||||
>Fecha Entrada/Arribo</Label
|
||||
>
|
||||
<div class="relative">
|
||||
<Calendar
|
||||
class="pointer-events-none absolute top-2.5 left-3 h-4 w-4 text-muted-foreground"
|
||||
class="pointer-events-none absolute top-1.5 left-2 h-3 w-3 text-muted-foreground"
|
||||
/>
|
||||
<Input type="date" bind:value={entryDateStr} class="pl-9" />
|
||||
<Input type="date" bind:value={entryDateStr} class="h-7 pl-7 text-[10px]" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-y-2">
|
||||
<Label class="text-xs font-bold text-muted-foreground uppercase"
|
||||
<div class="space-y-0.5">
|
||||
<Label class="text-[8px] font-bold text-muted-foreground uppercase"
|
||||
>Transportista</Label
|
||||
>
|
||||
<div class="flex gap-2">
|
||||
<div class="flex gap-1">
|
||||
<div class="relative w-full">
|
||||
<Truck class="absolute top-2.5 left-3 h-4 w-4 text-muted-foreground" />
|
||||
<Truck class="absolute top-1.5 left-2 h-3 w-3 text-muted-foreground" />
|
||||
<Input
|
||||
value={selectedTransporterName || formData.carrier_code}
|
||||
class="pl-9 font-mono"
|
||||
class="h-7 pl-7 font-mono text-[10px]"
|
||||
placeholder="Catálogo..."
|
||||
readonly
|
||||
onclick={() => (showTransporterModal = true)}
|
||||
@@ -735,25 +735,22 @@
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
class="shrink-0"
|
||||
class="h-7 w-7 shrink-0"
|
||||
onclick={() => (showTransporterModal = true)}
|
||||
>
|
||||
<FolderSearch class="h-4 w-4" />
|
||||
<FolderSearch class="h-3 w-3" />
|
||||
</Button>
|
||||
</div>
|
||||
{#if selectedTransporterName && selectedTransporterName !== formData.carrier_code}
|
||||
<!-- Name already shown in Input -->
|
||||
{/if}
|
||||
</div>
|
||||
<div class="space-y-2">
|
||||
<Label class="text-xs font-bold text-muted-foreground uppercase"
|
||||
<div class="space-y-0.5">
|
||||
<Label class="text-[8px] font-bold text-muted-foreground uppercase"
|
||||
>Persona a Cargo</Label
|
||||
>
|
||||
<div class="relative">
|
||||
<User class="absolute top-2.5 left-3 h-4 w-4 text-muted-foreground" />
|
||||
<User class="absolute top-1.5 left-2 h-3 w-3 text-muted-foreground" />
|
||||
<Input
|
||||
bind:value={formData.person_in_charge}
|
||||
class="pl-9"
|
||||
class="h-7 pl-7 text-[10px]"
|
||||
placeholder="Nombre completo"
|
||||
/>
|
||||
</div>
|
||||
@@ -1034,15 +1031,14 @@
|
||||
</div>
|
||||
</Tabs.Content>
|
||||
|
||||
<Tabs.Content value="tripulacion" class="animate-in fade-in space-y-6 duration-300">
|
||||
<Tabs.Content value="cont" class="animate-in fade-in space-y-6 duration-300">
|
||||
<ManifestDriverSubForm
|
||||
manifestNumber={formData.manifest_number}
|
||||
carrierName={selectedTransporterName || formData.carrier_code}
|
||||
isNewManifest={isNew}
|
||||
/>
|
||||
</Tabs.Content>
|
||||
|
||||
<Tabs.Content value="cont" class="animate-in fade-in space-y-6 duration-300">
|
||||
<Separator />
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2">
|
||||
<!-- Config -->
|
||||
<Card.Root class="shadow-sm">
|
||||
@@ -1276,7 +1272,7 @@
|
||||
<!-- Tabs Navigation in Footer -->
|
||||
<Tabs.Root bind:value={activeTab}>
|
||||
<div class="w-full">
|
||||
<Tabs.List class="grid w-full grid-cols-4">
|
||||
<Tabs.List class="grid w-full grid-cols-3">
|
||||
<Tabs.Trigger
|
||||
value="generales"
|
||||
class="whitespace-nowrap data-[state=active]:bg-primary data-[state=active]:text-primary-foreground"
|
||||
@@ -1284,13 +1280,6 @@
|
||||
<FileText size={16} class="mr-2" />
|
||||
Generales
|
||||
</Tabs.Trigger>
|
||||
<Tabs.Trigger
|
||||
value="tripulacion"
|
||||
class="whitespace-nowrap data-[state=active]:bg-primary data-[state=active]:text-primary-foreground"
|
||||
>
|
||||
<Users size={16} class="mr-2" />
|
||||
Tripulación
|
||||
</Tabs.Trigger>
|
||||
<Tabs.Trigger
|
||||
value="cont"
|
||||
class="whitespace-nowrap data-[state=active]:bg-primary data-[state=active]:text-primary-foreground"
|
||||
|
||||
Reference in New Issue
Block a user