cityworks
    Preparing search index...

    Class Comments

    A plugin that contains "comments" methods

    Index

    Properties

    activityTypes: ReversibleMap<string, number>

    Storage of all potential activity types which comments can be attached to: Unknown, Request, WorkOrder, CaTask, CaObject, CaCorrection, Project, Contract

    currentActivityType: string

    Storage of object's active activityType

    Methods

    • Add a comment - for adding a comment to an object when the object is already known. Always call comment.add from request, case, workorder, or inspection.

      Parameters

      • sid: number

        The SID of the activity to which the comment should be attached

      • comment: string

        The text for the comment

      Returns Promise<unknown>

      Returns a Promise which represents a CommentRecord object

    • Get comments for activity items

      Parameters

      • sids: number[]

        The options SIDs to get comments for.

      Returns Promise<unknown>

      Returns Promise object that represents a collection of available comments

    • Get pre-defined comments for activityTypes

      Parameters

      • problemSid: number = 0

        The ProblemSid if currentActivityType is (Service) Request

      • Optionalcategory: string

        Only applies to WorkOrder and ServiceRequest category comments.

      Returns Promise<unknown>

      Returns Promise object that represents a collection of available comment templates.

    • Update a comment

      Parameters

      • id: number

        The ID of the comment which should be updated

      • comment: string

        The new text for the updated comment

      Returns Promise<unknown>

      Returns a Promise which represents a CommentRecord object