Closed drummer3333 closed 6 years ago
By default, JobStatus.WAITING === 0
. In the PR, I changed the entity enums to use string enums as documented in the Typescript docs which makes JobStatus.WAITING === 'WAITING'
.
https://www.typescriptlang.org/docs/handbook/enums.html#string-enums
Overview of the issue
I can't compare the speechToTextJob.status with the static enum values JobStatus.* because the field is set to string values.
Motivation for or Use Case
We use Angular 5 in the frontend. I want to test the status field of the incoming data in the onSuccess method of speech-to-text-job.component.ts. Because the incoming data is of type String but model has the enum type, I have to cast the field to compare it to a String.
Reproduce the error
in speech-to-text-job.component.ts add this to onSuccess:
Timer is never started.
Using JHipster version installed locally in current project's node_modules
Executing jhipster:info
Options:
Welcome to the JHipster Information Sub-Generator
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Environment and Tools
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
git version 2.16.2.windows.1
node: v9.8.0
npm: 5.6.0
bower: 1.8.2
yeoman: 2.0.1
yarn: 1.5.1
Docker version 18.03.1-ce, build 9ee9f40
docker-compose version 1.21.0, build 5920eb08
Congratulations, JHipster execution is complete!
Browsers and Operating System
Windows 10 / Firefox 59