Merge pull request 'Employee Design-wise prod bonus report & employee long and short profile' (#18) from dev_mashfiq into devqc

Reviewed-on: http://103.197.204.162:3025/CelHRTeam/EchoTex_Payroll/pulls/18
This commit is contained in:
shamim 2024-12-11 17:13:32 +06:00
commit a95acdeaef
21 changed files with 1787 additions and 34 deletions

View File

@ -1128,7 +1128,16 @@ namespace HRM.BO
} }
#endregion #endregion
#region Property NomineeMobileNo : string
private string _nomineeMobileNo;
public string NomineeMobileNo
{
get { return _nomineeMobileNo; }
set { _nomineeMobileNo = value; }
}
#endregion
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; }

View File

@ -369,6 +369,7 @@ namespace HRM.BO
List<SearchEmployee> Find(SearchManager oManager); List<SearchEmployee> Find(SearchManager oManager);
List<SearchEmployee> FindCordinator(int? id, int? payrollTypeID); List<SearchEmployee> FindCordinator(int? id, int? payrollTypeID);
List<SearchEmployee> FindEmpCodeName(int payrolltypeid, string code, string name); List<SearchEmployee> FindEmpCodeName(int payrolltypeid, string code, string name);
List<SearchEmployee> FindEmpCodeNameForEmployeePicker(int payrolltypeid, string code, string name);
SearchEmployee get(int empid); SearchEmployee get(int empid);
List<SearchEmployee> GetEmployeeNotYetUser(int payrollTypeID); List<SearchEmployee> GetEmployeeNotYetUser(int payrollTypeID);
List<SearchEmployee> GetTeam(int employeeid); List<SearchEmployee> GetTeam(int employeeid);

View File

@ -676,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)" + " EmailAddress, NomineeMobileNo)" +
" VALUES(" + " VALUES(" +
" %n, %n, %n, %d, %s, %n," + " %n, %n, %n, %d, %s, %n," +
" %n, %d, %n, %s, %s, %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.EmailAddress, nominee.NomineeMobileNo);
} }
public static void Update(TransactionContext tc, EmpNominee nominee) public static void Update(TransactionContext tc, EmpNominee nominee)
@ -700,8 +700,9 @@ namespace HRM.DA
,[ADDRESS] = %s ,[ADDRESS] = %s
,[TELEPHONE] = %s ,[TELEPHONE] = %s
,[EMAILADDRESS] = %s ,[EMAILADDRESS] = %s
,[NomineeMobileNo] = %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.Percentage, nominee.OccupationID, nominee.Address, nominee.TelePhone, nominee.EmailAddress, nominee.NomineeMobileNo,
nominee.ID); nominee.ID);
} }
@ -943,6 +944,7 @@ namespace HRM.DA
,[PHOTOPATH] ,[PHOTOPATH]
,[TELEPHONE] ,[TELEPHONE]
,[EMAILADDRESS] ,[EMAILADDRESS]
,[NomineeMobileNo]
,[SIGNATURE] ,[SIGNATURE]
,[EMPLOYEEID] ,[EMPLOYEEID]
,[NOMINEENAME] ,[NOMINEENAME]

View File

@ -231,6 +231,7 @@ END;";
{ {
string orderby = "name"; string orderby = "name";
string sqlClause = ""; string sqlClause = "";
string top = "";
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("PayrollTypeID =%n AND Status = %n", payrollTypeID, EnumStatus.Active); sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("PayrollTypeID =%n AND Status = %n", payrollTypeID, EnumStatus.Active);
if (code != string.Empty) if (code != string.Empty)
{ {
@ -242,8 +243,41 @@ END;";
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("Name LIKE %s", ("%" + name + "%")); sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("Name LIKE %s", ("%" + name + "%"));
return tc.ExecuteReader( return tc.ExecuteReader(
"Select EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q Order by %s", "Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q Order by %s",
sqlClause, orderby); top, sqlClause, orderby);
}
internal static IDataReader SearchForEmployeePicker(TransactionContext tc, int payrollTypeID, string code, string name)
{
string orderby = "name";
string sqlClause = "";
string top = "";
//Previous Code For only Live Employee
//sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("PayrollTypeID =%n AND Status = %n", payrollTypeID, EnumStatus.Active);
//New Code For live And Waitiong for join Employee
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("PayrollTypeID =%n AND (Status = %n OR Status = %n)", payrollTypeID, EnumEmployeeStatus.Live, EnumEmployeeStatus.Waitingforjoin);
if (code != string.Empty)
{
//Previous with suggestion
//sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo LIKE %s", ("%" + code + "%"));
//orderby = "EmployeeNo";
//Using TOP
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo LIKE %s", ( code + "%"));
orderby = "EmployeeNo";
top = "TOP 50";
//Without suggestion
//sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo = %s", code );
//orderby = "EmployeeNo";
}
if (name != string.Empty)
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("Name LIKE %s", ("%" + name + "%"));
return tc.ExecuteReader(
"Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q Order by %s",
top, sqlClause, orderby);
} }
#endregion #endregion

View File

@ -551,6 +551,7 @@ namespace HRM.DA
oEmpNominee.TelePhone = oReader.GetString("TelePhone"); oEmpNominee.TelePhone = oReader.GetString("TelePhone");
oEmpNominee.EmailAddress = oReader.GetString("EmailAddress"); oEmpNominee.EmailAddress = oReader.GetString("EmailAddress");
oEmpNominee.NomineeMobileNo = oReader.GetString("NomineeMobileNo", true, string.Empty);
oEmpNominee.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus", true, 0); oEmpNominee.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus", true, 0);
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);

View File

@ -288,6 +288,43 @@ namespace HRM.DA
return searchEmployees; return searchEmployees;
} }
public List<SearchEmployee> FindEmpCodeNameForEmployeePicker(int payrollTypeID, string code, string name)
{
List<SearchEmployee> searchEmployees = new List<SearchEmployee>();
TransactionContext tc = null;
try
{
tc = TransactionContext.Begin();
DataReader dr = new DataReader(SearchEmployeeDA.SearchForEmployeePicker(tc, payrollTypeID, code, name));
searchEmployees = this.CreateObjects<SearchEmployee>(dr);
//while (dr.Read())
//{
// SearchEmployee item = new SearchEmployee();
// item.Name = dr.GetString("name");
// item.EmployeeNo = dr.GetString("employeeNo");
// searchEmployees.Add(item);
//}
dr.Close();
tc.End();
}
catch (Exception e)
{
#region Handle Exception
if (tc != null)
tc.HandleError();
ExceptionLog.Write(e);
throw new ServiceException(e.Message, e);
#endregion
}
return searchEmployees;
}
public List<SearchEmployee> GetEmployeeNotYetUser(int payrollTypeID) public List<SearchEmployee> GetEmployeeNotYetUser(int payrollTypeID)

View File

@ -276,7 +276,9 @@ namespace HRM.Report
dSet.Tables.Add(dTable); dSet.Tables.Add(dTable);
//string RDLC = "Payroll.Report.RDLC.rptEmpDesignWiseProdBonus.rdlc"; //string RDLC = "Payroll.Report.RDLC.rptEmpDesignWiseProdBonus.rdlc";
string RDLC = "rptEmpDesignWiseProdBonus.rdlc"; string RDLC = "rptEmpDesignWiseProdBonus.rdlc";
//string RDLC = "rptEmpDesignWiseProdBonusOld.rdlc";
List<ReportParameter> _reportParameters = new List<ReportParameter>(); List<ReportParameter> _reportParameters = new List<ReportParameter>();
ReportParameter rParam = new ReportParameter("Month", dBonusMonth.ToString("MMM yyyy")); ReportParameter rParam = new ReportParameter("Month", dBonusMonth.ToString("MMM yyyy"));

View File

@ -235,6 +235,7 @@
<None Remove="RDLC\rptCurrentMonthDueLoan.rdlc" /> <None Remove="RDLC\rptCurrentMonthDueLoan.rdlc" />
<None Remove="RDLC\rptEmpAcademicInfo.rdlc" /> <None Remove="RDLC\rptEmpAcademicInfo.rdlc" />
<None Remove="RDLC\rptEmpDesignWiseProdBonus.rdlc" /> <None Remove="RDLC\rptEmpDesignWiseProdBonus.rdlc" />
<None Remove="RDLC\rptEmpDesignWiseProdBonusOld.rdlc" />
<None Remove="RDLC\rptEmpGeneralInfo.rdlc" /> <None Remove="RDLC\rptEmpGeneralInfo.rdlc" />
<None Remove="RDLC\rptEmployeeChildInfo.rdlc" /> <None Remove="RDLC\rptEmployeeChildInfo.rdlc" />
<None Remove="RDLC\rptEmployeeContactInfo.rdlc" /> <None Remove="RDLC\rptEmployeeContactInfo.rdlc" />
@ -519,7 +520,12 @@
<EmbeddedResource Include="RDLC\rptCCWiseSalarySummaryExpat.rdlc" /> <EmbeddedResource Include="RDLC\rptCCWiseSalarySummaryExpat.rdlc" />
<EmbeddedResource Include="RDLC\rptCurrentMonthDueLoan.rdlc" /> <EmbeddedResource Include="RDLC\rptCurrentMonthDueLoan.rdlc" />
<EmbeddedResource Include="RDLC\rptEmpAcademicInfo.rdlc" /> <EmbeddedResource Include="RDLC\rptEmpAcademicInfo.rdlc" />
<EmbeddedResource Include="RDLC\rptEmpDesignWiseProdBonus.rdlc" /> <EmbeddedResource Include="RDLC\rptEmpDesignWiseProdBonus.rdlc">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="RDLC\rptEmpDesignWiseProdBonusOld.rdlc">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="RDLC\rptEmpGeneralInfo.rdlc" /> <EmbeddedResource Include="RDLC\rptEmpGeneralInfo.rdlc" />
<EmbeddedResource Include="RDLC\rptEmployeeChildInfo.rdlc" /> <EmbeddedResource Include="RDLC\rptEmployeeChildInfo.rdlc" />
<EmbeddedResource Include="RDLC\rptEmployeeContactInfo.rdlc" /> <EmbeddedResource Include="RDLC\rptEmployeeContactInfo.rdlc" />

View File

@ -162,7 +162,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>="Department: " &amp;Fields!Department.Value</Value> <Value>="Design No: " &amp;Fields!DesignNo.Value</Value>
<Style /> <Style />
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@ -1656,7 +1656,7 @@
<TablixMember> <TablixMember>
<Group Name="table1_Group1"> <Group Name="table1_Group1">
<GroupExpressions> <GroupExpressions>
<GroupExpression>=Fields!DepartmentID.Value</GroupExpression> <GroupExpression>=Fields!DesignNo.Value</GroupExpression>
</GroupExpressions> </GroupExpressions>
</Group> </Group>
<TablixMembers> <TablixMembers>

File diff suppressed because it is too large Load Diff

View File

@ -138,7 +138,7 @@ export class Employee {
this.taxCircle = EnumTaxCircle.CityCorporation; this.taxCircle = EnumTaxCircle.CityCorporation;
this.isConfirmed = false; this.isConfirmed = false;
this.endOfContractDate = null; this.endOfContractDate = null;
this.status = EnumEmployeeStatus.Live; this.status = EnumEmployeeStatus.Waitingforjoin;
this.statusName = ''; this.statusName = '';
this.isShownInTaxSheet = false; this.isShownInTaxSheet = false;
this.pfMemberType = EnumPFMembershipType.NotYetLive; this.pfMemberType = EnumPFMembershipType.NotYetLive;
@ -219,6 +219,9 @@ export class Employee {
case EnumEmployeeStatus.Discontinued: case EnumEmployeeStatus.Discontinued:
str = "Discontinued"; str = "Discontinued";
break; break;
case EnumEmployeeStatus.Waitingforjoin:
str = "Waiting For Join";
break;
default: default:
} }

View File

@ -19,6 +19,7 @@ export class EmpNominee extends BaseObject {
occupation: Occupation; occupation: Occupation;
address: string; address: string;
telePhone: string; telePhone: string;
nomineeMobileNo: string;
photograph: empFileuploads; photograph: empFileuploads;
signature: empFileuploads; signature: empFileuploads;
emailAddress: string; emailAddress: string;
@ -40,6 +41,7 @@ export class EmpNominee extends BaseObject {
this.photograph = new empFileuploads(); this.photograph = new empFileuploads();
this.signature = new empFileuploads(); this.signature = new empFileuploads();
this.emailAddress = ''; this.emailAddress = '';
this.nomineeMobileNo = '';
this.hasSignature = false; this.hasSignature = false;
this.hasPicture = false; this.hasPicture = false;
} }

View File

@ -99,6 +99,13 @@ export class EmployeeServices {
return this.apiService.httpGet<SearchEmployee[]>('/Employee/getEmpCodeName' + '/' + ncode + '/' + nname); return this.apiService.httpGet<SearchEmployee[]>('/Employee/getEmpCodeName' + '/' + ncode + '/' + nname);
} }
getEmpCodeNameForEmployeePickerInput(code?: string, name?: string) {
let nname = this.apiService.getApiDefaultData(name);
let ncode = this.apiService.getApiDefaultData(code);
return this.apiService.httpGet<SearchEmployee[]>('/Employee/getEmpCodeNameForEmployeePickerInput' + '/' + ncode + '/' + nname);
}
getEmployees() { getEmployees() {
return this.apiService.httpGet(this.apiService.base_url + 'getemployees'); return this.apiService.httpGet(this.apiService.base_url + 'getemployees');
} }

View File

@ -32,10 +32,10 @@
pInputText style="width:100%" /> pInputText style="width:100%" />
</div> </div>
<div class="p-col-12 p-md-6 p-lg-2" > <div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<label>Relation</label> <label>Relation</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">
<kendo-dropdownlist [(ngModel)]="nominee.relationID" [data]="relations" <kendo-dropdownlist [(ngModel)]="nominee.relationID" [data]="relations"
[defaultItem]="{ description: 'Select Relations..', value: null }" [textField]="'description'" [defaultItem]="{ description: 'Select Relations..', value: 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"
@ -46,15 +46,15 @@
<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="txtPercentage">Percentage</label> <label for="txtPercentage">Percentage</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">
<input id="txtPercentage" formControlName="percentage" [(ngModel)]="nominee.percentage" <input id="txtPercentage" formControlName="percentage" [(ngModel)]="nominee.percentage"
type="number" pInputText style="width:100%" /> type="number" pInputText style="width:100%" />
</div> </div>
<div class="p-col-12 p-md-6 p-lg-2" > <div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<label for="dtpDateOfBirth">Birth Date</label> <label for="dtpDateOfBirth">Birth Date</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">
<kendo-datepicker [(ngModel)]="nominee.birthDate" [format]="'dd-MMM-yyyy'" <kendo-datepicker [(ngModel)]="nominee.birthDate" [format]="'dd-MMM-yyyy'"
formControlName="dateOfBirth" id="dtpDateOfBirth" style="width:100%"></kendo-datepicker> formControlName="dateOfBirth" id="dtpDateOfBirth" style="width:100%"></kendo-datepicker>
</div> </div>
@ -62,7 +62,7 @@
<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>Occupation</label> <label>Occupation</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.occupationID" [data]="occupations" <kendo-dropdownlist [(ngModel)]="nominee.occupationID" [data]="occupations"
[defaultItem]="{ description: 'Select Occupations..', value: null }" [textField]="'description'" [defaultItem]="{ description: 'Select Occupations..', value: 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"
@ -70,10 +70,10 @@
</kendo-dropdownlist> </kendo-dropdownlist>
</div> </div>
<div class="p-col-12 p-md-6 p-lg-2" > <div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<label for="txtAddress">Address</label> <label for="txtAddress">Address</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">
<input id="txtAddress" formControlName="address" [(ngModel)]="nominee.address" type="text" <input id="txtAddress" formControlName="address" [(ngModel)]="nominee.address" type="text"
pInputText style="width:100%" /> pInputText style="width:100%" />
</div> </div>
@ -86,10 +86,18 @@
pInputText style="width:100%" /> pInputText style="width:100%" />
</div> </div>
<div class="p-col-12 p-md-6 p-lg-2" > <div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<label for="txtNomineeMobileNo">Mobile</label>
</div>
<div class="p-col-12 p-md-6 p-lg-4">
<input id="txtNnomineeMobileNo" formControlName="mobile" [(ngModel)]="nominee.nomineeMobileNo" type="text"
pInputText style="width:100%" />
</div>
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<label for="txtEmail">Email</label> <label for="txtEmail">Email</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">
<input id="txtEmail" formControlName="email" [(ngModel)]="nominee.emailAddress" type="text" <input id="txtEmail" formControlName="email" [(ngModel)]="nominee.emailAddress" type="text"
pInputText style="width:100%" /> pInputText style="width:100%" />
</div> </div>
@ -97,19 +105,21 @@
<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>
<div class="p-col-12 p-md-6 p-lg-4" > <div class="p-col-12 p-md-6 p-lg-4">
<input formControlName="picturePath" pInputText style="width:100%" (change)="selectPicture($event)" <input formControlName="picturePath" pInputText style="width:100%" (change)="selectPicture($event)"
type="file"> type="file">
</div> </div>
<div class="p-col-12 p-md-6 p-lg-2" > <div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<label for="fupSignature">Signature</label> <label for="fupSignature">Signature</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">
<input formControlName="signaturePath" pInputText (change)="selectSignature($event)" type="file" <input formControlName="signaturePath" pInputText (change)="selectSignature($event)" type="file"
style="width:100%"> style="width:100%">
</div> </div>
<div class="p-col-12 p-md-6 p-lg-6" ></div>
</div> </div>
</div> </div>
</fieldset> </fieldset>

View File

@ -90,6 +90,7 @@ export class NomineeEntryComponent implements OnInit {
email: [''], email: [''],
picturePath: [''], picturePath: [''],
signaturePath: [''], signaturePath: [''],
mobile: [''],
}); });
} }

View File

@ -67,12 +67,12 @@
</ng-template> </ng-template>
</kendo-grid-command-column> </kendo-grid-command-column>
<kendo-grid-command-column title="Action" width="100"> <kendo-grid-command-column title="Action" width="100">
<ng-template kendoGridCellTemplate let-dataItem> <ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">
<button <button
kendoGridEditCommand kendoGridEditCommand
icon="pencil" icon="pencil"
[primary]="true" [primary]="true"
(click)="editHandler(dataItem)" (click)="editHandler(rowIndex)"
[style.width.%]="49" [style.width.%]="49"
></button> ></button>
<button <button

View File

@ -89,6 +89,7 @@ export class NomineeListComponent implements OnInit {
this.isDisplay = true; this.isDisplay = true;
} }
public editHandler(rowIndex: any) { public editHandler(rowIndex: any) {
debugger
this.editIndex = rowIndex; this.editIndex = rowIndex;
this.nominee = this.nominees[this.editIndex]; this.nominee = this.nominees[this.editIndex];
this.isDisplay = true; this.isDisplay = true;

View File

@ -73,10 +73,26 @@
style="width:100%"></kendo-datepicker> style="width:100%"></kendo-datepicker>
</div> </div>
<div class="p-col-12 p-md-6 p-lg-4" style="margin:auto">
<label for="txtfatherName">Father's Name</label>
</div>
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg">
<input id="txtfatherName" formControlName="fatherName" [(ngModel)]="employee.fatherName" type="text"
style="width:100%" pInputText>
</div>
<div class="p-col-12 p-md-6 p-lg-4" style="margin:auto">
<label for="txttinNo">TIN</label>
</div>
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg">
<input id="txttinNo" formControlName="tinNo" [(ngModel)]="employee.tinNo" type="text"
style="width:100%" pInputText>
</div>
<div class="p-col-12 p-md-6 p-lg-4" style="height: 43px;"> <div class="p-col-12 p-md-6 p-lg-4" style="height: 43px;">
<label for="chkIsOTEligible">Eligible for OT</label> <label for="chkIsOTEligible">Eligible for OT</label>
</div> </div>
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg"> <div class="p-col-12 p-md-6 p-lg-2 form-control-lg">
<input type="checkbox" formControlName="isOTEligible" [(ngModel)]="employee.isEligibleOT" <input type="checkbox" formControlName="isOTEligible" [(ngModel)]="employee.isEligibleOT"
id="chkIsOTEligible" kendoCheckBox /> id="chkIsOTEligible" kendoCheckBox />
@ -85,7 +101,7 @@
<label for="chkIsFixedLocation">Fixed Location / <label for="chkIsFixedLocation">Fixed Location /
Nearby</label> Nearby</label>
</div> </div>
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg"> <div class="p-col-12 p-md-6 p-lg-2 form-control-lg">
<input type="checkbox" formControlName="IsFixedLocation" <input type="checkbox" formControlName="IsFixedLocation"
[(ngModel)]="employee.isFixedLocation" id="chkIsFixedLocation" kendoCheckBox /> [(ngModel)]="employee.isFixedLocation" id="chkIsFixedLocation" kendoCheckBox />
</div> </div>
@ -188,6 +204,15 @@
[(ngModel)]="employee.joiningDate" [format]="'dd-MMM-yyyy'" [(ngModel)]="employee.joiningDate" [format]="'dd-MMM-yyyy'"
style="width:100%"></kendo-datepicker> style="width:100%"></kendo-datepicker>
</div> </div>
<div class="p-col-12 p-md-6 p-lg-4" style="margin:auto">
<label for="dtpEndofContract">End of Contract</label>
</div>
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg">
<kendo-datepicker id="dtpEndofContract" formControlName="endOfContractDate"
[(ngModel)]="employee.endOfContractDate" [format]="'dd-MMM-yyyy'"
style="width:100%"></kendo-datepicker>
</div>
</div> </div>
</div> </div>

View File

@ -250,6 +250,9 @@ export class EmployeePayrollProfileComponent implements OnInit {
isShownInTaxSheet: [''], isShownInTaxSheet: [''],
isConfirmed: [''], isConfirmed: [''],
foreignExpatriate: [''], foreignExpatriate: [''],
fatherName: [''],
tinNo: [''],
endOfContractDate: [''],
}); });
} }

View File

@ -260,7 +260,8 @@ export class EmployeePickerComponent implements OnInit {
]; ];
public loadData(): void { public loadData(): void {
this.gridView = { this.gridView = {
data: orderBy(this.data.slice(this.skip, this.skip + this.pageSize), this.sort), // data: orderBy(this.data.slice(this.skip, this.skip + this.pageSize), this.sort),
data: this.data.slice(this.skip, this.skip + this.pageSize),
total: this.data.length, total: this.data.length,
}; };
this.selectedItems = []; this.selectedItems = [];
@ -454,7 +455,8 @@ export class EmployeePickerComponent implements OnInit {
name = value; name = value;
} }
this.loadingEmployee = true; this.loadingEmployee = true;
this.empSrvc.getEmpCodeName(code, name) // this.empSrvc.getEmpCodeName(code, name)
this.empSrvc.getEmpCodeNameForEmployeePickerInput(code, name)
.subscribe( .subscribe(
(resp: any) => { (resp: any) => {
this.searchEmployees = resp; this.searchEmployees = resp;
@ -602,10 +604,18 @@ export class EmployeePickerComponent implements OnInit {
} }
if (this.checkLive === true) { if (this.checkLive === true) {
//Previous Code For Only Live Employee
srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, 1, EnumSQLOperator.EqualTo); srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, 1, EnumSQLOperator.EqualTo);
//New Code For Live And Waiting For Join
// srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, '1,6', EnumSQLOperator.In);
} }
if (this.checkLiveNo === true) { if (this.checkLiveNo === true) {
srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, 2, EnumSQLOperator.EqualTo); //Previous Code For Only Not Live
// srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, 2, EnumSQLOperator.EqualTo);
//New Code For Live And Waiting For Join
srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, '2,6', EnumSQLOperator.In);
} }
if (this.checkIA === true) if (this.checkIA === true)
srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, EnumEmployeeStatus.IA, EnumSQLOperator.EqualTo); srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, EnumEmployeeStatus.IA, EnumSQLOperator.EqualTo);

View File

@ -17,6 +17,7 @@ using Microsoft.Extensions.Options;
using static Azure.Core.HttpHeader; using static Azure.Core.HttpHeader;
using iTextSharp.text; using iTextSharp.text;
using static iTextSharp.text.pdf.AcroFields; using static iTextSharp.text.pdf.AcroFields;
using Org.BouncyCastle.Utilities;
namespace HRM.UI.Controllers namespace HRM.UI.Controllers
{ {
@ -131,9 +132,12 @@ namespace HRM.UI.Controllers
{ {
omanager.checkDataPermission = currentUser.hasDataPermission; omanager.checkDataPermission = currentUser.hasDataPermission;
omanager.userid = currentUser.UserID; omanager.userid = currentUser.UserID;
olist = _serachManager.Find(omanager); List<SearchEmployee> unOrderedList = _serachManager.Find(omanager);
olist = unOrderedList
.OrderBy(num => num.EmployeeNo.Length) // Order by length (smallest to largest)
.ThenBy(num => Convert.ToInt32(num.EmployeeNo)).ToList();
//omanager.checkDataPermission = false; //omanager.checkDataPermission = false;
#region data permission #region data permission
//List<DataPermission> datapermissions = new DataPermissionService().Get(currentUser.UserID, //List<DataPermission> datapermissions = new DataPermissionService().Get(currentUser.UserID,
@ -733,7 +737,20 @@ namespace HRM.UI.Controllers
List<SearchEmployee> olist = new List<SearchEmployee>(); List<SearchEmployee> olist = new List<SearchEmployee>();
try try
{ {
olist = _serachManager.FindEmpCodeName((int) currentUser.PayrollTypeID, code, name); //olist = _serachManager.FindEmpCodeName((int) currentUser.PayrollTypeID, code, name);
if(code != "")
{
List<SearchEmployee> unorderedList = _serachManager.FindEmpCodeName((int)currentUser.PayrollTypeID, code, name);
olist = unorderedList
.OrderBy(item => item.EmployeeNo != code) // False (0) for priority value, True (1) for others
.ThenBy(item => item.EmployeeNo).ToList();
}
else
{
olist = _serachManager.FindEmpCodeName((int)currentUser.PayrollTypeID, code, name);
}
//List<Grade> grades = new GradeService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID); //List<Grade> grades = new GradeService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
//List<Designation> designations = new DesignationService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID); //List<Designation> designations = new DesignationService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
//List<Department> departments = new DepartmentService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID); //List<Department> departments = new DepartmentService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
@ -746,7 +763,55 @@ namespace HRM.UI.Controllers
// if (designation != null) x.designationName = designation.Name; // if (designation != null) x.designationName = designation.Name;
// var department = departments.FirstOrDefault(d => d.ID == x.DepartmentID); // var department = departments.FirstOrDefault(d => d.ID == x.DepartmentID);
// if (department != null) x.departmentName = department.Name; // if (department != null) x.departmentName = department.Name;
//}); //}); // Secondary ordering (alphabetical)
}
catch (Exception ex)
{
return StatusCode(StatusCodes.Status500InternalServerError, ex.Message);
}
return Ok(olist);
}
[HttpGet("getEmpCodeNameForEmployeePickerInput/{code}/{name}")]
public ActionResult getEmpCodeNameForEmployeePicker(string code, string name)
{
code = GlobalFunctions.GetApiDefaultData(code);
name = GlobalFunctions.GetApiDefaultData(name);
CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User);
List<SearchEmployee> olist = new List<SearchEmployee>();
try
{
//olist = _serachManager.FindEmpCodeName((int) currentUser.PayrollTypeID, code, name);
if(code != "")
{
List<SearchEmployee> unorderedList = _serachManager.FindEmpCodeNameForEmployeePicker((int)currentUser.PayrollTypeID, code, name);
olist = unorderedList
.OrderBy(item => item.EmployeeNo != code) // False (0) for priority value, True (1) for others
.ThenBy(item => item.EmployeeNo).ToList();
}
else
{
olist = _serachManager.FindEmpCodeNameForEmployeePicker((int)currentUser.PayrollTypeID, code, name);
}
//List<Grade> grades = new GradeService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
//List<Designation> designations = new DesignationService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
//List<Department> departments = new DepartmentService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
//olist.ForEach(x=>
//{
// var grd = grades.FirstOrDefault(d => d.ID == x.GradeID);
// if(grd != null) x.gradeName = grd.Name;
// var designation = designations.FirstOrDefault(d => d.ID == x.designationID);
// if (designation != null) x.designationName = designation.Name;
// var department = departments.FirstOrDefault(d => d.ID == x.DepartmentID);
// if (department != null) x.departmentName = department.Name;
//}); // Secondary ordering (alphabetical)
} }
catch (Exception ex) catch (Exception ex)
{ {