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 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, 1, 25))}-`+"01";
public versionNumber = `V-20250421-`+"01";
public static BASE_URL = ''; public static BASE_URL = '';
public base_url = ''; public base_url = '';
// public currentLink = ''; // public currentLink = '';

View File

@ -59,13 +59,21 @@
<div class="p-col-12 p-md-5"> <div class="p-col-12 p-md-5">
<div class="p-col-12"> <div class="p-col-12">
<!-- <label for="txtLE">(Number of Attendance Employees : {{ employees.length }})</label> --> <!-- <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>
<div class="p-col-12" *ngIf="lastProcessDate != null"> <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> <label style="color: red;" for="txtWP">Last Process date : {{ lastProcessDate != null ? (lastProcessDate | date: 'dd MMM yyyy') : '' }}</label>
</div> </div>
<div class="p-col-12"> <div class="p-col-12">
<button icon="rotate" <button icon="cogs"
kendoButton kendoButton
class="k-button k-primary" class="k-button k-primary"
(click)="onSave($event)"> (click)="onSave($event)">
@ -79,3 +87,26 @@
</div> </div>
</div> </div>
</form> </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; lastProcessDate: Date;
processStatus: string = ""; processStatus: string = "";
withEmployee: boolean = false; withEmployee: boolean = false;
showModal: boolean = false;
constructor(public attnService: AttendanceServices, public datatransferservice: DataTransferService, constructor(public attnService: AttendanceServices, public datatransferservice: DataTransferService,
public loadingPanel: loadingPanelService, public loadingPanel: loadingPanelService,
public notificationService: HRMNotificationService, public notificationService: HRMNotificationService,
@ -43,6 +44,7 @@ export class AttendanceProcessComponent {
this.attnService.getNotYetAssiged().subscribe( this.attnService.getNotYetAssiged().subscribe(
(x) => { (x) => {
this.employees = x; this.employees = x;
debugger
}, },
(x) => { (x) => {
}, },
@ -137,4 +139,7 @@ export class AttendanceProcessComponent {
this.withEmployee = true; 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 { ChartsModule } from '@progress/kendo-angular-charts';
import { CardModule as kendoCardModule } from '@progress/kendo-angular-layout'; import { CardModule as kendoCardModule } from '@progress/kendo-angular-layout';
import { DialogsModule } from '@progress/kendo-angular-dialog'; import { DialogsModule } from '@progress/kendo-angular-dialog';
import { DialogModule } from 'primeng/dialog';
import { ScrollPanelModule } from 'primeng/scrollpanel';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { PanelModule } from 'primeng/panel'; import { PanelModule } from 'primeng/panel';
import { DropDownsModule } from '@progress/kendo-angular-dropdowns'; import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
@ -81,6 +83,8 @@ import { OrganizationManagementModule } from '../organization-management/organiz
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
DialogsModule, DialogsModule,
DialogModule,
ScrollPanelModule,
CommonModule, CommonModule,
GridModule, GridModule,
InputsModule, InputsModule,

View File

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

View File

@ -436,4 +436,13 @@ Menu Custom Code End
min-height: 700px; min-height: 700px;
/* max-height: 100%; /* max-height: 100%;
background-color: white !important; */ 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 = _employeeWorkPlanSetupService.NotYetAssigned((int)currentUser.PayrollTypeID);
items = _employeeService.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) catch (Exception e)
{ {