worklist for IC

FATIMA-Q2-DEVELOPMENT
Sultan Khan 5 years ago
parent 3e4d046818
commit 671bd53ca1

@ -202,78 +202,79 @@
<ion-slide>
<ng-container *ngIf="activeSegment === 'action-history'">
<ion-card class="cardContent" style="width: 100% !important;">
<ion-card-content>
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 ">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item *ngFor="let actionHistory of actionHistoryRes; let index=index">
<div class="timeline-item" slot="start">
<div
[class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge"
src="../assets/imgs/profile.png">
</div>
</div>
<ion-col>
<ion-label style="color:black !important ;font-weight: bold;">
{{actionHistory.NAME}}
</ion-label>
<div *ngIf="actionHistory.NOTE">
<div *ngIf="actionHistory.NOTE != '' ">
<div *ngIf="!checkLines(actionHistory.NOTE)">
<div class="containerNote">
Note: {{actionHistory.NOTE}}
</div>
</div>
<div *ngIf="checkLines(actionHistory.NOTE)">
<div class="containerNote" [ngClass]="actionHistory.visible ? 'show' : '' ">
Note: {{actionHistory.NOTE}}
</div>
<button class="showMore" (click)="actionHistory.visible = !actionHistory.visible">{{
actionHistory.visible ? 'Show less': 'Show More'
}}</button>
<ion-card class="cardContent" style="width: 100%;">
<ion-card-content>
</div>
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 ">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item *ngFor="let actionHistory of actionHistoryRes">
<div class="timeline-item" slot="start">
<div
[class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge"
src="../assets/imgs/profile.png"> </div>
</div>
<ion-col size="8">
<ion-label class="name">
{{actionHistory.NAME}}
</ion-label>
<div *ngIf="actionHistory.NOTE != '' ">
<div *ngIf="!checkLines(actionHistory.NOTE)">
<div class="containerNote">
Note: {{actionHistory.NOTE}}
</div>
</div>
<div *ngIf="checkLines(actionHistory.NOTE)">
<div class="containerNote"
[ngClass]="actionHistory.visible ? 'show' : '' ">
Note: {{actionHistory.NOTE}}
</div>
<button class="showMore"
(click)="actionHistory.visible = !actionHistory.visible">{{ actionHistory.visible ? 'Show less': 'Show More' }}</button>
</div>
</div>
<ion-label
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION_CODE === 'SUBMIT' ,'bg-orange-txt' : actionHistory.ACTION_CODE === 'PENDING' ,'bg-red-txt' : actionHistory.ACTION_CODE === 'REJECT','bg-green-txt' : actionHistory.ACTION_CODE != 'PENDING' && actionHistory.ACTION_CODE != 'REJECT' && actionHistory.ACTION_CODE != 'SUBMIT'}"
class=""> {{actionHistory.ACTION}}</ion-label>
<ion-label *ngIf="actionHistory.NOTIFICATION_DATE != ''"
class="dateActionHistory">
{{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label>
</ion-col>
<ion-col size="4">
<img class="req_info" src="assets/imgs/req info.svg" (click)="openRequestInfoDel(actionHistory, 'REQUEST_INFO')" />
<img class="req_info" src="assets/imgs/delegate.svg" (click)="openRequestInfoDel(actionHistory, 'DELEGATE')"/>
</ion-col>
<div class="line"></div>
</ion-item>
</div>
</div>
<ion-label
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION_CODE === 'SUBMIT' ,'bg-orange-txt' : actionHistory.ACTION_CODE === 'PENDING' ,'bg-red-txt' : actionHistory.ACTION_CODE === 'REJECT','bg-green-txt' : actionHistory.ACTION_CODE != 'PENDING' && actionHistory.ACTION_CODE != 'REJECT' && actionHistory.ACTION_CODE != 'SUBMIT'}"
class=""> {{actionHistory.ACTION}}</ion-label>
<ion-label *ngIf="actionHistory.NOTIFICATION_DATE != ''" class="dateActionHistory">
{{actionHistory.NOTIFICATION_DATE|
dateString }}
</ion-label>
</ion-col>
</ion-item>
</ion-list>
</div>
</ion-list>
</div>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">
{{ 'general, load-more' | translate}}
</button>
</ion-card-content>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">
{{ 'general, load-more' | translate}}
</button>
</ion-card-content>
</ion-card>
</ng-container>
</ng-container>
</ion-slide>
<ion-slide>

@ -1,112 +1,3 @@
// .itemHISBtn{
// padding: 5px;
// color: var(--light);
// background: var(--darkgray);
// border-radius: 3px;
// width: 85%;
// height: 40px;
// }
// .rowBtn{
// display: flex;
// flex-direction: row;
// justify-content: center;
// align-items: center;
// background: white;
// }
// .rowBorder{
// border-bottom: solid 0.03cm var(--grayBG);
// }
// .colBorder{
// border-right: solid 0.03cm var(--grayBG);
// }
// .dateActionHistory{
// text-align: end;
// // margin-top: -25px;
// }
// .actionBtn{
// --border-radius: 50% !important;
// height: 55px;
// width: 55px;
// --background: var(--newgreen); // will be dynamic
// background: transparent;
// margin:10px;
// }
// .itemAttch{
// border-radius: 11px;
// margin: 8px;
// --min-height: 60px;
// --max-height: 60px;
// }
// .less {
// max-height: 54px;
// }
// .noDataDiv{
// background: #ffffff;
// height: 11%;
// text-align: center;
// padding-top: 1px;
// border-radius: 10px;
// margin: 10px;
// }
// .container {
// font-size: 14px;
// line-height: 14px;
// height: 16px;
// overflow: hidden;
// text-align: justify;
// }
// .show {
// overflow: visible;
// height: auto;
// }
// .showMore{
// padding: 0px;
// background: transparent;
// color: blue;
// text-decoration: underline;
// font-size: 14px;
// }
// .succssfullMSG{
// height: 100%;
// width: 100%;
// background: var(--newgreen);
// color: white;
// font-weight: bold;
// font-size: 20px;
// text-align: center;
// vertical-align: middle;
// padding-top: 30px;
// }
// .succssfullIcon{
// width: 60%;
// text-align: center;
// height: 60%;
// }
// .subjectNotification{
// text-align: center;
// padding-top: 10px;
// font-weight: bold;
// }
.no-padding-label {
padding: 0px !important;
@ -141,4 +32,19 @@
.action-btn {
white-space: nowrap;
font-size: 10px;
}
}
.name{
color:black !important ;font-weight: bold;
}
.timeline-item{
margin: 0;
white-space: nowrap;
font-size: 10px;
}
.req_info{
width: 25px;
height: 25px;
display: inline-block;
margin: 5px;
}

@ -37,7 +37,7 @@ import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/
import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { IonSlides } from '@ionic/angular';
import { IonSlides } from '@ionic/angular';
@Component({
selector: 'app-worklist-main-ic',
@ -129,7 +129,7 @@ export class WorklistMainIcComponent implements OnInit {
reqInfo_label: any;
closeDis: boolean = false;
selectedFilter: string;
;
;
close_label: any;
constructor(
@ -472,11 +472,11 @@ export class WorklistMainIcComponent implements OnInit {
if (index < this.notificationArray.length) {
this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA);
this.activeSegment = 'line_details';
if(this.selectedFilter === 'ALL'){
this.checkRequestType(index);
if (this.selectedFilter === 'ALL') {
this.checkRequestType(index);
} else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) {
this.checkRequestType(index);
}else {
} else {
this.common.openNotificationPage();
}
} else {
@ -485,7 +485,7 @@ export class WorklistMainIcComponent implements OnInit {
}
checkRequestType(index){
checkRequestType(index) {
if (this.notificationArray[index].REQUEST_TYPE === 'PO') {
this.intializeNotificationDetail();
} else
@ -1193,7 +1193,7 @@ export class WorklistMainIcComponent implements OnInit {
async openRepRolModal() {
this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData');
const modal = await this.modalCtrl.create({
component: WorkListReplacementRollComponent,
@ -1267,6 +1267,9 @@ export class WorklistMainIcComponent implements OnInit {
}
});
}
openRequestInfoDel(userData, flag) {
this.common.sharedService.setSharedData(userData, 'requestInfoDelUser');
this.actionButton(flag);
}
}

Loading…
Cancel
Save