Skip to content

Commit

Permalink
Merge branch 'develop' into participant-manager-webapp-svgcopyright
Browse files Browse the repository at this point in the history
  • Loading branch information
firdosebtc1 authored Sep 16, 2020
2 parents 1bec514 + a26203c commit 27268a5
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 9 deletions.
1 change: 0 additions & 1 deletion UR-web-app/src/app/entity/mock-studies-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ export const expectedTargetEnrollment: UpdateTargetEnrollmentRequest = {
};
export const expectedSiteResponse = {
message: 'New site added successfully',
code: 'MSG_001',
} as ApiResponse;

export const expectedNewSite = {
Expand Down
82 changes: 78 additions & 4 deletions UR-web-app/src/app/shared/error.codes.enum.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,83 @@
const errorMessages = {
/* eslint-disable @typescript-eslint/naming-convention */
ER_001: 'You do not have permission to view or add or update locations',
ER_002: 'Failed to update Location',
ER_003: `Can't reactive an already active location`,
ER_004: `Can't decommision an already decommissioned location`,
EC_0001:
'Due to consecutive failed sign-in attempts with incorrect password, your account has been locked for a period of 15 minutes. Please check your registered email inbox for assistance to reset your password in this period or wait until the lock period is over to sign in again.',
EC_0002:
'Your temporary password is expired. Please use the forgot password link to reset your password.',
EC_0003: 'Your account has been deactivated',
EC_0004: 'Site not found',
EC_0005: 'Wrong email or password. Try again or click forgot password.',
EC_0006:
'Your password is expired. Please use the forgot password link to reset your password.',
EC_0007:
'This email has already been used. Please try with a different email address.',
EC_0008:
'Your verification email was unable to send because the connection to mail server was interrupted',
EC_0009:
'Sorry, an error has occurred and your request could not be processed. Please try again later.',
EC_0010: 'Current password entered is invalid',
EC_0011: 'Your new password cannot repeat any of your previous 10 passwords',
EC_0012: 'User is not active',
EC_0013: 'App not found',
EC_0014: 'Study not found',
EC_0015: 'Location not found',
EC_0016:
'This location is being used as an active site in one or more studies and cannot be decomissioned',
EC_0017: 'You are not authorized to access this information',
EC_0018: 'The request cannot be fulfilled due to bad syntax',
EC_0019: 'Unauthorized or Invalid token',
EC_0020: 'Email ID or status to be provided',
EC_0021: 'You do not have permission to access this site',
EC_0022: 'Site exists with the given location ID and study ID',
EC_0023: 'You do not have permission to view or add or update locations',
EC_0024: 'User not found',
EC_0025: 'Location ID already exists',
EC_0026: 'Provided email ID does not exists or user is not invited',
EC_0027: `Can't activate an already actived location`,
EC_0028: `Default site can't be modified`,
EC_0029: `Can't decommision an already decommissioned location`,
EC_0030: 'You do not have permission to update the location',
EC_0031: 'Participant cannot be added to open study',
EC_0032: 'User should have atleast one permission',
EC_0033: 'Invalid security code',
EC_0034: 'Security code has expired',
EC_0035: 'Error in getting participants details',
EC_0036: 'Import document not in prescribed format',
EC_0037:
'Unable to import the document due to invalid format in the document content',
EC_0038: 'Enrollment target update failed for closed study',
EC_0039: 'Enrollment target failed to be updated decommissionned site',
EC_0040: 'Error in getting consent data',
EC_0041: `Allowed values for 'fields' are studies, sites`,
EC_0042: 'Admin user not found',
EC_0043:
'Your account verification is pending.Please check your email for the activation link.',
EC_0044:
'"Your account is not verified. Please verify your account by clicking on the link which has been sent to your registered email. if not received, would you like to resend verification link?',
EC_0045: 'User with same email has already been registered. Please log in.',
EC_0046: 'User does not exist',
EC_0047: 'You do not have permission to view/add study',
EC_0048: 'You do not have permission to manage site',
EC_0049: `Site doesn't exists or is inactive`,
EC_0050: `Allowed values are: N, D, I and E`,
EC_0051: 'Cannot decomission site as study type is open',
EC_0052: 'Invalid user status',
EC_0053: 'Cannot add site to open study',
EC_0054: 'User Id is required',
EC_0055:
'There should be at least 4 unique characters that are different from your previous password',
EC_0056: 'Your account has been temporary locked.Please try after sometime.',
EC_0057: 'Please upload a .xls or .xlsx file',
EC_0058: 'Location ID must be unique across the location directory',
EC_0059: 'The password reset link is either expired or invalid',
EC_0060: 'Entered email is invalid',
EC_0061:
'Invitation cannot be enabled as participant record is enabled in another site with in same study.',
EC_0062:
'You need to have permissions to one or more sites to see study level information',
EC_0063:
'You need to have permission to one or more studies to see app level information.',
EC_0064: 'email_id already exist',
/* eslint-enable @typescript-eslint/naming-convention */
};

Expand Down
53 changes: 49 additions & 4 deletions UR-web-app/src/app/shared/success.codes.enum.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,54 @@
const successMessages = {
/* eslint-disable @typescript-eslint/naming-convention */
MSG_001: 'Location added successfully',
MSG_0002: 'Reactivate successfully',
MSG_0003: 'Deactivated successfully',
MSG_0004: 'Location updated successfully',
MSG_0001: 'Site added successfully',
MSG_0002: 'New location added successfully',
MSG_0003: 'Apps fetched successfully',
MSG_0004: 'Study details fetched successfully',
MSG_0005: 'Site decommissioned successfully',
MSG_0006: 'Site activated successfully',
MSG_0007: 'Location details updated successfully',
MSG_0008: 'Participant registry fetched successfully',
MSG_0009: 'Email added successfully',
MSG_0010: 'App details fetched successfully',
MSG_0011: 'Target enrollment updated successfully',
MSG_0012: 'App participants fetched successfully',
MSG_0013: 'New user added successfully',
MSG_0014: 'User details updated successfully',
MSG_0015: 'User profile fetched successfully',
MSG_0016: 'User profile with security code fetched successfully',
MSG_0017: 'Participant details fetched successfully',
MSG_0018: 'Invitation to particiapant sent successfully',
MSG_0019: 'Your password has been reset successfully',
MSG_0020: 'Email accepted by receiving mail server',
MSG_0021: 'Email list imported successfully',
MSG_0022: 'Status updated successfully',
MSG_0023: 'Sites fetched successfully',
MSG_0024: 'Consent document fetched successfully',
MSG_0025: 'User details updated successfully',
MSG_0026: 'New account added successfully',
MSG_0027: 'Admin details fetched successfully',
MSG_0028: 'User deactivated successfully',
MSG_0029: 'User activated successfully',
MSG_0030: 'Location decommisioned successfully',
MSG_0031: 'Location activated successfully',
MSG_0032: 'Location fetched successfully',
MSG_0033: 'Locations for site fetched successfully',
MSG_0034: 'Profile updated successfully',
MSG_0035: 'Your password has been changed successfully',
MSG_0036: 'User details fetched successfully',
MSG_0038: 'User details fetched successfully',
MSG_0039: 'Invitation disabled successfully',
MSG_0040: 'Invitation enabled successfully',
MSG_0041: 'Password saved successfully',
MSG_0042: 'Email added successfully',
MSG_0037: `Email list imported successfully
Note :<Number's>emails failed to import.
Reason for failure of import emails may be due to following reasons:'
1.Email not in proper format
2.Duplicate email exists
3.Participant enabled in another site within same study
4.Email already exists
`,
/* eslint-enable @typescript-eslint/naming-convention */
};

Expand Down

0 comments on commit 27268a5

Please sign in to comment.