u
This commit is contained in:
@@ -99,6 +99,7 @@ class LieferungNeuPage extends PureComponent {
|
||||
this.handleAddLine = this.handleAddLine.bind(this);
|
||||
this.handleAddArticleLine = this.handleAddArticleLine.bind(this);
|
||||
this.handleRemoveLine = this.handleRemoveLine.bind(this);
|
||||
this.handleMoveLine = this.handleMoveLine.bind(this);
|
||||
this.handleRemoveAllLines = this.handleRemoveAllLines.bind(this);
|
||||
this.handleSave = this.handleSave.bind(this);
|
||||
this.handlePdfUpload = this.handlePdfUpload.bind(this);
|
||||
@@ -541,6 +542,13 @@ class LieferungNeuPage extends PureComponent {
|
||||
this.automat.actions.removeLineitem(index >= 0 ? index : key);
|
||||
}
|
||||
|
||||
handleMoveLine(key, delta) {
|
||||
const fromIndex = this.findLineIndex(key);
|
||||
if (fromIndex < 0) return;
|
||||
const toIndex = fromIndex + delta;
|
||||
this.automat.actions.moveLineitem(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
handleRemoveAllLines() {
|
||||
this.automat.actions.clearLineitems();
|
||||
}
|
||||
@@ -1340,6 +1348,7 @@ class LieferungNeuPage extends PureComponent {
|
||||
onAddLine={this.handleAddLine}
|
||||
onAddArticleLine={this.handleAddArticleLine}
|
||||
onRemoveLine={this.handleRemoveLine}
|
||||
onMoveLine={this.handleMoveLine}
|
||||
onRemoveAllLines={this.handleRemoveAllLines}
|
||||
onSave={() => void this.handleSave()}
|
||||
onCreateArticle={this.handleCreateArticleForLine}
|
||||
|
||||
Reference in New Issue
Block a user