Skip to content

AssignmentModal ​

AssignmentModal is a ue-modal dialog for creating or editing a task assignment. It presents a validated form with an assignee selector, a due-date picker, a description textarea, and an optional preliminary-documents file upload.

Usage ​

html
<assignment-modal
  v-model="showModal"
  v-model:form="formData"
  :users="userList"
  :loading="saving"
  :filepond="filepond"
  @submit="saveAssignment"
/>
js
const formData = ref({
  assignee_id: null,
  due_at: null,
  description: null,
  preliminaries: [],
})

Props ​

PropTypeDefaultDescription
modelValueObject{}Controls modal visibility (v-model).
formObject{ assignee_id, due_at, description, preliminaries: [] }The form model (v-model:form).
usersArray[]User list for the assignee v-select. Each item must have id and name.
loadingBooleanfalseShows loading state on the submit button.
disabledBooleanfalseDisables the submit button.
variantString'outlined'Vuetify input variant applied to all fields.
filepondObject{}Schema-style config forwarded to v-input-filepond for the preliminary documents field.
minDueDaysNumber0Minimum number of days from today allowed for the due date. Enforces a futureDateRule.

Emits ​

EventPayloadDescription
update:modelValueBooleanModal open/close state change
update:formObjectUpdated form model
submit—Emitted when the form passes validation and the Assign button is clicked

Exposed methods ​

MethodReturnsDescription
validateForm()Promise<{ valid: Boolean }>Programmatically validates all fields. Call this before submitting externally.

Form fields ​

FieldInput typeValidation rules
Assigneev-select (item-value: id, item-title: name)Required
Due Datev-input-dateRequired, valid date, minimum minDueDays days in the future
Descriptionv-textareaRequired, minimum 10 characters
Preliminary Documentsv-input-filepondOptional; filepond prop controls server endpoints and accepted file types

Validation ​

Validation is triggered on submit (lazy). The due-date field also validates on blur. The form ref is exposed as validateForm() for external callers.

Preliminary documents badge ​

The preliminary-documents filepond label is wrapped in a v-badge with a mdi-creation icon to visually indicate it is an AI-assisted or special field.