u
This commit is contained in:
@@ -98,8 +98,8 @@ export default class BookDeliveryDialog extends PureComponent {
|
||||
loadSupplierArticlesIfNeeded() {
|
||||
const supplierId = this.props.delivery?.supplierId ?? this.props.delivery?.partyId;
|
||||
if (supplierId && Object.keys(this.state.supplierArticlesMap).length === 0) {
|
||||
void supplierApi.get(supplierId).then((res) => {
|
||||
const articles = res?.supplier?.articles || res?.articles || [];
|
||||
void supplierApi.getArticles(supplierId).then((res) => {
|
||||
const articles = res?.articles || res?.supplier?.articles || [];
|
||||
const map = buildSupplierArticlesMap(articles);
|
||||
this.setState({ supplierArticlesMap: map });
|
||||
}).catch(() => {});
|
||||
|
||||
Reference in New Issue
Block a user