Compare commits
No commits in common. "89f428bd2f38609c15b7fc436e0ec052ac80bfd3" and "1558e175e819f3360f51186f8e351e3427cfe262" have entirely different histories.
89f428bd2f
...
1558e175e8
|
|
@ -1477,16 +1477,16 @@ namespace HRM.BO
|
||||||
|
|
||||||
public enum EnumBloodGroup
|
public enum EnumBloodGroup
|
||||||
{
|
{
|
||||||
NA = 0,
|
None = 0,
|
||||||
None = 1,
|
APos = 1,
|
||||||
APos = 2,
|
ANeg = 2,
|
||||||
ANeg = 3,
|
BPos = 3,
|
||||||
BPos = 4,
|
BNeg = 4,
|
||||||
BNeg = 5,
|
OPos = 5,
|
||||||
OPos = 6,
|
ONeg = 6,
|
||||||
ONeg = 7,
|
ABPos = 7,
|
||||||
ABPos = 8,
|
ABNeg = 8,
|
||||||
ABNeg = 9
|
NA = 9
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -259,9 +259,7 @@ namespace HRM.BO
|
||||||
public Relation ContactPersonRelation { get; set; }
|
public Relation ContactPersonRelation { get; set; }
|
||||||
public string PermanentAddressInBangla { get; set; }
|
public string PermanentAddressInBangla { get; set; }
|
||||||
public string PresentAddressInBangla { get; set; }
|
public string PresentAddressInBangla { get; set; }
|
||||||
public string PresentPO { get; set; }
|
|
||||||
public string PresentPOInBangla { get; set; }
|
public string PresentPOInBangla { get; set; }
|
||||||
public string PermanentPO { get; set; }
|
|
||||||
public string ParmanentPOInBangla { get; set; }
|
public string ParmanentPOInBangla { get; set; }
|
||||||
|
|
||||||
//#region Property PermanentDistrict : District
|
//#region Property PermanentDistrict : District
|
||||||
|
|
@ -991,7 +989,6 @@ namespace HRM.BO
|
||||||
_telePhone = string.Empty;
|
_telePhone = string.Empty;
|
||||||
|
|
||||||
_emailAddress = string.Empty;
|
_emailAddress = string.Empty;
|
||||||
Gender = EnumGender.None;
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -1141,14 +1138,6 @@ namespace HRM.BO
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
public string FatherName { get; set; }
|
|
||||||
public string MotherName { get; set; }
|
|
||||||
public string SpouseName { get; set; }
|
|
||||||
public string NationalID{ get; set; }
|
|
||||||
public EnumGender Gender { get; set; }
|
|
||||||
public int? DistrictID{ get; set; }
|
|
||||||
public int? ThanaID { get; set; }
|
|
||||||
public string PostOffice { get; set; }
|
|
||||||
public EnumProfileStatus ProfileStatus { get; set; }
|
public EnumProfileStatus ProfileStatus { get; set; }
|
||||||
public string NomineeStatus { get; set; }
|
public string NomineeStatus { get; set; }
|
||||||
public bool HasPicture { get; set; }
|
public bool HasPicture { get; set; }
|
||||||
|
|
@ -1320,8 +1309,8 @@ namespace HRM.BO
|
||||||
#endregion
|
#endregion
|
||||||
//CGPA or Marks
|
//CGPA or Marks
|
||||||
#region GPAOrMarks
|
#region GPAOrMarks
|
||||||
private double? _gpa;
|
private double _gpa;
|
||||||
public double? GPAOrMarks
|
public double GPAOrMarks
|
||||||
{
|
{
|
||||||
get { return _gpa; }
|
get { return _gpa; }
|
||||||
set { _gpa = value; }
|
set { _gpa = value; }
|
||||||
|
|
@ -1330,8 +1319,8 @@ namespace HRM.BO
|
||||||
//OutOf
|
//OutOf
|
||||||
#region Property OutOf : double
|
#region Property OutOf : double
|
||||||
|
|
||||||
private double? _outOf;
|
private double _outOf;
|
||||||
public double? OutOf
|
public double OutOf
|
||||||
{
|
{
|
||||||
get { return _outOf; }
|
get { return _outOf; }
|
||||||
set { _outOf = value; }
|
set { _outOf = value; }
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ using Ease.Core.DataAccess;
|
||||||
using HRM.BO;
|
using HRM.BO;
|
||||||
using Microsoft.AspNetCore.Routing.Template;
|
using Microsoft.AspNetCore.Routing.Template;
|
||||||
using Microsoft.Data.SqlClient;
|
using Microsoft.Data.SqlClient;
|
||||||
using Org.BouncyCastle.Asn1.X509;
|
|
||||||
|
|
||||||
namespace HRM.DA
|
namespace HRM.DA
|
||||||
{
|
{
|
||||||
|
|
@ -435,12 +434,12 @@ namespace HRM.DA
|
||||||
"EmployeeID, ContactID, PARMANENTADDRESS, PARMANENTDISTRICTID, PARMANENTTHANAID, PARMANENTTELEPHONE," +
|
"EmployeeID, ContactID, PARMANENTADDRESS, PARMANENTDISTRICTID, PARMANENTTHANAID, PARMANENTTELEPHONE," +
|
||||||
" PresentAddress, PresentDistrictID, PresentThanaID, PresentTelephone, Mobile, PersonalEmail," +
|
" PresentAddress, PresentDistrictID, PresentThanaID, PresentTelephone, Mobile, PersonalEmail," +
|
||||||
" OfficialEMail, Fax, EmergencyContactAddress, EmergencyContactPerson, EmergencyTelephone, PARMANENTMOBILE, " +
|
" OfficialEMail, Fax, EmergencyContactAddress, EmergencyContactPerson, EmergencyTelephone, PARMANENTMOBILE, " +
|
||||||
" PRESENTMOBILE, PERSONALTELEPHONE, EMERGENCYMOBILE, CPRELATIONID,ProfileStatus,PermanentAddressInBangla,PresentAddressInBangla,PermanentPostCodeNo,PresentPostCodeNo, PresentPOInBangla, ParmanentPOInBangla, PresentPO, PermanentPO)" +
|
" PRESENTMOBILE, PERSONALTELEPHONE, EMERGENCYMOBILE, CPRELATIONID,ProfileStatus,PermanentAddressInBangla,PresentAddressInBangla,PermanentPostCodeNo,PresentPostCodeNo, PresentPOInBangla, ParmanentPOInBangla)" +
|
||||||
" VALUES(" +
|
" VALUES(" +
|
||||||
" %n, %n, %s, %n, %n, %s, " +
|
" %n, %n, %s, %n, %n, %s, " +
|
||||||
" %s, %n, %n, %s, %s, %s," +
|
" %s, %n, %n, %s, %s, %s," +
|
||||||
" %s, %s, %s, %s, %s, %s," +
|
" %s, %s, %s, %s, %s, %s," +
|
||||||
" %s, %s, %s, %n,%n, %u, %u, %s, %s, %u, %u, %s, %s)",
|
" %s, %s, %s, %n,%n, %u, %u, %s, %s, %u, %u)",
|
||||||
item.EmployeeID, item.ID, item.PermanentAddress, DataReader.GetNullValue(item.PermanentDistrictID, 0),
|
item.EmployeeID, item.ID, item.PermanentAddress, DataReader.GetNullValue(item.PermanentDistrictID, 0),
|
||||||
DataReader.GetNullValue(item.PermanentThanaID, 0), item.PermanentTelephone,
|
DataReader.GetNullValue(item.PermanentThanaID, 0), item.PermanentTelephone,
|
||||||
item.PresentAddress, DataReader.GetNullValue(item.PresentDistrictID, 0),
|
item.PresentAddress, DataReader.GetNullValue(item.PresentDistrictID, 0),
|
||||||
|
|
@ -449,7 +448,7 @@ namespace HRM.DA
|
||||||
item.EmergencyTelephone, DataReader.GetNullValue(item.PermanentMobile),
|
item.EmergencyTelephone, DataReader.GetNullValue(item.PermanentMobile),
|
||||||
DataReader.GetNullValue(item.PresentMobile), DataReader.GetNullValue(item.PersonalTelephone),
|
DataReader.GetNullValue(item.PresentMobile), DataReader.GetNullValue(item.PersonalTelephone),
|
||||||
DataReader.GetNullValue(item.EmergencyMobile),
|
DataReader.GetNullValue(item.EmergencyMobile),
|
||||||
DataReader.GetNullValue(item.ContactPersonRelationId, 0), item.ProfileStatus, item.PermanentAddressInBangla, item.PresentAddressInBangla, item.PermanentPostCodeNo, item.PresentPostCodeNo, item.PresentPOInBangla, item.ParmanentPOInBangla, item.PresentPO, item.PermanentPO);
|
DataReader.GetNullValue(item.ContactPersonRelationId, 0), item.ProfileStatus, item.PermanentAddressInBangla, item.PresentAddressInBangla, item.PermanentPostCodeNo, item.PresentPostCodeNo, item.PresentPOInBangla, item.ParmanentPOInBangla);
|
||||||
tc.ExecuteNonQuery(sql);
|
tc.ExecuteNonQuery(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -460,7 +459,7 @@ namespace HRM.DA
|
||||||
"PARMANENTADDRESS =%s , PARMANENTDISTRICTID =%n, PARMANENTTHANAID =%n, PARMANENTTELEPHONE=%s," +
|
"PARMANENTADDRESS =%s , PARMANENTDISTRICTID =%n, PARMANENTTHANAID =%n, PARMANENTTELEPHONE=%s," +
|
||||||
" PresentAddress=%s, PresentDistrictID=%n, PresentThanaID=%n, PresentTelephone=%s, Mobile =%s, PersonalEmail=%s," +
|
" PresentAddress=%s, PresentDistrictID=%n, PresentThanaID=%n, PresentTelephone=%s, Mobile =%s, PersonalEmail=%s," +
|
||||||
" OfficialEMail=%s, Fax=%s, EmergencyContactAddress=%s, EmergencyContactPerson=%s, EmergencyTelephone=%s, PARMANENTMOBILE=%s, " +
|
" OfficialEMail=%s, Fax=%s, EmergencyContactAddress=%s, EmergencyContactPerson=%s, EmergencyTelephone=%s, PARMANENTMOBILE=%s, " +
|
||||||
" PRESENTMOBILE=%s, PERSONALTELEPHONE=%s, EMERGENCYMOBILE=%s, CPRELATIONID=%n,ProfileStatus=%n,PermanentAddressInBangla=%u,PresentAddressInBangla=%u,PermanentPostCodeNo=%s,PresentPostCodeNo=%s, PresentPOInBangla = %u, ParmanentPOInBangla = %u, PresentPO = %s, PermanentPO = %s" +
|
" PRESENTMOBILE=%s, PERSONALTELEPHONE=%s, EMERGENCYMOBILE=%s, CPRELATIONID=%n,ProfileStatus=%n,PermanentAddressInBangla=%u,PresentAddressInBangla=%u,PermanentPostCodeNo=%s,PresentPostCodeNo=%s, PresentPOInBangla = %u, ParmanentPOInBangla = %u" +
|
||||||
" where EmployeeID =%n and ContactID =%n ",
|
" where EmployeeID =%n and ContactID =%n ",
|
||||||
item.PermanentAddress, DataReader.GetNullValue(item.PermanentDistrictID, 0),
|
item.PermanentAddress, DataReader.GetNullValue(item.PermanentDistrictID, 0),
|
||||||
DataReader.GetNullValue(item.PermanentThanaID, 0), item.PermanentTelephone,
|
DataReader.GetNullValue(item.PermanentThanaID, 0), item.PermanentTelephone,
|
||||||
|
|
@ -470,7 +469,7 @@ namespace HRM.DA
|
||||||
item.EmergencyTelephone, DataReader.GetNullValue(item.PermanentMobile),
|
item.EmergencyTelephone, DataReader.GetNullValue(item.PermanentMobile),
|
||||||
DataReader.GetNullValue(item.PresentMobile), DataReader.GetNullValue(item.PersonalTelephone),
|
DataReader.GetNullValue(item.PresentMobile), DataReader.GetNullValue(item.PersonalTelephone),
|
||||||
DataReader.GetNullValue(item.EmergencyMobile),
|
DataReader.GetNullValue(item.EmergencyMobile),
|
||||||
DataReader.GetNullValue(item.ContactPersonRelationId, 0), item.ProfileStatus, item.PermanentAddressInBangla, item.PresentAddressInBangla, item.PermanentPostCodeNo, item.PresentPostCodeNo, item.PresentPOInBangla, item.ParmanentPOInBangla, item.PresentPO, item.PermanentPO, item.EmployeeID, item.ID);
|
DataReader.GetNullValue(item.ContactPersonRelationId, 0), item.ProfileStatus, item.PermanentAddressInBangla, item.PresentAddressInBangla, item.PermanentPostCodeNo, item.PresentPostCodeNo, item.PresentPOInBangla, item.ParmanentPOInBangla, item.EmployeeID, item.ID);
|
||||||
tc.ExecuteNonQuery(sql);
|
tc.ExecuteNonQuery(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -589,8 +588,8 @@ namespace HRM.DA
|
||||||
academic.ID, academic.EmployeeID, academic.EducationLevelID,
|
academic.ID, academic.EmployeeID, academic.EducationLevelID,
|
||||||
DataReader.GetNullValue(academic.DisciplineID, 0), DataReader.GetNullValue(academic.InstitutionID, 0),
|
DataReader.GetNullValue(academic.DisciplineID, 0), DataReader.GetNullValue(academic.InstitutionID, 0),
|
||||||
DataReader.GetNullValue(academic.PassingYear),
|
DataReader.GetNullValue(academic.PassingYear),
|
||||||
DataReader.GetNullValue(academic.ClassOrDivision), DataReader.GetNullValue(academic.GPAOrMarks), academic.LastLevel,
|
DataReader.GetNullValue(academic.ClassOrDivision), academic.GPAOrMarks, academic.LastLevel,
|
||||||
DataReader.GetNullValue(academic.OutOf), DataReader.GetNullValue(academic.ResultTypeID),
|
academic.OutOf, DataReader.GetNullValue(academic.ResultTypeID, 0),
|
||||||
DataReader.GetNullValue(academic.InstituteName), DataReader.GetNullValue(academic.EducationTypeID, 0),
|
DataReader.GetNullValue(academic.InstituteName), DataReader.GetNullValue(academic.EducationTypeID, 0),
|
||||||
academic.PhotoPath, academic.DocSubmissionDate, academic.ProfileStatus);
|
academic.PhotoPath, academic.DocSubmissionDate, academic.ProfileStatus);
|
||||||
}
|
}
|
||||||
|
|
@ -603,8 +602,8 @@ namespace HRM.DA
|
||||||
" where AcademicID =%n and EmployeeID =%n ", academic.EducationLevelID,
|
" where AcademicID =%n and EmployeeID =%n ", academic.EducationLevelID,
|
||||||
DataReader.GetNullValue(academic.DisciplineID, 0), DataReader.GetNullValue(academic.InstitutionID, 0),
|
DataReader.GetNullValue(academic.DisciplineID, 0), DataReader.GetNullValue(academic.InstitutionID, 0),
|
||||||
DataReader.GetNullValue(academic.PassingYear),
|
DataReader.GetNullValue(academic.PassingYear),
|
||||||
DataReader.GetNullValue(academic.ClassOrDivision), DataReader.GetNullValue(academic.GPAOrMarks), academic.LastLevel,
|
DataReader.GetNullValue(academic.ClassOrDivision), academic.GPAOrMarks, academic.LastLevel,
|
||||||
DataReader.GetNullValue(academic.OutOf), DataReader.GetNullValue(academic.ResultTypeID),
|
academic.OutOf, DataReader.GetNullValue(academic.ResultTypeID, 0),
|
||||||
DataReader.GetNullValue(academic.InstituteName), DataReader.GetNullValue(academic.EducationTypeID, 0),
|
DataReader.GetNullValue(academic.InstituteName), DataReader.GetNullValue(academic.EducationTypeID, 0),
|
||||||
academic.PhotoPath, academic.DocSubmissionDate, academic.ProfileStatus,
|
academic.PhotoPath, academic.DocSubmissionDate, academic.ProfileStatus,
|
||||||
academic.ID, academic.EmployeeID);
|
academic.ID, academic.EmployeeID);
|
||||||
|
|
@ -677,16 +676,16 @@ namespace HRM.DA
|
||||||
tc.ExecuteNonQuery("INSERT INTO EmpNominee(" +
|
tc.ExecuteNonQuery("INSERT INTO EmpNominee(" +
|
||||||
"EmployeeID, NomineeID, NominationPurposeID, NominationDate, Name, RelationID, " +
|
"EmployeeID, NomineeID, NominationPurposeID, NominationDate, Name, RelationID, " +
|
||||||
" Percentage, BirthDate, OccupationID, Address, TelePhone," +
|
" Percentage, BirthDate, OccupationID, Address, TelePhone," +
|
||||||
" EmailAddress, NomineeMobileNo, FatherName , MotherName , SpouseName , GENDER , DistrictID , ThanaID , PostOffice)" +
|
" EmailAddress, NomineeMobileNo)" +
|
||||||
" VALUES(" +
|
" VALUES(" +
|
||||||
" %n, %n, %n, %d, %s, %n," +
|
" %n, %n, %n, %d, %s, %n," +
|
||||||
" %n, %d, %n, %s, %s, %s, %s, %s, %s, %s, %n, %n, %n, %s)",
|
" %n, %d, %n, %s, %s, %s, %s)",
|
||||||
nominee.EmployeeID, nominee.ID, nominee.NominationPurposeID,
|
nominee.EmployeeID, nominee.ID, nominee.NominationPurposeID,
|
||||||
DataReader.GetNullValue(nominee.NominationDate), nominee.Name,
|
DataReader.GetNullValue(nominee.NominationDate), nominee.Name,
|
||||||
DataReader.GetNullValue(nominee.RelationID, 0),
|
DataReader.GetNullValue(nominee.RelationID, 0),
|
||||||
nominee.Percentage, DataReader.GetNullValue(nominee.BirthDate),
|
nominee.Percentage, DataReader.GetNullValue(nominee.BirthDate),
|
||||||
DataReader.GetNullValue(nominee.OccupationID, 0), nominee.Address, nominee.TelePhone,
|
DataReader.GetNullValue(nominee.OccupationID, 0), nominee.Address, nominee.TelePhone,
|
||||||
nominee.EmailAddress, nominee.NomineeMobileNo, nominee.FatherName, nominee.MotherName, nominee.SpouseName, nominee.Gender, nominee.DistrictID, nominee.ThanaID, nominee.PostOffice);
|
nominee.EmailAddress, nominee.NomineeMobileNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Update(TransactionContext tc, EmpNominee nominee)
|
public static void Update(TransactionContext tc, EmpNominee nominee)
|
||||||
|
|
@ -702,16 +701,8 @@ namespace HRM.DA
|
||||||
,[TELEPHONE] = %s
|
,[TELEPHONE] = %s
|
||||||
,[EMAILADDRESS] = %s
|
,[EMAILADDRESS] = %s
|
||||||
,[NomineeMobileNo] = %s
|
,[NomineeMobileNo] = %s
|
||||||
,[FatherName] = %s
|
|
||||||
,[MotherName] = %s
|
|
||||||
,[SpouseName] = %s
|
|
||||||
,[Gender] = %n
|
|
||||||
,[DistrictID] = %n
|
|
||||||
,[ThanaID] = %n
|
|
||||||
,[PostOffice] = %s
|
|
||||||
WHERE NOMINEEID = %n", nominee.ID, nominee.NominationPurposeID, nominee.Name, nominee.RelationID,
|
WHERE NOMINEEID = %n", nominee.ID, nominee.NominationPurposeID, nominee.Name, nominee.RelationID,
|
||||||
nominee.Percentage, nominee.OccupationID, nominee.Address, nominee.TelePhone, nominee.EmailAddress, nominee.NomineeMobileNo,
|
nominee.Percentage, nominee.OccupationID, nominee.Address, nominee.TelePhone, nominee.EmailAddress, nominee.NomineeMobileNo,
|
||||||
nominee.FatherName, nominee.MotherName, nominee.SpouseName, nominee.Gender, nominee.DistrictID, nominee.ThanaID, nominee.PostOffice,
|
|
||||||
nominee.ID);
|
nominee.ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -969,13 +960,6 @@ namespace HRM.DA
|
||||||
,[IsMinor]
|
,[IsMinor]
|
||||||
,[NID]
|
,[NID]
|
||||||
,[NIDPath]
|
,[NIDPath]
|
||||||
,[FatherName]
|
|
||||||
,[MotherName]
|
|
||||||
,[SpouseName]
|
|
||||||
,[Gender]
|
|
||||||
,[DistrictID]
|
|
||||||
,[ThanaID]
|
|
||||||
,[PostOffice]
|
|
||||||
,iif(isnull(eu.empfileuploadid, 0) > 0, 1, 0) HasPicture
|
,iif(isnull(eu.empfileuploadid, 0) > 0, 1, 0) HasPicture
|
||||||
,iif(isnull(eu2.empfileuploadid, 0) > 0, 1, 0) HasSignature
|
,iif(isnull(eu2.empfileuploadid, 0) > 0, 1, 0) HasSignature
|
||||||
from [EMPNOMINEE] en
|
from [EMPNOMINEE] en
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,7 @@ END;";
|
||||||
//Using TOP
|
//Using TOP
|
||||||
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo LIKE %s", ( code + "%"));
|
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo LIKE %s", ( code + "%"));
|
||||||
orderby = "EmployeeNo";
|
orderby = "EmployeeNo";
|
||||||
top = "TOP 15";
|
top = "TOP 50";
|
||||||
|
|
||||||
//Without suggestion
|
//Without suggestion
|
||||||
//sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo = %s", code );
|
//sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo = %s", code );
|
||||||
|
|
@ -385,16 +385,9 @@ END;";
|
||||||
|
|
||||||
if (name != string.Empty)
|
if (name != string.Empty)
|
||||||
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("Name LIKE %s", ("%" + name + "%"));
|
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("Name LIKE %s", ("%" + name + "%"));
|
||||||
//string finalSQl = SQLParser.MakeSQL(
|
|
||||||
// "%q Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q %q Order by %s",
|
|
||||||
// recurSqlClause, top, sqlClause, recurWhereClause, orderby);
|
|
||||||
|
|
||||||
|
|
||||||
string finalSQl = SQLParser.MakeSQL(
|
string finalSQl = SQLParser.MakeSQL(
|
||||||
"%q Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q %q " +
|
"%q Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q %q Order by %s",
|
||||||
" UNION Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q " +
|
recurSqlClause, top, sqlClause, recurWhereClause, orderby);
|
||||||
" Order by %s",
|
|
||||||
recurSqlClause, top, sqlClause, recurWhereClause, top, sqlClause, orderby);
|
|
||||||
|
|
||||||
return tc.ExecuteReader(finalSQl);
|
return tc.ExecuteReader(finalSQl);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -254,8 +254,6 @@ namespace HRM.DA
|
||||||
oEmpContact.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus").GetValueOrDefault();
|
oEmpContact.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus").GetValueOrDefault();
|
||||||
oEmpContact.PresentPOInBangla = oReader.GetString("PresentPOInBangla", true, null);
|
oEmpContact.PresentPOInBangla = oReader.GetString("PresentPOInBangla", true, null);
|
||||||
oEmpContact.ParmanentPOInBangla = oReader.GetString("ParmanentPOInBangla", true, null);
|
oEmpContact.ParmanentPOInBangla = oReader.GetString("ParmanentPOInBangla", true, null);
|
||||||
oEmpContact.PresentPO = oReader.GetString("PresentPO", true, null);
|
|
||||||
oEmpContact.PermanentPO = oReader.GetString("PermanentPO", true, null);
|
|
||||||
this.SetObjectState(oEmpContact, ObjectState.Saved);
|
this.SetObjectState(oEmpContact, ObjectState.Saved);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -558,16 +556,6 @@ namespace HRM.DA
|
||||||
oEmpNominee.HasPicture = oReader.GetBoolean("HasPicture", true, false);
|
oEmpNominee.HasPicture = oReader.GetBoolean("HasPicture", true, false);
|
||||||
oEmpNominee.HasSignature = oReader.GetBoolean("HasSignature", true, false);
|
oEmpNominee.HasSignature = oReader.GetBoolean("HasSignature", true, false);
|
||||||
|
|
||||||
oEmpNominee.FatherName = oReader.GetString("FatherName");
|
|
||||||
oEmpNominee.MotherName = oReader.GetString("MotherName");
|
|
||||||
oEmpNominee.SpouseName = oReader.GetString("SpouseName");
|
|
||||||
oEmpNominee.NationalID = oReader.GetString("NID");
|
|
||||||
oEmpNominee.Gender = (EnumGender)oReader.GetInt32("Gender", 0);
|
|
||||||
oEmpNominee.DistrictID = oReader.GetInt32("DistrictID").HasValue ? oReader.GetInt32("DistrictID").Value : null;
|
|
||||||
oEmpNominee.ThanaID = oReader.GetInt32("ThanaID").HasValue ? oReader.GetInt32("ThanaID").Value : null;
|
|
||||||
oEmpNominee.PostOffice = oReader.GetString("PostOffice");
|
|
||||||
|
|
||||||
|
|
||||||
this.SetObjectState(oEmpNominee, ObjectState.Saved);
|
this.SetObjectState(oEmpNominee, ObjectState.Saved);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -608,8 +596,8 @@ namespace HRM.DA
|
||||||
oEmpAcademic.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus", 0);
|
oEmpAcademic.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus", 0);
|
||||||
|
|
||||||
oEmpAcademic.ResultTypeID = oReader.GetInt32("ResultTypeID", 0);
|
oEmpAcademic.ResultTypeID = oReader.GetInt32("ResultTypeID", 0);
|
||||||
oEmpAcademic.GPAOrMarks = oReader.GetDouble("OutOf").HasValue ? oReader.GetDouble("GPAOrMarks") : null;
|
oEmpAcademic.GPAOrMarks = oReader.GetDouble("GPAOrMarks", 0);
|
||||||
oEmpAcademic.OutOf = oReader.GetDouble("OutOf").HasValue ? oReader.GetDouble("OutOf") : null;
|
oEmpAcademic.OutOf = oReader.GetDouble("OutOf", 0);
|
||||||
oEmpAcademic.LastLevel = oReader.GetBoolean("LastLevel", false);
|
oEmpAcademic.LastLevel = oReader.GetBoolean("LastLevel", false);
|
||||||
oEmpAcademic.InstituteName = oReader.GetString("InstituteName");
|
oEmpAcademic.InstituteName = oReader.GetString("InstituteName");
|
||||||
oEmpAcademic.PhotoPath = oReader.GetString("PhotoPath");
|
oEmpAcademic.PhotoPath = oReader.GetString("PhotoPath");
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,7 @@ export class EmpContact extends BaseObject {
|
||||||
presentAddressInBangla: string;
|
presentAddressInBangla: string;
|
||||||
permanentPostCodeNo: string;
|
permanentPostCodeNo: string;
|
||||||
presentPostCodeNo: string;
|
presentPostCodeNo: string;
|
||||||
presentPO: string;
|
|
||||||
presentPOInBangla: string;
|
presentPOInBangla: string;
|
||||||
permanentPO: string;
|
|
||||||
parmanentPOInBangla: string;
|
parmanentPOInBangla: string;
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import {NominationPurpose} from '../HRBasic/nomination-purpose';
|
import {NominationPurpose} from '../HRBasic/nomination-purpose';
|
||||||
import {Relation} from '../HRBasic/relation';
|
import {Relation} from '../HRBasic/relation';
|
||||||
import {Occupation} from '../HRBasic/occupation';
|
import {Occupation} from '../HRBasic/occupation';
|
||||||
import {EnumProfileStatus, EnumGender} from '../enums';
|
import {EnumProfileStatus} from '../enums';
|
||||||
import {BaseObject} from '../Basic/baseObject';
|
import {BaseObject} from '../Basic/baseObject';
|
||||||
import {empFileuploads} from './hrEmployee';
|
import {empFileuploads} from './hrEmployee';
|
||||||
|
|
||||||
|
|
@ -24,14 +24,6 @@ export class EmpNominee extends BaseObject {
|
||||||
signature: empFileuploads;
|
signature: empFileuploads;
|
||||||
emailAddress: string;
|
emailAddress: string;
|
||||||
profileStatus: EnumProfileStatus;
|
profileStatus: EnumProfileStatus;
|
||||||
fatherName: string;
|
|
||||||
motherName: string;
|
|
||||||
spouseName: string;
|
|
||||||
nationalID: string;
|
|
||||||
gender: EnumGender;
|
|
||||||
districtID?: number | null;
|
|
||||||
thanaID?: number | null;
|
|
||||||
postOffice: string;
|
|
||||||
hasPicture: boolean;
|
hasPicture: boolean;
|
||||||
hasSignature: boolean;
|
hasSignature: boolean;
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
||||||
|
|
@ -998,7 +998,6 @@ export enum EnumTrainingCompletedFrom {
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum EnumBloodGroup {
|
export enum EnumBloodGroup {
|
||||||
NA,
|
|
||||||
None,
|
None,
|
||||||
APos,
|
APos,
|
||||||
ANeg,
|
ANeg,
|
||||||
|
|
@ -1007,7 +1006,7 @@ export enum EnumBloodGroup {
|
||||||
OPos,
|
OPos,
|
||||||
ONeg,
|
ONeg,
|
||||||
ABPos,
|
ABPos,
|
||||||
ABNeg
|
ABNeg,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum EnumOGPositionType {
|
export enum EnumOGPositionType {
|
||||||
|
|
@ -3150,15 +3149,14 @@ export enum EnumSuccessorReadiness {
|
||||||
}
|
}
|
||||||
|
|
||||||
export let BloodGroupList = [
|
export let BloodGroupList = [
|
||||||
{ name: "N/A", value: 1 },
|
{ name: "A+", value: 1 },
|
||||||
{ name: "A+", value: 2 },
|
{ name: "A-", value: 2 },
|
||||||
{ name: "A-", value: 3 },
|
{ name: "B+", value: 3 },
|
||||||
{ name: "B+", value: 4 },
|
{ name: "B-", value: 4 },
|
||||||
{ name: "B-", value: 5 },
|
{ name: "O+", value: 5 },
|
||||||
{ name: "O+", value: 6 },
|
{ name: "O-", value: 6 },
|
||||||
{ name: "O-", value: 7 },
|
{ name: "AB+", value: 7 },
|
||||||
{ name: "AB+", value: 8 },
|
{ name: "AB-", value: 8 },
|
||||||
{ name: "AB-", value: 9 },
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export class EnumExtension {
|
export class EnumExtension {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import { EnumLetterOrganizationType } from '../../_models/enums';
|
||||||
import { LetterRequest } from '../../_models/Letter-Request/Letter-Request';
|
import { LetterRequest } from '../../_models/Letter-Request/Letter-Request';
|
||||||
import { AuthorizedPerson } from '../../adhoc-feature/authorized-persons/authorizedPerson';
|
import { AuthorizedPerson } from '../../adhoc-feature/authorized-persons/authorizedPerson';
|
||||||
import { WFMovementTran } from '../../_models/Work-Flow/wFMovementTran';
|
import { WFMovementTran } from '../../_models/Work-Flow/wFMovementTran';
|
||||||
import { SearchEmployee } from 'src/app/_models/Employee/searchEmployee';
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
|
|
@ -234,10 +233,6 @@ export class LetterRequestService {
|
||||||
getImage(id: number) {
|
getImage(id: number) {
|
||||||
return this.apiService.httpGet<any>('/LetterRequest/getImage' + '/' + id);
|
return this.apiService.httpGet<any>('/LetterRequest/getImage' + '/' + id);
|
||||||
}
|
}
|
||||||
generatedExceptiinLetter(type: number, param: SearchEmployee[]) {
|
|
||||||
return this.apiService.httpPost('/LetterRequest/generatedExceptiinLetter/' + type , param);
|
|
||||||
// return this.apiService.httpDownloadFile('/LetterRequest/generatedExceptiinLetter/' + type , param);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import {LetterRequestByAdminApprovalComponent} from './letter-request-by-admin-a
|
||||||
import {ApproveFinancialDataComponent} from './approve-financial-data/approve-financial-data.component';
|
import {ApproveFinancialDataComponent} from './approve-financial-data/approve-financial-data.component';
|
||||||
import {AuthorizedPersonsComponent} from './authorized-persons/authorized-persons.component';
|
import {AuthorizedPersonsComponent} from './authorized-persons/authorized-persons.component';
|
||||||
import { LetterGenerateComponent } from './letter-generate/letter-generate.component';
|
import { LetterGenerateComponent } from './letter-generate/letter-generate.component';
|
||||||
import { ExceptionLetterGenerateComponent } from './exception-letter-generate/exception-letter-generate.component';
|
|
||||||
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
|
|
@ -32,7 +31,6 @@ const routes: Routes = [
|
||||||
{path: 'letter-generate', component: LetterGenerateComponent, canActivate: [AuthGuard]},
|
{path: 'letter-generate', component: LetterGenerateComponent, canActivate: [AuthGuard]},
|
||||||
{path: 'workflow-delegation-by-employee', component: WorkflowDelegationByEmployeeComponent, canActivate: [AuthGuard]},
|
{path: 'workflow-delegation-by-employee', component: WorkflowDelegationByEmployeeComponent, canActivate: [AuthGuard]},
|
||||||
{path: 'delegation-from-admin-panel', component: DelegationFromAdminPanelComponent, canActivate: [AuthGuard]},
|
{path: 'delegation-from-admin-panel', component: DelegationFromAdminPanelComponent, canActivate: [AuthGuard]},
|
||||||
{path: 'exception-letter-generate', component: ExceptionLetterGenerateComponent, canActivate: [AuthGuard]},
|
|
||||||
//{path: 'letter-request-by-employee-and-approval', component: LetterRequestByEmployeeAndApprovalComponent, canActivate: [AuthGuard]},
|
//{path: 'letter-request-by-employee-and-approval', component: LetterRequestByEmployeeAndApprovalComponent, canActivate: [AuthGuard]},
|
||||||
//{path: 'letter-request-approval', component: LetterRequestApprovalComponent, canActivate: [AuthGuard]},
|
//{path: 'letter-request-approval', component: LetterRequestApprovalComponent, canActivate: [AuthGuard]},
|
||||||
//{path: 'letter-print-by-admin-panel', component: LetterPrintByAdminPanelComponent, canActivate: [AuthGuard]},
|
//{path: 'letter-print-by-admin-panel', component: LetterPrintByAdminPanelComponent, canActivate: [AuthGuard]},
|
||||||
|
|
|
||||||
|
|
@ -49,14 +49,13 @@ import { ApproveFinancialDataComponent } from './approve-financial-data/approve-
|
||||||
import { AuthorizedPersonsComponent } from './authorized-persons/authorized-persons.component';
|
import { AuthorizedPersonsComponent } from './authorized-persons/authorized-persons.component';
|
||||||
import { AuthorizedPersonComponent } from './authorized-persons/authorized-person/authorized-person.component';
|
import { AuthorizedPersonComponent } from './authorized-persons/authorized-person/authorized-person.component';
|
||||||
import { LetterGenerateComponent } from './letter-generate/letter-generate.component';
|
import { LetterGenerateComponent } from './letter-generate/letter-generate.component';
|
||||||
import { ExceptionLetterGenerateComponent } from './exception-letter-generate/exception-letter-generate.component';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
||||||
declarations: [workflowRuleComponent, WorkFlowSetupComponent, WorkFlowSetupNewComponent, WorkFlowAdministrativeStatusComponent,
|
declarations: [workflowRuleComponent, WorkFlowSetupComponent, WorkFlowSetupNewComponent, WorkFlowAdministrativeStatusComponent,
|
||||||
WorkFlowAdminComponent, WorkflowDelegationByEmployeeComponent, DelegationFromAdminPanelComponent,
|
WorkFlowAdminComponent, WorkflowDelegationByEmployeeComponent, DelegationFromAdminPanelComponent,
|
||||||
LetterRequestApprovalComponent, LetterPrintByAdminPanelComponent,
|
LetterRequestApprovalComponent, LetterPrintByAdminPanelComponent,
|
||||||
LetterRequestByAdminApprovalComponent, ApproveFinancialDataComponent, AuthorizedPersonsComponent, AuthorizedPersonComponent, LetterGenerateComponent, ExceptionLetterGenerateComponent
|
LetterRequestByAdminApprovalComponent, ApproveFinancialDataComponent, AuthorizedPersonsComponent, AuthorizedPersonComponent, LetterGenerateComponent
|
||||||
],
|
],
|
||||||
|
|
||||||
imports: [
|
imports: [
|
||||||
|
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
<app-loading-panel> </app-loading-panel>
|
|
||||||
<div class="card" style="padding:10px;">
|
|
||||||
<div class="p-grid">
|
|
||||||
<div class="p-col-12">
|
|
||||||
<div class="p-grid">
|
|
||||||
<div class="p-col-4 p-md-2">
|
|
||||||
<label>Employee(s)</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-8 p-md-4">
|
|
||||||
<!-- <app-employee-picker (ItemSelected)="GetSelectedEmployee($event)" [setSelectedEmp]="selectedEmps"
|
|
||||||
[MultiSelect]="true"></app-employee-picker> -->
|
|
||||||
<app-employee-picker (ItemSelected)="GetSelectedEmployee($event)"
|
|
||||||
[MultiSelect]="true"></app-employee-picker>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-4 p-md-2">
|
|
||||||
<label>Letter</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-8 p-md-4">
|
|
||||||
<kendo-dropdownlist [(ngModel)]="selectedreportType" [data]="reportTypes" [textField]="'text'"
|
|
||||||
[valueField]="'value'" [defaultItem]="{ text: 'Select Letter..', value: null }"
|
|
||||||
(valueChange)="onSelectReport($event)">
|
|
||||||
</kendo-dropdownlist>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12">
|
|
||||||
<kendo-grid #grid [data]="selectedEmps" [kendoGridSelectBy]="'employeeID'" [selectedKeys]="mySelection" [pageable]="false" [sortable]="true" [reorderable]="true"
|
|
||||||
[resizable]="true">
|
|
||||||
<!-- <ng-template kendoGridToolbarTemplate>
|
|
||||||
<button type="button" kendoButton icon="delete" class="kt-delete" (click)="onClickRemoveAll()">
|
|
||||||
Remove All
|
|
||||||
</button>
|
|
||||||
<kendo-grid-spacer></kendo-grid-spacer>
|
|
||||||
<label>Attendance Count: {{employeeList.length}} </label>
|
|
||||||
</ng-template> -->
|
|
||||||
<kendo-grid-checkbox-column [resizable]="false" [width]="45" showSelectAll="true">
|
|
||||||
</kendo-grid-checkbox-column>
|
|
||||||
<kendo-grid-column field="employeeNo" title="Employee No" [width]="150">
|
|
||||||
</kendo-grid-column>
|
|
||||||
<kendo-grid-column field="name" title="Employee Name" [width]="220">
|
|
||||||
</kendo-grid-column>
|
|
||||||
<kendo-grid-column field="departmentName" title="Department" [width]="220">
|
|
||||||
</kendo-grid-column>
|
|
||||||
<kendo-grid-column field="gradeName" title="Grade" [width]="220">
|
|
||||||
</kendo-grid-column>
|
|
||||||
<!-- <kendo-grid-column title="Actions" width="25%" align="middle">
|
|
||||||
<ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">
|
|
||||||
<button kendoButton class="kt-delete" icon="delete" style="width: fit-content;"
|
|
||||||
(click)="onClickRemove(dataItem)">Remove</button>
|
|
||||||
</ng-template>
|
|
||||||
</kendo-grid-column> -->
|
|
||||||
</kendo-grid>
|
|
||||||
<div class="p-col-12" align="right">
|
|
||||||
<button kendoButton icon="upload" type="button" (click)="generateLetter()" [primary] = true>Generate</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,162 +0,0 @@
|
||||||
import { error } from 'console';
|
|
||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import { DynamicPicker, EnumDynamicpickerType } from '../../picker/dynamic-picker/Dynamic-Picker';
|
|
||||||
import { SearchEmployee } from 'src/app/_models/Employee/searchEmployee';
|
|
||||||
import { Router } from '@angular/router';
|
|
||||||
import { ApiService } from 'src/app/app.api.service';
|
|
||||||
import { HRMNotificationService } from 'src/app/app.notification.service';
|
|
||||||
import { loadingPanelService } from 'src/app/hrm-loding panel/loding.panel.service';
|
|
||||||
import { BasicService } from 'src/app/_services/Basic/basic.service';
|
|
||||||
import { Department } from 'src/app/_models/Basic/department';
|
|
||||||
import { Grade } from 'src/app/_models/Basic/grade';
|
|
||||||
import { EnumStatus } from '../../_models/enums';
|
|
||||||
import { Employee } from 'src/app/_models/Employee/employee';
|
|
||||||
import { LetterRequestService } from 'src/app/_services/letter-request/letter-request.service';
|
|
||||||
import { saveAs } from 'file-saver';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-exception-letter-generate',
|
|
||||||
templateUrl: './exception-letter-generate.component.html',
|
|
||||||
styleUrls: ['./exception-letter-generate.component.scss']
|
|
||||||
})
|
|
||||||
export class ExceptionLetterGenerateComponent implements OnInit {
|
|
||||||
|
|
||||||
public selectedEmps: SearchEmployee[] = [];
|
|
||||||
public mySelection: number[] = [];
|
|
||||||
|
|
||||||
public selectedreportType: EnumExceptionLetterTemplateType;
|
|
||||||
public reportTypes = Object.keys(EnumExceptionLetterTemplateType)
|
|
||||||
.filter(key => !isNaN(Number(EnumExceptionLetterTemplateType[key])))
|
|
||||||
.map(key => ({
|
|
||||||
text: key.replace(/_/g, ' '),
|
|
||||||
value: EnumExceptionLetterTemplateType[key]
|
|
||||||
}));
|
|
||||||
public allDepartments: Department[];
|
|
||||||
public allGrades: Grade[];
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
public router: Router, public loadingPanel: loadingPanelService,
|
|
||||||
public notificationService: HRMNotificationService,
|
|
||||||
public apiService: ApiService,
|
|
||||||
public basicService: BasicService, public letterRequestService: LetterRequestService) {
|
|
||||||
this.apiService.selectedMenuName = 'Employee Letter Generation';
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
|
||||||
// this.basicService.getAllDepartment(EnumStatus.Active).subscribe(
|
|
||||||
// (resp) => {
|
|
||||||
// this.allDepartments = resp;
|
|
||||||
// },
|
|
||||||
// (err: any) => {
|
|
||||||
// this.notificationService.showError(err.error);
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// this.basicService.getAllGrade(EnumStatus.Active).subscribe(
|
|
||||||
// (resp) => {
|
|
||||||
// this.allGrades = resp;
|
|
||||||
// },
|
|
||||||
// (err: any) => {
|
|
||||||
// this.notificationService.showError(err.error);
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
}
|
|
||||||
public GetSelectedEmployee(childData) {
|
|
||||||
this.selectedEmps = childData;
|
|
||||||
// this.selectedEmps.forEach(element => {
|
|
||||||
// element.departmentName = this.allDepartments.find(d => d.id == element.departmentID).name;
|
|
||||||
// element.gradeName = this.allDepartments.find(g => g.id == element.gradeID).name;
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
|
|
||||||
public onSelectReport(value: any) {
|
|
||||||
debugger;
|
|
||||||
}
|
|
||||||
generateLetter() {
|
|
||||||
let employeeDataToGenerate: SearchEmployee[] = [];
|
|
||||||
this.selectedEmps.forEach(element => {
|
|
||||||
this.mySelection.forEach(item => {
|
|
||||||
if (element.employeeID == item) employeeDataToGenerate.push(element);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.selectedreportType;
|
|
||||||
if (this.selectedreportType == undefined || this.selectedreportType['value'] == null) {
|
|
||||||
this.notificationService.showWarning("Please select a Letter to Generate");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (employeeDataToGenerate.length <= 0) {
|
|
||||||
this.notificationService.showWarning("Please select Employee to Generate Letter");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.loadingPanel.ShowLoadingPanel = true;
|
|
||||||
this.letterRequestService.generatedExceptiinLetter(this.selectedreportType['value'], employeeDataToGenerate).subscribe(
|
|
||||||
(resp: any[]) => {
|
|
||||||
debugger
|
|
||||||
if (resp.length > 0) {
|
|
||||||
resp.forEach(fileData => {
|
|
||||||
// this.downloadBlob(new Blob([fileData.fileContents], { type: 'application/msword' }), 'application/msword', fileData.fileDownloadName);
|
|
||||||
this.downloadFileWord(fileData.fileContents, fileData.fileDownloadName);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loadingPanel.ShowLoadingPanel = false;
|
|
||||||
},
|
|
||||||
(err: any) => {
|
|
||||||
this.notificationService.showError(err.error);
|
|
||||||
this.loadingPanel.ShowLoadingPanel = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private downloadBlob(data: any, type: string, fileName: string): void {
|
|
||||||
const blob: Blob = new Blob([data], { type: type });
|
|
||||||
// const fileName: string = this.workOrderBillReceive.UploadAttachment[0].OriginalFileName;
|
|
||||||
// const fileName: string = fileName;
|
|
||||||
const objectUrl: string = URL.createObjectURL(blob);
|
|
||||||
const a: HTMLAnchorElement = document.createElement('a') as HTMLAnchorElement;
|
|
||||||
|
|
||||||
a.href = objectUrl;
|
|
||||||
a.download = fileName;
|
|
||||||
document.body.appendChild(a);
|
|
||||||
a.click();
|
|
||||||
|
|
||||||
document.body.removeChild(a);
|
|
||||||
URL.revokeObjectURL(objectUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
downloadFileWord(blobContent, fileName) {
|
|
||||||
// const blob = new Blob([this.b64toBlob(blobContent, 'application/data:application/vnd.openxmlformats-officedocument.wordprocessingml.document', 1024)], {});
|
|
||||||
// saveAs(blob, fileName + '.docx');
|
|
||||||
const blob = new Blob([this.b64toBlob(blobContent, 'application/msword', 1024)], {});
|
|
||||||
saveAs(blob, fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
b64toBlob(b64Data, contentType, sliceSize) {
|
|
||||||
const byteCharacters = atob(b64Data);
|
|
||||||
const byteArrays = [];
|
|
||||||
|
|
||||||
for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
|
|
||||||
const slice = byteCharacters.slice(offset, offset + sliceSize);
|
|
||||||
|
|
||||||
const byteNumbers = new Array(slice.length);
|
|
||||||
for (let i = 0; i < slice.length; i++) {
|
|
||||||
byteNumbers[i] = slice.charCodeAt(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
const byteArray = new Uint8Array(byteNumbers);
|
|
||||||
byteArrays.push(byteArray);
|
|
||||||
}
|
|
||||||
|
|
||||||
const blob = new Blob(byteArrays, { type: contentType });
|
|
||||||
return blob;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export enum EnumExceptionLetterTemplateType {
|
|
||||||
Letter_Template_Staff = 1,
|
|
||||||
Letter_Template_Worker = 2
|
|
||||||
}
|
|
||||||
|
|
@ -55,7 +55,6 @@
|
||||||
|
|
||||||
<div class="card" *ngIf="showPopUp" class="blur-background">
|
<div class="card" *ngIf="showPopUp" class="blur-background">
|
||||||
<kendo-window [height]="600" title="{{PDFTitle}}" *ngIf="showPopUp" (close)="closeForm()" [style]="{'min-width': '70%','max-width': '100%', 'max-height': '100%'}">
|
<kendo-window [height]="600" title="{{PDFTitle}}" *ngIf="showPopUp" (close)="closeForm()" [style]="{'min-width': '70%','max-width': '100%', 'max-height': '100%'}">
|
||||||
<app-loading-panel></app-loading-panel>
|
|
||||||
<div class='embed-responsive'>
|
<div class='embed-responsive'>
|
||||||
<iframe class="pdf-viewer" id="pdf-viewer-ml" type='application/pdf' [zoom]="zoomLevel"></iframe>
|
<iframe class="pdf-viewer" id="pdf-viewer-ml" type='application/pdf' [zoom]="zoomLevel"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ export class LetterGenerateComponent implements OnInit {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
this.showPopUp = true;
|
this.showPopUp = true;
|
||||||
this.loadingPanelService.ShowLoadingPanel = true;
|
|
||||||
this.reportService.getAppointmentLetter(data).subscribe(
|
this.reportService.getAppointmentLetter(data).subscribe(
|
||||||
(resp: any) => {
|
(resp: any) => {
|
||||||
if (this.reportType === 'PDF'){
|
if (this.reportType === 'PDF'){
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ export class ApiService {
|
||||||
|
|
||||||
public isSSO = false;
|
public isSSO = false;
|
||||||
public versionDeployement = false;
|
public versionDeployement = false;
|
||||||
public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 25))}-`+"01";
|
public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 0, 16))}-`+"01";
|
||||||
public static BASE_URL = '';
|
public static BASE_URL = '';
|
||||||
public base_url = '';
|
public base_url = '';
|
||||||
// public currentLink = '';
|
// public currentLink = '';
|
||||||
|
|
|
||||||
|
|
@ -11,25 +11,13 @@
|
||||||
<app-employee-picker [MultiSelect]="true"
|
<app-employee-picker [MultiSelect]="true"
|
||||||
(ItemSelected)="GetSelectedEmployee($event)"></app-employee-picker>
|
(ItemSelected)="GetSelectedEmployee($event)"></app-employee-picker>
|
||||||
</div>
|
</div>
|
||||||
<div class="rosterAssignmentControls">
|
|
||||||
<strong>
|
|
||||||
<label>Roster Type: </label>
|
|
||||||
</strong>
|
|
||||||
</div>
|
|
||||||
<div class="rosterAssignmentControls">
|
|
||||||
<kendo-dropdownlist [(ngModel)]="selectedWorkPlanTypeIsFixed" [data]="workPlanTypes"
|
|
||||||
[defaultItem]="{ text: 'Select Roster Type..', value: null }" [textField]="'text'" [valueField]="'value'"
|
|
||||||
(valueChange)="onChangeWorkPlanType($event)" [valuePrimitive]="true"
|
|
||||||
class="form-control form-control-sm input-sm" formControlName="type">
|
|
||||||
</kendo-dropdownlist>
|
|
||||||
</div>
|
|
||||||
<div class="rosterAssignmentControls">
|
<div class="rosterAssignmentControls">
|
||||||
<strong>
|
<strong>
|
||||||
<label>Roster: </label>
|
<label>Roster: </label>
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="rosterAssignmentControls">
|
<div class="rosterAssignmentControls">
|
||||||
<kendo-dropdownlist [(ngModel)]="selectedWorkPlanID" [data]="workPlanGroupListByType"
|
<kendo-dropdownlist [(ngModel)]="selectedWorkPlanID" [data]="workPlanGroupList"
|
||||||
[defaultItem]="{ name: 'Select..', value: null }" [textField]="'name'" [valueField]="'id'"
|
[defaultItem]="{ name: 'Select..', value: null }" [textField]="'name'" [valueField]="'id'"
|
||||||
(valueChange)="populateEmpWorkPlanByWorkGroup($event)" [valuePrimitive]="true"
|
(valueChange)="populateEmpWorkPlanByWorkGroup($event)" [valuePrimitive]="true"
|
||||||
class="form-control form-control-sm input-sm" formControlName="group">
|
class="form-control form-control-sm input-sm" formControlName="group">
|
||||||
|
|
|
||||||
|
|
@ -31,23 +31,16 @@ export class EchotexRosterAssignmentComponent implements OnInit {
|
||||||
workPlanGroupName = '';
|
workPlanGroupName = '';
|
||||||
workPlanGroupInitialShift = '';
|
workPlanGroupInitialShift = '';
|
||||||
workPlanGroupList: WorkPlanGroup[];
|
workPlanGroupList: WorkPlanGroup[];
|
||||||
workPlanGroupListByType: WorkPlanGroup[] = [];
|
|
||||||
selectedEmployees: SearchEmployee[];
|
selectedEmployees: SearchEmployee[];
|
||||||
employees: Employee[];
|
employees: Employee[];
|
||||||
empIds: number[] = [];
|
empIds: number[] = [];
|
||||||
exportExcelFileName: string = '';
|
exportExcelFileName: string = '';
|
||||||
|
|
||||||
selectedWorkPlanTypeIsFixed: boolean;
|
|
||||||
selectedWorkPlanID: number;
|
selectedWorkPlanID: number;
|
||||||
fixedWorkPlan: boolean = true;
|
fixedWorkPlan: boolean = true;
|
||||||
startDate: Date;
|
startDate: Date;
|
||||||
holidayDayOfWeekArray = Object.values(HolidayDayOfWeek);
|
holidayDayOfWeekArray = Object.values(HolidayDayOfWeek);
|
||||||
|
|
||||||
workPlanTypes: { text: string, value: boolean| null }[] = [
|
|
||||||
{ text: 'Fixed', value: true },
|
|
||||||
{ text: 'Counter Clock', value: false }
|
|
||||||
]
|
|
||||||
|
|
||||||
constructor(public employeeService: EmployeeServices,
|
constructor(public employeeService: EmployeeServices,
|
||||||
public attendanceServices: AttendanceServices,
|
public attendanceServices: AttendanceServices,
|
||||||
public apiService: ApiService,
|
public apiService: ApiService,
|
||||||
|
|
@ -92,7 +85,6 @@ export class EchotexRosterAssignmentComponent implements OnInit {
|
||||||
|
|
||||||
createForm() {
|
createForm() {
|
||||||
this.rosterAssignmentForm = new FormBuilder().group({
|
this.rosterAssignmentForm = new FormBuilder().group({
|
||||||
type: ['', Validators.required],
|
|
||||||
group: ['', Validators.required],
|
group: ['', Validators.required],
|
||||||
startDate: [''],
|
startDate: [''],
|
||||||
});
|
});
|
||||||
|
|
@ -210,13 +202,13 @@ export class EchotexRosterAssignmentComponent implements OnInit {
|
||||||
this.loadingPanel.ShowLoadingPanel = true;
|
this.loadingPanel.ShowLoadingPanel = true;
|
||||||
this.empWorkPlanSetupList = [];
|
this.empWorkPlanSetupList = [];
|
||||||
debugger;
|
debugger;
|
||||||
// if (workPlanGroup.type != EnumWorkPlanGroup.Fixed &&
|
if (workPlanGroup.type != EnumWorkPlanGroup.Fixed &&
|
||||||
// (workPlanGroup.type != undefined || workPlanGroup.type != null)) {
|
(workPlanGroup.type != undefined || workPlanGroup.type != null)) {
|
||||||
// this.fixedWorkPlan = false;
|
this.fixedWorkPlan = false;
|
||||||
// this.startDate = new Date();
|
this.startDate = new Date();
|
||||||
// } else {
|
} else {
|
||||||
// this.fixedWorkPlan = true;
|
this.fixedWorkPlan = true;
|
||||||
// }
|
}
|
||||||
this.attendanceServices.getEmployeeWorkPlanSetupByWPGroupID(workPlanGroup.id).subscribe(
|
this.attendanceServices.getEmployeeWorkPlanSetupByWPGroupID(workPlanGroup.id).subscribe(
|
||||||
(resp) => {
|
(resp) => {
|
||||||
this.empWorkPlanSetupList = resp;
|
this.empWorkPlanSetupList = resp;
|
||||||
|
|
@ -339,7 +331,7 @@ export class EchotexRosterAssignmentComponent implements OnInit {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getHolidayDayOfWeek(day: number): string {
|
public getHolidayDayOfWeek( day: number): string {
|
||||||
debugger;
|
debugger;
|
||||||
day = day + 1;
|
day = day + 1;
|
||||||
switch (day) {
|
switch (day) {
|
||||||
|
|
@ -373,23 +365,4 @@ export class EchotexRosterAssignmentComponent implements OnInit {
|
||||||
// return dayIndex as EnumDayOfWeek;
|
// return dayIndex as EnumDayOfWeek;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
onChangeWorkPlanType(type: any) {
|
|
||||||
this.empWorkPlanSetupList = [];
|
|
||||||
this.workPlanGroupListByType = [];
|
|
||||||
this.selectedWorkPlanID = null;
|
|
||||||
this.fixedWorkPlan = true;
|
|
||||||
if (type == undefined || type == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (type){
|
|
||||||
this.workPlanGroupListByType = this.workPlanGroupList.filter(y => y.type == EnumWorkPlanGroup.Fixed);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.workPlanGroupListByType = this.workPlanGroupList.filter(y => y.type != EnumWorkPlanGroup.Fixed);
|
|
||||||
this.fixedWorkPlan = false;
|
|
||||||
this.startDate = new Date();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,9 @@
|
||||||
<div class="p-col-12 p-md-6 p-lg-4" >
|
<div class="p-col-12 p-md-6 p-lg-4" >
|
||||||
<kendo-dropdownlist [(ngModel)]="selectedEducationTypeID" [data]="educationTypes"
|
<kendo-dropdownlist [(ngModel)]="selectedEducationTypeID" [data]="educationTypes"
|
||||||
[defaultItem]="{ description: 'Select a Level', id: null }" [textField]="'description'"
|
[defaultItem]="{ description: 'Select a Level', id: null }" [textField]="'description'"
|
||||||
[valueField]="'id'" [valuePrimitive]="true"
|
[valueField]="'id'" [valuePrimitive]="true" (valueChange)="selectEducationTypeEvent($event)"
|
||||||
class="form-control form-control-sm input-sm" formControlName="educationTypePicker"
|
class="form-control form-control-sm input-sm" formControlName="educationTypePicker"
|
||||||
style="width:100%;">
|
style="width:100%;">
|
||||||
<!-- (valueChange)="selectEducationTypeEvent($event)" -->
|
|
||||||
</kendo-dropdownlist>
|
</kendo-dropdownlist>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -24,10 +23,9 @@
|
||||||
<kendo-dropdownlist [(ngModel)]="selectedEducationLevelID" [data]="educationLevels"
|
<kendo-dropdownlist [(ngModel)]="selectedEducationLevelID" [data]="educationLevels"
|
||||||
[defaultItem]="{ description: 'Select Exam / Degree Title', id: null }" [textField]="'description'"
|
[defaultItem]="{ description: 'Select Exam / Degree Title', id: null }" [textField]="'description'"
|
||||||
[valueField]="'id'" [valuePrimitive]="true" class="form-control form-control-sm input-sm"
|
[valueField]="'id'" [valuePrimitive]="true" class="form-control form-control-sm input-sm"
|
||||||
formControlName="educationLevelPicker"
|
formControlName="educationLevelPicker" (valueChange)="selectEducationLevelEvent($event)"
|
||||||
|
[disabled]="selectedEducationTypeID == undefined || selectedEducationTypeID == null"
|
||||||
style="width:100%;">
|
style="width:100%;">
|
||||||
<!-- (valueChange)="selectEducationLevelEvent($event)"
|
|
||||||
[disabled]="selectedEducationTypeID == undefined || selectedEducationTypeID == null" -->
|
|
||||||
</kendo-dropdownlist>
|
</kendo-dropdownlist>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -38,10 +36,10 @@
|
||||||
<kendo-dropdownlist [(ngModel)]="selectedInstitutionID" [data]="institutions"
|
<kendo-dropdownlist [(ngModel)]="selectedInstitutionID" [data]="institutions"
|
||||||
[defaultItem]="{ name: 'Select institution/Board', id: null }" [textField]="'name'"
|
[defaultItem]="{ name: 'Select institution/Board', id: null }" [textField]="'name'"
|
||||||
[valueField]="'id'" [valuePrimitive]="true" class="form-control form-control-sm input-sm"
|
[valueField]="'id'" [valuePrimitive]="true" class="form-control form-control-sm input-sm"
|
||||||
|
[disabled]="(selectedEducationTypeID == undefined ||selectedEducationTypeID == null) || (selectedEducationLevelID == undefined || selectedEducationLevelID == null)"
|
||||||
[filterable]="true" (filterChange)="handleFilterInstitution($event)"
|
[filterable]="true" (filterChange)="handleFilterInstitution($event)"
|
||||||
(valueChange)="selectInstitutionEvent($event)" formControlName="institutionPicker"
|
(valueChange)="selectInstitutionEvent($event)" formControlName="institutionPicker"
|
||||||
style="width:100%;">
|
style="width:100%;">
|
||||||
<!-- [disabled]="(selectedEducationTypeID == undefined ||selectedEducationTypeID == null) || (selectedEducationLevelID == undefined || selectedEducationLevelID == null)" -->
|
|
||||||
</kendo-dropdownlist>
|
</kendo-dropdownlist>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -52,10 +50,10 @@
|
||||||
<kendo-dropdownlist class="form-control form-control-sm" id="subject" [data]="educationDiscipline"
|
<kendo-dropdownlist class="form-control form-control-sm" id="subject" [data]="educationDiscipline"
|
||||||
[defaultItem]="{ description: 'Select a discipline', id: null }" [textField]="'description'"
|
[defaultItem]="{ description: 'Select a discipline', id: null }" [textField]="'description'"
|
||||||
[valueField]="'id'" [valuePrimitive]="true" [(ngModel)]="selectedDisciplineID"
|
[valueField]="'id'" [valuePrimitive]="true" [(ngModel)]="selectedDisciplineID"
|
||||||
|
[disabled]="isEditActive"
|
||||||
|
[disabled]="selectedEducationLevelID == undefined || selectedEducationLevelID == null"
|
||||||
[filterable]="true" (filterChange)="handleFilter($event)" formControlName="disciplinePicker"
|
[filterable]="true" (filterChange)="handleFilter($event)" formControlName="disciplinePicker"
|
||||||
style="width:100%">
|
style="width:100%">
|
||||||
<!-- [disabled]="isEditActive"
|
|
||||||
[disabled]="selectedEducationLevelID == undefined || selectedEducationLevelID == null" -->
|
|
||||||
</kendo-dropdownlist>
|
</kendo-dropdownlist>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -96,23 +94,19 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
<div class="p-col-12 p-md-6 p-lg-2" *ngIf="isGrade" style="margin: auto;">
|
||||||
<!-- *ngIf="isGrade" -->
|
|
||||||
<label for="txtCgpaObtained">CGPA/Marks</label>
|
<label for="txtCgpaObtained">CGPA/Marks</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-6 p-lg-4">
|
<div class="p-col-12 p-md-6 p-lg-4" *ngIf="isGrade" >
|
||||||
<!-- *ngIf="isGrade" -->
|
|
||||||
<input id="txtCgpaObtained" formControlName="gpaOrMarks" [(ngModel)]="academic.gpaOrMarks"
|
<input id="txtCgpaObtained" formControlName="gpaOrMarks" [(ngModel)]="academic.gpaOrMarks"
|
||||||
type="number" style="width: 100%;" pInputText />
|
type="number" style="width: 100%;" pInputText />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2">
|
<div class="p-col-12 p-md-6 p-lg-2" *ngIf="isGrade" >
|
||||||
<!-- *ngIf="isGrade" -->
|
|
||||||
<label for="txtCgpaOutOf">Out of</label>
|
<label for="txtCgpaOutOf">Out of</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-6 p-lg-4"style="margin: auto;">
|
<div class="p-col-12 p-md-6 p-lg-4" *ngIf="isGrade" style="margin: auto;">
|
||||||
<!-- *ngIf="isGrade" -->
|
|
||||||
<input id="txtCgpaOutOf" style="width: 100%;" formControlName="outOf" [(ngModel)]="academic.outOf"
|
<input id="txtCgpaOutOf" style="width: 100%;" formControlName="outOf" [(ngModel)]="academic.outOf"
|
||||||
type="number" pInputText />
|
type="number" pInputText />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import { BasicService } from '../../../../_services/Basic/basic.service';
|
||||||
import { enumEmpFileUploadType, EnumStatus } from '../../../../_models/enums';
|
import { enumEmpFileUploadType, EnumStatus } from '../../../../_models/enums';
|
||||||
import { loadingPanelService } from '../../../../hrm-loding panel/loding.panel.service';
|
import { loadingPanelService } from '../../../../hrm-loding panel/loding.panel.service';
|
||||||
import { empFileuploads } from '../../../../_models/HREmployee/hrEmployee';
|
import { empFileuploads } from '../../../../_models/HREmployee/hrEmployee';
|
||||||
import { forkJoin } from 'rxjs';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-academic-entry',
|
selector: 'app-academic-entry',
|
||||||
|
|
@ -116,139 +115,84 @@ export class AcademicEntryComponent implements OnInit {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
loadData() {
|
loadData() {
|
||||||
// this.basicService.getAllEducationLevel().subscribe(
|
this.basicService.getAllEducationLevel().subscribe(
|
||||||
// (resp) => {
|
(resp) => {
|
||||||
// this.alleducationLevels = resp;
|
this.alleducationLevels = resp;
|
||||||
// },
|
|
||||||
// (err: any) => {
|
|
||||||
// console.log(err);
|
|
||||||
// },
|
|
||||||
// () => {
|
|
||||||
// // if (this.academic.id > 0) {
|
|
||||||
// // this.educationLevels = this.alleducationLevels//.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
|
||||||
// // }
|
|
||||||
// // else {
|
|
||||||
// this.educationLevels = this.alleducationLevels//.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
|
||||||
// // }
|
|
||||||
// this.basicService.getAllDiscipline().subscribe(
|
|
||||||
// (resp) => {
|
|
||||||
// this.alleducationDiscipline = resp;
|
|
||||||
// },
|
|
||||||
// (err: any) => {
|
|
||||||
// console.log(err);
|
|
||||||
// },
|
|
||||||
// () => {
|
|
||||||
// // if (this.academic.id > 0) {
|
|
||||||
// // // this.educationDiscipline = this.alleducationDiscipline.filter(x => x.educationLevelID == this.academic.educationLevelID);
|
|
||||||
// // // this.educationDiscipline = this.alleducationDiscipline.filter(x => x.id == this.academic.disciplineID);
|
|
||||||
// // this.educationDiscipline = this.alleducationDiscipline;
|
|
||||||
// // }
|
|
||||||
// // else {
|
|
||||||
// // this.educationDiscipline = this.alleducationDiscipline.filter(x => x.educationLevelID == this.academic.educationLevelID);
|
|
||||||
// this.educationDiscipline = this.alleducationDiscipline;
|
|
||||||
// // }
|
|
||||||
|
|
||||||
|
|
||||||
// this.basicService.getAllInstitutions().subscribe(
|
|
||||||
// (resp) => {
|
|
||||||
// this.allinstitutions = resp;
|
|
||||||
// },
|
|
||||||
// (err: any) => {
|
|
||||||
// console.log(err);
|
|
||||||
// },
|
|
||||||
// () => {
|
|
||||||
// if (this.academic.id > 0) {
|
|
||||||
// // this.institutions = this.allinstitutions.filter(x => x.boardRequired == this.academic.educationType.boardRequired);
|
|
||||||
// if (this.academic.institution != undefined && this.academic.institution.boardRequired)
|
|
||||||
// // this.institutions = this.allinstitutions.filter(x => x.id == this.academic.institutionID || x.boardRequired == true);
|
|
||||||
// this.institutions = this.allinstitutions.filter(x => x.boardRequired == true);
|
|
||||||
// else
|
|
||||||
// // this.institutions = this.allinstitutions.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
|
||||||
// this.institutions = this.allinstitutions.filter(x => x.boardRequired == false);
|
|
||||||
// }
|
|
||||||
// //console.log(this.institutions);
|
|
||||||
|
|
||||||
// this.basicService.getAllResultTypesByStatus(EnumStatus.Regardless).subscribe(
|
|
||||||
// (resp) => {
|
|
||||||
// this.allresultTypes = resp;
|
|
||||||
// },
|
|
||||||
// (err: any) => {
|
|
||||||
// console.log(err);
|
|
||||||
// },
|
|
||||||
// () => {
|
|
||||||
// if (this.academic.id > 0)
|
|
||||||
// //console.log(this.allresultTypes);
|
|
||||||
// if (this.academic.id > 0) {
|
|
||||||
// let selectedEducationType: EducationType[] = this.educationTypes//.filter(x => x.id == this.academic.educationTypeID)
|
|
||||||
// // this.resultTypes = this.allresultTypes.filter(x => x.type == selectedEducationType[0].resultType);
|
|
||||||
// // if (selectedEducationType[0].resultType === 2 || selectedEducationType[0].resultType === 4) {
|
|
||||||
// // this.isGrade = true;
|
|
||||||
// // }
|
|
||||||
// // else {
|
|
||||||
// // this.isGrade = false;
|
|
||||||
// // }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// let educationType = this.educationTypes.find(x => x.description.toLowerCase() == "academic");
|
|
||||||
// if (this.academic.id == 0 && educationType != undefined) {
|
|
||||||
// this.academic.educationTypeID = educationType.id;
|
|
||||||
// this.selectedEducationTypeID = this.academic.educationTypeID;
|
|
||||||
// this.academic.examDate = new Date().getFullYear();
|
|
||||||
// this.academic.passingYear = new Date().getFullYear();
|
|
||||||
// this.selectEducationTypeEvent(educationType.id);
|
|
||||||
// let descp = this.alleducationDiscipline.find(d => d.description.toLowerCase() == 'nil');
|
|
||||||
// this.academic.disciplineID = descp != undefined ? descp.id : 0;
|
|
||||||
// let inst = this.allinstitutions.find(d => d.name.toLowerCase() == 'Institute of Chartered Secretary of Bangladesh'.toLowerCase());
|
|
||||||
// this.academic.institutionID = inst != undefined ? inst.id : 0;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
const educationlevelService = this.basicService.getAllEducationLevel();
|
|
||||||
const disciplineService = this.basicService.getAllDiscipline();
|
|
||||||
const institutionService = this.basicService.getAllInstitutions();
|
|
||||||
const resultTyoeService = this.basicService.getAllResultTypesByStatus(EnumStatus.Regardless);
|
|
||||||
|
|
||||||
this.loadingPanelService.ShowLoadingPanel = true;
|
|
||||||
forkJoin(educationlevelService, disciplineService, institutionService, resultTyoeService).subscribe(
|
|
||||||
([res1, res2, res3, res4]) => {
|
|
||||||
this.alleducationLevels = res1;
|
|
||||||
this.alleducationDiscipline = res2;
|
|
||||||
this.allinstitutions = res3;
|
|
||||||
this.allresultTypes = res4;
|
|
||||||
},
|
},
|
||||||
(x) => {
|
(err: any) => {
|
||||||
this.loadingPanelService.ShowLoadingPanel = false;
|
console.log(err);
|
||||||
console.log(x);
|
|
||||||
this.notificationService.showError(x.error);
|
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.educationLevels = this.alleducationLevels;
|
if (this.academic.id > 0) {
|
||||||
this.educationDiscipline = this.alleducationDiscipline;
|
this.educationLevels = this.alleducationLevels.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
||||||
this.institutions = this.allinstitutions;
|
|
||||||
this.resultTypes = this.allresultTypes;
|
|
||||||
|
|
||||||
this.loadingPanelService.ShowLoadingPanel = false;
|
|
||||||
let educationType = this.educationTypes.find(x => x.description.toLowerCase() == "academic");
|
|
||||||
if (this.academic.id == 0 && educationType != undefined) {
|
|
||||||
this.academic.educationTypeID = educationType.id;
|
|
||||||
this.selectedEducationTypeID = this.academic.educationTypeID;
|
|
||||||
let descp = this.alleducationDiscipline.find(d => d.description.toLowerCase() == 'nil');
|
|
||||||
this.academic.disciplineID = descp != undefined ? descp.id : 0;
|
|
||||||
this.selectedDisciplineID = this.academic.disciplineID;
|
|
||||||
let inst = this.allinstitutions.find(d => d.name.toLowerCase() == 'Institute of Chartered Secretary of Bangladesh'.toLowerCase());
|
|
||||||
this.academic.institutionID = inst != undefined ? inst.id : 0;
|
|
||||||
this. selectedInstitutionID = this.academic.institutionID;
|
|
||||||
this.academic.examDate = new Date().getFullYear();
|
|
||||||
this.academic.passingYear = new Date().getFullYear();
|
|
||||||
// this.selectEducationTypeEvent(educationType.id);
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
this.educationLevels = this.alleducationLevels.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
||||||
|
}
|
||||||
|
this.basicService.getAllDiscipline().subscribe(
|
||||||
|
(resp) => {
|
||||||
|
this.alleducationDiscipline = resp;
|
||||||
|
},
|
||||||
|
(err: any) => {
|
||||||
|
console.log(err);
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
if (this.academic.id > 0) {
|
||||||
|
// this.educationDiscipline = this.alleducationDiscipline.filter(x => x.educationLevelID == this.academic.educationLevelID);
|
||||||
|
// this.educationDiscipline = this.alleducationDiscipline.filter(x => x.id == this.academic.disciplineID);
|
||||||
|
this.educationDiscipline = this.alleducationDiscipline;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// this.educationDiscipline = this.alleducationDiscipline.filter(x => x.educationLevelID == this.academic.educationLevelID);
|
||||||
|
this.educationDiscipline = this.alleducationDiscipline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.basicService.getAllInstitutions().subscribe(
|
||||||
|
(resp) => {
|
||||||
|
this.allinstitutions = resp;
|
||||||
|
},
|
||||||
|
(err: any) => {
|
||||||
|
console.log(err);
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
if (this.academic.id > 0) {
|
||||||
|
// this.institutions = this.allinstitutions.filter(x => x.boardRequired == this.academic.educationType.boardRequired);
|
||||||
|
if (this.academic.institution.boardRequired)
|
||||||
|
// this.institutions = this.allinstitutions.filter(x => x.id == this.academic.institutionID || x.boardRequired == true);
|
||||||
|
this.institutions = this.allinstitutions.filter(x => x.boardRequired == true);
|
||||||
|
else
|
||||||
|
// this.institutions = this.allinstitutions.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
||||||
|
this.institutions = this.allinstitutions.filter(x => x.boardRequired == false);
|
||||||
|
}
|
||||||
|
//console.log(this.institutions);
|
||||||
|
|
||||||
|
this.basicService.getAllResultTypesByStatus(EnumStatus.Regardless).subscribe(
|
||||||
|
(resp) => {
|
||||||
|
this.allresultTypes = resp;
|
||||||
|
},
|
||||||
|
(err: any) => {
|
||||||
|
console.log(err);
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
if (this.academic.id > 0)
|
||||||
|
//console.log(this.allresultTypes);
|
||||||
|
if (this.academic.id > 0) {
|
||||||
|
let selectedEducationType: EducationType[] = this.educationTypes.filter(x => x.id == this.academic.educationTypeID)
|
||||||
|
// this.resultTypes = this.allresultTypes.filter(x => x.type == selectedEducationType[0].resultType);
|
||||||
|
// if (selectedEducationType[0].resultType === 2 || selectedEducationType[0].resultType === 4) {
|
||||||
|
// this.isGrade = true;
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// this.isGrade = false;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -266,8 +210,8 @@ export class AcademicEntryComponent implements OnInit {
|
||||||
}
|
}
|
||||||
selectEducationTypeEvent(typeid: number) {
|
selectEducationTypeEvent(typeid: number) {
|
||||||
if (typeid !== null) {
|
if (typeid !== null) {
|
||||||
this.educationLevels = this.alleducationLevels//.filter(x => x.educationTypeID == typeid);
|
this.educationLevels = this.alleducationLevels.filter(x => x.educationTypeID == typeid);
|
||||||
let selectedEducationType: EducationType[] = this.educationTypes//.filter(x => x.id == this.academic.educationTypeID)
|
let selectedEducationType: EducationType[] = this.educationTypes.filter(x => x.id == this.academic.educationTypeID)
|
||||||
// this.institutions = this.allinstitutions.filter(x => x.boardRequired == selectedEducationType[0].boardRequired);
|
// this.institutions = this.allinstitutions.filter(x => x.boardRequired == selectedEducationType[0].boardRequired);
|
||||||
// this.institutions = this.allinstitutions.filter(x => x.educationTypeID == typeid);
|
// this.institutions = this.allinstitutions.filter(x => x.educationTypeID == typeid);
|
||||||
this.institutions = this.allinstitutions;
|
this.institutions = this.allinstitutions;
|
||||||
|
|
@ -306,7 +250,7 @@ export class AcademicEntryComponent implements OnInit {
|
||||||
if (seletedInstitution.boardRequired == true) resultType = 1;
|
if (seletedInstitution.boardRequired == true) resultType = 1;
|
||||||
else resultType = 2;
|
else resultType = 2;
|
||||||
if (institutionid !== null)
|
if (institutionid !== null)
|
||||||
this.resultTypes = this.allresultTypes//.filter(x => x.type == resultType);
|
this.resultTypes = this.allresultTypes.filter(x => x.type == resultType);
|
||||||
|
|
||||||
this.selectedResultTypeID = null;
|
this.selectedResultTypeID = null;
|
||||||
this.isGrade = false;
|
this.isGrade = false;
|
||||||
|
|
@ -341,7 +285,7 @@ export class AcademicEntryComponent implements OnInit {
|
||||||
educationLevelPicker: ['', Validators.required],
|
educationLevelPicker: ['', Validators.required],
|
||||||
disciplinePicker: ['', Validators.required],
|
disciplinePicker: ['', Validators.required],
|
||||||
institutionPicker: ['', Validators.required],
|
institutionPicker: ['', Validators.required],
|
||||||
resultTypePicker: [''],
|
resultTypePicker: ['', Validators.required],
|
||||||
examHeldOn: ['', Validators.required],
|
examHeldOn: ['', Validators.required],
|
||||||
passingYear: ['', Validators.required],
|
passingYear: ['', Validators.required],
|
||||||
gpaOrMarks: [''],
|
gpaOrMarks: [''],
|
||||||
|
|
@ -360,12 +304,11 @@ export class AcademicEntryComponent implements OnInit {
|
||||||
this.selectedResultTypeID = this.academic.resultTypeID;
|
this.selectedResultTypeID = this.academic.resultTypeID;
|
||||||
}
|
}
|
||||||
public onSave(e): void {
|
public onSave(e): void {
|
||||||
debugger;
|
|
||||||
this.academic.educationTypeID = this.selectedEducationTypeID;
|
this.academic.educationTypeID = this.selectedEducationTypeID;
|
||||||
this.academic.educationLevelID = this.selectedEducationLevelID;
|
this.academic.educationLevelID = this.selectedEducationLevelID;
|
||||||
this.academic.institutionID = this.selectedInstitutionID;
|
this.academic.institutionID = this.selectedInstitutionID;
|
||||||
this.academic.disciplineID = this.selectedDisciplineID;
|
this.academic.disciplineID = this.selectedDisciplineID;
|
||||||
this.academic.resultTypeID = this.selectedResultTypeID != null ? this.selectedResultTypeID : 0;
|
this.academic.resultTypeID = this.selectedResultTypeID;
|
||||||
if (this.employeeService.hrEmployee.id === undefined || this.employeeService.hrEmployee.id === 0) {
|
if (this.employeeService.hrEmployee.id === undefined || this.employeeService.hrEmployee.id === 0) {
|
||||||
this.notificationService.showWarning('please select an employee');
|
this.notificationService.showWarning('please select an employee');
|
||||||
this.onCancel(null);
|
this.onCancel(null);
|
||||||
|
|
@ -377,9 +320,10 @@ export class AcademicEntryComponent implements OnInit {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.academic.employeeID = this.employeeService.hrEmployee.id;
|
|
||||||
this.academic.createdBy = 0;
|
this.academic.createdBy = 0;
|
||||||
this.academic.createdDate = new Date();
|
this.academic.employeeID = this.employeeService.hrEmployee.id;
|
||||||
|
this.academic.createdDate = new Date(this.academic.createdBy);
|
||||||
|
this.academic.createdBy = 0;
|
||||||
this.loadingPanelService.ShowLoadingPanel = true;
|
this.loadingPanelService.ShowLoadingPanel = true;
|
||||||
this.employeeService.saveEmployeeAcademic(this.academic).subscribe(
|
this.employeeService.saveEmployeeAcademic(this.academic).subscribe(
|
||||||
(resp) => {
|
(resp) => {
|
||||||
|
|
|
||||||
|
|
@ -57,21 +57,6 @@
|
||||||
[(ngModel)]="contact.permanentTelephone" type="text" pInputText style="width:100%">
|
[(ngModel)]="contact.permanentTelephone" type="text" pInputText style="width:100%">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;">
|
|
||||||
<label for="txtPermanentMobilePhone">Mobile Phone</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3">
|
|
||||||
<input id="txtPermanentMobilePhone" formControlName="permanentMobilePhone"
|
|
||||||
[(ngModel)]="contact.permanentMobile" type="text" pInputText style="width:100%">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3">
|
|
||||||
<label for="txtParmanentPOInBangla">Post Office Name</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3">
|
|
||||||
<input id="txtParmanentPO" formControlName="parmanentPO"
|
|
||||||
[(ngModel)]="contact.permanentPO" type="text" pInputText style="width:100%">
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3">
|
<div class="p-col-12 p-md-12 p-lg-3">
|
||||||
<label for="txtParmanentPOInBangla">Post Office Name (Bn)</label>
|
<label for="txtParmanentPOInBangla">Post Office Name (Bn)</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -80,15 +65,21 @@
|
||||||
[(ngModel)]="contact.parmanentPOInBangla" type="text" pInputText style="width:100%">
|
[(ngModel)]="contact.parmanentPOInBangla" type="text" pInputText style="width:100%">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="p-col-12 p-md-12 p-lg-1"></div> -->
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;">
|
<div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;">
|
||||||
|
<label for="txtPermanentMobilePhone">Mobile Phone</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-12 p-md-12 p-lg-3">
|
||||||
|
<input id="txtPermanentMobilePhone" formControlName="permanentMobilePhone"
|
||||||
|
[(ngModel)]="contact.permanentMobile" type="text" pInputText style="width:100%">
|
||||||
|
</div>
|
||||||
|
<div class="p-col-12 p-md-12 p-lg-1"></div>
|
||||||
|
<div class="p-col-12 p-md-12 p-lg-2" style="margin: auto;">
|
||||||
<label for="txtPermanentPostalCode">Postal Code</label>
|
<label for="txtPermanentPostalCode">Postal Code</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-3">
|
<div class="p-col-12 p-md-12 p-lg-3">
|
||||||
<input id="txtPermanentPostalCode" formControlName="permanentPostalCode"
|
<input id="txtPermanentPostalCode" formControlName="permanentPostalCode"
|
||||||
[(ngModel)]="contact.permanentPostCodeNo" type="text" pInputText style="width:100%">
|
[(ngModel)]="contact.permanentPostCodeNo" type="text" pInputText style="width:100%">
|
||||||
</div>
|
</div>
|
||||||
<div class="p-lg-6"></div>
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-12">
|
<div class="p-col-12 p-md-12 p-lg-12">
|
||||||
<label class="k-form-field right">
|
<label class="k-form-field right">
|
||||||
<!-- <input type="checkbox" [(ngModel)]="isSameAddress" (change)="checkAddress()" id="isSameAddress"
|
<!-- <input type="checkbox" [(ngModel)]="isSameAddress" (change)="checkAddress()" id="isSameAddress"
|
||||||
|
|
@ -164,6 +155,15 @@
|
||||||
[readonly]="this.isSameAddress">
|
[readonly]="this.isSameAddress">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="p-col-12 p-md-12 p-lg-3">
|
||||||
|
<label for="txtPresentPOInBangla">Post Office Name(Bn)</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-col-12 p-md-12 p-lg-3">
|
||||||
|
<input class="bangla-font" id="txtPresentPOInBangla" formControlName="presentPOInBangla"
|
||||||
|
[(ngModel)]="contact.presentPOInBangla" type="text" pInputText style="width:100%"
|
||||||
|
[readonly]="this.isSameAddress">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;">
|
<div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;">
|
||||||
<label for="txtPresentMobilePhone">Mobile Phone</label>
|
<label for="txtPresentMobilePhone">Mobile Phone</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -173,27 +173,8 @@
|
||||||
[readonly]="this.isSameAddress">
|
[readonly]="this.isSameAddress">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3">
|
<div class="p-col-12 p-md-12 p-lg-1"></div>
|
||||||
<label for="txtPresentPOInBangla">Post Office Name</label>
|
<div class="p-col-12 p-md-12 p-lg-2" style="margin: auto;">
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3">
|
|
||||||
<input id="txtPresentPO" formControlName="presentPO"
|
|
||||||
[(ngModel)]="contact.presentPO" type="text" pInputText style="width:100%"
|
|
||||||
[readonly]="this.isSameAddress">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3">
|
|
||||||
<label for="txtPresentPOInBangla">Post Office Name (Bn)</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3">
|
|
||||||
<input class="bangla-font" id="txtPresentPOInBangla" formControlName="presentPOInBangla"
|
|
||||||
[(ngModel)]="contact.presentPOInBangla" type="text" pInputText style="width:100%"
|
|
||||||
[readonly]="this.isSameAddress">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="p-col-12 p-md-12 p-lg-1"></div> -->
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;">
|
|
||||||
<label for="txtPresentPostalCode">Postal Code</label>
|
<label for="txtPresentPostalCode">Postal Code</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-3">
|
<div class="p-col-12 p-md-12 p-lg-3">
|
||||||
|
|
@ -201,7 +182,6 @@
|
||||||
[(ngModel)]="contact.presentPostCodeNo" type="text" pInputText style="width:100%"
|
[(ngModel)]="contact.presentPostCodeNo" type="text" pInputText style="width:100%"
|
||||||
[readonly]="this.isSameAddress">
|
[readonly]="this.isSameAddress">
|
||||||
</div>
|
</div>
|
||||||
<div class="p-lg-6"></div>
|
|
||||||
<div class="p-col-12 p-md-12 p-lg-12" style="height: 34px;">
|
<div class="p-col-12 p-md-12 p-lg-12" style="height: 34px;">
|
||||||
<label class="k-form-field right">
|
<label class="k-form-field right">
|
||||||
<!-- <input type="checkbox" [(ngModel)]="isSameAddress" (change)="checkAddress()" id="isSameAddress"
|
<!-- <input type="checkbox" [(ngModel)]="isSameAddress" (change)="checkAddress()" id="isSameAddress"
|
||||||
|
|
|
||||||
|
|
@ -89,8 +89,6 @@ export class ContactComponent implements OnInit {
|
||||||
permanentDistrictDropdown: new FormControl('', Validators.required),
|
permanentDistrictDropdown: new FormControl('', Validators.required),
|
||||||
permanentThanaDropdown: new FormControl('', Validators.required),
|
permanentThanaDropdown: new FormControl('', Validators.required),
|
||||||
permanentPostalCode: new FormControl(''),
|
permanentPostalCode: new FormControl(''),
|
||||||
parmanentPO: new FormControl(''),
|
|
||||||
parmanentPOInBangla: new FormControl(''),
|
|
||||||
|
|
||||||
presentAddress: new FormControl('', Validators.required),
|
presentAddress: new FormControl('', Validators.required),
|
||||||
presentAddressInBangla: new FormControl(''),
|
presentAddressInBangla: new FormControl(''),
|
||||||
|
|
@ -99,8 +97,6 @@ export class ContactComponent implements OnInit {
|
||||||
presentDistrictDropdown: new FormControl('', Validators.required),
|
presentDistrictDropdown: new FormControl('', Validators.required),
|
||||||
presentThanaDropdown: new FormControl('', Validators.required),
|
presentThanaDropdown: new FormControl('', Validators.required),
|
||||||
presentPostCode: new FormControl(''),
|
presentPostCode: new FormControl(''),
|
||||||
presentPO: new FormControl(''),
|
|
||||||
presentPOInBangla: new FormControl(''),
|
|
||||||
|
|
||||||
contactLandPhone: new FormControl(''),
|
contactLandPhone: new FormControl(''),
|
||||||
contactMobileNo: new FormControl(''),
|
contactMobileNo: new FormControl(''),
|
||||||
|
|
@ -108,12 +104,14 @@ export class ContactComponent implements OnInit {
|
||||||
contactOfficialEmail: new FormControl(''),
|
contactOfficialEmail: new FormControl(''),
|
||||||
contactFax: new FormControl(''),
|
contactFax: new FormControl(''),
|
||||||
|
|
||||||
emergencyContactPerson: new FormControl(''),
|
emergencyContactPerson: new FormControl('', Validators.required),
|
||||||
emergencyAddress: new FormControl(''),
|
emergencyAddress: new FormControl('', Validators.required),
|
||||||
emergencyLandPhone: new FormControl(''),
|
emergencyLandPhone: new FormControl(''),
|
||||||
emergencyMobileNo: new FormControl(''),
|
emergencyMobileNo: new FormControl('', Validators.required),
|
||||||
relation: new FormControl(''),
|
relation: new FormControl(''),
|
||||||
|
|
||||||
|
presentPOInBangla: new FormControl(''),
|
||||||
|
parmanentPOInBangla: new FormControl(''),
|
||||||
});
|
});
|
||||||
/* if (this.employeeService.hrEmployee !== undefined && this.employeeService.hrEmployee.contacts.length > 0) {
|
/* if (this.employeeService.hrEmployee !== undefined && this.employeeService.hrEmployee.contacts.length > 0) {
|
||||||
this.contact = this.employeeService.hrEmployee.contacts[0];
|
this.contact = this.employeeService.hrEmployee.contacts[0];
|
||||||
|
|
@ -214,7 +212,6 @@ export class ContactComponent implements OnInit {
|
||||||
this.contact.presentDistrictID = this.contact.permanentDistrictID;
|
this.contact.presentDistrictID = this.contact.permanentDistrictID;
|
||||||
this.contact.presentThanaID = this.contact.permanentThanaID;
|
this.contact.presentThanaID = this.contact.permanentThanaID;
|
||||||
this.contact.presentTelephone = this.contact.permanentTelephone;
|
this.contact.presentTelephone = this.contact.permanentTelephone;
|
||||||
this.contact.presentPO = this.contact.permanentPO;
|
|
||||||
this.contact.presentPOInBangla = this.contact.parmanentPOInBangla;
|
this.contact.presentPOInBangla = this.contact.parmanentPOInBangla;
|
||||||
this.contact.presentMobile = this.contact.permanentMobile;
|
this.contact.presentMobile = this.contact.permanentMobile;
|
||||||
this.contact.presentPostCodeNo = this.contact.permanentPostCodeNo;
|
this.contact.presentPostCodeNo = this.contact.permanentPostCodeNo;
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,7 @@
|
||||||
|
|
||||||
<p-tabView [scrollable]="true">
|
<p-tabView [scrollable]="true">
|
||||||
<p-tabPanel header="General" leftIcon="pi pi-user">
|
<p-tabPanel header="General" leftIcon="pi pi-user">
|
||||||
<app-general [isActive]="!newEmployee" [employeeNo]="this.employeeService.hrEmployee.employeeNo"
|
<app-general [isActive]="!newEmployee" [employeeNo]="this.employeeService.hrEmployee.employeeNo"></app-general>
|
||||||
(defaultNationalityHandler)="defaultNationalityHandler($event)"
|
|
||||||
(defaultEmployeeTypeHandler)="defaultEmployeeTypeHandler($event)"></app-general>
|
|
||||||
</p-tabPanel>
|
</p-tabPanel>
|
||||||
<p-tabPanel header="Contacts" leftIcon="pi pi-phone">
|
<p-tabPanel header="Contacts" leftIcon="pi pi-phone">
|
||||||
<app-contact (saveContact)="saveContact($event)"></app-contact>
|
<app-contact (saveContact)="saveContact($event)"></app-contact>
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,16 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
||||||
import { EmployeeServices } from '../../_services/employee/employee.service';
|
import {EmployeeServices} from '../../_services/employee/employee.service';
|
||||||
import { empFileuploads, HrEmployee } from '../../_models/HREmployee/hrEmployee';
|
import {empFileuploads, HrEmployee} from '../../_models/HREmployee/hrEmployee';
|
||||||
import { SearchEmployee } from '../../_models/Employee/searchEmployee';
|
import {SearchEmployee} from '../../_models/Employee/searchEmployee';
|
||||||
import { DataTransferService } from '../../data.transfer.service';
|
import {DataTransferService} from '../../data.transfer.service';
|
||||||
import { BasicService } from '../../_services/Basic/basic.service';
|
import {BasicService} from '../../_services/Basic/basic.service';
|
||||||
import { enumEmpFileUploadType, EnumExtension, EnumGender, EnumStatus } from '../../_models/enums';
|
import {enumEmpFileUploadType, EnumExtension, EnumGender, EnumStatus} from '../../_models/enums';
|
||||||
import { EmpContact } from '../../_models/HREmployee/empContact';
|
import {EmpContact} from '../../_models/HREmployee/empContact';
|
||||||
import { ApiService } from '../../app.api.service';
|
import {ApiService} from '../../app.api.service';
|
||||||
import { loadingPanelService } from '../../hrm-loding panel/loding.panel.service';
|
import {loadingPanelService} from '../../hrm-loding panel/loding.panel.service';
|
||||||
import { HRMNotificationService } from '../../app.notification.service';
|
import {HRMNotificationService} from '../../app.notification.service';
|
||||||
import { DomSanitizer } from '@angular/platform-browser';
|
import {DomSanitizer} from '@angular/platform-browser';
|
||||||
import { Nationality } from '../nationality/nationality';
|
|
||||||
import { Category } from 'src/app/_models/Basic/category';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-employee-profile',
|
selector: 'app-employee-profile',
|
||||||
|
|
@ -32,14 +30,12 @@ export class EmployeeProfileComponent implements OnInit {
|
||||||
attachment: any;
|
attachment: any;
|
||||||
fileType = '';
|
fileType = '';
|
||||||
isDisplay = false;
|
isDisplay = false;
|
||||||
defaultNationality: Nationality;
|
|
||||||
defaultEmployeeType: Category;
|
|
||||||
constructor(private fb: FormBuilder,
|
constructor(private fb: FormBuilder,
|
||||||
public employeeService: EmployeeServices,
|
public employeeService: EmployeeServices,
|
||||||
public basicService: BasicService,
|
public basicService: BasicService,
|
||||||
public dataTransferService: DataTransferService, public apiService: ApiService,
|
public dataTransferService: DataTransferService, public apiService: ApiService,
|
||||||
public loadingPanel: loadingPanelService, public notificationService: HRMNotificationService,
|
public loadingPanel: loadingPanelService, public notificationService: HRMNotificationService,
|
||||||
private sanitizer: DomSanitizer) {
|
private sanitizer: DomSanitizer) {
|
||||||
this.employeeService.hrEmployee = new HrEmployee();
|
this.employeeService.hrEmployee = new HrEmployee();
|
||||||
this.hrEmployeeProfile = new HrEmployee();
|
this.hrEmployeeProfile = new HrEmployee();
|
||||||
this.contact = new EmpContact();
|
this.contact = new EmpContact();
|
||||||
|
|
@ -265,12 +261,6 @@ export class EmployeeProfileComponent implements OnInit {
|
||||||
this.employeeService.hrEmployee.passportExpDate = new Date(this.employeeService.hrEmployee.passportExpDate);
|
this.employeeService.hrEmployee.passportExpDate = new Date(this.employeeService.hrEmployee.passportExpDate);
|
||||||
this.employeeService.hrEmployee.passportIssueDate = new Date(this.employeeService.hrEmployee.passportIssueDate);
|
this.employeeService.hrEmployee.passportIssueDate = new Date(this.employeeService.hrEmployee.passportIssueDate);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
this.hrEmployeeProfile.birthDate = new Date();
|
|
||||||
this.hrEmployeeProfile.joiningDate = new Date();
|
|
||||||
this.hrEmployeeProfile.nationalityID = this.defaultNationality != null ? this.defaultNationality.id : null;
|
|
||||||
this.hrEmployeeProfile.categoryID = this.defaultEmployeeType != null ? this.defaultEmployeeType.id : null;
|
|
||||||
}
|
|
||||||
this.employeeService.Employee_Get_Completed.next(this.hrEmployeeProfile);
|
this.employeeService.Employee_Get_Completed.next(this.hrEmployeeProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -302,12 +292,12 @@ export class EmployeeProfileComponent implements OnInit {
|
||||||
this.contact = item;
|
this.contact = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
editHandler({ dataItem }) {
|
editHandler({dataItem}) {
|
||||||
this.isDisplay = true;
|
this.isDisplay = true;
|
||||||
const item = dataItem as empFileuploads;
|
const item = dataItem as empFileuploads;
|
||||||
this.attachment = item.fileData;
|
this.attachment = item.fileData;
|
||||||
const type = item.fileName.split('.').pop();
|
const type = item.fileName.split('.').pop();
|
||||||
if (type === 'png' || type === 'jpg' || type === 'jpeg') {
|
if ( type === 'png' || type === 'jpg' || type === 'jpeg') {
|
||||||
this.fileType = 'image';
|
this.fileType = 'image';
|
||||||
}
|
}
|
||||||
else if (type === 'pdf') {
|
else if (type === 'pdf') {
|
||||||
|
|
@ -318,12 +308,5 @@ export class EmployeeProfileComponent implements OnInit {
|
||||||
onPopUpClose() {
|
onPopUpClose() {
|
||||||
this.isDisplay = false;
|
this.isDisplay = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultNationalityHandler(dataItem: Nationality) {
|
|
||||||
this.defaultNationality = dataItem;
|
|
||||||
}
|
|
||||||
defaultEmployeeTypeHandler(dataItem: Category) {
|
|
||||||
this.defaultEmployeeType = dataItem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,12 +67,6 @@ export class ChildrenListComponent implements OnInit {
|
||||||
addNew() {
|
addNew() {
|
||||||
this.editIndex = -1;
|
this.editIndex = -1;
|
||||||
this.empChildren = new EmpChildren();
|
this.empChildren = new EmpChildren();
|
||||||
this.empChildren.birthDate = new Date();
|
|
||||||
let notApli = null;
|
|
||||||
if(this.occupations != null)
|
|
||||||
notApli = this.occupations.find(o => o.description.toUpperCase() == 'N/A');
|
|
||||||
if (notApli != null)
|
|
||||||
this.empChildren.occupationID = notApli.id;
|
|
||||||
this.isDisplay = true;
|
this.isDisplay = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
import {Component, OnInit, ViewEncapsulation} from '@angular/core';
|
||||||
import { EmpSpouse } from '../../../../../_models/HREmployee/empSpouse';
|
import {EmpSpouse} from '../../../../../_models/HREmployee/empSpouse';
|
||||||
import { EmployeeServices } from '../../../../../_services/employee/employee.service';
|
import {EmployeeServices} from '../../../../../_services/employee/employee.service';
|
||||||
import { UntilityHandlerService } from '../../../../../utility.hanldler.service';
|
import {UntilityHandlerService} from '../../../../../utility.hanldler.service';
|
||||||
import { DataTransferService } from '../../../../../data.transfer.service';
|
import {DataTransferService} from '../../../../../data.transfer.service';
|
||||||
import { ApiService } from '../../../../../app.api.service';
|
import {ApiService} from '../../../../../app.api.service';
|
||||||
import { AppWindowPopUp } from '../../../../../app.windowPopup.service';
|
import {AppWindowPopUp} from '../../../../../app.windowPopup.service';
|
||||||
import { HRMNotificationService } from '../../../../../app.notification.service';
|
import {HRMNotificationService} from '../../../../../app.notification.service';
|
||||||
import { Occupation } from '../../../../../_models/HRBasic/occupation';
|
import {Occupation} from '../../../../../_models/HRBasic/occupation';
|
||||||
import { BasicService } from '../../../../../_services/Basic/basic.service';
|
import {BasicService} from '../../../../../_services/Basic/basic.service';
|
||||||
import { EducationLevel } from '../../../../../_models/HRBasic/education-level';
|
import {EducationLevel} from '../../../../../_models/HRBasic/education-level';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-spouse-list',
|
selector: 'app-spouse-list',
|
||||||
|
|
@ -27,12 +27,12 @@ export class SpouseListComponent implements OnInit {
|
||||||
editIndex: number;
|
editIndex: number;
|
||||||
|
|
||||||
constructor(public employeeService: EmployeeServices,
|
constructor(public employeeService: EmployeeServices,
|
||||||
public basicService: BasicService,
|
public basicService: BasicService,
|
||||||
public apiService: ApiService,
|
public apiService: ApiService,
|
||||||
public notificationService: HRMNotificationService,
|
public notificationService: HRMNotificationService,
|
||||||
public dataTransferService: DataTransferService,
|
public dataTransferService: DataTransferService,
|
||||||
public WindowPopUp: AppWindowPopUp,
|
public WindowPopUp: AppWindowPopUp,
|
||||||
public utilityHandlerService: UntilityHandlerService) {
|
public utilityHandlerService: UntilityHandlerService) {
|
||||||
this.empSpouse = new EmpSpouse();
|
this.empSpouse = new EmpSpouse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -68,13 +68,6 @@ export class SpouseListComponent implements OnInit {
|
||||||
addNew() {
|
addNew() {
|
||||||
this.editIndex = -1;
|
this.editIndex = -1;
|
||||||
this.empSpouse = new EmpSpouse();
|
this.empSpouse = new EmpSpouse();
|
||||||
this.empSpouse.dateOfBirth = new Date();
|
|
||||||
this.empSpouse.marriageDate = new Date();
|
|
||||||
let notApli = null;
|
|
||||||
if(this.occupations != null)
|
|
||||||
notApli = this.occupations.find(o => o.description.toUpperCase() == 'N/A');
|
|
||||||
if (notApli != null)
|
|
||||||
this.empSpouse.occupationID = notApli.id;
|
|
||||||
this.isDisplay = true;
|
this.isDisplay = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -92,7 +85,7 @@ export class SpouseListComponent implements OnInit {
|
||||||
id: item.id
|
id: item.id
|
||||||
};
|
};
|
||||||
this.employeeService.deleteChildData(data).subscribe(
|
this.employeeService.deleteChildData(data).subscribe(
|
||||||
() => { },
|
() => {},
|
||||||
(err) => {
|
(err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
},
|
},
|
||||||
|
|
@ -127,7 +120,7 @@ export class SpouseListComponent implements OnInit {
|
||||||
this.empSpouse = new EmpSpouse();
|
this.empSpouse = new EmpSpouse();
|
||||||
this.isDisplay = false;
|
this.isDisplay = false;
|
||||||
}
|
}
|
||||||
addHandler() { }
|
addHandler() {}
|
||||||
|
|
||||||
onPopUpClose() {
|
onPopUpClose() {
|
||||||
this.isDisplay = false;
|
this.isDisplay = false;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
import { DataTransferService } from '../../../data.transfer.service';
|
import { DataTransferService } from '../../../data.transfer.service';
|
||||||
import { EmployeeServices } from '../../../_services/employee/employee.service';
|
import { EmployeeServices } from '../../../_services/employee/employee.service';
|
||||||
|
|
@ -115,7 +115,6 @@ export class GeneralComponent implements OnInit {
|
||||||
pickerEmployee: SearchEmployee;
|
pickerEmployee: SearchEmployee;
|
||||||
nationalities: Nationality[];
|
nationalities: Nationality[];
|
||||||
defaultNationality: Nationality;
|
defaultNationality: Nationality;
|
||||||
defaultEmployeeType: Category;
|
|
||||||
nameBangla: string = 'asasas';
|
nameBangla: string = 'asasas';
|
||||||
defaultPhoto = "assets/photos/profile-default.jpg";
|
defaultPhoto = "assets/photos/profile-default.jpg";
|
||||||
photoPath = "Documents/EMPPHOTO";
|
photoPath = "Documents/EMPPHOTO";
|
||||||
|
|
@ -127,8 +126,6 @@ export class GeneralComponent implements OnInit {
|
||||||
permanentThanas: Thana[];
|
permanentThanas: Thana[];
|
||||||
|
|
||||||
isAccessCard: boolean = false;
|
isAccessCard: boolean = false;
|
||||||
@Output() defaultNationalityHandler = new EventEmitter<Nationality>();
|
|
||||||
@Output() defaultEmployeeTypeHandler = new EventEmitter<Category>();
|
|
||||||
|
|
||||||
constructor(public employeeService: EmployeeServices, public basicService: BasicService,
|
constructor(public employeeService: EmployeeServices, public basicService: BasicService,
|
||||||
public notificationService: HRMNotificationService,
|
public notificationService: HRMNotificationService,
|
||||||
|
|
@ -159,11 +156,6 @@ export class GeneralComponent implements OnInit {
|
||||||
|
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.defaultEmployeeType = this.employeeTypes.find(x => x.name.toLowerCase() == "worker");
|
|
||||||
if (this.defaultEmployeeType != undefined) {
|
|
||||||
// this.hrEmployee.categoryID = this.defaultEmployeeType.id;
|
|
||||||
this.defaultEmployeeTypeHandler.emit(this.defaultEmployeeType);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -186,8 +178,7 @@ export class GeneralComponent implements OnInit {
|
||||||
() => {
|
() => {
|
||||||
this.defaultNationality = this.nationalities.find(x => x.description.toLowerCase() == "bangladeshi");
|
this.defaultNationality = this.nationalities.find(x => x.description.toLowerCase() == "bangladeshi");
|
||||||
if (this.defaultNationality) {
|
if (this.defaultNationality) {
|
||||||
// this.hrEmployee.nationalityID = this.defaultNationality.id;
|
this.hrEmployee.nationalityID = this.defaultNationality.id;
|
||||||
this.defaultNationalityHandler.emit(this.defaultNationality);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -469,7 +460,7 @@ export class GeneralComponent implements OnInit {
|
||||||
// }
|
// }
|
||||||
this.employeeService.saveHrPersonalInfo(this.hrEmployee).subscribe(
|
this.employeeService.saveHrPersonalInfo(this.hrEmployee).subscribe(
|
||||||
(resp: HrEmployee) => {
|
(resp: HrEmployee) => {
|
||||||
if (resp != undefined) {
|
if(resp != undefined){
|
||||||
this.hrEmployee.id = resp.id;
|
this.hrEmployee.id = resp.id;
|
||||||
if (this.active == false) {
|
if (this.active == false) {
|
||||||
this.hrEmployee.employeeNo = resp.employeeNo;
|
this.hrEmployee.employeeNo = resp.employeeNo;
|
||||||
|
|
|
||||||
|
|
@ -71,14 +71,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||||
<label for="txtAddress">Gender</label>
|
<label for="txtAddress">Address</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-6 p-lg-4">
|
<div class="p-col-12 p-md-6 p-lg-4">
|
||||||
<kendo-dropdownlist [(ngModel)]="nominee.gender" [data]="genderType"
|
<input id="txtAddress" formControlName="address" [(ngModel)]="nominee.address" type="text"
|
||||||
[defaultItem]="{ name: 'Select Gender..', value: null }" [textField]="'name'" [valueField]="'value'"
|
pInputText style="width:100%" />
|
||||||
[valuePrimitive]="true" class="form-control form-control-sm input-sm" formControlName="gender"
|
|
||||||
id="gender" style="width:100%">
|
|
||||||
</kendo-dropdownlist>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||||
|
|
@ -105,83 +102,6 @@
|
||||||
pInputText style="width:100%" />
|
pInputText style="width:100%" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
|
||||||
<label for="txtAddress">Address</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-4">
|
|
||||||
<input id="txtAddress" formControlName="address" [(ngModel)]="nominee.address" type="text"
|
|
||||||
pInputText style="width:100%" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
|
||||||
<label for="txtFatherName">Father Name</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-4">
|
|
||||||
<input id="txtFatherName" formControlName="fatherName" [(ngModel)]="nominee.fatherName" type="text"
|
|
||||||
pInputText style="width:100%" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
|
||||||
<label for="txtMotherName">Mother Name</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-4">
|
|
||||||
<input id="txtMotherName" formControlName="motherName" [(ngModel)]="nominee.motherName" type="text"
|
|
||||||
pInputText style="width:100%" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
|
||||||
<label for="txtSpouseName">Spouse Name</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-4">
|
|
||||||
<input id="txtSpouseName" formControlName="spouseName" [(ngModel)]="nominee.spouseName" type="text"
|
|
||||||
pInputText style="width:100%" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
|
||||||
<label for="txtNationalID">NationalID</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-4">
|
|
||||||
<input id="txtNationalID" formControlName="nID" [(ngModel)]="nominee.nationalID" type="text"
|
|
||||||
pInputText style="width:100%" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
|
||||||
<label for="txtDistrict">District</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-4">
|
|
||||||
<!-- <input id="txtDistrict" formControlName="district" [(ngModel)]="nominee.districtID" type="text"
|
|
||||||
pInputText style="width:100%" /> -->
|
|
||||||
<kendo-dropdownlist [(ngModel)]="nominee.districtID" [data]="districts"
|
|
||||||
[defaultItem]="{ name: 'Select District..', value: null }" [textField]="'name'"
|
|
||||||
[valueField]="'id'" style="width: 100%" (valueChange)="loadThana($event)"
|
|
||||||
[valuePrimitive]="true" class="form-control form-control-sm input-sm"
|
|
||||||
formControlName="district">
|
|
||||||
</kendo-dropdownlist>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
|
||||||
<label for="txtThana">Thana</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-4">
|
|
||||||
<!-- <input id="txtThana" formControlName="thana" [(ngModel)]="nominee.thanaID" type="text"
|
|
||||||
pInputText style="width:100%" /> -->
|
|
||||||
<kendo-dropdownlist [(ngModel)]="nominee.thanaID" [data]="thanas"
|
|
||||||
[defaultItem]="{ name: 'Select Thana..', value: null }" [textField]="'name'" [valueField]="'id'"
|
|
||||||
style="width: 100%" [valuePrimitive]="true" class="form-control form-control-sm input-sm"
|
|
||||||
formControlName="thana">
|
|
||||||
</kendo-dropdownlist>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
|
||||||
<label for="txtPostOffice">Post Office</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-4">
|
|
||||||
<input id="txtPostOffice" formControlName="postOffice" [(ngModel)]="nominee.postOffice" type="text"
|
|
||||||
pInputText style="width:100%" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||||
<label for="fupPicture">Picture</label>
|
<label for="fupPicture">Picture</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,10 @@ import { HrEmployee } from '../../../../_models/HREmployee/hrEmployee';
|
||||||
import { BasicService } from '../../../../_services/Basic/basic.service';
|
import { BasicService } from '../../../../_services/Basic/basic.service';
|
||||||
import { forkJoin } from 'rxjs';
|
import { forkJoin } from 'rxjs';
|
||||||
import { Relation } from '../../../../_models/HRBasic/relation';
|
import { Relation } from '../../../../_models/HRBasic/relation';
|
||||||
import { District } from '../../../../_models/HRBasic/district';
|
|
||||||
import { Thana } from '../../../../_models/HRBasic/thana';
|
|
||||||
import { Occupation } from '../../../../_models/HRBasic/occupation';
|
import { Occupation } from '../../../../_models/HRBasic/occupation';
|
||||||
import { NominationPurpose } from '../../../../_models/HRBasic/nomination-purpose';
|
import { NominationPurpose } from '../../../../_models/HRBasic/nomination-purpose';
|
||||||
import { loadingPanelService } from '../../../../hrm-loding panel/loding.panel.service';
|
import { loadingPanelService } from '../../../../hrm-loding panel/loding.panel.service';
|
||||||
import { enumEmpFileUploadType, EnumExtension, EnumGender, EnumMaritalStatus } from '../../../../_models/enums';
|
import { enumEmpFileUploadType } from '../../../../_models/enums';
|
||||||
import { debug } from 'console';
|
import { debug } from 'console';
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -32,9 +30,6 @@ export class NomineeEntryComponent implements OnInit {
|
||||||
nomineeForm: FormGroup;
|
nomineeForm: FormGroup;
|
||||||
public active = false;
|
public active = false;
|
||||||
nominee: EmpNominee;
|
nominee: EmpNominee;
|
||||||
genderType: any = EnumExtension.getNamesAndValues(EnumGender);
|
|
||||||
districts: District[];
|
|
||||||
thanas: Thana[];
|
|
||||||
selectedPicture?: FileList;
|
selectedPicture?: FileList;
|
||||||
selectedSignature?: FileList;
|
selectedSignature?: FileList;
|
||||||
currentFile?: File;
|
currentFile?: File;
|
||||||
|
|
@ -43,8 +38,6 @@ export class NomineeEntryComponent implements OnInit {
|
||||||
@Input()
|
@Input()
|
||||||
public set InputObject(InputObject: EmpNominee) {
|
public set InputObject(InputObject: EmpNominee) {
|
||||||
this.nominee = InputObject;
|
this.nominee = InputObject;
|
||||||
if(this.nominee != undefined && this.nominee.districtID != null && this.nominee.districtID != 0)
|
|
||||||
this.loadThana(this.nominee.districtID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(public employeeService: EmployeeServices,
|
constructor(public employeeService: EmployeeServices,
|
||||||
|
|
@ -67,14 +60,12 @@ export class NomineeEntryComponent implements OnInit {
|
||||||
const getRelations = this.basicService.getAllRelations();
|
const getRelations = this.basicService.getAllRelations();
|
||||||
const getOccupations = this.basicService.getAllOccupation();
|
const getOccupations = this.basicService.getAllOccupation();
|
||||||
const getNominationPurpose = this.basicService.getAllNominationPurpose();
|
const getNominationPurpose = this.basicService.getAllNominationPurpose();
|
||||||
const getDistricts = this.basicService.getAllDistricts();
|
|
||||||
|
|
||||||
forkJoin([getRelations, getOccupations, getNominationPurpose, getDistricts]).subscribe(
|
forkJoin([getRelations, getOccupations, getNominationPurpose]).subscribe(
|
||||||
([resp1, resp2, resp3, resp4]) => {
|
([resp1, resp2, resp3]) => {
|
||||||
this.relations = resp1;
|
this.relations = resp1;
|
||||||
this.occupations = resp2;
|
this.occupations = resp2;
|
||||||
this.nominationPurposes = resp3;
|
this.nominationPurposes = resp3;
|
||||||
this.districts = resp4;
|
|
||||||
},
|
},
|
||||||
(x) => {
|
(x) => {
|
||||||
console.log(x);
|
console.log(x);
|
||||||
|
|
@ -85,19 +76,6 @@ export class NomineeEntryComponent implements OnInit {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadThana(value: any) {
|
|
||||||
this.basicService.getAllThanas(value).subscribe((resp) => {
|
|
||||||
this.thanas = resp;
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
createForm() {
|
createForm() {
|
||||||
this.nomineeForm = new FormBuilder().group({
|
this.nomineeForm = new FormBuilder().group({
|
||||||
nominationDate: ['', Validators.required],
|
nominationDate: ['', Validators.required],
|
||||||
|
|
@ -113,14 +91,6 @@ export class NomineeEntryComponent implements OnInit {
|
||||||
picturePath: [''],
|
picturePath: [''],
|
||||||
signaturePath: [''],
|
signaturePath: [''],
|
||||||
mobile: [''],
|
mobile: [''],
|
||||||
gender: ['', Validators.required],
|
|
||||||
fatherName: [''],
|
|
||||||
motherName: [''],
|
|
||||||
spouseName: [''],
|
|
||||||
nID: [''],
|
|
||||||
district: [''],
|
|
||||||
thana: [''],
|
|
||||||
postOffice: [''],
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -187,5 +157,4 @@ export class NomineeEntryComponent implements OnInit {
|
||||||
selectedFiles = undefined;
|
selectedFiles = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,15 +86,6 @@ export class NomineeListComponent implements OnInit {
|
||||||
this.editIndex = -1;
|
this.editIndex = -1;
|
||||||
this.nominee = new EmpNominee();
|
this.nominee = new EmpNominee();
|
||||||
this.nominee.employeeID = this.employeeService.hrEmployee.id;
|
this.nominee.employeeID = this.employeeService.hrEmployee.id;
|
||||||
this.nominee.percentage = 100;
|
|
||||||
let notApli = null;
|
|
||||||
if(this.occupations != null)
|
|
||||||
notApli = this.occupations.find(o => o.description.toUpperCase() == 'N/A');
|
|
||||||
if (notApli != null)
|
|
||||||
this.nominee.occupationID = notApli.id;
|
|
||||||
let np = this.nominationPurposes.find(n => n.id == 8);
|
|
||||||
if(this.nominationPurposes != null && np != null)
|
|
||||||
this.nominee.nominationPurposeID = np.id;
|
|
||||||
this.isDisplay = true;
|
this.isDisplay = true;
|
||||||
}
|
}
|
||||||
public editHandler(rowIndex: any) {
|
public editHandler(rowIndex: any) {
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg form-control">
|
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg form-control">
|
||||||
<input id="txtMailAddress" type="text" style="width:100%"
|
<input id="txtMailAddress" type="text" style="width:100%"
|
||||||
[(ngModel)]="employee.emailAddress" formControlName="emailAddress" pInputText>
|
[(ngModel)]="employee.emailAddress" formControlName="emailAddress" pInputText required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-4" style="margin:auto">
|
<div class="p-col-12 p-md-6 p-lg-4" style="margin:auto">
|
||||||
|
|
|
||||||
|
|
@ -137,8 +137,6 @@ export class EmployeePayrollProfileComponent implements OnInit {
|
||||||
|
|
||||||
this.lastSalaryProcessDate();
|
this.lastSalaryProcessDate();
|
||||||
|
|
||||||
this.selectedCategoryid = this.ddlcategories.find(x => x.name.toLowerCase() == "worker").id;
|
|
||||||
|
|
||||||
// this.loadingPanelService.ShowLoadingPanel = true;
|
// this.loadingPanelService.ShowLoadingPanel = true;
|
||||||
// this.employeeService.generateEmployeeNo().subscribe(
|
// this.employeeService.generateEmployeeNo().subscribe(
|
||||||
// (resp) => {
|
// (resp) => {
|
||||||
|
|
@ -155,7 +153,6 @@ export class EmployeePayrollProfileComponent implements OnInit {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.employee.employeeNo = undefined;
|
this.employee.employeeNo = undefined;
|
||||||
this.selectedCategoryid = undefined;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -419,7 +416,7 @@ export class EmployeePayrollProfileComponent implements OnInit {
|
||||||
this.selectedEmployee.categoryID = this.employee.categoryID;
|
this.selectedEmployee.categoryID = this.employee.categoryID;
|
||||||
this.selectedEmployee.name = this.employee.name;
|
this.selectedEmployee.name = this.employee.name;
|
||||||
this.selectedEmployee.employeeNo = this.employee.employeeNo;
|
this.selectedEmployee.employeeNo = this.employee.employeeNo;
|
||||||
// this.showBankAccount = true;
|
this.showBankAccount = true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.employee = new Employee();
|
this.employee = new Employee();
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ import { PayrollType } from '../../../_models/Authentication/payrollType';
|
||||||
import { GrievanceManagementService } from '../../../_services/grievance-management/grievanceManagement.service';
|
import { GrievanceManagementService } from '../../../_services/grievance-management/grievanceManagement.service';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { WorkflowService } from '../../../_services/workflow/workflow.service';
|
import { WorkflowService } from '../../../_services/workflow/workflow.service';
|
||||||
import { AuthService } from '../../../_services/auth/auth.service';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
@ -78,8 +77,6 @@ export class LifeCycleEntryComponent implements OnInit {
|
||||||
this.empPickerActive = false;
|
this.empPickerActive = false;
|
||||||
}
|
}
|
||||||
_effectDate: Date = undefined;
|
_effectDate: Date = undefined;
|
||||||
public payrollType: PayrollType = undefined;
|
|
||||||
public salaryMonth: Date = new Date();
|
|
||||||
public empPickerActive: boolean = true;
|
public empPickerActive: boolean = true;
|
||||||
public isDesingation: boolean = false;
|
public isDesingation: boolean = false;
|
||||||
public isDepartment: boolean = false;
|
public isDepartment: boolean = false;
|
||||||
|
|
@ -107,7 +104,6 @@ export class LifeCycleEntryComponent implements OnInit {
|
||||||
public utilityHandlerService: UntilityHandlerService, public organogramService: OrganogramService,
|
public utilityHandlerService: UntilityHandlerService, public organogramService: OrganogramService,
|
||||||
public loadingPanelService: loadingPanelService,
|
public loadingPanelService: loadingPanelService,
|
||||||
public router: Router, public workflowService: WorkflowService,
|
public router: Router, public workflowService: WorkflowService,
|
||||||
public authservice: AuthService,
|
|
||||||
public acrouter: ActivatedRoute,) {
|
public acrouter: ActivatedRoute,) {
|
||||||
if (this.router.url === '/payroll/career-and-profile/life-cycle-entry')
|
if (this.router.url === '/payroll/career-and-profile/life-cycle-entry')
|
||||||
this.apiservice.selectedMenuName = 'Employee Life Cycle';
|
this.apiservice.selectedMenuName = 'Employee Life Cycle';
|
||||||
|
|
@ -139,16 +135,7 @@ export class LifeCycleEntryComponent implements OnInit {
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.authservice.GetPayrollTypeByLoginID().subscribe(
|
|
||||||
(resp: any) => {
|
|
||||||
this.payrollType = resp;
|
|
||||||
},
|
|
||||||
(err: any) => {
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
this.salaryMonth = new Date(this.payrollType.nextPayProcessDate);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private refreshGradeSalaries() {
|
private refreshGradeSalaries() {
|
||||||
|
|
@ -186,7 +173,7 @@ export class LifeCycleEntryComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
EventselectionChange(value: any) {
|
EventselectionChange(value: any) {
|
||||||
debugger;
|
|
||||||
this.isDesingation = false;
|
this.isDesingation = false;
|
||||||
this.isDepartment = false;
|
this.isDepartment = false;
|
||||||
this.isCategory = false;
|
this.isCategory = false;
|
||||||
|
|
@ -305,16 +292,6 @@ export class LifeCycleEntryComponent implements OnInit {
|
||||||
|
|
||||||
});
|
});
|
||||||
this._sDescription = item.description;
|
this._sDescription = item.description;
|
||||||
if(this._employeeStatus != undefined && this._employeeStatus.length > 0)
|
|
||||||
if(item == this._employeeStatus.find(x => x.description.toLowerCase() == 'joining') ){
|
|
||||||
this._effectDate = new Date(this._employee.joiningDate);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
debugger;
|
|
||||||
// let currentDate: Date = new Date();
|
|
||||||
let currentDate: Date = this.salaryMonth;
|
|
||||||
this._effectDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,11 @@ using AutoMapper.Configuration;
|
||||||
using Google.Protobuf.WellKnownTypes;
|
using Google.Protobuf.WellKnownTypes;
|
||||||
using HRM.BO;
|
using HRM.BO;
|
||||||
using HRM.DA;
|
using HRM.DA;
|
||||||
using HRM.Report;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.StaticFiles;
|
using Microsoft.AspNetCore.StaticFiles;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using NPOI.HPSF;
|
|
||||||
using NPOI.SS.Formula.Functions;
|
using NPOI.SS.Formula.Functions;
|
||||||
using Org.BouncyCastle.Ocsp;
|
using Org.BouncyCastle.Ocsp;
|
||||||
using static HRM.Report.PayrollDataSet.PayrollDataSet;
|
using static HRM.Report.PayrollDataSet.PayrollDataSet;
|
||||||
|
|
@ -785,88 +783,6 @@ namespace HRM.UI.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[HttpPost("generatedExceptiinLetter/{letterType}")]
|
|
||||||
public ActionResult generatedExceptiinLetter(int letterType, List<SearchEmployee> employees)
|
|
||||||
{
|
|
||||||
CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User);
|
|
||||||
int payrollTypeId = currentUser.PayrollTypeID.GetValueOrDefault();
|
|
||||||
//string downloadPath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\Downloads";
|
|
||||||
string downloadPath = System.Environment.CurrentDirectory + "\\Documents\\LetterTempFolder\\";
|
|
||||||
string lFileName = string.Empty;
|
|
||||||
|
|
||||||
|
|
||||||
//List<string> sFilePaths = new List<string>();
|
|
||||||
List<Tuple<byte[], string, string>> filesWithContents = new List<Tuple<byte[], string, string>>();
|
|
||||||
List<FileContentResult> files = new List<FileContentResult>();
|
|
||||||
|
|
||||||
LetterTemplte ltemplate = new LetterTemplte();
|
|
||||||
|
|
||||||
byte[] bytes = null;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
if (letterType == 1)
|
|
||||||
{
|
|
||||||
ltemplate.SetObjectID(FixedLetterTemplte.Staff_Appointment_Letter);
|
|
||||||
|
|
||||||
ltemplate.ID = 2;
|
|
||||||
ltemplate.Description = "Letter Template Staff";
|
|
||||||
ltemplate.Subject = "Letter Template Staff";
|
|
||||||
ltemplate.Type = EnumDocType.Desktop_Letter;
|
|
||||||
ltemplate.TypeID = (int)EnumDocType.Desktop_Letter;
|
|
||||||
|
|
||||||
lFileName = "Staff.doc";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ltemplate.SetObjectID(FixedLetterTemplte.Worker_Appointment_Letter);
|
|
||||||
|
|
||||||
ltemplate.ID = 3;
|
|
||||||
ltemplate.Description = "Letter Template Worker";
|
|
||||||
ltemplate.Subject = "Letter Template Worker";
|
|
||||||
ltemplate.Type = EnumDocType.Desktop_Letter;
|
|
||||||
ltemplate.TypeID = (int)EnumDocType.Desktop_Letter;
|
|
||||||
|
|
||||||
lFileName = "Worker.doc";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (employees != null && employees.Count > 0)
|
|
||||||
{
|
|
||||||
foreach (var emp in employees)
|
|
||||||
{
|
|
||||||
string sFilePath = new rptEmployee().Generate(ltemplate, emp.EmployeeID, payrollTypeId, downloadPath, lFileName);
|
|
||||||
byte[] buffer = new byte[16 * 1024];
|
|
||||||
buffer = System.IO.File.ReadAllBytes(sFilePath);
|
|
||||||
string contentType = GetFileType(sFilePath);
|
|
||||||
var name = lFileName;
|
|
||||||
if (System.IO.File.Exists(sFilePath))
|
|
||||||
{
|
|
||||||
System.IO.File.Delete(sFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
//sFilePaths.Add(sFilePath);
|
|
||||||
filesWithContents.Add(new Tuple<byte[], string, string>(buffer, emp.EmployeeNo + "_" + name, contentType));
|
|
||||||
|
|
||||||
var file = File(buffer, contentType, emp.EmployeeNo + "_" + name);
|
|
||||||
//return file;
|
|
||||||
files.Add(file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//return Ok(filesWithContents);
|
|
||||||
return Ok(files);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
return StatusCode(StatusCodes.Status500InternalServerError, e.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user