Skip to content

Commit 910ad92

Browse files
authored
Merge pull request #135 from PSMRI/sn/3.6.1
fix: resolve Allocate Batches flickering when toggling System/Manual …
2 parents adeb4b5 + be450b5 commit 910ad92

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/app/app-modules/rx/rx-item-dispense/rx-item-dispense.component.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,22 +202,25 @@ export class RxItemDispenseComponent implements OnInit, OnChanges, DoCheck {
202202
this.clearBatchArray(selectionBatchList);
203203

204204
if (this.issueType === 0) {
205-
console.error('Issue Type is 0, allocating batches', this.issueType);
206-
this.allocate();
207-
this.allocated = false;
208205
element.preDefinedBatchList.forEach((batch: any) => {
209206
selectionBatchList.push(
210207
this.utils.initBatchListElement(batch, this.issueType),
211208
);
212209
});
213-
} else if (this.issueType === 1) {
214-
this.allocate();
215210
}
216211
currentGroup.patchValue({
217212
qtyDispensed: null,
218213
});
219214
currentGroup.controls['selectionBatchList'] = selectionBatchList;
220215
});
216+
217+
if (this.issueType === 0) {
218+
this.allocated = false;
219+
this.allocate();
220+
} else if (this.issueType === 1) {
221+
this.allocated = true;
222+
this.allocate();
223+
}
221224
}
222225

223226
clearBatchArray(formArray: any) {

0 commit comments

Comments
 (0)