Skip to content

Commit

Permalink
Sprint 3 (sjrumsby#163)
Browse files Browse the repository at this point in the history
* New snowplow calls (sjrumsby#160)

* Final changes for new Snowplow events, states, flows and contexts
* Updated DB for additional Snowplow events

* Put more info in the Service Now ticket header (sjrumsby#161)

* Make Updates to an Existing Exam Record

CSRs require the ability to update existing exams records in the exam inventory table. This comes in the form of two actions listed as dropdown items in the exam inventory table now. The first action (Edit Exam) shows the user basic information that is displayed in the table, and allows the user to edit said data, then submit the data to the database. The second action (Return Exam) allows the user to enter or edit information with respect to the exam being returned (an ind field and tracking information). Both actions upon submit display a relevent success or failure message depending on the return method response.

* Created edit-booking component and related changes

Created a component edit-booking-modal to handle both exam and other type events.  Supports all editable fields for a booking.  Dynamically updates the calendar in background and then posts changes on submit or reverts on cancel.  Also revamped layout to eliminate the need for the windowResize listener to calculate the viewport size.  All layout-related divs now styled with "position: relative" or "position: fixed" so browser can manage this task automatically.  This was necessary for changes introduced to SchedulingIndicator - component now appears at bottom of screen with footer.

* Fix Bootstrap Data for Consistency

During the last demo, it was found out that the bootstrap data for exam types had a typo in it. For consistency purposes during live demos, this data was amended to follow an XML file containing actual exam type values provided to Olivewood from John McColl.

* Added API call for getting all offices

This is requried by LIAISON CSRs who enter group exams on behalf of all offices. No tests have been developed at this point, and the authorization on the call has been left out.

* npm Package Update

* Link Single Exam to Booking Feature

Room Bookings users require easy access to editing information with respect to a single exam. With this being said, once an exam is booked, the booking itself might need to be changed. The exam inventory table presents an easy way for users to filter through all exams, and the actions field presents a way for the user to link directly to a particular exams booking quickly. Based on logic if a booking for an exam is present, a dropdown in the actions tab will show up called "Update Booking", and once clicked, the user is taken directly to the DAY view of the booking calendar where this exam is currently booked.

Future enhancements to this may include the user being brought directly to the edit booking modal to avoid confusion.

* Fix Issues With Logins

When logging in, if the username does not exist in the Q System database, the call to /csrs/me will 500, leading to a poor front end experience. To clean this up, changes were made such that if the username did not exist /csrs/me returned a 404 response. The frontend had an bootstrap alert added such that if the username name did not exist BUT the user was logged in, the user would be warned saying to contact an administrator. The final step was to provisioni csr usernames in the Database for Sean, Scott, Adam, Chris and Karim for future use.

* Add Offsite Location Field

During development of the capture group exam component of the exams feature, it was found out that the exams model/schema required an offsite location field to accomodate offices in the greater vancouver area. This field was added to both the exams model and schema, and tested in postman to make sure that the exams GET endpoint worked.

* Code Clean-up: Redundant Vue Action

During end of sprint code clean-up, it was found out that the examsOnLogin action in the index.js file was actually not used, and therefore redundant. This was cleaned up, and the bookings features tested on the front end to ensure that no negative side effects were created post action removal.

* Edit/Return Exam Modal Styling

During testing across multiple browsers of the edit and return exam modals, with their success/failure messages, it was found that there were some styling issues with respect to modal size. Issues being modal/messages modal size and whether or not there were scroll bars present depending on the size of screen. These issues were addresses in this PR.

* Update Exams - Move from Div to B-Modal

During the development of the update/return/bookings actions on the exams invetory table, early development used nested divs to create modals for actions instead of using bootstrap modals. As final clean-up of this sprint task, the actions had to move towards using b-modal, as well as using b-alert to tell the user whether or not the PUT methods taken on exam objects were successful or erroneous.

* Sprint 4 - Swagger/Postman Updates

During the development of the bookings app in sprint 4, a field was added to the exams model/schema, and a GET method was added to list all offices in theq. These changes needed to be reflected in the bookings postman tests, as well as in the swagger yaml file. The postman tests were written and tested before submission of this PR, and were verified to be working as expected.

* Issue with Liason Role Creating Exams

During development of the bookings feature, it was found out that liasons could not POST exams from one office to a different office (ie// office_id 1 -> office_id 3). Since Liaisons require the ability to create exams in all offices, a change needed to be made to the exam POST end-point, checking for the csr role code to be LIAISON. Test data was also added to the manage.py file such that the role code LIASON exists now. A normal POST of an individual ITA exam was done in order to the test that previous functionality was not changed.

* Add Group Exam Modal/ITA Group Exam Capture

Created a new set of steps and questions in the state corresponding to the data requirements for the capture of Group ITA Exams to drive the add exam modal.  Created new question components and modified the modal to support the capture ofgroup exams as needed.

* Updated migrations to work with upstream migrations

* Updated Login.vue to correcly log errors for refreshing tokens

* Fixed various issues with add-group-exam workflow+filtering on exam table

Improved the add exam workflow including addition of flatpickr.js for time selection, an 'add another exam' button at the end, and sepperated the access to the form to another button visible only to the LIAISON role.  Added filters to the exam inventory table for Group vs. Individual, Expired vs Current, and Booked vs Unbooked, as well as modified the location column to handle the longer location data associated with group exam bookings.  also fixed an issue causing the agenda and bookings views to render incorrectly when there are no bookings to display

* Fixed issue where socket was no longer connecting

Socket connection was not being initialized due to the socket component being placed behind logic that precluded it from doing so in error.  Fixed
  • Loading branch information
sjrumsby authored and gil0109 committed Jan 25, 2019
1 parent d923cf7 commit d52edc4
Show file tree
Hide file tree
Showing 8 changed files with 303 additions and 112 deletions.
2 changes: 1 addition & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ limitations under the License.*/
<template>
<div id="App">
<Header />
<Socket v-show="1===2" />
<div v-if="user.username && isLoggedIn" :style="style">
<Alert />
<ExamAlert />
<SuccessExamAlert />
<FailureExamAlert />
<Nav v-if="isLoggedIn" />
<Socket v-show="1===2" />
<Feedback />
<Response />
</div>
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/exams/add-exam-form-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const SelectOffice = Vue.component('select-question', {
@input="filter"
class="mb-1"
placeholder="Start typing to search"/>
<div style="background-color: whitesmoke; border: 1px solid lightgrey">
<div style="border: 1px solid lightgrey">
<b-table :items="items"
:fields="fields"
:filter="search"
Expand All @@ -131,12 +131,10 @@ export const SelectOffice = Vue.component('select-question', {
:per-page="3"
class="pb-0"
:id="q.key"
thead-tr-class="thead-tr-class"
:bordered="false"
:outlined="false"
:striped="false"
head-variant="light"
hover
:fixed="true"
id="table2"
id="office_select_table"
@row-clicked="rowClicked">
<template slot="office_name" slot-scope="data">
<div>
Expand Down Expand Up @@ -288,6 +286,8 @@ export const TimeQuestion = Vue.component('date-question', {
enableTime: true,
noCalendar: true,
static: true,
dateFormat: 'h:i K',
time_24hr: false,
minTime: '8:00',
maxTime: '17:00',
minuteIncrement: 15,
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/exams/add-exam-form-modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
align-content="center">
<b-col>
<p class="message-text">Something Went Wrong</p>
<p><b-button>Try Again</b-button></p>
<p><b-button @click="()=>{updateCaptureTab({step:4})}">Try Again</b-button></p>
</b-col>
</b-row>
</b-container>
Expand Down Expand Up @@ -241,9 +241,10 @@
submit() {
this.unSubmitted = false
this.submitMsg = ''
if (this.user.role.role_code === 'LIAISON') {
if (this.addITAExamModal.setup === 'group') {
this.clickAddExamSubmit('group_ita')
} else {
}
if (this.addITAExamModal.setup === 'individual') {
this.clickAddExamSubmit('ind_ita')
}
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/exams/buttons-exams.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template v-if="showExams">
<div>
<b-form inline>
<b-button class="mr-1" @click="clickAddIndividual">Add Individual Exam</b-button>
<b-button class="mx-2" v-if="liaison" @click="clickAddGroup">Add Group Exam</b-button>
<b-button class="mr-1 btn-primary" @click="clickAddIndividual">Add Individual Exam</b-button>
<b-button class="mx-2 btn-primary" v-if="liaison" @click="clickAddGroup">Add Group Exam</b-button>
</b-form>
<AddExamFormModal />
</div>
Expand Down
Loading

0 comments on commit d52edc4

Please sign in to comment.