u
This commit is contained in:
@@ -274,9 +274,11 @@ class ManifestHeader extends PureComponent {
|
||||
const hasArticles = this.hasArticles();
|
||||
const isEdit = docId != null;
|
||||
const hasAttachments = Array.isArray(attachments) && attachments.length > 0;
|
||||
const canSave = isEdit
|
||||
? Boolean(isDirty)
|
||||
: Boolean(hasArticles || hasAttachments);
|
||||
const hasParty = partyId != null && partyId !== '';
|
||||
const partyValid = kind !== 'order' || hasParty;
|
||||
const canSave =
|
||||
partyValid &&
|
||||
(isEdit ? Boolean(isDirty) : Boolean(hasArticles || hasAttachments));
|
||||
|
||||
// Delivery: number is server-allocated/read-only; the caller reference
|
||||
// lives in the editable externalNumber field.
|
||||
@@ -375,8 +377,8 @@ class ManifestHeader extends PureComponent {
|
||||
{...params}
|
||||
inputRef={this.partyInputRef}
|
||||
label={dirtyFields?.partyId ? `${partyLabel} *` : partyLabel}
|
||||
required={kind === 'order'}
|
||||
error={isPartyEmpty}
|
||||
helperText={Boolean(partyError) && isPartyEmpty ? 'Kunde für Bestellung erforderlich' : undefined}
|
||||
onKeyDown={this.handlePartyKeyDown}
|
||||
slotProps={{
|
||||
...params.slotProps,
|
||||
|
||||
Reference in New Issue
Block a user