fixed worklist issue
parent
e7745d8da3
commit
91361f87d3
@ -1,3 +1,26 @@
|
||||
<p>
|
||||
cei-homepage works!
|
||||
</p>
|
||||
<ion-content>
|
||||
<div class="head-title">
|
||||
<app-generic-header showImage="false" showBack="true" [headerText]="'eit,cei' | translate">
|
||||
</app-generic-header>
|
||||
</div>
|
||||
|
||||
<div padding>
|
||||
<ion-list>
|
||||
<ion-radio-group [(ngModel)]="SelectedServiceType">
|
||||
<ion-item *ngFor="let user of familyMemberData">
|
||||
<ion-label>{{user.CONTACT_NAME}}</ion-label>
|
||||
<ion-radio mode="md" slot="start" [value]="user" (click)='selectedUser()'></ion-radio>
|
||||
</ion-item>
|
||||
</ion-radio-group>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<ion-button class="addEitOkButton" color="customnavy" ion-button>
|
||||
{{'vacation-rule, next-label' | translate}}</ion-button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@ -0,0 +1,89 @@
|
||||
<app-generic-header
|
||||
showBack="true"
|
||||
[headerText]="'myTeam, subordinate-leave' | translate">
|
||||
</app-generic-header>
|
||||
|
||||
|
||||
<ion-content padding style="--background: #f5f5f5">
|
||||
<div class="team-member-container">
|
||||
<ion-label>
|
||||
<ion-item lines='none'>
|
||||
<p style="font-size: 18px; font-weight: bold;">{{ts.trPK('myTeam','select-duration')}}</p>
|
||||
</ion-item>
|
||||
</ion-label>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col size='6'>
|
||||
<ion-label position='floating' style="margin-left: 15px;" class="colBold">{{ts.trPK('general','from')}} </ion-label>
|
||||
|
||||
<ion-item class='dynamicField' lines='none'>
|
||||
<ion-datetime style="padding: 0px" [(ngModel)]="startDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required
|
||||
cancelText="{{ts.trPK('general','cancel')}}" doneText="{{ts.trPK('general','done')}}"></ion-datetime>
|
||||
|
||||
<ion-icon style="width: 20px;" name="calendar"></ion-icon>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
<ion-col size='6'>
|
||||
<ion-label position='floating' style="margin-left: 15px;" class="colBold">{{ts.trPK('general','to')}} </ion-label>
|
||||
<ion-item class='dynamicField' lines='none'>
|
||||
<ion-datetime style="padding: 0px" [(ngModel)]="endDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required
|
||||
cancelText="{{ts.trPK('general','cancel')}}"
|
||||
doneText="{{ts.trPK('general','done')}}"></ion-datetime>
|
||||
|
||||
<ion-icon style="width: 20px;" name="calendar"></ion-icon>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</div>
|
||||
|
||||
<div *ngIf='noData'></div>
|
||||
|
||||
<div *ngIf='!noData'>
|
||||
<div *ngIf='list.length === 0'>
|
||||
<div class="team-member-container" style="text-align: center;">
|
||||
<h2 style="margin-top: 5px !important; font-size: 20px;" class="name">
|
||||
{{ts.trPK('general','empty')}}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div *ngIf='list.length > 0'>
|
||||
<div class="team-member-container" *ngFor='let user of list'>
|
||||
<ion-row>
|
||||
<ion-col [size]="3">
|
||||
<div class="user-image-container">
|
||||
<div class="user-image">
|
||||
<img *ngIf='user.image' [src]="user.image"/>
|
||||
<img *ngIf='!user.image' src="../assets/imgs/profile.png"/>
|
||||
</div>
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col [size]="9">
|
||||
<div>
|
||||
<span>
|
||||
<h2 style="margin-top: 0px !important; font-size: 20px;" class="name">{{user.EMPLOYEE_NAME}}</h2>
|
||||
<span class="title"><ion-label>{{ts.trPK('general','from')}}: </ion-label><b style="font-size: 12px;">{{getDate(user.DATE_START)}} </b></span>
|
||||
<span class="title"><ion-label>{{ts.trPK('general','to')}}: </ion-label><b style="font-size: 12px;">{{getDate(user.DATE_END)}}</b></span>
|
||||
<br>
|
||||
<span class="title"><ion-label>{{ts.trPK('myTeam','no-of-days')}}: </ion-label><b style="font-size: 12px;">{{diffDays(user)}}</b></span>
|
||||
</span>
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<ion-button class="confirmEitOkButton" [disabled]='checkDate()' (click)="subordinateLeaveList()">{{ts.trPK('general','submit')}}</ion-button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,199 @@
|
||||
.confirmEitOkButton{
|
||||
white-space: normal !important;
|
||||
text-transform: capitalize !important;
|
||||
min-height: 45px !important;
|
||||
min-width: 5px !important;
|
||||
margin: 8px !important;
|
||||
--background: #269DB8;
|
||||
width: 80% !important;
|
||||
color: white!important;
|
||||
border-radius: 16px !important;
|
||||
}
|
||||
|
||||
.team-member-container{
|
||||
// background: white;
|
||||
// border-radius: 100px 20px 20px 100px;
|
||||
// margin-top: 15px;
|
||||
// font-family: WorkSans-Regular;
|
||||
// border: 1px solid #ccc;
|
||||
// border-radius: 15px;
|
||||
// padding-bottom: 8px;
|
||||
background: white;
|
||||
/* margin-top: 2px; */
|
||||
font-family: WorkSans-Regular;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 15px;
|
||||
padding-bottom: 8px;
|
||||
padding-top: 9px;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
// .user-image-container{
|
||||
// position: relative;
|
||||
// width: 70px;
|
||||
// height: 70px;
|
||||
// display: block;
|
||||
// margin: 0 auto;
|
||||
// &:before{
|
||||
// position: absolute;
|
||||
// content: "";
|
||||
// width: 20px;
|
||||
// height: 20px;
|
||||
// border-radius: 20px;
|
||||
// border: 1px solid white;
|
||||
// top: 0;
|
||||
// right: 0;
|
||||
// background-color: red;
|
||||
// z-index: 9;
|
||||
// }
|
||||
// &.present:before{
|
||||
// background-color: green !important;
|
||||
// }
|
||||
// }
|
||||
.user-image{
|
||||
// overflow: hidden;
|
||||
// position: relative;
|
||||
// display: block;
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// border-radius: 80px;
|
||||
// border: 1px solid #ccc;
|
||||
// margin: 0px auto 6px;
|
||||
|
||||
img {
|
||||
// width: 100%;
|
||||
// max-height: 100%;
|
||||
width: 74%;
|
||||
max-height: 74%;
|
||||
margin-top: 7px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.employee-name{
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
.name{
|
||||
// font-size: 16px;
|
||||
// color: black;
|
||||
// // margin: 0;
|
||||
// width: 100%;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
// overflow: hidden;
|
||||
// margin-left: -10px;
|
||||
// margin-top: -5px;
|
||||
// font-family: 'WorkSans-Bold';
|
||||
font-size: 16px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
margin-left: -10px;
|
||||
margin-top: -5px;
|
||||
text-align: left;
|
||||
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
|
||||
line-height: 25px;
|
||||
letter-spacing: -0.64px;
|
||||
color: #2B353E;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.title{
|
||||
// font-size: 13px;
|
||||
// color: #888;
|
||||
// width: 100%;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
// overflow: hidden;
|
||||
// display: block;
|
||||
// margin-left: -10px;
|
||||
// margin-top: -6px;
|
||||
// color: black;
|
||||
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
|
||||
line-height: 12px;
|
||||
letter-spacing: -0.56px;
|
||||
color: #575757;
|
||||
opacity: 1;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
margin-left: -10px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
}
|
||||
|
||||
.employee-name-ar{
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
.name{
|
||||
// font-size: 16px;
|
||||
// color: black;
|
||||
// // margin: 0;
|
||||
// width: 100%;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
// overflow: hidden;
|
||||
// margin-left: -10px;
|
||||
// margin-top: -5px;
|
||||
// font-family: 'WorkSans-Bold';
|
||||
font-size: 16px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
margin-left: -10px;
|
||||
margin-top: -5px;
|
||||
text-align: right;
|
||||
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
|
||||
line-height: 25px;
|
||||
letter-spacing: -0.64px;
|
||||
color: #2B353E;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.title{
|
||||
// font-size: 13px;
|
||||
// color: #888;
|
||||
// width: 100%;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
// overflow: hidden;
|
||||
// display: block;
|
||||
// margin-left: -10px;
|
||||
// margin-top: -6px;
|
||||
// color: black;
|
||||
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
|
||||
line-height: 12px;
|
||||
letter-spacing: -0.56px;
|
||||
color: #575757;
|
||||
opacity: 1;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
margin-left: -10px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
}
|
||||
.image-container{
|
||||
width: 20%;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.swipe-information{
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
border-top: 1px solid #ccc;
|
||||
padding-top: 6px;
|
||||
margin-top: 6px;
|
||||
.check-in {
|
||||
font-size: 12px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SubordinateLeaveComponent } from './subordinate-leave.component';
|
||||
|
||||
describe('SubordinateLeaveComponent', () => {
|
||||
let component: SubordinateLeaveComponent;
|
||||
let fixture: ComponentFixture<SubordinateLeaveComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ SubordinateLeaveComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SubordinateLeaveComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,57 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
import { MyTeamService } from '../service/my-team.service';
|
||||
import * as moment from 'moment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-subordinate-leave',
|
||||
templateUrl: './subordinate-leave.component.html',
|
||||
styleUrls: ['./subordinate-leave.component.scss'],
|
||||
})
|
||||
export class SubordinateLeaveComponent implements OnInit {
|
||||
public startDate: any;
|
||||
public endDate: any;
|
||||
public list = [];
|
||||
public noData = true;
|
||||
|
||||
constructor(
|
||||
public ts: TranslatorService,
|
||||
public common: CommonService,
|
||||
public myTeamService: MyTeamService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
subordinateLeaveList() {
|
||||
const Sdata = this.common.convertDateToJsonDateUpdated(this.startDate);
|
||||
const Edata = this.common.convertDateToJsonDateUpdated(this.endDate);
|
||||
this.myTeamService.getEmployeeSubordinatesLeave({
|
||||
P_DATE_FROM: Sdata,
|
||||
P_DATE_TO: Edata
|
||||
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
|
||||
if (this.common.validResponse(result)) {
|
||||
this.list = result.GetSubordinatesLeavesTotalVacationsList;
|
||||
this.noData = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getDate(date) {
|
||||
const newDate = this.common.localizeDate(new Date(this.common.getDateTimeISOFromStringUpdated(date).split(' ')[0]));
|
||||
return newDate;
|
||||
}
|
||||
diffDays(date) {
|
||||
const date1 = new Date(this.common.getDateTimeISOFromStringUpdated(date.DATE_START).split(' ')[0]);
|
||||
const date2 = new Date(this.common.getDateTimeISOFromStringUpdated(date.DATE_END).split(' ')[0]);
|
||||
const diff = Math.abs(date1.getTime() - date2.getTime());
|
||||
const diffDays = Math.ceil(diff / (1000 * 3600 * 24));
|
||||
return diffDays;
|
||||
}
|
||||
|
||||
checkDate() {
|
||||
if (this.startDate && this.endDate) {
|
||||
return false;
|
||||
} else { return true; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><title>Bar Chart</title><path d="M32 32v432a16 16 0 0016 16h432" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><rect x="96" y="224" width="80" height="192" rx="20" ry="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><rect x="240" y="176" width="80" height="240" rx="20" ry="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><rect x="383.64" y="112" width="80" height="304" rx="20" ry="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>
|
||||
|
After Width: | Height: | Size: 737 B |
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><title>Bar Chart</title><path d="M480 496H48a32 32 0 01-32-32V32a16 16 0 0132 0v432h432a16 16 0 010 32z"/><path d="M156 432h-40a36 36 0 01-36-36V244a36 36 0 0136-36h40a36 36 0 0136 36v152a36 36 0 01-36 36zM300 432h-40a36 36 0 01-36-36V196a36 36 0 0136-36h40a36 36 0 0136 36v200a36 36 0 01-36 36zM443.64 432h-40a36 36 0 01-36-36V132a36 36 0 0136-36h40a36 36 0 0136 36v264a36 36 0 01-36 36z"/></svg>
|
||||
|
After Width: | Height: | Size: 475 B |
Loading…
Reference in New Issue