diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts
index 45bbb01e..55beb912 100644
--- a/Mohem/src/app/hmg-common/services/common/common.service.ts
+++ b/Mohem/src/app/hmg-common/services/common/common.service.ts
@@ -1109,6 +1109,9 @@ public getMonthNameAr(value: number): string {
public openMyTeamPage() {
this.nav.navigateForward(['/my-team/home']);
}
+ public openMyTeamDetailPage() {
+ this.nav.navigateForward(['/my-team/details']);
+ }
public openPage(link: string) {
this.nav.navigateForward([link]);
diff --git a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.scss b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.scss
index 87069a59..f497860c 100644
--- a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.scss
+++ b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.scss
@@ -45,10 +45,19 @@
font-size: 18px;
color: black;
margin: 0;
+ width: 100%;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
}
.title{
font-size: 15px;
color: #888;
+ width: 100%;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ display: block;
}
}
.image-container{
diff --git a/Mohem/src/app/my-team/details/details.component.html b/Mohem/src/app/my-team/details/details.component.html
index 1191cf84..b7e24248 100644
--- a/Mohem/src/app/my-team/details/details.component.html
+++ b/Mohem/src/app/my-team/details/details.component.html
@@ -49,47 +49,69 @@
-
+
+
+
+
+ Clear Search
+
+
+
+
+ checkOut="-"
+ (click)="getDetails(i)">
-
+
\ No newline at end of file
diff --git a/Mohem/src/app/my-team/home/home.component.scss b/Mohem/src/app/my-team/home/home.component.scss
index 2e2e8b19..650979e9 100644
--- a/Mohem/src/app/my-team/home/home.component.scss
+++ b/Mohem/src/app/my-team/home/home.component.scss
@@ -141,3 +141,23 @@ ion-content {
border: 1px solid #ccc;
margin: 0px auto 6px;
}
+
+.search-container{
+ margin-top: 15px;
+ ion-col{
+ background: white;
+ border-radius: 12px;
+ padding-right: 10px;
+ flex: none;
+ ion-icon{
+ margin-right: 3px;
+ font-size: 14px;
+ margin-left: 3px;
+ vertical-align: middle;
+ }
+ span{
+ font-size: 12px;
+ vertical-align: middle;
+ }
+ }
+}
diff --git a/Mohem/src/app/my-team/home/home.component.ts b/Mohem/src/app/my-team/home/home.component.ts
index c07ec4e9..e0d67465 100644
--- a/Mohem/src/app/my-team/home/home.component.ts
+++ b/Mohem/src/app/my-team/home/home.component.ts
@@ -92,7 +92,7 @@ export class HomeComponent implements OnInit {
) {}
ngOnInit() {
- // this.common.sharedService.setSharedData( [], DetailsComponent.opendEmployeesARR);
+ this.common.sharedService.setSharedData( [], DetailsComponent.opendEmployeesARR);
this.setIntitial();
}
@@ -117,8 +117,9 @@ export class HomeComponent implements OnInit {
}
searchEmployee() {
- // this.isSearch = true;
- // this.getEmpSubordinate();
+ this.isSearch = true;
+ this.empSubordinate = [];
+ this.getEmpSubordinate();
}
getEmpSubordinate() {
@@ -130,6 +131,8 @@ export class HomeComponent implements OnInit {
if (this.isSearch) {
this.selEmpNo = null;
+ } else {
+ this.selEmpNo = this.selMenu.userid;
}
const body = {
@@ -142,51 +145,44 @@ export class HomeComponent implements OnInit {
};
this.getEmployeeSubordinatesRequestObject = body;
this.myTeamService.getEmployeeSubordinates(body).subscribe((result: any) => {
- this.handleEmpResult(result);
- });
+ if (this.common.validResponse(result)) {
+ this.handleEmpResult(result.GetEmployeeSubordinatesList);
+ }
+ });
}
handleEmpResult(result) {
- if (this.common.validResponse(result)) {
- if (this.common.hasData(result.GetEmployeeSubordinatesList)) {
- this.empSubordinate = result.GetEmployeeSubordinatesList;
+ const lastItemIndex = result.length - 1;
+ const lastItem = result[lastItemIndex];
+ if (lastItem) {
+ if (lastItem.NO_OF_ROWS === lastItem.ROW_NUM) {
+ this.isReachEnd = true;
+ this.infiniteScroll.complete();
+ } else {
+ this.isReachEnd = false;
+ this.infiniteScroll.complete();
+ }
+ }
+ if (this.common.hasData(result)) {
this.getEmployeeSubordinatesRequestObject.P_PAGE_NUM++;
- const lastItemIndex = this.empSubordinate.length - 1;
- if (result.GetEmployeeSubordinatesList[lastItemIndex]) {
- const lastitem = result.GetEmployeeSubordinatesList[lastItemIndex];
- if (lastitem.NO_OF_ROWS === lastitem.ROW_NUM) {
- this.isReachEnd = true;
- } else {
- this.isReachEnd = false;
- }
+ if (this.empSubordinate.length === 0) {
+ this.empSubordinate = result;
+ } else {
+ this.empSubordinate = this.empSubordinate.concat(result);
}
} else {
this.empSubordinate = [];
}
- }
}
doInfinite(infiniteScroll) {
if (!this.isReachEnd) {
this.myTeamService.getEmployeeSubordinates(this.getEmployeeSubordinatesRequestObject).subscribe((result: any) => {
if (this.common.validResponse(result)) {
- this.getEmployeeSubordinatesRequestObject.P_PAGE_NUM++;
- if (this.common.hasData(result.GetEmployeeSubordinatesList)) {
- result.GetEmployeeSubordinatesList.forEach(element => {
- if (element.ROW_NUM === element.NO_OF_ROWS) {
- this.isReachEnd = true;
- } else {
- this.isReachEnd = false;
- }
- this.empSubordinate.push(element);
- });
- } else {
- this.isReachEnd = true;
- }
+ this.handleEmpResult(result.GetEmployeeSubordinatesList);
}
this.infiniteScroll.complete();
- }
- );
+ });
} else {
if (this.infiniteScroll) {
this.infiniteScroll.complete();
@@ -194,12 +190,20 @@ export class HomeComponent implements OnInit {
}
}
+ clearSearch() {
+ this.isSearch = false;
+ this.getEmployeeSubordinatesRequestObject.P_PAGE_NUM = 1;
+ this.empSubordinate = [];
+ this.isReachEnd = false;
+ this.searchNameOrUserName = '';
+ this.searchEmail = '';
+ this.getEmpSubordinate();
+ }
+
getDetails(index) {
this.common.sharedService.setSharedData(this.empSubordinate[index], MyTeamService.EMPLOYEE_SHARED_DATA);
this.common.sharedService.setSharedData(this.selMenu, MenuResponse.SHARED_DATA);
- // this.close().then(() => {
- // this.common.openMyTeamDetails();
- // });
+ this.common.openMyTeamDetailPage();
}
goToSubordinate() {
diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html
index 1ab21604..8aff8902 100644
--- a/Mohem/src/app/notification/home/home.component.html
+++ b/Mohem/src/app/notification/home/home.component.html
@@ -47,7 +47,6 @@
Advanced Search
-