Interface UseSubmissionValue

The return type of the useSubmission hook.

Hierarchy

  • UseSubmissionValue

Properties

approve: (() => void)

Type declaration

    • (): void
    • Function to approve the submission, optionally adding a comment.

      Returns void

approveSubmission: (() => void)

Type declaration

    • (): void
    • Alias for the approve method.

      Returns void

deleteSubmission: ((submissionId?) => Promise<void>)

Type declaration

    • (submissionId?): Promise<void>
    • Function to delete the submission by ID or use the current submission ID.

      Parameters

      • Optional submissionId: any

      Returns Promise<void>

fetched: boolean

Boolean indicating whether the submission data has been fetched.

isPending: null | boolean

Boolean indicating if the submission is in a pending state, or null if the state is unknown.

push: ((updatedSubmission?) => Promise<void>)

Type declaration

    • (updatedSubmission?): Promise<void>
    • Function to push updated submission data to the backend.

      Parameters

      • Optional updatedSubmission: any

      Returns Promise<void>

pushSubmission: ((updatedSubmission?) => Promise<void>)

Type declaration

    • (updatedSubmission?): Promise<void>
    • Alias for the push method.

      Parameters

      • Optional updatedSubmission: any

      Returns Promise<void>

refetch: ((quiet) => void)

Type declaration

    • (quiet): void
    • Function to refetch the submission data from the backend. Pass quiet to avoid triggering loading indicators.

      Parameters

      • quiet: boolean

      Returns void

reject: (() => void)

Type declaration

    • (): void
    • Function to reject the submission, optionally adding a comment.

      Returns void

rejectSubmission: (() => void)

Type declaration

    • (): void
    • Alias for the reject method.

      Returns void

reset: (() => void)

Type declaration

    • (): void
    • Function to reset the submission state to default values.

      Returns void

setDescription: ((description) => void)

Type declaration

    • (description): void
    • Function to update the description of the submission.

      Parameters

      • description: string

      Returns void

setFiles: ((files) => void)

Type declaration

    • (files): void
    • Function to update the files associated with the submission.

      Parameters

      • files: any

      Returns void

setId: ((id) => void)

Type declaration

    • (id): void
    • Function to update the ID of the submission and trigger a refetch.

      Parameters

      • id: string

      Returns void

setName: ((name) => void)

Type declaration

    • (name): void
    • Function to update the name of the submission.

      Parameters

      • name: string

      Returns void

setPostTitle: ((postTitle) => void)

Type declaration

    • (postTitle): void
    • Function to update the post title of the submission.

      Parameters

      • postTitle: string

      Returns void

setSchemaId: ((schemaId) => void)

Type declaration

    • (schemaId): void
    • Function to update the schema ID of the submission.

      Parameters

      • schemaId: string

      Returns void

setState: ((state) => void)

Type declaration

    • (state): void
    • Function to update the state of the submission.

      Parameters

      • state: string

      Returns void

submission: any

The current submission object containing all submission details.

uploadPendingAfterTimeout: boolean

Boolean indicating if the submission upload is still pending after exceeding the timeout period.

Generated using TypeDoc