feat(web): maestros de clientes, proveedores y artículos (lista, formulario con pestañas, extensiones por cliente)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b759c7bce7
commit
9f003ee4bf
30 files changed
+1553
-23
No files matched your search
@@ -124,6 +124,26 @@ export class NumberInput extends ControlBase {
|
||||
}
|
||||
}
|
||||
|
||||
/** Casilla de verificación (en SAP, un campo `tYES`/`tNO`; quien la usa convierte). */
|
||||
@Component({
|
||||
selector: 'sbo-checkbox',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
<input
|
||||
type="checkbox"
|
||||
[id]="id"
|
||||
[checked]="value()"
|
||||
[disabled]="disabled() || readOnly()"
|
||||
[attr.aria-label]="ariaLabel() ?? null"
|
||||
(change)="value.set($any($event.target).checked)"
|
||||
/>
|
||||
`,
|
||||
styles: ':host { display: block; } input { margin: 4px 0; }',
|
||||
})
|
||||
export class CheckboxInput extends ControlBase {
|
||||
readonly value = model(false);
|
||||
}
|
||||
|
||||
/** Fecha como texto ISO `yyyy-MM-dd` (el formato del Service Layer). Selector nativo: sin librerías. */
|
||||
@Component({
|
||||
selector: 'sbo-date',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ChangeDetectionStrategy, Component, input, model } from '@angular/core';
|
||||
import { FieldBase } from './field-base';
|
||||
import { DateInput, NumberInput, SelectInput, type SelectOption, TextInput, TextareaInput } from './controls';
|
||||
import { CheckboxInput, DateInput, NumberInput, SelectInput, type SelectOption, TextInput, TextareaInput } from './controls';
|
||||
import { SboField } from './sbo-field';
|
||||
|
||||
/*
|
||||
@@ -32,6 +32,21 @@ export class TextField extends FieldBase {
|
||||
readonly placeholder = input('');
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'sbo-checkbox-field',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
imports: [SboField, CheckboxInput],
|
||||
template: `
|
||||
<sbo-field [label]="label()" [error]="error()">
|
||||
<sbo-checkbox [(value)]="value" [readonly]="readOnly()" [disabled]="disabled()" />
|
||||
</sbo-field>
|
||||
`,
|
||||
styles: ':host { display: block; }',
|
||||
})
|
||||
export class CheckboxField extends FieldBase {
|
||||
readonly value = model(false);
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'sbo-textarea-field',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Fila y controles combinables
|
||||
export { DateInput, NumberInput, type SelectOption, SelectInput, TextInput, TextareaInput } from './controls';
|
||||
export { CheckboxInput, DateInput, NumberInput, type SelectOption, SelectInput, TextInput, TextareaInput } from './controls';
|
||||
export { SboField } from './sbo-field';
|
||||
// Atajos con etiqueta (un control por fila)
|
||||
export { DateField, NumberField, SelectField, TextField, TextareaField } from './fields';
|
||||
export { CheckboxField, DateField, NumberField, SelectField, TextField, TextareaField } from './fields';
|
||||
export { LookupField } from './lookup-field';
|
||||
@@ -15,4 +15,6 @@ export interface VhLookup {
|
||||
valueKey?: string;
|
||||
/** Campos que se piden al Service Layer sin mostrarlos como columna (los usa quien recibe la fila elegida). */
|
||||
extraFields?: readonly string[];
|
||||
/** Tipo de la clave de la lista: `number` para códigos numéricos (grupos, listas de precios), que no llevan comillas. */
|
||||
valueType?: 'string' | 'number';
|
||||
}
|
||||
Reference in new issue
Block a user