template fixes
This commit is contained in:
@ -41,8 +41,12 @@ export class SampleModel extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
sendFormat() {
|
||||
const tmp = pick(this.conditionTemplateCheck(), ['color', 'type', 'batch', 'condition', 'material_id', 'notes']);
|
||||
sendFormat(pickCondition = true) {
|
||||
const pickFields = ['color', 'type', 'batch', 'material_id', 'notes'];
|
||||
if (pickCondition) {
|
||||
pickFields.push('condition');
|
||||
}
|
||||
const tmp = pick(this.conditionTemplateCheck(), pickFields);
|
||||
Object.keys(tmp).forEach(key => {
|
||||
if (tmp[key] === undefined) {
|
||||
delete tmp[key];
|
||||
|
Reference in New Issue
Block a user