feature/tipo-operacion-invoice
This commit is contained in:
@@ -152,56 +152,26 @@
|
||||
<!-- Datos Principales en una fila compacta (reusable across tabs) -->
|
||||
<div class="flex flex-wrap items-end gap-3 pb-3">
|
||||
{#if !isSettings}
|
||||
<!-- Campos no manipulables pero visibles -->
|
||||
<div class="min-w-[100px] flex-1 space-y-1">
|
||||
<Label for="operation_type" class="text-xs"
|
||||
>{m.invoice_edit_form_operation_type_label()}<span class="text-red-500">*</span></Label
|
||||
<Label class="text-xs text-muted-foreground"
|
||||
>{m.invoice_edit_form_operation_type_label()}</Label
|
||||
>
|
||||
<Select.Root
|
||||
type="single"
|
||||
value={formData.operation_type || ''}
|
||||
onValueChange={(v) => {
|
||||
formData.operation_type = v;
|
||||
}}
|
||||
>
|
||||
<Select.Trigger id="operation_type" class="h-8 text-sm">
|
||||
<span class="truncate">
|
||||
{formData.operation_type
|
||||
? (formData.operation_type === 'exp'
|
||||
? m.invoice_edit_form_operation_type_export()
|
||||
: m.invoice_edit_form_operation_type_import())
|
||||
: '...'}
|
||||
</span>
|
||||
</Select.Trigger>
|
||||
<Select.Content>
|
||||
<Select.Item value="exp">{m.invoice_edit_form_operation_type_export()}</Select.Item>
|
||||
<Select.Item value="imp">{m.invoice_edit_form_operation_type_import()}</Select.Item>
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
<p class="h-8 text-sm font-medium flex items-center">
|
||||
{formData.operation_type
|
||||
? (formData.operation_type === 'exp'
|
||||
? m.invoice_edit_form_operation_type_export()
|
||||
: m.invoice_edit_form_operation_type_import())
|
||||
: '...'}
|
||||
</p>
|
||||
</div>
|
||||
<div class="min-w-[100px] flex-1 space-y-1">
|
||||
<Label for="operation_type" class="text-xs"
|
||||
>{m.invoice_edit_form_invoice_type_label()} <span class="text-red-500">*</span></Label
|
||||
<Label class="text-xs text-muted-foreground"
|
||||
>{m.invoice_edit_form_invoice_type_label()}</Label
|
||||
>
|
||||
<Select.Root
|
||||
type="single"
|
||||
value={formData.invoice_type || ''}
|
||||
onValueChange={(v) => {
|
||||
formData.invoice_type = v ?? '';
|
||||
}}
|
||||
>
|
||||
<Select.Trigger id="invoice_type" class="h-7 text-xs">
|
||||
<span class="truncate">
|
||||
{formData.invoice_type ? `${formData.invoice_type}` : '...'}
|
||||
</span>
|
||||
</Select.Trigger>
|
||||
<Select.Content class="max-h-[300px]">
|
||||
{#each filteredInvoiceTypes as type}
|
||||
<Select.Item value={type.key}>
|
||||
{type.key} - {type.description}
|
||||
</Select.Item>
|
||||
{/each}
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
<p class="h-8 text-sm font-medium flex items-center">
|
||||
{formData.invoice_type ? `${formData.invoice_type}` : '...'}
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user