changed references to User.Id to User.UserId. added relativePath option to createRequestUrl(..). added documentation to returnButtonClick and createRequestUrl methods. changed initDatePicker to have separate assign handler method to make code simpler. changed all URL references to relative urls, no longer JSONP/crossdomain compatible. tidied code. added query parameter to home/users page. added search getJson method. changed all property names to match the WebApi endpoint. added js to conditionally highlight the datepicker row on hover. changed script and css references to proper CDN urls. tidied html. added form for querying user list. UserController will conditionally choose to GetUsersList or Search, based on Query Parameter. Add search method to IRepository Implement Search method on IRepository interface added search procedure to SQLiteProcedures added Query property to UserList to allow UI to display the last filter/query parameter.
92 lines
3.6 KiB
C#
92 lines
3.6 KiB
C#
namespace Interfaces
|
|
{
|
|
public interface IRepository
|
|
{
|
|
/// <summary>
|
|
/// Get a list of Users
|
|
/// </summary>
|
|
/// <returns>
|
|
/// Returns <see cref="UserList"/> with full list of users,
|
|
/// plus a total user count. Pagination options are supported.
|
|
/// </returns>
|
|
UserList GetUsers();
|
|
/// <summary>
|
|
/// Search the user list for the following string
|
|
/// </summary>
|
|
/// <param name="searchParam">string to search the user store for.</param>
|
|
/// <returns>
|
|
/// Returns <see cref="UserList"/> with full list of users,
|
|
/// plus a total user count. Pagination options are supported.
|
|
/// </returns>
|
|
UserList Search(string searchParam);
|
|
/// <summary>
|
|
/// Get details about a single user in the system base on their Id
|
|
/// </summary>
|
|
/// <param name="id">
|
|
/// integer data type, the Id of the User to get details about.</param>
|
|
/// <returns>
|
|
/// <see cref="User"/> object with full details,
|
|
/// including full <see cref="Identifier"/>
|
|
/// </returns>
|
|
User GetUser(int id);
|
|
/// <summary>
|
|
/// Get a list of the timelogs available for the specified user
|
|
/// for the current Calendar Week
|
|
/// </summary>
|
|
/// <param name="userId">
|
|
/// integer data type, the Id of the user to get time logs for
|
|
/// </param>
|
|
/// <returns>
|
|
/// <see cref="TimeLogList"/> with nested <see cref="TimeLog"/> objects
|
|
/// for the current calendar week
|
|
/// </returns>
|
|
TimeLogList GetTimeLogs(int userId);
|
|
/// <summary>
|
|
/// Get a list of the timelogs available for the specified user
|
|
/// for the specified calendar week
|
|
/// </summary>
|
|
/// <param name="userId">
|
|
/// integer data type, the Id of the user to get time logs for
|
|
/// </param>
|
|
/// <param name="calendarWeek">
|
|
/// integer data type, the calendar week to retrieve logs for.
|
|
/// </param>
|
|
/// <returns>
|
|
/// <see cref="TimeLogList"/> with nested <see cref="TimeLog"/> objects
|
|
/// for the current calendar week
|
|
/// </returns>
|
|
TimeLogList GetTimeLogs(int userId, int calendarWeek);
|
|
/// <summary>
|
|
/// Get a full list of Identifiers which are not associated to a user.
|
|
/// </summary>
|
|
/// <returns>
|
|
/// <see cref="IdentifierList"/> with nested <see cref="Identifier"/> list
|
|
/// </returns>
|
|
IdentifierList GetUnassignedIdentifierList();
|
|
/// <summary>
|
|
/// Update a user in the system with the new values.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// If the user object passed does not exist, it will be created.
|
|
/// </remarks>
|
|
/// <param name="user">
|
|
/// <see cref="User"/> object detailing the new properties to assign to the user.
|
|
/// The Id Field should not be changed, or should be -1 for new users.
|
|
/// </param>
|
|
/// <returns>
|
|
/// <see cref="OperationResponse"/> to indicate procedure status.
|
|
/// </returns>
|
|
OperationResponse UpdateUser(User user);
|
|
/// <summary>
|
|
/// Create a new TimeLog Event in the repository.
|
|
/// </summary>
|
|
/// <param name="identifier">
|
|
/// <see cref="Identifier"/> object with the Unique Id triggering the event
|
|
/// </param>
|
|
/// <returns>
|
|
/// <see cref="OperationResponse"/> to indicate procedure status.
|
|
/// </returns>
|
|
OperationResponse LogEventTime(Identifier identifier);
|
|
}
|
|
}
|