|
1 | 1 | // This function handles messages
|
2 | 2 | export default {
|
3 |
| - defaultWelcome: [ |
4 |
| - 'Welcome to Barefoot Nomad server.', |
5 |
| - 'use /api/v1 as the base path url for the APIs of this app.', |
6 |
| - ], |
7 |
| - welcome: 'Welcome to Archangel Barefoot Nomad Web App API.', |
8 |
| - signupSuccess: (email) => `You have successfully registered with this email, ${email}.`, |
9 |
| - // Travel requests messages |
10 |
| - oneWayTripCreated: 'Your request has been successfully created', |
11 |
| - managerApproval: (pendingReq) => `You have ${pendingReq} requests requiring your approval`, |
12 |
| - managerNotFound: "Manager's detail missing", |
13 |
| - requestNotOpen: 'Your request is no longer open for editing.', |
14 |
| - requestUpdated: 'Your request has been successfully updated', |
15 |
| - noEmail: 'Email cannot be empty.', |
16 |
| - userApproval: 'Here are your request status', |
17 |
| - // sign-up validation messages |
18 |
| - invalidEmail: 'Please, enter a valid email address.', |
19 |
| - usedEmail: (email) => `User with this email (${email}) already exist.`, |
20 |
| - shortPassword: 'The length of the password must be 8 and above.', |
21 |
| - noDigitInPassword: 'Password must contain at least one digit.', |
22 |
| - commentNotFound: 'The comment does not exist.', |
23 |
| - dateForFuture: 'Please enter a date greater than the departure date for return date.', |
24 |
| - dateForToday: "Please your departure date must be equal to or greater than today's date.", |
25 |
| - deleteComment: 'Comment successfully deleted.', |
26 |
| - diffDepartment: 'You are not in the same department as the Travel Requester.', |
27 |
| - emptyAccommodation: 'You must select an accommodation.', |
28 |
| - emptyComment: 'comment cannot be empty.', |
29 |
| - emptyDepartureDate: 'You must state your departure date', |
30 |
| - emptyDestination: 'You must state your destination', |
31 |
| - emptyEmail: 'Email cannot be empty.', |
32 |
| - emptyFirstname: 'First name cannot be empty.', |
33 |
| - emptyLastname: 'Last name cannot be empty.', |
34 |
| - emptyOrigin: 'You must state your current city.', |
35 |
| - emptyReturnDate: 'You must state your return date', |
36 |
| - emptyTravelPurpose: 'You must state your travel purpose', |
37 |
| - emptyTravelType: 'Sorry, travel type can not be empty.', |
38 |
| - notifyUser: 'Your travel request has been successfully created and it is awaiting approval', |
| 3 | + |
| 4 | + defaultWelcome: [ |
| 5 | + 'Welcome to Barefoot Nomad server.', |
| 6 | + 'use /api/v1 as the base path url for the APIs of this app.', |
| 7 | + ], |
| 8 | + welcome: 'Welcome to Archangel Barefoot Nomad Web App API.', |
| 9 | + signupSuccess: (email) => `You have successfully registered with this email, ${email}.`, |
| 10 | + // Travel requests messages |
| 11 | + oneWayTripCreated: 'Your request has been successfully created', |
| 12 | + managerApproval: (pendingReq) => `You have ${pendingReq} requests requiring your approval`, |
| 13 | + managerNotFound: "Manager's detail missing", |
| 14 | + requestNotOpen: 'Your request is no longer open for editing.', |
| 15 | + requestUpdated: 'Your request has been successfully updated', |
| 16 | + noEmail: 'Email cannot be empty.', |
| 17 | + userApproval: 'Here are your request status', |
| 18 | + // sign-up validation messages |
| 19 | + invalidEmail: 'Please, enter a valid email address.', |
| 20 | + usedEmail: (email) => `User with this email (${email}) already exist.`, |
| 21 | + shortPassword: 'The length of the password must be 8 and above.', |
| 22 | + noDigitInPassword: 'Password must contain at least one digit.', |
| 23 | + commentNotFound: 'The comment does not exist.', |
| 24 | + dateForFuture: |
| 25 | + 'Please enter a date greater than the departure date for return date.', |
| 26 | + dateForToday: |
| 27 | + "Please your departure date must be equal to or greater than today's date.", |
| 28 | + deleteComment: 'Comment successfully deleted.', |
| 29 | + diffDepartment: 'You are not in the same department as the Travel Requester.', |
| 30 | + emptyAccommodation: 'You must select an accommodation.', |
| 31 | + emptyComment: 'comment cannot be empty.', |
| 32 | + emptyDepartureDate: 'You must state your departure date', |
| 33 | + emptyDestination: 'You must state your destination', |
| 34 | + emptyEmail: 'Email cannot be empty.', |
| 35 | + emptyFirstname: 'First name cannot be empty.', |
| 36 | + emptyLastname: 'Last name cannot be empty.', |
| 37 | + emptyOrigin: 'You must state your current city.', |
| 38 | + emptyReturnDate: 'You must state your return date', |
| 39 | + emptyTravelPurpose: 'You must state your travel purpose', |
| 40 | + emptyTravelType: 'Sorry, travel type can not be empty.', |
| 41 | +notifyUser: 'Your travel request has been successfully created and it is awaiting approval', |
39 | 42 | lineManager: 'Line manager must be present to continue',
|
40 |
| - incorrectPassword: 'Sorry, the password entered is not correct.', |
41 |
| - isNotInteger: 'You must enter a valid integer type.', |
42 |
| - isNotISODate: "Your date must be of ISO8601 standard '2019-01-10'.", |
43 |
| - invalidToken: 'Invalid Token, please login.', |
44 |
| - invalidTravelType: 'Sorry you can only make return trip request here.', |
45 |
| - invalidTravelId: 'The travel ID must be an integer value.', |
46 |
| - invalidUserId: 'Sorry you can only create the request with the id of the logged in user.', |
47 |
| - lettersAlone: 'Only letters are allowed', |
48 |
| - loginSuccess: 'You have been logged in sucessfully.', |
49 |
| - logoutSuccess: 'Logged out successfully.', |
50 |
| - nonExistentTravel: 'The travel request does not exist.', |
51 |
| - requestNotPending: 'This Travel Request is not Pending.', |
52 |
| - returnTripCreated: 'Your return trip request was created successfully.', |
53 |
| - // comment messages |
54 |
| - successComment: [ |
55 |
| - 'You have successfully commented on a travel request.', |
56 |
| - 'You have successfully retrieved all comments for this travel request.', |
57 |
| - ], |
58 |
| - travelNotFound: 'The travel request does not exist.', |
59 |
| - unauthorized: 'Not authorized.', |
60 |
| - unauthorizedAccessToTravel: 'Access denied. Accessible only by travel requester or his/her line manager.', |
61 |
| - unauthorizedCommentDelete: "comment can only be deleted by it's author", |
62 |
| - successfullyApproval: (requester) => `You have successfully approved a travel request from ${requester}.`, |
63 |
| - userEmailNotFound: (email) => `Sorry, there is no user with email ${email} in the database.`, |
64 |
| - userIdNotFound: (id) => `Sorry, there is no user with id: ${id} in the database.`, |
65 |
| - unregisteredEmail: (email) => `User with this email (${email}) not found in our database.`, |
66 |
| - wrongRole: (role) => `Sorry, you are not a/an ${role}.`, |
| 43 | + incorrectPassword: 'Sorry, the password entered is not correct.', |
| 44 | + isNotInteger: 'You must enter a valid integer type.', |
| 45 | + isNotISODate: "Your date must be of ISO8601 standard '2019-01-10'.", |
| 46 | + invalidToken: 'Invalid Token, please login.', |
| 47 | + invalidTravelType: 'Sorry you can only make return trip request here.', |
| 48 | + invalidTravelId: 'The travel ID must be an integer value.', |
| 49 | + invalidUserId: |
| 50 | + 'Sorry you can only create the request with the id of the logged in user.', |
| 51 | + lettersAlone: 'Only letters are allowed', |
| 52 | + loginSuccess: 'You have been logged in sucessfully.', |
| 53 | + logoutSuccess: 'Logged out successfully.', |
| 54 | + nonExistentTravel: 'The travel request does not exist.', |
| 55 | + requestNotPending: 'This Travel Request is not Pending.', |
| 56 | + returnTripCreated: 'Your return trip request was created successfully.', |
| 57 | + // comment messages |
| 58 | + successComment: [ |
| 59 | + 'You have successfully commented on a travel request.', |
| 60 | + 'You have successfully retrieved all comments for this travel request.', |
| 61 | + ], |
| 62 | + travelNotFound: 'The travel request does not exist.', |
| 63 | + unauthorized: 'Not authorized.', |
| 64 | + unauthorizedAccessToTravel: |
| 65 | + 'Access denied. Accessible only by travel requester or his/her line manager.', |
| 66 | + unauthorizedCommentDelete: "comment can only be deleted by it's author", |
| 67 | + successfullyApproval: (requester) => `You have successfully approved a travel request from ${requester}.`, |
| 68 | + userEmailNotFound: (email) => `Sorry, there is no user with email ${email} in the database.`, |
| 69 | + userIdNotFound: (id) => `Sorry, there is no user with id: ${id} in the database.`, |
| 70 | + unregisteredEmail: (email) => `User with this email (${email}) not found in our database.`, |
| 71 | + wrongRole: (role) => `Sorry, you are not a/an ${role}.`, |
| 72 | + |
| 73 | + newFeedback: (accomm) => `You have successfully dropped a feedback on our accomodation facility with name, ${accomm}.`, |
| 74 | + getFeedback: (accomm) => `You have successfully retrieved feedback on our accommodation facility with name, ${accomm}.`, |
| 75 | + accommodationNotFound: 'The accommodation facility does not exist.', |
| 76 | + invalidAccommodationId: 'The Accommodation ID must be an integer value.', |
| 77 | + emptyFeedback: 'Feedback field cannot be empty.', |
67 | 78 |
|
68 |
| - newFeedback: (accomm) => `You have successfully dropped a feedback on our accomodation facility with name, ${accomm}.`, |
69 |
| - getFeedback: (accomm) => `You have successfully retrieved feedback on our accommodation facility with name, ${accomm}.`, |
70 |
| - accommodationNotFound: 'The accommodation facility does not exist.', |
71 |
| - invalidAccommodationId: 'The Accommodation ID must be an integer value.', |
72 |
| - emptyFeedback: 'Feedback field cannot be empty.', |
73 | 79 | };
|
0 commit comments