|
1 | 1 | // This function handles messages
|
2 | 2 | export default {
|
| 3 | + |
3 | 4 | defaultWelcome: [
|
4 | 5 | 'Welcome to Barefoot Nomad server.',
|
5 | 6 | 'use /api/v1 as the base path url for the APIs of this app.',
|
@@ -70,4 +71,78 @@ export default {
|
70 | 71 | accommodationNotFound: 'The accommodation facility does not exist.',
|
71 | 72 | invalidAccommodationId: 'The Accommodation ID must be an integer value.',
|
72 | 73 | emptyFeedback: 'Feedback field cannot be empty.',
|
| 74 | + |
| 75 | + defaultWelcome: [ |
| 76 | + 'Welcome to Barefoot Nomad server.', |
| 77 | + 'use /api/v1 as the base path url for the APIs of this app.', |
| 78 | + ], |
| 79 | + welcome: 'Welcome to Archangel Barefoot Nomad Web App API.', |
| 80 | + signupSuccess: (email) => `You have successfully registered with this email, ${email}.`, |
| 81 | + // Travel requests messages |
| 82 | + oneWayTripCreated: 'Your request has been successfully created', |
| 83 | + managerApproval: (pendingReq) => `You have ${pendingReq} requests requiring your approval`, |
| 84 | + managerNotFound: "Manager's detail missing", |
| 85 | + requestNotOpen: 'Your request is no longer open for editing.', |
| 86 | + requestUpdated: 'Your request has been successfully updated', |
| 87 | + noEmail: 'Email cannot be empty.', |
| 88 | + userApproval: 'Here are your request status', |
| 89 | + // sign-up validation messages |
| 90 | + invalidEmail: 'Please, enter a valid email address.', |
| 91 | + usedEmail: (email) => `User with this email (${email}) already exist.`, |
| 92 | + shortPassword: 'The length of the password must be 8 and above.', |
| 93 | + noDigitInPassword: 'Password must contain at least one digit.', |
| 94 | + commentNotFound: 'The comment does not exist.', |
| 95 | + dateForFuture: |
| 96 | + 'Please enter a date greater than the departure date for return date.', |
| 97 | + dateForToday: |
| 98 | + "Please your departure date must be equal to or greater than today's date.", |
| 99 | + deleteComment: 'Comment successfully deleted.', |
| 100 | + diffDepartment: 'You are not in the same department as the Travel Requester.', |
| 101 | + emptyAccommodation: 'You must select an accommodation.', |
| 102 | + emptyComment: 'comment cannot be empty.', |
| 103 | + emptyDepartureDate: 'You must state your departure date', |
| 104 | + emptyDestination: 'You must state your destination', |
| 105 | + emptyEmail: 'Email cannot be empty.', |
| 106 | + emptyFirstname: 'First name cannot be empty.', |
| 107 | + emptyLastname: 'Last name cannot be empty.', |
| 108 | + emptyOrigin: 'You must state your current city.', |
| 109 | + emptyReturnDate: 'You must state your return date', |
| 110 | + emptyTravelPurpose: 'You must state your travel purpose', |
| 111 | + emptyTravelType: 'Sorry, travel type can not be empty.', |
| 112 | + incorrectPassword: 'Sorry, the password entered is not correct.', |
| 113 | + isNotInteger: 'You must enter a valid integer type.', |
| 114 | + isNotISODate: "Your date must be of ISO8601 standard '2019-01-10'.", |
| 115 | + invalidToken: 'Invalid Token, please login.', |
| 116 | + invalidTravelType: 'Sorry you can only make return trip request here.', |
| 117 | + invalidTravelId: 'The travel ID must be an integer value.', |
| 118 | + invalidUserId: |
| 119 | + 'Sorry you can only create the request with the id of the logged in user.', |
| 120 | + lettersAlone: 'Only letters are allowed', |
| 121 | + loginSuccess: 'You have been logged in sucessfully.', |
| 122 | + logoutSuccess: 'Logged out successfully.', |
| 123 | + nonExistentTravel: 'The travel request does not exist.', |
| 124 | + requestNotPending: 'This Travel Request is not Pending.', |
| 125 | + returnTripCreated: 'Your return trip request was created successfully.', |
| 126 | + // comment messages |
| 127 | + successComment: [ |
| 128 | + 'You have successfully commented on a travel request.', |
| 129 | + 'You have successfully retrieved all comments for this travel request.', |
| 130 | + ], |
| 131 | + travelNotFound: 'The travel request does not exist.', |
| 132 | + unauthorized: 'Not authorized.', |
| 133 | + unauthorizedAccessToTravel: |
| 134 | + 'Access denied. Accessible only by travel requester or his/her line manager.', |
| 135 | + unauthorizedCommentDelete: "comment can only be deleted by it's author", |
| 136 | + successfullyApproval: (requester) => `You have successfully approved a travel request from ${requester}.`, |
| 137 | + userEmailNotFound: (email) => `Sorry, there is no user with email ${email} in the database.`, |
| 138 | + userIdNotFound: (id) => `Sorry, there is no user with id: ${id} in the database.`, |
| 139 | + unregisteredEmail: (email) => `User with this email (${email}) not found in our database.`, |
| 140 | + wrongRole: (role) => `Sorry, you are not a/an ${role}.`, |
| 141 | + |
| 142 | + newFeedback: (accomm) => `You have successfully dropped a feedback on our accomodation facility with name, ${accomm}.`, |
| 143 | + getFeedback: (accomm) => `You have successfully retrieved feedback on our accommodation facility with name, ${accomm}.`, |
| 144 | + accommodationNotFound: 'The accommodation facility does not exist.', |
| 145 | + invalidAccommodationId: 'The Accommodation ID must be an integer value.', |
| 146 | + emptyFeedback: 'Feedback field cannot be empty.', |
| 147 | + |
73 | 148 | };
|
0 commit comments