const newFire = FireTaskDto.createFireReport( fireReasons.map(ordinal => FireReason[ordinal]),
FireType[FireType.CLASS],
fireNote,
reporter,
studentId,
classroomInfo,
)
// have to manually add this
newFire['__dto_class'] = "com.ktbyte.dto.FireTaskDto";
fireService.reportFire(newFire, result => {
onToggle(false);
setIsProcessing(false);
})
This causes a problem when trying to render enums if there are Enums in the DTO
Also tried calling FireTaskDto.new{} to see, looks like it doesn't add that either
This causes a problem when trying to render enums if there are Enums in the DTO Also tried calling
FireTaskDto.new{}
to see, looks like it doesn't add that either