CS2103T Team Project: Typee

Overview

Typee is an engagement management application built on JavaFX framework, where users can manage engagements and schedule accordingly. Our main users are targeted in corporation’s receptionists and secretaries whose main tasks is to manage and arrange engagements.

ppp 1
Figure 1. default window of Typee upon start-up

Main UI is composed of 4 parts;

  • Tab/Menu Pane: List of Name/Feature/Menu is displayed here.

  • Menu Window: Each feature/menu window is displayed and can be interacted.

  • Command Output Display: Command output after execution displays here.

  • Command Input text field: User enters command

  • Typee divides engagements into 3 types; Appointments, Meetings and Interviews.

  • Typee application interacts with the users by separating application features into different menu windows. Each menu name is displayed in a green tab at the top of the display.

  • Typee is a CLI (Command Line Interface) based application, with a mixture of minimal graphical interacting features.

Summary of contributions

  • Role: Software Engineer [UI Design, Implementation]

  • Major enhancement:

    1. added the ability to switch windows to other menu windows

      • What it does: allows the user to switch the main window to load different menu windows so that users can utilise different features any time.

      • Justification: In terms of user interface, by placing different feature interactions and forms in separate windows makes the application look more organised.

      • Highlights: New class Tab was implemented in the model and existing class CommandResult had to check if the command if the command type is tab command. This was a necessary implementation as the MainWindow, which is the root UI component of the main UI had to load external fxml file to the empty component during the command process. Structure of the MainWindow had to be modified appropriately so that each separate fxml files are linked with different JAVAFX controller classes other than MainWindow controller class.

      • Credits: SEDU team, where much of the architecture of the Main Window UI structure was referenced in order to customise our UI architecture to allow performing tab switching command.

    2. added the ability to generate reports into a document form (pdf) based on the selected engagement.

      • What it does: allows users to generate a report into pdf format document, where user can simply select the engagement that the user wants to generate into document and attach it to email to the corresponding receiver.

      • Justification: Secretaries and receptionists are not responsible only in task management. They have other tasks that consume many of their time during office work. In order to improve their task performance time efficiently, the feature allows users to save time instead of manually typing the document while referring to the engagement information one by one. With a simple 1 line command, Typee generates a document, so that users can skip the document preparation process and instantly attach the document to the emails that they are sending to. Document template is fully customisable, hence it makes the application flexible so that any corporations can use our application to fit their company document conventions formats.

      • Credits:

        • Commons-IO : file extension validation method is used for scanning document files in external directory for pdf generation feature.

        • iTextPdf : An API that allows writing document contents in a pdf format.

  • Minor enhancement: Customised the existing AB3 Dark Theme with additional styling for other components; TreeListView, Functional button skins (Delete button, Refresh button, Next/Previous month button) (Pull requests #223, #65)

  • Code contributed: [Functional Code]

  • Other contributions:

    • Documentation: updated the Ui.png with other relevant screenshot images for updating User Guide and Developer’s Guide.

    • Enhancements to existing features:

      • Wrote additional tests for existing features to increase coverage by roughly 9% (Pull requests #201, #200, #226)

    • Tools:

      • Integrated a third party library (iTextPdf, common-IO) to the project

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

Switch to different windows: tab

Switches to a different menu in the application window.
Format: tab b/MENU_NAME

  • Typee has four major features/menus. They comprise of:

    • Engagements List

    • Typing Game

    • Calendar View

    • Report Generator

Users can switch between respective windows in order to make full use of the application.

Engagement window is set to default window upon starting the application.

If user wants to switch to different windows, simply enter the tab command. Tab names can be seen on the top of the application display in green boxes.

For example, user enters tab b/calendar , which the system will switch to calendar view window with a result display message set to "Switched to window: Calendar". Refer to the screenshot below.

Users who prefer using mouse over typing can alternatively click the green tabs on the top to switch to different menu windows.
tab 2

Generating a PDF file of engagement : pdf

Usage

Pdf Command allows user to create a document of selected engagement in a given format of document template. Document template can be customised based on the customers’s requirements, however, default document format will be in an email format, where the user can set who the user is going to send this document to inform an engagement.

Format: pdf i/LIST_INDEX f/FROM t/RECEIVER

For example, if the user wants to create a document of an engagement, which has a list index of 1, which can by observed in engagement window. User sets the sender as John, which is the user’s name, and sets receiver as Harry. Hence, user enters pdf i/1 f/John t/Harry to generate the document.

User can generate multiple report documents with the same engagement, but with different SENDER and RECEIVER names.
System will not allow generating documents that already exists in the directory.

Once user enters the command, system will automatically open the generated document and display the command result in the output panel, showing "Engagement Report successfully generated."

User can alternatively click the green refresh button on top right of the documents explorer to refresh the documents directory.
pdf function btns
Figure 2. refresh button and delete button.
pdf 2
Figure 3. After clicking refresh button
Do not manually modify the document file name in the reports/ directory as it might cause system failure in recognising the documents.
pdf sample
Figure 4. pdf document sample

User can also double click the list item in the documents explorer tree view to open the document file on their local computer file system. Below is the sample of generated document from the system.

Deleting Documents
Instead of directing the actual directory in the local system, user can simply click the red x button, next to the refresh button to delete the selected document list item. Once system displays the popup message to confirm the user’s decision, user will click the OK button to confirm deletion.

Delete function will only available when user has pre-selected the document list item and the selected item must be a .pdf form, not directory. Below is the screenshot after user clicks the delete button.

pdf delete before after
Figure 5. pdf delete pop up message and after click

Now, once system successfully deleted the selected document, system will display the status message above the documents explorer. Below is the screenshot of the system status message after deletion.

PDF generation and deletion operations cannot be undone via undo command.

Error Handling

  1. Documents Explorer in Report Window only displays files with .pdf format in reports/ directory. Files with different format will not be displayed in the explorer.

    pdf error 2
    Figure 6. duplicate file exception message displayed in status text field.
  2. System will not allow user to delete directories in the documents explorer tree view.

  3. System will throw an exception message in the status field if user locks the document.

    pdf error 1
    Figure 7. file deletion exception message displayed in the status text field.

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Tab Switch Feature

Tab switch feature is a type of Command that allows users to switch to respective windows for using different features in the system.
Tab switch function is implemented in using both CLI and GUI approach; user can execute tab-switch by typing command in the input text-area or by interaction with the UI component (Button).

Implementation Structure


tabcmd and tabFetch activity
Figure 8. TabCommand Class Diagram and fetchTabInfo Activity Diagram

  1. User is required to use a Command; TabCommand in order to switch the window to another window.

    • Upon first startup of the system, system will display the EngagementList window by default.

  2. New Ui Model class Tab is implemented to contain the respective fxml controller classes in a OOP manner.

MainWindow will have an additional method fetchTabInformation(tabName). After the parser executes the TabCommand, it will return a CommandResult with Tab property.
System will then check whether the input name matches with one of the tab names in the system. If there is a match, system will fetch the tab information and return the Tab object. If no match is found, system will return with an empty tab with only name attached.

Engagement Report Generation

This feature allows user to generate a pre-selected engagement in to a report and save it as a document file. The document file will be created in a .pdf format.

Implementation Structure

PdfCommandClassDiagram
Figure 9. PdfCommand Implementation Class Diagram

The feature will be implemented as an additional type of Command; PdfCommand

  • Proposed syntax of the PdfCommand is as follow: pdf i/ENGAGEMENT_LIST_INDEX t/RECEIVER f/SENDER.

Util class PdfUtil will be implemented for handling all pdf document creation related methods. It will be implemented under util package and it will be able to deliver few essential features that are necessary for document creation.

  • Able to generate a full report document based on the Engagement as input.

  • Use different templates for each other types of Engagement such as Appointment, Interview and Meeting. Document template will follow general email format: Receiver, Engagement Information written in a table, Sender and signature with address and company logo.

    To fulfill the document format, Report class needs to be implemented in order to model all necessary properties that has to be in the document. It 3 following properties;

    • engagement: specific engagement information to include in the document

    • to: A Person who is receiving the document

    • from: A Person who is either a receptionist or a secretary who is sending the document.

Below is the sequence diagram for document generation which displays the concept of how this feature will be implemented by multiple interaction between different architecture components.

GenerateReportSequenceDiagram
Figure 10. Sequence diagram for document generation.

UI Design

ReportWindow will be the UI container which helps the user to interact using PdfCommand. The window will include dynamic tree-view that is directly linked to the external directory in the file-system; reports/

UI Components & Features

Table below explains the components that are included in the ReportWindow with its purpose and features.

Table 1. Report Window UI Components
UI Component Feature Purpose

Refresh Button

Button

Refreshes the tree-view file directory.

To help user refresh the directory when there is a system glitch or when document (.pdf) is manually added in the reports/ directory.

Delete Button

Button

Deletes the selected document item in the tree-view file directory.

To assist users who prefer using mouse instead of typing command in keyboard can delete documents easily.

File_Explorer

Scrollable Tree View

1. Displays the list of document generated previously and stored under the directory reports/.

2. Each list item is clickable with a mouse click action of opening the document.

To allow user to manage documents more time efficiently.

Use case: (UC15) Generate appointment document in PDF format

MSS

  1. User enters information for generating PDF of an engagement for a selected engagement.

  2. System generates a PDF file in a specific external directory

  3. System shows successful message

  4. System opens the generated document.

    Use case ends.

Extensions

  • 2a. System receives invalid input.

    • 2a1. System shows error message.

      Use case resumes at step 1.

  • 2b. User inputs duplicate information that already exists in the directory.

    • 2b1. System shows error message.

      Use case resumes at step 1.