Archived
2

only allowed latest template version and allowed admin to set sample number

This commit is contained in:
VLE2FE
2020-06-02 10:24:22 +02:00
parent 0fcb902499
commit 74080d0902
10 changed files with 194 additions and 29 deletions

View File

@ -67,6 +67,17 @@ export default class SampleValidate {
notes: this.sample.notes,
}).validate(data);
}
else if (param === 'new-admin') {
return Joi.object({
number: this.sample.number.required(),
color: this.sample.color.required(),
type: this.sample.type.required(),
batch: this.sample.batch.required(),
condition: this.sample.condition.required(),
material_id: IdValidate.get().required(),
notes: this.sample.notes.required()
}).validate(data);
}
else {
return{error: 'No parameter specified!', value: {}};
}