feat(web): botón «Campos» que muestra el nombre del campo de SAP junto a cada etiqueta y en las cabeceras de tablas (ayuda del cursor siempre)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6887f9e474
commit
6ad824c6c1
19 files changed
+168
-37
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component, booleanAttribute, input, output } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, booleanAttribute, inject, input, output } from '@angular/core';
|
||||
import { FieldNames } from '../../core/field-names';
|
||||
|
||||
let nextId = 0;
|
||||
|
||||
@@ -19,8 +20,11 @@ let nextId = 0;
|
||||
[class.req]="required()"
|
||||
[class.ga]="action()"
|
||||
[class.link]="linkable()"
|
||||
[attr.title]="dbName() ?? null"
|
||||
(click)="labelClick.emit()"
|
||||
>{{ label() }}</label
|
||||
>{{ label() }}@if (dbName() && names.show()) {
|
||||
<span class="db">{{ dbName() }}</span>
|
||||
}</label
|
||||
>
|
||||
<div class="ctl">
|
||||
<div class="sbo-group"><ng-content /></div>
|
||||
@@ -65,6 +69,12 @@ let nextId = 0;
|
||||
border-top: 5px solid transparent;
|
||||
border-bottom: 5px solid transparent;
|
||||
}
|
||||
.db {
|
||||
display: block;
|
||||
margin-top: -2px;
|
||||
font: 10.5px/1.2 var(--mono, monospace);
|
||||
color: var(--quiet);
|
||||
}
|
||||
label.link {
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -83,7 +93,10 @@ let nextId = 0;
|
||||
`,
|
||||
})
|
||||
export class SboField {
|
||||
protected readonly names = inject(FieldNames);
|
||||
readonly label = input.required<string>();
|
||||
/** Nombre del campo de SAP; sale como ayuda del cursor y, con «Ver campos», debajo de la etiqueta. */
|
||||
readonly dbName = input<string>();
|
||||
readonly required = input(false, { transform: booleanAttribute });
|
||||
readonly action = input(false, { transform: booleanAttribute });
|
||||
/** La etiqueta es un enlace (ej. abrir el socio de negocio). */
|
||||
|
||||
Reference in new issue
Block a user