@openmrs/esm-stock-management-app 1.0.1-pre.383 → 1.0.1-pre.390

Sign up to get free protection for your applications and to get access to all the features.
@@ -111,10 +111,15 @@ const StockOperationSubmission: React.FC<StockOperationSubmissionProps> = ({
111
111
  kind="primary"
112
112
  onClick={async () => {
113
113
  delete model?.dateCreated;
114
- model.status = "COMPLETED";
114
+ delete model?.status;
115
115
  setIsSaving(true);
116
- await actions.onComplete(model);
117
- setIsSaving(false);
116
+ await actions.onSave(model).then(() => {
117
+ delete model?.dateCreated;
118
+ model.status = "COMPLETED";
119
+ setIsSaving(true);
120
+ actions.onComplete(model);
121
+ setIsSaving(false);
122
+ });
118
123
  }}
119
124
  renderIcon={ListChecked}
120
125
  >