Make Client/Facture/Libellé editable in place, same as the type badge
New POST /lignes/{node}/champ endpoint (LedgerActionsController::updateField(),
whitelisted to client/facture/libelle -> field_client/field_numero_facture/
field_notes) mirrors updateType(): skips the répartition invariant check
for this save (client/facture/libellé never touch montant_ht or
field_repartition, so it can only ever leave a pre-existing historical
mismatch as it was, never introduce one), wrapped in the same
skip_validation state flag with a try/finally.
Client resolves the typed text against existing "Client" taxonomy terms
only (same known-names list the toolbar's Client filter already offers
via a datalist) -- a non-match is rejected with a clear error rather
than silently creating a new term from a typo.
Frontend mirrors the existing editingTypeId/startEditType/saveType
pattern exactly, generalized to any of the three fields via a single
{id, field} editingCell state.
Verified live: editing all three fields on a row with a known
répartition écart succeeds (bypass confirmed), an unknown client name
is rejected with a visible error and the display value stays unchanged,
and the database was confirmed clean of test artifacts afterward.
This commit is contained in:
@@ -323,6 +323,28 @@ html.gin--dark-mode #figli-home-app {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Client/Facture/Libellé: click-to-edit like the type badge above, but
|
||||
plain text rather than a pill -- a dotted underline is enough of an
|
||||
affordance without implying a fixed set of choices the way the type
|
||||
badge's pill shape does. */
|
||||
#figli-home-app .figli-editable-cell {
|
||||
cursor: pointer;
|
||||
border-bottom: 1px dotted transparent;
|
||||
}
|
||||
#figli-home-app .figli-editable-cell:hover {
|
||||
border-bottom-color: var(--figli-text-light);
|
||||
}
|
||||
#figli-home-app .figli-inline-input {
|
||||
font-size: 0.8rem;
|
||||
padding: 0.1rem 0.3rem;
|
||||
background: var(--figli-bg);
|
||||
color: var(--figli-text);
|
||||
border: 1px solid var(--figli-border);
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#figli-home-app .figli-note {
|
||||
color: var(--figli-text-light);
|
||||
font-weight: 400;
|
||||
|
||||
Reference in New Issue
Block a user