Forbid confirmation of order that has not products inside
This commit is contained in:
parent
17f9f026bb
commit
cfb5bb5168
1 changed files with 2 additions and 1 deletions
|
@ -177,8 +177,9 @@ const OrderDetailsPage: React.FC<OrderDetailsPageProps> = props => {
|
|||
const allowSave = (hasChanged: boolean) => {
|
||||
if (order?.status !== OrderStatus.UNCONFIRMED) {
|
||||
return disabled || !hasChanged;
|
||||
} else if (!order?.lines?.length) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return disabled;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue