diff --git a/.gitignore b/.gitignore index 6d75aeb7..e4de8bcb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ .idea .gradle .DS_Store +**/.project +**/.settings +/.classpath # CMake cmake-build-*/ diff --git a/client/package.json b/client/package.json index 3b837a6d..8fff87ed 100644 --- a/client/package.json +++ b/client/package.json @@ -19,6 +19,7 @@ "register-service-worker": "^1.6.2", "vue": "^2.6.11", "vue-router": "^3.1.5", + "vue-typed-mixins": "^0.2.0", "vuex": "^3.1.2", "vuex-smart-module": "^0.3.4" }, diff --git a/client/src/api/SwaggerApi.ts b/client/src/api/SwaggerApi.ts index 7501f284..9cb4a1ca 100644 --- a/client/src/api/SwaggerApi.ts +++ b/client/src/api/SwaggerApi.ts @@ -125,6 +125,32 @@ export interface Doctor { zip?: string; } +export interface ExposureContactContactView { + firstName?: string; + id?: string; + inQuarantine?: boolean; + infected?: boolean; + lastName?: string; +} + +export interface ExposureContactFromServer { + comment?: string; + contact?: ExposureContactContactView; + context?: string; + dateOfContact?: string; + id?: number; + source?: ExposureContactContactView; +} + +export interface ExposureContactToServer { + comment?: string; + contact?: string; + context?: string; + dateOfContact?: string; + id?: number; + source?: string; +} + export interface GrantedAuthority { authority?: string; } @@ -511,7 +537,7 @@ type ApiConfig = { }; class HttpClient { - public baseUrl: string = "//localhost:8642/"; + public baseUrl: string = "//localhost/"; private securityData: SecurityDataType = null as any; private securityWorker: ApiConfig["securityWorker"] = (() => {}) as any; @@ -589,7 +615,7 @@ class HttpClient { /** * @title Api Documentation * @version 1.0 - * @baseUrl //localhost:8642/ + * @baseUrl //localhost/ * Api Documentation */ export class Api extends HttpClient { @@ -705,6 +731,78 @@ export class Api extends HttpClient { addScheduledEventUsingPost: (dto: RequestLabTestDTO, params?: RequestParams) => this.request(`/api/doctor/create_appointment`, "POST", params, dto, true), + /** + * @tags exposure-contact-controller + * @name createExposureContactUsingPOST + * @summary createExposureContact + * @request POST:/api/exposure-contacts + * @secure + */ + createExposureContactUsingPost: (dto: ExposureContactToServer, params?: RequestParams) => + this.request(`/api/exposure-contacts`, "POST", params, dto, true), + + /** + * @tags exposure-contact-controller + * @name updateExposureContactUsingPUT + * @summary updateExposureContact + * @request PUT:/api/exposure-contacts + * @secure + */ + updateExposureContactUsingPut: (contact: ExposureContactToServer, params?: RequestParams) => + this.request(`/api/exposure-contacts`, "PUT", params, contact, true), + + /** + * @tags exposure-contact-controller + * @name getExposureSourceContactsForPatientUsingGET + * @summary getExposureSourceContactsForPatient + * @request GET:/api/exposure-contacts/by-contact/{id} + * @secure + */ + getExposureSourceContactsForPatientUsingGet: (id: string, params?: RequestParams) => + this.request( + `/api/exposure-contacts/by-contact/${id}`, + "GET", + params, + null, + true, + ), + + /** + * @tags exposure-contact-controller + * @name getExposureContactsForPatientUsingGET + * @summary getExposureContactsForPatient + * @request GET:/api/exposure-contacts/by-source/{id} + * @secure + */ + getExposureContactsForPatientUsingGet: (id: string, params?: RequestParams) => + this.request( + `/api/exposure-contacts/by-source/${id}`, + "GET", + params, + null, + true, + ), + + /** + * @tags exposure-contact-controller + * @name getExposureContactUsingGET + * @summary getExposureContact + * @request GET:/api/exposure-contacts/{id} + * @secure + */ + getExposureContactUsingGet: (id: number, params?: RequestParams) => + this.request(`/api/exposure-contacts/${id}`, "GET", params, null, true), + + /** + * @tags exposure-contact-controller + * @name removeExposureContactUsingDELETE + * @summary removeExposureContact + * @request DELETE:/api/exposure-contacts/{id} + * @secure + */ + removeExposureContactUsingDelete: (id: number, params?: RequestParams) => + this.request(`/api/exposure-contacts/${id}`, "DELETE", params, null, true), + /** * @tags institution-controller * @name createInstitutionUsingPOST diff --git a/client/src/components/DateInput.vue b/client/src/components/DateInput.vue index 8fcc85f3..a36a4e31 100644 --- a/client/src/components/DateInput.vue +++ b/client/src/components/DateInput.vue @@ -1,21 +1,20 @@ + + diff --git a/client/src/components/PatientInput.vue b/client/src/components/PatientInput.vue index cab2af0b..310ac0c5 100644 --- a/client/src/components/PatientInput.vue +++ b/client/src/components/PatientInput.vue @@ -1,21 +1,33 @@