All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.app.core.model.referential-step.model.ts Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
export class ReferentialStep {

  constructor(public id: string,
    public name: string,
    public usage: string,
    public steps?: Array,
    public task?: string
  ) { }

}

export function stepsFromObjects(fromJsonObjects: Array) {
  return fromJsonObjects.map(value => stepFromObject(value));
}

export function stepFromObject(fromJsonObject: Object) {
  return new ReferentialStep(fromJsonObject['id'],
    fromJsonObject['name'],
    fromJsonObject['usage'],
    fromJsonObject['steps'],
    fromJsonObject['task']
  );
}