Application Documentation - 123callumb/case-studies-basic-implementation GitHub Wiki

Application

Contents

AuthenticationController type

Namespace

Application.Controllers

AuthenticateExternalUser(request) method

Summary

Authenticates external vendor users into the system. Will redirect them to their homepage

Returns

Returns a json result to tell the javascript if their login was successful

Parameters
Name Type Description
request Application.Requests.Authentication.UserLogonRequest Request asks for their email address and password

AuthenticateInternalUser(request) method

Summary

Authenticates abc users into the system. Will redirect them to their homepage

Returns

Returns a json result to tell the javascript if their login was successful

Parameters
Name Type Description
request Application.Requests.Authentication.UserLogonRequest Request asks for their email address and password

Login() method

Summary

Used for loading the login screen

Returns

Returns a login screen for external and internal users.

Parameters

This method has no parameters.

BaseController type

Namespace

Application.Controllers

GetSessionUser() method

Summary

Used as a shared mthod across all controllers to quickly access the current user session.

Returns

Returns the active user session, will reutrn null if there is no user session

Parameters

This method has no parameters.

HomeController type

Namespace

Application.Controllers

Index() method

Summary

The homescreen for the internal users. It is loaded straight after logging in and displays a grid of possible further menus.

Returns

Returns a View

Parameters

This method has no parameters.

VendorMenu() method

Summary

The internal vendor management menu, it is accessed from the homescreen. This menu splits into 3 vendor related menus: Vendor Catalogue, Vendor List and Vendor Quotes.

Returns

Returns a View

Parameters

This method has no parameters.

InternalResponseController type

Namespace

Application.Controllers

QuoteResponderModal(request) method

Summary

Loads the Quote Responder modal when 'Open Quote' button is pressed on a quote. The modal contains all previous responses for the loaded quote and an ability to approve/reject the quote if it is awaiting a response.

Returns

Returns a JsonResult

Parameters
Name Type Description
request Application.Requests.Vendor.BaseQuoteRequest

Respond(request) method

Summary

Is called when an internal user on the Vendor Quotes page responds to quote from within a Quote Responder Modal. The quote is updated when the user either approves or rejects it.

Returns

Returns a JsonResult

Parameters
Name Type Description
request Application.Requests.Vendor.BaseQuoteRequest

VendorQuotes() method

Summary

Loads the internal Vendor Quotes page. A list of all vendor quotes and their statuses are displayed here.

Returns

Returns a View

Parameters

This method has no parameters.

QuoteResponseController type

Namespace

Application.Controllers

Create(newResponse) method

Summary

For creating a new quote response for a given quote. Used by external vendor users

Returns

Quote response object asks for a price and a text response.

Parameters
Name Type Description
newResponse Services.EntityFramework.DbEntities.QuoteResponse Wull respond with a json object for the javascript to determine if the request has been completed

QuoteResponseModal(request) method

Summary

Loads up the html for the modal that allows for external vendor users to respond to a specific quote

Returns

Returns a html string for the javascript to render in a modal

Parameters
Name Type Description
request Application.Requests.Vendor.BaseQuoteRequest Requests a quote id fot the associated quote

VendorCatalogueController type

Namespace

Application.Controllers

Index() method

Summary

Loads the view for the vendor catalogue. The vendor catalogue loads all vendor items and displays them in a list. Users can request quotes for vendor items from this page.

Returns

Returns a View

Parameters

This method has no parameters.

RequestVendorQuote(request) method

Summary

Called when a user requests a quote for an item in the Vendor Catalogue. The quote is created and can be seen on the 'Vendor Quotes' page.

Returns

Returns a JsonResult with success data

Parameters
Name Type Description
request Application.Requests.QuoteRequest.VendorQuoteRequest

VendorCatalogueSearch(searchTerm) method

Summary

Searches the vendor items using the search term. Called when an item is searched for in the Vendor Catalogue.

Returns

Returns the Vendor Catalogue View with a filtered list of items

Parameters
Name Type Description
searchTerm System.String

VendorHomeController type

Namespace

Application.Controllers

Index() method

Summary

This is for the home screen of external users, it will load up a list of their current quotes that are active for the vendor that they work for.

Returns

Returns a View

Parameters

This method has no parameters.