Skip to content

Commit

Permalink
Merge pull request #50 from Promact/taskMailReportGeneration
Browse files Browse the repository at this point in the history
Task mail report generation
  • Loading branch information
chintans committed Sep 26, 2016
2 parents 169fd3b + 0578f62 commit 25e149e
Show file tree
Hide file tree
Showing 44 changed files with 2,459 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public interface IProjectUserCallRepository
/// <returns>management details</returns>
Task<List<User>> GetManagementUserName(string accessToken);

//Task<ProjectAc> GetProjectDetailsByUserName(string userName, string accessToken);
//Task<User> GetUserById(string EmployeeId);
//Task<User> GetUserByEmployeeId(string employeeId);

Task<List<UserRoleAc>> GetUserRole(string userName, string accessToken);

/// <summary>
/// Method to call an api from project oAuth server and get Project details of the given group - JJ
Expand All @@ -34,6 +39,15 @@ public interface IProjectUserCallRepository
/// <returns>object of ProjectAc</returns>
Task<ProjectAc> GetProjectDetails(string groupName, string accessToken);

//Task<ProjectAc> GetProjectDetailsByUserName(string userName, string accessToken);

//Task<User> GetUserById(string EmployeeId);
//Task<User> GetUserByEmployeeId(string employeeId);
//Task<List<UserRoleAc>> GetUserRole(string userName, string accessToken);

Task<List<UserRoleAc>> GetListOfEmployee(string userName, string accessToken);


/// <summary>
/// This method is used to fetch list of users/employees of the given group name. - JJ
/// </summary>
Expand All @@ -43,6 +57,14 @@ public interface IProjectUserCallRepository
Task<List<User>> GetUsersByGroupName(string groupName, string accessToken);



//Task<User> GetUserById(string EmployeeId);
//Task<User> GetUserByEmployeeId(string employeeId);


//Task<User> GetUserById(string EmployeeId);



/// <summary>
/// Method to call an api of oAuth server and get Casual leave allowed to user by user slackName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,26 @@ public async Task<bool> UserIsAdmin(string userName, string accessToken)
}
return result;
}

public async Task<List<UserRoleAc>> GetUserRole(string userName, string accessToken)
{
var requestUrl = string.Format("{0}{1}", StringConstant.ProjectInformationUrl, userName);
var response = await _httpClientRepository.GetAsync(StringConstant.ProjectUrl, requestUrl, accessToken);
var Json = JsonConvert.DeserializeObject<List<UserRoleAc>>(response);
return Json;
}

public async Task<List<UserRoleAc>> GetListOfEmployee(string userName, string accessToken)
{
var requestUrl = string.Format("{0}{1}", StringConstant.ProjectUasrInformationUrl, userName);
var response = await _httpClientRepository.GetAsync(StringConstant.ProjectUrl, requestUrl, accessToken);
//var responseContent = response.Content.ReadAsStringAsync().Result;
var Json = JsonConvert.DeserializeObject<List<UserRoleAc>>(response);
return Json;
}




}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
using Promact.Erp.DomainModel.ApplicationClass;
using Promact.Erp.DomainModel.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand All @@ -22,6 +24,14 @@ public interface ITaskMailRepository
/// <param name="answer"></param>
/// <returns>questionText in string format containing question statement</returns>
Task<string> QuestionAndAnswer(string userName, string answer);
Task<List<TaskMailReportAc>> TaskMailReport(string userName,int currentPage,int itemsPerPage);
Task<List<TaskMailUserAc>> TaskMailDetailsReport(string UserId,string UserRole,string UserName,string LoginId);
Task<List<TaskMailUserAc>> GetAllEmployee(string UserId);
//Task<List<TaskMailUserAc>> TaskMailDetailsReportPreviousDate(string UserId,string UserName,string UserRole,string CreatedOn,string LoginId);
//Task<List<TaskMailUserAc>> TaskMailDetailsReportNextDate(string UserId, string UserName, string UserRole, string CreatedOn, string LoginId);
Task<List<TaskMailUserAc>> TaskMailDetailsReportSelectedDate(string UserId, string UserName, string UserRole, string CreatedOn, string LoginId, string SelectedDate);

Task<List<TaskMailUserAc>> TaskMailDetailsReportNextPreviousDate(string UserId, string UserName, string UserRole, string CreatedOn, string LoginId,string Type);

}
}

0 comments on commit 25e149e

Please sign in to comment.