From 41b1fa10470bf553822285bfc792e297ef5bd995 Mon Sep 17 00:00:00 2001 From: Henning Wobken Date: Fri, 8 May 2020 00:43:38 +0200 Subject: [PATCH] more occupations #279 --- client/src/api/SwaggerApi.ts | 74 +++++++++++-------- client/src/models/index.ts | 10 ++- client/src/models/risk-occupation.ts | 5 +- .../imis/domain/RiskOccupation.java | 2 +- 4 files changed, 58 insertions(+), 33 deletions(-) diff --git a/client/src/api/SwaggerApi.ts b/client/src/api/SwaggerApi.ts index 5d204e1e..7501f284 100644 --- a/client/src/api/SwaggerApi.ts +++ b/client/src/api/SwaggerApi.ts @@ -90,7 +90,15 @@ export interface CreatePatientDTO { preIllnesses?: string[]; quarantineUntil?: string; riskAreas?: string[]; - riskOccupation?: "NO_RISK_OCCUPATION" | "FIRE_FIGHTER" | "DOCTOR" | "CAREGIVER" | "NURSE"; + riskOccupation?: + | "NO_RISK_OCCUPATION" + | "FIRE_FIGHTER_POLICE" + | "TEACHER" + | "PUBLIC_ADMINISTRATION" + | "STUDENT" + | "DOCTOR" + | "CAREGIVER" + | "NURSE"; speedOfSymptomsOutbreak?: string; stayCity?: string; stayCountry?: string; @@ -320,7 +328,15 @@ export interface Patient { preIllnesses?: string[]; quarantineUntil?: string; riskAreas?: string[]; - riskOccupation?: "NO_RISK_OCCUPATION" | "FIRE_FIGHTER" | "DOCTOR" | "CAREGIVER" | "NURSE"; + riskOccupation?: + | "NO_RISK_OCCUPATION" + | "FIRE_FIGHTER_POLICE" + | "TEACHER" + | "PUBLIC_ADMINISTRATION" + | "STUDENT" + | "DOCTOR" + | "CAREGIVER" + | "NURSE"; speedOfSymptomsOutbreak?: string; stayCity?: string; stayCountry?: string; @@ -949,72 +965,70 @@ export class Api extends HttpClient { error = { /** * @tags basic-error-controller - * @name errorUsingGET - * @summary error + * @name errorHtmlUsingGET + * @summary errorHtml * @request GET:/error * @secure */ - errorUsingGet: (params?: RequestParams) => - this.request, any>(`/error`, "GET", params, null, true), + errorHtmlUsingGet: (params?: RequestParams) => this.request(`/error`, "GET", params, null, true), /** * @tags basic-error-controller - * @name errorUsingHEAD - * @summary error + * @name errorHtmlUsingHEAD + * @summary errorHtml * @request HEAD:/error * @secure */ - errorUsingHead: (params?: RequestParams) => - this.request, any>(`/error`, "HEAD", params, null, true), + errorHtmlUsingHead: (params?: RequestParams) => + this.request(`/error`, "HEAD", params, null, true), /** * @tags basic-error-controller - * @name errorUsingPOST - * @summary error + * @name errorHtmlUsingPOST + * @summary errorHtml * @request POST:/error * @secure */ - errorUsingPost: (params?: RequestParams) => - this.request, any>(`/error`, "POST", params, null, true), + errorHtmlUsingPost: (params?: RequestParams) => + this.request(`/error`, "POST", params, null, true), /** * @tags basic-error-controller - * @name errorUsingPUT - * @summary error + * @name errorHtmlUsingPUT + * @summary errorHtml * @request PUT:/error * @secure */ - errorUsingPut: (params?: RequestParams) => - this.request, any>(`/error`, "PUT", params, null, true), + errorHtmlUsingPut: (params?: RequestParams) => this.request(`/error`, "PUT", params, null, true), /** * @tags basic-error-controller - * @name errorUsingDELETE - * @summary error + * @name errorHtmlUsingDELETE + * @summary errorHtml * @request DELETE:/error * @secure */ - errorUsingDelete: (params?: RequestParams) => - this.request, any>(`/error`, "DELETE", params, null, true), + errorHtmlUsingDelete: (params?: RequestParams) => + this.request(`/error`, "DELETE", params, null, true), /** * @tags basic-error-controller - * @name errorUsingOPTIONS - * @summary error + * @name errorHtmlUsingOPTIONS + * @summary errorHtml * @request OPTIONS:/error * @secure */ - errorUsingOptions: (params?: RequestParams) => - this.request, any>(`/error`, "OPTIONS", params, null, true), + errorHtmlUsingOptions: (params?: RequestParams) => + this.request(`/error`, "OPTIONS", params, null, true), /** * @tags basic-error-controller - * @name errorUsingPATCH - * @summary error + * @name errorHtmlUsingPATCH + * @summary errorHtml * @request PATCH:/error * @secure */ - errorUsingPatch: (params?: RequestParams) => - this.request, any>(`/error`, "PATCH", params, null, true), + errorHtmlUsingPatch: (params?: RequestParams) => + this.request(`/error`, "PATCH", params, null, true), }; } diff --git a/client/src/models/index.ts b/client/src/models/index.ts index e4601674..c1153fb7 100644 --- a/client/src/models/index.ts +++ b/client/src/models/index.ts @@ -22,7 +22,15 @@ export type PatientStatus = 'REGISTERED' | 'PATIENT_DEAD' | 'DOCTORS_VISIT' | 'QUARANTINE_MANDATED'; -export type RiskOccupation = 'NO_RISK_OCCUPATION' | 'FIRE_FIGHTER' | 'DOCTOR' | 'CAREGIVER' | 'NURSE' +export type RiskOccupation = + 'NO_RISK_OCCUPATION' + | 'FIRE_FIGHTER_POLICE' + | 'TEACHER' + | 'PUBLIC_ADMINISTRATION' + | 'STUDENT' + | 'DOCTOR' + | 'CAREGIVER' + | 'NURSE' export interface Option { label: string; diff --git a/client/src/models/risk-occupation.ts b/client/src/models/risk-occupation.ts index cea24e99..aa2c631d 100644 --- a/client/src/models/risk-occupation.ts +++ b/client/src/models/risk-occupation.ts @@ -6,7 +6,10 @@ export interface RiskOccupationOption { } export const RISK_OCCUPATIONS: RiskOccupationOption[] = [ - { value: 'FIRE_FIGHTER', label: 'Feuerwehrmann/frau' }, + { value: 'PUBLIC_ADMINISTRATION', label: 'Öffentliche Verwaltung' }, + { value: 'STUDENT', label: 'Schüler' }, + { value: 'TEACHER', label: 'Lehrer' }, + { value: 'FIRE_FIGHTER_POLICE', label: 'Gefahrenabwehr (Polizei, Feuerwehr usw.)' }, { value: 'DOCTOR', label: 'Arzt/Ärztin' }, { value: 'NURSE', label: 'Pflegepersonal' }, { value: 'CAREGIVER', label: 'Altenpflege' }, diff --git a/server/src/main/java/de/coronavirus/imis/domain/RiskOccupation.java b/server/src/main/java/de/coronavirus/imis/domain/RiskOccupation.java index a658e53f..a59c7b6d 100644 --- a/server/src/main/java/de/coronavirus/imis/domain/RiskOccupation.java +++ b/server/src/main/java/de/coronavirus/imis/domain/RiskOccupation.java @@ -1,5 +1,5 @@ package de.coronavirus.imis.domain; public enum RiskOccupation { - NO_RISK_OCCUPATION, FIRE_FIGHTER, DOCTOR, CAREGIVER, NURSE + NO_RISK_OCCUPATION, FIRE_FIGHTER_POLICE, TEACHER, PUBLIC_ADMINISTRATION, STUDENT, DOCTOR, CAREGIVER, NURSE }