fixed my team

MOHEMM-SFH-COLORS
Fatimah Alshammari 5 years ago
parent 5f9260d111
commit 8ccb01f1ac

@ -136,7 +136,7 @@
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
HR REQUEST
{{ts.trPK('userProfile','HR-Request')}}
</ion-label>
</ion-item>
<ion-item (click)="openChangePassword()">

@ -140,14 +140,14 @@
<ion-row class="custom-radio">
<ion-radio-group (ionChange)="showSelectedField($event)" class="radio-list">
<ion-radio value="HR Services" [color]="myColor">HR Services</ion-radio>
<ion-label class="text-label" >HR Services</ion-label>
<ion-radio value="HR Services" [color]="myColor">{{HR}}</ion-radio>
<ion-label class="text-label" >{{HR}}</ion-label>
<ion-radio value="Complaints" [color]="myColor" >Complaints</ion-radio>
<ion-label class="text-label">Complaints</ion-label>
<ion-radio value="Complaints" [color]="myColor" >{{complaints}}</ion-radio>
<ion-label class="text-label">{{complaints}}</ion-label>
<ion-radio value="Inquiry" [color]="myColor" >Inquiry</ion-radio>
<ion-label class="text-label">Inquiry</ion-label>
<ion-radio value="Inquiry" [color]="myColor" >{{inquiry}}</ion-radio>
<ion-label class="text-label">{{inquiry}}</ion-label>
</ion-radio-group>
</ion-row>
@ -159,23 +159,35 @@
<ion-list>
<label class="labels">{{ts.trPK('userProfile','DeptName')}}</label>
<ion-item lines="none" class="filed-container">
<select class="filed" placeholder="Select Department" type="text">
<option value="1">1</option>
<option value="2">2</option>
<select class="filed1" placeholder="Select Department" type="text" [(ngModel)]="index">
<option [selected]="x.departmentName" value="{{i}}"
*ngFor="let x of departTypeList; let i=index;">
{{x.departmentName}} </option>
</select>
<!-- <select class="filed1" placeholder="Select Department" type="text">
<option >{{EmpRelations}}</option>
<option >{{Hr}}</option>
<option >{{Payroll}}</option>
<option >{{GovRelation}}</option>
</select> -->
</ion-item>
<label class="labels">{{ts.trPK('userProfile','RelatedSection')}}</label>
<ion-item lines="none" class="filed-container">
<select class="filed" placeholder="Select Sectiont" type="text">
<option value="1">1</option>
<option value="2">2</option>
<select [(ngModel)]="index" class="filed2" placeholder="Select Sectiont" type="text">
<!-- <option [selected]="projName" >{{projName}}</option> -->
<option [selected]="x.projectName" value="{{i}}"
*ngFor="let x of sectionTypeList; let i=index;">
{{x.projectName}} </option>
</select>
</ion-item>
<label class="labels">{{ts.trPK('userProfile','RelatedTopic')}}</label>
<ion-item lines="none" class="filed-container" placeholder="Select Topic" type="text">
<select class="filed" placeholder="Select Topic" type="text">
<option value="1">1</option>
<option value="2">2</option>
<ion-item lines="none" class="filed-container">
<select [(ngModel)]="index" class="filed3" placeholder="Select Topic" type="text">
<!-- <option value="1">{{topicName}}</option> -->
<option [selected]="x.topicName" value="{{i}}"
*ngFor="let x of topicTypeList; let i=index;">
{{x.topicName}} </option>
</select>
</ion-item>
</ion-list>
@ -186,17 +198,24 @@
<span>{{ts.trPK('userProfile','SupportingDocument')}}</span>
</div>
<div>
<img slot="start" style=" height: 55px;" (click)="uploadDocument()" src="../assets/imgs/add-photo.svg">
<!-- <input type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" (click)="onFileSelectedclick($event)" />
<label end for="file">
<img slot="start" style=" height: 55px;"src="../assets/imgs/add-photo.svg">
</label> -->
<div class="fileUpload btn btn-primary">
<img slot="start" style=" height: 55px;"src="../assets/imgs/add-photo.svg">
<input type="file" class="upload" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" (click)="onFileSelectedclick($event)" />
</div>
</div>
<div class="request-heading">
<span>{{ts.trPK('userProfile','Description')}}</span>
</div>
<!-- <div class="filedDesc">
<ion-input class="labelDesc" placeholder="{{ts.trPK('userProfile','Description')}}" type="text">
</ion-input>
</div> -->
<ion-col size="12">
<ion-item style="margin-left: -20px;margin-right: -13px;" lines="none">
<ion-item style="margin-left: -20px;margin-right: -13px;margin-top: -24px;" lines="none">
<ion-input [ngClass]="direction == 'en' ? 'filedDesc':'filedDesc-ar' " placeholder="{{ts.trPK('userProfile','Description')}}" type="text"></ion-input>
</ion-item>
</ion-col>
@ -204,13 +223,13 @@
</div>
</ion-card-content>
</ion-card>
<ion-footer style=" padding:15px !important;" >
<div ng class="gridDiv" aria-disabled="true">
<button class="gridCancelBtn" ion-button (click)="cancelRequest()">{{ts.trPK('general','cancel')}}</button>
<button class="gridSubmitBtn" ion-button (click)="submitRequest()">{{ts.trPK('general','submit')}}</button>
</div>
</ion-footer>
</div>
</ion-content>
</ion-content>
<ion-footer *ngIf="showRequestDetails" >
<div class="centerDiv">
<button class="gridCancelBtn" ion-button (click)="cancelRequest()">{{ts.trPK('general','cancel')}}</button>
<button class="gridSubmitBtn" ion-button (click)="submitRequest()">{{ts.trPK('general','submit')}}</button>
</div>
</ion-footer>

@ -259,7 +259,7 @@ ion-input {
}
}
.filed{
.filed1{
border-radius: 30px;
border: 1px solid #d3d5d5 !important;
margin: 10px;
@ -267,7 +267,30 @@ ion-input {
padding-top: 6px !important;
color: #636161;
padding-bottom: 15px;
padding-right: 252px;
// padding-right: 252px;
padding-right: 115px;
}
.filed2{
border-radius: 30px;
border: 1px solid #d3d5d5 !important;
margin: 10px;
padding-left: 11px !important;
padding-top: 6px !important;
color: #636161;
padding-bottom: 15px;
// padding-right: 252px;
padding-right: 153px;
}
.filed3{
border-radius: 30px;
border: 1px solid #d3d5d5 !important;
margin: 10px;
padding-left: 11px !important;
padding-top: 6px !important;
color: #636161;
padding-bottom: 15px;
// padding-right: 252px;
padding-right: 61px;
}
.filedDesc{
border-radius: 30px;
@ -427,4 +450,27 @@ ion-input {
border: 0px !important;
box-shadow: none !important;
-webkit-box-shadow: none;
}
ion-footer .footer-button{
--background: #259CB8;
width: 80%;
}
.fileUpload {
position: relative;
overflow: hidden;
margin: 10px;
margin-left: -233px;
}
.fileUpload input.upload {
position: absolute;
top: 0;
right: 0;
margin: 0;
padding: 0;
font-size: 20px;
cursor: pointer;
opacity: 0;
filter: alpha(opacity=0);
}

@ -10,6 +10,7 @@ import { Location } from '@angular/common';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { LoginModel } from 'src/app/authentication/models/LoginModel';
import { SendActivationByType } from 'src/app/authentication/models/sendActivationByType';
import { FileUploader } from 'ng2-file-upload';
@Component({
selector: 'app-hr-request',
@ -37,6 +38,21 @@ export class HRRequestComponent implements OnInit {
myColor: string = 'secondary';
public showRequestDetails = false;
public proID= "CS"
public inquiry: string;
public HR : string;
public complaints:string;
public Projectresult:any;
public EmpRelations:any;
public Hr:any;
public Payroll:any;
public GovRelation:any;
public projName:any;
public topicName:any;
public departTypeList: any;
public topicTypeList:any;
public sectionTypeList:any;
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
public direction: string;
@ -106,7 +122,7 @@ export class HRRequestComponent implements OnInit {
getTicketTypes(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817"
EmployeeNumber:"121816",
};
this.MowadhafiService.getTicketTypes(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
@ -115,14 +131,16 @@ export class HRRequestComponent implements OnInit {
}) }
handlegetTicketTypesResult(result){
this.HR = result.Mohemm_Itg_TicketTypesList[0].typeName;
this.complaints = result.Mohemm_Itg_TicketTypesList[1].typeName;
this.inquiry = result.Mohemm_Itg_TicketTypesList[2].typeName;
}
getProject(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817",
EmployeeNumber:"121816",
ItgProjectCode:"CS"
};
@ -132,14 +150,14 @@ export class HRRequestComponent implements OnInit {
}) }
handlegetProjectResult(result){
this.Projectresult=result.Mohemm_Itg_ProjectsList[0];
}
getProjectDepartments(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817",
EmployeeNumber:"121816",
ItgProjectId:11,
@ -150,13 +168,18 @@ export class HRRequestComponent implements OnInit {
}) }
handlegetProjectDepartmentsResult(result){
this.departTypeList= result.Mohemm_ITG_ProjectDepartmentsList;
// this.EmpRelations= result .Mohemm_ITG_ProjectDepartmentsList[0].departmentName;
// this.Hr = result .Mohemm_ITG_ProjectDepartmentsList[1].departmentName;
// this.Payroll = result .Mohemm_ITG_ProjectDepartmentsList[2].departmentName;
// this.GovRelation = result .Mohemm_ITG_ProjectDepartmentsList[3].departmentName;
}
getDepartmentSections(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817",
EmployeeNumber:"121816",
ItgProjectDepartmentId:1
};
@ -166,13 +189,15 @@ export class HRRequestComponent implements OnInit {
}) }
handlegetDepartmentSectionsResult(result){
// this.projName=result.Mohemm_ITG_DepartmentSectionsList[0].projectName;
this.sectionTypeList= result.Mohemm_ITG_DepartmentSectionsList;
}
getSectionTopics(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817",
EmployeeNumber:"121816",
ItgDepartmentSectionId:1
};
@ -182,6 +207,8 @@ export class HRRequestComponent implements OnInit {
}) }
handlegetSectionTopicsResult(result){
// this.topicName=result.Mohemm_ITG_SectionTopicsList[0].topicName
this.topicTypeList= result.Mohemm_ITG_SectionTopicsList;
}
@ -202,11 +229,80 @@ export class HRRequestComponent implements OnInit {
this.menu.toggle();
}
submitRequest(){
/*******************Add attchement Functions*************/
public uploader: FileUploader = new FileUploader({
allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
maxFileSize: 10 * 1024 * 1024,
formatDataFunctionIsAsync: true,
formatDataFunction: async (item) => {
return new Promise((resolve, reject) => {
resolve({
name: item._file.name,
length: item._file.size,
contentType: item._file.type,
date: new Date()
});
});
}
});
onFileSelectedclick(event){
event.target.value = '';
}
uploadDocument(){
onFileSelected(input) {
// this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){
if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) {
let msg: string = "";
msg = this.ts.trPK("general", "notSupport");
this.cs.presentAlert(msg);
return
} // todo: show alert that you tried uploading wrong files
else {
const file = input.target.files[0];
this.getBase64(file).then(
data => this.pushObject(data, file.name, file.type)
);
}
}
getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
pushObject(fileData, name, type) {
// console.log('before push: '+ this.index);
// try {
// let array = name.split('.');
// let attachType: string = array[array.length - 1];
// this.attachListOver.push(
// AttachmentID: this.attachListOver.length,
// P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
// P_FILE_DATA: fileData.split(',')[1],
// P_FILE_NAME: name,//.split('.')[0],
// P_TRANSACTION_ID: this.P_TransactionID
// {
// })
// } catch (e) {
// }
}
submitRequest(){}
}

@ -18,7 +18,7 @@ export class MowadhafiService {
public static getTicketsByEmployee ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketsByEmployee';
public static getTicketStatisticsByEmp ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketStatisticsByEmployee';
public static getTicketTransaction ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTransaction';
public static getTicketDetails =' Services/COCWS.svc/REST/Mohemm_ITG_GetTicketDetails';
public static getTicketDetails ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketDetails';
constructor(
public con: ConnectorService,

@ -54,7 +54,7 @@ public openRequestDetailsPage() {
getTicketsByEmployee(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817",
EmployeeNumber:"121816",
ItgPageSize:10,
ItgPageNo:1

@ -44,7 +44,7 @@ export class RequestDetailsComponent implements OnInit {
getTicketTransaction(){
const request = {
// EmployeeNumber:"191817",
EmployeeNumber:"121816",
ItgTicketId:"5a10de61-c4db-4c77-e464-08d8a1beaaac",
};
@ -59,8 +59,9 @@ export class RequestDetailsComponent implements OnInit {
getTicketDetails(){
const request = {
// EmployeeNumber:"191817",
ItgTicketId:"5a10de61-c4db-4c77-e464-08d8a1beaaac",
EmployeeNumber:"121816",
TokenID:"@dm!n",
ItgTicketId:"5a10de61-c4db-4c77-e464-08d8a1beaaac",
};
this.MowadhafiService.getTicketDetails(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>

@ -12,8 +12,9 @@
<div class="result-graph" >
<div class="user-info">
<div class="user-image-container">
<div>
<img style="height: 18px; margin-left: 23px;" src="../assets/imgs/fav.svg">
<div (click)="setFavorite(employee)">
<img *ngIf="!isFavorite" style="height: 18px; margin-left: 23px;" src="../assets/imgs/fav.svg">
<img *ngIf="isFavorite" style="height: 18px; margin-left: 23px;" src="../assets/imgs/favFilled.svg">
<!-- <ion-col><img src="../assets/imgs/fav filled.svg"></ion-col> -->
</div>
<div class="user-image">
@ -268,28 +269,28 @@
<ion-col [size]="4">
<div class="attendance-information">
<span>{{ts.trPK('attendance-tracking','schedule')}}</span>
<h2>{{timeCardSummaryData.SCHEDULE_DAYS}}</h2>
<h2>{{timeCardSummaryData?.SCHEDULE_DAYS}}</h2>
</div>
</ion-col>
<ion-col [size]="2">
<div class="attendance-information">
<span>{{ts.trPK('attendance-tracking','off-days')}}</span>
<h2>{{timeCardSummaryData.OFF_DAYS}}</h2>
<h2>{{timeCardSummaryData?.OFF_DAYS}}</h2>
</div>
</ion-col>
<ion-col [size]="3">
<div class="attendance-information">
<span>{{ts.trPK('attendance-tracking','non-analyzed')}}</span>
<h2>{{timeCardSummaryData.NOT_ANALYZED_DAYS}}</h2>
<h2>{{timeCardSummaryData?.NOT_ANALYZED_DAYS}}</h2>
</div>
</ion-col>
<ion-col [size]="3">
<div class="attendance-information">
<span>{{ts.trPK('attendance-tracking','shortage-hours')}}</span>
<h2>{{timeCardSummaryData.SHORTAGE_HRS}}</h2>
<h2>{{timeCardSummaryData?.SHORTAGE_HRS}}</h2>
</div>
</ion-col>
</ion-row>

@ -92,6 +92,7 @@ export class DetailsComponent implements OnInit {
public selectedFilter = '';
public itemType = '';
public monthNo: any;
isFavorite: boolean = false;
@ -804,13 +805,15 @@ export class DetailsComponent implements OnInit {
confirmBoxhtml
, () => {
var request =
[{ "USER_NAME": selEmp['USER_NAME'], "EMPLOYEE_DISPLAY_NAME": selEmp['EMPLOYEE_DISPLAY_NAME'], "EMAIL_ADDRESS": selEmp.EMAIL_ADDRESS, "EMPLOYEE_IMAGE": selEmp.EMPLOYEE_IMAGE, "IsFavorite": true }];
{ "USER_NAME": selEmp['USER_NAME'], "EMPLOYEE_DISPLAY_NAME": selEmp['EMPLOYEE_DISPLAY_NAME'], "EMAIL_ADDRESS": selEmp.EMAIL_ADDRESS, "EMPLOYEE_IMAGE": selEmp.EMPLOYEE_IMAGE, "IsFavorite": true };
this.saveUserFavruiteList(request);
// this.isFavorite = false;
}, () => {
})
this.isFavorite = false;
// if (selectValue == "1" || selectValue == "2" || selectValue == "3") {
// this.isSelect = true;
// }
@ -825,11 +828,12 @@ export class DetailsComponent implements OnInit {
getFavruite() {
this.worklistService.getFavorite({}, () => {
}).subscribe((result) => {
if (this.common.validResponse(result)) {
this.common.stopLoading();
this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
}
})
}
@ -838,6 +842,7 @@ export class DetailsComponent implements OnInit {
}).subscribe((result) => {
if (this.common.validResponse(result)) {
this.common.toastPK("replacementRoll", "favorite-saved");
this.isFavorite = true;
}
})

@ -9,6 +9,7 @@ import { IonicModule } from '@ionic/angular';
import { MyTeamPage } from './my-team.page';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { from } from 'rxjs';
import { WorklistService } from 'src/app/notification/service/worklist.service';
const routes: Routes = [
@ -40,7 +41,9 @@ const routes: Routes = [
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
providers:[WorklistService],
declarations: [MyTeamPage,HomeComponent,DetailsComponent,
]
})

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14.004" height="13.318" viewBox="0 0 14.004 13.318">
<path id="Path_4" data-name="Path 4" d="M18.964,10.97a.368.368,0,0,0-.343-.255l-4.738-.1L12.328,6.157a.368.368,0,0,0-.7,0L10.077,10.62l-4.738.1a.368.368,0,0,0-.214.662L8.9,14.231,7.528,18.753a.368.368,0,0,0,.562.409l3.89-2.7,3.89,2.7a.368.368,0,0,0,.562-.409L15.06,14.231l3.775-2.854A.368.368,0,0,0,18.964,10.97Z" transform="translate(-4.978 -5.91)" fill="#259cb8"/>
</svg>

After

Width:  |  Height:  |  Size: 476 B

@ -1191,6 +1191,10 @@
"en": "CREATE HR REQUEST",
"ar": "انشاء طلب"
},
"HR-Request": {
"en": "HR Request",
"ar": "HR طلبات ال "
},
"performance-evaluation": {
"en": "Performance Evaluation",
"ar": "تقييم الاداء"

Loading…
Cancel
Save