[AllowAnonymous] removed from Uplaoder API
This commit is contained in:
parent
3aca487ee6
commit
42c5879aa0
|
|
@ -16,7 +16,7 @@ export class DataUploadService {
|
|||
const newItemid = this.apiService.getApiDefaultIntData(itemid);
|
||||
return this.apiService.httpGet<any[]>('/dataUpload/prepareUpload/' + uploadId + '/' + newItemid);
|
||||
}
|
||||
public uploadFile(selectedFile: File, uploadID: number, payrolltypeid: number, userid: number, itemid?: number, itemidTwo?: number, selectedDate?: Date):
|
||||
public uploadFile(selectedFile: File, uploadID: number, itemid?: number, itemidTwo?: number, selectedDate?: Date):
|
||||
Observable<HttpEvent<any >> {
|
||||
const date = selectedDate.getDate();
|
||||
const month = selectedDate.getMonth();
|
||||
|
|
@ -28,10 +28,7 @@ export class DataUploadService {
|
|||
formData.append('uploadID', String(uploadID));
|
||||
formData.append('itemID', String(itemid));
|
||||
formData.append('itemIDTwo', String(itemidTwo));
|
||||
formData.append('payrolltypeid', String(payrolltypeid));
|
||||
formData.append('userid', String(userid));
|
||||
formData.append('selectedDate', selectedDate.toDateString());
|
||||
|
||||
const req = new HttpRequest('POST', `${this.apiService.base_url + '/'}dataUpload/regularExcelInterface`, formData, {
|
||||
responseType: 'json'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1109,8 +1109,6 @@ export class DataUploadComponent implements OnInit, OnDestroy {
|
|||
.uploadFile(
|
||||
file,
|
||||
this.type,
|
||||
this.payrollType.id,
|
||||
this.user.userID,
|
||||
this.itemid,
|
||||
this.itemidTwo,
|
||||
this.selectedDate
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export class ChargeSheetComponent implements OnInit {
|
|||
const file: File | null = this.selectedFiles.item(0);
|
||||
|
||||
this.loadingPanelService.ShowLoadingPanel = true;
|
||||
this.dataUploadService.uploadFile(file, this.type, null, this.user.userID, this.itemid, undefined, this.selectedDate)
|
||||
this.dataUploadService.uploadFile(file, this.type, this.itemid, undefined, this.selectedDate)
|
||||
.subscribe(
|
||||
(resp: any) => {
|
||||
this.uploadErrorOrSuccess = resp.body;
|
||||
|
|
|
|||
|
|
@ -76,20 +76,21 @@ namespace HRM.UI.Controllers.Payroll
|
|||
|
||||
[HttpPost]
|
||||
[Route("regularExcelInterface")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public ActionResult regularExcelInterface()
|
||||
{
|
||||
DataUploadColumnDefinition oColumnDefination = new DataUploadColumnDefinition();
|
||||
RegularDataUploadService regUpload = new RegularDataUploadService();
|
||||
List<UploadErrorOrSuccess> errorOrSuccessList = new List<UploadErrorOrSuccess>();
|
||||
DateTime selectedDate = DateTime.Today;
|
||||
try
|
||||
CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User);
|
||||
try
|
||||
{
|
||||
int uploadID = Convert.ToInt32(Request.Form["uploadID"]);
|
||||
int? itemid = GlobalFunctions.GetApiDefaultIntData( Convert.ToString(Request.Form["itemID"]));
|
||||
int? itemidTwo = GlobalFunctions.GetApiDefaultIntData(Convert.ToString(Request.Form["itemIDTwo"]));
|
||||
int? payrolltypeid = GlobalFunctions.GetApiDefaultIntData(Convert.ToString(Request.Form["payrolltypeid"]));
|
||||
int? userid = GlobalFunctions.GetApiDefaultIntData(Convert.ToString(Request.Form["userid"]));
|
||||
int? payrolltypeid = currentUser.PayrollTypeID;
|
||||
int? userid = (int)currentUser.UserID;
|
||||
string date = Request.Form["selectedDate"];
|
||||
if (!string.IsNullOrEmpty(date))
|
||||
{
|
||||
|
|
@ -126,7 +127,7 @@ namespace HRM.UI.Controllers.Payroll
|
|||
|
||||
[HttpPost]
|
||||
[Route("uploadBonusFile")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public ActionResult uploadBonusFile()
|
||||
{
|
||||
DataUploadColumnDefinition oColumnDefination = new DataUploadColumnDefinition();
|
||||
|
|
|
|||
|
|
@ -1664,7 +1664,7 @@ namespace HRM.UI.Controllers
|
|||
}
|
||||
|
||||
[HttpPost("uploadEmpFile")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public ActionResult uploadEmpFile()
|
||||
{
|
||||
empFileupload item = new empFileupload();
|
||||
|
|
@ -1721,7 +1721,7 @@ namespace HRM.UI.Controllers
|
|||
}
|
||||
|
||||
[HttpPost("uploadEmpFileInProfileUpdate")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public ActionResult UploadEmpFileInProfileUpdate()
|
||||
{
|
||||
empFileupload item = new empFileupload();
|
||||
|
|
@ -1839,7 +1839,7 @@ namespace HRM.UI.Controllers
|
|||
/// served by UseStaticFiles without auth, so this exposes nothing new.
|
||||
/// </summary>
|
||||
[HttpGet("empPhotoFile/{empNo}")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public IActionResult GetEmpPhotoFile(string empNo)
|
||||
{
|
||||
string path = new EmployeePhotoService(_env).FindApprovedFile(empNo);
|
||||
|
|
@ -1904,7 +1904,7 @@ namespace HRM.UI.Controllers
|
|||
/// Always revalidated: an approver must never act on a stale image.
|
||||
/// </summary>
|
||||
[HttpGet("empPendingPhotoFile/{empNo}")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public IActionResult GetEmpPendingPhotoFile(string empNo)
|
||||
{
|
||||
string path = new EmployeePhotoService(_env).FindPendingFilePath(empNo);
|
||||
|
|
@ -3291,7 +3291,7 @@ namespace HRM.UI.Controllers
|
|||
}
|
||||
|
||||
[HttpPost("uploadEmpFileFromAdmin")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public ActionResult uploadEmpFileFromAdmin()
|
||||
{
|
||||
empFileupload item = new empFileupload();
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace HRM.UI.Controllers
|
|||
}
|
||||
|
||||
[HttpPost("uploadConfigurationfile"), DisableRequestSizeLimit]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public async Task<IActionResult> uploadConfigurationfile()
|
||||
{
|
||||
try
|
||||
|
|
@ -215,7 +215,7 @@ namespace HRM.UI.Controllers
|
|||
|
||||
|
||||
[HttpPost("removeExcelfile")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public async Task<IActionResult> removeExcelfile()
|
||||
{
|
||||
try
|
||||
|
|
@ -269,7 +269,7 @@ namespace HRM.UI.Controllers
|
|||
}
|
||||
|
||||
[HttpPost("uploadFiles")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public async Task<IActionResult> UploadFiles()
|
||||
{
|
||||
try
|
||||
|
|
|
|||
|
|
@ -1079,7 +1079,7 @@ namespace HRM.UI.Controllers.Leave
|
|||
}
|
||||
|
||||
[HttpPost("uploadLeaveAttachment")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public ActionResult UploadLeaveAttachment()
|
||||
{
|
||||
LeaveAttachment item = new LeaveAttachment();
|
||||
|
|
@ -2449,7 +2449,7 @@ namespace HRM.UI.Controllers.Leave
|
|||
|
||||
[HttpPost]
|
||||
[Route("initiateCancelRequest")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public ActionResult InitiateCancelRequest(LeaveEntry item)
|
||||
{
|
||||
try
|
||||
|
|
@ -2598,7 +2598,7 @@ namespace HRM.UI.Controllers.Leave
|
|||
|
||||
[HttpPost]
|
||||
[Route("cancelLeaveApprove")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public ActionResult CancelLeaveApprove(WFMovementTran item)
|
||||
{
|
||||
try
|
||||
|
|
@ -2617,7 +2617,7 @@ namespace HRM.UI.Controllers.Leave
|
|||
|
||||
[HttpPost]
|
||||
[Route("cancelLeaveReject")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public ActionResult CancelLeaveReject(WFMovementTran item)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
|
|
@ -2033,7 +2033,7 @@ namespace HRM.UI.Controllers.Payroll
|
|||
}
|
||||
|
||||
[HttpPost("uploadTaxFile")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public ActionResult UploadEmpFile()
|
||||
{
|
||||
TaxReturnAttachment item = new TaxReturnAttachment();
|
||||
|
|
|
|||
|
|
@ -2694,7 +2694,7 @@ namespace HRM.UI.Controllers.Talent_Management
|
|||
}
|
||||
|
||||
[HttpPost("uploadPMSObjectiveProgressHistoryWithAttachment")]
|
||||
[AllowAnonymous]
|
||||
//[AllowAnonymous]
|
||||
public ActionResult uploadPMSObjectiveProgressHistoryWithAttachment()
|
||||
{
|
||||
PMSObjectiveProgressAttachment item = new PMSObjectiveProgressAttachment();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user