You are on page 1of 130

A

PROJECT REPORT
ON

TRAVEL MANAGEMENT SYSTEM


IN ASSOCIATION WITH

HARBINGER GROUP – HARBINGER SYSTEMS PVT. LTD.

BY

MS. PASHILKAR RASIKA S.

MASTER IN COMPUTER APPLICATIONS


RAJARSHI SHAHU COLLEGE OF ENGINEERING
PUNE, An Autonomous Institute Affiliated to
SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE2019-
2020-2022
DocuSign Envelope ID: 4E316BAB-AF53-468D-8469-D619BC272009

June 28, 2020

Certificate

This is to certify that Ms. Rasika Pashilkar, who is pursuing her MCA from JSPM’s Rajarshi Shahu
College of Engineering, has successfully completed her project “Travel Desk Management Systems”
with us.

The project duration is from January 06, 2020 to June 22, 2020.

Rasika is a sincere and hardworking person and is committed to her work.

We wish her all the best in her future endeavours.

Regards,
For Harbinger Systems Pvt. Ltd.

Premlata Mangudkar
Associate General Manager – Talent Management
JAYAWANT SHIKSHAN PRASARAK MANDAL’s
RAJARSHI SHAHU COLEEGE OF ENGINEERING
(Approved by All India Council for Technical Education & Govt.of Maharashtra,)
Affiliated to Pune University I.D. No. - PU/ Engg. / 173 (2001)
Prof. T. J. Sawant Dr. R. K. Jain
D.E.E., B.E. (Elec.) MISTE M. E.(CIVIL Engg) Ph.D
Founder Secretary Principal

Date: 11/09/2020

Ref: RSCOE/MCA III / Project /2019-20/ 2746

CERTIFICATE
This is to certify that Ms./Mr. Rasika Pashilkar, is a bonafide student of
JSPM’s Rajarshi Shahu College of Engineering, Tathawade, Pune, has
successfully completed the project work as prescribed by the Savitribai
Phule Pune University, Pune, in the partial fulfillment of the Master of
Computer Applications (MCA) Program 2019-2020.

The project work, titled as “Travel Management System” Has been


carried out at the establishment of “Harbinger Systems”.

Exam No: 11835

Project Guide HOD Principal

External Examiner:

Internal Examiner:

Date:
Place: Pune

Sr. No. 80, Pune- Mumbai Bypass Highway, Tathawade, Pune- 411 033.
Phone : +91-020-229334344/4084/4347 Telefax : +91-020-22933424
E-mail : rscoe@vsnl.net Website : www.jspmrscoe.edu.in
Declaration

To
The Principal,
Rajarshi Shahu College of Engineering,
Tathawade,
Pune-33.

Respected Sir,

I, Ms. Rasika Pashilkar hereby declare that the project


entitled “Travel Management System” developed and
submitted under the guidance of Prof. Vaishali Suryawanshi,
is my original work.

The system presented here is my own work and has not been
duplicated from any other sources.

Thank You,

Yours Sincerely,

Rasika S. Pashilkar
Acknowledgement
I would like to express my gratitude and sincere regards to
the following people to whom I am grateful for their support
and help without which I would not have been able to do this
project entitled “Travel Management System”.

I would like to thank Dr. R. K. Jain, Principal, R.S.C.O.E. for


providing us with excellent facilities and valuable guidance.

I would like to express my profound and sincere gratitude to


Prof. Rinku Dulloo, H.O.D., who has given all his co-
operation and help to complete my project.

My special thanks to Prof. Vaishali Suryawanshi, Project


Guide, whose cooperation and keen interest coupled with
valuable suggestion helped me in the completion of the
project.

Last but not least, I am thankful to all Teaching and Non-


Teaching staff of the college, whose names has not been
mentioned here but have directly or indirectly, helped me in
the completion of this project.

Rasika S. Pashilkar
Index
Sr.No Title Page No
1 Chapter 1: Introduction 1
1.1 Company Profile 2
1.2 Existing System and Need Of System 4
1.3 Scope of work 7
1.4 Operating Environment – Hardware and
9
Software
2 Chapter 2 : Proposed System 10
2.1 Proposed System 11
2.2 Objective Of System 15
2.3 User Requirements 16
2.4 Feasibility Study 17
3 Chapter 4: Analysis And Design 20
3.1 Use Case Diagram 21
3.2 Class Diagram 28
3.3 Activity Diagram 30
3.4 Sequence Diagram 35
3.5 Component Diagram 41
3.6 Deployment Diagram 42
4 Chapter 4: Implementation 43
4.1 Input Screens 44
4.2 Module Specifications 75
4.3 Table Specifications 79
5 Chapter 5: Testing 85
5.1 Test Procedures and Implementation 86
5.2 Test cases 90
6 Chapter 6: User Manual 102
7 Chapter 7: Drawbacks and Limitations 106
8 Chapter 8: Proposed Enhancements 108
9 Chapter 9: Conclusion 110
10 Chapter 10: Bibliography 112
11 Chapter 11: Annexure 114
11.1 Technology Used 115
11.2 Sample Code 120
Travel Management System

1
CHAPTER
INTRODUCTION
The purpose of this chapter is to provide an introduction to the company
profile and also define basic terminology used in our system that is Travel
Management System. Chapter-1 presents an overview of existing system
and need of system, scope of work and different operating environment.


Company Profile

Project Introduction

Existing System and Need for System

Scope of Work

Operating Environment – Hardware and Software

Page - 1 -
Travel Management System

1.1 Company Profile

❖ Harbinger Group – Harbinger Systems :


Harbinger Systems is a global company providing software
technology services for independent software vendors and enterprises.
Since its inception in 1990, Harbinger has developed a strong customer
base of organizations worldwide that includes high-tech start-ups in
Silicon Valley, multi-national product companies, and in-house IT teams
of large organizations.

Harbinger Systems leverages the latest digital technologies to build


software solutions in HR Tech, Health Tech, and Learn Tech domains, and
helps solve complex business problems in these areas for organizations
across industries.

Harbinger Systems is a part of Harbinger Group. Harbinger Group is a


global provider of innovative software products and services to
companies in over 60 countries. Harbinger Group’s philosophy is to
create value for its clients through a culture of continuous learning,
respect for the individual and innovation.

We are a growing company with corporate headquarters and three


development centers in Pune, in India. We have our sales and business
development office in Redmond in the US. Harbinger is led by
entrepreneurs who guide their teams towards creating excellence and
absolute customer satisfaction; while achieving growth for everyone in the
organization.

The top management at Harbinger has wealth of experience in


product innovation, product development and cadre building. Learn
more about the leadership team at the helm of Harbinger Systems.

Harbinger Systems has been recognized by distinguished research


analysts, leading software industry organisations and global clients.
Numerous awards and customer accolades are testimonials to this.

Page - 2 -
Travel Management System

In 2009, Deloitte named Harbinger Systems among the fastest


growing technology companies in its ‘Technology Fast 500 Asia Pacific’ and
‘Technology Fast 50 India’ programs. Harbinger Systems was recognized
as a ‘Super Star’ in ‘Annual Mobile Star AwardsTM for the years 2016, 2013
and 2011. Harbinger Systems is ranked in ‘The Global Outsourcing 100®’
listing by International Association of Outsourcing Professionals for five
years in a row.

❖ Harbinger Group – Values :


➢ CUSTOMER CENTRICITY

We will strive to be a trusted partner to our customers instead


of being just another vendor.

➢ DEVELOPING PEOPLE

Our objective will be to develop Harbingers to become


strong, positive, and vibrant leaders of the future.

➢ MERITOCRACY

Harbinger will be a place where your


performance, commitment, and output determine how
far you will go.

➢ AGILITY

We will encourage people to think out-of-the-box and act


with speed and flexibility.

➢ PROFESSIONALISM

We will honor commitments, be accountable to all


our stakeholders, be respectful, and maintain high
standards of corporate governance.

➢ INCLUSIVITY

We will build an inclusive workplace that is diverse,


sensitive, and committed to providing equal opportunity to all.

Page - 3 -
Travel Management System

1.2 Existing System and Need


of system

❖ Existing System :
Many a times employees have to travel to client location
for some work, which may include travelling either domestically
or internationally.

Many of the clients of Harbinger are from outside of India.


When developing solutions for them, there occur many instances
where the company needs to interact with the client. Various
communications mediums are used for the same. Sometimes it
may require that some company representative needs to visit the
client personally for face-to-face meeting.

In harbinger, currently if anyone has to travel on-site, either


domestically or internationally, the following process is followed :

➢ Employee provides the details like employee id, name, mobile


number, address, city to travel, travel date, number of days,
passport and visa details(applicable for international travel),
insurance nominee details, client name, address of client, etc. in
an excel sheet and sends it along with the application to his/her
Delivery Manager for approval.

➢ The delivery manager verifies the details manually and then


either approves or rejects the request.

➢ If the request requires some changes in it, then the Delivery


Manager personally calls or sends email to the requestor and
then the employee has to resend the excel sheet with updated
data.

➢ Iftravel.
the request is rejected then the employee has to cancel his/her

Page - 4 -
Travel Management System

➢ Once the delivery manager approves the request, he/she


forwards the request to Admin head for his/her approval.

➢ Before approving the request, the Delivery manager decides


whom to charge the expense of the travel. Sometimes the
client takes all the expense of the travel, while sometimes
Harbinger spares the expense.

➢ The admin head checks the travel request details and approves
or rejects the request considering the expense, the designation of
the employee, etc.

➢ If the request is approved, then the admin head first calls


transportation booking vendor for flight/train/bus/taxi
reservations. If the booking is not available for the desired dates,
then the employee is asked to change the dates of his/her tour.

➢ Then the admin head contacts the accommodation vendor for


hotel bookings.

➢ If the trip type is international, then the details of passport and


visa of the traveler are verified and checked if they are valid. If
the employee is not having passport/visa, then he/she is
provided assistance for the same.

➢ The admin head confirms with the employee whether he/she is


having personal business cards. If not, then the admin head
contacts the printing vendor and sends the details of the
employee and orders visiting cards for him/her.

➢ Also, the admin head contacts the travel insurance agent and
asks the employee for the nominee details and share to be paid to
the nominee and accordingly takes the insurance for the
employee travelling.

➢ When the employee actually travels and if he/she wants to


return early than desired return date, then he/she contacts the
Delivery Manager and asks for approval. If approved, admin head
checks for related travel bookings.

Page - 5 -
Travel Management System

➢ During all this process, the employee (requestor) needs to take


update of his/her travel request from the concerned
authorities personally.

➢ After the entire tour is completed, the employee submits the hard
copy of all the bills like hotel bills, transport bills, stationery bills.

❖ Need for System :


➢ Employee needs to have the format of the excel sheet.

➢and easy
Filling a lot of details in excel sheet is not much convenient
as compared to an online form.

➢ Employee needs to send the travel request to his/her


delivery manager, and delivery manager has to forward it to
admin head if the request is approved.

➢regarding
Admin needs to call the respective vendors for enquiry
the availability of bookings on desired dates.

➢ The employee needs to contact the concerned authorities to


track the status of his/her travel request till he/she gets the
confirmation of either approval or rejection.

➢ Once the employee sends the travel request and if he/she


has to make changes in any of the details, then he/she has to
restart the process of approval.

➢manually
The validity of passport/visa expiry needs to be
checked.

➢ If the employee is not having his/her business cards, the


admin team has to manually inform the vendor to get it printed
before the date of travel.

Page - 6 -
Travel Management System

1.3 Scope of work

➢ This web application will use SSO for login, meaning that the
login credentials will be the same as the employee’s other
harbinger web applications credentials. All the basic employee
information will be fetched from an external API.

➢ After login, the employee will have option to raise a new


travel request.

➢ The travel request will take the basic employee details like
company name, employee name, employee id, gender, date of birth,
designation, etc. automatically from the database.

➢ The employee will need to provide few details like project name,
delivery head, destination city, departure date, return date, client
address, mode of travel, meal preference, accommodation details.

➢ If the employee is travelling abroad he/she will have to provide


passport details like passport number, place of issue, date of
issue, expiry date and Visa details like visa number, visa country,
visa category, visa type, visa valid from, visa expiry, type of entry,
additional visa details, etc.

➢need
Also, for international travel, travel insurance nominee details
to be provided by the employee.

➢ If the passport is expiring in less than 6 moths, then request


wont be taken ahead, as it is not allowed to travel in such
situation. An email will be sent to the employee informing
him/her to apply for renewal.

➢ The employee will be able to view the status of his/her request on


his dashboard. Also, option will be provided to view or edit the
travel request details.

Page - 7 -
Travel Management System

➢ Once the details are filled by employee and he/she submits the
form, all the details will be saved to the database and the request
status will be set to “pending” and an email will be sent to
Delivery Manager informing about the new request that is raised.

➢ The delivery manager’s and admin head’s dashboard will have


two tabs, one of his/her own travel requests and one of pending
approvals.

➢ Based on the details provided in the travel request, the Delivery


Manager will either approve or reject the request. If the request is
rejected, appropriate e-mail will be sent to the requestor along with
the reason of rejection provided by the DM. If the request is
approved, an email will be sent to admin head indicating that the
request is forwarded to the admin head. Requestor will be
informed about this too.

➢to Option will be given to the Delivery Manager and the admin head
send the request back for correction.

➢ The employee will be able to re-schedule the trip if required.

➢to After the entire tour is done, option will be given to the employee
upload all the bills associated with his/her tour.

➢anyAdmin head will be able to view all the bills of each travel that
employee has made.

Then after reading the details of the travel request and


considering the approximate expense and designation of the
employee, the admin head will either approve or reject the request.

If the request is approved and the employee is not having


business cards, then the details of the employee required for the
business card will be automatically sent to the card printing vendor.

Page - 8 -
Travel Management System

1.4 Operating Environment


– hardware and software

Development based on the customer requirements, technology

capability and the skills available, the following technologies are


implemented with the project.

❖ Software Requirements:

Operating System Server: Operating system like Windows
XP or later, Linux, Ubuntu, etc.

Database Server : MongoDB 4.2

Client : Mozilla Firefox, Google Chrome or any compatible
web browser

Tools : Postman

User Interface : React JS, Bootstrap, CSS

Code Behind : Node Js 12.14.1 with Node Package
Manager 6.13.4

❖ Hardware Specifications:

Processor: Intel Pentium or More

Ram:2 GB Ram

Hard Disk: PC with 20GB

Output Devices : LCD Monitor, Printer

Input Devices : Keyboard, Mouse
Page - 9 -
Travel Management System

2
CHAPTER

PROPOSED SYSTEM
This chapter gives you an idea about the project which I have undertaken.
It explains the user requirements of the system to be developed leading to
proposing a solution for the same from our side. User requirements we get
from our client so it’s totally based on client need.


Proposed System

Objectives of System

User Requirements

Page - 10 -
Travel Management System

2.1 Proposed system

The Travel Management System is divided into modules based on


the login of the user and the functions available after login will be based
on the type of the user.

Login :

➢ For Login purpose, the web application will use SSO(Single


Sign-On) feature, meaning that the employee can use the same login
credentials as he/she uses for logging in to other applications of the
same company.

➢ For e.g. Using the same credentials of one Google account, we


can login to youtube, google playstore, duo, google maps, and other
google applications. Based on the employee id returned from the
database, the employee login will be categorized as Normal Employee
login, Delivery Manager login, or Admin Head Login.


Employee :

➢ When the employee logs in, he/she will be able to see a


dashboard of his/her travel requests. The dashboard will be blank
if the employee hasn’t made any travel request in the past.

➢ Employee will have an option to raise a new travel request. In


the travel request he/she will have to fill the following details :


Travel Details : o Trip type o
Travel type o
Source city
o Destination city
o Departure date
o Return date
o Mode of travel o
Meal Preference
o Frequent Flyer Number
o Accommodation requirement,etc

Page - 11 -
Travel Management System

➢ Passport Detail :o Passport Number


(Applicable for o Place of issue
International o Date of issue
Travel) o Date of expiry
o Upload scanned copy

➢ Visa Details : o Visa number


(Applicable for o Visa country
International o Visa category
Travel) o Visa type
o Valid from
o Valid till
o Type of entry
o Additional visa

➢ Insurance : o Nominee name


Details o Relationship with employee
o Date of birth
o Share to be paid
o Address

➢ After filling these details and submitting the request, all the
details will be stored in the database and an acknowledgement
email will be sent to the employee. Also, email will be sent to
his/her Delivery Manager informing about the new request and
ask to approve or reject the request.

➢ The employee dashboard will now have the request details


that he/she has made along with its approval status.

➢ Options will be given to view or edit the details he/she has filled.

➢ Employee will be able to reschedule his/her trip.

➢ Also, after the trip he/she can upload all the bills associated
with his/her tour.

Page - 12 -
Travel Management System

❖ Delivery Manager :
➢ The delivery manager dashboard will have two tabs – one
to display his/her own travel requests, and another to display
the pending approvals that he/she has. In the pending
approvals tab, the details of the basic travel request details will
be displayed of each request that is received. Option will be
given to view the full travel request details that an employee
has filled.

➢ After reviewing the details, the Delivery Manager can


either approve or reject the request. Before approving, an option
will be given to select whom to charge the travel expense, as
sometimes the company spares the expense, while sometimes
client does it.

➢ If the request is to be rejected, then the DM can specify


the reason for rejection. If the request is approved then an
email is sent to the requestor informing him/her the request
status and another email to admin head informing him/her
about the request and ask for approval.

➢ The Delivery Manager can also send the travel request


back to the employee for corrections.

❖ Admin Head :
➢ After viewing the travel request details and the
approximate expense required for the travel, the admin head
will either approve or reject the travel request. If the request
is approved then an email is sent to the requestor informing
him/her the request status.

➢ After the request is approved by admin head, if the


employee is not having his/her own business cards, then
request email will be sent to the card printing vendor along
with the required details of the employee. Also, appropriate
emails will be sent to transport, accommodation and other
vendors for booking requests. The admin head will be able to
view the bills that an employee has submitted after his/her
trip is completed.
Page - 13 -
Travel Management System


Email Module

➢ This module is responsible for triggerring email API


on different events including request submission, approval
or rejection of request, International request generation, In
case employee does not have a business card, or If the
passport or visa of the employee is expiring soon


Dashboard

➢ It is a common module used by all the users of the


system which is basically for tracking status at each level
in the flow of a travel request. Employee has dashboard to
check status of his request. Delivery manager has
dashboard with two sections that is “My requests” where
he can view his/her requests. And “Pending request”
where he/she can either approve a request generated by
employees or reject or can return request for corrections
incase of any correction needed.

➢ Travel booking vendor will have dashboard to view


requests and accordingly prepare budget for expenses of
each request. Admin will have to check feasibility and
accordingly approve if everything is within budget.


File Upload Module :

➢ When user uploads a file,it is to be converted into base 64


string and sent to backend via api call. Backend then converts
base 64 into file and store on disk with db insertion and sends
file link which is hosted on server as response

Page - 14 -
Travel Management System

2.2 Objective of system


The main objective of the system is to develop a user-friendly
system that automates the manual process of travel request.


The employee should be able to create, edit, view and cancel all
the details of the travel request with information made by her as
well as status of travel requests such as approved, pending or
rejected.


Travel Request will consist of in depth flow of details such as
passport, insurance, accommodation, visa, visa requirements
and other details.


Information can be stored and retrieved as well as manipulated
as per requirement.


Employees that are Managers or Admin will be able to make
their own request as well as view their directs’ requests and then
approve, reject or send request back for correction, as per the
requirement with appropriate message.


Mails will be triggered to Mangers, Admin and Employees based
on flow of travel request that will notify Managers, Admin and
Employee about travel request.


After the trip is completed, the employee should be able to
upload the bills associated with trip. This will help to charge the
expenses to specific company or client.


Employees that are Admin will be able to view reports regarding
travel requests based on month, city, project etc.


In case if an employee needs to have a business card on his
travel, he can select appropriate option that triggers mail to
facilities with employee details for business card printing.

Page - 15 -
Travel Management System

2.3 User requirements

The client wants to have the following functionalities from the system

➢common
Any user should be able to log-in to the system using his/her
login credentials used for all other harbinger applications.

➢ The travel request form should be easy to understand and the


employee should not be required to fill the common personal
details, as they should be retrieved from the employee database.

➢passport
Employee should be able to upload the scanned copy of his/her
and visa.

➢ Send email to requestor and DM after a request is submitted.


➢DMSend email to requestor and admin head when the
approves/rejects the request.

➢request.
Send email to respective vendors if the admin head approves the

➢passport.
Send email to employee 6 months before the expiry of his/her

➢request.
Employee should be able to track the status of his/her travel

➢afterEmployee should be able upload bills associated with his/her trip


the trip is completed.

➢ The Delivery Manager and Admin head should be able to


approve, reject, and send the travel request back to the employee
for correction.

Page - 16 -
Travel Management System

2.4 Feasibility Study

❖ Technical Feasibility
As we know that technical feasibility centers on the existing computer
system (hardware, software, etc.) and to what extent it can support the
proposed addition. But in this case the situation is different. Here there is
no existing system at all. Everything needs to be purchased. So each and
every office should have the following for their infrastructure

➢ Client/Server architecture.
➢ A good communication media-based network.
➢ Various System and Application Software installed the system.
➢ MongoDB.
➢ Node.Js
➢ On Server there should be Windows 10 as operating system.
➢ On clients Windows XP or later, Linux etc. running on them.

Thus, after fulfilling the above requirement the technical


feasibility will hold for the Travel Management System.

Page - 17 -
Travel Management System

❖ Behavioral Feasibility
As we know that people are inherently resistant to change and
computers have been known to facilitate change but in spite of these
Travel Management System is behaviorally feasible with its employee
users. On the introduction of new system it was required to educate
and explain the office staff on new way of doing the travel request.
Employees had shown interest in using the software. Nobody voiced
resistance to this idea of computerize the process of travel request.

❖ Legal Feasibility:
The system follows all the rule and regulation of our country and
world norms. Each active site individually and simultaneously commit
every change, or no site can commit the change. Such a solution is
obviously not feasible for large numbers of sites because of realities
such as network outages.

❖ Economic Feasibility

A system can be developed technically within the organization and


that will be used inhouse still be a good investment for the organization. In
the economic feasibility, the development cost in creating the system is
evaluated against the ultimate benefit derived from the new systems.
Financial benefits must equal or exceed the costs.
The system is economically feasible. It does not require any addition
hardware or software. Since the infrastructure for this system is developed
using the existing resources and technologies available at Harbinger. There
is nominal expenditure and economic feasibility for certain.

Page - 18 -
Travel Management System

❖ Operational Feasibility

Proposed projects are beneficial only if they can be turned out into
information system. That will meet the organization’s operating
requirements. Operational feasibility aspects of the project are to be taken
as an important part of the project implementation. Some of the
important issues raised are to test the operational feasibility of a project
includes the following:

➢ Is there sufficient support for the employees from the


management?

➢ Will the system be used and work properly if it is being


developed and implemented?

➢ Will there be any resistance from the employee that will


undermine the possible application benefits?

➢ This system is targeted to be in accordance with the above-


mentioned issues. Beforehand, the employee issues and management
requirements have been taken into consideration. So there is no
question of resistance from the employees that can undermine the
possible application benefits.

➢ The well-planned design would ensure the optimal utilization of


the computer resources and would help in the improvement of
performance status.

Page - 19 -
Travel Management System

3
CHAPTER
ANALYSIS AND DESIGN
As we are using DOT NET framework for developing this application we are
designing our application by OOPS concept. So UML (Unified Modeling
Language) is the best way for represent this project. In this Chapter we will
explain this project by UML concepts and also database specifications.
Diagrams such as the Use Case Diagram, Class Diagram, and Module
Hierarchy Diagram etc. you will see in this chapter


Use Case Diagram

Class Diagram

Activity Diagram

Sequence Diagram

Component Diagram

Deployment Diagram

Page - 20 -
Travel Management System

3.1 Use Case Diagram

❖ Definitions and Symbols:


Use Case Diagram:

Use-case diagrams graphically depict system behavior (use cases).


These diagrams present a high level view of how the system is used
as viewed from an outsider’s (actor’s) perspective. A use-case diagram
may depict all or some of the use cases of a system.

➢ Actors:

Actor Name

➢ Use Case Name:

Use Case Name

➢ Association:
-------------------------->

Page - 21 -
Travel Management System

❖ System Use Case diagram.

It specifies the functionality of the complete system.

Page - 22 -
Travel Management System

❖ Extended Use Case diagram : Travel Request

It specifies travel request created by an employee.

Page - 23 -
Travel Management System

❖ Extended Use Case diagram : DM Approval

It specifies travel request created by an employee


being approved/rejected by immediate manager.

Page - 24 -
Travel Management System

❖ Extended Use Case diagram : Admin Approval

It specifies travel request approved by a manager


being approved/rejected.

Page - 25 -
Travel Management System

❖ Extended Use Case diagram : Email

It specifies email for travel request for various notifications.

Page - 26 -
Travel Management System

❖ Extended Use Case diagram : File Upload

It specifies file upload functionality for travel request.

Page - 27 -
Travel Management System

3.2 Class Diagram

❖ Definitions and Symbols of Class Diagram:


➢ Class:

A class is a set of objects that share a common structure and


common behavior (the same attributes, operations, relationships
and semantics). A class is an abstraction of real-world items.
When these items exist in the real world, they are instances of the
class and are referred to as objects [1] [2] [3].

➢ Graphical Depiction:

A class icon is drawn as a 3-part box, with the class name in the top
part, a list of attributes (with optional types and values) in the
middle part, and a list of operations (with optional argument lists
and return types) in the bottom part

➢ Dependency:

Page - 28 -
Travel Management System

❖ System Class Diagram

Page - 29 -
Travel Management System

3.3 Activity Diagram

Activity diagram depict the activities and responsibilities of elements


that make up a system. Activity modeling is a specialized type of behavioral
modeling concerned with modeling the activities and responsibilities of
elements

❖ Activity diagram for Travel Management System:

Page - 30 -
Travel Management System

❖ Activity Diagram for travel request

Page - 31 -
Travel Management System

❖ Activity Diagram for Admin Approval :

Page - 32 -
Travel Management System

❖ Activity Diagram for Email :

Page - 33 -
Travel Management System

❖ Activity Diagram for File :

Page - 34 -
Travel Management System

3.4 Sequence Diagram

❖ Definitions

A sequence diagram shows elements as they interact over time,


showing an interaction or interaction instance. Sequence diagrams are
organized along two axes: the horizontal axis shows the elements that
are involved in the interaction, and the vertical axis represents time
proceeding down the page. The elements on the horizontal axis may
appear in any order [1].

❖ System Sequence Diagram

In this diagram we are showing an overview of whole system that


how it is going to work. There is investor in the picture who plays role to
initiate this activity with the help of graphical employee interface.
Database is centralizing from where investors can gain their
information’s. Explanation is in figure as shown below.

Page - 35 -
Travel Management System

➢ Sequence diagram for Travel Management System :

Page - 36 -
Travel Management System

➢ Sequence diagram for Travel Request:

Page - 37 -
Travel Management System

➢ Sequence diagram for Approval :

Page - 38 -
Travel Management System

➢ Sequence diagram for Email

Page - 39 -
Travel Management System

➢ Sequence diagram for File

Page - 40 -
Travel Management System

3.5 Component Diagram

A component diagram describes the components which are the parts


of the system that exists when the system is executing

Page - 41 -
Travel Management System

3.6 Deployment Diagram

A deployment diagram captures how a system is configured,


installed, and executed. It often consists of component like software and
hardware communicates to execute the system

Page - 42 -
Travel Management System

4
CHAPTER
IMPLEMENTATION

Input Screens

Module Specifications

Table Specifications

Page - 43 -
Travel Management System

4.1input screen

Following are the employee interface screen shots of the system modules.

➢ Main Home Page


Following is the screen shot of main home page which is entitled as Travel
Management System. It is also referred to as Login Screen

Fig 1: Login Screen : Used to log in into the system

Page - 44 -
Travel Management System

Fig 1.1 : Login Screen : Enter Login Details for an Employee

Fig 2.1 : Employee Dashboard : It is landing page after login.It shows


travel requests created by empoyee along with the their status. Currently,
employee has no travel request.

Page - 45 -
Travel Management System

Fig 3.1 Employee Profile : It shows employee details

Fig 3.2 Employee Profile : Employee can edit his profile and update the
information

Page - 46 -
Travel Management System

Fig 4.1 : Travel Request - Employee Master Form : This is the initial form for
creation of new travel request. It consists of basic information of employee.

Fig 4.1.1 : Travel Request - Employee Master Form :


Employee fills the basic details form.

Page - 47 -
Travel Management System

Fig 4.2 : Travel Request - Travel Details Form : This form includes travel
details like type of travel, dates of travel, places of travel, other details like
meal preference, seat preference and accomodation details like hotel etc.

Page - 48 -
Travel Management System

Fig 4.2.1 : Travel Request - Travel Details Form : Fill the travel details
with releveant information for travel type : Round City

Page - 49 -
Travel Management System

Fig 4.2.1 : Travel Request - Travel Details Form : Fill the travel details
with releveant information for travel type : Multi City. In this, we can
number of cities we would visit in order to get to destination.

Page - 50 -
Travel Management System

Fig 4.3 : Travel Request - Passport Details Form : This form is used to
get passport details of Employee.

Fig 4.3.1 : Travel Request - Passport Details Form : Fill passport details
and upload passport front and back image.

Page - 51 -
Travel Management System

Fig 4.3.2 : Travel Request - Passport Details Form : File Upload (Utility
PopUp Window) : This is used to upload images of passport and visa.

Fig 4.3.2.1 : Travel Request - Passport Details Form : File Upload (Utility
PopUp Window) : Select Image Files to Upload and click on upload

Page - 52 -
Travel Management System

Fig 4.4 : Travel Request - Insurance Details Form : This form is used to
add nominees by employee to travel insurance. In case of any loss during
travel, this insurance will help to compensate for the loss.

Fig 4.4.1 : Travel Request - Insurance Details Form : Fill the details of
nominee for the insurance.

Page - 53 -
Travel Management System

Fig 4.5 : Travel Request – Visa Details Form : It is used to get


information related to visa. In case of valid visa, it takes visa information
and it uses file upload utility to upload visa image. In case of invalid visa,
it takes information needed to apply for a valid visa.

Fig 4.5.1 : Travel Request – Visa Details Form : Enter valid visa details
and upload visa image using file upload utility like passport image

Page - 54 -
Travel Management System

Fig 5.1 Basic Validation : Basic validations are used to show that field is
compulsary

Fig 5.1 Basic Validation : Basic validations are used to show that field
has invalid data in it.

Page - 55 -
Travel Management System

Fig 2.3 : Employee Dashboard : It shows creation of New Travel Request


was successful. It shows all travel requests with status

Fig 2.4 : Employee Dashboard : It shows all travel requests with status
created by the empoyee.

Page - 56 -
Travel Management System

Fig 4.6 : Travel Request – View Travel Request : A modal is used to view
complete travel request with all travel details. It provides an edit button,
which redirects to travel details form, which will help to edit the travel
request.

Page - 57 -
Travel Management System

Fig 4.7 : Travel Request – Edit Travel Requests : Update the travel
request.

Page - 58 -
Travel Management System

Fig 6 : Travel Bill - Upload Bill : After the completion of trip, employee
can submit bills to the company using Upload Bill Form.

Fig 6.1 : Travel Bill - Upload Bill : Mentiion appropriate bill category and
usind file upload utility, upload the bill images.

Page - 59 -
Travel Management System

Fig 7.1 : Mail Notification : Mail template for submission of other


supporting documents after successful creation of request sent to employee

Fig 7.2 : Mail Notification : Mail template for travel request generated by
an employee sent to manager

Page - 60 -
Travel Management System

Fig 7.3 : Mail Notification : In case of international travel, a mail is


triggered to talent management team, facilities team etc. for notifying an
international travel request is created:

Fig 1.2 : Login Screen : Enter Login Details of a Manager

Page - 61 -
Travel Management System

Fig 8.1: Manager Dashboard – My Request : It shows travel requests


made by manager

Fig 8.2: Manager Dashboard – Pending Request : It shows travel requests


made by Employee

Page - 62 -
Travel Management System

Fig 9.1: Manager Approval : Popup for manager approving travel request
made by Employee. Manager has to specify to whom the expenses that are
to be charged

Fig 9.1.1 : Manager Approval : Approval given by Manager

Page - 63 -
Travel Management System

Fig 9.2: Manager Rejection : Popup for manager rejection travel request
made by Employee.

Fig 9.2.1 : Manager Rejection: Approval given by Manager

Page - 64 -
Travel Management System

Fig 9.3: Request Correction: Popup for manager to send travel request
back for correction to employee

Fig 9.3.1 : Request Correction: Corrections suggested by Manager

Page - 65 -
Travel Management System

Fig 1.3 : Login Screen : Enter Login Details of a Admin

Fig 10: Manager Dashboard – Pending Request : Admin Dashboard with


Travel Request made by Employee

ss

Page - 66 -
Travel Management System

Fig 11 : MasterData Tables : Admin can view masterdata tables

Fig 11.1 : MasterData Tables : Admin can edit masterdata tables

Page - 67 -
Travel Management System

Fig 11.2 : MasterData Tables : Admin can edit masterdata tables

Fig 12 : Report Generation : Admin can generate reports based on


his requirement such as month-wise, city-wise, project-wise or travel
type

Page - 68 -
Travel Management System

Fig 12.1 : Report Generation - Month-Wise Report : Admin can view


month-wise report in tabular format

Fig 12.1.1 : Report Generation - Month-Wise Report : Admin can view


month-wise report in graphical format

Page - 69 -
Travel Management System

Fig 12.2 : Report Generation - City-Wise Report : Admin can view city-
wise report in tabular format

Fig 12.2.1 : Report Generation - City-Wise Report : Admin can view city-
wise report in graphical format

Page - 70 -
Travel Management System

Fig 12.3 : Report Generation - Project-Wise Report : Admin can view


project-wise report in tabular format

Fig 12.3.1 : Report Generation - Project-Wise Report : Admin can view


project-wise report in graphical format

Page - 71 -
Travel Management System

Fig 12.4 : Report Generation – Travel-Type Report : Admin can view


travel-type-wise report in tabular format

Fig 12.4.1 : Report Generation - Month-Wise Report : Admin can view


travel-type-wise report in graphical format

Page - 72 -
Travel Management System

Fig 7.3 : Mail Notification : Mail template for successful approval of travel
request by manager sent to employee

Fig 7.4 : Mail Notification : Mail template for rejection of travel request
by manager sent to employee with appropriate rejection reason

Page - 73 -
Travel Management System

Fig 7.4 : Mail Notification : Mail template for bussiness card containing
employee details sent to facilities team

Page - 74 -
Travel Management System

4.2 Module Specification

The Travel Management System is divided into modules based on


the login of the user and the functions available after login will be based
on the type of the user.

Login :

➢ For Login purpose, the web application will use SSO(Single


Sign-On) feature, meaning that the employee can use the same login
credentials as he/she uses for logging in to other applications of the
same company.

➢ For e.g. Using the same credentials of one Google account,


we can login to youtube, google playstore, duo, google maps, and
other google applications.

➢ Based on the employee id returned from the database, the


employee login will be categorized as Normal Employee login,
Delivery Manager login, or Admin Head Login.


New Travel Request :

➢ When the employee logs in, he/she will be able to see a


dashboard of his/her travel requests. The dashboard will be blank
if the employee hasn’t made any travel request in the past.

➢ Employee will have an option to raise a new travel request. In


the travel request he/she will have to fill the following details :


Travel Details : o Trip type o
Travel type o
Source city
o Destination city
o Departure date
o Return date
o Mode of travel o
Meal Preference
o Frequent Flyer Number
o Accommodation requirement,etc

Page - 75 -
Travel Management System

➢ Passport Detail :o Passport Number


(Applicable for o Place of issue
International o Date of issue
Travel) o Date of expiry
o Upload scanned copy

➢ Visa Details : o Visa number


(Applicable for o Visa country
International o Visa category
Travel) o Visa type
o Valid from
o Valid till
o Type of entry
o Additional visa

➢ Insurance : o Nominee name


Details o Relationship with employee
o Date of birth
o Share to be paid
o Address

➢ After filling these details and submitting the request, all the
details will be stored in the database and an acknowledgement
email will be sent to the employee. Also, email will be sent to
his/her Delivery Manager informing about the new request and
ask to approve or reject the request.

➢ The employee dashboard will now have the request details


that he/she has made along with its approval status.

➢ Options will be given to view or edit the details he/she has filled.

➢ Employee will be able to reschedule his/her trip.

➢ Also, after the trip he/she can upload all the bills associated
with his/her tour.

Page - 76 -
Travel Management System

❖ Delivery Manager Approval:


➢ The delivery manager dashboard will have two tabs – one
to display his/her own travel requests, and another to display
the pending approvals that he/she has.

➢ In the pending approvals tab, the details of the basic


travel request details will be displayed of each request that
is received. Option will be given to view the full travel
request details that an employee has filled.

➢ After reviewing the details, the Delivery Manager can


either approve or reject the request. Before approving, an option
will be given to select whom to charge the travel expense, as
sometimes the company spares the expense, while sometimes
client does it.

➢ If the request is to be rejected, then the DM can specify


the reason for rejection. If the request is approved then an
email is sent to the requestor informing him/her the request
status and another email to admin head informing him/her
about the request and ask for approval.

➢ The Delivery Manager can also send the travel request


back to the employee for corrections.

❖ Admin Head :
➢ After viewing the travel request details and the
approximate expense required for the travel, the admin
head will either approve or reject the travel request.

➢ If the request is approved then an email is sent to the


requestor informing him/her the request status.

➢ After the request is approved by admin head, if the


employee is not having his/her own business cards, then
request email will be sent to the card printing vendor along
with the required details of the employee. Also, appropriate
emails will be sent to transport, accommodation and other
vendors for booking requests.

➢ The admin head will be able to view the bills that an


employee has submitted after his/her trip is complete

Page - 77 -
Travel Management System


Email Module

➢ This module is responsible for triggerring email API


on different events including request submission, approval
or rejection of request, International request generation, In
case employee does not have a business card, or If the
passport or visa of the employee is expiring soon


Dashboard

➢ It is a common module used by all the users of the


system which is basically for tracking status at each level
in the flow of a travel request. Employee has dashboard to
check status of his request. Delivery manager has
dashboard with two sections that is “My requests” where
he can view his/her requests. And “Pending request”
where he/she can either approve a request generated by
employees or reject or can return request for corrections
incase of any correction needed.

➢ Travel booking vendor will have dashboard to view


requests and accordingly prepare budget for expenses of
each request. Admin will have to check feasibility and
accordingly approve if everything is within budget.


File Module :

➢ When user uploads a file,it is to be converted into base 64


string and sent to backend via api call. Backend then converts
base 64 into file and store on disk with db insertion and sends
file link which is hosted on server as response

Page - 78 -
Travel Management System

4.3 Table Specification

Login : Stores user login information

Sr. No. Field Name Data Type Constraint Reference


1 user_name String Not Null
2 user_id Number Primary Key
3 password String Not Null

AccessType : Detemines the type of user like employee, manager or admin

Sr. No. Field Name Data Type Constraint Reference


1 user_id Number Foreign Key Login
2 access_type String Not Null

Employee : Stores basic information about the employee

Sr. No. Field Name Data Type Constraint Reference


1 emp_id Number Primary Key
2 user_id Number Foreign Key Login
3 emp_name String Not Null
4 company_name String Foreign Key
5 designation_name String Foreign Key
6 location_name String Foreign Key
7 emp_project_name String Not Null
8 manager_name String Foreign Key
9 emp_date_of_birth String Not Null
10 emp_gender Number Not Null
11 emp_mobile_number String Not Null
12 emp_bussinesscard Date Not Null
13 work_experience String Not Null
14 company_experience String Not Null
15 project_experience String Not Null

Page - 79 -
Travel Management System

Company_MasterData : Stores names of group companies

Sr. No. Field Name Data Type Constraint Reference


1 company_id Number Primary Key
2 company_name String Not Null

Location_MasterData : Stores location of group companies

Sr. No. Field Name Data Type Constraint Reference


1 location_id Number Primary Key
2 location String Not Null

Designation_MasterData : Stores designations of employee

Sr. No. Field Name Data Type Constraint Reference


1 designation_id Number Primary Key
2 designation String Not Null

Travel_Request : Stores information related to travel request

Sr. No. Field Name Data Type Constraint Reference


1 travel_id Number Primary Key
2 user_id Number Foreign Key Login
3 travel_type String Not Null
4 mode_of_travel String Not Null
5 booking_through String Not Null
6 departure_date Date Not Null
7 return_date Date Not Null
8 from_place String Not Null
9 to_place String Not Null
10 client_address String Not Null
11 travel_date Date Not Null

Page - 80 -
Travel Management System

Other Details : Stores other details related to travel request

Sr. No. Field Name Data Type Constraint Reference


1 travel_id Number Foreign Key Travel_Request
2 meal_preference String Not Null
3 preferred_time String Not Null
4 seat_preference String -

Accomodation : Stores accommodation details of a travel request

Sr. No. Field Name Data Type Constraint Reference


1 travel_id Number Foreign Key Travel_Request
accommodation
2 String Not Null
_need
3 place_to_visit String -
4 hotel_preference String -
5 check_in_date Date -
6 check_out_date Date -
7 comments String Not Null

Passport : Stores passport details of a emploee


Sr. No. Field Name Data Type Constraint Reference
1 passport_id Number Primary Key
2 user_id Number Foreign Key Login
3 has_passport String Not Null
4 passport_number String Not Null
5 place_of_issue String Not Null
6 date_of_issue Date Not Null
7 date_of_expiry Date Not Null
8 passport_frntimg String Not Null
9 passport_backimg String Not Null

Page - 81 -
Travel Management System

Insurance : Stores nominee information provided by employee for


travel insurance

Sr. No. Field Name Data Type Constraint Reference


1 travel_id Number Foreign Key Travel_Request
2 nominee_name String Not Null
3 nominee_relation String Not Null
nominee_date_of_
4 Date Not Null
birth
5 nominee_address String Not Null
6 nominee_share Number Not Null

Visa : Stores visa details of a employee

Sr. No. Field Name Data Type Constraint Reference


1 travel_id Number Foreign Key Login
2 visa_number String Not Null
Country_
3 country_name String Foreign Key
MasterData
visacategory_ Foreign VisaCategory_
4 String
name Key MasterData
VisaType_
5 visatype_name String Foreign Key
MasterData
6 valid_from_date String Not Null
7 valid_till_date String Not Null
8 extend_till_date Date Not Null
9 type_of_entry Date Not Null
10 additional_visa String Not Null
11 visa_image String Not Null

Country__MasterData : Stores country names

Sr. No. Field Name Data Type Constraint Reference


1 country_id Number Primary Key
2 country_name String Not Null

Page - 82 -
Travel Management System

Visa_Category_MasterData : Stores visa categories

Sr. No. Field Name Data Type Constraint Reference


1 visa_category_id Number Primary Key
2 visa_category String Not Null

Visa_Type_MasterData : Stores visa types

Sr. No. Field Name Data Type Constraint Reference


1 visa_type_id Number Primary Key
2 visa_type String Not Null

Approval_Manger : Stores approval manager information for a employee

Sr. No. Field Name Data Type Constraint Reference


1 manger_id Number Primary Key
2 manager_name String Not Null

Request_Approval_Status : Stores status of a travel request

Sr. No. Field Name Data Type Constraint Reference


1 request_approval_id Number Primary Key
2 travel_id String Foreign Key Travel_Request
Approval_
3 manager_id String Not Null Manager
4 request_created_on Date Not Null
5 emp_name String Foreign Key Employee
6 request_updated_on Date Not Null
7 manager_name String Foreign Key Travel_Request
8 request_status String Not Null
9 status_update_msg String Not Null
10 expense_charged_to String Foreign Key Expenses

Page - 83 -
Travel Management System

Travel_Bill : Stores information about expenses made on a trip

Sr. No. Field Name Data Type Constraint Reference


1 travel_bill_id Number Primary Key
2 user_id Number Foreign Key Login
3 expense_charged_to String Foreign Key Expenses
4 expense_category String Not Null
5 bill_image String Not Null

Expenses : Stores and defines information related to expenses

Sr. No. Field Name Data Type Constraint Reference


1 exp_id Number Primary Key
2 expense_charged_to String Not Null
3 expense_category String Not Null
4 notes String -

Mailing_Records : Stores mail records

Sr. No. Field Name Data Type Constraint Reference


1 mailing_id Number Primary Key
2 travel_id Number Foreign Key Travel_Request
3 email_category String Foreign Key Email_MasterData
4 mail_subject String Not Null
5 mailed_to String Not Null
6 mailed_on String Not Null
7 mail_contents Number Primary Key
mail_delivery_
8 String Not Null
status

Email__MasterData : Stores information of teams that need mail


notification

Sr. No. Field Name Data Type Constraint Reference


1 email_id String Primary Key
2 email_name String Not Null
3 email_category String Not Null
4 email_address String Not Null

Page - 84 -
Travel Management System

5
CHAPTER
TESTING

❖ Test Procedures and Implementation


❖Test cases

Page - 85 -
Travel Management System

5.1 Test Procedures and


Implementation

Testing plays a critical role in quality assurance for software. Due


to the limitation of the verification method for the previous phases, design
and requirement fault also appear in the code. Testing is used to detect
these errors, in addition to the error introduced during coding phase.

Testing is a dynamic method for verification and validation, where the


system is to be tested is executed and behavior of the system is observed.
Due to this testing the failure of the system can be observed, from which
the presence of fault can be deduced. However, separate activities have
to be performed to identify the faults.

❖ Objectives of Testing

➢ Testing is the process of executing a program with the intent


of finding a bug.

➢ A good case is one that has a high probability of finding an as


yet undiscovered error.

➢ A successful test is the one that uncover yet an undiscovered error.

❖ Methods of Testing

➢ Functional Testing : In functional testing, the internal logic of the


system under testing is not considered and the test cases
are decided from the specification or the requirements. It is
often called “Black Box Testing”.

➢ Structural Testing : In structural testing, the test cases are


decided entirely on the internal logic of the program or module
being tested.

Page - 86 -
Travel Management System

As the goal of testing is to detect any errors in the programs different


flavor of testing are often used. Unit testing are used to test module or a
small collection of modules and the focus is on detecting coding errors in
modules. During integration testing modules are combined into sub-system,
which are then tested. The goal here is to test the system design. In system
testing and acceptance testing, the entire System is tested. The goal here is to
test the requirement themselves. Structural testing can be used for unit
testing while at higher level mostly functional testing is used.

UNIT TESTING

MODULE
TESTING

Component
Testing SUB-SYSTEM
TESING

SYSTEM TESTING
Integration Testing

ACCEPTANCE
TESTING
User
Testing

➢ Unit Testing

Unit testing focuses verification effort on the smallest unit of software


design, the module. The unit testing we have is white box oriented
and some modules the steps are conducted in parallel.

Page - 87 -
Travel Management System

➢ White Box Testing

This type of testing ensures that


All independent paths have been exercised at least once
All logical decisions have been exercised on their true and false sides
All loops are executed at their boundaries and within their
operational bounds
All internal data structures have been exercised to assure their validity.

➢ Black Box Testing

This testing method considers a module as a single unit and checks


the unit at interface and communication with other modules rather
getting into details as statement level. Output for a given set of input
combinations are forwarded other module.

➢ Integration Testing

Integration Testing is any type of software testing that seeks to verify the
interfaces between components against a software design. Software
components may be integrated in an interactive way or all together ("big
bang"). Normally the former is considered a better practice since it allows
interface issues to be localized more quickly and fixed.
Integration testing works to expose defects in the interfaces and interaction
between integrated components (modules). Progressively user groups of
tested software components corresponding to elements of the architectural
design are integrated and tested until the software works as a software.

➢ System Testing

SystemTesting tests a completely integrated system to verify that it


meets its requirements. The testing phase is an important part of
software development, It is the process of finding errors and missing
operations and also a complete verification to determine whether the
objectives are met and the user requirements are satisfied.

Page - 88 -
Travel Management System

➢ Acceptance Testing

Acceptance testing is performed with realistic data of the client to


demonstrate that the software is working satisfactorily. Testing here is
focused on external behaviour of the system; the internal logic of the
program is not emphasized.
It is the process of finding errors and missing operations and also a
complete verification to determine whether the objectives are met and
the user requirements are satisfied.
Acceptance testing is performed along with the client to show that to see
that all requirements are satisfied whatever may be the attributes its
working well provided all the attributes are valid. If not it displays
corresponding messages for getting valid attributes.

➢ Alpha Testing

Alpha testing is simulated or actual operational testing by potential


users/customers or an independent test team at the developers site.
Alpha testing is often employed for off-the- shelf software as a form of
internal acceptance testing, before the software goes to beta Testing.

➢ Beta Testing

Beta testing comes after alpha testing and can be considered a form of
external user acceptance testing. Versions of the software, known beta
versions, are released to a limited audience outside of the programming
team. The software is released to groups of people so that further testing
can ensure the products have few faults or bugs.
Sometimes, beta versions are made available to the open public to increase
the feedback filled to a maximal number of future users.

➢ Usability Testing

Usability testing is needed to check if the user interface is casy to use


and understand. It is connected mainly with the use of the application

➢ Security Testing

Security testing is essential for software that processes


confidential data to prevent system intrusion by hackers.

Page - 89 -
Travel Management System

5.2 Test cases

Test cases list the specific items that will be tested and describe the
detailed steps that will be followed to verify the software. There are two
fundamental approaches to testing software: test-to-pass and test-to-fail,
when you test-to-pass, you really ensure only that the software minimally
works. You don’t push its capabilities. You don’t see what you can do to
break it. You treat it with kid gloves, applying the simplest and most
straightforward test cases.
You may be thinking that if your goal is to find bugs, why would you
test-to-pass? Wouldn’t you want to find bugs by any means possible? The
answer is no, not initially.
Think about an analogy with a newly designed car. You are assigned
to test the very first prototype that has just rolled off the assembly line and
has never been driven. You probably wouldn’t get in, start it up, head for
the test track, and run it wide open at full speed as hard you could. You
would probably crash and die. Use test-to-pass to reveal bugs before you
test-to-fail.
In Travel Management System market there are many test cases that
are applied. Some of them shown below like GUI testing, Login, Database
etc.

❖ Implementing Test Cases


➢ Manual Testing

There are three main methods of manually implementing test cases. These
are building test cases into your classes, creating a test script and creating
a separate testing hierarchy. Building Test Cases into your Classes When
building test cases into your classes create test methods such as Test
Class; test Objects Foxx for verifying the workings of classes and its
instances. The test Class methods would test the associated class
methods, create instances of the class, put these objects into default or
specified states, and test the objects with related test cases. One can
inherit and reuse test cases from the super class for subclass testing.

Page - 90 -
Travel Management System

➢ Creating a Test Script

This method involves creating an entirely separate test application. This


application should: create a set of objects, send them messages, and
compare the actual results to the expected results. This approach is simple
but it makes inheriting test cases difficult.

➢ Creating a separate Test Hierarchy

The benefits of creating a separate test Hierarchy is that it separates out


the testing code from real code. Reuse of test cases can easily be achieved
through inheritance, however this means that the two sets of code, the test
code and real code, must be maintained together.

➢ Conclusions

Application software system has been developed to case out the problems
faced in the present system. The system described in this book have
designed, Tested and documented to same greater extent. This package is
expected to prove to be very useful to the “Online Shopping”.
The goals that are expected to achieve by the software are:
• Simplification of the operation.
• Less processing time and increasing the productivity.
Each transaction is updated and processed immediately.
• Avoiding errors by minimizing human interaction through user
friendly screens to enter data and Enquirers the information from
the tables on like message.
• Portable and flexible for further enhancement.
After developing the system, it has been tested with sample data and the
results are found to be in satisfaction. The system is user friendly are and
easy to use prescribed by the standards have been followed in designing the
input screens lending to consistency. Across forms and reduced user strains.

Page - 91 -
Travel Management System

TEST CASE SCENARIO STEPS TO EXPECTED ACTUAL PASS


ID TO TEST PERFORM RESULT RESULT /FAIL
TC LOGIN 1 Log-in into 1.Open the log Application Log in into Pass
application in page of the should Application
as application. except valid is successful
Employee user name and
/Manager/ 2.Enter the valid valid password
Admin user name. entered by user
Head and should
3.Enter valid redirect user to
password. respected
dashboard.
4.Click on
Log in button.

TC LOGIN Log in into 1.Open the log Application Log in Pass


1.1 application in page of the should not denied with
application. accept invalid appropriate
user name. message
2.Enter the valid
user name. Application
should throw
3.Enter valid message
password. “Invalid
4.Click on Credentials”.
Log in button.

TC LOGIN Log in into 1.Open the log Application Log in Pass


1.2 application in page of the should not denied with
application. accept invalid appropriate
user name. message
2.Enter the valid
user name. Application
should throw
3.Enter valid message
password. “Invalid
Credentials”.
4.Click on
Log in button.

Page - 92 -
Travel Management System

TEST SCENARIO STEPS TO EXPECTED ACTUAL PASS


CASE ID TO TEST PERFORM RESULT RESULT /FAIL
TC New If user is 1.Click on 1.Validation errors 1.Validation Pass
Travel new to the New Travel should be errors
system request on the displayed with displayed with
Request dashboard. respected fields of respected
2 Employee Master. fields of
2.Employee Employee
Master tab will 2.Form should not Master.
open . be redirected to
next tabs. 2.Form not
3.Click on next. redirected to
next tabs.

TC New If user is 1.Click on Redirect user to Redirected Pass


Travel new to the New Travel Travel details user to Travel
system request on the details
Request dashboard.
2.1
2.Employee
Master tab will
open.

3. Fill all the


required details.

TC New If user is 1.Click on New 1.Validation errors 1.Validation Pass


Travel new to the Travel request should be errors
system on the displayed with displayed with
Request dashboard. respected fields of respected fields
2.2 Travel Details. of
2.Employee Travel Details.
Master tab will be 2.Form should not
opened and be redirected to 2.Form not
fill all the next tabs. redirected to
required details next tabs.
now click next.

3.Travel Details
tab will open
,now click on
next.

Page - 93 -
Travel Management System

TC New If user is 1.Click on New Form will get Form Pass


Travel new to the Travel request on submitted. Submitted
system and the dashboard.
Request if user
2.3 select 2.Employee Master tab
Domestic will be
from Travel opened and
details fill all the
required
details now click next.

3.Travel
Details tab will open

4.Select Domestic from


Drop down Travel
Type.

Fill all the required


details.

TC New If user is 1.Click on New Form will be Form Pass


Travel new to the Travel request on redirected to redirected to
system and the dashboard. Passport Passport
Request if user Details Details
2.4 select 2.Employee Master tab
International will be
from Travel opened and
details fill all the
required details,now
click next.

3.Travel
Details tab will open.

4. Select
International from
Drop down Travel
Type. Fill all the
required details and
click next.

Page - 94 -
Travel Management System

TC New If user is 1.Click on New 1.Validation 1.Validation Pass


Travel new to the Travel request on errors should errors
system and the dashboard. be displayed displayed
Request if user with with
2.5 select 2.Employee Master respected fields respected
International tab will open and of Passport fields of
from Travel fill all the required Details. Passport
details details and click next. Details.
3.Travel Details tab 2.Form should
will open not be 2.Form not
redirected to redirected to
4.Select International next tabs i.e next tabs i.e
from Drop down for Insurance Insurance
Travel Type. Fill all Details. Details.
the required details
And click next.

5.Passport Detail tabs


will be displayed.
Click on next

TC New If user is 1.Click on New Form will be Form Pass


Travel new to the Travel request on redirected to redirected to
system and the dashboard. Visa Details Visa Details
Request if user
2.6 select 2.Employee Master
International tab will open and
from Travel fill all the required
details details and click next.
3.Travel Details tab
will open

4.Select International
from Drop down for
Travel Type. Fill all
the required details
And click next.

5.Passport Detail tabs


will be displayed.
Click on next

Page - 95 -
Travel Management System

TC New If user is 1.Click on New Travel 1.Validation 1.Validatio Pass


Travel new to the request on the dashboard. errors n errors
system and should be displayed
Request if user 2.Employee Master tab will displayed with
2.7 select open and fill all the required with respected
International details and click next. respected fields of
from Travel fields of Visa
details.
3.Travel Details tab will open Visa Details.
Details.
4.Select International from
Drop down for Travel 2.Form
Type. Fill all the required should not 2.Form not
details. and click next. be submitted.
submitted.
5. Passport Detail tabs will be
displayed. Fill all required
details and Click on next.

6.Visa Details tabs will open


Click on next

TC New If user is 1.Click on New Travel Form will Form Pass


Travel new to the request on the dashboard. get submitted.
system and submitted.
Request if user 2.Employee Master tab will
2.8 select open and fill all the required
International details and click next.
from Travel
details.
3.Travel Details tab will open

4.Select International from


Drop down for Travel
Type. Fill all the required
details. and click next.

5. Passport Detail tabs will be


displayed. Fill all required
details and Click on next.

6.Visa Details tabs will open


and Click on next

Page - 96 -
Travel Management System

TC New If user is 1.Click on New Travel Form will Form Pass


Travel Existing request on the dashboard. be directed redirected
user to Travel to Travel
Request 2.Employee Master tab will Details Details
2.9 open . With filled in
information of Employee
which can be edited by user.

3.Click on next.

TC New If user is 1.Click on New Travel 1.Validation 1.Validatio Pass


Travel Existing request on the dashboard. errors n errors
User should be displayed
Request 2.Employee Master tab will displayed with
2.10 open with with respected
filled in information of respected fields of
Employee which can be fields of Travel
edited by user. Travel Details.
Details.
Click on next. 2.Form not
2.Form redirected
3.Travel Details tabs will should not to next
displayed. be tabs.
redirected
Click on next.
to next
tabs.

TC New If user is 1.Click on New Travel Form will Form Pass


Travel Existing request on the dashboard. get Submitted
User and if submitted.
Request user 2.Employee Master tab will
2.11 select open with filled in
Domestic information of Employee
from Travel which can be edited by
details user. Click on next.

3.Travel Details tab will open

4.Select Domestic from Drop


down Travel Type.

Fill all the required deails.

Page - 97 -
Travel Management System

TC New If user is 1.Click on New Travel Form will be Form Pass


Travel Existing request on the dashboard. redirected redirected
User and if to to
Request user select 2.Employee Master tab will Passport Passport
2.12 International open . With Details Details
from Travel filled in information of
details Employee which can be edited
by user. Click on next.

3.Travel Details tab will open.

4.Select International from


Drop down for Travel Type.
Fill all the required details and
click next.

TC New If user is 1.Click on New Travel 1.Validation 1.Validation Pass


Travel Existing request on the dashboard. errors errors
User and if should be displayed
Request user select 2.Employee Master tab will displayed with
2.13 International open with filled in with respected
from Travel information of Employee respected fields of
details which can be edited by user. fields of Passport
Click on next. Passport Details.
Details.
3.Travel Details tab will open. 2.Form not
2.Form redirected
4. Select International from should not to next tabs
Drop down for Travel be i.e
Type. Fill all the required redirected Insurance
details. And click next. to next tabs Details.
i.e
5.Passport Detail tabs will be
Insurance
displayed.
Details.
Click on next.

Page - 98 -
Travel Management System

TC New If user is 1.Click on New Travel Form will be Form Pass


Travel Existing request on the dashboard. redirected redirected
User and if to Visa to Visa
Request user select 2.Employee Master tab will Details Details
2.14 Internationa open with filled in
l from information of Employee
Travel
which can be edited by user.
details
Click on next.

3.Travel Details tab will open.

4. Select International from


Drop down for Travel
Type. Fill all the required
details. And click next.

5.Passport Detail tabs will be


displayed.
Click on next.

TC New If user is 1.Click on New Travel 1.Validation 1.Validation Pass


Travel Existing request on the dashboard. errors errors
User and if should be displayed
Request user select 2.Employee Master tab will displayed with
2.15 Internationa open with filled in with respected
l from information of Employee respected fields of
Travel which can be edited by user. fields of Visa
details Click on next. Visa Details.
Details.
3.Travel Details tab will open. 2.Form not
2.Form submitted.
4. Select International from should not
Drop down for Travel be
Type. Fill all the required submitted.
details. And click next.

5.Passport Detail tabs will be


displayed.
Click on next.

6. Visa Details tabs will open


.Click on next

Page - 99 -
Travel Management System

TC New If user is 1.Click on New Travel Form will Form Pass


Travel Existing request on the dashboard. get submitted.
User and if submitted.
Request user select 2.Employee Master tab will
2.16 Internationa open with filled in
l from information of Employee
Travel which can be edited by user.
details Click on next.

3.Travel Details tab will open.

4. Select International from


Drop down for Travel
Type. Fill all the required
details. And click next.

5.Passport Detail tabs will be


displayed.
Click on next.

6. Visa Details tabs will open


.Click on next

Page - 100 -
Travel Management System

TEST SCENARIO STEPS TO PERFORM EXPECTED ACTUAL PASS


CASE ID TO TEST RESULT RESULT /FAIL
TC Log-in 1.Open the log in page of the Approval Approval Pass
Approving into appli- application. user user
Request cation as will updated
Manager/ 2. Enter the valid user name. be on
Admin updated respect
Head 3.Enter valid password. on -ed
respect Manager
4.Click on Log in button.
-ed Dash
Manager -board.
5.Dashboard will appear with
Dash
pending request on the top of
-board.
table.

6.Select pending record which you


want to approve using radio button
and click on Approve Button from
the right bottom of the screen.

7.Approval Request pop


up will appear. Fill required
details and click Approve.
TC Log-in 1.Open the log in page of the Rejected Rejected Pass
Rejecting into appli- application. user will user will
Request cation as be be
Manager/ 2.Enter the valid user name. updated updated
Admin on on
Head 3.Enter valid password. respect respect
-ed -ed
4.Click on Log in button.
Manager Manager
5.Dashboard will appear with Dash Dash
pending request on the top of -board. -board.
table.

6.Select pending record which you


want to reject using radio button
and click on Reject Button from the
right bottom of the screen.

7.Reject Request pop up will


appear. Fill required details and
click Reject.

Page - 101 -
Travel Management System

6
CHAPTER
USER MANUAL
For any system to be successful it is important that the intended user find
the system easy to operate. The purpose of the user manual is to make
user acquainted with the system and help employee understand the
system and operate it conveniently. The manual contain several
screenshots that describes how to use the entire system.

❖ Application Description

Page - 102 -
Travel Management System

User Manual
For any system to be successful it is important that the intended
user find the system easy to operate. The purpose of the user manual is
to make user acquainted with the system and help user understand the
system and operate it conveniently. The User Manual is prepared
reflexively because it is an item that must accompany every system.
The manual contain several screenshots that describes how to
use the entire system. This Manual helps user to navigate efficiently
through the system and help user to solve issues wherever they occur.

❖ Information about the system.


The system contains following users: o
Employee
o Manager
o Admin


The system has following features: o
Employee Registration
o Creation of new travel request
o Approval/Rejection of travel requests
o Uploading of various documents like passport, visa, etc
o Editing of Master data tables
o Bill and Report generation

❖ Working of the system.

➢ Log in into the system using LDAP credentials. You are redirected
to dashboard after successful credential verification of Username
and Password.

Page - 103 -
Travel Management System

This tab denotes the dashboard, which contains all


the travel requests made by the user.

➢ In case of Manager and Admin Head, dashboard contains following


two tabs:

This tab in the dashboard, contains all the travel


requests made by the manager/admin head.

This tab in the dashboard, indicates all the


travel requests made by the user that are
pending for approval from manager/admin head.

This tab in navigation bar is used to create


new travel request.

➢ New Travel Request contains following tabs:

Fill user details such as name, employee ID,


company, designation, gender, approval
manager, mobile number, project, etc.

Fill here all the travel details such as location,


departure date, return date, trip type, meal
preference, booking details, accommodation etc.

Fill all the passport related information here.

Fill nominees here for insurance.

Fill all the visa related information here.

➢ The Admin Head contains one more tab in the login:

This tab is used to edit the data used for dropdowns


as well as options like budget etc.

Page - 104 -
Travel Management System

Utility : This “UPLOAD” button is used to upload


documents such as passport, visa, bills etc.
It generates a popup
window as shown:
Select the files to
upload by using
“BROWSE” button and
click on “UPLOAD” to
upload.
Here, it is example of
passport upload.
❖ Symbols

Symbol Meaning
Denotes approval status: Request is pending.
Denotes approval status: Request is approved.
Used to view form or other details.
Used to edit form or other details.
Used to delete.
Used to upload bills.


Buttons

Go to previous tab or Submit request, bill


Go to next tab or page
page.. etc.

Return travel request


Approve travel request. Reject travel request. for correction.

Page - 105 -
Travel Management System

7
CHAPTER
DRAWBACKS
AND
LIMITATIONS
This part of documentation will explain drawbacks and limitation that
are in Travel Management System Market Application.

Page - 106 -
Travel Management System

Drawbacks And Limitations

❖ Drawbacks
➢ System requires a high speed broadband internet connection.
➢ Employee neither download nor print his/her travel request
application.

➢ If the master data values are changed, it won’t be reflected on


previously stored data.

➢ There should be at least one record in each of the master data


table.

❖ Limitations

➢ The size of the database increases day-by-day, increasing the load


on the database back up and data maintenance activity.User cannot
change password in this system.

➢ User need to change it through Success factor.


➢ The employee must be part of Harbinger payroll. The contract based
employees can’t access it.
Page - 107 -
Travel Management System

8
CHAPTER
PROPOSED
ENHANCEMENTS
The future enhancements of the Travel Management System are proposed
in this chapter. It gives us the insight about the area and field where these
enhancements can be made.

Page - 108 -
Travel Management System

Proposed Enhancements

In this travel management system we are going to introduce online


booking of travel. So the effort taken for the manual process will be
automated. Our Aim is to design and create a Travel Management System for
a Harbinger company. This enables employee to create a travel request that
can be approved by immediate manager and then admin head.

➢ This software has a very user friendly interface. Thus the


employees will feel very easy to work on it. By using this system
admin can manage their travel requests, booking, payment, other
issues like visa, passport, accommodation etc.

➢ Option will be given to user to apply for new visa, in case if he/she
does not have a visa of the destination country.

➢ Agents can be added to the system so that they can provide


various travelling and accommodation options. This will help the
team to make the best decision for all the pre-requites needed for
travelling.

➢ We can even add budget planning to the application.

➢ We can also implement SMS service for real-time updates.

Page - 109 -
Travel Management System

9
CHAPTER
CONCLUSIONS
This part concludes Travel Management System in brief explanation and
also specifies operation performed in the application.

Page - 110 -
Travel Management System

Conclusions

The main purpose of Travel Management System is to facilitate


easy processing of a travelling request made by an employee.

➢ The system provides a great flexibility for the Admin team


and the employees.

➢ It helps in maintaining efficient communication


between employees and the managers regarding the travel
requests.

➢ The system helps to reduce greater amount of manual work.

Page - 111 -
Travel Management System

10
CHAPTER
BIBLIOGRAPHY

The Bibliography chapter contains all the reference books, websites or other
reference material details used in order to make this report worthwhile.

Page - 112 -
Travel Management System

Bibliography

➢ Udemy Courses
o The Complete Node.js Developer Course (3rd Edition)
Created by Andrew Mead, Rob Percival

o Learn and Understand NodeJS


Created by Anthony Alicea

o Node.js: The Complete Guide to Build RESTful APIs (2018)


Created by Mosh Hamedani

➢ Documentation and Books


o Node.js v12.16.1 Documentation by Node Organization

o Pro React 16 by Adam Freeman

o Learning React A Hands-On Guide to Building Web Applications


Using React and Redux (2nd Edition) by Kirupa Chinnathambi

o Practical Node.js: Building Real-World Scalable Web Apps


By Azat Mardan

o Mastering Node.js - Second Edition by Sandro Pasquali and


Kevin Faaborg

➢ Web reference:
o http://node.org /learn

o http://udemy.com

Page - 113 -
Travel Management System

11
CHAPTER
ANNEXURE
This section of report specifies Input and Output Forms as report and
also some sample code which is describes in this section.

❖ Technology used
❖ Sample Code

Page - 114 -
Travel Management System

11.1 Technology Used

❖ Front End : React JS


Declarative
React makes it painless to create interactive UIs. Design simple views for
each state in your application, and React will efficiently update and
render just the right components when your data changes. Declarative
views make your code more predictable and easier to debug.

➢ Component-Based

Build encapsulated components that manage their own state,


then compose them to make complex UIs.
Since component logic is written in JavaScript instead of templates, you
can easily pass rich data through your app and keep state out of the DOM.

➢ Learn Once, Write Anywhere

We don’t make assumptions about the rest of your technology stack, so


you can develop new features in React without rewriting existing code.
React can also render on the server using Node and power mobile apps
using React Native.

➢ A Simple Component

React components implement a render() method that takes input data


and returns what to display. This example uses an XML-like syntax
called JSX. Input data that is passed into the component can be
accessed by render() via this.props.
JSX is optional and not required to use React. Try the Babel REPL to
see the raw JavaScript code produced by the JSX compilation step.

Page - 115 -
Travel Management System

➢ A Stateful Component

In addition to taking input data (accessed via this.props), a component


can maintain internal state data (accessed via this.state). When a
component’s state data changes, the rendered markup will be updated
by re-invoking render().

➢ An Application

Using props and state, we can put together a small Todo application.
This example uses state to track the current list of items as well as
the text that the user has entered. Although event handlers appear to
be rendered inline, they will be collected and implemented using
event delegation.

➢ A Component Using External Plugins

React allows you to interface with other libraries and frameworks.


This example uses remarkable, an external Markdown library, to
convert the <textarea>’s value in real time.

❖ Middleware : Node JS :
➢ As an asynchronous event-driven JavaScript runtime, Node.js is
designed to build scalable network applications.

➢ This is in contrast to today's more common concurrency model, in


which OS threads are employed. Thread-based networking is
relatively inefficient and very difficult to use. Furthermore, users of
Node.js are free from worries of dead-locking the process, since there
are no locks. Almost no function in Node.js directly performs I/O, so
the process never blocks. Because nothing blocks, scalable systems
are very reasonable to develop in Node.js.

➢ Node.js is similar in design to, and influenced by, systems like


Ruby's Event Machine and Python's Twisted.

Page - 116 -
Travel Management System


Node.js takes the event model a bit further. It presents an event loop
as a runtime construct instead of as a library. In other systems,
there is always a blocking call to start the event-loop.

Typically, behavior is defined through callbacks at the beginning of a
script, and at the end a server is started through a blocking call like
EventMachine::run().


In Node.js, there is no such start-the-event-loop call. Node.js
simply enters the event loop after executing the input script.
Node.js exits the event loop when there are no more callbacks to
perform. This behavior is like browser JavaScript — the event loop
is hidden from the user.

HTTP is a first-class citizen in Node.js, designed with streaming
and low latency in mind. This makes Node.js well suited for the
foundation of a web library or framework.


Node.js being designed without threads doesn't mean you can't take
advantage of multiple cores in your environment. Child processes
can be spawned by using our child_process.fork() API, and are
designed to be easy to communicate with. Built upon that same
interface is the cluster module, which allows you to share sockets
between processes to enable load balancing over your cores.

❖ Backend : MongoDB :

MongoDB is a document database with the scalability and flexibility
that you want with the querying and indexing that you need.

MongoDB is a cross-platform document-oriented database
program. Classified as a NoSQL database program, MongoDB
uses JSON-like documents with schema. MongoDB is
developed by MongoDB Inc. and licensed under the Server
Side Public License (SSPL).

Page - 117 -
Travel Management System

➢ Ad hoc queries

MongoDB supports field, range query, and regular expression searches.[9]


Queries can return specific fields of documents and also include user-
defined JavaScript functions.
Queries can also be configured to return a random sample of results of
a given size.

➢ Indexing
Fields in a MongoDB document can be indexed with primary
and secondary indices.

➢ Replication

MongoDB provides high availability with replica sets. A replica set consists
of two or more copies of the data. Each replica set member may act in the
role of primary or secondary replica at any time. All writes and reads are
done on the primary replica by default. Secondary replicas maintain a
copy of the data of the primary using built-in replication. When a primary
replica fails, the replica set automatically conducts an election process to
determine which secondary should become the primary. Secondaries can
optionally serve read operations, but that data is only eventually
consistent by default.

➢ Load balancing

MongoDB scales horizontally using sharding. The user chooses a shard


key, which determines how the data in a collection will be distributed. The
data is split into ranges (based on the shard key) and distributed across
multiple shards. (A shard is a master with one or more replicas.).
Alternatively, the shard key can be hashed to map to a shard – enabling
an even data distribution.
MongoDB can run over multiple servers, balancing the load or duplicating
data to keep the system up and running in case of hardware failure.

➢ Capped collections

MongoDB supports fixed-size collections called capped collections.


This type of collection maintains insertion order and, once the
specified size has been reached, behaves like a circular queue.

Page - 118 -
Travel Management System

➢ File storage

MongoDB can be used as a file system, called GridFS, with load balancing
and data replication features over multiple machines for storing files.
This function, called grid file system, is included with MongoDB drivers.
MongoDB exposes functions for file manipulation and content to
developers. GridFS can be accessed using mongofiles utility or plugins
for Nginx and lighttpd. GridFS divides a file into parts, or chunks, and
stores each of those chunks as a separate document.

➢ Aggregation

MongoDB provides three ways to perform aggregation: the


aggregation pipeline, the mapreduce function, and single-purpose
aggregation methods.
Map-reduce can be used for batch processing of data and aggregation
operations. But according to MongoDB's documentation, the Aggregation
Pipeline provides better performance for most aggregation operations.
The aggregation framework enables users to obtain the kind of results
for which the SQL GROUP BY clause is used. Aggregation operators can
be strung together to form a pipeline – analogous to Unix pipes. The
aggregation framework includes the $lookup operator which can join
documents from multiple collections, as well as statistical operators such
as standard deviation.

➢ Server-side JavaScript execution

JavaScript can be used in queries, aggregation functions (such as


MapReduce), and sent directly to the database to be executed.

➢ Transactions

Support for multi-document ACID transactions was added to MongoDB


with the General Availability of the 4.0 release in June 2018.

Page - 119 -
Travel Management System

11.2 Sample Code

import {companymodel,locationmodel, designationmodel} from


'../../../mongo-models/masterdataschema';
import{managermodel, visamodel, relativemodel} from '../../../mongo-
models/masterdataschema';
import csc from 'country-state-city';
import cities from 'all-the-cities';

/**
* Mastertest : Master Data Controller-Retrieves data from
various collections of database of master tables.
* @param {object} data http req
* @returns {object} data http res,json
*/

export const mastertest=


async(req,res)=> {
try
{
//get data from body. User Id as
payload const data= req.body;

//get data from different collections


//shows only 5 objects from each collection because of limit
const companyInfo= await companymodel.find();
const locationInfo=await locationmodel.find();
const designationInfo= await designationmodel.find().skip(5* (1-
1)); const managerInfo=await managermodel.find().skip(7* (1-1));
const visaInfo=await visamodel.find();
const relativeInfo=await relativemodel.find();

//get all countries


const country = csc.getAllCountries();

Page - 120 -
Travel Management System

//variable for iteration


let i;

//get only country name


for(i=0;i<country.length ;i++)
country[i]=country[i].name;

//get only country name


for(i=0;i<cities.length ;i++)
cities[i]=cities[i].name;

//display data in form of json objects from different collections


return res.status(200).json({companyInfo , locationInfo,
designationInfo ,
managerInfo , visaInfo, relativeInfo, country, cities
});

}catch(error){

//display error, if any


res.status(500).json({error});
}
}

Page - 121 -

You might also like