Added the joining date parameter when creating or update employee using the mobiles

This commit is contained in:
ashutosh.nehete 2025-09-12 12:46:07 +05:30
parent cf35b8c773
commit 5717bb6dac
3 changed files with 14 additions and 12 deletions

View File

@ -3,18 +3,18 @@
public class CreateUserDto
{
public Guid? Id { get; set; }
public string? FirstName { get; set; }
public required string FirstName { get; set; }
public string? LastName { get; set; }
public string? MiddleName { get; set; }
public string? Email { get; set; }
public string? Gender { get; set; }
public string? BirthDate { get; set; }
public string? JoiningDate { get; set; }
public required string Gender { get; set; }
public required string BirthDate { get; set; }
public required string JoiningDate { get; set; }
public string? PermanentAddress { get; set; }
public string? CurrentAddress { get; set; }
public string? PhoneNumber { get; set; }
public required string PermanentAddress { get; set; }
public required string CurrentAddress { get; set; }
public required string PhoneNumber { get; set; }
public string? EmergencyPhoneNumber { get; set; }
public string? EmergencyContactPerson { get; set; }
@ -33,10 +33,11 @@
public class MobileUserManageDto
{
public Guid? Id { get; set; }
public string FirstName { get; set; } = string.Empty;
public string? LastName { get; set; }
public string PhoneNumber { get; set; } = string.Empty;
public string? Gender { get; set; }
public required string FirstName { get; set; }
public required string LastName { get; set; }
public required string PhoneNumber { get; set; }
public required DateTime JoiningDate { get; set; }
public required string Gender { get; set; }
public Guid JobRoleId { get; set; }
public string? ProfileImage { get; set; }
}

View File

@ -74,7 +74,7 @@ namespace Marco.Pms.Model.Mapper
PhoneNumber = model.PhoneNumber,
Photo = image,
JobRoleId = model.JobRoleId,
JoiningDate = null,
JoiningDate = model.JoiningDate,
};
}

View File

@ -502,6 +502,7 @@ namespace MarcoBMS.Services.Controllers
existingEmployee.LastName = model.LastName;
existingEmployee.Gender = model.Gender;
existingEmployee.PhoneNumber = model.PhoneNumber;
existingEmployee.JoiningDate = model.JoiningDate;
existingEmployee.JobRoleId = model.JobRoleId;
existingEmployee.Photo = imageBytes;