Q3 CHANGES

MOE_DEV_NEW_TEMPORARY_DESIGN
Sultan Khan 4 years ago
parent dba1286f42
commit 1201adb5ed

@ -3,7 +3,7 @@ import { CommonService } from "src/app/hmg-common/services/common/common.service
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { MenuService } from "src/app/hmg-common/services/menu/menuservice.service";
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
import { ModalController ,IonSelectOption ,IonSelect } from "@ionic/angular";
import { ModalController, IonSelectOption, IonSelect } from "@ionic/angular";
import { SubmitAbsenceService } from "../service/submit.absence.service";
import { AbsenceAttahcmentResponse } from "../models/abs.attach.response";
import { AbsenceListService } from "../service/service.service";
@ -23,8 +23,8 @@ import { DatePicker } from "@ionic-native/date-picker/ngx";
import { Request } from '../../hmg-common/services/models/request';
// import { Request } from "../models/request";
import * as moment from "moment";
import {ReplacementListComponent} from "../../vacation-rule/replacement-list/replacement-list.component";
import {ReplacmentResponse} from "../models/replacment-response";
import { ReplacementListComponent } from "../../vacation-rule/replacement-list/replacement-list.component";
import { ReplacmentResponse } from "../models/replacment-response";
import { AbsenceResponse } from '../models/absence.response';
import { AbsenceReplacementListComponent } from '../absence-replacement-list/absence-replacement-list.component';
import { AbsenceNotificatonBodyResponse } from 'src/app/notification/models/AbsenceNotificationBodyRes';
@ -99,8 +99,8 @@ export class SubmitAbsenceComponent implements OnInit {
this.direction = TranslatorService.getCurrentLanguageName();
////*new add*/////
/**********resubmit************ */
this.getPassNotificationDetails = this.common.sharedService.getSharedData(AbsenceNotificatonBodyResponse.NOT_WORKLIST, true);
this.getPassdirfromNotifiPage = this.common.sharedService.getSharedData('dirfromNotificationPage');
this.getPassNotificationDetails = this.common.sharedService.getSharedData(AbsenceNotificatonBodyResponse.NOT_WORKLIST, true);
this.getPassdirfromNotifiPage = this.common.sharedService.getSharedData('dirfromNotificationPage');
//this.getPassNotificationDetails = this.common.sharedService.getSharedData(AbsenceNotificatonBodyResponse.NOT_WORKLIST, true);
// this.getPassdirfromNotifiPage = this.navParams.get('dirfromNotificationPage');
if (this.getPassdirfromNotifiPage) {
@ -110,8 +110,8 @@ export class SubmitAbsenceComponent implements OnInit {
this.notificationId = this.getPassNotificationDetails.NOTIFICATION_ID;
this.selEmp = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER;
this.respID = -999;
this.submitAbsObjList = this.common.sharedService.getSharedData('submitAbsObjList');
console.log()
this.submitAbsObjList = this.common.sharedService.getSharedData('submitAbsObjList');
console.log()
} else {
this.action = "CREATE";
this.selEmp = this.common.sharedService.getSharedData(
@ -185,7 +185,7 @@ export class SubmitAbsenceComponent implements OnInit {
}
}
calcDay() {
console.log("calcDay" );
console.log("calcDay");
let msg: string = "";
if (
this.startDate == undefined ||
@ -233,7 +233,7 @@ export class SubmitAbsenceComponent implements OnInit {
this.totalDays = result.CalculateAbsenceDuration.P_ABSENCE_DAYS;
}
}
async openSearch(){
async openSearch() {
const modal = await this.modalCtrl.create({
component: ReplacementListComponent,
keyboardClose: true,
@ -259,7 +259,7 @@ export class SubmitAbsenceComponent implements OnInit {
console.log(data)
console.log(user);
if (data) {
this.employeeName = user.EMPLOYEE_DISPLAY_NAME;
this.employeeName = user.EMPLOYEE_DISPLAY_NAME;
this.employeeID = user.USER_NAME;
this.employeeSel = this.employeeName + "," + this.employeeID;
}
@ -278,12 +278,12 @@ export class SubmitAbsenceComponent implements OnInit {
}
public onTypeAbsenceChange() {
if (this.absenceType) {
let obj: any = this.absenceTypeList.find(
s => s.ABSENCE_ATTENDANCE_TYPE_ID == this.absenceType
);
if (obj) this.absenceTypeName = obj.DESC_FLEX_CONTEXT_CODE;
else this.absenceTypeName = null;
@ -443,7 +443,7 @@ export class SubmitAbsenceComponent implements OnInit {
this.textInput = new TextInput(
feildsList[i].SEGMENT_PROMPT,
feildsList[i].APPLICATION_COLUMN_NAME,
defaultVal,
defaultVal,
containerId,
defaultValText,
feildsList[i].MOBILE_ENABLED,
@ -492,9 +492,9 @@ export class SubmitAbsenceComponent implements OnInit {
this.fillAbsStructure();
}
}
bindHtmlElemEvents(id, obj) {
const elem = document.getElementById(id);
elem.addEventListener("change", e => {
elem.classList.remove("requiredClassElm");
@ -1039,20 +1039,20 @@ export class SubmitAbsenceComponent implements OnInit {
let elem = document.getElementById(
this.absenceDffresponse[i].APPLICATION_COLUMN_NAME
) as HTMLInputElement;
let elemVal="";
let elemVal = "";
if (elem.classList.contains('onic-date')) {
elemVal = (document.getElementById(
elemVal = (document.getElementById(
this.absenceDffresponse[i].APPLICATION_COLUMN_NAME
) as HTMLInputElement).value;
if(elemVal){
if (elemVal) {
elemVal = moment(elemVal).format("YYYY/MM/DD hh:mm:ss");
}
}else{
elemVal = (document.getElementById(
this.absenceDffresponse[i].APPLICATION_COLUMN_NAME
) as HTMLInputElement).value;
}
} else {
elemVal = (document.getElementById(
this.absenceDffresponse[i].APPLICATION_COLUMN_NAME
) as HTMLInputElement).value;
}
textValue = elemVal;
if (
@ -1060,7 +1060,7 @@ export class SubmitAbsenceComponent implements OnInit {
this.absenceDffresponse[i].DISPLAY_FLAG != "N"
) {
//date
elemVal = this.common.formatDate(elemVal);
elemVal = this.common.formatDate(elemVal);
} else if (
this.absenceDffresponse[i].FORMAT_TYPE == "Y" &&
this.absenceDffresponse[i].DISPLAY_FLAG != "N"
@ -1323,6 +1323,7 @@ export class SubmitAbsenceComponent implements OnInit {
}
return isSt;
}
validateAbcenseTransaction() {
(this.elementRef.nativeElement.querySelectorAll(
"ion-item"
@ -1447,9 +1448,9 @@ export class SubmitAbsenceComponent implements OnInit {
private handleSubmitAbsence(result) {
if (this.common.validResponse(result)) {
if (this.getPassdirfromNotifiPage) {
this.common.sharedService.setSharedData(result.ResubmitAbsenceTransactionList.P_TRANSACTION_ID, AbsenceResponse.SHARED_DATA);
this.common.openConfirmAbsece();
// this.navCtrl.push("SubmitAbsenceConfirmPage", { isResubmit: true });
this.common.sharedService.setSharedData(result.ResubmitAbsenceTransactionList.P_TRANSACTION_ID, AbsenceResponse.SHARED_DATA);
this.common.openConfirmAbsece();
// this.navCtrl.push("SubmitAbsenceConfirmPage", { isResubmit: true });
} else {
this.common.sharedService.setSharedData(result.SumbitAbsenceTransactionList.P_TRANSACTION_ID, AbsenceResponse.SHARED_DATA);
this.common.openConfirmAbsece();

@ -1,42 +1,46 @@
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
{
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'
},
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
{ path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
{ path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
{ path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
{ path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
{ path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
{ path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
{ path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' },
{ path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' },
{ path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' },
{ path: 'attendance-tracking', loadChildren: './attendance-tracking/attendance-tracking.module#AttendanceTrackingPageModule' },
{ path: 'itemforsale', loadChildren: './itemforsale/itemforsale.module#ItemforsalePageModule' },
{ path: 'offersdiscount', loadChildren: './offersdiscount/offersdiscount.module#OffersdiscountPageModule' },
{ path: 'mowadhafi', loadChildren: './mowadhafi/mowadhafi.module#MowadhafiPageModule' },
{ path: 'erm-channel', loadChildren: './erm-channel/erm-channel.module#ErmChannelPageModule' },
{ path: 'backend-integrations', loadChildren: './backend-integrations/backend-integrations.module#BackendIntegrationsPageModule' }, { path: 'reports', loadChildren: './reports/reports.module#ReportsPageModule' },
{ path: 'concurrent-report', loadChildren: './reports/concurrent-report/concurrent-report.module#ConcurrentReportPageModule' },
{ path: 'termination', loadChildren: './termination/termination.module#TerminationPageModule' },
{ path: 'pending-transaction', loadChildren: './pending-transaction/pending-transaction.module#PendingTransactionPageModule' }
const routes: Routes = [
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
{
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'
},
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
{ path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
{ path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
{ path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
{ path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
{ path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
{ path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
{ path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' },
{ path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' },
{ path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' },
{ path: 'attendance-tracking', loadChildren: './attendance-tracking/attendance-tracking.module#AttendanceTrackingPageModule' },
{ path: 'itemforsale', loadChildren: './itemforsale/itemforsale.module#ItemforsalePageModule' },
{ path: 'offersdiscount', loadChildren: './offersdiscount/offersdiscount.module#OffersdiscountPageModule' },
{ path: 'mowadhafi', loadChildren: './mowadhafi/mowadhafi.module#MowadhafiPageModule' },
{ path: 'erm-channel', loadChildren: './erm-channel/erm-channel.module#ErmChannelPageModule' },
{ path: 'backend-integrations', loadChildren: './backend-integrations/backend-integrations.module#BackendIntegrationsPageModule' }
];
@NgModule({
imports: [
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
RouterModule.forRoot(routes),
],
exports: [RouterModule]
})
export class AppRoutingModule { }
];
@NgModule({
imports: [
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
RouterModule.forRoot(routes),
],
exports: [RouterModule]
})
export class AppRoutingModule { }

@ -53,7 +53,26 @@
{{ts.trPK('userProfile','HR-Request')}}
</ion-label>
</ion-item>
<div *ngFor="let menu of menuList">
<ion-item (click)="oepnMyRequest(menu)" *ngIf="menu.REQUEST_GROUP_NAME =='MBL_RG_01' && menu.MENU_TYPE =='E'">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{menu.MENU_NAME}}
</ion-label>
</ion-item>
</div>
<ion-item (click)="oepnTransaction()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('general','pending-transaction')}}
</ion-label>
</ion-item>
<!-- <ion-item (click)="openChangePassword()"> -->
<ion-item (click)="openChangePassword()">

@ -14,6 +14,7 @@ import { DigitalIdComponent } from './authentication/digital-id/digital-id.compo
import { checkAndUpdatePureExpressionInline } from '@angular/core/src/view/pure_expression';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { BusinessCardComponent } from './authentication/business-card/business-card.component';
import { MenuResponse } from './hmg-common/services/menu/models/menu-response';
@Component({
selector: 'app-root',
@ -122,7 +123,7 @@ export class AppComponent implements OnInit {
public setScreenNameAnalytics(currentPageName: string) {
try {
this.firebasex.setScreenName(currentPageName).then((result)=>{
this.firebasex.setScreenName(currentPageName).then((result) => {
console.log(result);
});
} catch (Error) { }
@ -208,7 +209,7 @@ export class AppComponent implements OnInit {
let jobTitle = user.POSITION_NAME.split('.');
if (jobTitle && jobTitle.length > 1) {
this.User_Job_name = jobTitle[0] + " " + jobTitle[1];
}
}
//erm channel
// if (!CommonService.SKIP)
// this.cs.navigateForward('/erm-channel/survey');
@ -218,7 +219,10 @@ export class AppComponent implements OnInit {
});
});
this.events.subscribe('getNotCount', badge => { this.notBadge = badge; });
this.events.subscribe('myTeamFlag', myTeamFlag => { this.TeamFlag = myTeamFlag; });
this.events.subscribe('myTeamFlag', myTeamFlag => {
this.TeamFlag = myTeamFlag;
this.menuList = this.cs.sharedService.getSharedData(MenuResponse.MENU_LIST, false);
});
}
private initializeDirection() {
@ -348,4 +352,13 @@ export class AppComponent implements OnInit {
} else { }
});
}
oepnMyRequest(menu) {
this.cs.sharedService.setSharedData(menu, MenuResponse.SELECTED_MENU);
this.cs.openConcurrentReport();
this.menu.toggle();
}
oepnTransaction() {
this.cs.openTransactions();
this.menu.toggle();
}
}

@ -2,6 +2,7 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service
import { Component, OnInit } from '@angular/core';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { TerminationServiceService } from 'src/app/termination/service/termination-service.service';
@Component({
selector: 'app-home',
@ -19,7 +20,7 @@ export class HomeComponent implements OnInit {
direction: string;
pageType: string;
constructor(private cs: CommonService, private ts: TranslatorService) {
constructor(private cs: CommonService, private ts: TranslatorService, public terminationService: TerminationServiceService) {
this.direction = TranslatorService.getCurrentLanguageName();
this.menu = this.cs.sharedService.getSharedData('menuEntries', false);
this.pageType = this.cs.sharedService.getSharedData('homemenuentries', false);
@ -45,6 +46,11 @@ export class HomeComponent implements OnInit {
this.selectedMenu = index;
}
}
if (page['FUNCTION_NAME'] == 'HR_TERM_EMP_SS') {
this.cs.sharedService.setSharedData(page, TerminationServiceService.TERMINATION_PAGE);
this.cs.openTermination();
}
console.log('selected>>>>>>>' + this.selectedMenu);
}

@ -1302,9 +1302,18 @@ export class CommonService {
public openAnnouncement() {
this.nav.navigateForward(['/backend-integrations/announcement']);
}
public openConcurrentReport() {
this.nav.navigateForward(['/reports/concurrent-report']);
}
public openTermination() {
this.nav.navigateForward(['/termination/termination-form']);
}
public openTransactions() {
this.nav.navigateForward(['/pending-transaction/home']);
}
public navigatePage(path) {
this.nav.navigateForward([path]);
}

@ -27,8 +27,8 @@ export class ConnectorService {
public static retryTimes = 0;
public static timeOut = 120 * 1000;
// public static host = 'https://uat.hmgwebservices.com/';
public static host = 'https://hmgwebservices.com/';
public static host = 'https://uat.hmgwebservices.com/';
// public static host = 'https://hmgwebservices.com/';
constructor(public httpClient: HttpClient,
public cs: CommonService,
@ -235,7 +235,7 @@ export class ConnectorService {
}
return false;
} else if (result.ErrorType === 2 || result.ErrorType === 4) {
this.cs.stopLoading();
this.cs.stopLoading();
} else {
this.cs.stopLoading();
if (!fromSMS) {

@ -2,10 +2,12 @@ import { ListMenu } from './list.menu';
import { MenuEntry } from './menu.entry';
export class MenuResponse {
public static SHARED_DATA = 'menu_response';
public static SHARED_SEL_EMP= 'sel_empolyee';
public static SHARED_SEL_RESP_ID= 'sel_resp_id';
public userid:string;
public search:boolean;
public List_Menu:ListMenu;
public GetMenuEntriesList:MenuEntry;
public static MENU_LIST = 'menu_list';
public static SELECTED_MENU = 'selected_menu';
public static SHARED_SEL_EMP = 'sel_empolyee';
public static SHARED_SEL_RESP_ID = 'sel_resp_id';
public userid: string;
public search: boolean;
public List_Menu: ListMenu;
public GetMenuEntriesList: MenuEntry;
}

@ -20,13 +20,13 @@ export class RateService {
}
public rateFeature(ratedFeedBack?: any , featureKey: string = RateService.app , delay: number = 2000) {
public rateFeature(ratedFeedBack?: any, featureKey: string = RateService.app, delay: number = 2000) {
if (this.isRated(featureKey)) {
if (ratedFeedBack) {
ratedFeedBack(true);
}
} else {
setTimeout( () => {
setTimeout(() => {
this.startRating(featureKey, ratedFeedBack);
}, delay);
}
@ -38,7 +38,7 @@ export class RateService {
this.appRate.preferences = {
displayAppName: this.ts.trPK('general', 'app-name'),
promptAgainForEachNewVersion: true,
inAppReview: true,
// inAppReview: true,
storeAppURL: {
ios: 'com.ejada.hmg',
android: 'market://details?id=com.ejada.hmg',
@ -47,7 +47,7 @@ export class RateService {
callbacks: {
handleNegativeFeedback: () => {
this.setAsRated(featureKey);
//this.cs.openFeedback();
//this.cs.openFeedback();
},
onButtonClicked: (buttonIndex) => {
// when user click rate

@ -63,7 +63,7 @@
<ion-label> {{'general,other-services' | translate}} </ion-label>
</ion-col>
<ion-slides [options]="slideOptsTwo" >
<ion-slide style="pointer-events: none; opacity: .3">
<ion-slide >
<app-services-button (click)="itemForSale()" [title]="'general,items-sales' | translate" >
</app-services-button>
</ion-slide>

@ -192,11 +192,11 @@ export class HomePage implements OnInit {
spaceBetween: 10
};
this.slideOptsTwo = {
slidesPerView: width > 320 ? 3.2 : 2.5,
spaceBetween: width > 320 ? 10 : 5
slidesPerView: width > 320 ? 3.2 : 2.5,
spaceBetween: width > 320 ? 10 : 5
};
this.showStaticServices = true;
}
}
ionViewWillEnter() {
this.common.startLoading();
this.slideSettingsTwo();
@ -408,6 +408,7 @@ export class HomePage implements OnInit {
selMenu.List_Menu = item;
selMenu.userid = this.userData.EMPLOYEE_NUMBER;
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
this.common.sharedService.setSharedData(this.menuList, MenuResponse.MENU_LIST);
this.getMenuEntries(item);
// tslint:disable-next-line: prefer-for-of
for (let i = 0; i < this.menuList.length; i++) {
@ -749,7 +750,7 @@ export class HomePage implements OnInit {
totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
}
}
this.statsButtons[4].statsValue = Number(totalTicketsLeft.toFixed(2));
this.statsButtons[4].statsValue = Number(totalTicketsLeft.toFixed(2));
}
});
}

@ -1,6 +1,7 @@
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 { ItemForSaleService } from '../services/service.service';
@Component({
selector: 'app-home',
@ -9,9 +10,12 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl
})
export class HomeComponent implements OnInit {
step: any = 1;
constructor(public ts: TranslatorService, public cs: CommonService,) { }
constructor(public ts: TranslatorService, public cs: CommonService, private itemService: ItemForSaleService) { }
ngOnInit() { }
ngOnInit() {
}
openItem() {

@ -12,18 +12,21 @@
<div>
<ion-card>
<ion-card-header>
<img src="https://ii1.pepperfry.com/media/catalog/product/r/o/568x625/royal-wing-chair-in-blue-color-by-dreamzz-furniture-royal-wing-chair-in-blue-color-by-dreamzz-furnit-6hcjya.jpg" />
<img *ngIf="itemDetails.itemAttachments[0]" [src]="item.itemAttachments[0]" />
<img *ngIf="!itemDetails.itemAttachments[0]" src="assets/imgs/no-images.png" />
<ion-card-title>Furniture Table</ion-card-title>
<ion-card-title *ngIf="direction == 'ltr'">{{itemDetails.title}}</ion-card-title>
<ion-card-title *ngIf="direction =='rtl'">{{itemDetails.title_Ar}}</ion-card-title>
</ion-card-header>
<ion-card-content>
Keep close to Nature's heart... and break clear away, once in awhile,
and climb a mountain or spend a week in the woods. Wash your spirit clean.
<span *ngIf="direction == 'ltr'">{{itemDetails.description}}</span>
<span *ngIf="direction =='rtl'">{{itemDetails.description_Ar}}</span>
<div class="content-bottom">
<p class="green">New</p>
<h1>500 SAR</h1>
<h1> <strong>
{{itemDetails.quotePrice}} {{itemDetails.currencyCode}}
</strong></h1>
</div>
@ -33,9 +36,9 @@
<img class="profile-img" src="/assets/imgs/S.png">
</ion-avatar>
<ion-label>
<p class="profile-title">Mohammed Imran</p>
<p>Posted on 22 April 2020</p>
<p><a href="">View Profile</a></p>
<p class="profile-title">{{itemDetails.fullName}}</p>
<p>{{getDate(itemDetails.created) }}</p>
<!-- <p><a href="">View Profile</a></p> -->
</ion-label>
</ion-item>
@ -50,14 +53,15 @@
<ion-footer >
<div class="centerDiv details-button" >
<a [href]="'mail:' + itemDetails.emailAddress">
<ion-button class="footer-button" ion-button>
<img class="icon-footer" src="/assets/imgs/itemsforsale/sms.svg">
{{ts.trPK('sms','title')}} </ion-button>
<img class="icon-footer" src="/assets/imgs/itemsforsale/sms.svg">
{{ts.trPK('general','email')}} </ion-button></a>
<a [href]="'tel:' + itemDetails.mobileNumber">
<ion-button class="footer-button" ion-button>
<img class="icon-footer" src="/assets/imgs/itemsforsale/call.svg">
{{ts.trPK('vacation-rule','call')}} </ion-button>
<img class="icon-footer" src="/assets/imgs/itemsforsale/call.svg ">
{{ts.trPK('vacation-rule','call')}} </ion-button></a>
</div>
</ion-footer>
</ion-content>

@ -1,15 +1,26 @@
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 { ItemForSaleService } from '../services/service.service';
import * as moment from 'moment';
@Component({
selector: 'app-item-details',
templateUrl: './item-details.component.html',
styleUrls: ['./item-details.component.scss'],
})
export class ItemDetailsComponent implements OnInit {
itemDetails: any = {};
direction: any;
constructor(public ts: TranslatorService, public cs: CommonService,) { }
ngOnInit() { }
ngOnInit() {
this.direction = TranslatorService.getCurrentDirection();
this.itemDetails = this.cs.sharedService.getSharedData(ItemForSaleService.ITEMS_SELECTED, false);
console.log(this.itemDetails);
}
getDate(date) {
return moment(date, "YYYY-MM-DD HH:mm:ss").format("DD-MMM-YYYY");
}
}

@ -11,6 +11,8 @@ import { ItemsComponent } from './items/items.component';
import { ItemDetailsComponent } from './item-details/item-details.component';
import { MyAdsComponent } from './my-ads/my-ads.component';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { ItemForSaleService } from './services/service.service';
import { SanitizeHtmlPipe } from './services/domsafe';
const routes: Routes = [
{
@ -45,6 +47,8 @@ const routes: Routes = [
HmgCommonModule,
RouterModule.forChild(routes)
],
declarations: [ItemforsalePage, HomeComponent, ItemsComponent, ItemDetailsComponent, MyAdsComponent]
declarations: [ItemforsalePage, HomeComponent, ItemsComponent, ItemDetailsComponent, MyAdsComponent, SanitizeHtmlPipe],
providers: [ItemForSaleService],
exports: [SanitizeHtmlPipe]
})
export class ItemforsalePageModule { }

@ -28,7 +28,7 @@
<ion-col size="12">
<ion-item lines="none" class="SearchtextBox">
<ion-input [placeholder]="'itemforsale,search-items'| translate"></ion-input>
<ion-input [placeholder]="'itemforsale,search-items'| translate" (input)="search($event.target.value)"></ion-input>
</ion-item>
</ion-col>
</ion-row>
@ -43,67 +43,42 @@
</ion-grid>
<div class="container-icon">
<div class="box-icon">
<div class="sale-icon">
<div class="top">
<img src="assets/imgs/itemsforsale/mobile.svg">
</div>
<div class="bottom-icon">
<p>Mobile & Tablets</p>
</div>
</div>
</div>
<div class="box-icon">
<div class="sale-icon">
<div class="top">
<img src="assets/imgs/itemsforsale/cars.svg">
</div>
<div class="bottom-icon">
<p>Cars & Vehicle</p>
</div>
</div>
</div>
<div class="box-icon">
<div class="sale-icon">
<div class="top">
<img src="assets/imgs/itemsforsale/electronic_appliances.svg">
</div>
<div class="bottom-icon">
<p>Electronic Appliance</p>
</div>
</div>
</div>
<div class="box-icon">
<div class="sale-icon">
<div class="top">
<img src="assets/imgs/itemsforsale/fashion.svg">
<div class="box-icon" *ngFor="let category of categories" >
<div class="sale-icon" [ngClass]="{'active':activeClass==category.categoryID }" (click)="selectCategory(category)">
<div class="top" [innerHTML]="category.content | sanitizeHTMLPipe" >
</div>
<div class="bottom-icon">
<p>Fashion & Beauty</p>
<p *ngIf="direction == 'ltr'">{{category.title}}</p>
<p *ngIf="direction =='rtl'">{{category.title_Ar}}</p>
</div>
</div>
</div>
</div>
<div class="grid-row">
<ion-row >
<ion-col size="6" (click)="openDetails()">
<ion-col size="6" (click)="openDetails(item)" *ngFor="let item of items">
<ion-card>
<ion-card-header>
<img src="https://ii1.pepperfry.com/media/catalog/product/r/o/568x625/royal-wing-chair-in-blue-color-by-dreamzz-furniture-royal-wing-chair-in-blue-color-by-dreamzz-furnit-6hcjya.jpg" />
<ion-card-title>Furniture Table</ion-card-title>
<img *ngIf="item.itemAttachments[0]" [src]="item.itemAttachments[0]" />
<img *ngIf="!item.itemAttachments[0]" src="assets/imgs/no-images.png" />
<ion-card-title *ngIf="direction == 'ltr'">{{item.title}}</ion-card-title>
<ion-card-title *ngIf="direction =='rtl'">{{item.title_Ar}}</ion-card-title>
</ion-card-header>
<ion-card-content>
Keep close to Nature's heart... and break
<span *ngIf="direction == 'ltr'">{{getDotted(item.description, 60)}}</span>
<span *ngIf="direction =='rtl'">{{getDotted(item.description_Ar, 60)}}</span>
<p class="orange">
Used
</p>
<ion-row>
<ion-col size="10">
<strong>
500 SAR
{{item.quotePrice}} {{item.currencyCode}}
</strong>
</ion-col>
<ion-col size="2">
@ -114,53 +89,37 @@
</ion-card-content>
</ion-card>
</ion-col>
<ion-col size="6" (click)="openDetails()">
<ion-card>
<ion-card-header>
<img src="https://ii1.pepperfry.com/media/catalog/product/r/o/568x625/royal-wing-chair-in-blue-color-by-dreamzz-furniture-royal-wing-chair-in-blue-color-by-dreamzz-furnit-6hcjya.jpg" />
<ion-card-title>Furniture Table</ion-card-title>
</ion-card-header>
<ion-card-content>
Keep close to Nature's heart... and break
<p class="green">
New
</p>
<ion-row>
<ion-col size="10">
<strong>
500 SAR
</strong>
</ion-col>
<ion-col size="2">
<img src="assets/imgs/itemsforsale/arrow.svg">
</ion-col>
</ion-row>
</ion-card-content>
</ion-card>
</ion-col>
</ion-row>
<ion-infinite-scroll threshold="100px" (ionInfinite)="loadData($event)">
<ion-infinite-scroll-content
loadingSpinner="bubbles"
loadingText="Loading more data...">
</ion-infinite-scroll-content>
</ion-infinite-scroll>
</div>
</div>
<div class="my-ads" *ngIf="segment =='2'">
<ion-row>
<ion-item button detail="false">
<ion-item button detail="false" *ngFor="let item of itemsByEmployee">
<ion-thumbnail slot="start">
<img src="https://ii1.pepperfry.com/media/catalog/product/r/o/568x625/royal-wing-chair-in-blue-color-by-dreamzz-furniture-royal-wing-chair-in-blue-color-by-dreamzz-furnit-6hcjya.jpg" />
<img *ngIf="item.itemAttachments[0]" [src]="item.itemAttachments[0]" />
<img *ngIf="!item.itemAttachments[0]" src="assets/imgs/no-images.png" />
</ion-thumbnail>
<ion-label class="label-thumb">
<h3>Furniture Table</h3>
<p class="posted-on">
Posted on 24 April 2021
</p>
<p class="details-text">good condition only 6th month used </p>
<h3 *ngIf="direction == 'ltr'">{{item.title}}</h3>
<h3 *ngIf="direction =='rtl'">{{item.title_Ar}}</h3>
<p class="posted-on">{{getDate(item.created) }}</p>
<p class="details-text" *ngIf="direction == 'ltr'"> {{getDotted(item.description, 30)}}</p>
<p *ngIf="direction =='rtl'">{{getDotted(item.description_Ar, 30)}}</p>
<ion-row>
<ion-col size="8">
<p class="yellow">Pending Review</p>
<p [class]="isApproved ? 'green' : 'yellow'">{{isApproved ? "Appoved" :"Pending"}}</p>
</ion-col>
<ion-col>
<img class="icon" src="assets/imgs/itemsforsale/delete.svg" />
@ -170,6 +129,7 @@
</ion-label>
</ion-item>
<div class="space"></div>
</ion-row>
</div>

@ -10,6 +10,9 @@
.header-toolbar{
--background: #259CB8 !important;
}
.top{
position: relative;
}
.bottom{
height: 100%;
width: 100%;
@ -51,7 +54,10 @@
margin-top: 5px;
margin-bottom: 5px;
margin-left: 5px;
font-size: 14px;
font-size: 12px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.bottom-icon{
text-overflow: clip;
@ -69,7 +75,8 @@ ion-card-title{
font-weight: bold;
font-size: 14px;
padding: 5px
padding: 5px;
height: 40px;
}
.orange{
color: #CC9B14;
@ -112,9 +119,10 @@ ion-segment-button{
}
ion-segment-button ion-label{
padding: 0;
font-size: 16px;
font-size: 14px;
white-space: normal;
font-weight: bold;
line-height: 1.1;
}
.segment-button-checked ion-label{
color: #fff !important;
@ -132,6 +140,7 @@ ion-item h3{
color: #000;
font-weight: bold;
font-size: 14px;
margin-top:10px;
}
.yellow{
color:#CC9B14;
@ -155,7 +164,7 @@ ion-item .icon{
--background: #259CB8;
}
ion-footer{
position: absolute;
position: fixed;
bottom: 0;
}
ion-footer .footer-button{
@ -219,4 +228,23 @@ ion-fab-button{
}
.grid-row{
margin:10px;
}
.active .top::before{
position: absolute;
right: 0px;
top: 2px;
padding: 0px;
background: #3cc353;
padding: 2px 3px 4px 3px;
border-radius: 60%;
font-size: 10px;
color: #fff;
content: '';
width: 12px;
height: 12px;
text-align: center;
}
.space{
height:100px;
}

@ -1,6 +1,9 @@
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 { ItemForSaleService } from '../services/service.service';
import { deepCopy } from '@angular-devkit/core/src/utils/object';
import * as moment from 'moment';
@Component({
selector: 'app-items',
@ -9,10 +12,33 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl
})
export class ItemsComponent implements OnInit {
segment: any = '1';
constructor(public ts: TranslatorService, public cs: CommonService,) { }
items: any = [];
categories: any = [];
direction: string;
activeClass: any;
pageNo: number = 1;
tempSearch: any = [];
itemsByEmployee: any = [];
constructor(public ts: TranslatorService, public cs: CommonService, private itemService: ItemForSaleService) { }
ngOnInit() { }
openDetails() {
ngOnInit() {
this.direction = TranslatorService.getCurrentDirection();
this.getItemsCategories();
this.getItemsByEmployee();
}
getItemsCategories() {
this.itemService.getCategories({}, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
this.categories = this.itemService.parser(result);
console.log(this.categories);
})
this.itemService.getItems({ pageNo: this.pageNo }, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
this.items = this.itemService.parser(result);
this.tempSearch = deepCopy(this.items);
})
}
openDetails(selected) {
this.cs.sharedService.setSharedData(selected, ItemForSaleService.ITEMS_SELECTED);
this.cs.navigateForward('/itemforsale/items-details');
}
segmentChanged(value) {
@ -21,5 +47,53 @@ export class ItemsComponent implements OnInit {
openSale() {
this.cs.navigateForward('/itemforsale/home');
}
selectCategory(item) {
this.activeClass = item.categoryID
}
getDotted(temp: string, valueCount: number) {
temp = this.stripHtml(temp);
return temp.substring(0, valueCount) + " ...";
}
stripHtml(html) {
var temporalDivElement = document.createElement("div");
temporalDivElement.innerHTML = html;
return temporalDivElement.textContent || temporalDivElement.innerText || "";
}
loadData(event) {
this.pageNo = this.pageNo + 1;
this.itemService.getItems({ pageNo: this.pageNo }, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
this.items.concat(this.itemService.parser(result));
this.tempSearch = deepCopy(this.items);
event.target.complete();
})
}
search(t) {
if (t === '') {
this.items = this.tempSearch;
} else {
this.items = this.tempSearch.filter((post) => {
if (this.direction == 'ltr')
return (post.title.toLowerCase().indexOf(t.toLowerCase()) > -1);
else
return (post.title_Ar.indexOf(t) > -1);
});
}
}
getItemsByEmployee() {
this.itemService.getItemsByEmployee({}, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
this.itemsByEmployee = this.itemService.parser(result);
console.log(this.itemsByEmployee);
})
}
getDate(date) {
return moment(date, "YYYY-MM-DD HH:mm:ss").format("DD-MMM-YYYY");
}
}

@ -0,0 +1,15 @@
import { Pipe, PipeTransform } from "@angular/core";
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
@Pipe({
name: 'sanitizeHTMLPipe'
})
export class SanitizeHtmlPipe implements PipeTransform {
constructor(private _sanitizer: DomSanitizer) {
}
transform(v: string): SafeHtml {
return this._sanitizer.bypassSecurityTrustHtml(v);
}
}

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { ItemForSaleService } from './service.service';
describe('ServiceService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: ItemForSaleService = TestBed.get(ItemForSaleService);
expect(service).toBeTruthy();
});
});

@ -0,0 +1,51 @@
import { Injectable } from '@angular/core';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
@Injectable({
providedIn: 'root'
})
export class ItemForSaleService {
public static getItemForSale = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemForSale';
public static getItemForSaleByEmployee = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemForSaleByEmployee';
public static getCategories = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemSaleCategory';
public static ITEMS_SELECTED = 'item-selected';
constructor(
public con: ConnectorService,
private authService: AuthenticationService
) { }
public getItems(request: any, onError?: any, errorLabel?: string) {
this.authService.authenticateRequest(request);
request.EmployeeNumber = request.UserName;
request.ItgPageNo = request.pageNo;
request.ItgPageSize = 10;
request.ItgStatus = "Approved";
return this.con.post(ItemForSaleService.getItemForSale, request, onError, errorLabel);
}
public getCategories(request: any, onError?: any, errorLabel?: string) {
this.authService.authenticateRequest(request);
request.EmployeeNumber = request.UserName;
return this.con.post(ItemForSaleService.getCategories, request, onError, errorLabel);
}
parser(response: any) {
try {
var result = JSON.parse(response.Mohemm_ITG_ResponseItem);
if (result.result)
return result.result.data
else
return {}
} catch (res) {
console.log(res);
}
}
getItemsByEmployee(request: any, onError?: any, errorLabel?: string) {
this.authService.authenticateRequest(request);
request.EmployeeNumber = request.UserName;
request.ItgEmployeeNumber = 111209;
return this.con.post(ItemForSaleService.getItemForSaleByEmployee, request, onError, errorLabel);
}
}

@ -0,0 +1,94 @@
<ion-content>
<div class="head-title">
<app-generic-header showImage="false" showBack="true" [headerText]="'general,pending-transaction' | translate">
</app-generic-header>
</div>
<div class="header"></div>
<div class="bottom"></div>
<div #containerDiv id="containerDiv">
<ion-row class="ion-justify-content-center">
<ion-col [size]="11">
<ion-item>
<ion-label>{{ 'general,select' | translate}}</ion-label>
<ion-select [(ngModel)]="selectedTransaction" (ionChange)="selectFunctions()" [placeholder]="'general,select' | translate"
[okText]="'general,ok' | translate" [cancelText]="'general,cancel' | translate" class="large-ion-select">
<ion-select-option *ngFor="let transaction of transactions" [value]="transaction">
{{ transaction.FUNCTION_PROMPT}}</ion-select-option></ion-select>
</ion-item>
</ion-col>
</ion-row>
<div class="date-container">
<ion-row class="ion-justify-content-center">
<ion-col [size]="11">
<ion-item>
<div class="date-time-icon date-primary"></div>
<ion-label>{{ 'general,from-date' | translate}}</ion-label>
<ion-datetime
[placeholder]="Select"
display-format="DD/MM/YYYY"
[min]="1900"
[max]="2100"
[(ngModel)]="dateFrom"
doneText="Done"
cancelText="Cancel"
></ion-datetime>
</ion-item>
</ion-col>
<ion-col [size]="11">
<ion-item>
<div class="date-time-icon date-primary"></div>
<ion-label>{{ 'general,to-date' | translate}}</ion-label>
<ion-datetime
[placeholder]="Select"
display-format="DD/MM/YYYY"
[min]="1900"
[max]="2100"
[(ngModel)]="dateTo"
doneText="Done"
cancelText="Cancel"
></ion-datetime>
</ion-item>
</ion-col>
</ion-row>
</div>
<div class="data-content">
<div class="no-dataDiv"
*ngIf="transactionDetails && transactionDetails.length==0">
<!-- <div class="no-dataDiv"> -->
<ion-row>
<img class="empty-data" src="../assets/imgs/box.png" />
</ion-row>
<h4> {{'general, noData' | translate}}</h4>
</div>
</div>
<div *ngIf="transactionDetails && transactionDetails.length>0" class="transaction-list">
<ion-item *ngFor="let transaction of transactionDetails">
<div class="date">{{transaction.CREATION_DATE}}</div>
<ion-label class="ion-text-wrap">
<ion-text color="primary">
<p class="display-created " >{{'transaction, created-for' | translate}}</p>
<p class="display-created bold padding">{{transaction.TRANSACTION_CREATED_FOR}}</p>
</ion-text>
<ion-text color="secondary">
<p class="color-black">{{'transaction, request-type' | translate}}</p>
<p>{{transaction.REQUEST_TYPE}}</p>
</ion-text>
</ion-label>
</ion-item>
</div>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="addEitOkButton" [disabled]="!isValid()" color="customnavy" ion-button (click)="getPendingRequestDetails()">
{{'general, submit' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,25 @@
.display-created{
display: inline-block;
color:#000;
}
.padding{
padding-left:5px;
padding-right: 5px;
}
.bold{
font-weight: bold;
}
.color-black{
color:#000;
}
.date{
position: absolute;
font-size: 12px;
padding: 10px;
right:0;
}
.transaction-list{
margin-top:20px;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HomeComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,56 @@
import { Component, ElementRef, OnInit } from '@angular/core';
import { EitService } from 'src/app/eit/services/eit.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ServiceService } from '../service/service.service';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
})
export class HomeComponent implements OnInit {
public direction: any;
public transactions: any = [];
public selectedTransaction: any;
public dateTo: any;
public dateFrom: any;
public transactionDetails;
constructor(public cs: CommonService, private elementRef: ElementRef, public trServcice: ServiceService, public ts: TranslatorService, public eitService: EitService) { }
ngOnInit() {
this.getPendingTransaction();
this.direction = TranslatorService.getCurrentLanguageName();
}
getPendingTransaction() {
this.cs.startLoading();
this.trServcice.getPendingRequests({
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
this.cs.stopLoading();
this.transactions = response['GetPendingReqFunctionsList'];
})
}
getPendingRequestDetails() {
this.cs.startLoading();
this.trServcice.getPendingRequestDetails({
'P_FUNCTION_ID': this.selectedTransaction.FUNCTION_ID,
'P_CREATION_DATE_FROM': "/Date(" + Date.parse(this.dateFrom) + '+0300' + ")/",
'P_CREATION_DATE_TO': "/Date(" + Date.parse(this.dateTo) + '+0300' + ")/",
'P_PAGE_NUM': 1,
'P_PAGE_LIMIT': 20,
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
this.cs.stopLoading();
this.transactionDetails = response['GetPendingReqDetailsList'];
})
}
isValid() {
if (this.selectedTransaction && this.dateFrom && this.dateTo)
return true;
else return false
}
}

@ -0,0 +1,36 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { PendingTransactionPage } from './pending-transaction.page';
import { HomeComponent } from './home/home.component';
import { ServiceService } from './service/service.service';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
const routes: Routes = [
{
path: '',
component: PendingTransactionPage,
children: [
{
path: 'home',
component: HomeComponent
},
]
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes),
HmgCommonModule
],
declarations: [PendingTransactionPage, HomeComponent],
providers: [ServiceService]
})
export class PendingTransactionPageModule { }

@ -0,0 +1,4 @@
<ion-content>
<ion-router-outlet></ion-router-outlet>
</ion-content>

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PendingTransactionPage } from './pending-transaction.page';
describe('PendingTransactionPage', () => {
let component: PendingTransactionPage;
let fixture: ComponentFixture<PendingTransactionPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PendingTransactionPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PendingTransactionPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-pending-transaction',
templateUrl: './pending-transaction.page.html',
styleUrls: ['./pending-transaction.page.scss'],
})
export class PendingTransactionPage implements OnInit {
constructor() { }
ngOnInit() {
}
}

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { ServiceService } from './service.service';
describe('ServiceService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: ServiceService = TestBed.get(ServiceService);
expect(service).toBeTruthy();
});
});

@ -0,0 +1,44 @@
import { Injectable } from '@angular/core';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
@Injectable({
providedIn: 'root'
})
export class ServiceService {
public static GET_PENDING_REQ_FUNCTIONS = 'Services/ERP.svc/REST/GET_PENDING_REQ_FUNCTIONS';
public static GET_PENDING_REQ_DETAILS = 'Services/ERP.svc/REST/GET_PENDING_REQ_DETAILS';
constructor(
public con: ConnectorService,
private authService: AuthenticationService,
public cs: CommonService
) { }
getPendingRequests(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ServiceService.GET_PENDING_REQ_FUNCTIONS,
request,
onError,
errorLabel
);
}
getPendingRequestDetails(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ServiceService.GET_PENDING_REQ_DETAILS,
request,
onError,
errorLabel
);
}
}

@ -74,6 +74,7 @@
<label class="rowBolds">{{personalInfo.EMPLOYEE_MOBILE_NUMBER}}</label>
</ion-row>
</ion-col>
</ion-row>
<ion-row style="border-bottom: rgb(190, 187, 187) solid 1px;">

@ -123,10 +123,19 @@
</ion-label>
<h3 [ngClass]="direction === 'ltr'? 'result-label-text-form': 'result-label-text-form-ar' ">{{personalInfo.EMPLOYMENT_CATEGORY_MEANING}}</h3>
<br>
<ion-row>
<ion-label>
<h3 [ngClass]="direction === 'ltr'? 'type-label-text-form': 'type-label-text-form-ar' ">{{ts.trPK('userProfile','phone-no')}}</h3>
</ion-label>
<ion-col size="11">
<h3 [ngClass]="direction === 'ltr'? 'result-label-text-form': 'result-label-text-form-ar' ">{{personalInfo.EMPLOYEE_MOBILE_NUMBER}}</h3>
</ion-col>
<ion-col size="1" class="create-edit">
<ion-icon name="create" *ngIf="personalInfo.EMPLOYEE_MOBILE_NUMBER" (click)="editPhone()"></ion-icon>
<ion-icon name="add-circle" *ngIf="!personalInfo.EMPLOYEE_MOBILE_NUMBER" (click)="createPhone()"></ion-icon>
</ion-col>
</ion-row>
<br>
<ion-label>
<h3 [ngClass]="direction === 'ltr'? 'type-label-text-form': 'type-label-text-form-ar' ">{{ts.trPK('userProfile','busG')}}</h3>

@ -1352,4 +1352,7 @@ $actionBtnSize: 36px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
}
.create-edit{
font-size: 20px;
}

@ -149,7 +149,7 @@ export class HomeComponent implements OnInit {
let jobTitle = user.POSITION_NAME.split('.');
if (jobTitle && jobTitle.length > 1) {
this.jobName = jobTitle[0] + " " + jobTitle[1];
}
}
if (this.cs.getUpdateImage().status) {
this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,' + this.cs.getUpdateImage().img);
@ -311,7 +311,7 @@ export class HomeComponent implements OnInit {
const modal = await this.modalController.create({
component: EditDetailProfileComponent,
cssClass: 'my-custom-modal-css',
componentProps:{ sourceName: source}
componentProps: { sourceName: source }
});
modal.onDidDismiss()
@ -323,7 +323,7 @@ export class HomeComponent implements OnInit {
this.cs.sharedService.setSharedData(this.addressSubMenu, ProfileService.ADRESS_ENTRIES);
this.cs.sharedService.setSharedData(this.employeeAdress, ProfileService.EMP_ADDRESS);
this.cs.sharedService.setSharedData(this.country, ProfileService.COUNTRY);
this.cs.openAddAddress();
} else if (data.data && data.data.data == 2 && source === 'address') {
this.cs.openAddAddress();
@ -356,5 +356,21 @@ export class HomeComponent implements OnInit {
this.cs.openAddBasicDetails('correct');
}
}
public editPhone() {
this.getObjectValues();
}
public createPhone() {
}
getObjectValues() {
this.profileService.getObjectValue({
P_OBJECT_TYPE: 'LOOKUP',
P_OBJECT_NAME: 'PHONE_TYPE'
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
console.log(response);
})
}
}

@ -32,7 +32,7 @@ export class ProfileService {
public static getDiffStructure = "Services/ERP.svc/REST/GET_ADDRESS_DFF_STRUCTURE";
public static submitAddressTransactions = "Services/ERP.svc/REST/SUBMIT_ADDRESS_TRANSACTION";
public static submitBasicDetailsTransaction = "Services/ERP.svc/REST/SUBMIT_BASIC_DET_TRANSACTION";
public static getObjectValues = "Services/ERP.svc/REST/GET_OBJECT_VALUES";
public static ADRESS_ENTRIES = 'address-entries';
public static EMP_ADDRESS = 'emp-address';
public static COUNTRY = 'country';
@ -127,4 +127,12 @@ export class ProfileService {
this.authService.authenticateRequest(request);
return this.con.post(ProfileService.startBasicProcess, request, onError, errorLabel);
}
public getObjectValue(request: any, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.P_USER_NAME;
return this.con.post(ProfileService.getObjectValues, request, onError, errorLabel);
}
}

@ -0,0 +1,30 @@
<ion-content>
<div class="head-title">
<app-generic-header showImage="false" showBack="true" [headerText]="'general,concurrent-report' | translate">
</app-generic-header>
</div>
<div class="header"></div>
<div class="bottom"></div>
<div class="main-container">
<ion-item>
<ion-label>{{ 'worklist,template-name' | translate}}</ion-label>
<ion-select [(ngModel)]="template" (ionChange)="selectTemplates()" [placeholder]="'general,select' | translate"
[okText]="'general,ok' | translate" [cancelText]="'general,cancel' | translate" class="large-ion-select">
<ion-select-option *ngFor="let program of programList" [value]="program">
{{ program.CONCURRENT_PROGRAM_NAME}}</ion-select-option></ion-select>
</ion-item>
<div class="divider"></div>
<div #containerDiv id="containerDiv">
</div>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="addEitOkButton" color="customnavy" ion-button (click)="submitTransaction()">
{{'vacation-rule, next-label' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,6 @@
.main-container{
padding: 10px;
}
.divider{
height:20px
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ConcurrentReportComponent } from './concurrent-report.component';
describe('ConcurrentReportComponent', () => {
let component: ConcurrentReportComponent;
let fixture: ComponentFixture<ConcurrentReportComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ConcurrentReportComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ConcurrentReportComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { ReportServiceService } from './report-service.service';
describe('ReportServiceService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: ReportServiceService = TestBed.get(ReportServiceService);
expect(service).toBeTruthy();
});
});

@ -0,0 +1,49 @@
import { Injectable } from '@angular/core';
import { AuthenticationService } from '../hmg-common/services/authentication/authentication.service';
import { CommonService } from '../hmg-common/services/common/common.service';
import { ConnectorService } from '../hmg-common/services/connector/connector.service';
@Injectable({
providedIn: 'root'
})
export class ReportServiceService {
public static GET_CONCURRENT_PROGRAM = 'Services/ERP.svc/REST/GET_CONCURRENT_PROGRAMS';
public static GET_CPP_DIFF_STRUCTURE = 'Services/ERP.svc/REST/GET_CCP_DFF_STRUCTURE';
public static SUBMIT_CPP_REQUEST = 'Services/ERP.svc/REST/SUBMIT_CCP_TRANSACTION'
constructor(
public con: ConnectorService,
private authService: AuthenticationService,
public cs: CommonService
) { }
getConcurrentProgram(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ReportServiceService.GET_CONCURRENT_PROGRAM,
request,
onError,
errorLabel
);
}
getCPPDiffStructure(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ReportServiceService.GET_CPP_DIFF_STRUCTURE,
request,
onError,
errorLabel
);
}
submitTransaction(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ReportServiceService.SUBMIT_CPP_REQUEST,
request,
onError,
errorLabel
);
}
}

@ -0,0 +1,39 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { ReportsPage } from './reports.page';
import { ConcurrentReportComponent } from './concurrent-report/concurrent-report.component';
import { ReportServiceService } from './report-service.service';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
const routes: Routes = [
{
path: '',
component: ReportsPage,
children: [
{
path: 'concurrent-report',
component: ConcurrentReportComponent
},
],
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes),
HmgCommonModule
],
declarations: [ReportsPage, ConcurrentReportComponent],
providers: [ReportServiceService]
})
export class ReportsPageModule { }

@ -0,0 +1,3 @@
<ion-content>
<ion-router-outlet></ion-router-outlet>
</ion-content>

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ReportsPage } from './reports.page';
describe('ReportsPage', () => {
let component: ReportsPage;
let fixture: ComponentFixture<ReportsPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ReportsPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ReportsPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-reports',
templateUrl: './reports.page.html',
styleUrls: ['./reports.page.scss'],
})
export class ReportsPage implements OnInit {
constructor() { }
ngOnInit() {
}
}

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { TerminationServiceService } from './termination-service.service';
describe('TerminationServiceService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: TerminationServiceService = TestBed.get(TerminationServiceService);
expect(service).toBeTruthy();
});
});

@ -0,0 +1,40 @@
import { Injectable } from '@angular/core';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
@Injectable({
providedIn: 'root'
})
export class TerminationServiceService {
public static GET_TERM_COLS_STRUCTURE = 'Services/ERP.svc/REST/GET_TERM_COLS_STRUCTURE';
public static GET_TERM_DIFF_STRUCTURE = 'Services/ERP.svc/REST/GET_TERM_DFF_STRUCTURE';
public static TERMINATION_PAGE = 'termination-page';
constructor(
public con: ConnectorService,
private authService: AuthenticationService,
public cs: CommonService
) { }
getTerminationColStructure(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
TerminationServiceService.GET_TERM_COLS_STRUCTURE,
request,
onError,
errorLabel
);
}
getTermDiffStructure(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
TerminationServiceService.GET_TERM_DIFF_STRUCTURE,
request,
onError,
errorLabel
);
}
}

@ -0,0 +1,18 @@
<ion-content>
<div class="head-title">
<app-generic-header showImage="false" showBack="true" [headerText]="'general,termination' | translate">
</app-generic-header>
</div>
<div class="header"></div>
<div class="bottom"></div>
<div #containerDiv id="containerDiv">
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="addEitOkButton" color="customnavy" ion-button (click)="validateTransaction()">
{{'vacation-rule, next-label' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TerminationFormComponent } from './termination-form.component';
describe('TerminationFormComponent', () => {
let component: TerminationFormComponent;
let fixture: ComponentFixture<TerminationFormComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TerminationFormComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TerminationFormComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,39 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { TerminationPage } from './termination.page';
import { TerminationFormComponent } from './termination-form/termination-form.component';
import { TerminationServiceService } from './service/termination-service.service';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
const routes: Routes = [
{
path: '',
component: TerminationPage,
children: [
{
path: 'termination-form',
component: TerminationFormComponent
},
],
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes),
HmgCommonModule
],
declarations: [TerminationPage, TerminationFormComponent],
providers: [TerminationServiceService]
})
export class TerminationPageModule { }

@ -0,0 +1,3 @@
<ion-content>
<ion-router-outlet></ion-router-outlet>
</ion-content>

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TerminationPage } from './termination.page';
describe('TerminationPage', () => {
let component: TerminationPage;
let fixture: ComponentFixture<TerminationPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TerminationPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TerminationPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-termination',
templateUrl: './termination.page.html',
styleUrls: ['./termination.page.scss'],
})
export class TerminationPage implements OnInit {
constructor() { }
ngOnInit() {
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

@ -209,6 +209,26 @@
}
},
"general": {
"concurrent-report": {
"en": "Concurrent Report",
"ar": "تقرير متزامن"
},
"from-date": {
"en": "From Date",
"ar": "من التاريخ"
},
"to-date": {
"en": "To Date",
"ar": "حتى الآن"
},
"termination": {
"en": "Termination",
"ar": "نهاية"
},
"pending-transaction": {
"en": "Pending Transactions",
"ar": "المعاملات المعلقة"
},
"huawei-plugin-issue": {
"en": "Error while initializing Huawei Location Plugin",
"ar": "خطأ أثناء تهيئة Huawei Location Plugin"
@ -1049,7 +1069,7 @@
"en": " Select the type of change you want to make.",
"ar": " حدد نوع التغيير الذي تريد القيام به."
},
"try-again":{
"try-again": {
"en": "somthing went wrong please try again later",
"ar": "حدث خطا الرجاء المحاولة لاحقا"
},
@ -1061,13 +1081,13 @@
"en": "Update Now",
"ar": "تحديث الان"
},
"success-create":{
"success-create": {
"en": "Request has been submitted successfully",
"ar": "تم تقديم الطلب بنجاح"
},
"business-card":{
"en":"View Business Card",
"ar":"عرض بطاقة العمل"
"business-card": {
"en": "View Business Card",
"ar": "عرض بطاقة العمل"
}
},
"home": {
@ -2261,23 +2281,22 @@
"en": "Favorite",
"ar": "مفضل"
},
"workflow":{
"en":"WorkFlow",
"ar":"سير العمل"
"workflow": {
"en": "WorkFlow",
"ar": "سير العمل"
},
"employee-id":{
"en":"Employee ID",
"ar":"هوية الموظف"
"employee-id": {
"en": "Employee ID",
"ar": "هوية الموظف"
},
"employee-email":{
"en":"Employee Email",
"ar":"البريد الإلكتروني للموظف"
"employee-email": {
"en": "Employee Email",
"ar": "البريد الإلكتروني للموظف"
},
"employee-name":{
"en":"Employee Name",
"ar":"اسم الموظف"
"employee-name": {
"en": "Employee Name",
"ar": "اسم الموظف"
}
},
"worklist": {
"view": {
@ -3236,5 +3255,19 @@
"en": "Please give us a comments",
"ar": "من فضلك اعطنا تعليقات"
}
},
"transaction": {
"created-for": {
"en": "Created for",
"ar": "خلقت ل"
},
"created-date": {
"en": "Created Date",
"ar": "تاريخ الإنشاء"
},
"request-type": {
"en": "Request type",
"ar": "نوع الطلب"
}
}
}
Loading…
Cancel
Save