Tasks move through a simple lifecycle: they are created with a title, description, and an assigned user, they appear in the active task list, and they are removed from the list when completed or deleted. All task operations go through a Vuex store that communicates with the Laravel backend over HTTP.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/estebansalas94/Prueba-Soporte/llms.txt
Use this file to discover all available pages before exploring further.
Task lifecycle
Create a task
The user fills in the task form at the bottom of the task list — providing a title, description, and the email address of the user to assign the task to — then clicks Add Task.The On success, the form fields are cleared and the new task appears in the list.
addTask method in TaskList.vue validates that all three fields are present, then dispatches the addTask action to the Vuex store:Task appears in the active list
The Vuex store commits the
ADD_TASK mutation, which appends the new task to the tasks array in state. The v-for loop in the template renders it immediately:The task list only shows incomplete tasks. The backend
index action filters by completed = 0, so any task marked as complete is excluded from the next fetch and disappears from the UI after the store is updated.Complete a task
Clicking Complete calls The store sends a The On the backend, the controller sets
completeTask(task.id) on the component, which dispatches to the store:PUT request to /tasks/{id}/complete and commits the updated task via UPDATE_TASK:UPDATE_TASK mutation replaces the task in the array in-place:completed = 1 and saves:Task is removed from the list
Because
TaskController@index only returns tasks where completed = 0, the completed task will not appear the next time fetchTasks is called. The UPDATE_TASK mutation updates the local copy in state (including the new completed value), so the reactive list reflects the change without an extra round-trip.Delete a task
Clicking Delete calls The store sends a The The backend controller uses
deleteTask(task.id), which dispatches to the store:DELETE request to /tasks/{id} and commits DELETE_TASK to remove the task from state:DELETE_TASK mutation filters the task out of the array immediately:findOrFail and permanently removes the record:Fetching tasks on load
WhenTaskList.vue mounts, it immediately calls fetchTasks() to populate the store:
GET /tasks/index and commits the response via SET_TASKS:
Vuex store state shape
The store holds a singletasks array:
ADD_TASK, UPDATE_TASK, SET_TASKS, DELETE_TASK) operate on this array. A tasks getter is also exposed for convenience:
mapState: