Constructors

Properties

allAnswers: answerSet
blendQuestions: string[]
cmcAnswers: string[]
cmcQuestions: string[]
fprVersion: "FPR 2019/1009"
fprVersionSet: undefined | fprType
generalProductQuestions: string[]
lastKeyComponentNr: number
locale: localesType
nrOfComponents: number
packageVersion: string = '1.1.1'

Class of Generator to generate the Technical Documentation for a EU fertilizing product

Param: locale

localesType

Param: fprVersion

fprVersionType

Returns

A Generator class with the functions getNextQuestion and getTechnicalDocumentation

pfcDesignation: undefined | "PFC 1.A.I" | "PFC 1.A.II" | "PFC 1.B.I" | "PFC 1.B.II" | "PFC 1.C.I.a.i" | "PFC 1.C.I.a.i.A" | "PFC 1.C.I.a.ii" | "PFC 1.C.I.a.ii.A" | "PFC 1.C.I.b.i" | "PFC 1.C.I.b.ii" | "PFC 1.C.II.a" | "PFC 1.C.II.b" | "PFC 2" | "PFC 3.A" | "PFC 3.B" | "PFC 4" | "PFC 5.A" | "PFC 5.B" | "PFC 5.C" | "PFC 6.A" | "PFC 6.B" | "PFC 7" = undefined

Methods

  • Check if all questions have been answered

    Returns boolean

    true if all questions have been answered, else false

  • Internal

    Check completeness of general product questions

    A helper function to identifyNextQuestion

    If the general questions for a FPRversion have been answered, this function returns true.

    Returns boolean

    boolean

  • Internal

    Identify the next question

    Returns string

    The id of the next question idType

  • Internal

    Get questionId for component questions

    Helper function for identifyNextQuestion finds the first component where not all cmcQuestions have been answered.

    Returns string

    The id of the next question idType

  • Saves the answer to the current question.

    The answer is stored in the allAnswers property of the generator.

    Parameters

    Returns boolean

    true if the answer was successfully saved, and false otherwise.

  • Store the generator as JSON file

    Parameters

    • filePath: string

      The file path for where to store the properties of the generator. Should have the extension ".json".

    Returns boolean

    A boolean to indicate if the file has been stored successfully