Skip to content

Commit

Permalink
Consent readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Bendel authored and Chris Bendel committed Nov 13, 2023
1 parent 9c938a0 commit 32d472e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions backend/app/controllers/api/v1/base_studies_open_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class Api::V1::BaseStudiesOpenApi
property :consented do
key :type, :boolean
key :description, 'Did the participant consent'
key :readOnly, true
end
property :first_launched_at do
key :type, :string
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/api/models/BaseStudy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface BaseStudy {
* @type {boolean}
* @memberof BaseStudy
*/
consented?: boolean;
readonly consented?: boolean;
/**
* When the study was launched; null means not launched
* @type {Date}
Expand Down Expand Up @@ -264,7 +264,6 @@ export function BaseStudyToJSON(value?: BaseStudy | null): any {
'image_id': value.imageId,
'benefits': value.benefits,
'is_hidden': value.isHidden,
'consented': value.consented,
'opens_at': value.opensAt === undefined ? undefined : (value.opensAt === null ? null : value.opensAt.toISOString()),
'closes_at': value.closesAt === undefined ? undefined : (value.closesAt === null ? null : value.closesAt.toISOString()),
'target_sample_size': value.targetSampleSize,
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/api/models/NewStudy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface NewStudy {
* @type {boolean}
* @memberof NewStudy
*/
consented?: boolean;
readonly consented?: boolean;
/**
* When the study was launched; null means not launched
* @type {Date}
Expand Down Expand Up @@ -266,7 +266,6 @@ export function NewStudyToJSON(value?: NewStudy | null): any {
'image_id': value.imageId,
'benefits': value.benefits,
'is_hidden': value.isHidden,
'consented': value.consented,
'opens_at': value.opensAt === undefined ? undefined : (value.opensAt === null ? null : value.opensAt.toISOString()),
'closes_at': value.closesAt === undefined ? undefined : (value.closesAt === null ? null : value.closesAt.toISOString()),
'target_sample_size': value.targetSampleSize,
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/api/models/ParticipantStudy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export interface ParticipantStudy {
* @type {boolean}
* @memberof ParticipantStudy
*/
consented?: boolean;
readonly consented?: boolean;
/**
* When the study was launched; null means not launched
* @type {Date}
Expand Down Expand Up @@ -330,7 +330,6 @@ export function ParticipantStudyToJSON(value?: ParticipantStudy | null): any {
'image_id': value.imageId,
'benefits': value.benefits,
'is_hidden': value.isHidden,
'consented': value.consented,
'opens_at': value.opensAt === undefined ? undefined : (value.opensAt === null ? null : value.opensAt.toISOString()),
'closes_at': value.closesAt === undefined ? undefined : (value.closesAt === null ? null : value.closesAt.toISOString()),
'target_sample_size': value.targetSampleSize,
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/api/models/Study.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export interface Study {
* @type {boolean}
* @memberof Study
*/
consented?: boolean;
readonly consented?: boolean;
/**
* When the study was launched; null means not launched
* @type {Date}
Expand Down Expand Up @@ -274,7 +274,6 @@ export function StudyToJSON(value?: Study | null): any {
'image_id': value.imageId,
'benefits': value.benefits,
'is_hidden': value.isHidden,
'consented': value.consented,
'opens_at': value.opensAt === undefined ? undefined : (value.opensAt === null ? null : value.opensAt.toISOString()),
'closes_at': value.closesAt === undefined ? undefined : (value.closesAt === null ? null : value.closesAt.toISOString()),
'target_sample_size': value.targetSampleSize,
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/api/models/StudyUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export interface StudyUpdate {
* @type {boolean}
* @memberof StudyUpdate
*/
consented?: boolean;
readonly consented?: boolean;
/**
* When the study was launched; null means not launched
* @type {Date}
Expand Down Expand Up @@ -271,7 +271,6 @@ export function StudyUpdateToJSON(value?: StudyUpdate | null): any {
'image_id': value.imageId,
'benefits': value.benefits,
'is_hidden': value.isHidden,
'consented': value.consented,
'opens_at': value.opensAt === undefined ? undefined : (value.opensAt === null ? null : value.opensAt.toISOString()),
'closes_at': value.closesAt === undefined ? undefined : (value.closesAt === null ? null : value.closesAt.toISOString()),
'target_sample_size': value.targetSampleSize,
Expand Down

0 comments on commit 32d472e

Please sign in to comment.