u
This commit is contained in:
@@ -40,6 +40,7 @@ class CarrierItem extends PureComponent {
|
||||
};
|
||||
|
||||
handleBlur = () => {
|
||||
if (this.props.disabled) return;
|
||||
const item = this.props.carrier ?? this.props.item;
|
||||
if (!item) return;
|
||||
const draft = this.state.draft.trim();
|
||||
@@ -63,6 +64,7 @@ class CarrierItem extends PureComponent {
|
||||
}
|
||||
|
||||
handleToggleHasPackages = (e) => {
|
||||
if (this.props.disabled) return;
|
||||
const item = this.props.carrier ?? this.props.item;
|
||||
if (!item) return;
|
||||
const nextVal = e.target.checked;
|
||||
@@ -70,6 +72,7 @@ class CarrierItem extends PureComponent {
|
||||
};
|
||||
|
||||
handleToggleIsReverse = (e) => {
|
||||
if (this.props.disabled) return;
|
||||
const item = this.props.carrier ?? this.props.item;
|
||||
if (!item) return;
|
||||
const nextVal = e.target.checked;
|
||||
@@ -77,6 +80,7 @@ class CarrierItem extends PureComponent {
|
||||
};
|
||||
|
||||
handleKeyDown = (event) => {
|
||||
if (this.props.disabled) return;
|
||||
const item = this.props.carrier ?? this.props.item;
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
@@ -90,6 +94,7 @@ class CarrierItem extends PureComponent {
|
||||
};
|
||||
|
||||
handleDelete = () => {
|
||||
if (this.props.disabled) return;
|
||||
const item = this.props.carrier ?? this.props.item;
|
||||
if (!item) return;
|
||||
if (!window.confirm(`Versandart „${item.name}“ wirklich löschen?`)) return;
|
||||
|
||||
Reference in New Issue
Block a user