fix NewTicketDTO type mismatch in Enums

This commit is contained in:
Ruidy Nemausat 2020-04-20 16:05:55 +02:00
parent 9d4769101a
commit c3dca8edef
4 changed files with 6 additions and 4 deletions

View file

@ -105,6 +105,9 @@ namespace TicketManager.Controllers
Description = ticketDto.Description,
EndingDate = ticketDto.EndingDate,
CreatorId = ticketDto.CreatorId,
Category = (Category)ticketDto.Category,
Impact = (Impact)ticketDto.Impact,
Difficulty = (Difficulty)ticketDto.Difficulty,
Project = await _context.Projects.FindAsync(ticketDto.ProjectId)
};

View file

@ -16,11 +16,11 @@ namespace TicketManager.Resources
[DataType(DataType.Date)]
public DateTime EndingDate { get; set; }
public string Impact { get; set; }
public int Impact { get; set; }
public string Difficulty { get; set; }
public int Difficulty { get; set; }
public string Category { get; set; }
public int Category { get; set; }
[Required]
public Guid CreatorId { get; set; }
[Required]

BIN
app.db

Binary file not shown.

View file

@ -8,7 +8,6 @@ import {
Theme,
} from "@material-ui/core";
import Modal from "./Modal";
import Ticket from "../../types/Ticket";
import Project from "../../types/Project";
import Category from "../../types/enums/category";
import Impact from "../../types/enums/impact";