@Input() ids: number[];
- copyCount = 0;
+ copyCount = '';
selectedFormula: ComboboxEntry;
formulaFilter = {owner: []};
templateCopy: IdlObject;
args = {};
}
- this.copyCount = 1;
+ this.copyCount = '';
this.selectedFormula = null;
this.formulaFilter.owner =
this.org.fullPath(this.auth.user().ws_ou(), true);
canApply(): boolean {
if (!this.templateCopy) { return false; }
- if (this.copyCount > 0 ||
+ const _copyCount = parseInt(this.copyCount, 10);
+ if ((_copyCount && _copyCount > 0) ||
this.selectedFormula?.id ||
this.templateCopy.owning_lib() ||
this.templateCopy.location() ||
compileBatchChange(): any {
const changes = {
- item_count: this.copyCount,
_dist_formula: this.selectedFormula?.id
};
+ const _copyCount = parseInt(this.copyCount, 10);
+ if (_copyCount && _copyCount > 0) {
+ changes['item_count'] = _copyCount;
+ }
if (this.templateCopy.owning_lib()) {
changes['owning_lib'] = this.templateCopy.owning_lib();
}