From 75e94ddc94c8f504671e572e53953c96a9a637ca Mon Sep 17 00:00:00 2001 From: Mohaimen Hasan Date: Sun, 15 Nov 2026 13:09:32 +0600 Subject: [PATCH] AD Parameter Employee Entry --- ...ction-parameterization-entry.component.css | 180 ++++- ...tion-parameterization-entry.component.html | 701 +++++++++--------- ...uction-parameterization-entry.component.ts | 22 +- .../discontinue-employee-details.component.ts | 2 +- 4 files changed, 521 insertions(+), 384 deletions(-) diff --git a/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.css b/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.css index d4d9613..dfb44a1 100644 --- a/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.css +++ b/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.css @@ -2,8 +2,179 @@ kendo-numerictextbox{ width: 100%; } -.checkBoxGrid.grid { +/* .checkBoxGrid.grid { justify-content: space-evenly; +} */ + +/* ---- Layout only (alignment / spacing); no behaviour depends on these classes ---- */ +.adp-card { + padding: 14px 16px; + margin-bottom: 12px; +} + +.adp-section-title { + font-weight: 600; + font-size: 13px; + color: #495057; + padding-bottom: 6px; + margin-bottom: 10px; + border-bottom: 1px solid #e9ecef; +} + +.adp-required { + color: #dc3545; +} + +/* label + control on one line, labels the same width so the controls line up */ +.adp-field { + display: flex; + align-items: center; + gap: 10px; + margin-bottom: 8px; +} + +.adp-label { + flex: 0 0 110px; + margin: 0; + white-space: nowrap; +} + +.adp-control { + flex: 1 1 auto; + min-width: 0; +} + +/* every input on the page the same height, so the rows line up */ +.adp-page kendo-dropdownlist, +.adp-page kendo-numerictextbox, +.adp-page kendo-datepicker { + height: 32px; +} + +.adp-page kendo-dropdownlist.form-control { + padding: 0; + font-size: inherit; + min-height: 0; +} + +/* the four check boxes in two even columns, starting under the inputs (label width + gap) */ +.adp-checks { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 8px 12px; + margin: 4px 0 0 120px; + padding: 10px 12px; + border: 1px solid #dee2e6; + border-radius: 6px; + background: #fafbfc; +} + +.adp-check { + display: flex; + align-items: center; + gap: 6px; + margin: 0; + white-space: nowrap; +} + +.adp-check .k-checkbox-label { + margin: 0; +} + +/* the tab panels on this page are empty (only the headers are used), so drop their padding */ +:host ::ng-deep .adp-card .tab-view-compat-panels { + padding: 0 !important; +} + +.adp-detail-text { + margin: 12px 0 8px; +} + +/* employee entry: label above each control, all on one row */ +.adp-entry-row { + display: flex; + flex-wrap: wrap; + align-items: flex-start; + gap: 12px 16px; + margin-bottom: 10px; +} + +.adp-entry-item { + display: flex; + flex-direction: column; + gap: 4px; + flex: 0 1 200px; + min-width: 160px; +} + +.adp-entry-emp { + flex-basis: 140px; + min-width: 120px; +} + +/* the picker (icon + count) sits in a 32px box like the inputs */ +.adp-entry-emp app-employee-picker { + display: flex; + align-items: center; + min-height: 32px; +} + +/* the picker sizes its search button and count as 15% of its box; on this page give them a fixed size + (this page only — the picker component itself is unchanged) */ +/* direct path only, so the buttons inside the picker's pop-up dialog are not touched */ +:host ::ng-deep .adp-entry-emp app-employee-picker > div > div > div > button { + width: 32px !important; + max-width: none !important; + height: 32px; + flex: 0 0 32px; +} + +:host ::ng-deep .adp-entry-emp app-employee-picker > div > div > div > label { + width: auto !important; + max-width: none !important; + margin: 0 0 0 8px; + white-space: nowrap; +} + +:host ::ng-deep .adp-entry-emp app-employee-picker > div > div > div { + display: flex; + align-items: center; +} + +/* every label the same height (the To Date one has a check box), so all inputs start on one line */ +.adp-entry-label { + display: flex; + align-items: center; + gap: 4px; + height: 22px; + margin: 0; + white-space: nowrap; +} + +.adp-entry-label .k-checkbox-label { + margin: 0; +} + +/* Sum on the left, buttons on the right */ +.adp-action-bar { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 8px; + padding: 8px 0; + margin-bottom: 8px; + border-top: 1px solid #e9ecef; +} + +.adp-sum { + font-weight: bold; +} + +.adp-actions { + display: flex; + flex-wrap: wrap; + gap: 6px; } @media screen and (max-width: 400px) { @@ -17,4 +188,11 @@ kendo-numerictextbox{ flex-flow: column wrap; justify-content: flex-start; } + .adp-checks { + grid-template-columns: 1fr; + margin-left: 0; + } + .adp-entry-item { + flex: 1 1 100%; + } } diff --git a/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.html b/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.html index 901f206..d659042 100644 --- a/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.html +++ b/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.html @@ -1,13 +1,14 @@ -
-
+ + +
-
-
-
- -
-
+ +
+
General
+
+ +
-
-
- -
-
+
+ +
-
-
- -
-
+
+ +
-
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- - - - - - - -
-
+
+ + + + +
+
+ + +
+
Amount
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ + +
+
Grade *
+ + + + + + + +
+
-
+
-
-
-
- - @if (_selectedPeriodicity == 1) { - - - } - @if (_selectedPeriodicity == 1) { - - - } - @if (_selectedPeriodicity != 1) { - - - } - -
-
- {{ _detailLevelText }} -
-
-
-
-
-
- -
-
- - -
-
-
- @if (!_ischecknotapplicable) { -
-
-
- -
-
- - -
- @if (!_ischeckException) { -
- -
-
- -
-
- -
-
- -
- } -
-
- } -
-
-
- Sum: {{get2FloatingPoint(sumofIndividualAmount())}} -
-
- - - + +
+ + @if (_selectedPeriodicity == 1) { + + + } + @if (_selectedPeriodicity == 1) { + + + } + @if (_selectedPeriodicity != 1) { + + + } + -
-
-
-
-
- - - - - - @if (_ischeckappliedtoInvididual) { - - - - - - - - - - - - - } - @if (!_ischecknotapplicable) { - - - - - - - } - - - {{ statusString(dataItem.approvalStatus)}} - - - - - - - - -
-
-
-
-
-
-
-
- +
+ {{ _detailLevelText }} +
+ +
+
+ + + +
+ @if (!_ischecknotapplicable) { +
+ + + +
+ @if (!_ischeckException) { +
+ + +
+
+ + +
+ } + } +
+ +
+
+ Sum: {{get2FloatingPoint(sumofIndividualAmount())}} +
+
+ + + +
+
+ + + + + + + @if (_ischeckappliedtoInvididual) { + + + + + + + + + + + + + } + @if (!_ischecknotapplicable) { + + + + + + + } + + + {{ statusString(dataItem.approvalStatus)}} + + + + + + + + +
+ diff --git a/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.ts b/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.ts index 7b62e0b..0549bc2 100644 --- a/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.ts +++ b/HRM.UI/ClientApp/src/app/payroll/allowance-deduction/allowance-deduction-parameterization/allowance-deduction-parameterization-entry/allowance-deduction-parameterization-entry.component.ts @@ -262,10 +262,16 @@ export class AllowanceDeductionParameterizationEntryComponent implements OnInit } RemoveAll() { - if (!confirm("Are you sure to delete all employees allowance entry")) { - return; - } - this._individualEmplyees.splice(0, this._individualEmplyees.length); + // if (!confirm("Are you sure to delete all employees allowance entry")) { + // return; + // } + // this._individualEmplyees.splice(0, this._individualEmplyees.length); + this.notificationService.showActiveConfirm('Confirmation', "Are you sure to delete all employees allowance entry?").then((isConfirmed) => { + if (isConfirmed) + { + this._individualEmplyees.splice(0, this._individualEmplyees.length); + } + }); } AddEmployee() { @@ -277,7 +283,6 @@ export class AllowanceDeductionParameterizationEntryComponent implements OnInit this.notificationService.showWarning("Please enter an Amount"); return; } - if (this._selectedEmps == undefined) return; this._selectedEmps.forEach(x => { let newItem: ADParameterEmployee = this._individualEmplyees.find(e => e.employeeID == x.employeeID); @@ -301,19 +306,14 @@ export class AllowanceDeductionParameterizationEntryComponent implements OnInit newItem.tillDate = this._individualToDate; newItem.monthlyAmount = this._individualAmount; newItem.adEmpType = this._adEmpType; - } }); } public GetSelectedEmployee(searchEmp: SearchEmployee[]) { - if (searchEmp != null) { this._selectedEmps = []; - searchEmp.forEach(x => { - this._selectedEmps.push(x); - }); + searchEmp.forEach(x => { this._selectedEmps.push(x); }); } - } PrepareGradeData(usedGrades: ADParameterGrade[]) { diff --git a/HRM.UI/ClientApp/src/app/reports/discontinue-employee-details/discontinue-employee-details.component.ts b/HRM.UI/ClientApp/src/app/reports/discontinue-employee-details/discontinue-employee-details.component.ts index 22da6e7..9abe92e 100644 --- a/HRM.UI/ClientApp/src/app/reports/discontinue-employee-details/discontinue-employee-details.component.ts +++ b/HRM.UI/ClientApp/src/app/reports/discontinue-employee-details/discontinue-employee-details.component.ts @@ -55,7 +55,7 @@ export class DiscontinueEmployeeDetailsComponent implements OnInit { this.notificationService.showWarning('From Date cannot be after To Date.', 'Warning'); return; } - debugger; + // debugger; this.grid.load({ fromDate: this.fromDate, toDate: this.toDate }); }