Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App: Task Manager #3

Open
fdelvals opened this issue Sep 19, 2024 · 1 comment
Open

App: Task Manager #3

fdelvals opened this issue Sep 19, 2024 · 1 comment

Comments

@fdelvals
Copy link
Owner

TodoImage

@fdelvals
Copy link
Owner Author

TaskManager Component

Summary

The TaskManager component is a standalone Angular component designed to manage a list of tasks. It includes functionality to add, display, and mark tasks as done. The component interacts with a backend REST API to fetch, create, update, and delete tasks.

Files Generated

  1. Model: task.model.ts

    • Defines the structure of a Task object with properties such as id, name, description, and done.
  2. Service: task.service.ts

    • Contains methods to interact with the backend REST API. This includes methods to get all tasks, add a new task, update a task, and delete a task.
  3. Component Logic: taskmanager.component.ts

    • Contains the logic for the TaskManager component. This includes methods to handle user interactions, such as adding a new task, marking a task as done, and deleting a task.
  4. HTML Template: taskmanager.component.html

    • Defines the structure of the TaskManager component's user interface. This includes a form to add new tasks and a table to display the list of tasks.
  5. CSS Styles: taskmanager.component.css

    • Contains the styles for the TaskManager component to ensure a clean and user-friendly interface.

OpenAPI Specification

openapi: 3.0.0
info:
  title: TaskManager API
  version: 1.0.0
paths:
  /tasks:
    get:
      summary: Get all tasks
      responses:
        '200':
          description: A list of tasks
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Task'
    post:
      summary: Add a new task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Task'
      responses:
        '201':
          description: Task created
  /tasks/{id}:
    put:
      summary: Update a task
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Task'
      responses:
        '200':
          description: Task updated
    delete:
      summary: Delete a task
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Task deleted
components:
  schemas:
    Task:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        done:
          type: boolean

This specification describes the necessary API endpoints for the TaskManager component, including methods to get all tasks, add a new task, update a task, and delete a task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant