Attendance process Not in workplan employees show (Task : 20250421-0361)

This commit is contained in:
mashfiq 2025-04-21 17:25:12 +06:00
parent 43fbf03d1d
commit 5e569492ba
7 changed files with 67 additions and 6 deletions

View File

@ -13,7 +13,8 @@ export class ApiService {
public isSSO = false;
public versionDeployement = false;
public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 25))}-`+"01";
// public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 25))}-`+"01";
public versionNumber = `V-20250421-`+"01";
public static BASE_URL = '';
public base_url = '';
// public currentLink = '';

View File

@ -59,13 +59,21 @@
<div class="p-col-12 p-md-5">
<div class="p-col-12">
<!-- <label for="txtLE">(Number of Attendance Employees : {{ employees.length }})</label> -->
<label for="txtWP">Number of Employees not in Work Plan : {{ employees.length }}</label>
<!-- <label for="txtWP">Number of Employees not in Work Plan : {{ employees.length }}</label> -->
<button class="link-button"
icon="window"
kendoButton
(click)="onClickNotInWorkPlanEmployee()"
[disabled]="employees.length == 0"
style="text-decoration: none; font-weight: bold;">
Number of Employees not in Work Plan : {{ employees.length }}
</button>
</div>
<div class="p-col-12" *ngIf="lastProcessDate != null">
<label style="color: red;" for="txtWP">Last Process date : {{ lastProcessDate != null ? (lastProcessDate | date: 'dd MMM yyyy') : '' }}</label>
</div>
<div class="p-col-12">
<button icon="rotate"
<button icon="cogs"
kendoButton
class="k-button k-primary"
(click)="onSave($event)">
@ -79,3 +87,26 @@
</div>
</div>
</form>
<p-dialog header="Not in Work Plan Employees" [(visible)]="showModal" modal="modal"
showEffect="fade" [style]="{width: '60%', maxHeight:'475px', position: 'absolute'}">
<p-scrollPanel mode="native">
<div class="p-grid">
<div class="p-col-12">
<fieldset>
<kendo-grid [data]="employees" [pageable]="false" [sortable]="true" [reorderable]="true" [resizable]="true">
<kendo-grid-column field="sortOrder" title="SL" width="15%">
</kendo-grid-column>
<kendo-grid-column field="employeeNo" title="Employee No" width="20%">
</kendo-grid-column>
<kendo-grid-column field="name" title="Employee Name" width="25%">
</kendo-grid-column>
<kendo-grid-column field="gradeName" title="Grade" width="30%">
</kendo-grid-column>
</kendo-grid>
</fieldset>
</div>
</div>
</p-scrollPanel>
</p-dialog>

View File

@ -26,6 +26,7 @@ export class AttendanceProcessComponent {
lastProcessDate: Date;
processStatus: string = "";
withEmployee: boolean = false;
showModal: boolean = false;
constructor(public attnService: AttendanceServices, public datatransferservice: DataTransferService,
public loadingPanel: loadingPanelService,
public notificationService: HRMNotificationService,
@ -43,6 +44,7 @@ export class AttendanceProcessComponent {
this.attnService.getNotYetAssiged().subscribe(
(x) => {
this.employees = x;
debugger
},
(x) => {
},
@ -137,4 +139,7 @@ export class AttendanceProcessComponent {
this.withEmployee = true;
}
public onClickNotInWorkPlanEmployee() {
this.showModal = true;
}
}

View File

@ -6,6 +6,8 @@ import { InputsModule, TextBoxModule } from '@progress/kendo-angular-inputs';
import { ChartsModule } from '@progress/kendo-angular-charts';
import { CardModule as kendoCardModule } from '@progress/kendo-angular-layout';
import { DialogsModule } from '@progress/kendo-angular-dialog';
import { DialogModule } from 'primeng/dialog';
import { ScrollPanelModule } from 'primeng/scrollpanel';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { PanelModule } from 'primeng/panel';
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
@ -81,6 +83,8 @@ import { OrganizationManagementModule } from '../organization-management/organiz
FormsModule,
ReactiveFormsModule,
DialogsModule,
DialogModule,
ScrollPanelModule,
CommonModule,
GridModule,
InputsModule,

View File

@ -3954,7 +3954,7 @@ p-treeselect.ng-invalid.ng-dirty > .p-treeselect {
border-bottom: 0 none;
/* background: #ffffff;
color: #495057; */
padding: 12px 16px;
padding: 10px 16px;
border-top-right-radius: 4px;
border-top-left-radius: 4px;
background: #52527a;
@ -3990,7 +3990,7 @@ p-treeselect.ng-invalid.ng-dirty > .p-treeselect {
.p-dialog .p-dialog-content {
background: #ffffff;
color: #495057;
padding: 0 1.5rem 2rem 1.5rem;
padding: 1rem 1.5rem 1rem 1.5rem;
}
.p-dialog .p-dialog-footer {
border-top: 0 none;

View File

@ -437,3 +437,12 @@ Menu Custom Code End
/* max-height: 100%;
background-color: white !important; */
}
.link-button {
background: none;
border: none;
color: #007bff;
text-decoration: underline;
cursor: pointer;
padding: 0;
font-size: inherit;
}

View File

@ -950,6 +950,17 @@ namespace HRM.UI.Controllers.Attendance
{
//items = _employeeWorkPlanSetupService.NotYetAssigned((int)currentUser.PayrollTypeID);
items = _employeeService.NotYetAssigned((int)currentUser.PayrollTypeID);
List<Grade> grades = new GradeService().Get(EnumStatus.Regardless);
int count = 0;
items.ForEach(emp =>
{
if (emp.GradeID != null)
{
Grade gr = grades.Find(g => g.ID == emp.GradeID);
emp.GradeName = gr.Name != null ? gr.Name : "";
emp.SortOrder = ++count;
}
});
}
catch (Exception e)
{